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.
Files changed (83) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/CHANGELOG.md +23 -0
  3. package/dist/{auto-config-YXNCBYEY.js → auto-config-4BFGLPCP.js} +86 -19
  4. package/dist/{chat-handler-A5ORR5BB.js → chat-handler-UWZYFGRY.js} +29 -28
  5. package/dist/{chunk-DIALH34K.js → chunk-3B232XG4.js} +2 -2
  6. package/dist/{chunk-RMOKNQAS.js → chunk-3NMLSANH.js} +2 -2
  7. package/dist/{chunk-TR4DQZIG.js → chunk-4L7UMEHD.js} +70 -57
  8. package/dist/{chunk-EZ67GBEO.js → chunk-66MG44TF.js} +2 -2
  9. package/dist/{chunk-YBOU4ZFD.js → chunk-7YP4O4XE.js} +3 -3
  10. package/dist/{chunk-SLW3KKPP.js → chunk-AQBRI7TM.js} +21 -8
  11. package/dist/{chunk-OXANSWVZ.js → chunk-EHFIUXWZ.js} +2 -2
  12. package/dist/{chunk-KD7JTG42.js → chunk-FFEZJBQO.js} +278 -142
  13. package/dist/{chunk-Y7FGHKBW.js → chunk-GIJUWPRQ.js} +2 -2
  14. package/dist/{chunk-UJRWYZHM.js → chunk-H4JRR5KV.js} +59 -23
  15. package/dist/{chunk-5A4YN6I7.js → chunk-INOO465O.js} +5 -5
  16. package/dist/{chunk-6A2VIV36.js → chunk-JEZN37KV.js} +3 -3
  17. package/dist/{chunk-2N7KFNMY.js → chunk-KBESUA3W.js} +3 -3
  18. package/dist/chunk-LXCDR3H5.js +7 -0
  19. package/dist/{chunk-FGVMRFDW.js → chunk-N2Q3KYWM.js} +2 -2
  20. package/dist/{chunk-NYQKSKDB.js → chunk-OYBUJIC3.js} +9 -1
  21. package/dist/{chunk-5QTERLHH.js → chunk-PZUKG3OZ.js} +6 -6
  22. package/dist/{chunk-I22B6KWV.js → chunk-RV5G7QQU.js} +3 -3
  23. package/dist/{chunk-O63CDVNI.js → chunk-SS6KV6DI.js} +8 -7
  24. package/dist/{chunk-J77SLE3M.js → chunk-SYTEO5LA.js} +3 -2
  25. package/dist/chunk-TPDBUOPN.js +82 -0
  26. package/dist/{chunk-VUANU5A5.js → chunk-V2UJP5CX.js} +22 -18
  27. package/dist/{chunk-POTCPZJF.js → chunk-VPRB5FNR.js} +2 -2
  28. package/dist/{chunk-YDDBPKVP.js → chunk-W4SM4FFZ.js} +15 -15
  29. package/dist/{chunk-ZELEYSTY.js → chunk-YGOF4QDW.js} +50 -37
  30. package/dist/{chunk-J3IJJ55E.js → chunk-YJD5A375.js} +7 -7
  31. package/dist/{chunk-F2IM5J4I.js → chunk-YU5QPXSU.js} +4 -4
  32. package/dist/{chunk-LSEHJ2WI.js → chunk-ZIL6VKLU.js} +3 -3
  33. package/dist/{chunk-LWXLNE6M.js → chunk-ZIYETXOW.js} +2 -2
  34. package/dist/{chunk-W3WZ54KP.js → chunk-ZKMZI4ZG.js} +15 -15
  35. package/dist/cli/dev.js +1 -1
  36. package/dist/cli/index.js +1 -1
  37. package/dist/{client-JKPDMJ7S.js → client-XHJHOFMU.js} +5 -5
  38. package/dist/{compactor-MKD3CAFM.js → compactor-VTATJTPN.js} +12 -12
  39. package/dist/{dynamic-context-KPZECHZH.js → dynamic-context-5TPG2AJL.js} +9 -9
  40. package/dist/{events-6P4TDTSD.js → events-GMHRX4LF.js} +8 -8
  41. package/dist/{folding-3LA2WX2B.js → folding-7K2GRPF4.js} +6 -6
  42. package/dist/http-client-N4ASJEKJ.js +11 -0
  43. package/dist/{inspect-proxy-IDLUAQH5.js → inspect-proxy-UKPU3Z64.js} +4 -4
  44. package/dist/launch-5PJLLVXV.js +53 -0
  45. package/dist/{manager-NFKTUR64.js → manager-NOKJQTTF.js} +5 -5
  46. package/dist/model-catalog-T2GQFJI4.js +14 -0
  47. package/dist/{orchestrator-SM3IHZFP.js → orchestrator-2Q3R5KKR.js} +31 -30
  48. package/dist/package.json +1 -1
  49. package/dist/{path-security-JUF56IB6.js → path-security-NRO37OAP.js} +10 -10
  50. package/dist/{platform-FM57ZJHA.js → platform-EMKWQTZX.js} +4 -4
  51. package/dist/{processor-EUJRA5GW.js → processor-N2XW2KJV.js} +39 -35
  52. package/dist/{project-creator-J4ITWDZI.js → project-creator-JF3YVQAH.js} +3 -3
  53. package/dist/{projects-FHRTSV6N.js → projects-TPSLCJP2.js} +3 -3
  54. package/dist/{protocol-BLin669D.d.ts → protocol-DCMH9Ufp.d.ts} +1 -1
  55. package/dist/provider/index.d.ts +4 -4
  56. package/dist/{provider-TAFJCWVP.js → provider-EBL6Z7TV.js} +7 -6
  57. package/dist/{provider-manager-EDJN6ARI.js → provider-manager-MKF27CTA.js} +7 -6
  58. package/dist/{registry-37GL3DAP.js → registry-Z4GVYFTV.js} +5 -5
  59. package/dist/{serve-DEY45HQS.js → serve-TARX23JF.js} +34 -33
  60. package/dist/server/index.d.ts +27 -6
  61. package/dist/server/index.js +31 -30
  62. package/dist/server-FKVRW7RV.js +56 -0
  63. package/dist/{service-HX5NFX2D.js → service-SY6Y4BIM.js} +10 -9
  64. package/dist/{session-overrides-EOKSZO2X.js → session-overrides-4WAD3X5Q.js} +7 -7
  65. package/dist/{sessions-XFNU4DZ6.js → sessions-D7VRCHQY.js} +8 -6
  66. package/dist/{settings-SYYDPV43.js → settings-VOWWO4VG.js} +3 -3
  67. package/dist/shared/index.d.ts +3 -3
  68. package/dist/{tasks-A25JQ4TV.js → tasks-IDIKTBOR.js} +11 -10
  69. package/dist/{tools-YGJXEEBI.js → tools-YPVZ5QM2.js} +24 -23
  70. package/dist/{types-B5_9KtfJ.d.ts → types-Cr4EgGwK.d.ts} +1 -1
  71. package/dist/{types-DeQIEC1U.d.ts → types-PAKlAzp9.d.ts} +16 -0
  72. package/dist/{update-CE3XSZXE.js → update-VSSOHC47.js} +2 -2
  73. package/dist/web/assets/index-C10YdCOU.js +324 -0
  74. package/dist/web/assets/{index-D9sfxcRH.css → index-DFMllFkv.css} +1 -1
  75. package/dist/web/index.html +2 -2
  76. package/dist/web/sw.js +1 -1
  77. package/dist/{workspace-ZNZFEONU.js → workspace-J3JEGF6U.js} +4 -4
  78. package/package.json +1 -1
  79. package/dist/chunk-OBB3JYMK.js +0 -7
  80. package/dist/http-client-IKOARXI7.js +0 -11
  81. package/dist/launch-YWXQQWZN.js +0 -52
  82. package/dist/server-EIRLWSBZ.js +0 -55
  83. package/dist/web/assets/index-oiZlWLY7.js +0 -324
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getPlatformShell
3
- } from "./chunk-EZ67GBEO.js";
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-Y7FGHKBW.js.map
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-J77SLE3M.js";
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
- complete: async (request) => {
65
- const supportsVision = request.modelSettings?.supportsVision ?? profile.supportsVision ?? false;
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
- const supportsVision = request.modelSettings?.supportsVision ?? profile.supportsVision ?? false;
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
- if (modelConfig.thinkingEnabled && modelConfig.thinkingLevel) {
385
- return { reasoningEffort: modelConfig.thinkingLevel };
386
- }
387
- return {};
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-UJRWYZHM.js.map
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-EZ67GBEO.js";
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-5A4YN6I7.js.map
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-Y7FGHKBW.js";
6
+ } from "./chunk-GIJUWPRQ.js";
7
7
  import {
8
8
  getCurrentWindowMessageOptions
9
- } from "./chunk-J3IJJ55E.js";
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-6A2VIV36.js.map
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-DIALH34K.js";
6
+ } from "./chunk-3B232XG4.js";
7
7
  import {
8
8
  SETTINGS_KEYS,
9
9
  getSetting
10
- } from "./chunk-FGVMRFDW.js";
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-2N7KFNMY.js.map
355
+ //# sourceMappingURL=chunk-KBESUA3W.js.map
@@ -0,0 +1,7 @@
1
+ // src/constants.ts
2
+ var VERSION = "2.0.123";
3
+
4
+ export {
5
+ VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-LXCDR3H5.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getDatabase
3
- } from "./chunk-NYQKSKDB.js";
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-FGVMRFDW.js.map
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-NYQKSKDB.js.map
343
+ //# sourceMappingURL=chunk-OYBUJIC3.js.map
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  getAllInstructions,
3
3
  getEnabledSkillMetadata
