dispach 0.1.0

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 (346) hide show
  1. package/README.md +596 -0
  2. package/dist/App-dxqm39zx.js +11 -0
  3. package/dist/App-dxqm39zx.js.map +25 -0
  4. package/dist/ConfigEditor-7v5nebvy.js +6 -0
  5. package/dist/ConfigEditor-7v5nebvy.js.map +11 -0
  6. package/dist/KeyProbe-vjhmdpx6.js +5 -0
  7. package/dist/KeyProbe-vjhmdpx6.js.map +11 -0
  8. package/dist/Picker-jxaesaxy.js +5 -0
  9. package/dist/Picker-jxaesaxy.js.map +10 -0
  10. package/dist/SessionPicker-z2t0p4b5.js +5 -0
  11. package/dist/SessionPicker-z2t0p4b5.js.map +11 -0
  12. package/dist/SkillBrowser-yyf2gy0q.js +5 -0
  13. package/dist/SkillBrowser-yyf2gy0q.js.map +11 -0
  14. package/dist/WizardApp-12ndxgqv.js +5 -0
  15. package/dist/WizardApp-12ndxgqv.js.map +13 -0
  16. package/dist/agents.d.ts +9 -0
  17. package/dist/agents.d.ts.map +1 -0
  18. package/dist/browse.d.ts +63 -0
  19. package/dist/browse.d.ts.map +1 -0
  20. package/dist/client.d.ts +25 -0
  21. package/dist/client.d.ts.map +1 -0
  22. package/dist/client.js +34 -0
  23. package/dist/client.js.map +11 -0
  24. package/dist/components/App.d.ts +28 -0
  25. package/dist/components/App.d.ts.map +1 -0
  26. package/dist/components/Banner.d.ts +16 -0
  27. package/dist/components/Banner.d.ts.map +1 -0
  28. package/dist/components/Brandmark.d.ts +31 -0
  29. package/dist/components/Brandmark.d.ts.map +1 -0
  30. package/dist/components/CheckList.d.ts +38 -0
  31. package/dist/components/CheckList.d.ts.map +1 -0
  32. package/dist/components/CommandOutput.d.ts +29 -0
  33. package/dist/components/CommandOutput.d.ts.map +1 -0
  34. package/dist/components/ConfigEditor.d.ts +64 -0
  35. package/dist/components/ConfigEditor.d.ts.map +1 -0
  36. package/dist/components/HistorySearch.d.ts +23 -0
  37. package/dist/components/HistorySearch.d.ts.map +1 -0
  38. package/dist/components/KeyProbe.d.ts +36 -0
  39. package/dist/components/KeyProbe.d.ts.map +1 -0
  40. package/dist/components/LineCursor.d.ts +55 -0
  41. package/dist/components/LineCursor.d.ts.map +1 -0
  42. package/dist/components/Live.d.ts +17 -0
  43. package/dist/components/Live.d.ts.map +1 -0
  44. package/dist/components/Palette.d.ts +21 -0
  45. package/dist/components/Palette.d.ts.map +1 -0
  46. package/dist/components/Picker.d.ts +23 -0
  47. package/dist/components/Picker.d.ts.map +1 -0
  48. package/dist/components/Prompt.d.ts +20 -0
  49. package/dist/components/Prompt.d.ts.map +1 -0
  50. package/dist/components/Screen.d.ts +39 -0
  51. package/dist/components/Screen.d.ts.map +1 -0
  52. package/dist/components/SelectList.d.ts +34 -0
  53. package/dist/components/SelectList.d.ts.map +1 -0
  54. package/dist/components/SessionPicker.d.ts +26 -0
  55. package/dist/components/SessionPicker.d.ts.map +1 -0
  56. package/dist/components/SkillBrowser.d.ts +39 -0
  57. package/dist/components/SkillBrowser.d.ts.map +1 -0
  58. package/dist/components/Spinner.d.ts +13 -0
  59. package/dist/components/Spinner.d.ts.map +1 -0
  60. package/dist/components/StatusBar.d.ts +11 -0
  61. package/dist/components/StatusBar.d.ts.map +1 -0
  62. package/dist/components/SummaryCard.d.ts +11 -0
  63. package/dist/components/SummaryCard.d.ts.map +1 -0
  64. package/dist/components/TextField.d.ts +39 -0
  65. package/dist/components/TextField.d.ts.map +1 -0
  66. package/dist/components/Transcript.d.ts +23 -0
  67. package/dist/components/Transcript.d.ts.map +1 -0
  68. package/dist/components/WizardApp.d.ts +18 -0
  69. package/dist/components/WizardApp.d.ts.map +1 -0
  70. package/dist/components/WizardFrame.d.ts +19 -0
  71. package/dist/components/WizardFrame.d.ts.map +1 -0
  72. package/dist/config-yz0nz51b.js +24 -0
  73. package/dist/config-yz0nz51b.js.map +10 -0
  74. package/dist/config.d.ts +71 -0
  75. package/dist/config.d.ts.map +1 -0
  76. package/dist/credential-wgt4gvcz.js +19 -0
  77. package/dist/credential-wgt4gvcz.js.map +10 -0
  78. package/dist/credential.d.ts +68 -0
  79. package/dist/credential.d.ts.map +1 -0
  80. package/dist/daemon.d.ts +47 -0
  81. package/dist/daemon.d.ts.map +1 -0
  82. package/dist/editor.d.ts +81 -0
  83. package/dist/editor.d.ts.map +1 -0
  84. package/dist/hooks/useElapsed.d.ts +10 -0
  85. package/dist/hooks/useElapsed.d.ts.map +1 -0
  86. package/dist/hooks/useTerminalSize.d.ts +14 -0
  87. package/dist/hooks/useTerminalSize.d.ts.map +1 -0
  88. package/dist/hooks/useTurn.d.ts +41 -0
  89. package/dist/hooks/useTurn.d.ts.map +1 -0
  90. package/dist/index-2cvtz0fy.js +903 -0
  91. package/dist/index-2cvtz0fy.js.map +194 -0
  92. package/dist/index-3nwfz9jq.js +12 -0
  93. package/dist/index-3nwfz9jq.js.map +11 -0
  94. package/dist/index-6b7qvh1x.js +6 -0
  95. package/dist/index-6b7qvh1x.js.map +10 -0
  96. package/dist/index-6z0yr17z.js +12 -0
  97. package/dist/index-6z0yr17z.js.map +11 -0
  98. package/dist/index-7da4fqcr.js +7 -0
  99. package/dist/index-7da4fqcr.js.map +11 -0
  100. package/dist/index-8bmhd2hj.js +6 -0
  101. package/dist/index-8bmhd2hj.js.map +10 -0
  102. package/dist/index-9d011p3q.js +6 -0
  103. package/dist/index-9d011p3q.js.map +10 -0
  104. package/dist/index-9f9pp2ef.js +6 -0
  105. package/dist/index-9f9pp2ef.js.map +10 -0
  106. package/dist/index-9nsfs0vy.js +6 -0
  107. package/dist/index-9nsfs0vy.js.map +10 -0
  108. package/dist/index-9pj1ws0p.js +77 -0
  109. package/dist/index-9pj1ws0p.js.map +12 -0
  110. package/dist/index-b5wwtxzk.js +66 -0
  111. package/dist/index-b5wwtxzk.js.map +12 -0
  112. package/dist/index-b8zwg8a3.js +6 -0
  113. package/dist/index-b8zwg8a3.js.map +10 -0
  114. package/dist/index-bry9bzt3.js +427 -0
  115. package/dist/index-bry9bzt3.js.map +11 -0
  116. package/dist/index-bwckzbf8.js +6 -0
  117. package/dist/index-bwckzbf8.js.map +10 -0
  118. package/dist/index-cx3vz7sf.js +6 -0
  119. package/dist/index-cx3vz7sf.js.map +11 -0
  120. package/dist/index-e8n70sgj.js +6 -0
  121. package/dist/index-e8n70sgj.js.map +11 -0
  122. package/dist/index-fvhg0xyd.js +167 -0
  123. package/dist/index-fvhg0xyd.js.map +19 -0
  124. package/dist/index-gbnc99j8.js +14 -0
  125. package/dist/index-gbnc99j8.js.map +13 -0
  126. package/dist/index-h2yds678.js +7 -0
  127. package/dist/index-h2yds678.js.map +11 -0
  128. package/dist/index-j97vttdt.js +10 -0
  129. package/dist/index-j97vttdt.js.map +10 -0
  130. package/dist/index-jk0def33.js +6 -0
  131. package/dist/index-jk0def33.js.map +12 -0
  132. package/dist/index-jym27m75.js +6 -0
  133. package/dist/index-jym27m75.js.map +10 -0
  134. package/dist/index-mgdgx22q.js +10 -0
  135. package/dist/index-mgdgx22q.js.map +10 -0
  136. package/dist/index-mrtb5y08.js +6 -0
  137. package/dist/index-mrtb5y08.js.map +11 -0
  138. package/dist/index-my5cjx00.js +6 -0
  139. package/dist/index-my5cjx00.js.map +10 -0
  140. package/dist/index-qc2vrq9z.js +7 -0
  141. package/dist/index-qc2vrq9z.js.map +11 -0
  142. package/dist/index-rqbtm761.js +6 -0
  143. package/dist/index-rqbtm761.js.map +10 -0
  144. package/dist/index-rqzg861g.js +6 -0
  145. package/dist/index-rqzg861g.js.map +10 -0
  146. package/dist/index-t1xvacym.js +6 -0
  147. package/dist/index-t1xvacym.js.map +11 -0
  148. package/dist/index-xgqzk5cq.js +9 -0
  149. package/dist/index-xgqzk5cq.js.map +12 -0
  150. package/dist/index-xqyms08r.js +6 -0
  151. package/dist/index-xqyms08r.js.map +10 -0
  152. package/dist/index-yr25dnf5.js +6 -0
  153. package/dist/index-yr25dnf5.js.map +10 -0
  154. package/dist/index.d.ts +23 -0
  155. package/dist/index.d.ts.map +1 -0
  156. package/dist/index.js +527 -0
  157. package/dist/index.js.map +48 -0
  158. package/dist/init.d.ts +34 -0
  159. package/dist/init.d.ts.map +1 -0
  160. package/dist/keymap.d.ts +126 -0
  161. package/dist/keymap.d.ts.map +1 -0
  162. package/dist/keys.d.ts +17 -0
  163. package/dist/keys.d.ts.map +1 -0
  164. package/dist/lib/ambient.d.ts +69 -0
  165. package/dist/lib/ambient.d.ts.map +1 -0
  166. package/dist/lib/args.d.ts +33 -0
  167. package/dist/lib/args.d.ts.map +1 -0
  168. package/dist/lib/bootstrap.d.ts +84 -0
  169. package/dist/lib/bootstrap.d.ts.map +1 -0
  170. package/dist/lib/browse.d.ts +89 -0
  171. package/dist/lib/browse.d.ts.map +1 -0
  172. package/dist/lib/browser.d.ts +55 -0
  173. package/dist/lib/browser.d.ts.map +1 -0
  174. package/dist/lib/chat-frame.d.ts +156 -0
  175. package/dist/lib/chat-frame.d.ts.map +1 -0
  176. package/dist/lib/clipboard.d.ts +32 -0
  177. package/dist/lib/clipboard.d.ts.map +1 -0
  178. package/dist/lib/commands.d.ts +26 -0
  179. package/dist/lib/commands.d.ts.map +1 -0
  180. package/dist/lib/composer.d.ts +85 -0
  181. package/dist/lib/composer.d.ts.map +1 -0
  182. package/dist/lib/config-apply.d.ts +51 -0
  183. package/dist/lib/config-apply.d.ts.map +1 -0
  184. package/dist/lib/config-editor.d.ts +113 -0
  185. package/dist/lib/config-editor.d.ts.map +1 -0
  186. package/dist/lib/config-env.d.ts +110 -0
  187. package/dist/lib/config-env.d.ts.map +1 -0
  188. package/dist/lib/config-rows.d.ts +37 -0
  189. package/dist/lib/config-rows.d.ts.map +1 -0
  190. package/dist/lib/config-view.d.ts +133 -0
  191. package/dist/lib/config-view.d.ts.map +1 -0
  192. package/dist/lib/confirm.d.ts +86 -0
  193. package/dist/lib/confirm.d.ts.map +1 -0
  194. package/dist/lib/const.d.ts +213 -0
  195. package/dist/lib/const.d.ts.map +1 -0
  196. package/dist/lib/csi.d.ts +70 -0
  197. package/dist/lib/csi.d.ts.map +1 -0
  198. package/dist/lib/curated.d.ts +44 -0
  199. package/dist/lib/curated.d.ts.map +1 -0
  200. package/dist/lib/daemon-plan.d.ts +151 -0
  201. package/dist/lib/daemon-plan.d.ts.map +1 -0
  202. package/dist/lib/dotenv-edit.d.ts +30 -0
  203. package/dist/lib/dotenv-edit.d.ts.map +1 -0
  204. package/dist/lib/env.d.ts +10 -0
  205. package/dist/lib/env.d.ts.map +1 -0
  206. package/dist/lib/exit.d.ts +170 -0
  207. package/dist/lib/exit.d.ts.map +1 -0
  208. package/dist/lib/help.d.ts +10 -0
  209. package/dist/lib/help.d.ts.map +1 -0
  210. package/dist/lib/init-flow.d.ts +539 -0
  211. package/dist/lib/init-flow.d.ts.map +1 -0
  212. package/dist/lib/init-skills.d.ts +46 -0
  213. package/dist/lib/init-skills.d.ts.map +1 -0
  214. package/dist/lib/keyboard.d.ts +76 -0
  215. package/dist/lib/keyboard.d.ts.map +1 -0
  216. package/dist/lib/keys-view.d.ts +57 -0
  217. package/dist/lib/keys-view.d.ts.map +1 -0
  218. package/dist/lib/launchd.d.ts +151 -0
  219. package/dist/lib/launchd.d.ts.map +1 -0
  220. package/dist/lib/lifecycle.d.ts +126 -0
  221. package/dist/lib/lifecycle.d.ts.map +1 -0
  222. package/dist/lib/log-follow.d.ts +71 -0
  223. package/dist/lib/log-follow.d.ts.map +1 -0
  224. package/dist/lib/mouse.d.ts +84 -0
  225. package/dist/lib/mouse.d.ts.map +1 -0
  226. package/dist/lib/multiselect.d.ts +37 -0
  227. package/dist/lib/multiselect.d.ts.map +1 -0
  228. package/dist/lib/origins.d.ts +40 -0
  229. package/dist/lib/origins.d.ts.map +1 -0
  230. package/dist/lib/output.d.ts +29 -0
  231. package/dist/lib/output.d.ts.map +1 -0
  232. package/dist/lib/palette.d.ts +69 -0
  233. package/dist/lib/palette.d.ts.map +1 -0
  234. package/dist/lib/probe.d.ts +158 -0
  235. package/dist/lib/probe.d.ts.map +1 -0
  236. package/dist/lib/providers.d.ts +63 -0
  237. package/dist/lib/providers.d.ts.map +1 -0
  238. package/dist/lib/provision.d.ts +163 -0
  239. package/dist/lib/provision.d.ts.map +1 -0
  240. package/dist/lib/remove-plan.d.ts +120 -0
  241. package/dist/lib/remove-plan.d.ts.map +1 -0
  242. package/dist/lib/render.d.ts +78 -0
  243. package/dist/lib/render.d.ts.map +1 -0
  244. package/dist/lib/resume.d.ts +69 -0
  245. package/dist/lib/resume.d.ts.map +1 -0
  246. package/dist/lib/rows.d.ts +69 -0
  247. package/dist/lib/rows.d.ts.map +1 -0
  248. package/dist/lib/sandbox.d.ts +101 -0
  249. package/dist/lib/sandbox.d.ts.map +1 -0
  250. package/dist/lib/schema.d.ts +491 -0
  251. package/dist/lib/schema.d.ts.map +1 -0
  252. package/dist/lib/screen.d.ts +102 -0
  253. package/dist/lib/screen.d.ts.map +1 -0
  254. package/dist/lib/scroll.d.ts +64 -0
  255. package/dist/lib/scroll.d.ts.map +1 -0
  256. package/dist/lib/select.d.ts +23 -0
  257. package/dist/lib/select.d.ts.map +1 -0
  258. package/dist/lib/service-env.d.ts +38 -0
  259. package/dist/lib/service-env.d.ts.map +1 -0
  260. package/dist/lib/service.d.ts +102 -0
  261. package/dist/lib/service.d.ts.map +1 -0
  262. package/dist/lib/session-commands.d.ts +229 -0
  263. package/dist/lib/session-commands.d.ts.map +1 -0
  264. package/dist/lib/session-key.d.ts +55 -0
  265. package/dist/lib/session-key.d.ts.map +1 -0
  266. package/dist/lib/sessions-view.d.ts +31 -0
  267. package/dist/lib/sessions-view.d.ts.map +1 -0
  268. package/dist/lib/source-cache.d.ts +105 -0
  269. package/dist/lib/source-cache.d.ts.map +1 -0
  270. package/dist/lib/source.d.ts +281 -0
  271. package/dist/lib/source.d.ts.map +1 -0
  272. package/dist/lib/sources.d.ts +107 -0
  273. package/dist/lib/sources.d.ts.map +1 -0
  274. package/dist/lib/spawn.d.ts +56 -0
  275. package/dist/lib/spawn.d.ts.map +1 -0
  276. package/dist/lib/stdin-tap.d.ts +41 -0
  277. package/dist/lib/stdin-tap.d.ts.map +1 -0
  278. package/dist/lib/subcommand.d.ts +57 -0
  279. package/dist/lib/subcommand.d.ts.map +1 -0
  280. package/dist/lib/systemd.d.ts +60 -0
  281. package/dist/lib/systemd.d.ts.map +1 -0
  282. package/dist/lib/templates.d.ts +35 -0
  283. package/dist/lib/templates.d.ts.map +1 -0
  284. package/dist/lib/terminal.d.ts +98 -0
  285. package/dist/lib/terminal.d.ts.map +1 -0
  286. package/dist/lib/text-selection.d.ts +75 -0
  287. package/dist/lib/text-selection.d.ts.map +1 -0
  288. package/dist/lib/theme.d.ts +90 -0
  289. package/dist/lib/theme.d.ts.map +1 -0
  290. package/dist/lib/types.d.ts +467 -0
  291. package/dist/lib/types.d.ts.map +1 -0
  292. package/dist/lib/warnings.d.ts +79 -0
  293. package/dist/lib/warnings.d.ts.map +1 -0
  294. package/dist/lib/width.d.ts +39 -0
  295. package/dist/lib/width.d.ts.map +1 -0
  296. package/dist/lib/wizard.d.ts +95 -0
  297. package/dist/lib/wizard.d.ts.map +1 -0
  298. package/dist/lib/wordmark.d.ts +60 -0
  299. package/dist/lib/wordmark.d.ts.map +1 -0
  300. package/dist/lib/wrap.d.ts +74 -0
  301. package/dist/lib/wrap.d.ts.map +1 -0
  302. package/dist/memory.d.ts +25 -0
  303. package/dist/memory.d.ts.map +1 -0
  304. package/dist/model.d.ts +47 -0
  305. package/dist/model.d.ts.map +1 -0
  306. package/dist/plugins.d.ts +15 -0
  307. package/dist/plugins.d.ts.map +1 -0
  308. package/dist/remove.d.ts +52 -0
  309. package/dist/remove.d.ts.map +1 -0
  310. package/dist/run.d.ts +42 -0
  311. package/dist/run.d.ts.map +1 -0
  312. package/dist/schedules.d.ts +41 -0
  313. package/dist/schedules.d.ts.map +1 -0
  314. package/dist/serve.d.ts +41 -0
  315. package/dist/serve.d.ts.map +1 -0
  316. package/dist/sessions.d.ts +13 -0
  317. package/dist/sessions.d.ts.map +1 -0
  318. package/dist/skills.d.ts +80 -0
  319. package/dist/skills.d.ts.map +1 -0
  320. package/dist/soul.d.ts +19 -0
  321. package/dist/soul.d.ts.map +1 -0
  322. package/dist/sources.d.ts +32 -0
  323. package/dist/sources.d.ts.map +1 -0
  324. package/dist/start.d.ts +26 -0
  325. package/dist/start.d.ts.map +1 -0
  326. package/dist/stop.d.ts +58 -0
  327. package/dist/stop.d.ts.map +1 -0
  328. package/dist/terminal-setup.d.ts +31 -0
  329. package/dist/terminal-setup.d.ts.map +1 -0
  330. package/dist/tools.d.ts +22 -0
  331. package/dist/tools.d.ts.map +1 -0
  332. package/dist/transcript.d.ts +124 -0
  333. package/dist/transcript.d.ts.map +1 -0
  334. package/dist/validate.d.ts +36 -0
  335. package/dist/validate.d.ts.map +1 -0
  336. package/dist/web-w7r68df1.js +14 -0
  337. package/dist/web-w7r68df1.js.map +11 -0
  338. package/dist/web.d.ts +36 -0
  339. package/dist/web.d.ts.map +1 -0
  340. package/dist/wire.d.ts +10 -0
  341. package/dist/wire.d.ts.map +1 -0
  342. package/dist/wire.js +33 -0
  343. package/dist/wire.js.map +10 -0
  344. package/dist/workspace.d.ts +19 -0
  345. package/dist/workspace.d.ts.map +1 -0
  346. package/package.json +78 -0
