pi-oracle 0.6.16 → 0.7.0

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,8 +2,38 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.7.0 - 2026-05-17
6
+
7
+ ### Added
8
+ - added Grok Heavy as a second oracle provider, with `provider: "grok"`, Grok-only `mode: "heavy"`, `/oracle-auth grok`, separate Grok auth seed profiles, and provider defaults in oracle config
9
+ - added provider-aware `oracle_preflight` support, including explicit Grok checks and follow-up readiness checks that use the prior job's provider
10
+ - added Grok web worker support for auth readiness, Heavy selection, archive upload, prompt submission, response extraction, and same-thread follow-ups
11
+
12
+ ### Changed
13
+ - documented provider selection, Grok's 200 MiB upload ceiling, ChatGPT's 250 MiB ceiling, and same-provider-only follow-up behavior in README, design docs, and prompt templates
14
+ - updated oracle job summaries to report Grok provider/mode selections, not only ChatGPT presets
15
+
16
+ ### Fixed
17
+ - preserved Cloudflare continuity cookies for current ChatGPT verification flows and removed Chromium singleton artifacts when cloning runtime profiles
18
+ - tightened Grok/X cookie import to an explicit auth-cookie allowlist and made Grok jobs fail clearly if a completed response never produces a stable conversation URL
19
+ - improved ChatGPT response extraction fallback behavior when the UI no longer exposes the old `ChatGPT said:` heading structure
20
+
21
+ ### Validation
22
+ - verified Grok Heavy live submission and same-thread Grok follow-up using isolated local-extension `pi` sessions
23
+ - verified a final ChatGPT `instant` live smoke using an isolated local-extension `pi` session before release
24
+
25
+ ## 0.6.17 - 2026-05-10
26
+
5
27
  ### Changed
6
28
  - made `/oracle-auth` success and failure output easier to scan, with compact source summaries and source-specific troubleshooting for configured Chromium cookie sources
29
+ - tightened README quickstart/command wording around preflight-first `/oracle` behavior, context-rich archive selection, cleanup retention, and preset defaults
30
+ - added the resolved oracle model preset snapshot to `oracle_submit` queued/dispatched output so agents can see what preset will run
31
+ - clarified `oracle_preflight` output so users can see that it validates the persisted pi session, local config, and ChatGPT auth seed created by `oracle_auth`
32
+ - made direct `scripts/oracle-sanity.ts` execution fail fast unless isolated oracle state/jobs dirs are provided, preventing accidental sanity-job leakage into live oracle pollers
33
+
34
+ ### Fixed
35
+ - stopped worker/auth readiness checks from treating ChatGPT's public logged-out composer shell as an authenticated ready state, and made stale-auth failures name the visible login controls instead of reporting a misleading partial-login state
36
+ - made plain `instant` model selection robust against the current ChatGPT model menu by recognizing closed Instant chips and falling back to the top-level model menu when the configure sheet is unavailable
7
37
 
8
38
  ## 0.6.16 - 2026-05-07
9
39
 
package/README.md CHANGED
@@ -1,62 +1,118 @@
1
1
  # pi-oracle
2
2
 
3
- `pi-oracle` is a `pi` package that lets the agent hand off difficult, long-running tasks to ChatGPT.com through the web app instead of the API.
3
+ `pi-oracle` lets a `pi` agent send hard, long-running work to ChatGPT.com or Grok through the web app, with repo archives, background execution, saved results, and a best-effort wake-up back into `pi` when the answer is ready.
4
4
 
5
- Use it when you want:
6
- - your real ChatGPT account
7
- - web-model behavior instead of API usage
8
- - large repo/context uploads
9
- - async background execution
10
- - durable saved responses/artifacts plus best-effort wake-ups back into `pi`
5
+ > Status: experimental public beta. Validated primarily on macOS with Google Chrome/Chromium and `pi` 0.65.0+. Normal oracle jobs run in an isolated browser profile, not your active browser window.
11
6
 
12
- Normal oracle jobs run in an isolated browser profile, not your active browser window.
7
+ ## What a successful run looks like
13
8
 