4
- } from "./chunk-LSEHJ2WI.js";
4
+ } from "./chunk-ZIL6VKLU.js";
5
5
  import {
6
6
  buildTopLevelSystemPrompt
7
- } from "./chunk-Y7FGHKBW.js";
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-2N7KFNMY.js";
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-YGJXEEBI.js");
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-YGJXEEBI.js");
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-5QTERLHH.js.map
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-EZ67GBEO.js";
14
+ } from "./chunk-66MG44TF.js";
15
15
  import {
16
16
  SETTINGS_KEYS,
17
17
  getSetting
18
- } from "./chunk-FGVMRFDW.js";
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-I22B6KWV.js.map
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-DIALH34K.js";
12
- import {
13
- parseDefaultModelSelection
14
- } from "./chunk-UJRWYZHM.js";
14
+ } from "./chunk-3B232XG4.js";
15
15
  import {
16
16
  getDatabase
17
- } from "./chunk-NYQKSKDB.js";
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-O63CDVNI.js.map
1102
+ //# sourceMappingURL=chunk-SS6KV6DI.js.map
@@ -17,7 +17,7 @@ import {
17
17
  import {
18
18
  LLMError,
19
19
  OpenAIHttpClient
20
- } from "./chunk-POTCPZJF.js";
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-J77SLE3M.js.map
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-TR4DQZIG.js";
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-LSEHJ2WI.js";
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-Y7FGHKBW.js";
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-J3IJJ55E.js";
33
+ } from "./chunk-YJD5A375.js";
34
34
  import {
35
35
  buildSnapshotFromSessionState
36
- } from "./chunk-LWXLNE6M.js";
36
+ } from "./chunk-ZIYETXOW.js";
37
37
  import {
38
38
  findAgentById,
39
39
  getRuntimeConfig,
40
40
  loadAllAgentsDefault,
41
41
  resolveDefaultAgentId
42
- } from "./chunk-2N7KFNMY.js";
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-SYYDPV43.js");
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: options.statsIdentity.model ?? clientModel
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-VUANU5A5.js.map
332
+ //# sourceMappingURL=chunk-V2UJP5CX.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SETTINGS_KEYS,
3
3
  getSetting
4
- } from "./chunk-FGVMRFDW.js";
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-POTCPZJF.js.map
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-2N7KFNMY.js";
21
+ } from "./chunk-KBESUA3W.js";
22
22
  import {
23
23
  getMaxVisibleItems
24
- } from "./chunk-FGVMRFDW.js";
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-JKPDMJ7S.js");
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-YDDBPKVP.js.map
215
+ //# sourceMappingURL=chunk-W4SM4FFZ.js.map