openfox 2.0.143 → 2.0.145

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 (69) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/CHANGELOG.md +17 -0
  3. package/dist/auto-continue-ZAHNBHPA.js +111 -0
  4. package/dist/{chat-handler-VDB4CSXK.js → chat-handler-5XMO5XBU.js} +26 -25
  5. package/dist/{chunk-QZV3M6V5.js → chunk-2BARKBWV.js} +18 -16
  6. package/dist/{chunk-EX6ROYYS.js → chunk-2DBWCXAQ.js} +3 -3
  7. package/dist/chunk-2DVAF6HY.js +447 -0
  8. package/dist/{chunk-CYTC2E3O.js → chunk-3IVJ65IG.js} +12 -10
  9. package/dist/{chunk-HZOL7UEC.js → chunk-6FKSGQYO.js} +4 -4
  10. package/dist/{chunk-KVDOPLXJ.js → chunk-AWBV2VXO.js} +2 -2
  11. package/dist/{chunk-F3R4YS3F.js → chunk-CCIG3YLG.js} +2 -2
  12. package/dist/{chunk-IMQDO5EJ.js → chunk-DBTDMK23.js} +124 -107
  13. package/dist/{chunk-2CEZQAGQ.js → chunk-DJH6LMBT.js} +2 -2
  14. package/dist/{chunk-EFEHIJXF.js → chunk-E4F32L4Q.js} +2 -2
  15. package/dist/{chunk-CTAYPMB2.js → chunk-FAN4P45J.js} +2 -2
  16. package/dist/{chunk-5KA3L46F.js → chunk-FLTNKZNQ.js} +9 -9
  17. package/dist/{chunk-DNL2NUDB.js → chunk-GZ4EK4LZ.js} +2 -2
  18. package/dist/{chunk-H3QN2J4X.js → chunk-HNJ32GRI.js} +10 -8
  19. package/dist/{chunk-FHBLF2QR.js → chunk-L2RESXUF.js} +2 -2
  20. package/dist/{chunk-VKZBCC75.js → chunk-LG3LQLTZ.js} +13 -11
  21. package/dist/{chunk-DQEANXXF.js → chunk-ODETQHMI.js} +3 -3
  22. package/dist/{chunk-Z4CTMGFH.js → chunk-QKPTMHA2.js} +80 -53
  23. package/dist/chunk-QV4BKKIO.js +7 -0
  24. package/dist/{chunk-N5AJHJG5.js → chunk-STVJA7IX.js} +3 -3
  25. package/dist/{chunk-WSDR27YV.js → chunk-UO4X2ENE.js} +2 -2
  26. package/dist/{chunk-SJTBOREW.js → chunk-VFHGN3IS.js} +4 -4
  27. package/dist/{chunk-7XA3MEX2.js → chunk-X2BJFVER.js} +24 -22
  28. package/dist/{chunk-SKNPOZYP.js → chunk-X6SWZEK7.js} +3 -1
  29. package/dist/{chunk-TIIWXMGE.js → chunk-X7ZAP6YW.js} +2 -2
  30. package/dist/{chunk-MEPTCUYN.js → chunk-YEFZ5HBD.js} +2 -2
  31. package/dist/{chunk-DRIR2IZR.js → chunk-YEW4YEJU.js} +2 -2
  32. package/dist/{chunk-NJFXYSXP.js → chunk-YRSZJ7IZ.js} +11 -441
  33. package/dist/{chunk-Z7IT3V22.js → chunk-ZONLEX2F.js} +8 -4
  34. package/dist/cli/dev.js +1 -1
  35. package/dist/cli/index.js +1 -1
  36. package/dist/{client-ZEGIB3MF.js → client-L4PANCG4.js} +4 -4
  37. package/dist/{compactor-2MSRXHVA.js → compactor-53WDNC2S.js} +11 -10
  38. package/dist/{describe-image-QSEMMRV7.js → describe-image-IGLGVEOJ.js} +12 -11
  39. package/dist/{dynamic-context-3THEBFBI.js → dynamic-context-7AJC6AII.js} +11 -10
  40. package/dist/{events-UAUOGRSV.js → events-ODZ4SSBW.js} +11 -9
  41. package/dist/{export-import-SYYISNTZ.js → export-import-AH5HBHO6.js} +10 -8
  42. package/dist/{folding-IHD244OU.js → folding-V2R2MZ6Y.js} +4 -4
  43. package/dist/{http-client-RA7XFYPO.js → http-client-SZZBSL4U.js} +3 -3
  44. package/dist/{launch-MF2VT7SU.js → launch-2QA2EHCT.js} +26 -25
  45. package/dist/{manager-4SMHCFXY.js → manager-PDG7RKPA.js} +4 -4
  46. package/dist/{orchestrator-BU4RJHPZ.js → orchestrator-L5VINV36.js} +25 -24
  47. package/dist/package.json +1 -1
  48. package/dist/{path-security-WOA6MTWQ.js → path-security-3YFS3GJQ.js} +9 -8
  49. package/dist/{platform-EAZNZDAE.js → platform-WCXMN4NM.js} +3 -3
  50. package/dist/{processor-IZ4EAHPD.js → processor-UQ5ITWL6.js} +25 -24
  51. package/dist/{provider-YNTH5YG5.js → provider-QE7XSGYA.js} +5 -5
  52. package/dist/{provider-manager-2UENHAAA.js → provider-manager-WW2EF76W.js} +5 -5
  53. package/dist/{registry-C7RKKHZB.js → registry-24U5BZAJ.js} +3 -3
  54. package/dist/{serve-KKAOO7YM.js → serve-CIBBSOLM.js} +31 -30
  55. package/dist/server/index.js +30 -29
  56. package/dist/{server-PVO4USPN.js → server-YW3DO4K5.js} +29 -28
  57. package/dist/{service-OQZWTW34.js → service-KMOSB6SU.js} +7 -7
  58. package/dist/{session-overrides-CKS2AVE5.js → session-overrides-GQKE7WGE.js} +5 -5
  59. package/dist/{sessions-DAHLRQE2.js → sessions-A3IZYL6X.js} +4 -4
  60. package/dist/{settings-TR4BF2C4.js → settings-FQUDSGZF.js} +2 -2
  61. package/dist/store-AOZ46PBS.js +23 -0
  62. package/dist/{tasks-WC23TK6I.js → tasks-X5DM553T.js} +7 -7
  63. package/dist/{tools-CECV6XQ6.js → tools-RG4HDV75.js} +30 -29
  64. package/dist/{update-6MBRWJAV.js → update-5ENWM2XR.js} +2 -2
  65. package/dist/web/assets/{index-CxuR2kCS.js → index-DL26wmhi.js} +74 -74
  66. package/dist/web/index.html +1 -1
  67. package/dist/web/sw.js +1 -1
  68. package/package.json +1 -1
  69. package/dist/chunk-6DLQ2AV4.js +0 -7
