pi-oracle 0.7.20 → 0.7.22
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 +25 -0
- package/README.md +49 -377
- package/docs/ORACLE_DESIGN.md +5 -2
- package/docs/ORACLE_ISOLATED_PI_VALIDATION.md +9 -7
- package/docs/development.md +99 -0
- package/docs/platform-smoke.md +3 -3
- package/docs/reference.md +331 -0
- package/extensions/oracle/index.ts +1 -0
- package/extensions/oracle/lib/poller.ts +3 -8
- package/extensions/oracle/lib/queue.ts +2 -4
- package/extensions/oracle/shared/browser-profile-helpers.d.mts +1 -0
- package/extensions/oracle/shared/browser-profile-helpers.mjs +32 -0
- package/extensions/oracle/worker/auth-bootstrap.mjs +65 -12
- package/extensions/oracle/worker/auth-flow-helpers.d.mts +2 -0
- package/extensions/oracle/worker/auth-flow-helpers.mjs +24 -3
- package/extensions/oracle/worker/chatgpt-flow-helpers.mjs +4 -1
- package/extensions/oracle/worker/chatgpt-ui-helpers.d.mts +1 -0
- package/extensions/oracle/worker/chatgpt-ui-helpers.mjs +7 -3
- package/extensions/oracle/worker/chromium-cookie-source.mjs +50 -6
- package/extensions/oracle/worker/linux-chromium-cookie-source.d.mts +6 -0
- package/extensions/oracle/worker/linux-chromium-cookie-source.mjs +98 -0
- package/extensions/oracle/worker/run-job.mjs +72 -7
- package/package.json +15 -11
- package/platform-smoke.config.mjs +1 -22
- package/scripts/oracle-auth.test.mjs +164 -0
- package/scripts/oracle-chatgpt-preset-proof.mjs +19 -12
- package/scripts/oracle-cookie-import.test.mjs +204 -0
- package/scripts/oracle-model.test.mjs +87 -0
- package/scripts/oracle-real-smoke.mjs +30 -13
- package/scripts/platform-smoke/Dockerfile.ubuntu +3 -2
- package/scripts/platform-smoke/crabbox-runner.mjs +3 -5
- package/scripts/platform-smoke/doctor.mjs +9 -24
- package/scripts/platform-smoke/invariants.mjs +234 -22
- package/scripts/platform-smoke/platform-build-windows.ps1 +4 -16
- package/scripts/platform-smoke/targets.mjs +35 -27
- package/scripts/platform-smoke.mjs +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.22 - 2026-10-12
|
|
4
|
+
|
|
5
|
+
### Documentation
|
|
6
|
+
- rewrite the README around installation, first use, commands, and privacy; add an editable workflow diagram and move detailed setup and maintainer guidance into linked reference docs
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
- decrypt native Linux Chromium/Chromium Browser encrypted cookies with Chromium's safe-storage key, retaining GNOME/KWallet/basic controls and per-run password calibration without upgrading the unaffected Chrome/Brave importer
|
|
10
|
+
- ignore custom-message agent starts in the `/oracle` user-command handler, so idle completion notifications can trigger a turn on newer Pi hosts without a missing-prompt error
|
|
11
|
+
- wait for agent-browser's closing daemon to become launchable after its known pre-launch socket failure, retaining a bounded deadline and failing other launch errors immediately
|
|
12
|
+
- wait for ChatGPT's Power slider to mount and focus its observed control rather than a brittle picker-container selector before selecting and verifying the requested tier
|
|
13
|
+
|
|
14
|
+
## 0.7.21 - 2026-09-26
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- recognize ChatGPT's current `Ask ChatGPT` input as well as `Chat with ChatGPT`, so authenticated browser verification finishes and closes the browser; share the aliases with prompt entry and response/upload boundaries
|
|
18
|
+
- retry auth observations interrupted by CDP navigation without closing the browser while concurrent reads are still running
|
|
19
|
+
- stop treating anonymous `ua-*` visitor IDs as signed-in account identities that need account-selection clicks or reloads
|
|
20
|
+
- distinguish browser verification failures from rejected source cookies in auth recovery guidance
|
|
21
|
+
- support ChatGPT's current Power slider and version-prefixed Pro button, verifying the selected tier before submitting
|
|
22
|
+
- restore the worker jobs-directory binding so cleanup can promote queued jobs
|
|
23
|
+
|
|
24
|
+
### Validation
|
|
25
|
+
- reproduced the renamed-composer failure before the fix and verified a live `/oracle-auth` refresh saved the auth seed and closed Chrome automatically
|
|
26
|
+
- passed the local Oracle verification suite and independent correctness review
|
|
27
|
+
|
|
3
28
|
## 0.7.20 - 2026-07-28
|
|
4
29
|
|
|
5
30
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1,442 +1,114 @@
|
|
|
1
1
|
# pi-oracle
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
pi-oracle sends project files and questions from [Pi](https://github.com/earendil-works/pi) to ChatGPT or Grok through your web account. Each job uses an isolated browser and saves its answer locally.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+

|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Install
|
|
8
8
|
|
|
9
|
-
|
|
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 provider archive (`.tar.zst` for ChatGPT, `.tar.gz` for Grok)
|
|
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
|
-
- machines outside the currently supported local browser/tooling setup
|
|
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.
|
|
45
|
-
|
|
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.
|
|
9
|
+
Use Node.js 22.19.0 or newer on macOS, Linux, or Windows native. Use a current Pi release and a Chromium-family browser.
|
|
47
10
|
|
|
48
|
-
|
|
11
|
+
Install `agent-browser` and `tar`. Install `zstd` for ChatGPT jobs. Check the [platform requirements](docs/reference.md#requirements) for profile copies and encrypted cookies.
|
|
49
12
|
|
|
50
|
-
|
|
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) |
|
|
57
|
-
|
|
58
|
-
## Fastest way to see it work
|
|
59
|
-
|
|
60
|
-
### 1. Install
|
|
61
|
-
|
|
62
|
-
From npm:
|
|
13
|
+
Install Oracle:
|
|
63
14
|
|
|
64
15
|
```bash
|
|
65
16
|
pi install npm:pi-oracle
|
|
66
17
|
```
|
|
67
18
|
|
|
68
|
-
|
|
19
|
+
Start a normal persisted `pi` session in your project directory:
|
|
69
20
|
|
|
70
21
|
```bash
|
|
71
|
-
pi
|
|
22
|
+
pi
|
|
72
23
|
```
|
|
73
24
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
### 2. Check requirements
|
|
25
|
+
Oracle cannot submit jobs from `pi --no-session`.
|
|
77
26
|
|
|
78
|
-
|
|
27
|
+
## First job
|
|
79
28
|
|
|
80
|
-
|
|
81
|
-
- Node.js 22.19.0 or newer for package install/use; platform smoke/release validation currently expects Node 24+ per `platform-smoke.config.mjs`
|
|
82
|
-
- Suggested tested floor: `pi` 0.80.9 or newer; older pi versions are not blocked by package metadata but are outside the current validation baseline
|
|
83
|
-
- Google Chrome/Chromium or another Chromium-family browser
|
|
84
|
-
- ChatGPT or Grok already signed in to the configured local browser profile for the provider you plan to use
|
|
85
|
-
- `agent-browser` and `tar` available on the machine; `zstd` is also required when submitting ChatGPT `.tar.zst` archives
|
|
86
|
-
- 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
|
|
87
|
-
- a normal persisted `pi` session, not `pi --no-session`
|
|
88
|
-
- 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
|
|
29
|
+
Sign in to ChatGPT in your source browser profile. Your account must have access to the selected [preset](#settings).
|
|
89
30
|
|
|
90
|
-
|
|
31
|
+
Import your login into Oracle:
|
|
91
32
|
|
|
92
33
|
```text
|
|
93
34
|
/oracle-auth
|
|
94
35
|
```
|
|
95
36
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
### 4. Submit a tiny job
|
|
37
|
+
Submit a small request:
|
|
99
38
|
|
|
100
39
|
```text
|
|
101
|
-
/oracle Read README.md and package.json.
|
|
40
|
+
/oracle Read README.md and package.json. Explain what this package does.
|
|
102
41
|
```
|
|
103
42
|
|
|
104
|
-
|
|
43
|
+
Oracle checks session and authentication readiness before gathering files. It returns a job id and response path after dispatch.
|
|
105
44
|
|
|
106
|
-
|
|
107
|
-
- 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.
|
|
108
|
-
- `oracle_submit` creates or queues a job.
|
|
109
|
-
- If local packing is too large, the prompt treats that as a retryable archive-selection failure and narrows automatically before surfacing the problem.
|
|
110
|
-
- 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.
|
|
111
|
-
- The response is saved under `/tmp/oracle-<job-id>/response.md` by default.
|
|
112
|
-
- The matching `pi` session gets one best-effort wake-up when the job finishes.
|
|
45
|
+
Jobs can queue when browser capacity is full. Oracle sends a best-effort notification to the matching Pi session when a job finishes.
|
|
113
46
|
|
|
114
|
-
If the
|
|
47
|
+
If no notification arrives, find the job and read its answer:
|
|
115
48
|
|
|
116
49
|
```text
|
|
117
50
|
/oracle-status
|
|
118
51
|
/oracle-read <job-id>
|
|
119
52
|
```
|
|
120
53
|
|
|
121
|
-
##
|
|
122
|
-
|
|
123
|
-
```text
|
|
124
|
-
/oracle Review the current pending changes. Include the whole repo unless a narrower archive is clearly better. Give me a prioritized code review with concrete fixes.
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
```text
|
|
128
|
-
/oracle Read the codebase and explain the highest-risk auth/session failure modes, including what to test before shipping.
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
```text
|
|
132
|
-
/oracle Explain the README guidance for /oracle-clean retention grace. Archive README.md plus any nearby docs or implementation files that help answer accurately.
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
```text
|
|
136
|
-
/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.
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
```text
|
|
140
|
-
/oracle Continue existing ChatGPT conversation 6a28ab5c-e4d4-83e8-b8be-dd39f38a26d6. Review the current auth code and include enough surrounding context to propose concrete fixes.
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## How it works
|
|
144
|
-
|
|
145
|
-
```mermaid
|
|
146
|
-
flowchart LR
|
|
147
|
-
A["/oracle request"] --> B["Agent preflights, then gathers a context-rich relevant repo slice"]
|
|
148
|
-
B --> C["Agent chooses context-rich archive inputs"]
|
|
149
|
-
C --> D["oracle_submit builds provider-specific archive"]
|
|
150
|
-
D --> E["Detached worker clones isolated auth seed profile"]
|
|
151
|
-
E --> F["Selected provider receives archive + prompt"]
|
|
152
|
-
F --> G["Response/artifacts saved under oracle job dir"]
|
|
153
|
-
G --> H["Best-effort wake-up to matching pi session"]
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
Key design choices:
|
|
157
|
-
|
|
158
|
-
- **Extension-managed dispatch owns context gathering.** In the TUI, `/oracle` and `/oracle-followup` are intercepted before prompt-template expansion, re-added as compact user messages for prompt-history/up-arrow recall, and paired with detailed dispatch instructions as hidden context. The visible transcript stays compact while the agent still preflights, gathers context, chooses archive inputs, and stops after dispatch.
|
|
159
|
-
- **Tools own execution.** `oracle_submit` builds the archive, admits or queues the job, starts the worker, and returns immediately.
|
|
160
|
-
- **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.
|
|
161
|
-
- **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`.
|
|
162
|
-
- **Existing ChatGPT browser threads are opt-in.** Normal `/oracle` jobs still start a fresh provider thread. When the user explicitly provides a ChatGPT conversation id or `https://chatgpt.com/c/...` URL, the agent passes `chatGptConversationId` so `oracle_submit` opens that existing thread in the isolated runtime.
|
|
163
|
-
- **Wake-up is best effort, storage is durable.** A missed wake-up does not lose the result.
|
|
164
|
-
|
|
165
|
-
## Commands and tools
|
|
166
|
-
|
|
167
|
-
User-facing commands:
|
|
168
|
-
|
|
169
|
-
- `/oracle <request>` — prepare context and dispatch a ChatGPT or Grok web oracle job. If the request explicitly includes an existing ChatGPT conversation id/URL, the agent can continue that browser-created thread; otherwise `/oracle` starts a fresh thread as before.
|
|
170
|
-
- `/oracle-followup <job-id> <request>` — continue an earlier oracle job in the same provider thread
|
|
171
|
-
- `/oracle-auth [chatgpt|grok]` — sync provider cookies into the isolated oracle auth seed profile
|
|
172
|
-
- `/oracle-read [job-id]` — inspect job status and saved response preview
|
|
173
|
-
- `/oracle-status [job-id]` — inspect a job or list recent job ids when no explicit id is given
|
|
174
|
-
- `/oracle-cancel <job-id>` — cancel a queued or active job
|
|
175
|
-
- `/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
|
|
54
|
+
## Commands
|
|
176
55
|
|
|
177
|
-
|
|
56
|
+
| Command | Purpose |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| `/oracle <request>` | Submit a question with project files. |
|
|
59
|
+
| `/oracle-followup <job-id> <request>` | Continue the same provider thread. |
|
|
60
|
+
| `/oracle-auth [chatgpt\|grok]` | Import a provider login from your source browser profile. |
|
|
61
|
+
| `/oracle-read [job-id]` | Show status and a saved answer preview. |
|
|
62
|
+
| `/oracle-status [job-id]` | Show status and recent job ids when no explicit id is given. |
|
|
63
|
+
| `/oracle-cancel <job-id>` | Cancel a queued or active job. |
|
|
64
|
+
| `/oracle-clean <job-id\|all>` | Delete finished-job files. A recent notification can delay cleanup; retry at the time shown. |
|
|
178
65
|
|
|
179
|
-
|
|
180
|
-
- `oracle_auth`
|
|
181
|
-
- `oracle_submit` (`chatGptConversationId` is optional and only for explicitly continuing an existing ChatGPT browser conversation id/URL; omit it for the default fresh thread)
|
|
182
|
-
- `oracle_read`
|
|
183
|
-
- `oracle_cancel`
|
|
66
|
+
Normal `/oracle` jobs start a fresh provider thread. To continue an existing ChatGPT conversation, include its id or URL in your request.
|
|
184
67
|
|
|
185
|
-
|
|
68
|
+
Answers, logs and artifacts use `${PI_ORACLE_JOBS_DIR:-/tmp}/oracle-<job-id>/`.
|
|
186
69
|
|
|
187
|
-
|
|
70
|
+
By default, Oracle deletes completed and cancelled jobs after 14 days. It deletes failed jobs after 30 days. Copy files you need to keep. See [retention settings](docs/reference.md#job-retention) for details.
|
|
188
71
|
|
|
189
|
-
|
|
72
|
+
## Settings
|
|
190
73
|
|
|
191
|
-
`~/.pi/agent/extensions/oracle.json
|
|
74
|
+
Oracle uses ChatGPT and the `pro_extended` preset by default. Change the defaults in `~/.pi/agent/extensions/oracle.json`:
|
|
192
75
|
|
|
193
76
|
```json
|
|
194
77
|
{
|
|
195
78
|
"defaults": {
|
|
196
79
|
"provider": "chatgpt",
|
|
197
|
-
"preset": "
|
|
198
|
-
"grokMode": "heavy"
|
|
199
|
-
},
|
|
200
|
-
"auth": {
|
|
201
|
-
"chromeProfile": "Default"
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
Notes:
|
|
207
|
-
|
|
208
|
-
- `defaults.provider` is the default web provider: `chatgpt` or `grok`.
|
|
209
|
-
- `defaults.preset` is the default ChatGPT model preset for oracle jobs.
|
|
210
|
-
- `defaults.grokMode` is the default Grok mode. Only `heavy` is supported today.
|
|
211
|
-
- The canonical preset ids and provider modes live in [`extensions/oracle/lib/config.ts`](extensions/oracle/lib/config.ts).
|
|
212
|
-
- If the packaged default is fine, omit `defaults`.
|
|
213
|
-
- 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`.
|
|
214
|
-
- You usually do not need browser paths unless auto-detection fails.
|
|
215
|
-
|
|
216
|
-
### Linux cookie import notes
|
|
217
|
-
|
|
218
|
-
`/oracle-auth` delegates the default cookie read to `@steipete/sweet-cookie`'s Linux Chrome/Chromium backend. The packaged default auto-detects existing Google Chrome, Chromium, Chromium Browser, or Brave profile roots under `${XDG_CONFIG_HOME:-~/.config}` and passes non-Google roots as absolute profile paths so the correct cookie DB is read. Set `auth.chromeProfile` to another profile name, a profile directory, or a `Cookies` DB path when needed, and leave `auth.chromiumKeychain` unset on Linux.
|
|
219
|
-
|
|
220
|
-
Sweet Cookie's Linux encrypted-cookie handling is controlled outside pi-oracle:
|
|
221
|
-
|
|
222
|
-
- `SWEET_COOKIE_LINUX_KEYRING=gnome|kwallet|basic` selects GNOME/libsecret, KDE KWallet, or no keyring probing.
|
|
223
|
-
- GNOME probing shells out to `secret-tool`; KDE probing shells out to `kwallet-query` and `dbus-send`.
|
|
224
|
-
- `SWEET_COOKIE_CHROME_SAFE_STORAGE_PASSWORD` and `SWEET_COOKIE_BRAVE_SAFE_STORAGE_PASSWORD` bypass keyring probing when you already know the browser safe-storage password.
|
|
225
|
-
|
|
226
|
-
Do not put safe-storage passwords in project config or persistent shell startup files. Prefer keyring helpers when possible; if you use an environment override for one `/oracle-auth` run, pi-oracle scrubs it before launching browser/helper subprocesses after cookie import.
|
|
227
|
-
|
|
228
|
-
### Custom Chromium cookie sources
|
|
229
|
-
|
|
230
|
-
Most Chrome/Chromium-compatible browsers should work through Sweet Cookie's default Chrome backend when `auth.chromeProfile` points at the right profile or cookie DB. pi-oracle does not currently select Sweet Cookie's Edge or Firefox backends. The `auth.chromiumKeychain` alternate path is macOS-only and is intended for a Chromium-family browser that is not one of Sweet Cookie's built-in Chrome/Brave/Arc/Chromium targets or otherwise cannot import cookies without dependency patching.
|
|
231
|
-
|
|
232
|
-
Before running `/oracle-auth` with this macOS path:
|
|
233
|
-
|
|
234
|
-
1. Log into ChatGPT or Grok in the target browser profile, depending on `defaults.provider`.
|
|
235
|
-
2. Fully quit the browser so its `Cookies` database is stable.
|
|
236
|
-
3. Find the profile `Cookies` SQLite DB path.
|
|
237
|
-
4. Find the browser's macOS Keychain safe-storage item account and service name.
|
|
238
|
-
5. Configure all of `browser.executablePath`, `auth.chromeCookiePath`, and `auth.chromiumKeychain` in `~/.pi/agent/extensions/oracle.json`.
|
|
239
|
-
|
|
240
|
-
Example macOS Helium config:
|
|
241
|
-
|
|
242
|
-
```json
|
|
243
|
-
{
|
|
244
|
-
"browser": {
|
|
245
|
-
"executablePath": "/Applications/Helium.app/Contents/MacOS/Helium"
|
|
246
|
-
},
|
|
247
|
-
"auth": {
|
|
248
|
-
"chromeProfile": "Default",
|
|
249
|
-
"chromeCookiePath": "/Users/you/Library/Application Support/net.imput.helium/Default/Cookies",
|
|
250
|
-
"chromiumKeychain": {
|
|
251
|
-
"account": "Helium",
|
|
252
|
-
"services": ["Helium Storage Key"],
|
|
253
|
-
"label": "Helium Storage Key"
|
|
254
|
-
}
|
|
80
|
+
"preset": "thinking_light"
|
|
255
81
|
}
|
|
256
82
|
}
|
|
257
83
|
```
|
|
258
84
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
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`. On Linux, inspect `/oracle-auth` diagnostics for Sweet Cookie warnings about `secret-tool`, `kwallet-query`, or safe-storage password overrides.
|
|
262
|
-
|
|
263
|
-
## Available providers and presets
|
|
264
|
-
|
|
265
|
-
| Provider | Mode / preset | Archive format | Upload ceiling |
|
|
266
|
-
| --- | --- | --- | --- |
|
|
267
|
-
| ChatGPT | Presets below | `.tar.zst` | 250 MiB |
|
|
268
|
-
| Grok | `heavy` only | `.tar.gz` | 200 MiB |
|
|
269
|
-
|
|
270
|
-
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.
|
|
271
|
-
|
|
272
|
-
## Available ChatGPT presets
|
|
273
|
-
|
|
274
|
-
| Preset id | Description |
|
|
275
|
-
| --- | --- |
|
|
276
|
-
| `pro_standard` | Pro - Standard |
|
|
277
|
-
| `pro_extended` | Pro - Extended |
|
|
278
|
-
| `thinking_light` | Thinking - Light |
|
|
279
|
-
| `thinking_standard` | Thinking - Standard |
|
|
280
|
-
| `thinking_extended` | Thinking - Extended |
|
|
281
|
-
| `thinking_heavy` | Thinking - Heavy |
|
|
282
|
-
| `instant` | Instant |
|
|
283
|
-
| `instant_auto_switch` | Instant - Auto-switch to Thinking Enabled |
|
|
284
|
-
|
|
285
|
-
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.
|
|
286
|
-
|
|
287
|
-
## Outputs and cleanup
|
|
288
|
-
|
|
289
|
-
- Jobs persist response text, metadata, logs, and artifacts under `${PI_ORACLE_JOBS_DIR:-/tmp}/oracle-<job-id>/` by default.
|
|
290
|
-
- Jobs can queue automatically when runtime capacity is full.
|
|
291
|
-
- Completion delivery into `pi` is one-time best-effort wake-up based.
|
|
292
|
-
- `/oracle-read [job-id]` and `oracle_read({ jobId })` inspect saved output later.
|
|
293
|
-
- `/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.
|
|
294
|
-
|
|
295
|
-
## Privacy and local data
|
|
296
|
-
|
|
297
|
-
This extension is local-first, but it handles sensitive local and project data:
|
|
298
|
-
|
|
299
|
-
- `/oracle-auth` reads provider cookies from the configured local browser profile. Use `/oracle-auth grok` for Grok when ChatGPT remains the default provider.
|
|
300
|
-
- `oracle_submit` uploads selected project archives to the selected provider web app.
|
|
301
|
-
- Responses, logs, and artifacts are written to the configured oracle jobs directory.
|
|
302
|
-
|
|
303
|
-
Review the code and design docs before using it with private or regulated material.
|
|
304
|
-
|
|
305
|
-
## Current limits
|
|
306
|
-
|
|
307
|
-
- Experimental public beta, validated on macOS, Linux, and Windows native with Chromium-family browsers.
|
|
308
|
-
- Provider UI, auth, model controls, and artifact download behavior can drift.
|
|
309
|
-
- Archive uploads are capped at 250 MiB for ChatGPT and 200 MiB for Grok after default exclusions and automatic whole-repo pruning.
|
|
310
|
-
- A real ChatGPT or Grok web session is required for the provider you use.
|
|
311
|
-
- The README currently uses command-level proof and design docs; no public screenshot or demo GIF is checked into the repo.
|
|
312
|
-
- Production hardening should keep focusing on UI drift detection, auth recovery, artifact capture, platform compatibility, and environment diagnostics.
|
|
313
|
-
|
|
314
|
-
## Troubleshooting
|
|
315
|
-
|
|
316
|
-
### `/oracle-auth` fails or says login is required
|
|
317
|
-
|
|
318
|
-
- Make sure the selected provider works in the same local browser profile you configured.
|
|
319
|
-
- For custom Chromium cookie sources, confirm `auth.chromeCookiePath` points at that profile's `Cookies` DB. On macOS, also confirm `auth.chromiumKeychain.services` names the browser's safe-storage Keychain service. On Linux, leave `auth.chromiumKeychain` unset and use Sweet Cookie's `SWEET_COOKIE_LINUX_KEYRING`, `SWEET_COOKIE_CHROME_SAFE_STORAGE_PASSWORD`, or `SWEET_COOKIE_BRAVE_SAFE_STORAGE_PASSWORD` options for encrypted Chrome/Chromium/Brave cookies.
|
|
320
|
-
- Re-run `/oracle-auth`.
|
|
321
|
-
- Agent callers can use `oracle_auth({})` once before retrying a stale-auth oracle submission.
|
|
322
|
-
- If the provider is half-logged-in or challenge flow state looks weird, finish the login/challenge in the headed auth browser and retry.
|
|
323
|
-
|
|
324
|
-
### Custom Chromium auth says cookies synced but the session is rejected
|
|
325
|
-
|
|
326
|
-
This usually means the cookie import worked but the source cookies are not the active provider session you expected.
|
|
327
|
-
|
|
328
|
-
1. Open the configured browser profile.
|
|
329
|
-
2. Confirm the selected provider works there without logging in again.
|
|
330
|
-
3. Quit the browser fully so its `Cookies` DB is stable.
|
|
331
|
-
4. Confirm `auth.chromeCookiePath` points at that exact profile's `Cookies` DB.
|
|
332
|
-
5. On macOS, confirm `auth.chromiumKeychain.services` names the browser's safe-storage Keychain service for that DB. On Linux, confirm the relevant Sweet Cookie keyring helper or Chrome/Brave safe-storage password override is available.
|
|
333
|
-
6. Re-run `/oracle-auth`.
|
|
334
|
-
|
|
335
|
-
### You hit a challenge or verification page
|
|
336
|
-
|
|
337
|
-
- Solve it in the auth/bootstrap browser if prompted.
|
|
338
|
-
- Re-run `/oracle-auth` before submitting jobs again.
|
|
339
|
-
|
|
340
|
-
### You see "Oracle requires a persisted pi session"
|
|
341
|
-
|
|
342
|
-
- Do not run oracle from `pi --no-session`.
|
|
343
|
-
- Start a normal persisted `pi` session, then use `/oracle` again.
|
|
344
|
-
|
|
345
|
-
### A job finished but no wake-up arrived
|
|
346
|
-
|
|
347
|
-
- Use `/oracle-read [job-id]` to inspect the saved response preview.
|
|
348
|
-
- Use `/oracle-status` if you need help finding a recent job id.
|
|
349
|
-
- Agent callers can use `oracle_read({ jobId })`.
|
|
350
|
-
- Results are still saved on disk even if the reminder turn does not land.
|
|
351
|
-
|
|
352
|
-
### `/oracle-clean` refuses a terminal job right after completion
|
|
353
|
-
|
|
354
|
-
- This can happen during the short post-send retention grace window after a wake-up was sent.
|
|
355
|
-
- The command returns a `Retry after ...` timestamp when that guard is active.
|
|
356
|
-
- Wait until that time, then rerun `/oracle-clean <job-id|all>`.
|
|
357
|
-
|
|
358
|
-
### A local dependency like `agent-browser`, `tar`, or `zstd` is missing
|
|
359
|
-
|
|
360
|
-
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.
|
|
361
|
-
|
|
362
|
-
### Auto-detection picked the wrong browser profile
|
|
363
|
-
|
|
364
|
-
- Set `auth.chromeProfile` in `~/.pi/agent/extensions/oracle.json`.
|
|
365
|
-
- For custom Chromium cookie sources, set `auth.chromeCookiePath` to the exact profile `Cookies` DB. Pair it with `auth.chromiumKeychain` only on macOS; on Linux, rely on Sweet Cookie's keyring/password environment options.
|
|
366
|
-
- Re-run `/oracle-auth`.
|
|
367
|
-
|
|
368
|
-
### You want more details about a failed run
|
|
369
|
-
|
|
370
|
-
Inspect the job directory under `${PI_ORACLE_JOBS_DIR:-/tmp}/oracle-<job-id>/`. The worker log and captured diagnostics are stored there.
|
|
371
|
-
|
|
372
|
-
## Verification
|
|
373
|
-
|
|
374
|
-
Useful local checks:
|
|
375
|
-
|
|
376
|
-
```bash
|
|
377
|
-
npm run check:oracle-extension
|
|
378
|
-
npm run check:platform-smoke
|
|
379
|
-
npm run typecheck
|
|
380
|
-
npm run typecheck:worker-helpers
|
|
381
|
-
npm run sanity:oracle
|
|
382
|
-
npm run pack:check
|
|
383
|
-
npm test
|
|
384
|
-
npm run verify:oracle
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
`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.
|
|
85
|
+
For Grok, run `/oracle-auth grok` first. Name Grok in your `/oracle` request. Grok supports Heavy only.
|
|
388
86
|
|
|
389
|
-
|
|
87
|
+
ChatGPT accepts archives up to 250 MiB; Grok accepts up to 200 MiB. See [providers and presets](docs/reference.md#available-providers-and-presets) for archive formats, preset ids and model-picker limits.
|
|
390
88
|
|
|
391
|
-
|
|
392
|
-
| --- | --- |
|
|
393
|
-
| Everyday local iteration | `npm run verify:oracle` |
|
|
394
|
-
| Platform-focused syntax/invariant sanity | `npm run check:platform-smoke`, `npm run sanity:oracle:platform` |
|
|
395
|
-
| Platform-sensitive runtime changes | `npm run smoke:platform:doctor`, then a focused `node scripts/platform-smoke.mjs run --target <target> --suite <suite>` |
|
|
396
|
-
| Platform matrix proof | `npm run smoke:platform:all` |
|
|
397
|
-
| ChatGPT preset release proof | `npm run release:proof:chatgpt-presets` |
|
|
398
|
-
| Publish/release gate | `npm run release:check` |
|
|
89
|
+
Browser and authentication settings use the agent-level config. See [configuration](docs/reference.md#configuration) for project trust rules and custom cookie sources.
|
|
399
90
|
|
|
400
|
-
|
|
91
|
+
To update Oracle, run `pi update npm:pi-oracle`. See [installation options](docs/reference.md#installation-options) for GitHub installs and other update commands.
|
|
401
92
|
|
|
402
|
-
|
|
403
|
-
npm run release:check
|
|
404
|
-
```
|
|
93
|
+
## Limits and privacy
|
|
405
94
|
|
|
406
|
-
|
|
95
|
+
**Experimental public beta.** Provider pages can change and cause jobs to fail. Check [troubleshooting](docs/reference.md#troubleshooting) if authentication or a job fails.
|
|
407
96
|
|
|
408
|
-
|
|
409
|
-
mkdir -p .artifacts/chatgpt-preset-proof
|
|
410
|
-
node scripts/oracle-chatgpt-preset-proof.mjs template > .artifacts/chatgpt-preset-proof/latest.json
|
|
411
|
-
npm run release:proof:chatgpt-presets
|
|
412
|
-
```
|
|
97
|
+
**Oracle uploads project files to ChatGPT or Grok.** The agent chooses the files. It adds nearby files for context and can send the whole repository for broad or unclear requests.
|
|
413
98
|
|
|
414
|
-
|
|
99
|
+
Default exclusions do not guarantee that an archive contains no sensitive data. Specify an exact file list for private material. Tell the agent to exclude all other files.
|
|
415
100
|
|
|
416
|
-
|
|
101
|
+
Oracle reads provider cookies from your source browser profile. It copies the login into an isolated profile for each job.
|
|
417
102
|
|
|
418
|
-
|
|
103
|
+
Cookie imports do not preserve host-only or partitioned-cookie isolation metadata. Keep browser safe-storage passwords out of project config and shell startup files.
|
|
419
104
|
|
|
420
|
-
##
|
|
105
|
+
## Details
|
|
421
106
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
| `extensions/oracle/worker/` | Detached provider web worker and UI/auth helpers |
|
|
427
|
-
| `extensions/oracle/shared/` | Shared process, state, job, and observability helpers |
|
|
428
|
-
| [`prompts/oracle.md`](prompts/oracle.md) | Hidden `/oracle` command-dispatch workflow |
|
|
429
|
-
| [`prompts/oracle-followup.md`](prompts/oracle-followup.md) | Hidden `/oracle-followup` command-dispatch workflow |
|
|
430
|
-
| `scripts/oracle-sanity-*` | Local sanity and archive-safety checks |
|
|
431
|
-
| `scripts/platform-smoke*` | Crabbox macOS, Ubuntu, and Windows release smoke gate |
|
|
432
|
-
| [`docs/ORACLE_DESIGN.md`](docs/ORACLE_DESIGN.md) | Architecture, lifecycle, queueing, persistence, recovery behavior |
|
|
433
|
-
| [`docs/ORACLE_ISOLATED_PI_VALIDATION.md`](docs/ORACLE_ISOLATED_PI_VALIDATION.md) | Repeatable isolated `pi` validation workflow |
|
|
434
|
-
| [`docs/ORACLE_RECOVERY_DRILL.md`](docs/ORACLE_RECOVERY_DRILL.md) | Safe expired-auth recovery drill |
|
|
435
|
-
|
|
436
|
-
## Next action
|
|
437
|
-
|
|
438
|
-
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).
|
|
107
|
+
- [Reference](docs/reference.md): examples, commands, presets, authentication setup and troubleshooting.
|
|
108
|
+
- [Design](docs/ORACLE_DESIGN.md): archives, queue, job state and notifications.
|
|
109
|
+
- [Development](docs/development.md): checks, host compatibility and release gates.
|
|
110
|
+
- [Report a problem](https://github.com/fitchmultz/pi-oracle/issues). Remove sensitive data from job diagnostics before you share them.
|
|
439
111
|
|
|
440
112
|
## License
|
|
441
113
|
|
|
442
|
-
MIT. See
|
|
114
|
+
MIT. See [LICENSE](LICENSE).
|
package/docs/ORACLE_DESIGN.md
CHANGED
|
@@ -143,6 +143,9 @@ Auth bootstrap flow:
|
|
|
143
143
|
7. clear isolated browser cookies and seed the staged profile with imported provider cookies
|
|
144
144
|
8. open the configured provider in the isolated browser
|
|
145
145
|
9. verify auth with provider-specific readiness checks
|
|
146
|
+
- recognize both `Chat with ChatGPT` and `Ask ChatGPT` composer labels via the shared UI helpers; the same aliases apply to prompt entry and response/upload boundaries
|
|
147
|
+
- drain concurrent page reads and discard the whole observation if a CDP evaluation was interrupted by navigation; retry within the existing bootstrap deadline without relaunching a closed browser
|
|
148
|
+
- ChatGPT's anonymous `ua-*` visitor IDs are not account identity evidence; a login page/public login controls with an anonymous probe require refreshing the source browser login, not account-selection clicks or reloads
|
|
146
149
|
10. on success, close the isolated browser so Chrome flushes profile state cleanly
|
|
147
150
|
11. atomically swap the staged profile into `browser.authSeedProfileDir`, keeping `*.prev` as rollback
|
|
148
151
|
12. write a seed-generation marker used by future runtime clones
|
|
@@ -195,7 +198,7 @@ Per job:
|
|
|
195
198
|
- login required
|
|
196
199
|
- challenge/verification page
|
|
197
200
|
- transient outage after one retry
|
|
198
|
-
6. configure ChatGPT model family/effort or Grok Heavy
|
|
201
|
+
6. configure ChatGPT model family/effort or Grok Heavy; for the current Power slider, use its keyboard controls and verify both the numeric position and accessible tier announcement before closing it. Preserve the compact-menu mapping (Instant; Medium for Light/Standard; High for Extended; Extra High for Heavy; undifferentiated Pro). Reject unknown ranges or mismatched announcements instead of guessing.
|
|
199
202
|
7. upload archive
|
|
200
203
|
8. wait for upload confirmation scoped to the active composer
|
|
201
204
|
9. fill prompt
|
|
@@ -288,7 +291,7 @@ Project config remains restricted to safe overrides only. On Pi 0.79+, pi itself
|
|
|
288
291
|
|
|
289
292
|
`browser.cloneStrategy` defaults to `apfs-clone` on macOS and `copy` on Linux/Windows. macOS APFS clone mode uses `cp -cR` and preflights `cp`; set `PI_ORACLE_CP_PATH` only when the default PATH lookup cannot find the intended copy executable. Linux and Windows runtime profile copies use Node's recursive copy instead of depending on POSIX `cp`.
|
|
290
293
|
|
|
291
|
-
The default `/oracle-auth` cookie importer
|
|
294
|
+
The default `/oracle-auth` cookie importer uses `@steipete/sweet-cookie` 0.3's public Chrome backend. On Linux, pi-oracle auto-detects existing Google Chrome, Chromium, Chromium Browser, or Brave profile roots under `${XDG_CONFIG_HOME:-~/.config}` and passes non-Google roots as absolute profile paths. After confirming a native `chromium`/`chromium-browser` profile or explicit `Cookies` DB under those same roots needs key selection, the worker dynamically imports `linux-chromium-cookie-source.mjs` and passes its already-loaded public getter (without another runtime dependency import). Chrome/Brave and other platforms keep the existing dependency path; the macOS `chromium-cookie-source.mjs` contains no Linux key-selection code. It retains Sweet Cookie parsing/decryption, GNOME service/account then application lookup, KDE versioned KWallet network-wallet lookup with `kdewallet` fallback, `SWEET_COOKIE_LINUX_KEYRING=gnome|kwallet|basic`, 3-second helper deadlines, non-secret warnings, and `SWEET_COOKIE_CHROME_SAFE_STORAGE_PASSWORD` calibration (including Chromium). Oracle-owned keyring helpers receive password-scrubbed environments. The worker temporarily supplies the selected key through Sweet Cookie's supported Chrome and Brave password overrides: 0.3 classifies Brave by substrings anywhere in the DB path, including an unrelated XDG/HOME ancestor. Mirroring the key prevents that branch from probing a vendor keyring with the Chromium secret inherited. The Chrome override remains the Chromium calibration control. Before native qualification or loading the Linux module, a nonempty trimmed Chrome override bypasses native qualification and the environment transaction only for explicit paths whose Sweet Cookie-expanded candidate contains no case-insensitive Brave selector. Tilde and relative paths are expanded as Sweet Cookie does; absolute text is retained because a literal `Cookies` path can still contain a Brave selector before a `..` segment. Profile names and ambiguous candidates retain the normal source-selection path. Empty-key fallback suppresses both password overrides and selects `basic`; both prior passwords and the backend are restored in `finally`. Parent Pi/global config is not changed. Relocated, Snap, and Flatpak Chromium sources are outside automatic key selection; a per-run matching Chrome or Brave password override can calibrate a relocated source. For unqualified sources, Sweet Cookie 0.3 still selects Brave when the resolved DB path contains `bravesoftware`, `brave-browser`, or `brave browser` (case-insensitive), including an ancestor directory; such paths may require the Brave override. This narrow adapter retains Sweet Cookie 0.3's public parser/decryptor. Remove it once an upstream fix passes equivalent successful-path performance checks. pi-oracle does not select Sweet Cookie's Edge or Firefox backends. Browser/helper subprocesses launched by Oracle receive password-scrubbed environments; this guarantee does not cover upstream fallback helpers for unqualified sources. Cookie replay remains domain-based; host-only/partition isolation is not repaired by this key-selection fix.
|
|
292
295
|
|
|
293
296
|
`auth.chromiumKeychain` is a macOS-only opt-in alternate cookie source for Chromium-family browsers that are not handled by the default `@steipete/sweet-cookie` Chrome-compatible importer. It must be configured with `auth.chromeCookiePath`; partial config is rejected so `/oracle-auth` cannot silently fall back to a different browser profile. On Linux, valid config should leave `auth.chromiumKeychain` unset and use Sweet Cookie's Linux keyring/password options instead.
|
|
294
297
|
|
|
@@ -33,7 +33,7 @@ The local extension now intercepts TUI `/oracle` and `/oracle-followup` before p
|
|
|
33
33
|
|
|
34
34
|
Do not add `https://github.com/fitchmultz/pi-oracle` to this repository's `.pi/settings.json` just to test local oracle changes. If you already keep `npm:pi-oracle` installed globally, mixing the global npm package with a project-local git package creates two distinct package identities and can trigger prompt/tool conflicts. Use the explicit CLI extension flag above instead.
|
|
35
35
|
|
|
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
|
|
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 with a non-empty `.oracle-seed-generation` value.
|
|
37
37
|
|
|
38
38
|
## Preset requirements
|
|
39
39
|
|
|
@@ -98,9 +98,11 @@ mkdir -p \
|
|
|
98
98
|
mkdir -p \
|
|
99
99
|
"$TEST1_AGENT/extensions/oracle-auth-seed-profile" \
|
|
100
100
|
"$TEST2_AGENT/extensions/oracle-auth-seed-profile"
|
|
101
|
-
|
|
102
|
-
"$TEST1_AGENT/extensions/oracle-auth-seed-profile
|
|
103
|
-
"$TEST2_AGENT/extensions/oracle-auth-seed-profile
|
|
101
|
+
for seed in \
|
|
102
|
+
"$TEST1_AGENT/extensions/oracle-auth-seed-profile" \
|
|
103
|
+
"$TEST2_AGENT/extensions/oracle-auth-seed-profile"; do
|
|
104
|
+
printf '%s\n' 'isolated-smoke-fixture' > "$seed/.oracle-seed-generation"
|
|
105
|
+
done
|
|
104
106
|
|
|
105
107
|
echo 'secret' > "$OUTSIDE/secret.txt"
|
|
106
108
|
ln -s "$OUTSIDE" "$FIXTURE/linked-outside"
|
|
@@ -181,8 +183,8 @@ Expected behavior:
|
|
|
181
183
|
Notes:
|
|
182
184
|
|
|
183
185
|
- this smoke test does not require `/oracle-auth`
|
|
184
|
-
- the snippet creates an isolated test
|
|
185
|
-
-
|
|
186
|
+
- the snippet creates an isolated test seed profile with a non-empty `.oracle-seed-generation` value; an empty file is rejected before archiving
|
|
187
|
+
- this marker is fixture setup, not authenticated account access; the worker still fails later due to missing real auth, leaving the archive available for inspection
|
|
186
188
|
|
|
187
189
|
### Test 2: symlink escape rejection
|
|
188
190
|
|
|
@@ -204,7 +206,7 @@ TMUX_CMD1="cd '$REPO' && env PI_CODING_AGENT_DIR='$TEST1_AGENT' PI_ORACLE_JOBS_D
|
|
|
204
206
|
|
|
205
207
|
Use the same pattern for additional sessions, swapping the session/job directories as needed. This keeps the test on the in-repo extension and hidden in-repo command prompt without depending on `.pi/settings.json` package entries.
|
|
206
208
|
|
|
207
|
-
`/oracle` now starts by calling `oracle_preflight`. If you want the command flow to proceed past that early guard in an isolated test without using your normal auth state, run `/oracle-auth` in the isolated agent dir or create a purpose-built
|
|
209
|
+
`/oracle` now starts by calling `oracle_preflight`. If you want the command flow to proceed past that early guard in an isolated test without using your normal auth state, run `/oracle-auth` in the isolated agent dir or create a purpose-built test seed fixture with a non-empty `.oracle-seed-generation` value.
|
|
208
210
|
|
|
209
211
|
## Additional failure-mode smoke tests
|
|
210
212
|
|