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,539 @@
1
+ /**
2
+ * The init wizard's question flow and file plan — pure data in, pure data out.
3
+ *
4
+ * Deliberately renderer-free and process-free (it is in the boundaries test's PURE list): the
5
+ * readline loop in `init.ts` is one consumer, a flag-driven non-interactive run is another, and
6
+ * an Ink wizard would be a third if one ever pays for itself. The flow cannot know which is
7
+ * driving it, which is what keeps the three from diverging.
8
+ *
9
+ * Generated text carries two kinds of content. Everything *structural* — identity, voice, rules,
10
+ * policy — is genuinely filled from the answers, so the agent runs and validates immediately.
11
+ * The three dialogue examples keep their `{{INPUT_n}}`/`{{REPLY_n}}` placeholders on purpose:
12
+ * examples are the highest-leverage section of an identity file and stock ones teach a stock
13
+ * voice, so the `workspace` command keeps warning until a person writes real exchanges.
14
+ */
15
+ /**
16
+ * The local tools every generated agent starts with, and the one line of guidance each carries
17
+ * into the generated manifest and the wizard's tools screen — single-sourced so the two cannot
18
+ * drift, and pinned by a test to core's `LOCAL_TOOL_SLUGS` so a new local tool cannot ship
19
+ * without init knowing.
20
+ */
21
+ export declare const INIT_LOCAL_TOOLS: readonly {
22
+ readonly slug: string;
23
+ readonly note: string;
24
+ }[];
25
+ /** Exported so the drift test can compare against core without re-deriving the mapping. */
26
+ export declare const INIT_LOCAL_TOOL_SLUGS: readonly string[];
27
+ export type PresetId = "openai" | "anthropic" | "deepseek" | "ollama" | "custom";
28
+ export interface Preset {
29
+ readonly id: PresetId;
30
+ readonly label: string;
31
+ /** Empty for `custom`, which has no defaults to offer. */
32
+ readonly modelId: string;
33
+ readonly baseUrl: string;
34
+ /** Absent means the manifest omits `apiKeyEnv` entirely — a keyless local endpoint. */
35
+ readonly apiKeyEnv?: string;
36
+ }
37
+ /**
38
+ * The same presets the examples' `.env.example` documents, plus Ollama, which the examples only
39
+ * mention in prose. `custom` exists so an unlisted endpoint is a first-class answer rather than
40
+ * a fight with the nearest preset.
41
+ */
42
+ export declare const PRESETS: readonly Preset[];
43
+ export declare function presetById(id: string): Preset | undefined;
44
+ export interface InitAnswers {
45
+ /** The person's name. */
46
+ readonly user: string;
47
+ /** The agent's name. Drives the manifest `id` and the default directory. */
48
+ readonly name: string;
49
+ /** One line: what the agent is for. */
50
+ readonly purpose: string;
51
+ readonly preset: PresetId;
52
+ readonly model: string;
53
+ readonly baseUrl: string;
54
+ /**
55
+ * The env var the manifest names. Absent = the manifest omits the field entirely (a keyless
56
+ * endpoint). Set from `--api-key-env` or the preset, never asked: which *variable* holds the
57
+ * key is a detail of the generated file, and asking for it while asking for every other value
58
+ * outright is the confusing shape this replaced.
59
+ */
60
+ readonly apiKeyEnv?: string;
61
+ /**
62
+ * The key itself. Written to the gitignored `.env` beside the manifest, never to `agent.yaml`
63
+ * — hard rule 10 is about what the *manifest* contains, and it still holds: the manifest names
64
+ * the variable, this fills it in.
65
+ *
66
+ * Empty is a legitimate answer for anyone who exports the variable another way, and the next
67
+ * steps keep saying so.
68
+ */
69
+ readonly apiKey?: string;
70
+ /**
71
+ * How much of this machine the agent may touch: `none`, `read`, or `full`.
72
+ *
73
+ * Asked rather than left as a commented block, because the block was the bug. The generated
74
+ * manifest named neither the provider nor the tools, so shell access was reachable only by
75
+ * someone who already knew the field names — which is the opposite of what a generated file is
76
+ * for. The answer writes real config, permission rules included, and `none` writes the same
77
+ * block commented out so the shape is still there to uncomment.
78
+ */
79
+ readonly system: string;
80
+ /**
81
+ * Whether it can reach the internet: `none`, `fetch`, or `search`.
82
+ *
83
+ * Asked for the same reason `system` is, and found the same way. The web provider was generated
84
+ * commented out, so asked whether it could search the web an agent answered that the only route
85
+ * was shell access and `curl` — a correct reading of its own catalogue and a false statement
86
+ * about the runtime. Every capability this runtime has is a question here now; a generated file
87
+ * that hides its own options is not doing the job a generated file exists for.
88
+ */
89
+ readonly web: string;
90
+ /** Which search backend, when `web` is `search`. Ignored otherwise. */
91
+ readonly webBackend?: string;
92
+ /**
93
+ * The search key itself, written to the gitignored `.env` beside the manifest. Same rule as the
94
+ * model key: the manifest names the variable, no flag accepts the value.
95
+ */
96
+ readonly webKey?: string;
97
+ /**
98
+ * Whether the agent reaches the person's other apps through Composio: `none` or `connected`.
99
+ *
100
+ * A question for the same reason `system` and `web` are — the provider shipped finished and
101
+ * generated as a single commented line, which is the third time a built capability reached a
102
+ * generated manifest hidden. What differs is what the answer can *do*, and the difference is
103
+ * real rather than an inconsistency to iron out: see `COMPOSIO_CHOICES`.
104
+ */
105
+ readonly composio: string;
106
+ /**
107
+ * The Composio key, written to the gitignored `.env`. Same rule as every other secret here: the
108
+ * manifest names the variable, no flag accepts the value.
109
+ */
110
+ readonly composioKey?: string;
111
+ /**
112
+ * Whether people can message it on Telegram: `none` or `connected`.
113
+ *
114
+ * A question for the same reason `system`, `web` and `composio` are, and found the same way —
115
+ * Phase 4 shipped the channel and `init` generated it commented, so the only route to a working
116
+ * bot was knowing the field names. It is the fourth time a finished capability reached a
117
+ * generated manifest hidden, which is why the rule is now standing rather than case by case.
118
+ */
119
+ readonly telegram: string;
120
+ /**
121
+ * The bot token, written to the gitignored `.env`. Same rule as every other secret: the
122
+ * manifest names the variable, no flag accepts the value.
123
+ */
124
+ readonly telegramToken?: string;
125
+ /**
126
+ * Who may message it — one Telegram handle, or empty.
127
+ *
128
+ * Empty is a real answer and a safe one: `allowFrom: []` permits nobody, and the first message
129
+ * from anyone prints the exact line to add. That is a better first run than guessing a handle
130
+ * into the file, because a wrong handle fails the same way an empty list does and says less.
131
+ */
132
+ readonly telegramAllow?: string;
133
+ /**
134
+ * Whether to serve the HTTP API: `none` or `local`.
135
+ *
136
+ * `local` binds loopback. A public bind is a deliberate edit afterwards, and it refuses to
137
+ * start without a token — which is why the generated `.env` gets one rather than an empty line.
138
+ */
139
+ /**
140
+ * What the agent runs on a schedule: `none`, `daily` or `hourly`.
141
+ *
142
+ * Not asked. Set by `--schedules` or defaulted to `none` in `complete()` — see
143
+ * `SCHEDULE_CHOICES` for why this capability has no question, and `apiKeyEnv` for why the
144
+ * default lives at that funnel rather than as a step fallback.
145
+ */
146
+ readonly schedules: string;
147
+ readonly server: string;
148
+ /**
149
+ * The API token, generated rather than asked. Not a third-party credential and not a choice —
150
+ * `openssl rand -hex 32` is what someone does by hand here, so the command does it.
151
+ */
152
+ readonly serverToken?: string;
153
+ /**
154
+ * Whether to keep it running in the background: `none` or `service`.
155
+ *
156
+ * Writes nothing — see `DAEMON_CHOICES`. It decides whether the last screen names the command,
157
+ * which is the whole of its job: `serve` dies with its terminal, and nothing in the flow said so.
158
+ */
159
+ readonly daemon: string;
160
+ /**
161
+ * Whether the agent gets a skills directory: `none` or `starter`.
162
+ *
163
+ * `none` still writes the block and an empty directory rather than omitting it. A configured-and-empty
164
+ * directory is a switch that is off, which slot 2 reports as such; no block at all is a concept the
165
+ * agent does not have and will not ask about — decision 5.19, and the same reason `--system none`
166
+ * still names its provider.
167
+ */
168
+ readonly skills: string;
169
+ /**
170
+ * Words to search the skill sources for. **Set by `--skills "<phrase>"` and never asked.**
171
+ *
172
+ * It was a wizard question for exactly one commit, and that was the wrong answer to "ask about skills
173
+ * during init": a text box asking what the agent does often, in a tree that already had a catalogue
174
+ * picker. At a terminal `find` now shows the real list and this stays empty. It survives for the
175
+ * scripted path, where a picker cannot run — the ranking is the same `bm25Selector` that decides
176
+ * activation, so what a CI run installs is what will fire.
177
+ */
178
+ readonly skillsSearch?: string;
179
+ /**
180
+ * Comma-separated `<source>/<skill>` refs the person ticked in the wizard's catalogue step.
181
+ *
182
+ * Not in `STEP_ORDER` and never produced by `nextQuestion`: the catalogue is a *screen*, not a question,
183
+ * and `nextQuestion` is pure and synchronous. The wizard root fetches, shows the checklist, and writes
184
+ * the answer here — which keeps the reducer static-option-only while the flow still contains the list.
185
+ */
186
+ readonly skillsPick?: string;
187
+ /**
188
+ * Where the agent lives: `sandbox`, `here`, or `custom`.
189
+ *
190
+ * A menu rather than a prefilled path, because "somewhere else" was reachable only by clearing a
191
+ * 37-character absolute path and retyping it — and because a menu puts the *cost* on the label at
192
+ * the moment of choosing, where a note printed afterwards cannot. `custom` is the only answer that
193
+ * asks a follow-up, exactly as `web: search` is the only one that asks for a backend.
194
+ *
195
+ * Optional, and only because the reverse implication has to hold too: `--dir` answers the question,
196
+ * so asking it would be asking something whose answer the funnel then ignores. Absence is safe here
197
+ * in the way `agentDirBase`'s was not — it means `dir` was given, and if somehow neither yields a
198
+ * path `complete()` throws rather than guessing.
199
+ */
200
+ readonly dirChoice?: string;
201
+ /**
202
+ * Target directory, as given — the command resolves it against the cwd.
203
+ *
204
+ * **Asked only when `dirChoice` is `custom`**, and otherwise derived at the `complete()` funnel.
205
+ * That derivation is load-bearing rather than convenient: a step that stops being asked without
206
+ * its default moving to the funnel is how `apiKeyEnv` once vanished from generated manifests
207
+ * entirely, so `dirFor` is one function and the guard is a test reading the path back out of a
208
+ * real run.
209
+ */
210
+ readonly dir: string;
211
+ }
212
+ /**
213
+ * What web access an agent may be given, and what each answer pins.
214
+ *
215
+ * `none` still names the provider, exactly as `--system none` does — naming is what makes
216
+ * `available()` run, and `available()` is the only reason the model can say "web_search exists and is
217
+ * not enabled for me" rather than "I cannot search the web".
218
+ *
219
+ * `fetch` is separated from `search` because they have genuinely different costs: `web_fetch` needs
220
+ * no account anywhere, and `web_search` needs a key from a third party. Collapsing them would force
221
+ * anyone who wants to hand their agent a URL to go and sign up for something first.
222
+ */
223
+ /**
224
+ * Whether the agent runs anything on a schedule, and what the generated manifest shows.
225
+ *
226
+ * **Flag-only: `--schedules`, and no wizard step.** The standing rule is that every capability the
227
+ * runtime has is a question in `init`, and the exception it already carries is the one that applies
228
+ * here — *not every hidden capability wants a question; a switch that is off wants to exist*, which
229
+ * is how `knowledge:` shipped with scaffolding and a commented block instead of a screen. A schedule
230
+ * is not a thing anyone knows they want at minute two of setting an agent up; it is a thing they want
231
+ * three days later, and by then the answer is `config_set` from a conversation or an edit to the file
232
+ * the commented block is already sitting in.
233
+ *
234
+ * So `none` — the value every interactive and every `--yes` run takes — writes the commented
235
+ * `schedules:` block with a worked example, for the same reason `--system none` still names the
236
+ * provider. The flag survives because a scripted setup has no other route, exactly as
237
+ * `--skills "<phrase>"` survives a picker that cannot run in CI.
238
+ *
239
+ * `daily` and `hourly` stay offered by the flag because a cron expression is exactly the kind of
240
+ * thing people get wrong once and then avoid. Only `serve` fires them, which the generated comments
241
+ * say.
242
+ */
243
+ export declare const SCHEDULE_CHOICES: readonly {
244
+ readonly value: string;
245
+ readonly label: string;
246
+ }[];
247
+ /**
248
+ * Where a new agent's directory goes.
249
+ *
250
+ * The labels carry the whole trade-off, because this is the only moment it is cheap to reconsider: an
251
+ * agent inside the sandbox is reachable by bare name from anywhere, and one outside is reachable only
252
+ * by path — `run`, `config`, `daemon`, `schedules`, every one of them, forever. That sentence used to
253
+ * be a note printed *after* the choice was made.
254
+ *
255
+ * `custom` is the escape hatch and stays: a project-local agent is a real thing to want, and a wizard
256
+ * that refuses it is one people work around with `mv`.
257
+ */
258
+ export declare const DIR_CHOICES: readonly {
259
+ readonly value: string;
260
+ /** Only for the row that has no path to show; the other two are labelled by their directory. */
261
+ readonly label: string;
262
+ readonly hint: string;
263
+ }[];
264
+ /**
265
+ * The directory a non-`custom` answer means.
266
+ *
267
+ * One function, called by the confirm screen and by `complete()`, because two derivations of "where
268
+ * is this going" is how a summary comes to describe a path other than the one written — and this is
269
+ * the one screen whose whole job is to be believed before anything exists on disk.
270
+ *
271
+ * Returns `undefined` for `custom`: there is nothing to derive, the `dir` question was asked.
272
+ */
273
+ export declare function dirFor(choice: string | undefined, name: string | undefined, defaults: QuestionDefaults): string | undefined;
274
+ export declare const WEB_CHOICES: readonly {
275
+ readonly value: string;
276
+ readonly label: string;
277
+ readonly pinned: readonly string[];
278
+ }[];
279
+ export declare function webChoice(value: string): (typeof WEB_CHOICES)[number] | undefined;
280
+ /** The search backends, with the variable each conventionally reads. */
281
+ export declare const WEB_BACKENDS: readonly {
282
+ readonly value: string;
283
+ readonly label: string;
284
+ readonly apiKeyEnv: string;
285
+ }[];
286
+ export declare function webBackendByValue(value: string): (typeof WEB_BACKENDS)[number] | undefined;
287
+ /** The variable the Composio provider reads when the manifest names none. Its own default. */
288
+ export declare const COMPOSIO_KEY_ENV = "COMPOSIO_API_KEY";
289
+ /**
290
+ * Whether the agent is wired to the person's other apps, and what `connected` actually pins.
291
+ *
292
+ * **It pins two tools, and neither is an app tool.** `composio_search` finds the tools a task needs
293
+ * and records their definitions; `composio_connect` returns the sign-in link for an account. Between
294
+ * them the agent gets from "connect my Gmail" to a pinned, working `GMAIL_SEND_EMAIL` without anyone
295
+ * opening a dashboard: it searches, hands over the link, writes the slug into `tools.pinned` with
296
+ * `config_set`, and asks for a restart.
297
+ *
298
+ * The restart is the design rather than a limitation worked around. Decision 4.7 fixes the working
299
+ * set at load because search-then-execute is two-hop reasoning and small models fail it — and that
300
+ * still holds, because this is *setup*, which happens once, at the moment a person is already
301
+ * pausing to click an OAuth link. What is deliberately absent is a `composio_execute(slug, args)`
302
+ * that runs anything discovered: that would make every Composio task two-hop, forever, on every
303
+ * model.
304
+ *
305
+ * The route this replaces was not a worse route, it was **no route**. `tools --warm` refreshes the
306
+ * slugs already in `pinned`, so a slug had to be known before it could be warmed and warmed before
307
+ * it could be pinned — the only way in was composio.dev in a browser, and nothing said so. An agent
308
+ * asked to connect a Gmail account spent 4,417 output tokens establishing that.
309
+ *
310
+ * `none` names the provider with nothing pinned, exactly as `web` does. It did not while this
311
+ * provider had no `available()` worth calling; three fixed meta tools changed that premise, and
312
+ * "I could search your apps if you enable composio_search" is the sentence `available()` exists for.
313
+ */
314
+ export declare const COMPOSIO_CHOICES: readonly {
315
+ readonly value: string;
316
+ readonly label: string;
317
+ readonly pinned: readonly string[];
318
+ }[];
319
+ export declare function composioChoice(value: string): (typeof COMPOSIO_CHOICES)[number] | undefined;
320
+ /**
321
+ * What system access an agent may be given, and what each answer pins.
322
+ *
323
+ * Three rather than two because "can it read my files" and "can it change them" are genuinely
324
+ * different questions, and collapsing them forces anyone who wants a reviewer or a summariser to
325
+ * grant a shell they never needed.
326
+ */
327
+ export declare const TELEGRAM_TOKEN_ENV = "TELEGRAM_BOT_TOKEN";
328
+ /**
329
+ * Whether the agent is reachable on Telegram.
330
+ *
331
+ * Unlike `web` and `system`, `none` writes nothing live: a channel has no `available()` for the
332
+ * model to read, so naming a switched-off one would buy none of what naming a provider buys. It
333
+ * writes the same block commented, with a heading that does not end in a colon — uncommenting one
334
+ * that did turned the heading itself into a YAML key, which is a papercut this generated exactly
335
+ * once before someone hit it.
336
+ */
337
+ export declare const TELEGRAM_CHOICES: readonly {
338
+ readonly value: string;
339
+ readonly label: string;
340
+ }[];
341
+ export declare function telegramChoice(value: string): (typeof TELEGRAM_CHOICES)[number] | undefined;
342
+ /**
343
+ * Whether to serve the HTTP surface.
344
+ *
345
+ * Loopback only. Binding a public host is a deliberate edit, and it refuses to start without a
346
+ * token — so the generated `.env` carries a real one rather than an empty line to fill in. That is
347
+ * the one secret this command can legitimately mint: it is ours, not a third party's, and there is
348
+ * no shell-history risk because nothing types it.
349
+ */
350
+ export declare const SERVER_CHOICES: readonly {
351
+ readonly value: string;
352
+ readonly label: string;
353
+ }[];
354
+ export declare function serverChoice(value: string): (typeof SERVER_CHOICES)[number] | undefined;
355
+ /**
356
+ * Whether this agent should keep running without a terminal.
357
+ *
358
+ * The answer writes **nothing** — no service, no manifest field. Not a service, because at this
359
+ * point in the flow the `.env` is still empty of the bot token in the common case, and the install
360
+ * check that exists to catch exactly that would fail; installing anyway would produce a service
361
+ * that fails from birth, which is the failure this whole capability was designed against. Not a
362
+ * manifest field, because whether *this machine* supervises the agent is a fact about the machine
363
+ * and would make the manifest non-portable.
364
+ *
365
+ * What it changes is the last screen: the command appears in the next steps, at the moment it
366
+ * becomes runnable. A capability reachable only by someone who already knows the field names is a
367
+ * capability the generated file is hiding — the standing rule that put `system`, `web` and Composio
368
+ * in here too.
369
+ */
370
+ export declare const DAEMON_CHOICES: readonly {
371
+ readonly value: string;
372
+ readonly label: string;
373
+ }[];
374
+ export declare function daemonChoice(value: string): (typeof DAEMON_CHOICES)[number] | undefined;
375
+ /**
376
+ * Whether to scaffold a skills directory, and what to put in it.
377
+ *
378
+ * A question rather than a field to discover, per the standing rule: every capability the runtime has is
379
+ * asked about here. `starter` writes one worked skill because an empty directory teaches nothing about the
380
+ * format, and the format has parts — the `metadata` key for negative guidance, the fact that the body is
381
+ * injected verbatim — that a person will not guess.
382
+ */
383
+ export declare const SKILLS_CHOICES: readonly {
384
+ readonly value: string;
385
+ readonly label: string;
386
+ }[];
387
+ export declare function skillsChoice(value: string): (typeof SKILLS_CHOICES)[number] | undefined;
388
+ export declare const SYSTEM_CHOICES: readonly {
389
+ readonly value: string;
390
+ readonly label: string;
391
+ readonly pinned: readonly string[];
392
+ /** Mutating slugs that need an allow rule, or the first untrusted read gates them. */
393
+ readonly allow: readonly string[];
394
+ }[];
395
+ export declare function systemChoice(value: string): {
396
+ readonly value: string;
397
+ readonly label: string;
398
+ readonly pinned: readonly string[];
399
+ /** Mutating slugs that need an allow rule, or the first untrusted read gates them. */
400
+ readonly allow: readonly string[];
401
+ } | undefined;
402
+ export type InitStep = keyof InitAnswers;
403
+ /**
404
+ * Answers as they accumulate: every step is a string until `complete` narrows them, because they
405
+ * arrive from readline and flags as text and are validated per step, not per type.
406
+ */
407
+ export type PartialAnswers = Partial<Record<InitStep, string>>;
408
+ /**
409
+ * The asking order. `apiKeyEnv` is skipped when the chosen preset is keyless.
410
+ *
411
+ * Exported so `provisionSteps` can put the served question list back into asking order after
412
+ * exploring the branches out of order. Reading the authority is not the same as copying it — a
413
+ * second array here would be the drift `NO_MANIFEST` and `THRESHOLD_ORDER` already cost.
414
+ */
415
+ export declare const STEP_ORDER: readonly InitStep[];
416
+ /**
417
+ * Steps whose answer must never be echoed, logged, or shown in a summary.
418
+ *
419
+ * The renderer reads this rather than special-casing a slug, so a second secret question later
420
+ * cannot be added without the masking coming with it.
421
+ */
422
+ export declare const SECRET_STEPS: ReadonlySet<InitStep>;
423
+ export interface Question {
424
+ readonly step: InitStep;
425
+ /** One line, printed before the input prompt. */
426
+ readonly prompt: string;
427
+ /** Offered default; empty string means the answer is required — unless `optional`. */
428
+ readonly fallback: string;
429
+ /**
430
+ * An empty answer is a real answer here, not a missing one.
431
+ *
432
+ * Stated rather than inferred from an empty fallback: those two things look identical and mean
433
+ * opposite things to the non-interactive path, which must refuse for one and proceed for the
434
+ * other.
435
+ */
436
+ readonly optional?: boolean;
437
+ /**
438
+ * Present when the answer is one of a fixed set, which the renderer draws as a list rather than
439
+ * a text field.
440
+ *
441
+ * On the question rather than hardcoded in the wizard: the preset menu was the only select for
442
+ * three phases, and "is this the preset step" was written into the reducer, the renderer and the
443
+ * cursor-prefill in three separate places. A second select had to either repeat all three or
444
+ * generalise them, and generalising is what stops a third one repeating them again.
445
+ */
446
+ readonly options?: readonly {
447
+ readonly value: string;
448
+ readonly label: string;
449
+ /**
450
+ * The dim half of the row — a reason, not a second label.
451
+ *
452
+ * `SelectList.hint` has existed since the component did and no question ever supplied one, so
453
+ * every option had to fold its rationale into the label. That produced a 79-column row for the
454
+ * location question, which **wrapped at 80** onto a continuation line with no pointer and no
455
+ * number — a broken list, and invisible at the 100 columns it was first checked at.
456
+ */
457
+ readonly hint?: string;
458
+ }[];
459
+ }
460
+ /**
461
+ * The manifest `id` and default directory name, from the agent's name.
462
+ *
463
+ * Kebab-case because the id is a slug (session keys, API paths) and the directory is typed into
464
+ * shells. A name that reduces to nothing ("!!!") falls back to "agent" rather than producing an
465
+ * invalid id.
466
+ */
467
+ export declare function slugify(name: string): string;
468
+ /**
469
+ * The next unanswered question, or undefined when the flow is complete.
470
+ *
471
+ * Model and base URL default from the chosen preset, so at a TTY the happy path is naming two
472
+ * people and pressing return a few times. `custom` offers no defaults — an unlisted endpoint has
473
+ * nothing honest to prefill.
474
+ */
475
+ export interface QuestionDefaults {
476
+ /**
477
+ * Where agents live when nobody says otherwise — the command layer passes the sandbox's
478
+ * agents directory. Passed in rather than computed because this module is PURE: it may not
479
+ * touch the filesystem, the home directory, or the environment.
480
+ *
481
+ * **Required, and that is the whole point.** It was optional, and absence fell back to a
482
+ * cwd-relative `./<slug>` — a live second default that put agents in whatever checkout you
483
+ * happened to be standing in, guarded by nothing but every caller remembering to pass this.
484
+ * The repo has paid for that shape six times (`apiKeyEnv`, `ChatMessage.toolCalls`,
485
+ * `TurnInput.skills`, `ToolContext.readArtifact`, `ToolContext.memoryDir`,
486
+ * `init --schedules`); an optional field whose absence is legal *and* silent is the trap, so
487
+ * there is now one default and no branch that can reach the other one.
488
+ */
489
+ readonly agentDirBase: string;
490
+ }
491
+ export declare function nextQuestion(partial: PartialAnswers, defaults: QuestionDefaults): Question | undefined;
492
+ /**
493
+ * Is this a handle Telegram could actually issue, normalised to a leading `@`?
494
+ *
495
+ * Exported and shared because two surfaces ask it — `init` when the handle is typed, and `config
496
+ * allow` when one is added later — and *a check only one of them performs is a check they disagree
497
+ * with*. That is the `ruleBudgetFailure` lesson: the rule guard first lived in `Agent.create` alone,
498
+ * and `validate` happily reported ok on a manifest `run` refused.
499
+ *
500
+ * Checked against Telegram's real username rule: letters, digits and underscores, five to thirty-two
501
+ * of them. Not pedantry — a hyphen cannot occur in a real handle, so `@ada-lovelace` matches nobody,
502
+ * and the only symptom is the bot silently refusing every message from the one person it was set up
503
+ * for. That refusal names the problem perfectly and writes it to a log file, which under a background
504
+ * service nobody opens. The moment it is typed is the only cheap place to catch it.
505
+ */
506
+ export declare function telegramHandle(raw: string): Answered;
507
+ export type Answered = {
508
+ readonly ok: true;
509
+ readonly value: string;
510
+ } | {
511
+ readonly ok: false;
512
+ readonly reason: string;
513
+ };
514
+ /**
515
+ * Per-step validation, with the loader's own rules applied early.
516
+ *
517
+ * The base-URL checks are the same two `manifest/validate.ts` enforces at load — failing here,
518
+ * at the question, beats generating a directory whose first validate names the mistake back.
519
+ */
520
+ export declare function validateAnswer(step: InitStep, raw: string): Answered;
521
+ /** Whether this agent was wired to Composio. One reading, so no caller re-derives it. */
522
+ export declare function composioEnabled(answers: InitAnswers): boolean;
523
+ /** The Composio meta tools this answer pins. Empty for `none`. */
524
+ export declare function composioPinned(answers: InitAnswers): readonly string[];
525
+ export interface GeneratedFile {
526
+ /** Relative to the target directory. */
527
+ readonly relPath: string;
528
+ readonly contents: string;
529
+ }
530
+ /**
531
+ * The full file plan. Pure — the command decides where it lands and whether anything exists.
532
+ *
533
+ * Identity and operations are different files, per the split the wider ecosystem converged
534
+ * on (OpenClaw, soul.md): the soul pair answers *who the agent is*, AGENTS.md answers *what
535
+ * it does and how* — responsibilities, workflow, the memory procedure, and eventually the
536
+ * team routing. They coexist; what must not exist is a second *identity* document.
537
+ */
538
+ export declare function planFiles(answers: InitAnswers): readonly Ge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MAAM,EAAE,CAEtE;AA6GD,MAAM,WAAW,aAAa;IAC1B,wCAAwC;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,aAAa,EAAE,CAyCxE"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * `init --skills find`: search the catalogues and install the best match, during setup.
3
+ *
4
+ * ## Why this exists
5
+ *
6
+ * The question used to be "starter template or empty directory", and a fresh agent asked what skills it
7
+ * had answered — after four tool calls — that it had one, the blank template, and so "effectively zero
8
+ * working skills". Both answers were technically the offer and neither was a skill. Meanwhile `sources
9
+ * search` existed and nothing anywhere mentioned it: a capability reachable only by someone who already
10
+ * knows the command name, which is decision 4.53's exact shape and the reason every capability the
11
+ * runtime has is a question in `init`.
12
+ *
13
+ * ## Words, not a slug
14
+ *
15
+ * A slug is something you only have if you already know the catalogue, which is the state this question
16
+ * exists to fix. So the wizard asks what the agent will do often and this ranks 440-odd real skills
17
+ * against it with **`bm25Selector` — the same function that decides activation at runtime**. What init
18
+ * installs is therefore what will actually fire, and a phrase that installs nothing is a phrase that
19
+ * would have activated nothing.
20
+ *
21
+ * ## Three things it must not do
22
+ *
23
+ * Fail the init. A network that is down, no `git`, or a phrase that matches nothing all leave a valid
24
+ * agent with an empty skills directory and a sentence saying so — never a broken agent and never a
25
+ * silent substitution of some other answer, which would be answering a question the person did not ask.
26
+ *
27
+ * Reach a network on a scripted run. The `skills` fallback is `starter`, so `--yes` and every
28
+ * non-interactive path arrive here with nothing to do. Only an explicit answer gets here.
29
+ *
30
+ * Leave the agent unbootable. A skill declaring Python fails at *load* on a machine without it, so the
31
+ * catalogue is loaded once after installing and anything that breaks it is removed again. Installing a
32
+ * skill that stops the agent starting would be strictly worse than installing none.
33
+ */
34
+ import type { InitAnswers } from "#lib/init-flow";
35
+ import { type Git } from "#lib/source-cache";
36
+ export interface FindSkillOptions {
37
+ readonly answers: InitAnswers;
38
+ readonly manifestPath: string;
39
+ /** Layered onto the manifest environment — `init` stubs the key it has written as an empty line. */
40
+ readonly envOverlay?: Readonly<Record<string, string | undefined>>;
41
+ /** Injected by the tests, which never reach a network. */
42
+ readonly git?: Git;
43
+ readonly env?: Readonly<Record<string, string | undefined>>;
44
+ }
45
+ export declare function findAndInstallSkill(options: FindSkillOptions): Promise<void>;
46
+ //# sourceMappingURL=init-skills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-skills.d.ts","sourceRoot":"","sources":["../../src/lib/init-skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAaH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAIjD,OAAO,EAGH,KAAK,GAAG,EAGX,MAAM,mBAAmB,CAAA;AAI1B,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAA;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,oGAAoG;IACpG,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAClE,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,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsGlF"}