pi-oracle 0.7.13 → 0.7.14
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 +17 -0
- package/README.md +3 -3
- package/docs/ORACLE_DESIGN.md +6 -2
- package/docs/ORACLE_ISOLATED_PI_VALIDATION.md +1 -1
- package/docs/platform-smoke.md +1 -1
- package/extensions/oracle/lib/config.ts +2 -2
- package/extensions/oracle/lib/runtime.ts +3 -2
- package/extensions/oracle/lib/tools.ts +3 -3
- package/extensions/oracle/worker/run-job.mjs +7 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.7.14 - 2026-06-22
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- updated the local pi development and validation baseline to `@earendil-works/*` `0.79.10`
|
|
9
|
+
- refreshed oracle docs and sanity contracts for pi `0.79.10`, and removed the obsolete fleet-tested marker
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- used pi's exported `CONFIG_DIR_NAME` for project config and workspace-root detection instead of hardcoding `.pi`
|
|
13
|
+
- clarified `oracle_preflight` path labels so isolated-session probes distinguish the current persisted session from the provider auth seed profile
|
|
14
|
+
- fixed ChatGPT response completion detection for the current DOM, where assistant text uses `data-message-author-role="assistant"` without legacy `.message-bubble` nodes
|
|
15
|
+
|
|
16
|
+
### Compatibility
|
|
17
|
+
- reviewed the pi `0.79.10` changelog, extension lifecycle docs/types, compaction event docs, project-trust docs, and package/update docs; no oracle compaction hook changes were required
|
|
18
|
+
|
|
19
|
+
### Validation
|
|
20
|
+
- ran `npm run verify:oracle`, `npm run smoke:real:packed`, source-mode isolated pi model-agent smoke with the `instant` preset, and `npm run smoke:platform:all`
|
|
21
|
+
|
|
5
22
|
## 0.7.13 - 2026-06-15
|
|
6
23
|
|
|
7
24
|
### 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.10`. Pi `0.79.10+` 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
|
|
|
@@ -77,7 +77,7 @@ 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.10 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
83
|
- `agent-browser` and `tar` available on the machine; `zstd` is also required when submitting ChatGPT `.tar.zst` archives
|
|
@@ -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+ 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
|
|
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.10+ 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
|
|
|
@@ -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+, 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
|
|
|
@@ -639,6 +639,10 @@ Remaining non-blocking hardening work:
|
|
|
639
639
|
- keep hardening model-selection verification against future ChatGPT UI variation
|
|
640
640
|
|
|
641
641
|
Recent proof points:
|
|
642
|
+
- Pi 0.79.10 local gate: `npm run verify:oracle` passed on 2026-06-22 after the 0.79.10 baseline refresh and `CONFIG_DIR_NAME` cleanup
|
|
643
|
+
- Pi 0.79.10 isolated extension smokes: `.artifacts/real-smoke/run-1782137209549-0xe67z` passed packed-install proof, and `.artifacts/real-smoke/run-1782137217821-95a1po` passed source model-agent proof
|
|
644
|
+
- Pi 0.79.10 platform artifacts: `.artifacts/platform-smoke/run-1782137574391-7lay68` (macOS platform-build), `.artifacts/platform-smoke/run-1782137619352-gku7jz` (macOS real-extension), `.artifacts/platform-smoke/run-1782137587082-d7kg4p` (Ubuntu platform-build), `.artifacts/platform-smoke/run-1782137619176-lgxezy` (Ubuntu real-extension), `.artifacts/platform-smoke/run-1782137625964-66z0oc` (Windows native platform-build), `.artifacts/platform-smoke/run-1782137752969-pbmdj1` (Windows native real-extension)
|
|
645
|
+
- Pi 0.79.10 isolated agent feedback: `.artifacts/isolated-agent-feedback/run-1782137385` confirmed local extension loading and useful `oracle_preflight` output after the path-label polish
|
|
642
646
|
- Pi 0.79.1 release gate: `npm run release:check` passed on 2026-06-11 after the project-trust, prompt-history, ChatGPT selector, and send-acceptance updates, including `verify:oracle` plus Crabbox macOS, Ubuntu, and Windows native `platform-build` and `real-extension` suites
|
|
643
647
|
- Pi 0.79.1 platform artifacts: `.artifacts/platform-smoke/run-1781196218405-311wzs` (macOS platform-build), `.artifacts/platform-smoke/run-1781196261807-eb0391` (macOS real-extension), `.artifacts/platform-smoke/run-1781196230636-ze1hai` (Ubuntu platform-build), `.artifacts/platform-smoke/run-1781196265638-kxiwh9` (Ubuntu real-extension), `.artifacts/platform-smoke/run-1781196255488-ucuf35` (Windows native platform-build), `.artifacts/platform-smoke/run-1781196369098-4qlzjs` (Windows native real-extension)
|
|
644
648
|
- Pi 0.79.1 live source-extension send-acceptance smoke: new-chat job `4b98776f-d422-4bfb-8a6a-7aef73c31bf6` reached `https://chatgpt.com/c/6a2ac99d-fc5c-83e8-88d7-5e1e8f427499` and completed; same-thread follow-up job `abb4f590-96a1-4aab-b91a-c0a7cc15a162` completed on the unchanged conversation URL after send-acceptance evidence
|
|
@@ -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+: 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
|
@@ -91,7 +91,7 @@ On each required target, `platform-build`:
|
|
|
91
91
|
5. runs `npm pack`;
|
|
92
92
|
6. creates a fresh target-local pi project;
|
|
93
93
|
7. runs `npm install --no-save <packed tarball>`;
|
|
94
|
-
8. runs `pi install -l ./node_modules/pi-oracle --approve` so Pi 0.79
|
|
94
|
+
8. runs `pi install -l ./node_modules/pi-oracle --approve` so Pi 0.79+ project-trust gating intentionally trusts the temporary fixture;
|
|
95
95
|
9. runs `pi list --approve`;
|
|
96
96
|
10. asserts the installed package came from `node_modules/pi-oracle` and did not use `pi -e` / source-extension shortcuts.
|
|
97
97
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { execFileSync } from "node:child_process";
|
|
7
7
|
import { existsSync, readFileSync } from "node:fs";
|
|
8
8
|
import { homedir } from "node:os";
|
|
9
|
-
import { getAgentDir, hasTrustRequiringProjectResources, ProjectTrustStore } from "@earendil-works/pi-coding-agent";
|
|
9
|
+
import { CONFIG_DIR_NAME, getAgentDir, hasTrustRequiringProjectResources, ProjectTrustStore } from "@earendil-works/pi-coding-agent";
|
|
10
10
|
import { isAbsolute, join, normalize } from "node:path";
|
|
11
11
|
import {
|
|
12
12
|
assertNotKnownBrowserUserDataPath,
|
|
@@ -377,7 +377,7 @@ export function getOracleConfigLoadDetails(cwd: string, options?: OracleConfigLo
|
|
|
377
377
|
const agentDir = getAgentDir();
|
|
378
378
|
const projectRoot = getProjectId(cwd);
|
|
379
379
|
const agentConfigPath = join(agentDir, "extensions", "oracle.json");
|
|
380
|
-
const projectConfigPath = join(projectRoot,
|
|
380
|
+
const projectConfigPath = join(projectRoot, CONFIG_DIR_NAME, "extensions", "oracle.json");
|
|
381
381
|
const projectConfigExists = existsSync(projectConfigPath);
|
|
382
382
|
const projectConfigTrusted = isProjectConfigTrusted(projectRoot, agentDir, projectConfigExists, options);
|
|
383
383
|
const projectConfigLoaded = projectConfigExists && projectConfigTrusted;
|
|
@@ -8,6 +8,7 @@ import { spawn } from "node:child_process";
|
|
|
8
8
|
import { constants as fsConstants, existsSync, realpathSync, readFileSync } from "node:fs";
|
|
9
9
|
import { access, cp as copyDirectory, mkdir, readFile, rm, stat, writeFile } from "node:fs/promises";
|
|
10
10
|
import { delimiter, dirname, join } from "node:path";
|
|
11
|
+
import { CONFIG_DIR_NAME } from "@earendil-works/pi-coding-agent";
|
|
11
12
|
import { assertNotKnownBrowserUserDataPath, sweetCookieSafeStoragePasswordScrubbedEnv } from "../shared/browser-profile-helpers.mjs";
|
|
12
13
|
import { jobBlocksAdmission } from "../shared/job-coordination-helpers.mjs";
|
|
13
14
|
import { isTrackedProcessAlive } from "../shared/process-helpers.mjs";
|
|
@@ -42,8 +43,8 @@ function killProcess(child: ReturnType<typeof spawn>): void {
|
|
|
42
43
|
child.kill("SIGKILL");
|
|
43
44
|
}
|
|
44
45
|
const WORKSPACE_ROOT_MARKERS = [
|
|
45
|
-
"
|
|
46
|
-
|
|
46
|
+
join(CONFIG_DIR_NAME, "extensions", "oracle.json"),
|
|
47
|
+
CONFIG_DIR_NAME,
|
|
47
48
|
"AGENTS.md",
|
|
48
49
|
] as const;
|
|
49
50
|
function cpCommand(): string {
|
|
@@ -677,10 +677,10 @@ function formatOraclePreflightResponse(details: OraclePreflightDetails): string
|
|
|
677
677
|
if (details.ready) {
|
|
678
678
|
return [
|
|
679
679
|
`Oracle preflight ready for ${providerLabel}.`,
|
|
680
|
-
details.session.sessionFile ? `Persisted session: ${details.session.sessionFile}` : undefined,
|
|
681
|
-
details.auth.seedProfileDir ? `Auth seed profile: ${details.auth.seedProfileDir}` : undefined,
|
|
680
|
+
details.session.sessionFile ? `Persisted pi session (current run): ${details.session.sessionFile}` : undefined,
|
|
681
|
+
details.auth.seedProfileDir ? `Auth seed profile (${providerLabel} login source): ${details.auth.seedProfileDir}` : undefined,
|
|
682
682
|
`Preflight validates the persisted pi session, local oracle config, and ${providerLabel} auth seed created by oracle_auth.`,
|
|
683
|
-
"
|
|
683
|
+
"If you are dispatching an oracle job, continue with context gathering and submission.",
|
|
684
684
|
].filter(Boolean).join("\n");
|
|
685
685
|
}
|
|
686
686
|
|
|
@@ -1790,12 +1790,15 @@ async function grokAssistantMessages(job) {
|
|
|
1790
1790
|
return text;
|
|
1791
1791
|
};
|
|
1792
1792
|
const bubbles = Array.from(document.querySelectorAll('.message-bubble'));
|
|
1793
|
+
const roleMessages = Array.from(document.querySelectorAll('[data-message-author-role="assistant"]'));
|
|
1793
1794
|
const sourceNodes = bubbles.length > 0
|
|
1794
1795
|
? bubbles
|
|
1795
|
-
:
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1796
|
+
: roleMessages.length > 0
|
|
1797
|
+
? roleMessages
|
|
1798
|
+
: Array.from(document.querySelectorAll('div')).filter((node) => {
|
|
1799
|
+
const classText = String(node.className || '');
|
|
1800
|
+
return classText.includes('group') && classText.includes('flex') && classText.includes('flex-col') && classText.includes('justify-center');
|
|
1801
|
+
});
|
|
1799
1802
|
const messages = sourceNodes
|
|
1800
1803
|
.map((node) => node.closest('[data-message-author-role], [data-testid*="message"], .group') || node)
|
|
1801
1804
|
.filter((node, index, all) => all.indexOf(node) === index)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-oracle",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.14",
|
|
4
4
|
"description": "ChatGPT and Grok web-oracle extension for pi with isolated browser auth, async jobs, and project-context archives.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"protobufjs": "7.6.1"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@earendil-works/pi-ai": "0.79.
|
|
87
|
-
"@earendil-works/pi-coding-agent": "0.79.
|
|
86
|
+
"@earendil-works/pi-ai": "^0.79.10",
|
|
87
|
+
"@earendil-works/pi-coding-agent": "^0.79.10",
|
|
88
88
|
"@types/node": "^22.19.19",
|
|
89
89
|
"esbuild": "^0.28.0",
|
|
90
90
|
"tsx": "^4.22.3",
|