@aragon-agent/cli 0.6.47 → 0.6.48

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 (775) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +27 -6
  3. package/dist/agent/coalesce.d.ts +1 -1
  4. package/dist/agent/controller.d.ts +21 -21
  5. package/dist/agent/controller.js +13 -13
  6. package/dist/agent/conversation-reset.d.ts +1 -1
  7. package/dist/agent/governance-wiring.d.ts +6 -6
  8. package/dist/agent/governance-wiring.js +4 -4
  9. package/dist/agent/headless.d.ts +5 -5
  10. package/dist/agent/headless.js +4 -4
  11. package/dist/agent/job-notices.d.ts +1 -1
  12. package/dist/agent/job-notices.js +1 -1
  13. package/dist/agent/kit-apply.d.ts +3 -3
  14. package/dist/agent/kit-apply.js +3 -3
  15. package/dist/agent/model-profile-settings.d.ts +2 -2
  16. package/dist/agent/model-profile-settings.js +6 -6
  17. package/dist/agent/prompt-options.d.ts +1 -1
  18. package/dist/agent/system-prompt.d.ts +1 -1
  19. package/dist/{ui → app}/App.d.ts +9 -9
  20. package/dist/{ui → app}/App.js +79 -79
  21. package/dist/{ui → app}/use-startup-notices.d.ts +1 -1
  22. package/dist/{ui → app}/use-startup-notices.js +2 -2
  23. package/dist/cli.js +29 -29
  24. package/dist/commands/agents-command.js +1 -1
  25. package/dist/commands/builtins.js +9 -9
  26. package/dist/commands/governance-command.js +2 -2
  27. package/dist/commands/governance-runs-table.js +1 -1
  28. package/dist/commands/kit-command.js +1 -1
  29. package/dist/commands/perf.d.ts +3 -3
  30. package/dist/commands/perf.js +1 -1
  31. package/dist/commands/registry.d.ts +8 -8
  32. package/dist/commands/skills.js +2 -2
  33. package/dist/commands/team-command.js +1 -1
  34. package/dist/compaction/archive.d.ts +1 -1
  35. package/dist/compaction/archive.js +1 -1
  36. package/dist/compaction/child.d.ts +3 -3
  37. package/dist/compaction/child.js +4 -4
  38. package/dist/compaction/command.js +5 -5
  39. package/dist/compaction/compactor.d.ts +6 -6
  40. package/dist/compaction/compactor.js +6 -6
  41. package/dist/compaction/context-command.js +1 -1
  42. package/dist/compaction/digest.js +1 -1
  43. package/dist/compaction/memory-input.js +1 -1
  44. package/dist/compaction/memory-validation.js +1 -1
  45. package/dist/compaction/memory.js +1 -1
  46. package/dist/compaction/summarize-call.js +1 -1
  47. package/dist/compaction/summary-prompt.js +1 -1
  48. package/dist/compaction/tail-budget.js +2 -2
  49. package/dist/compaction/wiring.d.ts +5 -5
  50. package/dist/compaction/wiring.js +2 -2
  51. package/dist/config/cli-commands.d.ts +1 -1
  52. package/dist/config/cli-commands.js +3 -3
  53. package/dist/config/env.d.ts +1 -1
  54. package/dist/config/env.js +4 -4
  55. package/dist/config/load.d.ts +2 -2
  56. package/dist/config/load.js +6 -6
  57. package/dist/config/migrate-state-out-of-config.js +1 -1
  58. package/dist/config/model-profile-store.d.ts +4 -54
  59. package/dist/config/model-profile-store.js +3 -3
  60. package/dist/config/prompt-history.js +1 -1
  61. package/dist/config/store.d.ts +2 -2
  62. package/dist/config/store.js +3 -3
  63. package/dist/diagnostics/doctor.js +4 -4
  64. package/dist/exec/bridge/decisions.d.ts +1 -1
  65. package/dist/exec/bridge/human-answers.d.ts +1 -1
  66. package/dist/exec/bridge/human-answers.js +1 -1
  67. package/dist/exec/bridge/protocol.d.ts +1 -1
  68. package/dist/exec/bridge/server.js +1 -1
  69. package/dist/exec/events.d.ts +2 -2
  70. package/dist/exec/index.d.ts +1 -1
  71. package/dist/exec/index.js +1 -1
  72. package/dist/exec/permission.js +1 -1
  73. package/dist/exec/runner.d.ts +3 -3
  74. package/dist/exec/runner.js +2 -2
  75. package/dist/exec/threads/runtime.js +1 -1
  76. package/dist/fast/digest.d.ts +1 -1
  77. package/dist/fast/digest.js +1 -1
  78. package/dist/fast/frames.d.ts +1 -1
  79. package/dist/fast/frames.js +1 -1
  80. package/dist/fast/prompt.d.ts +1 -1
  81. package/dist/fast/prompt.js +1 -1
  82. package/dist/fast/review-call.js +1 -1
  83. package/dist/fast/reviewer.d.ts +3 -3
  84. package/dist/fast/reviewer.js +1 -1
  85. package/dist/fast/summary-call.d.ts +3 -3
  86. package/dist/fast/summary-call.js +2 -2
  87. package/dist/fast/summary-prompt.d.ts +1 -1
  88. package/dist/fast/summary-prompt.js +1 -1
  89. package/dist/fast/wiring.d.ts +4 -4
  90. package/dist/fast/wiring.js +1 -1
  91. package/dist/governance/card-normalize.d.ts +1 -1
  92. package/dist/governance/copy.d.ts +1 -1
  93. package/dist/governance/copy.js +2 -2
  94. package/dist/governance/engine/artifact-persist.d.ts +1 -1
  95. package/dist/governance/engine/budget.d.ts +1 -1
  96. package/dist/governance/engine/budget.js +1 -1
  97. package/dist/governance/engine/cards.d.ts +1 -1
  98. package/dist/governance/engine/digest.js +1 -1
  99. package/dist/governance/engine/engine-core.d.ts +5 -5
  100. package/dist/governance/engine/engine-core.js +1 -1
  101. package/dist/governance/engine/engine.d.ts +1 -1
  102. package/dist/governance/engine/engine.js +1 -1
  103. package/dist/governance/engine/estimate.d.ts +1 -1
  104. package/dist/governance/engine/estimate.js +1 -1
  105. package/dist/governance/engine/inspector.js +2 -2
  106. package/dist/governance/engine/integration.d.ts +1 -1
  107. package/dist/governance/engine/lifecycle.d.ts +1 -1
  108. package/dist/governance/engine/lifecycle.js +1 -1
  109. package/dist/governance/engine/phase-members.d.ts +1 -1
  110. package/dist/governance/engine/phase-planner.d.ts +1 -1
  111. package/dist/governance/engine/phase-planner.js +1 -1
  112. package/dist/governance/engine/rebuild.d.ts +1 -1
  113. package/dist/governance/engine/report.d.ts +1 -1
  114. package/dist/governance/engine/report.js +1 -1
  115. package/dist/governance/engine/run-digest.d.ts +1 -1
  116. package/dist/governance/engine/spec-builder.d.ts +2 -2
  117. package/dist/governance/engine/spec-builder.js +2 -2
  118. package/dist/governance/engine/stage-runner.js +2 -2
  119. package/dist/governance/engine/start-input.d.ts +1 -1
  120. package/dist/governance/engine/start-input.js +1 -1
  121. package/dist/governance/engine/state-machine.d.ts +1 -1
  122. package/dist/governance/engine/state-machine.js +3 -3
  123. package/dist/governance/engine/submission-queries.d.ts +1 -1
  124. package/dist/governance/engine/submission-render.d.ts +1 -1
  125. package/dist/governance/engine/submissions.d.ts +1 -1
  126. package/dist/governance/engine/submissions.js +1 -1
  127. package/dist/governance/engine/visibility.d.ts +1 -1
  128. package/dist/governance/engine/visibility.js +1 -1
  129. package/dist/governance/posture-transition.d.ts +2 -2
  130. package/dist/governance/posture-transition.js +1 -1
  131. package/dist/governance/profiles.d.ts +1 -1
  132. package/dist/governance/prompts/orchestrator-block.d.ts +2 -2
  133. package/dist/governance/prompts/orchestrator-block.js +2 -2
  134. package/dist/governance/prompts/plan-addendum.d.ts +1 -1
  135. package/dist/governance/prompts/plan-addendum.js +1 -1
  136. package/dist/governance/prompts/role-blocks.d.ts +2 -2
  137. package/dist/governance/prompts/role-blocks.js +1 -1
  138. package/dist/governance/report-reader.js +1 -1
  139. package/dist/governance/roles.d.ts +1 -1
  140. package/dist/governance/rules/claims.d.ts +1 -1
  141. package/dist/governance/rules/claims.js +1 -1
  142. package/dist/governance/rules/elimination.d.ts +1 -1
  143. package/dist/governance/rules/elimination.js +1 -1
  144. package/dist/governance/rules/failure-analysis.d.ts +2 -2
  145. package/dist/governance/rules/failure-analysis.js +1 -1
  146. package/dist/governance/rules/ledger-replay.d.ts +1 -1
  147. package/dist/governance/rules/ledger-state.d.ts +1 -1
  148. package/dist/governance/rules/ledger-state.js +1 -1
  149. package/dist/governance/rules/ledger.d.ts +2 -2
  150. package/dist/governance/rules/ledger.js +2 -2
  151. package/dist/governance/rules/rca.d.ts +1 -1
  152. package/dist/governance/rules/rca.js +1 -1
  153. package/dist/governance/rules/settlement.d.ts +2 -2
  154. package/dist/governance/rules/settlement.js +2 -2
  155. package/dist/governance/rules/suspicion.d.ts +1 -1
  156. package/dist/governance/store/artifacts.d.ts +1 -1
  157. package/dist/governance/store/artifacts.js +1 -1
  158. package/dist/governance/store/events-log.d.ts +1 -1
  159. package/dist/governance/store/run-store.d.ts +1 -1
  160. package/dist/governance/store/run-store.js +1 -1
  161. package/dist/governance/store/scoreboard-export.d.ts +1 -1
  162. package/dist/governance/tools/child-tools.d.ts +1 -1
  163. package/dist/governance/tools/guard.d.ts +1 -1
  164. package/dist/governance/tools/guard.js +1 -1
  165. package/dist/governance/tools/inspector-tools.d.ts +2 -2
  166. package/dist/governance/tools/inspector-tools.js +2 -2
  167. package/dist/governance/tools/lead-tools.d.ts +1 -1
  168. package/dist/governance/tools/lead-tools.js +1 -1
  169. package/dist/governance/tools/normalize-util.js +1 -1
  170. package/dist/governance/tools/scan-incomplete.js +1 -1
  171. package/dist/governance/tools/shared-tools.d.ts +1 -1
  172. package/dist/governance/tools/shared-tools.js +1 -1
  173. package/dist/governance/tools/submit-normalizers.d.ts +1 -1
  174. package/dist/governance/tools/submit-normalizers.js +1 -1
  175. package/dist/governance/tools/submit-tools.d.ts +1 -1
  176. package/dist/logging/cli-commands.js +1 -1
  177. package/dist/logging/install.d.ts +1 -1
  178. package/dist/logging/install.js +3 -3
  179. package/dist/logging/logger.d.ts +2 -2
  180. package/dist/logging/logger.js +31 -2
  181. package/dist/proc/kill-tree.js +1 -1
  182. package/dist/proc/log-mirror.js +1 -1
  183. package/dist/proc/log-ring.js +2 -2
  184. package/dist/proc/notices.d.ts +1 -1
  185. package/dist/proc/notices.js +2 -2
  186. package/dist/proc/prompt.d.ts +1 -1
  187. package/dist/proc/prompt.js +1 -1
  188. package/dist/proc/readiness.js +1 -1
  189. package/dist/proc/supervisor.d.ts +1 -1
  190. package/dist/proc/supervisor.js +3 -3
  191. package/dist/proc/wait.d.ts +1 -1
  192. package/dist/proc/wait.js +1 -1
  193. package/dist/prompts/command.d.ts +1 -1
  194. package/dist/prompts/command.js +1 -1
  195. package/dist/prompts/normalize.d.ts +1 -1
  196. package/dist/prompts/normalize.js +1 -1
  197. package/dist/prompts/resolve.d.ts +1 -1
  198. package/dist/prompts/store.d.ts +2 -12
  199. package/dist/prompts/store.js +6 -60
  200. package/dist/session/checkpoint.d.ts +2 -2
  201. package/dist/session/clear-archive.d.ts +2 -2
  202. package/dist/session/persist.d.ts +2 -2
  203. package/dist/session/persist.js +1 -1
  204. package/dist/session/startup-session.d.ts +2 -2
  205. package/dist/session/validate-session.js +3 -3
  206. package/dist/skills/service.d.ts +2 -2
  207. package/dist/team/bus.d.ts +1 -1
  208. package/dist/team/bus.js +1 -1
  209. package/dist/team/child-reviewer.d.ts +2 -2
  210. package/dist/team/child-reviewer.js +1 -1
  211. package/dist/team/comm-tools.js +1 -1
  212. package/dist/team/dispatch-gate.js +1 -1
  213. package/dist/team/forced-dispatch.js +1 -1
  214. package/dist/team/forced-mode.d.ts +1 -1
  215. package/dist/team/forced-prompt.d.ts +1 -1
  216. package/dist/team/forced-prompt.js +1 -1
  217. package/dist/team/normalize.d.ts +1 -1
  218. package/dist/team/normalize.js +1 -1
  219. package/dist/team/overseer.d.ts +3 -3
  220. package/dist/team/overseer.js +3 -3
  221. package/dist/team/prompt.d.ts +1 -1
  222. package/dist/team/prompt.js +1 -1
  223. package/dist/team/report.d.ts +2 -2
  224. package/dist/team/report.js +2 -2
  225. package/dist/team/retry.d.ts +1 -1
  226. package/dist/team/retry.js +1 -1
  227. package/dist/team/runtime.d.ts +4 -4
  228. package/dist/team/runtime.js +2 -2
  229. package/dist/team/settled.d.ts +2 -2
  230. package/dist/team/subagent.d.ts +4 -4
  231. package/dist/team/subagent.js +5 -5
  232. package/dist/team/task-tool.d.ts +1 -1
  233. package/dist/team/task-tool.js +1 -1
  234. package/dist/todo/normalize.d.ts +1 -1
  235. package/dist/todo/normalize.js +1 -1
  236. package/dist/todo/prompt.d.ts +1 -1
  237. package/dist/todo/prompt.js +1 -1
  238. package/dist/todo/store.d.ts +1 -1
  239. package/dist/todo/store.js +2 -2
  240. package/dist/todo/todo-tool.d.ts +1 -1
  241. package/dist/todo/todo-tool.js +2 -2
  242. package/dist/tools/bash-tool.d.ts +1 -1
  243. package/dist/tools/bash-tool.js +2 -2
  244. package/dist/tools/diff.d.ts +1 -1
  245. package/dist/tools/diff.js +1 -1
  246. package/dist/tools/file-change-store.d.ts +1 -1
  247. package/dist/tools/fs-tools.d.ts +2 -2
  248. package/dist/tools/fs-tools.js +1 -1
  249. package/dist/tools/index.d.ts +3 -3
  250. package/dist/tools/index.js +1 -1
  251. package/dist/tools/job-tools.d.ts +2 -2
  252. package/dist/tools/job-tools.js +4 -4
  253. package/dist/tools/plan-tools.d.ts +1 -1
  254. package/dist/tools/plan-tools.js +1 -1
  255. package/dist/tools/proc-tools.d.ts +1 -1
  256. package/dist/tools/proc-tools.js +2 -2
  257. package/dist/update/classify-failure.d.ts +1 -1
  258. package/dist/update/install-lock.js +1 -1
  259. package/dist/update/install-source.d.ts +1 -1
  260. package/dist/update/installer.js +2 -2
  261. package/dist/update/npm-view.d.ts +1 -1
  262. package/dist/update/npm-view.js +1 -1
  263. package/dist/update/registry.d.ts +1 -1
  264. package/dist/update/registry.js +1 -1
  265. package/dist/update/service.d.ts +2 -2
  266. package/dist/update/service.js +2 -2
  267. package/package.json +7 -7
  268. package/dist/agent/agent-mode.d.ts +0 -108
  269. package/dist/agent/agent-mode.js +0 -121
  270. package/dist/agent/entry-limits.d.ts +0 -65
  271. package/dist/agent/entry-limits.js +0 -133
  272. package/dist/agent/governance-view.d.ts +0 -40
  273. package/dist/agent/governance-view.js +0 -40
  274. package/dist/agent/invocation-card.d.ts +0 -77
  275. package/dist/agent/invocation-card.js +0 -169
  276. package/dist/agent/model-probe-limits.d.ts +0 -39
  277. package/dist/agent/model-probe-limits.js +0 -25
  278. package/dist/agent/model-probe.d.ts +0 -104
  279. package/dist/agent/model-probe.js +0 -391
  280. package/dist/agent/queued-messages.d.ts +0 -23
  281. package/dist/agent/queued-messages.js +0 -49
  282. package/dist/agent/reducer.d.ts +0 -857
  283. package/dist/agent/reducer.js +0 -1646
  284. package/dist/agent/retry-view.d.ts +0 -68
  285. package/dist/agent/retry-view.js +0 -95
  286. package/dist/agent/usage.d.ts +0 -47
  287. package/dist/agent/usage.js +0 -84
  288. package/dist/compaction/limits.d.ts +0 -61
  289. package/dist/compaction/limits.js +0 -64
  290. package/dist/compaction/meter.d.ts +0 -276
  291. package/dist/compaction/meter.js +0 -512
  292. package/dist/compaction/pressure.d.ts +0 -163
  293. package/dist/compaction/pressure.js +0 -199
  294. package/dist/compaction/reason-text.d.ts +0 -36
  295. package/dist/compaction/reason-text.js +0 -78
  296. package/dist/compaction/types.d.ts +0 -360
  297. package/dist/compaction/types.js +0 -22
  298. package/dist/config/governance-config.d.ts +0 -125
  299. package/dist/config/governance-config.js +0 -164
  300. package/dist/config/kit-resolution.d.ts +0 -93
  301. package/dist/config/kit-resolution.js +0 -226
  302. package/dist/config/model-kits.d.ts +0 -225
  303. package/dist/config/model-kits.js +0 -302
  304. package/dist/config/model-profile-resolution.d.ts +0 -28
  305. package/dist/config/model-profile-resolution.js +0 -88
  306. package/dist/config/model-profiles.d.ts +0 -103
  307. package/dist/config/model-profiles.js +0 -188
  308. package/dist/config/schema.d.ts +0 -1645
  309. package/dist/config/schema.js +0 -1383
  310. package/dist/fast/limits.d.ts +0 -152
  311. package/dist/fast/limits.js +0 -152
  312. package/dist/fast/resolve.d.ts +0 -44
  313. package/dist/fast/resolve.js +0 -107
  314. package/dist/fast/task-summary-types.d.ts +0 -66
  315. package/dist/fast/task-summary-types.js +0 -17
  316. package/dist/fast/types.d.ts +0 -141
  317. package/dist/fast/types.js +0 -14
  318. package/dist/governance/governed-dispatch.d.ts +0 -19
  319. package/dist/governance/governed-dispatch.js +0 -17
  320. package/dist/governance/limits.d.ts +0 -107
  321. package/dist/governance/limits.js +0 -131
  322. package/dist/governance/posture.d.ts +0 -35
  323. package/dist/governance/posture.js +0 -59
  324. package/dist/governance/rules/events-table.d.ts +0 -46
  325. package/dist/governance/rules/events-table.js +0 -94
  326. package/dist/governance/types.d.ts +0 -661
  327. package/dist/governance/types.js +0 -27
  328. package/dist/input/control-sequences.d.ts +0 -71
  329. package/dist/input/control-sequences.js +0 -222
  330. package/dist/input/csiu-keys.d.ts +0 -66
  331. package/dist/input/csiu-keys.js +0 -181
  332. package/dist/input/cursor-report.d.ts +0 -61
  333. package/dist/input/cursor-report.js +0 -97
  334. package/dist/input/enter-sequences.d.ts +0 -64
  335. package/dist/input/enter-sequences.js +0 -153
  336. package/dist/input/interrupt-gesture.d.ts +0 -18
  337. package/dist/input/interrupt-gesture.js +0 -19
  338. package/dist/input/keyboard-enhancement.d.ts +0 -42
  339. package/dist/input/keyboard-enhancement.js +0 -65
  340. package/dist/input/keymap.d.ts +0 -20
  341. package/dist/input/keymap.js +0 -99
  342. package/dist/input/limits.d.ts +0 -118
  343. package/dist/input/limits.js +0 -109
  344. package/dist/input/mouse-events.d.ts +0 -87
  345. package/dist/input/mouse-events.js +0 -212
  346. package/dist/input/paste-parse.d.ts +0 -83
  347. package/dist/input/paste-parse.js +0 -107
  348. package/dist/input/pointer-router.d.ts +0 -11
  349. package/dist/input/pointer-router.js +0 -14
  350. package/dist/input/stdin-filter.d.ts +0 -112
  351. package/dist/input/stdin-filter.js +0 -657
  352. package/dist/input/win32-input-mode.d.ts +0 -61
  353. package/dist/input/win32-input-mode.js +0 -269
  354. package/dist/logging/levels.d.ts +0 -40
  355. package/dist/logging/levels.js +0 -59
  356. package/dist/logging/secret-registry.d.ts +0 -32
  357. package/dist/logging/secret-registry.js +0 -73
  358. package/dist/proc/limits.d.ts +0 -214
  359. package/dist/proc/limits.js +0 -221
  360. package/dist/proc/progress.d.ts +0 -47
  361. package/dist/proc/progress.js +0 -163
  362. package/dist/proc/types.d.ts +0 -269
  363. package/dist/proc/types.js +0 -15
  364. package/dist/proc/wait-view.d.ts +0 -65
  365. package/dist/proc/wait-view.js +0 -66
  366. package/dist/prompts/copy.d.ts +0 -89
  367. package/dist/prompts/copy.js +0 -131
  368. package/dist/prompts/fill.d.ts +0 -51
  369. package/dist/prompts/fill.js +0 -46
  370. package/dist/prompts/limits.d.ts +0 -53
  371. package/dist/prompts/limits.js +0 -53
  372. package/dist/prompts/search.d.ts +0 -58
  373. package/dist/prompts/search.js +0 -146
  374. package/dist/prompts/types.d.ts +0 -204
  375. package/dist/prompts/types.js +0 -13
  376. package/dist/team/activity.d.ts +0 -67
  377. package/dist/team/activity.js +0 -130
  378. package/dist/team/limits.d.ts +0 -308
  379. package/dist/team/limits.js +0 -330
  380. package/dist/team/model.d.ts +0 -104
  381. package/dist/team/model.js +0 -150
  382. package/dist/team/panel-rows.d.ts +0 -48
  383. package/dist/team/panel-rows.js +0 -75
  384. package/dist/team/timeline.d.ts +0 -74
  385. package/dist/team/timeline.js +0 -101
  386. package/dist/team/types.d.ts +0 -354
  387. package/dist/team/types.js +0 -13
  388. package/dist/todo/acceptance.d.ts +0 -120
  389. package/dist/todo/acceptance.js +0 -399
  390. package/dist/todo/follow-through.d.ts +0 -138
  391. package/dist/todo/follow-through.js +0 -248
  392. package/dist/todo/limits.d.ts +0 -152
  393. package/dist/todo/limits.js +0 -152
  394. package/dist/todo/panel-rows.d.ts +0 -45
  395. package/dist/todo/panel-rows.js +0 -70
  396. package/dist/todo/plan-sections.d.ts +0 -60
  397. package/dist/todo/plan-sections.js +0 -108
  398. package/dist/todo/row-window.d.ts +0 -51
  399. package/dist/todo/row-window.js +0 -107
  400. package/dist/todo/types.d.ts +0 -124
  401. package/dist/todo/types.js +0 -12
  402. package/dist/tools/human-input.d.ts +0 -212
  403. package/dist/tools/human-input.js +0 -265
  404. package/dist/tools/patch.d.ts +0 -115
  405. package/dist/tools/patch.js +0 -453
  406. package/dist/tools/terminal-output.d.ts +0 -115
  407. package/dist/tools/terminal-output.js +0 -201
  408. package/dist/tools/tool-output-store.d.ts +0 -68
  409. package/dist/tools/tool-output-store.js +0 -102
  410. package/dist/ui/ActivityLine.d.ts +0 -26
  411. package/dist/ui/ActivityLine.js +0 -51
  412. package/dist/ui/AutocompletePopup.d.ts +0 -23
  413. package/dist/ui/AutocompletePopup.js +0 -17
  414. package/dist/ui/BottomStatusRow.d.ts +0 -10
  415. package/dist/ui/BottomStatusRow.js +0 -9
  416. package/dist/ui/Composer.d.ts +0 -115
  417. package/dist/ui/Composer.js +0 -64
  418. package/dist/ui/GovernancePanel.d.ts +0 -50
  419. package/dist/ui/GovernancePanel.js +0 -77
  420. package/dist/ui/GovernanceRun.d.ts +0 -18
  421. package/dist/ui/GovernanceRun.js +0 -11
  422. package/dist/ui/Header.d.ts +0 -48
  423. package/dist/ui/Header.js +0 -27
  424. package/dist/ui/Logo.d.ts +0 -32
  425. package/dist/ui/Logo.js +0 -65
  426. package/dist/ui/Markdown.d.ts +0 -29
  427. package/dist/ui/Markdown.js +0 -116
  428. package/dist/ui/PromptCaret.d.ts +0 -11
  429. package/dist/ui/PromptCaret.js +0 -31
  430. package/dist/ui/PromptInput.d.ts +0 -192
  431. package/dist/ui/PromptInput.js +0 -689
  432. package/dist/ui/QueuePanel.d.ts +0 -8
  433. package/dist/ui/QueuePanel.js +0 -9
  434. package/dist/ui/QueueStatusRow.d.ts +0 -24
  435. package/dist/ui/QueueStatusRow.js +0 -51
  436. package/dist/ui/ScrollbackShell.d.ts +0 -132
  437. package/dist/ui/ScrollbackShell.js +0 -26
  438. package/dist/ui/SessionOpener.d.ts +0 -30
  439. package/dist/ui/SessionOpener.js +0 -12
  440. package/dist/ui/StatusBar.d.ts +0 -130
  441. package/dist/ui/StatusBar.js +0 -61
  442. package/dist/ui/TeamPanel.d.ts +0 -76
  443. package/dist/ui/TeamPanel.js +0 -103
  444. package/dist/ui/ToastStack.d.ts +0 -8
  445. package/dist/ui/ToastStack.js +0 -31
  446. package/dist/ui/TodoPanel.d.ts +0 -52
  447. package/dist/ui/TodoPanel.js +0 -214
  448. package/dist/ui/Transcript.d.ts +0 -105
  449. package/dist/ui/Transcript.js +0 -258
  450. package/dist/ui/UpdateLine.d.ts +0 -44
  451. package/dist/ui/UpdateLine.js +0 -129
  452. package/dist/ui/activity-phrases.d.ts +0 -33
  453. package/dist/ui/activity-phrases.js +0 -50
  454. package/dist/ui/capabilities.d.ts +0 -27
  455. package/dist/ui/capabilities.js +0 -65
  456. package/dist/ui/clipboard-task.d.ts +0 -29
  457. package/dist/ui/clipboard-task.js +0 -66
  458. package/dist/ui/clipboard.d.ts +0 -31
  459. package/dist/ui/clipboard.js +0 -157
  460. package/dist/ui/color-runtime.d.ts +0 -5
  461. package/dist/ui/color-runtime.js +0 -29
  462. package/dist/ui/composer-input.d.ts +0 -38
  463. package/dist/ui/composer-input.js +0 -79
  464. package/dist/ui/composer-limits.d.ts +0 -30
  465. package/dist/ui/composer-limits.js +0 -45
  466. package/dist/ui/composer-rows.d.ts +0 -73
  467. package/dist/ui/composer-rows.js +0 -129
  468. package/dist/ui/console-bridge.d.ts +0 -19
  469. package/dist/ui/console-bridge.js +0 -52
  470. package/dist/ui/density.d.ts +0 -26
  471. package/dist/ui/density.js +0 -34
  472. package/dist/ui/display-tab.d.ts +0 -51
  473. package/dist/ui/display-tab.js +0 -82
  474. package/dist/ui/editor-navigation.d.ts +0 -55
  475. package/dist/ui/editor-navigation.js +0 -96
  476. package/dist/ui/editor-reducer.d.ts +0 -108
  477. package/dist/ui/editor-reducer.js +0 -187
  478. package/dist/ui/enter-frames.d.ts +0 -47
  479. package/dist/ui/enter-frames.js +0 -117
  480. package/dist/ui/entries/AssistantEntry.d.ts +0 -37
  481. package/dist/ui/entries/AssistantEntry.js +0 -43
  482. package/dist/ui/entries/CompactionCard.d.ts +0 -88
  483. package/dist/ui/entries/CompactionCard.js +0 -222
  484. package/dist/ui/entries/DiffView.d.ts +0 -61
  485. package/dist/ui/entries/DiffView.js +0 -103
  486. package/dist/ui/entries/EntryFrame.d.ts +0 -23
  487. package/dist/ui/entries/EntryFrame.js +0 -6
  488. package/dist/ui/entries/FastCard.d.ts +0 -53
  489. package/dist/ui/entries/FastCard.js +0 -105
  490. package/dist/ui/entries/GovernanceCard.d.ts +0 -30
  491. package/dist/ui/entries/GovernanceCard.js +0 -32
  492. package/dist/ui/entries/InvocationCard.d.ts +0 -20
  493. package/dist/ui/entries/InvocationCard.js +0 -32
  494. package/dist/ui/entries/QueuedEntry.d.ts +0 -27
  495. package/dist/ui/entries/QueuedEntry.js +0 -33
  496. package/dist/ui/entries/RetryCard.d.ts +0 -56
  497. package/dist/ui/entries/RetryCard.js +0 -60
  498. package/dist/ui/entries/ServiceCard.d.ts +0 -82
  499. package/dist/ui/entries/ServiceCard.js +0 -151
  500. package/dist/ui/entries/TeamCard.d.ts +0 -55
  501. package/dist/ui/entries/TeamCard.js +0 -94
  502. package/dist/ui/entries/TodoCard.d.ts +0 -54
  503. package/dist/ui/entries/TodoCard.js +0 -98
  504. package/dist/ui/entries/ToolCard.d.ts +0 -81
  505. package/dist/ui/entries/ToolCard.js +0 -169
  506. package/dist/ui/entries/ToolPreview.d.ts +0 -59
  507. package/dist/ui/entries/ToolPreview.js +0 -208
  508. package/dist/ui/entries/UserEntry.d.ts +0 -36
  509. package/dist/ui/entries/UserEntry.js +0 -57
  510. package/dist/ui/entries/WaitCard.d.ts +0 -37
  511. package/dist/ui/entries/WaitCard.js +0 -92
  512. package/dist/ui/exit-snapshot.d.ts +0 -43
  513. package/dist/ui/exit-snapshot.js +0 -26
  514. package/dist/ui/frame-differ.d.ts +0 -166
  515. package/dist/ui/frame-differ.js +0 -354
  516. package/dist/ui/frame-observer.d.ts +0 -17
  517. package/dist/ui/frame-observer.js +0 -94
  518. package/dist/ui/frame-parser.d.ts +0 -7
  519. package/dist/ui/frame-parser.js +0 -18
  520. package/dist/ui/gauge.d.ts +0 -39
  521. package/dist/ui/gauge.js +0 -55
  522. package/dist/ui/glyphs.d.ts +0 -178
  523. package/dist/ui/glyphs.js +0 -165
  524. package/dist/ui/governance-copy.d.ts +0 -69
  525. package/dist/ui/governance-copy.js +0 -104
  526. package/dist/ui/governance-status.d.ts +0 -145
  527. package/dist/ui/governance-status.js +0 -326
  528. package/dist/ui/gradient.d.ts +0 -11
  529. package/dist/ui/gradient.js +0 -50
  530. package/dist/ui/ink-runtime.d.ts +0 -4
  531. package/dist/ui/ink-runtime.js +0 -51
  532. package/dist/ui/interaction-copy.d.ts +0 -84
  533. package/dist/ui/interaction-copy.js +0 -41
  534. package/dist/ui/interaction-hints.d.ts +0 -44
  535. package/dist/ui/interaction-hints.js +0 -97
  536. package/dist/ui/layout/AppShell.d.ts +0 -17
  537. package/dist/ui/layout/AppShell.js +0 -6
  538. package/dist/ui/layout/Gutter.d.ts +0 -67
  539. package/dist/ui/layout/Gutter.js +0 -42
  540. package/dist/ui/layout/MeasuredEntry.d.ts +0 -21
  541. package/dist/ui/layout/MeasuredEntry.js +0 -30
  542. package/dist/ui/layout/OverlayFrame.d.ts +0 -73
  543. package/dist/ui/layout/OverlayFrame.js +0 -110
  544. package/dist/ui/layout/ScrollIndicator.d.ts +0 -32
  545. package/dist/ui/layout/ScrollIndicator.js +0 -22
  546. package/dist/ui/layout/ScrollViewport.d.ts +0 -40
  547. package/dist/ui/layout/ScrollViewport.js +0 -222
  548. package/dist/ui/layout/agents-board.d.ts +0 -102
  549. package/dist/ui/layout/agents-board.js +0 -389
  550. package/dist/ui/layout/autocomplete.d.ts +0 -18
  551. package/dist/ui/layout/autocomplete.js +0 -26
  552. package/dist/ui/layout/budget.d.ts +0 -43
  553. package/dist/ui/layout/budget.js +0 -52
  554. package/dist/ui/layout/cells.d.ts +0 -61
  555. package/dist/ui/layout/cells.js +0 -156
  556. package/dist/ui/layout/document-layout.d.ts +0 -13
  557. package/dist/ui/layout/document-layout.js +0 -10
  558. package/dist/ui/layout/follow-state.d.ts +0 -138
  559. package/dist/ui/layout/follow-state.js +0 -148
  560. package/dist/ui/layout/frame.d.ts +0 -36
  561. package/dist/ui/layout/frame.js +0 -39
  562. package/dist/ui/layout/governance-board.d.ts +0 -121
  563. package/dist/ui/layout/governance-board.js +0 -382
  564. package/dist/ui/layout/governance-card.d.ts +0 -53
  565. package/dist/ui/layout/governance-card.js +0 -134
  566. package/dist/ui/layout/governance-chip.d.ts +0 -38
  567. package/dist/ui/layout/governance-chip.js +0 -64
  568. package/dist/ui/layout/governance-panel.d.ts +0 -85
  569. package/dist/ui/layout/governance-panel.js +0 -358
  570. package/dist/ui/layout/governance-roster.d.ts +0 -65
  571. package/dist/ui/layout/governance-roster.js +0 -275
  572. package/dist/ui/layout/header-hints.d.ts +0 -90
  573. package/dist/ui/layout/header-hints.js +0 -110
  574. package/dist/ui/layout/header-left.d.ts +0 -115
  575. package/dist/ui/layout/header-left.js +0 -206
  576. package/dist/ui/layout/invocation-card.d.ts +0 -41
  577. package/dist/ui/layout/invocation-card.js +0 -91
  578. package/dist/ui/layout/kit-chip.d.ts +0 -50
  579. package/dist/ui/layout/kit-chip.js +0 -81
  580. package/dist/ui/layout/overlay-window.d.ts +0 -43
  581. package/dist/ui/layout/overlay-window.js +0 -51
  582. package/dist/ui/layout/queue-layout.d.ts +0 -19
  583. package/dist/ui/layout/queue-layout.js +0 -26
  584. package/dist/ui/layout/rail.d.ts +0 -7
  585. package/dist/ui/layout/rail.js +0 -16
  586. package/dist/ui/layout/scroll-indicator.d.ts +0 -27
  587. package/dist/ui/layout/scroll-indicator.js +0 -36
  588. package/dist/ui/layout/scroll.d.ts +0 -37
  589. package/dist/ui/layout/scroll.js +0 -99
  590. package/dist/ui/layout/scrollbar-geometry.d.ts +0 -17
  591. package/dist/ui/layout/scrollbar-geometry.js +0 -13
  592. package/dist/ui/layout/session-chip.d.ts +0 -52
  593. package/dist/ui/layout/session-chip.js +0 -64
  594. package/dist/ui/layout/shortcut-panel-layout.d.ts +0 -191
  595. package/dist/ui/layout/shortcut-panel-layout.js +0 -321
  596. package/dist/ui/layout/status-detail-layout.d.ts +0 -9
  597. package/dist/ui/layout/status-detail-layout.js +0 -79
  598. package/dist/ui/layout/status-layout.d.ts +0 -140
  599. package/dist/ui/layout/status-layout.js +0 -262
  600. package/dist/ui/layout/task-summary-cell.d.ts +0 -61
  601. package/dist/ui/layout/task-summary-cell.js +0 -65
  602. package/dist/ui/layout/team-panel.d.ts +0 -18
  603. package/dist/ui/layout/team-panel.js +0 -25
  604. package/dist/ui/layout/team-row.d.ts +0 -139
  605. package/dist/ui/layout/team-row.js +0 -246
  606. package/dist/ui/layout/todo-layout.d.ts +0 -62
  607. package/dist/ui/layout/todo-layout.js +0 -102
  608. package/dist/ui/layout/useTerminalSize.d.ts +0 -13
  609. package/dist/ui/layout/useTerminalSize.js +0 -50
  610. package/dist/ui/layout/viewport-geometry.d.ts +0 -29
  611. package/dist/ui/layout/viewport-geometry.js +0 -28
  612. package/dist/ui/layout/virtual-window.d.ts +0 -112
  613. package/dist/ui/layout/virtual-window.js +0 -494
  614. package/dist/ui/layout/wait-bar.d.ts +0 -34
  615. package/dist/ui/layout/wait-bar.js +0 -48
  616. package/dist/ui/layout/wrap-rows.d.ts +0 -26
  617. package/dist/ui/layout/wrap-rows.js +0 -88
  618. package/dist/ui/live-clamp.d.ts +0 -14
  619. package/dist/ui/live-clamp.js +0 -46
  620. package/dist/ui/markdown-blocks.d.ts +0 -107
  621. package/dist/ui/markdown-blocks.js +0 -240
  622. package/dist/ui/overlays/AgentsBoardOverlay.d.ts +0 -57
  623. package/dist/ui/overlays/AgentsBoardOverlay.js +0 -183
  624. package/dist/ui/overlays/ConfirmDialog.d.ts +0 -31
  625. package/dist/ui/overlays/ConfirmDialog.js +0 -44
  626. package/dist/ui/overlays/GovernanceBoardOverlay.d.ts +0 -41
  627. package/dist/ui/overlays/GovernanceBoardOverlay.js +0 -76
  628. package/dist/ui/overlays/GovernanceSettingsPage.d.ts +0 -48
  629. package/dist/ui/overlays/GovernanceSettingsPage.js +0 -93
  630. package/dist/ui/overlays/HelpOverlay.d.ts +0 -29
  631. package/dist/ui/overlays/HelpOverlay.js +0 -232
  632. package/dist/ui/overlays/KitEditor.d.ts +0 -23
  633. package/dist/ui/overlays/KitEditor.js +0 -101
  634. package/dist/ui/overlays/KitManager.d.ts +0 -23
  635. package/dist/ui/overlays/KitManager.js +0 -104
  636. package/dist/ui/overlays/KitPicker.d.ts +0 -49
  637. package/dist/ui/overlays/KitPicker.js +0 -58
  638. package/dist/ui/overlays/ModelDiscoveryList.d.ts +0 -23
  639. package/dist/ui/overlays/ModelDiscoveryList.js +0 -161
  640. package/dist/ui/overlays/ModelPicker.d.ts +0 -26
  641. package/dist/ui/overlays/ModelPicker.js +0 -63
  642. package/dist/ui/overlays/ModelProfileEditor.d.ts +0 -29
  643. package/dist/ui/overlays/ModelProfileEditor.js +0 -168
  644. package/dist/ui/overlays/ModelProfilePicker.d.ts +0 -48
  645. package/dist/ui/overlays/ModelProfilePicker.js +0 -231
  646. package/dist/ui/overlays/PlanReviewOverlay.d.ts +0 -51
  647. package/dist/ui/overlays/PlanReviewOverlay.js +0 -132
  648. package/dist/ui/overlays/PromptEditorPage.d.ts +0 -48
  649. package/dist/ui/overlays/PromptEditorPage.js +0 -227
  650. package/dist/ui/overlays/PromptLibraryOverlay.d.ts +0 -37
  651. package/dist/ui/overlays/PromptLibraryOverlay.js +0 -191
  652. package/dist/ui/overlays/PromptPicker.d.ts +0 -36
  653. package/dist/ui/overlays/PromptPicker.js +0 -129
  654. package/dist/ui/overlays/PromptTextArea.d.ts +0 -86
  655. package/dist/ui/overlays/PromptTextArea.js +0 -141
  656. package/dist/ui/overlays/QuestionOverlay.d.ts +0 -39
  657. package/dist/ui/overlays/QuestionOverlay.js +0 -258
  658. package/dist/ui/overlays/QueueOverlay.d.ts +0 -22
  659. package/dist/ui/overlays/QueueOverlay.js +0 -79
  660. package/dist/ui/overlays/SettingsScreen.d.ts +0 -228
  661. package/dist/ui/overlays/SettingsScreen.js +0 -1037
  662. package/dist/ui/overlays/ShortcutPanel.d.ts +0 -39
  663. package/dist/ui/overlays/ShortcutPanel.js +0 -106
  664. package/dist/ui/overlays/TeamFanoutPage.d.ts +0 -51
  665. package/dist/ui/overlays/TeamFanoutPage.js +0 -90
  666. package/dist/ui/overlays/governance-settings.d.ts +0 -79
  667. package/dist/ui/overlays/governance-settings.js +0 -140
  668. package/dist/ui/overlays/kit-picker-state.d.ts +0 -87
  669. package/dist/ui/overlays/kit-picker-state.js +0 -136
  670. package/dist/ui/overlays/kit-settings-state.d.ts +0 -129
  671. package/dist/ui/overlays/kit-settings-state.js +0 -268
  672. package/dist/ui/overlays/model-probe-view.d.ts +0 -128
  673. package/dist/ui/overlays/model-probe-view.js +0 -225
  674. package/dist/ui/overlays/model-profile-state.d.ts +0 -177
  675. package/dist/ui/overlays/model-profile-state.js +0 -301
  676. package/dist/ui/overlays/prompt-library-state.d.ts +0 -162
  677. package/dist/ui/overlays/prompt-library-state.js +0 -335
  678. package/dist/ui/overlays/prompt-picker-state.d.ts +0 -71
  679. package/dist/ui/overlays/prompt-picker-state.js +0 -98
  680. package/dist/ui/overlays/team-fanout-state.d.ts +0 -106
  681. package/dist/ui/overlays/team-fanout-state.js +0 -155
  682. package/dist/ui/overlays/use-model-probe.d.ts +0 -30
  683. package/dist/ui/overlays/use-model-probe.js +0 -109
  684. package/dist/ui/palettes.d.ts +0 -112
  685. package/dist/ui/palettes.js +0 -130
  686. package/dist/ui/paste-frames.d.ts +0 -91
  687. package/dist/ui/paste-frames.js +0 -117
  688. package/dist/ui/paste-tokens.d.ts +0 -90
  689. package/dist/ui/paste-tokens.js +0 -147
  690. package/dist/ui/render-cache.d.ts +0 -81
  691. package/dist/ui/render-cache.js +0 -196
  692. package/dist/ui/render-governor.d.ts +0 -54
  693. package/dist/ui/render-governor.js +0 -78
  694. package/dist/ui/run-metrics.d.ts +0 -23
  695. package/dist/ui/run-metrics.js +0 -27
  696. package/dist/ui/run-status-row.d.ts +0 -63
  697. package/dist/ui/run-status-row.js +0 -54
  698. package/dist/ui/screen.d.ts +0 -107
  699. package/dist/ui/screen.js +0 -234
  700. package/dist/ui/scrollback/LiveTail.d.ts +0 -115
  701. package/dist/ui/scrollback/LiveTail.js +0 -48
  702. package/dist/ui/scrollback/band.d.ts +0 -114
  703. package/dist/ui/scrollback/band.js +0 -143
  704. package/dist/ui/scrollback/budget.d.ts +0 -90
  705. package/dist/ui/scrollback/budget.js +0 -100
  706. package/dist/ui/scrollback/canvas.d.ts +0 -100
  707. package/dist/ui/scrollback/canvas.js +0 -114
  708. package/dist/ui/scrollback/cursor-probe.d.ts +0 -71
  709. package/dist/ui/scrollback/cursor-probe.js +0 -133
  710. package/dist/ui/scrollback/drain.d.ts +0 -32
  711. package/dist/ui/scrollback/drain.js +0 -64
  712. package/dist/ui/scrollback/exit-summary.d.ts +0 -23
  713. package/dist/ui/scrollback/exit-summary.js +0 -25
  714. package/dist/ui/scrollback/limits.d.ts +0 -98
  715. package/dist/ui/scrollback/limits.js +0 -98
  716. package/dist/ui/scrollback/live-preview.d.ts +0 -34
  717. package/dist/ui/scrollback/live-preview.js +0 -130
  718. package/dist/ui/scrollback/overflow-print.d.ts +0 -108
  719. package/dist/ui/scrollback/overflow-print.js +0 -120
  720. package/dist/ui/scrollback/renderer.d.ts +0 -48
  721. package/dist/ui/scrollback/renderer.js +0 -186
  722. package/dist/ui/scrollback/scrollback-writer.d.ts +0 -174
  723. package/dist/ui/scrollback/scrollback-writer.js +0 -648
  724. package/dist/ui/scrollback/settled-boundary.d.ts +0 -42
  725. package/dist/ui/scrollback/settled-boundary.js +0 -109
  726. package/dist/ui/scrollback/tail-anchor.d.ts +0 -71
  727. package/dist/ui/scrollback/tail-anchor.js +0 -79
  728. package/dist/ui/scrollback/tail-window.d.ts +0 -73
  729. package/dist/ui/scrollback/tail-window.js +0 -89
  730. package/dist/ui/scrollback/use-scrollback-view.d.ts +0 -139
  731. package/dist/ui/scrollback/use-scrollback-view.js +0 -601
  732. package/dist/ui/scrollback/writer-shapes.d.ts +0 -127
  733. package/dist/ui/scrollback/writer-shapes.js +0 -159
  734. package/dist/ui/scrollbar-controller.d.ts +0 -30
  735. package/dist/ui/scrollbar-controller.js +0 -124
  736. package/dist/ui/selection/highlight.d.ts +0 -39
  737. package/dist/ui/selection/highlight.js +0 -64
  738. package/dist/ui/selection/screen-mirror.d.ts +0 -24
  739. package/dist/ui/selection/screen-mirror.js +0 -35
  740. package/dist/ui/selection/selection-controller.d.ts +0 -104
  741. package/dist/ui/selection/selection-controller.js +0 -372
  742. package/dist/ui/selection/selection.d.ts +0 -90
  743. package/dist/ui/selection/selection.js +0 -223
  744. package/dist/ui/shortcuts.d.ts +0 -81
  745. package/dist/ui/shortcuts.js +0 -221
  746. package/dist/ui/status-feedback.d.ts +0 -35
  747. package/dist/ui/status-feedback.js +0 -38
  748. package/dist/ui/stdout-frame-writer.d.ts +0 -74
  749. package/dist/ui/stdout-frame-writer.js +0 -155
  750. package/dist/ui/team-status.d.ts +0 -166
  751. package/dist/ui/team-status.js +0 -252
  752. package/dist/ui/terminal-plan.d.ts +0 -52
  753. package/dist/ui/terminal-plan.js +0 -49
  754. package/dist/ui/theme.d.ts +0 -96
  755. package/dist/ui/theme.js +0 -130
  756. package/dist/ui/transcript-text.d.ts +0 -41
  757. package/dist/ui/transcript-text.js +0 -282
  758. package/dist/ui/use-height-store.d.ts +0 -31
  759. package/dist/ui/use-height-store.js +0 -76
  760. package/dist/ui/use-render-governor.d.ts +0 -39
  761. package/dist/ui/use-render-governor.js +0 -57
  762. package/dist/ui/use-wheel-routing.d.ts +0 -57
  763. package/dist/ui/use-wheel-routing.js +0 -152
  764. package/dist/ui/win-vt-force.d.ts +0 -136
  765. package/dist/ui/win-vt-force.js +0 -237
  766. package/dist/ui/win-vt-input.d.ts +0 -57
  767. package/dist/ui/win-vt-input.js +0 -62
  768. package/dist/update/limits.d.ts +0 -111
  769. package/dist/update/limits.js +0 -111
  770. package/dist/update/semver.d.ts +0 -89
  771. package/dist/update/semver.js +0 -295
  772. package/dist/update/types.d.ts +0 -169
  773. package/dist/update/types.js +0 -68
  774. /package/dist/{ui → app}/session-bridge.d.ts +0 -0
  775. /package/dist/{ui → app}/session-bridge.js +0 -0