14
- > Status: experimental public beta. Validated primarily on macOS with Google Chrome and `pi` 0.65.0+.
9
+ ```text
10
+ You: /oracle Review the pending changes. Include the whole repo unless a narrower archive is clearly better.
11
+
12
+ pi-oracle:
13
+ 1. preflights local session/auth readiness
14
+ 2. builds a context-rich `.tar.zst` repo archive
15
+ 3. starts an isolated provider web runtime in the background
16
+ 4. uploads the archive and prompt to the selected provider
17
+ 5. saves the response/artifacts under /tmp/oracle-<job-id>/
18
+ 6. sends a best-effort wake-up back to the matching pi session
19
+
20
+ Later: /oracle-read <job-id>
21
+ ```
22
+
23
+ What you are seeing: the local `pi` agent keeps control of context selection and safety checks, while the selected web provider handles the expensive second-opinion work asynchronously. If the wake-up is missed, the result still lives on disk and can be read by job id.
24
+
25
+ ## Who this is for
26
+
27
+ Use `pi-oracle` if you use `pi` and want a larger asynchronous reviewer, planner, or analyst that can use your real ChatGPT or Grok web account instead of an API model.
28
+
29
+ It is most useful for:
30
+
31
+ - maintainers reviewing broad repo changes before shipping
32
+ - agents that need a slower second opinion without blocking the main `pi` turn
33
+ - migration, architecture, or failure-mode analysis that benefits from a large archive
34
+ - follow-up questions that should continue the same provider thread later
35
+
36
+ Do not use it for:
37
+
38
+ - short local coding tasks that `pi` can handle directly
39
+ - projects that must never be uploaded to ChatGPT.com, Grok, or another configured web provider
40
+ - non-macOS environments or machines without the required local browser/tooling
41
+
42
+ ## Problem it solves
43
+
44
+ A normal coding-agent turn is the wrong shape for some work: the task may need a large repo snapshot, a slower web model, a real ChatGPT/Grok subscription, artifact downloads, or a durable result that arrives after the active turn ends.
15
45
 
16
- ## When to use it
46
+ `pi-oracle` makes that workflow explicit and recoverable instead of asking the main agent to manually drive provider chat UIs in your real browser window.
17
47
 
18
- Use `pi-oracle` for:
19
- - big code reviews of a repo or pending changes
20
- - architectural or migration analysis that benefits from a large uploaded archive
21
- - long-running prompts that may take minutes to finish
22
- - follow-up questions in the same ChatGPT thread later
48
+ ## What it does
23
49
 
24
- Do not reach for it first for:
25
- - normal short coding tasks that `pi` can handle directly
26
- - workflows that must never upload project archives to ChatGPT.com
27
- - environments outside the current supported setup
50
+ | Problem | Capability | Proof in this repo |
51
+ | --- | --- | --- |
52
+ | Hard tasks need more context than a quick turn should gather. | `/oracle` prompts the agent to preflight, choose a context-rich archive, and submit it to the selected provider web app. | [`prompts/oracle.md`](prompts/oracle.md), `oracle_submit`, archive tests in `scripts/oracle-sanity-*` |
53
+ | Browser automation should not steal focus or mutate your active profile. | Jobs clone an authenticated seed profile into per-job isolated runtime profiles. | [`docs/ORACLE_DESIGN.md`](docs/ORACLE_DESIGN.md), [`extensions/oracle/lib/runtime.ts`](extensions/oracle/lib/runtime.ts) |
54
+ | Long jobs need durability. | Job state, responses, logs, and artifacts persist under `${PI_ORACLE_JOBS_DIR:-/tmp}/oracle-<job-id>/`. | [`extensions/oracle/lib/jobs.ts`](extensions/oracle/lib/jobs.ts), `/oracle-read`, `/oracle-status` |
55
+ | Provider auth can expire or drift. | `/oracle-auth [chatgpt|grok]` refreshes the isolated auth seed from a configured local Chromium profile, with recovery guidance. | [`extensions/oracle/lib/auth.ts`](extensions/oracle/lib/auth.ts), [`docs/ORACLE_RECOVERY_DRILL.md`](docs/ORACLE_RECOVERY_DRILL.md) |
56
+ | Agents need a simple API, not UI-driving instructions. | The package exposes agent-facing tools: `oracle_preflight`, `oracle_submit`, `oracle_read`, `oracle_auth`, and `oracle_cancel`. | [`extensions/oracle/lib/tools.ts`](extensions/oracle/lib/tools.ts) |
28
57
 
