pi-oracle 0.7.11 → 0.7.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.7.13 - 2026-06-15
6
+
7
+ ### Added
8
+ - added a release-blocking ChatGPT preset proof gate (`npm run release:proof:chatgpt-presets`) so publishing requires fresh loaded-extension evidence for every canonical ChatGPT preset
9
+
10
+ ### Fixed
11
+ - fixed compact ChatGPT Intelligence menu handling so selected thinking tiers that close back to `Medium`, `High`, or `Extra High` composer pills are accepted only after an intentional matching menu click instead of falling through to the removed legacy effort dropdown
12
+ - fixed `instant_auto_switch` under the compact ChatGPT UI, where the legacy auto-switch control is absent after selecting the compact `Instant` tier
13
+ - made ChatGPT model-configuration opening tolerate slower compact-UI hydration before reporting UI drift
14
+ - stabilized archive creation when the compression subprocess exits before tar, so the worker terminates upstream tar immediately instead of waiting for the archive timeout
15
+ - surfaced provider rate-limit/outage modals explicitly during ChatGPT model setup, upload, send, and response waits instead of reporting generic UI drift
16
+
17
+ ## 0.7.12 - 2026-06-15
18
+
19
+ ### Changed
20
+ - switched Grok oracle submissions to gzip-compressed tar archives (`.tar.gz`) so Grok can extract uploaded context without `zstd`
21
+ - centralized provider archive policy for archive format, upload ceiling, and local compression prerequisites
22
+ - split oracle archive construction out of the agent-facing tool orchestration module
23
+
24
+ ### Fixed
25
+ - preserved ChatGPT `.tar.zst` submissions and `zstd` preflight requirements when ChatGPT is explicitly selected while Grok is the configured default provider
26
+
27
+ ### Validation
28
+ - ran the full `npm run verify:oracle` release gate
29
+ - verified isolated local `pi` submissions create extractable Grok `.tar.gz` and explicit ChatGPT `.tar.zst` archives
30
+
5
31
  ## 0.7.11 - 2026-06-15
6
32
 
7
33
  ### Changed
package/README.md CHANGED
@@ -11,7 +11,7 @@ You: /oracle Review the pending changes. Include the whole repo unless a narrowe
11
11
 
12
12
  pi-oracle:
13
13
  1. preflights local session/auth readiness
14
- 2. builds a context-rich `.tar.zst` repo archive
14
+ 2. builds a context-rich provider archive (`.tar.zst` for ChatGPT, `.tar.gz` for Grok)
15
15
  3. starts an isolated provider web runtime in the background
16
16
  4. uploads the archive and prompt to the selected provider
17
17
  5. saves the response/artifacts under /tmp/oracle-<job-id>/
@@ -80,7 +80,7 @@ You need:
80
80
  - Suggested tested floor: `pi` 0.79.4 or newer; older pi versions are not blocked by package metadata but are outside the current validation baseline
81
81
  - Google Chrome/Chromium or another Chromium-family browser
82
82
  - ChatGPT or Grok already signed in to the configured local browser profile for the provider you plan to use
83
- - `agent-browser`, `tar`, and `zstd` available on the machine
83
+ - `agent-browser` and `tar` available on the machine; `zstd` is also required when submitting ChatGPT `.tar.zst` archives
84
84
  - on macOS APFS clone mode, `cp` available on PATH or via `PI_ORACLE_CP_PATH`; Linux/Windows runtime profile copies use Node's recursive copy
85
85
  - a normal persisted `pi` session, not `pi --no-session`
86
86
  - on Linux, encrypted Chromium cookies may also require `secret-tool` (GNOME/libsecret) or `kwallet-query` + `dbus-send` (KDE), unless a Chrome/Brave safe-storage password override is set for the auth run
@@ -144,7 +144,7 @@ If the wake-up does not arrive, run:
144
144
  flowchart LR
