pi-oracle 0.6.15 → 0.6.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ### Changed
6
+ - made `/oracle-auth` success and failure output easier to scan, with compact source summaries and source-specific troubleshooting for configured Chromium cookie sources
7
+
8
+ ## 0.6.16 - 2026-05-07
9
+
10
+ ### Changed
11
+ - migrated the local pi development baseline and peer metadata from deprecated `@mariozechner/*` packages to maintained `@earendil-works/*` `0.74.0`
12
+ - regenerated the npm lockfile against the current stable dependency graph and refreshed the `basic-ftp` override to the current patched major
13
+
14
+ ### Compatibility
15
+ - reviewed the pi `0.74.0` changelog and confirmed the oracle extension remains compatible with current extension lifecycle and package install/update guidance
16
+
5
17
  ## 0.6.15 - 2026-05-03
6
18
 
7
19
  ### Fixed
package/README.md CHANGED
@@ -223,6 +223,17 @@ Project config should only override safe, non-privileged settings.
223
223
  - Re-run `/oracle-auth`.
224
224
  - If ChatGPT is half-logged-in or challenge flow state looks weird, finish the login/challenge in the headed auth browser and retry.
225
225
 
226
+ ### Custom Chromium auth says cookies synced but the session is rejected
227
+
228
+ This usually means the cookie import worked but the source cookies are not the active ChatGPT session you expected.
229
+
230
+ 1. Open the configured browser profile.
231
+ 2. Confirm ChatGPT works there without logging in again.
232
+ 3. Quit the browser fully so its `Cookies` DB is stable.
233
+ 4. Confirm `auth.chromeCookiePath` points at that exact profile's `Cookies` DB.
234
+ 5. Confirm `auth.chromiumKeychain.services` names the browser's safe-storage Keychain service for that DB.
235
+ 6. Re-run `/oracle-auth`.
236
+
226
237
  ### You hit a challenge / verification page
227
238
 
228
239
  - Solve it in the auth/bootstrap browser if prompted.
@@ -73,7 +73,7 @@ The extension now follows the current `pi` session lifecycle model:
73
73
  ### Commands
74
74
 
75
75
  - `/oracle-auth`
76
- - syncs ChatGPT cookies from the user’s real Chrome into the isolated oracle profile and verifies them there
76
+ - syncs ChatGPT cookies from the configured local browser profile into the isolated oracle profile and verifies them there
77
77
  - `/oracle-read [job-id]`
78
78
  - shows job status plus the saved response preview
79
79
  - `/oracle-status [job-id]`
@@ -5,7 +5,7 @@
5
5
  // Invariants/Assumptions: Oracle only runs against persisted sessions, and startup maintenance should be best-effort without breaking session initialization.
6
6
  import { fileURLToPath } from "node:url";
7
7
  import { dirname, join } from "node:path";
8
- import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
8
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
9
9
  import { loadOracleConfig } from "./lib/config.js";
10
10
  import { registerOracleCommands } from "./lib/commands.js";
11
11
  import { getSessionFile, pruneTerminalOracleJobs, reconcileStaleOracleJobs } from "./lib/jobs.js";
@@ -5,7 +5,7 @@
5
5
  // Invariants/Assumptions: Commands operate on persisted project-scoped jobs and rely on shared observability formatting for detached-state clarity.
6
6
  import { existsSync } from "node:fs";
7
7
  import { readFile } from "node:fs/promises";
8
- import type { ExtensionAPI, ExtensionCommandContext } from "@mariozechner/pi-coding-agent";
8
+ import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
9
9
  import { formatOracleCancelOutcome, formatOracleJobSummary } from "../shared/job-observability-helpers.mjs";
10
10
  import { runOracleAuthBootstrap } from "./auth.js";
