openfox 2.0.114 → 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 (120) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/CHANGELOG.md +43 -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-KWXRSWXZ.js → chat-handler-Z6BEY66U.js} +31 -31
  10. package/dist/{chunk-2XD65L7M.js → chunk-27NABDXB.js} +2 -2
  11. package/dist/{chunk-YGJIK3CG.js → chunk-2FCLCUVR.js} +5 -5
  12. package/dist/{chunk-UTIQ7OO5.js → chunk-3KBRMBTP.js} +2 -2
  13. package/dist/{chunk-SFZGMB2G.js → chunk-3PG65AXG.js} +18 -3
  14. package/dist/{chunk-QD7MRMCH.js → chunk-4E52GUXJ.js} +231 -173
  15. package/dist/{chunk-I7FY2LTR.js → chunk-4GHLULHB.js} +18 -2
  16. package/dist/{chunk-K733B5T2.js → chunk-4HV3PDEK.js} +135 -134
  17. package/dist/{chunk-PBW3YC3G.js → chunk-5PT4UMRR.js} +5 -1
  18. package/dist/{chunk-NWJLWLKF.js → chunk-6XHDNSA3.js} +11 -11
  19. package/dist/{chunk-SA34STZ6.js → chunk-AESOGRFK.js} +2 -2
  20. package/dist/{chunk-4H427UBV.js → chunk-AGXJ5O63.js} +2 -2
  21. package/dist/{chunk-7GWARYQC.js → chunk-BH3BBUGB.js} +24 -22
  22. package/dist/{chunk-L63Q4JQJ.js → chunk-EQ5CGNOT.js} +3 -3
  23. package/dist/{chunk-NLO64UE3.js → chunk-EQ7DK2TG.js} +10 -6
  24. package/dist/{chunk-MUSPWEBB.js → chunk-GZTMCTUS.js} +4 -4
  25. package/dist/{chunk-HP5CIB66.js → chunk-HD6Y77RO.js} +2 -2
  26. package/dist/chunk-HNHSUQCN.js +7 -0
  27. package/dist/{chunk-W77NBJAZ.js → chunk-HYPXL7K5.js} +178 -33
  28. package/dist/{chunk-OTYAEEX3.js → chunk-HZSKKJHQ.js} +9 -8
  29. package/dist/{chunk-JP7NM545.js → chunk-JLAR2CMV.js} +2 -2
  30. package/dist/{chunk-3O77NT4T.js → chunk-KLQEL2DZ.js} +10 -4
  31. package/dist/{chunk-UPBWEHIL.js → chunk-LNNBLB6G.js} +20 -5
  32. package/dist/{chunk-OXSTNSCF.js → chunk-LTYL6ZGH.js} +2 -2
  33. package/dist/{chunk-P5UANBBX.js → chunk-M6X6AIEG.js} +2 -2
  34. package/dist/{chunk-LXYPMFTH.js → chunk-MKWS7TQH.js} +4 -4
  35. package/dist/{chunk-SBSUDHL4.js → chunk-O6DU226D.js} +2 -2
  36. package/dist/{chunk-HV6IALXF.js → chunk-QJWTBVJO.js} +14 -14
  37. package/dist/{chunk-BZVW77PI.js → chunk-QQVPUZQB.js} +157 -21
  38. package/dist/{chunk-GUHHUDNL.js → chunk-SQLJRO3J.js} +10 -10
  39. package/dist/{chunk-JXLRL5JR.js → chunk-TGVDUK4N.js} +7 -7
  40. package/dist/{chunk-L737Y63F.js → chunk-TOKQ2UVG.js} +2 -2
  41. package/dist/{chunk-FW4NDUBL.js → chunk-U4HMAYAD.js} +15 -14
  42. package/dist/{chunk-V4IE7HJY.js → chunk-W7VIYHPQ.js} +2 -2
  43. package/dist/{chunk-VPVLO436.js → chunk-X3XKYGUN.js} +4 -4
  44. package/dist/{chunk-5WRI5ZAA.js → chunk-YLJ4XMA6.js} +6 -2
  45. package/dist/{chunk-X25Q6RAV.js → chunk-ZKLE2Q3I.js} +1 -1
  46. package/dist/{chunk-TKKP56QK.js → chunk-ZTOG6LJD.js} +3 -3
  47. package/dist/cli/dev.js +3 -3
  48. package/dist/cli/index.js +3 -3
  49. package/dist/client-KCNTDTIR.js +16 -0
  50. package/dist/{client-pure-VFZIIK4S.js → client-pure-B5DHEKQJ.js} +3 -3
  51. package/dist/command-defaults/mark-done.command.md +14 -0
  52. package/dist/compactor-LAXZLPPA.js +32 -0
  53. package/dist/{config-EAB3V4QK.js → config-TUCHLIWD.js} +2 -2
  54. package/dist/{dynamic-context-MVGOF5V2.js → dynamic-context-YHWFFP53.js} +10 -10
  55. package/dist/{events-PI7IMPHT.js → events-IVPAMMR5.js} +9 -8
  56. package/dist/{folding-FO57K4JM.js → folding-RTGU63BW.js} +7 -6
  57. package/dist/http-client-IPUW2MSW.js +11 -0
  58. package/dist/inspect-proxy-WPEDMCG7.js +13 -0
  59. package/dist/{install-CPOPMCSE.js → install-VA2F6X6Z.js} +2 -2
  60. package/dist/launch-PAVQAWGP.js +52 -0
  61. package/dist/{manager-66YAEO7K.js → manager-EMLSLMMT.js} +6 -6
  62. package/dist/{model-overrides-L53PZNZA.js → model-overrides-7F2EOA4U.js} +5 -5
  63. package/dist/{oauth-provider-52YILVUJ.js → oauth-provider-DGBC2YM6.js} +2 -2
  64. package/dist/{oauth-store-XCFXV2VM.js → oauth-store-KECHUT54.js} +2 -2
  65. package/dist/{openFolder-HX7X356L.js → openFolder-XCMSU3OI.js} +2 -2
  66. package/dist/orchestrator-CS3KXLZE.js +63 -0
  67. package/dist/package.json +5 -2
  68. package/dist/{path-security-RSEI3YKB.js → path-security-JTCHWYG3.js} +13 -12
  69. package/dist/{paths-F27V3S4I.js → paths-BHR7CZ7I.js} +2 -2
  70. package/dist/{permissions-K6YEA2ZZ.js → permissions-UKR524ZB.js} +2 -2
  71. package/dist/{platform-WA4GK5BO.js → platform-ECDDYMAR.js} +5 -5
  72. package/dist/{processor-WDZSFBVO.js → processor-RZD4JRDX.js} +30 -30
  73. package/dist/profiles-GYHXBWPV.js +10 -0
  74. package/dist/{project-creator-676WQXVI.js → project-creator-PMQ65NKN.js} +4 -4
  75. package/dist/{projects-SSBWIYL4.js → projects-NDPNOV6D.js} +6 -4
  76. package/dist/{protocol-BzHs024-.d.ts → protocol-CfUkCYxF.d.ts} +12 -3
  77. package/dist/{protocol-RKSWKNXI.js → protocol-HYA5BYVN.js} +8 -4
  78. package/dist/provider/index.d.ts +4 -4
  79. package/dist/{provider-PLIWRBCF.js → provider-Q7J4UFTS.js} +11 -11
  80. package/dist/{provider-manager-2QSJTPWS.js → provider-manager-TMBO4DFG.js} +9 -9
  81. package/dist/{pwa-XPHP3PY2.js → pwa-2GRFSXD7.js} +3 -3
  82. package/dist/{registry-ZP4TN2IN.js → registry-5QL3BOWN.js} +6 -5
  83. package/dist/{serve-MZ3BCCWC.js → serve-KR22J37W.js} +36 -36
  84. package/dist/server/index.d.ts +26 -6
  85. package/dist/server/index.js +35 -35
  86. package/dist/server-ESKTIZL5.js +55 -0
  87. package/dist/service-M7XJHAK4.js +25 -0
  88. package/dist/{service-CXWJQFOZ.js → service-WKABQHKL.js} +2 -2
  89. package/dist/{session-overrides-LXN6W7SA.js → session-overrides-CWBKPHMF.js} +8 -7
  90. package/dist/{sessions-CHPVUG6H.js → sessions-I7ELDIIP.js} +9 -6
  91. package/dist/{settings-NEBM3GQX.js → settings-FGXQHKUH.js} +4 -4
  92. package/dist/shared/index.d.ts +3 -3
  93. package/dist/shared/index.js +2 -2
  94. package/dist/{store-SARB6V2N.js → store-JYPZ2RXB.js} +2 -2
  95. package/dist/{tasks-TJXG2V3U.js → tasks-X5H5HM4J.js} +12 -12
  96. package/dist/{tool-adapter-FEAHWU5C.js → tool-adapter-FJAFLDZA.js} +2 -2
  97. package/dist/{tools-CIM26IFB.js → tools-KBS6X3EN.js} +28 -28
  98. package/dist/{types-CbggXFvR.d.ts → types-CIVhQMvD.d.ts} +1 -1
  99. package/dist/{types-CMtHpDWT.d.ts → types-Df7NM9b5.d.ts} +2 -0
  100. package/dist/{update-UZBBO42X.js → update-TDS6LP5N.js} +4 -4
  101. package/dist/{update-server-LOOXIXDW.js → update-server-SVPV6ZJZ.js} +2 -2
  102. package/dist/{url-utils-SAJP7AEX.js → url-utils-C5BM7NF7.js} +2 -2
  103. package/dist/web/assets/index-ChtRS33s.js +324 -0
  104. package/dist/web/assets/{index-BmILAZrT.css → index-c43YT-4A.css} +1 -1
  105. package/dist/web/index.html +2 -2
  106. package/dist/web/sw.js +1 -1
  107. package/dist/workflow-defaults/default.workflow.json +2 -2
  108. package/dist/{workspace-2XODU4YJ.js → workspace-IQLLHMYR.js} +5 -5
  109. package/package.json +5 -2
  110. package/dist/chunk-NCZRWCJN.js +0 -7
  111. package/dist/client-EM7ISGUP.js +0 -16
  112. package/dist/compactor-V3LR7APW.js +0 -31
  113. package/dist/http-client-33EZ3BLR.js +0 -11
  114. package/dist/inspect-proxy-NHKQQ2CD.js +0 -13
  115. package/dist/launch-L5ROVNI3.js +0 -52
  116. package/dist/orchestrator-XK5K3RPL.js +0 -63
  117. package/dist/profiles-5J7F4BML.js +0 -10
  118. package/dist/server-EPXODFMB.js +0 -55
  119. package/dist/service-54PGIPDQ.js +0 -25
  120. package/dist/web/assets/index-rZHXkfMq.js +0 -324
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  getEventStore
3
- } from "./chunk-JXLRL5JR.js";
3
+ } from "./chunk-TGVDUK4N.js";
4
4
  import {
5
5
  createChatPathConfirmationMessage
6
- } from "./chunk-I7FY2LTR.js";
6
+ } from "./chunk-4GHLULHB.js";
7
7
  import {
8
8
  getPlatformShell
9
- } from "./chunk-SA34STZ6.js";
9
+ } from "./chunk-AESOGRFK.js";
10
10
 
