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 @@
1
+ {"version":3,"file":"register-tools.js","sourceRoot":"","sources":["../../src/bootstrap/register-tools.ts"],"names":[],"mappings":"AAAA,2LAA2L;AAC3L,sYAAsY;AACtY;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EACL,SAAS,EACT,yBAAyB,EACzB,4BAA4B,EAC5B,+BAA+B,EAC/B,gBAAgB,EAChB,MAAM,EACN,uBAAuB,EACvB,2BAA2B,EAC3B,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,GAQjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EACL,gBAAgB,EAChB,iBAAiB,GAGlB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,2EAA2E;AAC3E,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAEzC;;;;;;;;;;;;GAYG;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AI,CAAC,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE;QAChD,MAAM,EAAE,oDAAoD;KAC7D,CAAC,CAAC;AACL,CAAC;AAED,MAAM,gBAAgB,GAAG,6CAA6C,CAAC;AAEvE;;;;GAIG;AACH,SAAS,4BAA4B,CAAC,OAAmB;IACvD,MAAM,SAAS,GAAG,CAAC,GAAe,EAAQ,EAAE;QAC1C,GAAG,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;QAChE,KAAK,MAAM,GAAG,IAAI,GAAG,CAAC,QAAQ;YAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACjD,CAAC,CAAC;IACF,SAAS,CAAC,OAAO,CAAC,CAAC;IACnB,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACjD,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * render — static-render entry. Tool-agnostic; every tool that emits a
3
+ * `CommandResult` reaches the user's terminal through this single seam.
4
+ *
5
+ * This is the one place that chooses the output medium: when stdout is a
6
+ * TTY the result renders through Ink (themed; colorless under NO_COLOR via
7
+ * the ThemeProvider); when stdout is piped/redirected/CI it renders as
8
+ * plain text with no banner. Tools never make this choice — they return a
9
+ * `CommandResult` and this seam picks Ink vs. text. `resultToView` is total
10
+ * over the `CommandResult` union, so both media consume the same view-model.
11
+ *
12
+ * Every Ink/cli-ui import here is dynamic so this module loads no
13
+ * React/Ink at startup — the hot `opensip fit --json` path (which
14
+ * uses `emitJson`, never this seam) stays React-free.
15
+ */
16
+ import type { CommandResult } from '@opensip-cli/contracts';
17
+ /**
18
+ * Render a `CommandResult` to the terminal, choosing Ink (TTY) or plain
19
+ * text (non-TTY) at this single seam.
20
+ *
21
+ * Reads the project location from the entered `RunScope` for the Ink
22
+ * shell's `ℹ Project:` line. Project-agnostic commands and scopeless
23
+ * error/parse paths pass `undefined` → no project line. The plain-text
24
+ * path emits no banner or project line by design (clean pipes/CI logs).
25
+ */
26
+ export declare function renderResult(result: CommandResult): Promise<void>;
27
+ //# sourceMappingURL=render.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/bootstrap/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CA8BvE"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * render — static-render entry. Tool-agnostic; every tool that emits a
3
+ * `CommandResult` reaches the user's terminal through this single seam.
4
+ *
5
+ * This is the one place that chooses the output medium: when stdout is a
6
+ * TTY the result renders through Ink (themed; colorless under NO_COLOR via
7
+ * the ThemeProvider); when stdout is piped/redirected/CI it renders as
8
+ * plain text with no banner. Tools never make this choice — they return a
9
+ * `CommandResult` and this seam picks Ink vs. text. `resultToView` is total
10
+ * over the `CommandResult` union, so both media consume the same view-model.
11
+ *
12
+ * Every Ink/cli-ui import here is dynamic so this module loads no
13
+ * React/Ink at startup — the hot `opensip fit --json` path (which
14
+ * uses `emitJson`, never this seam) stays React-free.
15
+ */
16
+ import { currentScope } from '@opensip-cli/core';
17
+ /**
18
+ * Render a `CommandResult` to the terminal, choosing Ink (TTY) or plain
19
+ * text (non-TTY) at this single seam.
20
+ *
21
+ * Reads the project location from the entered `RunScope` for the Ink
22
+ * shell's `ℹ Project:` line. Project-agnostic commands and scopeless
23
+ * error/parse paths pass `undefined` → no project line. The plain-text
24
+ * path emits no banner or project line by design (clean pipes/CI logs).
25
+ */
26
+ export async function renderResult(result) {
27
+ const scope = currentScope();
28
+ const project = scope?.projectContext;
29
+ const projectHeader = project?.scope === 'project'
30
+ ? { root: project.projectRoot, walkedUp: project.walkedUp }
31
+ : undefined;
32
+ const ui = scope?.ui;
33
+ // Non-TTY (pipe / redirect / CI): render as plain text with zero ANSI
34
+ // from the same view-model the Ink path uses. The ASCII banner is
35
+ // suppressed (clean logs), but the `ℹ Project:` discovery line is kept
36
+ // — CI output should still record which root was analyzed and how it was
37
+ // found. `error` stays terse (no project line), matching the TTY shell.
38
+ if (!process.stdout.isTTY) {
39
+ const [{ resultToView }, { renderToText, viewProjectHeader, group }] = await Promise.all([
40
+ import('../ui/result-to-view.js'),
41
+ import('@opensip-cli/cli-ui'),
42
+ ]);
43
+ const body = resultToView(result);
44
+ const node = projectHeader !== undefined && result.type !== 'error'
45
+ ? group([viewProjectHeader(projectHeader), { kind: 'spacer' }, body])
46
+ : body;
47
+ process.stdout.write(`${renderToText(node)}\n`);
48
+ return;
49
+ }
50
+ const { renderApp } = await import('../ui/render.js');
51
+ await renderApp(result, projectHeader, ui);
52
+ }
53
+ //# sourceMappingURL=render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/bootstrap/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIjD;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAqB;IACtD,MAAM,KAAK,GAAG,YAAY,EAAE,CAAC;IAC7B,MAAM,OAAO,GAAG,KAAK,EAAE,cAAc,CAAC;IACtC,MAAM,aAAa,GACjB,OAAO,EAAE,KAAK,KAAK,SAAS;QAC1B,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE;QAC3D,CAAC,CAAC,SAAS,CAAC;IAChB,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,CAAC;IAErB,sEAAsE;IACtE,kEAAkE;IAClE,uEAAuE;IACvE,yEAAyE;IACzE,wEAAwE;IACxE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAC1B,MAAM,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACvF,MAAM,CAAC,yBAAyB,CAAC;YACjC,MAAM,CAAC,qBAAqB,CAAC;SAC9B,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;QAClC,MAAM,IAAI,GACR,aAAa,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO;YACpD,CAAC,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC,aAAa,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC;YACrE,CAAC,CAAC,IAAI,CAAC;QACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,OAAO;IACT,CAAC;IAED,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACtD,MAAM,SAAS,CAAC,MAAM,EAAE,aAAa,EAAE,EAAE,CAAC,CAAC;AAC7C,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * report — TTY/CI guarded auto-open of the HTML report after a
3
+ * tool run.
4
+ *
5
+ * Tools call this through `ctx.maybeOpenReport`. Lives in `bootstrap/`
6
+ * because the launch policy (TTY, JSON-mode, CI vars, `--open`) is
7
+ * tool-agnostic.
8
+ *
9
+ * Audit 2026-05-29 (L2): the auto-open path now goes through the CLI's
10
+ * own cross-tool composition (`composeAndWriteReport`) instead of
11
+ * dynamically importing fitness's old report opener. The CLI is the
12
+ * report composition root — it walks every registered tool's
13
+ * `collectReportData` contribution and merges them. This removes the
14
+ * last `cli → @opensip-cli/fitness` dynamic import from this path and
15
+ * keeps fitness decoupled from graph.
16
+ *
17
+ * Extracted from the prior `render-helpers.ts` so the pure renderer
18
+ * (`render.ts`) and this report auto-open helper can each evolve
19
+ * without dragging the other along. Audit 2026-05-23 M4. The first-
20
+ * party live-view map (`live-views.ts`) was deleted in Layer 5 Phase 3
21
+ * (audit 2026-05-22 F3) — tool packages now own their own renderers.
22
+ */
23
+ /**
24
+ * Open the HTML report in the user's browser when the run conditions
25
+ * allow it (TTY, not JSON-mode, not CI, opt-in via --open). Tools call
26
+ * this through `ctx.maybeOpenReport` after a run. Project root and the
27
+ * per-tool report contributions both come from the entered RunScope
28
+ * (read inside `composeAndWriteReport`) — single source of truth.
29
+ */
30
+ export declare function maybeOpenReport(opts: {
31
+ openRequested: boolean;
32
+ jsonOutput: boolean;
33
+ }): Promise<void>;
34
+ //# sourceMappingURL=report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/bootstrap/report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB,GAAG,OAAO,CAAC,IAAI,CAAC,CAahB"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * report — TTY/CI guarded auto-open of the HTML report after a
3
+ * tool run.
4
+ *
5
+ * Tools call this through `ctx.maybeOpenReport`. Lives in `bootstrap/`
6
+ * because the launch policy (TTY, JSON-mode, CI vars, `--open`) is
7
+ * tool-agnostic.
8
+ *
9
+ * Audit 2026-05-29 (L2): the auto-open path now goes through the CLI's
10
+ * own cross-tool composition (`composeAndWriteReport`) instead of
11
+ * dynamically importing fitness's old report opener. The CLI is the
12
+ * report composition root — it walks every registered tool's
13
+ * `collectReportData` contribution and merges them. This removes the
14
+ * last `cli → @opensip-cli/fitness` dynamic import from this path and
15
+ * keeps fitness decoupled from graph.
16
+ *
17
+ * Extracted from the prior `render-helpers.ts` so the pure renderer
18
+ * (`render.ts`) and this report auto-open helper can each evolve
19
+ * without dragging the other along. Audit 2026-05-23 M4. The first-
20
+ * party live-view map (`live-views.ts`) was deleted in Layer 5 Phase 3
21
+ * (audit 2026-05-22 F3) — tool packages now own their own renderers.
22
+ */
23
+ import { decideReportOpen } from '../open-report.js';
24
+ import { composeAndWriteReport } from '../report-compose.js';
25
+ /**
26
+ * Open the HTML report in the user's browser when the run conditions
27
+ * allow it (TTY, not JSON-mode, not CI, opt-in via --open). Tools call
28
+ * this through `ctx.maybeOpenReport` after a run. Project root and the
29
+ * per-tool report contributions both come from the entered RunScope
30
+ * (read inside `composeAndWriteReport`) — single source of truth.
31
+ */
32
+ export async function maybeOpenReport(opts) {
33
+ const decision = decideReportOpen({
34
+ openRequested: opts.openRequested,
35
+ jsonOutput: opts.jsonOutput,
36
+ stdoutIsTTY: Boolean(process.stdout.isTTY),
37
+ env: process.env,
38
+ });
39
+ if (!decision.shouldOpen)
40
+ return;
41
+ // Compose the cross-tool report and launch the browser. The CLI
42
+ // owns composition; `composeAndWriteReport` reads `currentScope()`
43
+ // for the tool registry + datastore and walks each tool's
44
+ // `collectReportData`. No `@opensip-cli/fitness` import here.
45
+ await composeAndWriteReport({ open: true });
46
+ }
47
+ //# sourceMappingURL=report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/bootstrap/report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAGrC;IACC,MAAM,QAAQ,GAAG,gBAAgB,CAAC;QAChC,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;QAC1C,GAAG,EAAE,OAAO,CAAC,GAAG;KACjB,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,UAAU;QAAE,OAAO;IACjC,gEAAgE;IAChE,mEAAmE;IACnE,0DAA0D;IAC1D,8DAA8D;IAC9D,MAAM,qBAAqB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * run-plane — the host-owned run lifecycle plane (host-owned-run-timing §6, §8).
3
+ *
4
+ * The single place that:
5
+ * - creates the per-invocation {@link RunLifecycle} (inside the command action,
6
+ * after `RunScope` entry, before tool work — NOT at context construction);
7
+ * - turns a tool-returned {@link ToolSessionContribution} into a persisted
8
+ * generic `StoredSession` row (host stamps `startedAt` / `completedAt` /
9
+ * `durationMs` from the lifecycle; the tool supplies only verdict/payload);
10
+ * - records host-side overhead (persistMs now; render/egress/ttyBusy/total in
11
+ * later phases) in the sibling host-metrics record keyed by session id.
12
+ *
13
+ * `buildToolCliContext` constructs only the FACTORY (stable deps). The command
14
+ * action begins the invocation lifecycle and, after the handler / live renderer
15
+ * returns its completion, asks the plane to complete + persist.
16
+ *
17
+ * Best-effort contract: persistence never throws, never affects the primary
18
+ * result or exit code. When no datastore is in scope (non-project commands,
19
+ * tests) the plane writes nothing and returns `undefined`.
20
+ */
21
+ import { type Logger, type RecordedToolRunSession, type RunLifecycle, type ToolRunCompletion, type ToolRunSessions, type ToolSessionContribution } from '@opensip-cli/core';
22
+ import type { StoredSessionHostMetrics } from '@opensip-cli/contracts';
23
+ import type { DataStore } from '@opensip-cli/datastore';
24
+ /** Stable dependencies the run-plane factory captures (no per-invocation state). */
25
+ export interface RunPlaneDeps {
26
+ /** Resolve the project datastore, or undefined when none is in scope. Must not throw. */
27
+ readonly getDatastore: () => DataStore | undefined;
28
+ readonly logger?: Logger;
29
+ }
30
+ /**
31
+ * The per-invocation run lifecycle handle. Created once per command action by
32
+ * {@link RunPlaneFactory.beginRun} (or lazily by {@link RunPlaneFactory.current}).
33
+ */
34
+ export interface RunPlaneInvocation {
35
+ /** The lifecycle for this invocation (display elapsed; host completion source). */
36
+ readonly lifecycle: RunLifecycle;
37
+ /**
38
+ * The launch path: freeze the lifecycle (`complete()`) and persist the
39
+ * contribution with the frozen `startedAt` / `completedAt` / `durationMs`.
40
+ * Idempotent on the lifecycle; best-effort on persistence.
41
+ */
42
+ completeAndPersist(contribution: ToolSessionContribution): RecordedToolRunSession | undefined;
43
+ /** Best-effort upsert of host-side overhead metrics for the persisted session. */
44
+ recordHostMetrics(metrics: StoredSessionHostMetrics): void;
45
+ /**
46
+ * Run a live render and own its completion: time the TTY occupancy, then —
47
+ * if the renderer returned a `session` contribution — freeze the lifecycle,
48
+ * persist it, and record `ttyBusyMs`. Returns the renderer's completion
49
+ * unchanged so the caller can still read `.envelope` for egress.
50
+ *
51
+ * This is the live-path analogue of `completeAndPersist`: the renderer no
52
+ * longer calls a session writer inside the Ink tree; the host persists here
53
+ * after `await render()`.
54
+ */
55
+ completeLiveRender(render: () => Promise<ToolRunCompletion | void>): Promise<ToolRunCompletion | void>;
56
+ /** The persisted session id, once a row has been written (else undefined). */
57
+ sessionId(): string | undefined;
58
+ }
59
+ /**
60
+ * Internal run-lifecycle hooks the host attaches to the command context so the
61
+ * mount dispatch can mark the lifecycle boundaries. NOT part of the public
62
+ * `ToolCliContext` — read via cast at the dispatch site (like `runSession`).
63
+ */
64
+ export interface RunActionHooks {
65
+ /** Begin the invocation lifecycle — called by the command action before the handler runs. */
66
+ readonly beginRun?: () => void;
67
+ /**
68
+ * Called after the handler returns. If the result carries a
69
+ * {@link ToolSessionContribution} (a `ToolRunCompletion`), the host freezes
70
+ * the lifecycle and persists it. A plain `CommandResult` (no `session`) is a
71
+ * no-op — every first-party tool now returns a contribution (Phase 3); there
72
+ * is no transitional generic-session writer left on the launch surface.
73
+ */
74
+ readonly completeRun?: (result: unknown) => void;
75
+ }
76
+ /**
77
+ * The factory `buildToolCliContext` creates. Holds only stable deps; the
78
+ * lifecycle is created per command action.
79
+ */
80
+ export interface RunPlaneFactory {
81
+ /** Begin (or return the already-begun) invocation lifecycle for this command action. */
82
+ beginRun(): RunPlaneInvocation;
83
+ /** The current invocation — lazily begun if the command action has not yet called beginRun. */
84
+ current(): RunPlaneInvocation;
85
+ }
86
+ export declare function createRunPlaneFactory(deps: RunPlaneDeps): RunPlaneFactory;
87
+ /**
88
+ * The public run seam (host-owned-run-timing §6.5): `timing` exposes the current
89
+ * invocation lifecycle for display-only elapsed. There is NO public
90
+ * generic-session writer — tools return a {@link ToolSessionContribution} (inside
91
+ * a {@link ToolRunCompletion}) and the host run plane persists it via the action
92
+ * hooks below. The getter lazily begins the lifecycle so a tool that reads
93
+ * `timing` before the action hook fires still observes a live timer.
94
+ */
95
+ export declare function createRunSessionSeam(factory: RunPlaneFactory): ToolRunSessions;
96
+ /**
97
+ * The internal run-lifecycle hooks the command-mount dispatch reads (via cast,
98
+ * like `runSession`) to mark the lifecycle boundaries. `beginRun` starts the
99
+ * lifecycle at the command-action boundary (after RunScope entry, before the
100
+ * handler); `completeRun` freezes + persists when the handler returned a
101
+ * {@link ToolRunCompletion} carrying a session contribution. A plain
102
+ * `CommandResult` (no `session`) is a no-op.
103
+ */
104
+ export declare function createRunActionHooks(factory: RunPlaneFactory): RunActionHooks;
105
+ //# sourceMappingURL=run-plane.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-plane.d.ts","sourceRoot":"","sources":["../../src/bootstrap/run-plane.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAIL,KAAK,MAAM,EACX,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EAEjB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC7B,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,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G,eAAe,CAM9E;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,cAAc,CAa7E"}
@@ -0,0 +1,190 @@
1
+ /**
2
+ * run-plane — the host-owned run lifecycle plane (host-owned-run-timing §6, §8).
3
+ *
4
+ * The single place that:
5
+ * - creates the per-invocation {@link RunLifecycle} (inside the command action,
6
+ * after `RunScope` entry, before tool work — NOT at context construction);
7
+ * - turns a tool-returned {@link ToolSessionContribution} into a persisted
8
+ * generic `StoredSession` row (host stamps `startedAt` / `completedAt` /
9
+ * `durationMs` from the lifecycle; the tool supplies only verdict/payload);
10
+ * - records host-side overhead (persistMs now; render/egress/ttyBusy/total in
11
+ * later phases) in the sibling host-metrics record keyed by session id.
12
+ *
13
+ * `buildToolCliContext` constructs only the FACTORY (stable deps). The command
14
+ * action begins the invocation lifecycle and, after the handler / live renderer
15
+ * returns its completion, asks the plane to complete + persist.
16
+ *
17
+ * Best-effort contract: persistence never throws, never affects the primary
18
+ * result or exit code. When no datastore is in scope (non-project commands,
19
+ * tests) the plane writes nothing and returns `undefined`.
20
+ */
21
+ import { createRunLifecycle, generatePrefixedId, logger as defaultLogger, } from '@opensip-cli/core';
22
+ import { SessionRepo } from '@opensip-cli/session-store';
23
+ const MODULE_TAG = 'cli:run-plane';
24
+ export function createRunPlaneFactory(deps) {
25
+ const log = deps.logger ?? defaultLogger;
26
+ // One command per CLI invocation: a single mutable invocation slot is correct.
27
+ let invocation;
28
+ function safeDatastore() {
29
+ try {
30
+ return deps.getDatastore();
31
+ }
32
+ catch (error) {
33
+ // @swallow-ok absence of a datastore is a NORMAL control-flow signal
34
+ // (non-project commands / tests) — the resolver throwing means the same.
35
+ // Debug-log for diagnosability and degrade to "no datastore".
36
+ log.debug?.({
37
+ evt: 'cli.run-plane.datastore_unavailable',
38
+ module: MODULE_TAG,
39
+ error: error instanceof Error ? error.message : String(error),
40
+ });
41
+ return;
42
+ }
43
+ }
44
+ function makeInvocation() {
45
+ const lifecycle = createRunLifecycle();
46
+ let sessionId;
47
+ function persist(contribution, snapshot) {
48
+ const datastore = safeDatastore();
49
+ if (!datastore)
50
+ return;
51
+ const id = generatePrefixedId(contribution.tool);
52
+ const persistStart = performance.now();
53
+ try {
54
+ const repo = new SessionRepo(datastore);
55
+ repo.save({
56
+ id,
57
+ tool: contribution.tool,
58
+ startedAt: snapshot.startedAt,
59
+ completedAt: snapshot.completedAt,
60
+ cwd: contribution.cwd,
61
+ recipe: contribution.recipe,
62
+ score: contribution.score,
63
+ passed: contribution.passed,
64
+ durationMs: snapshot.durationMs,
65
+ payload: contribution.payload,
66
+ });
67
+ sessionId = id;
68
+ // persistMs: host-side write cost, recorded on the sibling metrics row
69
+ // (separate clock from canonical durationMs).
70
+ repo.upsertHostMetrics(id, { persistMs: Math.max(0, performance.now() - persistStart) });
71
+ log.info?.({
72
+ evt: 'cli.run-session.recorded',
73
+ module: MODULE_TAG,
74
+ tool: contribution.tool,
75
+ sessionId: id,
76
+ durationMs: snapshot.durationMs,
77
+ });
78
+ }
79
+ catch (error) {
80
+ // @swallow-ok best-effort session persistence already warned; degrade to undefined
81
+ log.warn?.({
82
+ evt: 'cli.run-session.record_failed',
83
+ module: MODULE_TAG,
84
+ tool: contribution.tool,
85
+ error: error instanceof Error ? error.message : String(error),
86
+ });
87
+ return;
88
+ }
89
+ return {
90
+ id,
91
+ tool: contribution.tool,
92
+ startedAt: snapshot.startedAt,
93
+ completedAt: snapshot.completedAt,
94
+ durationMs: snapshot.durationMs,
95
+ };
96
+ }
97
+ function recordHostMetrics(metrics) {
98
+ if (sessionId === undefined)
99
+ return;
100
+ const datastore = safeDatastore();
101
+ if (!datastore)
102
+ return;
103
+ try {
104
+ new SessionRepo(datastore).upsertHostMetrics(sessionId, metrics);
105
+ }
106
+ catch (error) {
107
+ log.warn?.({
108
+ evt: 'cli.run-session.host_metrics_failed',
109
+ module: MODULE_TAG,
110
+ sessionId,
111
+ error: error instanceof Error ? error.message : String(error),
112
+ });
113
+ }
114
+ }
115
+ function completeAndPersist(contribution) {
116
+ return persist(contribution, lifecycle.complete());
117
+ }
118
+ async function completeLiveRender(render) {
119
+ const ttyStart = performance.now();
120
+ const completion = await render();
121
+ const ttyBusyMs = Math.max(0, performance.now() - ttyStart);
122
+ if (completion?.session) {
123
+ // Both calls are SYNCHRONOUS best-effort writes (they return a value /
124
+ // void, not a promise); the detached-promise heuristic flags un-awaited
125
+ // calls inside this async fn by name. Nothing to await.
126
+ // @fitness-ignore-next-line detached-promises -- completeAndPersist is synchronous (returns RecordedToolRunSession | undefined)
127
+ completeAndPersist(completion.session);
128
+ // @fitness-ignore-next-line detached-promises -- recordHostMetrics is synchronous (returns void)
129
+ recordHostMetrics({ ttyBusyMs });
130
+ }
131
+ return completion;
132
+ }
133
+ return {
134
+ lifecycle,
135
+ completeAndPersist,
136
+ recordHostMetrics,
137
+ completeLiveRender,
138
+ sessionId: () => sessionId,
139
+ };
140
+ }
141
+ return {
142
+ beginRun() {
143
+ invocation ??= makeInvocation();
144
+ return invocation;
145
+ },
146
+ current() {
147
+ invocation ??= makeInvocation();
148
+ return invocation;
149
+ },
150
+ };
151
+ }
152
+ /**
153
+ * The public run seam (host-owned-run-timing §6.5): `timing` exposes the current
154
+ * invocation lifecycle for display-only elapsed. There is NO public
155
+ * generic-session writer — tools return a {@link ToolSessionContribution} (inside
156
+ * a {@link ToolRunCompletion}) and the host run plane persists it via the action
157
+ * hooks below. The getter lazily begins the lifecycle so a tool that reads
158
+ * `timing` before the action hook fires still observes a live timer.
159
+ */
160
+ export function createRunSessionSeam(factory) {
161
+ return {
162
+ get timing() {
163
+ return factory.current().lifecycle;
164
+ },
165
+ };
166
+ }
167
+ /**
168
+ * The internal run-lifecycle hooks the command-mount dispatch reads (via cast,
169
+ * like `runSession`) to mark the lifecycle boundaries. `beginRun` starts the
170
+ * lifecycle at the command-action boundary (after RunScope entry, before the
171
+ * handler); `completeRun` freezes + persists when the handler returned a
172
+ * {@link ToolRunCompletion} carrying a session contribution. A plain
173
+ * `CommandResult` (no `session`) is a no-op.
174
+ */
175
+ export function createRunActionHooks(factory) {
176
+ return {
177
+ beginRun: () => {
178
+ factory.beginRun();
179
+ },
180
+ completeRun: (result) => {
181
+ const completion = result;
182
+ const session = completion?.session;
183
+ // host-owned-run-timing Phase 3: the host freezes the lifecycle and
184
+ // persists the returned session contribution. Best-effort.
185
+ if (session)
186
+ factory.current().completeAndPersist(session);
187
+ },
188
+ };
189
+ }
190
+ //# sourceMappingURL=run-plane.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-plane.js","sourceRoot":"","sources":["../../src/bootstrap/run-plane.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,MAAM,IAAI,aAAa,GAQxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAKzD,MAAM,UAAU,GAAG,eAAe,CAAC;AAsEnC,MAAM,UAAU,qBAAqB,CAAC,IAAkB;IACtD,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,aAAa,CAAC;IACzC,+EAA+E;IAC/E,IAAI,UAA0C,CAAC;IAE/C,SAAS,aAAa;QACpB,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;QAC7B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,qEAAqE;YACrE,yEAAyE;YACzE,8DAA8D;YAC9D,GAAG,CAAC,KAAK,EAAE,CAAC;gBACV,GAAG,EAAE,qCAAqC;gBAC1C,MAAM,EAAE,UAAU;gBAClB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;aAC9D,CAAC,CAAC;YACH,OAAO;QACT,CAAC;IACH,CAAC;IAED,SAAS,cAAc;QACrB,MAAM,SAAS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D,MAAM,OAAO,GAAG,UAAU,EAAE,OAAO,CAAC;YACpC,oEAAoE;YACpE,2DAA2D;YAC3D,IAAI,OAAO;gBAAE,OAAO,CAAC,OAAO,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAC7D,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * scope-access — per-run scope + datastore readers.
3
+ *
4
+ * Extracted from `cli-context.ts` so that module stays focused on context
5
+ * ASSEMBLY (live-view registry + `buildToolCliContext`). This module owns the
6
+ * complementary concern: reading the entered `RunScope` and opening the
7
+ * project-local SQLite datastore lazily.
8
+ *
9
+ * After Phase 3 hygiene the ONLY way to obtain the per-run scope is
10
+ * `currentScope()` (entered by the pre-action-hook, or explicit `runWithScope`
11
+ * in tests). There are no holder fallbacks. Non-action paths (report, errors)
12
+ * that need scope must ensure entry or restructure to run inside an entered
13
+ * action.
14
+ */
15
+ import { type Logger, type ProjectContext, type RunScope } from '@opensip-cli/core';
16
+ import { type DataStore } from '@opensip-cli/datastore';
17
+ /**
18
+ * Strict reader: the only way to obtain the per-run scope is `currentScope()`
19
+ * (entered by pre-action-hook or explicit runWithScope in tests). All previous
20
+ * holder fallbacks were removed.
21
+ *
22
+ * @throws {SystemError} (`SYSTEM.SCOPE.NOT_ENTERED`) When accessed before the
23
+ * pre-action-hook constructed and entered the scope.
24
+ */
25
+ export declare function readScope(): RunScope;
26
+ /**
27
+ * Read the current project root. Convenience for non-tool bootstrap
28
+ * helpers (e.g. `maybeOpenReport`) that need the project root but
29
+ * don't carry a ToolCliContext.
30
+ *
31
+ * @throws {SystemError} (`SYSTEM.BOOTSTRAP.PROJECT_UNSET`) When accessed before
32
+ * the pre-action-hook resolved the context.
33
+ */
34
+ export declare function getCurrentProjectRoot(): string;
35
+ /**
36
+ * Build a closure-based datastore thunk for the given project.
37
+ * Caches the open DataStore on first access. The pre-action-hook
38
+ * wires the result into `RunScope.datastore` so tools and CLI
39
+ * commands reach the same instance.
40
+ *
41
+ * @throws {SystemError} (`SYSTEM.BOOTSTRAP.DATASTORE_OUTSIDE_PROJECT`) When the
42
+ * returned thunk is invoked outside a project scope — callers must check
43
+ * `project.scope === 'project'` first or handle the throw as a "no project
44
+ * found" error.
45
+ */
46
+ export declare function buildDatastoreThunk(project: ProjectContext, log?: Logger): () => DataStore;
47
+ /**
48
+ * Open (or return cached) project-local SQLite DataStore via the
49
+ * scope's datastore thunk. Shared between tool action bodies and
50
+ * the host commands (e.g. `sessions`, in `host-subcommand-groups.ts`) so
51
+ * both paths are equally lazy.
52
+ *
53
+ * @throws {SystemError} When called outside a project scope — see
54
+ * `buildDatastoreThunk`'s contract.
55
+ */
56
+ export declare function getOrOpenDatastore(_log?: Logger): DataStore;
57
+ /**
58
+ * Project-scoped datastore accessor for the host-owned planes (baseline,
59
+ * toolState, hostPlanes). Converts the internal DATASTORE_OUTSIDE_PROJECT
60
+ * SystemError into a clear ConfigurationError so callers of the documented
61
+ * ToolCliContext seams get a user-actionable error (exit 2) instead of an
62
+ * internal SYSTEM.* code.
63
+ *
64
+ * @throws {ConfigurationError} When called outside a project scope (no open
65
+ * datastore); other datastore-open failures propagate unchanged.
66
+ */
67
+ export declare function getProjectDatastore(): DataStore;
68
+ //# sourceMappingURL=scope-access.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope-access.d.ts","sourceRoot":"","sources":["../../src/bootstrap/scope-access.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAEL,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,QAAQ,EAKd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAE1E;;;;;;;GAOG;AACH,wBAAgB,SAAS,IAAI,QAAQ,CAWpC;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAS9C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,cAAc,EACvB,GAAG,GAAE,MAAsB,GAC1B,MAAM,SAAS,CAoBjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,GAAE,MAAsB,GAAG,SAAS,CAG1E;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,IAAI,SAAS,CAgB/C"}