openfox 2.0.115 → 2.0.116

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 (95) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/CHANGELOG.md +22 -0
  3. package/dist/{ask-ZYPCJKZD.js → ask-UBIRH3SO.js} +2 -2
  4. package/dist/{auth-YY5PJYSC.js → auth-GTGIGX5X.js} +2 -2
  5. package/dist/{auto-config-T5GR2N6X.js → auto-config-AAUO4PKW.js} +2 -2
  6. package/dist/{backend-LVYHLGQJ.js → backend-67OLCS5O.js} +2 -2
  7. package/dist/{branch.api-XVTYACSH.js → branch.api-UMKSQMSA.js} +2 -2
  8. package/dist/changelog-FZUE6OSG.js +63 -0
  9. package/dist/{chat-handler-5SP265CR.js → chat-handler-Z6BEY66U.js} +17 -17
  10. package/dist/{chunk-OCBBAEMT.js → chunk-4E52GUXJ.js} +179 -137
  11. package/dist/{chunk-I7FY2LTR.js → chunk-4GHLULHB.js} +18 -2
  12. package/dist/{chunk-JFK4GKQD.js → chunk-4HV3PDEK.js} +58 -90
  13. package/dist/{chunk-TGLVWAFC.js → chunk-6XHDNSA3.js} +5 -5
  14. package/dist/{chunk-4H427UBV.js → chunk-AGXJ5O63.js} +2 -2
  15. package/dist/{chunk-OKVHMKE2.js → chunk-BH3BBUGB.js} +19 -17
  16. package/dist/{chunk-OCSTEGK7.js → chunk-EQ5CGNOT.js} +2 -2
  17. package/dist/{chunk-YX3OQBNX.js → chunk-EQ7DK2TG.js} +9 -5
  18. package/dist/{chunk-BVVCRIVM.js → chunk-GZTMCTUS.js} +3 -3
  19. package/dist/chunk-HNHSUQCN.js +7 -0
  20. package/dist/{chunk-3QQAIUZI.js → chunk-HYPXL7K5.js} +175 -30
  21. package/dist/{chunk-6RGACY4E.js → chunk-HZSKKJHQ.js} +4 -3
  22. package/dist/{chunk-VWEATA7R.js → chunk-KLQEL2DZ.js} +7 -1
  23. package/dist/{chunk-JGWHRYWG.js → chunk-MKWS7TQH.js} +2 -2
  24. package/dist/{chunk-37QLXLML.js → chunk-QJWTBVJO.js} +14 -14
  25. package/dist/{chunk-6KPJLELC.js → chunk-QQVPUZQB.js} +156 -20
  26. package/dist/{chunk-TFF5T3K3.js → chunk-SQLJRO3J.js} +3 -3
  27. package/dist/{chunk-ERNWAKUB.js → chunk-TGVDUK4N.js} +2 -2
  28. package/dist/{chunk-3NPLERPQ.js → chunk-U4HMAYAD.js} +9 -8
  29. package/dist/{chunk-V4IE7HJY.js → chunk-W7VIYHPQ.js} +2 -2
  30. package/dist/{chunk-BWVO5WFK.js → chunk-X3XKYGUN.js} +3 -3
  31. package/dist/{chunk-5WRI5ZAA.js → chunk-YLJ4XMA6.js} +6 -2
  32. package/dist/{chunk-X25Q6RAV.js → chunk-ZKLE2Q3I.js} +1 -1
  33. package/dist/cli/dev.js +3 -3
  34. package/dist/cli/index.js +3 -3
  35. package/dist/{client-KE7EDI2D.js → client-KCNTDTIR.js} +4 -4
  36. package/dist/{client-pure-66Z6FWS6.js → client-pure-B5DHEKQJ.js} +2 -2
  37. package/dist/command-defaults/mark-done.command.md +6 -6
  38. package/dist/{compactor-SKVC2VNL.js → compactor-LAXZLPPA.js} +7 -7
  39. package/dist/{config-EAB3V4QK.js → config-TUCHLIWD.js} +2 -2
  40. package/dist/{dynamic-context-QNB4ELLP.js → dynamic-context-YHWFFP53.js} +3 -3
  41. package/dist/{events-5PLO4QJU.js → events-IVPAMMR5.js} +4 -4
  42. package/dist/{folding-CJWYFUKD.js → folding-RTGU63BW.js} +2 -2
  43. package/dist/{http-client-KLODRQC2.js → http-client-IPUW2MSW.js} +2 -2
  44. package/dist/{inspect-proxy-K6QKEYDT.js → inspect-proxy-WPEDMCG7.js} +2 -2
  45. package/dist/{install-CPOPMCSE.js → install-VA2F6X6Z.js} +2 -2
  46. package/dist/{launch-EOXVWLOP.js → launch-PAVQAWGP.js} +17 -17
  47. package/dist/{manager-LZ3JQ443.js → manager-EMLSLMMT.js} +2 -2
  48. package/dist/{model-overrides-5UVW3KTE.js → model-overrides-7F2EOA4U.js} +2 -2
  49. package/dist/{oauth-provider-52YILVUJ.js → oauth-provider-DGBC2YM6.js} +2 -2
  50. package/dist/{oauth-store-XCFXV2VM.js → oauth-store-KECHUT54.js} +2 -2
  51. package/dist/{openFolder-HX7X356L.js → openFolder-XCMSU3OI.js} +2 -2
  52. package/dist/{orchestrator-ED3KFPXO.js → orchestrator-CS3KXLZE.js} +16 -16
  53. package/dist/package.json +5 -2
  54. package/dist/{path-security-B6EZC63L.js → path-security-JTCHWYG3.js} +7 -7
  55. package/dist/{paths-F27V3S4I.js → paths-BHR7CZ7I.js} +2 -2
  56. package/dist/{permissions-K6YEA2ZZ.js → permissions-UKR524ZB.js} +2 -2
  57. package/dist/{platform-6RPPBHKH.js → platform-ECDDYMAR.js} +2 -2
  58. package/dist/{processor-226ZOTRI.js → processor-RZD4JRDX.js} +16 -16
  59. package/dist/profiles-GYHXBWPV.js +10 -0
  60. package/dist/{project-creator-VBFE35NI.js → project-creator-PMQ65NKN.js} +2 -2
  61. package/dist/{projects-AXHZOBR2.js → projects-NDPNOV6D.js} +2 -2
  62. package/dist/{protocol-JdxRpPxM.d.ts → protocol-CfUkCYxF.d.ts} +11 -2
  63. package/dist/{protocol-RKSWKNXI.js → protocol-HYA5BYVN.js} +8 -4
  64. package/dist/{provider-DL4ZWQY7.js → provider-Q7J4UFTS.js} +7 -7
  65. package/dist/{provider-manager-6CLRMGDE.js → provider-manager-TMBO4DFG.js} +5 -5
  66. package/dist/{pwa-XPHP3PY2.js → pwa-2GRFSXD7.js} +3 -3
  67. package/dist/{registry-5XI5NDBF.js → registry-5QL3BOWN.js} +2 -2
  68. package/dist/{serve-DARV4NJG.js → serve-KR22J37W.js} +22 -22
  69. package/dist/server/index.d.ts +15 -2
  70. package/dist/server/index.js +21 -21
  71. package/dist/{server-LQJ7MBDS.js → server-ESKTIZL5.js} +20 -20
  72. package/dist/{service-4JKTGPRG.js → service-M7XJHAK4.js} +6 -6
  73. package/dist/{service-CXWJQFOZ.js → service-WKABQHKL.js} +2 -2
  74. package/dist/{session-overrides-AZKV6BRD.js → session-overrides-CWBKPHMF.js} +4 -4
  75. package/dist/{sessions-752IZIIK.js → sessions-I7ELDIIP.js} +5 -3
  76. package/dist/{settings-2AHDKCD7.js → settings-FGXQHKUH.js} +2 -2
  77. package/dist/shared/index.d.ts +1 -1
  78. package/dist/shared/index.js +2 -2
  79. package/dist/{store-SARB6V2N.js → store-JYPZ2RXB.js} +2 -2
  80. package/dist/{tasks-XJXHU623.js → tasks-X5H5HM4J.js} +6 -6
  81. package/dist/{tool-adapter-FEAHWU5C.js → tool-adapter-FJAFLDZA.js} +2 -2
  82. package/dist/{tools-QYYNFMGU.js → tools-KBS6X3EN.js} +14 -14
  83. package/dist/{update-2REP2WB6.js → update-TDS6LP5N.js} +4 -4
  84. package/dist/{update-server-LOOXIXDW.js → update-server-SVPV6ZJZ.js} +2 -2
  85. package/dist/{url-utils-SAJP7AEX.js → url-utils-C5BM7NF7.js} +2 -2
  86. package/dist/web/assets/index-ChtRS33s.js +324 -0
  87. package/dist/web/assets/{index-BmILAZrT.css → index-c43YT-4A.css} +1 -1
  88. package/dist/web/index.html +2 -2
  89. package/dist/web/sw.js +1 -1
  90. package/dist/workflow-defaults/default.workflow.json +2 -2
  91. package/dist/{workspace-RMZVTFJD.js → workspace-IQLLHMYR.js} +2 -2
  92. package/package.json +5 -2
  93. package/dist/chunk-5V3BF67X.js +0 -7
  94. package/dist/profiles-5J7F4BML.js +0 -10
  95. package/dist/web/assets/index-M7ToECa4.js +0 -324
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  createServerMessage,
6
6
  isClientMessage
