openfox 2.0.121 → 2.0.123
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/CHANGELOG.md +23 -0
- package/dist/CHANGELOG.md +23 -0
- package/dist/{auto-config-YXNCBYEY.js → auto-config-4BFGLPCP.js} +86 -19
- package/dist/{chat-handler-A5ORR5BB.js → chat-handler-UWZYFGRY.js} +29 -28
- package/dist/{chunk-DIALH34K.js → chunk-3B232XG4.js} +2 -2
- package/dist/{chunk-RMOKNQAS.js → chunk-3NMLSANH.js} +2 -2
- package/dist/{chunk-TR4DQZIG.js → chunk-4L7UMEHD.js} +70 -57
- package/dist/{chunk-EZ67GBEO.js → chunk-66MG44TF.js} +2 -2
- package/dist/{chunk-YBOU4ZFD.js → chunk-7YP4O4XE.js} +3 -3
- package/dist/{chunk-SLW3KKPP.js → chunk-AQBRI7TM.js} +21 -8
- package/dist/{chunk-OXANSWVZ.js → chunk-EHFIUXWZ.js} +2 -2
- package/dist/{chunk-KD7JTG42.js → chunk-FFEZJBQO.js} +278 -142
- package/dist/{chunk-Y7FGHKBW.js → chunk-GIJUWPRQ.js} +2 -2
- package/dist/{chunk-UJRWYZHM.js → chunk-H4JRR5KV.js} +59 -23
- package/dist/{chunk-5A4YN6I7.js → chunk-INOO465O.js} +5 -5
- package/dist/{chunk-6A2VIV36.js → chunk-JEZN37KV.js} +3 -3
- package/dist/{chunk-2N7KFNMY.js → chunk-KBESUA3W.js} +3 -3
- package/dist/chunk-LXCDR3H5.js +7 -0
- package/dist/{chunk-FGVMRFDW.js → chunk-N2Q3KYWM.js} +2 -2
- package/dist/{chunk-NYQKSKDB.js → chunk-OYBUJIC3.js} +9 -1
- package/dist/{chunk-5QTERLHH.js → chunk-PZUKG3OZ.js} +6 -6
- package/dist/{chunk-I22B6KWV.js → chunk-RV5G7QQU.js} +3 -3
- package/dist/{chunk-O63CDVNI.js → chunk-SS6KV6DI.js} +8 -7
- package/dist/{chunk-J77SLE3M.js → chunk-SYTEO5LA.js} +3 -2
- package/dist/chunk-TPDBUOPN.js +82 -0
- package/dist/{chunk-VUANU5A5.js → chunk-V2UJP5CX.js} +22 -18
- package/dist/{chunk-POTCPZJF.js → chunk-VPRB5FNR.js} +2 -2
- package/dist/{chunk-YDDBPKVP.js → chunk-W4SM4FFZ.js} +15 -15
- package/dist/{chunk-ZELEYSTY.js → chunk-YGOF4QDW.js} +50 -37
- package/dist/{chunk-J3IJJ55E.js → chunk-YJD5A375.js} +7 -7
- package/dist/{chunk-F2IM5J4I.js → chunk-YU5QPXSU.js} +4 -4
- package/dist/{chunk-LSEHJ2WI.js → chunk-ZIL6VKLU.js} +3 -3
- package/dist/{chunk-LWXLNE6M.js → chunk-ZIYETXOW.js} +2 -2
- package/dist/{chunk-W3WZ54KP.js → chunk-ZKMZI4ZG.js} +15 -15
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-JKPDMJ7S.js → client-XHJHOFMU.js} +5 -5
- package/dist/{compactor-MKD3CAFM.js → compactor-VTATJTPN.js} +12 -12
- package/dist/{dynamic-context-KPZECHZH.js → dynamic-context-5TPG2AJL.js} +9 -9
- package/dist/{events-6P4TDTSD.js → events-GMHRX4LF.js} +8 -8
- package/dist/{folding-3LA2WX2B.js → folding-7K2GRPF4.js} +6 -6
- package/dist/http-client-N4ASJEKJ.js +11 -0
- package/dist/{inspect-proxy-IDLUAQH5.js → inspect-proxy-UKPU3Z64.js} +4 -4
- package/dist/launch-5PJLLVXV.js +53 -0
- package/dist/{manager-NFKTUR64.js → manager-NOKJQTTF.js} +5 -5
- package/dist/model-catalog-T2GQFJI4.js +14 -0
- package/dist/{orchestrator-SM3IHZFP.js → orchestrator-2Q3R5KKR.js} +31 -30
- package/dist/package.json +1 -1
- package/dist/{path-security-JUF56IB6.js → path-security-NRO37OAP.js} +10 -10
- package/dist/{platform-FM57ZJHA.js → platform-EMKWQTZX.js} +4 -4
- package/dist/{processor-EUJRA5GW.js → processor-N2XW2KJV.js} +39 -35
- package/dist/{project-creator-J4ITWDZI.js → project-creator-JF3YVQAH.js} +3 -3
- package/dist/{projects-FHRTSV6N.js → projects-TPSLCJP2.js} +3 -3
- package/dist/{protocol-BLin669D.d.ts → protocol-DCMH9Ufp.d.ts} +1 -1
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-TAFJCWVP.js → provider-EBL6Z7TV.js} +7 -6
- package/dist/{provider-manager-EDJN6ARI.js → provider-manager-MKF27CTA.js} +7 -6
- package/dist/{registry-37GL3DAP.js → registry-Z4GVYFTV.js} +5 -5
- package/dist/{serve-DEY45HQS.js → serve-TARX23JF.js} +34 -33
- package/dist/server/index.d.ts +27 -6
- package/dist/server/index.js +31 -30
- package/dist/server-FKVRW7RV.js +56 -0
- package/dist/{service-HX5NFX2D.js → service-SY6Y4BIM.js} +10 -9
- package/dist/{session-overrides-EOKSZO2X.js → session-overrides-4WAD3X5Q.js} +7 -7
- package/dist/{sessions-XFNU4DZ6.js → sessions-D7VRCHQY.js} +8 -6
- package/dist/{settings-SYYDPV43.js → settings-VOWWO4VG.js} +3 -3
- package/dist/shared/index.d.ts +3 -3
- package/dist/{tasks-A25JQ4TV.js → tasks-IDIKTBOR.js} +11 -10
- package/dist/{tools-YGJXEEBI.js → tools-YPVZ5QM2.js} +24 -23
- package/dist/{types-B5_9KtfJ.d.ts → types-Cr4EgGwK.d.ts} +1 -1
- package/dist/{types-DeQIEC1U.d.ts → types-PAKlAzp9.d.ts} +16 -0
- package/dist/{update-CE3XSZXE.js → update-VSSOHC47.js} +2 -2
- package/dist/web/assets/index-C10YdCOU.js +324 -0
- package/dist/web/assets/{index-D9sfxcRH.css → index-DFMllFkv.css} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/dist/{workspace-ZNZFEONU.js → workspace-J3JEGF6U.js} +4 -4
- package/package.json +1 -1
- package/dist/chunk-OBB3JYMK.js +0 -7
- package/dist/http-client-IKOARXI7.js +0 -11
- package/dist/launch-YWXQQWZN.js +0 -52
- package/dist/server-EIRLWSBZ.js +0 -55
- package/dist/web/assets/index-oiZlWLY7.js +0 -324
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getPlatformShell
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-66MG44TF.js";
|
|
4
4
|
|
|
5
5
|
// src/server/tools/tool-policy.ts
|
|
6
6
|
var ALWAYS_ALLOWED = /* @__PURE__ */ new Set(["step_done"]);
|
|
@@ -246,4 +246,4 @@ export {
|
|
|
246
246
|
buildAgentSmallReminder,
|
|
247
247
|
COMPACTION_PROMPT
|
|
248
248
|
};
|
|
249
|
-
//# sourceMappingURL=chunk-
|
|
249
|
+
//# sourceMappingURL=chunk-GIJUWPRQ.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-K2QKX4ZJ.js";
|
|
4
4
|
import {
|
|
5
5
|
createLLMClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SYTEO5LA.js";
|
|
7
7
|
import {
|
|
8
8
|
getModelProfile
|
|
9
9
|
} from "./chunk-GJL3QSMP.js";
|
|
@@ -18,13 +18,18 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
resolveAttachmentsInMessages
|
|
20
20
|
} from "./chunk-MIPQOHWS.js";
|
|
21
|
+
import {
|
|
22
|
+
getCatalogEntry,
|
|
23
|
+
resolveEffortForModel
|
|
24
|
+
} from "./chunk-TPDBUOPN.js";
|
|
21
25
|
import {
|
|
22
26
|
logger
|
|
23
27
|
} from "./chunk-K44MW7JJ.js";
|
|
24
28
|
|
|
25
29
|
// src/server/providers/adapters/transport-client.ts
|
|
26
|
-
function createTransportLLMClient(provider, modelId, transport) {
|
|
30
|
+
function createTransportLLMClient(provider, modelId, transport, reasoningEffort) {
|
|
27
31
|
let model = modelId;
|
|
32
|
+
const effort = reasoningEffort;
|
|
28
33
|
let backend = provider.backend;
|
|
29
34
|
const profileFor = (id) => {
|
|
30
35
|
const base = getModelProfile(id);
|
|
@@ -50,6 +55,26 @@ function createTransportLLMClient(provider, modelId, transport) {
|
|
|
50
55
|
...provider.credentialRef && { credentialRef: provider.credentialRef }
|
|
51
56
|
};
|
|
52
57
|
};
|
|
58
|
+
const resolveEffort = (request) => {
|
|
59
|
+
if (request.skipClientReasoningEffort) return void 0;
|
|
60
|
+
const configured = provider.models.find((item) => item.id === model);
|
|
61
|
+
const candidate = request.reasoningEffort ?? effort;
|
|
62
|
+
return resolveEffortForModel({
|
|
63
|
+
...configured?.reasoningEfforts?.length ? { reasoningEfforts: configured.reasoningEfforts } : {},
|
|
64
|
+
...candidate ? { candidate } : {},
|
|
65
|
+
...configured?.thinkingEnabled && configured.thinkingLevel ? { defaultEffort: configured.thinkingLevel } : {},
|
|
66
|
+
...configured?.reasoningEffortOverride ? { override: configured.reasoningEffortOverride } : {}
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
const resolveRequest = async (request) => {
|
|
70
|
+
const supportsVision = request.modelSettings?.supportsVision ?? profile.supportsVision ?? false;
|
|
71
|
+
const resolvedEffort = resolveEffort(request);
|
|
72
|
+
return {
|
|
73
|
+
...request,
|
|
74
|
+
messages: await resolveAttachmentsInMessages(request.messages, supportsVision),
|
|
75
|
+
...resolvedEffort ? { reasoningEffort: resolvedEffort } : {}
|
|
76
|
+
};
|
|
77
|
+
};
|
|
53
78
|
return {
|
|
54
79
|
getModel: () => model,
|
|
55
80
|
setModel(next) {
|
|
@@ -61,15 +86,10 @@ function createTransportLLMClient(provider, modelId, transport) {
|
|
|
61
86
|
setBackend(next) {
|
|
62
87
|
backend = next;
|
|
63
88
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const resolved = { ...request, messages: await resolveAttachmentsInMessages(request.messages, supportsVision) };
|
|
67
|
-
return transport.complete(resolved, context());
|
|
68
|
-
},
|
|
89
|
+
getReasoningEffort: () => resolveEffort({}),
|
|
90
|
+
complete: async (request) => transport.complete(await resolveRequest(request), context()),
|
|
69
91
|
stream: async function* (request) {
|
|
70
|
-
|
|
71
|
-
const resolved = { ...request, messages: await resolveAttachmentsInMessages(request.messages, supportsVision) };
|
|
72
|
-
yield* transport.stream(resolved, context());
|
|
92
|
+
yield* transport.stream(await resolveRequest(request), context());
|
|
73
93
|
}
|
|
74
94
|
};
|
|
75
95
|
}
|
|
@@ -212,6 +232,16 @@ function enrichWithProfileDefaults(model) {
|
|
|
212
232
|
defaultMaxTokens: profile.defaultMaxTokens
|
|
213
233
|
};
|
|
214
234
|
}
|
|
235
|
+
function enrichWithCatalogDefaults(model) {
|
|
236
|
+
const entry = getCatalogEntry(model.id);
|
|
237
|
+
if (!entry) return model;
|
|
238
|
+
return {
|
|
239
|
+
...model,
|
|
240
|
+
// Only fill a genuinely-unset list. An explicitly-empty list (user cleared
|
|
241
|
+
// all presets) is preserved so the model shows no chips.
|
|
242
|
+
...model.reasoningEfforts !== void 0 ? {} : { reasoningEfforts: entry.reasoningEfforts }
|
|
243
|
+
};
|
|
244
|
+
}
|
|
215
245
|
function mergeModelsWithUserOverrides(backendModels, userModels, preserveMissingUserModels = true) {
|
|
216
246
|
const normalizedUserIdMap = new Map(userModels.map((m) => [normalizeModelId(m.id), m]));
|
|
217
247
|
const updatedModels = backendModels.map((backendModel) => {
|
|
@@ -378,16 +408,19 @@ function createProviderManager(config, options = {}) {
|
|
|
378
408
|
for (const p of providers) {
|
|
379
409
|
providerStatus.set(p.id, "unknown");
|
|
380
410
|
}
|
|
381
|
-
function resolveModelThinkingConfig(provider, modelId) {
|
|
411
|
+
function resolveModelThinkingConfig(provider, modelId, explicitEffort) {
|
|
382
412
|
const modelConfig = provider.models.find((m) => m.id === modelId);
|
|
383
413
|
if (!modelConfig) return {};
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
414
|
+
const effort = resolveEffortForModel({
|
|
415
|
+
...modelConfig.reasoningEfforts?.length ? { reasoningEfforts: modelConfig.reasoningEfforts } : {},
|
|
416
|
+
...explicitEffort ? { candidate: explicitEffort } : {},
|
|
417
|
+
...modelConfig.thinkingEnabled && modelConfig.thinkingLevel ? { defaultEffort: modelConfig.thinkingLevel } : {},
|
|
418
|
+
...modelConfig.reasoningEffortOverride ? { override: modelConfig.reasoningEffortOverride } : {}
|
|
419
|
+
});
|
|
420
|
+
return effort ? { reasoningEffort: effort } : {};
|
|
388
421
|
}
|
|
389
|
-
function createConfigForProvider(provider, model) {
|
|
390
|
-
const modelThinking = resolveModelThinkingConfig(provider, model);
|
|
422
|
+
function createConfigForProvider(provider, model, reasoningEffort) {
|
|
423
|
+
const modelThinking = resolveModelThinkingConfig(provider, model, reasoningEffort);
|
|
391
424
|
return {
|
|
392
425
|
...config,
|
|
393
426
|
llm: {
|
|
@@ -420,10 +453,10 @@ function createProviderManager(config, options = {}) {
|
|
|
420
453
|
}
|
|
421
454
|
return provider.models.find((m) => m.selected)?.id ?? provider.models[0]?.id ?? requestedModel ?? "auto";
|
|
422
455
|
}
|
|
423
|
-
function createClientForProvider(provider, model) {
|
|
456
|
+
function createClientForProvider(provider, model, reasoningEffort) {
|
|
424
457
|
const resolvedModel = resolveProviderModel(provider, model);
|
|
425
458
|
const transport = options.adapters?.getTransport(resolveTransportAdapter(provider));
|
|
426
|
-
return transport ? createTransportLLMClient(provider, resolvedModel, transport) : createLLMClient(createConfigForProvider(provider, resolvedModel));
|
|
459
|
+
return transport ? createTransportLLMClient(provider, resolvedModel, transport, reasoningEffort) : createLLMClient(createConfigForProvider(provider, resolvedModel, reasoningEffort));
|
|
427
460
|
}
|
|
428
461
|
async function fetchProviderModels(provider) {
|
|
429
462
|
const transport = options.adapters?.getTransport(resolveTransportAdapter(provider));
|
|
@@ -444,9 +477,9 @@ function createProviderManager(config, options = {}) {
|
|
|
444
477
|
}
|
|
445
478
|
}
|
|
446
479
|
return {
|
|
447
|
-
createClient(providerId, model) {
|
|
480
|
+
createClient(providerId, model, reasoningEffort) {
|
|
448
481
|
const provider = providers.find((p) => p.id === providerId);
|
|
449
|
-
return provider ? createClientForProvider(provider, model) : void 0;
|
|
482
|
+
return provider ? createClientForProvider(provider, model, reasoningEffort) : void 0;
|
|
450
483
|
},
|
|
451
484
|
resolveModel(providerId, model) {
|
|
452
485
|
const provider = providers.find((p) => p.id === providerId);
|
|
@@ -455,7 +488,8 @@ function createProviderManager(config, options = {}) {
|
|
|
455
488
|
getProviders() {
|
|
456
489
|
return providers.map((p) => ({
|
|
457
490
|
...p,
|
|
458
|
-
status: providerStatus.get(p.id) ?? "unknown"
|
|
491
|
+
status: providerStatus.get(p.id) ?? "unknown",
|
|
492
|
+
models: p.models.map(enrichWithCatalogDefaults)
|
|
459
493
|
}));
|
|
460
494
|
},
|
|
461
495
|
getActiveProvider() {
|
|
@@ -697,6 +731,8 @@ function createProviderManager(config, options = {}) {
|
|
|
697
731
|
...finalSupportsVision !== void 0 && { supportsVision: finalSupportsVision },
|
|
698
732
|
...settings.thinkingEnabled !== void 0 ? { thinkingEnabled: settings.thinkingEnabled } : existingModel?.thinkingEnabled !== void 0 ? { thinkingEnabled: existingModel.thinkingEnabled } : {},
|
|
699
733
|
...settings.thinkingLevel !== void 0 ? { thinkingLevel: settings.thinkingLevel } : existingModel?.thinkingLevel !== void 0 ? { thinkingLevel: existingModel.thinkingLevel } : {},
|
|
734
|
+
...settings.reasoningEfforts !== void 0 ? { reasoningEfforts: settings.reasoningEfforts } : existingModel?.reasoningEfforts !== void 0 ? { reasoningEfforts: existingModel.reasoningEfforts } : {},
|
|
735
|
+
...settings.reasoningEffortOverride !== void 0 ? { reasoningEffortOverride: settings.reasoningEffortOverride } : existingModel?.reasoningEffortOverride !== void 0 ? { reasoningEffortOverride: existingModel.reasoningEffortOverride } : {},
|
|
700
736
|
...settings.nonThinkingEnabled !== void 0 ? { nonThinkingEnabled: settings.nonThinkingEnabled } : existingModel?.nonThinkingEnabled !== void 0 ? { nonThinkingEnabled: existingModel.nonThinkingEnabled } : {},
|
|
701
737
|
...settings.thinkingExtraKwargs !== void 0 ? { thinkingExtraKwargs: settings.thinkingExtraKwargs } : existingModel?.thinkingExtraKwargs !== void 0 ? { thinkingExtraKwargs: existingModel.thinkingExtraKwargs } : {},
|
|
702
738
|
...settings.nonThinkingExtraKwargs !== void 0 ? { nonThinkingExtraKwargs: settings.nonThinkingExtraKwargs } : existingModel?.nonThinkingExtraKwargs !== void 0 ? { nonThinkingExtraKwargs: existingModel.nonThinkingExtraKwargs } : {},
|
|
@@ -805,4 +841,4 @@ export {
|
|
|
805
841
|
parseDefaultModelSelection,
|
|
806
842
|
createProviderManager
|
|
807
843
|
};
|
|
808
|
-
//# sourceMappingURL=chunk-
|
|
844
|
+
//# sourceMappingURL=chunk-H4JRR5KV.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getEventStore
|
|
3
|
+
} from "./chunk-YJD5A375.js";
|
|
1
4
|
import {
|
|
2
5
|
createChatPathConfirmationMessage
|
|
3
6
|
} from "./chunk-XAAEP5XM.js";
|
|
4
|
-
import {
|
|
5
|
-
getEventStore
|
|
6
|
-
} from "./chunk-J3IJJ55E.js";
|
|
7
7
|
import {
|
|
8
8
|
getPlatformShell
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-66MG44TF.js";
|
|
10
10
|
|
|
11
11
|
// src/server/tools/path-security.ts
|
|
12
12
|
import { realpath } from "fs/promises";
|
|
@@ -671,4 +671,4 @@ export {
|
|
|
671
671
|
getConfirmationSessionId,
|
|
672
672
|
getPendingConfirmationsBySession
|
|
673
673
|
};
|
|
674
|
-
//# sourceMappingURL=chunk-
|
|
674
|
+
//# sourceMappingURL=chunk-INOO465O.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-62GUO2EG.js";
|
|
4
4
|
import {
|
|
5
5
|
COMPACTION_PROMPT
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GIJUWPRQ.js";
|
|
7
7
|
import {
|
|
8
8
|
getCurrentWindowMessageOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YJD5A375.js";
|
|
10
10
|
|
|
11
11
|
// src/server/context/compactor.ts
|
|
12
12
|
function appendCompactionPrompt(sessionId, append) {
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
COMPACTION_MAX_RATIO,
|
|
37
37
|
shouldCompact
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-JEZN37KV.js.map
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-OSXPQSLW.js";
|
|
4
4
|
import {
|
|
5
5
|
getProjectDefaultAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3B232XG4.js";
|
|
7
7
|
import {
|
|
8
8
|
SETTINGS_KEYS,
|
|
9
9
|
getSetting
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-N2Q3KYWM.js";
|
|
11
11
|
import {
|
|
12
12
|
logger
|
|
13
13
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -352,4 +352,4 @@ export {
|
|
|
352
352
|
getOverrideAgentIds,
|
|
353
353
|
resolveDefaultAgentId
|
|
354
354
|
};
|
|
355
|
-
//# sourceMappingURL=chunk-
|
|
355
|
+
//# sourceMappingURL=chunk-KBESUA3W.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDatabase
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OYBUJIC3.js";
|
|
4
4
|
|
|
5
5
|
// src/server/db/settings.ts
|
|
6
6
|
var SETTINGS_KEYS = {
|
|
@@ -131,4 +131,4 @@ export {
|
|
|
131
131
|
getAllSettings,
|
|
132
132
|
getMaxVisibleItems
|
|
133
133
|
};
|
|
134
|
-
//# sourceMappingURL=chunk-
|
|
134
|
+
//# sourceMappingURL=chunk-N2Q3KYWM.js.map
|
|
@@ -164,6 +164,14 @@ function runMigrations(db2) {
|
|
|
164
164
|
logger.info("Migrating sessions table: adding provider_manual_active column");
|
|
165
165
|
db2.exec(`ALTER TABLE sessions ADD COLUMN provider_manual_active INTEGER NOT NULL DEFAULT 1`);
|
|
166
166
|
}
|
|
167
|
+
if (!columnNames.includes("provider_reasoning_effort")) {
|
|
168
|
+
logger.info("Migrating sessions table: adding provider_reasoning_effort column");
|
|
169
|
+
db2.exec(`ALTER TABLE sessions ADD COLUMN provider_reasoning_effort TEXT`);
|
|
170
|
+
}
|
|
171
|
+
if (!columnNames.includes("provider_pinned_effort")) {
|
|
172
|
+
logger.info("Migrating sessions table: adding provider_pinned_effort column");
|
|
173
|
+
db2.exec(`ALTER TABLE sessions ADD COLUMN provider_pinned_effort TEXT`);
|
|
174
|
+
}
|
|
167
175
|
if (!columnNames.includes("message_count")) {
|
|
168
176
|
logger.info("Migrating sessions table: adding message_count column");
|
|
169
177
|
db2.exec(`ALTER TABLE sessions ADD COLUMN message_count INTEGER NOT NULL DEFAULT 0`);
|
|
@@ -332,4 +340,4 @@ export {
|
|
|
332
340
|
initDatabase,
|
|
333
341
|
getDatabase
|
|
334
342
|
};
|
|
335
|
-
//# sourceMappingURL=chunk-
|
|
343
|
+
//# sourceMappingURL=chunk-OYBUJIC3.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAllInstructions,
|
|
3
3
|
getEnabledSkillMetadata
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZIL6VKLU.js";
|
|
5
5
|
import {
|
|
6
6
|
buildTopLevelSystemPrompt
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GIJUWPRQ.js";
|
|
8
8
|
import {
|
|
9
9
|
findAgentById,
|
|
10
10
|
getRuntimeConfig,
|
|
11
11
|
getSubAgents,
|
|
12
12
|
loadAllAgentsDefault,
|
|
13
13
|
resolveDefaultAgentId
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KBESUA3W.js";
|
|
15
15
|
import {
|
|
16
16
|
logger
|
|
17
17
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -105,7 +105,7 @@ function resolveAgentDef(sessionManager, sessionId) {
|
|
|
105
105
|
}
|
|
106
106
|
async function buildCachedPrompt(sessionManager, sessionId, agentDef, modelName) {
|
|
107
107
|
const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
|
|
108
|
-
const { getToolRegistryForAgent } = await import("./tools-
|
|
108
|
+
const { getToolRegistryForAgent } = await import("./tools-YPVZ5QM2.js");
|
|
109
109
|
const tools = getToolRegistryForAgent(agentDef, sessionId).definitions;
|
|
110
110
|
const toolFingerprint = getToolFingerprint(tools);
|
|
111
111
|
const allAgents = await loadAllAgentsDefault(sessionManager.getProjectWorkdir(sessionId));
|
|
@@ -124,7 +124,7 @@ async function buildCachedPrompt(sessionManager, sessionId, agentDef, modelName)
|
|
|
124
124
|
async function computeSessionHash(sessionManager, sessionId, modelName) {
|
|
125
125
|
const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
|
|
126
126
|
const agentDef = await resolveAgentDef(sessionManager, sessionId);
|
|
127
|
-
const { getToolRegistryForAgent } = await import("./tools-
|
|
127
|
+
const { getToolRegistryForAgent } = await import("./tools-YPVZ5QM2.js");
|
|
128
128
|
const tools = getToolRegistryForAgent(agentDef, sessionId).definitions;
|
|
129
129
|
const toolFingerprint = getToolFingerprint(tools);
|
|
130
130
|
return computeDynamicContextHash(instructionContent, skills, toolFingerprint, modelName);
|
|
@@ -148,4 +148,4 @@ export {
|
|
|
148
148
|
computeSessionHash,
|
|
149
149
|
applyDynamicContext
|
|
150
150
|
};
|
|
151
|
-
//# sourceMappingURL=chunk-
|
|
151
|
+
//# sourceMappingURL=chunk-PZUKG3OZ.js.map
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
} from "./chunk-I72ACQ6R.js";
|
|
12
12
|
import {
|
|
13
13
|
getPlatformShell
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-66MG44TF.js";
|
|
15
15
|
import {
|
|
16
16
|
SETTINGS_KEYS,
|
|
17
17
|
getSetting
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-N2Q3KYWM.js";
|
|
19
19
|
|
|
20
20
|
// src/server/utils/shell.ts
|
|
21
21
|
import { spawn } from "child_process";
|
|
@@ -214,4 +214,4 @@ export {
|
|
|
214
214
|
getSessionProcesses2 as getSessionProcesses,
|
|
215
215
|
getProcessLogs
|
|
216
216
|
};
|
|
217
|
-
//# sourceMappingURL=chunk-
|
|
217
|
+
//# sourceMappingURL=chunk-RV5G7QQU.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
parseDefaultModelSelection
|
|
3
|
+
} from "./chunk-H4JRR5KV.js";
|
|
1
4
|
import {
|
|
2
5
|
deleteItemFromDir,
|
|
3
6
|
getDefaultIds,
|
|
@@ -8,13 +11,10 @@ import {
|
|
|
8
11
|
} from "./chunk-OSXPQSLW.js";
|
|
9
12
|
import {
|
|
10
13
|
getProject
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
parseDefaultModelSelection
|
|
14
|
-
} from "./chunk-UJRWYZHM.js";
|
|
14
|
+
} from "./chunk-3B232XG4.js";
|
|
15
15
|
import {
|
|
16
16
|
getDatabase
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-OYBUJIC3.js";
|
|
18
18
|
import {
|
|
19
19
|
logger
|
|
20
20
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -1006,7 +1006,8 @@ ${content}
|
|
|
1006
1006
|
return [
|
|
1007
1007
|
`This session is now working on task "${promptLabel(task.prompt)}" from the project task board.`,
|
|
1008
1008
|
`Previous state: ${prettyStatus(from)} \u2192 In Progress. Session: ${sessionId.slice(0, 8)}.`,
|
|
1009
|
-
gateLine
|
|
1009
|
+
gateLine,
|
|
1010
|
+
"Do not move the task, fill gate values, or commit changes without explicit user approval or a system instruction."
|
|
1010
1011
|
].join("\n");
|
|
1011
1012
|
}
|
|
1012
1013
|
function reminderForDone(task) {
|
|
@@ -1098,4 +1099,4 @@ export {
|
|
|
1098
1099
|
isTaskGateError,
|
|
1099
1100
|
createTasksService
|
|
1100
1101
|
};
|
|
1101
|
-
//# sourceMappingURL=chunk-
|
|
1102
|
+
//# sourceMappingURL=chunk-SS6KV6DI.js.map
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
LLMError,
|
|
19
19
|
OpenAIHttpClient
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VPRB5FNR.js";
|
|
21
21
|
import {
|
|
22
22
|
logger
|
|
23
23
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -86,6 +86,7 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
86
86
|
model = newModel;
|
|
87
87
|
profile = newProfile;
|
|
88
88
|
},
|
|
89
|
+
getReasoningEffort: () => reasoningEffort,
|
|
89
90
|
async complete(request) {
|
|
90
91
|
logger.debug("LLM complete request", {
|
|
91
92
|
messageCount: request.messages.length,
|
|
@@ -316,4 +317,4 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
316
317
|
export {
|
|
317
318
|
createLLMClient
|
|
318
319
|
};
|
|
319
|
-
//# sourceMappingURL=chunk-
|
|
320
|
+
//# sourceMappingURL=chunk-SYTEO5LA.js.map
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// src/shared/reasoning-effort.ts
|
|
2
|
+
var REASONING_EFFORT_VALUES = ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
3
|
+
function isReasoningEffortValue(value) {
|
|
4
|
+
return REASONING_EFFORT_VALUES.includes(value);
|
|
5
|
+
}
|
|
6
|
+
function resolveEffortForModel({
|
|
7
|
+
reasoningEfforts,
|
|
8
|
+
candidate,
|
|
9
|
+
defaultEffort,
|
|
10
|
+
override
|
|
11
|
+
}) {
|
|
12
|
+
if (candidate === "none") return "none";
|
|
13
|
+
if (!reasoningEfforts || reasoningEfforts.length === 0) {
|
|
14
|
+
return candidate ?? override ?? defaultEffort;
|
|
15
|
+
}
|
|
16
|
+
if (candidate) {
|
|
17
|
+
if (reasoningEfforts.includes(candidate)) return candidate;
|
|
18
|
+
if (override) return override;
|
|
19
|
+
if (defaultEffort && reasoningEfforts.includes(defaultEffort)) return defaultEffort;
|
|
20
|
+
return reasoningEfforts[0];
|
|
21
|
+
}
|
|
22
|
+
if (override) return override;
|
|
23
|
+
return defaultEffort && reasoningEfforts.includes(defaultEffort) ? defaultEffort : void 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// src/server/providers/model-catalog.ts
|
|
27
|
+
var CATALOG = [
|
|
28
|
+
{
|
|
29
|
+
// DeepSeek V4 Flash/Pro: official API accepts low/high/max
|
|
30
|
+
// (medium → high, xhigh → max are compatibility mappings); 'none'
|
|
31
|
+
// disables thinking mode on setups that honor it.
|
|
32
|
+
pattern: /^deepseek-v4-(flash|pro)(\b|-|$)/i,
|
|
33
|
+
entry: { reasoningEfforts: ["none", "low", "high", "max"], defaultReasoningEffort: "high" }
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
// Qwen3.6 / 3.7 / 3.8 families: low/medium/high is the common denominator.
|
|
37
|
+
pattern: /^qwen3\.(6|7|8)(\b|-)/i,
|
|
38
|
+
entry: { reasoningEfforts: ["low", "medium", "high"], defaultReasoningEffort: "medium" }
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
// Z.ai GLM-5.3: only max/high/low are accepted.
|
|
42
|
+
pattern: /^glm-5\.3(\b|-)/i,
|
|
43
|
+
entry: { reasoningEfforts: ["low", "high", "max"], defaultReasoningEffort: "max" }
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
// Z.ai GLM-5.2: full range with compatibility mappings (default max).
|
|
47
|
+
pattern: /^glm-5\.2(\b|-)/i,
|
|
48
|
+
entry: {
|
|
49
|
+
reasoningEfforts: ["none", "minimal", "low", "medium", "high", "xhigh", "max"],
|
|
50
|
+
defaultReasoningEffort: "max"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
// Moonshot Kimi K3: low/high/max (default max).
|
|
55
|
+
pattern: /^kimi-k3(\b|-)/i,
|
|
56
|
+
entry: { reasoningEfforts: ["low", "high", "max"], defaultReasoningEffort: "max" }
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
// OpenAI GPT-5.x / o-series reasoning models.
|
|
60
|
+
pattern: /^(gpt-5|o[1-9])(\b|-|$)/i,
|
|
61
|
+
entry: { reasoningEfforts: ["minimal", "low", "medium", "high"], defaultReasoningEffort: "medium" }
|
|
62
|
+
}
|
|
63
|
+
];
|
|
64
|
+
function getCatalogEntry(modelId) {
|
|
65
|
+
const basename = modelId.split("/").pop() ?? modelId;
|
|
66
|
+
for (const rule of CATALOG) {
|
|
67
|
+
if (rule.pattern.test(modelId) || rule.pattern.test(basename)) return rule.entry;
|
|
68
|
+
}
|
|
69
|
+
return void 0;
|
|
70
|
+
}
|
|
71
|
+
function getCatalogDefaultEffort(modelId) {
|
|
72
|
+
return getCatalogEntry(modelId)?.defaultReasoningEffort;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export {
|
|
76
|
+
REASONING_EFFORT_VALUES,
|
|
77
|
+
isReasoningEffortValue,
|
|
78
|
+
resolveEffortForModel,
|
|
79
|
+
getCatalogEntry,
|
|
80
|
+
getCatalogDefaultEffort
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=chunk-TPDBUOPN.js.map
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildCachedPrompt,
|
|
3
|
-
computeDynamicContextHash,
|
|
4
|
-
getToolFingerprint
|
|
5
|
-
} from "./chunk-5QTERLHH.js";
|
|
6
1
|
import {
|
|
7
2
|
createAssemblyResult,
|
|
8
3
|
getConversationMessages,
|
|
9
4
|
getToolRegistryForAgent,
|
|
10
5
|
processEventsForConversation,
|
|
11
6
|
runTopLevelAgentLoop
|
|
12
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4L7UMEHD.js";
|
|
8
|
+
import {
|
|
9
|
+
buildCachedPrompt,
|
|
10
|
+
computeDynamicContextHash,
|
|
11
|
+
getToolFingerprint
|
|
12
|
+
} from "./chunk-PZUKG3OZ.js";
|
|
13
13
|
import {
|
|
14
14
|
getAllInstructions,
|
|
15
15
|
getEnabledSkillMetadata
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
PathAccessDeniedError
|
|
19
|
-
} from "./chunk-5A4YN6I7.js";
|
|
16
|
+
} from "./chunk-ZIL6VKLU.js";
|
|
20
17
|
import {
|
|
21
18
|
TurnMetrics,
|
|
22
19
|
createChatDoneEvent,
|
|
@@ -25,21 +22,24 @@ import {
|
|
|
25
22
|
import {
|
|
26
23
|
buildAgentReminder,
|
|
27
24
|
buildAgentSmallReminder
|
|
28
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-GIJUWPRQ.js";
|
|
26
|
+
import {
|
|
27
|
+
PathAccessDeniedError
|
|
28
|
+
} from "./chunk-INOO465O.js";
|
|
29
29
|
import {
|
|
30
30
|
getCurrentContextWindowId,
|
|
31
31
|
getCurrentWindowMessageOptions,
|
|
32
32
|
getEventStore
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-YJD5A375.js";
|
|
34
34
|
import {
|
|
35
35
|
buildSnapshotFromSessionState
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-ZIYETXOW.js";
|
|
37
37
|
import {
|
|
38
38
|
findAgentById,
|
|
39
39
|
getRuntimeConfig,
|
|
40
40
|
loadAllAgentsDefault,
|
|
41
41
|
resolveDefaultAgentId
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-KBESUA3W.js";
|
|
43
43
|
import {
|
|
44
44
|
logger
|
|
45
45
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
|
|
50
50
|
// src/server/chat/orchestrator.ts
|
|
51
51
|
async function buildRetryPatterns() {
|
|
52
|
-
const { getSetting, SETTINGS_KEYS } = await import("./settings-
|
|
52
|
+
const { getSetting, SETTINGS_KEYS } = await import("./settings-VOWWO4VG.js");
|
|
53
53
|
const raw = getSetting(SETTINGS_KEYS.RETRY_PATTERNS);
|
|
54
54
|
if (!raw) {
|
|
55
55
|
const oldXmlProtection = getSetting("llm.disableXmlProtection");
|
|
@@ -80,17 +80,20 @@ function buildGetConversationMessages(sessionId, resolveLLMClient, append) {
|
|
|
80
80
|
}
|
|
81
81
|
function resolveStatsIdentity(options) {
|
|
82
82
|
const clientModel = options.llmClient.getModel();
|
|
83
|
+
const clientEffort = options.llmClient.getReasoningEffort?.();
|
|
83
84
|
if (options.statsIdentity) {
|
|
84
85
|
return {
|
|
85
86
|
...options.statsIdentity,
|
|
86
|
-
model:
|
|
87
|
+
model: clientModel,
|
|
88
|
+
...clientEffort ? { reasoningEffort: clientEffort } : options.statsIdentity.reasoningEffort ? { reasoningEffort: options.statsIdentity.reasoningEffort } : {}
|
|
87
89
|
};
|
|
88
90
|
}
|
|
89
91
|
return {
|
|
90
92
|
providerId: `provider:${clientModel}`,
|
|
91
93
|
providerName: "Unknown Provider",
|
|
92
94
|
backend: "unknown",
|
|
93
|
-
model: clientModel
|
|
95
|
+
model: clientModel,
|
|
96
|
+
...clientEffort ? { reasoningEffort: clientEffort } : {}
|
|
94
97
|
};
|
|
95
98
|
}
|
|
96
99
|
async function runChatTurn(options) {
|
|
@@ -227,6 +230,7 @@ async function runAgentTurn(options, turnMetrics, agentId, append, callbacks) {
|
|
|
227
230
|
const allAgents = await loadAllAgentsDefault(options.sessionManager.getProjectWorkdir(options.sessionId));
|
|
228
231
|
const agentDef = findAgentById(agentId, allAgents) ?? findAgentById(resolveDefaultAgentId(), allAgents);
|
|
229
232
|
const resolveAgentClient = () => options.sessionManager.createClientForAgent(
|
|
233
|
+
options.sessionId,
|
|
230
234
|
agentId,
|
|
231
235
|
options.getSessionLLMClient ? options.getSessionLLMClient() : options.llmClient
|
|
232
236
|
);
|
|
@@ -325,4 +329,4 @@ export {
|
|
|
325
329
|
runChatTurn,
|
|
326
330
|
runAgentTurn
|
|
327
331
|
};
|
|
328
|
-
//# sourceMappingURL=chunk-
|
|
332
|
+
//# sourceMappingURL=chunk-V2UJP5CX.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETTINGS_KEYS,
|
|
3
3
|
getSetting
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-N2Q3KYWM.js";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
7
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -164,4 +164,4 @@ export {
|
|
|
164
164
|
WorkspaceInUseError,
|
|
165
165
|
OpenAIHttpClient
|
|
166
166
|
};
|
|
167
|
-
//# sourceMappingURL=chunk-
|
|
167
|
+
//# sourceMappingURL=chunk-VPRB5FNR.js.map
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
combineEventsWithSnapshot,
|
|
3
|
+
getEventStore
|
|
4
|
+
} from "./chunk-YJD5A375.js";
|
|
5
|
+
import {
|
|
6
|
+
buildMessagesFromStoredEvents,
|
|
7
|
+
foldPendingConfirmations
|
|
8
|
+
} from "./chunk-ZIYETXOW.js";
|
|
9
|
+
import {
|
|
10
|
+
updateSessionMetadata
|
|
11
|
+
} from "./chunk-AQBRI7TM.js";
|
|
1
12
|
import {
|
|
2
13
|
createContextStateMessage,
|
|
3
14
|
createSessionStateMessage
|
|
@@ -5,23 +16,12 @@ import {
|
|
|
5
16
|
import {
|
|
6
17
|
getPendingQuestionsForSession
|
|
7
18
|
} from "./chunk-JURM3RPZ.js";
|
|
8
|
-
import {
|
|
9
|
-
combineEventsWithSnapshot,
|
|
10
|
-
getEventStore
|
|
11
|
-
} from "./chunk-J3IJJ55E.js";
|
|
12
|
-
import {
|
|
13
|
-
updateSessionMetadata
|
|
14
|
-
} from "./chunk-SLW3KKPP.js";
|
|
15
|
-
import {
|
|
16
|
-
buildMessagesFromStoredEvents,
|
|
17
|
-
foldPendingConfirmations
|
|
18
|
-
} from "./chunk-LWXLNE6M.js";
|
|
19
19
|
import {
|
|
20
20
|
getRuntimeConfig
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-KBESUA3W.js";
|
|
22
22
|
import {
|
|
23
23
|
getMaxVisibleItems
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-N2Q3KYWM.js";
|
|
25
25
|
import {
|
|
26
26
|
logger
|
|
27
27
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -161,7 +161,7 @@ async function generateSessionNameForSession(sessionId, userMessage, deps, signa
|
|
|
161
161
|
client = deps.getLLMClient();
|
|
162
162
|
client.setModel(providerConfig.model);
|
|
163
163
|
} else if (providerConfig) {
|
|
164
|
-
const { createLLMClient } = await import("./client-
|
|
164
|
+
const { createLLMClient } = await import("./client-XHJHOFMU.js");
|
|
165
165
|
client = createLLMClient({
|
|
166
166
|
llm: {
|
|
167
167
|
baseUrl: providerConfig.baseUrl,
|
|
@@ -212,4 +212,4 @@ export {
|
|
|
212
212
|
needsNameGeneration,
|
|
213
213
|
generateSessionNameForSession
|
|
214
214
|
};
|
|
215
|
-
//# sourceMappingURL=chunk-
|
|
215
|
+
//# sourceMappingURL=chunk-W4SM4FFZ.js.map
|