opensip-cli 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 (348) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +8 -0
  3. package/README.md +51 -0
  4. package/dist/api.d.ts +17 -0
  5. package/dist/api.d.ts.map +1 -0
  6. package/dist/api.js +16 -0
  7. package/dist/api.js.map +1 -0
  8. package/dist/bootstrap/admit-tool-package.d.ts +117 -0
  9. package/dist/bootstrap/admit-tool-package.d.ts.map +1 -0
  10. package/dist/bootstrap/admit-tool-package.js +170 -0
  11. package/dist/bootstrap/admit-tool-package.js.map +1 -0
  12. package/dist/bootstrap/baseline-seams.d.ts +30 -0
  13. package/dist/bootstrap/baseline-seams.d.ts.map +1 -0
  14. package/dist/bootstrap/baseline-seams.js +156 -0
  15. package/dist/bootstrap/baseline-seams.js.map +1 -0
  16. package/dist/bootstrap/bootstrap-error.d.ts +41 -0
  17. package/dist/bootstrap/bootstrap-error.d.ts.map +1 -0
  18. package/dist/bootstrap/bootstrap-error.js +33 -0
  19. package/dist/bootstrap/bootstrap-error.js.map +1 -0
  20. package/dist/bootstrap/build-command-registration-input.d.ts +34 -0
  21. package/dist/bootstrap/build-command-registration-input.d.ts.map +1 -0
  22. package/dist/bootstrap/build-command-registration-input.js +73 -0
  23. package/dist/bootstrap/build-command-registration-input.js.map +1 -0
  24. package/dist/bootstrap/build-per-run-scope.d.ts +62 -0
  25. package/dist/bootstrap/build-per-run-scope.d.ts.map +1 -0
  26. package/dist/bootstrap/build-per-run-scope.js +152 -0
  27. package/dist/bootstrap/build-per-run-scope.js.map +1 -0
  28. package/dist/bootstrap/build-targets.d.ts +42 -0
  29. package/dist/bootstrap/build-targets.d.ts.map +1 -0
  30. package/dist/bootstrap/build-targets.js +117 -0
  31. package/dist/bootstrap/build-targets.js.map +1 -0
  32. package/dist/bootstrap/cli-defaults.d.ts +35 -0
  33. package/dist/bootstrap/cli-defaults.d.ts.map +1 -0
  34. package/dist/bootstrap/cli-defaults.js +65 -0
  35. package/dist/bootstrap/cli-defaults.js.map +1 -0
  36. package/dist/bootstrap/config-and-capabilities.d.ts +74 -0
  37. package/dist/bootstrap/config-and-capabilities.d.ts.map +1 -0
  38. package/dist/bootstrap/config-and-capabilities.js +224 -0
  39. package/dist/bootstrap/config-and-capabilities.js.map +1 -0
  40. package/dist/bootstrap/deliver-envelope.d.ts +80 -0
  41. package/dist/bootstrap/deliver-envelope.d.ts.map +1 -0
  42. package/dist/bootstrap/deliver-envelope.js +195 -0
  43. package/dist/bootstrap/deliver-envelope.js.map +1 -0
  44. package/dist/bootstrap/egress-plane.d.ts +22 -0
  45. package/dist/bootstrap/egress-plane.d.ts.map +1 -0
  46. package/dist/bootstrap/egress-plane.js +37 -0
  47. package/dist/bootstrap/egress-plane.js.map +1 -0
  48. package/dist/bootstrap/host-planes.d.ts +28 -0
  49. package/dist/bootstrap/host-planes.d.ts.map +1 -0
  50. package/dist/bootstrap/host-planes.js +152 -0
  51. package/dist/bootstrap/host-planes.js.map +1 -0
  52. package/dist/bootstrap/index.d.ts +76 -0
  53. package/dist/bootstrap/index.d.ts.map +1 -0
  54. package/dist/bootstrap/index.js +109 -0
  55. package/dist/bootstrap/index.js.map +1 -0
  56. package/dist/bootstrap/live-plane.d.ts +51 -0
  57. package/dist/bootstrap/live-plane.d.ts.map +1 -0
  58. package/dist/bootstrap/live-plane.js +72 -0
  59. package/dist/bootstrap/live-plane.js.map +1 -0
  60. package/dist/bootstrap/load-tool-capabilities.d.ts +42 -0
  61. package/dist/bootstrap/load-tool-capabilities.d.ts.map +1 -0
  62. package/dist/bootstrap/load-tool-capabilities.js +76 -0
  63. package/dist/bootstrap/load-tool-capabilities.js.map +1 -0
  64. package/dist/bootstrap/output-plane.d.ts +37 -0
  65. package/dist/bootstrap/output-plane.d.ts.map +1 -0
  66. package/dist/bootstrap/output-plane.js +114 -0
  67. package/dist/bootstrap/output-plane.js.map +1 -0
  68. package/dist/bootstrap/owning-tool-init.d.ts +32 -0
  69. package/dist/bootstrap/owning-tool-init.d.ts.map +1 -0
  70. package/dist/bootstrap/owning-tool-init.js +69 -0
  71. package/dist/bootstrap/owning-tool-init.js.map +1 -0
  72. package/dist/bootstrap/pre-action-guards.d.ts +44 -0
  73. package/dist/bootstrap/pre-action-guards.d.ts.map +1 -0
  74. package/dist/bootstrap/pre-action-guards.js +136 -0
  75. package/dist/bootstrap/pre-action-guards.js.map +1 -0
  76. package/dist/bootstrap/pre-action-hook.d.ts +68 -0
  77. package/dist/bootstrap/pre-action-hook.d.ts.map +1 -0
  78. package/dist/bootstrap/pre-action-hook.js +289 -0
  79. package/dist/bootstrap/pre-action-hook.js.map +1 -0
  80. package/dist/bootstrap/pre-action-messages.d.ts +32 -0
  81. package/dist/bootstrap/pre-action-messages.d.ts.map +1 -0
  82. package/dist/bootstrap/pre-action-messages.js +49 -0
  83. package/dist/bootstrap/pre-action-messages.js.map +1 -0
  84. package/dist/bootstrap/process-idempotency.d.ts +17 -0
  85. package/dist/bootstrap/process-idempotency.d.ts.map +1 -0
  86. package/dist/bootstrap/process-idempotency.js +20 -0
  87. package/dist/bootstrap/process-idempotency.js.map +1 -0
  88. package/dist/bootstrap/register-language-adapters.d.ts +23 -0
  89. package/dist/bootstrap/register-language-adapters.d.ts.map +1 -0
  90. package/dist/bootstrap/register-language-adapters.js +35 -0
  91. package/dist/bootstrap/register-language-adapters.js.map +1 -0
  92. package/dist/bootstrap/register-tools.d.ts +228 -0
  93. package/dist/bootstrap/register-tools.d.ts.map +1 -0
  94. package/dist/bootstrap/register-tools.js +696 -0
  95. package/dist/bootstrap/register-tools.js.map +1 -0
  96. package/dist/bootstrap/render.d.ts +27 -0
  97. package/dist/bootstrap/render.d.ts.map +1 -0
  98. package/dist/bootstrap/render.js +53 -0
  99. package/dist/bootstrap/render.js.map +1 -0
  100. package/dist/bootstrap/report.d.ts +34 -0
  101. package/dist/bootstrap/report.d.ts.map +1 -0
  102. package/dist/bootstrap/report.js +47 -0
  103. package/dist/bootstrap/report.js.map +1 -0
  104. package/dist/bootstrap/run-plane.d.ts +105 -0
  105. package/dist/bootstrap/run-plane.d.ts.map +1 -0
  106. package/dist/bootstrap/run-plane.js +190 -0
  107. package/dist/bootstrap/run-plane.js.map +1 -0
  108. package/dist/bootstrap/scope-access.d.ts +68 -0
  109. package/dist/bootstrap/scope-access.d.ts.map +1 -0
  110. package/dist/bootstrap/scope-access.js +115 -0
  111. package/dist/bootstrap/scope-access.js.map +1 -0
  112. package/dist/bootstrap/state-seams.d.ts +14 -0
  113. package/dist/bootstrap/state-seams.d.ts.map +1 -0
  114. package/dist/bootstrap/state-seams.js +26 -0
  115. package/dist/bootstrap/state-seams.js.map +1 -0
  116. package/dist/bootstrap/tool-lifecycle.d.ts +102 -0
  117. package/dist/bootstrap/tool-lifecycle.d.ts.map +1 -0
  118. package/dist/bootstrap/tool-lifecycle.js +103 -0
  119. package/dist/bootstrap/tool-lifecycle.js.map +1 -0
  120. package/dist/bootstrap/tool-trust.d.ts +49 -0
  121. package/dist/bootstrap/tool-trust.d.ts.map +1 -0
  122. package/dist/bootstrap/tool-trust.js +65 -0
  123. package/dist/bootstrap/tool-trust.js.map +1 -0
  124. package/dist/bootstrap/validate-tool.d.ts +22 -0
  125. package/dist/bootstrap/validate-tool.d.ts.map +1 -0
  126. package/dist/bootstrap/validate-tool.js +38 -0
  127. package/dist/bootstrap/validate-tool.js.map +1 -0
  128. package/dist/cli-context.d.ts +38 -0
  129. package/dist/cli-context.d.ts.map +1 -0
  130. package/dist/cli-context.js +134 -0
  131. package/dist/cli-context.js.map +1 -0
  132. package/dist/commands/agent-catalog.d.ts +45 -0
  133. package/dist/commands/agent-catalog.d.ts.map +1 -0
  134. package/dist/commands/agent-catalog.js +115 -0
  135. package/dist/commands/agent-catalog.js.map +1 -0
  136. package/dist/commands/assemble-outcome.d.ts +69 -0
  137. package/dist/commands/assemble-outcome.d.ts.map +1 -0
  138. package/dist/commands/assemble-outcome.js +121 -0
  139. package/dist/commands/assemble-outcome.js.map +1 -0
  140. package/dist/commands/clear.d.ts +32 -0
  141. package/dist/commands/clear.d.ts.map +1 -0
  142. package/dist/commands/clear.js +73 -0
  143. package/dist/commands/clear.js.map +1 -0
  144. package/dist/commands/completion.d.ts +90 -0
  145. package/dist/commands/completion.d.ts.map +1 -0
  146. package/dist/commands/completion.js +233 -0
  147. package/dist/commands/completion.js.map +1 -0
  148. package/dist/commands/configure.d.ts +32 -0
  149. package/dist/commands/configure.d.ts.map +1 -0
  150. package/dist/commands/configure.js +94 -0
  151. package/dist/commands/configure.js.map +1 -0
  152. package/dist/commands/history.d.ts +18 -0
  153. package/dist/commands/history.d.ts.map +1 -0
  154. package/dist/commands/history.js +48 -0
  155. package/dist/commands/history.js.map +1 -0
  156. package/dist/commands/host-command-specs.d.ts +49 -0
  157. package/dist/commands/host-command-specs.d.ts.map +1 -0
  158. package/dist/commands/host-command-specs.js +331 -0
  159. package/dist/commands/host-command-specs.js.map +1 -0
  160. package/dist/commands/host-subcommand-groups.d.ts +69 -0
  161. package/dist/commands/host-subcommand-groups.d.ts.map +1 -0
  162. package/dist/commands/host-subcommand-groups.js +374 -0
  163. package/dist/commands/host-subcommand-groups.js.map +1 -0
  164. package/dist/commands/index.d.ts +36 -0
  165. package/dist/commands/index.d.ts.map +1 -0
  166. package/dist/commands/index.js +36 -0
  167. package/dist/commands/index.js.map +1 -0
  168. package/dist/commands/init/config-templates.d.ts +16 -0
  169. package/dist/commands/init/config-templates.d.ts.map +1 -0
  170. package/dist/commands/init/config-templates.js +108 -0
  171. package/dist/commands/init/config-templates.js.map +1 -0
  172. package/dist/commands/init/file-classifier.d.ts +40 -0
  173. package/dist/commands/init/file-classifier.d.ts.map +1 -0
  174. package/dist/commands/init/file-classifier.js +155 -0
  175. package/dist/commands/init/file-classifier.js.map +1 -0
  176. package/dist/commands/init/language-detection.d.ts +44 -0
  177. package/dist/commands/init/language-detection.d.ts.map +1 -0
  178. package/dist/commands/init/language-detection.js +124 -0
  179. package/dist/commands/init/language-detection.js.map +1 -0
  180. package/dist/commands/init/scaffold-writer.d.ts +26 -0
  181. package/dist/commands/init/scaffold-writer.d.ts.map +1 -0
  182. package/dist/commands/init/scaffold-writer.js +102 -0
  183. package/dist/commands/init/scaffold-writer.js.map +1 -0
  184. package/dist/commands/init/state-machine.d.ts +32 -0
  185. package/dist/commands/init/state-machine.d.ts.map +1 -0
  186. package/dist/commands/init/state-machine.js +105 -0
  187. package/dist/commands/init/state-machine.js.map +1 -0
  188. package/dist/commands/init.d.ts +95 -0
  189. package/dist/commands/init.d.ts.map +1 -0
  190. package/dist/commands/init.js +209 -0
  191. package/dist/commands/init.js.map +1 -0
  192. package/dist/commands/mount-command-spec.d.ts +106 -0
  193. package/dist/commands/mount-command-spec.d.ts.map +1 -0
  194. package/dist/commands/mount-command-spec.js +313 -0
  195. package/dist/commands/mount-command-spec.js.map +1 -0
  196. package/dist/commands/mount-result-command.d.ts +71 -0
  197. package/dist/commands/mount-result-command.d.ts.map +1 -0
  198. package/dist/commands/mount-result-command.js +76 -0
  199. package/dist/commands/mount-result-command.js.map +1 -0
  200. package/dist/commands/plugin/config-edit.d.ts +20 -0
  201. package/dist/commands/plugin/config-edit.d.ts.map +1 -0
  202. package/dist/commands/plugin/config-edit.js +102 -0
  203. package/dist/commands/plugin/config-edit.js.map +1 -0
  204. package/dist/commands/plugin/domain-resolution.d.ts +38 -0
  205. package/dist/commands/plugin/domain-resolution.d.ts.map +1 -0
  206. package/dist/commands/plugin/domain-resolution.js +98 -0
  207. package/dist/commands/plugin/domain-resolution.js.map +1 -0
  208. package/dist/commands/plugin/host-dir.d.ts +42 -0
  209. package/dist/commands/plugin/host-dir.d.ts.map +1 -0
  210. package/dist/commands/plugin/host-dir.js +168 -0
  211. package/dist/commands/plugin/host-dir.js.map +1 -0
  212. package/dist/commands/plugin-host-ops.d.ts +41 -0
  213. package/dist/commands/plugin-host-ops.d.ts.map +1 -0
  214. package/dist/commands/plugin-host-ops.js +114 -0
  215. package/dist/commands/plugin-host-ops.js.map +1 -0
  216. package/dist/commands/plugin.d.ts +81 -0
  217. package/dist/commands/plugin.d.ts.map +1 -0
  218. package/dist/commands/plugin.js +287 -0
  219. package/dist/commands/plugin.js.map +1 -0
  220. package/dist/commands/render-outcome.d.ts +52 -0
  221. package/dist/commands/render-outcome.d.ts.map +1 -0
  222. package/dist/commands/render-outcome.js +55 -0
  223. package/dist/commands/render-outcome.js.map +1 -0
  224. package/dist/commands/session-show.d.ts +27 -0
  225. package/dist/commands/session-show.d.ts.map +1 -0
  226. package/dist/commands/session-show.js +166 -0
  227. package/dist/commands/session-show.js.map +1 -0
  228. package/dist/commands/shared.d.ts +107 -0
  229. package/dist/commands/shared.d.ts.map +1 -0
  230. package/dist/commands/shared.js +13 -0
  231. package/dist/commands/shared.js.map +1 -0
  232. package/dist/commands/tools/data-purge.d.ts +20 -0
  233. package/dist/commands/tools/data-purge.d.ts.map +1 -0
  234. package/dist/commands/tools/data-purge.js +59 -0
  235. package/dist/commands/tools/data-purge.js.map +1 -0
  236. package/dist/commands/tools/index.d.ts +16 -0
  237. package/dist/commands/tools/index.d.ts.map +1 -0
  238. package/dist/commands/tools/index.js +213 -0
  239. package/dist/commands/tools/index.js.map +1 -0
  240. package/dist/commands/tools/install.d.ts +24 -0
  241. package/dist/commands/tools/install.d.ts.map +1 -0
  242. package/dist/commands/tools/install.js +83 -0
  243. package/dist/commands/tools/install.js.map +1 -0
  244. package/dist/commands/tools/list.d.ts +41 -0
  245. package/dist/commands/tools/list.d.ts.map +1 -0
  246. package/dist/commands/tools/list.js +103 -0
  247. package/dist/commands/tools/list.js.map +1 -0
  248. package/dist/commands/tools/runtime-probe-entry.d.ts +14 -0
  249. package/dist/commands/tools/runtime-probe-entry.d.ts.map +1 -0
  250. package/dist/commands/tools/runtime-probe-entry.js +36 -0
  251. package/dist/commands/tools/runtime-probe-entry.js.map +1 -0
  252. package/dist/commands/tools/runtime-probe.d.ts +29 -0
  253. package/dist/commands/tools/runtime-probe.d.ts.map +1 -0
  254. package/dist/commands/tools/runtime-probe.js +66 -0
  255. package/dist/commands/tools/runtime-probe.js.map +1 -0
  256. package/dist/commands/tools/storage-contract-checks.d.ts +37 -0
  257. package/dist/commands/tools/storage-contract-checks.d.ts.map +1 -0
  258. package/dist/commands/tools/storage-contract-checks.js +91 -0
  259. package/dist/commands/tools/storage-contract-checks.js.map +1 -0
  260. package/dist/commands/tools/uninstall.d.ts +29 -0
  261. package/dist/commands/tools/uninstall.d.ts.map +1 -0
  262. package/dist/commands/tools/uninstall.js +77 -0
  263. package/dist/commands/tools/uninstall.js.map +1 -0
  264. package/dist/commands/tools/validate.d.ts +44 -0
  265. package/dist/commands/tools/validate.d.ts.map +1 -0
  266. package/dist/commands/tools/validate.js +202 -0
  267. package/dist/commands/tools/validate.js.map +1 -0
  268. package/dist/commands/uninstall/targets.d.ts +53 -0
  269. package/dist/commands/uninstall/targets.d.ts.map +1 -0
  270. package/dist/commands/uninstall/targets.js +205 -0
  271. package/dist/commands/uninstall/targets.js.map +1 -0
  272. package/dist/commands/uninstall.d.ts +88 -0
  273. package/dist/commands/uninstall.d.ts.map +1 -0
  274. package/dist/commands/uninstall.js +184 -0
  275. package/dist/commands/uninstall.js.map +1 -0
  276. package/dist/env/host-env-specs.d.ts +52 -0
  277. package/dist/env/host-env-specs.d.ts.map +1 -0
  278. package/dist/env/host-env-specs.js +129 -0
  279. package/dist/env/host-env-specs.js.map +1 -0
  280. package/dist/error-handler.d.ts +64 -0
  281. package/dist/error-handler.d.ts.map +1 -0
  282. package/dist/error-handler.js +180 -0
  283. package/dist/error-handler.js.map +1 -0
  284. package/dist/index.d.ts +21 -0
  285. package/dist/index.d.ts.map +1 -0
  286. package/dist/index.js +154 -0
  287. package/dist/index.js.map +1 -0
  288. package/dist/open-report.d.ts +40 -0
  289. package/dist/open-report.d.ts.map +1 -0
  290. package/dist/open-report.js +54 -0
  291. package/dist/open-report.js.map +1 -0
  292. package/dist/report-compose.d.ts +35 -0
  293. package/dist/report-compose.d.ts.map +1 -0
  294. package/dist/report-compose.js +103 -0
  295. package/dist/report-compose.js.map +1 -0
  296. package/dist/session-replay-registry.d.ts +20 -0
  297. package/dist/session-replay-registry.d.ts.map +1 -0
  298. package/dist/session-replay-registry.js +38 -0
  299. package/dist/session-replay-registry.js.map +1 -0
  300. package/dist/telemetry/profiling.d.ts +42 -0
  301. package/dist/telemetry/profiling.d.ts.map +1 -0
  302. package/dist/telemetry/profiling.js +160 -0
  303. package/dist/telemetry/profiling.js.map +1 -0
  304. package/dist/telemetry/sdk-init.d.ts +87 -0
  305. package/dist/telemetry/sdk-init.d.ts.map +1 -0
  306. package/dist/telemetry/sdk-init.js +235 -0
  307. package/dist/telemetry/sdk-init.js.map +1 -0
  308. package/dist/ui/App.d.ts +32 -0
  309. package/dist/ui/App.d.ts.map +1 -0
  310. package/dist/ui/App.js +35 -0
  311. package/dist/ui/App.js.map +1 -0
  312. package/dist/ui/render.d.ts +15 -0
  313. package/dist/ui/render.d.ts.map +1 -0
  314. package/dist/ui/render.js +21 -0
  315. package/dist/ui/render.js.map +1 -0
  316. package/dist/ui/result-to-view.d.ts +40 -0
  317. package/dist/ui/result-to-view.d.ts.map +1 -0
  318. package/dist/ui/result-to-view.js +389 -0
  319. package/dist/ui/result-to-view.js.map +1 -0
  320. package/dist/ui/views/init-view.d.ts +9 -0
  321. package/dist/ui/views/init-view.d.ts.map +1 -0
  322. package/dist/ui/views/init-view.js +119 -0
  323. package/dist/ui/views/init-view.js.map +1 -0
  324. package/dist/ui/views/misc-views.d.ts +18 -0
  325. package/dist/ui/views/misc-views.d.ts.map +1 -0
  326. package/dist/ui/views/misc-views.js +244 -0
  327. package/dist/ui/views/misc-views.js.map +1 -0
  328. package/dist/ui/views/plugin-view.d.ts +8 -0
  329. package/dist/ui/views/plugin-view.d.ts.map +1 -0
  330. package/dist/ui/views/plugin-view.js +135 -0
  331. package/dist/ui/views/plugin-view.js.map +1 -0
  332. package/dist/ui/views/tools-views.d.ts +12 -0
  333. package/dist/ui/views/tools-views.d.ts.map +1 -0
  334. package/dist/ui/views/tools-views.js +152 -0
  335. package/dist/ui/views/tools-views.js.map +1 -0
  336. package/dist/update-notifier.d.ts +108 -0
  337. package/dist/update-notifier.d.ts.map +1 -0
  338. package/dist/update-notifier.js +188 -0
  339. package/dist/update-notifier.js.map +1 -0
  340. package/dist/update-state.d.ts +40 -0
  341. package/dist/update-state.d.ts.map +1 -0
  342. package/dist/update-state.js +81 -0
  343. package/dist/update-state.js.map +1 -0
  344. package/dist/welcome.d.ts +53 -0
  345. package/dist/welcome.d.ts.map +1 -0
  346. package/dist/welcome.js +89 -0
  347. package/dist/welcome.js.map +1 -0
  348. package/package.json +100 -0
