open-agents-ai 0.103.73 → 0.103.74
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/index.js +33 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12394,6 +12394,7 @@ async function handleCmd(cmd) {
|
|
|
12394
12394
|
}
|
|
12395
12395
|
if (args.temperature !== undefined) riData.temperature = Number(args.temperature);
|
|
12396
12396
|
if (args.max_tokens) riData.max_tokens = Number(args.max_tokens);
|
|
12397
|
+
if (args.think !== undefined) riData.think = args.think === 'true' || args.think === true;
|
|
12397
12398
|
} else {
|
|
12398
12399
|
riData = { prompt: riPrompt };
|
|
12399
12400
|
}
|
|
@@ -12984,6 +12985,7 @@ async function handleCmd(cmd) {
|
|
|
12984
12985
|
}
|
|
12985
12986
|
if (parsedReq.temperature !== undefined) chatBody.temperature = parsedReq.temperature;
|
|
12986
12987
|
if (parsedReq.max_tokens) chatBody.max_tokens = parsedReq.max_tokens;
|
|
12988
|
+
if (parsedReq.think !== undefined) chatBody.think = parsedReq.think;
|
|
12987
12989
|
|
|
12988
12990
|
var chatHeaders = { 'Content-Type': 'application/json' };
|
|
12989
12991
|
if (isPassthrough && endpointAuth) chatHeaders['Authorization'] = 'Bearer ' + endpointAuth;
|
|
@@ -18637,6 +18639,7 @@ var init_agenticRunner = __esm({
|
|
|
18637
18639
|
deepContext: options?.deepContext ?? false,
|
|
18638
18640
|
dynamicContext: options?.dynamicContext ?? "",
|
|
18639
18641
|
streamEnabled: options?.streamEnabled ?? false,
|
|
18642
|
+
thinking: options?.thinking ?? true,
|
|
18640
18643
|
bruteForce: options?.bruteForce ?? true,
|
|
18641
18644
|
bruteForceMaxCycles: options?.bruteForceMaxCycles ?? 100,
|
|
18642
18645
|
modelTier: options?.modelTier ?? "large",
|
|
@@ -20953,10 +20956,12 @@ ${transcript}`
|
|
|
20953
20956
|
baseUrl;
|
|
20954
20957
|
model;
|
|
20955
20958
|
apiKey;
|
|
20956
|
-
|
|
20959
|
+
thinking;
|
|
20960
|
+
constructor(baseUrl, model, apiKey, thinking) {
|
|
20957
20961
|
this.baseUrl = normalizeBaseUrl(baseUrl);
|
|
20958
20962
|
this.model = model;
|
|
20959
20963
|
this.apiKey = apiKey ?? "";
|
|
20964
|
+
this.thinking = thinking ?? true;
|
|
20960
20965
|
}
|
|
20961
20966
|
/** Build auth headers — all providers use standard Bearer token auth. */
|
|
20962
20967
|
authHeaders() {
|
|
@@ -20973,7 +20978,7 @@ ${transcript}`
|
|
|
20973
20978
|
tools: request.tools,
|
|
20974
20979
|
temperature: request.temperature,
|
|
20975
20980
|
max_tokens: request.maxTokens,
|
|
20976
|
-
think:
|
|
20981
|
+
think: this.thinking
|
|
20977
20982
|
};
|
|
20978
20983
|
const resp = await fetch(`${this.baseUrl}/v1/chat/completions`, {
|
|
20979
20984
|
method: "POST",
|
|
@@ -21023,7 +21028,7 @@ ${transcript}`
|
|
|
21023
21028
|
}
|
|
21024
21029
|
/**
|
|
21025
21030
|
* SSE streaming variant — yields StreamChunks as tokens arrive.
|
|
21026
|
-
* Uses `stream: true` and
|
|
21031
|
+
* Uses `stream: true` and the current thinking setting.
|
|
21027
21032
|
* The existing chatCompletion() method is completely unmodified.
|
|
21028
21033
|
*/
|
|
21029
21034
|
async *chatCompletionStream(request) {
|
|
@@ -21035,7 +21040,7 @@ ${transcript}`
|
|
|
21035
21040
|
max_tokens: request.maxTokens,
|
|
21036
21041
|
stream: true,
|
|
21037
21042
|
stream_options: { include_usage: true },
|
|
21038
|
-
think:
|
|
21043
|
+
think: this.thinking
|
|
21039
21044
|
};
|
|
21040
21045
|
const resp = await fetch(`${this.baseUrl}/v1/chat/completions`, {
|
|
21041
21046
|
method: "POST",
|
|
@@ -21121,11 +21126,13 @@ var init_nexusBackend = __esm({
|
|
|
21121
21126
|
authKey;
|
|
21122
21127
|
consecutiveFailures = 0;
|
|
21123
21128
|
static MAX_CONSECUTIVE_FAILURES = 3;
|
|
21124
|
-
|
|
21129
|
+
thinking;
|
|
21130
|
+
constructor(sendFn, model, targetPeer, authKey, thinking) {
|
|
21125
21131
|
this.sendFn = sendFn;
|
|
21126
21132
|
this.model = model;
|
|
21127
21133
|
this.targetPeer = targetPeer || "";
|
|
21128
21134
|
this.authKey = authKey || "";
|
|
21135
|
+
this.thinking = thinking ?? true;
|
|
21129
21136
|
}
|
|
21130
21137
|
async chatCompletion(request) {
|
|
21131
21138
|
if (this.consecutiveFailures >= _NexusAgenticBackend.MAX_CONSECUTIVE_FAILURES) {
|
|
@@ -21146,6 +21153,7 @@ var init_nexusBackend = __esm({
|
|
|
21146
21153
|
if (this.authKey) {
|
|
21147
21154
|
daemonArgs.auth_key = this.authKey;
|
|
21148
21155
|
}
|
|
21156
|
+
daemonArgs.think = String(this.thinking);
|
|
21149
21157
|
let rawResult;
|
|
21150
21158
|
try {
|
|
21151
21159
|
rawResult = await this.sendFn("remote_infer", daemonArgs, request.timeoutMs || 12e4);
|
|
@@ -26944,6 +26952,7 @@ function renderSlashHelp() {
|
|
|
26944
26952
|
["/voice clone <file>", "Set voice clone reference audio (wav/mp3/ogg/flac)"],
|
|
26945
26953
|
["/voice clone glados", "Generate clone ref from GLaDOS for LuxTTS"],
|
|
26946
26954
|
["/voice clone overwatch", "Generate clone ref from Overwatch for LuxTTS"],
|
|
26955
|
+
["/think", "Toggle thinking/reasoning mode (Qwen3, DeepSeek-R1, etc.)"],
|
|
26947
26956
|
["/stream", "Toggle real-time token streaming (pastel syntax highlighting)"],
|
|
26948
26957
|
["/dream", "Start dream mode \u2014 creative idle exploration (writes to .oa/dreams/)"],
|
|
26949
26958
|
["/dream deep", "Deep dream \u2014 multi-cycle exploration with sleep architecture"],
|
|
@@ -34148,6 +34157,13 @@ async function handleSlashCommand(input, ctx) {
|
|
|
34148
34157
|
renderInfo(`Token streaming: ${isOn ? "on" : "off"}${hasLocal ? " (project-local)" : ""}` + (isOn ? " \u2014 thinking tokens in grey italics, responses with pastel syntax highlighting" : ""));
|
|
34149
34158
|
return "handled";
|
|
34150
34159
|
}
|
|
34160
|
+
case "think": {
|
|
34161
|
+
const isOn = ctx.thinkToggle();
|
|
34162
|
+
const save = hasLocal ? ctx.saveLocalSettings.bind(ctx) : ctx.saveSettings.bind(ctx);
|
|
34163
|
+
save({ thinking: isOn });
|
|
34164
|
+
renderInfo(`Thinking mode: ${isOn ? "on" : "off"}${hasLocal ? " (project-local)" : ""}` + (isOn ? " \u2014 models that support reasoning (Qwen3, DeepSeek-R1, etc.) will show their thinking chain" : " \u2014 reasoning chain suppressed, model responds directly"));
|
|
34165
|
+
return "handled";
|
|
34166
|
+
}
|
|
34151
34167
|
case "tools": {
|
|
34152
34168
|
const tools = listCustomToolFiles(ctx.repoRoot);
|
|
34153
34169
|
if (tools.length === 0) {
|
|
@@ -46637,7 +46653,7 @@ function formatDMNToolArgs(toolName, args) {
|
|
|
46637
46653
|
return "";
|
|
46638
46654
|
}
|
|
46639
46655
|
}
|
|
46640
|
-
function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce, statusBar, sudoCallback, costTracker, onComplete, taskType, contextWindowSize, modelCaps, personality, deepContext, onCompaction, emotionEngine, flowEnabled, slashCommandHandler) {
|
|
46656
|
+
function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce, statusBar, sudoCallback, costTracker, onComplete, taskType, contextWindowSize, modelCaps, personality, deepContext, onCompaction, emotionEngine, flowEnabled, slashCommandHandler, thinkingEnabled) {
|
|
46641
46657
|
const voiceStyleMap = {
|
|
46642
46658
|
concise: 1,
|
|
46643
46659
|
balanced: 3,
|
|
@@ -46685,9 +46701,9 @@ function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce
|
|
|
46685
46701
|
return baseSendFn(cmd, args, timeout);
|
|
46686
46702
|
};
|
|
46687
46703
|
const targetPeer = config.backendUrl.startsWith("peer://") ? config.backendUrl.slice(7) : void 0;
|
|
46688
|
-
backend = new NexusAgenticBackend(sendFn, config.model, targetPeer, config.apiKey);
|
|
46704
|
+
backend = new NexusAgenticBackend(sendFn, config.model, targetPeer, config.apiKey, thinkingEnabled);
|
|
46689
46705
|
} else {
|
|
46690
|
-
backend = new OllamaAgenticBackend(config.backendUrl, config.model, config.apiKey);
|
|
46706
|
+
backend = new OllamaAgenticBackend(config.backendUrl, config.model, config.apiKey, thinkingEnabled);
|
|
46691
46707
|
}
|
|
46692
46708
|
try {
|
|
46693
46709
|
const endpointHistory = loadUsageHistory("endpoint", repoRoot);
|
|
@@ -46753,6 +46769,7 @@ function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce
|
|
|
46753
46769
|
dynamicContext,
|
|
46754
46770
|
modelTier,
|
|
46755
46771
|
streamEnabled: stream?.enabled ?? false,
|
|
46772
|
+
thinking: thinkingEnabled,
|
|
46756
46773
|
bruteForce: bruteForce ?? true,
|
|
46757
46774
|
bruteForceMaxCycles: 100,
|
|
46758
46775
|
// effectively unlimited — no hard timeout, agent runs until complete or aborted
|
|
@@ -46867,6 +46884,7 @@ ${entry.fullContent}`
|
|
|
46867
46884
|
"update",
|
|
46868
46885
|
"upgrade",
|
|
46869
46886
|
"parallel",
|
|
46887
|
+
"think",
|
|
46870
46888
|
"telegram",
|
|
46871
46889
|
"tg",
|
|
46872
46890
|
"call",
|
|
@@ -47215,6 +47233,7 @@ async function startInteractive(config, repoPath) {
|
|
|
47215
47233
|
if (savedSettings.dbPath)
|
|
47216
47234
|
config = { ...config, dbPath: savedSettings.dbPath };
|
|
47217
47235
|
let streamEnabled = savedSettings.stream ?? false;
|
|
47236
|
+
let thinkingEnabled = savedSettings.thinking !== false;
|
|
47218
47237
|
let bruteForceEnabled = savedSettings.bruteforce ?? true;
|
|
47219
47238
|
let currentStyle = PRESET_NAMES.includes(savedSettings.style) ? savedSettings.style : "balanced";
|
|
47220
47239
|
let deepContextEnabled = savedSettings.deepContext ?? false;
|
|
@@ -47896,6 +47915,10 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
47896
47915
|
streamEnabled = !streamEnabled;
|
|
47897
47916
|
return streamEnabled;
|
|
47898
47917
|
},
|
|
47918
|
+
thinkToggle() {
|
|
47919
|
+
thinkingEnabled = !thinkingEnabled;
|
|
47920
|
+
return thinkingEnabled;
|
|
47921
|
+
},
|
|
47899
47922
|
bruteForceToggle() {
|
|
47900
47923
|
bruteForceEnabled = !bruteForceEnabled;
|
|
47901
47924
|
return bruteForceEnabled;
|
|
@@ -49049,7 +49072,7 @@ Execute this skill now. Follow the behavioral guidance above.`;
|
|
|
49049
49072
|
}, bruteForceEnabled, statusBar, handleSudoRequest, costTracker, (summary, meta) => {
|
|
49050
49073
|
lastCompletedSummary = summary;
|
|
49051
49074
|
lastTaskMeta = meta ?? null;
|
|
49052
|
-
}, currentTaskType, resolvedContextWindowSize, resolvedCaps, currentStyle, deepContextEnabled, compactionSNRCallback(), emotionEngine, flowEnabled, buildSlashCommandHandler());
|
|
49075
|
+
}, currentTaskType, resolvedContextWindowSize, resolvedCaps, currentStyle, deepContextEnabled, compactionSNRCallback(), emotionEngine, flowEnabled, buildSlashCommandHandler(), thinkingEnabled);
|
|
49053
49076
|
activeTask = task;
|
|
49054
49077
|
showPrompt();
|
|
49055
49078
|
await task.promise;
|
|
@@ -49281,7 +49304,7 @@ NEW TASK: ${fullInput}`;
|
|
|
49281
49304
|
}, bruteForceEnabled, statusBar, handleSudoRequest, costTracker, (summary, meta) => {
|
|
49282
49305
|
lastCompletedSummary = summary;
|
|
49283
49306
|
lastTaskMeta = meta ?? null;
|
|
49284
|
-
}, currentTaskType, resolvedContextWindowSize, resolvedCaps, currentStyle, deepContextEnabled, compactionSNRCallback(), emotionEngine, flowEnabled, buildSlashCommandHandler());
|
|
49307
|
+
}, currentTaskType, resolvedContextWindowSize, resolvedCaps, currentStyle, deepContextEnabled, compactionSNRCallback(), emotionEngine, flowEnabled, buildSlashCommandHandler(), thinkingEnabled);
|
|
49285
49308
|
activeTask = task;
|
|
49286
49309
|
showPrompt();
|
|
49287
49310
|
await task.promise;
|
package/package.json
CHANGED