11
11
  import {
@@ -67,9 +67,9 @@ function readScopedJob(jobId: string, cwd: string) {
67
67
 
68
68
  export function registerOracleCommands(pi: ExtensionAPI, authWorkerPath: string, workerPath: string): void {
69
69
  pi.registerCommand("oracle-auth", {
70
- description: "Sync ChatGPT cookies from real Chrome into the oracle auth seed profile",
70
+ description: "Sync ChatGPT cookies from the configured local browser profile into the oracle auth seed profile",
71
71
  handler: async (_args, ctx) => {
72
- ctx.ui.notify("Syncing ChatGPT cookies from real Chrome into the oracle auth seed profile…", "info");
72
+ ctx.ui.notify("Syncing ChatGPT cookies from the configured local browser profile into the oracle auth seed profile…", "info");
73
73
  try {
74
74
  const result = await runOracleAuthBootstrap(authWorkerPath, ctx.cwd);
75
75
  ctx.ui.notify(result, "info");
@@ -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 } from "@mariozechner/pi-coding-agent";
9
+ import { getAgentDir } from "@earendil-works/pi-coding-agent";
10
10
  import { isAbsolute, join, normalize } from "node:path";
11
11
  import { getProjectId } from "./runtime.js";
12
12
 
@@ -7,7 +7,7 @@ import { createHash, randomUUID } from "node:crypto";
7
7
  import { existsSync, readdirSync, readFileSync, realpathSync } from "node:fs";
8
8
  import { chmod, mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
9
9
  import { isAbsolute, join, relative as relativePath, resolve, sep } from "node:path";
10
- import type { ExtensionContext } from "@mariozechner/pi-coding-agent";
10
+ import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
11
11
  import {
12
12
  ACTIVE_ORACLE_JOB_STATUSES,
13
13
  applyOracleJobCleanupWarnings,
@@ -4,7 +4,7 @@
4
4
  // Usage: Imported by the oracle extension entrypoint to start or stop per-session oracle polling.
5
5
  // Invariants/Assumptions: Poller scans are serialized per session key, wake-up delivery is best-effort, and terminal-job notifications always re-read durable job state before send.
6
6
  import { existsSync } from "node:fs";
7
- import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
7
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
8
8
  import { buildOracleStatusText, buildOracleWakeupNotificationContent } from "../shared/job-observability-helpers.mjs";
9
9
  import { isProcessAlive, readProcessStartedAt } from "../shared/process-helpers.mjs";
10
10
  import { isLockTimeoutError, listLeaseMetadata, releaseLease, withGlobalReconcileLock, writeLeaseMetadata } from "./locks.js";
@@ -8,7 +8,7 @@ import { lstat, mkdtemp, readdir, rename, rm, stat, writeFile } from "node:fs/pr
8
8
  import { tmpdir } from "node:os";
9
9
  import { basename, join, posix } from "node:path";
10
10
  import { runOracleAuthBootstrap } from "./auth.js";
11
- import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
11
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
12
12
  import { Type } from "typebox";
13
13
  import { formatOracleCancelOutcome, formatOracleJobSummary, formatOracleSubmitResponse } from "../shared/job-observability-helpers.mjs";
14
14
  import { getLatestOracleJobLifecycleEvent, getLatestOracleTerminalLifecycleEvent, transitionOracleJobPhase } from "../shared/job-lifecycle-helpers.mjs";
@@ -463,13 +463,97 @@ function cookieSource() {
463
463
  return config.auth.chromeCookiePath || config.auth.chromeProfile;
464
464
  }
465
465
 
466
+ function usesConfiguredChromiumCookieSource() {
467
+ return Boolean(config.auth.chromeCookiePath && config.auth.chromiumKeychain);
468
+ }
469
+
470
+ function browserSourceName() {
471
+ if (config.browser.executablePath) return basename(config.browser.executablePath);
472
+ if (usesConfiguredChromiumCookieSource()) return "configured Chromium browser";
473
+ return "Google Chrome";
474
+ }
475
+
476
+ function keychainSummary() {
477
+ const keychain = config.auth.chromiumKeychain;
478
+ if (!keychain) return undefined;
479
+ const services = Array.isArray(keychain.services) && keychain.services.length > 0 ? keychain.services.join(", ") : "(none configured)";
480
+ const label = keychain.label || services;
481
+ return `${label} (account: ${keychain.account}, services: ${services})`;
482
+ }
483
+
466
484
  function cookieSourceLabel() {
467
- if (config.auth.chromeCookiePath && config.auth.chromiumKeychain) return `Chromium cookie DB ${config.auth.chromeCookiePath}`;
485
+ if (usesConfiguredChromiumCookieSource()) return `configured Chromium cookie DB ${config.auth.chromeCookiePath}`;
468
486
  return config.auth.chromeCookiePath
469
487
  ? `Chrome cookie DB ${config.auth.chromeCookiePath}`
470
488
  : `Chrome profile ${config.auth.chromeProfile}`;
471
489
  }
472
490
 
491
+ function formatAuthSuccessMessage({ classificationMessage, appliedCount, targetDir }) {
492
+ const lines = [
493
+ "Oracle auth synced.",
494
+ "",
495
+ "Source:",
496
+ `- Browser: ${browserSourceName()}`,
497
+ ];
498
+
499
+ if (config.auth.chromeCookiePath) lines.push(`- Cookie DB: ${config.auth.chromeCookiePath}`);
500
+ else lines.push(`- Profile: ${config.auth.chromeProfile}`);
501
+
502
+ const keychain = keychainSummary();
503
+ if (keychain) lines.push(`- Keychain: ${keychain}`);
504
+ lines.push(`- Cookies synced: ${appliedCount}`);
505
+ lines.push("", "Auth seed profile:", targetDir, "", "Diagnostics:", DIAGNOSTICS_DIR, "", "Status:", classificationMessage);
506
+ return lines.join("\n");
507
+ }
508
+
509
+ function formatAuthFailureGuidance(error) {
510
+ const reason = error instanceof Error ? error.message : String(error);
511
+ const lines = ["Oracle auth failed.", "", `Reason: ${reason}`, "", "Likely causes:"];
512
+
513
+ if (usesConfiguredChromiumCookieSource()) {
514
+ lines.push(
515
+ "- the configured cookie DB is stale or from the wrong browser profile",
516
+ "- ChatGPT is logged out in that browser profile",
517
+ "- auth.chromiumKeychain does not match the browser safe-storage item for that cookie DB",
518
+ "- the target browser was still running while /oracle-auth read its Cookies DB",
519
+ "",
520
+ "Next:",
521
+ "1. Open the configured browser profile.",
522
+ "2. Confirm ChatGPT works there.",
523
+ "3. Quit the browser fully.",
524
+ "4. Confirm auth.chromeCookiePath points at that profile's Cookies DB.",
525
+ "5. Confirm auth.chromiumKeychain.services names the browser's safe-storage Keychain service.",
526
+ "6. Re-run /oracle-auth.",
527
+ );
528
+ } else {
529
+ lines.push(
530
+ "- ChatGPT is logged out in the configured local browser profile",
531
+ "- auth.chromeProfile or auth.chromeCookiePath points at the wrong profile",
532
+ "- the profile cookie store is stale or unreadable",
533
+ "",
534
+ "Next:",
535
+ "1. Open the configured local browser profile.",
536
+ "2. Confirm ChatGPT works there.",
537
+ "3. Quit the browser fully.",
538
+ "4. Re-run /oracle-auth.",
539
+ );
540
+ }
541
+
542
+ lines.push(
543
+ "",
544
+ "Details:",
545
+ `- Source: ${cookieSourceLabel()}`,
546
+ `- Browser: ${browserSourceName()}`,
547
+ `- Auth seed profile: ${config.browser.authSeedProfileDir}`,
548
+ `- Diagnostics: ${DIAGNOSTICS_DIR || "(oracle-auth diagnostics dir unavailable)"}`,
549
+ `- Log: ${LOG_PATH}`,
550
+ "",
551
+ authConfigSummary(),
552
+ );
553
+
554
+ return lines.join("\n");
555
+ }
556
+
473
557
  async function readRawSourceCookies() {
474
558
  if (config.auth.chromeCookiePath && config.auth.chromiumKeychain) {
475
559
  return await getCookiesFromConfiguredChromiumSource({
@@ -825,9 +909,7 @@ async function run() {
825
909
  const generation = new Date().toISOString();
826
910
  await writeFile(join(profilePlan.targetDir, ".oracle-seed-generation"), `${generation}\n`, { encoding: "utf8", mode: 0o600 });
827
911
  committedProfile = true;
828
- process.stdout.write(
829
- `${classification.message} Synced ${appliedCount} cookies into ${profilePlan.targetDir}. Diagnostics: ${DIAGNOSTICS_DIR}`,
830
- );
912
+ process.stdout.write(formatAuthSuccessMessage({ classificationMessage: classification.message, appliedCount, targetDir: profilePlan.targetDir }));
831
913
  } catch (error) {
832
914
  shouldPreserveBrowser = Boolean(error && typeof error === "object" && error.preserveBrowser === true);
833
915
  await log(`Auth bootstrap failed: ${error instanceof Error ? error.message : String(error)}`);
@@ -843,8 +925,6 @@ async function run() {
843
925
  }
844
926
 
845
927
  run().catch((error) => {
846
- process.stderr.write(
847
- `${error instanceof Error ? error.message : String(error)}\nSee ${LOG_PATH} and diagnostics in ${DIAGNOSTICS_DIR || "(oracle-auth diagnostics dir unavailable)"}\n${authConfigSummary()}\nIf needed, ensure the configured browser profile is already logged into ChatGPT and grant macOS Keychain access when prompted.`,
848
- );
928
+ process.stderr.write(formatAuthFailureGuidance(error));
849
929
  process.exit(1);
850
930
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-oracle",
3
- "version": "0.6.15",
3
+ "version": "0.6.16",
4
4
  "description": "ChatGPT web-oracle extension for pi with isolated browser auth, async jobs, and project-context archives.",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -42,7 +42,7 @@
42
42
  ]
43
43
  },
44
44
  "scripts": {
45
- "check:oracle-extension": "node --check extensions/oracle/shared/process-helpers.mjs && node --check extensions/oracle/shared/state-coordination-helpers.mjs && node --check extensions/oracle/shared/job-coordination-helpers.mjs && node --check extensions/oracle/shared/job-lifecycle-helpers.mjs && node --check extensions/oracle/shared/job-observability-helpers.mjs && node --check extensions/oracle/worker/run-job.mjs && node --check extensions/oracle/worker/state-locks.mjs && node --check extensions/oracle/worker/artifact-heuristics.mjs && node --check extensions/oracle/worker/chatgpt-ui-helpers.mjs && node --check extensions/oracle/worker/chatgpt-flow-helpers.mjs && node --check extensions/oracle/worker/auth-flow-helpers.mjs && node --check extensions/oracle/worker/auth-cookie-policy.mjs && node --check extensions/oracle/worker/chromium-cookie-source.mjs && node --check extensions/oracle/worker/auth-bootstrap.mjs && esbuild extensions/oracle/index.ts --bundle --platform=node --format=esm --external:@mariozechner/pi-coding-agent --external:@mariozechner/pi-ai --external:typebox --outfile=/tmp/pi-oracle-extension-check.js",
45
+ "check:oracle-extension": "node --check extensions/oracle/shared/process-helpers.mjs && node --check extensions/oracle/shared/state-coordination-helpers.mjs && node --check extensions/oracle/shared/job-coordination-helpers.mjs && node --check extensions/oracle/shared/job-lifecycle-helpers.mjs && node --check extensions/oracle/shared/job-observability-helpers.mjs && node --check extensions/oracle/worker/run-job.mjs && node --check extensions/oracle/worker/state-locks.mjs && node --check extensions/oracle/worker/artifact-heuristics.mjs && node --check extensions/oracle/worker/chatgpt-ui-helpers.mjs && node --check extensions/oracle/worker/chatgpt-flow-helpers.mjs && node --check extensions/oracle/worker/auth-flow-helpers.mjs && node --check extensions/oracle/worker/auth-cookie-policy.mjs && node --check extensions/oracle/worker/chromium-cookie-source.mjs && node --check extensions/oracle/worker/auth-bootstrap.mjs && esbuild extensions/oracle/index.ts --bundle --platform=node --format=esm --external:@earendil-works/pi-coding-agent --external:@earendil-works/pi-ai --external:typebox --outfile=/tmp/pi-oracle-extension-check.js",
46
46
  "typecheck": "tsc --noEmit -p tsconfig.json",
47
47
  "typecheck:worker-helpers": "tsc --noEmit -p tsconfig.worker-helpers.json",
48
48
  "sanity:oracle": "node scripts/oracle-sanity-runner.mjs",
@@ -55,19 +55,19 @@
55
55
  "@steipete/sweet-cookie": "^0.2.0"
56
56
  },
57
57
  "peerDependencies": {
58
- "typebox": "*",
59
- "@mariozechner/pi-coding-agent": "*"
58
+ "@earendil-works/pi-coding-agent": "*",
59
+ "typebox": "*"
60
60
  },
61
61
  "overrides": {
62
- "basic-ftp": "5.3.0",
62
+ "basic-ftp": "6.0.1",
63
63
  "protobufjs": "7.5.5"
64
64
  },
65
65
  "devDependencies": {
66
- "@mariozechner/pi-coding-agent": "^0.72.0",
67
- "@types/node": "^25.6.0",
66
+ "@earendil-works/pi-coding-agent": "^0.74.0",
67
+ "@types/node": "^25.6.1",
68
68
  "esbuild": "^0.28.0",
69
69
  "tsx": "^4.21.0",
70
- "typebox": "^1.1.37",
70
+ "typebox": "^1.1.38",
71
71
  "typescript": "^6.0.3"
72
72
  },
73
73
  "engines": {
@@ -76,5 +76,5 @@
76
76
  "os": [
77
77
  "darwin"
78
78
  ],
79
- "packageManager": "npm@10.9.8"
79
+ "packageManager": "npm@11.14.0"
80
80
  }