145
145
  A["/oracle request"] --> B["Agent preflights, then gathers a context-rich relevant repo slice"]
146
146
  B --> C["Agent chooses context-rich archive inputs"]
147
- C --> D["oracle_submit builds .tar.zst archive"]
147
+ C --> D["oracle_submit builds provider-specific archive"]
148
148
  D --> E["Detached worker clones isolated auth seed profile"]
149
149
  E --> F["Selected provider receives archive + prompt"]
150
150
  F --> G["Response/artifacts saved under oracle job dir"]
@@ -260,12 +260,12 @@ If macOS prompts for Keychain access during `/oracle-auth`, allow access for the
260
260
 
261
261
  ## Available providers and presets
262
262
 
263
- | Provider | Mode / preset | Upload ceiling |
264
- | --- | --- | --- |
265
- | ChatGPT | Presets below | 250 MiB |
266
- | Grok | `heavy` only | 200 MiB |
263
+ | Provider | Mode / preset | Archive format | Upload ceiling |
264
+ | --- | --- | --- | --- |
265
+ | ChatGPT | Presets below | `.tar.zst` | 250 MiB |
266
+ | Grok | `heavy` only | `.tar.gz` | 200 MiB |
267
267
 
268
- Grok accepts the same `.tar.zst` archives that pi-oracle builds. Manual testing against `https://grok.com` found a 200 MiB file is accepted and a 200 MiB + 1 byte file is rejected, so pi-oracle caps Grok archives at 200 MiB.
268
+ Grok uploads now use `.tar.gz` archives. Grok may accept `.tar.zst` uploads, but its execution environment can lack `zstd` tooling to extract them; gzip-compressed tar keeps extraction on standard tools. Manual testing against `https://grok.com` found a 200 MiB upload is accepted and a 200 MiB + 1 byte upload is rejected, so pi-oracle caps Grok archives at 200 MiB.
269
269
 
270
270
  ## Available ChatGPT presets
271
271
 
@@ -355,7 +355,7 @@ This usually means the cookie import worked but the source cookies are not the a
355
355
 
356
356
  ### A local dependency like `agent-browser`, `tar`, or `zstd` is missing
357
357
 
358
- Install the missing local dependency and rerun the command. On macOS APFS clone mode, `cp` must also be available on PATH or configured with `PI_ORACLE_CP_PATH`; Linux and Windows profile copies use Node's recursive copy.
358
+ Install the missing local dependency and rerun the command. `zstd` is only needed for ChatGPT `.tar.zst` archive submissions; Grok submissions use `.tar.gz`. On macOS APFS clone mode, `cp` must also be available on PATH or configured with `PI_ORACLE_CP_PATH`; Linux and Windows profile copies use Node's recursive copy.
359
359
 
360
360
  ### Auto-detection picked the wrong browser profile
361
361
 
@@ -382,7 +382,7 @@ npm test
382
382
  npm run verify:oracle
383
383
  ```
384
384
 
385
- `npm publish` is guarded by `prepublishOnly`, which runs `npm run release:check`. That release gate requires doctor-first macOS, Ubuntu, and Windows native Crabbox evidence. The required Crabbox runtime suite uses packed-install proof, not source-tree `pi -e` loading.
385
+ `npm publish` is guarded by `prepublishOnly`, which runs `npm run release:check`. That release gate now blocks unless fresh live ChatGPT preset proof exists for every canonical preset, then requires doctor-first macOS, Ubuntu, and Windows native Crabbox evidence. The required Crabbox runtime suite uses packed-install proof, not source-tree `pi -e` loading.
386
386
 
387
387
  Use the narrowest validation workflow that proves the change:
388
388
 
@@ -391,6 +391,7 @@ Use the narrowest validation workflow that proves the change:
391
391
  | Everyday local iteration | `npm run verify:oracle` |
392
392
  | Platform-sensitive changes | `npm run smoke:platform:doctor`, then a focused `node scripts/platform-smoke.mjs run --target <target> --suite <suite>` |
393
393
  | Platform matrix proof | `npm run smoke:platform:all` |
394
+ | ChatGPT preset release proof | `npm run release:proof:chatgpt-presets` |
394
395
  | Publish/release gate | `npm run release:check` |
395
396
 
396
397
  For macOS, Ubuntu, and Windows native package/build plus packed runtime validation, use [`docs/platform-smoke.md`](docs/platform-smoke.md). The full release gate is:
@@ -399,9 +400,19 @@ For macOS, Ubuntu, and Windows native package/build plus packed runtime validati
399
400
  npm run release:check
400
401
  ```
