openfox 2.0.137 → 2.0.139

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 (77) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/CHANGELOG.md +22 -0
  3. package/dist/{chat-handler-ZCPFNHTE.js → chat-handler-KGITQAXC.js} +25 -24
  4. package/dist/{chunk-QBWJCO5K.js → chunk-22DV5XO7.js} +3 -3
  5. package/dist/{chunk-MOYWDP73.js → chunk-46Q2SHGJ.js} +2 -2
  6. package/dist/{chunk-BHVR2YS5.js → chunk-4F4ARGAM.js} +2 -2
  7. package/dist/{chunk-X4PVR6AW.js → chunk-7OHSAZLF.js} +2 -2
  8. package/dist/{chunk-MMGHIPBU.js → chunk-AE2IBEUH.js} +2 -2
  9. package/dist/{chunk-JIS6C6PA.js → chunk-AM5FAZJK.js} +12 -12
  10. package/dist/{chunk-RS7I4W5A.js → chunk-C543DUKL.js} +272 -91
  11. package/dist/{chunk-Q33DL67W.js → chunk-CRJ5J7U5.js} +2 -2
  12. package/dist/{chunk-6TQNTFJW.js → chunk-CXB4HJAM.js} +7 -7
  13. package/dist/{chunk-LQPAM55V.js → chunk-EGF3PREY.js} +11 -11
  14. package/dist/{chunk-G5GUQKLS.js → chunk-EJ5GFSD4.js} +2 -2
  15. package/dist/{chunk-QUAEH3MP.js → chunk-EMXMTCSY.js} +3 -1
  16. package/dist/{chunk-WOIQO7ZC.js → chunk-EXQI5TVW.js} +4 -4
  17. package/dist/{chunk-DG2YSWMC.js → chunk-FIEFBRTQ.js} +2 -2
  18. package/dist/{chunk-4LLGI372.js → chunk-GKRYQ56N.js} +34 -3
  19. package/dist/{chunk-4SBVW4UH.js → chunk-JLHYB445.js} +2 -2
  20. package/dist/{chunk-2OO46UAW.js → chunk-JTR3PC5I.js} +5 -5
  21. package/dist/{chunk-N5JKVNLH.js → chunk-LSO3IGJ4.js} +2 -2
  22. package/dist/{chunk-WQUCCHOY.js → chunk-MAUQ6AW4.js} +7 -7
  23. package/dist/{chunk-ZQENKB7X.js → chunk-N4RAVCLZ.js} +23 -19
  24. package/dist/{chunk-AATMPL7S.js → chunk-OVAHNEFG.js} +6 -2
  25. package/dist/{chunk-HF3NDXB4.js → chunk-PW5L4WBG.js} +1 -1
  26. package/dist/{chunk-XWWRZSK7.js → chunk-RG326HS4.js} +22 -4
  27. package/dist/{chunk-U7XCK7WL.js → chunk-TG65PHHY.js} +3 -3
  28. package/dist/{chunk-ZJ2IHOVN.js → chunk-TVSIWRKE.js} +25 -19
  29. package/dist/{chunk-SAGDTQXD.js → chunk-UA2ATO3B.js} +3 -3
  30. package/dist/{chunk-64YDOCQR.js → chunk-VCLAPTWM.js} +2 -2
  31. package/dist/{chunk-FIQPKLDY.js → chunk-YIEIVHCQ.js} +8 -8
  32. package/dist/chunk-Z7MGLDLK.js +7 -0
  33. package/dist/cli/dev.js +1 -1
  34. package/dist/cli/index.js +1 -1
  35. package/dist/{client-MVI3J7SN.js → client-6KC6SP2U.js} +4 -4
  36. package/dist/{compactor-KDTY4ERE.js → compactor-T7S4DIR3.js} +9 -9
  37. package/dist/{describe-image-EFHMWGWI.js → describe-image-TQOD52IC.js} +12 -12
  38. package/dist/{dynamic-context-HL4RGNHK.js → dynamic-context-3MAA4AQR.js} +10 -10
  39. package/dist/{events-ADE2KEHI.js → events-ZLP5V2YU.js} +6 -6
  40. package/dist/{export-import-6OUEANYH.js → export-import-ZJFYZJOP.js} +7 -7
  41. package/dist/{folding-CM63AVSB.js → folding-BXMVJIFF.js} +4 -4
  42. package/dist/{http-client-C6UYWVWZ.js → http-client-VMRQHMF7.js} +3 -3
  43. package/dist/{launch-L5NSPAAX.js → launch-73LDMGCT.js} +24 -24
  44. package/dist/{manager-FSPRJCYT.js → manager-JZNNVDYR.js} +4 -4
  45. package/dist/{orchestrator-FMWKMD54.js → orchestrator-MMHV6SZY.js} +23 -23
  46. package/dist/package.json +1 -1
  47. package/dist/{path-security-DND2R3RP.js → path-security-V3XALT5E.js} +12 -10
  48. package/dist/{platform-KPKYBU54.js → platform-DBPLSLE4.js} +3 -3
  49. package/dist/{processor-SB5X44PX.js → processor-2M7N26QG.js} +24 -23
  50. package/dist/{protocol-Nr_H1_oC.d.ts → protocol-D6DZzkSH.d.ts} +6 -3
  51. package/dist/{protocol-XO4ZROAU.js → protocol-MRMOB3P4.js} +5 -3
  52. package/dist/provider/index.d.ts +4 -4
  53. package/dist/{provider-SOC6Z25R.js → provider-MEENS4SB.js} +5 -5
  54. package/dist/{provider-manager-Y53SVVQ3.js → provider-manager-3MV7KDAD.js} +5 -5
  55. package/dist/{registry-FMDMGIUB.js → registry-PVJAAL2Y.js} +3 -3
  56. package/dist/{serve-VONTGJCK.js → serve-FN5XKUTC.js} +29 -29
  57. package/dist/server/index.d.ts +33 -3
  58. package/dist/server/index.js +28 -28
  59. package/dist/{server-MI2LZK3W.js → server-B4AJ7ETE.js} +27 -27
  60. package/dist/{service-NKLQH647.js → service-JL55SFPL.js} +7 -7
  61. package/dist/{session-overrides-ANQBKV74.js → session-overrides-7OPGV7CQ.js} +5 -5
  62. package/dist/{sessions-GLYACE5R.js → sessions-VHS47DHO.js} +4 -4
  63. package/dist/{settings-WH6BVQCP.js → settings-HCSHADP5.js} +2 -2
  64. package/dist/shared/index.d.ts +3 -3
  65. package/dist/shared/index.js +1 -1
  66. package/dist/{tasks-GPM3JAE6.js → tasks-ZMJCHW7E.js} +7 -7
  67. package/dist/{tools-WLJJ3ILO.js → tools-LZHSSSK4.js} +23 -21
  68. package/dist/{types-G10ho8PT.d.ts → types-CLcL33hJ.d.ts} +11 -1
  69. package/dist/{types-BlQjLBui.d.ts → types-CmiWoQ7p.d.ts} +1 -1
  70. package/dist/{update-6ZSQJQJB.js → update-L2XK6UDC.js} +2 -2
  71. package/dist/web/assets/{index-ChJjYovg.css → index-D3bx1-1j.css} +1 -1
  72. package/dist/web/assets/index-dJREs6rO.js +313 -0
  73. package/dist/web/index.html +2 -2
  74. package/dist/web/sw.js +1 -1
  75. package/package.json +1 -1
  76. package/dist/chunk-FG4G4EWB.js +0 -7
  77. package/dist/web/assets/index-CfFwerN2.js +0 -313