@@ -1,1645 +0,0 @@
1
- /**
2
- * Config schema — the persisted config-file shape, the in-memory effective
3
- * config, sane defaults, and small validation/masking helpers.
4
- *
5
- * See spec §3.5 (resolution pipeline), §6.1 (config file), and §3.8 (timeout
6
- * invariant).
7
- */
8
- import { type RetryPolicy, type ThinkingLevel } from '@aragon-agent/core';
9
- import { type LogLevelName } from '../logging/levels.js';
10
- import { type GovernanceConfig } from './governance-config.js';
11
- import type { Posture } from '../governance/posture.js';
12
- import type { FollowThroughMode } from '../todo/types.js';
13
- export { clampGovernanceConfig, DEFAULT_GOVERNANCE_CONFIG, type GovernanceConfig, } from './governance-config.js';
14
- /**
15
- * `ModelRegistry` seeds builtin lists for five providers, but `initProviders()`
16
- * registers only three adapters. Running a model whose provider has no adapter
17
- * throws `Unknown LLM provider`, so the CLI only ever offers these three.
18
- */
19
- export declare const ADAPTER_PROVIDERS: readonly ["anthropic", "openai", "google"];
20
- export type AdapterProviderId = (typeof ADAPTER_PROVIDERS)[number];
21
- export declare function isAdapterProvider(id: string): id is AdapterProviderId;
22
- export declare const THINKING_LEVELS: ThinkingLevel[];
23
- export declare function isThinkingLevel(v: unknown): v is ThinkingLevel;
24
- export declare function clampThinkingLevel(v: unknown, fallback: ThinkingLevel): ThinkingLevel;
25
- export declare const THEME_NAMES: readonly ["auto", "warm", "cool", "light"];
26
- export type ThemeName = (typeof THEME_NAMES)[number];
27
- /** The v0.3.0 name for what is now `cool`. Accepted forever as an alias. */
28
- export declare const LEGACY_DARK_THEME = "dark";
29
- export declare function isThemeName(v: unknown): v is ThemeName;
30
- /**
31
- * THE single gate for every theme write (spec §4.5 / R-4).
32
- *
33
- * All three write paths funnel through here — config resolution (`load.ts`),
34
- * `aragon config set theme`, and the `/theme` slash command — which is why the
35
- * `dark -> cool` migration lives here and nowhere else. Putting it in a
36
- * `load.ts` normalization step instead would migrate what users *read* but not
37
- * what they *write*, producing the worst kind of bug: "the flag works but the
38
- * setting won't stick."
39
- *
40
- * An unrecognized value still falls back silently (plus a warn toast at the call
41
- * site). Turning that into a hard exit would be an unannounced breaking change
42
- * and would not match `clampThinkingLevel` / `clampTranscriptWindow`.
43
- */
44
- export declare function clampTheme(v: unknown, fallback: ThemeName): ThemeName;
45
- export declare const SCROLL_MODES: readonly ["native", "app"];
46
- /**
47
- * How the interactive TUI scrolls (tui-native-terminal-scroll D1).
48
- *
49
- * `native` prints settled conversation into the host terminal's own scrollback and
50
- * keeps only a bounded live region on screen; `app` is the original full-screen
51
- * alternate-screen layout with application-owned scrolling.
52
- */
53
- export type ScrollMode = (typeof SCROLL_MODES)[number];
54
- export declare const DEFAULT_SCROLL_MODE: ScrollMode;
55
- export declare function clampScrollMode(v: unknown, fallback: ScrollMode): ScrollMode;
56
- export declare const DENSITY_MODES: readonly ["comfortable", "compact"];
57
- export type DensityMode = (typeof DENSITY_MODES)[number];
58
- export declare function clampDensity(v: unknown, fallback: DensityMode): DensityMode;
59
- /**
60
- * Submissions after which the composer hint collapses to `? help` (§4.6).
61
- * Only the IDLE hint fades; the running hint carries the abort key and is
62
- * always shown in full.
63
- */
64
- export declare const HINT_FADE_AFTER = 8;
65
- export declare const CONFIG_VERSION = 1;
66
- export declare const DEFAULT_MODEL = "claude-sonnet-4-5-20250929";
67
- /** Per-tool executor ceiling (§3.8). Headroom for typical installs/builds. */
68
- export declare const DEFAULT_TOOL_TIMEOUT_MS = 180000;
69
- /** Extra margin so idle timeout is strictly greater than the tool ceiling. */
70
- export declare const IDLE_TIMEOUT_MARGIN_MS = 30000;
71
- /** Watchdog idle timeout (§3.8) — must stay ≥ toolTimeout so long tools survive. */
72
- export declare const DEFAULT_IDLE_TIMEOUT_MS: number;
73
- /**
74
- * Cap on the recall list.
75
- *
76
- * The list itself now lives in `<home>/prompt-history.jsonl`; this constant is
77
- * consumed by `config/prompt-history.ts`, not by the UI.
78
- */
79
- export declare const PROMPT_HISTORY_CAP = 100;
80
- /**
81
- * The SCROLL HORIZON: entries older than this are not reachable inside the app
82
- * and render as the "N earlier entries collapsed" line instead (invariant I-3).
83
- *
84
- * It used to be a rendering budget as well, because yoga laid out every child
85
- * even when `overflow: hidden` clipped it. The viewport is virtualised now
86
- * (tui-render-performance L3) — off-screen entries are not mounted at all — so
87
- * the horizon costs O(entries) of arithmetic rather than O(characters) of layout
88
- * and the default rises 300 -> 1000 with a 20000 ceiling. An existing persisted
89
- * `300` is still valid and still clamps; no config migration is required.
90
- */
91
- export declare const DEFAULT_TRANSCRIPT_WINDOW = 1000;
92
- export declare const MIN_TRANSCRIPT_WINDOW = 50;
93
- export declare const MAX_TRANSCRIPT_WINDOW = 20000;
94
- export declare function clampTranscriptWindow(v: unknown, fallback: number): number;
95
- /**
96
- * Bounds for a hand-supplied context window.
97
- *
98
- * The floor is roughly the smallest window any current model ships with; the
99
- * ceiling is well above the largest, and both exist to keep a typo (a missing
100
- * or an extra zero) from producing a gauge that is permanently red or
101
- * permanently flat.
102
- */
103
- export declare const MIN_CONTEXT_WINDOW = 8000;
104
- export declare const MAX_CONTEXT_WINDOW = 5000000;
105
- /**
106
- * THE single gate for every `contextWindow` read AND write.
107
- *
108
- * TRI-STATE, AND `null` MUST PASS STRAIGHT THROUGH (RV-12). `null` means AUTO -
109
- * take the model table's number, or the 128k placeholder. Clamping it into
110
- * `[8000, ...]` yields 8000, which removes "auto" from the config permanently
111
- * and presents to the user as an 8k denominator with a permanently red bar and
112
- * no visible source. `maxTokens` above is the existing tri-state precedent and
113
- * this deliberately copies its shape rather than inventing a second convention.
114
- */
115
- export declare function clampContextWindow(v: unknown, fallback: number | null): number | null;
116
- /**
117
- * Where the effective `contextWindow` override came from
118
- * (profile-context-window §5.2).
119
- *
120
- * A CLI-LOCAL RUNTIME FACT: never persisted, never promoted into Core's event
121
- * shapes. It exists so `/context` can name WHICH surface supplied a
122
- * denominator the user asserted - the environment, the legacy top-level key,
123
- * or the model profile bound as Main.
124
- */
125
- export type ContextWindowOrigin = 'env' | 'config' | 'profile';
126
- /**
127
- * Parse text typed into the settings screen or the profile editor for a
128
- * context window (profile-context-window §5.3).
129
- *
130
- * THE MIRROR OF `parseMaxTokensInput` BELOW, down to the tri-state shape: it
131
- * distinguishes AUTO from "the user typed nonsense", which `clampContextWindow`
132
- * cannot - a typo must change NOTHING rather than silently discard the number
133
- * the user meant to set. `''` / `'auto'` / `'0'` are AUTO (`isAutoToken`);
134
- * a digit run is clamped through THE single gate; anything else is invalid.
135
- */
136
- export declare function parseContextWindowInput(raw: string): {
137
- kind: 'auto';
138
- } | {
139
- kind: 'value';
140
- value: number;
141
- clamped: boolean;
142
- } | {
143
- kind: 'invalid';
144
- };
145
- /**
146
- * Entries kept in `ViewState` at all (tui-render-performance L1 / R5).
147
- *
148
- * A DIFFERENT BOUND FROM `transcriptWindow`, and the two must not be merged:
149
- * the window is what the user can scroll to, this is what the process keeps in
150
- * memory and what `/save` can export. Dropped entries are COUNTED and reported
151
- * (`/perf`, and a leading line in the exported transcript) — never silent.
152
- */
153
- export declare const DEFAULT_TRANSCRIPT_RETAIN = 1000;
154
- export declare const MIN_TRANSCRIPT_RETAIN = 200;
155
- export declare const MAX_TRANSCRIPT_RETAIN = 20000;
156
- export declare function clampTranscriptRetain(v: unknown, fallback: number): number;
157
- /** Adaptive coalescing under load. On by default; `--no-render-governor` kills it. */
158
- export declare const DEFAULT_RENDER_GOVERNOR = true;
159
- /**
160
- * Ceiling of the governor ladder, in ms. `33` flattens the ladder to a single
161
- * rung, which is the pre-feature behaviour without needing the kill switch.
162
- */
163
- export declare const DEFAULT_MAX_RENDER_INTERVAL_MS = 320;
164
- export declare function clampMaxRenderInterval(v: unknown, fallback: number): number;
165
- /**
166
- * Repaint only the frame lines that changed (full-screen only).
167
- *
168
- * ON by default, and `--no-diff-render` restores today's byte stream EXACTLY —
169
- * the interposer is not constructed at all, so a regression on an exotic
170
- * terminal is one flag away from being neutralised (§3.5 rung 2).
171
- */
172
- export declare const DEFAULT_DIFF_RENDER = true;
173
- /**
174
- * Wrap each repaint batch in DEC 2026 begin/end synchronized update.
175
- *
176
- * ON by default with NO capability probe (§3.3): terminals that do not implement
177
- * mode 2026 parse the CSI sequence, find an unknown private mode and discard it,
178
- * so a false positive costs nothing — and a false negative costs nothing either,
179
- * because the frame differ already removes the flicker on its own.
180
- */
181
- export declare const DEFAULT_SYNC_OUTPUT = true;
182
- /**
183
- * Drag-select + copy, and — because §4.4.1 gates `\x1b[?1002h` on exactly this
184
- * value — whether motion reporting is requested from the terminal at all.
185
- *
186
- * That gating is what makes `false` BYTE-IDENTICAL to a pre-feature session
187
- * rather than merely equivalent (AC-8 / D-15). Ignored when `mouse` is false,
188
- * since there is no capture to select with.
189
- */
190
- export declare const DEFAULT_MOUSE_SELECT = true;
191
- /**
192
- * Idle delay before a paused viewport returns to the newest line, in ms.
193
- *
194
- * Five seconds is chosen to be LONGER than a glance and SHORTER than a read.
195
- * `0` disables auto-resume entirely, and it is a real value rather than a
196
- * sentinel-shaped default: `shouldArmResume` refuses on it before any timer is
197
- * created (AC-9), so the revert for Rule B is one config key.
198
- *
199
- * NO CLI FLAG (§6.1). It is a comfort preference, set once
200
- * (`aragon config set scrollResumeMs 8000`) and then forgotten — the same
201
- * argument this file already makes for `historyEnabled`. Adding a flag for every
202
- * scalar is how a CLI ends up with sixty of them.
203
- */
204
- export declare const DEFAULT_SCROLL_RESUME_MS = 5000;
205
- /**
206
- * `clampIntAllowingZero`, and the choice is load-bearing: `clampInt` delegates to
207
- * `coercePositiveInt`, which returns the FALLBACK for `n <= 0` — so `0` would
208
- * silently become 5000 and the documented off switch would not be an off switch.
209
- * Exactly the trap `retry.maxRetries` needed this helper for.
210
- */
211
- export declare function clampScrollResumeMs(v: unknown, fallback: number): number;
212
- /**
213
- * Ceiling on ONE human wait, in ms. Thirty minutes is far outside "the user
214
- * went to get coffee", but a ceiling has to exist: an unattended terminal must
215
- * not wedge a CI job or a stale ssh session forever.
216
- *
217
- * THIS IS NOT A ROUND LIMIT and the distinction matters. It bounds a single wait
218
- * (liveness); it says nothing about how many times the model may ask.
219
- */
220
- export declare const DEFAULT_PLAN_HUMAN_TIMEOUT_MS = 1800000;
221
- export declare function clampHumanTimeout(v: unknown, fallback: number): number;
222
- export interface SkillsConfig {
223
- enabled: boolean;
224
- /** Skill names the user has switched off. */
225
- disabled: string[];
226
- /** Gate `skill_install` / `skill_create` behind a human confirmation (D12). */
227
- requireApproval: boolean;
228
- /** Hosts an install may fetch from. Anything else is refused (SSRF guard). */
229
- allowedHosts: string[];
230
- /** Project-relative skill roots, in ascending precedence. */
231
- projectDirs: string[];
232
- /** Absolute, normalized directories the user has trusted (D13 / §9.3). */
233
- trustedProjectDirs: string[];
234
- /** D19: BYTES, not characters. */
235
- catalogMaxBytes: number;
236
- /** D19: BYTES, not characters. Upper bound derives from SKILL_RESULT_MAX_BYTES. */
237
- bodyMaxBytes: number;
238
- /**
239
- * What to do when SKILL.md no longer matches the copy that was approved (§8.2).
240
- *
241
- * Defaults to `warn`, NOT `strict` (D-A13). Hand-editing an installed skill is
242
- * a legitimate workflow — the same one `update --force` exists to protect —
243
- * and a default that silently removed the edited skill from the catalog would
244
- * present as "I changed one line and it disappeared".
245
- */
246
- integrity: SkillsIntegrityMode;
247
- /**
248
- * Keep local per-skill use counters to rank the catalog (§9). Name, count and
249
- * timestamp only; never transmitted. `false` disables all reads and writes.
250
- */
251
- usageTracking: boolean;
252
- /**
253
- * How hard `allowed-tools` bites (§5.5).
254
- *
255
- * Defaults to `enforce`, NOT `warn` — the opposite of `integrity`, and the two
256
- * are not comparable. A false integrity alarm punishes a user for legitimately
257
- * editing a file they own; a false ceiling refusal requires a skill AUTHOR to
258
- * have under-declared what their own skill uses, which is a bug in the skill
259
- * and one that `doctor` reports before it can bite. Add the three narrowings
260
- * that already apply — one turn only, only for skills that declared anything,
261
- * and every read-only tool in the floor — and shipping it off by default would
262
- * just be a second decorative field.
263
- */
264
- toolPolicy: SkillsToolPolicyMode;
265
- /**
266
- * Automatic skill triage (skill-triage-and-unbounded-ask §4.2.9): compute a
267
- * short candidate list for each new task and put it in the system prompt, so
268
- * "is a skill applicable?" becomes a question the protocol forces the model to
269
- * answer rather than one it has to remember to ask.
270
- *
271
- * DEFAULT ON, and OFF must be byte-identical to the pre-feature prompt. That is
272
- * what the block's conditional splice in `buildSystemPrompt` guarantees
273
- * (invariant I-T1) — a permanently-on block would be a prompt change nobody
274
- * could turn off.
275
- */
276
- triage: boolean;
277
- }
278
- export declare const SKILLS_INTEGRITY_MODES: readonly ["off", "warn", "strict"];
279
- export type SkillsIntegrityMode = (typeof SKILLS_INTEGRITY_MODES)[number];
280
- export declare function clampSkillsIntegrity(v: unknown, fallback: SkillsIntegrityMode): SkillsIntegrityMode;
281
- export declare const SKILLS_TOOL_POLICY_MODES: readonly ["off", "warn", "enforce"];
282
- export type SkillsToolPolicyMode = (typeof SKILLS_TOOL_POLICY_MODES)[number];
283
- export declare function isSkillsToolPolicyMode(v: unknown): v is SkillsToolPolicyMode;
284
- export declare function clampSkillsToolPolicy(v: unknown, fallback: SkillsToolPolicyMode): SkillsToolPolicyMode;
285
- export declare const DEFAULT_ALLOWED_SKILL_HOSTS: string[];
286
- export declare const DEFAULT_SKILLS_CONFIG: SkillsConfig;
287
- /**
288
- * THE single gate for every skills-config read AND write (§10.3.1).
289
- *
290
- * Shared by `loadConfig()`, `loadPersistedConfig()` and `updatePersistedConfig()`
291
- * on purpose: hardening only the read path would leave a corrupt value on disk
292
- * that silently reverts to a default on every launch — the failure looks like
293
- * "my setting won't stick" with no error anywhere.
294
- */
295
- export declare function clampSkillsConfig(raw: unknown): SkillsConfig;
296
- /**
297
- * Run-time-only skill switches (§7.5). These come from flags / env and are
298
- * NEVER persisted, which is why they do not live in `SkillsConfig`.
299
- */
300
- export interface SkillsRuntimeOptions {
301
- /** `--skill <name>` ×N — force Level 2 injection for this run only. */
302
- forcedSkills: string[];
303
- /** `--skills-yes` — approve installs for this run only. */
304
- approveAll: boolean;
305
- /**
306
- * `--skill-tool-policy <mode>` — override the ceiling mode for this run.
307
- *
308
- * Sits BETWEEN the session override and the config file (D-G19), not on top of
309
- * everything: the refusal text tells the user to run `/skills policy off`, and
310
- * a flag that outranked that command would make the documented escape hatch a
311
- * no-op with no message to explain it.
312
- */
313
- toolPolicy?: SkillsToolPolicyMode;
314
- }
315
- export declare const DEFAULT_SKILLS_RUNTIME: SkillsRuntimeOptions;
316
- export interface LogConfig {
317
- level: LogLevelName;
318
- /** Whether records reach a file at all. */
319
- toFile: boolean;
320
- /** Absolute log directory; empty string means `<home>/logs`. */
321
- dir: string;
322
- /** Rotate a file once it would exceed this many bytes. */
323
- maxFileBytes: number;
324
- /** Files kept in the log directory; the oldest beyond this are deleted. */
325
- maxFiles: number;
326
- /**
327
- * Run every record through the redaction pipeline. The ONE switch a user can
328
- * flip to put credentials on disk, which is why turning it off prints a
329
- * warning and has no settings-screen entry (§4.3).
330
- */
331
- redactSecrets: boolean;
332
- /** Truncation length for user content at `debug`; `trace` is never truncated. */
333
- previewChars: number;
334
- }
335
- export declare const DEFAULT_LOG_CONFIG: LogConfig;
336
- /**
337
- * THE single gate for every log-config read AND write, exactly like
338
- * `clampSkillsConfig`: hardening only the read path leaves a bad value on disk
339
- * that reverts on every launch, which presents as "my setting won't stick".
340
- *
341
- * `previewChars` uses its own coercion because `coercePositiveInt` rejects `0`,
342
- * and `0` is a legitimate value here — it means "record that content existed,
343
- * but none of it".
344
- */
345
- export declare function clampLogConfig(raw: unknown): LogConfig;
346
- export interface TeamConfig {
347
- /** Register the `task` tool at all. Defaults to TRUE (R-b). */
348
- enabled: boolean;
349
- /** Children per dispatch. Clamped to [1, HARD_MAX_SUBAGENTS] (R-g). */
350
- maxSubagents: number;
351
- /**
352
- * Children in flight at once.
353
- *
354
- * A SEPARATE KNOB FROM `maxSubagents` on purpose (D-6): provider rate limits
355
- * are a different constraint from context economics, and folding them into one
356
- * number makes both wrong. Five simultaneous streams against one API key is a
357
- * reliable way to collect HTTP 429s, each of which lands in the report as a
358
- * failed subagent.
359
- */
360
- maxConcurrent: number;
361
- /**
362
- * The one-shot marker `migrateLegacyTeamFanout` writes (subagent-fanout
363
- * D-3), and NOTHING else may ever write it.
364
- *
365
- * It exists because the fan-out default moved 5/3 -> 8/8 while every save
366
- * materializes the whole section: without a marker, a user who deliberately
367
- * returns to 5/3 is migrated back to 8/8 on the next launch, for ever. Absent
368
- * means "not yet migrated"; it is never written as `false`.
369
- */
370
- fanoutMigrated?: boolean;
371
- /**
372
- * One child's wall clock before its own abort. `0` (the default) means NO
373
- * ceiling: a subagent runs until it finishes or is aborted, exactly like
374
- * the lead, whose only in-run ceiling is the event-silence idle watchdog
375
- * a child already keeps. A wedged child still dies on its OWN watchdog.
376
- *
377
- * WITH `team.overseer` ON (the default) this NEVER aborts anything
378
- * (subagent-overseer-v2 D-4): a positive value is only a COMPATIBILITY
379
- * SOURCE for the supervisor's first cadence check, honouring users who
380
- * already treated it as a trigger point. The only hard abort left is
381
- * the legacy regime (`team.overseer: false`).
382
- */
383
- subagentTimeoutMs: number;
384
- /**
385
- * The whole dispatch's wall clock, and the `task` tool-timeout override.
386
- * `0` (the default) means NO ceiling: the executor override of `0` arms no
387
- * timer (see Core `ToolExecutor`), so the fan-out lasts as long as its
388
- * slowest child and only an Esc ends it early.
389
- */
390
- dispatchTimeoutMs: number;
391
- /**
392
- * Runaway-loop cap: turns one child may take before it is stopped.
393
- * `0` (the default) means NO cap - the same exposure the lead has, and
394
- * the deliberate trade of "subagents as capable as the main agent".
395
- */
396
- maxTurnsPerSubagent: number;
397
- /**
398
- * The dispatch supervisor (team-overseer / subagent-overseer-v2): time
399
- * ceilings on children become inspection triggers for a fast-tier
400
- * supervisor that decides wait / nudge / replace / abandon, instead of
401
- * aborts. Default TRUE.
402
- *
403
- * READ PER DISPATCH. The supervisor ticks on a cadence ladder over every
404
- * live child, and NO timeout is a death sentence while this is on: with
405
- * the fast tier missing a tick degrades to an announced unassisted wait,
406
- * never a kill. With this FALSE, children run exactly the pre-feature
407
- * legacy regime: `subagentTimeoutMs` is a hard abort and silence is the
408
- * child's own watchdog.
409
- */
410
- overseer: boolean;
411
- /**
412
- * Supervisor cadence BASE, in milliseconds (subagent-overseer-v2 D-8).
413
- * `0` (the default) = the structural default
414
- * (`TEAM_LIMITS.overseerDefaultCheckMs`, 300 s).
415
- *
416
- * EFFECTIVE FIRST CHECK, derived read-only and never written back:
417
- * `overseerIntervalMs > 0` wins; otherwise a positive
418
- * `subagentTimeoutMs` is honoured (users who already treated it as a
419
- * trigger point); otherwise the structural default. Later checks grow
420
- * by `overseerCadenceRatio` (1.6), clamped to [60 s, 900 s]. Only
421
- * meaningful while `team.overseer` is true.
422
- */
423
- overseerIntervalMs: number;
424
- /**
425
- * Which model a team child runs on (subagent-model-and-question-controls
426
- * D-2). `'main'` = the lead's own connection - the default and the
427
- * historical parity behavior; `'fast'` = the fast tier, resolved per
428
- * dispatch through `resolveFastTier`; `'profile'` = the entry named by
429
- * `team.modelProfileId`.
430
- *
431
- * A USER-OWNED SETTING, NEVER A TOOL PARAMETER (D-1): `normalizeSubagentSpecs`
432
- * keeps silently dropping a stale `model` key, so the MODEL cannot downgrade
433
- * its own delegation. This key is the one explicit, visible, reversible
434
- * switch the human owns.
435
- */
436
- model: 'main' | 'fast' | 'profile';
437
- /**
438
- * The profile entry a `model: 'profile'` dispatch binds to; `null` = not
439
- * bound. IGNORED by the other modes. Existence is NOT validated here - a
440
- * dangling id degrades to the main model with a disclosed reason at
441
- * resolution time (D-4), so deleting a profile can never break a dispatch.
442
- */
443
- modelProfileId: string | null;
444
- }
445
- /**
446
- * The requirement's ceiling on the fan-out (R-g).
447
- *
448
- * Re-exported from `TEAM_LIMITS` rather than re-spelled, because it is enforced
449
- * in TWO places — here on the config value, and again in
450
- * `normalizeSubagentSpecs` on what the model asked for — and two copies of the
451
- * same 10 is exactly how a hand-edited `config.json` ends up being able to raise
452
- * a ceiling the requirement fixed.
453
- */
454
- export declare const HARD_MAX_SUBAGENTS: 10;
455
- export declare const DEFAULT_TEAM_CONFIG: TeamConfig;
456
- /**
457
- * THE single gate for every team-config read AND write, mirroring
458
- * `clampSkillsConfig` / `clampLogConfig` for the reason those two record:
459
- * hardening only the read path leaves a bad value on disk that reverts to the
460
- * default on every launch, which presents to the user as "my setting won't
461
- * stick".
462
- *
463
- * `maxConcurrent` is additionally capped at `maxSubagents`: a pool wider than
464
- * the population it draws from is not wrong so much as meaningless, and letting
465
- * the two disagree would make the panel's `n/m` readout confusing for no gain.
466
- */
467
- export declare function clampTeamConfig(raw: unknown): TeamConfig;
468
- /**
469
- * The team ceilings cli <= 0.6.16 (7a6bf5630) persisted as its OWN defaults:
470
- * every user who touched team mode back then still carries this exact triple
471
- * in config.json, because `resolveTeamConfig` merges file values verbatim and
472
- * no migration ever rewrote them. They are the kill ceilings behind F-8's
473
- * "first block all failed" dispatches, so loading rewrites them to 0 (= no
474
- * ceiling, the shipped default since 2ff15a9c3).
475
- *
476
- * EXACT-EQUALITY ONLY: a value that differs was a deliberate user choice and
477
- * survives untouched. The price of that test is that a user who hand-types
478
- * 300000 today is migrated to 0 too - the accepted trade, and the safe
479
- * direction (no ceiling, not a cliff).
480
- */
481
- export declare const LEGACY_TEAM_CEILING_DEFAULTS: Readonly<{
482
- subagentTimeoutMs: number;
483
- dispatchTimeoutMs: number;
484
- maxTurnsPerSubagent: number;
485
- }>;
486
- /**
487
- * The `{ key: 0 }` patch for legacy-default-equal ceilings, or `null` when
488
- * nothing matches. Pure on purpose: `loadConfig` decides WHERE the patch is
489
- * applied and persisted; this function only answers WHICH keys match, so the
490
- * equality test lives beside the constants it reads.
491
- */
492
- export declare function legacyTeamCeilingPatch(raw: unknown): Partial<TeamConfig> | null;
493
- /**
494
- * The fan-out defaults cli <= 0.6.x persisted as its OWN defaults
495
- * (subagent-fanout F-2 / R-1).
496
- *
497
- * THE SAME TRAP AS THE CEILINGS ABOVE, ONE SECTION OVER. `mergePersistedConfig`
498
- * writes the WHOLE `team` section on every save, so a user who has ever touched
499
- * any setting carries this exact pair in `config.json` - changing
500
- * `DEFAULT_TEAM_CONFIG` alone would never reach them, and they would keep
501
- * seeing "only 3 subagents at once" for ever.
502
- */
503
- export declare const LEGACY_TEAM_FANOUT_DEFAULTS: {
504
- readonly maxSubagents: 5;
505
- readonly maxConcurrent: 3;
506
- };
507
- /**
508
- * The `{ maxSubagents, maxConcurrent, fanoutMigrated }` patch for the legacy
509
- * default pair, or `null` when nothing matches (subagent-fanout D-3).
510
- *
511
- * EXACT-EQUALITY ONLY, the rule `legacyTeamCeilingPatch` records: a value that
512
- * differs was a deliberate user choice and survives untouched. Two differences
513
- * from that function, both deliberate:
514
- *
515
- * - `fanoutMigrated: true` short-circuits to `null`. That is what makes "the
516
- * user changed their mind and went back to 5/3" stick: without it the next
517
- * launch would migrate them again, every launch, for ever.
518
- * - `maxConcurrent` is allowed to be ABSENT as well as 3, because a
519
- * hand-written section may name only one key and a half-written pair is
520
- * still the legacy intent, not a user decision.
521
- *
522
- * Pure on purpose: `loadConfig` decides WHERE the patch is applied and
523
- * persisted; this function only answers WHICH keys match, so the equality test
524
- * lives beside the constants it reads.
525
- */
526
- export declare function legacyTeamFanoutPatch(raw: unknown): Partial<TeamConfig> | null;
527
- export interface TodoConfig {
528
- /** Register `todo_write` at all. Default TRUE. */
529
- enabled: boolean;
530
- /**
531
- * Render the right rail.
532
- *
533
- * INDEPENDENT OF `enabled` ON PURPOSE (D-16): a screen-reader user wants the
534
- * planning discipline without the column, and the prompt block varies one
535
- * sentence rather than disappearing (§3.7).
536
- */
537
- panel: boolean;
538
- /**
539
- * What happens when a run ends with unfinished steps
540
- * (todo-plan-followthrough §4.1). Default `'notify'`, which reproduces round
541
- * 1's behaviour byte for byte.
542
- *
543
- * THE THIRD SCALAR, and it stays a scalar for the reason the section header
544
- * above gives: `store.ts` merges this section BY HAND, and both of its merges
545
- * spread the whole object (`{ ...DEFAULT_CONFIG.todo, ...(partial.todo ?? {}) }`
546
- * and `{ ...current.todo, ...(patch.todo ?? {}) }`), so a third scalar key is
547
- * carried automatically and needs no change there. A NESTED field would not
548
- * be, and would mean replacing both merges first.
549
- */
550
- followThrough: FollowThroughMode;
551
- /**
552
- * Must a plan also declare acceptance criteria, and does the UI show them
553
- * (todo-acceptance-criteria §6.8.1). Default TRUE.
554
- *
555
- * THE FOURTH SCALAR, and it is a scalar for exactly the reason above: both
556
- * hand-written merges in `config/store.ts` spread the whole `todo` object, so a
557
- * new scalar key flows through them automatically. `clampTodoConfig` below is the
558
- * only other place that has to know about it - a value that is missing THERE
559
- * would silently keep the default and make `--no-todo-acceptance` look broken.
560
- */
561
- acceptance: boolean;
562
- }
563
- export declare const DEFAULT_TODO_CONFIG: TodoConfig;
564
- /**
565
- * THE single gate for every todo-config read AND write, mirroring
566
- * `clampSkillsConfig` / `clampLogConfig` / `clampTeamConfig` for the reason
567
- * those record: hardening only the read path leaves a bad value on disk that
568
- * reverts to the default on every launch, which presents to the user as "my
569
- * setting won't stick".
570
- */
571
- export declare function clampTodoConfig(raw: unknown): TodoConfig;
572
- export interface RetryConfig {
573
- /**
574
- * The user's switch. KEPT SEPARATE FROM `maxRetries: 0` on purpose: `enabled`
575
- * survives round-tripping through the settings screen, while `maxRetries: 0` is
576
- * what `toRetryPolicy` produces from it. Folding them would make
577
- * `/retry off; /retry on` forget the user's chosen count.
578
- */
579
- enabled: boolean;
580
- /** Retries AFTER the initial attempt. `0` is the kill switch, not a typo. */
581
- maxRetries: number;
582
- initialDelayMs: number;
583
- maxDelayMs: number;
584
- /** Growth factor. THE ONLY FLOAT KEY in this section. */
585
- multiplier: number;
586
- jitter: boolean;
587
- respectRetryAfter: boolean;
588
- /** Wall-clock budget from the first failure of one request. */
589
- maxElapsedMs: number;
590
- /** Allow a restart after content has already streamed to the transcript. */
591
- onPartialStream: boolean;
592
- }
593
- export declare const DEFAULT_RETRY_CONFIG: RetryConfig;
594
- /**
595
- * `hardMaxRetries` re-exported rather than re-spelled, for the reason
596
- * `HARD_MAX_SUBAGENTS` records: the ceiling is enforced in TWO places — here on
597
- * the config value, and again by `normalizePolicy` inside the engine — and two
598
- * copies of the same 20 is exactly how a hand-edited `config.json` ends up able
599
- * to raise a ceiling the mechanism fixed.
600
- */
601
- export declare const HARD_MAX_RETRIES: 20;
602
- /**
603
- * THE single gate for every retry-config read AND write, mirroring
604
- * `clampSkillsConfig` / `clampLogConfig` / `clampTeamConfig` / `clampTodoConfig`
605
- * for the reason those record: hardening only the read path leaves a bad value on
606
- * disk that reverts to the default on every launch, which presents to the user as
607
- * "my setting won't stick".
608
- *
609
- * Three invariants live inside the gate:
610
- *
611
- * - `maxDelayMs = max(maxDelayMs, initialDelayMs)` — a ceiling under the floor
612
- * makes the ladder a flat line and the countdown a lie.
613
- * - `multiplier` goes through `clampNumber`, not `clampInt`: `2.5` is a
614
- * legitimate factor and `coercePositiveInt` would floor it to 2.
615
- * - `maxRetries` goes through `clampIntAllowingZero`. THIS IS THE ONE THAT SHIPS
616
- * BROKEN WITHOUT IT (R-16): `clampInt` returns the fallback for `n <= 0`, so
617
- * `clampRetryConfig({ maxRetries: 0 })` would yield 10 — the maximum instead
618
- * of the minimum, silently, for the key that gates the whole feature.
619
- *
620
- * `maxElapsedMs` intentionally keeps plain `clampInt`: its floor is 10 000, so it
621
- * has no `0` to express.
622
- */
623
- export declare function clampRetryConfig(raw: unknown): RetryConfig;
624
- /**
625
- * `RetryConfig` (user intent) -> `RetryPolicy` (engine policy), or `null` for
626
- * "the user said no".
627
- *
628
- * `null` rather than a policy with `maxRetries: 0` because `ProviderRegistry`
629
- * short-circuits on a null policy and returns the adapter's iterator DIRECTLY —
630
- * an opted-out session is then allocation-identical to a pre-feature build.
631
- *
632
- * TOTAL, AND IT ACCEPTS A MISSING SECTION. `loadConfig` always supplies one, but
633
- * a `CliConfig` built by hand — every controller test in this package does exactly
634
- * that, and so would an embedder — legitimately omits it, and a `TypeError` from a
635
- * pure translation function is the wrong way to find out. Routing through
636
- * `clampRetryConfig` also means an out-of-range hand-built value can never reach
637
- * the engine, which is the same "one gate, both directions" rule every other
638
- * section in this file follows.
639
- */
640
- export declare function toRetryPolicy(cfg: RetryConfig | undefined): RetryPolicy | null;
641
- export interface FastConfig {
642
- /**
643
- * Resolve the tier at all. Defaults to FALSE (R-d).
644
- *
645
- * OFF IS BYTE-IDENTICAL (I-2): with this false the system prompt, `task`'s
646
- * schema, the tool array, the transcript, the status bar and the request
647
- * payloads are exactly what a pre-feature build produces.
648
- */
649
- enabled: boolean;
650
- /** `''` INHERITS the main provider — what makes `fast.model` alone a complete
651
- * configuration for the common "same vendor, cheaper model" case. */
652
- provider: string;
653
- /** The fast model id. Empty means NOT CONFIGURED, never "same as main": that
654
- * distinction is what keeps R-e (opt in to fast == main) from being
655
- * indistinguishable from a typo (D-4). */
656
- model: string;
657
- /** `''` inherits only when the provider matches — a base URL belongs to one
658
- * API, so a fast tier on a different vendor must not borrow it. */
659
- baseUrl: string;
660
- /** Applied to fast-tier children and to the review call. Defaults to `'off'`:
661
- * a "fast" model asked to think for 32 768 tokens is not fast (D-13). */
662
- thinkingLevel: ThinkingLevel;
663
- /** Run the periodic asynchronous review. */
664
- review: boolean;
665
- /** Completed turns between reviews. */
666
- reviewEveryTurns: number;
667
- /** Turn frames included in one digest. */
668
- reviewContextTurns: number;
669
- /** Ceiling on an injected critique, in characters. */
670
- reviewMaxChars: number;
671
- /**
672
- * Reviews STARTED per session, across all runs (fast-model-tier-hardening
673
- * §4.1 / W1).
674
- *
675
- * The one bound on spend the user never asked for. `reviewEveryTurns`
676
- * controls the PACE; this controls the TOTAL — and the two are different
677
- * questions, because a session is not one run. `reviewsThisRun` is reset by
678
- * every user message, so thirty messages buys thirty runs' worth of reviews
679
- * with nothing counting across them.
680
- *
681
- * DENOMINATED IN REVIEWS, NOT CURRENCY (D-H1). The fast tier is by
682
- * construction the likeliest place in the product to name a model the static
683
- * cost table has never seen, and `buildRuntimeModel` prices exactly those at
684
- * zero (C-11) — so a dollar budget would silently never trigger for the
685
- * configuration that most needs it. A count is exact for every model, and
686
- * because per-review cost is already bounded on both sides (a 4 000-char
687
- * digest in, 512 tokens out), `count x bound` is an honest ceiling.
688
- */
689
- reviewMaxPerSession: number;
690
- }
691
- export declare const DEFAULT_FAST_CONFIG: FastConfig;
692
- /**
693
- * THE single gate for every fast-config read AND write, mirroring
694
- * `clampSkillsConfig` / `clampLogConfig` / `clampTeamConfig` / `clampTodoConfig`
695
- * for the reason those four record: hardening only the read path leaves a bad
696
- * value on disk that reverts to the default on every launch, which presents to
697
- * the user as "my setting won't stick".
698
- *
699
- * `provider` is CLAMPED TO `''` rather than rejected when it names something
700
- * with no adapter. `''` means "inherit the main provider", which is the safe
701
- * reading of a typo — and `resolveFastTier` reports `no_adapter` for the case a
702
- * user really did configure a dead vendor as the MAIN one.
703
- */
704
- export declare function clampFastConfig(raw: unknown): FastConfig;
705
- /** `auto` installs; `notify` only reports; `off` disables the subsystem. */
706
- export declare const UPDATE_MODES: readonly ["auto", "notify", "off"];
707
- export type UpdateMode = (typeof UPDATE_MODES)[number];
708
- export declare function isUpdateMode(v: unknown): v is UpdateMode;
709
- export interface UpdateConfig {
710
- /**
711
- * Whether the updater installs, merely reports, or does nothing at all.
712
- *
713
- * DEFAULTS TO `'auto'`, and that is a PRODUCT decision rather than a technical
714
- * one: this CLI's users are overwhelmingly on a stale version they did not
715
- * choose. The trade it makes — a wider supply-chain window in exchange for
716
- * users who are actually on the current release — is stated plainly in the
717
- * README (R-1), and `'off'` plus `ARAGON_UPDATE=0` are the documented kill
718
- * switches.
719
- */
720
- mode: UpdateMode;
721
- /** Minimum wall-clock between registry checks, MACHINE-WIDE (§3.7). */
722
- checkIntervalMs: number;
723
- /** `''` = derive: `ARAGON_UPDATE_REGISTRY` › `npm_config_registry` › npmjs. */
724
- registry: string;
725
- /** The dist-tag to track. */
726
- distTag: string;
727
- }
728
- export declare const DEFAULT_UPDATE_CONFIG: UpdateConfig;
729
- /**
730
- * THE single gate for every update-config read AND write, mirroring
731
- * `clampSkillsConfig` / `clampLogConfig` / `clampTeamConfig` / `clampTodoConfig`
732
- * / `clampRetryConfig` / `clampFastConfig` for the reason all six record:
733
- * hardening only the read path leaves a bad value on disk that reverts to the
734
- * default on every launch, which presents to the user as "my setting won't
735
- * stick".
736
- *
737
- * `registry` is CLAMPED TO `''` rather than rejected when it is not an
738
- * `http(s):` URL. `''` means "derive it" (§3.3), which is the safe reading of a
739
- * typo — the alternative is a background timer that throws on a value the user
740
- * cannot see it reading.
741
- */
742
- export declare function clampUpdateConfig(raw: unknown): UpdateConfig;
743
- export type CompactionFailureMode = 'truncate' | 'stop';
744
- export interface CompactionConfig {
745
- /**
746
- * Whether a `ContextManager` is constructed at all. Default TRUE.
747
- *
748
- * THE ONLY KEY IN THIS SECTION THAT DEFAULTS ON, AND THE ONLY ONE READ ONCE AT
749
- * CONSTRUCTION — the `team.enabled` / `todo.enabled` / `fast.enabled` rule.
750
- *
751
- * IT DEFAULTS TO `true` UNLIKE EVERY OTHER OPTIONAL SUBSYSTEM HERE, and that is
752
- * deliberate (D-16): `fast.enabled` and `team.enabled` default off because they
753
- * ADD behaviour the user did not ask for. This one REMOVES a failure the user
754
- * did not ask for — without it, the answer to a full context window is a dead
755
- * run. Byte-identity is still honoured: `--no-compaction` constructs no
756
- * manager, subscribes nothing, allocates no registry, and leaves the engine
757
- * loop with `ctx.contextManager === undefined`.
758
- */
759
- enabled: boolean;
760
- /** Occupancy ratio that triggers compaction. Read LIVE. */
761
- threshold: number;
762
- /**
763
- * Where the status-bar gauge turns amber.
764
- *
765
- * CLAMPED JOINTLY WITH `threshold`, AND THE ORDER IS FIXED — see
766
- * `clampCompactionConfig`. "Jointly" is not an instruction.
767
- */
768
- warnThreshold: number;
769
- /** Complete turns kept verbatim in the tail. Read LIVE. */
770
- keepRecentTurns: number;
771
- /**
772
- * Summarize with the fast tier when it resolves. Default TRUE.
773
- *
774
- * A PREFERENCE, NOT THE COMMON PATH (P2-8). `resolveFastTier` returns
775
- * `{ok:false, reason:'disabled'}` on `fast.enabled !== true` alone, and
776
- * `fast.enabled` defaults to `false` — so out of the box the summarizer is the
777
- * SESSION'S OWN MODEL, and the first compaction is a ~30 k-token call on it.
778
- */
779
- useFastTier: boolean;
780
- /** Legacy truncate remains readable; all failures now preserve history. */
781
- onFailure: CompactionFailureMode;
782
- /**
783
- * Give `task` children their own compaction
784
- * (context-auto-compaction-hardening §3.4 / W3). Default TRUE.
785
- *
786
- * IT REVERSES D-15, WHOSE PREMISE IS MEASURABLY FALSE at the configured bounds:
787
- * D-15 measured `team.maxTurnsPerSubagent` 24 and `team.dispatchTimeoutMs`
788
- * 900 000, where 24 turns over fifteen minutes is already the same profile
789
- * as the lead run this feature exists for — and the parity defaults of
790
- * 2ff15a9c3 later removed both ceilings (0 = no turn cap, no wall clock),
791
- * which makes the premise falser still, not truer. When a child overflows
792
- * today its history is discarded and the lead receives one partial sentence
793
- * for the whole dispatch.
794
- *
795
- * `false` REPRODUCES ROUND 1 EXACTLY: `subagent.ts` spreads no `contextManager`
796
- * key at all, so the child's loop gate tests an absent field.
797
- */
798
- subagents: boolean;
799
- /**
800
- * Write the dropped messages to `<home>/compaction/` before adopting a splice
801
- * (context-auto-compaction-hardening §3.5 / W4). Default TRUE.
802
- *
803
- * NOT UNDO (§12): restoring an over-full history restores the condition that
804
- * triggered the compaction. This is fidelity on disk, so "the summary is wrong
805
- * and the agent proceeded on a false record" becomes something a human can
806
- * check rather than something they must accept.
807
- */
808
- archive: boolean;
809
- }
810
- export declare const DEFAULT_COMPACTION_CONFIG: CompactionConfig;
811
- /**
812
- * THE single gate for every compaction-config read AND write, mirroring the six
813
- * clamps above for the reason all of them record: hardening only the read path
814
- * leaves a bad value on disk that reverts to the default on every launch, which
815
- * presents to the user as "my setting won't stick".
816
- *
817
- * THE ORDER IS FIXED AND IT MATTERS (§4.2 / P2-5). `threshold` is clamped to
818
- * `[0.5, 0.95]` FIRST, then `warnThreshold` to
819
- * `[0.4, clampedThreshold - 0.05]`. The other order lets a file holding
820
- * `{threshold: 0.6, warnThreshold: 0.9}` produce a warn mark ABOVE the trigger —
821
- * a gauge that turns amber after it has already gone red. Both bounds of the
822
- * second range stay reachable at the extremes: `threshold` floored at `0.5`
823
- * gives `warnThreshold` a range of `[0.4, 0.45]`.
824
- */
825
- export declare function clampCompactionConfig(raw: unknown): CompactionConfig;
826
- export interface BashConfig {
827
- /**
828
- * Register `bash_output` / `bash_kill`, honour `background`, splice the prompt
829
- * block, render the chip. Default TRUE.
830
- *
831
- * READ ONCE AT CONSTRUCTION, the `team.enabled` / `todo.enabled` /
832
- * `fast.enabled` rule.
833
- *
834
- * IT GOVERNS *SERVICES*, NEVER *INTERRUPTIBILITY* (I-2 / D-9). `Esc`/`Esc`,
835
- * the foreground child registry and `forceStop()` are unconditional, because
836
- * "bash always settles" and "Esc twice always works" are promised
837
- * unconditionally — a user who turned background services off has not asked
838
- * for a less interruptible agent.
839
- */
840
- background: boolean;
841
- /**
842
- * Let the classifier decide when the model did not say. Default TRUE.
843
- *
844
- * RESOLVES TO `false` WITHOUT AN INTERACTIVE VIEW (D-15 / P1-8), and that is
845
- * decided at the tool layer rather than here: the value on disk is the user's
846
- * preference, and headless has no card, no `/bg` and no user to keep a service
847
- * alive, so the rescue would be a surprise instead. An explicit
848
- * `background: true` is still honoured there — that one the model asked for.
849
- */
850
- autoBackground: boolean;
851
- /** How long a background launch may block the turn before returning. */
852
- startupSettleMs: number;
853
- /** How long a service may stay `starting` before it is called `running`. */
854
- readyTimeoutMs: number;
855
- }
856
- export declare const DEFAULT_BASH_CONFIG: BashConfig;
857
- /**
858
- * THE single gate for every bash-config read AND write, mirroring
859
- * `clampSkillsConfig` / `clampLogConfig` / `clampTeamConfig` / `clampTodoConfig`
860
- * for the reason those record: hardening only the read path leaves a bad value
861
- * on disk that reverts to the default on every launch, which presents to the
862
- * user as "my setting won't stick".
863
- *
864
- * CLAMPED, NEVER REJECTED — the discipline every other key in this file follows.
865
- * A garbage `startupSettleMs` resolves to 4000 and throws nothing.
866
- */
867
- export declare function clampBashConfig(raw: unknown): BashConfig;
868
- export interface JobsConfig {
869
- /**
870
- * Register `job_wait` / `job_list`, splice the `<background_jobs>` block,
871
- * mirror job logs. Default TRUE.
872
- *
873
- * READ ONCE AT CONSTRUCTION, the `bash.background` / `team.enabled` rule. Its
874
- * job is to be the single switch under which the tool array, the tool
875
- * descriptions and the system prompt are BYTE-IDENTICAL to the pre-feature
876
- * build (I-3) - which is why it is a registration switch and not a behaviour
877
- * flag.
878
- */
879
- enabled: boolean;
880
- /**
881
- * Seconds one `job_wait` blocks by default. Default 30, range 5..1200.
882
- *
883
- * NOT CONVERGED AGAINST `toolTimeoutMs` ANY MORE (extended-job-wait I-4'): the
884
- * executor gives `job_wait` its own ceiling and the idle watchdog is paused for
885
- * the whole wait, so a long default no longer risks `Command timed out`.
886
- */
887
- waitSeconds: number;
888
- /**
889
- * Seconds without output before a job is reported `[stalled]`. Default 300,
890
- * range 30..3600.
891
- *
892
- * A REPORT, NEVER AN ACTION: nothing kills or retries on this (R-13). The
893
- * default is deliberately generous, because a training epoch that prints every
894
- * five minutes is healthy.
895
- */
896
- stallSeconds: number;
897
- /**
898
- * Mirror each job's full output to `<home>/jobs/<session>/<id>.log`. Default
899
- * TRUE; `false` creates no directory at all, for privacy- or IO-sensitive
900
- * environments (D-6).
901
- */
902
- persistLog: boolean;
903
- /**
904
- * Whether a completion notice may STEER the running turn. Default TRUE.
905
- *
906
- * NOT A NOTICE SWITCH (§6.5). With this off, notices still arrive at the end of
907
- * the next tool result and before the next user turn; only the active
908
- * interruption stops. Turning notifications off entirely would require running
909
- * no jobs.
910
- */
911
- noticeSteer: boolean;
912
- }
913
- export declare const DEFAULT_JOBS_CONFIG: JobsConfig;
914
- /**
915
- * THE single gate for every `jobs` read AND write, mirroring `clampBashConfig`
916
- * and the four sections before it.
917
- *
918
- * THE ELEVENTH SECTION, AND THE FIRST ONE THAT `config set` CAN REACH BY
919
- * NESTED KEY (§6.5). Every key is a SCALAR and the section is ONE level deep,
920
- * because `runConfigGet` splits on a single dot - a `jobs.mirror.enabled` would
921
- * resolve to `undefined` and the setting would silently never apply.
922
- */
923
- export declare function clampJobsConfig(raw: unknown): JobsConfig;
924
- /**
925
- * The quick-prompt library's three POLICY scalars (quick-prompt-library D-19).
926
- *
927
- * THE LIBRARY ITSELF IS NOT HERE (D-3). Two hundred prompts with bodies is user
928
- * content that grows with usage, and `ui-state.ts:5-13` already wrote the rule:
929
- * anything carrying user content opens its own file. `config.json` holds the three
930
- * decisions that are about BEHAVIOUR - whether the key exists, what a fill does to
931
- * a non-empty draft, and whether the header teaches the key.
932
- *
933
- * ONE LEVEL DEEP, like every section beside it: `runConfigGet` splits on a single
934
- * dot, so `prompts.hint` resolves and `prompts.some.nested` would not.
935
- */
936
- export interface PromptsConfig {
937
- /**
938
- * `false` stops `Ctrl+P` and the header hint; `/prompts` STAYS REGISTERED and
939
- * reports that the feature is off (D-19 / AC-30). Removing the command as well
940
- * would leave the one surface that can explain the switch unable to run.
941
- */
942
- enabled: boolean;
943
- /**
944
- * What a fill does to a draft that already has text in it (D-6).
945
- * `insert` keeps the user's words; `replace` overwrites them.
946
- */
947
- insertMode: 'insert' | 'replace';
948
- }
949
- export declare const DEFAULT_PROMPTS_CONFIG: PromptsConfig;
950
- /**
951
- * THE single gate for every `prompts` read AND write, like the eleven sections
952
- * above it.
953
- *
954
- * An unrecognized `insertMode` falls back to `insert` rather than to `replace`,
955
- * and that direction is deliberate: a typo must never silently start DISCARDING
956
- * what the user has already typed into the composer.
957
- */
958
- export declare function clampPromptsConfig(raw: unknown): PromptsConfig;
959
- /**
960
- * The task label's two switches (tui-shortcut-drawer-and-task-summary §4.8).
961
- *
962
- * ONE LEVEL DEEP, like every section beside it: `runConfigGet` splits on a single
963
- * dot, so `taskSummary.enabled` resolves and a nested key would not (F-18).
964
- *
965
- * NEITHER KEY IS ABOUT THE LABEL'S CONTENT. `enabled` is the kill switch: off
966
- * means no call is made and no cell is drawn. `fallback` decides what happens when
967
- * the call cannot produce a label - the deterministic verbatim-prefix floor, or
968
- * nothing at all. Both are BEHAVIOUR, which is why they are here rather than in
969
- * `fast/limits.ts` (F-13).
970
- */
971
- export interface TaskSummaryConfig {
972
- /** The kill switch. `false` removes the header cell and the automatic call. */
973
- enabled: boolean;
974
- /** The deterministic verbatim-prefix floor (D-9). `false` = show nothing instead. */
975
- fallback: boolean;
976
- }
977
- export declare const DEFAULT_TASK_SUMMARY_CONFIG: TaskSummaryConfig;
978
- /**
979
- * THE single gate for every `taskSummary` read AND write, like the twelve sections
980
- * above it.
981
- *
982
- * BOTH DEFAULTS ARE `true`, AND THE DIRECTION MATTERS: a corrupt or hand-edited
983
- * section must not silently switch off a feature the user asked for, and - more
984
- * importantly - it must not switch off the FLOOR, which is the only thing standing
985
- * between a failed call and an empty header cell.
986
- */
987
- export declare function clampTaskSummaryConfig(raw: unknown): TaskSummaryConfig;
988
- /**
989
- * Parse `0.9`, `90%` or `90` into a ratio, or `null` when it is neither.
990
- *
991
- * `null` RATHER THAN A CLAMPED DEFAULT, because this is a COMMAND argument and
992
- * not a config value: `/compact threshold banana` must say so rather than
993
- * silently setting 0.9 and reporting success.
994
- */
995
- export declare function parseThresholdInput(raw: string): number | null;
996
- export interface PersistedConfig {
997
- modelProfiles?: import('./model-profiles.js').ModelProfilesConfig;
998
- version: number;
999
- provider: string;
1000
- model: string;
1001
- baseUrl: string | null;
1002
- thinkingLevel: ThinkingLevel;
1003
- /**
1004
- * Whether the terminal DRAWS the reasoning that came back
1005
- * (agent-activity-presentation §4.1).
1006
- *
1007
- * ADJACENT TO `thinkingLevel` AND DELIBERATELY NAMED DIFFERENTLY: that key is
1008
- * the effort the provider is asked to SPEND, this one is whether the transcript
1009
- * shows it. They are one word apart in the config file and must never be
1010
- * confused, which is why the flag is `--show-thinking` rather than the shorter
1011
- * `--thinking` the existing key already resembles.
1012
- */
1013
- showThinking: boolean;
1014
- /**
1015
- * Whether a RUNNING tool card draws a bounded tail of its live output
1016
- * (agent-activity-presentation-live §4.1).
1017
- *
1018
- * DEFAULT `true`, unlike `showThinking` next door (D-28). That key hides
1019
- * information by default because reasoning is noise most of the time; this one
1020
- * ADDS the information the requirement asks for, and its cost is bounded by
1021
- * construction -- eight rows per call, sixteen calls, whatever the command
1022
- * emits. It exists as a KILL SWITCH, not as an opt-in: "a build's output
1023
- * redraws the transcript" is exactly the kind of change a user on a slow SSH
1024
- * link may want off.
1025
- */
1026
- liveToolOutput: boolean;
1027
- /**
1028
- * Output token cap.
1029
- *
1030
- * a number — an explicit cap, clamped to `[256, 200000]` on the way in AND
1031
- * on the way out, then clamped again at request time down to the
1032
- * target model's real ceiling when that ceiling is lower.
1033
- * `null` — AUTO: use each model's own ceiling, never above 64000.
1034
- * absent — the product default, 64000.
1035
- *
1036
- * `null` MEANS AUTO. It used to resolve to 64000 by accident (`pick()` skips
1037
- * `null`), which left the user no way to express "let the model decide".
1038
- */
1039
- maxTokens: number | null;
1040
- /**
1041
- * The context window to measure occupancy against, or `null` for AUTO
1042
- * (context-usage-gauge-accuracy §3.6).
1043
- *
1044
- * `null` MEANS AUTO - the model table's window, or `buildRuntimeModel`'s 128k
1045
- * placeholder for a model the table has never seen. It exists because that
1046
- * placeholder is a FABRICATED denominator: on a custom `baseUrl` or an
1047
- * unlisted model id the gauge is a percentage of a number nobody supplied, and
1048
- * before this key there was no way to correct it. Setting it also removes the
1049
- * `?` marker from the absolute pair (I-6).
1050
- */
1051
- contextWindow: number | null;
1052
- theme: ThemeName;
1053
- /** Replace spinners with a static glyph for calmer, low-motion output. */
1054
- reducedMotion: boolean;
1055
- /** Full-screen TUI (still subject to the automatic downgrades in §4.1). */
1056
- /** Replay a plain-text session summary after leaving the alternate screen. */
1057
- exitTranscript: boolean;
1058
- /** Entries reachable by scrolling; older ones show the "collapsed" line (I-3). */
1059
- transcriptWindow: number;
1060
- /** Entries kept in `ViewState`; older ones are dropped and counted (L1). */
1061
- transcriptRetain: number;
1062
- /** Adaptive coalescing under load (L4). */
1063
- renderGovernor: boolean;
1064
- /** Ceiling of the governor ladder in ms; `33` flattens it (L4). */
1065
- maxRenderIntervalMs: number;
1066
- /** Repaint only the frame rows that changed (tui-input-flicker-fix §5.1). */
1067
- diffRender: boolean;
1068
- /** Native terminal scrolling vs the full-screen app layout (tui-native-terminal-scroll D1). */
1069
- scrollMode: ScrollMode;
1070
- /** Wrap each repaint batch in DEC 2026 synchronized update (§5.1). */
1071
- syncOutput: boolean;
1072
- confirmTools: boolean;
1073
- toolTimeoutMs: number;
1074
- idleTimeoutMs: number;
1075
- /** provider -> key. Masked in the UI; the file is written 0600 on POSIX. */
1076
- apiKeys: Record<string, string | null>;
1077
- /**
1078
- * Record submitted prompts to `<home>/prompt-history.jsonl` at all (D-9).
1079
- *
1080
- * A real preference, and the reason it belongs here rather than in
1081
- * `state.json`: the user declares it, and switching it off is a decision they
1082
- * expect to survive. Command-line only, like `log.redactSecrets` — there is
1083
- * no settings-screen entry, because it is set once and then forgotten.
1084
- */
1085
- historyEnabled: boolean;
1086
- /** Entry spacing: `comfortable` keeps a blank line at turn boundaries (§4.3). */
1087
- density: DensityMode;
1088
- /** Show the composer hint row at all. */
1089
- hints: boolean;
1090
- /**
1091
- * Enable SGR mouse reporting in full-screen mode so the wheel scrolls the
1092
- * transcript, whatever row the pointer is on (wheel-scrolls-transcript-only
1093
- * §4.1).
1094
- *
1095
- * A plain boolean: persisted values and per-run overrides use the same meaning.
1096
- */
1097
- mouse: boolean;
1098
- /**
1099
- * Drag-select + copy in full-screen mode (tui-selection-and-scroll-follow
1100
- * §6.1). Ignored when `mouse` is false; also decides whether `?1002h` is
1101
- * written at all, so `false` is byte-identical to a pre-feature session.
1102
- */
1103
- mouseSelect: boolean;
1104
- /**
1105
- * Recognise pasted text and collapse a large paste into a placeholder
1106
- * (tui-paste-handling D-10 / section 7.3).
1107
- *
1108
- * A PLAIN BOOLEAN and the ONLY user-facing key this feature adds: the collapse
1109
- * threshold and every size bound are structural and live in `input/limits.ts`
1110
- * / `ui/composer-limits.ts`. A tunable threshold is a preference nobody has
1111
- * asked for; a kill switch is what a bug report needs.
1112
- */
1113
- paste: boolean;
1114
- /**
1115
- * Ask the terminal to report modified keys distinctly so Shift+Enter can
1116
- * insert a newline (win32-input-mode on Windows, kitty disambiguate +
1117
- * modifyOtherKeys elsewhere). A KILL SWITCH in the exact sense `paste`
1118
- * above records: the encoding tables are structural and live in
1119
- * `input/win32-input-mode.ts` / `input/csiu-keys.ts`.
1120
- */
1121
- keyboardEnhancement: boolean;
1122
- /** Idle ms before a paused viewport returns to the newest line; `0` disables. */
1123
- scrollResumeMs: number;
1124
- /** Start every session in PLAN mode (plan-mode §4.4). */
1125
- planModeDefault: boolean;
1126
- /** Ceiling on a single human wait in ms; clamped to [60_000, 7_200_000]. */
1127
- planModeHumanTimeoutMs: number;
1128
- /** Skill system settings. The SECOND nested object in this file after apiKeys. */
1129
- skills: SkillsConfig;
1130
- /** Logging settings. The THIRD nested object; scalars only (see LogConfig). */
1131
- log: LogConfig;
1132
- /** Team mode. The FOURTH nested object; scalars only (see TeamConfig). */
1133
- team: TeamConfig;
1134
- /** Todo planning. The FIFTH nested object; scalars only (see TodoConfig). */
1135
- todo: TodoConfig;
1136
- /** API retry. The SIXTH nested object; scalars only (see RetryConfig). */
1137
- retry: RetryConfig;
1138
- /** Fast model tier. The SEVENTH nested object; scalars only (see FastConfig). */
1139
- fast: FastConfig;
1140
- /** Auto-update. The EIGHTH nested object; scalars only (see UpdateConfig). */
1141
- update: UpdateConfig;
1142
- /** Context compaction. The NINTH nested object; scalars only (see CompactionConfig). */
1143
- compaction: CompactionConfig;
1144
- /** Background services. The TENTH nested object; scalars only (see BashConfig). */
1145
- bash: BashConfig;
1146
- /** Background jobs and bounded waiting. The ELEVENTH; scalars only (see JobsConfig). */
1147
- jobs: JobsConfig;
1148
- /** Quick prompts. The TWELFTH; two scalars (see PromptsConfig). */
1149
- prompts: PromptsConfig;
1150
- /** The header task label. The THIRTEENTH; two scalars (see TaskSummaryConfig). */
1151
- taskSummary: TaskSummaryConfig;
1152
- /** Governance mode. The FOURTEENTH; scalars only (see GovernanceConfig). */
1153
- governance: GovernanceConfig;
1154
- }
1155
- export declare const DEFAULT_CONFIG: PersistedConfig;
1156
- /**
1157
- * Runtime state that used to be stored in `config.json` by mistake
1158
- * (config-state-separation §4.5). Each one now lives in its own file:
1159
- * `promptHistory` → `prompt-history.jsonl`, `submitCount` / `mouseNoticeSeen`
1160
- * → `state.json`, and `recentModels` was dead — nothing ever wrote it.
1161
- */
1162
- export declare const LEGACY_STATE_KEYS: readonly ["promptHistory", "submitCount", "mouseNoticeSeen", "recentModels"];
1163
- /**
1164
- * THE single gate that keeps those keys out of `config.json`, and the one thing
1165
- * in this change that cannot be skipped.
1166
- *
1167
- * `loadPersistedConfig()` merges `{ ...DEFAULT_CONFIG, ...partial }` where
1168
- * `partial` is the raw parse of whatever is on disk. Removing the fields from
1169
- * the interface therefore removes NOTHING from the file: the keys ride through
1170
- * the spread and `updatePersistedConfig` writes them straight back. The user
1171
- * deletes `promptHistory` by hand and watches it grow back.
1172
- *
1173
- * Applied on the READ side on purpose, which is what makes it self-healing:
1174
- * every write goes read-strip-merge-write, so a hand-edited file, a downgrade
1175
- * to 0.5.x and back, or a half-finished migration all converge on a clean file
1176
- * at the next write. Same shape as `clampSkillsConfig` / `clampLogConfig` —
1177
- * one door for both directions.
1178
- */
1179
- export declare function stripLegacyStateKeys<T extends object>(raw: T): T;
1180
- /**
1181
- * Config keys whose MEANING was removed, mapped to the explanation a user gets if
1182
- * they still try to set one.
1183
- *
1184
- * SEPARATE FROM `LEGACY_STATE_KEYS`, because the disposition differs: those keys'
1185
- * values were MOVED somewhere else, while these have nowhere to go — the feature
1186
- * they configured no longer exists. Merging the two lists would erase that
1187
- * difference at exactly the moment someone is reading the file to find out what
1188
- * happened to their setting.
1189
- *
1190
- * Stripped on the READ side for the same reason `stripLegacyStateKeys` is:
1191
- * `loadPersistedConfig()` merges `{ ...DEFAULT_CONFIG, ...partial }`, so a key
1192
- * left on disk rides that spread into memory and `updatePersistedConfig` writes it
1193
- * straight back. The user deletes the line, launches once, and watches it return.
1194
- */
1195
- export declare const RETIRED_CONFIG_KEYS: Readonly<Record<string, string>>;
1196
- /**
1197
- * THE single gate that keeps retired keys out of `config.json`. Applied on the
1198
- * read side, so it is self-healing: every write is read-strip-merge-write, and a
1199
- * hand-edited file, a downgrade to an older CLI and back, or a half-finished
1200
- * migration all converge on a clean file at the next write.
1201
- */
1202
- export declare function stripRetiredConfigKeys<T extends object>(raw: T): T;
1203
- export interface CliConfig {
1204
- /** A committed model snapshot failed to apply; no further requests may start. */
1205
- modelSettingsRestartRequired?: boolean;
1206
- modelProfiles?: import('./model-profiles.js').ModelProfilesConfig;
1207
- modelProfileState?: import('./model-profiles.js').ModelProfilesRuntime;
1208
- /**
1209
- * The SESSION kit (agent-model-kits D-5 / §7.2). RUNTIME-ONLY.
1210
- *
1211
- * IT IS NOT IN `PersistedConfig` AND IT NEVER WILL BE (I-5 / I-14): `ctrl+K`
1212
- * and `/kit use` promise "this session only", and that promise is worth more
1213
- * than a saved convenience - it is what makes "one keystroke changed my
1214
- * defaults" structurally impossible rather than merely unlikely.
1215
- *
1216
- * `held` is the only fact worth storing: WHICH slots still belong to the kit.
1217
- * The bindings are derivable, and a stored copy of them would be a second
1218
- * truth (I-7: every held slot must have been written into the live config).
1219
- */
1220
- sessionKit?: {
1221
- id: string;
1222
- held: import('./model-kits.js').KitSlot[];
1223
- };
1224
- apiKeyOverrideTarget?: {
1225
- provider: string;
1226
- baseUrl: string | null;
1227
- };
1228
- provider: string;
1229
- model: string;
1230
- baseUrl?: string;
1231
- thinkingLevel: ThinkingLevel;
1232
- /**
1233
- * Seeds `ViewState.thinkingVisible` on the first frame (§4.1 / P1-2).
1234
- *
1235
- * IT MUST EXIST HERE AND NOT ONLY IN `PersistedConfig`. `App` reads `cfg.*`,
1236
- * where `cfg` is a `CliConfig`; a key added to the persisted shape alone would
1237
- * round-trip through `config set`, appear in `config list` — and never reach
1238
- * `initialViewState`. `--show-thinking` and `ARAGON_SHOW_THINKING` would parse
1239
- * and be discarded. Nothing would fail; the setting would simply do nothing.
1240
- */
1241
- showThinking: boolean;
1242
- /**
1243
- * Whether `AgentController` allocates the live-output store and binds
1244
- * `recordOutput` (agent-activity-presentation-live §4.1).
1245
- *
1246
- * IT MUST EXIST HERE AND NOT ONLY IN `PersistedConfig`, for the reason its
1247
- * neighbour records one comment up: the controller reads `config.*`, where
1248
- * `config` is a `CliConfig`, so a key added to the persisted shape alone would
1249
- * round-trip through `config set`, appear in `config list` -- and never reach
1250
- * the constructor. `--live-tool-output` and `ARAGON_LIVE_TOOL_OUTPUT` would
1251
- * parse and be discarded, with nothing failing.
1252
- */
1253
- liveToolOutput: boolean;
1254
- /** The resolved cap, or `undefined` for AUTO (per-model ceiling, ≤ 64000). */
1255
- maxTokens?: number;
1256
- /**
1257
- * The user's context-window override, or `null` for AUTO.
1258
- *
1259
- * IT MUST EXIST HERE AND NOT ONLY IN `PersistedConfig`, for the reason
1260
- * `showThinking` / `liveToolOutput` / `diffRender` each record above: the
1261
- * runtime reads `config.*`, where `config` is a `CliConfig`, so a key added to
1262
- * the persisted shape alone would round-trip through `config set`, appear in
1263
- * `config list` - and never reach `ContextMeter`. `ARAGON_CONTEXT_WINDOW`
1264
- * would parse and be discarded, with nothing failing.
1265
- */
1266
- contextWindow: number | null;
1267
- /**
1268
- * WHERE the override above came from, or `undefined` when there is none
1269
- * (profile-context-window §5.2). RUNTIME-ONLY, never persisted.
1270
- *
1271
- * THE CONTRACT IS AN IFF: `contextWindowOrigin !== undefined` exactly when
1272
- * `contextWindow !== null`. An explicit AUTO (profile set to auto,
1273
- * `config set contextWindow auto`, `ARAGON_CONTEXT_WINDOW=auto`) has value
1274
- * null, so its origin is undefined - "the user asserted this denominator"
1275
- * and "the user declared AUTO" are different facts, and the meter's
1276
- * override branch only ever sees the first.
1277
- */
1278
- contextWindowOrigin?: ContextWindowOrigin;
1279
- theme: ThemeName;
1280
- reducedMotion: boolean;
1281
- /** Replay a plain-text summary on exit (full-screen only — see §4.4). */
1282
- exitTranscript: boolean;
1283
- /** Entries reachable by scrolling; older ones show the "collapsed" line (I-3). */
1284
- transcriptWindow: number;
1285
- /**
1286
- * Entries kept in `ViewState` (L1).
1287
- *
1288
- * Resolved to be `>= transcriptWindow`: retaining fewer entries than the
1289
- * window can scroll to would silently make part of the window unreachable.
1290
- */
1291
- transcriptRetain: number;
1292
- /**
1293
- * What the user actually asked `transcriptRetain` to be, present ONLY when
1294
- * that value had to be raised (§5.1).
1295
- *
1296
- * A setting ignored without a word is the one failure mode this feature is
1297
- * not allowed to add: the eco chip, `/perf` and the dropped-entry line all
1298
- * exist so that nothing it does happens unannounced, and a config key
1299
- * overwritten in silence would be the exception. `undefined` means nothing
1300
- * was overridden, which is every default session.
1301
- */
1302
- transcriptRetainRequested?: number;
1303
- /** Adaptive coalescing under load (L4). */
1304
- renderGovernor: boolean;
1305
- /** Ceiling of the governor ladder in ms; `33` flattens it (L4). */
1306
- maxRenderIntervalMs: number;
1307
- /**
1308
- * Repaint only the frame rows that changed (tui-input-flicker-fix §5.1).
1309
- *
1310
- * IT MUST EXIST HERE AND NOT ONLY IN `PersistedConfig`, for the reason
1311
- * `showThinking` / `liveToolOutput` / `update` each record: `runInteractive`
1312
- * reads `config.diffRender`, where `config` is a `CliConfig`, so a key added to
1313
- * the persisted shape alone would round-trip through `config set`, appear in
1314
- * `config list` — and never reach the one gate that constructs the writer.
1315
- * `--no-diff-render` and `ARAGON_DIFF_RENDER=0` would parse and be discarded,
1316
- * with no compile error and no runtime error.
1317
- */
1318
- diffRender: boolean;
1319
- /**
1320
- * Native terminal scrolling vs the full-screen app layout
1321
- * (tui-native-terminal-scroll D1).
1322
- *
1323
- * IT MUST EXIST HERE AND NOT ONLY IN `PersistedConfig`, for the reason
1324
- * `diffRender` above records: `runInteractive` reads `config.scrollMode`, where
1325
- * `config` is a `CliConfig`, so a key added to the persisted shape alone would
1326
- * round-trip through `config set` and never reach the screen plan.
1327
- *
1328
- * OPTIONAL ON THIS SHAPE ONLY so the many hand-built `CliConfig` fixtures in the
1329
- * test suite stay valid without edits (I-S9); `loadConfig` always sets it and
1330
- * the one reader (`runInteractive`) falls back to `DEFAULT_SCROLL_MODE`.
1331
- */
1332
- scrollMode?: ScrollMode;
1333
- /** Wrap each repaint batch in DEC 2026 synchronized update (§5.1). */
1334
- syncOutput: boolean;
1335
- confirmTools: boolean;
1336
- toolTimeoutMs: number;
1337
- idleTimeoutMs: number;
1338
- /** provider -> resolved key (config-file key ?? provider env var). */
1339
- apiKeys: Record<string, string | undefined>;
1340
- /**
1341
- * Whether submitted prompts are recorded (D-9).
1342
- *
1343
- * The recall LIST is deliberately not here: its only consumer is one
1344
- * `useState` seed in `App.tsx`, and carrying it on `CliConfig` would make
1345
- * every `loadConfig()` — `aragon logs tail` and `aragon skills list`
1346
- * included — read a file it has no use for (D-4).
1347
- */
1348
- historyEnabled: boolean;
1349
- density: DensityMode;
1350
- hints: boolean;
1351
- /**
1352
- * Whether this session may enable SGR mouse reporting (full-screen + TTY
1353
- * only). Resolved by `resolveMouse` in `load.ts`.
1354
- */
1355
- mouse: boolean;
1356
- /**
1357
- * Whether this session may drag-select and copy.
1358
- *
1359
- * IT MUST EXIST HERE AND NOT ONLY IN `PersistedConfig`, for the reason
1360
- * `diffRender` above records at length: `runInteractive` reads
1361
- * `config.mouseSelect` — where `config` is a `CliConfig` — to decide the
1362
- * `?1002h` write, the controller and the `decorate` hook. A key added to the
1363
- * persisted shape alone would round-trip through `config set`, appear in
1364
- * `config list`, and never reach a single one of them.
1365
- */
1366
- mouseSelect: boolean;
1367
- /**
1368
- * Whether this session recognises pastes at all.
1369
- *
1370
- * IT MUST EXIST HERE AND NOT ONLY IN `PersistedConfig`, for the reason
1371
- * `mouseSelect` above records: `runInteractive` reads `config.paste` -- where
1372
- * `config` is a `CliConfig` -- to decide the filter's `paste` feature, the
1373
- * `?2004h` write and the `PasteBridge`. A key added to the persisted shape
1374
- * alone would round-trip through `config set`, appear in `config list`, and
1375
- * reach none of them.
1376
- */
1377
- paste: boolean;
1378
- /**
1379
- * Whether this session may push the keyboard-enhancement modes.
1380
- *
1381
- * IT MUST EXIST HERE AND NOT ONLY IN `PersistedConfig`, for the reason
1382
- * `paste` above records: `runInteractive` reads it -- where `config`
1383
- * is a `CliConfig` -- to decide the filter's `enhancedKeys` feature
1384
- * and the `enableKeyboardEnhancement` push.
1385
- */
1386
- keyboardEnhancement: boolean;
1387
- /** Idle ms before a paused viewport returns to the newest line; `0` disables. */
1388
- scrollResumeMs: number;
1389
- /**
1390
- * Whether this session opens in PLAN mode.
1391
- *
1392
- * Named for what it DOES rather than mirroring the persisted key: after
1393
- * resolution it is a resolved starting posture, not a preference, and the
1394
- * live mode from here on belongs to the controller.
1395
- */
1396
- startInPlanMode: boolean;
1397
- planModeHumanTimeoutMs: number;
1398
- skills: SkillsConfig;
1399
- /** Flag/env-only skill switches for this run (§7.5). Never persisted. */
1400
- skillsRuntime: SkillsRuntimeOptions;
1401
- /** Resolved logging settings; the authoritative input to `Logger.reconfigure`. */
1402
- log: LogConfig;
1403
- /**
1404
- * Resolved team-mode settings (team-subagents §3.10).
1405
- *
1406
- * `enabled` here decides whether `task` is REGISTERED, which happens once at
1407
- * construction and can never be undone (§4.5 / D-17). The live on/off switch
1408
- * `/team` flips is a separate flag on the controller.
1409
- */
1410
- team: TeamConfig;
1411
- /**
1412
- * Resolved todo-planning settings (todo-plan-execution §4.2).
1413
- *
1414
- * `enabled` here decides whether `todo_write` is REGISTERED, which happens
1415
- * once at construction and can never be undone (C-1). The live on/off switch
1416
- * `/todo` flips is a separate flag on the controller; `panel` is read at
1417
- * RENDER time through `controller.getConfig()`, which is why `/todo panel`
1418
- * must call `setTodoConfig` as well as persisting (P1-2).
1419
- */
1420
- todo: TodoConfig;
1421
- /**
1422
- * Resolved API-retry settings (llm-api-retry-backoff §6.2).
1423
- *
1424
- * Unlike `team.enabled` / `todo.enabled` this decides NOTHING at construction
1425
- * time: the policy lives on the `ProviderRegistry` and `setRetryConfig()`
1426
- * replaces it live, so `/retry off` takes effect in the running session. That is
1427
- * why the controller has no `retryRegistered` twin of the two flags above.
1428
- */
1429
- retry: RetryConfig;
1430
- /**
1431
- * Resolved fast-tier settings (fast-model-tier §4.2).
1432
- *
1433
- * `enabled` here decides `fastRegistered` — whether `task`'s schema carries a
1434
- * `model` property at all — which happens once at construction and can never
1435
- * be undone (C-2). The live on/off switch `/fast` flips is a separate flag on
1436
- * `FastWiring`.
1437
- *
1438
- * THE OTHER NINE KEYS ARE READ LIVE, and that is not the same statement.
1439
- * `provider` / `model` / `baseUrl` feed `resolveFastTier`, which is re-run on
1440
- * every config mutation (§3.2 rule 8 / RV-3) because `''` INHERITS from
1441
- * `config.provider` / `config.baseUrl` and those are rewritten by `/model`,
1442
- * `/provider`, `/reload` and the settings screen.
1443
- */
1444
- fast: FastConfig;
1445
- /**
1446
- * Resolved auto-update settings (cli-auto-update §4.1).
1447
- *
1448
- * `mode` here decides whether `runInteractive` CONSTRUCTS the service at all
1449
- * (§3.8), which is what makes `'off'` byte-identical to a pre-feature build:
1450
- * no timer, no file read, no socket. The other three keys are read by the
1451
- * service on every check, so a `/update off` mid-session stops the next one.
1452
- *
1453
- * IT MUST EXIST HERE AND NOT ONLY IN `PersistedConfig`, for the reason
1454
- * `showThinking` and `liveToolOutput` each record above: the gate reads
1455
- * `cfg.update`, where `cfg` is a `CliConfig`, so a key added to the persisted
1456
- * shape alone would round-trip through `config set`, appear in `config list` —
1457
- * and never reach the gate. `--no-update` and `ARAGON_UPDATE=0` would parse
1458
- * and be discarded, with no compile error and no runtime error.
1459
- */
1460
- update: UpdateConfig;
1461
- /**
1462
- * Resolved context-compaction settings (context-auto-compaction §4.2).
1463
- *
1464
- * `enabled` here decides whether `AgentController` CONSTRUCTS a
1465
- * `CompactionWiring` at all, which is what makes `false` byte-identical to a
1466
- * pre-feature build: no manager is passed to `new Agent({...})`, nothing is
1467
- * subscribed, no registry is allocated, and the loop's checkpoint is one `if`
1468
- * against an absent field. The other five keys are read LIVE on every use, so
1469
- * `/compact threshold 0.8` takes effect in the running session.
1470
- *
1471
- * IT MUST EXIST HERE AND NOT ONLY IN `PersistedConfig`, for the reason
1472
- * `showThinking`, `liveToolOutput`, `diffRender`, `mouseSelect` and `update`
1473
- * each record above: the controller and the compactor read `config.compaction`,
1474
- * where `config` is a `CliConfig`, so a key added to the persisted shape alone
1475
- * would round-trip through `config set`, appear in `config list` — and never
1476
- * reach either of them.
1477
- */
1478
- compaction: CompactionConfig;
1479
- /**
1480
- * Resolved background-service settings (background-service-supervision §5.4).
1481
- *
1482
- * `background` here decides whether `bash`'s schema carries a `background`
1483
- * property, whether `bash_output` / `bash_kill` are REGISTERED and whether
1484
- * `<background_services>` is spliced — all three at construction, and none of
1485
- * them undoable, the `team.enabled` / `todo.enabled` / `fast.enabled` rule.
1486
- * The other three keys are read LIVE.
1487
- *
1488
- * IT DOES NOT GATE THE INTERRUPT LADDER (I-2 / D-9). `ProcSupervisor` is
1489
- * constructed unconditionally, because `Esc`/`Esc` and the foreground registry
1490
- * are what make G2 and G3 true and those are promised whatever this says.
1491
- *
1492
- * IT MUST EXIST HERE AND NOT ONLY IN `PersistedConfig`, for the reason every
1493
- * section above records: the controller and `bash` read `config.bash`, where
1494
- * `config` is a `CliConfig`, so a key added to the persisted shape alone would
1495
- * round-trip through `config set`, appear in `config list` — and never reach
1496
- * either of them.
1497
- */
1498
- bash: BashConfig;
1499
- /**
1500
- * Background jobs and bounded waiting (long-task-jobs §6.5). The ELEVENTH
1501
- * nested object; five scalar keys, one level deep.
1502
- *
1503
- * ON `CliConfig` AS WELL AS `PersistedConfig`, for the reason every section
1504
- * above records: `AgentController` reads `config.jobs.waitSeconds` through a
1505
- * closure and `job_wait` reads it again at call time, so a key persisted and
1506
- * never projected would round-trip through `config set`, show up in
1507
- * `config list`, and change nothing.
1508
- *
1509
- * ONE LEVEL DEEP IS A HARD REQUIREMENT, NOT A PREFERENCE: `runConfigGet` splits
1510
- * `jobs.waitSeconds` on a single dot, so a nested sub-object would resolve to
1511
- * `undefined` and report an empty value for a setting that IS on disk.
1512
- */
1513
- jobs: JobsConfig;
1514
- /**
1515
- * Quick prompts (quick-prompt-library D-19). The TWELFTH nested object; three
1516
- * scalars, one level deep.
1517
- *
1518
- * ON `CliConfig` AS WELL AS `PersistedConfig`, for the reason every section above
1519
- * records: `App` reads `cfg.prompts?.enabled` / `.insertMode` from a
1520
- * `CliConfig`, so a key added to the persisted shape alone would round-trip
1521
- * through the `config` commands, appear in `config list`, and change nothing.
1522
- *
1523
- * OPTIONAL ON THIS SHAPE ONLY, and `loadConfig` always fills it. The reason is the
1524
- * one the `jobs` note above does not have to state: `CliConfig` is built by hand in
1525
- * ~20 test fixtures, and a REQUIRED section turns every one of them into a compile
1526
- * error for a feature none of them is about. The three readers then fall back to the
1527
- * DOCUMENTED defaults (`enabled: true`, `insertMode: 'insert'`, `hint: true`), so a
1528
- * missing section can only ever behave like a default session - never like a
1529
- * disabled or destructive one.
1530
- */
1531
- prompts?: PromptsConfig;
1532
- /**
1533
- * The header task label (tui-shortcut-drawer-and-task-summary §4.8). The
1534
- * THIRTEENTH nested object; two scalars, one level deep.
1535
- *
1536
- * OPTIONAL HERE FOR THE SAME REASON AS `prompts` ABOVE: `CliConfig` is built by
1537
- * hand in many fixtures, and every reader uses `!== false`, so a missing section
1538
- * behaves exactly like a default session (label on, floor on) rather than like a
1539
- * switched-off feature.
1540
- */
1541
- taskSummary?: TaskSummaryConfig;
1542
- /**
1543
- * Governance mode (governance-mode 11.1). The FOURTEENTH nested object; scalars only.
1544
- *
1545
- * OPTIONAL HERE FOR THE SAME REASON AS `prompts` / `taskSummary` ABOVE: `CliConfig` is built
1546
- * by hand in many fixtures, `loadConfig` always fills it, and readers treat a missing
1547
- * section as the documented defaults. `enabled` here (after env kill switch and
1548
- * `--no-governance`) decides whether governance tools are REGISTERED, once at construction.
1549
- */
1550
- governance?: GovernanceConfig;
1551
- /**
1552
- * The posture the session starts in (governance-mode 11.2): `--plan` / `planModeDefault`
1553
- * still decide `startInPlanMode` exactly as before, and `--govern` / `--plan-govern` win over
1554
- * them when governance is available. Optional on this shape for the fixture reason above;
1555
- * `loadConfig` always fills it. Without a governance flag it is `'plan'` when
1556
- * `startInPlanMode`, else `'build'`.
1557
- */
1558
- initialPosture?: Posture;
1559
- /**
1560
- * Lifetime submit count driving the composer hint fade (`HINT_FADE_AFTER`).
1561
- *
1562
- * Read from `<home>/state.json` rather than the config file. It stays on
1563
- * `CliConfig` — unlike the recall list — because it is one scalar that is
1564
- * already plumbed through `controller.getConfig()` / `setSubmitCount()` and
1565
- * read during render (D-4).
1566
- */
1567
- submitCount: number;
1568
- /** Working directory for tools (default `process.cwd()`, overridable). */
1569
- cwd: string;
1570
- /** Whether ANSI color is enabled. */
1571
- color: boolean;
1572
- /** Resolved color depth: TUI policy or non-interactive terminal detection. */
1573
- colorLevel?: 0 | 1 | 2 | 3;
1574
- /** TUI always enables Unicode; non-interactive output uses detection. */
1575
- unicode?: boolean;
1576
- /** One-shot `--api-key` override; applies to the active provider only. */
1577
- apiKeyOverride?: string;
1578
- }
1579
- /**
1580
- * Coerce an arbitrary value into a positive integer, or `undefined`.
1581
- *
1582
- * Kept because callers outside this feature still use it, and deliberately
1583
- * WITHOUT the range clamp so its behaviour for in-range values is byte-identical
1584
- * to what it always was. New code wants `clampMaxTokens`.
1585
- */
1586
- export declare function coerceMaxTokens(v: unknown): number | undefined;
1587
- /**
1588
- * The accepted range for an explicit output cap.
1589
- *
1590
- * The floor is the engine's: below it a turn cannot produce a usable tool call.
1591
- * The ceiling is a sanity bound on a hand-edited file, not a model limit — the
1592
- * real per-model ceiling is applied later, by `resolveOutputTokens`.
1593
- */
1594
- export declare const MAX_TOKENS_RANGE: {
1595
- min: number;
1596
- max: number;
1597
- };
1598
- /** `auto`, an empty string and `0` all mean AUTO — "let the model decide". */
1599
- export declare function isAutoToken(v: unknown): boolean;
1600
- /**
1601
- * THE single gate for every `maxTokens` read AND write, in the shape
1602
- * `clampSkillsConfig` / `clampLogConfig` / `clampTeamConfig` already use.
1603
- *
1604
- * Both directions on purpose: hardening only the read path leaves a bad value on
1605
- * disk that reverts to a default on every launch, which presents to the user as
1606
- * "my setting won't stick".
1607
- *
1608
- * Returns `undefined` for AUTO and for anything unusable — the caller decides
1609
- * which of the two it was, because they mean different things.
1610
- */
1611
- export declare function clampMaxTokens(v: unknown): number | undefined;
1612
- /**
1613
- * Parse text typed into the settings screen, a slash command, or `config set`.
1614
- *
1615
- * Distinguishes AUTO from "the user typed nonsense", which `clampMaxTokens`
1616
- * cannot: both come back as `undefined` there, and treating a typo as AUTO would
1617
- * silently discard the number the user meant to set.
1618
- */
1619
- export declare function parseMaxTokensInput(raw: string): {
1620
- kind: 'auto';
1621
- } | {
1622
- kind: 'value';
1623
- value: number;
1624
- clamped: boolean;
1625
- } | {
1626
- kind: 'invalid';
1627
- };
1628
- /** The product default, re-exported so the CLI never spells the number itself. */
1629
- export declare const DEFAULT_MAX_TOKENS = 64000;
1630
- /** Coerce a value into a positive integer with a fallback (for timeouts). */
1631
- export declare function coercePositiveInt(v: unknown, fallback: number): number;
1632
- /**
1633
- * Mask a secret for display: keep a short prefix + suffix, redact the middle.
1634
- * A short/empty key is fully redacted so the length is not leaked.
1635
- *
1636
- * The glyphs are parameters with ASCII defaults (spec §4.1 tier B). This module
1637
- * has no terminal capabilities to consult, and the result is rendered in the
1638
- * settings screen — which on a legacy `cmd.exe` used to show two question-mark
1639
- * boxes where the redaction dots belonged. The UI passes its resolved glyphs;
1640
- * every other caller gets output that is safe anywhere.
1641
- */
1642
- export declare function maskSecret(key: string | undefined | null, opts?: {
1643
- maskChar?: string;
1644
- ellipsis?: string;
1645
- }): string;