29
- ## Install
58
+ ## Fastest way to see it work
30
59
 
31
- npm:
60
+ ### 1. Install
61
+
62
+ From npm:
32
63
 
33
64
  ```bash
34
65
  pi install npm:pi-oracle
35
66
  ```
36
67
 
37
- GitHub:
68
+ Or from GitHub:
38
69
 
39
70
  ```bash
40
71
  pi install https://github.com/fitchmultz/pi-oracle
41
72
  ```
42
73
 
43
- ## Quickstart
74
+ ### 2. Check requirements
75
+
76
+ You need:
77
+
78
+ - macOS
79
+ - Node.js 22 or newer
80
+ - `pi` 0.65.0 or newer
81
+ - Google Chrome or another Chromium-family browser
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
84
+ - a normal persisted `pi` session, not `pi --no-session`
85
+
86
+ ### 3. Sync provider auth once
87
+
88
+ ```text
89
+ /oracle-auth
90
+ ```
44
91
 
45
- 1. Start a normal persisted `pi` session. Do not use `pi --no-session` for oracle.
46
- 2. Make sure ChatGPT already works in your configured local browser profile.
47
- 3. Make sure these are installed: Google Chrome, `agent-browser`, `tar`, and `zstd`.
48
- 4. Optional: create `~/.pi/agent/extensions/oracle.json` if you want non-default settings.
49
- 5. Run `/oracle-auth`.
50
- 6. Run `/oracle Review the current pending changes. Include the whole repo unless a narrower archive is clearly better.`
51
- 7. Wait for the one-time best-effort wake-up, or check `/oracle-status`.
92
+ This reads cookies for the configured default provider from your local browser profile and writes an isolated oracle seed profile. Use `/oracle-auth grok` to force-refresh the Grok seed when your default provider is still ChatGPT. It should not automate your active browser window for normal jobs.
52
93
 
53
- The `/oracle` prompt now runs an early oracle preflight before it gathers repo context, so missing persisted-session or local auth/config blockers fail before the agent spends time reading files.
94
+ ### 4. Submit a tiny job
54
95
 
55
- For explicitly narrow requests, `/oracle` should still prefer a context-rich relevant archive up to the 250 MB ceiling, including nearby tests, docs, config, and adjacent modules when that can improve answer quality. Reserve tightly minimal archives for an explicit user request for a tight archive, privacy-sensitive material, or size-constrained cases. It should also omit `preset` and use the configured default model unless the task clearly needs a different one.
96
+ ```text
97
+ /oracle Read README.md and package.json. Tell me in five bullets what this package does and who should not use it.
98
+ ```
56
99
 
57
- If a local archive still exceeds the 250 MB limit after default exclusions and automatic whole-repo pruning, the agent should treat that as a retryable archive-selection failure: shrink the archive automatically, retry with a smaller relevant slice, and explain what it cut only if it still cannot fit after the allowed retry budget.
100
+ Expected result:
58
101
 
59
- If you miss the one-time wake-up, the result is still saved durably in the oracle job directory and can be read later.
102
+ - The `/oracle` prompt now runs an early oracle preflight before expensive repo reading or archive creation.
103
+ - The agent chooses a context-rich relevant archive up to the selected provider's upload ceiling, not the smallest possible one-file slice when nearby context helps.
104
+ - `oracle_submit` creates or queues a job.
105
+ - If local packing is too large, the prompt treats that as a retryable archive-selection failure and narrows automatically before surfacing the problem.
106
+ - The job uploads a repo archive to the selected provider, capped at 250 MiB for ChatGPT or 200 MiB for Grok after default exclusions/pruning.
107
+ - The response is saved under `/tmp/oracle-<job-id>/response.md` by default.
108
+ - The matching `pi` session gets one best-effort wake-up when the job finishes.
109
+
110
+ If the wake-up does not arrive, run:
111
+
112
+ ```text
113
+ /oracle-status
114
+ /oracle-read <job-id>
115
+ ```
60
116
 
61
117
  ## Example requests
62
118
 
