dispach 0.1.2 → 0.1.3

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 (195) hide show
  1. package/README.md +134 -85
  2. package/dist/App-qfqvx9c7.js +11 -0
  3. package/dist/{App-b1yrwrcq.js.map → App-qfqvx9c7.js.map} +6 -7
  4. package/dist/ConfigEditor-apcnj4nj.js +6 -0
  5. package/dist/{ConfigEditor-n8hdw6r7.js.map → ConfigEditor-apcnj4nj.js.map} +2 -2
  6. package/dist/KeyProbe-ya5t3v3v.js +5 -0
  7. package/dist/{KeyProbe-9jjeze5r.js.map → KeyProbe-ya5t3v3v.js.map} +2 -2
  8. package/dist/Picker-b7mn0mjg.js +5 -0
  9. package/dist/{Picker-hfeh1g6m.js.map → Picker-b7mn0mjg.js.map} +1 -1
  10. package/dist/SessionPicker-vacfwczg.js +5 -0
  11. package/dist/{SessionPicker-zyqkg4dn.js.map → SessionPicker-vacfwczg.js.map} +2 -2
  12. package/dist/SkillBrowser-66ntwaa9.js +5 -0
  13. package/dist/{SkillBrowser-3qdp8080.js.map → SkillBrowser-66ntwaa9.js.map} +1 -1
  14. package/dist/WizardApp-123998yh.js +5 -0
  15. package/dist/{WizardApp-vzpbydy3.js.map → WizardApp-123998yh.js.map} +3 -3
  16. package/dist/agents.d.ts +19 -3
  17. package/dist/agents.d.ts.map +1 -1
  18. package/dist/channels-q4fwqq87.js +31 -0
  19. package/dist/channels-q4fwqq87.js.map +10 -0
  20. package/dist/channels.d.ts +26 -0
  21. package/dist/channels.d.ts.map +1 -0
  22. package/dist/client.js +10 -10
  23. package/dist/client.js.map +3 -3
  24. package/dist/config-64q4mgxc.js +24 -0
  25. package/dist/{config-g7za9x13.js.map → config-64q4mgxc.js.map} +2 -2
  26. package/dist/{credential-npr6z8c8.js → credential-2sj7vsmw.js} +5 -5
  27. package/dist/{credential-npr6z8c8.js.map → credential-2sj7vsmw.js.map} +1 -1
  28. package/dist/daemon.d.ts.map +1 -1
  29. package/dist/index-0k3w2mxf.js +6 -0
  30. package/dist/{index-hwpvhaza.js.map → index-0k3w2mxf.js.map} +1 -1
  31. package/dist/index-1s81qstp.js +6 -0
  32. package/dist/{index-v8e92nfw.js.map → index-1s81qstp.js.map} +1 -1
  33. package/dist/index-2rycma8x.js +12 -0
  34. package/dist/{index-258d8bzg.js.map → index-2rycma8x.js.map} +4 -3
  35. package/dist/index-2zye08c4.js +6 -0
  36. package/dist/{index-vgc3y3rm.js.map → index-2zye08c4.js.map} +2 -2
  37. package/dist/{index-gme2egyq.js → index-3km1jwh7.js} +4 -4
  38. package/dist/{index-gme2egyq.js.map → index-3km1jwh7.js.map} +1 -1
  39. package/dist/index-3mtgcvkq.js +429 -0
  40. package/dist/index-3mtgcvkq.js.map +11 -0
  41. package/dist/index-4knb5vjm.js +90 -0
  42. package/dist/index-4knb5vjm.js.map +13 -0
  43. package/dist/{index-3g3ny01d.js → index-5nwwekk0.js} +4 -4
  44. package/dist/{index-3g3ny01d.js.map → index-5nwwekk0.js.map} +1 -1
  45. package/dist/index-5rm7dwq4.js +6 -0
  46. package/dist/index-5rm7dwq4.js.map +11 -0
  47. package/dist/index-79epttpm.js +6 -0
  48. package/dist/index-79epttpm.js.map +10 -0
  49. package/dist/{index-4cf6v9nb.js → index-7yk1zvds.js} +4 -4
  50. package/dist/{index-4cf6v9nb.js.map → index-7yk1zvds.js.map} +1 -1
  51. package/dist/index-81gb4ey4.js +6 -0
  52. package/dist/{index-4z7axw4r.js.map → index-81gb4ey4.js.map} +1 -1
  53. package/dist/index-8a5d8sfe.js +6 -0
  54. package/dist/{index-0d93hyfc.js.map → index-8a5d8sfe.js.map} +1 -1
  55. package/dist/index-a21zyy54.js +6 -0
  56. package/dist/index-a21zyy54.js.map +9 -0
  57. package/dist/index-b6da6c16.js +92 -0
  58. package/dist/index-b6da6c16.js.map +15 -0
  59. package/dist/index-byxrc961.js +903 -0
  60. package/dist/{index-tv4yv7d2.js.map → index-byxrc961.js.map} +16 -15
  61. package/dist/{index-ammv5st7.js → index-cgfg6t5a.js} +6 -6
  62. package/dist/{index-ammv5st7.js.map → index-cgfg6t5a.js.map} +1 -1
  63. package/dist/{index-s9mbq7h6.js → index-ehzwdnc3.js} +4 -4
  64. package/dist/{index-s9mbq7h6.js.map → index-ehzwdnc3.js.map} +1 -1
  65. package/dist/index-fzmmhmk2.js +7 -0
  66. package/dist/index-fzmmhmk2.js.map +11 -0
  67. package/dist/index-g3pk0kc0.js +6 -0
  68. package/dist/{index-9r0wyj6w.js.map → index-g3pk0kc0.js.map} +2 -2
  69. package/dist/index-h828nk24.js +153 -0
  70. package/dist/index-h828nk24.js.map +20 -0
  71. package/dist/{index-02dn6m2j.js → index-jq999vcw.js} +5 -5
  72. package/dist/{index-02dn6m2j.js.map → index-jq999vcw.js.map} +2 -2
  73. package/dist/index-k2aq5bg0.js +9 -0
  74. package/dist/{index-6p999cx4.js.map → index-k2aq5bg0.js.map} +4 -6
  75. package/dist/{index-cqqb6gaq.js → index-k3y8y3wj.js} +5 -5
  76. package/dist/{index-cqqb6gaq.js.map → index-k3y8y3wj.js.map} +1 -1
  77. package/dist/index-k59wwdgz.js +9 -0
  78. package/dist/{index-ff514z3y.js.map → index-k59wwdgz.js.map} +3 -5
  79. package/dist/index-nmnnwa02.js +6 -0
  80. package/dist/{index-6q4wf8e3.js.map → index-nmnnwa02.js.map} +1 -1
  81. package/dist/index-nn3tk25c.js +6 -0
  82. package/dist/{index-d4x6yvqh.js.map → index-nn3tk25c.js.map} +3 -4
  83. package/dist/index-q0hxh57v.js +126 -0
  84. package/dist/index-q0hxh57v.js.map +14 -0
  85. package/dist/index-srmhk9g5.js +11 -0
  86. package/dist/index-srmhk9g5.js.map +11 -0
  87. package/dist/index-swtyfhha.js +6 -0
  88. package/dist/{index-fex44816.js.map → index-swtyfhha.js.map} +2 -2
  89. package/dist/index-whq42sat.js +6 -0
  90. package/dist/{index-h9mw7b9d.js.map → index-whq42sat.js.map} +1 -1
  91. package/dist/{index-j7gyr5nx.js → index-wzsmh5j0.js} +7 -7
  92. package/dist/{index-j7gyr5nx.js.map → index-wzsmh5j0.js.map} +1 -1
  93. package/dist/{index-j55s3ehk.js → index-x7v1zq89.js} +7 -7
  94. package/dist/{index-j55s3ehk.js.map → index-x7v1zq89.js.map} +2 -2
  95. package/dist/index-xhzmv4dh.js +66 -0
  96. package/dist/index-xhzmv4dh.js.map +12 -0
  97. package/dist/index-xmv47vs0.js +6 -0
  98. package/dist/{index-gz9x25tz.js.map → index-xmv47vs0.js.map} +2 -2
  99. package/dist/index-y4c32wn7.js +6 -0
  100. package/dist/{index-qdbq8crg.js.map → index-y4c32wn7.js.map} +2 -2
  101. package/dist/index-yjcdp72k.js +6 -0
  102. package/dist/{index-tf71ap9v.js.map → index-yjcdp72k.js.map} +1 -1
  103. package/dist/index-zn24991r.js +6 -0
  104. package/dist/index-zn24991r.js.map +10 -0
  105. package/dist/index.js +374 -443
  106. package/dist/index.js.map +23 -27
  107. package/dist/init.d.ts.map +1 -1
  108. package/dist/lib/channel-actions.d.ts +103 -0
  109. package/dist/lib/channel-actions.d.ts.map +1 -0
  110. package/dist/lib/chat-frame.d.ts +12 -1
  111. package/dist/lib/chat-frame.d.ts.map +1 -1
  112. package/dist/lib/commands.d.ts +13 -0
  113. package/dist/lib/commands.d.ts.map +1 -1
  114. package/dist/lib/const.d.ts +1 -1
  115. package/dist/lib/host-actions.d.ts +121 -0
  116. package/dist/lib/host-actions.d.ts.map +1 -0
  117. package/dist/lib/init-flow.d.ts +32 -0
  118. package/dist/lib/init-flow.d.ts.map +1 -1
  119. package/dist/lib/init-whatsapp.d.ts +52 -0
  120. package/dist/lib/init-whatsapp.d.ts.map +1 -0
  121. package/dist/lib/plugin-install.d.ts +120 -0
  122. package/dist/lib/plugin-install.d.ts.map +1 -0
  123. package/dist/lib/providers.d.ts.map +1 -1
  124. package/dist/lib/provision.d.ts.map +1 -1
  125. package/dist/lib/readme-table.d.ts +15 -0
  126. package/dist/lib/readme-table.d.ts.map +1 -0
  127. package/dist/lib/sandbox.d.ts +15 -0
  128. package/dist/lib/sandbox.d.ts.map +1 -1
  129. package/dist/lib/schema.d.ts +34 -1
  130. package/dist/lib/schema.d.ts.map +1 -1
  131. package/dist/lib/subcommand.d.ts.map +1 -1
  132. package/dist/lib/web-url.d.ts +15 -0
  133. package/dist/lib/web-url.d.ts.map +1 -0
  134. package/dist/lib/wizard.d.ts.map +1 -1
  135. package/dist/memory.d.ts.map +1 -1
  136. package/dist/model.d.ts.map +1 -1
  137. package/dist/plugins.d.ts +27 -8
  138. package/dist/plugins.d.ts.map +1 -1
  139. package/dist/restart.d.ts +21 -0
  140. package/dist/restart.d.ts.map +1 -0
  141. package/dist/run.d.ts.map +1 -1
  142. package/dist/schedules.d.ts.map +1 -1
  143. package/dist/serve.d.ts.map +1 -1
  144. package/dist/sessions.d.ts.map +1 -1
  145. package/dist/skills.d.ts.map +1 -1
  146. package/dist/status.d.ts +16 -0
  147. package/dist/status.d.ts.map +1 -0
  148. package/dist/tools.d.ts.map +1 -1
  149. package/dist/validate.d.ts.map +1 -1
  150. package/dist/web-923c7f5e.js +14 -0
  151. package/dist/{web-vkb16r62.js.map → web-923c7f5e.js.map} +3 -3
  152. package/dist/web.d.ts +2 -13
  153. package/dist/web.d.ts.map +1 -1
  154. package/dist/workspace.d.ts.map +1 -1
  155. package/dist/wrapper-0w9b3my0.js +11 -0
  156. package/dist/wrapper-0w9b3my0.js.map +23 -0
  157. package/package.json +6 -3
  158. package/dist/App-b1yrwrcq.js +0 -11
  159. package/dist/ConfigEditor-n8hdw6r7.js +0 -6
  160. package/dist/KeyProbe-9jjeze5r.js +0 -5
  161. package/dist/Picker-hfeh1g6m.js +0 -5
  162. package/dist/SessionPicker-zyqkg4dn.js +0 -5
  163. package/dist/SkillBrowser-3qdp8080.js +0 -5
  164. package/dist/WizardApp-vzpbydy3.js +0 -5
  165. package/dist/config-g7za9x13.js +0 -24
  166. package/dist/index-0d93hyfc.js +0 -6
  167. package/dist/index-1c5113t4.js +0 -66
  168. package/dist/index-1c5113t4.js.map +0 -12
  169. package/dist/index-258d8bzg.js +0 -12
  170. package/dist/index-4z7axw4r.js +0 -6
  171. package/dist/index-6p999cx4.js +0 -9
  172. package/dist/index-6q4wf8e3.js +0 -6
  173. package/dist/index-9r0wyj6w.js +0 -6
  174. package/dist/index-d4x6yvqh.js +0 -6
  175. package/dist/index-fecm8xe7.js +0 -77
  176. package/dist/index-fecm8xe7.js.map +0 -12
  177. package/dist/index-fex44816.js +0 -6
  178. package/dist/index-ff514z3y.js +0 -14
  179. package/dist/index-gz9x25tz.js +0 -6
  180. package/dist/index-h9mw7b9d.js +0 -6
  181. package/dist/index-hwpvhaza.js +0 -6
  182. package/dist/index-mtn0g9vc.js +0 -7
  183. package/dist/index-mtn0g9vc.js.map +0 -11
  184. package/dist/index-qdbq8crg.js +0 -6
  185. package/dist/index-tf71ap9v.js +0 -6
  186. package/dist/index-ttwyrdjs.js +0 -427
  187. package/dist/index-ttwyrdjs.js.map +0 -11
  188. package/dist/index-tv4yv7d2.js +0 -903
  189. package/dist/index-ty24n0jh.js +0 -167
  190. package/dist/index-ty24n0jh.js.map +0 -19
  191. package/dist/index-v8e92nfw.js +0 -6
  192. package/dist/index-vgc3y3rm.js +0 -6
  193. package/dist/index-whaw4b18.js +0 -6
  194. package/dist/index-whaw4b18.js.map +0 -10
  195. package/dist/web-vkb16r62.js +0 -14
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAkCH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,iFAAiF;AAEjF,MAAM,MAAM,UAAU,GAChB;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAQxD,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAOvE;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAE/E"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAoCH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAG9C,iFAAiF;AAEjF,MAAM,MAAM,UAAU,GAChB;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAQxD,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAOvE;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAE/E"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Connect, disconnect, re-credential and unpair a channel — the four things a person does to one.
3
+ *
4
+ * ## Why this is a module rather than four call sites
5
+ *
6
+ * Every one of these was *possible* already and reachable from nowhere obvious. Disabling a channel
7
+ * meant `config set <agent> channels '[{...the whole list again...}]'`; changing a token meant
8
+ * knowing that `tokenEnv` names a variable and that `config env` writes it; relinking WhatsApp meant
9
+ * finding a directory and deleting it. A capability reachable only by somebody who already knows the
10
+ * field names is a capability the surface is hiding — the standing rule that put every provider in
11
+ * `init`, and the same one applies to the thing a person touches most after creating an agent.
12
+ *
13
+ * So: one module, read by the `channels` command and by the HTTP routes the browser calls. Two
14
+ * surfaces over one implementation, which is the only way they cannot disagree — and the lesson this
15
+ * project has paid for repeatedly, most recently where `validate` and `run` disagreed about a cold
16
+ * Composio cache.
17
+ *
18
+ * ## What "connect" means, and what it cannot mean
19
+ *
20
+ * `enabled: true` in the manifest, and nothing more. A channel is constructed at boot and
21
+ * `Runtime.create` is what starts it, so flipping the flag on a running agent takes effect at its
22
+ * next start — `manifest_changed` already says so for every other setting and this is no different.
23
+ * Pretending otherwise by hot-starting a transport here would make "connected" mean two different
24
+ * things depending on which surface you asked.
25
+ */
26
+ import { type AgentManifest } from "@dispach/core";
27
+ /** One channel as every surface reports it, before any runtime state is layered on. */
28
+ export interface ChannelEntry {
29
+ readonly id: string;
30
+ readonly type: string;
31
+ readonly enabled: boolean;
32
+ /** The env var this channel's credential lives in, when it has one. */
33
+ readonly credentialEnv?: string;
34
+ /**
35
+ * Whether that variable currently has a value.
36
+ *
37
+ * The **name and whether it is set**, never the value. A surface that could read a credential
38
+ * back is one a leaked operator key turns into a credential dump, and nothing needs it: the only
39
+ * question anybody asks is "is this filled in".
40
+ */
41
+ readonly credentialSet?: boolean;
42
+ /**
43
+ * The WhatsApp account this channel links to, when one is configured.
44
+ *
45
+ * Its presence is what decides *how* pairing happens — a code typed into the phone rather than
46
+ * a QR — so a listing that did not carry it had to describe the method with a constant, and
47
+ * that constant said "paired by QR" for a channel that pairs by code and has never paired.
48
+ */
49
+ readonly pairWith?: string;
50
+ /**
51
+ * Whether a pairing already exists on disk.
52
+ *
53
+ * A fact about the filesystem rather than about a running process, which is exactly why it
54
+ * belongs in a manifest-reading listing: "is this linked" is answerable without a host, and
55
+ * answering it is the difference between "connected" and something true.
56
+ */
57
+ readonly paired?: boolean;
58
+ /** Where a WhatsApp session lives, as written. Relative paths are relative to the manifest. */
59
+ readonly authDir?: string;
60
+ /** Senders this channel accepts. Inbound only. */
61
+ readonly allowFrom: readonly string[];
62
+ }
63
+ export declare function channelsOf(manifestPath: string): readonly ChannelEntry[];
64
+ /**
65
+ * Flip one channel's `enabled`, leaving every other entry byte-identical.
66
+ *
67
+ * Read-modify-write through `editManifest`, the one manifest writer, rather than asking a caller to
68
+ * send the whole `channels` list back. Sending the list is what `config set` does and it is right
69
+ * for a person editing YAML; for a button it would mean the browser reconstructing an array it did
70
+ * not author, and two clients racing on that lose an entry rather than a flag.
71
+ */
72
+ export declare function setChannelEnabled(manifestPath: string, channelId: string, enabled: boolean): Promise<{
73
+ readonly note: string;
74
+ readonly changed: boolean;
75
+ }>;
76
+ /**
77
+ * Write a channel's credential into the `.env` beside the manifest.
78
+ *
79
+ * The variable is the one the *manifest* names, resolved here rather than taken from the caller: a
80
+ * surface that let a client name the variable would let it write any variable at all, including the
81
+ * API token this server authenticates with.
82
+ */
83
+ export declare function setChannelCredential(manifestPath: string, channelId: string, value: string): {
84
+ readonly note: string;
85
+ readonly variable: string;
86
+ };
87
+ /**
88
+ * Delete a stored pairing on disk.
89
+ *
90
+ * The on-disk path, used when no live transport can be asked — a stopped agent, or one whose
91
+ * channels a `run`-mode host never started. Both routes end in the same state, which is the state a
92
+ * first start produces.
93
+ */
94
+ export declare function unpairChannel(manifestPath: string, channelId: string): {
95
+ readonly note: string;
96
+ };
97
+ /** Where a channel that stores a pairing keeps it, so a stopped agent can be unpaired too. */
98
+ export declare function pairingDirOf(manifestPath: string, channel: {
99
+ readonly type: string;
100
+ readonly authDir?: unknown;
101
+ }): string | undefined;
102
+ export type { AgentManifest };
103
+ //# sourceMappingURL=channel-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel-actions.d.ts","sourceRoot":"","sources":["../../src/lib/channel-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,EACH,KAAK,aAAa,EAKrB,MAAM,eAAe,CA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E,MAAM,CAAA;CAAE,CAqBhG;AAED,8FAA8F;AAC9F,wBAAgB,YAAY,CACxB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAC/D,MAAM,GAAG,SAAS,CAIpB;AAED,YAAY,EAAE,aAAa,EAAE,CAAA"}
@@ -35,7 +35,6 @@ import type { EditorState, LiveTurn } from "#lib/types";
35
35
  * composer takes is a row of conversation, and this is the function that charges for them.
