@iowarp/clio-coder 0.3.4 → 0.3.6

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 (265) hide show
  1. package/CHANGELOG.md +37 -2
  2. package/CONTRIBUTING.md +6 -6
  3. package/README.md +2 -2
  4. package/dist/{acp-S5R4RR5B.js → acp-2BEHC4DL.js} +4 -4
  5. package/dist/{agents-P6DMMVZY.js → agents-LNNFTM53.js} +13 -11
  6. package/dist/assets/codewiki.json +1 -1
  7. package/dist/{auth-2XCZLPKS.js → auth-KXXFI2VS.js} +6 -6
  8. package/dist/{chunk-YCWGATWI.js → chunk-24I7BN55.js} +2 -2
  9. package/dist/{chunk-EKMEHE4H.js → chunk-33YXPOE3.js} +2 -3
  10. package/dist/chunk-3BPUFZDL.js +37 -0
  11. package/dist/{chunk-WPQLXFOZ.js → chunk-43AOLP7E.js} +2 -2
  12. package/dist/{chunk-N4CZJQRK.js → chunk-5JGRAMKL.js} +4 -4
  13. package/dist/{chunk-BRXQQJFP.js → chunk-6US73PDB.js} +568 -47
  14. package/dist/{chunk-K6WL7QZT.js → chunk-6XXKFVSN.js} +2 -2
  15. package/dist/{chunk-QQK64KLB.js → chunk-CJUB2JJ2.js} +138 -20
  16. package/dist/{chunk-HV5X7OR2.js → chunk-CKXWIANG.js} +12 -12
  17. package/dist/{chunk-UZHIZC5S.js → chunk-CYQKWTG3.js} +61 -76
  18. package/dist/{chunk-QWU7ZBO7.js → chunk-DJVECN66.js} +204 -45
  19. package/dist/{chunk-ZWMF7253.js → chunk-E2ER4LJF.js} +304 -9
  20. package/dist/{chunk-7RXG6QRZ.js → chunk-EKY57CSP.js} +2 -75
  21. package/dist/{chunk-EDRHSCIE.js → chunk-EYPA3EGJ.js} +10 -2
  22. package/dist/{chunk-TTNYS3EA.js → chunk-G7MUEIGA.js} +1 -1
  23. package/dist/{chunk-BPGS2WCQ.js → chunk-GEYXPTRF.js} +2 -1
  24. package/dist/{chunk-BEY543CS.js → chunk-GOXNB3AO.js} +5 -2
  25. package/dist/{chunk-G4BMMOKF.js → chunk-HVDIIIQW.js} +2 -2
  26. package/dist/chunk-HWUFFB6L.js +83 -0
  27. package/dist/{chunk-35MKKU5R.js → chunk-K7T3E2SR.js} +15 -8
  28. package/dist/{chunk-VAWWTKDP.js → chunk-KHSFENX2.js} +2 -2
  29. package/dist/chunk-LCGCVYZ4.js +57 -0
  30. package/dist/{chunk-X6COSD2O.js → chunk-LYF7OHWH.js} +41 -14
  31. package/dist/{chunk-POHLU5DW.js → chunk-M6L6IDJG.js} +3 -3
  32. package/dist/{chunk-X4RCMKVQ.js → chunk-NDINPTJ4.js} +2 -2
  33. package/dist/{chunk-5M54SPOL.js → chunk-ODFEOB4F.js} +161 -5
  34. package/dist/{chunk-3JLKSKD7.js → chunk-OH3TOQTB.js} +5 -1
  35. package/dist/{chunk-MEQ45TQ4.js → chunk-PBTHKCPN.js} +18 -4
  36. package/dist/{chunk-ED4KHGC3.js → chunk-PPAMZ32Z.js} +9 -2
  37. package/dist/{chunk-QQL5RT5M.js → chunk-QM3F2GKX.js} +94 -36
  38. package/dist/{chunk-A2GZF7DC.js → chunk-QNQHSOLF.js} +4 -4
  39. package/dist/{chunk-KRPY7NTG.js → chunk-R46L2BIR.js} +3 -3
  40. package/dist/{chunk-BP4OYD6A.js → chunk-RY3LY4J5.js} +20 -2
  41. package/dist/{chunk-34475P3I.js → chunk-TSHXZTOQ.js} +5 -4
  42. package/dist/{chunk-VJWL6YS5.js → chunk-UUVG37B4.js} +2 -2
  43. package/dist/{chunk-2TZWSW76.js → chunk-WHGPSPT5.js} +2 -2
  44. package/dist/{chunk-TW3WDMVS.js → chunk-WHJYKASB.js} +2 -2
  45. package/dist/{chunk-YHZX5GEU.js → chunk-XAKHZX5N.js} +2 -2
  46. package/dist/{chunk-HXG4IURW.js → chunk-XE2VEJHX.js} +2 -2
  47. package/dist/{chunk-3HZ5RWN2.js → chunk-XF5N4U5A.js} +7 -6
  48. package/dist/{chunk-ZYKPLLNQ.js → chunk-XXQNGV4M.js} +590 -32
  49. package/dist/{chunk-4JUF2NNX.js → chunk-XYDYPRZI.js} +4 -4
  50. package/dist/{chunk-VMNQ6OZA.js → chunk-ZRGEBJ4T.js} +971 -794
  51. package/dist/{chunk-2LZI5CAG.js → chunk-ZXF4XRKW.js} +75 -33
  52. package/dist/{chunk-VSNATDE6.js → chunk-ZZMN5OM4.js} +2 -2
  53. package/dist/cli/index.js +31 -31
  54. package/dist/{clio-J5JIOIDS.js → clio-M2KGYUFZ.js} +2 -2
  55. package/dist/{code-nav-AXCXSBHX.js → code-nav-GQNL7XA6.js} +5 -5
  56. package/dist/codewiki/build-worker.js +4 -4
  57. package/dist/{components-KELWS457.js → components-5TTYYX6G.js} +3 -3
  58. package/dist/{config-OEBMIN2U.js → config-XUUYQIWO.js} +27 -25
  59. package/dist/{configure-PUQOSIXQ.js → configure-IHJ7YOMV.js} +7 -7
  60. package/dist/{context-URSXPBCK.js → context-74JLXAWD.js} +12 -12
  61. package/dist/{context-MGSE4Z2T.js → context-75MIWW3U.js} +24 -22
  62. package/dist/{context-EKDCKUUZ.js → context-ZQ7SIFJV.js} +8 -7
  63. package/dist/{context-clear-KDAJRNUK.js → context-clear-GYKWNUML.js} +24 -22
  64. package/dist/{context-index-BZ4UYMTC.js → context-index-SSR5ECNE.js} +3 -3
  65. package/dist/{context-working-set-SBKMPPI2.js → context-working-set-UX5KEP4J.js} +11 -10
  66. package/dist/{dispatch-runner-MSWN72NK.js → dispatch-runner-GIJBHNFL.js} +21 -20
  67. package/dist/{docs-2C2LTVT2.js → docs-6FZSCG5B.js} +3 -3
  68. package/dist/{doctor-7BSE27PJ.js → doctor-SVJ5BZCW.js} +4 -4
  69. package/dist/{eval-IZGDOO4H.js → eval-CG6LLBLD.js} +47 -232
  70. package/dist/{evidence-SR7WXB5B.js → evidence-ZYFIEN42.js} +19 -18
  71. package/dist/{evolve-K7VE2CBX.js → evolve-QGEXEMDW.js} +19 -18
  72. package/dist/{extensions-QVDOHDGJ.js → extensions-ADGNCJJD.js} +3 -3
  73. package/dist/{fleet-7XMJNQNF.js → fleet-S5R4ZOQY.js} +49 -30
  74. package/dist/{fleet-preflight-AQNAH644.js → fleet-preflight-BHSNPBMH.js} +2 -2
  75. package/dist/{init-JGNPAYXT.js → init-5DRU55YR.js} +31 -29
  76. package/dist/memory-7YKKR6UC.js +467 -0
  77. package/dist/{models-ZMMLFJNN.js → models-ZPOLRU2C.js} +10 -10
  78. package/dist/{monitor-2F3T5KHP.js → monitor-US5F5YGZ.js} +33 -18
  79. package/dist/{orchestrator-ORHT43JB.js → orchestrator-E2AL4T5N.js} +1092 -659
  80. package/dist/{paths-UXLN5YYZ.js → paths-E7KYAQWE.js} +3 -3
  81. package/dist/{reset-NXGTYNUO.js → reset-KZ652EK6.js} +3 -3
  82. package/dist/{run-RF4WJGMT.js → run-SRNBKDWD.js} +52 -40
  83. package/dist/{share-UT3W6E4M.js → share-CGZE33UP.js} +3 -3
  84. package/dist/{skills-PSACKC5Q.js → skills-S2X4DLY5.js} +4 -4
  85. package/dist/{skills-eval-WJSI55RZ.js → skills-eval-W2GGIC4R.js} +19 -18
  86. package/dist/{targets-PIIRAOYS.js → targets-54SWINWB.js} +14 -12
  87. package/dist/{terminal-lease-ULWXWNVY.js → terminal-lease-SAIF2OGY.js} +5 -4
  88. package/dist/{uninstall-FZCQCDKC.js → uninstall-BVLWXKBT.js} +3 -3
  89. package/dist/{upgrade-346TZ6AV.js → upgrade-JKAR27XC.js} +8 -8
  90. package/dist/{usage-6KKXR32N.js → usage-MSAWCLX4.js} +60 -27
  91. package/dist/{verifiers-4UUM6TEE.js → verifiers-NCBTHHN2.js} +60 -54
  92. package/dist/{wiki-generate-7STOCIFZ.js → wiki-generate-GUSOQ6ZP.js} +30 -28
  93. package/dist/worker/entry.js +69 -58
  94. package/dist/{workspace-G4ZWUIPR.js → workspace-ZJ6BFM3Q.js} +4 -4
  95. package/docs/README.md +3 -3
  96. package/docs/acp.md +1 -1
  97. package/docs/alcf-provider.md +1 -1
  98. package/docs/architecture.md +2 -2
  99. package/docs/artifact-placement.md +1 -2
  100. package/docs/artifact-versions.md +1 -1
  101. package/docs/built-in-agents.md +1 -1
  102. package/docs/capacity-and-scheduling.md +1 -1
  103. package/docs/commands-and-modes.md +9 -7
  104. package/docs/configuration-and-targets.md +12 -1
  105. package/docs/context-engine.md +4 -2
  106. package/docs/context-working-set.md +4 -4
  107. package/docs/development-pipeline.md +1 -1
  108. package/docs/documentation-coverage.md +3 -3
  109. package/docs/documentation-guide.md +2 -2
  110. package/docs/eval-runner.md +1 -1
  111. package/docs/evals-internal.md +4 -45
  112. package/docs/evidence-and-memory.md +67 -7
  113. package/docs/evolution.md +1 -1
  114. package/docs/exit-codes-and-output.md +1 -1
  115. package/docs/extensions-and-sharing.md +2 -2
  116. package/docs/fleet-dispatch.md +28 -2
  117. package/docs/installation-and-lifecycle.md +2 -2
  118. package/docs/middleware-and-components.md +19 -2
  119. package/docs/model-catalog.md +1 -1
  120. package/docs/observability.md +3 -3
  121. package/docs/proactive-memory.md +26 -16
  122. package/docs/prompt-envelope-and-tools.md +4 -2
  123. package/docs/provider-adapter-cookbook.md +1 -1
  124. package/docs/release-cut-checklist.md +38 -35
  125. package/docs/safety-model.md +29 -7
  126. package/docs/scientific-validation.md +3 -3
  127. package/docs/session-lifecycle.md +1 -1
  128. package/docs/skills-marketplace.md +1 -1
  129. package/docs/tool-usage.md +2 -2
  130. package/docs/trace-store.md +1 -1
  131. package/docs/troubleshooting.md +1 -1
  132. package/docs/tui-design.md +38 -4
  133. package/docs/worker-dispatch-mechanics.md +1 -1
  134. package/package.json +7 -4
  135. package/src/cli/agents.ts +2 -3
  136. package/src/cli/argv.ts +14 -1
  137. package/src/cli/fleet.ts +15 -0
  138. package/src/cli/index.ts +1 -1
  139. package/src/cli/memory.ts +272 -10
  140. package/src/cli/modes/json-stream.ts +2 -2
  141. package/src/cli/modes/print.ts +12 -1
  142. package/src/cli/run.ts +22 -2
  143. package/src/cli/targets.ts +12 -3
  144. package/src/cli/usage.ts +55 -7
  145. package/src/core/bus-events.ts +3 -0
  146. package/src/core/response-model-id.ts +134 -0
  147. package/src/core/toml.ts +62 -0
  148. package/src/core/workspace-files.ts +0 -1
  149. package/src/domains/agents/builtins/architect.md +1 -1
  150. package/src/domains/agents/catalog.ts +5 -4
  151. package/src/domains/agents/recipe.ts +54 -14
  152. package/src/domains/agents/result-contract.ts +7 -4
  153. package/src/domains/context/bootstrap.ts +36 -27
  154. package/src/domains/context/project-metadata.ts +19 -63
  155. package/src/domains/context/prompt-context.ts +8 -0
  156. package/src/domains/context/working-set/policies/index.ts +3 -4
  157. package/src/domains/dispatch/budget-envelope.ts +396 -0
  158. package/src/domains/dispatch/contract.ts +2 -0
  159. package/src/domains/dispatch/extension.ts +81 -27
  160. package/src/domains/dispatch/orphan-recovery.ts +1 -0
  161. package/src/domains/dispatch/receipt-integrity.ts +4 -0
  162. package/src/domains/dispatch/state.ts +1 -0
  163. package/src/domains/dispatch/types.ts +10 -3
  164. package/src/domains/dispatch/validation.ts +14 -0
  165. package/src/domains/dispatch/worker-spawn.ts +14 -3
  166. package/src/domains/eval/metrics/evidence.ts +0 -116
  167. package/src/domains/eval/metrics/invariants.ts +1 -1
  168. package/src/domains/eval/runners/clio-run.ts +1 -10
  169. package/src/domains/eval/runners/external-command.ts +2 -29
  170. package/src/domains/eval/schema/suite.ts +0 -7
  171. package/src/domains/eval/suites/run.ts +1 -7
  172. package/src/domains/memory/index.ts +22 -0
  173. package/src/domains/memory/operations.ts +58 -1
  174. package/src/domains/memory/promotion.ts +281 -0
  175. package/src/domains/memory/prompt-section.ts +25 -5
  176. package/src/domains/memory/proposal.ts +51 -7
  177. package/src/domains/memory/task-bank.ts +3 -2
  178. package/src/domains/memory/task-memory-handoff.ts +181 -24
  179. package/src/domains/memory/task-memory-policy.ts +3 -1
  180. package/src/domains/memory/types.ts +37 -0
  181. package/src/domains/memory/validate.ts +178 -0
  182. package/src/domains/middleware/memory-intervention.ts +35 -25
  183. package/src/domains/middleware/runtime.ts +6 -0
  184. package/src/domains/middleware/skills-reminder.ts +19 -4
  185. package/src/domains/middleware/stalled-turn.ts +43 -1
  186. package/src/domains/middleware/types.ts +10 -0
  187. package/src/domains/observability/contract.ts +6 -1
  188. package/src/domains/observability/cost.ts +20 -4
  189. package/src/domains/observability/extension.ts +2 -2
  190. package/src/domains/providers/index.ts +3 -0
  191. package/src/domains/providers/model-discovery.ts +9 -0
  192. package/src/domains/providers/runtime-resolution.ts +38 -1
  193. package/src/domains/providers/runtimes/common/probe-helpers.ts +97 -16
  194. package/src/domains/providers/types/context-window-slots.ts +18 -0
  195. package/src/domains/providers/types/runtime-descriptor.ts +3 -1
  196. package/src/domains/safety/call-target.ts +211 -14
  197. package/src/domains/safety/decision-presentation.ts +268 -0
  198. package/src/domains/safety/redaction.ts +73 -0
  199. package/src/domains/session/context-ledger.ts +10 -1
  200. package/src/domains/session/decision-board.ts +4 -0
  201. package/src/domains/session/entries.ts +3 -0
  202. package/src/domains/session/history.ts +68 -19
  203. package/src/domains/session/usage.ts +24 -7
  204. package/src/engine/acp/event-mapper.ts +7 -0
  205. package/src/engine/acp/server.ts +29 -2
  206. package/src/engine/apis/lmstudio.ts +25 -4
  207. package/src/engine/apis/openai-completions.ts +147 -22
  208. package/src/engine/claude/sdk-runtime.ts +8 -2
  209. package/src/engine/claude/tool-safety.ts +13 -0
  210. package/src/engine/loop-guard.ts +27 -3
  211. package/src/engine/worker-events.ts +4 -3
  212. package/src/engine/worker-runtime.ts +59 -54
  213. package/src/entry/orchestrator.ts +18 -1
  214. package/src/interactive/chat-loop-messages.ts +22 -0
  215. package/src/interactive/chat-loop.ts +13 -0
  216. package/src/interactive/chat-renderer.ts +19 -3
  217. package/src/interactive/clio-editor.ts +44 -7
  218. package/src/interactive/context-overlay.ts +43 -5
  219. package/src/interactive/cost-overlay.ts +39 -8
  220. package/src/interactive/dispatch-board.ts +212 -35
  221. package/src/interactive/footer/widgets.ts +13 -0
  222. package/src/interactive/interactive-application.ts +6 -1
  223. package/src/interactive/interactive-input-runtime.ts +11 -1
  224. package/src/interactive/interactive-presentation.ts +11 -1
  225. package/src/interactive/memory-overlay.ts +89 -4
  226. package/src/interactive/overlay-ask-user-lifecycle.ts +1 -1
  227. package/src/interactive/overlay-frame.ts +5 -2
  228. package/src/interactive/overlay-general-openers.ts +40 -1
  229. package/src/interactive/overlay-key-routing.ts +41 -1
  230. package/src/interactive/overlay-lifecycle.ts +11 -4
  231. package/src/interactive/overlay-permission-lifecycle.ts +23 -8
  232. package/src/interactive/overlay-transitions.ts +11 -0
  233. package/src/interactive/overlays/ask-user.ts +74 -30
  234. package/src/interactive/overlays/decisions.ts +3 -1
  235. package/src/interactive/permission-hint.ts +35 -0
  236. package/src/interactive/permission-overlay.ts +95 -45
  237. package/src/interactive/renderers/tool-execution.ts +19 -49
  238. package/src/interactive/session-last-turn.ts +8 -1
  239. package/src/interactive/session-usage-reseed.ts +36 -10
  240. package/src/interactive/slash-commands.ts +2 -2
  241. package/src/interactive/status/summary.ts +5 -0
  242. package/src/interactive/status/types.ts +5 -0
  243. package/src/interactive/terminal-lease.ts +1 -0
  244. package/src/interactive/turn-context.ts +96 -23
  245. package/src/interactive/turn-middleware.ts +1 -0
  246. package/src/interactive/turn-runtime.ts +37 -8
  247. package/src/interactive/turn-state.ts +3 -0
  248. package/src/interactive/worker-progress.ts +440 -0
  249. package/src/interactive/worker-stream.ts +51 -110
  250. package/src/tools/agent-tools.ts +28 -3
  251. package/src/tools/ask-user.ts +21 -1
  252. package/src/tools/context/index.ts +2 -2
  253. package/src/tools/dispatch-arguments.ts +8 -0
  254. package/src/tools/dispatch-event-text.ts +19 -0
  255. package/src/tools/dispatch.ts +24 -1
  256. package/src/tools/monitor.ts +15 -0
  257. package/src/tools/registry.ts +15 -5
  258. package/src/tools/result-disposition.ts +156 -0
  259. package/src/tools/result-shaping.ts +59 -1
  260. package/src/tools/verify/authoring.ts +55 -54
  261. package/src/tools/worker-evidence.ts +19 -0
  262. package/src/worker/spec-contract.ts +43 -3
  263. package/dist/chunk-EFADSJET.js +0 -18
  264. package/dist/memory-4ALKDJ4Q.js +0 -246
  265. package/src/domains/eval/metrics/chaos-stream.ts +0 -93