@@ -11,7 +11,7 @@ import {
11
11
  deleteSetting,
12
12
  getSetting,
13
13
  setSetting
14
- } from "./chunk-QUAEH3MP.js";
14
+ } from "./chunk-EMXMTCSY.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-Q33DL67W.js.map
455
+ //# sourceMappingURL=chunk-CRJ5J7U5.js.map
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  getAllInstructions,
3
3
  getEnabledSkillMetadata
4
- } from "./chunk-Q33DL67W.js";
4
+ } from "./chunk-CRJ5J7U5.js";
5
5
  import {
6
6
  buildTopLevelSystemPrompt
7
- } from "./chunk-4LLGI372.js";
7
+ } from "./chunk-GKRYQ56N.js";
8
8
  import {
9
9
  getCurrentContextWindowId,
10
10
  getEventStore
11
- } from "./chunk-2OO46UAW.js";
11
+ } from "./chunk-JTR3PC5I.js";
12
12
  import {
13
13
  findAgentById,
14
14
  getRuntimeConfig,
15
15
  getSubAgents,
16
16
  loadAllAgentsDefault,
17
17
  resolveDefaultAgentId
18
- } from "./chunk-BHVR2YS5.js";
18
+ } from "./chunk-4F4ARGAM.js";
19
19
  import {
20
20
  logger
21
21
  } from "./chunk-K44MW7JJ.js";
@@ -327,8 +327,8 @@ function resolveAgentDef(sessionManager, sessionId) {
327
327
  });
328
328
  }