401
402
 
403
+ Before a release, run live jobs through the loaded extension for every ChatGPT preset in `ORACLE_SUBMIT_PRESETS`. Each prompt must make the saved response contain exact markers `PRESET <preset> OK` and `PACKAGE pi-oracle`. After every job has completed, save the job ids/job directories in `.artifacts/chatgpt-preset-proof/latest.json`; `validatedAt` must be later than the completed jobs. Start from the checked, intentionally non-valid template:
404
+
405
+ ```bash
406
+ mkdir -p .artifacts/chatgpt-preset-proof
407
+ node scripts/oracle-chatgpt-preset-proof.mjs template > .artifacts/chatgpt-preset-proof/latest.json
408
+ npm run release:proof:chatgpt-presets
409
+ ```
410
+
411
+ The proof checker is intentionally part of `release:check`; it fails if the proof is missing, stale, tied to a different package version/git head, references jobs that completed before the current commit, or lacks actual persisted ChatGPT `.tar.zst` job state and response text for any canonical preset.
412
+
402
413
  The real runtime suite defaults to deterministic installed-tool execution so platform proof stays bounded. Provider/model defaults remain `zai/glm-5.2` for doctor/config and for optional model-agent debugging; override with `PI_ORACLE_REAL_TEST_PROVIDER` and `PI_ORACLE_REAL_TEST_MODEL` when needed. For inner-loop source loading only, use `npm run smoke:real:source`; it is not release proof. Set `PI_ORACLE_REAL_TEST_MODEL_AGENT=1` only when debugging the slower model-agent path. The optional second real-agent negative symlink check is opt-in via `PI_ORACLE_REAL_TEST_NEGATIVE_SYMLINK=1`; `npm run sanity:oracle` covers archive/symlink rejection by default without adding another model-agent turn to the platform release gate.
403
414
 
404
- For manual end-to-end local-extension smoke testing, use [`docs/ORACLE_ISOLATED_PI_VALIDATION.md`](docs/ORACLE_ISOLATED_PI_VALIDATION.md). That workflow launches isolated `pi` coding-agent sessions against this checkout and uses `instant` or `thinking_light`, as required by the project validation policy.
415
+ For manual end-to-end local-extension smoke testing, use [`docs/ORACLE_ISOLATED_PI_VALIDATION.md`](docs/ORACLE_ISOLATED_PI_VALIDATION.md). Ordinary pre-commit smoke runs can still use `instant` or `thinking_light`, but release proof must cover every canonical ChatGPT preset through the loaded extension.
405
416
 
406
417
  ## Project map
407
418
 
@@ -17,7 +17,7 @@ Create a `pi` extension that lets the user or agent consult ChatGPT.com or Grok
17
17
 
18
18
  - manual invocation via `/oracle ...`
19
19
  - automatic invocation by the agent in rare high-difficulty cases
20
- - mandatory project-context archive upload (`.tar.zst`)
20
+ - mandatory project-context archive upload (`.tar.zst` for ChatGPT, `.tar.gz` for Grok)
21
21
  - long-running execution in the background
22
22
  - durable response/artifact persistence plus best-effort wake-the-agent behavior when the oracle response is ready
23
23
  - oracle requires a persisted pi session identity; in-memory/no-session contexts are rejected instead of risking cross-session wake-up misdelivery