@@ -3,8 +3,9 @@ import {
3
3
  protectedArtifactFromSessionEntry,
4
4
  protectedArtifactStateFromSessionEntries,
5
5
  readAuditRows,
6
- readSessionEntriesForId
7
- } from "./chunk-QQK64KLB.js";
6
+ readSessionEntriesForId,
7
+ responseModelIdObservationFromRecord
8
+ } from "./chunk-CJUB2JJ2.js";
8
9
  import {
9
10
  FLEET_COMMAND_BASE_ENV,
10
11
  describeWriteBoundary,
@@ -24,7 +25,7 @@ import {
24
25
  sumEvalHarnessMetrics,
25
26
  verifyReceiptIntegrity,
26
27
  withReceiptIntegrity
27
- } from "./chunk-3JLKSKD7.js";
28
+ } from "./chunk-OH3TOQTB.js";
28
29
  import {
29
30
  LOCAL_NODE_ID,
30
31
  computeSettingsFingerprint,
@@ -35,7 +36,7 @@ import {
35
36
  receiptAttestationFields,
36
37
  routeFactVerdict,
37
38
  spawnNativeWorker
38
- } from "./chunk-34475P3I.js";
39
+ } from "./chunk-TSHXZTOQ.js";
39
40
  import {
40
41
  AGENT_LEDGER_PROMPT_MAX_CHARS,
41
42
  RETRYABLE_OUTCOMES,
@@ -57,6 +58,7 @@ import {
57
58
  claudeSubprocessPermissionConfigForAutonomy,
58
59
  competeStanceLiner,
59
60
  createRunEffectsRecorder,
61
+ describeCallAction,
60
62
  isBoundedGateRolePrompt,
61
63
  isClaudeCanonicalTool,
62
64
  isResponseSchemaRejection,
@@ -64,23 +66,21 @@ import {
64
66
  networkToolsDisabled,
65
67
  projectExecutionHandoffs,
66
68
  renderAgentLedger,
69
+ resolveToolBudgetEnvelope,
67
70
  responseSchemaConflictsWithTools,
68
71
  runKindSupportsLiveSteering,
69
72
  runtimeSpeaksResponseSchemaDialect,
70
73
  serializeWorkerRuntimeDescriptor,
71
74
  toolPromptHintsForNames,
72
75
  validateJobSpec
73
- } from "./chunk-ZYKPLLNQ.js";
76
+ } from "./chunk-XXQNGV4M.js";
74
77
  import {
75
- DEFAULT_AUTONOMY_LEVEL,
76
78
  WRITE_ROOT_REFUSED_TOOLS,
77
79
  assessFinishContract,
78
- autonomyDenyRejection,
79
- mapAutonomy,
80
80
  parseJsonObjectPayload,
81
81
  parseVerifierResult,
82
82
  validateRecipeResult
83
- } from "./chunk-7RXG6QRZ.js";
83
+ } from "./chunk-EKY57CSP.js";
84
84
  import {
85
85
  appliesRecipeResultContract,
86
86
  decideRoute,
@@ -132,7 +132,12 @@ import {
132
132
  } from "./chunk-ECH6PKUQ.js";
133
133
  import {
134
134
  isSkillActivation
135
- } from "./chunk-BEY543CS.js";
135
+ } from "./chunk-GOXNB3AO.js";
136
+ import {
137
+ DEFAULT_AUTONOMY_LEVEL,
138
+ autonomyDenyRejection,
139
+ mapAutonomy
140
+ } from "./chunk-HWUFFB6L.js";
136
141
  import {
137
142
  createRedactionTally,
138
143
  redactSecretsDeep,
@@ -154,7 +159,7 @@ import {
154
159
  resolveRuntimeTarget,
155
160
  runtimeResolutionWarnings,
156
161
  runtimeTargetSnapshot
157
- } from "./chunk-QWU7ZBO7.js";
162
+ } from "./chunk-DJVECN66.js";
158
163
  import {
159
164
  DEFAULT_DELEGATION_CONNECT_TIMEOUT_MS,
160
165
  DEFAULT_DELEGATION_TURN_TIMEOUT_MS,
@@ -185,7 +190,7 @@ import {
185
190
  } from "./chunk-3I7MS7N2.js";
186
191
  import {
187
192
  ceilChars
188
- } from "./chunk-BPGS2WCQ.js";
193
+ } from "./chunk-GEYXPTRF.js";
189
194
  import {
190
195
  atomicWrite
191
196
  } from "./chunk-FO5ZOVUY.js";
