@andrewting19/oracle 0.10.0 → 0.10.2
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/dist/src/remote/server.js +11 -3
- package/package.json +1 -1
|
@@ -300,10 +300,18 @@ export async function serveRemote(options = {}) {
|
|
|
300
300
|
});
|
|
301
301
|
sharedChromeProcess = chrome;
|
|
302
302
|
console.log(`Shared Chrome launched (pid ${chrome.pid}, port ${chrome.port}, headed + no-startup-window). Runs will use hidden CDP targets.`);
|
|
303
|
-
// Create a persistent root CDP session
|
|
304
|
-
//
|
|
303
|
+
// Create a persistent root CDP session at the browser level (not page level).
|
|
304
|
+
// With --no-startup-window there are no page targets, so we connect to the
|
|
305
|
+
// browser endpoint directly. Hidden target lifetimes are tied to the session
|
|
306
|
+
// that created them, so this must stay alive for the serve lifetime.
|
|
305
307
|
const CDP = (await import("chrome-remote-interface")).default;
|
|
306
|
-
const
|
|
308
|
+
const versionInfo = await CDP.Version({ host: "127.0.0.1", port: chrome.port });
|
|
309
|
+
const browserWsUrl = versionInfo.webSocketDebuggerUrl;
|
|
310
|
+
if (!browserWsUrl) {
|
|
311
|
+
throw new Error("Chrome did not expose a browser WebSocket URL");
|
|
312
|
+
}
|
|
313
|
+
console.log(`Root CDP session connecting to ${browserWsUrl}`);
|
|
314
|
+
const rootSession = await CDP({ target: browserWsUrl });
|
|
307
315
|
sharedRootSession = rootSession;
|
|
308
316
|
// Sync ChatGPT cookies into the shared Chrome via a hidden target.
|
|
309
317
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrewting19/oracle",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "CLI wrapper around OpenAI Responses API with GPT-5.4 Pro, GPT-5.4, GPT-5.2, GPT-5.1, and GPT-5.1 Codex high reasoning modes.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/steipete/oracle#readme",
|