@@ -340,7 +340,8 @@ Default location: `${PI_ORACLE_JOBS_DIR:-/tmp}/oracle-<job-id>/`
340
340
  ${PI_ORACLE_JOBS_DIR:-/tmp}/oracle-<job-id>/
341
341
  job.json
342
342
  prompt.md
343
- context-<job-id>.tar.zst
343
+ context-<job-id>.tar.zst # ChatGPT
344
+ context-<job-id>.tar.gz # Grok
344
345
  response.md
345
346
  artifacts.json
346
347
  artifacts/
@@ -570,7 +571,7 @@ Retained from the earlier MVP:
570
571
  - `oracle_auth`, `oracle_submit`, `oracle_read`, `oracle_cancel`
571
572
  - detached background worker model
572
573
  - `${PI_ORACLE_JOBS_DIR:-/tmp}/oracle-<job-id>/...` state layout
573
- - shell-safe archive creation using `tar` piped to `zstd`
574
+ - shell-safe archive creation using tar streams: `zstd` compression for ChatGPT and gzip compression for Grok
574
575
  - private permissions and atomic writes
575
576
  - stale-worker reconciliation
576
577
  - upload ordering: attach → confirm → fill → send
@@ -607,7 +608,7 @@ Live-validated after the concurrency redesign:
607
608
 
608
609
  Still to verify live after this pivot:
609
610
 
610
- - model-selection verification against the current ChatGPT UI under additional real-world variation
611
+ - full ChatGPT preset release matrix evidence must be refreshed before any release; `npm run release:proof:chatgpt-presets` blocks release without one completed loaded-extension ChatGPT job for every canonical preset
611
612
  - optional richer terminal semantics for partial artifact failure (`complete_with_artifact_errors`) in more live scenarios
612
613
 
613
614
  ## Production readiness criteria
@@ -628,7 +629,7 @@ This architecture is now live-validated for the core release path:
628
629
  ### Current readiness summary
629
630
 
630
631
  Current release blockers for the validated scope:
631
- - none currently known
632
+ - release is blocked until fresh loaded-extension ChatGPT preset proof passes `npm run release:proof:chatgpt-presets` for every canonical `ORACLE_SUBMIT_PRESETS` id
632
633
 
633
634
  Remaining non-blocking hardening work:
634
635
  - broaden live proof of the new lifecycle/state-machine model across more degraded paths
@@ -652,4 +653,4 @@ Recent proof points:
652
653
  - repo-owned sanity harness: `npm run sanity:oracle`
653
654
  - real installed-extension smoke source of truth: `scripts/oracle-real-smoke.mjs`; required release proof runs packed-install mode (`npm run smoke:real:packed`) and executes installed-package `oracle_submit` deterministically, with optional slower model-agent debugging via `PI_ORACLE_REAL_TEST_MODEL_AGENT=1`; source mode (`npm run smoke:real:source`) is inner-loop/debug only
654
655
  - macOS, Ubuntu, and Windows native package/build/runtime smoke source of truth: `docs/platform-smoke.md`; use `npm run verify:oracle` for everyday local iteration, `npm run smoke:platform:doctor` plus a focused target/suite run for platform-sensitive changes, `npm run smoke:platform:all` for doctor-first platform matrix evidence, and `npm run release:check` for the full local-plus-platform release gate
655
- - release gate: `npm run release:check`, also used by `prepublishOnly`, combines static verification and all required Crabbox platform smokes
656
+ - release gate: `npm run release:check`, also used by `prepublishOnly`, combines static verification, fresh loaded-extension ChatGPT preset proof via `npm run release:proof:chatgpt-presets`, and all required Crabbox platform smokes
@@ -35,15 +35,34 @@ Do not add `https://github.com/fitchmultz/pi-oracle` to this repository's `.pi/s
35
35
 