329
329
  async function getEffectiveToolDefinitions(agentDef, sessionId, modelName) {
330
- const { getToolRegistryForAgent } = await import("./tools-WLJJ3ILO.js");
331
- const { isDescribeImageEligible } = await import("./describe-image-EFHMWGWI.js");
330
+ const { getToolRegistryForAgent } = await import("./tools-LZHSSSK4.js");
331
+ const { isDescribeImageEligible } = await import("./describe-image-TQOD52IC.js");
332
332
  const all = getToolRegistryForAgent(agentDef, sessionId).definitions;
333
333
  const eligible = await isDescribeImageEligible(modelName);
334
334
  if (eligible) return all;
@@ -396,4 +396,4 @@ export {
396
396
  computeSessionHash,
397
397
  applyDynamicContext
398
398
  };
399
- //# sourceMappingURL=chunk-6TQNTFJW.js.map
399
+ //# sourceMappingURL=chunk-CXB4HJAM.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runAgentTurn
3
- } from "./chunk-JIS6C6PA.js";
3
+ } from "./chunk-AM5FAZJK.js";
4
4
  import {
5
5
  executeSubAgent,
6
6
  getToolRegistryForAgent
7
- } from "./chunk-ZQENKB7X.js";
7
+ } from "./chunk-N4RAVCLZ.js";
8
8
  import {
9
9
  gitSpawnEnv
10
10
  } from "./chunk-J7GAZGZT.js";
@@ -15,10 +15,10 @@ import {
15
15
  loadProjectWorkflows,
16
16
  loadUserWorkflows,
17
17
  normalizeWorkflowScope
18
- } from "./chunk-QBWJCO5K.js";
18
+ } from "./chunk-22DV5XO7.js";
19
19
  import {
20
20
  serverT
21
- } from "./chunk-4SBVW4UH.js";
21
+ } from "./chunk-JLHYB445.js";
22
22
  import {
23
23
  TurnMetrics,
24
24
  createMessageStartEvent
@@ -27,27 +27,27 @@ import {
27
27
  checkAborted,
28
28
  decodeUtf8,
29
29
  spawnShellProcess
30
- } from "./chunk-SAGDTQXD.js";
30
+ } from "./chunk-UA2ATO3B.js";
31
31
  import {
32
32
  terminateProcessTree
33
33
  } from "./chunk-I72ACQ6R.js";
34
34
  import {
35
35
  getCurrentContextWindowId,
36
36
  getEventStore
37
- } from "./chunk-2OO46UAW.js";
37
+ } from "./chunk-JTR3PC5I.js";
38
38
  import {
39
39
  findAgentById,
40
40
  getRuntimeConfig,
41
41
  loadAllAgentsDefault,
42
42
  resolveDefaultAgentId
43
- } from "./chunk-BHVR2YS5.js";
43
+ } from "./chunk-4F4ARGAM.js";
44
44
  import {
45
45
  createChatMessageMessage,
46
46
  createSessionRunningMessage
47
- } from "./chunk-AATMPL7S.js";
47
+ } from "./chunk-OVAHNEFG.js";
48
48
  import {
49
49
  LLMError
50
- } from "./chunk-N5JKVNLH.js";
50
+ } from "./chunk-LSO3IGJ4.js";
51
51
  import {
52
52
  logger
53
53
  } from "./chunk-K44MW7JJ.js";
@@ -56,7 +56,7 @@ import {
56
56
  } from "./chunk-7OHXF5GW.js";
57
57
  import {
58
58
  createServerMessage
59
- } from "./chunk-HF3NDXB4.js";
59
+ } from "./chunk-PW5L4WBG.js";
60
60
  import {
61
61
  getGlobalConfigDir
62
62
  } from "./chunk-CQGTEGKL.js";
@@ -1023,4 +1023,4 @@ export {
1023
1023
  abortRunnerRun,
1024
1024
  launchWorkflowRun
1025
1025
  };
1026
- //# sourceMappingURL=chunk-LQPAM55V.js.map
1026
+ //# sourceMappingURL=chunk-EGF3PREY.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-OA2FURC3.js";
5
5
  import {
6
6
  createLLMClient
7
- } from "./chunk-64YDOCQR.js";
7
+ } from "./chunk-VCLAPTWM.js";
8
8
  import {
9
9
  getModelProfile
10
10
  } from "./chunk-TS5WKTFB.js";
@@ -916,4 +916,4 @@ export {
916
916
  parseDefaultModelSelection,
917
917
  createProviderManager
918
918
  };