@@ -0,0 +1,151 @@
1
+ /**
2
+ * The daemon's decisions, as pure functions: what would stop an install, and what a service's
3
+ * state actually means.
4
+ *
5
+ * Facts in, verdicts out. Gathering the facts needs the filesystem, `launchctl` and a manifest
6
+ * loader; *judging* them needs none of that, and separating the two is what makes the interesting
7
+ * cases — a restart loop, a stale heartbeat, a binary inside a git checkout — testable as a table
8
+ * rather than by breaking a real machine in nine different ways.
9
+ *
10
+ * No `node:*`, no `process`. This module is on the boundaries test's `PURE` list.
11
+ */
12
+ import { type Row } from "#lib/render";
13
+ export type Severity = "block" | "warn";
14
+ export interface Finding {
15
+ readonly code: string;
16
+ readonly severity: Severity;
17
+ readonly message: string;
18
+ /** Never optional. Hard rule 7, and a test asserts it over every finding this can produce. */
19
+ readonly hint: string;
20
+ }
21
+ export interface BinaryFacts {
22
+ /** `realpath(process.execPath)` — the interpreter, absolute. */
23
+ readonly execPath: string;
24
+ /** `realpath(process.argv[1])` — the script, absolute. */
25
+ readonly scriptPath: string;
26
+ /** Nearest ancestor of `scriptPath` holding a `.git`, if any. */
27
+ readonly gitRoot?: string;
28
+ }
29
+ export interface AgentFindingFacts {
30
+ readonly agentId: string;
31
+ readonly agentDir: string;
32
+ /** `undefined` when there is no `.env` beside the manifest. */
33
+ readonly envFileMode?: number;
34
+ /** Set when the manifest could not be loaded at all. Reported, never fatal. */
35
+ readonly problem?: string;
36
+ }
37
+ export declare function isLoopbackHost(host: string): boolean;
38
+ /**
39
+ * What is worth saying about **one agent** when the host that will serve it is installed.
40
+ *
41
+ * ## Four blockers were deleted rather than moved, and each for a reason
42
+ *
43
+ * This was `preflightFindings`, gating `daemon install <agent>`. That install is retired — one
44
+ * service hosts every agent — and with it three of its five blockers became *false* rather than
45
+ * merely unreachable, which is worth recording so nobody restores them:
46
+ *
47
+ * - **`daemon_nothing_to_serve`** refused an agent with no enabled channel and `server.enabled`
48
+ * false, because "a background service would answer nothing". Since 16.3 the host serves every
49
+ * agent over `/v1` whatever that agent's own `server` block says, so an agent with no channel is
50
+ * reachable from a browser and from the API — and a server with *no* agents is the designed
51
+ * first-run state. Refusing here would make "install and the API is up" false.
52
+ * - **`server_public_without_token`** duplicated `serve`'s own bind-time refusal one step earlier,
53
+ * for a host whose address came from that agent's manifest. The unit names no manifest, so its
54
+ * bind comes from the schema's loopback default and this cannot arise. `serve` still refuses it.
55
+ * - **`daemon_label_taken`** was about two agents sharing one per-agent label. There is no
56
+ * per-agent label.
57
+ * - **`daemon_already_serving`** survives as `daemon_agents_held_elsewhere` on the server's own
58
+ * list, as a **warning**: the host now starts and serves everything else rather than refusing,
59
+ * which is 16.2a's partial-lease behaviour applied to an install.
60
+ *
61
+ * What is left is the one thing that is still true per agent and that nothing else says: the mode
62
+ * of the file its credentials live in.
63
+ */
64
+ export declare function agentFindings(facts: AgentFindingFacts): readonly Finding[];
65
+ export declare function binaryWarnings(binary: BinaryFacts): readonly Finding[];
66
+ export interface ServerPreflightFacts {
67
+ readonly binary: BinaryFacts;
68
+ /** Retired per-agent labels found installed, which a bare install cleans up. */
69
+ readonly retiring: readonly string[];
70
+ /** Live leases held by other processes — agents the new unit would not be able to serve. */
71
+ readonly servedElsewhere: readonly {
72
+ readonly agentId: string;
73
+ readonly pid: number;
74
+ readonly mode: string;
75
+ }[];
76
+ }
77
+ /**
78
+ * What to say before installing **the** server unit — a much shorter list, and deliberately so.
79
+ *
80
+ * Every blocker the per-agent list used to carry was a fact about one agent — its channel, its
81
+ * token, its label — and a host that starts with no agents has none of those. `agentFindings` above
82
+ * records which ones were deleted and why each one became false rather than merely unreachable.
83
+ *
84
+ * Nothing here blocks. The one thing that could — a conflicting label — is handled by *retiring* it
85
+ * instead, because that is the only way to leave a working system behind: a per-agent unit left
86
+ * beside the server unit contends for the same lease, so the server would report that agent as
87
+ * served elsewhere indefinitely with nothing looking wrong.
88
+ */
89
+ export declare function serverFindings(facts: ServerPreflightFacts): readonly Finding[];
90
+ /**
91
+ * What a service is doing, in four states rather than two.
92
+ *
93
+ * `running` and `absent` are the easy ones. The pair that matters is `stopped` versus
94
+ * `installed-idle`: a disabled job is simply *not listed* by `launchctl list`, so without the
95
+ * disable registry those two are the same observation — and one of them means "you asked for
96
+ * this" while the other means "it died and launchd gave up".
97
+ */
98
+ export type Verdict = "running" | "failed" | "restart-loop" | "stopped" | "installed-idle" | "absent";
99
+ export interface ServiceFacts {
100
+ readonly installed: boolean;
101
+ readonly disabled: boolean;
102
+ readonly pid?: number;
103
+ readonly runs?: number;
104
+ readonly lastExitCode?: number;
105
+ readonly stderrPath?: string;
106
+ readonly stderrBytes?: number;
107
+ /** From the runtime lease — true even when launchd knows nothing, e.g. a terminal `serve`. */
108
+ readonly leasePid?: number;
109
+ readonly leaseMode?: string;
110
+ readonly leaseStartedAt?: string;
111
+ readonly uptimeMs?: number;
112
+ }
113
+ /**
114
+ * Things a *running* service is saying that a person needs to see.
115
+ *
116
+ * `status` reporting "running" was true and useless: the bot was up, connected, and refusing every
117
+ * message from the one person it had been set up for, because a handle in `allowFrom` was mistyped.
118
+ * The refusal names the sender and the exact line to paste — and writes it to a log file, which is
119
+ * the failure mode this whole phase is a reaction to, reached from a new direction.
120
+ *
121
+ * Health is not the only question. "Is it running" and "is it working" are different, and only the
122
+ * second one is why anybody typed the command.
123
+ */
124
+ export interface Attention {
125
+ readonly code: string;
126
+ readonly summary: string;
127
+ readonly fix: string;
128
+ }
129
+ /**
130
+ * Only the current run.
131
+ *
132
+ * launchd *appends* to a service's log, so a denial from before you fixed the allowlist would
133
+ * otherwise be reported forever — a warning that outlives its cause is one people learn to scroll
134
+ * past, which is how you end up with a screen full of things that are all fine. Each start writes
135
+ * the serving banner, so everything after the last one is this process and nothing else.
136
+ */
137
+ export declare function currentRun(log: string, marker?: string): string;
138
+ /** Lines a running service wrote that mean it is up and not doing its job. */
139
+ export declare function attentionFrom(rawLog: string): readonly Attention[];
140
+ export interface StatusReport {
141
+ readonly verdict: Verdict;
142
+ readonly healthy: boolean;
143
+ readonly headline: string;
144
+ readonly rows: readonly Row[];
145
+ /** Print the tail of stderr. True whenever the thing is not simply running. */
146
+ readonly wantsStderrTail: boolean;
147
+ }
148
+ export declare function summariseStatus(agentId: string, facts: ServiceFacts): StatusReport;
149
+ /** The body of a `status` block, minus the log tail the caller reads from disk. */
150
+ export declare function renderStatus(report: StatusReport): string;
151
+ //# sourceMappingURL=daemon-plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daemon-plan.d.ts","sourceRoot":"","sources":["../../src/lib/daemon-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAA6B,KAAK,GAAG,EAAE,MAAM,aAAa,CAAA;AAEjE,MA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CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,SAAS,EAAE,CA4BlE;AAED,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,CAAA;IAC7B,+EAA+E;IAC/E,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;CACpC;AAKD,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,YAAY,CA0DlF;AAsCD,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAEzD"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Setting one variable in a `.env` without disturbing the rest of it. Pure: text in, text out.
3
+ *
4
+ * The same argument as `yaml-edit.ts`, for the same file's neighbour. A generated `.env` carries
5
+ * comments naming what each variable is for and where to get it, and rewriting the file from a parsed
6
+ * map would drop every one of them — which matters more here than in the manifest, because this is the
7
+ * file somebody opens six months later wondering which dashboard a key came from.
8
+ *
9
+ * Deliberately not a `.env` *parser*: reading one is `parseDotEnv` in core, and a second implementation
10
+ * of that would be two things that have to agree about quoting. This only ever finds a line and
11
+ * replaces it, so the two meet at exactly one place — how a value is quoted on the way out, which is
12
+ * written to be read back by that parser and asserted against it in the tests.
13
+ */
14
+ /** Whether a value needs quoting to survive `parseDotEnv`, and the quoted form if so. */
15
+ export declare function renderEnvValue(value: string): string;
16
+ export interface EnvUpsert {
17
+ readonly text: string;
18
+ /** True when the variable was already there and its line was replaced. */
19
+ readonly replaced: boolean;
20
+ }
21
+ /**
22
+ * Set `name` to `value`, replacing an existing assignment in place or appending a new one.
23
+ *
24
+ * Replacing **in place** rather than appending is what stops the file growing a second, shadowing
25
+ * assignment on every edit — `parseDotEnv` takes the last one, so an append-only writer would leave a
26
+ * file whose earlier lines are lies. A commented-out assignment is left alone: it is documentation,
27
+ * and uncommenting it would resurrect a value somebody deliberately disabled.
28
+ */
29
+ export declare function upsertEnv(source: string, name: string, value: string): EnvUpsert;
30
+ //# sourceMappingURL=dotenv-edit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dotenv-edit.d.ts","sourceRoot":"","sources":["../../src/lib/dotenv-edit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,yFAAyF;AACzF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAiBpD;AAED,MAAM,WAAW,SAAS;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;CAC7B;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAyBhF"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Every environment read the CLI makes.
3
+ *
4
+ * Centralised for the same reason termheat centralises it: an environment variable consulted deep
5
+ * inside a component is untestable and invisible. Everything downstream takes an `EnvFacts` value,
6
+ * so the interesting logic — `resolveMode` especially — is a pure function of its inputs.
7
+ */
8
+ import type { EnvFacts } from "#lib/types";
9
+ export declare function readEnv(env?: Readonly<Record<string, string | undefined>>): EnvFacts;
10
+ //# sourceMappingURL=env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/lib/env.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAU1C,wBAAgB,OAAO,CAAC,GAAG,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAe,GAAG,QAAQ,CAejG"}
@@ -0,0 +1,170 @@
1
+ /**
2
+ * One way out of the process.
3
+ *
4
+ * Two failure modes this exists to prevent, both of which the previous CLI had:
5
+ *
6
+ * **A hidden cursor and a terminal left in raw mode.** Ink hides the cursor and puts stdin in raw
7
+ * mode. `process.exit()` from anywhere else — an error path, a signal, an uncaught rejection —
8
+ * skips React's cleanup, and the shell you get back does not echo what you type. Recovering needs
9
+ * `stty sane`, and nothing tells you that. So the restore is registered on `process.on("exit")`
10
+ * as well as run explicitly: whatever route the process takes out, the terminal is handed back.
11
+ *
12
+ * **Truncated output.** `process.stdout.write` to a *pipe* is asynchronous, and `process.exit()`
13
+ * discards whatever has not flushed — so a `sessions … | head` invocation could lose its last lines,
14
+ * intermittently and only when piped. Measured: 10 MB written and then exited immediately arrives as
15
+ * **65,536 bytes**, one pipe buffer.
16
+ *
17
+ * The rule used to be "set `process.exitCode` and let the event loop drain", and that rule assumed the
18
+ * loop *can* drain. It cannot. A command that boots a runtime leaves a keep-alive TLS socket to the
19
+ * tool provider in Node's global `fetch` pool — `backend.composio.dev:443`, opened by the
20
+ * post-readiness refresh — and that socket is ref'd, with no public API to close it. Measured: the
21
+ * process was still alive **180 seconds** after `/exit`, and the `tools` command had to be killed at 30 s.
22
+ * `^C` appeared to work only because SIGINT is deliberately unhandled here, so the default action kills
23
+ * the process. a `tools --json | jq` invocation would have waited forever.
24
+ *
25
+ * So the rule is now: run the teardowns, drain the output *properly*, then leave. Both halves are
26
+ * load-bearing — draining without leaving is the hang above, and leaving without draining is the
27
+ * truncation above.
28
+ */
29
+ import type { TerminalHandles } from "#lib/schema";
30
+ type Teardown = () => void | Promise<void>;
31
+ /**
32
+ * Declare that the terminal has been put into a state that needs undoing — raw mode, a hidden
33
+ * cursor, alternate styling. Only the rich path does this.
34
+ *
35
+ * Without the flag, the restore would fire on *every* exit, including the plain path, which puts a
36
+ * cursor-and-style reset at the end of output that is otherwise pure text. That breaks the property
37
+ * plain mode exists for: `--plain` at a terminal has to produce exactly what a pipe produces.
38
+ */
39
+ export declare function markTerminalDirty(): void;
40
+ /**
41
+ * Declare that the alternate screen buffer has been entered, so the restore swaps back out of it.
42
+ *
43
+ * Separate from `markTerminalDirty` rather than folded into it, because the two are not the same
44
+ * claim: every rich surface dirties the terminal, and only the ones that *take* it need swapping
45
+ * back. Folding them together would write the leave sequence after every wizard and every chat
46
+ * session, and a `1049l` sent to a terminal that never entered the buffer clears the screen the
47
+ * output was just written to — the plain path's parity rule, broken in the least debuggable way.
48
+ *
49
+ * Setting this and never entering is therefore worse than the reverse. The host that writes
50
+ * `ENTER_ALT_SCREEN` calls this in the same statement.
51
+ */
52
+ export declare function markAltScreen(): void;
53
+ /**
54
+ * The session asked the terminal to report the mouse, so the terminal has to be told to stop.
55
+ *
56
+ * Separate from `markAltScreen` because only the chat reads mouse reports. A surface that enabled
57
+ * tracking without claiming every report would have them typed into it as text, which is what Ink does
58
+ * with one — so the flag follows whoever handles them rather than whoever took the screen.
59
+ *
60
+ * Left on, the shell that gets the terminal back emits a report on every click and scroll, into a prompt
61
+ * that has no idea what they are. That is the failure worth being loud about: it outlives the process.
62
+ */
63
+ export declare function markMouse(): void;
64
+ /**
65
+ * Ink negotiated the kitty keyboard protocol, so the terminal has to be told to stop reporting that way.
66
+ *
67
+ * Ink pops it itself on unmount and around a suspend — this exists for the path it cannot cover, which is
68
+ * the same one `markMouse` exists for: a signal. `SIGTERM` is the only route a service manager uses, and
69
+ * a terminal left in the protocol hands the next shell `CSI u` for every Ctrl chord, which reads as a
70
+ * broken keyboard and outlives the process.
71
+ *
72
+ * Set by the render sites rather than derived, because whether the protocol was actually *pushed* depends
73
+ * on the terminal answering a query 200 ms after mount — so the honest flag is "we asked", and popping a
74
+ * protocol that was never pushed is a no-op on every terminal.
75
+ */
76
+ export declare function markEnhancedKeys(): void;
77
+ /**
78
+ * Run before the process ends. Registration order is preserved and reversed on the way out, so a
79
+ * later-registered resource is released before the thing it depends on.
80
+ */
81
+ export declare function onExit(teardown: Teardown): void;
82
+ /**
83
+ * Take ownership of SIGTERM, for a command whose shutdown *is* the point.
84
+ *
85
+ * The default guard answers SIGTERM with `finishNow(EXIT_SIGTERM)`, which is right for a command
86
+ * that was interrupted: 143 is the shell convention and the work was not finished. It is wrong for
87
+ * `serve`, where a signal is the ordinary and expected way to stop — the work was to stay up, and
88
+ * being asked to stop is the successful end of it, not a failure.
89
+ *
90
+ * That distinction is not cosmetic once a service manager is involved. The generated service
91
+ * definition restarts only on a crash, precisely so a misconfiguration stops once instead of
92
+ * looping forever; a graceful stop reported as 143 is indistinguishable from that misconfiguration,
93
+ * so the supervisor would refuse to bring the agent back.
94
+ *
95
+ * The caller must resolve its own wait on the signal and return an exit code normally. Everything
96
+ * registered with `onExit` still runs, because `finish` awaits the teardowns either way.
97
+ */
98
+ export declare function claimSignals(): void;
99
+ /**
100
+ * Synchronous by necessity — `process.on("exit")` cannot await. Idempotent, because it runs both
101
+ * explicitly and from the exit hook.
102
+ */
103
+ export declare function restoreTerminal(handles?: TerminalHandles): void;
104
+ /** Test seam. Nothing in `src/` outside this module calls it. */
105
+ export declare function resetForTests(options?: {
106
+ readonly dirty?: boolean;
107
+ readonly altScreen?: boolean;
108
+ readonly mouse?: boolean;
109
+ readonly enhancedKeys?: boolean;
110
+ }): void;
111
+ /** Enough of a stream to wait on. Spelled out so a test can supply one without a pipe. */
112
+ interface Drainable {
113
+ write(chunk: string, callback: () => void): unknown;
114
+ readonly writableEnded?: boolean;
115
+ readonly destroyed?: boolean;
116
+ }
117
+ /**
118
+ * Wait until everything written to stdout has actually reached the operating system.
119
+ *
120
+ * This used to test `writableNeedDrain` and await a `drain` event, which is a weaker claim than it
121
+ * reads as: the flag is only true once the buffer is *over* the high-water mark, so a modest pending
122
+ * write to a pipe reported nothing to wait for and the function named "flush" returned immediately.
123
+ * That was survivable while the process went on to idle until the loop emptied, and is not survivable
124
+ * now that it exits on purpose.
125
+ *
126
+ * A zero-length write is the receipt. `Writable` invokes callbacks in write order once the underlying
127
+ * write completes, so a chunk queued behind everything else calls back only after everything else has
128
+ * gone out. Measured against a pipe with a sleeping reader: 10 MB exits complete, where an immediate
129
+ * `process.exit` delivered 65,536 bytes.
130
+ *
131
+ * **The wait is deliberately unbounded.** A timeout would trade a silent truncation for a bounded exit,
132
+ * and with a slow reader — `| less`, a terminal being scrolled — truncation is the worse of the two. A
133
+ * closed reader is not the hazard it looks like: the callback still fires, carrying `EPIPE`.
134
+ *
135
+ * Also awaited between turns, where the point is different: a long session feeding a slow reader
136
+ * accumulates unwritten output in memory, and this bounds that to one turn's worth.
137
+ */
138
+ export declare function flushOutput(stream?: Drainable): Promise<void>;
139
+ /**
140
+ * Everything that has to happen before the process ends: teardowns, the terminal, the exit code, and
141
+ * the output.
142
+ *
143
+ * Sets `process.exitCode` rather than exiting, so a caller that has its own reason to stay alive can.
144
+ * Nothing in `src/` is such a caller any more — the entry point uses `finishNow` — but the split is
145
+ * what makes this testable: a `finish` that exited would take the test runner with it.
146
+ */
147
+ export declare function finish(code: number): Promise<void>;
148
+ /**
149
+ * Finish, and then actually leave.
150
+ *
151
+ * The ordinary way out, not the exceptional one. It was written for a signal or a crash — "where
152
+ * waiting for the loop to drain would mean hanging" — on the assumption that the ordinary path could
153
+ * wait. It cannot: the module docstring records the measurement, a keep-alive socket in the global
154
+ * `fetch` pool that outlived the process by three minutes.
155
+ *
156
+ * Safe to call here and nowhere earlier, because `finish` has already awaited the teardowns and the
157
+ * output. Anything still holding the loop open at this point is a resource with no owner, and waiting
158
+ * on one is what the hang was.
159
+ */
160
+ export declare function finishNow(code: number): Promise<never>;
161
+ /**
162
+ * Guards for the ways a process dies without being asked to.
163
+ *
164
+ * `SIGINT` is deliberately **not** handled here. During a turn it means "cancel this turn", not
165
+ * "exit" — the chat path owns it, and a guard that exited would break the contract Phase 1
166
+ * established and measured.
167
+ */
168
+ export declare function installGuards(): void;
169
+ export {};
170
+ //# sourceMappingURL=exit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exit.d.ts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AW,CAAC,MAAM,GAAE,SAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CAOnF;AAiBD;;;;;;;GAOG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKxD;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAG5D;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,IAAI,CA0BpC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Help text, rendered from the command table.
3
+ *
4
+ * Generated rather than written, so a flag the parser honours cannot be missing from the help and
5
+ * a flag the help promises cannot be missing from the parser. A test asserts exactly that.
6
+ */
7
+ import type { CommandSpec } from "#lib/schema";
8
+ /** Help for one command, or for the whole tool when `command` is absent. */
9
+ export declare function helpText(command?: CommandSpec): string;
10
+ //# sourceMappingURL=help.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/lib/help.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAY,MAAM,aAAa,CAAA;AA8CxD,4EAA4E;AAC5E,wBAAgB,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,CAqCtD"}