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,80 @@
1
+ /**
2
+ * `skills list|show|validate <manifest>` — what this agent knows how to do, and how well it is written.
3
+ *
4
+ * Three questions, deliberately not one command. `list` is the inventory, `show` is one skill in full —
5
+ * including the parts the model never sees, which is the only way to check what it *will* see — and
6
+ * `validate` is the authoring read.
7
+ *
8
+ * `validate` warns and exits 0, with `--strict` for CI. That is the `workspace` split rather than the
9
+ * `validate` one: a skill that does not load already fails here loudly, because this calls the same
10
+ * `loadSkills` the runtime does, and everything past that is a judgement. In particular a missing
11
+ * when-not-to-use is a warning and never a refusal — requiring it would reject every skill vendored from
12
+ * `anthropics/skills` and withdraw decision 6.1's compliance claim to buy a nag.
13
+ *
14
+ * A `ScriptRunner` is supplied here for the same reason `run` supplies one: without it a skill's
15
+ * `scripts/` is never scanned, so `skills list` would report "no scripts" for a skill that ships three.
16
+ * The command answers about the runtime, not about a subset of it.
17
+ */
18
+ /**
19
+ * The actions this command accepts, pinned so `--help` and the switch below cannot drift.
20
+ *
21
+ * The same guard `DAEMON_ACTIONS` gets: a verb added in one place and not the other fails a test rather
22
+ * than at the moment somebody types it.
23
+ */
24
+ export declare const SKILLS_ACTIONS: readonly ["list", "show", "new", "install", "remove", "validate"];
25
+ export interface SkillsOptions {
26
+ readonly manifestPath: string;
27
+ /** `list`, `show` or `validate`. Checked by the dispatcher against the spec's `choices`. */
28
+ readonly action: string;
29
+ /**
30
+ * The skill `show`, `new` and `remove` act on — or, for `install`, the directory to copy from.
31
+ *
32
+ * One positional rather than three, because the parser has one slot after the manifest and a
33
+ * command with `--name`, `--from` and `--skill` flags reads worse than the thing it replaced.
34
+ */
35
+ readonly name?: string;
36
+ readonly json?: boolean;
37
+ /** `validate` only: exit non-zero when anything was reported. */
38
+ readonly strict?: boolean;
39
+ /**
40
+ * The `<ENVPREFIX>HOME` override that says where the source registry and cache live.
41
+ *
42
+ * Deliberately **not** the manifest environment — that one is `ambientEnv` below and answers "which
43
+ * model, which key". This one answers "which `sources.json`", and it exists because `install` resolves
44
+ * a `<source>/<skill>` ref against it: without the field, this command read the real home directory
45
+ * while its caller read a sandbox, so an install driven from a test or from `init` looked up a
46
+ * registry nobody had written to and reported `no source called test` on a source that plainly existed.
47
+ */
48
+ readonly sandboxEnv?: Readonly<Record<string, string | undefined>>;
49
+ /**
50
+ * Extra variables layered on top of the resolved manifest environment.
51
+ *
52
+ * One caller: `init`, which stubs the API key variable it has just written as an empty line. Without
53
+ * it, installing a skill during setup failed with `model.main.apiKeyEnv names MODEL_API_KEY, which is
54
+ * not set` — correct, useless, and about a key nobody could have filled in yet. `init`'s own load
55
+ * check has always done this; the command it calls needed the same courtesy.
56
+ */
57
+ readonly envOverlay?: Readonly<Record<string, string | undefined>>;
58
+ /**
59
+ * Report nothing and let the caller summarise. Set by a batch install.
60
+ *
61
+ * Eleven ticked skills produced **eleven** `from/installed/this installed code/next` blocks — a screenful
62
+ * of repeated narrative for one action, which is what "the TUI should be everything" was objecting to.
63
+ * The per-skill report is right for `skills install <one>` and wrong the moment there are eleven, so the
64
+ * caller decides. `collect` is how it gets the facts it needs to write one summary instead.
65
+ */
66
+ readonly quiet?: boolean;
67
+ /** Appended to, when given: what happened to each skill this call touched. */
68
+ readonly collect?: InstallOutcome[];
69
+ }
70
+ /** What one install did, for a caller aggregating several. */
71
+ export interface InstallOutcome {
72
+ readonly name: string;
73
+ readonly ok: boolean;
74
+ /** Why not, when `ok` is false. */
75
+ readonly reason?: string;
76
+ /** Files that would run, relative to the skills directory. */
77
+ readonly runnable: readonly string[];
78
+ }
79
+ export declare function skillsCommand(options: SkillsOptions): number;
80
+ //# sourceMappingURL=skills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAoDH;;;;;GAKG;AACH,eAAO,MAAM,cAAc,mEAAoE,CAAA;AAE/F,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,4FAA4F;IAC5F,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;IACvB,iEAAiE;IACjE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB;;;;;;;;OAQG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAClE;;;;;;;OAOG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAClE;;;;;;;OAOG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;CACtC;AAED,8DAA8D;AAC9D,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAA;IACpB,mCAAmC;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CACvC;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAkE5D"}
package/dist/soul.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ /**
2
+ * `soul distill <file>` — scaffold a hand-edited compact identity from a long-form document.
3
+ *
4
+ * A scaffold, never a summary. The command copies the document's *structure* — its headings, and
5
+ * its `<rules>` blocks verbatim, because rules are exactly what must survive distillation and
6
+ * copying is not summarising — and leaves a placeholder under each heading for the author to fill.
7
+ * Automatic summarisation of an identity document drops exactly the parts that produce voice,
8
+ * which is why `onUnmet: distill` ships a committed file and not a runtime transformation.
9
+ *
10
+ * The placeholders are the `{{NAME}}` form the `workspace` command already warns about, on
11
+ * purpose: an unedited scaffold keeps reporting itself until a person has written every section.
12
+ */
13
+ export interface SoulOptions {
14
+ readonly action: string;
15
+ readonly file: string;
16
+ readonly out?: string;
17
+ }
18
+ export declare function soulCommand(options: SoulOptions): number;
19
+ //# sourceMappingURL=soul.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"soul.d.ts","sourceRoot":"","sources":["../src/soul.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CACxB;AAOD,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAgDxD"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * `sources list|add|remove|update|search` — the repositories skills are found in.
3
+ *
4
+ * A separate command from `skills`, and the split is the point: **`skills` acts on one agent and always
5
+ * takes a manifest; `sources` is machine-level and never takes one.** Folding these together would have
6
+ * meant a positional whose meaning changes with the verb — the agent for `list`, a sub-verb for
7
+ * `sources`, a query for `search` — which reads badly in `--help` and parses worse. The boundary also
8
+ * happens to be the one this codebase keeps arriving at: what the agent may do is the agent's, and where
9
+ * things come from is the person's.
10
+ *
11
+ * `search` fetches a source that has never been fetched, and never refreshes one that has. That makes
12
+ * the first search work on a new machine with no setup, which is the whole point of shipping defaults,
13
+ * while keeping "go and talk to the network again" an explicit `update`. Both announce what they are
14
+ * doing before they do it, because a command that pauses for nine seconds with no output is
15
+ * indistinguishable from one that has hung — which is exactly the failure this file's git wrapper exists
16
+ * to prevent.
17
+ */
18
+ import { type Git } from "#lib/source-cache";
19
+ export declare const SOURCES_ACTIONS: readonly ["list", "add", "remove", "update", "search"];
20
+ export interface SourcesOptions {
21
+ readonly action: string;
22
+ /** Everything after the action: a name, a URL, a query. Meaning is the action's. */
23
+ readonly rest: readonly string[];
24
+ readonly path?: string;
25
+ readonly ref?: string;
26
+ readonly json?: boolean;
27
+ /** Injected by the tests, which never reach a network. */
28
+ readonly git?: Git;
29
+ readonly env?: Readonly<Record<string, string | undefined>>;
30
+ }
31
+ export declare function sourcesCommand(options: SourcesOptions): Promise<number>;
32
+ //# sourceMappingURL=sources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../src/sources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EAGH,KAAK,GAAG,EAIX,MAAM,mBAAmB,CAAA;AAY1B,eAAO,MAAM,eAAe,wDAAyD,CAAA;AAErF,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,oFAAoF;IACpF,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;IACvB,0DAA0D;IAC1D,QAAQ,CAAC,GAAG,CAAC,EAAE,GAAG,CAAA;IAClB,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;CAC9D;AAKD,wBAAsB,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA4B7E"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `start <agent>` — the other half of `stop <agent>`.
3
+ *
4
+ * Switches the durable flag back on and, when something is already serving, asks that host to adopt
5
+ * the agent so it is live before this command returns. Nothing else restarts: the host keeps its
6
+ * other agents, their conversations and their channels.
7
+ *
8
+ * **Why this is not `daemon start`.** That one starts a *service* — a process. This one starts an
9
+ * *agent*, which since 16.2a is a different thing: one process hosts several, and the question "is
10
+ * milo running" stopped being answerable by looking at pids. `daemon start` brings the host back;
11
+ * this decides what the host holds.
12
+ *
13
+ * **The row is written even when no host is reachable**, and that is the point rather than a
14
+ * fallback. `stop` persists, so the only thing that can undo it is a write — and an agent enabled
15
+ * while nothing is running comes up at the next start, which is exactly what somebody switching it
16
+ * back on at 2am before a morning restart is asking for.
17
+ */
18
+ export interface StartOptions {
19
+ /** Absolute manifest path. Required — there is no "start everything", see below. */
20
+ readonly manifestPath: string;
21
+ /** The database to read leases and state from. Defaults to the sandbox's. */
22
+ readonly store?: string;
23
+ readonly json?: boolean;
24
+ }
25
+ export declare function startCommand(options: StartOptions): Promise<number>;
26
+ //# sourceMappingURL=start.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,MAAM,WAAW,YAAY;IACzB,oFAAoF;IACpF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAiGzE"}
package/dist/stop.d.ts ADDED
@@ -0,0 +1,58 @@
1
+ /**
2
+ * `stop [agent]` — the switch that turns everything off.
3
+ *
4
+ * Every other way to stop an agent needs you to know what is running first: `daemon stop` needs the
5
+ * label, ctrl-c needs the terminal that started it, `kill` needs the pid. This one needs nothing —
6
+ * it finds the services *and* the loose `serve` you left in a tab three days ago, stops both, and
7
+ * says what it stopped. That is the whole design brief: a person reaching for this is not in a
8
+ * position to go looking.
9
+ *
10
+ * **Stopped means stopped.** A service is disabled as well as unloaded, because `bootout` alone
11
+ * comes back at the next login and "I stopped it and it was running again after lunch" is the exact
12
+ * failure a safety switch may not have. Reversible, loudly: the output names `daemon start`.
13
+ *
14
+ * **SIGTERM first, always.** A graceful stop is the only path that runs `provider.stop()`, which
15
+ * reaps the child processes `exec` backgrounded — so killing hard to be thorough is how you end up
16
+ * with the orphans that took this machine to a load average of 351. SIGKILL is the last resort,
17
+ * after a grace period, and it says out loud what may have been left behind.
18
+ *
19
+ * ## Naming an agent and naming nothing are different commands
20
+ *
21
+ * They were the same command with a filter until one process could host several agents, at which
22
+ * point the filter became wrong: killing the process that holds `milo`'s lease takes `alpha` and
23
+ * `beta` down with it. So:
24
+ *
25
+ * - **`stop <agent>`** writes that agent off in the store and asks its host to drop it. The host
26
+ * keeps running, every other agent it holds keeps running, and the row is what makes it stay off
27
+ * across a restart. It does **not** touch any service: a service hosting three agents is not
28
+ * something to unload because one of them was switched off.
29
+ * - **`stop`** is unchanged — the whole host goes down, services disabled so they stay down, and
30
+ * nothing per-agent is written. That asymmetry is deliberate: `daemon start` should bring back
31
+ * exactly what was running, and an agent stopped by name should still be off when it does.
32
+ *
33
+ * The per-agent path falls back to signalling the process when the lease carries no address, which
34
+ * is a `run` REPL or an embedded runtime — real states that serve no HTTP, and the only ones where
35
+ * "stop this agent" and "stop that process" are still the same thing.
36
+ */
37
+ import { type Exec } from "#lib/service";
38
+ export interface StopOptions {
39
+ /**
40
+ * Absolute manifest path. Omitted means the whole host — see the file comment.
41
+ *
42
+ * Present and absent are two different commands rather than one with a filter: naming an agent
43
+ * writes the durable switch and asks its host to drop it, and naming nothing takes the host
44
+ * down. Conflating them is how stopping one agent stopped three.
45
+ */
46
+ readonly manifestPath?: string;
47
+ /** Why, recorded on the row and shown wherever the agent is reported as off. */
48
+ readonly reason?: string;
49
+ /** The database to read leases and state from. Defaults to the sandbox's. */
50
+ readonly store?: string;
51
+ readonly dryRun?: boolean;
52
+ readonly json?: boolean;
53
+ /** Test seams. Nothing in `src/` outside this file passes them. */
54
+ readonly exec?: Exec;
55
+ readonly platform?: string;
56
+ }
57
+ export declare function stopCommand(options: StopOptions): Promise<number>;
58
+ //# sourceMappingURL=stop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stop.d.ts","sourceRoot":"","sources":["../src/stop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AASH,OAAO,EAAE,KAAK,IAAI,EAA8C,MAAM,cAAc,CAAA;AAMpF,MAAM,WAAW,WAAW;IACxB;;;;;;OAMG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,gFAAgF;IAChF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;IACvB,mEAAmE;IACnE,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAA;IACpB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAC7B;AAkBD,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAKvE"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * `terminal-setup` — teach this terminal to send shift+enter.
3
+ *
4
+ * The one command in this binary that edits a file outside the workspace and outside the sandbox. So the
5
+ * rules are stricter than anywhere else, and they are the rules the plan set:
6
+ *
7
+ * 1. **Show the change before making it.** The file and the exact line, printed.
8
+ * 2. **Ask, unless told not to.** `--yes` skips the question, `--dry-run` writes nothing at all.
9
+ * 3. **Back the file up first**, beside itself, so an unwanted change is one `mv` from undone.
10
+ * 4. **Never rewrite a file it cannot parse.** For VS Code that means valid JSON; a config it does not
11
+ * understand is reported and left alone, because a broken keybindings file is a worse outcome than
12
+ * an unconfigured chord.
13
+ *
14
+ * A terminal whose configuration is a binary plist is *explained* rather than written — see
15
+ * `lib/terminal.ts` for why writing one would report success and change nothing.
16
+ *
17
+ * None of this is required to use the runtime: ⌥⏎ works everywhere without it.
18
+ */
19
+ export interface TerminalSetupOptions {
20
+ readonly dryRun?: boolean;
21
+ readonly yes?: boolean;
22
+ readonly json?: boolean;
23
+ /** Injected by tests; the process environment otherwise. */
24
+ readonly env?: Readonly<Record<string, string | undefined>>;
25
+ /** Injected by tests, so no test writes into a real home directory. */
26
+ readonly home?: string;
27
+ /** Asks the question. Absent means non-interactive, which is treated as "no". */
28
+ readonly confirm?: (question: string) => Promise<boolean>;
29
+ }
30
+ export declare function terminalSetupCommand(options: TerminalSetupOptions): Promise<number>;
31
+ //# sourceMappingURL=terminal-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminal-setup.d.ts","sourceRoot":"","sources":["../src/terminal-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAiBH,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;IACvB,4DAA4D;IAC5D,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAC3D,uEAAuE;IACvE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,iFAAiF;IACjF,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CAC5D;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAuEzF"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The `tools` command: `<binary> tools <manifest> [--warm]`.
3
+ *
4
+ * Two jobs, and the split matters.
5
+ *
6
+ * Without `--warm` it boots the runtime and prints the catalogue the model will actually see. That is
7
+ * the same view the in-session `/tools` command renders, from the same `toolsReport` — a second
8
+ * formatter would eventually disagree with the first about what is pinned.
9
+ *
10
+ * With `--warm` it does **not** boot. It loads the manifest, constructs the provider directly, and
11
+ * fetches every pinned slug into the resolution cache. Booting would be circular: a remote provider
12
+ * resolves from disk so that nothing touches the network before `runtime.ready`, so an empty cache
13
+ * fails the load on unresolved slugs — which means the post-readiness refresh that would have filled
14
+ * the cache never runs. This command is how the cache gets its first contents.
15
+ */
16
+ export interface ToolsOptions {
17
+ readonly manifestPath: string;
18
+ readonly warm?: boolean;
19
+ readonly json?: boolean;
20
+ }
21
+ export declare function toolsCommand(options: ToolsOptions): Promise<number>;
22
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAeH,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAC1B;AAUD,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAEzE"}
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Events in, view state out. Pure, and the only place that decides what a turn looks like.
3
+ *
4
+ * The CLI has always been a `runtime.bus` subscriber; this makes it a *reducer* over that bus
5
+ * instead of a set of callbacks writing to stdout. Three things follow from that:
6
+ *
7
+ * - "What does the reader see when a turn errors mid-stream?" is a unit test rather than something
8
+ * reproduced by hand against a live endpoint.
9
+ * - Finished items are append-only and immutable, which is exactly the contract Ink's `<Static>`
10
+ * needs: a node written once and never re-rendered. The still-moving reply lives in `live`, so
11
+ * the dynamic region stays one item regardless of how long the conversation gets.
12
+ * - Phase 4's SSE client and Phase 12's TUI client can consume the same reduction instead of
13
+ * re-deriving it.
14
+ *
15
+ * No clock and no randomness: ids come from a counter in the state, so the same events always
16
+ * produce the same output and the tests need no fakes.
17
+ */
18
+ import { type AnyEvent } from "@dispach/core";
19
+ import type { TranscriptItem, TranscriptRow, TranscriptState, TurnStats } from "#lib/types";
20
+ /**
21
+ * The transcript is driven by more than the bus — a typed line and a cancellation request are not
22
+ * events — so the reducer takes an action union rather than an event directly.
23
+ */
24
+ export type TranscriptAction = {
25
+ readonly kind: "user";
26
+ readonly text: string;
27
+ } | {
28
+ readonly kind: "event";
29
+ readonly event: AnyEvent;
30
+ } | {
31
+ readonly kind: "note";
32
+ readonly text: string;
33
+ } | {
34
+ readonly kind: "cancelling";
35
+ }
36
+ /**
37
+ * A model delta that has already been through the dialect's stream filter.
38
+ *
39
+ * Filtering cannot happen in here: a filter is stateful and this reducer is pure. So the caller
40
+ * owns one per step and dispatches what is left. A caller that dispatches the raw `model.chunk`
41
+ * event instead still works — it just shows the invocation blocks, which is right for a dialect
42
+ * with no in-band protocol and wrong for NLT.
43
+ */
44
+ | {
45
+ readonly kind: "delta";
46
+ readonly of: "text" | "reasoning";
47
+ readonly text: string;
48
+ }
49
+ /**
50
+ * Drop the oldest items if the buffer is over `MAX_TRANSCRIPT_ITEMS`.
51
+ *
52
+ * An action rather than something `append` does on its own, because whether it is *safe* depends on
53
+ * a fact this reducer cannot see: rows are addressed by position, so dropping any from the front
54
+ * moves every offset below them. A reader parked twelve turns back would keep their offset and
55
+ * silently start reading different text — the appearance of a live session that is not one, which is
56
+ * the failure `ScrollState.pinned` exists to make impossible. Only the layer holding that flag knows
57
+ * when eviction is allowed, so only it can ask.
58
+ */
59
+ | {
60
+ readonly kind: "trim";
61
+ };
62
+ export declare const EMPTY_TRANSCRIPT: TranscriptState;
63
+ /** `data` is typed per event in core's map; narrowing by `type` first is what makes this safe. */
64
+ export declare function reduce(state: TranscriptState, action: TranscriptAction): TranscriptState;
65
+ /** What a renderer writes for a turn's cost. Kept here so the plain and rich paths agree. */
66
+ export declare function formatStats(stats: TurnStats): string;
67
+ /**
68
+ * Opening banner — version, session, store, any turn a previous process left unfinished.
69
+ *
70
+ * One `banner` item rather than N notes, so the rich renderer can box it as a unit. The plain
71
+ * path never calls this — it writes the lines directly — so plain output is unchanged by the
72
+ * boxing.
73
+ */
74
+ export declare function seed(notes: readonly string[]): TranscriptState;
75
+ /** One earlier message, as much of it as a transcript row needs. */
76
+ export interface PriorMessage {
77
+ readonly role: "user" | "assistant";
78
+ readonly text: string;
79
+ }
80
+ /**
81
+ * Put the conversation that already happened on the screen.
82
+ *
83
+ * Resuming used to paint an empty transcript over a full history: the messages reached the *model* and
84
+ * never the person, so the banner said `17 message(s)` above a blank screen and the only honest reading
85
+ * was that something had been lost. Rendering them is what makes that count verifiable.
86
+ *
87
+ * A separate function rather than a second argument to `seed`, because an optional parameter here would
88
+ * have to distinguish "no history" from "not asked for" — and under `exactOptionalPropertyTypes` a
89
+ * default parameter fires on an explicitly passed `undefined`, which has already cost this repo a
90
+ * debugging round. `seedHistory(seed(banner), prior)` composes with nothing to remember.
91
+ *
92
+ * **Prose only.** Tool calls and observations are left out for the same reason they are left out of the
93
+ * memory index: an observation is a wall of text a stranger wrote, and replaying forty of them above the
94
+ * composer buries the conversation the person came back for. The turn statistics are left off too — they
95
+ * were true of a process that has exited, and a cost line under a resumed reply reads as this session's.
96
+ */
97
+ export declare function seedHistory(state: TranscriptState, messages: readonly PriorMessage[]): TranscriptState;
98
+ /** The most recent completed turn's cost, for the status bar. */
99
+ export declare function lastStats(items: readonly TranscriptItem[]): TurnStats | undefined;
100
+ /**
101
+ * Flatten items into the rows a windowed transcript scrolls through.
102
+ *
103
+ * ## Why rows rather than items
104
+ *
105
+ * Scrolling by item is the cheaper thing to build and the wrong unit. One assistant reply is a single
106
+ * item and forty rows on screen, so an item-indexed window either shows the whole answer or none of it —
107
+ * page-up from the bottom of a long reply would jump over the entire thing and land on the question
108
+ * before it. Rows are what a reader moves through, so rows are what the offset counts.
109
+ *
110
+ * Wrapping happens here, not in Ink. A window has to know its content's height before it draws any of
111
+ * it, and a count Ink might disagree with is a window off by however many lines wrapped — which shows up
112
+ * as the last line of a reply hidden under the composer, intermittently, depending on the text.
113
+ *
114
+ * Pure, and one derivation for both halves of the frame: the component renders these rows and the layout
115
+ * asks how many there are.
116
+ */
117
+ export declare function transcriptRows(items: readonly TranscriptItem[], options: {
118
+ readonly showReasoning: boolean;
119
+ readonly quiet: boolean;
120
+ readonly columns: number;
121
+ /** Reasoning blocks are shown whole rather than folded to `REASONING_FOLD_ROWS`. */
122
+ readonly expandReasoning?: boolean;
123
+ }): readonly TranscriptRow[];
124
+ //# sourceMappingURL=transcript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../src/transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,KAAK,QAAQ,EAAW,MAAM,eAAe,CAAA;AAGtD,OAAO,KAAK,EACR,cAAc,EAEd,aAAa,EACb,eAAe,EACf,SAAS,EACZ,MAAM,YAAY,CAAA;AAGnB;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GACtB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAA;CAAE,GACpD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAAE;AACjC;;;;;;;GAOG;GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AACtF;;;;;;;;;GASG;GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAE/B,eAAO,MAAM,gBAAgB,EAAE,eAM9B,CAAA;AA6CD,kGAAkG;AAClG,wBAAgB,MAAM,CAAC,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,gBAAgB,GAAG,eAAe,CAsBxF;AAqPD,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,eAAe,CAG9D;AAED,oEAAoE;AACpE,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAA;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACxB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CACvB,KAAK,EAAE,eAAe,EACtB,QAAQ,EAAE,SAAS,YAAY,EAAE,GAClC,eAAe,CAOjB;AAED,iEAAiE;AACjE,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,GAAG,SAAS,CAMjF;AAID;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAC1B,KAAK,EAAE,SAAS,cAAc,EAAE,EAChC,OAAO,EAAE;IACL,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,oFAAoF;IACpF,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CACrC,GACF,SAAS,aAAa,EAAE,CAsH1B"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * `validate` — load a manifest through exactly the same path `run` uses, then report.
3
+ *
4
+ * Sharing the load path is the point. A validator that approves a manifest the runtime then refuses
5
+ * is worse than no validator, so this calls `loadManifest` rather than reimplementing any part of it.
6
+ *
7
+ * Synchronous, and it imports neither Ink nor React. That is what keeps it at ~70 ms: the rich
8
+ * renderer costs ~170-210 ms to import under Node, which would be most of this command's runtime.
9
+ */
10
+ import type { ValidateOptions } from "#lib/schema";
11
+ /**
12
+ * Async since Phase 9A, and only because plugin resolution is.
13
+ *
14
+ * `validate` used to check `tools.providers` and a channel `type` against this binary's static
15
+ * tables while `run` checked them against those tables *plus* whatever the manifest's plugins
16
+ * registered. So a manifest naming a third-party provider booted fine and validated as broken —
17
+ * the recorded asymmetry, in the direction that tells somebody their working agent is
18
+ * misconfigured. `agentPluginSupply` is the one function both now call.
19
+ */
20
+ export declare function validateCommand(options: ValidateOptions): Promise<number>;
21
+ /**
22
+ * What `promptCache` means for the prompt this runtime actually sends.
23
+ *
24
+ * The field says what the runtime **sends**, not what the endpoint **does**, and `none` therefore has
25
+ * two causes that want opposite conclusions. On DeepSeek it means no cache directives are sent and the
26
+ * endpoint caches automatically regardless — measured at 89.4% on a real session, so a note reading
27
+ * "no caching here" would be plainly false. On Claude it means the OpenAI-compatible transport cannot
28
+ * cache at all, and no request field would change that.
29
+ *
30
+ * So the sentence is keyed on the model, and the general half points at the measurement rather than
31
+ * asserting anything: `/context` reports the ratio the endpoint actually charged. The first draft of
32
+ * this function did assert, fired on DeepSeek, and contradicted a measurement taken an hour earlier —
33
+ * the same "accurate about the wrong scope" failure the Claude row itself was guilty of.
34
+ */
35
+ export declare function cacheNote(promptCache: string, modelId: string): string;
36
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAsBH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAkP/E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAStE"}
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import{e}from"./index-2cvtz0fy.js";import"./index-b5wwtxzk.js";import{An}from"./index-9pj1ws0p.js";import{Oe,Ne,wt,Ye}from"./index-rqzg861g.js";import"./index-7da4fqcr.js";import{pe}from"./index-xqyms08r.js";import{n,s}from"./index-my5cjx00.js";function p(r){if(r==="darwin")return{command:"open",args:[]};if(r==="linux")return{command:"xdg-open",args:[]};if(r==="win32")return{command:"cmd",args:["/c","start",""]};return}var l=5000;async function u(r,o={}){if(o.noOpen===!0)return{opened:!1,refusal:"asked-not-to"};if(o.isTty!==!0)return{opened:!1,refusal:"not-a-terminal"};let t=p(o.platform??process.platform);if(t===void 0)return{opened:!1,refusal:"no-opener"};let a=await(o.spawn??pe)({command:t.command,args:[...t.args,r],timeoutMs:l});if(a.notFound)return{opened:!1,refusal:"no-opener"};if(a.code!==0||a.signalled)return{opened:!1,refusal:"opener-failed",...a.stderr.trim()===""?{}:{detail:a.stderr.trim()}};return{opened:!0}}function f(r,o){if(o.opened)return`opening ${r}`;switch(o.refusal){case"asked-not-to":return r;case"not-a-terminal":return r;case"no-opener":return`no browser here — open this from a machine that has one:
3
+ ${r}`;default:return`could not open a browser${o.detail===void 0?"":` (${o.detail})`} — open this:
4
+ ${r}`}}function m(r,o){let t=new URL(r);if(t.pathname="/",t.hostname=An(t.hostname),o!==void 0&&o!=="")t.searchParams.set("agent",o);return t.toString()}async function T(r){let o=r.action??"run",t=r.manifestPath===void 0?void 0:wt(r.manifestPath),i=t===void 0?await Ne(r.store):await Oe(t,r.store);if(i?.baseUrl===void 0||i.baseUrl==="")return process.stderr.write(`no ${e.name} server is running${t===void 0?"":` for "${t}"`}.
5
+ hint: ${e.slug} serve${t===void 0?"":` ${t}`} starts one in this terminal, and ${e.slug} daemon install keeps it running.
6
+ `),s;let a=m(i.baseUrl,t);if(o==="url")return process.stdout.write(`${a}
7
+ `),n;let d=await u(a,{isTty:process.stdout.isTTY===!0,...r.noOpen===!0?{noOpen:!0}:{}});if(process.stdout.write(`${f(a,d)}
8
+ `),!d.opened&&r.json===!0)process.stdout.write(`${JSON.stringify({url:a,opened:!1,why:d.refusal})}
9
+ `);if(d.opened&&Ye(r.manifestPath??"")!==void 0)process.stdout.write(` if the page asks for a credential, mint one:
10
+ ${e.slug} keys new --label 'my browser'
11
+ `);return n}export{T as webCommand};
12
+
13
+ //# debugId=A8CB8EDE13FC0C2E64756E2164756E21
14
+ //# sourceMappingURL=web-w7r68df1.js.map
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/lib/browser.ts", "../src/web.ts"],
4
+ "sourcesContent": [
5
+ "/**\n * Opening a URL in whatever the operating system thinks a browser is.\n *\n * Nothing in this repo opened a browser before, and the temptation is a dependency — there are\n * several, and every one of them is this file plus a matrix of platforms nobody here runs. What it\n * actually takes is one command per platform and an honest answer when there is no browser at all,\n * which is the case that matters most: **a container has none**, and the container is where this\n * runtime is deployed. So \"could not open\" is a first-class outcome with the URL printed beside it,\n * not an error.\n *\n * Three properties, each of which was a decision:\n *\n * **It never blocks.** `open`/`xdg-open` hand off to a browser and exit, but `xdg-open` on a box\n * with no desktop can sit there — and a command that hangs while claiming to have opened a page is\n * worse than one that prints a link. Every call is bounded.\n *\n * **It never fails the command.** The URL is the deliverable; the browser is a convenience. A\n * non-zero exit from `open` means the operator gets a link to click instead, which is exactly what\n * they would have got from `web url`.\n *\n * **It refuses without a TTY.** A piped or scripted run must not sprout a browser window on\n * somebody's screen — and in CI it would open nothing and waste a timeout finding out.\n */\n\nimport { spawnCaptureAsync } from \"#lib/spawn\"\n\n/** Why a URL was not opened. Absent means it was. */\nexport type OpenRefusal =\n /** No terminal, so nothing asked for a window. */\n | \"not-a-terminal\"\n /** `--no-open`. */\n | \"asked-not-to\"\n /** No opener on this platform — a container, a bare server, an unrecognised OS. */\n | \"no-opener\"\n /** There is an opener and it said no. */\n | \"opener-failed\"\n\nexport interface OpenOutcome {\n readonly opened: boolean\n readonly refusal?: OpenRefusal\n /** What the opener said, when it said something worth repeating. */\n readonly detail?: string\n}\n\n/**\n * The command that opens a URL, per platform.\n *\n * `xdg-open` is the freedesktop standard and is what Linux desktops implement; a *server* has none,\n * which is the honest reason this can return nothing. Windows needs the `\"\"` title argument before\n * the URL, because `start` reads a first quoted argument as the window title and would otherwise\n * open a console named after the address.\n */\nfunction openerFor(platform: string): { command: string; args: readonly string[] } | undefined {\n if (platform === \"darwin\") return { command: \"open\", args: [] }\n if (platform === \"linux\") return { command: \"xdg-open\", args: [] }\n if (platform === \"win32\") return { command: \"cmd\", args: [\"/c\", \"start\", \"\"] }\n return undefined\n}\n\n/** Bounded: `xdg-open` on a box with no desktop session can sit indefinitely. */\nconst OPEN_TIMEOUT_MS = 5_000\n\nexport async function openInBrowser(\n url: string,\n options: {\n readonly platform?: string\n readonly isTty?: boolean\n readonly noOpen?: boolean\n readonly spawn?: typeof spawnCaptureAsync\n } = {},\n): Promise<OpenOutcome> {\n if (options.noOpen === true) return { opened: false, refusal: \"asked-not-to\" }\n if (options.isTty !== true) return { opened: false, refusal: \"not-a-terminal\" }\n\n const opener = openerFor(options.platform ?? process.platform)\n if (opener === undefined) return { opened: false, refusal: \"no-opener\" }\n\n const run = options.spawn ?? spawnCaptureAsync\n const result = await run({\n command: opener.command,\n args: [...opener.args, url],\n timeoutMs: OPEN_TIMEOUT_MS,\n })\n\n // `notFound` is its own answer: `xdg-open` missing means this is a server or a container, which\n // is a fact about the deployment rather than a failure to report as one.\n if (result.notFound) return { opened: false, refusal: \"no-opener\" }\n if (result.code !== 0 || result.signalled) {\n return {\n opened: false,\n refusal: \"opener-failed\",\n ...(result.stderr.trim() === \"\" ? {} : { detail: result.stderr.trim() }),\n }\n }\n return { opened: true }\n}\n\n/**\n * What to print. One sentence, and it always ends with the URL.\n *\n * The URL is the deliverable in every branch — including success, because a browser that opened\n * behind another window looks like nothing happened, and because a terminal that prints the link is\n * one somebody can copy out of over SSH.\n */\nexport function openMessage(url: string, outcome: OpenOutcome): string {\n if (outcome.opened) return `opening ${url}`\n switch (outcome.refusal) {\n case \"asked-not-to\":\n return url\n case \"not-a-terminal\":\n return url\n case \"no-opener\":\n // Named rather than apologised for: this is the ordinary state inside a container, and\n // an operator reading \"failed to open a browser\" would go looking for a fault.\n return `no browser here — open this from a machine that has one:\\n ${url}`\n default:\n return `could not open a browser${outcome.detail === undefined ? \"\" : ` (${outcome.detail})`} — open this:\\n ${url}`\n }\n}\n",
6
+ "/**\n * The `web` command — the browser as a second view onto the same running agent.\n *\n * The terminal twin of 17.1, and it exists for the same reason: the server owns the agent, and a\n * front end attaches. `run` opens a terminal onto a host; this opens a browser onto the same one,\n * at the same address, holding the same conversation. Neither starts or stops anything.\n *\n * ## Why this is three verbs and not one\n *\n * `run` is what a person types. It needs a host, so it declares `needsServer` and the first-run\n * bootstrap gets one. `open` assumes a host is already there and says so when it is not — the\n * difference matters on a machine where starting a service is not wanted. `url` prints and opens\n * nothing, which is the only form that works in a pipe, in CI, and over SSH.\n *\n * ## The container\n *\n * There is no browser in a container and there never will be, so `no-opener` is an ordinary answer\n * rather than a failure: the URL is printed and the operator opens it from the machine whose port\n * is published. This is the deployment target, so it is the case the wording is written for.\n */\n\nimport { BRAND } from \"@dispach/core\"\nimport { browsableHost } from \"@dispach/server\"\nimport { openInBrowser, openMessage } from \"#lib/browser\"\nimport { EXIT_FAILURE, EXIT_OK } from \"#lib/const\"\nimport { agentIdFor, anyLiveHost, hostToken, liveHostOf } from \"#lib/lifecycle\"\nimport type { WebOptions } from \"#lib/schema\"\n\n/**\n * Where the page lives, with the agent it should open.\n *\n * `?agent=` rather than `/agents/milo` for the reason `04-SPEC-WIRE.md` gives for having no\n * catch-all: a path needs a route, a `WEB_ASSETS` entry, a spec row and a `spec.test.ts` change,\n * and a wildcard would make `/v1/agentss` answer `200 text/html`. A query parameter needs none of\n * them, and the page reads it.\n *\n * No credential is attached. A claim is minted at boot and printed by `serve`, deliberately once —\n * a fresh one per invocation would leave a standing credential in a log — and a durable key in an\n * address bar lands in history, a bookmark and whatever syncs them. The page asks when it has to.\n */\nexport function webUrl(baseUrl: string, agentId?: string): string {\n const url = new URL(baseUrl)\n url.pathname = \"/\"\n /**\n * A bind is not an address, and the container is where that stops being theoretical.\n *\n * The lease publishes what was actually bound, which inside the image is `0.0.0.0` — every\n * interface, and a link no browser can open. `browsableHost` is the same substitution\n * `claimUrl` has always made, shared rather than copied a third time. Found by running this\n * *in the container*: on a laptop `serve` binds `127.0.0.1` and the substitution never fires,\n * so the defect is invisible everywhere except where it is deployed.\n */\n url.hostname = browsableHost(url.hostname)\n if (agentId !== undefined && agentId !== \"\") url.searchParams.set(\"agent\", agentId)\n return url.toString()\n}\n\nexport async function webCommand(options: WebOptions): Promise<number> {\n const action = options.action ?? \"run\"\n const agentId =\n options.manifestPath === undefined ? undefined : agentIdFor(options.manifestPath)\n\n /**\n * Which host, and the same two-part answer `stop` and `run` use.\n *\n * A lease says who is serving an agent; its `base_url` says where, and is published after the\n * bind rather than derived from a manifest — `--port 0` means the port does not exist until the\n * socket does. With no agent named, any live host will do: the page lists what it hosts.\n */\n const lease =\n agentId === undefined\n ? await anyLiveHost(options.store)\n : await liveHostOf(agentId, options.store)\n\n if (lease?.baseUrl === undefined || lease.baseUrl === \"\") {\n process.stderr.write(\n `no ${BRAND.name} server is running${agentId === undefined ? \"\" : ` for \"${agentId}\"`}.\\n` +\n ` hint: ${BRAND.slug} serve${agentId === undefined ? \"\" : ` ${agentId}`} starts one in this terminal, and ${BRAND.slug} daemon install keeps it running.\\n`,\n )\n return EXIT_FAILURE\n }\n\n const url = webUrl(lease.baseUrl, agentId)\n if (action === \"url\") {\n // Only the URL, on stdout, with nothing else — this is the form a script reads.\n process.stdout.write(`${url}\\n`)\n return EXIT_OK\n }\n\n const outcome = await openInBrowser(url, {\n isTty: process.stdout.isTTY === true,\n ...(options.noOpen === true ? { noOpen: true } : {}),\n })\n process.stdout.write(`${openMessage(url, outcome)}\\n`)\n\n // A browser that did not open is not a failed command: the URL is the deliverable and it has\n // been printed. `web url` exists for the caller that wants only that and no sentence around it.\n if (!outcome.opened && options.json === true) {\n process.stdout.write(`${JSON.stringify({ url, opened: false, why: outcome.refusal })}\\n`)\n }\n\n // The credential the page may ask for, named where somebody is already looking — and only when\n // this server has one to demand. A token-less loopback server needs nothing, and telling its\n // operator to mint a key would send them after a problem they do not have.\n if (outcome.opened && hostToken(options.manifestPath ?? \"\") !== undefined) {\n process.stdout.write(\n ` if the page asks for a credential, mint one:\\n` +\n ` ${BRAND.slug} keys new --label 'my browser'\\n`,\n )\n }\n return EXIT_OK\n}\n"
7
+ ],
8
+ "mappings": ";qPAoDA,SAAS,CAAS,CAAC,EAA4E,CAC3F,GAAI,IAAa,SAAU,MAAO,CAAE,QAAS,OAAQ,KAAM,CAAC,CAAE,EAC9D,GAAI,IAAa,QAAS,MAAO,CAAE,QAAS,WAAY,KAAM,CAAC,CAAE,EACjE,GAAI,IAAa,QAAS,MAAO,CAAE,QAAS,MAAO,KAAM,CAAC,KAAM,QAAS,EAAE,CAAE,EAC7E,OAIJ,IAAM,EAAkB,KAExB,eAAsB,CAAa,CAC/B,EACA,EAKI,CAAC,EACe,CACpB,GAAI,EAAQ,SAAW,GAAM,MAAO,CAAE,OAAQ,GAAO,QAAS,cAAe,EAC7E,GAAI,EAAQ,QAAU,GAAM,MAAO,CAAE,OAAQ,GAAO,QAAS,gBAAiB,EAE9E,IAAM,EAAS,EAAU,EAAQ,UAAY,QAAQ,QAAQ,EAC7D,GAAI,IAAW,OAAW,MAAO,CAAE,OAAQ,GAAO,QAAS,WAAY,EAGvE,IAAM,EAAS,MADH,EAAQ,OAAS,IACJ,CACrB,QAAS,EAAO,QAChB,KAAM,CAAC,GAAG,EAAO,KAAM,CAAG,EAC1B,UAAW,CACf,CAAC,EAID,GAAI,EAAO,SAAU,MAAO,CAAE,OAAQ,GAAO,QAAS,WAAY,EAClE,GAAI,EAAO,OAAS,GAAK,EAAO,UAC5B,MAAO,CACH,OAAQ,GACR,QAAS,mBACL,EAAO,OAAO,KAAK,IAAM,GAAK,CAAC,EAAI,CAAE,OAAQ,EAAO,OAAO,KAAK,CAAE,CAC1E,EAEJ,MAAO,CAAE,OAAQ,EAAK,EAUnB,SAAS,CAAW,CAAC,EAAa,EAA8B,CACnE,GAAI,EAAQ,OAAQ,MAAO,WAAW,IACtC,OAAQ,EAAQ,aACP,eACD,OAAO,MACN,iBACD,OAAO,MACN,YAGD,MAAO;AAAA,IAA+D,YAEtE,MAAO,2BAA2B,EAAQ,SAAW,OAAY,GAAK,KAAK,EAAQ;AAAA,IAA6B,KC5ErH,SAAS,CAAM,CAAC,EAAiB,EAA0B,CAC9D,IAAM,EAAM,IAAI,IAAI,CAAO,EAY3B,GAXA,EAAI,SAAW,IAUf,EAAI,SAAW,GAAc,EAAI,QAAQ,EACrC,IAAY,QAAa,IAAY,GAAI,EAAI,aAAa,IAAI,QAAS,CAAO,EAClF,OAAO,EAAI,SAAS,EAGxB,eAAsB,CAAU,CAAC,EAAsC,CACnE,IAAM,EAAS,EAAQ,QAAU,MAC3B,EACF,EAAQ,eAAiB,OAAY,OAAY,GAAW,EAAQ,YAAY,EAS9E,EACF,IAAY,OACN,MAAM,GAAY,EAAQ,KAAK,EAC/B,MAAM,GAAW,EAAS,EAAQ,KAAK,EAEjD,GAAI,GAAO,UAAY,QAAa,EAAM,UAAY,GAKlD,OAJA,QAAQ,OAAO,MACX,MAAM,EAAM,yBAAyB,IAAY,OAAY,GAAK,SAAS;AAAA,UAC5D,EAAM,aAAa,IAAY,OAAY,GAAK,IAAI,wCAA8C,EAAM;AAAA,CAC3H,EACO,EAGX,IAAM,EAAM,EAAO,EAAM,QAAS,CAAO,EACzC,GAAI,IAAW,MAGX,OADA,QAAQ,OAAO,MAAM,GAAG;AAAA,CAAO,EACxB,EAGX,IAAM,EAAU,MAAM,EAAc,EAAK,CACrC,MAAO,QAAQ,OAAO,QAAU,MAC5B,EAAQ,SAAW,GAAO,CAAE,OAAQ,EAAK,EAAI,CAAC,CACtD,CAAC,EAKD,GAJA,QAAQ,OAAO,MAAM,GAAG,EAAY,EAAK,CAAO;AAAA,CAAK,EAIjD,CAAC,EAAQ,QAAU,EAAQ,OAAS,GACpC,QAAQ,OAAO,MAAM,GAAG,KAAK,UAAU,CAAE,MAAK,OAAQ,GAAO,IAAK,EAAQ,OAAQ,CAAC;AAAA,CAAK,EAM5F,GAAI,EAAQ,QAAU,GAAU,EAAQ,cAAgB,EAAE,IAAM,OAC5D,QAAQ,OAAO,MACX;AAAA,MACW,EAAM;AAAA,CACrB,EAEJ,OAAO",
9
+ "debugId": "A8CB8EDE13FC0C2E64756E2164756E21",
10
+ "names": []
11
+ }
package/dist/web.d.ts ADDED
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The `web` command — the browser as a second view onto the same running agent.
3
+ *
4
+ * The terminal twin of 17.1, and it exists for the same reason: the server owns the agent, and a
5
+ * front end attaches. `run` opens a terminal onto a host; this opens a browser onto the same one,
6
+ * at the same address, holding the same conversation. Neither starts or stops anything.
7
+ *
8
+ * ## Why this is three verbs and not one
9
+ *
10
+ * `run` is what a person types. It needs a host, so it declares `needsServer` and the first-run
11
+ * bootstrap gets one. `open` assumes a host is already there and says so when it is not — the
12
+ * difference matters on a machine where starting a service is not wanted. `url` prints and opens
13
+ * nothing, which is the only form that works in a pipe, in CI, and over SSH.
14
+ *
15
+ * ## The container
16
+ *
17
+ * There is no browser in a container and there never will be, so `no-opener` is an ordinary answer
18
+ * rather than a failure: the URL is printed and the operator opens it from the machine whose port
19
+ * is published. This is the deployment target, so it is the case the wording is written for.
20
+ */
21
+ import type { WebOptions } from "#lib/schema";
22
+ /**
23
+ * Where the page lives, with the agent it should open.
24
+ *
25
+ * `?agent=` rather than `/agents/milo` for the reason `04-SPEC-WIRE.md` gives for having no
26
+ * catch-all: a path needs a route, a `WEB_ASSETS` entry, a spec row and a `spec.test.ts` change,
27
+ * and a wildcard would make `/v1/agentss` answer `200 text/html`. A query parameter needs none of
28
+ * them, and the page reads it.
29
+ *
30
+ * No credential is attached. A claim is minted at boot and printed by `serve`, deliberately once —
31
+ * a fresh one per invocation would leave a standing credential in a log — and a durable key in an
32
+ * address bar lands in history, a bookmark and whatever syncs them. The page asks when it has to.
33
+ */
34
+ export declare function webUrl(baseUrl: string, agentId?: string): string;
35
+ export declare function webCommand(options: WebOptions): Promise<number>;
36
+ //# sourceMappingURL=web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../src/web.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAehE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAsDrE"}
package/dist/wire.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The event schema and nothing else, reachable as the `/wire` subpath of the published package.
3
+ *
4
+ * The browser-safe subset (decision 11.199): event types, `EVENT_TYPES`, and the SSE parser, with no
5
+ * Zod, no YAML parser and no store. It exists so a front end can type an event stream without
6
+ * importing a runtime it will never run — and it is a subpath of the one published package for the
7
+ * same reason `./client` is.
8
+ */
9
+ export * from "@dispach/core/wire";
10
+ //# sourceMappingURL=wire.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,oBAAoB,CAAA"}