@@ -73,53 +129,62 @@ If you miss the one-time wake-up, the result is still saved durably in the oracl
73
129
  ```
74
130
 
75
131
  ```text
76
- /oracle-followup <job-id> Tighten the migration plan around rollback risk, and include the most relevant surrounding files/docs as long as the archive stays comfortably within the limit.
132
+ /oracle-followup <job-id> Tighten the migration plan around rollback risk, and include the most relevant surrounding files/docs as long as the archive stays comfortably within the 250 MiB limit.
77
133
  ```
78
134
 
79
- After a job finishes, use `/oracle-followup <job-id> <request>` to continue the same ChatGPT thread without hand-writing the low-level `followUpJobId` tool parameter.
80
-
81
- ## High-level flow
135
+ ## How it works
82
136
 
83
137
  ```mermaid
84
138
  flowchart LR
85
139
  A["/oracle request"] --> B["Agent preflights, then gathers a context-rich relevant repo slice"]
86
- B --> C["oracle_submit builds archive"]
87
- C --> D["Detached worker starts isolated ChatGPT runtime"]
88
- D --> E["Archive + prompt sent to ChatGPT.com"]
89
- E --> F["Response/artifacts saved under oracle job dir"]
90
- F --> G["One-time best-effort wake-up to matching pi session"]
140
+ B --> C["Agent chooses context-rich archive inputs"]
141
+ C --> D["oracle_submit builds .tar.zst archive"]
142
+ D --> E["Detached worker clones isolated auth seed profile"]
143
+ E --> F["Selected provider receives archive + prompt"]
144
+ F --> G["Response/artifacts saved under oracle job dir"]
145
+ G --> H["Best-effort wake-up to matching pi session"]
91
146
  ```
92
147
 
93
- If concurrency is full, the job is queued and starts automatically later.
148
+ Key design choices:
149
+
150
+ - **Prompt templates own context gathering.** `/oracle` and `/oracle-followup` tell the agent how to preflight, gather context, choose archive inputs, and then stop after dispatch.
151
+ - **Tools own execution.** `oracle_submit` builds the archive, admits or queues the job, starts the worker, and returns immediately.
152
+ - **Auth uses a seed profile.** `/oracle-auth` imports cookies into an isolated seed profile; each job clones that seed into its own temporary runtime profile.
153
+ - **Follow-ups preserve provider thread state.** `/oracle-followup <job-id> ...` resolves the prior job's saved provider URL and submits the next prompt with `followUpJobId`.
154
+ - **Wake-up is best effort, storage is durable.** A missed wake-up does not lose the result.
94
155
 
95
- ## What the package adds
156
+ ## Commands and tools
96
157
 
97
158
  User-facing commands:
98
- - `/oracle <request>` — prompt template that tells the agent to gather context and dispatch an oracle job
99
- - `/oracle-followup <job-id> <request>` — prompt template that continues an earlier oracle job in the same ChatGPT thread
100
- - `/oracle-auth` sync ChatGPT cookies from your configured local browser profile into the isolated oracle auth profile
101
- - `/oracle-read [job-id]` — inspect job status plus the saved response preview
102
- - `/oracle-status [job-id]` — inspect job status and list recent job ids when no explicit id is given
103
- - `/oracle-cancel <job-id>`cancel a queued or active job by id
104
- - `/oracle-clean <job-id|all>` — remove temp files for terminal jobs; recently woken terminal jobs may stay retained briefly and return a retry-after hint
159
+
160
+ - `/oracle <request>` — prepare context and dispatch a ChatGPT or Grok web oracle job
161
+ - `/oracle-followup <job-id> <request>` continue an earlier oracle job in the same provider thread
162
+ - `/oracle-auth [chatgpt|grok]` — sync provider cookies into the isolated oracle auth seed profile
163
+ - `/oracle-read [job-id]` — inspect job status and saved response preview
164
+ - `/oracle-status [job-id]`inspect a job or list recent job ids when no explicit id is given
165
+ - `/oracle-cancel <job-id>` — cancel a queued or active job
166
+ - `/oracle-clean <job-id|all>` — remove temp files for terminal jobs; recently woken terminal jobs may stay retained briefly, and a blocked cleanup returns the next eligible cleanup time
105
167
 
106
168
  Agent-facing tools:
169
+
107
170
  - `oracle_preflight`
108
171
  - `oracle_auth`
109
172
  - `oracle_submit`
110
173
  - `oracle_read`
111
174
  - `oracle_cancel`
112
175
 
113
- ## Minimal config
176
+ ## Configuration
114
177
 
115
- Most users can start with the packaged defaults and only set the browser profile if needed.
178
+ Most users can start with defaults. Set an agent-level config only when you need a non-default provider, mode, preset, or browser profile.
116
179
 
117
180
  `~/.pi/agent/extensions/oracle.json`
118
181
 
119
182
  ```json
