@andrewting19/oracle 0.9.5 → 0.9.6
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 +5 -16
- package/package.json +1 -1
|
@@ -277,10 +277,12 @@ export async function serveRemote(options = {}) {
|
|
|
277
277
|
const chrome = await launchChrome({ headless: false }, userDataDir, console.log);
|
|
278
278
|
sharedChrome = { host: "127.0.0.1", port: chrome.port };
|
|
279
279
|
console.log(`Shared Chrome launched (pid ${chrome.pid}, port ${chrome.port}). Concurrent runs will use isolated tabs.`);
|
|
280
|
-
// Hide the Chrome window so it doesn't steal focus
|
|
281
|
-
|
|
280
|
+
// Hide the Chrome window so it doesn't steal focus.
|
|
281
|
+
try {
|
|
282
|
+
await hideChromeWindow(chrome, console.log);
|
|
283
|
+
}
|
|
284
|
+
catch { }
|
|
282
285
|
// Sync ChatGPT cookies into the shared Chrome so all tabs are authenticated.
|
|
283
|
-
// Uses syncCookies which reads from the host's Chrome profile and injects via CDP.
|
|
284
286
|
try {
|
|
285
287
|
const { syncCookies } = await import("../browser/cookies.js");
|
|
286
288
|
const client = await connectToChrome(chrome.port, console.log);
|
|
@@ -299,19 +301,6 @@ export async function serveRemote(options = {}) {
|
|
|
299
301
|
const msg = cookieErr instanceof Error ? cookieErr.message : String(cookieErr);
|
|
300
302
|
console.log(`Warning: failed to sync cookies into shared Chrome (${msg}). Runs may need to authenticate.`);
|
|
301
303
|
}
|
|
302
|
-
// Clean up Chrome on process exit
|
|
303
|
-
const killChrome = async () => {
|
|
304
|
-
try {
|
|
305
|
-
await chrome.kill();
|
|
306
|
-
}
|
|
307
|
-
catch { }
|
|
308
|
-
try {
|
|
309
|
-
await rm(userDataDir, { recursive: true, force: true });
|
|
310
|
-
}
|
|
311
|
-
catch { }
|
|
312
|
-
};
|
|
313
|
-
process.on("SIGINT", () => void killChrome());
|
|
314
|
-
process.on("SIGTERM", () => void killChrome());
|
|
315
304
|
}
|
|
316
305
|
catch (error) {
|
|
317
306
|
const message = error instanceof Error ? error.message : String(error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrewting19/oracle",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
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",
|