@steipete/oracle 0.12.1 → 0.14.0
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/README.md +72 -61
- package/dist/bin/oracle-cli.js +77 -68
- package/dist/bin/oracle-mcp.js +0 -0
- package/dist/docs-site/.nojekyll +0 -0
- package/dist/docs-site/CNAME +1 -0
- package/dist/docs-site/RELEASING.html +410 -0
- package/dist/docs-site/agents.html +374 -0
- package/dist/docs-site/anthropic.html +368 -0
- package/dist/docs-site/bridge.html +400 -0
- package/dist/docs-site/browser-mode.html +593 -0
- package/dist/docs-site/chromium-forks.html +347 -0
- package/dist/docs-site/cli-reference.html +346 -0
- package/dist/docs-site/configuration.html +452 -0
- package/dist/docs-site/favicon.svg +14 -0
- package/dist/docs-site/followup.html +375 -0
- package/dist/docs-site/gemini.html +383 -0
- package/dist/docs-site/grok.html +325 -0
- package/dist/docs-site/index.html +360 -0
- package/dist/docs-site/install.html +335 -0
- package/dist/docs-site/linux.html +321 -0
- package/dist/docs-site/llms.txt +43 -0
- package/dist/docs-site/manual-tests.html +596 -0
- package/dist/docs-site/mcp.html +391 -0
- package/dist/docs-site/multimodel.html +364 -0
- package/dist/docs-site/mythical-pro-agents.html +360 -0
- package/dist/docs-site/notifier.html +338 -0
- package/dist/docs-site/openai-endpoints.html +387 -0
- package/dist/docs-site/openrouter.html +344 -0
- package/dist/docs-site/quickstart.html +369 -0
- package/dist/docs-site/refactor/ux.html +532 -0
- package/dist/docs-site/sessions.html +388 -0
- package/dist/docs-site/social-card.png +0 -0
- package/dist/docs-site/social-card.svg +79 -0
- package/dist/docs-site/spec.html +363 -0
- package/dist/docs-site/testing.html +320 -0
- package/dist/docs-site/tui-debug.html +326 -0
- package/dist/docs-site/windows-work.html +323 -0
- package/dist/docs-site/windows.html +320 -0
- package/dist/src/browser/actions/assistantResponse.js +91 -9
- package/dist/src/browser/actions/deepResearch.js +180 -52
- package/dist/src/browser/actions/modelSelection.js +111 -24
- package/dist/src/browser/actions/navigation.js +358 -67
- package/dist/src/browser/actions/promptComposer.js +241 -46
- package/dist/src/browser/actions/thinkingTime.js +308 -89
- package/dist/src/browser/artifacts.js +19 -0
- package/dist/src/browser/chatgptFiles.js +797 -0
- package/dist/src/browser/chatgptImages.js +130 -3
- package/dist/src/browser/chromeLifecycle.js +4 -0
- package/dist/src/browser/config.js +4 -0
- package/dist/src/browser/index.js +353 -41
- package/dist/src/browser/pageActions.js +1 -1
- package/dist/src/browser/policies.js +2 -6
- package/dist/src/browser/projectSourcesRunner.js +14 -2
- package/dist/src/browser/prompt.js +11 -15
- package/dist/src/browser/providers/chatgptDomProvider.js +1 -0
- package/dist/src/browser/reattach.js +6 -2
- package/dist/src/browser/reattachability.js +22 -10
- package/dist/src/browser/recoverConversation.js +73 -0
- package/dist/src/browser/sessionRunner.js +4 -1
- package/dist/src/cli/bridge/doctor.js +7 -2
- package/dist/src/cli/browserConfig.js +13 -2
- package/dist/src/cli/browserDefaults.js +3 -0
- package/dist/src/cli/browserTabs.js +129 -54
- package/dist/src/cli/engine.js +6 -2
- package/dist/src/cli/followup.js +72 -0
- package/dist/src/cli/help.js +1 -1
- package/dist/src/cli/options.js +20 -0
- package/dist/src/cli/reattachGuidance.js +8 -0
- package/dist/src/cli/runOptions.js +10 -31
- package/dist/src/cli/sessionCommand.js +4 -0
- package/dist/src/cli/sessionDisplay.js +17 -3
- package/dist/src/cli/sessionLineage.js +7 -4
- package/dist/src/cli/sessionRunner.js +16 -1
- package/dist/src/config.js +164 -9
- package/dist/src/gemini-web/client.js +5 -10
- package/dist/src/gemini-web/executor.js +1 -24
- package/dist/src/gemini-web/models.js +83 -0
- package/dist/src/mcp/server.js +2 -0
- package/dist/src/mcp/tools/chatgptImage.js +127 -0
- package/dist/src/mcp/tools/consult.js +261 -167
- package/dist/src/mcp/types.js +2 -0
- package/dist/src/mcp/utils.js +87 -1
- package/dist/src/oracle/config.js +27 -1
- package/dist/src/oracle/files.js +4 -6
- package/dist/src/oracle/geminiModels.js +2 -0
- package/dist/src/oracle/markdown.js +36 -3
- package/dist/src/oracle/modelResolver.js +21 -13
- package/dist/src/oracle/promptAssembly.js +2 -4
- package/dist/src/oracle/request.js +3 -5
- package/dist/src/oracle/tokenStats.js +5 -1
- package/dist/src/oracle.js +1 -1
- package/dist/src/sessionManager.js +1 -0
- package/dist/vendor/oracle-notifier/OracleNotifier.app/Contents/CodeResources +0 -0
- package/dist/vendor/oracle-notifier/OracleNotifier.app/Contents/MacOS/OracleNotifier +0 -0
- package/package.json +20 -29
- package/vendor/oracle-notifier/OracleNotifier.app/Contents/CodeResources +0 -0
- package/vendor/oracle-notifier/OracleNotifier.app/Contents/MacOS/OracleNotifier +0 -0
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=for-the-badge" alt="MIT License"></a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
|
-
Oracle bundles your prompt and files so another AI can answer with real context. It speaks GPT-5.5 Pro (default), GPT-5.5, GPT-5.4 Pro, GPT-5.4, GPT-5.1 Pro, GPT-5.1 Codex (API-only), GPT-5.1, GPT-5.2, Gemini 3.1 Pro
|
|
14
|
+
Oracle bundles your prompt and files so another AI can answer with real context. It speaks GPT-5.5 Pro (default), GPT-5.5, GPT-5.4 Pro, GPT-5.4, GPT-5.1 Pro, GPT-5.1 Codex (API-only), GPT-5.1, GPT-5.2, Gemini 3.1 Pro, Gemini 3.5 Flash, Gemini 3.1 Flash-Lite, Claude Sonnet 4.6, Claude Opus 4.1, and more—and it can ask one or multiple models in a single run. Browser automation is available; use `--browser-model-strategy current` to keep the active ChatGPT model (or `ignore` to skip the picker). API remains the most reliable path, and `--copy` is an easy manual fallback.
|
|
15
15
|
|
|
16
16
|
## Setting up (macOS Browser Mode)
|
|
17
17
|
|
|
@@ -101,7 +101,7 @@ npx -y @steipete/oracle --engine browser --model gpt-5.5-pro \
|
|
|
101
101
|
--browser-follow-up "Give the final decision"
|
|
102
102
|
|
|
103
103
|
# Gemini browser mode (no API key; uses Chrome cookies from gemini.google.com)
|
|
104
|
-
npx -y @steipete/oracle --engine browser --model gemini-3-pro --prompt "a cute robot holding a banana" --generate-image out.jpg --aspect 1:1
|
|
104
|
+
npx -y @steipete/oracle --engine browser --model gemini-3.1-pro --prompt "a cute robot holding a banana" --generate-image out.jpg --aspect 1:1
|
|
105
105
|
|
|
106
106
|
# Sessions (list and replay)
|
|
107
107
|
npx -y @steipete/oracle status --hours 72
|
|
@@ -118,13 +118,14 @@ Engine auto-picks API when `OPENAI_API_KEY` is set, otherwise browser; browser i
|
|
|
118
118
|
|
|
119
119
|
**CLI**
|
|
120
120
|
|
|
121
|
-
- API mode expects API keys in your environment: `OPENAI_API_KEY` (GPT-5.x), `GEMINI_API_KEY` (Gemini 3.1 Pro /
|
|
121
|
+
- API mode expects API keys in your environment: `OPENAI_API_KEY` (GPT-5.x), `GEMINI_API_KEY` (Gemini 3.1 Pro / 3.5 Flash / 3.1 Flash-Lite), `ANTHROPIC_API_KEY` (Claude Sonnet 4.6 / Opus 4.1).
|
|
122
122
|
- Gemini browser mode uses Chrome cookies instead of an API key—just be logged into `gemini.google.com` in Chrome (no Python/venv required).
|
|
123
|
-
- If your
|
|
123
|
+
- Gemini browser mode accepts explicit `gemini-3.1-flash-lite`, `gemini-3.5-flash`, and `gemini-3.1-pro` IDs. Legacy `gemini-3-pro` browser runs target current Gemini 3.1 Pro. If your account can’t access the requested model, Oracle falls back to 3.1 Flash-Lite and logs the fallback in verbose mode.
|
|
124
124
|
- Prefer API mode or `--copy` + manual paste; browser automation is experimental.
|
|
125
125
|
- Browser support: stable on macOS; works on Linux (add `--browser-chrome-path/--browser-cookie-path` when needed) and Windows (manual-login or inline cookies recommended when app-bound cookies block decryption).
|
|
126
126
|
- Remote browser service: `oracle serve` on a signed-in host; clients use `--remote-host/--remote-token`.
|
|
127
|
-
- Browser artifacts: browser sessions save `transcript.md` and generated artifacts under `~/.oracle/sessions/<id>/artifacts/`. Deep Research saves `deep-research-report.md` when the report surface is captured; ChatGPT-generated images are
|
|
127
|
+
- Browser artifacts: browser sessions save `transcript.md` and generated artifacts under `~/.oracle/sessions/<id>/artifacts/`. Deep Research saves `deep-research-report.md` when the report surface is captured; ChatGPT-generated images and downloadable files are saved with the active browser session when supported file URLs are present.
|
|
128
|
+
- MCP image agents: use the `chatgpt_image` tool for the easiest path, or pass `generateImage` to `consult` with `engine: "browser"`; saved paths come back in `structuredContent.images`.
|
|
128
129
|
- Browser archiving: by default, successful non-project, non-Deep-Research, non-multi-turn ChatGPT one-shots are archived after local artifacts are saved. Use `--browser-archive never` to disable or `--browser-archive always` to force archiving after a successful browser run. Archived chats remain manageable in ChatGPT.
|
|
129
130
|
- Conversation mode guidance: use one-shot browser runs for narrow bug reports or quick file-set reviews; use explicit browser follow-ups for ambiguous architecture/product tradeoffs where a challenge pass and final decision are valuable; use Deep Research for broad public-web questions that need citations. Oracle never invents follow-ups automatically.
|
|
130
131
|
- Project Sources: `oracle project-sources list|add --chatgpt-url <project-url>` manages the Project Sources tab in ChatGPT browser mode. v1 is append-only (`list`, `add`, `--dry-run`) so agents can share explicit project context without deleting or replacing user sources.
|
|
@@ -179,7 +180,7 @@ npx -y @steipete/oracle oracle-mcp
|
|
|
179
180
|
- Claude Code / MCP browser consults can use the `chatgpt-pro-heavy` preset for a compact ChatGPT Pro second-opinion workflow.
|
|
180
181
|
- Render/copy bundles for manual paste into ChatGPT when automation is blocked.
|
|
181
182
|
- GPT‑5 Pro API runs detach by default; reattach via `oracle session <id>` / `oracle status` or block with `--wait`.
|
|
182
|
-
- OpenAI/Azure
|
|
183
|
+
- Saved ChatGPT browser conversations and OpenAI/Azure API runs can continue from `--followup <sessionId|responseId>`; for multi-model API parents, add `--followup-model <model>`.
|
|
183
184
|
- Azure endpoints supported via `--azure-endpoint/--azure-deployment/--azure-api-version` or `AZURE_OPENAI_*` envs; use `--provider openai` / `--no-azure` to force first-party OpenAI when Azure env vars are present.
|
|
184
185
|
- Redacted provider checks via `oracle doctor --providers`, `--route`, and `--preflight` before spending API time.
|
|
185
186
|
- File safety: globs/excludes, size guards, `--files-report`.
|
|
@@ -212,7 +213,17 @@ Successful models write per-model files such as `/tmp/oracle-panel.gpt-5.4.md`;
|
|
|
212
213
|
|
|
213
214
|
## Follow-up and lineage
|
|
214
215
|
|
|
215
|
-
Use `--followup` to continue an existing OpenAI/Azure Responses API run with additional context/files:
|
|
216
|
+
Use `--followup` to continue a saved ChatGPT browser conversation or an existing OpenAI/Azure Responses API run with additional context/files:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
oracle \
|
|
220
|
+
--followup <browser-session-id-or-slug> \
|
|
221
|
+
--slug "my-browser-followup" \
|
|
222
|
+
-p "Follow-up: review this additional file in the same conversation." \
|
|
223
|
+
--file "server/src/strategy/plan.ts"
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Browser followup reopens the exact saved conversation and inherits its browser profile, configuration, and model. Resume fails closed before submission if Oracle cannot verify the saved thread and prior turns.
|
|
216
227
|
|
|
217
228
|
```bash
|
|
218
229
|
oracle \
|
|
@@ -272,55 +283,55 @@ Browser automation can open or control Chrome, so dry-runs and live runs print a
|
|
|
272
283
|
|
|
273
284
|
## Flags you’ll actually use
|
|
274
285
|
|
|
275
|
-
| Flag
|
|
276
|
-
|
|
|
277
|
-
| `-p, --prompt <text>`
|
|
278
|
-
| `-f, --file <paths...>`
|
|
279
|
-
| `-e, --engine <api\|browser>`
|
|
280
|
-
| `-m, --model <name>`
|
|
281
|
-
| `--models <list>`
|
|
282
|
-
| `--followup <sessionId\|responseId>`
|
|
283
|
-
| `--followup-model <model>`
|
|
284
|
-
| `--base-url <url>`
|
|
285
|
-
| `--chatgpt-url <url>`
|
|
286
|
-
| `--browser-model-strategy <select\|current\|ignore>`
|
|
287
|
-
| `--browser-manual-login`
|
|
288
|
-
| `--browser-attach-running`
|
|
289
|
-
| `--browser-tab <ref>`
|
|
290
|
-
| `--browser-thinking-time <light\|standard\|extended\|heavy>`
|
|
291
|
-
| `--browser-research deep`
|
|
292
|
-
| `--browser-follow-up <prompt>`
|
|
293
|
-
| `--browser-archive <auto\|always\|never>`
|
|
294
|
-
| `--browser-attachments <auto\|never\|always>`
|
|
295
|
-
| `--browser-bundle-files`, `--browser-bundle-format <text\|zip>`
|
|
296
|
-
| `--browser-port <port>`
|
|
297
|
-
| `--browser-inline-cookies[(-file)] <payload \| path>`
|
|
298
|
-
| `--browser-timeout`, `--browser-input-timeout`
|
|
299
|
-
| `--browser-recheck-delay`, `--browser-recheck-timeout`
|
|
300
|
-
| `--heartbeat <seconds>`
|
|
301
|
-
| `--browser-reuse-wait`
|
|
302
|
-
| `--browser-profile-lock-timeout`
|
|
303
|
-
| `--browser-max-concurrent-tabs`
|
|
304
|
-
| `--render`, `--copy`
|
|
305
|
-
| `--wait`
|
|
306
|
-
| `--timeout <seconds\|duration\|auto>`
|
|
307
|
-
| `--background`, `--no-background`
|
|
308
|
-
| `--http-timeout <ms\|s\|m\|h>`
|
|
309
|
-
| `--zombie-timeout <ms\|s\|m\|h>`
|
|
310
|
-
| `--zombie-last-activity`
|
|
311
|
-
| `--write-output <path>`
|
|
312
|
-
| `--allow-partial`, `--partial <fail\|ok>`
|
|
313
|
-
| `--preflight`
|
|
314
|
-
| `--perf-trace`, `--perf-trace-path <path>`
|
|
315
|
-
| `--files-report`
|
|
316
|
-
| `--dry-run [summary\|json\|full]`
|
|
317
|
-
| `--remote-host`, `--remote-token`
|
|
318
|
-
| `--remote-chrome <host:port>`
|
|
319
|
-
| `--youtube <url>`
|
|
320
|
-
| `--generate-image <file>`
|
|
321
|
-
| `--edit-image <file>`
|
|
322
|
-
| `--provider openai\|azure\|auto`, `--no-azure`, `--route`
|
|
323
|
-
| `--azure-endpoint`, `--azure-deployment`, `--azure-api-version`
|
|
286
|
+
| Flag | Purpose |
|
|
287
|
+
| ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
288
|
+
| `-p, --prompt <text>` | Required prompt. |
|
|
289
|
+
| `-f, --file <paths...>` | Attach files/dirs (globs + `!` excludes). |
|
|
290
|
+
| `-e, --engine <api\|browser>` | Choose API or browser (browser is experimental). |
|
|
291
|
+
| `-m, --model <name>` | Built-ins (`gpt-5.5-pro` default, `gpt-5.5`, `gpt-5.4-pro`, `gpt-5.4`, `gpt-5.1-pro`, `gpt-5-pro`, `gpt-5.1`, `gpt-5.1-codex`, `gpt-5.2`, `gpt-5.2-instant`, `gpt-5.2-pro`, `gemini-3.1-pro` API + UI, `gemini-3-pro`, `claude-4.6-sonnet`, `claude-4.1-opus`) plus any OpenRouter id (e.g., `minimax/minimax-m2`, `openai/gpt-4o-mini`). |
|
|
292
|
+
| `--models <list>` | Comma-separated API models (mix built-ins and OpenRouter ids) for multi-model runs. |
|
|
293
|
+
| `--followup <sessionId\|responseId>` | Continue a saved ChatGPT browser conversation or an OpenAI/Azure Responses API run from a stored Oracle session or `resp_...` response id. |
|
|
294
|
+
| `--followup-model <model>` | For multi-model OpenAI/Azure parent sessions, choose which model response to continue from. |
|
|
295
|
+
| `--base-url <url>` | Point API runs at LiteLLM/Azure/OpenRouter/etc. |
|
|
296
|
+
| `--chatgpt-url <url>` | Target a ChatGPT workspace/folder or Temporary Chat URL (browser). |
|
|
297
|
+
| `--browser-model-strategy <select\|current\|ignore>` | Control ChatGPT model selection in browser mode (current keeps the active model; ignore skips the picker). |
|
|
298
|
+
| `--browser-manual-login` | Skip cookie copy; reuse a persistent automation profile and wait for manual ChatGPT login. |
|
|
299
|
+
| `--browser-attach-running` | Reuse your current local browser session through local `DevToolsActivePort` discovery; Oracle opens a dedicated tab instead of launching Chrome (defaults to `127.0.0.1:9222`, or combine with `--remote-chrome <host:port>` to hint a different local endpoint). |
|
|
300
|
+
| `--browser-tab <ref>` | Reuse an existing ChatGPT tab by `current`, target id, URL, or title substring instead of opening a new tab. |
|
|
301
|
+
| `--browser-thinking-time <light\|standard\|extended\|heavy>` | Set ChatGPT thinking-time intensity (browser; Thinking/Pro models only). |
|
|
302
|
+
| `--browser-research deep` | Activate ChatGPT Deep Research for broad web research and cited reports (browser only). |
|
|
303
|
+
| `--browser-follow-up <prompt>` | Browser-only multi-turn consult: submit an additional prompt in the same ChatGPT conversation after the initial answer. Repeat for challenge/revision/final-decision passes. Not supported with Deep Research mode. |
|
|
304
|
+
| `--browser-archive <auto\|always\|never>` | Archive completed ChatGPT browser conversations after local artifacts are saved. `auto` archives successful one-shot chats only, and skips project, Deep Research, multi-turn, failed, and incomplete sessions. |
|
|
305
|
+
| `--browser-attachments <auto\|never\|always>` | Control browser file delivery: `auto` pastes small text files inline and uploads larger bundles, `never` always pastes inline, and `always` uploads files as ChatGPT attachments. |
|
|
306
|
+
| `--browser-bundle-files`, `--browser-bundle-format <text\|zip>` | Bundle browser uploads into one attachment. `text` keeps the existing single Markdown-style text bundle; `zip` preserves individual file names inside one ZIP upload. |
|
|
307
|
+
| `--browser-port <port>` | Pin the Chrome DevTools port (WSL/Windows firewall helper). |
|
|
308
|
+
| `--browser-inline-cookies[(-file)] <payload \| path>` | Supply cookies without Chrome/Keychain (browser). |
|
|
309
|
+
| `--browser-timeout`, `--browser-input-timeout`, `--browser-attachment-timeout` | Control overall/browser input/attachment readiness timeouts (supports h/m/s/ms). |
|
|
310
|
+
| `--browser-recheck-delay`, `--browser-recheck-timeout` | Delayed recheck for long Pro runs: wait then retry capture after timeout (supports h/m/s/ms). |
|
|
311
|
+
| `--heartbeat <seconds>` | Emit API and browser progress heartbeats. Browser mode reports ChatGPT Thinking/Reasoning sidecar liveness metadata when available, without logging reasoning text. |
|
|
312
|
+
| `--browser-reuse-wait` | Wait for a shared Chrome profile before launching (parallel browser runs). |
|
|
313
|
+
| `--browser-profile-lock-timeout` | Wait for the shared manual-login profile lock before sending (serializes parallel runs). |
|
|
314
|
+
| `--browser-max-concurrent-tabs` | Soft limit for simultaneous ChatGPT tabs sharing one manual-login profile (default 3). |
|
|
315
|
+
| `--render`, `--copy` | Print and/or copy the assembled markdown bundle. |
|
|
316
|
+
| `--wait` | Block for background API runs (e.g., GPT‑5.1 Pro) instead of detaching. |
|
|
317
|
+
| `--timeout <seconds\|duration\|auto>` | Overall API deadline (auto = 60m for pro, 120s otherwise; durations like `10m` derive HTTP/stale-session timeouts unless overridden). |
|
|
318
|
+
| `--background`, `--no-background` | Force Responses API background mode (create + retrieve) for API runs. |
|
|
319
|
+
| `--http-timeout <ms\|s\|m\|h>` | Override the HTTP client timeout; if omitted, explicit `--timeout` values are reused for transport. |
|
|
320
|
+
| `--zombie-timeout <ms\|s\|m\|h>` | Override stale-session cutoff used by `oracle status`. |
|
|
321
|
+
| `--zombie-last-activity` | Use last log activity to detect stale sessions. |
|
|
322
|
+
| `--write-output <path>` | Save only the final answer (multi-model adds `.<model>` and writes `<stem>.oracle.json`). Browser sessions also save transcripts and generated artifacts under `~/.oracle/sessions/<id>/artifacts/`. |
|
|
323
|
+
| `--allow-partial`, `--partial <fail\|ok>` | Multi-model failure policy. Default `fail` exits 1 after printing a structured partial summary; `ok` exits 0 when at least one model succeeds. |
|
|
324
|
+
| `--preflight` | Check redacted provider readiness for requested API model(s), then exit without creating a session. |
|
|
325
|
+
| `--perf-trace`, `--perf-trace-path <path>` | Write startup/first-output timing trace JSON; also accepts `--perf-trace=/tmp/oracle.json`, `ORACLE_PERF_TRACE=1`, or `ORACLE_PERF_TRACE=/tmp/oracle.json`. |
|
|
326
|
+
| `--files-report` | Print per-file token usage. |
|
|
327
|
+
| `--dry-run [summary\|json\|full]` | Preview without sending. |
|
|
328
|
+
| `--remote-host`, `--remote-token` | Use a remote `oracle serve` host (browser). |
|
|
329
|
+
| `--remote-chrome <host:port>` | Attach to an existing remote Chrome session (browser), or when combined with `--browser-attach-running` use this host:port as the local attach hint. |
|
|
330
|
+
| `--youtube <url>` | YouTube video URL to analyze (Gemini browser mode). |
|
|
331
|
+
| `--generate-image <file>` | Generate image and save to file (Gemini browser mode; ChatGPT browser mode saves downloadable image artifacts when present). Extra ChatGPT images save as numbered siblings. |
|
|
332
|
+
| `--edit-image <file>` | Edit existing image with `--output` (Gemini browser mode). For ChatGPT browser mode, attach source images with `--file` and use `--generate-image` for the output path. |
|
|
333
|
+
| `--provider openai\|azure\|auto`, `--no-azure`, `--route` | Choose or inspect API provider routing; `openai` / `--no-azure` ignores Azure env/config for the run. |
|
|
334
|
+
| `--azure-endpoint`, `--azure-deployment`, `--azure-api-version` | Target Azure OpenAI endpoints (picks Azure client automatically). |
|
|
324
335
|
|
|
325
336
|
## Configuration
|
|
326
337
|
|
|
@@ -345,11 +356,11 @@ When several agents share one manual-login ChatGPT profile, Oracle coordinates b
|
|
|
345
356
|
|
|
346
357
|
Advanced flags
|
|
347
358
|
|
|
348
|
-
| Area | Flags
|
|
349
|
-
| ------------ |
|
|
350
|
-
| Browser | `--browser-manual-login`, `--browser-attach-running`, `--browser-thinking-time`, `--browser-research`, `--browser-follow-up`, `--browser-archive`, `--browser-timeout`, `--browser-input-timeout`, `--browser-recheck-delay`, `--browser-recheck-timeout`, `--browser-reuse-wait`, `--browser-profile-lock-timeout`, `--browser-max-concurrent-tabs`, `--browser-auto-reattach-delay`, `--browser-auto-reattach-interval`, `--browser-auto-reattach-timeout`, `--browser-cookie-wait`, `--browser-inline-cookies[(-file)]`, `--browser-attachments`, `--browser-inline-files`, `--browser-bundle-files`, `--browser-bundle-format`, `--browser-keep-browser`, `--browser-headless`, `--browser-hide-window`, `--browser-no-cookie-sync`, `--browser-allow-cookie-errors`, `--browser-chrome-path`, `--browser-cookie-path`, `--chatgpt-url` |
|
|
351
|
-
| Run control | `--background`, `--no-background`, `--http-timeout`, `--zombie-timeout`, `--zombie-last-activity`
|
|
352
|
-
| Azure/OpenAI | `--azure-endpoint`, `--azure-deployment`, `--azure-api-version`, `--base-url`
|
|
359
|
+
| Area | Flags |
|
|
360
|
+
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
361
|
+
| Browser | `--browser-manual-login`, `--browser-attach-running`, `--browser-thinking-time`, `--browser-research`, `--browser-follow-up`, `--browser-archive`, `--browser-timeout`, `--browser-input-timeout`, `--browser-attachment-timeout`, `--browser-recheck-delay`, `--browser-recheck-timeout`, `--browser-reuse-wait`, `--browser-profile-lock-timeout`, `--browser-max-concurrent-tabs`, `--browser-auto-reattach-delay`, `--browser-auto-reattach-interval`, `--browser-auto-reattach-timeout`, `--browser-cookie-wait`, `--browser-inline-cookies[(-file)]`, `--browser-attachments`, `--browser-inline-files`, `--browser-bundle-files`, `--browser-bundle-format`, `--browser-keep-browser`, `--browser-headless`, `--browser-hide-window`, `--browser-no-cookie-sync`, `--browser-allow-cookie-errors`, `--browser-chrome-path`, `--browser-cookie-path`, `--chatgpt-url` |
|
|
362
|
+
| Run control | `--background`, `--no-background`, `--http-timeout`, `--zombie-timeout`, `--zombie-last-activity` |
|
|
363
|
+
| Azure/OpenAI | `--azure-endpoint`, `--azure-deployment`, `--azure-api-version`, `--base-url` |
|
|
353
364
|
|
|
354
365
|
Remote browser example
|
|
355
366
|
|
package/dist/bin/oracle-cli.js
CHANGED
|
@@ -41,6 +41,7 @@ import { resolveConfiguredMaxFileSizeBytes } from "../src/cli/fileSize.js";
|
|
|
41
41
|
import { isAzureOpenAICandidateModel, validateProviderRouting, } from "../src/oracle/providerRouting.js";
|
|
42
42
|
import { buildSessionLifecycle, formatSessionLifecycleBlock } from "../src/cli/sessionLifecycle.js";
|
|
43
43
|
import { buildDetachedPerfTraceEnv, createPerfTrace, isTraceValueFlag, } from "../src/cli/perfTrace.js";
|
|
44
|
+
import { resolveBrowserFollowupReference } from "../src/cli/followup.js";
|
|
44
45
|
const VERSION = getCliVersion();
|
|
45
46
|
const CLI_ENTRYPOINT = fileURLToPath(import.meta.url);
|
|
46
47
|
const LEGACY_FLAG_ALIASES = new Map([
|
|
@@ -203,8 +204,8 @@ program
|
|
|
203
204
|
.argument("[prompt]", "Prompt text (shorthand for --prompt).")
|
|
204
205
|
.option("-p, --prompt <text>", "User prompt to send to the model.")
|
|
205
206
|
.addOption(new Option("--message <text>", "Alias for --prompt.").hideHelp())
|
|
206
|
-
.option("--followup <sessionId|responseId>", "Continue
|
|
207
|
-
.option("--followup-model <model>", "
|
|
207
|
+
.option("--followup <sessionId|responseId>", "Continue a stored ChatGPT browser conversation or an OpenAI/Azure Responses API run.")
|
|
208
|
+
.option("--followup-model <model>", "For multi-model API sessions, choose which model response to continue from.")
|
|
208
209
|
.option("-f, --file <paths...>", "Files/directories or glob patterns to attach (prefix with !pattern to exclude). Oversized files are rejected automatically (default cap: 1 MB; configurable via ORACLE_MAX_FILE_SIZE_BYTES or config.maxFileSizeBytes).", collectPaths, [])
|
|
209
210
|
.option("--max-file-size-bytes <bytes>", "Reject files larger than this many bytes.", parseIntOption)
|
|
210
211
|
.addOption(new Option("--include <paths...>", "Alias for --file.")
|
|
@@ -226,7 +227,7 @@ program
|
|
|
226
227
|
.addOption(new Option("--copy-markdown", "Copy the assembled markdown bundle to the clipboard; pair with --render to print it too.").default(false))
|
|
227
228
|
.addOption(new Option("--copy").hideHelp().default(false))
|
|
228
229
|
.option("-s, --slug <words>", "Custom session slug (3-5 words).")
|
|
229
|
-
.option("-m, --model <model>", 'Model to target (gpt-5.5-pro default). Also gpt-5.5, gpt-5.4-pro, gpt-5.4, gpt-5.1-pro, gpt-5-pro, gpt-5.1, gpt-5.1-codex API-only, gpt-5.2, gpt-5.2-instant, gpt-5.2-pro, gemini-3.1-
|
|
230
|
+
.option("-m, --model <model>", 'Model to target (gpt-5.5-pro default). Also gpt-5.5, gpt-5.4-pro, gpt-5.4, gpt-5.1-pro, gpt-5-pro, gpt-5.1, gpt-5.1-codex API-only, gpt-5.2, gpt-5.2-instant, gpt-5.2-pro, gemini-3.1-flash-lite, gemini-3.5-flash, gemini-3.1-pro, legacy gemini-3-pro, claude-4.6-sonnet, claude-4.1-opus, or ChatGPT labels like "5.5 Pro" / "5.2 Thinking" for browser runs).', normalizeModelOption)
|
|
230
231
|
.addOption(new Option("--models <models>", 'Comma-separated API model list to query in parallel (e.g., "gpt-5.5-pro,gemini-3-pro").')
|
|
231
232
|
.argParser(collectModelList)
|
|
232
233
|
.default([]))
|
|
@@ -304,6 +305,7 @@ program
|
|
|
304
305
|
.addOption(new Option("--browser-url <url>", `Alias for --chatgpt-url (default ${CHATGPT_URL}).`).hideHelp())
|
|
305
306
|
.addOption(new Option("--browser-timeout <ms|s|m>", "Maximum time to wait for an answer (default 1200s / 20m).").hideHelp())
|
|
306
307
|
.addOption(new Option("--browser-input-timeout <ms|s|m>", "Maximum time to wait for the prompt textarea (default 60s).").hideHelp())
|
|
308
|
+
.addOption(new Option("--browser-attachment-timeout <ms|s|m>", "Maximum time to wait for attachment upload/readiness before clicking send (default 45s).").hideHelp())
|
|
307
309
|
.addOption(new Option("--browser-recheck-delay <ms|s|m|h>", "After an assistant timeout, wait this long then revisit the conversation to retry capture.").hideHelp())
|
|
308
310
|
.addOption(new Option("--browser-recheck-timeout <ms|s|m|h>", "Time budget for the delayed recheck attempt (default 120s).").hideHelp())
|
|
309
311
|
.addOption(new Option("--browser-reuse-wait <ms|s|m|h>", "Wait for a shared Chrome profile to appear before launching a new one (helps parallel runs).").hideHelp())
|
|
@@ -552,6 +554,7 @@ program
|
|
|
552
554
|
.option("--live", "Tail the live browser tab for this session until it completes, stalls, or detaches.", false)
|
|
553
555
|
.option("--write-output <path>", "Write harvested browser output to this file (requires --harvest or --live).")
|
|
554
556
|
.option("--browser-tab <ref>", "Override the browser tab ref used for harvesting/live tail (current, target id, URL, or title substring).")
|
|
557
|
+
.option("--no-recover", "Do not relaunch Chrome to reopen the saved conversation URL when --harvest/--live finds no live tab.")
|
|
555
558
|
.addOption(new Option("--clean", "Deprecated alias for --clear.").default(false).hideHelp())
|
|
556
559
|
.action(async (sessionId, _options, cmd) => {
|
|
557
560
|
const { handleSessionCommand } = await import("../src/cli/sessionCommand.js");
|
|
@@ -656,6 +659,7 @@ function buildRunOptions(options, overrides = {}) {
|
|
|
656
659
|
model: options.model,
|
|
657
660
|
models: overrides.models ?? options.models,
|
|
658
661
|
previousResponseId: overrides.previousResponseId ?? options.previousResponseId,
|
|
662
|
+
browserResumeConversationUrl: overrides.browserResumeConversationUrl ?? options.browserResumeConversationUrl,
|
|
659
663
|
effectiveModelId: overrides.effectiveModelId ?? options.effectiveModelId ?? options.model,
|
|
660
664
|
file: overrides.file ?? options.file ?? [],
|
|
661
665
|
maxFileSizeBytes: overrides.maxFileSizeBytes ?? options.maxFileSizeBytes,
|
|
@@ -893,6 +897,7 @@ function buildRunOptionsFromMetadata(metadata) {
|
|
|
893
897
|
model: stored.model ?? DEFAULT_MODEL,
|
|
894
898
|
models: stored.models,
|
|
895
899
|
previousResponseId: stored.previousResponseId,
|
|
900
|
+
browserResumeConversationUrl: stored.browserResumeConversationUrl,
|
|
896
901
|
effectiveModelId: stored.effectiveModelId ?? stored.model,
|
|
897
902
|
file: stored.file ?? [],
|
|
898
903
|
maxFileSizeBytes: stored.maxFileSizeBytes,
|
|
@@ -1096,19 +1101,21 @@ async function runRootCommand(options) {
|
|
|
1096
1101
|
Boolean(options.azureEndpoint?.trim()) &&
|
|
1097
1102
|
engineModels.some((model) => isAzureOpenAICandidateModel(model));
|
|
1098
1103
|
const explicitApiProviderRequested = providerMode !== "auto" || hasExplicitAzureOption(optionUsesDefault);
|
|
1099
|
-
const
|
|
1104
|
+
const envEnginePreference = (process.env.ORACLE_ENGINE ?? "").trim().toLowerCase();
|
|
1105
|
+
const explicitApiEngineRequested = options.engine === "api" || (!options.engine && envEnginePreference === "api");
|
|
1106
|
+
const configBrowserEngineRequested = userConfig.engine === "browser" && !explicitApiEngineRequested && !explicitApiProviderRequested;
|
|
1100
1107
|
let engine = resolveEngine({
|
|
1101
|
-
engine:
|
|
1108
|
+
engine: options.engine,
|
|
1109
|
+
configEngine: userConfig.engine,
|
|
1102
1110
|
browserFlag: options.browser,
|
|
1103
1111
|
apiProviderRequested: explicitApiProviderRequested,
|
|
1104
1112
|
env: process.env,
|
|
1105
1113
|
});
|
|
1106
|
-
const envEnginePreference = (process.env.ORACLE_ENGINE ?? "").trim().toLowerCase();
|
|
1107
1114
|
const browserEngineRequested = options.browser ||
|
|
1108
1115
|
options.engine === "browser" ||
|
|
1109
1116
|
Boolean(remoteHost) ||
|
|
1110
|
-
|
|
1111
|
-
|
|
1117
|
+
configBrowserEngineRequested ||
|
|
1118
|
+
(!options.engine && !explicitApiProviderRequested && envEnginePreference === "browser");
|
|
1112
1119
|
if (azureAutoApiRequested && engine === "browser" && !browserEngineRequested) {
|
|
1113
1120
|
engine = "api";
|
|
1114
1121
|
}
|
|
@@ -1164,18 +1171,6 @@ async function runRootCommand(options) {
|
|
|
1164
1171
|
throw new Error("--remote-host does not support --models yet. Use API engine locally instead.");
|
|
1165
1172
|
}
|
|
1166
1173
|
const resolvedModel = normalizedMultiModels[0] ?? (isGemini ? resolveApiModel(cliModelArg) : resolvedModelCandidate);
|
|
1167
|
-
const includesGeminiApiOnly = (normalizedMultiModels.length > 0 ? normalizedMultiModels : [resolvedModel]).some((model) => model === "gemini-3.1-pro");
|
|
1168
|
-
if ((userForcedBrowser || userConfig.engine === "browser") && includesGeminiApiOnly) {
|
|
1169
|
-
throw new Error("gemini-3.1-pro is API-only today. Use --engine api or switch to gemini-3-pro for Gemini web.");
|
|
1170
|
-
}
|
|
1171
|
-
if (engine === "browser" && includesGeminiApiOnly) {
|
|
1172
|
-
console.log(chalk.dim("gemini-3.1-pro is API-only today; switching to API."));
|
|
1173
|
-
engine = "api";
|
|
1174
|
-
}
|
|
1175
|
-
const browserFollowUpCount = options.browserFollowUp?.filter((entry) => entry.trim().length > 0).length ?? 0;
|
|
1176
|
-
if (engine !== "browser" && browserFollowUpCount > 0) {
|
|
1177
|
-
throw new Error("--browser-follow-up requires --engine browser.");
|
|
1178
|
-
}
|
|
1179
1174
|
const effectiveModelId = resolvedModel.startsWith("gemini")
|
|
1180
1175
|
? resolveGeminiModelId(resolvedModel)
|
|
1181
1176
|
: isKnownModel(resolvedModel)
|
|
@@ -1193,18 +1188,6 @@ async function runRootCommand(options) {
|
|
|
1193
1188
|
resolvedOptions.effectiveModelId = effectiveModelId;
|
|
1194
1189
|
resolvedOptions.provider = providerMode;
|
|
1195
1190
|
resolvedOptions.writeOutputPath = resolveOutputPath(options.writeOutput, process.cwd());
|
|
1196
|
-
// Decide whether to block until completion:
|
|
1197
|
-
// - explicit --wait / --no-wait wins
|
|
1198
|
-
// - otherwise block for fast models (gpt-5.1, browser) and detach by default for pro API runs
|
|
1199
|
-
let waitPreference = resolveWaitFlag({
|
|
1200
|
-
waitFlag: options.wait,
|
|
1201
|
-
model: resolvedModel,
|
|
1202
|
-
engine,
|
|
1203
|
-
});
|
|
1204
|
-
if (remoteHost && waitPreference === false) {
|
|
1205
|
-
console.log(chalk.dim("Remote browser runs require --wait; ignoring --no-wait."));
|
|
1206
|
-
waitPreference = true;
|
|
1207
|
-
}
|
|
1208
1191
|
if (options.status) {
|
|
1209
1192
|
const { attachSession, showStatus } = await import("../src/cli/sessionDisplay.js");
|
|
1210
1193
|
if (options.session) {
|
|
@@ -1271,16 +1254,59 @@ async function runRootCommand(options) {
|
|
|
1271
1254
|
const getSource = (key) => program.getOptionValueSource?.(key) ?? undefined;
|
|
1272
1255
|
const { applyBrowserDefaultsFromConfig } = await import("../src/cli/browserDefaults.js");
|
|
1273
1256
|
applyBrowserDefaultsFromConfig(options, userConfig, getSource);
|
|
1257
|
+
const attachmentTimeoutEnv = process.env.ORACLE_BROWSER_ATTACHMENT_TIMEOUT?.trim();
|
|
1258
|
+
if (attachmentTimeoutEnv &&
|
|
1259
|
+
(getSource("browserAttachmentTimeout") === undefined ||
|
|
1260
|
+
getSource("browserAttachmentTimeout") === "default")) {
|
|
1261
|
+
options.browserAttachmentTimeout = attachmentTimeoutEnv;
|
|
1262
|
+
}
|
|
1263
|
+
let browserFollowup = null;
|
|
1264
|
+
if (options.followup) {
|
|
1265
|
+
if (normalizedMultiModels.length > 0) {
|
|
1266
|
+
throw new Error("--followup cannot be combined with --models.");
|
|
1267
|
+
}
|
|
1268
|
+
browserFollowup = await resolveBrowserFollowupReference(options.followup, sessionStore);
|
|
1269
|
+
if (browserFollowup) {
|
|
1270
|
+
engine = "browser";
|
|
1271
|
+
resolvedOptions.model = browserFollowup.model;
|
|
1272
|
+
resolvedOptions.effectiveModelId = browserFollowup.model;
|
|
1273
|
+
resolvedOptions.followupSessionId = browserFollowup.sessionId;
|
|
1274
|
+
resolvedOptions.browserResumeConversationUrl = browserFollowup.resumeConversationUrl;
|
|
1275
|
+
}
|
|
1276
|
+
else {
|
|
1277
|
+
assertFollowupSupported({
|
|
1278
|
+
engine,
|
|
1279
|
+
model: resolvedModel,
|
|
1280
|
+
baseUrl: resolvedBaseUrl,
|
|
1281
|
+
azureEndpoint: resolvedOptions.azure?.endpoint,
|
|
1282
|
+
});
|
|
1283
|
+
const followup = await resolveFollowupReference(options.followup, options.followupModel);
|
|
1284
|
+
resolvedOptions.previousResponseId = followup.responseId;
|
|
1285
|
+
resolvedOptions.followupSessionId = followup.sessionId;
|
|
1286
|
+
resolvedOptions.followupModel = options.followupModel;
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
const activeModel = resolvedOptions.model;
|
|
1290
|
+
const browserFollowUpCount = options.browserFollowUp?.filter((entry) => entry.trim().length > 0).length ?? 0;
|
|
1291
|
+
if (engine !== "browser" && browserFollowUpCount > 0) {
|
|
1292
|
+
throw new Error("--browser-follow-up requires --engine browser.");
|
|
1293
|
+
}
|
|
1274
1294
|
const sessionMode = engine === "browser" ? "browser" : "api";
|
|
1275
1295
|
const browserConfig = await (async () => {
|
|
1276
1296
|
if (sessionMode !== "browser")
|
|
1277
1297
|
return undefined;
|
|
1298
|
+
if (browserFollowup) {
|
|
1299
|
+
return browserFollowup.browserConfig;
|
|
1300
|
+
}
|
|
1278
1301
|
const { buildBrowserConfig, resolveBrowserModelLabel } = await import("../src/cli/browserConfig.js");
|
|
1279
|
-
|
|
1302
|
+
const config = await buildBrowserConfig({
|
|
1280
1303
|
...options,
|
|
1281
|
-
model:
|
|
1282
|
-
browserModelLabel: resolveBrowserModelLabel(cliModelArg,
|
|
1304
|
+
model: activeModel,
|
|
1305
|
+
browserModelLabel: resolveBrowserModelLabel(cliModelArg, activeModel),
|
|
1283
1306
|
});
|
|
1307
|
+
return resolvedOptions.browserResumeConversationUrl
|
|
1308
|
+
? { ...config, resumeConversationUrl: resolvedOptions.browserResumeConversationUrl }
|
|
1309
|
+
: config;
|
|
1284
1310
|
})();
|
|
1285
1311
|
if (previewMode) {
|
|
1286
1312
|
if (!options.prompt) {
|
|
@@ -1290,21 +1316,6 @@ async function runRootCommand(options) {
|
|
|
1290
1316
|
options.prompt = `${options.prompt.trim()}\n${userConfig.promptSuffix}`;
|
|
1291
1317
|
}
|
|
1292
1318
|
resolvedOptions.prompt = options.prompt;
|
|
1293
|
-
if (options.followup) {
|
|
1294
|
-
assertFollowupSupported({
|
|
1295
|
-
engine,
|
|
1296
|
-
model: resolvedModel,
|
|
1297
|
-
baseUrl: resolvedBaseUrl,
|
|
1298
|
-
azureEndpoint: resolvedOptions.azure?.endpoint,
|
|
1299
|
-
});
|
|
1300
|
-
if (normalizedMultiModels.length > 0) {
|
|
1301
|
-
throw new Error("--followup cannot be combined with --models.");
|
|
1302
|
-
}
|
|
1303
|
-
const followup = await resolveFollowupReference(options.followup, options.followupModel);
|
|
1304
|
-
resolvedOptions.previousResponseId = followup.responseId;
|
|
1305
|
-
resolvedOptions.followupSessionId = followup.sessionId;
|
|
1306
|
-
resolvedOptions.followupModel = options.followupModel;
|
|
1307
|
-
}
|
|
1308
1319
|
const runOptions = buildRunOptions(resolvedOptions, {
|
|
1309
1320
|
preview: true,
|
|
1310
1321
|
previewMode,
|
|
@@ -1351,21 +1362,6 @@ async function runRootCommand(options) {
|
|
|
1351
1362
|
options.prompt = `${options.prompt.trim()}\n${userConfig.promptSuffix}`;
|
|
1352
1363
|
}
|
|
1353
1364
|
resolvedOptions.prompt = options.prompt;
|
|
1354
|
-
if (options.followup) {
|
|
1355
|
-
assertFollowupSupported({
|
|
1356
|
-
engine,
|
|
1357
|
-
model: resolvedModel,
|
|
1358
|
-
baseUrl: resolvedBaseUrl,
|
|
1359
|
-
azureEndpoint: resolvedOptions.azure?.endpoint,
|
|
1360
|
-
});
|
|
1361
|
-
if (normalizedMultiModels.length > 0) {
|
|
1362
|
-
throw new Error("--followup cannot be combined with --models.");
|
|
1363
|
-
}
|
|
1364
|
-
const followup = await resolveFollowupReference(options.followup, options.followupModel);
|
|
1365
|
-
resolvedOptions.previousResponseId = followup.responseId;
|
|
1366
|
-
resolvedOptions.followupSessionId = followup.sessionId;
|
|
1367
|
-
resolvedOptions.followupModel = options.followupModel;
|
|
1368
|
-
}
|
|
1369
1365
|
const duplicateBlocked = await shouldBlockDuplicatePrompt({
|
|
1370
1366
|
prompt: resolvedOptions.prompt,
|
|
1371
1367
|
browserFollowUps: resolvedOptions.browserFollowUp,
|
|
@@ -1404,7 +1400,7 @@ async function runRootCommand(options) {
|
|
|
1404
1400
|
};
|
|
1405
1401
|
console.log(chalk.dim(`Routing browser automation to remote host ${remoteHost}`));
|
|
1406
1402
|
}
|
|
1407
|
-
else if (browserConfig &&
|
|
1403
|
+
else if (browserConfig && activeModel.startsWith("gemini")) {
|
|
1408
1404
|
const { createGeminiWebExecutor } = await import("../src/gemini-web/index.js");
|
|
1409
1405
|
browserDeps = {
|
|
1410
1406
|
executeBrowser: createGeminiWebExecutor({
|
|
@@ -1439,6 +1435,18 @@ async function runRootCommand(options) {
|
|
|
1439
1435
|
}, {});
|
|
1440
1436
|
return;
|
|
1441
1437
|
}
|
|
1438
|
+
// Decide whether to block until completion:
|
|
1439
|
+
// - explicit --wait / --no-wait wins
|
|
1440
|
+
// - otherwise block for fast models (gpt-5.1, browser) and detach by default for pro API runs
|
|
1441
|
+
let waitPreference = resolveWaitFlag({
|
|
1442
|
+
waitFlag: options.wait,
|
|
1443
|
+
model: activeModel,
|
|
1444
|
+
engine,
|
|
1445
|
+
});
|
|
1446
|
+
if (remoteHost && waitPreference === false) {
|
|
1447
|
+
console.log(chalk.dim("Remote browser runs require --wait; ignoring --no-wait."));
|
|
1448
|
+
waitPreference = true;
|
|
1449
|
+
}
|
|
1442
1450
|
await sessionStore.ensureStorage();
|
|
1443
1451
|
const baseRunOptions = buildRunOptions(resolvedOptions, {
|
|
1444
1452
|
preview: false,
|
|
@@ -1460,6 +1468,7 @@ async function runRootCommand(options) {
|
|
|
1460
1468
|
browserConfig,
|
|
1461
1469
|
followupSessionId: resolvedOptions.followupSessionId,
|
|
1462
1470
|
followupModel: resolvedOptions.followupModel,
|
|
1471
|
+
browserResumeConversationUrl: resolvedOptions.browserResumeConversationUrl,
|
|
1463
1472
|
waitPreference,
|
|
1464
1473
|
youtube: options.youtube,
|
|
1465
1474
|
generateImage: options.generateImage,
|
|
@@ -1471,14 +1480,14 @@ async function runRootCommand(options) {
|
|
|
1471
1480
|
const liveRunOptions = {
|
|
1472
1481
|
...baseRunOptions,
|
|
1473
1482
|
sessionId: sessionMeta.id,
|
|
1474
|
-
effectiveModelId,
|
|
1483
|
+
effectiveModelId: resolvedOptions.effectiveModelId ?? effectiveModelId,
|
|
1475
1484
|
};
|
|
1476
1485
|
const disableDetachEnv = process.env.ORACLE_NO_DETACH === "1";
|
|
1477
1486
|
const detachAllowed = remoteExecutionActive
|
|
1478
1487
|
? false
|
|
1479
1488
|
: shouldDetachSession({
|
|
1480
1489
|
engine,
|
|
1481
|
-
model:
|
|
1490
|
+
model: activeModel,
|
|
1482
1491
|
waitPreference,
|
|
1483
1492
|
disableDetachEnv,
|
|
1484
1493
|
});
|
package/dist/bin/oracle-mcp.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
askoracle.sh
|