36
36
  `oracle_submit` now preflights missing, unreadable, or unverified auth seed profiles before it creates an archive or persists a job. For archive-inspection smoke tests that intentionally run without real auth, use `oracle_preflight` for the blocker path or create a test seed only in a purpose-built fixture that includes the `.oracle-seed-generation` marker.
37
37
 
38
- ## Preset requirement
38
+ ## Preset requirements
39
39
 
40
- Use either:
40
+ For ordinary pre-commit isolated smoke tests, use either:
41
41
 
42
42
  - `instant`
43
43
  - `thinking_light`
44
44
 
45
45
  The examples below use `instant` because it is the fastest smoke-test preset.
46
46
 
47
+ For any release, and for any change that touches ChatGPT model selection, run live loaded-extension jobs for every canonical ChatGPT preset from `ORACLE_SUBMIT_PRESETS`:
48
+
49
+ - `pro_standard`
50
+ - `pro_extended`
51
+ - `thinking_light`
52
+ - `thinking_standard`
53
+ - `thinking_extended`
54
+ - `thinking_heavy`
55
+ - `instant`
56
+ - `instant_auto_switch`
57
+
58
+ Use prompts that make each saved response contain exact markers `PRESET <preset> OK` and `PACKAGE pi-oracle`. Save the completed job ids/job directories in `.artifacts/chatgpt-preset-proof/latest.json` only after every job completes; `validatedAt` must be later than those completed jobs. The checker reads the actual persisted `job.json`, worker log, and response files. Then run:
59
+
60
+ ```bash
61
+ npm run release:proof:chatgpt-presets
62
+ ```
63
+
64
+ `npm run release:check` runs that proof gate before release. This is intentional: publishing is blocked until every ChatGPT preset has fresh loaded-extension evidence.
65
+
47
66
  ## Prerequisites
48
67
 
49
68
  - `pi` installed locally
@@ -49,7 +49,8 @@ Use the narrowest workflow that proves the change. Do not run the full platform
49
49
  | Everyday local iteration | `npm run verify:oracle` | Syntax, bundle, platform-smoke invariants, type checks, oracle sanity, and package dry-run pass locally. |
50
50
  | Platform-sensitive change | `npm run smoke:platform:doctor`, then `node scripts/platform-smoke.mjs run --target <target> --suite <suite>` | Target setup is ready and the affected platform/suite works without paying for unrelated targets. |
51
51
  | Platform matrix proof | `npm run smoke:platform:all` | Doctor-first packed-install proof passes on every required target and suite. |
52
- | Publish/release gate | `npm run release:check` | Local verification (`verify:oracle`) passes, then the doctor-first platform matrix passes. |
52
+ | ChatGPT preset release proof | `npm run release:proof:chatgpt-presets` | Fresh loaded-extension proof exists for every canonical ChatGPT preset. |
53
+ | Publish/release gate | `npm run release:check` | Local verification (`verify:oracle`) passes, fresh ChatGPT preset proof exists, then the doctor-first platform matrix passes. |
53
54
 
54
55
  Platform-sensitive changes include archive behavior, process cleanup, runtime/browser profile handling, package metadata, Crabbox harness code, or anything that may differ across macOS/Linux/Windows.
55
56
 
@@ -77,7 +78,7 @@ Full release gate:
77
78
  npm run release:check
78
79
  ```
79
80
 
80
- `release:check` runs `verify:oracle` before `smoke:platform:all`, matching the Crabbox doctor-first release order: cheap harness checks, doctor, full matrix, then artifact review. `prepublishOnly` runs `npm run release:check`.
81
+ `release:check` runs `verify:oracle`, then `release:proof:chatgpt-presets`, then `smoke:platform:all`, matching the release order: cheap harness checks, fresh live ChatGPT preset proof, doctor, full matrix, then artifact review. `prepublishOnly` runs `npm run release:check`.
81
82
 
82
83
  ## What `platform-build` proves
83
84