@@ -11,7 +11,7 @@ import {
11
11
  deleteSetting,
12
12
  getSetting,
13
13
  setSetting
14
- } from "./chunk-SKNPOZYP.js";
14
+ } from "./chunk-X6SWZEK7.js";
15
15
 
16
16
  // src/server/context/instructions.ts
17
17
  import { readFile, access } from "fs/promises";
@@ -452,4 +452,4 @@ export {
452
452
  deleteSkill,
453
453
  deleteProjectSkill
454
454
  };
455
- //# sourceMappingURL=chunk-2CEZQAGQ.js.map
455
+ //# sourceMappingURL=chunk-DJH6LMBT.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveDefaultAgentId
3
- } from "./chunk-DRIR2IZR.js";
3
+ } from "./chunk-YEW4YEJU.js";
4
4
  import {
5
5
  normalizeAskOptions
6
6
  } from "./chunk-LCLH6ZUL.js";
@@ -983,4 +983,4 @@ export {
983
983
  buildSnapshot,
984
984
  buildSnapshotFromSessionState
985
985
  };
986
- //# sourceMappingURL=chunk-EFEHIJXF.js.map
986
+ //# sourceMappingURL=chunk-E4F32L4Q.js.map
@@ -210,7 +210,7 @@ async function* streamLLMPure(options) {
210
210
  };