919
- //# sourceMappingURL=chunk-G5GUQKLS.js.map
919
+ //# sourceMappingURL=chunk-EJ5GFSD4.js.map
@@ -31,6 +31,7 @@ var SETTINGS_KEYS = {
31
31
  DISPLAY_COLLAPSE_FAVORITES_BY_DEFAULT: "display.collapseFavoritesByDefault",
32
32
  DISPLAY_MODEL_FAVORITES: "display.modelFavorites",
33
33
  LLM_DYNAMIC_SYSTEM_PROMPT: "llm.dynamicSystemPrompt",
34
+ LLM_CAVEMAN_THINKING: "llm.cavemanThinking",
34
35
  CACHE_WARMING: "cache.warming",
35
36
  KEYBINDINGS: "keybindings",
36
37
  RETRY_PATTERNS: "agent.retryPatterns",
@@ -74,6 +75,7 @@ var SETTINGS_DEFAULTS = {
74
75
  [SETTINGS_KEYS.DISPLAY_COLLAPSE_FAVORITES_BY_DEFAULT]: "false",
75
76
  [SETTINGS_KEYS.DISPLAY_MODEL_FAVORITES]: "[]",
76
77
  [SETTINGS_KEYS.LLM_DYNAMIC_SYSTEM_PROMPT]: "false",
78
+ [SETTINGS_KEYS.LLM_CAVEMAN_THINKING]: "false",
77
79
  [SETTINGS_KEYS.CACHE_WARMING]: "false",
78
80
  [SETTINGS_KEYS.RETRY_PATTERNS]: JSON.stringify({ patterns: [], maxRetriesPerTurn: 10 }),
79
81
  [SETTINGS_KEYS.KEYBINDINGS]: JSON.stringify({
@@ -168,4 +170,4 @@ export {
168
170
  pruneFavoriteModels,
169
171
  getMaxVisibleItems
170
172
  };
171
- //# sourceMappingURL=chunk-QUAEH3MP.js.map
173
+ //# sourceMappingURL=chunk-EMXMTCSY.js.map
@@ -207,7 +207,7 @@ async function runCli(options) {
207
207
  break;
208
208
  }
209
209
  case "provider": {
210
- const { runProviderCommand } = await import("./provider-SOC6Z25R.js");
210
+ const { runProviderCommand } = await import("./provider-MEENS4SB.js");
211
211
  const [, subcommand] = positionals;
212
212
  await runProviderCommand(mode, subcommand);
213
213
  break;
@@ -252,7 +252,7 @@ async function runCli(options) {
252
252
  break;
253
253
  }
254
254
  case "update": {
255
- const { runUpdate } = await import("./update-6ZSQJQJB.js");
255
+ const { runUpdate } = await import("./update-L2XK6UDC.js");
256
256
  const code = await runUpdate();
257
257
  if (code !== 0) {
258
258
  process.exit(code);
@@ -265,7 +265,7 @@ async function runCli(options) {
265
265
  if (!configExists) {
266
266
  await runNetworkSetup(mode);
267
267
  }
268
- const { runServe } = await import("./serve-VONTGJCK.js");
268
+ const { runServe } = await import("./serve-FN5XKUTC.js");
269
269
  const serveOptions = { mode };
270
270
  if (values.port) serveOptions.port = parseInt(values.port);
271
271
  if (values["no-browser"] === true) serveOptions.openBrowser = false;
@@ -277,4 +277,4 @@ async function runCli(options) {
277
277
  export {
278
278
  runCli
279
279
  };
280
- //# sourceMappingURL=chunk-WOIQO7ZC.js.map
280
+ //# sourceMappingURL=chunk-EXQI5TVW.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  updateSessionMcpDisabledServers
3
- } from "./chunk-X4PVR6AW.js";
3
+ } from "./chunk-7OHSAZLF.js";
4
4
  import {
5
5
  getProject
6
6
  } from "./chunk-DPFET73G.js";
@@ -96,4 +96,4 @@ export {
96
96
  computeDisabledServersForProject,
97
97
  initSessionMcpOverrides
98
98
  };
99
- //# sourceMappingURL=chunk-DG2YSWMC.js.map
99
+ //# sourceMappingURL=chunk-FIEFBRTQ.js.map
@@ -1,6 +1,10 @@
1
1
  import {
2
2
  getPlatformShell
3
- } from "./chunk-MOYWDP73.js";
3
+ } from "./chunk-46Q2SHGJ.js";
4
+ import {
5
+ SETTINGS_KEYS,
6
+ getSetting
7
+ } from "./chunk-EMXMTCSY.js";
4
8
 
5
9
  // src/server/tools/tool-policy.ts
6
10
  var ALWAYS_ALLOWED = /* @__PURE__ */ new Set(["step_done"]);
@@ -22,6 +26,30 @@ function computeEffectiveTools(allowedTools, type) {
22
26
 
23
27
  // src/server/chat/prompts.ts
24
28
  import { basename } from "path";
29
+ var CAVEMAN_THINKING_SECTION = `## THINKING STYLE
30
+ VERY IMPORTANT: think caveman style \u2014 fragments, no full sentences.
31
+ BANNED in thinking: "the", "a", "an", "I should", "Let me", "Need to", "Found it", "User asks", "Now, ".
32
+ NEVER restate the question or recap earlier steps. Each thinking block = one fresh fragment, straight to the point.
33
+ BAD vs GOOD:
34
+ - "Let me look at ChatInput.tsx." \u2192 "Check ChatInput.tsx."
35
+ - "I need to run the tests." \u2192 "Run tests."
36
+ - "I should read the file first." \u2192 "Read file first."
37
+ - "Let me search for the pause button." \u2192 "Search web/src for 'pause'."
38
+ - "User asks where the pause button is in the code." \u2192 "Question: pause button location."
39
+ - "Now, how is this exposed?" \u2192 "How exposed?"
40
+ - "I found the answer." \u2192 "Done."
41
+ Full trace example (one line per thinking block):
42
+ - "Question: pause button location. Plan mode \u2014 answer only, no criteria."
43
+ - "Search web/src for 'pause'."
44
+ - "ChatInput.tsx ~line 700, PauseIcon render."
45
+ - "Answer: ChatInput.tsx, pause/stop row, ~line 700."
46
+ More fragments:
47
+ - "Test red: title mismatch. Fix string in ChatInput."
48
+ - "Run typecheck after edit."
49
+ - "Read file before edit. Check imports."
50
+ - "Blocker: happy-dom, no layout. Assert classes."
51
+ - "Wait for dev server restart before testing."
52
+ Same meaning, far fewer tokens.`;
25
53
  function buildBasePrompt(workdir, customInstructions, skills, modelName) {
26
54
  const instructionsSection = customInstructions ? `
27
55
 
@@ -30,6 +58,9 @@ function buildBasePrompt(workdir, customInstructions, skills, modelName) {
30
58
  ${customInstructions}` : "";
31
59
  const modelLine = modelName ? `
32
60
  Model: ${modelName}` : "";
61
+ const cavemanSection = getSetting(SETTINGS_KEYS.LLM_CAVEMAN_THINKING) === "true" ? `
62
+
63
+ ${CAVEMAN_THINKING_SECTION}` : "";
33
64
  return `You are OpenFox, an agentic assistant.
34
65
 
35
66
  Today's date is ${(/* @__PURE__ */ new Date()).toISOString().split("T")[0].replace(/-/g, "/")}
@@ -87,7 +118,7 @@ assistant: src/foo.c
87
118
 
88
119
  user: write tests for new feature
89
120
  assistant: [uses run_command tool to find where similar tests are defined, uses concurrent read file tool use blocks in one tool call to read relevant files at the same time, uses edit file tool to write new tests]
90
-
121
+ ${cavemanSection}
91
122
  ## FILE REFERENCES
92
123
  @ prefix, e.g. @src/index.ts or @web/components/.
93
124
  Relative to the working directory above. Strip leading @ and resolve against working directory, never treat as absolute path.
@@ -246,4 +277,4 @@ export {
246
277
  buildAgentSmallReminder,
247
278
  COMPACTION_PROMPT
248
279
  };
249
- //# sourceMappingURL=chunk-4LLGI372.js.map
280
+ //# sourceMappingURL=chunk-GKRYQ56N.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SETTINGS_KEYS,
3
3
  getSetting
4
- } from "./chunk-QUAEH3MP.js";
4
+ } from "./chunk-EMXMTCSY.js";
5
5
  import {
6
6
  getLocale,
7
7
  setLocale,
@@ -21,4 +21,4 @@ function serverT(tx, vars) {
21
21
  export {
22
22
  serverT
23
23
  };
24
- //# sourceMappingURL=chunk-4SBVW4UH.js.map
24
+ //# sourceMappingURL=chunk-JLHYB445.js.map
@@ -6,16 +6,16 @@ import {
6
6
  foldSessionState,
7
7
  spreadOptionalMessageFields,
8
8
  trimSnapshotStreamingOutput
9
- } from "./chunk-MMGHIPBU.js";
9
+ } from "./chunk-AE2IBEUH.js";
10
10
  import {
11
11
  updateSessionMessageCount
12
- } from "./chunk-X4PVR6AW.js";
12
+ } from "./chunk-7OHSAZLF.js";
13
13
  import {
14
14
  getRuntimeConfig
15
- } from "./chunk-BHVR2YS5.js";
15
+ } from "./chunk-4F4ARGAM.js";
16
16
  import {
17
17
  SETTINGS_KEYS
18
- } from "./chunk-QUAEH3MP.js";
18
+ } from "./chunk-EMXMTCSY.js";
19
19
  import {
20
20
  logger
21
21
  } from "./chunk-K44MW7JJ.js";
@@ -1489,4 +1489,4 @@ export {
1489
1489
  truncateSessionMessages,
1490
1490
  getRecentUserPromptsForSession
1491
1491
  };
1492
- //# sourceMappingURL=chunk-2OO46UAW.js.map
1492
+ //# sourceMappingURL=chunk-JTR3PC5I.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SETTINGS_KEYS,
3
3
  getSetting
4
- } from "./chunk-QUAEH3MP.js";
4
+ } from "./chunk-EMXMTCSY.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-N5JKVNLH.js.map
197
+ //# sourceMappingURL=chunk-LSO3IGJ4.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  serverT
3
- } from "./chunk-4SBVW4UH.js";
3
+ } from "./chunk-JLHYB445.js";
4
4
  import {
5
5
  AskUserInterrupt
6
6
  } from "./chunk-V5AC2TV7.js";
@@ -8,16 +8,16 @@ import {
8
8
  PathAccessDeniedError,
9
9
  registerPathConfirmation,
10
10
  requestPathAccess
11
- } from "./chunk-XWWRZSK7.js";
11
+ } from "./chunk-RG326HS4.js";
12
12
  import {
13
13
  getEventStore
14
- } from "./chunk-2OO46UAW.js";
14
+ } from "./chunk-JTR3PC5I.js";
15
15
  import {
16
16
  getRuntimeConfig
17
- } from "./chunk-BHVR2YS5.js";
17
+ } from "./chunk-4F4ARGAM.js";
18
18
  import {
19
19
  createChatPathConfirmationMessage
20
- } from "./chunk-AATMPL7S.js";
20
+ } from "./chunk-OVAHNEFG.js";
21
21
  import {
22
22
  modelSupportsVision
23
23
  } from "./chunk-TS5WKTFB.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-WH6BVQCP.js");
51
+ const { getSetting, SETTINGS_KEYS } = await import("./settings-HCSHADP5.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-WQUCCHOY.js.map
1155
+ //# sourceMappingURL=chunk-MAUQ6AW4.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getEnabledSkillMetadata,
5
5
  isSkillEnabled,
6
6
  loadAllSkills
7
- } from "./chunk-Q33DL67W.js";
7
+ } from "./chunk-CRJ5J7U5.js";
8
8
  import {
9
9
  getGitBranch,
10
10
  isGitRepository,
@@ -14,10 +14,10 @@ import {
14
14
  getGateConfig,
15
15
  isTaskConflictError,
16
16
  isTaskGateError
17
- } from "./chunk-QBWJCO5K.js";
17
+ } from "./chunk-22DV5XO7.js";
18
18
  import {
19
19
  getSessionDisabledServers
20
- } from "./chunk-DG2YSWMC.js";
20
+ } from "./chunk-FIEFBRTQ.js";
21
21
  import {
22
22
  buildSignal,
23
23
  computeFileHash,
@@ -33,10 +33,10 @@ import {
33
33
  requireSession,
34
34
  validateActionWithPermission,
35
35
  validateFileForWrite
36
- } from "./chunk-WQUCCHOY.js";
36
+ } from "./chunk-MAUQ6AW4.js";
37
37
  import {
38
38
  serverT
39
- } from "./chunk-4SBVW4UH.js";
39
+ } from "./chunk-JLHYB445.js";
40
40
  import {
41
41
  TurnMetrics,
42
42
  clearLLMFailure,
@@ -55,7 +55,7 @@ import {
55
55
  COMPACTION_PROMPT,
56
56
  buildBasePrompt,
57
57
  computeEffectiveTools
58
- } from "./chunk-4LLGI372.js";
58
+ } from "./chunk-GKRYQ56N.js";
59
59
  import {
60
60
  startInspectProxy
61
61
  } from "./chunk-LW6MMSTD.js";
@@ -72,7 +72,7 @@ import {
72
72
  spawnShellProcess,
73
73
  startProcessCommand,
74
74
  stopProcess
75
- } from "./chunk-SAGDTQXD.js";
75
+ } from "./chunk-UA2ATO3B.js";
76
76
  import {
77
77
  getMaxPerSession,
78
78
  getSessionProcessCount,
@@ -93,12 +93,12 @@ import {
93
93
  extractAbsolutePathsFromCommand,
94
94
  extractSensitivePathsFromCommand,
95
95
  resolveRelativeTraversals
96
- } from "./chunk-XWWRZSK7.js";
96
+ } from "./chunk-RG326HS4.js";
97
97
  import {
98
98
  getCurrentContextWindowId,
99
99
  getCurrentWindowMessageOptions,
100
100
  getEventStore
101
- } from "./chunk-2OO46UAW.js";
101
+ } from "./chunk-JTR3PC5I.js";
102
102
  import {
103
103
  buildContextMessagesFromEventHistory,
104
104
  foldContextState,
@@ -108,13 +108,13 @@ import {
108
108
  handleToolResult,
109
109
  reorderToolMessages,
110
110
  stripOrphanedToolCalls
111
- } from "./chunk-MMGHIPBU.js";
111
+ } from "./chunk-AE2IBEUH.js";
112
112
  import {
113
113
  findAgentById,
114
114
  getRuntimeConfig,
115
115
  getSubAgents,
116
116
  loadAllAgentsDefault
117
- } from "./chunk-BHVR2YS5.js";
117
+ } from "./chunk-4F4ARGAM.js";
118
118
  import {
119
119
  createChatDoneMessage,
120
120
  createChatLLMRetryFailedMessage,
@@ -123,7 +123,7 @@ import {
123
123
  createChatMessageUpdatedMessage,
124
124
  createChatStatsMessage,
125
125
  createQueueStateMessage
126
- } from "./chunk-AATMPL7S.js";
126
+ } from "./chunk-OVAHNEFG.js";
127
127
  import {
128
128
  getModelProfile,
129
129
  modelSupportsVision
@@ -139,7 +139,7 @@ import {
139
139
  SETTINGS_KEYS,
140
140
  getSetting,
141
141
  setSetting
142
- } from "./chunk-QUAEH3MP.js";
142
+ } from "./chunk-EMXMTCSY.js";
143
143
  import {
144
144
  logger
145
145
  } from "./chunk-K44MW7JJ.js";
@@ -1506,6 +1506,10 @@ async function runTopLevelAgentLoop(config, turnMetrics) {
1506
1506
  });
1507
1507
  return {};
1508
1508
  }
1509
+ const pauseOutcome = await sessionManager.enterPauseGate(sessionId, signal);
1510
+ if (pauseOutcome === "aborted") {
1511
+ throw new Error("Aborted");
1512
+ }
1509
1513
  const session = sessionManager.requireSession(sessionId);
1510
1514
  if (retryLimiter.count() === 0) {
1511
1515
  await config.injectKickoff?.();
@@ -1725,7 +1729,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
1725
1729
  currentMaxTokensOverride = void 0;
1726
1730
  if (!compacting) {
1727
1731
  const contextState = sessionManager.getContextState(sessionId);
1728
- const { shouldCompact, appendCompactionPrompt } = await import("./compactor-KDTY4ERE.js");
1732
+ const { shouldCompact, appendCompactionPrompt } = await import("./compactor-T7S4DIR3.js");
1729
1733
  if (shouldCompact(
1730
1734
  contextState.currentTokens,
1731
1735
  contextState.maxTokens,
@@ -2441,7 +2445,7 @@ var callSubAgentTool = {
2441
2445
  };
2442
2446
  }
2443
2447
  try {
2444
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-WLJJ3ILO.js");
2448
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-LZHSSSK4.js");
2445
2449
  const toolRegistry = getToolRegistryForAgent2(agentDef);
2446
2450
  const turnMetrics = new TurnMetrics();
2447
2451
  const result = await executeSubAgent({
@@ -3545,11 +3549,11 @@ var mcpConfigTool = createTool(
3545
3549
  async function notifyContextChanged(sessionId) {
3546
3550
  context.sessionManager.setDynamicContextChanged(sessionId, true);
3547
3551
  mcpNotifyChanged?.(sessionId);
3548
- const { injectContextDriftReminders } = await import("./dynamic-context-HL4RGNHK.js");
3552
+ const { injectContextDriftReminders } = await import("./dynamic-context-3MAA4AQR.js");
3549
3553
  await injectContextDriftReminders(context.sessionManager, sessionId);
3550
3554
  }
3551
3555
  async function rebuildTools() {
3552
- const { setMcpTools: setMcpTools2 } = await import("./tools-WLJJ3ILO.js");
3556
+ const { setMcpTools: setMcpTools2 } = await import("./tools-LZHSSSK4.js");
3553
3557
  const mcpTools = createMcpTools(mcpManagerForTools);
3554
3558
  setMcpTools2(mcpTools);
3555
3559
  }
@@ -3558,7 +3562,7 @@ var mcpConfigTool = createTool(
3558
3562
  if (servers.length === 0) {
3559
3563
  return helpers.success(serverT({ en: "No MCP servers configured.", fr: "Aucun serveur MCP configur\xE9." }));
3560
3564
  }
3561
- const { getSessionDisabledServers: getSessionDisabledServers2 } = await import("./session-overrides-ANQBKV74.js");
3565
+ const { getSessionDisabledServers: getSessionDisabledServers2 } = await import("./session-overrides-7OPGV7CQ.js");
3562
3566
  const disabledForSession = new Set(context.sessionId ? getSessionDisabledServers2(context.sessionId) : []);
3563
3567
  const visibleServers = servers.filter((server) => !disabledForSession.has(server.name));
3564
3568
  if (visibleServers.length === 0) {
@@ -4691,4 +4695,4 @@ export {
4691
4695
  getToolRegistryForAgent,
4692
4696
  createToolRegistry
4693
4697
  };
4694
- //# sourceMappingURL=chunk-ZQENKB7X.js.map
4698
+ //# sourceMappingURL=chunk-N4RAVCLZ.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  createServerMessage,
6
6
  isClientMessage
7
- } from "./chunk-HF3NDXB4.js";
7
+ } from "./chunk-PW5L4WBG.js";
8
8
 
9
9
  // src/server/session/client-session.ts
10
10
  function toClientSession(session) {
@@ -77,6 +77,9 @@ function createSessionListMessage(sessions, correlationId) {
77
77
  function createSessionRunningMessage(isRunning, sessionId) {
78
78
  return createServerMessage("session.running", { isRunning }, sessionId);
79
79
  }
80
+ function createSessionPauseMessage(pauseState) {
81
+ return createServerMessage("session.pause", { pauseState });
82
+ }
80
83
  function createProjectStateMessage(project, correlationId) {
81
84
  return createServerMessage("project.state", { project }, correlationId);
82
85
  }
@@ -344,6 +347,7 @@ export {
344
347
  createSessionStateMessage,
345
348
  createSessionListMessage,
346
349
  createSessionRunningMessage,
350
+ createSessionPauseMessage,
347
351
  createProjectStateMessage,
348
352
  createProjectListMessage,
349
353
  createGitStatusMessage,
@@ -378,4 +382,4 @@ export {
378
382
  createQueueStateMessage,
379
383
  storedEventToServerMessage
380
384
  };
381
- //# sourceMappingURL=chunk-AATMPL7S.js.map
385
+ //# sourceMappingURL=chunk-OVAHNEFG.js.map
@@ -26,4 +26,4 @@ export {
26
26
  isClientMessage,
27
27
  isServerMessage
28
28
  };
29
- //# sourceMappingURL=chunk-HF3NDXB4.js.map
29
+ //# sourceMappingURL=chunk-PW5L4WBG.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  getEventStore
3
- } from "./chunk-2OO46UAW.js";
3
+ } from "./chunk-JTR3PC5I.js";
4
4
  import {
5
5
  createChatPathConfirmationMessage
6
- } from "./chunk-AATMPL7S.js";
6
+ } from "./chunk-OVAHNEFG.js";
7
7
  import {
8
8
  getPlatformShell
9
- } from "./chunk-MOYWDP73.js";
9
+ } from "./chunk-46Q2SHGJ.js";
10
10
 
11
11
  // src/server/tools/path-security.ts
12
12
  import { realpath } from "fs/promises";
@@ -889,6 +889,23 @@ function cancelPathConfirmationsForSession(sessionId, reason) {
889
889
  }
890
890
  return cancelledCount;
891
891
  }
892
+ function autoApprovePendingConfirmationsForSession(sessionId) {
893
+ const resolvedCallIds = [];
894
+ for (const callId of [...pendingConfirmations.keys()]) {
895
+ const pending = pendingConfirmations.get(callId);
896
+ if (!pending || pending.sessionId !== sessionId) {
897
+ continue;
898
+ }
899
+ if (pending.reason === "git_no_verify") {
900
+ continue;
901
+ }
902
+ const result = providePathConfirmation(callId, true, false);
903
+ if (result.found) {
904
+ resolvedCallIds.push(callId);
905
+ }
906
+ }
907
+ return resolvedCallIds;
908
+ }
892
909
  function hasPendingPathConfirmation(callId) {
893
910
  return pendingConfirmations.has(callId);
894
911
  }
@@ -934,8 +951,9 @@ export {
934
951
  providePathConfirmation,
935
952
  cancelPathConfirmation,
936
953
  cancelPathConfirmationsForSession,
954
+ autoApprovePendingConfirmationsForSession,
937
955
  hasPendingPathConfirmation,
938
956
  getConfirmationSessionId,
939
957
  getPendingConfirmationsBySession
940
958
  };
941
- //# sourceMappingURL=chunk-XWWRZSK7.js.map
959
+ //# sourceMappingURL=chunk-RG326HS4.js.map
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-HEYU7FAY.js";
4
4
  import {
5
5
  COMPACTION_PROMPT
6
- } from "./chunk-4LLGI372.js";
6
+ } from "./chunk-GKRYQ56N.js";
7
7
  import {
8
8
  getCurrentWindowMessageOptions
9
- } from "./chunk-2OO46UAW.js";
9
+ } from "./chunk-JTR3PC5I.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-U7XCK7WL.js.map
39
+ //# sourceMappingURL=chunk-TG65PHHY.js.map