120
183
  {
121
184
  "defaults": {
122
- "preset": "<preset id from ORACLE_SUBMIT_PRESETS>"
185
+ "provider": "chatgpt",
186
+ "preset": "<preset id from ORACLE_SUBMIT_PRESETS>",
187
+ "grokMode": "heavy"
123
188
  },
124
189
  "auth": {
125
190
  "chromeProfile": "Default"
@@ -128,22 +193,26 @@ Most users can start with the packaged defaults and only set the browser profile
128
193
  ```
129
194
 
130
195
  Notes:
196
+
197
+ - `defaults.provider` is the default web provider: `chatgpt` or `grok`.
131
198
  - `defaults.preset` is the default ChatGPT model preset for oracle jobs.
132
- - The canonical preset ids live in `extensions/oracle/lib/config.ts`.
133
- - If the packaged default is fine, you can omit `defaults.preset` entirely.
134
- - You usually do not need to set browser paths unless auto-detection fails.
199
+ - `defaults.grokMode` is the default Grok mode. Only `heavy` is supported today.
200
+ - The canonical preset ids and provider modes live in [`extensions/oracle/lib/config.ts`](extensions/oracle/lib/config.ts).
201
+ - If the packaged default is fine, omit `defaults`.
202
+ - When an agent is unsure which oracle preset fits, it should omit `preset` and use the configured default model instead of asking by default. If the prompt says to use Grok, it should pass `provider: "grok"` to `oracle_submit`.
203
+ - You usually do not need browser paths unless auto-detection fails.
135
204
 
136
205
  ### Custom Chromium cookie sources
137
206
 
138
- Most Chrome-compatible browsers should work through the default cookie importer. Use this alternate path only for a Chromium-family browser that is not one of `@steipete/sweet-cookie`'s built-in Chrome/Brave/Arc/Chromium targets or otherwise cannot import cookies without dependency patching.
207
+ Use this only for a Chromium-family browser that the default cookie importer cannot read.
139
208
 
140
209
  Before running `/oracle-auth` with this path:
141
210
 
142
- 1. Log into ChatGPT in the target browser profile.
211
+ 1. Log into ChatGPT or Grok in the target browser profile, depending on `defaults.provider`.
143
212
  2. Fully quit the browser so its `Cookies` database is stable.
144
213
  3. Find the profile `Cookies` SQLite DB path.
145
214
  4. Find the browser's macOS Keychain safe-storage item account and service name.
146
- 5. Configure all of `browser.executablePath`, `auth.chromeCookiePath`, and `auth.chromiumKeychain` in the agent-level config at `~/.pi/agent/extensions/oracle.json`.
215
+ 5. Configure all of `browser.executablePath`, `auth.chromeCookiePath`, and `auth.chromiumKeychain` in `~/.pi/agent/extensions/oracle.json`.
147
216
 
148
217
  Example Helium config:
149
218
 
@@ -164,11 +233,18 @@ Example Helium config:
164
233
  }
165
234
  ```
166
235
 
167
- `auth.chromeCookiePath` remains the cookie database path for backward compatibility. `auth.chromiumKeychain` must be paired with `auth.chromeCookiePath`; partial config is rejected so oracle does not silently fall back to a different browser source. When both are present, `/oracle-auth` uses pi-oracle's repo-owned generic Chromium cookie reader instead of patching `@steipete/sweet-cookie` internals.
236
+ `auth.chromeCookiePath` must be paired with `auth.chromiumKeychain`; partial config is rejected so oracle does not silently fall back to another browser source.
168
237
 
169
- If macOS prompts for Keychain access during `/oracle-auth`, allow access for the configured browser safe-storage item. If auth still fails after cookies are synced, the cookie DB may be stale, from the wrong profile, or for an account that is logged out; reopen the configured browser profile, confirm ChatGPT works there, quit the browser, and rerun `/oracle-auth`.
238
+ ## Available providers and presets
170
239
 
171
- ## Available presets
240
+ | Provider | Mode / preset | Upload ceiling |
241
+ | --- | --- | --- |
242
+ | ChatGPT | Presets below | 250 MiB |
243
+ | Grok | `heavy` only | 200 MiB |
244
+
245
+ 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.
246
+
247
+ ## Available ChatGPT presets
172
248
 
173
249
  | Preset id | Description |
174
250
  | --- | --- |
@@ -181,63 +257,60 @@ If macOS prompts for Keychain access during `/oracle-auth`, allow access for the
181
257
  | `instant` | Instant |
182
258
  | `instant_auto_switch` | Instant - Auto-switch to Thinking Enabled |
183
259
 
184
- `oracle_submit` accepts either the canonical preset id or the matching human-readable preset label; common space/hyphen variants are normalized automatically at submit time. Keep `defaults.preset` in config on the canonical preset id.
260
+ For ChatGPT, `oracle_submit` accepts canonical preset ids or a matching human-readable preset label. Keep config values on canonical ids. For Grok, use `provider: "grok"`; only Heavy is supported today.
185
261
 
186
- Other useful settings:
187
- - `browser.runMode`
188
- - `browser.args`
189
- - `browser.authSeedProfileDir`
190
- - `browser.runtimeProfilesDir`
191
- - `cleanup.completeJobRetentionMs`
192
- - `cleanup.failedJobRetentionMs`
262
+ ## Outputs and cleanup
193
263
 
194
- Project config should only override safe, non-privileged settings.
264
+ - Jobs persist response text, metadata, logs, and artifacts under `${PI_ORACLE_JOBS_DIR:-/tmp}/oracle-<job-id>/` by default.
265
+ - Jobs can queue automatically when runtime capacity is full.
266
+ - Completion delivery into `pi` is one-time best-effort wake-up based.
267
+ - `/oracle-read [job-id]` and `oracle_read({ jobId })` inspect saved output later.
268
+ - `/oracle-clean` removes terminal job temp files, but can briefly refuse cleanup after a wake-up so the follow-up turn can still read the saved paths.
195
269
 
196
- ## What happens to outputs
270
+ ## Privacy and local data
197
271
 
198
- - Jobs persist their response and any artifacts under `${PI_ORACLE_JOBS_DIR:-/tmp}/oracle-<job-id>/` by default.
199
- - Jobs can queue automatically if runtime capacity is full.
200
- - Completion delivery into `pi` is one-time best-effort wake-up based; duplicate poller scans are deduped in job state.
201
- - If you miss the wake-up, use `/oracle-read [job-id]` to inspect the saved response preview.
202
- - `/oracle-status [job-id]` still shows saved job metadata and lists recent job ids when you omit the id.
203
- - Agent callers can use `oracle_read({ jobId })`.
204
- - If a prior oracle run failed because ChatGPT login was required or the worker explicitly said to rerun `/oracle-auth`, agent callers can run `oracle_auth({})` once and then retry the submission once.
205
- - `/oracle-clean` can still refuse a terminal job briefly after a wake-up send so saved response/artifact paths survive the follow-up turn; when that guard applies, it returns the next eligible cleanup time.
272
+ This extension is local-first, but it handles sensitive local and project data:
206
273
 
207
- ## Requirements
274
+ - `/oracle-auth` reads provider cookies from the configured local browser profile. Use `/oracle-auth grok` for Grok when ChatGPT remains the default provider.
275
+ - `oracle_submit` uploads selected project archives to the selected provider web app.
276
+ - Responses, logs, and artifacts are written to the configured oracle jobs directory.
208
277
 
209
- - macOS
210
- - Node.js 22 or newer
211
- - Google Chrome or another Chromium-family browser installed
212
- - ChatGPT already signed into the configured local browser profile
213
- - `pi` 0.65.0 or newer
214
- - `agent-browser` available on the machine
215
- - `tar` and `zstd` available
278
+ Review the code and design docs before using it with private or regulated material.
279
+
280
+ ## Current limits
281
+
282
+ - Experimental public beta, validated primarily on macOS.
283
+ - Provider UI, auth, model controls, and artifact download behavior can drift.
284
+ - Archive uploads are capped at 250 MiB for ChatGPT and 200 MiB for Grok after default exclusions and automatic whole-repo pruning.
285
+ - A real ChatGPT or Grok web session is required for the provider you use.
286
+ - The README currently uses command-level proof and design docs; no public screenshot or demo GIF is checked into the repo.
287
+ - Production hardening should keep focusing on UI drift detection, auth recovery, artifact capture, and environment diagnostics.
216
288
 
217
289
  ## Troubleshooting
218
290
 
219
291
  ### `/oracle-auth` fails or says login is required
220
292
 
221
- - Make sure ChatGPT works in the same local browser profile you configured.
293
+ - Make sure the selected provider works in the same local browser profile you configured.
222
294
  - For custom Chromium cookie sources, confirm `auth.chromeCookiePath` points at that profile's `Cookies` DB and `auth.chromiumKeychain.services` names the browser's safe-storage Keychain service.
223
295
  - Re-run `/oracle-auth`.
224
- - If ChatGPT is half-logged-in or challenge flow state looks weird, finish the login/challenge in the headed auth browser and retry.
296
+ - Agent callers can use `oracle_auth({})` once before retrying a stale-auth oracle submission.
297
+ - If the provider is half-logged-in or challenge flow state looks weird, finish the login/challenge in the headed auth browser and retry.
225
298
 
226
299
  ### Custom Chromium auth says cookies synced but the session is rejected
227
300
 
228
- This usually means the cookie import worked but the source cookies are not the active ChatGPT session you expected.
301
+ This usually means the cookie import worked but the source cookies are not the active provider session you expected.
229
302
 
230
303
  1. Open the configured browser profile.
231
- 2. Confirm ChatGPT works there without logging in again.
304
+ 2. Confirm the selected provider works there without logging in again.
232
305
  3. Quit the browser fully so its `Cookies` DB is stable.
233
306
  4. Confirm `auth.chromeCookiePath` points at that exact profile's `Cookies` DB.
234
307
  5. Confirm `auth.chromiumKeychain.services` names the browser's safe-storage Keychain service for that DB.
235
308
  6. Re-run `/oracle-auth`.
236
309
 
237
- ### You hit a challenge / verification page
310
+ ### You hit a challenge or verification page
238
311
 
239
312
  - Solve it in the auth/bootstrap browser if prompted.
240
- - Then re-run `/oracle-auth` before submitting jobs again.
313
+ - Re-run `/oracle-auth` before submitting jobs again.
241
314
 
242
315
  ### You see "Oracle requires a persisted pi session"
243
316
 
@@ -247,19 +320,19 @@ This usually means the cookie import worked but the source cookies are not the a
247
320
  ### A job finished but no wake-up arrived
248
321
 
249
322
  - Use `/oracle-read [job-id]` to inspect the saved response preview.
250
- - Use `/oracle-status [job-id]` when you want status metadata or need help finding a job id.
251
- - Agent callers can use `oracle_read({ jobId })` if they need tool output in the current turn.
323
+ - Use `/oracle-status` if you need help finding a recent job id.
324
+ - Agent callers can use `oracle_read({ jobId })`.
252
325
  - Results are still saved on disk even if the reminder turn does not land.
253
326
 
254
327
  ### `/oracle-clean` refuses a terminal job right after completion
255
328
 
256
329
  - This can happen during the short post-send retention grace window after a wake-up was sent.
257
- - The command now returns a `Retry after ...` timestamp when that guard is active.
258
- - Wait until that time, then rerun `/oracle-clean [job-id|all]`.
330
+ - The command returns a `Retry after ...` timestamp when that guard is active.
331
+ - Wait until that time, then rerun `/oracle-clean <job-id|all>`.
259
332
 
260
333
  ### `agent-browser`, `tar`, or `zstd` is missing
261
334
 
262
- - Install the missing local dependency and rerun the command.
335
+ Install the missing local dependency and rerun the command.
263
336
 
264
337
  ### Auto-detection picked the wrong browser profile
265
338
 
@@ -269,25 +342,11 @@ This usually means the cookie import worked but the source cookies are not the a
269
342
 
270
343
  ### You want more details about a failed run
271
344
 
272
- - Inspect the job directory under `${PI_ORACLE_JOBS_DIR:-/tmp}/oracle-<job-id>/`.
273
- - The worker log and captured diagnostics are stored there.
345
+ Inspect the job directory under `${PI_ORACLE_JOBS_DIR:-/tmp}/oracle-<job-id>/`. The worker log and captured diagnostics are stored there.
274
346
 
275
- ## Detailed docs
347
+ ## Verification
276
348
 
277
- - `docs/ORACLE_DESIGN.md` — architecture, lifecycle, queueing, persistence, presets, and recovery behavior
278
- - `docs/ORACLE_RECOVERY_DRILL.md` — safe expired-auth recovery validation drill
279
- - `docs/ORACLE_ISOLATED_PI_VALIDATION.md` — repeatable isolated `pi` session smoke test for local-extension validation
280
-
281
- ## Privacy / local data
282
-
283
- This extension is local-first, but it does read and persist local data:
284
- - `/oracle-auth` reads ChatGPT cookies from the configured local browser profile
285
- - job archives are uploaded to ChatGPT.com
286
- - responses and artifacts are written under the configured oracle jobs dir
287
-
288
- Review the code and design docs before using it with sensitive material.
289
-
290
- ## Validation helpers
349
+ Useful local checks:
291
350
 
292
351
  ```bash
293
352
  npm run check:oracle-extension
@@ -295,21 +354,32 @@ npm run typecheck
295
354
  npm run typecheck:worker-helpers
296
355
  npm run sanity:oracle
297
356
  npm run pack:check
298
- # conventional local gate
299
357
  npm test
300
- # or all at once
301
358
  npm run verify:oracle
302
359
  ```
303
360
 
304
- `npm publish` is also guarded locally via `prepublishOnly` and will run `npm run verify:oracle` before publishing.
361
+ `npm publish` is guarded by `prepublishOnly`, which runs `npm run verify:oracle`.
362
+
363
+ For 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` sessions against this checkout and uses `instant` or `thinking_light`, as required by the project validation policy.
305
364
 
306
- ## Beta caveats
365
+ ## Project map
307
366
 
308
- The highest-risk areas to monitor are:
309
- - ChatGPT UI drift
310
- - auth/bootstrap drift
311
- - artifact download behavior
312
- - local environment assumptions
367
+ | Path | Purpose |
368
+ | --- | --- |
369
+ | [`extensions/oracle/index.ts`](extensions/oracle/index.ts) | Extension entrypoint |
370
+ | `extensions/oracle/lib/` | Commands, tools, config, jobs, queueing, runtime, poller |
371
+ | `extensions/oracle/worker/` | Detached provider web worker and UI/auth helpers |
372
+ | `extensions/oracle/shared/` | Shared process, state, job, and observability helpers |
373
+ | [`prompts/oracle.md`](prompts/oracle.md) | `/oracle` prompt-template workflow |
374
+ | [`prompts/oracle-followup.md`](prompts/oracle-followup.md) | `/oracle-followup` prompt-template workflow |
375
+ | `scripts/oracle-sanity-*` | Local sanity and archive-safety checks |
376
+ | [`docs/ORACLE_DESIGN.md`](docs/ORACLE_DESIGN.md) | Architecture, lifecycle, queueing, persistence, recovery behavior |
377
+ | [`docs/ORACLE_ISOLATED_PI_VALIDATION.md`](docs/ORACLE_ISOLATED_PI_VALIDATION.md) | Repeatable isolated `pi` validation workflow |
378
+ | [`docs/ORACLE_RECOVERY_DRILL.md`](docs/ORACLE_RECOVERY_DRILL.md) | Safe expired-auth recovery drill |
379
+
380
+ ## Next action
381
+
382
+ Install the package, run `/oracle-auth`, then submit the tiny README/package review job above. If you are evaluating the design before running it, start with [`docs/ORACLE_DESIGN.md`](docs/ORACLE_DESIGN.md).
313
383
 
314
384
  ## License
315
385