211
211
  } else if (seenToolIndices.has(value.index) && value.arguments) {
212
212
  const name = toolNames.get(value.index);
213
- if (name === "run_command" || name === "return_value") {
213
+ if (name === "run_command" || name === "return_value" || name === "session_metadata") {
214
214
  const accumulatedArgs = toolArgs.get(value.index);
215
215
  if (accumulatedArgs) {
216
216
  yield {
@@ -520,4 +520,4 @@ export {
520
520
  createChatDoneEvent,
521
521
  consumeStreamGenerator
522
522
  };
523
- //# sourceMappingURL=chunk-CTAYPMB2.js.map
523
+ //# sourceMappingURL=chunk-FAN4P45J.js.map
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  serverT
3
- } from "./chunk-TIIWXMGE.js";
4
- import {
5
- AskUserInterrupt
6
- } from "./chunk-V5AC2TV7.js";
3
+ } from "./chunk-X7ZAP6YW.js";
7
4
  import {
8
5
  PathAccessDeniedError,
9
6
  registerPathConfirmation,
10
7
  requestPathAccess
11
- } from "./chunk-N5AJHJG5.js";
8
+ } from "./chunk-STVJA7IX.js";
12
9
  import {
13
10
  getEventStore
14
- } from "./chunk-NJFXYSXP.js";
11
+ } from "./chunk-YRSZJ7IZ.js";
15
12
  import {
16
13
  getRuntimeConfig
17
- } from "./chunk-DRIR2IZR.js";
14
+ } from "./chunk-YEW4YEJU.js";
15
+ import {
16
+ AskUserInterrupt
17
+ } from "./chunk-V5AC2TV7.js";
18
18
  import {
19
19
  createChatPathConfirmationMessage
20
20
  } from "./chunk-OVAHNEFG.js";
@@ -48,7 +48,7 @@ async function requestUserConfirmation(context, toolLabel, desc) {
48
48
  if (context.dangerLevel === "dangerous") return Promise.resolve(true);
49
49
  if (toolLabel === "workspace" || toolLabel === "command") {
50
50
  try {
51
- const { getSetting, SETTINGS_KEYS } = await import("./settings-TR4BF2C4.js");
51
+ const { getSetting, SETTINGS_KEYS } = await import("./settings-FQUDSGZF.js");
52
52
  if (getSetting(SETTINGS_KEYS.CONFIRM_ON_WORKSPACE_ACTIONS) !== "true") {
53
53
  return Promise.resolve(true);
54
54
  }
@@ -1152,4 +1152,4 @@ export {
1152
1152
  isDescribeImageEligible,
1153
1153
  describeImageTool
1154
1154
  };
1155
- //# sourceMappingURL=chunk-5KA3L46F.js.map
1155
+ //# sourceMappingURL=chunk-FLTNKZNQ.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SETTINGS_KEYS,
3
3
  getSetting
4
- } from "./chunk-SKNPOZYP.js";
4
+ } from "./chunk-X6SWZEK7.js";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-K44MW7JJ.js";
@@ -194,4 +194,4 @@ export {
194
194
  ChatHttpClient,
195
195
  OpenAIHttpClient
196
196
  };
197
- //# sourceMappingURL=chunk-DNL2NUDB.js.map
197
+ //# sourceMappingURL=chunk-GZ4EK4LZ.js.map
@@ -1,21 +1,23 @@
1
1
  import {
2
2
  getAllInstructions,
3
3
  getEnabledSkillMetadata
4
- } from "./chunk-2CEZQAGQ.js";
4
+ } from "./chunk-DJH6LMBT.js";
5
5
  import {
6
6
  buildTopLevelSystemPrompt
7
- } from "./chunk-Z7IT3V22.js";
7
+ } from "./chunk-ZONLEX2F.js";
8
+ import {
9
+ getCurrentContextWindowId
10
+ } from "./chunk-2DVAF6HY.js";
8
11
  import {
9
- getCurrentContextWindowId,
10
12
  getEventStore
11
- } from "./chunk-NJFXYSXP.js";
13
+ } from "./chunk-YRSZJ7IZ.js";
12
14
  import {
13
15
  findAgentById,
14
16
  getRuntimeConfig,
15
17
  getSubAgents,
16
18
  loadAllAgentsDefault,
17
19
  resolveDefaultAgentId
18
- } from "./chunk-DRIR2IZR.js";
20
+ } from "./chunk-YEW4YEJU.js";
19
21
  import {
20
22
  logger
21
23
  } from "./chunk-K44MW7JJ.js";