@@ -0,0 +1,32 @@
1
+ /**
2
+ * pre-action-messages — pure message formatters for the bootstrap
3
+ * `preAction` hook.
4
+ *
5
+ * Extracted from `pre-action-hook.ts` to keep that file focused on the
6
+ * hook's control flow. Everything here is a pure string builder: no
7
+ * logging, no process exit, no IO — given the same input it returns the
8
+ * same text. The hook owns the side effects (writing these to stderr and
9
+ * exiting); these functions only render.
10
+ */
11
+ /** Inputs for {@link formatCliTooOldMessage}. */
12
+ export interface CliTooOldInput {
13
+ readonly root: string;
14
+ readonly configVersion: number;
15
+ readonly cliVersion: number;
16
+ }
17
+ /**
18
+ * Render the "your CLI is too old" message. Direction-correct: when the
19
+ * config schema is newer than the CLI knows about, the USER UPGRADES
20
+ * THE CLI — not "run migrate" (migrate goes the OTHER direction, taking
21
+ * an old config UP to the current CLI's version).
22
+ */
23
+ export declare function formatCliTooOldMessage(input: CliTooOldInput): string;
24
+ /**
25
+ * Render the human "no opensip-cli project found" explainer — the actionable
26
+ * walked-up-to-root message with the `init` hint. The `--json` shape is no longer
27
+ * rendered here: a no-project failure is a `BootstrapError` the top-level boundary
28
+ * turns into a structured `bootstrap.error` `CommandOutcome` (launch,
29
+ * §4.7), so this formatter is the human path only.
30
+ */
31
+ export declare function formatNoProjectFoundMessage(cwd: string): string;
32
+ //# sourceMappingURL=pre-action-messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pre-action-messages.d.ts","sourceRoot":"","sources":["../../src/bootstrap/pre-action-messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,iDAAiD;AACjD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAapE;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAU/D"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * pre-action-messages — pure message formatters for the bootstrap
3
+ * `preAction` hook.
4
+ *
5
+ * Extracted from `pre-action-hook.ts` to keep that file focused on the
6
+ * hook's control flow. Everything here is a pure string builder: no
7
+ * logging, no process exit, no IO — given the same input it returns the
8
+ * same text. The hook owns the side effects (writing these to stderr and
9
+ * exiting); these functions only render.
10
+ */
11
+ /**
12
+ * Render the "your CLI is too old" message. Direction-correct: when the
13
+ * config schema is newer than the CLI knows about, the USER UPGRADES
14
+ * THE CLI — not "run migrate" (migrate goes the OTHER direction, taking
15
+ * an old config UP to the current CLI's version).
16
+ */
17
+ export function formatCliTooOldMessage(input) {
18
+ return [
19
+ `✗ This project's opensip-cli.config.yml uses a newer schema than your CLI supports.`,
20
+ ``,
21
+ ` Project: ${input.root}`,
22
+ ` Config schema: v${input.configVersion}`,
23
+ ` CLI supports: v${input.cliVersion}`,
24
+ ``,
25
+ ` Update your CLI to continue:`,
26
+ ` curl -fsSL https://opensip.ai/cli/install.sh | bash`,
27
+ ``,
28
+ ` (Or, if installed locally to the project: pnpm up opensip-cli@latest)`,
29
+ ].join('\n');
30
+ }
31
+ /**
32
+ * Render the human "no opensip-cli project found" explainer — the actionable
33
+ * walked-up-to-root message with the `init` hint. The `--json` shape is no longer
34
+ * rendered here: a no-project failure is a `BootstrapError` the top-level boundary
35
+ * turns into a structured `bootstrap.error` `CommandOutcome` (launch,
36
+ * §4.7), so this formatter is the human path only.
37
+ */
38
+ export function formatNoProjectFoundMessage(cwd) {
39
+ return [
40
+ '✗ No OpenSIP CLI project found.',
41
+ '',
42
+ ' Searched from: ' + cwd,
43
+ ' Walked up to: /',
44
+ '',
45
+ ' To get started:',
46
+ ' opensip init',
47
+ ].join('\n');
48
+ }
49
+ //# sourceMappingURL=pre-action-messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pre-action-messages.js","sourceRoot":"","sources":["../../src/bootstrap/pre-action-messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAqB;IAC1D,OAAO;QACL,qFAAqF;QACrF,EAAE;QACF,qBAAqB,KAAK,CAAC,IAAI,EAAE;QACjC,sBAAsB,KAAK,CAAC,aAAa,EAAE;QAC3C,sBAAsB,KAAK,CAAC,UAAU,EAAE;QACxC,EAAE;QACF,gCAAgC;QAChC,yDAAyD;QACzD,EAAE;QACF,yEAAyE;KAC1E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,2BAA2B,CAAC,GAAW;IACrD,OAAO;QACL,iCAAiC;QACjC,EAAE;QACF,mBAAmB,GAAG,GAAG;QACzB,mBAAmB;QACnB,EAAE;QACF,mBAAmB;QACnB,kBAAkB;KACnB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @fileoverview Small module to isolate process-scoped idempotency globals.
3
+ *
4
+ * The `initializedToolIds` Set is intentionally process-scoped (for "at most once per process"
5
+ * semantics of Tool.initialize(), as per the Tool contract).
6
+ *
7
+ * This module centralizes the global and its reset, making it easier to audit and test.
8
+ * Resets are called on per-invocation context setup (aligning with RunScope isolation).
9
+ *
10
+ * This addresses the "process-scoped globals" Low from the architecture review.
11
+ *
12
+ * See pre-action-hook.ts and the GA roadmap item 5.
13
+ */
14
+ export declare const initializedToolIds: Set<string>;
15
+ /** Reset for test harnesses and fresh invocations. */
16
+ export declare function resetInitializedToolIdsForTest(): void;
17
+ //# sourceMappingURL=process-idempotency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process-idempotency.d.ts","sourceRoot":"","sources":["../../src/bootstrap/process-idempotency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,eAAO,MAAM,kBAAkB,aAAoB,CAAC;AAEpD,sDAAsD;AACtD,wBAAgB,8BAA8B,IAAI,IAAI,CAErD"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @fileoverview Small module to isolate process-scoped idempotency globals.
3
+ *
4
+ * The `initializedToolIds` Set is intentionally process-scoped (for "at most once per process"
5
+ * semantics of Tool.initialize(), as per the Tool contract).
6
+ *
7
+ * This module centralizes the global and its reset, making it easier to audit and test.
8
+ * Resets are called on per-invocation context setup (aligning with RunScope isolation).
9
+ *
10
+ * This addresses the "process-scoped globals" Low from the architecture review.
11
+ *
12
+ * See pre-action-hook.ts and the GA roadmap item 5.
13
+ */
14
+ /* eslint-disable sonarjs/no-empty-collection -- intentionally starts empty; populated on tool initialize, cleared per-run for isolation (GA Low hygiene) */
15
+ export const initializedToolIds = new Set();
16
+ /** Reset for test harnesses and fresh invocations. */
17
+ export function resetInitializedToolIdsForTest() {
18
+ initializedToolIds.clear();
19
+ }
20
+ //# sourceMappingURL=process-idempotency.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process-idempotency.js","sourceRoot":"","sources":["../../src/bootstrap/process-idempotency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,4JAA4J;AAC5J,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAU,CAAC;AAEpD,sDAAsD;AACtD,MAAM,UAAU,8BAA8B;IAC5C,kBAAkB,CAAC,KAAK,EAAE,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * register-language-adapters — register the bundled language adapters
3
+ * into a kernel-level `LanguageRegistry`.
4
+ *
5
+ * Extracted from `index.ts` so the registration list is not a
6
+ * module-load side effect but a pure function the composition root
7
+ * calls explicitly. Each adapter ships with a layered language pack
8
+ * (`@opensip-cli/lang-*`); the CLI is the single component that
9
+ * wires them in — fitness/simulation must not take a hard dep on
10
+ * every language pack (would invert the layered architecture).
11
+ *
12
+ * The order below is presentational only; the registry is keyed by
13
+ * adapter id so duplicates short-circuit and order does not affect
14
+ * resolution.
15
+ */
16
+ import type { LanguageRegistry } from '@opensip-cli/core';
17
+ /**
18
+ * Register the six bundled language adapters into the supplied
19
+ * registry. Idempotent w.r.t. duplicate registrations: the kernel
20
+ * registry is first-writer-wins.
21
+ */
22
+ export declare function registerLanguageAdapters(registry: LanguageRegistry): void;
23
+ //# sourceMappingURL=register-language-adapters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-language-adapters.d.ts","sourceRoot":"","sources":["../../src/bootstrap/register-language-adapters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAOzE"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * register-language-adapters — register the bundled language adapters
3
+ * into a kernel-level `LanguageRegistry`.
4
+ *
5
+ * Extracted from `index.ts` so the registration list is not a
6
+ * module-load side effect but a pure function the composition root
7
+ * calls explicitly. Each adapter ships with a layered language pack
8
+ * (`@opensip-cli/lang-*`); the CLI is the single component that
9
+ * wires them in — fitness/simulation must not take a hard dep on
10
+ * every language pack (would invert the layered architecture).
11
+ *
12
+ * The order below is presentational only; the registry is keyed by
13
+ * adapter id so duplicates short-circuit and order does not affect
14
+ * resolution.
15
+ */
16
+ import { cppAdapter } from '@opensip-cli/lang-cpp';
17
+ import { goAdapter } from '@opensip-cli/lang-go';
18
+ import { javaAdapter } from '@opensip-cli/lang-java';
19
+ import { pythonAdapter } from '@opensip-cli/lang-python';
20
+ import { rustAdapter } from '@opensip-cli/lang-rust';
21
+ import { typescriptAdapter } from '@opensip-cli/lang-typescript';
22
+ /**
23
+ * Register the six bundled language adapters into the supplied
24
+ * registry. Idempotent w.r.t. duplicate registrations: the kernel
25
+ * registry is first-writer-wins.
26
+ */
27
+ export function registerLanguageAdapters(registry) {
28
+ registry.register(typescriptAdapter);
29
+ registry.register(rustAdapter);
30
+ registry.register(pythonAdapter);
31
+ registry.register(javaAdapter);
32
+ registry.register(goAdapter);
33
+ registry.register(cppAdapter);
34
+ }
35
+ //# sourceMappingURL=register-language-adapters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-language-adapters.js","sourceRoot":"","sources":["../../src/bootstrap/register-language-adapters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAIjE;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAA0B;IACjE,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACrC,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IACjC,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAChC,CAAC"}
@@ -0,0 +1,228 @@
1
+ /**
2
+ * register-tools — populate the kernel `ToolRegistry` with first-party
3
+ * tools (fitness / simulation / graph) plus any third-party tool
4
+ * packages discovered on disk.
5
+ *
6
+ * Extracted from `index.ts`. The bundled-id skip below is defense in
7
+ * depth: as of Layer 1 Phase 1 the registry itself enforces
8
+ * first-writer-wins on duplicate ids and logs a structured
9
+ * `tool.registry.duplicate` warning. Keeping the explicit guard avoids
10
+ * a noisy warning when a third-party package happens to ship under a
11
+ * built-in id.
12
+ */
13
+ import { type CliProgram } from '@opensip-cli/contracts';
14
+ import { type ToolCliContext, type ToolDiscoverySource, type ToolPluginManifest, type ToolProvenance, type ToolRegistry } from '@opensip-cli/core';
15
+ /**
16
+ * Bundled first-party tool PACKAGES — declared as direct deps of
17
+ * opensip-cli. Order is registration order (and thus help/listing order).
18
+ *
19
+ * launch cutover: these are package NAMES, not imported tool runtimes. The
20
+ * host no longer statically `import`s `fitnessTool`/`graphTool`/`simulationTool`
21
+ * — bundled tools are resolved on disk and loaded by DYNAMIC IMPORT through the
22
+ * exact same manifest → `admitTool` → import → register path an installed or
23
+ * project-local tool travels (north-star §2.1, Figure 7). "Bundled" is now a
24
+ * provenance/trust posture, not a privileged load path: install-source
25
+ * independence is structural, not merely tested (`no-bootstrap-tool-import`
26
+ * guards this file against a static tool-runtime import creeping back).
27
+ */
28
+ export declare const BUNDLED_TOOL_PACKAGES: readonly string[];
29
+ /**
30
+ * The ADR-0038 back-compat pin: the tool IDS whose `init` scaffold dirs the
31
+ * pre-registry-driven CLI ALWAYS created (fit/sim). The composition root warns
32
+ * (`cli.tool.expected_bundled_absent`) when one of these is missing from the
33
+ * populated registry, so a build whose {@link BUNDLED_TOOL_PACKAGES} drifted
34
+ * (a tool removed, a packaging variant) under-scaffolds LOUDLY instead of
35
+ * silently.
36
+ *
37
+ * Deliberately a HISTORICAL CONSTANT, not derived from the loaded bundled
38
+ * manifests: bundled tools fail CLOSED in {@link registerFirstPartyTools}
39
+ * (every load failure throws before the warning could run), so "bundled
40
+ * manifests absent from the registry" is structurally empty — a derived list
41
+ * could never fire. The only drift this diagnostic exists to catch is an edit
42
+ * to the package list itself, which is precisely what a derivation would
43
+ * follow rather than flag. Co-located with the package list (one module owns
44
+ * both encodings) so an editor of either sees the other. `graph` is correctly
45
+ * absent: it never scaffolded (`pluginLayout` undefined).
46
+ */
47
+ export declare const EXPECTED_SCAFFOLDING_TOOL_IDS: readonly string[];
48
+ /**
49
+ * Register the bundled first-party tools into the supplied registry, each one
50
+ * flowing through the SAME admit → dynamic-import → register path the external
51
+ * path uses (launch cutover — replaces the static-import + gate path).
52
+ *
53
+ * Per package name: `resolveBundledPackageDir` → `loadToolManifest('bundled')`
54
+ * → `admitTool({ source: 'bundled', explicitlyRequested: true })` →
55
+ * `importToolRuntime` (dynamic import + shape validation) → drift guard →
56
+ * `registry.register`. A bundled tool ships with the CLI, so it is always
57
+ * explicitly present: a missing/incompatible manifest or a runtime that fails
58
+ * to load is FAIL-CLOSED (never a silent skip). The recorded `ToolProvenance`
59
+ * (source `'bundled'`, trusted-by-shipping) and manifest are pushed onto the
60
+ * optional collectors so the composition root can surface provenance
61
+ * (`plugin list`) and seed the per-run capability registry (§5.3).
62
+ *
63
+ * @param registry The per-invocation tool registry to populate.
64
+ * @param provenance Optional sink for the admitted tools' provenance records.
65
+ * @param manifests Optional sink for the admitted tools' manifests (§5.3).
66
+ * @param packages The bundled package names to load (defaults to
67
+ * {@link BUNDLED_TOOL_PACKAGES}; injectable so the fail-closed paths are
68
+ * testable with fixture packages).
69
+ * @throws {PluginIncompatibleError} when a bundled tool cannot be resolved,
70
+ * has no conformant manifest, is out of range, or its runtime fails to load
71
+ * — mapped to `EXIT_CODES.PLUGIN_INCOMPATIBLE` (exit 5) by the CLI boundary.
72
+ */
73
+ export declare function registerFirstPartyTools(registry: ToolRegistry, provenance?: ToolProvenance[], manifests?: ToolPluginManifest[], packages?: readonly string[]): Promise<void>;
74
+ export interface DiscoveryOptions {
75
+ /**
76
+ * Ordered tool-discovery sources (precedence: first wins on duplicate
77
+ * name). Built by {@link buildToolDiscoverySources} at the composition
78
+ * root; passed in here so this function reads no ambient HOME/cwd state
79
+ * and stays unit-testable with explicit anchors.
80
+ */
81
+ readonly sources: readonly ToolDiscoverySource[];
82
+ }
83
+ /**
84
+ * Build the ordered tool-discovery sources. Order is precedence
85
+ * (first-occurrence-wins on duplicate name):
86
+ *
87
+ * 1. project-local `.runtime/plugins/tool` — `plugin add --project`
88
+ * 2. project tree (walk up from cwd) — plain `npm install @tool`
89
+ * 3. user-global `~/.opensip-cli/plugins/tool` — `plugin add` (default)
90
+ * 4. CLI install dir (walk up) — `npm i -g @tool`
91
+ *
92
+ * A project-local pin therefore shadows a user-global install of the same
93
+ * tool. Project-root resolution is best-effort: an unresolvable context
94
+ * (e.g. running outside any project) simply contributes no `.runtime`
95
+ * source.
96
+ */
97
+ export declare function buildToolDiscoverySources(cwd: string, cliInstallDir: string): ToolDiscoverySource[];
98
+ export declare function discoverAndRegisterToolPackages(registry: ToolRegistry, opts: DiscoveryOptions, builtInIds: ReadonlySet<string>, provenance?: ToolProvenance[], manifests?: ToolPluginManifest[]): Promise<void>;
99
+ /**
100
+ * The outcome of admitting a tool — the recorded `ToolProvenance` plus the
101
+ * loaded `ToolPluginManifest`. Returned by the authored legs
102
+ * ({@link admitUserGlobalTool} / {@link admitProjectLocalTool}) and the
103
+ * installed leg ({@link admitInstalledTool}) alike. The manifest is returned
104
+ * (not re-read) so the register step can run the drift guard
105
+ * (`assertManifestMatchesTool`) against the imported runtime and seed the
106
+ * per-run capability registry, without a second filesystem read.
107
+ */
108
+ export interface AuthoredAdmission {
109
+ readonly provenance: ToolProvenance;
110
+ readonly manifest: ToolPluginManifest;
111
+ }
112
+ /**
113
+ * Admit (or reject) a single PROJECT-LOCAL authored tool under the
114
+ * deny-by-default trust policy (launch, Phase 3 Task 3.2; wired into
115
+ * production discovery in the launch contract).
116
+ *
117
+ * A project-local tool is authored code under
118
+ * `<project>/opensip-cli/tools/<name>/` declaring its identity via a JSON
119
+ * sidecar (`opensip-tool.manifest.json`). It is read + gated WITHOUT importing
120
+ * its module:
121
+ *
122
+ * 1. `loadToolManifest('project-local', dir)` — identity only, no code run.
123
+ * 2. Trust check — {@link isProjectLocalToolTrusted}. Not allowlisted ⇒
124
+ * throw {@link PluginIncompatibleError} (fail-closed, exit 5) before any
125
+ * import. Allowlisted ⇒ run the shared compatibility tail; an incompatible
126
+ * explicitly-trusted tool is likewise fail-closed.
127
+ *
128
+ * Returns the admitted tool's `{ provenance, manifest }` on success. The trust
129
+ * decision always precedes import (it is the FIRST statement here, ahead of the
130
+ * shared {@link admitAuthoredTool} tail).
131
+ *
132
+ * @throws {PluginIncompatibleError} when the tool has no conformant sidecar
133
+ * manifest, is not allowlisted, or is compatibility-incompatible.
134
+ */
135
+ export declare function admitProjectLocalTool(args: {
136
+ readonly dir: string;
137
+ readonly env?: NodeJS.ProcessEnv;
138
+ }): AuthoredAdmission;
139
+ /**
140
+ * Admit a single USER-GLOBAL authored tool — the trusted-by-default sibling of
141
+ * {@link admitProjectLocalTool}.
142
+ *
143
+ * A user-global tool is an authored sidecar under
144
+ * `~/.opensip-cli/tools/<name>/`. The user deliberately placed it in their
145
+ * own home dir (the `npm i -g` analogue for authored code), so there is **no
146
+ * allowlist gate** — it is trusted-by-default. It still reads the static
147
+ * sidecar and runs `admitTool` BEFORE the module could be imported (the shared
148
+ * {@link admitAuthoredTool} tail), so trust-before-import holds for this leg
149
+ * too: a global tool the user explicitly authored is fail-closed on a
150
+ * missing/incompatible manifest, never a silent skip.
151
+ *
152
+ * @throws {PluginIncompatibleError} when the tool has no conformant sidecar
153
+ * manifest or is compatibility-incompatible.
154
+ */
155
+ export declare function admitUserGlobalTool(args: {
156
+ readonly dir: string;
157
+ }): AuthoredAdmission;
158
+ /**
159
+ * Discover + admit + register AUTHORED Tool sidecars from the two authored
160
+ * roots, then dynamic-import each admitted runtime through the shared
161
+ * `importToolRuntime` seam — the same admit → import → register path the
162
+ * bundled and installed legs travel (ADR-0027; this is the leg that makes the
163
+ * dormant {@link admitProjectLocalTool} live).
164
+ *
165
+ * Two roots, two trust postures:
166
+ * - **global** (`~/.opensip-cli/tools/`) → {@link admitUserGlobalTool},
167
+ * trusted-by-default.
168
+ * - **project** (`<project>/opensip-cli/tools/`) → {@link admitProjectLocalTool},
169
+ * deny-by-default (allowlist via `OPENSIP_CLI_ALLOW_PROJECT_TOOLS`).
170
+ *
171
+ * Global is processed FIRST so a project-authored tool cannot shadow a same-id
172
+ * global one — matching the `~/.opensip-cli/plugins` precedence note in
173
+ * {@link buildToolDiscoverySources} (first-writer-wins via the registry).
174
+ * `builtInIds` are skipped so an authored tool never shadows a bundled one.
175
+ *
176
+ * **Trust-before-import.** For each candidate, the admit step (which EMBEDS the
177
+ * trust decision — deny-by-default inside `admitProjectLocalTool`) runs to
178
+ * completion BEFORE `importToolRuntime`. A non-allowlisted project tool THROWS
179
+ * `PluginIncompatibleError` (exit 5) here, propagated out of the walk: it must
180
+ * fail the run loudly — that is the clone-protection contract.
181
+ *
182
+ * **Error-posture asymmetry (deliberate).** An un-allowlisted *project* tool is
183
+ * fail-closed by policy (clone-risk; the user must opt in). A *global* tool that
184
+ * fails to load is also fail-closed (the user explicitly authored it into
185
+ * `$HOME`). This differs from the *installed* npm leg, where a stray bad plugin
186
+ * skips-with-diagnostic so it can't take fit/graph/sim down — authored tools are
187
+ * first-party-intent, installed tools are ambient.
188
+ *
189
+ * @param registry The per-invocation tool registry to populate.
190
+ * @param opts.projectAuthoredDir `resolveProjectPaths(root).authoredToolsDir`,
191
+ * or `undefined` when there is no resolvable project context.
192
+ * @param opts.globalAuthoredDir `resolveUserPaths().authoredToolsDir`.
193
+ * @param opts.env Environment carrying the project allowlist (default
194
+ * `process.env`); injectable for tests.
195
+ * @param builtInIds Bundled-tool ids to skip on a name collision.
196
+ * @param provenance Sink for admitted authored tools' provenance records.
197
+ * @param manifests Sink for admitted authored tools' manifests (§5.3).
198
+ * @throws {PluginIncompatibleError} for an un-allowlisted project tool, or any
199
+ * authored tool whose sidecar/runtime is missing/incompatible (fail-closed).
200
+ */
201
+ export declare function discoverAndRegisterAuthoredTools(registry: ToolRegistry, opts: {
202
+ readonly projectAuthoredDir?: string;
203
+ readonly globalAuthoredDir: string;
204
+ readonly env?: NodeJS.ProcessEnv;
205
+ }, builtInIds: ReadonlySet<string>, provenance?: ToolProvenance[], manifests?: ToolPluginManifest[]): Promise<void>;
206
+ /**
207
+ * Walk the registry and mount each tool's commands onto `program`. This is
208
+ * **step 8** of the tool lifecycle (launch, §5.4) — see
209
+ * {@link runToolLifecycle}.
210
+ *
211
+ * Public launch: there is ONE command surface — the tool's declared `commandSpecs`,
212
+ * mounted by `mountCommandSpec`. `register()` and the raw-Commander `program`
213
+ * handle on the tool context are gone, so the host owns `program` and passes it
214
+ * in here (the tool never touches Commander). A tool with no `commandSpecs` is a
215
+ * mis-declaration: it contributes no commands, surfaced loudly via
216
+ * `cli.tool.no_command_surface`.
217
+ *
218
+ * Failures are isolated per tool — one tool whose spec fails to mount must not
219
+ * take the whole CLI down. The failure is logged + stderr-warned, then we
220
+ * continue with the next tool.
221
+ *
222
+ * @param registry The per-invocation tool registry to walk.
223
+ * @param program The root Commander program (host-owned; the composition root
224
+ * passes it — it is no longer reachable through the tool context, §8).
225
+ * @param ctx The per-invocation handler context (render/emit/scope — no program).
226
+ */
227
+ export declare function mountAllToolCommands(registry: ToolRegistry, program: CliProgram, ctx: ToolCliContext): void;
228
+ //# sourceMappingURL=register-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-tools.d.ts","sourceRoot":"","sources":["../../src/bootstrap/register-tools.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAMH,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAaL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,YAAY,EAElB,MAAM,mBAAmB,CAAC;AAe3B;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAIlD,CAAC;AAKF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAAS,MAAM,EAA8B,CAAC;AA6E1F;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,YAAY,EACtB,UAAU,GAAE,cAAc,EAAO,EACjC,SAAS,GAAE,kBAAkB,EAAO,EACpC,QAAQ,GAAE,SAAS,MAAM,EAA0B,GAClD,OAAO,CAAC,IAAI,CAAC,CAwCf;AA8DD,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAC;CAClD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,GACpB,mBAAmB,EAAE,CAqBvB;AAiHD,wBAAsB,+BAA+B,CACnD,QAAQ,EAAE,YAAY,EACtB,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,EAC/B,UAAU,GAAE,cAAc,EAAO,EACjC,SAAS,GAAE,kBAAkB,EAAO,GACnC,OAAO,CAAC,IAAI,CAAC,CAoDf;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;CACvC;AAgDD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CAClC,GAAG,iBAAiB,CAuBpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,iBAAiB,CAGrF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAsB,gCAAgC,CACpD,QAAQ,EAAE,YAAY,EACtB,IAAI,EAAE;IACJ,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CAClC,EACD,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,EAC/B,UAAU,GAAE,cAAc,EAAO,EACjC,SAAS,GAAE,kBAAkB,EAAO,GACnC,OAAO,CAAC,IAAI,CAAC,CA0Bf;AAqDD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,UAAU,EACnB,GAAG,EAAE,cAAc,GAClB,IAAI,CAqBN"}