11
11
  // src/server/tools/path-security.ts
12
12
  import { realpath } from "fs/promises";
@@ -140,6 +140,151 @@ function normalizeExtracted(path) {
140
140
  function isPlaceholderToken(str) {
141
141
  return str.includes("__URL__") || str.includes("__FILEURL__") || str.includes("__SED__") || str.includes("__COMMIT_MSG__");
142
142
  }
143
+ var REGEX_TOOL_RE = /\b(?:sed|awk|gawk|mawk|perl|ruby|raku)\b/;
144
+ var SHELL_TOKEN_END_RE = /[\s'"`|&;,<>()]/;
145
+ function isRegexAddress(command, start, end, hasRegexTool, quote) {
146
+ const content = command.slice(start + 1, end);
147
+ if (looksLikeRegex(content)) return true;
148
+ if (command[end + 1] === ",") return true;
149
+ if (quote === null && command[start - 1] === "~" && (command[start - 2] === "=" || command[start - 2] === "!")) {
150
+ return true;
151
+ }
152
+ const action = command[end + 1];
153
+ if (action !== void 0 && /[a-zA-Z]/.test(action)) {
154
+ const after = command[end + 2];
155
+ const terminated = quote === null ? SHELL_TOKEN_END_RE.test(after ?? "") : after === quote;
156
+ if (terminated) return true;
157
+ }
158
+ return hasRegexTool && quote !== null && !/\s/.test(content);
159
+ }
160
+ function maskRegexAddresses(command) {
161
+ const work = command.replace(/(?:=|!)~\s+/g, " __SED__ ");
162
+ if (!work.includes("/")) return work;
163
+ const hasRegexTool = REGEX_TOOL_RE.test(work);
164
+ const out = [];
165
+ let quote = null;
166
+ let i = 0;
167
+ const n = work.length;
168
+ const maskSpan = (end) => {
169
+ if (out[out.length - 1] === "~" && (out[out.length - 2] === "=" || out[out.length - 2] === "!")) {
170
+ out.pop();
171
+ out.pop();
172
+ }
173
+ out.push(" __SED__ ");
174
+ i = end + 1;
175
+ };
176
+ while (i < n) {
177
+ const ch = work[i];
178
+ if (quote !== null) {
179
+ if (ch === "\\" && quote !== "'") {
180
+ out.push(ch, work[i + 1] ?? "");
181
+ i += 2;
182
+ continue;
183
+ }
184
+ if (ch === quote) {
185
+ out.push(ch);
186
+ quote = null;
187
+ i += 1;
188
+ continue;
189
+ }
190
+ if (ch === "/") {
191
+ let j = i + 1;
192
+ while (j < n) {
193
+ if (work[j] === "\\" && quote !== "'") {
194
+ j += 2;
195
+ continue;
196
+ }
197
+ if (work[j] === quote || work[j] === "/") break;
198
+ j += 1;
199
+ }
200
+ if (j < n && work[j] === "/" && isRegexAddress(work, i, j, hasRegexTool, quote)) {
201
+ maskSpan(j);
202
+ continue;
203
+ }
204
+ }
205
+ out.push(ch);
206
+ i += 1;
207
+ continue;
208
+ }
209
+ if (ch === "'" || ch === '"' || ch === "`") {
210
+ quote = ch;
211
+ out.push(ch);
212
+ i += 1;
213
+ continue;
214
+ }
215
+ if (ch === "/") {
216
+ let j = i + 1;
217
+ while (j < n && work[j] !== "/" && !/[\s|&;<>()'"`]/.test(work[j])) j += 1;
218
+ if (j < n && work[j] === "/" && isRegexAddress(work, i, j, hasRegexTool, null)) {
219
+ maskSpan(j);
220
+ continue;
221
+ }
222
+ }
223
+ out.push(ch);
224
+ i += 1;
225
+ }
226
+ return out.join("");
227
+ }
228
+ function extractUnquotedTildePaths(command, home) {
229
+ const paths = [];
230
+ let quote = null;
231
+ let i = 0;
232
+ const n = command.length;
233
+ while (i < n) {
234
+ const ch = command[i];
235
+ if (quote !== null) {
236
+ if (ch === "\\" && quote !== "'") {
237
+ i += 2;
238
+ continue;
239
+ }
240
+ if (ch === quote) {
241
+ quote = null;
242
+ i += 1;
243
+ continue;
244
+ }
245
+ i += 1;
246
+ continue;
247
+ }
248
+ if (ch === "'" || ch === '"' || ch === "`") {
249
+ quote = ch;
250
+ i += 1;
251
+ continue;
252
+ }
253
+ if (ch === "~" && (i === 0 || /[\s=(]/.test(command[i - 1]))) {
254
+ let j = i + 1;
255
+ while (j < n && !/[\s'"()]/.test(command[j])) j += 1;
256
+ const tail = command.slice(i + 1, j);
257
+ if (tail === "" || tail.startsWith("/")) {
258
+ const resolved = normalize(resolve(home + tail));
259
+ if (!isSafePath(resolved)) {
260
+ paths.push(resolved);
261
+ }
262
+ }
263
+ i = j;
264
+ continue;
265
+ }
266
+ i += 1;
267
+ }
268
+ return paths;
269
+ }
270
+ var TRAVERSAL_SEGMENT_RE = /(?:^|\/)\.\.(?:\/|$)/;
271
+ function extractRelativeTraversals(command) {
272
+ const out = [];
273
+ const isTraversal = (token) => TRAVERSAL_SEGMENT_RE.test(token);
274
+ const quotedPattern = /["']([^"']+)["']/g;
275
+ let m;
276
+ while ((m = quotedPattern.exec(command)) !== null) {
277
+ const content = m[1];
278
+ if (!content || content.startsWith("/") || content.startsWith("~") || isWindowsAbsolutePath(content)) continue;
279
+ if (isTraversal(content)) out.push(content);
280
+ }
281
+ const bare = command.replace(/["'][^"']*["']/g, " ").split(/[\s|&;<>()]+/);
282
+ for (const token of bare) {
283
+ if (!token || token.startsWith("/") || token.startsWith("~")) continue;
284
+ if (isTraversal(token)) out.push(token);
285
+ }
286
+ return [...new Set(out)];
287
+ }
143
288
  function extractAbsolutePathsFromCommand(command) {
144
289
  if (!command.trim()) {
145
290
  return [];
@@ -151,6 +296,7 @@ function extractAbsolutePathsFromCommand(command) {
151
296
  sanitized = sanitized.replace(/(?<!\w)s\/[^/]*\/[^/]*\/[gip]*/g, " __SED__ ");
152
297
  sanitized = sanitized.replace(/(?<!\w)s\|[^|]*\|[^|]*\|[gip]*/g, " __SED__ ");
153
298
  sanitized = sanitized.replace(/(?<!\w)s:[^:]*:[^:]*:[gip]*/g, " __SED__ ");
299
+ sanitized = maskRegexAddresses(sanitized);
154
300
  sanitized = sanitized.replace(
155
301
  /git\s+commit\b.*?(?:-(?:[a-zA-Z]*m)(?=\s)|--message)\s+(["'])(?:(?!\1).)*\1/g,
156
302
  (match2) => match2.replace(/\/[^\s"'|&;<>`()]+/g, " __COMMIT_MSG__ ")
@@ -163,17 +309,9 @@ function extractAbsolutePathsFromCommand(command) {
163
309
  }
164
310
  }
165
311
  sanitized = sanitized.replace(/file:\/\/[^\s'"]+/g, " __FILEURL__ ");
166
- const tildePattern = /(?:^|[\s='"(])~(\/[^\s'"()]*)?(?=[\s'"()]|$)/g;
167
- let match;
168
- while ((match = tildePattern.exec(sanitized)) !== null) {
169
- const pathPart = match[1] ?? "";
170
- const fullPath = home + pathPart;
171
- const resolved = normalize(resolve(fullPath));
172
- if (!isSafePath(resolved)) {
173
- paths.push(resolved);
174
- }
175
- }
312
+ paths.push(...extractUnquotedTildePaths(sanitized, home));
176
313
  const quotedPattern = /["']([^"']+)["']/g;
314
+ let match;
177
315
  while ((match = quotedPattern.exec(sanitized)) !== null) {
178
316
  const content = match[1];
179
317
  if (content.startsWith("/") && content.endsWith("/")) {
@@ -192,13 +330,6 @@ function extractAbsolutePathsFromCommand(command) {
192
330
  if (!isSafePath(resolved)) {
193
331
  paths.push(resolved);
194
332
  }
195
- } else if (content.startsWith("~")) {
196
- const pathPart = content.slice(1);
197
- const fullPath = join(home, pathPart);
198
- const resolved = normalize(resolve(fullPath));
199
- if (!isSafePath(resolved)) {
200
- paths.push(resolved);
201
- }
202
333
  }
203
334
  }
204
335
  if (isWindows()) {
@@ -214,6 +345,10 @@ function extractAbsolutePathsFromCommand(command) {
214
345
  }
215
346
  if (posixShell) {
216
347
  const absolutePattern = /(?:^|[\s=(])(\/[^\s"'|&;<>`()]+)/g;
348
+ const rootPattern = /(?:^|[\s=(])\/(?=$|[\s'"`|&;,<()])/g;
349
+ if (rootPattern.test(sanitized)) {
350
+ paths.push("/");
351
+ }
217
352
  while ((match = absolutePattern.exec(sanitized)) !== null) {
218
353
  const candidate = match[1];
219
354
  if (isPlaceholderToken(candidate)) continue;
@@ -225,6 +360,7 @@ function extractAbsolutePathsFromCommand(command) {
225
360
  }
226
361
  }
227
362
  }
363
+ paths.push(...extractRelativeTraversals(sanitized));
228
364
  return [...new Set(paths)];
229
365
  }
230
366
  function extractSensitivePathsFromCommand(command) {
@@ -535,4 +671,4 @@ export {
535
671
  getConfirmationSessionId,
536
672
  getPendingConfirmationsBySession
537
673
  };
538
- //# sourceMappingURL=chunk-BZVW77PI.js.map
674
+ //# sourceMappingURL=chunk-QQVPUZQB.js.map
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  getAllInstructions,
3
3
  getEnabledSkillMetadata
4
- } from "./chunk-YGJIK3CG.js";
4
+ } from "./chunk-2FCLCUVR.js";
5
5
  import {
6
6
  buildTopLevelSystemPrompt
7
- } from "./chunk-2XD65L7M.js";
7
+ } from "./chunk-27NABDXB.js";
8
8
  import {
9
9
  findAgentById,
10
10
  getRuntimeConfig,
11
11
  getSubAgents,
12
12
  loadAllAgentsDefault,
13
13
  resolveDefaultAgentId
14
- } from "./chunk-UPBWEHIL.js";
14
+ } from "./chunk-LNNBLB6G.js";
15
15
  import {
16
16
  logger
17
17
  } from "./chunk-K44MW7JJ.js";
@@ -94,21 +94,21 @@ async function loadSessionContext(sessionManager, sessionId) {
94
94
  const { content: instructionContent } = await getAllInstructions(session.workdir, session.projectId);
95
95
  const runtimeConfig = getRuntimeConfig();
96
96
  const configDir = getGlobalConfigDir(runtimeConfig.mode ?? "production");
97
- const skills = await getEnabledSkillMetadata(configDir, sessionManager.getEffectiveWorkdir(sessionId));
97
+ const skills = await getEnabledSkillMetadata(configDir, sessionManager.getProjectWorkdir(sessionId));
98
98
  return { instructionContent: instructionContent ?? "", skills };
99
99
  }
100
100
  function resolveAgentDef(sessionManager, sessionId) {
101
- return loadAllAgentsDefault().then((allAgents) => {
101
+ return loadAllAgentsDefault(sessionManager.getProjectWorkdir(sessionId)).then((allAgents) => {
102
102
  const session = sessionManager.requireSession(sessionId);
103
103
  return findAgentById(session.mode, allAgents) ?? findAgentById(resolveDefaultAgentId(), allAgents);
104
104
  });
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-CIM26IFB.js");
108
+ const { getToolRegistryForAgent } = await import("./tools-KBS6X3EN.js");
109
109
  const tools = getToolRegistryForAgent(agentDef, sessionId).definitions;
110
110
  const toolFingerprint = getToolFingerprint(tools);
111
- const allAgents = await loadAllAgentsDefault();
111
+ const allAgents = await loadAllAgentsDefault(sessionManager.getProjectWorkdir(sessionId));
112
112
  const subAgentDefs = getSubAgents(allAgents);
113
113
  const session = sessionManager.requireSession(sessionId);
114
114
  const systemPrompt = buildTopLevelSystemPrompt(
@@ -124,14 +124,14 @@ 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-CIM26IFB.js");
127
+ const { getToolRegistryForAgent } = await import("./tools-KBS6X3EN.js");
128
128
  const tools = getToolRegistryForAgent(agentDef, sessionId).definitions;
129
129
  const toolFingerprint = getToolFingerprint(tools);
130
130
  return computeDynamicContextHash(instructionContent, skills, toolFingerprint, modelName);
131
131
  }
132
132
  async function applyDynamicContext(sessionManager, sessionId, modelName) {
133
133
  const session = sessionManager.requireSession(sessionId);
134
- const allAgents = await loadAllAgentsDefault();
134
+ const allAgents = await loadAllAgentsDefault(sessionManager.getProjectWorkdir(sessionId));
135
135
  const agentDef = findAgentById(session.mode, allAgents) ?? findAgentById(resolveDefaultAgentId(), allAgents);
136
136
  const { systemPrompt, tools, hash } = await buildCachedPrompt(sessionManager, sessionId, agentDef, modelName);
137
137
  sessionManager.setCachedPrompt(sessionId, systemPrompt, tools, hash);
@@ -148,4 +148,4 @@ export {
148
148
  computeSessionHash,
149
149
  applyDynamicContext
150
150
  };
151
- //# sourceMappingURL=chunk-GUHHUDNL.js.map
151
+ //# sourceMappingURL=chunk-SQLJRO3J.js.map
@@ -1,3 +1,6 @@
1
+ import {
2
+ updateSessionMessageCount
3
+ } from "./chunk-KLQEL2DZ.js";
1
4
  import {
2
5
  buildContextMessagesFromEventHistory,
3
6
  buildMessagesFromStoredEvents,
@@ -6,16 +9,13 @@ import {
6
9
  foldSessionState,
7
10
  spreadOptionalMessageFields,
8
11
  trimSnapshotStreamingOutput
9
- } from "./chunk-UTIQ7OO5.js";
10
- import {
11
- updateSessionMessageCount
12
- } from "./chunk-3O77NT4T.js";
12
+ } from "./chunk-3KBRMBTP.js";
13
13
  import {
14
14
  getRuntimeConfig
15
- } from "./chunk-UPBWEHIL.js";
15
+ } from "./chunk-LNNBLB6G.js";
16
16
  import {
17
17
  SETTINGS_KEYS
18
- } from "./chunk-HP5CIB66.js";
18
+ } from "./chunk-HD6Y77RO.js";
19
19
  import {
20
20
  logger
21
21
  } from "./chunk-K44MW7JJ.js";
@@ -1465,4 +1465,4 @@ export {
1465
1465
  truncateSessionMessages,
1466
1466
  getRecentUserPromptsForSession
1467
1467
  };
1468
- //# sourceMappingURL=chunk-JXLRL5JR.js.map
1468
+ //# sourceMappingURL=chunk-TGVDUK4N.js.map
@@ -501,7 +501,7 @@ function getThinking(msg, override) {
501
501
  function buildAssistantMessage(msg, thinkingField, sendReasoningInMessages) {
502
502
  const result = {
503
503
  role: "assistant",
504
- content: msg.toolCalls?.length ? msg.content || "" : msg.content || null
504
+ content: msg.content || " "
505
505
  };
506
506
  if (msg.toolCalls?.length) {
507
507
  result["tool_calls"] = convertToolCalls(msg.toolCalls);
@@ -697,4 +697,4 @@ export {
697
697
  buildStreamingCreateParams,
698
698
  mapFinishReason
699
699
  };
700
- //# sourceMappingURL=chunk-L737Y63F.js.map
700
+ //# sourceMappingURL=chunk-TOKQ2UVG.js.map
@@ -4,42 +4,42 @@ import {
4
4
  getToolRegistryForAgent,
5
5
  processEventsForConversation,
6
6
  runTopLevelAgentLoop
7
- } from "./chunk-K733B5T2.js";
7
+ } from "./chunk-4HV3PDEK.js";
8
8
  import {
9
9
  buildCachedPrompt,
10
10
  computeDynamicContextHash,
11
11
  getToolFingerprint
12
- } from "./chunk-GUHHUDNL.js";
12
+ } from "./chunk-SQLJRO3J.js";
13
13
  import {
14
14
  getAllInstructions,
15
15
  getEnabledSkillMetadata
16
- } from "./chunk-YGJIK3CG.js";
16
+ } from "./chunk-2FCLCUVR.js";
17
17
  import {
18
18
  TurnMetrics,
19
19
  createChatDoneEvent,
20
20
  createMessageStartEvent
21
- } from "./chunk-NLO64UE3.js";
21
+ } from "./chunk-EQ7DK2TG.js";
22
22
  import {
23
23
  buildAgentReminder,
24
24
  buildAgentSmallReminder
25
- } from "./chunk-2XD65L7M.js";
25
+ } from "./chunk-27NABDXB.js";
26
26
  import {
27
27
  PathAccessDeniedError
28
- } from "./chunk-BZVW77PI.js";
28
+ } from "./chunk-QQVPUZQB.js";
29
29
  import {
30
30
  getCurrentContextWindowId,
31
31
  getCurrentWindowMessageOptions,
32
32
  getEventStore
33
- } from "./chunk-JXLRL5JR.js";
33
+ } from "./chunk-TGVDUK4N.js";
34
34
  import {
35
35
  buildSnapshotFromSessionState
36
- } from "./chunk-UTIQ7OO5.js";
36
+ } from "./chunk-3KBRMBTP.js";
37
37
  import {
38
38
  findAgentById,
39
39
  getRuntimeConfig,
40
40
  loadAllAgentsDefault,
41
41
  resolveDefaultAgentId
42
- } from "./chunk-UPBWEHIL.js";
42
+ } from "./chunk-LNNBLB6G.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-NEBM3GQX.js");
52
+ const { getSetting, SETTINGS_KEYS } = await import("./settings-FGXQHKUH.js");
53
53
  const raw = getSetting(SETTINGS_KEYS.RETRY_PATTERNS);
54
54
  if (!raw) {
55
55
  const oldXmlProtection = getSetting("llm.disableXmlProtection");
@@ -224,18 +224,18 @@ function injectAgentReminder(sessionId, agentDef) {
224
224
  });
225
225
  }
226
226
  async function runAgentTurn(options, turnMetrics, agentId, append, callbacks) {
227
- const allAgents = await loadAllAgentsDefault();
227
+ const allAgents = await loadAllAgentsDefault(options.sessionManager.getProjectWorkdir(options.sessionId));
228
228
  const agentDef = findAgentById(agentId, allAgents) ?? findAgentById(resolveDefaultAgentId(), allAgents);
229
229
  const agentLlmClient = options.sessionManager.createClientForAgent(agentId, options.llmClient);
230
230
  const statsIdentity = resolveStatsIdentity({ ...options, llmClient: agentLlmClient });
231
- if (!options.warmup) {
231
+ if (!options.warmup && !options.skipAgentReminder) {
232
232
  injectAgentReminder(options.sessionId, agentDef);
233
233
  }
234
234
  const session = options.sessionManager.requireSession(options.sessionId);
235
235
  const { content: instructionContent } = await getAllInstructions(session.workdir, session.projectId);
236
236
  const runtimeConfig = getRuntimeConfig();
237
237
  const configDir = getGlobalConfigDir(runtimeConfig.mode ?? "production");
238
- const skills = await getEnabledSkillMetadata(configDir, options.sessionManager.getEffectiveWorkdir(options.sessionId));
238
+ const skills = await getEnabledSkillMetadata(configDir, options.sessionManager.getProjectWorkdir(options.sessionId));
239
239
  return runTopLevelAgentLoop(
240
240
  {
241
241
  mode: agentId,
@@ -296,6 +296,7 @@ async function runAgentTurn(options, turnMetrics, agentId, append, callbacks) {
296
296
  ...options.initialCompacting ? { initialCompacting: true } : {},
297
297
  ...callbacks?.injectKickoff ? { injectKickoff: callbacks.injectKickoff } : {},
298
298
  ...callbacks?.onToolExecuted ? { onToolExecuted: callbacks.onToolExecuted } : {},
299
+ ...options.suppressRecoverableErrors ? { suppressChatError: true } : {},
299
300
  ...options.warmup ? { warmup: true } : {}
300
301
  },
301
302
  turnMetrics
@@ -319,4 +320,4 @@ export {
319
320
  runChatTurn,
320
321
  runAgentTurn
321
322
  };
322
- //# sourceMappingURL=chunk-FW4NDUBL.js.map
323
+ //# sourceMappingURL=chunk-U4HMAYAD.js.map
@@ -3,7 +3,7 @@ var DEFAULT_PROFILE = {
3
3
  name: "default",
4
4
  temperature: 0.7,
5
5
  topP: 0.9,
6
- defaultMaxTokens: 4096,
6
+ defaultMaxTokens: 16384,
7
7
  supportsVision: true
8
8
  };
9
9
  var MOCK_PROFILE = {
@@ -172,4 +172,4 @@ export {
172
172
  getModelProfile,
173
173
  modelSupportsVision
174
174
  };
175
- //# sourceMappingURL=chunk-V4IE7HJY.js.map
175
+ //# sourceMappingURL=chunk-W7VIYHPQ.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createMessageStartEvent
3
- } from "./chunk-NLO64UE3.js";
3
+ } from "./chunk-EQ7DK2TG.js";
4
4
  import {
5
5
  COMPACTION_PROMPT
6
- } from "./chunk-2XD65L7M.js";
6
+ } from "./chunk-27NABDXB.js";
7
7
  import {
8
8
  getCurrentWindowMessageOptions
9
- } from "./chunk-JXLRL5JR.js";
9
+ } from "./chunk-TGVDUK4N.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-VPVLO436.js.map
39
+ //# sourceMappingURL=chunk-X3XKYGUN.js.map
@@ -5,7 +5,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __commonJS = (cb, mod) => function __require() {
8
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
8
+ try {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ } catch (e) {
11
+ throw mod = 0, e;
12
+ }
9
13
  };
10
14
  var __copyProps = (to, from, except, desc) => {
11
15
  if (from && typeof from === "object" || typeof from === "function") {
@@ -28,4 +32,4 @@ export {
28
32
  __commonJS,
29
33
  __toESM
30
34
  };
31
- //# sourceMappingURL=chunk-5WRI5ZAA.js.map
35
+ //# sourceMappingURL=chunk-YLJ4XMA6.js.map
@@ -26,4 +26,4 @@ export {
26
26
  isClientMessage,
27
27
  isServerMessage
28
28
  };
29
- //# sourceMappingURL=chunk-X25Q6RAV.js.map
29
+ //# sourceMappingURL=chunk-ZKLE2Q3I.js.map
@@ -11,11 +11,11 @@ import {
11
11
  } from "./chunk-I72ACQ6R.js";
12
12
  import {
13
13
  getPlatformShell
14
- } from "./chunk-SA34STZ6.js";
14
+ } from "./chunk-AESOGRFK.js";
15
15
  import {
16
16
  SETTINGS_KEYS,
17
17
  getSetting
18
- } from "./chunk-HP5CIB66.js";
18
+ } from "./chunk-HD6Y77RO.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-TKKP56QK.js.map
217
+ //# sourceMappingURL=chunk-ZTOG6LJD.js.map
package/dist/cli/dev.js CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "../chunk-HV6IALXF.js";
5
- import "../chunk-4H427UBV.js";
4
+ } from "../chunk-QJWTBVJO.js";
5
+ import "../chunk-AGXJ5O63.js";
6
6
  import {
7
7
  logger
8
8
  } from "../chunk-K44MW7JJ.js";
9
- import "../chunk-5WRI5ZAA.js";
9
+ import "../chunk-YLJ4XMA6.js";
10
10
 
11
11
  // src/cli/dev.ts
12
12
  import { readFileSync } from "fs";
package/dist/cli/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "../chunk-HV6IALXF.js";
5
- import "../chunk-4H427UBV.js";
4
+ } from "../chunk-QJWTBVJO.js";
5
+ import "../chunk-AGXJ5O63.js";
6
6
  import {
7
7
  logger
8
8
  } from "../chunk-K44MW7JJ.js";
9
- import "../chunk-5WRI5ZAA.js";
9
+ import "../chunk-YLJ4XMA6.js";
10
10
 
11
11
  // src/cli/index.ts
12
12
  var MIN_HEAP_MB = 6144;
@@ -0,0 +1,16 @@
1
+ import {
2
+ createLLMClient
3
+ } from "./chunk-MKWS7TQH.js";
4
+ import "./chunk-W7VIYHPQ.js";
5
+ import "./chunk-AZHWLLPP.js";
6
+ import "./chunk-HNCM3D7Y.js";
7
+ import "./chunk-TOKQ2UVG.js";
8
+ import "./chunk-LTYL6ZGH.js";
9
+ import "./chunk-HD6Y77RO.js";
10
+ import "./chunk-5PT4UMRR.js";
11
+ import "./chunk-K44MW7JJ.js";
12
+ import "./chunk-YLJ4XMA6.js";
13
+ export {
14
+ createLLMClient
15
+ };
16
+ //# sourceMappingURL=client-KCNTDTIR.js.map
@@ -8,8 +8,8 @@ import {
8
8
  mapFinishReason,
9
9
  parseToolArguments,
10
10
  resolveAttachmentsInMessages
11
- } from "./chunk-L737Y63F.js";
12
- import "./chunk-5WRI5ZAA.js";
11
+ } from "./chunk-TOKQ2UVG.js";
12
+ import "./chunk-YLJ4XMA6.js";
13
13
  export {
14
14
  buildModelParams,
15
15
  buildNonStreamingCreateParams,
@@ -21,4 +21,4 @@ export {
21
21
  parseToolArguments,
22
22
  resolveAttachmentsInMessages
23
23
  };
24
- //# sourceMappingURL=client-pure-VFZIIK4S.js.map
24
+ //# sourceMappingURL=client-pure-B5DHEKQJ.js.map
@@ -0,0 +1,14 @@
1
+ ---
2
+ id: mark-done
3
+ name: Mark Task as Done
4
+ ---
5
+
6
+ Mark the task you are currently working on as done using the `project_tasks` tool.
7
+
8
+ 1. Use `project_tasks` with `action=list, status='in_progress'` to find the task bound to your current session (the one in the In Progress column).
9
+ 2. If no task is bound to your session, check `action=list, status='done'` for it: if it is already there, report that instead of re-moving it.
10
+ 3. Confirm the work is genuinely complete before proceeding.
11
+ 4. Move it: `action=move`, `taskId=<id>`, `to='done'`.
12
+ 5. If the move is blocked by unmet column gates, the error lists the missing fields: fill each with `action=set_gate_value` (`taskId`, `gateId`, `value` — provide real proof/evidence as part of your work), then retry the move.
13
+ 6. If you get a CONFLICT, someone else changed the task: re-list (`action=list, status='in_progress'`) and retry.
14
+ 7. Confirm the final state to the user.
@@ -0,0 +1,32 @@
1
+ import {
2
+ COMPACTION_HEADROOM_TOKENS,
3
+ COMPACTION_MAX_RATIO,
4
+ appendCompactionPrompt,
5
+ shouldCompact
6
+ } from "./chunk-X3XKYGUN.js";
7
+ import "./chunk-EQ7DK2TG.js";
8
+ import "./chunk-27NABDXB.js";
9
+ import "./chunk-TGVDUK4N.js";
10
+ import "./chunk-KLQEL2DZ.js";
11
+ import "./chunk-AESOGRFK.js";
12
+ import "./chunk-3KBRMBTP.js";
13
+ import "./chunk-LCLH6ZUL.js";
14
+ import "./chunk-LNNBLB6G.js";
15
+ import "./chunk-OSXPQSLW.js";
16
+ import "./chunk-3PG65AXG.js";
17
+ import "./chunk-J2GP3J3X.js";
18
+ import "./chunk-W7VIYHPQ.js";
19
+ import "./chunk-AZHWLLPP.js";
20
+ import "./chunk-TOKQ2UVG.js";
21
+ import "./chunk-HD6Y77RO.js";
22
+ import "./chunk-5PT4UMRR.js";
23
+ import "./chunk-K44MW7JJ.js";
24
+ import "./chunk-CQGTEGKL.js";
25
+ import "./chunk-YLJ4XMA6.js";
26
+ export {
27
+ COMPACTION_HEADROOM_TOKENS,
28
+ COMPACTION_MAX_RATIO,
29
+ appendCompactionPrompt,
30
+ shouldCompact
31
+ };
32
+ //# sourceMappingURL=compactor-LAXZLPPA.js.map
@@ -14,7 +14,7 @@ import {
14
14
  updateProvider
15
15
  } from "./chunk-KSXCOHHW.js";
16
16
  import "./chunk-CQGTEGKL.js";
17
- import "./chunk-5WRI5ZAA.js";
17
+ import "./chunk-YLJ4XMA6.js";
18
18
  export {
19
19
  activateProvider,
20
20
  addProvider,
@@ -30,4 +30,4 @@ export {
30
30
  setDefaultModelSelection,
31
31
  updateProvider
32
32
  };
33
- //# sourceMappingURL=config-EAB3V4QK.js.map
33
+ //# sourceMappingURL=config-TUCHLIWD.js.map