@@ -327,8 +329,8 @@ function resolveAgentDef(sessionManager, sessionId) {
327
329
  });
328
330
  }
329
331
  async function getEffectiveToolDefinitions(agentDef, sessionId, modelName) {
330
- const { getToolRegistryForAgent } = await import("./tools-CECV6XQ6.js");
331
- const { isDescribeImageEligible } = await import("./describe-image-QSEMMRV7.js");
332
+ const { getToolRegistryForAgent } = await import("./tools-RG4HDV75.js");
333
+ const { isDescribeImageEligible } = await import("./describe-image-IGLGVEOJ.js");
332
334
  const all = getToolRegistryForAgent(agentDef, sessionId).definitions;
333
335
  const eligible = await isDescribeImageEligible(modelName);
334
336
  if (eligible) return all;
@@ -396,4 +398,4 @@ export {
396
398
  computeSessionHash,
397
399
  applyDynamicContext
398
400
  };
399
- //# sourceMappingURL=chunk-H3QN2J4X.js.map
401
+ //# sourceMappingURL=chunk-HNJ32GRI.js.map
@@ -20,7 +20,7 @@ import {
20
20
  DONE,
21
21
  LLMError,
22
22
  OpenAIHttpClient
23
- } from "./chunk-DNL2NUDB.js";
23
+ } from "./chunk-GZ4EK4LZ.js";
24
24
  import {
25
25
  logger
26
26
  } from "./chunk-K44MW7JJ.js";
@@ -825,4 +825,4 @@ function createLLMClient(config, initialBackend = config.llm.backend ?? "unknown
825
825
  export {
826
826
  createLLMClient
827
827
  };
828
- //# sourceMappingURL=chunk-FHBLF2QR.js.map
828
+ //# sourceMappingURL=chunk-L2RESXUF.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runAgentTurn
3
- } from "./chunk-QZV3M6V5.js";
3
+ } from "./chunk-2BARKBWV.js";
4
4
  import {
5
5
  executeSubAgent,
6
6
  getToolRegistryForAgent
7
- } from "./chunk-Z4CTMGFH.js";
7
+ } from "./chunk-QKPTMHA2.js";
8
8
  import {
9
9
  gitSpawnEnv
10
10
  } from "./chunk-J7GAZGZT.js";
@@ -15,39 +15,41 @@ import {
15
15
  loadProjectWorkflows,
16
16
  loadUserWorkflows,
17
17
  normalizeWorkflowScope
18
- } from "./chunk-EX6ROYYS.js";
18
+ } from "./chunk-2DBWCXAQ.js";
19
19
  import {
20
20
  serverT
21
- } from "./chunk-TIIWXMGE.js";
21
+ } from "./chunk-X7ZAP6YW.js";
22
22
  import {
23
23
  TurnMetrics,
24
24
  createMessageStartEvent
25
- } from "./chunk-CTAYPMB2.js";
25
+ } from "./chunk-FAN4P45J.js";
26
26
  import {
27
27
  checkAborted,
28
28
  decodeUtf8,
29
29
  spawnShellProcess
30
- } from "./chunk-DQEANXXF.js";
30
+ } from "./chunk-ODETQHMI.js";
31
31
  import {
32
32
  terminateProcessTree
33
33
  } from "./chunk-I72ACQ6R.js";
34
34
  import {
35
- getCurrentContextWindowId,
35
+ getCurrentContextWindowId
36
+ } from "./chunk-2DVAF6HY.js";
37
+ import {
36
38
  getEventStore
37
- } from "./chunk-NJFXYSXP.js";
39
+ } from "./chunk-YRSZJ7IZ.js";
38
40
  import {
39
41
  findAgentById,
40
42
  getRuntimeConfig,
41
43
  loadAllAgentsDefault,
42
44
  resolveDefaultAgentId
43
- } from "./chunk-DRIR2IZR.js";
45
+ } from "./chunk-YEW4YEJU.js";
44
46
  import {
45
47
  createChatMessageMessage,
46
48
  createSessionRunningMessage
47
49
  } from "./chunk-OVAHNEFG.js";
