@andrewting19/oracle 0.9.7 → 0.9.8

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.
@@ -12,7 +12,7 @@ import { CHATGPT_URL } from "../browser/constants.js";
12
12
  import { getCliVersion } from "../version.js";
13
13
  import { cleanupStaleProfileState, readDevToolsPort, verifyDevToolsReachable, writeChromePid, writeDevToolsActivePort, } from "../browser/profileState.js";
14
14
  import { normalizeChatgptUrl } from "../browser/utils.js";
15
- import { launchChrome, connectToChrome } from "../browser/chromeLifecycle.js";
15
+ import { connectToChrome } from "../browser/chromeLifecycle.js";
16
16
  async function findAvailablePort() {
17
17
  return await new Promise((resolve, reject) => {
18
18
  const srv = net.createServer();
@@ -274,9 +274,30 @@ export async function serveRemote(options = {}) {
274
274
  if (!preferManualLogin) {
275
275
  try {
276
276
  const userDataDir = await mkdtemp(path.join(os.tmpdir(), "oracle-serve-chrome-"));
277
- const chrome = await launchChrome({ headless: true }, userDataDir, console.log);
277
+ // Launch headed Chrome with --no-startup-window: no visible window, no focus stealing,
278
+ // but NOT headless (avoids Cloudflare fingerprinting). CDP creates tabs as needed.
279
+ const { launch: launchChromeRaw } = await import("chrome-launcher");
280
+ const chrome = await launchChromeRaw({
281
+ chromeFlags: [
282
+ "--no-startup-window",
283
+ "--no-first-run",
284
+ "--disable-background-networking",
285
+ "--disable-sync",
286
+ "--disable-translate",
287
+ "--disable-default-apps",
288
+ "--disable-hang-monitor",
289
+ "--disable-popup-blocking",
290
+ "--disable-features=TranslateUI,AutomationControlled",
291
+ "--mute-audio",
292
+ "--window-size=1280,720",
293
+ "--password-store=basic",
294
+ "--use-mock-keychain",
295
+ ],
296
+ userDataDir,
297
+ handleSIGINT: false,
298
+ });
278
299
  sharedChrome = { host: "127.0.0.1", port: chrome.port };
279
- console.log(`Shared Chrome launched headless (pid ${chrome.pid}, port ${chrome.port}). Concurrent runs will use isolated tabs.`);
300
+ console.log(`Shared Chrome launched (pid ${chrome.pid}, port ${chrome.port}, no-startup-window). Concurrent runs will use isolated tabs.`);
280
301
  // Sync ChatGPT cookies into the shared Chrome so all tabs are authenticated.
281
302
  try {
282
303
  const { syncCookies } = await import("../browser/cookies.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrewting19/oracle",
3
- "version": "0.9.7",
3
+ "version": "0.9.8",
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",