7
- } from "./chunk-X25Q6RAV.js";
7
+ } from "./chunk-ZKLE2Q3I.js";
8
8
 
9
9
  // src/server/session/client-session.ts
10
10
  function toClientSession(session) {
@@ -140,6 +140,12 @@ function createChatDoneMessage(messageId, reason, stats, agentType) {
140
140
  function createChatErrorMessage(error, recoverable) {
141
141
  return createServerMessage("chat.error", { error, recoverable });
142
142
  }
143
+ function createChatMessageRemovedMessage(messageIds) {
144
+ return createServerMessage("chat.message_removed", { messageIds });
145
+ }
146
+ function createChatStepRetryMessage(stepName, attempt, retryInMs) {
147
+ return createServerMessage("chat.step_retry", { stepName, attempt, retryInMs });
148
+ }
143
149
  function createChatPathConfirmationMessage(callId, tool, paths, workdir, reason) {
144
150
  return createServerMessage("chat.path_confirmation", { callId, tool, paths, workdir, reason });
145
151
  }
@@ -316,6 +322,14 @@ function storedEventToServerMessage(event) {
316
322
  const data = event.data;
317
323
  return createChatFormatRetryMessage(data.attempt, data.maxAttempts, data.pattern, data.field, data.matchedContent);
318
324
  }
325
+ case "message.removed": {
326
+ const data = event.data;
327
+ return createChatMessageRemovedMessage(data.messageIds);
328
+ }
329
+ case "workflow.step_retry": {
330
+ const data = event.data;
331
+ return createChatStepRetryMessage(data.stepName, data.attempt, data.retryInMs);
332
+ }
319
333
  case "path.confirmation_pending":
320
334
  case "path.confirmation_responded":
321
335
  return null;
@@ -351,6 +365,8 @@ export {
351
365
  createChatMessageUpdatedMessage,
352
366
  createChatDoneMessage,
353
367
  createChatErrorMessage,
368
+ createChatMessageRemovedMessage,
369
+ createChatStepRetryMessage,
354
370
  createChatPathConfirmationMessage,
355
371
  createChatAskUserMessage,
356
372
  createModeChangedMessage,
@@ -366,4 +382,4 @@ export {
366
382
  createQueueStateMessage,
367
383
  storedEventToServerMessage
368
384
  };
369
- //# sourceMappingURL=chunk-I7FY2LTR.js.map
385
+ //# sourceMappingURL=chunk-4GHLULHB.js.map
@@ -14,7 +14,7 @@ import {
14
14
  createToolCallEvent,
15
15
  createToolResultEvent,
16
16
  streamLLMPure
17
- } from "./chunk-YX3OQBNX.js";
17
+ } from "./chunk-EQ7DK2TG.js";
18
18
  import {
19
19
  COMPACTION_PROMPT,
20
20
  buildBasePrompt,
@@ -57,29 +57,29 @@ import {
57
57
  getGateConfig,
58
58
  isTaskConflictError,
59
59
  isTaskGateError
60
- } from "./chunk-6RGACY4E.js";
60
+ } from "./chunk-HZSKKJHQ.js";
61
61
  import {
62
62
  getSessionDisabledServers
63
- } from "./chunk-OCSTEGK7.js";
63
+ } from "./chunk-EQ5CGNOT.js";
64
64
  import {
65
65
  PathAccessDeniedError,
66
66
  extractAbsolutePathsFromCommand,
67
67
  extractSensitivePathsFromCommand,
68
68
  registerPathConfirmation,
69
69
  requestPathAccess
70
- } from "./chunk-6KPJLELC.js";
70
+ } from "./chunk-QQVPUZQB.js";
71
71
  import {
72
72
  getCurrentContextWindowId,
73
73
  getCurrentWindowMessageOptions,
74
74
  getEventStore
75
- } from "./chunk-ERNWAKUB.js";
75
+ } from "./chunk-TGVDUK4N.js";
76
76
  import {
77
77
  createChatDoneMessage,
78
78
  createChatMessageMessage,
79
79
  createChatMessageUpdatedMessage,
80
80
  createChatPathConfirmationMessage,
81
81
  createQueueStateMessage
82
- } from "./chunk-I7FY2LTR.js";
82
+ } from "./chunk-4GHLULHB.js";
83
83
  import {
84
84
  AskUserInterrupt,
85
85
  askUserTool
@@ -105,7 +105,7 @@ import {
105
105
  } from "./chunk-LNNBLB6G.js";
106
106
  import {
107
107
  modelSupportsVision
108
- } from "./chunk-V4IE7HJY.js";
108
+ } from "./chunk-W7VIYHPQ.js";
109
109
  import {
110
110
  OUTPUT_LIMITS,
111
111
  cacheSet,
@@ -144,7 +144,7 @@ async function requestUserConfirmation(context, toolLabel, desc) {
144
144
  if (context.dangerLevel === "dangerous") return Promise.resolve(true);
145
145
  if (toolLabel === "workspace" || toolLabel === "command") {
146
146
  try {
147
- const { getSetting: getSetting2, SETTINGS_KEYS: SETTINGS_KEYS2 } = await import("./settings-2AHDKCD7.js");
147
+ const { getSetting: getSetting2, SETTINGS_KEYS: SETTINGS_KEYS2 } = await import("./settings-FGXQHKUH.js");
148
148
  if (getSetting2(SETTINGS_KEYS2.CONFIRM_ON_WORKSPACE_ACTIONS) !== "true") {
149
149
  return Promise.resolve(true);
150
150
  }
@@ -1593,7 +1593,7 @@ async function executeTools(assistantMsgId, toolCalls, ctx, append) {
1593
1593
  data: { callId: error.callId, question: error.question, type: error.type, options: error.options }
1594
1594
  });
1595
1595
  append(createChatDoneEvent(assistantMsgId, "waiting_for_user"));
1596
- const { awaitAnswer } = await import("./ask-ZYPCJKZD.js");
1596
+ const { awaitAnswer } = await import("./ask-UBIRH3SO.js");
1597
1597
  const answerPromise = awaitAnswer(error.callId);
1598
1598
  if (!answerPromise) {
1599
1599
  throw new Error(`No pending question found for callId: ${error.callId}`);
@@ -1903,6 +1903,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
1903
1903
  signal,
1904
1904
  subAgentAliases,
1905
1905
  ...config.retryPatterns ? { retryPatterns: config.retryPatterns } : {},
1906
+ ...config.suppressChatError ? { suppressChatError: true } : {},
1906
1907
  ...modelSettings && { modelSettings }
1907
1908
  });
1908
1909
  const result = await consumeStreamGenerator(streamGen, (event) => {
@@ -1950,22 +1951,35 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
1950
1951
  emitPartialDoneEvents(sessionId, assistantMsgId, statsIdentity, mode, turnMetrics, append, agentType);
1951
1952
  throw new Error("Aborted");
1952
1953
  }
1953
- turnMetrics.addLLMCall(
1954
- result.timing,
1955
- result.usage.promptTokens,
1956
- result.usage.completionTokens,
1957
- previousContextTokens,
1958
- result.modelParams
1959
- );
1960
- sessionManager.setCurrentContextSize(
1961
- sessionId,
1962
- result.usage.promptTokens,
1963
- result.usage.completionTokens,
1964
- config.subAgentMetadata?.subAgentId
1965
- );
1954
+ if (result.error) {
1955
+ const stats2 = turnMetrics.buildStats(statsIdentity, mode);
1956
+ append(
1957
+ createMessageDoneEvent(assistantMsgId, {
1958
+ segments: result.segments,
1959
+ stats: stats2
1960
+ })
1961
+ );
1962
+ append(createChatDoneEvent(assistantMsgId, "error", stats2, agentType));
1963
+ return { failed: { error: result.error } };
1964
+ }
1965
+ if (!result.error) {
1966
+ turnMetrics.addLLMCall(
1967
+ result.timing,
1968
+ result.usage.promptTokens,
1969
+ result.usage.completionTokens,
1970
+ previousContextTokens,
1971
+ result.modelParams
1972
+ );
1973
+ sessionManager.setCurrentContextSize(
1974
+ sessionId,
1975
+ result.usage.promptTokens,
1976
+ result.usage.completionTokens,
1977
+ config.subAgentMetadata?.subAgentId
1978
+ );
1979
+ }
1966
1980
  if (!compacting) {
1967
1981
  const contextState2 = sessionManager.getContextState(sessionId);
1968
- const { shouldCompact, appendCompactionPrompt } = await import("./compactor-SKVC2VNL.js");
1982
+ const { shouldCompact, appendCompactionPrompt } = await import("./compactor-LAXZLPPA.js");
1969
1983
  if (shouldCompact(
1970
1984
  contextState2.currentTokens,
1971
1985
  contextState2.maxTokens,
@@ -2335,7 +2349,7 @@ async function describeImageFromDataUrl(dataUrl, visionModel, options) {
2335
2349
  // src/server/context/image-processor.ts
2336
2350
  async function loadVisionModelFromGlobalConfig() {
2337
2351
  try {
2338
- const { loadGlobalConfig: loadGlobalConfig2, resolveVisionFallback } = await import("./config-EAB3V4QK.js");
2352
+ const { loadGlobalConfig: loadGlobalConfig2, resolveVisionFallback } = await import("./config-TUCHLIWD.js");
2339
2353
  const runtimeConfig = getRuntimeConfig();
2340
2354
  const mode = runtimeConfig.mode ?? "production";
2341
2355
  const globalConfig = await loadGlobalConfig2(mode);
@@ -2953,7 +2967,7 @@ var callSubAgentTool = {
2953
2967
  };
2954
2968
  }
2955
2969
  try {
2956
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-QYYNFMGU.js");
2970
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-KBS6X3EN.js");
2957
2971
  const toolRegistry = getToolRegistryForAgent2(agentDef);
2958
2972
  const turnMetrics = new TurnMetrics();
2959
2973
  const result = await executeSubAgent({
@@ -3975,7 +3989,7 @@ var mcpConfigTool = createTool(
3975
3989
  mcpNotifyChanged?.(sessionId);
3976
3990
  }
3977
3991
  async function rebuildTools() {
3978
- const { setMcpTools: setMcpTools2 } = await import("./tools-QYYNFMGU.js");
3992
+ const { setMcpTools: setMcpTools2 } = await import("./tools-KBS6X3EN.js");
3979
3993
  const mcpTools = createMcpTools(mcpManagerForTools);
3980
3994
  setMcpTools2(mcpTools);
3981
3995
  }
@@ -4400,33 +4414,20 @@ function getTasksService() {
4400
4414
  }
4401
4415
  return tasksService;
4402
4416
  }
4403
- var VALID_ACTIONS = [
4404
- "list",
4405
- "get",
4406
- "create",
4407
- "edit",
4408
- "move",
4409
- "set_gate_value",
4410
- "set_gates",
4411
- "duplicate",
4412
- "delete",
4413
- "reorder"
4414
- ];
4417
+ var VALID_ACTIONS = ["list", "create", "edit", "move", "set_gate_value", "delete"];
4418
+ var LIST_STATUSES = ["todo", "in_progress", "done", "all"];
4415
4419
  var projectTasksTool = createTool(
4416
4420
  "project_tasks",
4417
4421
  {
4418
4422
  type: "function",
4419
4423
  function: {
4420
4424
  name: "project_tasks",
4421
- description: "Work with the project task board \u2014 the kanban of tasks owned by this project. Provides full parity with the human UI: list, get, create, edit, move, fill gate values, set gate configuration, duplicate, delete, and reorder.\n\nRules:\n- Moving a task to in_progress binds it to YOUR current session (you never create a new session for it).\n- Entering 'done' is blocked by unmet column gates (definition of done). When blocked, the error lists the missing fields; set them with action=set_gate_value (filling proof/evidence as part of your work), then retry the move.\n- All transitions are serialized server-side. If another actor changed the task, you get a CONFLICT error: re-list and retry.\n\nActions:\n- list: list all tasks (with gate values, status, queue position, bound session, audit trail)\n- get: fetch a single task (taskId)\n- create: create a task in To Do (prompt must contain text or an attachment)\n- edit: update prompt/attachments/agent/model (taskId + any fields)\n- move: change state \u2014 to: 'todo' | 'in_progress' | 'done' (optional reason for reverts)\n- set_gate_value: fill a gate field (taskId, gateId, value)\n- set_gates: replace the project gate configuration (gates: array of {id, name, description, required, variant})\n- duplicate: copy a task into To Do (taskId)\n- delete: permanently delete a task (taskId). Sessions stay untouched.\n- reorder: move a task to an index within its column (taskId, status, index)",
4425
+ description: "Kanban task board for this project. Core loop: list \u2192 move \u2192 set_gate_value.\n\nRules:\n- Moving to in_progress binds the task to YOUR current session.\n- Moving to done is blocked by unmet gates: the error names the missing fields \u2014 fill them via set_gate_value (that's part of the work), then retry the move.\n- Stale writes fail with CONFLICT \u2014 re-list and retry.\n\nActions:\n- list: tasks (status, gate values, queue position, bound session, audit trail); defaults to open tasks, filter via status (todo | in_progress | done | all)\n- create: add a task to To Do (prompt required)\n- edit: update prompt/attachments/agent/model (taskId + fields)\n- move: change column (to: todo | in_progress | done; optional reason)\n- set_gate_value: fill a gate field (taskId, gateId, value)\n- delete: remove a task (taskId)",
4422
4426
  parameters: {
4423
4427
  type: "object",
4424
4428
  properties: {
4425
4429
  action: { type: "string", enum: VALID_ACTIONS, description: "The action to perform" },
4426
- taskId: {
4427
- type: "string",
4428
- description: "Target task id (get, edit, move, set_gate_value, duplicate, delete, reorder)"
4429
- },
4430
+ taskId: { type: "string", description: "Target task id (edit, move, set_gate_value, delete)" },
4430
4431
  prompt: { type: "string", description: "The prompt/instruction executed when the task launches" },
4431
4432
  attachments: { type: "array", description: "Optional attachments (same shape as chat attachments)" },
4432
4433
  agentId: { type: "string", description: "Selected agent id" },
@@ -4436,15 +4437,14 @@ var projectTasksTool = createTool(
4436
4437
  reason: { type: "string", description: "Optional short reason (recorded in the audit trail) for reverts" },
4437
4438
  gateId: { type: "string", description: "Gate field id for set_gate_value" },
4438
4439
  value: { type: "string", description: "Proof/evidence value for set_gate_value" },
4439
- gates: {
4440
- type: "array",
4441
- description: "Full replacement gate config: [{id, name, description, required, variant}]"
4440
+ status: {
4441
+ type: "string",
4442
+ enum: ["todo", "in_progress", "done", "all"],
4443
+ description: "Column filter for action=list (default: open tasks)"
4442
4444
  },
4443
- status: { type: "string", enum: ["todo", "in_progress", "done"], description: "Column for reorder" },
4444
- index: { type: "number", description: "Zero-based target index within the column (reorder)" },
4445
4445
  expectedVersion: {
4446
4446
  type: "number",
4447
- description: "Optimistic concurrency guard \u2014 pass the task version you saw; stale writes fail with CONFLICT"
4447
+ description: "Task version from your last read; stale writes fail with CONFLICT"
4448
4448
  }
4449
4449
  },
4450
4450
  required: ["action"]
@@ -4463,15 +4463,16 @@ var projectTasksTool = createTool(
4463
4463
  try {
4464
4464
  switch (action) {
4465
4465
  case "list": {
4466
+ const status = args.status;
4467
+ if (status !== void 0 && !LIST_STATUSES.includes(status)) {
4468
+ return helpers.error(
4469
+ `Invalid "status" filter for action=list: "${String(status)}". Expected one of: todo, in_progress, done, all.`
4470
+ );
4471
+ }
4466
4472
  const tasks = svc.list(projectId);
4473
+ const filtered = status === "all" ? tasks : tasks.filter((t) => status === void 0 ? t.status !== "done" : t.status === status);
4467
4474
  const gates = getGateConfig(projectId);
4468
- return helpers.success(JSON.stringify({ gates, tasks: tasks.map((t) => taskForAgent(t)) }, null, 2));
4469
- }
4470
- case "get": {
4471
- if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=get');
4472
- const task = svc.get(projectId, args.taskId);
4473
- if (!task) return helpers.error(`Task not found: ${args.taskId}`);
4474
- return helpers.success(JSON.stringify(taskForAgent(task), null, 2));
4475
+ return helpers.success(JSON.stringify({ gates, tasks: filtered.map((t) => taskForAgent(t)) }, null, 2));
4475
4476
  }
4476
4477
  case "create": {
4477
4478
  const task = svc.create(
@@ -4532,19 +4533,6 @@ var projectTasksTool = createTool(
4532
4533
  );
4533
4534
  return helpers.success(JSON.stringify(taskForAgent(result.task), null, 2));
4534
4535
  }
4535
- case "set_gates": {
4536
- if (!Array.isArray(args.gates)) {
4537
- return helpers.error('Parameter "gates" (array) is required for action=set_gates');
4538
- }
4539
- const gates = sanitizeGates(args.gates);
4540
- svc.setGateConfig(projectId, gates, actor);
4541
- return helpers.success(JSON.stringify({ gates }, null, 2));
4542
- }
4543
- case "duplicate": {
4544
- if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=duplicate');
4545
- const task = svc.duplicate(projectId, args.taskId, actor);
4546
- return helpers.success(JSON.stringify(taskForAgent(task), null, 2));
4547
- }
4548
4536
  case "delete": {
4549
4537
  if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=delete');
4550
4538
  const task = svc.get(projectId, args.taskId);
@@ -4558,14 +4546,6 @@ var projectTasksTool = createTool(
4558
4546
  )
4559
4547
  );
4560
4548
  }
4561
- case "reorder": {
4562
- if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=reorder');
4563
- if (!args.status || args.index === void 0) {
4564
- return helpers.error('Parameters "status" and "index" are required for action=reorder');
4565
- }
4566
- const task = svc.reorder(projectId, args.taskId, args.status, args.index);
4567
- return helpers.success(JSON.stringify(taskForAgent(task), null, 2));
4568
- }
4569
4549
  default:
4570
4550
  return helpers.error(`Unknown action: ${String(action)}`);
4571
4551
  }
@@ -4611,18 +4591,6 @@ function sanitizeAttachments(raw) {
4611
4591
  (a) => typeof a === "object" && a !== null && typeof a.id === "string" && typeof a.filename === "string"
4612
4592
  );
4613
4593
  }
4614
- function sanitizeGates(raw) {
4615
- return raw.map((g, i) => {
4616
- const gate = g;
4617
- return {
4618
- id: typeof gate.id === "string" && gate.id ? gate.id : `gate_${i}`,
4619
- name: typeof gate.name === "string" && gate.name ? gate.name : `Gate ${i + 1}`,
4620
- description: typeof gate.description === "string" ? gate.description : "",
4621
- required: gate.required !== false,
4622
- variant: gate.variant === "ready" ? "ready" : "done"
4623
- };
4624
- });
4625
- }
4626
4594
 
4627
4595
  // src/server/tools/index.ts
4628
4596
  var _builtInTools;
@@ -4905,4 +4873,4 @@ export {
4905
4873
  getToolRegistryForAgent,
4906
4874
  createToolRegistry
4907
4875
  };
4908
- //# sourceMappingURL=chunk-JFK4GKQD.js.map
4876
+ //# sourceMappingURL=chunk-4HV3PDEK.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  combineEventsWithSnapshot,
3
3
  getEventStore
4
- } from "./chunk-ERNWAKUB.js";
4
+ } from "./chunk-TGVDUK4N.js";
5
5
  import {
6
6
  updateSessionMetadata
7
- } from "./chunk-VWEATA7R.js";
7
+ } from "./chunk-KLQEL2DZ.js";
8
8
  import {
9
9
  createContextStateMessage,
10
10
  createSessionStateMessage
11
- } from "./chunk-I7FY2LTR.js";
11
+ } from "./chunk-4GHLULHB.js";
12
12
  import {
13
13
  getPendingQuestionsForSession
14
14
  } from "./chunk-JURM3RPZ.js";
@@ -153,7 +153,7 @@ async function generateSessionNameForSession(sessionId, userMessage, deps, signa
153
153
  client = deps.getLLMClient();
154
154
  client.setModel(providerConfig.model);
155
155
  } else if (providerConfig) {
156
- const { createLLMClient } = await import("./client-KE7EDI2D.js");
156
+ const { createLLMClient } = await import("./client-KCNTDTIR.js");
157
157
  client = createLLMClient({
158
158
  llm: {
159
159
  baseUrl: providerConfig.baseUrl,
@@ -204,4 +204,4 @@ export {
204
204
  needsNameGeneration,
205
205
  generateSessionNameForSession
206
206
  };
207
- //# sourceMappingURL=chunk-TGLVWAFC.js.map
207
+ //# sourceMappingURL=chunk-6XHDNSA3.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __commonJS,
3
3
  __toESM
4
- } from "./chunk-5WRI5ZAA.js";
4
+ } from "./chunk-YLJ4XMA6.js";
5
5
 
6
6
  // node_modules/sisteransi/src/index.js
7
7
  var require_src = __commonJS({
@@ -1295,4 +1295,4 @@ export {
1295
1295
  select,
1296
1296
  text
1297
1297
  };
1298
- //# sourceMappingURL=chunk-4H427UBV.js.map
1298
+ //# sourceMappingURL=chunk-AGXJ5O63.js.map
@@ -2,24 +2,24 @@ import {
2
2
  generateSessionNameForSession,
3
3
  getSessionMessageCount,
4
4
  needsNameGeneration
5
- } from "./chunk-TGLVWAFC.js";
5
+ } from "./chunk-6XHDNSA3.js";
6
6
  import {
7
7
  launchWorkflowRun
8
- } from "./chunk-3QQAIUZI.js";
8
+ } from "./chunk-HYPXL7K5.js";
9
9
  import {
10
10
  runChatTurn
11
- } from "./chunk-3NPLERPQ.js";
11
+ } from "./chunk-U4HMAYAD.js";
12
12
  import {
13
13
  devServerManager
14
- } from "./chunk-JFK4GKQD.js";
14
+ } from "./chunk-4HV3PDEK.js";
15
15
  import {
16
16
  applyDynamicContext,
17
17
  computeSessionHash,
18
18
  computeUnifiedDiff
19
- } from "./chunk-TFF5T3K3.js";
19
+ } from "./chunk-SQLJRO3J.js";
20
20
  import {
21
21
  appendCompactionPrompt
22
- } from "./chunk-BWVO5WFK.js";
22
+ } from "./chunk-X3XKYGUN.js";
23
23
  import {
24
24
  onProcessEvent
25
25
  } from "./chunk-ZTOG6LJD.js";
@@ -32,7 +32,7 @@ import {
32
32
  import {
33
33
  combineEventsWithSnapshot,
34
34
  getEventStore
35
- } from "./chunk-ERNWAKUB.js";
35
+ } from "./chunk-TGVDUK4N.js";
36
36
  import {
37
37
  createChatErrorMessage,
38
38
  createChatMessageMessage,
@@ -47,7 +47,7 @@ import {
47
47
  parseClientMessage,
48
48
  serializeServerMessage,
49
49
  storedEventToServerMessage
50
- } from "./chunk-I7FY2LTR.js";
50
+ } from "./chunk-4GHLULHB.js";
51
51
  import {
52
52
  getPlatformShell
53
53
  } from "./chunk-AESOGRFK.js";
@@ -70,7 +70,7 @@ import {
70
70
  } from "./chunk-K44MW7JJ.js";
71
71
  import {
72
72
  createServerMessage
73
- } from "./chunk-X25Q6RAV.js";
73
+ } from "./chunk-ZKLE2Q3I.js";
74
74
 
75
75
  // src/server/ws/server.ts
76
76
  import { WebSocketServer, WebSocket as WebSocket2 } from "ws";
@@ -885,7 +885,7 @@ function createWebSocketServer(httpServer, _config, getLLMClient, getActiveProvi
885
885
  const { messages, hiddenCount } = buildMessagesFromStoredEvents(events, maxVisible || void 0);
886
886
  const pendingConfirmations = foldPendingConfirmations(events);
887
887
  const pendingQuestions = getPendingQuestionsForSession(updatedSession.id);
888
- const activeWorkflowExecution = sessionManager.getActiveWorkflowExecution(updatedSession.id);
888
+ const activeWorkflowExecution = sessionManager.getDisplayWorkflowExecution(updatedSession.id);
889
889
  const effectiveWorkdir = updatedSession.workspace ?? updatedSession.workdir;
890
890
  for (const [, client] of clients) {
891
891
  if (client.activeSessionId === updatedSession.id && client.activeWorkdir !== effectiveWorkdir) {
@@ -1266,15 +1266,16 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
1266
1266
  break;
1267
1267
  }
1268
1268
  case "context.applyDynamic.preview": {
1269
- if (!client.activeSessionId) {
1269
+ const payload = message.payload;
1270
+ const sessionId = payload?.sessionId ?? client.activeSessionId;
1271
+ if (!sessionId) {
1270
1272
  send(createErrorMessage("NO_SESSION", "No active session", message.id));
1271
1273
  return;
1272
1274
  }
1273
- const sessionId = client.activeSessionId;
1274
1275
  const session = sessionManager.requireSession(sessionId);
1275
1276
  try {
1276
- const { buildCachedPrompt } = await import("./dynamic-context-QNB4ELLP.js");
1277
- const allAgents = await import("./registry-5XI5NDBF.js");
1277
+ const { buildCachedPrompt } = await import("./dynamic-context-YHWFFP53.js");
1278
+ const allAgents = await import("./registry-5QL3BOWN.js");
1278
1279
  const agentDef = allAgents.findAgentById(session.mode, await allAgents.loadAllAgentsDefault()) ?? allAgents.findAgentById("planner", await allAgents.loadAllAgentsDefault());
1279
1280
  const modelName = session.providerModel ?? _providerManager?.getCurrentModel();
1280
1281
  const { systemPrompt: newPrompt, hash: newHash } = await buildCachedPrompt(
@@ -1313,11 +1314,12 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
1313
1314
  break;
1314
1315
  }
1315
1316
  case "context.applyDynamic": {
1316
- if (!client.activeSessionId) {
1317
+ const payload = message.payload;
1318
+ const sessionId = payload?.sessionId ?? client.activeSessionId;
1319
+ if (!sessionId) {
1317
1320
  send(createErrorMessage("NO_SESSION", "No active session", message.id));
1318
1321
  return;
1319
1322
  }
1320
- const sessionId = client.activeSessionId;
1321
1323
  const session = sessionManager.requireSession(sessionId);
1322
1324
  if (session.isRunning) {
1323
1325
  send(createErrorMessage("SESSION_RUNNING", "Cannot apply dynamic context while session is running", message.id));
@@ -1542,4 +1544,4 @@ export {
1542
1544
  signalMcpReady,
1543
1545
  createWebSocketServer
1544
1546
  };
1545
- //# sourceMappingURL=chunk-OKVHMKE2.js.map
1547
+ //# sourceMappingURL=chunk-BH3BBUGB.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  updateSessionMcpDisabledServers
3
- } from "./chunk-VWEATA7R.js";
3
+ } from "./chunk-KLQEL2DZ.js";
4
4
  import {
5
5
  getDatabase
6
6
  } from "./chunk-5PT4UMRR.js";
@@ -62,4 +62,4 @@ export {
62
62
  clearSessionOverrides,
63
63
  getAllSessionOverrides
64
64
  };
65
- //# sourceMappingURL=chunk-OCSTEGK7.js.map
65
+ //# sourceMappingURL=chunk-EQ5CGNOT.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-J2GP3J3X.js";
4
4
  import {
5
5
  getModelProfile
6
- } from "./chunk-V4IE7HJY.js";
6
+ } from "./chunk-W7VIYHPQ.js";
7
7
  import {
8
8
  getBackendCapabilities
9
9
  } from "./chunk-AZHWLLPP.js";
@@ -84,7 +84,7 @@ function computeAggregatedStats(input) {
84
84
  }
85
85
 
86
86
  // src/server/chat/stream-pure.ts
87
- function createEmptyStreamResult(aborted, modelParams, patternMatch) {
87
+ function createEmptyStreamResult(aborted, modelParams, patternMatch, error) {
88
88
  return {
89
89
  content: "",
90
90
  toolCalls: [],
@@ -94,7 +94,8 @@ function createEmptyStreamResult(aborted, modelParams, patternMatch) {
94
94
  aborted,
95
95
  modelParams,
96
96
  finishReason: "stop",
97
- ...patternMatch ? { patternMatch } : {}
97
+ ...patternMatch ? { patternMatch } : {},
98
+ ...error ? { error } : {}
98
99
  };
99
100
  }
100
101
  async function* streamLLMPure(options) {
@@ -142,6 +143,7 @@ async function* streamLLMPure(options) {
142
143
  const toolArgs = /* @__PURE__ */ new Map();
143
144
  let result = null;
144
145
  let aborted = false;
146
+ let streamError;
145
147
  let accumulatedContent = "";
146
148
  let accumulatedThinking = "";
147
149
  let patternMatch;
@@ -241,6 +243,8 @@ async function* streamLLMPure(options) {
241
243
  }
242
244
  case "error":
243
245
  if (signal?.aborted) break;
246
+ streamError = value.error;
247
+ if (options.suppressChatError) break;
244
248
  yield {
245
249
  type: "chat.error",
246
250
  data: { error: value.error, recoverable: true }
@@ -267,7 +271,7 @@ async function* streamLLMPure(options) {
267
271
  return createEmptyStreamResult(false, modelParams, patternMatch);
268
272
  }
269
273
  if (!result) {
270
- return createEmptyStreamResult(aborted, modelParams);
274
+ return createEmptyStreamResult(aborted, modelParams, void 0, streamError);
271
275
  }
272
276
  const baseResult = {
273
277
  content: result.content,
@@ -438,4 +442,4 @@ export {
438
442
  createChatDoneEvent,
439
443
  consumeStreamGenerator
440
444
  };
441
- //# sourceMappingURL=chunk-YX3OQBNX.js.map
445
+ //# sourceMappingURL=chunk-EQ7DK2TG.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createLLMClient
3
- } from "./chunk-JGWHRYWG.js";
3
+ } from "./chunk-MKWS7TQH.js";
4
4
  import {
5
5
  getModelProfile
6
- } from "./chunk-V4IE7HJY.js";
6
+ } from "./chunk-W7VIYHPQ.js";
7
7
  import {
8
8
  getBackendCapabilities
9
9
  } from "./chunk-AZHWLLPP.js";
@@ -803,4 +803,4 @@ export {
803
803
  parseDefaultModelSelection,
804
804
  createProviderManager
805
805
  };
806
- //# sourceMappingURL=chunk-BVVCRIVM.js.map
806
+ //# sourceMappingURL=chunk-GZTMCTUS.js.map
@@ -0,0 +1,7 @@
1
+ // src/constants.ts
2
+ var VERSION = "2.0.116";
3
+
4
+ export {
5
+ VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-HNHSUQCN.js.map