48
50
  import {
49
51
  LLMError
50
- } from "./chunk-DNL2NUDB.js";
52
+ } from "./chunk-GZ4EK4LZ.js";
51
53
  import {
52
54
  logger
53
55
  } from "./chunk-K44MW7JJ.js";
@@ -1024,4 +1026,4 @@ export {
1024
1026
  abortRunnerRun,
1025
1027
  launchWorkflowRun
1026
1028
  };
1027
- //# sourceMappingURL=chunk-VKZBCC75.js.map
1029
+ //# sourceMappingURL=chunk-LG3LQLTZ.js.map
@@ -11,11 +11,11 @@ import {
11
11
  } from "./chunk-I72ACQ6R.js";
12
12
  import {
13
13
  getPlatformShell
14
- } from "./chunk-MEPTCUYN.js";
14
+ } from "./chunk-YEFZ5HBD.js";
15
15
  import {
16
16
  SETTINGS_KEYS,
17
17
  getSetting
18
- } from "./chunk-SKNPOZYP.js";
18
+ } from "./chunk-X6SWZEK7.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-DQEANXXF.js.map
217
+ //# sourceMappingURL=chunk-ODETQHMI.js.map
@@ -1,10 +1,13 @@
1
+ import {
2
+ applyMcpServerUpdate
3
+ } from "./chunk-OAN4BXEW.js";
1
4
  import {
2
5
  findSkillById,
3
6
  getAllInstructions,
4
7
  getEnabledSkillMetadata,
5
8
  isSkillEnabled,
6
9
  loadAllSkills
7
- } from "./chunk-2CEZQAGQ.js";
10
+ } from "./chunk-DJH6LMBT.js";
8
11
  import {
9
12
  getGitBranch,
10
13
  isGitRepository,
@@ -14,10 +17,10 @@ import {
14
17
  getGateConfig,
15
18
  isTaskConflictError,
16
19
  isTaskGateError
17
- } from "./chunk-EX6ROYYS.js";
20
+ } from "./chunk-2DBWCXAQ.js";
18
21
  import {
19
22
  getSessionDisabledServers
20
- } from "./chunk-WSDR27YV.js";
23
+ } from "./chunk-UO4X2ENE.js";
21
24
  import {
22
25
  buildSignal,
23
26
  computeFileHash,
@@ -33,10 +36,16 @@ import {
33
36
  requireSession,
34
37
  validateActionWithPermission,
35
38
  validateFileForWrite
36
- } from "./chunk-5KA3L46F.js";
39
+ } from "./chunk-FLTNKZNQ.js";
37
40
  import {
38
41
  serverT
39
- } from "./chunk-TIIWXMGE.js";
42
+ } from "./chunk-X7ZAP6YW.js";
43
+ import {
44
+ PathAccessDeniedError,
45
+ extractAbsolutePathsFromCommand,
46
+ extractSensitivePathsFromCommand,
47
+ resolveRelativeTraversals
48
+ } from "./chunk-STVJA7IX.js";
40
49
  import {
41
50
  TurnMetrics,
42
51
  clearLLMFailure,
@@ -50,12 +59,14 @@ import {
50
59
  recordLLMFailure,
51
60
  sleepThroughRetryBackoff,
52
61
  streamLLMPure
53
- } from "./chunk-CTAYPMB2.js";
62
+ } from "./chunk-FAN4P45J.js";
54
63
  import {
55
64
  COMPACTION_PROMPT,
65
+ CONTINUE_AFTER_STREAM_ERROR_PROMPT,
66
+ CONTINUE_PROMPT,
56
67
  buildBasePrompt,
57
68
  computeEffectiveTools
58
- } from "./chunk-Z7IT3V22.js";
69
+ } from "./chunk-ZONLEX2F.js";
59
70
  import {
60
71
  startInspectProxy
61
72
  } from "./chunk-VGE6UYND.js";
