@steipete/oracle 0.19.0 → 0.20.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/dist/bin/oracle-cli.js +11 -13
- package/dist/src/browser/actions/deepResearch.js +168 -44
- package/dist/src/browser/actions/modelSelection.js +78 -1
- package/dist/src/browser/actions/promptComposer.js +3 -0
- package/dist/src/browser/actions/thinkingTime.js +38 -1
- package/dist/src/browser/actions/webSearch.js +96 -0
- package/dist/src/browser/chromeLifecycle.js +5 -4
- package/dist/src/browser/config.js +1 -1
- package/dist/src/browser/index.js +111 -43
- package/dist/src/browser/liveTabs.js +3 -4
- package/dist/src/browser/providers/chatgptDomProvider.js +1 -0
- package/dist/src/browser/reattach.js +21 -1
- package/dist/src/browser/recoveryTarget.js +131 -0
- package/dist/src/browser/sessionRunner.js +3 -1
- package/dist/src/browser/tabLeaseRegistry.js +20 -0
- package/dist/src/browser/targetClaim.js +54 -0
- package/dist/src/cli/browserConfig.js +33 -3
- package/dist/src/cli/browserTabs.js +3 -0
- package/dist/src/cli/options.js +15 -0
- package/dist/src/cli/recoveredBrowserHarvest.js +50 -0
- package/dist/src/cli/runOptions.js +19 -4
- package/dist/src/cli/sessionDisplay.js +4 -5
- package/dist/src/cli/sessionRunner.js +4 -5
- package/dist/src/mcp/tools/consult.js +2 -2
- package/dist/src/mcp/types.js +1 -1
- package/dist/src/oracle/config.js +14 -0
- package/dist/src/oracle/geminiModels.js +1 -0
- package/dist/src/oracle/run.js +27 -4
- package/dist/src/remote/client.js +3 -0
- package/dist/src/remote/server.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 +3 -3
- package/vendor/oracle-notifier/OracleNotifier.app/Contents/CodeResources +0 -0
- package/vendor/oracle-notifier/OracleNotifier.app/Contents/MacOS/OracleNotifier +0 -0
package/dist/src/oracle/run.js
CHANGED
|
@@ -36,6 +36,15 @@ const DEFAULT_TIMEOUT_PRO_MS = 60 * 60 * 1000;
|
|
|
36
36
|
const GPT_5_6_API_MODELS = new Set(["gpt-5.6", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"]);
|
|
37
37
|
const REASONING_EFFORTS = new Set(["none", "low", "medium", "high", "xhigh", "max"]);
|
|
38
38
|
const REASONING_MODES = new Set(["standard", "pro"]);
|
|
39
|
+
// Astra has a narrower effort range than the GPT-5.6 API family. Keep this
|
|
40
|
+
// capability separate from GPT_5_6_API_MODELS so adding a model cannot
|
|
41
|
+
// accidentally inherit a family's exact option set.
|
|
42
|
+
const MODEL_REASONING_CAPABILITIES = new Map([
|
|
43
|
+
[
|
|
44
|
+
"gpt-6-astra",
|
|
45
|
+
{ efforts: new Set(["low", "medium", "high", "xhigh", "max"]), modes: REASONING_MODES },
|
|
46
|
+
],
|
|
47
|
+
]);
|
|
39
48
|
const defaultWait = (ms) => new Promise((resolve) => {
|
|
40
49
|
setTimeout(resolve, ms);
|
|
41
50
|
});
|
|
@@ -72,9 +81,13 @@ function runtimeKeySource({ route, providerMode, optionsApiKey, }) {
|
|
|
72
81
|
return "XAI_API_KEY";
|
|
73
82
|
return optionsApiKey ? "apiKey option" : route.keySource;
|
|
74
83
|
}
|
|
75
|
-
function validateReasoningOptions(options, route) {
|
|
84
|
+
function validateReasoningOptions(options, route, modelConfig) {
|
|
76
85
|
const { reasoningEffort, reasoningMode } = options;
|
|
77
|
-
|
|
86
|
+
const capabilities = GPT_5_6_API_MODELS.has(options.model)
|
|
87
|
+
? { efforts: REASONING_EFFORTS, modes: REASONING_MODES }
|
|
88
|
+
: MODEL_REASONING_CAPABILITIES.get(options.model);
|
|
89
|
+
const effectiveEffort = reasoningEffort ?? modelConfig?.reasoning?.effort;
|
|
90
|
+
if (!reasoningEffort && !reasoningMode && !effectiveEffort)
|
|
78
91
|
return;
|
|
79
92
|
if (reasoningEffort && !REASONING_EFFORTS.has(reasoningEffort)) {
|
|
80
93
|
throw new PromptValidationError(`Invalid reasoning effort "${reasoningEffort}". Expected none, low, medium, high, xhigh, or max.`, { model: options.model, reasoningEffort });
|
|
@@ -82,14 +95,20 @@ function validateReasoningOptions(options, route) {
|
|
|
82
95
|
if (reasoningMode && !REASONING_MODES.has(reasoningMode)) {
|
|
83
96
|
throw new PromptValidationError(`Invalid reasoning mode "${reasoningMode}". Expected standard or pro.`, { model: options.model, reasoningMode });
|
|
84
97
|
}
|
|
85
|
-
if (
|
|
98
|
+
if ((reasoningEffort || reasoningMode) && !capabilities) {
|
|
86
99
|
const option = reasoningMode
|
|
87
100
|
? `Reasoning mode "${reasoningMode}"`
|
|
88
101
|
: `Reasoning effort "${reasoningEffort}"`;
|
|
89
102
|
const guidance = reasoningMode
|
|
90
103
|
? `Use --model gpt-5.6-sol --reasoning-mode ${reasoningMode}.`
|
|
91
104
|
: `Use --model gpt-5.6-sol --reasoning-effort ${reasoningEffort}.`;
|
|
92
|
-
throw new PromptValidationError(`${option} is available only for GPT-5.6 API models. ${guidance}`, { model: options.model, reasoningEffort, reasoningMode });
|
|
105
|
+
throw new PromptValidationError(`${option} is available only for GPT-5.6 or GPT-6 Astra API models. ${guidance}`, { model: options.model, reasoningEffort, reasoningMode });
|
|
106
|
+
}
|
|
107
|
+
if (effectiveEffort && capabilities && !capabilities.efforts.has(effectiveEffort)) {
|
|
108
|
+
throw new PromptValidationError(`Reasoning effort "${effectiveEffort}" is not supported for ${options.model}. Expected low, medium, high, xhigh, or max.`, { model: options.model, reasoningEffort: effectiveEffort, reasoningMode });
|
|
109
|
+
}
|
|
110
|
+
if (reasoningMode && capabilities && !capabilities.modes.has(reasoningMode)) {
|
|
111
|
+
throw new PromptValidationError(`Reasoning mode "${reasoningMode}" is not supported for ${options.model}. Expected standard or pro.`, { model: options.model, reasoningEffort, reasoningMode });
|
|
93
112
|
}
|
|
94
113
|
if (reasoningMode &&
|
|
95
114
|
!route.isAzureOpenAI &&
|
|
@@ -166,6 +185,10 @@ export async function runOracle(options, deps = {}) {
|
|
|
166
185
|
openRouterApiKey: resolverOpenRouterApiKey,
|
|
167
186
|
modelOverrides: options.modelOverrides,
|
|
168
187
|
});
|
|
188
|
+
// Validate the resolved default as well as explicit flags. This catches a
|
|
189
|
+
// model override such as Astra + reasoning.effort=none, while allowing an
|
|
190
|
+
// explicit supported effort to replace an invalid bundled/overridden default.
|
|
191
|
+
validateReasoningOptions(options, route, modelConfig);
|
|
169
192
|
const isLongRunningModel = isProTierModel;
|
|
170
193
|
const supportsBackground = modelConfig.supportsBackground !== false;
|
|
171
194
|
const useBackground = supportsBackground ? (options.background ?? isLongRunningModel) : false;
|
|
@@ -13,6 +13,9 @@ import { BrowserRunCancelledError } from "../oracle/errors.js";
|
|
|
13
13
|
export function createRemoteBrowserExecutor({ host, token }) {
|
|
14
14
|
// Return a drop-in replacement for runBrowserMode so the browser session runner can stay unchanged.
|
|
15
15
|
return async function remoteBrowserExecutor(options) {
|
|
16
|
+
if (options.config?.researchMode === "search") {
|
|
17
|
+
throw new Error("Web Search is a local browser pilot; --remote-host does not negotiate this capability yet. Use local Chrome or --browser-attach-running.");
|
|
18
|
+
}
|
|
16
19
|
const callerSignal = options.signal;
|
|
17
20
|
if (callerSignal?.aborted)
|
|
18
21
|
throw new BrowserRunCancelledError("Browser run cancelled before the request was sent.");
|
|
@@ -814,6 +814,7 @@ function sanitizeResult(result, warnings = []) {
|
|
|
814
814
|
answerChars: result.answerChars,
|
|
815
815
|
modelSelection: result.modelSelection,
|
|
816
816
|
thinkingSelection: result.thinkingSelection,
|
|
817
|
+
researchPlan: result.researchPlan,
|
|
817
818
|
archive: result.archive,
|
|
818
819
|
tabUrl: result.tabUrl,
|
|
819
820
|
conversationId: result.conversationId,
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steipete/oracle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "CLI wrapper around OpenAI Responses API with GPT-5.6 Sol, GPT-5.6, GPT-5.5 Pro, GPT-5.5, GPT-5.4, GPT-5.2, GPT-5.1, and GPT-5.1 Codex high reasoning modes.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://askoracle.sh",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@google/genai": "^2.21.0",
|
|
62
62
|
"@google/generative-ai": "^0.24.1",
|
|
63
63
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
64
|
-
"@steipete/sweet-cookie": "^0.4.
|
|
64
|
+
"@steipete/sweet-cookie": "^0.4.3",
|
|
65
65
|
"chalk": "^6.0.0",
|
|
66
66
|
"chrome-launcher": "^1.2.1",
|
|
67
67
|
"chrome-remote-interface": "^0.34.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"qs": "^6.16.0",
|
|
80
80
|
"shiki": "^4.4.3",
|
|
81
81
|
"toasted-notifier": "^10.1.0",
|
|
82
|
-
"tokentally": "^0.1.
|
|
82
|
+
"tokentally": "^0.1.5",
|
|
83
83
|
"zod": "^4.5.4"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
Binary file
|
|
Binary file
|