@@ -206,7 +211,7 @@ import {
206
211
  } from "./chunk-6EJMN2Y3.js";
207
212
  import {
208
213
  BusChannels
209
- } from "./chunk-TTNYS3EA.js";
214
+ } from "./chunk-G7MUEIGA.js";
210
215
  import {
211
216
  readClioVersion,
212
217
  readPiMonoVersion,
@@ -1538,12 +1543,15 @@ var AcpEventMapper = class {
1538
1543
  if (!this.toolStarts.has(toolCallId) && (status === "pending" || status === "in_progress")) {
1539
1544
  const startedAt = Date.now();
1540
1545
  this.toolStarts.set(toolCallId, performance2.now());
1546
+ const action = describeCallAction(update.kind ?? title, update.rawInput);
1541
1547
  out.push({
1542
1548
  type: "clio_tool_start",
1543
1549
  payload: {
1544
1550
  tool: update.kind ?? title,
1551
+ toolCallId,
1545
1552
  posture: "operating",
1546
- startedAt
1553
+ startedAt,
1554
+ ...action !== null ? { action } : {}
1547
1555
  }
1548
1556
  });
1549
1557
  out.push({
@@ -1569,6 +1577,7 @@ var AcpEventMapper = class {
1569
1577
  type: "clio_tool_finish",
1570
1578
  payload: {
1571
1579
  tool: update.kind ?? title,
1580
+ toolCallId,
1572
1581
  posture: "operating",
1573
1582
  durationMs: Math.round(performance2.now() - startedAtClock),
1574
1583
  outcome: isError ? "error" : "ok",
@@ -4575,6 +4584,7 @@ function envelopeFromReceipt(receipt, status, receiptPath) {
4575
4584
  ...receipt.agentAudience !== void 0 ? { agentAudience: receipt.agentAudience } : {},
4576
4585
  ...receipt.requestOrigin !== void 0 ? { requestOrigin: receipt.requestOrigin } : {},
4577
4586
  task: receipt.task,
4587
+ ...receipt.budget !== void 0 ? { budget: receipt.budget } : {},
4578
4588
  ...receipt.briefing !== void 0 ? { briefing: receipt.briefing } : {},
4579
4589
  ...receipt.steering !== void 0 ? { steering: receipt.steering } : {},
4580
4590
  targetId: receipt.targetId,
@@ -6349,6 +6359,7 @@ function openLedger(opts) {
6349
6359
  ...input.agentAudience !== void 0 ? { agentAudience: input.agentAudience } : {},
6350
6360
  ...input.requestOrigin !== void 0 ? { requestOrigin: input.requestOrigin } : {},
6351
6361
  task: input.task,
6362
+ ...input.budget !== void 0 ? { budget: structuredClone(input.budget) } : {},
6352
6363
  ...input.briefing !== void 0 ? { briefing: structuredClone(input.briefing) } : {},
6353
6364
  ...input.steering !== void 0 ? { steering: structuredClone(input.steering) } : {},
6354
6365
  targetId: input.targetId,
@@ -7133,7 +7144,7 @@ function assertWriteRootsEnforceable(runtime, writeRoots) {
7133
7144
  function assertWorkerBudgetEnforceable(runtime, hasDeclaredBudget) {
7134
7145
  if (!hasDeclaredBudget || runtime.kind !== "subprocess") return;
7135
7146
  throw new Error(
7136
- `dispatch: runtime '${runtime.id}' cannot enforce an explicit agent budget because subprocess workers do not expose per-tool mediation; choose a native or claude-sdk worker`
7147
+ `dispatch: runtime '${runtime.id}' cannot enforce an explicit dispatch budget because subprocess workers do not expose per-tool mediation; choose a native or claude-sdk worker`
7137
7148
  );
7138
7149
  }
7139
7150
  var TOOL_CARRYING_API_FAMILIES = /* @__PURE__ */ new Set([
@@ -7186,18 +7197,27 @@ function assertPostRuntimeToolCompatibility(agentId, spec, effectiveTools, targe
7186
7197
  `dispatch: admission denied: agent '${agentId}' is incompatible with runtime '${target.runtime.id}' after tool narrowing; missing required tools: ${compatibility.missingRequired.join(", ")}`
7187
7198
  );
7188
7199
  }
7189
- function resolveEffectiveWorkerBudget(input) {
7200
+ function workerToolCallHardCap(settings) {
7190
7201
  const rawEnvCap = process.env.CLIO_CODER_WORKER_TOOL_CALL_CAP?.trim();
7191
7202
  const parsedEnvCap = rawEnvCap && /^[1-9]\d*$/.test(rawEnvCap) ? Number(rawEnvCap) : Number.NaN;
7192
- const hardCap = Number.isSafeInteger(parsedEnvCap) ? parsedEnvCap : input.settings?.guardrails.workerToolCallCap ?? GUARDRAIL_DEFAULTS.workerToolCallCap;
7203
+ return Number.isSafeInteger(parsedEnvCap) ? parsedEnvCap : settings?.guardrails.workerToolCallCap ?? GUARDRAIL_DEFAULTS.workerToolCallCap;
7204
+ }
7205
+ function resolveEffectiveWorkerBudget(input) {
7206
+ const hardCap = workerToolCallHardCap(input.settings);
7193
7207
  const declared = input.declared ?? {
7194
7208
  toolCalls: hardCap,
7195
7209
  readReserve: Math.min(5, Math.max(0, hardCap - 1)),
7196
7210
  synthesis: true
7197
7211
  };
7198
- const toolCalls = Math.min(declared.toolCalls, hardCap);
7199
- const readReserve = input.allowedTools.includes(ToolNames.Read) ? Math.min(declared.readReserve, Math.max(0, toolCalls - 1)) : 0;
7200
- return { toolCalls, readReserve, synthesis: declared.synthesis, hardCap };
7212
+ return resolveToolBudgetEnvelope({
7213
+ recipeId: input.recipeId,
7214
+ policy: declared,
7215
+ ...input.req.budget === void 0 ? {} : { request: input.req.budget },
7216
+ hardCap,
7217
+ hasReadTool: input.allowedTools.includes(ToolNames.Read),
7218
+ retry: (input.req.lineage?.attempt ?? 0) > 0,
7219
+ revision: input.req.gate?.role === "builder" && input.req.gate.cycle > 1 && input.req.gate.verdict === "revise"
7220
+ });
7201
7221
  }
7202
7222
  function frozenProtectedArtifactState(state) {
7203
7223
  return {
@@ -8475,7 +8495,7 @@ function createDispatchBundle(context, options) {
8475
8495
  );
8476
8496
  enforceCapabilityGate(target.target.id, target.modelCapabilities, req.requiredCapabilities);
8477
8497
  assertRuntimeCanHonorWorkerPermissionMode(target.runtime, settings?.workers.onPermission ?? "deny");
8478
- assertWorkerBudgetEnforceable(target.runtime, spec.budget !== null);
8498
+ assertWorkerBudgetEnforceable(target.runtime, spec.budget !== null || req.budget !== void 0);
8479
8499
  const cwd = req.cwd ?? process.cwd();
8480
8500
  const sessionAutonomy = settings?.autonomy ?? "auto-edit";
8481
8501
  const effectiveAutonomy = clampWorkerAutonomy(sessionAutonomy, req.autonomy);
@@ -8508,7 +8528,13 @@ function createDispatchBundle(context, options) {
8508
8528
  workingContextPaths: workerWorkingContextPaths(req)
8509
8529
  });
8510
8530
  const systemPrompt = compiledWorkerPrompt.systemPrompt;
8511
- const budget = resolveEffectiveWorkerBudget({ declared: spec.budget, allowedTools: effectiveTools, settings });
8531
+ const budgetEnvelope = resolveEffectiveWorkerBudget({
8532
+ req,
8533
+ recipeId: recipe.id,
8534
+ declared: spec.budget,
8535
+ allowedTools: effectiveTools,
8536
+ settings
8537
+ });
8512
8538
  const tier = spec.projectContextTier;
8513
8539
  const project = projectContext && tier === "bounded" ? projectContext.projectStructuredContext(cwd) : null;
8514
8540
  const dynamicPromptMessages = buildDynamicPromptMessages(req, {
@@ -8558,7 +8584,8 @@ function createDispatchBundle(context, options) {
8558
8584
  operatorProfileApplied: compiledWorkerPrompt.operatorProfileApplied ?? false,
8559
8585
  capabilityMismatch,
8560
8586
  effectiveAutonomy,
8561
- budget,
8587
+ budget: budgetEnvelope.effective,
8588
+ budgetEnvelope,
8562
8589
  ...settings ? { settings } : {}
8563
8590
  };
8564
8591
  }
@@ -8732,12 +8759,16 @@ function createDispatchBundle(context, options) {
8732
8759
  tokenMeter.cacheReadTokens += typeof u.cacheRead === "number" ? u.cacheRead : 0;
8733
8760
  tokenMeter.cacheWriteTokens += typeof u.cacheWrite === "number" ? u.cacheWrite : 0;
8734
8761
  tokenMeter.reasoningTokens += extractReasoningTokenCount(u);
8735
- const model = readStringOrNull(event.message.model);
8736
- const responseModel = readStringOrNull(event.message.responseModel);
8737
- const responseId = readStringOrNull(event.message.responseId);
8738
- if (model !== null || responseModel !== null || responseId !== null) {
8739
- upstreamResponses.push({ model, responseModel, responseId });
8740
- }
8762
+ const requestedModelId = readStringOrNull(event.message.model);
8763
+ const responseModelIdObservation = responseModelIdObservationFromRecord(event.message, "not-observed");
8764
+ const differingResponseModelId = readStringOrNull(event.message.responseModel);
8765
+ const providerResponseId = readStringOrNull(event.message.responseId);
8766
+ upstreamResponses.push({
8767
+ requestedModelId,
8768
+ responseModelIdObservation,
8769
+ differingResponseModelId,
8770
+ providerResponseId
8771
+ });
8741
8772
  if (event.message.stopReason === "error") {
8742
8773
  const message = readStringOrNull(event.message.errorMessage);
8743
8774
  if (message !== null) failureMessage = message;
@@ -9292,6 +9323,11 @@ function createDispatchBundle(context, options) {
9292
9323
  return handle;
9293
9324
  };
9294
9325
  if (req.delegationAgentId) {
9326
+ if (req.budget !== void 0) {
9327
+ throw new Error(
9328
+ "dispatch: budget envelopes cannot be enforced on an ACP delegation target; dispatch to a native or claude-sdk worker"
9329
+ );
9330
+ }
9295
9331
  assertPlannedNodeIdentity(req, { id: "local", kind: "local" });
9296
9332
  assertProtectedArtifactsEnforceable("acp-delegation", false, protectedArtifactState);
9297
9333
  if (req.responseSchema !== void 0) {
@@ -9551,12 +9587,16 @@ function createDispatchBundle(context, options) {
9551
9587
  tokenMeter.cacheReadTokens += typeof u.cacheRead === "number" ? u.cacheRead : 0;
9552
9588
  tokenMeter.cacheWriteTokens += typeof u.cacheWrite === "number" ? u.cacheWrite : 0;
9553
9589
  tokenMeter.reasoningTokens += extractReasoningTokenCount(u);
9554
- const model = readStringOrNull(event.message.model);
9555
- const responseModel = readStringOrNull(event.message.responseModel);
9556
- const responseId = readStringOrNull(event.message.responseId);
9557
- if (model !== null || responseModel !== null || responseId !== null) {
9558
- upstreamResponses.push({ model, responseModel, responseId });
9559
- }
9590
+ const requestedModelId = readStringOrNull(event.message.model);
9591
+ const responseModelIdObservation = responseModelIdObservationFromRecord(event.message, "not-observed");
9592
+ const differingResponseModelId = readStringOrNull(event.message.responseModel);
9593
+ const providerResponseId = readStringOrNull(event.message.responseId);
9594
+ upstreamResponses.push({
9595
+ requestedModelId,
9596
+ responseModelIdObservation,
9597
+ differingResponseModelId,
9598
+ providerResponseId
9599
+ });
9560
9600
  if (event.message.stopReason === "error") {
9561
9601
  const message = readStringOrNull(event.message.errorMessage);
9562
9602
  if (message !== null) failureMessage = message;
@@ -9627,6 +9667,7 @@ function createDispatchBundle(context, options) {
9627
9667
  agentAudience: lifecycle.agentAudience,
9628
9668
  requestOrigin: lifecycle.requestOrigin,
9629
9669
  task: req.task,
9670
+ budget: lifecycle.budgetEnvelope,
9630
9671
  targetId: lifecycle.target.target.id,
9631
9672
  wireModelId: lifecycle.target.wireModelId,
9632
9673
  runtimeId: lifecycle.target.runtime.id,
@@ -9684,6 +9725,7 @@ function createDispatchBundle(context, options) {
9684
9725
  });
9685
9726
  await ledgerRef.persist();
9686
9727
  const fleetIdentity = {
9728
+ budget: lifecycle.budgetEnvelope,
9687
9729
  ...placement !== void 0 && placement !== null ? { node: placement.node.id } : {},
9688
9730
  ...req.gate !== void 0 ? { gate: { role: req.gate.role, cycle: req.gate.cycle } } : {},
9689
9731
  ...req.reroutes !== void 0 && req.reroutes.length > 0 ? { rerouteCount: req.reroutes.length } : {},
@@ -9775,6 +9817,7 @@ function createDispatchBundle(context, options) {
9775
9817
  requestOrigin: lifecycle.requestOrigin,
9776
9818
  agentId: req.agentId,
9777
9819
  task: req.task,
9820
+ budget: lifecycle.budgetEnvelope,
9778
9821
  cwd: lifecycle.cwd,
9779
9822
  node: placement?.node ?? null,
9780
9823
  aborted: false,
@@ -9818,6 +9861,7 @@ function createDispatchBundle(context, options) {
9818
9861
  agentAudience: lifecycle.agentAudience,
9819
9862
  requestOrigin: lifecycle.requestOrigin,
9820
9863
  task: req.task,
9864
+ budget: lifecycle.budgetEnvelope,
9821
9865
  targetId: lifecycle.target.target.id,
9822
9866
  wireModelId: lifecycle.target.wireModelId,
9823
9867
  runtimeId: lifecycle.target.runtime.id,
@@ -10230,6 +10274,11 @@ function createDispatchBundle(context, options) {
10230
10274
  if (!validated.ok) throw new Error(`dispatch: invalid spec: ${validated.errors.join("; ")}`);
10231
10275
  req = validation.restore(validated.spec);
10232
10276
  if (req.delegationAgentId) {
10277
+ if (req.budget !== void 0) {
10278
+ throw new Error(
10279
+ "dispatch: budget envelopes cannot be enforced on an ACP delegation target; dispatch to a native or claude-sdk worker"
10280
+ );
10281
+ }
10233
10282
  const protectedArtifactState = getProtectedArtifactState();
10234
10283
  assertProtectedArtifactsEnforceable("acp-delegation", false, protectedArtifactState);
10235
10284
  if (req.responseSchema !== void 0) {
@@ -10291,6 +10340,7 @@ function createDispatchBundle(context, options) {
10291
10340
  );
10292
10341
  assertPostRuntimeToolCompatibility(req.agentId, agentSpec, effectiveTools, target);
10293
10342
  assertRuntimeCanHonorWorkerPermissionMode(target.runtime, settings?.workers.onPermission ?? "deny");
10343
+ assertWorkerBudgetEnforceable(target.runtime, agentSpec.budget !== null || req.budget !== void 0);
10294
10344
  assertResponseSchemaEnforceable(target.runtime, target.modelCapabilities, req.responseSchema, effectiveTools.length);
10295
10345
  assertWriteRootsEnforceable(target.runtime, req.writeRoots);
10296
10346
  assertProtectedArtifactsEnforceable(
@@ -10298,6 +10348,13 @@ function createDispatchBundle(context, options) {
10298
10348
  target.runtime.kind !== "subprocess",
10299
10349
  getProtectedArtifactState()
10300
10350
  );
10351
+ resolveEffectiveWorkerBudget({
10352
+ req,
10353
+ recipeId: recipe.id,
10354
+ declared: agentSpec.budget,
10355
+ allowedTools: effectiveTools,
10356
+ settings
10357
+ });
10301
10358
  return {
10302
10359
  agentId: req.agentId,
10303
10360
  specFingerprint: agentSpecFingerprint(agentSpec),
@@ -10622,6 +10679,7 @@ function createDispatchBundle(context, options) {
10622
10679
  runId: run.runId,
10623
10680
  agentId: run.agentId,
10624
10681
  task: run.task,
10682
+ ...run.budget !== void 0 ? { budget: run.budget } : {},
10625
10683
  runtimeKind: run.runtimeKind,
10626
10684
  outcomePhase: run.stallKilled ? "terminating" : run.aborted ? "aborting" : "running",
10627
10685
  heartbeat,
@@ -15762,4 +15820,4 @@ export {
15762
15820
  summarizeEvalResults,
15763
15821
  buildEvalEvidence
15764
15822
  };
15765
- //# sourceMappingURL=chunk-QQL5RT5M.js.map
15823
+ //# sourceMappingURL=chunk-QM3F2GKX.js.map
@@ -25,11 +25,11 @@ import {
25
25
  import {
26
26
  credentialWriteFailed,
27
27
  printPlaintextCredentialWarning
28
- } from "./chunk-YCWGATWI.js";
28
+ } from "./chunk-24I7BN55.js";
29
29
  import {
30
30
  printError,
31
31
  printOk
32
- } from "./chunk-ED4KHGC3.js";
32
+ } from "./chunk-PPAMZ32Z.js";
33
33
  import {
34
34
  buildProviderSupportEntry,
35
35
  configuredTargetsForRuntime,
@@ -44,7 +44,7 @@ import {
44
44
  probeCapabilitiesForModel,
45
45
  registerBuiltinRuntimes,
46
46
  supportGroupLabel
47
- } from "./chunk-QWU7ZBO7.js";
47
+ } from "./chunk-DJVECN66.js";
48
48
  import {
49
49
  readSettings,
50
50
  removeTargetFromSettings,
@@ -1489,4 +1489,4 @@ export {
1489
1489
  runTargetRename,
1490
1490
  runConfigureCommand
1491
1491
  };
1492
- //# sourceMappingURL=chunk-A2GZF7DC.js.map
1492
+ //# sourceMappingURL=chunk-QNQHSOLF.js.map
@@ -14,13 +14,13 @@ import {
14
14
  resolveShutdownHookBudgetMs,
15
15
  runWithBudget,
16
16
  writeShutdownNotice
17
- } from "./chunk-HXG4IURW.js";
17
+ } from "./chunk-XE2VEJHX.js";
18
18
  import {
19
19
  getSharedBus
20
20
  } from "./chunk-ZGVHUX3M.js";
21
21
  import {
22
22
  BusChannels
23
- } from "./chunk-TTNYS3EA.js";
23
+ } from "./chunk-G7MUEIGA.js";
24
24
  import {
25
25
  init_esm_shims
26
26
  } from "./chunk-3R73A4XB.js";
@@ -384,4 +384,4 @@ export {
384
384
  ConfigDomainModule,
385
385
  createConfigDomainModule
386
386
  };
387
- //# sourceMappingURL=chunk-KRPY7NTG.js.map
387
+ //# sourceMappingURL=chunk-R46L2BIR.js.map
@@ -1,7 +1,16 @@
1
1
  import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
2
+ import {
3
+ receiptResponseModelIdObservationLabel
4
+ } from "./chunk-3BPUFZDL.js";
2
5
  import {
3
6
  adaptRunReceiptTrustStatus
4
- } from "./chunk-QQL5RT5M.js";
7
+ } from "./chunk-QM3F2GKX.js";
8
+ import {
9
+ formatBudgetPolicy,
10
+ formatBudgetReasons,
11
+ formatBudgetRequest,
12
+ formatEffectiveBudget
13
+ } from "./chunk-XXQNGV4M.js";
5
14
  import {
6
15
  mentionsWorkerToolCallCap
7
16
  } from "./chunk-4ZG3XFUR.js";
@@ -74,10 +83,19 @@ function receiptEvidenceLabels(receipt, verification, integrity) {
74
83
  const sections = receipt.projectContext.sections ?? [];
75
84
  projectContext = `project_context=${receipt.projectContext.tier} chars:${receipt.projectContext.chars ?? 0}${sections.length > 0 ? ` sections:${[...sections].sort().join(",")}` : ""}${receipt.projectContext.contentHash !== void 0 ? ` sha256:${receipt.projectContext.contentHash}` : ""}`;
76
85
  }
86
+ const responseModelIdObservation = receiptResponseModelIdObservationLabel(receipt);
87
+ const budget = receipt.budget === void 0 ? [] : [
88
+ `budget_recipe_policy=${JSON.stringify(formatBudgetPolicy(receipt.budget))}`,
89
+ `budget_requested=${JSON.stringify(formatBudgetRequest(receipt.budget))}`,
90
+ `budget_effective=${JSON.stringify(formatEffectiveBudget(receipt.budget))}`,
91
+ `budget_reason=${JSON.stringify(formatBudgetReasons(receipt.budget))}`
92
+ ];
77
93
  return [
78
94
  canonical,
79
95
  `receipt_integrity=verified/v${receipt.integrity.version}/${receipt.integrity.algorithm}`,
80
96
  `evidence_verification=${verification.state}/${verification.basis}`,
97
+ ...responseModelIdObservation ? [responseModelIdObservation] : [],
98
+ ...budget,
81
99
  ...receiptAdmissionLabels(receipt),
82
100
  ...receiptActivityLabels(receipt, status),
83
101
  briefing,
@@ -152,4 +170,4 @@ export {
152
170
  workerTextLabel,
153
171
  workerTextNonEvidenceNotices
154
172
  };
155
- //# sourceMappingURL=chunk-BP4OYD6A.js.map
173
+ //# sourceMappingURL=chunk-RY3LY4J5.js.map
@@ -299,6 +299,7 @@ function signalProcessGroup(child, signal) {
299
299
  function spawnWorkerProcess(command, args, spec, opts) {
300
300
  const shutdownGraceMs = opts?.shutdownGraceMs ?? DEFAULT_SHUTDOWN_GRACE_MS;
301
301
  const attestationGraceMs = opts?.attestationGraceMs ?? DEFAULT_ATTESTATION_GRACE_MS;
302
+ const now = opts?.now ?? Date.now;
302
303
  const approved = opts?.approvedIdentity ?? approvedIdentityForSpec(spec);
303
304
  const child = spawn(command, [...args], {
304
305
  stdio: ["pipe", "pipe", "pipe"],
@@ -309,7 +310,7 @@ function spawnWorkerProcess(command, args, spec, opts) {
309
310
  detached: true
310
311
  });
311
312
  const pid = child.pid ?? null;
312
- const heartbeatAt = { current: Date.now() };
313
+ const heartbeatAt = { current: now() };
313
314
  const queue = createBoundedEventQueue();
314
315
  const waiters = [];
315
316
  let finished = false;
@@ -334,7 +335,7 @@ function spawnWorkerProcess(command, args, spec, opts) {
334
335
  };
335
336
  }
336
337
  function push(value) {
337
- heartbeatAt.current = Date.now();
338
+ heartbeatAt.current = now();
338
339
  const w = waiters.shift();
339
340
  if (w) {
340
341
  w({ value, done: false });
@@ -444,7 +445,7 @@ function spawnWorkerProcess(command, args, spec, opts) {
444
445
  if (!announceAccepted) failAttestation(`Invalid worker attestation: ${frame.reason}`);
445
446
  return;
446
447
  }
447
- heartbeatAt.current = Date.now();
448
+ heartbeatAt.current = now();
448
449
  if (frame.value.kind === "announce") {
449
450
  if (announceAccepted || announceFailed) return;
450
451
  const verdict = verifyWorkerAttestation(frame.value.attestation, approved);
@@ -920,4 +921,4 @@ export {
920
921
  routeFactVerdict,
921
922
  runFleetNodePreflight
922
923
  };
923
- //# sourceMappingURL=chunk-34475P3I.js.map
924
+ //# sourceMappingURL=chunk-TSHXZTOQ.js.map
@@ -7,7 +7,7 @@ import {
7
7
  WORKSPACE_EXCLUDED_DIRS,
8
8
  enumerateWorkspaceFiles,
9
9
  enumerateWorkspaceFilesAsync
10
- } from "./chunk-EKMEHE4H.js";
10
+ } from "./chunk-33YXPOE3.js";
11
11
  import {
12
12
  init_esm_shims
13
13
  } from "./chunk-3R73A4XB.js";
@@ -241,4 +241,4 @@ export {
241
241
  computeFingerprintCached,
242
242
  isStale
243
243
  };
244
- //# sourceMappingURL=chunk-VJWL6YS5.js.map
244
+ //# sourceMappingURL=chunk-UUVG37B4.js.map
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
2
2
  import {
3
3
  ceilChars
4
- } from "./chunk-BPGS2WCQ.js";
4
+ } from "./chunk-GEYXPTRF.js";
5
5
  import {
6
6
  clioStateDir
7
7
  } from "./chunk-BNAZZHFG.js";
@@ -616,4 +616,4 @@ export {
616
616
  createTaskMemoryTelemetrySink,
617
617
  taskMemoryBankDelta
618
618
  };
619
- //# sourceMappingURL=chunk-2TZWSW76.js.map
619
+ //# sourceMappingURL=chunk-WHGPSPT5.js.map
@@ -25,7 +25,7 @@ import {
25
25
  ceilChars,
26
26
  contentChars,
27
27
  estimateAgentMessageTokens
28
- } from "./chunk-BPGS2WCQ.js";
28
+ } from "./chunk-GEYXPTRF.js";
29
29
  import {
30
30
  init_esm_shims
31
31
  } from "./chunk-3R73A4XB.js";
@@ -674,4 +674,4 @@ export {
674
674
  compactionCut,
675
675
  selectVisibleEntries
676
676
  };
677
- //# sourceMappingURL=chunk-TW3WDMVS.js.map
677
+ //# sourceMappingURL=chunk-WHJYKASB.js.map
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
2
2
  import {
3
3
  enumerateWorkspaceFiles
4
- } from "./chunk-EKMEHE4H.js";
4
+ } from "./chunk-33YXPOE3.js";
5
5
  import {
6
6
  classifyCHeaderLanguage
7
7
  } from "./chunk-7CR24IG7.js";
@@ -190,4 +190,4 @@ export {
190
190
  detectProjectProfile,
191
191
  detectProjectType
192
192
  };
193
- //# sourceMappingURL=chunk-YHZX5GEU.js.map
193
+ //# sourceMappingURL=chunk-XAKHZX5N.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-ZGVHUX3M.js";
5
5
  import {
6
6
  BusChannels
7
- } from "./chunk-TTNYS3EA.js";
7
+ } from "./chunk-G7MUEIGA.js";
8
8
  import {
9
9
  init_esm_shims
10
10
  } from "./chunk-3R73A4XB.js";
@@ -226,4 +226,4 @@ export {
226
226
  runWithBudget,
227
227
  getTerminationCoordinator
228
228
  };
229
- //# sourceMappingURL=chunk-HXG4IURW.js.map
229
+ //# sourceMappingURL=chunk-XE2VEJHX.js.map
@@ -5,18 +5,18 @@ import {
5
5
  loadProjectRules,
6
6
  renderOperatorProfile,
7
7
  selectActiveRules
8
- } from "./chunk-UZHIZC5S.js";
8
+ } from "./chunk-CYQKWTG3.js";
9
9
  import {
10
10
  compile,
11
11
  compileWorker,
12
12
  sha256
13
- } from "./chunk-QQL5RT5M.js";
13
+ } from "./chunk-QM3F2GKX.js";
14
14
  import {
15
15
  isUserVisibleAgent
16
16
  } from "./chunk-AOCYTWAV.js";
17
17
  import {
18
18
  BusChannels
19
- } from "./chunk-TTNYS3EA.js";
19
+ } from "./chunk-G7MUEIGA.js";
20
20
  import {
21
21
  classifyProjectPreload
22
22
  } from "./chunk-JVCV3ICN.js";
@@ -43,7 +43,7 @@ function fleetPromptPurpose(description) {
43
43
  return `${sentence.slice(0, cut > 0 ? cut : FLEET_PROMPT_PURPOSE_MAX_CHARS).trimEnd()}...`;
44
44
  }
45
45
  function fleetPromptLine(spec) {
46
- const budget = spec.budget ? `${spec.budget.toolCalls} calls` : "default budget";
46
+ const budget = spec.budget.maximum ? `${spec.budget.toolCalls}..${spec.budget.maximum.toolCalls} calls` : `${spec.budget.toolCalls} calls`;
47
47
  const purpose = fleetPromptPurpose(spec.description);
48
48
  return `- ${spec.id} (${spec.capabilityClass}, ${budget})${purpose.length > 0 ? `: ${purpose}` : ""}`;
49
49
  }
@@ -110,7 +110,8 @@ function renderAgentCatalogSectionsFromSpecs(input) {
110
110
  function formatSpecLine(spec, suffix) {
111
111
  const tags = spec.tags.length > 0 ? `, tags=${spec.tags.join("/")}` : "";
112
112
  const skills = spec.skills.length > 0 ? `, skills=${spec.skills.join("/")}` : "";
113
- const budget = spec.budget ? `, budget=${spec.budget.toolCalls}/${spec.budget.readReserve}/${spec.budget.synthesis ? "synthesize" : "stop"}` : ", budget=operator-default";
113
+ const maximum = spec.budget.maximum ? `..${spec.budget.maximum.toolCalls}/${spec.budget.maximum.readReserve}` : "";
114
+ const budget = `, budget=${spec.budget.toolCalls}/${spec.budget.readReserve}${maximum}/${spec.budget.synthesis ? "synthesize" : "stop"}`;
114
115
  return `- ${spec.name} [${spec.id}] (${spec.audience}, ${spec.category}, ${spec.capabilityClass}, ${spec.latencyClass}, ${spec.source}${tags}${skills}${budget})${suffix}`;
115
116
  }
116
117
 
@@ -653,4 +654,4 @@ export {
653
654
  createPromptsDomainModule,
654
655
  SchedulingDomainModule
655
656
  };
656
- //# sourceMappingURL=chunk-3HZ5RWN2.js.map
657
+ //# sourceMappingURL=chunk-XF5N4U5A.js.map