@@ -72,7 +83,7 @@ import {
72
83
  spawnShellProcess,
73
84
  startProcessCommand,
74
85
  stopProcess
75
- } from "./chunk-DQEANXXF.js";
86
+ } from "./chunk-ODETQHMI.js";
76
87
  import {
77
88
  getMaxPerSession,
78
89
  getSessionProcessCount,
@@ -81,24 +92,13 @@ import {
81
92
  import {
82
93
  createMcpTools
83
94
  } from "./chunk-VIJVLLPT.js";
84
- import {
85
- applyMcpServerUpdate
86
- } from "./chunk-OAN4BXEW.js";
87
- import {
88
- AskUserInterrupt,
89
- askUserTool
90
- } from "./chunk-V5AC2TV7.js";
91
- import {
92
- PathAccessDeniedError,
93
- extractAbsolutePathsFromCommand,
94
- extractSensitivePathsFromCommand,
95
- resolveRelativeTraversals
96
- } from "./chunk-N5AJHJG5.js";
97
95
  import {
98
96
  getCurrentContextWindowId,
99
- getCurrentWindowMessageOptions,
97
+ getCurrentWindowMessageOptions
98
+ } from "./chunk-2DVAF6HY.js";
99
+ import {
100
100
  getEventStore
101
- } from "./chunk-NJFXYSXP.js";
101
+ } from "./chunk-YRSZJ7IZ.js";
102
102
  import {
103
103
  buildContextMessagesFromEventHistory,
104
104
  foldContextState,
@@ -108,13 +108,17 @@ import {
108
108
  handleToolResult,
109
109
  reorderToolMessages,
110
110
  stripOrphanedToolCalls
111
- } from "./chunk-EFEHIJXF.js";
111
+ } from "./chunk-E4F32L4Q.js";
112
112
  import {
113
113
  findAgentById,
114
114
  getRuntimeConfig,
115
115
  getSubAgents,
116
116
  loadAllAgentsDefault
117
- } from "./chunk-DRIR2IZR.js";
117
+ } from "./chunk-YEW4YEJU.js";
118
+ import {
119
+ AskUserInterrupt,
120
+ askUserTool
121
+ } from "./chunk-V5AC2TV7.js";
118
122
  import {
119
123
  createChatDoneMessage,
120
124
  createChatLLMRetryFailedMessage,
@@ -139,7 +143,7 @@ import {
139
143
  SETTINGS_KEYS,
140
144
  getSetting,
141
145
  setSetting
142
- } from "./chunk-SKNPOZYP.js";
146
+ } from "./chunk-X6SWZEK7.js";
143
147
  import {
144
148
  logger
145
149
  } from "./chunk-K44MW7JJ.js";
@@ -788,14 +792,42 @@ function executeCommand(command, cwd, timeout, signal, onProgress) {
788
792
  let stderr = "";
789
793
  let timedOut = false;
790
794
  let aborted = false;
795
+ let exitCode = null;
791
796
  let exited = false;
797
+ let settled = false;
798
+ let graceTimer;
799
+ const ZOMBIE_PIPE_GRACE_MS = 2e3;
800
+ const settle = (code, appendix) => {
801
+ if (settled) return;
802
+ settled = true;
803
+ clearTimeout(timer);
804
+ if (graceTimer !== void 0) clearTimeout(graceTimer);
805
+ signal?.removeEventListener("abort", onAbort);
806
+ const out = (stdout + stdoutDecoder.end()).trim();
807
+ resolve3({
808
+ stdout: appendix ? out ? `${out}
809
+
810
+ ${appendix}` : appendix : out,
811
+ stderr: (stderr + stderrDecoder.end()).trim(),
812
+ exitCode: code
813
+ });
814
+ };
792
815
  const timer = setTimeout(() => {
793
816
  timedOut = true;
817
+ if (exited) {
818
+ settle(124, `[Exit code: 124]
819
+ [Process timed out after ${timeout}ms]`);
820
+ return;
821
+ }
794
822
  void terminateProcessTree(proc, { exited: () => exited });
795
823
  }, timeout);
796
824
  const onAbort = () => {
797
825
  if (!timedOut && !aborted) {
798
826
  aborted = true;
827
+ if (exited) {
828
+ settle(130, "[interrupted by user]");
829
+ return;
830
+ }
799
831
  void terminateProcessTree(proc, { exited: () => exited, immediate: true });
800
832
  }
801
833
  };
@@ -810,32 +842,28 @@ function executeCommand(command, cwd, timeout, signal, onProgress) {
810
842
  stderr += text;
811
843
  onProgress?.(`[stderr] ${text}`);
812
844
  });