36
36
  */
37
37
  export declare function promptRows(editor: EditorState, columns: number): number;
38
- /** The slash-command list: its matches, its overflow notices, and the line naming its keys. */
39
38
  export declare function paletteRows(palette: Palette | undefined, maxRows: number): number;
40
39
  /** `^R`'s match list plus its query line. Zero when the search is closed. */
41
40
  export declare function searchRows(editor: EditorState, maxRows: number): number;
@@ -60,6 +59,18 @@ export interface ChatFrame {
60
59
  * Returned so the split happens once, in the caller that knows the mark's rendered height.
61
60
  */
62
61
  readonly body: number;
62
+ /**
63
+ * Rows the palette may actually use — its requested ceiling **clamped by the terminal**.
64
+ *
65
+ * `LANDING_LIST_ROWS` is what the landing screen would *like*, and the terminal wins, which is
66
+ * the rule `SkillBrowser` already follows and the chat frame did not. Twenty-three commands at
67
+ * 30 rows asked for 24 rows of palette plus every other piece of chrome, so the frame came out
68
+ * taller than the terminal — and an overflowing frame is corruption rather than a scrollbar:
69
+ * Ink's own output scrolled the buffer and the *first* command went off the top with no counter
70
+ * saying so. Returned rather than clamped silently, because the component has to render the
71
+ * "… N above/below" line against the same number the budget was computed from.
72
+ */
73
+ readonly paletteRows: number;
63
74
  /** Rows the conversation may draw if the mark takes none — its scroll counter already deducted. */
64
75
  readonly transcript: number;
65
76
  /** Rows a pane over the conversation may draw. It replaces the transcript rather than sharing. */
@@ -1 +1 @@
1
- {"version":3,"file":"chat-frame.d.ts","sourceRoot":"","sources":["../../src/lib/chat-frame.ts"],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
23
  * that names where it does work.
24
24
  */
25
25
  export declare function commandsAccepting(flag: string, exclude: string): readonly string[];
26
+ /**
27
+ * Split "an action word, or an agent" for a command whose action is optional.
28
+ *
29
+ * `channels <agent>` and `channels list <agent>` are both meant, so the first positional is one or
30
+ * the other and only its *value* says which. The action words win, exactly as a slash command
31
+ * resolves and as `config`'s own reader does — the difference being that this one reads the
32
+ * **command's spec** for the words rather than holding a second copy of them, so an action added to
33
+ * the table is covered with nothing to remember.
34
+ */
35
+ export declare function actionOrRef(command: string, first: string | undefined): {
36
+ readonly action: string | undefined;
37
+ readonly ref: string | undefined;
38
+ };
26
39
  //# sourceMappingURL=commands.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/lib/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAW,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEjE,yFAAyF;AACzF,eAAO,MAAM,YAAY,EAAE,SAAS,QAAQ,EAgB3C,CAAA;AA6BD,eAAO,MAAM,QAAQ,EAAE,SAAS,WAAW,EAw+B1C,CAAA;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAEjE;AAED,kEAAkE;AAClE,wBAAgB,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,QAAQ,EAAE,CAElE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAIlF"}
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/lib/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAW,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEjE,yFAAyF;AACzF,eAAO,MAAM,YAAY,EAAE,SAAS,QAAQ,EAgB3C,CAAA;AA6BD,eAAO,MAAM,QAAQ,EAAE,SAAS,WAAW,EAkqC1C,CAAA;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAEjE;AAED,kEAAkE;AAClE,wBAAgB,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,QAAQ,EAAE,CAElE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAIlF;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACvB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,GAAG,SAAS,GAC1B;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAS3E"}
@@ -167,7 +167,7 @@ export declare const MIN_BODY_ROWS = 3;
167
167
  * `… 1 below`. It is not derived from `COMMANDS` directly because `commands.ts` reads this module, and the
168
168
  * cycle would cost more than the assertion does.
169
169
  */
170
- export declare const LANDING_LIST_ROWS = 22;
170
+ export declare const LANDING_LIST_ROWS = 23;
171
171
  /**
172
172
  * Rows of conversation the landing screen keeps, whatever the brand mark would like.
173
173
  *
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Getting an agent hosted, adopted and reloaded — the sequence three commands share.
3
+ *
4
+ * `init`, `channels pair` and `restart` each need the same three moves: make sure a host is up
5
+ * (the bootstrap), have it adopt the agent (`POST /start`), and have it pick up a change
6
+ * (`POST /reload`). Written once, because three copies is how one of them comes to do the middle
7
+ * step and skip the last — and a pairing whose session sits on disk unread by the process that is
8
+ * supposed to answer is exactly the "paired, now run `serve` by hand" dead end this exists to close.
9
+ *
10
+ * Everything here talks to a host through the lease table and HTTP, never through the service
11
+ * manager: a host started by hand, by launchd, by systemd or by a container is the same host once
12
+ * it holds a lease, and the lease is the one witness every surface already trusts.
13
+ */
14
+ import type { LeaseRecord } from "@dispach/core";
15
+ import { type BootstrapOutcome, type BootstrapResult } from "#lib/bootstrap";
16
+ import { type HostReply } from "#lib/lifecycle";
17
+ /**
18
+ * Install and start the server unit, as the bootstrap does it.
19
+ *
20
+ * Reuses `daemonCommand` rather than reaching into the service layer, so a bootstrapped unit and
21
+ * one installed by hand are byte-identical — a second plan builder is how the two come to differ in
22
+ * a way nobody notices until one of them will not start. Its output is swallowed: the bootstrap's
23
+ * whole contract is *one line*, and `daemon install`'s four-row report in front of `agents` would
24
+ * be the opposite.
25
+ */
26
+ export declare function installServerUnit(): Promise<BootstrapResult>;
27
+ export type Installer = () => Promise<BootstrapResult>;
28
+ export interface EnsureHostOptions {
29
+ /** How to start one when none is up. Absent means "do not try" — a test, or a caller that must not install. */
30
+ readonly install?: Installer;
31
+ readonly store?: string;
32
+ readonly env?: Readonly<Record<string, string | undefined>>;
33
+ /** How long to wait for a freshly started server to claim its lease. */
34
+ readonly waitMs?: number;
35
+ }
36
+ /**
37
+ * A host with an HTTP address, starting one if allowed and none is up.
38
+ *
39
+ * `host` is `undefined` when nothing could be reached — a platform we do not drive, a container,
40
+ * CI, no installer, or a unit that installed and did not come up in time. The outcome says which,
41
+ * and the caller prints `announce(outcome)` so the person sees the same one line the bootstrap
42
+ * prints everywhere else.
43
+ */
44
+ export declare function ensureHost(options?: EnsureHostOptions): Promise<{
45
+ readonly outcome: BootstrapOutcome;
46
+ readonly host: LeaseRecord | undefined;
47
+ }>;
48
+ /**
49
+ * Have `host` serve this agent, unless something already does.
50
+ *
51
+ * `POST /v1/agents/:id/start` is also what `start` posts; a running host that already holds the
52
+ * lease is left alone rather than asked to start what it is serving.
53
+ */
54
+ export declare function adoptOnHost(host: LeaseRecord, manifestPath: string, store?: string): Promise<HostReply & {
55
+ readonly already?: true;
56
+ }>;
57
+ export type ReloadResult = {
58
+ readonly kind: "reloaded";
59
+ readonly pid: number;
60
+ readonly adopted: readonly string[];
61
+ } | {
62
+ readonly kind: "busy";
63
+ readonly pid: number;
64
+ } | {
65
+ readonly kind: "failed";
66
+ readonly pid: number;
67
+ readonly status: number;
68
+ readonly detail?: string;
69
+ readonly hint?: string;
70
+ } | {
71
+ readonly kind: "no-host";
72
+ };
73
+ /**
74
+ * Ask the host holding this agent to rebuild it from disk.
75
+ *
76
+ * `POST /v1/agents/:id/reload` disposes and re-creates the agent from its manifest, so a pairing
77
+ * written beside it, a token added to `.env` or an edited `agent.yaml` take effect without a
78
+ * restart of the process that hosts every other agent too. `409` is a turn in flight and is
79
+ * reported as such rather than retried: the person asked for a reload, not for a turn to be cut.
80
+ */
81
+ export declare function reloadOnHost(manifestPath: string, store?: string): Promise<ReloadResult>;
82
+ export interface LiveChannel {
83
+ readonly id: string;
84
+ readonly status: string;
85
+ readonly detail?: string;
86
+ readonly input?: {
87
+ readonly kind: string;
88
+ readonly payload: string;
89
+ readonly expiresAt?: string;
90
+ };
91
+ }
92
+ /**
93
+ * The channel states the host holding this agent reports, or `undefined` when nothing does.
94
+ *
95
+ * Best effort throughout: a host that refuses, has no HTTP, or answers something unexpected leaves
96
+ * the caller with the manifest view rather than a failed command. Reading a file must not start
97
+ * depending on a socket.
98
+ */
99
+ export declare function liveChannels(manifestPath: string, store?: string): Promise<Map<string, LiveChannel> | undefined>;
100
+ export type HostPairOutcome = "paired" | "no-code" | "timeout";
101
+ export interface WaitForPairingOptions {
102
+ readonly manifestPath: string;
103
+ readonly channelId: string;
104
+ readonly store?: string;
105
+ readonly out?: (text: string) => void;
106
+ /** How long to wait for the host to offer a code. */
107
+ readonly codeWaitMs?: number;
108
+ /** How long to wait for the phone once the code is on screen. */
109
+ readonly pairWaitMs?: number;
110
+ readonly pollMs?: number;
111
+ }
112
+ /**
113
+ * Show the code the host is offering and wait for the phone.
114
+ *
115
+ * The host does the pairing — it holds the socket to WhatsApp, and when the phone accepts, the
116
+ * session is already in the process that will answer. Nothing to reload afterwards, which is the
117
+ * whole reason this path is preferred over pairing in this process and asking the host to pick it
118
+ * up. Bounded twice: for the code to appear and for the phone to act, each named on the way out.
119
+ */
120
+ export declare function waitForPairing(options: WaitForPairingOptions): Promise<HostPairOutcome>;
121
+ //# sourceMappingURL=host-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-actions.d.ts","sourceRoot":"","sources":["../../src/lib/host-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAGhD,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAgB,MAAM,gBAAgB,CAAA;AAE1F,OAAO,EAIH,KAAK,SAAS,EAGjB,MAAM,gBAAgB,CAAA;AAEvB;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,eAAe,CAAC,CAmBlE;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,eAAe,CAAC,CAAA;AAEtD,MAAM,WAAW,iBAAiB;IAC9B,+GAA+G;IAC/G,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAC3D,wEAAwE;IACxE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAC3B;AAMD;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAC5B,OAAO,GAAE,iBAAsB,GAChC,OAAO,CAAC;IAAE,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,CAAA;CAAE,CAAC,CAiBzF;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAC7B,IAAI,EAAE,WAAW,EACjB,YAAY,EAAE,MAA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YAAY,EAAE,MAAM,EACpB,KAAK,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,SAAS,CAAC,CAe/C;AAED,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAA;AAE9D,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,qDAAqD;IACrD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,iEAAiE;IACjE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAC3B;AAMD;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CAwB7F"}
@@ -130,6 +130,17 @@ export interface InitAnswers {
130
130
  * generated manifest hidden, which is why the rule is now standing rather than case by case.
131
131
  */
132
132
  readonly telegram: string;
133
+ /**
134
+ * WhatsApp, asked separately from Telegram rather than as one multi-select.
135
+ *
136
+ * Two independent single-selects is the cheapest correct shape and satisfies "both at once"
137
+ * naturally. The alternative — one `none | telegram | whatsapp | both` answer — would need the
138
+ * pure wizard reducer to store more than one value per question, and would need
139
+ * `ProvisionStep.requires` to name two values so a browser form kept the follow-up fields
140
+ * visible under `both`: a breaking wire change for nothing. It also matches how `system`, `web`
141
+ * and `composio` already work — one capability, one question.
142
+ */
143
+ readonly whatsapp: string;
133
144
  /**
134
145
  * The bot token, written to the gitignored `.env`. Same rule as every other secret: the
135
146
  * manifest names the variable, no flag accepts the value.
@@ -143,6 +154,8 @@ export interface InitAnswers {
143
154
  * into the file, because a wrong handle fails the same way an empty list does and says less.
144
155
  */
145
156
  readonly telegramAllow?: string;
157
+ /** A WhatsApp number in digits. There is no token: pairing is a QR, not a credential. */
158
+ readonly whatsappNumber?: string;
146
159
  /**
147
160
  * Whether to serve the HTTP API: `none` or `local`.
148
161
  *
@@ -352,6 +365,25 @@ export declare const TELEGRAM_CHOICES: readonly {
352
365
  readonly label: string;
353
366
  }[];
354
367
  export declare function telegramChoice(value: string): (typeof TELEGRAM_CHOICES)[number] | undefined;
368
+ /**
369
+ * WhatsApp, and the label carries the warning because this is where the choice is made.
370
+ *
371
+ * Baileys reverse-engineers WhatsApp Web with no appeal path when a number is banned, so the one
372
+ * sentence that matters — pair a spare number — belongs at the moment somebody says yes, not three
373
+ * files away in a README they will read afterwards if at all.
374
+ */
375
+ /**
376
+ * Where the plugin is published, and the name it installs under.
377
+ *
378
+ * Derived from the brand rather than written, because hard rule 3 puts the product name in exactly
379
+ * one file — and a rename that left a literal here would print an install command for a repository
380
+ * that does not exist. The owner is a person's GitHub handle, which a rename does not move.
381
+ */
382
+ export declare const WHATSAPP_CHOICES: readonly {
383
+ readonly value: string;
384
+ readonly label: string;
385
+ }[];
386
+ export declare function whatsappChoice(value: string): (typeof WHATSAPP_CHOICES)[number] | undefined;
355
387
  /**
356
388
  * Whether to serve the HTTP surface.
357
389
  *
@@ -1 +1 @@
1
- {"version":3,"file":"init-flow.d.ts","sourceRoot":"","sources":["../../src/lib/init-flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAgBvF,CAAA;AAED,2FAA2F;AAC3F,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAA8C,CAAA;AAEjG,MAAM,MAAM,QAAQ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,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAIrD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAkOpE;AA+ID,yFAAyF;AACzF,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAE7D;AAED,kEAAkE;AAClE,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,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,CA+CxE"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Pairing WhatsApp during `init`, between writing the files and finishing.
3
+ *
4
+ * ## Why here rather than "run these two commands afterwards"
5
+ *
6
+ * Somebody who has just typed their WhatsApp number has said what they want; sending them away to
7
+ * start a server and run a second command to collect a code is answering a question with homework.
8
+ * The catalogue interlude set the precedent — an answer that costs time gets its own screen inside
9
+ * the flow, not a paragraph of instructions after it.
10
+ *
11
+ * It sits **after the files are written** for the same reason the skills install does: the channel
12
+ * is constructed from the manifest that was just validated, so there is exactly one description of
13
+ * this channel rather than a second one assembled from the answers.
14
+ *
15
+ * ## What it must not do
16
+ *
17
+ * **It must never fail the init and must never hang.** The agent is already written and valid by the
18
+ * time this runs; a pairing that does not happen is a thing to do later, not a reason to have no
19
+ * agent. Every path here reports and returns, and the wait is bounded — which matters more than
20
+ * usual because the transport **does not pair under Bun**, where no code ever arrives and an
21
+ * unbounded wait would turn the last step of onboarding into a hang.
22
+ *
23
+ * **It is skipped without a terminal.** A scripted `--yes` run has nobody to read a code or hold a
24
+ * phone, and opening a socket to WhatsApp in CI is the expensive default the wizard's own fallback
25
+ * rule exists to prevent. The commands that do it later are named instead.
26
+ */
27
+ import { CHANNELS } from "#lib/providers";
28
+ export interface PairRequest {
29
+ readonly manifestPath: string;
30
+ readonly dir: string;
31
+ readonly number: string;
32
+ readonly channelId: string;
33
+ /** Where the manifest keeps the session. Defaults to the channel's own default. */
34
+ readonly authDir?: string;
35
+ /** Injected by tests, which never reach WhatsApp. */
36
+ readonly factory?: typeof CHANNELS.whatsapp;
37
+ readonly codeWaitMs?: number;
38
+ readonly pairWaitMs?: number;
39
+ readonly out?: (text: string) => void;
40
+ }
41
+ export type PairOutcome = "paired" | "code-shown" | "no-code" | "unavailable";
42
+ /**
43
+ * Offer a pairing code and wait for the phone. Never throws.
44
+ *
45
+ * Returns what happened so the caller's closing message can be honest about it — a "next steps"
46
+ * block that says "scan the code" after no code appeared is the kind of true-sounding wrong this
47
+ * project keeps finding.
48
+ */
49
+ export declare function pairWhatsApp(request: PairRequest): Promise<PairOutcome>;
50
+ /** What to tell somebody who did not finish pairing here. One sentence per route. */
51
+ export declare function pairLater(agentRef: string): string;
52
+ //# sourceMappingURL=init-whatsapp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-whatsapp.d.ts","sourceRoot":"","sources":["../../src/lib/init-whatsapp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAczC,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,mFAAmF;IACnF,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,qDAAqD;IACrD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,QAAQ,CAAC,QAAQ,CAAA;IAC3C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC;AAED,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,YAAY,GAAG,SAAS,GAAG,aAAa,CAAA;AAE7E;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CA6F7E;AAOD,qFAAqF;AACrF,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAElD"}
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Fetching a plugin, and reading what is installed.
3
+ *
4
+ * ## One self-contained bundle, and why that is the whole design
5
+ *
6
+ * Nothing installs dependencies, ever — hard rule 5, and it is what makes this mechanism small
7
+ * enough to be worth having at all. A plugin is fetched as a directory with a runnable entry file
8
+ * and nothing to resolve, so the npm install and the container — whose `node_modules` holds only
9
+ * the two declared dependencies — load a plugin exactly as a checkout does. `notSelfContained` is what keeps that
10
+ * true: a tree that declares runtime dependencies and ships none is refused **here**, rather than
11
+ * half-loading at somebody's next boot.
12
+ *
13
+ * ## Git, and what git costs
14
+ *
15
+ * `realGit` from `lib/source-cache.ts` is reused wholesale — the only network module in the CLI, with
16
+ * prompting disabled in all four ways git can be asked and a wall-clock timeout, because a
17
+ * `git ls-remote` on a repository that does not exist once sat for two minutes waiting for a
18
+ * credential prompt nobody was watching.
19
+ *
20
+ * What git does not buy, stated rather than discovered: no version resolution and no integrity check.
21
+ * A bare spec is whatever that branch points at today. `--ref` pins a tag or a commit, the resolved
22
+ * commit is recorded beside the plugin, and `plugins list` prints it — so "which code is loaded" has
23
+ * an answer. The host-range gate is a **compatibility** check and not an authenticity one; nothing
24
+ * here verifies who published what. npm specs are the thing that would, and they are deliberately out
25
+ * of scope: a registry fetch plus a tar extractor, and a change to "one npm name" worth its own
26
+ * decision rather than arriving as a side effect.
27
+ *
28
+ * ## No registry file
29
+ *
30
+ * `sources` needs `sources.json` because a source is machine-level and nothing else records it. A
31
+ * plugin is selected by each agent's own `plugins:` block, so the manifest *is* the registry, and a
32
+ * second list would be exactly the drift this repo keeps paying for. What lives beside the code is
33
+ * provenance, not selection: `.origin.json`, one file per plugin, deleted with the directory.
34
+ */
35
+ import { type Git } from "#lib/source-cache";
36
+ /** Provenance, written beside the code. Not a registry — see the module docstring. */
37
+ export interface PluginOrigin {
38
+ readonly url: string;
39
+ /** The branch, tag or commit asked for, or absent for the remote's default. */
40
+ readonly ref?: string;
41
+ /** Subdirectory of the repository the plugin was taken from, when it is a monorepo. */
42
+ readonly path?: string;
43
+ /** What the ref resolved to at fetch time. Short, as `git rev-parse --short` prints it. */
44
+ readonly commit: string;
45
+ readonly fetchedAt: string;
46
+ }
47
+ export declare const ORIGIN_FILE = ".origin.json";
48
+ export interface InstalledPlugin {
49
+ /** The directory name, which is what a manifest's `plugins:` entry writes. */
50
+ readonly name: string;
51
+ readonly dir: string;
52
+ readonly origin?: PluginOrigin;
53
+ }
54
+ export declare function readOrigin(dir: string): PluginOrigin | undefined;
55
+ /**
56
+ * Every plugin directory in the root, alphabetical.
57
+ *
58
+ * A listing of what is *available*, which is a different question from what an agent loads — that
59
+ * one only the manifest answers, and `plugins list` prints both.
60
+ */
61
+ export declare function installedPlugins(env?: Readonly<Record<string, string | undefined>>): readonly InstalledPlugin[];
62
+ /**
63
+ * The entry file a directory would be loaded through — the same derivation the loader performs.
64
+ *
65
+ * Duplicated deliberately and narrowly: core's version *throws* the load-time refusals, and this one
66
+ * answers "would it load" before anything is renamed into place. The shape it has to agree about is
67
+ * one field of one file, and `plugins add` asserts the agreement by loading through it.
68
+ */
69
+ export declare function entryOf(dir: string): string;
70
+ /**
71
+ * Why this tree cannot be loaded without an install, or `undefined` when it can.
72
+ *
73
+ * A committed `node_modules` clears it: vendoring the dependencies is a perfectly good way to be
74
+ * self-contained, and refusing a tree that already has what it declares would be refusing the thing
75
+ * being asked for.
76
+ */
77
+ export declare function notSelfContained(dir: string): string | undefined;
78
+ /** What a person typed, turned into something to clone. */
79
+ export interface PluginSpec {
80
+ readonly name: string;
81
+ readonly url: string;
82
+ readonly ref?: string;
83
+ readonly path?: string;
84
+ }
85
+ /**
86
+ * Where a repository URL's plugin name comes from.
87
+ *
88
+ * The subdirectory when the URL names one — a monorepo's `packages/channel-whatsapp` is the plugin,
89
+ * not the repository — and the repository name otherwise. Refused rather than transformed when it is
90
+ * not a usable directory name: silently lowercasing `My-Channel` would put the code somewhere
91
+ * other than where the `plugins:` entry the person then reads says it is.
92
+ */
93
+ export declare function pluginNameFor(url: string, path: string | undefined): string;
94
+ export interface FetchPluginResult {
95
+ readonly dir: string;
96
+ readonly commit: string;
97
+ }
98
+ /**
99
+ * Clone a plugin into the root, replacing whatever was there only once it has worked.
100
+ *
101
+ * `<dir>.partial` then a rename, the same discipline `fetchSource` uses and for the same reason: an
102
+ * interrupted update leaves the previous copy intact and loadable, and an interrupted *first* fetch
103
+ * leaves no directory rather than an empty one that reads as a plugin with nothing in it.
104
+ *
105
+ * `.git` is dropped afterwards, which is where this differs from a skills source. A source is a
106
+ * working copy that `sources update` re-clones; a plugin directory is a vendored artefact that
107
+ * `.origin.json` describes, and leaving a checkout there invites a `git pull` that would move the
108
+ * code out from under the recorded commit with nothing reporting it.
109
+ *
110
+ * The caller decides whether the result is acceptable *before* renaming — see `plugins add`, which
111
+ * loads the plugin out of the partial directory and refuses there. A command that undoes a mistake
112
+ * must not sit behind the load the mistake breaks.
113
+ */
114
+ export declare function fetchPlugin(spec: PluginSpec, options?: {
115
+ readonly env?: Readonly<Record<string, string | undefined>>;
116
+ readonly git?: Git;
117
+ /** Called with the partial directory before it is renamed into place. Throwing discards it. */
118
+ readonly inspect?: (dir: string) => Promise<void> | void;
119
+ }): Promise<FetchPluginResult>;
120
+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MAAM,YAAY,EAAE,SAAS,MAAM,EAAgC,CAAA;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAE7D,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAA0B,CAAA;AAEnE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,gBAAgB,EAAE,cAK9B,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAAkC,CAAA"}
1
+ {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/lib/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EACR,cAAc,EACd,cAAc,EACd,YAAY,EACZ,mBAAmB,EACtB,MAAM,eAAe,CAAA;AAKtB,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAWxE,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,IAAI,YAAY,CAE3C;AAED,wDAAwD;AACxD,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAAgC,CAAA;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAsB7D,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAA0B,CAAA;AAEnE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,gBAAgB,EAAE,cAM9B,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAAkC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"provision.d.ts","sourceRoot":"","sources":["../../src/lib/provision.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKH,OAAO,EAEH,KAAK,aAAa,EAClB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AQ,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,aAAa,CAwB3F;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,gBAAgB,GAAG,SAAS,aAAa,EAAE,CAyDnF;AAED,MAAM,WAAW,gBAAgB;IAC7B,sFAAsF;IACtF,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAClD,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAA;CACtC;AAED,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,+FAA+F;IAC/F,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CACpC;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,eAAe,CAiHvE"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The README's command table, rendered from `COMMANDS`.
3
+ *
4
+ * The table was hand-written and its own intro admitted it had drifted — five commands missing at
5
+ * one point, `model probe` listed as a command name. `--help` is generated from the spec table and
6
+ * cannot drift, so the README's copy is generated from the same one: `scripts/readme-commands.ts`
7
+ * writes it between two markers, and `readme.test.ts` fails when the README disagrees with what
8
+ * this renders. One source, two renderings, and a test rather than a sentence saying "keep in step".
9
+ */
10
+ export declare const TABLE_BEGIN = "<!-- commands:begin \u2014 generated by scripts/readme-commands.ts; do not edit by hand -->";
11
+ export declare const TABLE_END = "<!-- commands:end -->";
12
+ export declare function renderCommandTable(): string;
13
+ /** The README with its table replaced, or `undefined` when the markers are missing. */
14
+ export declare function withCommandTable(readme: string): string | undefined;
15
+ //# sourceMappingURL=readme-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readme-table.d.ts","sourceRoot":"","sources":["../../src/lib/readme-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,eAAO,MAAM,WAAW,gGACoE,CAAA;AAC5F,eAAO,MAAM,SAAS,0BAA0B,CAAA;AAEhD,wBAAgB,kBAAkB,IAAI,MAAM,CAG3C;AAED,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKnE"}