pi-oracle 0.7.10 → 0.7.12
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 +23 -0
- package/README.md +13 -13
- package/docs/ORACLE_DESIGN.md +6 -5
- package/docs/ORACLE_ISOLATED_PI_VALIDATION.md +1 -1
- package/docs/platform-smoke.md +2 -2
- package/extensions/oracle/lib/archive.ts +723 -0
- package/extensions/oracle/lib/config.ts +16 -7
- package/extensions/oracle/lib/jobs.ts +2 -1
- package/extensions/oracle/lib/provider-capabilities.ts +41 -0
- package/extensions/oracle/lib/runtime.ts +9 -5
- package/extensions/oracle/lib/tools.ts +10 -576
- package/package.json +3 -3
- package/platform-smoke.config.mjs +1 -1
- package/scripts/oracle-real-smoke.mjs +4 -2
- package/scripts/platform-smoke/targets.mjs +1 -1
- package/scripts/platform-smoke.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.7.12 - 2026-06-15
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- switched Grok oracle submissions to gzip-compressed tar archives (`.tar.gz`) so Grok can extract uploaded context without `zstd`
|
|
9
|
+
- centralized provider archive policy for archive format, upload ceiling, and local compression prerequisites
|
|
10
|
+
- split oracle archive construction out of the agent-facing tool orchestration module
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- preserved ChatGPT `.tar.zst` submissions and `zstd` preflight requirements when ChatGPT is explicitly selected while Grok is the configured default provider
|
|
14
|
+
|
|
15
|
+
### Validation
|
|
16
|
+
- ran the full `npm run verify:oracle` release gate
|
|
17
|
+
- verified isolated local `pi` submissions create extractable Grok `.tar.gz` and explicit ChatGPT `.tar.zst` archives
|
|
18
|
+
|
|
19
|
+
## 0.7.11 - 2026-06-15
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- updated the local pi development and validation baseline to `@earendil-works/*` `0.79.4`
|
|
23
|
+
- refreshed oracle docs and sanity-check baselines for pi `0.79.4`
|
|
24
|
+
|
|
25
|
+
### Validation
|
|
26
|
+
- ran the full `npm run verify:oracle` release gate under pi `0.79.4`
|
|
27
|
+
|
|
5
28
|
## 0.7.10 - 2026-06-13
|
|
6
29
|
|
|
7
30
|
### Added
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
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
|
-
> Status: experimental public beta. Validated on macOS, Linux, and Windows native with Chromium-family browsers and pi `0.79.
|
|
5
|
+
> Status: experimental public beta. Validated on macOS, Linux, and Windows native with Chromium-family browsers and pi `0.79.4`. Pi `0.79.4+` is the suggested tested floor for project-trust-aware package/runtime validation, but pi-bundled runtime packages remain optional wildcard peers so npm peer ranges do not block users from trying newer pi releases. Normal oracle jobs run in an isolated browser profile, not your active browser window.
|
|
6
6
|
|
|
7
7
|
## What a successful run looks like
|
|
8
8
|
|
|
@@ -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`
|
|
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>/
|
|
@@ -77,10 +77,10 @@ You need:
|
|
|
77
77
|
|
|
78
78
|
- macOS, Linux, or Windows native
|
|
79
79
|
- Node.js 22 or newer
|
|
80
|
-
- Suggested tested floor: `pi` 0.79.
|
|
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
|
|
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
|
|
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"]
|
|
@@ -184,7 +184,7 @@ Agent-facing tools:
|
|
|
184
184
|
|
|
185
185
|
Most users can start with defaults. Set an agent-level config only when you need a non-default provider, mode, preset, or browser profile.
|
|
186
186
|
|
|
187
|
-
Pi 0.79.
|
|
187
|
+
Pi 0.79.4 gates project-local inputs behind project trust. `pi-oracle` preserves its historical risk-on extension behavior for existing users: project-local `.pi/extensions/oracle.json` safe overrides still load by default for compatibility. They are ignored when you explicitly opt out of project-local inputs with `--no-approve` or save a “do not trust” decision for the project. Privileged browser/auth settings still come only from the agent-level config.
|
|
188
188
|
|
|
189
189
|
`~/.pi/agent/extensions/oracle.json`
|
|
190
190
|
|
|
@@ -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
|
|
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
|
|
|
@@ -399,7 +399,7 @@ For macOS, Ubuntu, and Windows native package/build plus packed runtime validati
|
|
|
399
399
|
npm run release:check
|
|
400
400
|
```
|
|
401
401
|
|
|
402
|
-
The real runtime suite defaults to deterministic installed-tool execution so platform proof stays bounded. Provider/model defaults remain `zai/glm-5.
|
|
402
|
+
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
403
|
|
|
404
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.
|
|
405
405
|
|
package/docs/ORACLE_DESIGN.md
CHANGED
|
@@ -7,7 +7,7 @@ Companion doc:
|
|
|
7
7
|
- `docs/ORACLE_RECOVERY_DRILL.md` — safe expired-auth recovery validation drill
|
|
8
8
|
|
|
9
9
|
Compatibility target:
|
|
10
|
-
- `pi` 0.79.
|
|
10
|
+
- `pi` 0.79.4+ is the suggested tested floor for current project-trust-aware package/runtime validation
|
|
11
11
|
- package metadata keeps pi runtime packages as optional wildcard peers, so this suggested floor is not enforced as a hard npm install requirement
|
|
12
12
|
- current extension lifecycle only; no backward-compatibility shims for removed `session_switch` / `session_fork` events
|
|
13
13
|
|
|
@@ -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
|
|
@@ -234,7 +234,7 @@ Merged config locations:
|
|
|
234
234
|
- global: `~/.pi/agent/extensions/oracle.json`
|
|
235
235
|
- project: `.pi/extensions/oracle.json`
|
|
236
236
|
|
|
237
|
-
Project config remains restricted to safe overrides only. On Pi 0.79.
|
|
237
|
+
Project config remains restricted to safe overrides only. On Pi 0.79.4+, pi itself gates project-local inputs behind project trust, but `pi-oracle` keeps its historical risk-on extension behavior for this package-specific safe override file: `.pi/extensions/oracle.json` loads by default for compatibility, and is ignored when Pi reports the project is untrusted, including `--no-approve` or saved “do not trust” decisions. This preserves the existing extension experience while still honoring explicit opt-out/distrust decisions. Browser/auth settings remain global-only because they control local privileged browser state.
|
|
238
238
|
|
|
239
239
|
### Current config shape
|
|
240
240
|
|
|
@@ -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
|
|
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
|
|
@@ -27,7 +27,7 @@ The extension is loaded from the local checkout with:
|
|
|
27
27
|
pi --approve --no-extensions -e "$REPO/extensions/oracle/index.ts"
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
That ensures the session is exercising the in-repo code, not a globally installed package. `--approve` is intentional for this isolated workflow on Pi 0.79.
|
|
30
|
+
That ensures the session is exercising the in-repo code, not a globally installed package. `--approve` is intentional for this isolated workflow on Pi 0.79.4+: the test fixture is this trusted checkout, and non-interactive/scripted validation must not block on the project-trust prompt.
|
|
31
31
|
|
|
32
32
|
The local extension now intercepts TUI `/oracle` and `/oracle-followup` before prompt-template expansion, re-injects the compact slash request as the visible user message for prompt-history/up-arrow recall, and reads the in-repo prompt files as hidden dispatch instructions, so do not pass `--prompt-template` for normal local-extension validation. In print/json/rpc modes, the extension contributes the prompt templates itself.
|
|
33
33
|
|
package/docs/platform-smoke.md
CHANGED
|
@@ -36,7 +36,7 @@ Target setup:
|
|
|
36
36
|
Real runtime suite auth:
|
|
37
37
|
|
|
38
38
|
- Default deterministic installed-tool smoke does not require provider API keys.
|
|
39
|
-
- Provider/model defaults remain `zai/glm-5.
|
|
39
|
+
- Provider/model defaults remain `zai/glm-5.2` for optional model-agent debugging.
|
|
40
40
|
- Set `PI_ORACLE_REAL_TEST_MODEL_AGENT=1` to run the slower model-agent path; then the provider auth env is required (`ZAI_API_KEY` by default, reported only as present/redacted).
|
|
41
41
|
- Override with `PI_ORACLE_REAL_TEST_PROVIDER` and `PI_ORACLE_REAL_TEST_MODEL`; auth variable names live in `platform-smoke.config.mjs`.
|
|
42
42
|
|
|
@@ -90,7 +90,7 @@ On each required target, `platform-build`:
|
|
|
90
90
|
5. runs `npm pack`;
|
|
91
91
|
6. creates a fresh target-local pi project;
|
|
92
92
|
7. runs `npm install --no-save <packed tarball>`;
|
|
93
|
-
8. runs `pi install -l ./node_modules/pi-oracle --approve` so Pi 0.79.
|
|
93
|
+
8. runs `pi install -l ./node_modules/pi-oracle --approve` so Pi 0.79.4 project-trust gating intentionally trusts the temporary fixture;
|
|
94
94
|
9. runs `pi list --approve`;
|
|
95
95
|
10. asserts the installed package came from `node_modules/pi-oracle` and did not use `pi -e` / source-extension shortcuts.
|
|
96
96
|
|