813
- const settle = (exitCode, appendix) => {
814
- const out = (stdout + stdoutDecoder.end()).trim();
815
- resolve3({
816
- stdout: appendix ? out ? `${out}
817
-
818
- ${appendix}` : appendix : out,
819
- stderr: (stderr + stderrDecoder.end()).trim(),
820
- exitCode
821
- });
822
- };
823
- proc.on("exit", () => {
845
+ proc.on("exit", (code) => {
846
+ exitCode = code;
847
+ exited = true;
824
848
  if (aborted) {
825
- clearTimeout(timer);
826
- signal?.removeEventListener("abort", onAbort);
827
849
  settle(130, "[interrupted by user]");
828
- } else if (timedOut) {
829
- clearTimeout(timer);
830
- signal?.removeEventListener("abort", onAbort);
850
+ return;
851
+ }
852
+ if (timedOut) {
831
853
  settle(124, `[Exit code: 124]
832
854
  [Process timed out after ${timeout}ms]`);
855
+ return;
833
856
  }
857
+ graceTimer = setTimeout(() => {
858
+ settle(
859
+ exitCode ?? 1,
860
+ "[Shell exited, but a background process still held the output pipes open, so output may be incomplete]"
861
+ );
862
+ }, ZOMBIE_PIPE_GRACE_MS);
834
863
  });
835
864
  proc.on("close", (code) => {
836
865
  exited = true;
837
- clearTimeout(timer);
838
- signal?.removeEventListener("abort", onAbort);
866
+ if (graceTimer !== void 0) clearTimeout(graceTimer);
839
867
  if (timedOut) {
840
868
  settle(124, `[Exit code: 124]
841
869
  [Process timed out after ${timeout}ms]`);
@@ -845,10 +873,11 @@ ${appendix}` : appendix : out,
845
873
  settle(130, "[interrupted by user]");
846
874
  return;
847
875
  }
848
- settle(code ?? 1);
876
+ settle(code ?? exitCode ?? 1);
849
877
  });
850
878
  proc.on("error", (error) => {
851
879
  clearTimeout(timer);
880
+ if (graceTimer !== void 0) clearTimeout(graceTimer);
852
881
  signal?.removeEventListener("abort", onAbort);
853
882
  reject(error);
854
883
  });
@@ -1461,8 +1490,6 @@ function emitLiveTurnStats(turnMetrics, statsIdentity, mode, onMessage) {
1461
1490
  var MAX_TRUNCATION_RETRIES = 3;
1462
1491
  var MAX_CONTEXT_LENGTH_RETRIES = 3;
1463
1492
  var OUTPUT_RESERVE_TOKENS = 2048;
1464
- var CONTINUE_PROMPT = "Continue your previous response. Do NOT repeat what you already wrote.";
1465
- var CONTINUE_AFTER_STREAM_ERROR_PROMPT = "The LLM stream was interrupted mid-response. Continue exactly where you left off \u2014 do not repeat what was already written.";
1466
1493
  async function runTopLevelAgentLoop(config, turnMetrics) {
1467
1494
  const { mode, sessionManager, sessionId, llmClient, signal, onMessage, statsIdentity } = config;
1468
1495
  const append = config.append;
@@ -1731,7 +1758,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
1731
1758
  currentMaxTokensOverride = void 0;
1732
1759
  if (!compacting) {
1733
1760
  const contextState = sessionManager.getContextState(sessionId);
1734
- const { shouldCompact, appendCompactionPrompt } = await import("./compactor-2MSRXHVA.js");
1761
+ const { shouldCompact, appendCompactionPrompt } = await import("./compactor-53WDNC2S.js");
1735
1762
  if (shouldCompact(
1736
1763
  contextState.currentTokens,
1737
1764
  contextState.maxTokens,
@@ -2448,7 +2475,7 @@ var callSubAgentTool = {
2448
2475
  };
2449
2476
  }
2450
2477
  try {
2451
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-CECV6XQ6.js");
2478
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-RG4HDV75.js");
2452
2479
  const toolRegistry = getToolRegistryForAgent2(agentDef);
2453
2480
  const turnMetrics = new TurnMetrics();
2454
2481
  const result = await executeSubAgent({
@@ -3552,11 +3579,11 @@ var mcpConfigTool = createTool(
3552
3579
  async function notifyContextChanged(sessionId) {
3553
3580
  context.sessionManager.setDynamicContextChanged(sessionId, true);
3554
3581
  mcpNotifyChanged?.(sessionId);
3555
- const { injectContextDriftReminders } = await import("./dynamic-context-3THEBFBI.js");
3582
+ const { injectContextDriftReminders } = await import("./dynamic-context-7AJC6AII.js");
3556
3583
  await injectContextDriftReminders(context.sessionManager, sessionId);
3557
3584
  }
3558
3585
  async function rebuildTools() {
3559
- const { setMcpTools: setMcpTools2 } = await import("./tools-CECV6XQ6.js");
3586
+ const { setMcpTools: setMcpTools2 } = await import("./tools-RG4HDV75.js");
3560
3587
  const mcpTools = createMcpTools(mcpManagerForTools);
3561
3588
  setMcpTools2(mcpTools);
3562
3589
  }
@@ -3565,7 +3592,7 @@ var mcpConfigTool = createTool(
3565
3592
  if (servers.length === 0) {
3566
3593
  return helpers.success(serverT({ en: "No MCP servers configured.", fr: "Aucun serveur MCP configur\xE9." }));
3567
3594
  }
3568
- const { getSessionDisabledServers: getSessionDisabledServers2 } = await import("./session-overrides-CKS2AVE5.js");
3595
+ const { getSessionDisabledServers: getSessionDisabledServers2 } = await import("./session-overrides-GQKE7WGE.js");
3569
3596
  const disabledForSession = new Set(context.sessionId ? getSessionDisabledServers2(context.sessionId) : []);
3570
3597
  const visibleServers = servers.filter((server) => !disabledForSession.has(server.name));
3571
3598
  if (visibleServers.length === 0) {
@@ -4698,4 +4725,4 @@ export {
4698
4725
  getToolRegistryForAgent,
4699
4726
  createToolRegistry
4700
4727
  };
4701
- //# sourceMappingURL=chunk-Z4CTMGFH.js.map
4728
+ //# sourceMappingURL=chunk-QKPTMHA2.js.map
@@ -0,0 +1,7 @@
1
+ // src/constants.ts
2
+ var VERSION = "2.0.145";
3
+
4
+ export {
5
+ VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-QV4BKKIO.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  getEventStore
3
- } from "./chunk-NJFXYSXP.js";
3
+ } from "./chunk-YRSZJ7IZ.js";
4
4
  import {
5
5
  createChatPathConfirmationMessage
6
6
  } from "./chunk-OVAHNEFG.js";
7
7
  import {
8
8
  getPlatformShell
9
- } from "./chunk-MEPTCUYN.js";
9
+ } from "./chunk-YEFZ5HBD.js";
10
10
 
11
11
  // src/server/tools/path-security.ts
12
12
  import { realpath } from "fs/promises";
@@ -988,4 +988,4 @@ export {
988
988
  getConfirmationSessionId,
989
989
  getPendingConfirmationsBySession
990
990
  };
991
- //# sourceMappingURL=chunk-N5AJHJG5.js.map
991
+ //# sourceMappingURL=chunk-STVJA7IX.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  updateSessionMcpDisabledServers
3
- } from "./chunk-F3R4YS3F.js";
3
+ } from "./chunk-CCIG3YLG.js";
4
4
  import {
5
5
  getProject
6
6
  } from "./chunk-JYYBSODN.js";
@@ -96,4 +96,4 @@ export {
96
96
  computeDisabledServersForProject,
97
97
  initSessionMcpOverrides
98
98
  };
99
- //# sourceMappingURL=chunk-WSDR27YV.js.map
99
+ //# sourceMappingURL=chunk-UO4X2ENE.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createMessageStartEvent
3
- } from "./chunk-CTAYPMB2.js";
3
+ } from "./chunk-FAN4P45J.js";
4
4
  import {
5
5
  COMPACTION_PROMPT
6
- } from "./chunk-Z7IT3V22.js";
6
+ } from "./chunk-ZONLEX2F.js";
7
7
  import {
8
8
  getCurrentWindowMessageOptions
9
- } from "./chunk-NJFXYSXP.js";
9
+ } from "./chunk-2DVAF6HY.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-SJTBOREW.js.map
39
+ //# sourceMappingURL=chunk-VFHGN3IS.js.map