@vibesdotdev/pm 0.0.0-stage → 1.0.0-rc.2

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 (1225) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +227 -2
  3. package/dist/admission-store.d.ts +43 -0
  4. package/dist/admission-store.d.ts.map +1 -0
  5. package/dist/admission-store.js +108 -0
  6. package/dist/admission-store.js.map +1 -0
  7. package/dist/admission.d.ts +46 -0
  8. package/dist/admission.d.ts.map +1 -0
  9. package/dist/admission.js +81 -0
  10. package/dist/admission.js.map +1 -0
  11. package/dist/admitted-workspace.context.descriptor.d.ts +39 -0
  12. package/dist/admitted-workspace.context.descriptor.d.ts.map +1 -0
  13. package/dist/admitted-workspace.context.descriptor.js +18 -0
  14. package/dist/admitted-workspace.context.descriptor.js.map +1 -0
  15. package/dist/admitted-workspace.context.impl.consumer.d.ts +16 -0
  16. package/dist/admitted-workspace.context.impl.consumer.d.ts.map +1 -0
  17. package/dist/admitted-workspace.context.impl.consumer.js +7 -0
  18. package/dist/admitted-workspace.context.impl.consumer.js.map +1 -0
  19. package/dist/cli/admission-read.d.ts +12 -0
  20. package/dist/cli/admission-read.d.ts.map +1 -0
  21. package/dist/cli/admission-read.js +42 -0
  22. package/dist/cli/admission-read.js.map +1 -0
  23. package/dist/cli/command-input.d.ts +37 -0
  24. package/dist/cli/command-input.d.ts.map +1 -0
  25. package/dist/cli/command-input.js +34 -0
  26. package/dist/cli/command-input.js.map +1 -0
  27. package/dist/cli/consumer-components/startup-progress.d.ts +107 -0
  28. package/dist/cli/consumer-components/startup-progress.d.ts.map +1 -0
  29. package/dist/cli/consumer-components/startup-progress.js +392 -0
  30. package/dist/cli/consumer-components/startup-progress.js.map +1 -0
  31. package/dist/cli/consumer-services/control.d.ts +147 -0
  32. package/dist/cli/consumer-services/control.d.ts.map +1 -0
  33. package/dist/cli/consumer-services/control.js +209 -0
  34. package/dist/cli/consumer-services/control.js.map +1 -0
  35. package/dist/cli/daemon-launch-child.d.ts +35 -0
  36. package/dist/cli/daemon-launch-child.d.ts.map +1 -0
  37. package/dist/cli/daemon-launch-child.js +25 -0
  38. package/dist/cli/daemon-launch-child.js.map +1 -0
  39. package/dist/cli/docs/pm.cli.docs.descriptor.d.ts +4 -0
  40. package/dist/cli/docs/pm.cli.docs.descriptor.d.ts.map +1 -0
  41. package/dist/cli/docs/pm.cli.docs.descriptor.js +93 -0
  42. package/dist/cli/docs/pm.cli.docs.descriptor.js.map +1 -0
  43. package/dist/cli/filter-process-states.d.ts +12 -0
  44. package/dist/cli/filter-process-states.d.ts.map +1 -0
  45. package/dist/cli/filter-process-states.js +12 -0
  46. package/dist/cli/filter-process-states.js.map +1 -0
  47. package/dist/cli/output.d.ts +21 -0
  48. package/dist/cli/output.d.ts.map +1 -0
  49. package/dist/cli/output.js +19 -0
  50. package/dist/cli/output.js.map +1 -0
  51. package/dist/cli/plugin.d.ts +3 -0
  52. package/dist/cli/plugin.d.ts.map +1 -0
  53. package/dist/cli/plugin.js +12 -0
  54. package/dist/cli/plugin.js.map +1 -0
  55. package/dist/cli/pm.cli-group.descriptor.d.ts +10 -0
  56. package/dist/cli/pm.cli-group.descriptor.d.ts.map +1 -0
  57. package/dist/cli/pm.cli-group.descriptor.js +18 -0
  58. package/dist/cli/pm.cli-group.descriptor.js.map +1 -0
  59. package/dist/cli/pm.completion.cli-group.descriptor.d.ts +9 -0
  60. package/dist/cli/pm.completion.cli-group.descriptor.d.ts.map +1 -0
  61. package/dist/cli/pm.completion.cli-group.descriptor.js +17 -0
  62. package/dist/cli/pm.completion.cli-group.descriptor.js.map +1 -0
  63. package/dist/cli/pm.completion.install.descriptor.d.ts +9 -0
  64. package/dist/cli/pm.completion.install.descriptor.d.ts.map +1 -0
  65. package/dist/cli/pm.completion.install.descriptor.js +24 -0
  66. package/dist/cli/pm.completion.install.descriptor.js.map +1 -0
  67. package/dist/cli/pm.completion.install.impl.d.ts +11 -0
  68. package/dist/cli/pm.completion.install.impl.d.ts.map +1 -0
  69. package/dist/cli/pm.completion.install.impl.js +207 -0
  70. package/dist/cli/pm.completion.install.impl.js.map +1 -0
  71. package/dist/cli/pm.config.cli.descriptor.d.ts +10 -0
  72. package/dist/cli/pm.config.cli.descriptor.d.ts.map +1 -0
  73. package/dist/cli/pm.config.cli.descriptor.js +25 -0
  74. package/dist/cli/pm.config.cli.descriptor.js.map +1 -0
  75. package/dist/cli/pm.config.impl.d.ts +12 -0
  76. package/dist/cli/pm.config.impl.d.ts.map +1 -0
  77. package/dist/cli/pm.config.impl.js +117 -0
  78. package/dist/cli/pm.config.impl.js.map +1 -0
  79. package/dist/cli/pm.daemon.cli-group.descriptor.d.ts +9 -0
  80. package/dist/cli/pm.daemon.cli-group.descriptor.d.ts.map +1 -0
  81. package/dist/cli/pm.daemon.cli-group.descriptor.js +17 -0
  82. package/dist/cli/pm.daemon.cli-group.descriptor.js.map +1 -0
  83. package/dist/cli/pm.daemon.logs.descriptor.d.ts +9 -0
  84. package/dist/cli/pm.daemon.logs.descriptor.d.ts.map +1 -0
  85. package/dist/cli/pm.daemon.logs.descriptor.js +29 -0
  86. package/dist/cli/pm.daemon.logs.descriptor.js.map +1 -0
  87. package/dist/cli/pm.daemon.logs.impl.d.ts +11 -0
  88. package/dist/cli/pm.daemon.logs.impl.d.ts.map +1 -0
  89. package/dist/cli/pm.daemon.logs.impl.js +53 -0
  90. package/dist/cli/pm.daemon.logs.impl.js.map +1 -0
  91. package/dist/cli/pm.daemon.reconcile.descriptor.d.ts +9 -0
  92. package/dist/cli/pm.daemon.reconcile.descriptor.d.ts.map +1 -0
  93. package/dist/cli/pm.daemon.reconcile.descriptor.js +24 -0
  94. package/dist/cli/pm.daemon.reconcile.descriptor.js.map +1 -0
  95. package/dist/cli/pm.daemon.reconcile.impl.d.ts +16 -0
  96. package/dist/cli/pm.daemon.reconcile.impl.d.ts.map +1 -0
  97. package/dist/cli/pm.daemon.reconcile.impl.js +51 -0
  98. package/dist/cli/pm.daemon.reconcile.impl.js.map +1 -0
  99. package/dist/cli/pm.daemon.recover.descriptor.d.ts +9 -0
  100. package/dist/cli/pm.daemon.recover.descriptor.d.ts.map +1 -0
  101. package/dist/cli/pm.daemon.recover.descriptor.js +24 -0
  102. package/dist/cli/pm.daemon.recover.descriptor.js.map +1 -0
  103. package/dist/cli/pm.daemon.recover.impl.d.ts +16 -0
  104. package/dist/cli/pm.daemon.recover.impl.d.ts.map +1 -0
  105. package/dist/cli/pm.daemon.recover.impl.js +66 -0
  106. package/dist/cli/pm.daemon.recover.impl.js.map +1 -0
  107. package/dist/cli/pm.daemon.restart.descriptor.d.ts +9 -0
  108. package/dist/cli/pm.daemon.restart.descriptor.d.ts.map +1 -0
  109. package/dist/cli/pm.daemon.restart.descriptor.js +25 -0
  110. package/dist/cli/pm.daemon.restart.descriptor.js.map +1 -0
  111. package/dist/cli/pm.daemon.restart.impl.d.ts +28 -0
  112. package/dist/cli/pm.daemon.restart.impl.d.ts.map +1 -0
  113. package/dist/cli/pm.daemon.restart.impl.js +174 -0
  114. package/dist/cli/pm.daemon.restart.impl.js.map +1 -0
  115. package/dist/cli/pm.daemon.serve.descriptor.d.ts +10 -0
  116. package/dist/cli/pm.daemon.serve.descriptor.d.ts.map +1 -0
  117. package/dist/cli/pm.daemon.serve.descriptor.js +28 -0
  118. package/dist/cli/pm.daemon.serve.descriptor.js.map +1 -0
  119. package/dist/cli/pm.daemon.serve.impl.d.ts +37 -0
  120. package/dist/cli/pm.daemon.serve.impl.d.ts.map +1 -0
  121. package/dist/cli/pm.daemon.serve.impl.js +257 -0
  122. package/dist/cli/pm.daemon.serve.impl.js.map +1 -0
  123. package/dist/cli/pm.daemon.start.descriptor.d.ts +9 -0
  124. package/dist/cli/pm.daemon.start.descriptor.d.ts.map +1 -0
  125. package/dist/cli/pm.daemon.start.descriptor.js +28 -0
  126. package/dist/cli/pm.daemon.start.descriptor.js.map +1 -0
  127. package/dist/cli/pm.daemon.start.impl.d.ts +40 -0
  128. package/dist/cli/pm.daemon.start.impl.d.ts.map +1 -0
  129. package/dist/cli/pm.daemon.start.impl.js +341 -0
  130. package/dist/cli/pm.daemon.start.impl.js.map +1 -0
  131. package/dist/cli/pm.daemon.status.descriptor.d.ts +9 -0
  132. package/dist/cli/pm.daemon.status.descriptor.d.ts.map +1 -0
  133. package/dist/cli/pm.daemon.status.descriptor.js +24 -0
  134. package/dist/cli/pm.daemon.status.descriptor.js.map +1 -0
  135. package/dist/cli/pm.daemon.status.impl.d.ts +11 -0
  136. package/dist/cli/pm.daemon.status.impl.d.ts.map +1 -0
  137. package/dist/cli/pm.daemon.status.impl.js +123 -0
  138. package/dist/cli/pm.daemon.status.impl.js.map +1 -0
  139. package/dist/cli/pm.daemon.stop.descriptor.d.ts +9 -0
  140. package/dist/cli/pm.daemon.stop.descriptor.d.ts.map +1 -0
  141. package/dist/cli/pm.daemon.stop.descriptor.js +24 -0
  142. package/dist/cli/pm.daemon.stop.descriptor.js.map +1 -0
  143. package/dist/cli/pm.daemon.stop.impl.d.ts +21 -0
  144. package/dist/cli/pm.daemon.stop.impl.d.ts.map +1 -0
  145. package/dist/cli/pm.daemon.stop.impl.js +108 -0
  146. package/dist/cli/pm.daemon.stop.impl.js.map +1 -0
  147. package/dist/cli/pm.dashboard.descriptor.d.ts +10 -0
  148. package/dist/cli/pm.dashboard.descriptor.d.ts.map +1 -0
  149. package/dist/cli/pm.dashboard.descriptor.js +30 -0
  150. package/dist/cli/pm.dashboard.descriptor.js.map +1 -0
  151. package/dist/cli/pm.dashboard.impl.d.ts +16 -0
  152. package/dist/cli/pm.dashboard.impl.d.ts.map +1 -0
  153. package/dist/cli/pm.dashboard.impl.js +134 -0
  154. package/dist/cli/pm.dashboard.impl.js.map +1 -0
  155. package/dist/cli/pm.init.descriptor.d.ts +9 -0
  156. package/dist/cli/pm.init.descriptor.d.ts.map +1 -0
  157. package/dist/cli/pm.init.descriptor.js +28 -0
  158. package/dist/cli/pm.init.descriptor.js.map +1 -0
  159. package/dist/cli/pm.init.impl.d.ts +11 -0
  160. package/dist/cli/pm.init.impl.d.ts.map +1 -0
  161. package/dist/cli/pm.init.impl.js +112 -0
  162. package/dist/cli/pm.init.impl.js.map +1 -0
  163. package/dist/cli/pm.list.descriptor.d.ts +9 -0
  164. package/dist/cli/pm.list.descriptor.d.ts.map +1 -0
  165. package/dist/cli/pm.list.descriptor.js +44 -0
  166. package/dist/cli/pm.list.descriptor.js.map +1 -0
  167. package/dist/cli/pm.list.impl.d.ts +24 -0
  168. package/dist/cli/pm.list.impl.d.ts.map +1 -0
  169. package/dist/cli/pm.list.impl.js +204 -0
  170. package/dist/cli/pm.list.impl.js.map +1 -0
  171. package/dist/cli/pm.liveness.cli-group.descriptor.d.ts +25 -0
  172. package/dist/cli/pm.liveness.cli-group.descriptor.d.ts.map +1 -0
  173. package/dist/cli/pm.liveness.cli-group.descriptor.js +33 -0
  174. package/dist/cli/pm.liveness.cli-group.descriptor.js.map +1 -0
  175. package/dist/cli/pm.liveness.set.descriptor.d.ts +18 -0
  176. package/dist/cli/pm.liveness.set.descriptor.d.ts.map +1 -0
  177. package/dist/cli/pm.liveness.set.descriptor.js +65 -0
  178. package/dist/cli/pm.liveness.set.descriptor.js.map +1 -0
  179. package/dist/cli/pm.liveness.set.impl.d.ts +6 -0
  180. package/dist/cli/pm.liveness.set.impl.d.ts.map +1 -0
  181. package/dist/cli/pm.liveness.set.impl.js +61 -0
  182. package/dist/cli/pm.liveness.set.impl.js.map +1 -0
  183. package/dist/cli/pm.logs.descriptor.d.ts +9 -0
  184. package/dist/cli/pm.logs.descriptor.d.ts.map +1 -0
  185. package/dist/cli/pm.logs.descriptor.js +39 -0
  186. package/dist/cli/pm.logs.descriptor.js.map +1 -0
  187. package/dist/cli/pm.logs.impl.d.ts +11 -0
  188. package/dist/cli/pm.logs.impl.d.ts.map +1 -0
  189. package/dist/cli/pm.logs.impl.js +208 -0
  190. package/dist/cli/pm.logs.impl.js.map +1 -0
  191. package/dist/cli/pm.preset.cli-group.descriptor.d.ts +9 -0
  192. package/dist/cli/pm.preset.cli-group.descriptor.d.ts.map +1 -0
  193. package/dist/cli/pm.preset.cli-group.descriptor.js +17 -0
  194. package/dist/cli/pm.preset.cli-group.descriptor.js.map +1 -0
  195. package/dist/cli/pm.preset.list.descriptor.d.ts +9 -0
  196. package/dist/cli/pm.preset.list.descriptor.d.ts.map +1 -0
  197. package/dist/cli/pm.preset.list.descriptor.js +24 -0
  198. package/dist/cli/pm.preset.list.descriptor.js.map +1 -0
  199. package/dist/cli/pm.preset.list.impl.d.ts +6 -0
  200. package/dist/cli/pm.preset.list.impl.d.ts.map +1 -0
  201. package/dist/cli/pm.preset.list.impl.js +67 -0
  202. package/dist/cli/pm.preset.list.impl.js.map +1 -0
  203. package/dist/cli/pm.preset.restart.descriptor.d.ts +9 -0
  204. package/dist/cli/pm.preset.restart.descriptor.d.ts.map +1 -0
  205. package/dist/cli/pm.preset.restart.descriptor.js +39 -0
  206. package/dist/cli/pm.preset.restart.descriptor.js.map +1 -0
  207. package/dist/cli/pm.preset.restart.impl.d.ts +11 -0
  208. package/dist/cli/pm.preset.restart.impl.d.ts.map +1 -0
  209. package/dist/cli/pm.preset.restart.impl.js +85 -0
  210. package/dist/cli/pm.preset.restart.impl.js.map +1 -0
  211. package/dist/cli/pm.preset.show.descriptor.d.ts +9 -0
  212. package/dist/cli/pm.preset.show.descriptor.d.ts.map +1 -0
  213. package/dist/cli/pm.preset.show.descriptor.js +30 -0
  214. package/dist/cli/pm.preset.show.descriptor.js.map +1 -0
  215. package/dist/cli/pm.preset.show.impl.d.ts +6 -0
  216. package/dist/cli/pm.preset.show.impl.d.ts.map +1 -0
  217. package/dist/cli/pm.preset.show.impl.js +92 -0
  218. package/dist/cli/pm.preset.show.impl.js.map +1 -0
  219. package/dist/cli/pm.preset.start.descriptor.d.ts +9 -0
  220. package/dist/cli/pm.preset.start.descriptor.d.ts.map +1 -0
  221. package/dist/cli/pm.preset.start.descriptor.js +39 -0
  222. package/dist/cli/pm.preset.start.descriptor.js.map +1 -0
  223. package/dist/cli/pm.preset.start.impl.d.ts +11 -0
  224. package/dist/cli/pm.preset.start.impl.d.ts.map +1 -0
  225. package/dist/cli/pm.preset.start.impl.js +88 -0
  226. package/dist/cli/pm.preset.start.impl.js.map +1 -0
  227. package/dist/cli/pm.preset.status.descriptor.d.ts +9 -0
  228. package/dist/cli/pm.preset.status.descriptor.d.ts.map +1 -0
  229. package/dist/cli/pm.preset.status.descriptor.js +30 -0
  230. package/dist/cli/pm.preset.status.descriptor.js.map +1 -0
  231. package/dist/cli/pm.preset.status.impl.d.ts +11 -0
  232. package/dist/cli/pm.preset.status.impl.d.ts.map +1 -0
  233. package/dist/cli/pm.preset.status.impl.js +166 -0
  234. package/dist/cli/pm.preset.status.impl.js.map +1 -0
  235. package/dist/cli/pm.preset.stop.descriptor.d.ts +9 -0
  236. package/dist/cli/pm.preset.stop.descriptor.d.ts.map +1 -0
  237. package/dist/cli/pm.preset.stop.descriptor.js +39 -0
  238. package/dist/cli/pm.preset.stop.descriptor.js.map +1 -0
  239. package/dist/cli/pm.preset.stop.impl.d.ts +11 -0
  240. package/dist/cli/pm.preset.stop.impl.d.ts.map +1 -0
  241. package/dist/cli/pm.preset.stop.impl.js +68 -0
  242. package/dist/cli/pm.preset.stop.impl.js.map +1 -0
  243. package/dist/cli/pm.preset.teardown.descriptor.d.ts +9 -0
  244. package/dist/cli/pm.preset.teardown.descriptor.d.ts.map +1 -0
  245. package/dist/cli/pm.preset.teardown.descriptor.js +43 -0
  246. package/dist/cli/pm.preset.teardown.descriptor.js.map +1 -0
  247. package/dist/cli/pm.preset.teardown.impl.d.ts +12 -0
  248. package/dist/cli/pm.preset.teardown.impl.d.ts.map +1 -0
  249. package/dist/cli/pm.preset.teardown.impl.js +91 -0
  250. package/dist/cli/pm.preset.teardown.impl.js.map +1 -0
  251. package/dist/cli/pm.presets.descriptor.d.ts +9 -0
  252. package/dist/cli/pm.presets.descriptor.d.ts.map +1 -0
  253. package/dist/cli/pm.presets.descriptor.js +24 -0
  254. package/dist/cli/pm.presets.descriptor.js.map +1 -0
  255. package/dist/cli/pm.presets.impl.d.ts +11 -0
  256. package/dist/cli/pm.presets.impl.d.ts.map +1 -0
  257. package/dist/cli/pm.presets.impl.js +13 -0
  258. package/dist/cli/pm.presets.impl.js.map +1 -0
  259. package/dist/cli/pm.register.descriptor.d.ts +11 -0
  260. package/dist/cli/pm.register.descriptor.d.ts.map +1 -0
  261. package/dist/cli/pm.register.descriptor.js +32 -0
  262. package/dist/cli/pm.register.descriptor.js.map +1 -0
  263. package/dist/cli/pm.register.impl.d.ts +15 -0
  264. package/dist/cli/pm.register.impl.d.ts.map +1 -0
  265. package/dist/cli/pm.register.impl.js +81 -0
  266. package/dist/cli/pm.register.impl.js.map +1 -0
  267. package/dist/cli/pm.resource.apply.descriptor.d.ts +15 -0
  268. package/dist/cli/pm.resource.apply.descriptor.d.ts.map +1 -0
  269. package/dist/cli/pm.resource.apply.descriptor.js +41 -0
  270. package/dist/cli/pm.resource.apply.descriptor.js.map +1 -0
  271. package/dist/cli/pm.resource.apply.impl.d.ts +14 -0
  272. package/dist/cli/pm.resource.apply.impl.d.ts.map +1 -0
  273. package/dist/cli/pm.resource.apply.impl.js +91 -0
  274. package/dist/cli/pm.resource.apply.impl.js.map +1 -0
  275. package/dist/cli/pm.resource.cli-group.descriptor.d.ts +9 -0
  276. package/dist/cli/pm.resource.cli-group.descriptor.d.ts.map +1 -0
  277. package/dist/cli/pm.resource.cli-group.descriptor.js +17 -0
  278. package/dist/cli/pm.resource.cli-group.descriptor.js.map +1 -0
  279. package/dist/cli/pm.resource.list.descriptor.d.ts +9 -0
  280. package/dist/cli/pm.resource.list.descriptor.d.ts.map +1 -0
  281. package/dist/cli/pm.resource.list.descriptor.js +25 -0
  282. package/dist/cli/pm.resource.list.descriptor.js.map +1 -0
  283. package/dist/cli/pm.resource.list.impl.d.ts +11 -0
  284. package/dist/cli/pm.resource.list.impl.d.ts.map +1 -0
  285. package/dist/cli/pm.resource.list.impl.js +141 -0
  286. package/dist/cli/pm.resource.list.impl.js.map +1 -0
  287. package/dist/cli/pm.resource.recreate.descriptor.d.ts +4 -0
  288. package/dist/cli/pm.resource.recreate.descriptor.d.ts.map +1 -0
  289. package/dist/cli/pm.resource.recreate.descriptor.js +29 -0
  290. package/dist/cli/pm.resource.recreate.descriptor.js.map +1 -0
  291. package/dist/cli/pm.resource.recreate.impl.d.ts +6 -0
  292. package/dist/cli/pm.resource.recreate.impl.d.ts.map +1 -0
  293. package/dist/cli/pm.resource.recreate.impl.js +123 -0
  294. package/dist/cli/pm.resource.recreate.impl.js.map +1 -0
  295. package/dist/cli/pm.resource.status.descriptor.d.ts +9 -0
  296. package/dist/cli/pm.resource.status.descriptor.d.ts.map +1 -0
  297. package/dist/cli/pm.resource.status.descriptor.js +31 -0
  298. package/dist/cli/pm.resource.status.descriptor.js.map +1 -0
  299. package/dist/cli/pm.resource.status.impl.d.ts +11 -0
  300. package/dist/cli/pm.resource.status.impl.d.ts.map +1 -0
  301. package/dist/cli/pm.resource.status.impl.js +230 -0
  302. package/dist/cli/pm.resource.status.impl.js.map +1 -0
  303. package/dist/cli/pm.restart.descriptor.d.ts +9 -0
  304. package/dist/cli/pm.restart.descriptor.d.ts.map +1 -0
  305. package/dist/cli/pm.restart.descriptor.js +40 -0
  306. package/dist/cli/pm.restart.descriptor.js.map +1 -0
  307. package/dist/cli/pm.restart.impl.d.ts +12 -0
  308. package/dist/cli/pm.restart.impl.d.ts.map +1 -0
  309. package/dist/cli/pm.restart.impl.js +109 -0
  310. package/dist/cli/pm.restart.impl.js.map +1 -0
  311. package/dist/cli/pm.show.descriptor.d.ts +9 -0
  312. package/dist/cli/pm.show.descriptor.d.ts.map +1 -0
  313. package/dist/cli/pm.show.descriptor.js +30 -0
  314. package/dist/cli/pm.show.descriptor.js.map +1 -0
  315. package/dist/cli/pm.show.impl.d.ts +25 -0
  316. package/dist/cli/pm.show.impl.d.ts.map +1 -0
  317. package/dist/cli/pm.show.impl.js +175 -0
  318. package/dist/cli/pm.show.impl.js.map +1 -0
  319. package/dist/cli/pm.start-all.descriptor.d.ts +9 -0
  320. package/dist/cli/pm.start-all.descriptor.d.ts.map +1 -0
  321. package/dist/cli/pm.start-all.descriptor.js +34 -0
  322. package/dist/cli/pm.start-all.descriptor.js.map +1 -0
  323. package/dist/cli/pm.start-all.impl.d.ts +12 -0
  324. package/dist/cli/pm.start-all.impl.d.ts.map +1 -0
  325. package/dist/cli/pm.start-all.impl.js +91 -0
  326. package/dist/cli/pm.start-all.impl.js.map +1 -0
  327. package/dist/cli/pm.start.descriptor.d.ts +9 -0
  328. package/dist/cli/pm.start.descriptor.d.ts.map +1 -0
  329. package/dist/cli/pm.start.descriptor.js +40 -0
  330. package/dist/cli/pm.start.descriptor.js.map +1 -0
  331. package/dist/cli/pm.start.impl.d.ts +19 -0
  332. package/dist/cli/pm.start.impl.d.ts.map +1 -0
  333. package/dist/cli/pm.start.impl.js +170 -0
  334. package/dist/cli/pm.start.impl.js.map +1 -0
  335. package/dist/cli/pm.status.descriptor.d.ts +10 -0
  336. package/dist/cli/pm.status.descriptor.d.ts.map +1 -0
  337. package/dist/cli/pm.status.descriptor.js +31 -0
  338. package/dist/cli/pm.status.descriptor.js.map +1 -0
  339. package/dist/cli/pm.status.impl.d.ts +96 -0
  340. package/dist/cli/pm.status.impl.d.ts.map +1 -0
  341. package/dist/cli/pm.status.impl.js +425 -0
  342. package/dist/cli/pm.status.impl.js.map +1 -0
  343. package/dist/cli/pm.stop-all.descriptor.d.ts +9 -0
  344. package/dist/cli/pm.stop-all.descriptor.d.ts.map +1 -0
  345. package/dist/cli/pm.stop-all.descriptor.js +41 -0
  346. package/dist/cli/pm.stop-all.descriptor.js.map +1 -0
  347. package/dist/cli/pm.stop-all.impl.d.ts +14 -0
  348. package/dist/cli/pm.stop-all.impl.d.ts.map +1 -0
  349. package/dist/cli/pm.stop-all.impl.js +138 -0
  350. package/dist/cli/pm.stop-all.impl.js.map +1 -0
  351. package/dist/cli/pm.stop.descriptor.d.ts +9 -0
  352. package/dist/cli/pm.stop.descriptor.d.ts.map +1 -0
  353. package/dist/cli/pm.stop.descriptor.js +40 -0
  354. package/dist/cli/pm.stop.descriptor.js.map +1 -0
  355. package/dist/cli/pm.stop.impl.d.ts +13 -0
  356. package/dist/cli/pm.stop.impl.d.ts.map +1 -0
  357. package/dist/cli/pm.stop.impl.js +120 -0
  358. package/dist/cli/pm.stop.impl.js.map +1 -0
  359. package/dist/cli/pm.unregister-all.descriptor.d.ts +9 -0
  360. package/dist/cli/pm.unregister-all.descriptor.d.ts.map +1 -0
  361. package/dist/cli/pm.unregister-all.descriptor.js +28 -0
  362. package/dist/cli/pm.unregister-all.descriptor.js.map +1 -0
  363. package/dist/cli/pm.unregister-all.impl.d.ts +11 -0
  364. package/dist/cli/pm.unregister-all.impl.d.ts.map +1 -0
  365. package/dist/cli/pm.unregister-all.impl.js +106 -0
  366. package/dist/cli/pm.unregister-all.impl.js.map +1 -0
  367. package/dist/cli/pm.unregister.descriptor.d.ts +9 -0
  368. package/dist/cli/pm.unregister.descriptor.d.ts.map +1 -0
  369. package/dist/cli/pm.unregister.descriptor.js +34 -0
  370. package/dist/cli/pm.unregister.descriptor.js.map +1 -0
  371. package/dist/cli/pm.unregister.impl.d.ts +11 -0
  372. package/dist/cli/pm.unregister.impl.d.ts.map +1 -0
  373. package/dist/cli/pm.unregister.impl.js +77 -0
  374. package/dist/cli/pm.unregister.impl.js.map +1 -0
  375. package/dist/cli/pm.validate.descriptor.d.ts +9 -0
  376. package/dist/cli/pm.validate.descriptor.d.ts.map +1 -0
  377. package/dist/cli/pm.validate.descriptor.js +24 -0
  378. package/dist/cli/pm.validate.descriptor.js.map +1 -0
  379. package/dist/cli/pm.validate.impl.d.ts +6 -0
  380. package/dist/cli/pm.validate.impl.d.ts.map +1 -0
  381. package/dist/cli/pm.validate.impl.js +235 -0
  382. package/dist/cli/pm.validate.impl.js.map +1 -0
  383. package/dist/cli/preset-execution-options.d.ts +8 -0
  384. package/dist/cli/preset-execution-options.d.ts.map +1 -0
  385. package/dist/cli/preset-execution-options.js +22 -0
  386. package/dist/cli/preset-execution-options.js.map +1 -0
  387. package/dist/cli/register-manifest.d.ts +23 -0
  388. package/dist/cli/register-manifest.d.ts.map +1 -0
  389. package/dist/cli/register-manifest.js +80 -0
  390. package/dist/cli/register-manifest.js.map +1 -0
  391. package/dist/cli/runtime.d.ts +3 -0
  392. package/dist/cli/runtime.d.ts.map +1 -0
  393. package/dist/cli/runtime.js +134 -0
  394. package/dist/cli/runtime.js.map +1 -0
  395. package/dist/cli/table-columns.d.ts +22 -0
  396. package/dist/cli/table-columns.d.ts.map +1 -0
  397. package/dist/cli/table-columns.js +61 -0
  398. package/dist/cli/table-columns.js.map +1 -0
  399. package/dist/client-replies.d.ts +1188 -0
  400. package/dist/client-replies.d.ts.map +1 -0
  401. package/dist/client-replies.js +145 -0
  402. package/dist/client-replies.js.map +1 -0
  403. package/dist/client.d.ts +345 -0
  404. package/dist/client.d.ts.map +1 -0
  405. package/dist/client.js +1005 -0
  406. package/dist/client.js.map +1 -0
  407. package/dist/config/pm.config.config.descriptor.d.ts +10 -0
  408. package/dist/config/pm.config.config.descriptor.d.ts.map +1 -0
  409. package/dist/config/pm.config.config.descriptor.js +37 -0
  410. package/dist/config/pm.config.config.descriptor.js.map +1 -0
  411. package/dist/context.d.ts +121 -0
  412. package/dist/context.d.ts.map +1 -0
  413. package/dist/context.js +6 -0
  414. package/dist/context.js.map +1 -0
  415. package/dist/daemon/command-handler.d.ts +74 -0
  416. package/dist/daemon/command-handler.d.ts.map +1 -0
  417. package/dist/daemon/command-handler.js +220 -0
  418. package/dist/daemon/command-handler.js.map +1 -0
  419. package/dist/daemon/command-ids.d.ts +10 -0
  420. package/dist/daemon/command-ids.d.ts.map +1 -0
  421. package/dist/daemon/command-ids.js +51 -0
  422. package/dist/daemon/command-ids.js.map +1 -0
  423. package/dist/daemon/command-implementations.d.ts +30 -0
  424. package/dist/daemon/command-implementations.d.ts.map +1 -0
  425. package/dist/daemon/command-implementations.js +340 -0
  426. package/dist/daemon/command-implementations.js.map +1 -0
  427. package/dist/daemon/command-payload.d.ts +803 -0
  428. package/dist/daemon/command-payload.d.ts.map +1 -0
  429. package/dist/daemon/command-payload.js +128 -0
  430. package/dist/daemon/command-payload.js.map +1 -0
  431. package/dist/daemon/commands.plugin.d.ts +6 -0
  432. package/dist/daemon/commands.plugin.d.ts.map +1 -0
  433. package/dist/daemon/commands.plugin.js +22 -0
  434. package/dist/daemon/commands.plugin.js.map +1 -0
  435. package/dist/daemon/config-watcher.d.ts +125 -0
  436. package/dist/daemon/config-watcher.d.ts.map +1 -0
  437. package/dist/daemon/config-watcher.js +541 -0
  438. package/dist/daemon/config-watcher.js.map +1 -0
  439. package/dist/daemon/daemon-module-context.d.ts +16 -0
  440. package/dist/daemon/daemon-module-context.d.ts.map +1 -0
  441. package/dist/daemon/daemon-module-context.js +25 -0
  442. package/dist/daemon/daemon-module-context.js.map +1 -0
  443. package/dist/daemon/declared-commands.d.ts +39 -0
  444. package/dist/daemon/declared-commands.d.ts.map +1 -0
  445. package/dist/daemon/declared-commands.js +200 -0
  446. package/dist/daemon/declared-commands.js.map +1 -0
  447. package/dist/daemon/executable-freshness-reconciler.d.ts +99 -0
  448. package/dist/daemon/executable-freshness-reconciler.d.ts.map +1 -0
  449. package/dist/daemon/executable-freshness-reconciler.js +396 -0
  450. package/dist/daemon/executable-freshness-reconciler.js.map +1 -0
  451. package/dist/daemon/fleet-attach-state.d.ts +22 -0
  452. package/dist/daemon/fleet-attach-state.d.ts.map +1 -0
  453. package/dist/daemon/fleet-attach-state.js +39 -0
  454. package/dist/daemon/fleet-attach-state.js.map +1 -0
  455. package/dist/daemon/health-monitor.d.ts +105 -0
  456. package/dist/daemon/health-monitor.d.ts.map +1 -0
  457. package/dist/daemon/health-monitor.js +453 -0
  458. package/dist/daemon/health-monitor.js.map +1 -0
  459. package/dist/daemon/liveness-checker.d.ts +49 -0
  460. package/dist/daemon/liveness-checker.d.ts.map +1 -0
  461. package/dist/daemon/liveness-checker.js +330 -0
  462. package/dist/daemon/liveness-checker.js.map +1 -0
  463. package/dist/daemon/orphan-scanner.d.ts +114 -0
  464. package/dist/daemon/orphan-scanner.d.ts.map +1 -0
  465. package/dist/daemon/orphan-scanner.js +684 -0
  466. package/dist/daemon/orphan-scanner.js.map +1 -0
  467. package/dist/daemon/resource-health-monitor.d.ts +65 -0
  468. package/dist/daemon/resource-health-monitor.d.ts.map +1 -0
  469. package/dist/daemon/resource-health-monitor.js +247 -0
  470. package/dist/daemon/resource-health-monitor.js.map +1 -0
  471. package/dist/daemon/role.context.impl.d.ts +13 -0
  472. package/dist/daemon/role.context.impl.d.ts.map +1 -0
  473. package/dist/daemon/role.context.impl.js +7 -0
  474. package/dist/daemon/role.context.impl.js.map +1 -0
  475. package/dist/daemon/role.d.ts +56 -0
  476. package/dist/daemon/role.d.ts.map +1 -0
  477. package/dist/daemon/role.js +18 -0
  478. package/dist/daemon/role.js.map +1 -0
  479. package/dist/daemon/rpc-result.d.ts +9 -0
  480. package/dist/daemon/rpc-result.d.ts.map +1 -0
  481. package/dist/daemon/rpc-result.js +28 -0
  482. package/dist/daemon/rpc-result.js.map +1 -0
  483. package/dist/daemon/stray-daemons.d.ts +52 -0
  484. package/dist/daemon/stray-daemons.d.ts.map +1 -0
  485. package/dist/daemon/stray-daemons.js +101 -0
  486. package/dist/daemon/stray-daemons.js.map +1 -0
  487. package/dist/daemon/supervised-commands.d.ts +3 -0
  488. package/dist/daemon/supervised-commands.d.ts.map +1 -0
  489. package/dist/daemon/supervised-commands.js +51 -0
  490. package/dist/daemon/supervised-commands.js.map +1 -0
  491. package/dist/daemon.d.ts +329 -0
  492. package/dist/daemon.d.ts.map +1 -0
  493. package/dist/daemon.js +1654 -0
  494. package/dist/daemon.js.map +1 -0
  495. package/dist/definitions.d.ts +2 -0
  496. package/dist/definitions.d.ts.map +1 -0
  497. package/dist/definitions.js +2 -0
  498. package/dist/definitions.js.map +1 -0
  499. package/dist/dev/command.d.ts +39 -0
  500. package/dist/dev/command.d.ts.map +1 -0
  501. package/dist/dev/command.js +79 -0
  502. package/dist/dev/command.js.map +1 -0
  503. package/dist/dev/defaults.d.ts +34 -0
  504. package/dist/dev/defaults.d.ts.map +1 -0
  505. package/dist/dev/defaults.js +58 -0
  506. package/dist/dev/defaults.js.map +1 -0
  507. package/dist/dev/env.d.ts +31 -0
  508. package/dist/dev/env.d.ts.map +1 -0
  509. package/dist/dev/env.js +56 -0
  510. package/dist/dev/env.js.map +1 -0
  511. package/dist/dev/index.d.ts +26 -0
  512. package/dist/dev/index.d.ts.map +1 -0
  513. package/dist/dev/index.js +28 -0
  514. package/dist/dev/index.js.map +1 -0
  515. package/dist/dev/sveltekit.d.ts +41 -0
  516. package/dist/dev/sveltekit.d.ts.map +1 -0
  517. package/dist/dev/sveltekit.js +93 -0
  518. package/dist/dev/sveltekit.js.map +1 -0
  519. package/dist/dev/workspace-shape.d.ts +64 -0
  520. package/dist/dev/workspace-shape.d.ts.map +1 -0
  521. package/dist/dev/workspace-shape.js +19 -0
  522. package/dist/dev/workspace-shape.js.map +1 -0
  523. package/dist/docs/pm.daemon.docs.descriptor.d.ts +4 -0
  524. package/dist/docs/pm.daemon.docs.descriptor.d.ts.map +1 -0
  525. package/dist/docs/pm.daemon.docs.descriptor.js +48 -0
  526. package/dist/docs/pm.daemon.docs.descriptor.js.map +1 -0
  527. package/dist/docs/pm.docs.descriptor.d.ts +4 -0
  528. package/dist/docs/pm.docs.descriptor.d.ts.map +1 -0
  529. package/dist/docs/pm.docs.descriptor.js +45 -0
  530. package/dist/docs/pm.docs.descriptor.js.map +1 -0
  531. package/dist/docs/pm.preset.docs.descriptor.d.ts +4 -0
  532. package/dist/docs/pm.preset.docs.descriptor.d.ts.map +1 -0
  533. package/dist/docs/pm.preset.docs.descriptor.js +37 -0
  534. package/dist/docs/pm.preset.docs.descriptor.js.map +1 -0
  535. package/dist/docs/pm.queues.docs.descriptor.d.ts +4 -0
  536. package/dist/docs/pm.queues.docs.descriptor.d.ts.map +1 -0
  537. package/dist/docs/pm.queues.docs.descriptor.js +157 -0
  538. package/dist/docs/pm.queues.docs.descriptor.js.map +1 -0
  539. package/dist/docs/pm.resource.docs.descriptor.d.ts +4 -0
  540. package/dist/docs/pm.resource.docs.descriptor.d.ts.map +1 -0
  541. package/dist/docs/pm.resource.docs.descriptor.js +38 -0
  542. package/dist/docs/pm.resource.docs.descriptor.js.map +1 -0
  543. package/dist/docs/pm.tasks.docs.descriptor.d.ts +4 -0
  544. package/dist/docs/pm.tasks.docs.descriptor.d.ts.map +1 -0
  545. package/dist/docs/pm.tasks.docs.descriptor.js +242 -0
  546. package/dist/docs/pm.tasks.docs.descriptor.js.map +1 -0
  547. package/dist/docs/pm.workers.docs.descriptor.d.ts +4 -0
  548. package/dist/docs/pm.workers.docs.descriptor.d.ts.map +1 -0
  549. package/dist/docs/pm.workers.docs.descriptor.js +427 -0
  550. package/dist/docs/pm.workers.docs.descriptor.js.map +1 -0
  551. package/dist/errors.d.ts +262 -0
  552. package/dist/errors.d.ts.map +1 -0
  553. package/dist/errors.js +479 -0
  554. package/dist/errors.js.map +1 -0
  555. package/dist/graph.d.ts +82 -0
  556. package/dist/graph.d.ts.map +1 -0
  557. package/dist/graph.js +247 -0
  558. package/dist/graph.js.map +1 -0
  559. package/dist/helpers/failure.d.ts +10 -0
  560. package/dist/helpers/failure.d.ts.map +1 -0
  561. package/dist/helpers/failure.js +10 -0
  562. package/dist/helpers/failure.js.map +1 -0
  563. package/dist/helpers/launch-custody.d.ts +16 -0
  564. package/dist/helpers/launch-custody.d.ts.map +1 -0
  565. package/dist/helpers/launch-custody.js +117 -0
  566. package/dist/helpers/launch-custody.js.map +1 -0
  567. package/dist/helpers/launch-identity.d.ts +20 -0
  568. package/dist/helpers/launch-identity.d.ts.map +1 -0
  569. package/dist/helpers/launch-identity.js +70 -0
  570. package/dist/helpers/launch-identity.js.map +1 -0
  571. package/dist/helpers/managed-http-origin.d.ts +4 -0
  572. package/dist/helpers/managed-http-origin.d.ts.map +1 -0
  573. package/dist/helpers/managed-http-origin.js +9 -0
  574. package/dist/helpers/managed-http-origin.js.map +1 -0
  575. package/dist/helpers/managed-process-admission.d.ts +55 -0
  576. package/dist/helpers/managed-process-admission.d.ts.map +1 -0
  577. package/dist/helpers/managed-process-admission.js +102 -0
  578. package/dist/helpers/managed-process-admission.js.map +1 -0
  579. package/dist/helpers/managed-process-id.d.ts +13 -0
  580. package/dist/helpers/managed-process-id.d.ts.map +1 -0
  581. package/dist/helpers/managed-process-id.js +16 -0
  582. package/dist/helpers/managed-process-id.js.map +1 -0
  583. package/dist/helpers/node-path.d.ts +16 -0
  584. package/dist/helpers/node-path.d.ts.map +1 -0
  585. package/dist/helpers/node-path.js +67 -0
  586. package/dist/helpers/node-path.js.map +1 -0
  587. package/dist/helpers/output-redaction.d.ts +36 -0
  588. package/dist/helpers/output-redaction.d.ts.map +1 -0
  589. package/dist/helpers/output-redaction.js +120 -0
  590. package/dist/helpers/output-redaction.js.map +1 -0
  591. package/dist/helpers/process-credentials.d.ts +62 -0
  592. package/dist/helpers/process-credentials.d.ts.map +1 -0
  593. package/dist/helpers/process-credentials.js +107 -0
  594. package/dist/helpers/process-credentials.js.map +1 -0
  595. package/dist/helpers/process-env.d.ts +72 -0
  596. package/dist/helpers/process-env.d.ts.map +1 -0
  597. package/dist/helpers/process-env.js +265 -0
  598. package/dist/helpers/process-env.js.map +1 -0
  599. package/dist/helpers/process-watch.d.ts +7 -0
  600. package/dist/helpers/process-watch.d.ts.map +1 -0
  601. package/dist/helpers/process-watch.js +27 -0
  602. package/dist/helpers/process-watch.js.map +1 -0
  603. package/dist/helpers/rlimits.d.ts +10 -0
  604. package/dist/helpers/rlimits.d.ts.map +1 -0
  605. package/dist/helpers/rlimits.js +14 -0
  606. package/dist/helpers/rlimits.js.map +1 -0
  607. package/dist/helpers/runtime-files.d.ts +42 -0
  608. package/dist/helpers/runtime-files.d.ts.map +1 -0
  609. package/dist/helpers/runtime-files.js +155 -0
  610. package/dist/helpers/runtime-files.js.map +1 -0
  611. package/dist/helpers/worker-routing.d.ts +35 -0
  612. package/dist/helpers/worker-routing.d.ts.map +1 -0
  613. package/dist/helpers/worker-routing.js +70 -0
  614. package/dist/helpers/worker-routing.js.map +1 -0
  615. package/dist/index.d.ts +10 -0
  616. package/dist/index.d.ts.map +1 -0
  617. package/dist/index.js +11 -0
  618. package/dist/index.js.map +1 -0
  619. package/dist/interface.d.ts +150 -0
  620. package/dist/interface.d.ts.map +1 -0
  621. package/dist/interface.js +6 -0
  622. package/dist/interface.js.map +1 -0
  623. package/dist/kinds/daemon-module.kind.d.ts +103 -0
  624. package/dist/kinds/daemon-module.kind.d.ts.map +1 -0
  625. package/dist/kinds/daemon-module.kind.js +38 -0
  626. package/dist/kinds/daemon-module.kind.js.map +1 -0
  627. package/dist/kinds/launch-preparation.kind.d.ts +24 -0
  628. package/dist/kinds/launch-preparation.kind.d.ts.map +1 -0
  629. package/dist/kinds/launch-preparation.kind.js +7 -0
  630. package/dist/kinds/launch-preparation.kind.js.map +1 -0
  631. package/dist/kinds/liveness-profile.kind.d.ts +33 -0
  632. package/dist/kinds/liveness-profile.kind.d.ts.map +1 -0
  633. package/dist/kinds/liveness-profile.kind.js +27 -0
  634. package/dist/kinds/liveness-profile.kind.js.map +1 -0
  635. package/dist/kinds/preset.kind.d.ts +59 -0
  636. package/dist/kinds/preset.kind.d.ts.map +1 -0
  637. package/dist/kinds/preset.kind.js +35 -0
  638. package/dist/kinds/preset.kind.js.map +1 -0
  639. package/dist/kinds/process-source.kind.d.ts +6 -0
  640. package/dist/kinds/process-source.kind.d.ts.map +1 -0
  641. package/dist/kinds/process-source.kind.js +24 -0
  642. package/dist/kinds/process-source.kind.js.map +1 -0
  643. package/dist/kinds/process.kind.d.ts +237 -0
  644. package/dist/kinds/process.kind.d.ts.map +1 -0
  645. package/dist/kinds/process.kind.js +36 -0
  646. package/dist/kinds/process.kind.js.map +1 -0
  647. package/dist/kinds/resource-provider.kind.d.ts +41 -0
  648. package/dist/kinds/resource-provider.kind.d.ts.map +1 -0
  649. package/dist/kinds/resource-provider.kind.js +56 -0
  650. package/dist/kinds/resource-provider.kind.js.map +1 -0
  651. package/dist/kinds/resource.kind.d.ts +73 -0
  652. package/dist/kinds/resource.kind.d.ts.map +1 -0
  653. package/dist/kinds/resource.kind.js +35 -0
  654. package/dist/kinds/resource.kind.js.map +1 -0
  655. package/dist/kinds/runtime-daemon-endpoint.d.ts +34 -0
  656. package/dist/kinds/runtime-daemon-endpoint.d.ts.map +1 -0
  657. package/dist/kinds/runtime-daemon-endpoint.js +83 -0
  658. package/dist/kinds/runtime-daemon-endpoint.js.map +1 -0
  659. package/dist/kinds/runtime-daemon-endpoint.kind.d.ts +144 -0
  660. package/dist/kinds/runtime-daemon-endpoint.kind.d.ts.map +1 -0
  661. package/dist/kinds/runtime-daemon-endpoint.kind.js +104 -0
  662. package/dist/kinds/runtime-daemon-endpoint.kind.js.map +1 -0
  663. package/dist/launch-preparation.d.ts +12 -0
  664. package/dist/launch-preparation.d.ts.map +1 -0
  665. package/dist/launch-preparation.js +42 -0
  666. package/dist/launch-preparation.js.map +1 -0
  667. package/dist/logging/pm-daemon.logger.descriptor.d.ts +7 -0
  668. package/dist/logging/pm-daemon.logger.descriptor.d.ts.map +1 -0
  669. package/dist/logging/pm-daemon.logger.descriptor.js +16 -0
  670. package/dist/logging/pm-daemon.logger.descriptor.js.map +1 -0
  671. package/dist/logging/pm-daemon.output.descriptor.d.ts +9 -0
  672. package/dist/logging/pm-daemon.output.descriptor.d.ts.map +1 -0
  673. package/dist/logging/pm-daemon.output.descriptor.js +22 -0
  674. package/dist/logging/pm-daemon.output.descriptor.js.map +1 -0
  675. package/dist/manager.d.ts +206 -0
  676. package/dist/manager.d.ts.map +1 -0
  677. package/dist/manager.js +682 -0
  678. package/dist/manager.js.map +1 -0
  679. package/dist/managers/dependency-resolver.d.ts +85 -0
  680. package/dist/managers/dependency-resolver.d.ts.map +1 -0
  681. package/dist/managers/dependency-resolver.js +237 -0
  682. package/dist/managers/dependency-resolver.js.map +1 -0
  683. package/dist/managers/preset-executor.d.ts +138 -0
  684. package/dist/managers/preset-executor.d.ts.map +1 -0
  685. package/dist/managers/preset-executor.js +763 -0
  686. package/dist/managers/preset-executor.js.map +1 -0
  687. package/dist/managers/resource-manager.d.ts +142 -0
  688. package/dist/managers/resource-manager.d.ts.map +1 -0
  689. package/dist/managers/resource-manager.js +767 -0
  690. package/dist/managers/resource-manager.js.map +1 -0
  691. package/dist/migrations.generated.d.ts +14 -0
  692. package/dist/migrations.generated.d.ts.map +1 -0
  693. package/dist/migrations.generated.js +27 -0
  694. package/dist/migrations.generated.js.map +1 -0
  695. package/dist/pm.assets.runtime.d.ts +151 -0
  696. package/dist/pm.assets.runtime.d.ts.map +1 -0
  697. package/dist/pm.assets.runtime.js +30 -0
  698. package/dist/pm.assets.runtime.js.map +1 -0
  699. package/dist/pm.client.descriptor.d.ts +4 -0
  700. package/dist/pm.client.descriptor.d.ts.map +1 -0
  701. package/dist/pm.client.descriptor.js +8 -0
  702. package/dist/pm.client.descriptor.js.map +1 -0
  703. package/dist/pm.client.impl.consumer.d.ts +9 -0
  704. package/dist/pm.client.impl.consumer.d.ts.map +1 -0
  705. package/dist/pm.client.impl.consumer.js +13 -0
  706. package/dist/pm.client.impl.consumer.js.map +1 -0
  707. package/dist/pm.cloud.plugin.d.ts +29 -0
  708. package/dist/pm.cloud.plugin.d.ts.map +1 -0
  709. package/dist/pm.cloud.plugin.js +57 -0
  710. package/dist/pm.cloud.plugin.js.map +1 -0
  711. package/dist/pm.consumer.plugin.d.ts +3 -0
  712. package/dist/pm.consumer.plugin.d.ts.map +1 -0
  713. package/dist/pm.consumer.plugin.js +70 -0
  714. package/dist/pm.consumer.plugin.js.map +1 -0
  715. package/dist/pm.context.descriptor.d.ts +35 -0
  716. package/dist/pm.context.descriptor.d.ts.map +1 -0
  717. package/dist/pm.context.descriptor.js +12 -0
  718. package/dist/pm.context.descriptor.js.map +1 -0
  719. package/dist/pm.context.impl.consumer.d.ts +8 -0
  720. package/dist/pm.context.impl.consumer.d.ts.map +1 -0
  721. package/dist/pm.context.impl.consumer.js +6 -0
  722. package/dist/pm.context.impl.consumer.js.map +1 -0
  723. package/dist/pm.plugin.d.ts +6 -0
  724. package/dist/pm.plugin.d.ts.map +1 -0
  725. package/dist/pm.plugin.js +6 -0
  726. package/dist/pm.plugin.js.map +1 -0
  727. package/dist/presets/index.d.ts +5 -0
  728. package/dist/presets/index.d.ts.map +1 -0
  729. package/dist/presets/index.js +5 -0
  730. package/dist/presets/index.js.map +1 -0
  731. package/dist/presets/preset/index.d.ts +2 -0
  732. package/dist/presets/preset/index.d.ts.map +1 -0
  733. package/dist/presets/preset/index.js +2 -0
  734. package/dist/presets/preset/index.js.map +1 -0
  735. package/dist/presets/preset/web-dev.d.ts +39 -0
  736. package/dist/presets/preset/web-dev.d.ts.map +1 -0
  737. package/dist/presets/preset/web-dev.js +69 -0
  738. package/dist/presets/preset/web-dev.js.map +1 -0
  739. package/dist/presets/process/index.d.ts +3 -0
  740. package/dist/presets/process/index.d.ts.map +1 -0
  741. package/dist/presets/process/index.js +3 -0
  742. package/dist/presets/process/index.js.map +1 -0
  743. package/dist/presets/process/sveltekit.d.ts +125 -0
  744. package/dist/presets/process/sveltekit.d.ts.map +1 -0
  745. package/dist/presets/process/sveltekit.js +52 -0
  746. package/dist/presets/process/sveltekit.js.map +1 -0
  747. package/dist/presets/process/web.d.ts +34 -0
  748. package/dist/presets/process/web.d.ts.map +1 -0
  749. package/dist/presets/process/web.js +52 -0
  750. package/dist/presets/process/web.js.map +1 -0
  751. package/dist/presets/resource/database.d.ts +39 -0
  752. package/dist/presets/resource/database.d.ts.map +1 -0
  753. package/dist/presets/resource/database.js +60 -0
  754. package/dist/presets/resource/database.js.map +1 -0
  755. package/dist/presets/resource/index.d.ts +2 -0
  756. package/dist/presets/resource/index.d.ts.map +1 -0
  757. package/dist/presets/resource/index.js +2 -0
  758. package/dist/presets/resource/index.js.map +1 -0
  759. package/dist/presets/types.d.ts +101 -0
  760. package/dist/presets/types.d.ts.map +1 -0
  761. package/dist/presets/types.js +53 -0
  762. package/dist/presets/types.js.map +1 -0
  763. package/dist/register-migrations.impl.consumer.d.ts +8 -0
  764. package/dist/register-migrations.impl.consumer.d.ts.map +1 -0
  765. package/dist/register-migrations.impl.consumer.js +145 -0
  766. package/dist/register-migrations.impl.consumer.js.map +1 -0
  767. package/dist/resources/index.d.ts +7 -0
  768. package/dist/resources/index.d.ts.map +1 -0
  769. package/dist/resources/index.js +7 -0
  770. package/dist/resources/index.js.map +1 -0
  771. package/dist/resources/provider.d.ts +216 -0
  772. package/dist/resources/provider.d.ts.map +1 -0
  773. package/dist/resources/provider.js +54 -0
  774. package/dist/resources/provider.js.map +1 -0
  775. package/dist/resources/providers/builtin.assets.d.ts +8 -0
  776. package/dist/resources/providers/builtin.assets.d.ts.map +1 -0
  777. package/dist/resources/providers/builtin.assets.js +26 -0
  778. package/dist/resources/providers/builtin.assets.js.map +1 -0
  779. package/dist/resources/providers/index.d.ts +14 -0
  780. package/dist/resources/providers/index.d.ts.map +1 -0
  781. package/dist/resources/providers/index.js +14 -0
  782. package/dist/resources/providers/index.js.map +1 -0
  783. package/dist/resources/providers/local-mkcert.d.ts +31 -0
  784. package/dist/resources/providers/local-mkcert.d.ts.map +1 -0
  785. package/dist/resources/providers/local-mkcert.js +169 -0
  786. package/dist/resources/providers/local-mkcert.js.map +1 -0
  787. package/dist/resources/providers/shell-setup.d.ts +17 -0
  788. package/dist/resources/providers/shell-setup.d.ts.map +1 -0
  789. package/dist/resources/providers/shell-setup.js +41 -0
  790. package/dist/resources/providers/shell-setup.js.map +1 -0
  791. package/dist/resources/providers/tool-env.d.ts +63 -0
  792. package/dist/resources/providers/tool-env.d.ts.map +1 -0
  793. package/dist/resources/providers/tool-env.js +99 -0
  794. package/dist/resources/providers/tool-env.js.map +1 -0
  795. package/dist/resources/resource-state-summary.d.ts +3 -0
  796. package/dist/resources/resource-state-summary.d.ts.map +1 -0
  797. package/dist/resources/resource-state-summary.js +82 -0
  798. package/dist/resources/resource-state-summary.js.map +1 -0
  799. package/dist/resources/status-options.d.ts +4 -0
  800. package/dist/resources/status-options.d.ts.map +1 -0
  801. package/dist/resources/status-options.js +6 -0
  802. package/dist/resources/status-options.js.map +1 -0
  803. package/dist/runnable/executor.d.ts +11 -0
  804. package/dist/runnable/executor.d.ts.map +1 -0
  805. package/dist/runnable/executor.js +41 -0
  806. package/dist/runnable/executor.js.map +1 -0
  807. package/dist/runnable/plugin.d.ts +3 -0
  808. package/dist/runnable/plugin.d.ts.map +1 -0
  809. package/dist/runnable/plugin.js +12 -0
  810. package/dist/runnable/plugin.js.map +1 -0
  811. package/dist/runnable/schemas.d.ts +28 -0
  812. package/dist/runnable/schemas.d.ts.map +1 -0
  813. package/dist/runnable/schemas.js +10 -0
  814. package/dist/runnable/schemas.js.map +1 -0
  815. package/dist/runtime-daemon-supervisor.descriptor.d.ts +16 -0
  816. package/dist/runtime-daemon-supervisor.descriptor.d.ts.map +1 -0
  817. package/dist/runtime-daemon-supervisor.descriptor.js +17 -0
  818. package/dist/runtime-daemon-supervisor.descriptor.js.map +1 -0
  819. package/dist/runtime-daemon-supervisor.impl.consumer.d.ts +22 -0
  820. package/dist/runtime-daemon-supervisor.impl.consumer.d.ts.map +1 -0
  821. package/dist/runtime-daemon-supervisor.impl.consumer.js +66 -0
  822. package/dist/runtime-daemon-supervisor.impl.consumer.js.map +1 -0
  823. package/dist/schemas/action-error.d.ts +8 -0
  824. package/dist/schemas/action-error.d.ts.map +1 -0
  825. package/dist/schemas/action-error.js +8 -0
  826. package/dist/schemas/action-error.js.map +1 -0
  827. package/dist/schemas/admission.d.ts +36 -0
  828. package/dist/schemas/admission.d.ts.map +1 -0
  829. package/dist/schemas/admission.js +22 -0
  830. package/dist/schemas/admission.js.map +1 -0
  831. package/dist/schemas/builder.d.ts +402 -0
  832. package/dist/schemas/builder.d.ts.map +1 -0
  833. package/dist/schemas/builder.js +410 -0
  834. package/dist/schemas/builder.js.map +1 -0
  835. package/dist/schemas/client.d.ts +18 -0
  836. package/dist/schemas/client.d.ts.map +1 -0
  837. package/dist/schemas/client.js +2 -0
  838. package/dist/schemas/client.js.map +1 -0
  839. package/dist/schemas/commands.d.ts +315 -0
  840. package/dist/schemas/commands.d.ts.map +1 -0
  841. package/dist/schemas/commands.js +268 -0
  842. package/dist/schemas/commands.js.map +1 -0
  843. package/dist/schemas/common.d.ts +35 -0
  844. package/dist/schemas/common.d.ts.map +1 -0
  845. package/dist/schemas/common.js +43 -0
  846. package/dist/schemas/common.js.map +1 -0
  847. package/dist/schemas/daemon-command.d.ts +61 -0
  848. package/dist/schemas/daemon-command.d.ts.map +1 -0
  849. package/dist/schemas/daemon-command.js +2 -0
  850. package/dist/schemas/daemon-command.js.map +1 -0
  851. package/dist/schemas/daemon-host.d.ts +70 -0
  852. package/dist/schemas/daemon-host.d.ts.map +1 -0
  853. package/dist/schemas/daemon-host.js +2 -0
  854. package/dist/schemas/daemon-host.js.map +1 -0
  855. package/dist/schemas/daemon-launch.d.ts +43 -0
  856. package/dist/schemas/daemon-launch.d.ts.map +1 -0
  857. package/dist/schemas/daemon-launch.js +3 -0
  858. package/dist/schemas/daemon-launch.js.map +1 -0
  859. package/dist/schemas/daemon.d.ts +98 -0
  860. package/dist/schemas/daemon.d.ts.map +1 -0
  861. package/dist/schemas/daemon.js +88 -0
  862. package/dist/schemas/daemon.js.map +1 -0
  863. package/dist/schemas/dev.d.ts +169 -0
  864. package/dist/schemas/dev.d.ts.map +1 -0
  865. package/dist/schemas/dev.js +8 -0
  866. package/dist/schemas/dev.js.map +1 -0
  867. package/dist/schemas/executable-freshness.d.ts +88 -0
  868. package/dist/schemas/executable-freshness.d.ts.map +1 -0
  869. package/dist/schemas/executable-freshness.js +2 -0
  870. package/dist/schemas/executable-freshness.js.map +1 -0
  871. package/dist/schemas/forward-config.d.ts +11 -0
  872. package/dist/schemas/forward-config.d.ts.map +1 -0
  873. package/dist/schemas/forward-config.js +15 -0
  874. package/dist/schemas/forward-config.js.map +1 -0
  875. package/dist/schemas/graph.d.ts +444 -0
  876. package/dist/schemas/graph.d.ts.map +1 -0
  877. package/dist/schemas/graph.js +59 -0
  878. package/dist/schemas/graph.js.map +1 -0
  879. package/dist/schemas/health.d.ts +43 -0
  880. package/dist/schemas/health.d.ts.map +1 -0
  881. package/dist/schemas/health.js +6 -0
  882. package/dist/schemas/health.js.map +1 -0
  883. package/dist/schemas/launch-preparation.d.ts +106 -0
  884. package/dist/schemas/launch-preparation.d.ts.map +1 -0
  885. package/dist/schemas/launch-preparation.js +50 -0
  886. package/dist/schemas/launch-preparation.js.map +1 -0
  887. package/dist/schemas/liveness-profile.d.ts +108 -0
  888. package/dist/schemas/liveness-profile.d.ts.map +1 -0
  889. package/dist/schemas/liveness-profile.js +33 -0
  890. package/dist/schemas/liveness-profile.js.map +1 -0
  891. package/dist/schemas/liveness.d.ts +37 -0
  892. package/dist/schemas/liveness.d.ts.map +1 -0
  893. package/dist/schemas/liveness.js +41 -0
  894. package/dist/schemas/liveness.js.map +1 -0
  895. package/dist/schemas/manager.d.ts +46 -0
  896. package/dist/schemas/manager.d.ts.map +1 -0
  897. package/dist/schemas/manager.js +5 -0
  898. package/dist/schemas/manager.js.map +1 -0
  899. package/dist/schemas/port-forward.d.ts +47 -0
  900. package/dist/schemas/port-forward.d.ts.map +1 -0
  901. package/dist/schemas/port-forward.js +27 -0
  902. package/dist/schemas/port-forward.js.map +1 -0
  903. package/dist/schemas/process-source.d.ts +354 -0
  904. package/dist/schemas/process-source.d.ts.map +1 -0
  905. package/dist/schemas/process-source.js +19 -0
  906. package/dist/schemas/process-source.js.map +1 -0
  907. package/dist/schemas/process-tree.d.ts +12 -0
  908. package/dist/schemas/process-tree.d.ts.map +1 -0
  909. package/dist/schemas/process-tree.js +2 -0
  910. package/dist/schemas/process-tree.js.map +1 -0
  911. package/dist/schemas/process.d.ts +944 -0
  912. package/dist/schemas/process.d.ts.map +1 -0
  913. package/dist/schemas/process.js +429 -0
  914. package/dist/schemas/process.js.map +1 -0
  915. package/dist/schemas/resource.d.ts +223 -0
  916. package/dist/schemas/resource.d.ts.map +1 -0
  917. package/dist/schemas/resource.js +92 -0
  918. package/dist/schemas/resource.js.map +1 -0
  919. package/dist/schemas/store.d.ts +97 -0
  920. package/dist/schemas/store.d.ts.map +1 -0
  921. package/dist/schemas/store.js +2 -0
  922. package/dist/schemas/store.js.map +1 -0
  923. package/dist/schemas/task-supervision.d.ts +16 -0
  924. package/dist/schemas/task-supervision.d.ts.map +1 -0
  925. package/dist/schemas/task-supervision.js +10 -0
  926. package/dist/schemas/task-supervision.js.map +1 -0
  927. package/dist/schemas/tui-state.d.ts +777 -0
  928. package/dist/schemas/tui-state.d.ts.map +1 -0
  929. package/dist/schemas/tui-state.js +119 -0
  930. package/dist/schemas/tui-state.js.map +1 -0
  931. package/dist/schemas/worker-manager.d.ts +19 -0
  932. package/dist/schemas/worker-manager.d.ts.map +1 -0
  933. package/dist/schemas/worker-manager.js +2 -0
  934. package/dist/schemas/worker-manager.js.map +1 -0
  935. package/dist/services/cleanup.d.ts +78 -0
  936. package/dist/services/cleanup.d.ts.map +1 -0
  937. package/dist/services/cleanup.js +329 -0
  938. package/dist/services/cleanup.js.map +1 -0
  939. package/dist/services/health.d.ts +81 -0
  940. package/dist/services/health.d.ts.map +1 -0
  941. package/dist/services/health.js +435 -0
  942. package/dist/services/health.js.map +1 -0
  943. package/dist/services/index.d.ts +11 -0
  944. package/dist/services/index.d.ts.map +1 -0
  945. package/dist/services/index.js +10 -0
  946. package/dist/services/index.js.map +1 -0
  947. package/dist/services/lifecycle.d.ts +238 -0
  948. package/dist/services/lifecycle.d.ts.map +1 -0
  949. package/dist/services/lifecycle.js +1391 -0
  950. package/dist/services/lifecycle.js.map +1 -0
  951. package/dist/services/liveness-state.d.ts +95 -0
  952. package/dist/services/liveness-state.d.ts.map +1 -0
  953. package/dist/services/liveness-state.js +239 -0
  954. package/dist/services/liveness-state.js.map +1 -0
  955. package/dist/services/orphans.d.ts +72 -0
  956. package/dist/services/orphans.d.ts.map +1 -0
  957. package/dist/services/orphans.js +185 -0
  958. package/dist/services/orphans.js.map +1 -0
  959. package/dist/services/process-command.d.ts +25 -0
  960. package/dist/services/process-command.d.ts.map +1 -0
  961. package/dist/services/process-command.js +36 -0
  962. package/dist/services/process-command.js.map +1 -0
  963. package/dist/services/process-log-archive.d.ts +62 -0
  964. package/dist/services/process-log-archive.d.ts.map +1 -0
  965. package/dist/services/process-log-archive.js +150 -0
  966. package/dist/services/process-log-archive.js.map +1 -0
  967. package/dist/services/run-log-frames.d.ts +26 -0
  968. package/dist/services/run-log-frames.d.ts.map +1 -0
  969. package/dist/services/run-log-frames.js +45 -0
  970. package/dist/services/run-log-frames.js.map +1 -0
  971. package/dist/services/startup-warmup.d.ts +23 -0
  972. package/dist/services/startup-warmup.d.ts.map +1 -0
  973. package/dist/services/startup-warmup.js +21 -0
  974. package/dist/services/startup-warmup.js.map +1 -0
  975. package/dist/services/state-wait.d.ts +28 -0
  976. package/dist/services/state-wait.d.ts.map +1 -0
  977. package/dist/services/state-wait.js +57 -0
  978. package/dist/services/state-wait.js.map +1 -0
  979. package/dist/services/supervision-policy.d.ts +40 -0
  980. package/dist/services/supervision-policy.d.ts.map +1 -0
  981. package/dist/services/supervision-policy.js +48 -0
  982. package/dist/services/supervision-policy.js.map +1 -0
  983. package/dist/services/task-supervision.d.ts +14 -0
  984. package/dist/services/task-supervision.d.ts.map +1 -0
  985. package/dist/services/task-supervision.js +112 -0
  986. package/dist/services/task-supervision.js.map +1 -0
  987. package/dist/services/types/index.d.ts +74 -0
  988. package/dist/services/types/index.d.ts.map +1 -0
  989. package/dist/services/types/index.js +11 -0
  990. package/dist/services/types/index.js.map +1 -0
  991. package/dist/services/workers.d.ts +75 -0
  992. package/dist/services/workers.d.ts.map +1 -0
  993. package/dist/services/workers.js +212 -0
  994. package/dist/services/workers.js.map +1 -0
  995. package/dist/storage/workspaces.descriptor.d.ts +12 -0
  996. package/dist/storage/workspaces.descriptor.d.ts.map +1 -0
  997. package/dist/storage/workspaces.descriptor.js +33 -0
  998. package/dist/storage/workspaces.descriptor.js.map +1 -0
  999. package/dist/store/process-admission.d.ts +11 -0
  1000. package/dist/store/process-admission.d.ts.map +1 -0
  1001. package/dist/store/process-admission.js +46 -0
  1002. package/dist/store/process-admission.js.map +1 -0
  1003. package/dist/store/process-config.impl.consumer.d.ts +22 -0
  1004. package/dist/store/process-config.impl.consumer.d.ts.map +1 -0
  1005. package/dist/store/process-config.impl.consumer.js +84 -0
  1006. package/dist/store/process-config.impl.consumer.js.map +1 -0
  1007. package/dist/store/process-state.impl.consumer.d.ts +25 -0
  1008. package/dist/store/process-state.impl.consumer.d.ts.map +1 -0
  1009. package/dist/store/process-state.impl.consumer.js +140 -0
  1010. package/dist/store/process-state.impl.consumer.js.map +1 -0
  1011. package/dist/store/resource-state.impl.consumer.d.ts +9 -0
  1012. package/dist/store/resource-state.impl.consumer.d.ts.map +1 -0
  1013. package/dist/store/resource-state.impl.consumer.js +48 -0
  1014. package/dist/store/resource-state.impl.consumer.js.map +1 -0
  1015. package/dist/store.impl.consumer.d.ts +121 -0
  1016. package/dist/store.impl.consumer.d.ts.map +1 -0
  1017. package/dist/store.impl.consumer.js +436 -0
  1018. package/dist/store.impl.consumer.js.map +1 -0
  1019. package/dist/surface.d.ts +93 -0
  1020. package/dist/surface.d.ts.map +1 -0
  1021. package/dist/surface.js +153 -0
  1022. package/dist/surface.js.map +1 -0
  1023. package/dist/svelte/components/PMOverview.svelte +527 -0
  1024. package/dist/svelte/components/PMOverview.svelte.d.ts +12 -0
  1025. package/dist/svelte/components/PMOverview.svelte.d.ts.map +1 -0
  1026. package/dist/svelte/index.d.ts +4 -0
  1027. package/dist/svelte/index.d.ts.map +1 -0
  1028. package/dist/svelte/index.js +2 -0
  1029. package/dist/svelte/runtime.d.ts +33 -0
  1030. package/dist/svelte/runtime.d.ts.map +1 -0
  1031. package/dist/svelte/runtime.js +148 -0
  1032. package/dist/svelte/styles.css +2 -0
  1033. package/dist/tasks/completion.d.ts +6 -0
  1034. package/dist/tasks/completion.d.ts.map +1 -0
  1035. package/dist/tasks/completion.js +105 -0
  1036. package/dist/tasks/completion.js.map +1 -0
  1037. package/dist/tasks/index.d.ts +11 -0
  1038. package/dist/tasks/index.d.ts.map +1 -0
  1039. package/dist/tasks/index.js +11 -0
  1040. package/dist/tasks/index.js.map +1 -0
  1041. package/dist/tasks/launch.d.ts +196 -0
  1042. package/dist/tasks/launch.d.ts.map +1 -0
  1043. package/dist/tasks/launch.js +10 -0
  1044. package/dist/tasks/launch.js.map +1 -0
  1045. package/dist/tasks/run-task.d.ts +11 -0
  1046. package/dist/tasks/run-task.d.ts.map +1 -0
  1047. package/dist/tasks/run-task.js +144 -0
  1048. package/dist/tasks/run-task.js.map +1 -0
  1049. package/dist/tasks/schemas.d.ts +83 -0
  1050. package/dist/tasks/schemas.d.ts.map +1 -0
  1051. package/dist/tasks/schemas.js +67 -0
  1052. package/dist/tasks/schemas.js.map +1 -0
  1053. package/dist/testing/daemon.d.ts +64 -0
  1054. package/dist/testing/daemon.d.ts.map +1 -0
  1055. package/dist/testing/daemon.js +125 -0
  1056. package/dist/testing/daemon.js.map +1 -0
  1057. package/dist/tui/components/DaemonHealthCard.d.ts +22 -0
  1058. package/dist/tui/components/DaemonHealthCard.d.ts.map +1 -0
  1059. package/dist/tui/components/DaemonHealthCard.js +30 -0
  1060. package/dist/tui/components/DaemonHealthCard.js.map +1 -0
  1061. package/dist/tui/components/ErrorDetailsPanel.d.ts +16 -0
  1062. package/dist/tui/components/ErrorDetailsPanel.d.ts.map +1 -0
  1063. package/dist/tui/components/ErrorDetailsPanel.js +22 -0
  1064. package/dist/tui/components/ErrorDetailsPanel.js.map +1 -0
  1065. package/dist/tui/components/FilterBar.d.ts +21 -0
  1066. package/dist/tui/components/FilterBar.d.ts.map +1 -0
  1067. package/dist/tui/components/FilterBar.js +31 -0
  1068. package/dist/tui/components/FilterBar.js.map +1 -0
  1069. package/dist/tui/components/StatsBar.d.ts +17 -0
  1070. package/dist/tui/components/StatsBar.d.ts.map +1 -0
  1071. package/dist/tui/components/StatsBar.js +28 -0
  1072. package/dist/tui/components/StatsBar.js.map +1 -0
  1073. package/dist/tui/components/index.d.ts +5 -0
  1074. package/dist/tui/components/index.d.ts.map +1 -0
  1075. package/dist/tui/components/index.js +5 -0
  1076. package/dist/tui/components/index.js.map +1 -0
  1077. package/dist/tui/index.d.ts +7 -0
  1078. package/dist/tui/index.d.ts.map +1 -0
  1079. package/dist/tui/index.js +7 -0
  1080. package/dist/tui/index.js.map +1 -0
  1081. package/dist/tui/pm-dashboard.descriptor.d.ts +11 -0
  1082. package/dist/tui/pm-dashboard.descriptor.d.ts.map +1 -0
  1083. package/dist/tui/pm-dashboard.descriptor.js +26 -0
  1084. package/dist/tui/pm-dashboard.descriptor.js.map +1 -0
  1085. package/dist/tui/pm-dashboard.impl.consumer.d.ts +19 -0
  1086. package/dist/tui/pm-dashboard.impl.consumer.d.ts.map +1 -0
  1087. package/dist/tui/pm-dashboard.impl.consumer.js +839 -0
  1088. package/dist/tui/pm-dashboard.impl.consumer.js.map +1 -0
  1089. package/dist/tui/pm-open.descriptor.d.ts +10 -0
  1090. package/dist/tui/pm-open.descriptor.d.ts.map +1 -0
  1091. package/dist/tui/pm-open.descriptor.js +21 -0
  1092. package/dist/tui/pm-open.descriptor.js.map +1 -0
  1093. package/dist/tui/pm-open.impl.consumer.d.ts +9 -0
  1094. package/dist/tui/pm-open.impl.consumer.d.ts.map +1 -0
  1095. package/dist/tui/pm-open.impl.consumer.js +13 -0
  1096. package/dist/tui/pm-open.impl.consumer.js.map +1 -0
  1097. package/dist/tui/pm-processes.descriptor.d.ts +12 -0
  1098. package/dist/tui/pm-processes.descriptor.d.ts.map +1 -0
  1099. package/dist/tui/pm-processes.descriptor.js +30 -0
  1100. package/dist/tui/pm-processes.descriptor.js.map +1 -0
  1101. package/dist/tui/pm-processes.impl.consumer.d.ts +14 -0
  1102. package/dist/tui/pm-processes.impl.consumer.d.ts.map +1 -0
  1103. package/dist/tui/pm-processes.impl.consumer.js +214 -0
  1104. package/dist/tui/pm-processes.impl.consumer.js.map +1 -0
  1105. package/dist/tui/pm-state-keys.d.ts +316 -0
  1106. package/dist/tui/pm-state-keys.d.ts.map +1 -0
  1107. package/dist/tui/pm-state-keys.js +10 -0
  1108. package/dist/tui/pm-state-keys.js.map +1 -0
  1109. package/dist/tui/pm-status.descriptor.d.ts +11 -0
  1110. package/dist/tui/pm-status.descriptor.d.ts.map +1 -0
  1111. package/dist/tui/pm-status.descriptor.js +29 -0
  1112. package/dist/tui/pm-status.descriptor.js.map +1 -0
  1113. package/dist/tui/pm-status.impl.consumer.d.ts +11 -0
  1114. package/dist/tui/pm-status.impl.consumer.d.ts.map +1 -0
  1115. package/dist/tui/pm-status.impl.consumer.js +75 -0
  1116. package/dist/tui/pm-status.impl.consumer.js.map +1 -0
  1117. package/dist/tui/pm-tui.plugin.d.ts +13 -0
  1118. package/dist/tui/pm-tui.plugin.d.ts.map +1 -0
  1119. package/dist/tui/pm-tui.plugin.js +34 -0
  1120. package/dist/tui/pm-tui.plugin.js.map +1 -0
  1121. package/dist/utils/attempt.d.ts +31 -0
  1122. package/dist/utils/attempt.d.ts.map +1 -0
  1123. package/dist/utils/attempt.js +43 -0
  1124. package/dist/utils/attempt.js.map +1 -0
  1125. package/dist/utils/bounded-wait.d.ts +31 -0
  1126. package/dist/utils/bounded-wait.d.ts.map +1 -0
  1127. package/dist/utils/bounded-wait.js +35 -0
  1128. package/dist/utils/bounded-wait.js.map +1 -0
  1129. package/dist/utils/command-exists.d.ts +5 -0
  1130. package/dist/utils/command-exists.d.ts.map +1 -0
  1131. package/dist/utils/command-exists.js +8 -0
  1132. package/dist/utils/command-exists.js.map +1 -0
  1133. package/dist/utils/daemon-launch-lock.d.ts +143 -0
  1134. package/dist/utils/daemon-launch-lock.d.ts.map +1 -0
  1135. package/dist/utils/daemon-launch-lock.js +420 -0
  1136. package/dist/utils/daemon-launch-lock.js.map +1 -0
  1137. package/dist/utils/daemon-launch-recovery.d.ts +82 -0
  1138. package/dist/utils/daemon-launch-recovery.d.ts.map +1 -0
  1139. package/dist/utils/daemon-launch-recovery.js +173 -0
  1140. package/dist/utils/daemon-launch-recovery.js.map +1 -0
  1141. package/dist/utils/daemon-log-follower.d.ts +41 -0
  1142. package/dist/utils/daemon-log-follower.d.ts.map +1 -0
  1143. package/dist/utils/daemon-log-follower.js +124 -0
  1144. package/dist/utils/daemon-log-follower.js.map +1 -0
  1145. package/dist/utils/daemon-pid.d.ts +42 -0
  1146. package/dist/utils/daemon-pid.d.ts.map +1 -0
  1147. package/dist/utils/daemon-pid.js +80 -0
  1148. package/dist/utils/daemon-pid.js.map +1 -0
  1149. package/dist/utils/daemon-reachability.d.ts +87 -0
  1150. package/dist/utils/daemon-reachability.d.ts.map +1 -0
  1151. package/dist/utils/daemon-reachability.js +131 -0
  1152. package/dist/utils/daemon-reachability.js.map +1 -0
  1153. package/dist/utils/daemon-stdio-timestamps.d.ts +24 -0
  1154. package/dist/utils/daemon-stdio-timestamps.d.ts.map +1 -0
  1155. package/dist/utils/daemon-stdio-timestamps.js +59 -0
  1156. package/dist/utils/daemon-stdio-timestamps.js.map +1 -0
  1157. package/dist/utils/daemon-stop.d.ts +66 -0
  1158. package/dist/utils/daemon-stop.d.ts.map +1 -0
  1159. package/dist/utils/daemon-stop.js +100 -0
  1160. package/dist/utils/daemon-stop.js.map +1 -0
  1161. package/dist/utils/errno-failure.d.ts +16 -0
  1162. package/dist/utils/errno-failure.d.ts.map +1 -0
  1163. package/dist/utils/errno-failure.js +15 -0
  1164. package/dist/utils/errno-failure.js.map +1 -0
  1165. package/dist/utils/exec.d.ts +27 -0
  1166. package/dist/utils/exec.d.ts.map +1 -0
  1167. package/dist/utils/exec.js +36 -0
  1168. package/dist/utils/exec.js.map +1 -0
  1169. package/dist/utils/index.d.ts +5 -0
  1170. package/dist/utils/index.d.ts.map +1 -0
  1171. package/dist/utils/index.js +5 -0
  1172. package/dist/utils/index.js.map +1 -0
  1173. package/dist/utils/liveness.d.ts +100 -0
  1174. package/dist/utils/liveness.d.ts.map +1 -0
  1175. package/dist/utils/liveness.js +225 -0
  1176. package/dist/utils/liveness.js.map +1 -0
  1177. package/dist/utils/logging.d.ts +60 -0
  1178. package/dist/utils/logging.d.ts.map +1 -0
  1179. package/dist/utils/logging.js +169 -0
  1180. package/dist/utils/logging.js.map +1 -0
  1181. package/dist/utils/path-under.d.ts +15 -0
  1182. package/dist/utils/path-under.d.ts.map +1 -0
  1183. package/dist/utils/path-under.js +16 -0
  1184. package/dist/utils/path-under.js.map +1 -0
  1185. package/dist/utils/port-ownership.d.ts +160 -0
  1186. package/dist/utils/port-ownership.d.ts.map +1 -0
  1187. package/dist/utils/port-ownership.js +176 -0
  1188. package/dist/utils/port-ownership.js.map +1 -0
  1189. package/dist/utils/ports.d.ts +43 -0
  1190. package/dist/utils/ports.d.ts.map +1 -0
  1191. package/dist/utils/ports.js +200 -0
  1192. package/dist/utils/ports.js.map +1 -0
  1193. package/dist/utils/process-tree.d.ts +33 -0
  1194. package/dist/utils/process-tree.d.ts.map +1 -0
  1195. package/dist/utils/process-tree.js +197 -0
  1196. package/dist/utils/process-tree.js.map +1 -0
  1197. package/dist/utils/semaphore.d.ts +16 -0
  1198. package/dist/utils/semaphore.d.ts.map +1 -0
  1199. package/dist/utils/semaphore.js +30 -0
  1200. package/dist/utils/semaphore.js.map +1 -0
  1201. package/dist/utils/socket-inode.impl.consumer.d.ts +26 -0
  1202. package/dist/utils/socket-inode.impl.consumer.d.ts.map +1 -0
  1203. package/dist/utils/socket-inode.impl.consumer.js +30 -0
  1204. package/dist/utils/socket-inode.impl.consumer.js.map +1 -0
  1205. package/dist/utils/socket-paths.d.ts +121 -0
  1206. package/dist/utils/socket-paths.d.ts.map +1 -0
  1207. package/dist/utils/socket-paths.js +167 -0
  1208. package/dist/utils/socket-paths.js.map +1 -0
  1209. package/dist/utils/socket.d.ts +65 -0
  1210. package/dist/utils/socket.d.ts.map +1 -0
  1211. package/dist/utils/socket.js +87 -0
  1212. package/dist/utils/socket.js.map +1 -0
  1213. package/dist/utils/version.d.ts +40 -0
  1214. package/dist/utils/version.d.ts.map +1 -0
  1215. package/dist/utils/version.js +65 -0
  1216. package/dist/utils/version.js.map +1 -0
  1217. package/dist/utils/vibes-home.d.ts +34 -0
  1218. package/dist/utils/vibes-home.d.ts.map +1 -0
  1219. package/dist/utils/vibes-home.js +27 -0
  1220. package/dist/utils/vibes-home.js.map +1 -0
  1221. package/dist/workspace-runtime.d.ts +38 -0
  1222. package/dist/workspace-runtime.d.ts.map +1 -0
  1223. package/dist/workspace-runtime.js +176 -0
  1224. package/dist/workspace-runtime.js.map +1 -0
  1225. package/package.json +465 -4
package/dist/client.js ADDED
@@ -0,0 +1,1005 @@
1
+ /**
2
+ * PM Client
3
+ * Connects to PM daemon via the runtime-rpc-unix three-verb protocol
4
+ * (connectUnix + wireConsumer). The legacy HTTP-over-unix `pm-command` wire
5
+ * is gone; `rpc()` now routes through the RPC root the PM daemon exposes via
6
+ * `listenUnix`.
7
+ *
8
+ * Dates cross the wire as ISO strings, which are JSON-safe. The blanket
9
+ * dateReviver is still gone, but "parsed by callers that need Date objects"
10
+ * was not a workable contract: the methods below advertise `Date`-typed
11
+ * fields, nothing enforced that a caller parse them, and the first one that
12
+ * did not took a shipping command down (`vibes pm resource list` →
13
+ * "e.getTime is not a function", mid-table). So each reply is revived where
14
+ * its own shape is known — see `reviveResourceStatusDates` /
15
+ * `reviveResourceStateDates` — and the advertised type is the received type.
16
+ * Methods that return raw JSON keep returning raw JSON.
17
+ */
18
+ import { getPathRoots, getRuntimePath } from '@vibesdotdev/paths';
19
+ import * as z from 'zod/v4';
20
+ import { BaseRuntimeClient } from '@vibesdotdev/kernel/client';
21
+ import { runPmTaskOnClient } from "./tasks/run-task.js";
22
+ import { AWAIT_EXIT_MAX_MS, AwaitExitOptionsSchema, pmTaskProcessIdentityOf } from "./schemas/process.js";
23
+ import { DaemonShutdownReceiptSchema, DaemonHandoffReceiptSchema } from "./schemas/daemon.js";
24
+ import { getPMSocketPath } from "./utils/socket-paths.js";
25
+ import { getDaemonLaunchLockPath, guardDaemonLaunchChild, getPMDaemonLaunchLockTimeoutMs, isLaunchLockTimeoutError, LAUNCH_LOCK_TIMEOUT_REASON, readDaemonLaunchLockState, resolvePMDaemonStartTimeoutMs, withDaemonLaunchLock } from "./utils/daemon-launch-lock.js";
26
+ import { bestEffortRecoverOrphanedGuard, describeRecoveryRefusal, tryRecoverOrphanedLaunchGuard } from "./utils/daemon-launch-recovery.js";
27
+ import { getDaemonPidPath } from "./utils/daemon-pid.js";
28
+ import { CapabilityError, CaughtFailureSchema, getRuntimeHostCommands, isCapabilityError } from '@vibesdotdev/kernel';
29
+ import { connectUnix } from '@vibesdotdev/kernel-rpc/unix';
30
+ import { wireConsumer, asRefId, RPC_ERROR } from '@vibesdotdev/kernel-rpc';
31
+ import { createWorkerRuntimeRequest } from "./helpers/worker-routing.js";
32
+ import { admittedWorkspaceIdentity, requireAdmittedWorkspace } from "./admission.js";
33
+ import { composePMHostEnv } from "./helpers/process-env.js";
34
+ import { isWaitTimeout, pollUntil } from "./utils/bounded-wait.js";
35
+ import { PM_COMMAND_IDS } from "./daemon/command-ids.js";
36
+ import { spawnDetachedDaemon } from "./cli/daemon-launch-child.js";
37
+ import { removeSocket } from "./utils/socket.js";
38
+ import { pmFileSystem } from "./helpers/runtime-files.js";
39
+ import { attempt, attemptSync, failureLabel, failureText } from "./utils/attempt.js";
40
+ import { hasErrno, rethrowFailure } from "./helpers/failure.js";
41
+ import { AwaitExitReplySchema, SupervisedAdmissionReplySchema, SupervisedAcknowledgementReplySchema, ConfigReplySchema, ConfigsReplySchema, HealthReplySchema, IsRunningReplySchema, LivenessGetReplySchema, LivenessSetReplySchema, LogsReplySchema, LogsSinceReplySchema, OptionalProcessStateReplySchema, PresetStartReplySchema, PresetStopReplySchema, ProcessStateReplySchema, ProcessStatesReplySchema, ReconcileReplySchema, ResourceSetupReplySchema, ResourceStalenessReplySchema, ResourceStateReplySchema, ResourceStatesReplySchema, ResourceStatusReplySchema, RpcFailureSchema, RpcSuccessSchema, SocketStatusReplySchema, StartAllReplySchema, StartDeclaredReplySchema, UnregisterReplySchema, WorkersReadyReplySchema, parseReply } from "./client-replies.js";
42
+ import { formatPMError, getPMDaemonLogger, getPMDaemonStderrLogPath, getPMDaemonStdoutLogPath } from "./utils/logging.js";
43
+ /** Default timeout for RPC calls (60 seconds) */
44
+ const DEFAULT_TIMEOUT_MS = 60000;
45
+ /** How far an `await-exit` RPC's own deadline runs past the daemon's wait, as for a waited start. */
46
+ const AWAIT_EXIT_RPC_MARGIN_MS = 5_000;
47
+ /** The `await-exit` failure a lost daemon means: the run's exit could not be observed. */
48
+ function awaitExitInterrupted(processId, cause) {
49
+ return new CapabilityError(`The PM daemon went away while awaiting '${processId}', and no daemon answered again.`, 'UNAVAILABLE', {
50
+ reason: 'pm-await-exit-interrupted',
51
+ retryable: true,
52
+ details: { processId },
53
+ cause
54
+ });
55
+ }
56
+ /**
57
+ * A dropped connection as `rpc()` surfaces it: the wire's `RPC_DISCONNECTED`
58
+ * failure, or, when the transport rejected with the bare envelope, the typed
59
+ * `pm-rpc-failed` that carries its code.
60
+ */
61
+ const ConnectionLostSchema = z.union([
62
+ z.object({ code: z.literal(RPC_ERROR.DISCONNECTED) }),
63
+ z.object({ reason: z.literal('pm-rpc-failed'), details: z.object({ code: z.literal(RPC_ERROR.DISCONNECTED) }) })
64
+ ]);
65
+ const NotAdvertisedSchema = z.object({ code: z.literal(RPC_ERROR.NOT_ADVERTISED) });
66
+ const ShutdownInterruptSchema = z.object({ outcome: z.literal('interrupted'), cause: z.literal('shutdown') });
67
+ /** An await-exit reply its daemon sent while shutting down: the call holds its connection until that daemon closes it. */
68
+ function isShutdownInterrupt(reply) {
69
+ return ShutdownInterruptSchema.safeParse(reply).success;
70
+ }
71
+ /** Whether an RPC failed because its connection closed before a reply (`RPC_DISCONNECTED`): the daemon left mid-call. */
72
+ function isConnectionLost(failure) {
73
+ return failure instanceof Error && ConnectionLostSchema.safeParse(failure).success;
74
+ }
75
+ /**
76
+ * The disk-I/O message with its target named: SQLite surfaces bare "disk I/O
77
+ * error" / SQLITE_IOERR with no target. Callers (ai ask, pm status, TUI)
78
+ * previously printed those three words as if the *client* disk had failed.
79
+ * Point at the PM daemon store + recovery. A message that is not a disk-I/O
80
+ * failure, or already names the daemon, is returned as it is.
81
+ */
82
+ function localizeDaemonDiskIoMessage(message) {
83
+ const lower = message.toLowerCase();
84
+ if (lower.includes('disk i/o error') ||
85
+ lower.includes('sqlite_ioerr') ||
86
+ lower.includes('disk i/o')) {
87
+ if (lower.includes('pm daemon') || lower.includes('vibes pm')) {
88
+ return message;
89
+ }
90
+ return (`PM daemon store I/O failure: ${message}. ` +
91
+ `Usually disk pressure or a stale daemon SQLite handle. ` +
92
+ `Check free space (df -h), then: vibes pm daemon restart. ` +
93
+ `If status still fails: vibes pm daemon stop && vibes pm daemon start.`);
94
+ }
95
+ return message;
96
+ }
97
+ /** A failure the wire threw as a plain value: its `message` or `error` text, and its `code`. */
98
+ const WireFailureSchema = z.object({
99
+ message: z.string().min(1).optional(),
100
+ error: z.string().min(1).optional(),
101
+ code: z.string().min(1).optional()
102
+ });
103
+ /**
104
+ * An RPC failure as the caller sees it: the typed failure itself, or the same
105
+ * failure with the disk-I/O message localized (its code, reason and cause
106
+ * kept); a failure the wire threw as a plain value becomes a typed
107
+ * `INTERNAL pm-rpc-failed`.
108
+ */
109
+ function normalizeRpcFailure(failure) {
110
+ if (failure instanceof Error) {
111
+ const localized = localizeDaemonDiskIoMessage(failure.message);
112
+ if (localized === failure.message)
113
+ return failure;
114
+ const typed = CapabilityError.from(failure);
115
+ return new CapabilityError(localized, typed.code, {
116
+ reason: typed.reason,
117
+ retryable: typed.retryable,
118
+ recoveryHint: typed.recoveryHint,
119
+ details: typed.details,
120
+ cause: failure
121
+ });
122
+ }
123
+ const wire = WireFailureSchema.safeParse(failure.value);
124
+ const message = wire.success ? (wire.data.message ?? wire.data.error) : undefined;
125
+ return new CapabilityError(localizeDaemonDiskIoMessage(message ?? failure.description), 'INTERNAL', {
126
+ reason: 'pm-rpc-failed',
127
+ details: wire.success && wire.data.code ? { code: wire.data.code } : undefined,
128
+ cause: failure
129
+ });
130
+ }
131
+ /** A failure's cause; none when it has none, or when reading it throws (a hostile getter). */
132
+ function causeOf(failure) {
133
+ if (!(failure instanceof Error))
134
+ return undefined;
135
+ const read = attemptSync(() => failure.cause);
136
+ return read.ok && read.value !== undefined ? CaughtFailureSchema.parse(read.value) : undefined;
137
+ }
138
+ /**
139
+ * The confirmed-absence outcome of a daemon call: no daemon is listening at
140
+ * the socket. That is the transport's typed `UNAVAILABLE socket-unreachable`
141
+ * (an absent socket or a refused connect), or the raw errno it types
142
+ * (`ENOENT`, `ECONNREFUSED`) on an error or its cause. A message that merely
143
+ * mentions a code is not absence: a daemon relaying an `ENOENT` of its own
144
+ * answered, and that failure propagates.
145
+ */
146
+ export function isDaemonUnavailableError(failure) {
147
+ let current = failure;
148
+ for (let depth = 0; current !== undefined && depth < 4; depth++) {
149
+ if (isCapabilityError(current))
150
+ return current.reason === 'socket-unreachable';
151
+ // Reading a hostile value (a throwing getter, a revoked Proxy) is not absence.
152
+ const holder = current instanceof Error ? current : current.value;
153
+ const read = attemptSync(() => ErrnoCodeSchema.safeParse(holder));
154
+ if (read.ok && read.value.success && (read.value.data.code === 'ENOENT' || read.value.data.code === 'ECONNREFUSED'))
155
+ return true;
156
+ current = causeOf(current);
157
+ }
158
+ return false;
159
+ }
160
+ const ErrnoCodeSchema = z.object({ code: z.string() });
161
+ function rpcTimeoutForStart(options) {
162
+ if (!options?.wait)
163
+ return DEFAULT_TIMEOUT_MS;
164
+ const requested = options.timeout ?? DEFAULT_TIMEOUT_MS;
165
+ return Math.max(DEFAULT_TIMEOUT_MS, requested + 5_000);
166
+ }
167
+ function rpcTimeoutForPreset(options, fallbackMs) {
168
+ if (!options?.wait)
169
+ return fallbackMs;
170
+ const requested = options.timeout ?? DEFAULT_TIMEOUT_MS;
171
+ return Math.max(DEFAULT_TIMEOUT_MS, requested + 5_000);
172
+ }
173
+ export class PMClient extends BaseRuntimeClient {
174
+ /** Explicit, or computed from the admitted workspace on first use (see resolveSocketPath). */
175
+ socketPath;
176
+ usesDefaultSocket;
177
+ autoStartDaemon;
178
+ /**
179
+ * The workspace this client's daemon supervises: the explicit root, else
180
+ * the admitted workspace (framework-M8) of the runtime it resolves against,
181
+ * read on first use. Null until then.
182
+ */
183
+ workspaceIdentity;
184
+ /** The runtime the caller handed in: its admission names the daemon and its roots place every PM path. */
185
+ /** The roots every PM path joins under: injected, else `getPathRoots(runtime)`. */
186
+ roots;
187
+ /** Injected path mechanics (see constructor options.runtimePath); else resolved from `runtime` on first use. */
188
+ runtimePath;
189
+ constructor(socketPath, options, context) {
190
+ super({ id: 'pm', kind: 'runtime/client' }, context, options.runtime);
191
+ const explicitWorkspaceRoot = options.workspaceRoot?.trim();
192
+ this.workspaceIdentity = explicitWorkspaceRoot
193
+ ? admittedWorkspaceIdentity(explicitWorkspaceRoot)
194
+ : null;
195
+ this.usesDefaultSocket = !socketPath;
196
+ this.autoStartDaemon = options.autoStartDaemon ?? true;
197
+ this.roots = options.roots ?? getPathRoots(options.runtime);
198
+ this.runtimePath = options.runtimePath;
199
+ this.socketPath = socketPath || undefined;
200
+ }
201
+ /**
202
+ * The workspace this client's daemon supervises: the explicit root, else
203
+ * the admitted workspace of its runtime's binding. An unadmitted binding
204
+ * fails with `PERMISSION_DENIED` `workspace-not-admitted`, so nothing is
205
+ * ever started or addressed for a workspace PM was not admitted to.
206
+ */
207
+ async workspace() {
208
+ if (this.workspaceIdentity)
209
+ return this.workspaceIdentity;
210
+ const admitted = await requireAdmittedWorkspace(this.runtime);
211
+ this.workspaceIdentity = admittedWorkspaceIdentity(admitted.root);
212
+ return this.workspaceIdentity;
213
+ }
214
+ /** The daemon socket: explicit, or named by the admitted workspace on first use. */
215
+ async resolveSocketPath() {
216
+ if (this.socketPath === undefined) {
217
+ const workspace = await this.workspace();
218
+ this.socketPath = getPMSocketPath(workspace.workspacePath, {
219
+ roots: this.roots,
220
+ runtimePath: this.runtimePath ?? (await getRuntimePath(this.runtime))
221
+ });
222
+ }
223
+ return this.socketPath;
224
+ }
225
+ // Daemon Lifecycle Management
226
+ /**
227
+ * Check if daemon is running and reachable
228
+ */
229
+ async isDaemonRunning(timeoutMs) {
230
+ const { isDaemonReachable } = await import("./utils/daemon-reachability.js");
231
+ return isDaemonReachable(this.runtime, timeoutMs ?? 250, await this.resolveSocketPath());
232
+ }
233
+ /**
234
+ * Reads the current launch-lock without acquiring, reclaiming, or waiting
235
+ * on it, through the runtime's filesystem and process service, resolving
236
+ * the workspace first. Read-only status surfaces use this when no daemon
237
+ * is reachable.
238
+ */
239
+ async readDaemonLaunchLockState() {
240
+ const { toolingId } = await this.workspace();
241
+ return readDaemonLaunchLockState(this.runtime, getDaemonLaunchLockPath(toolingId, await this.pathOptions()));
242
+ }
243
+ /** The roots and path mechanics every PM path of this client joins under. */
244
+ async pathOptions() {
245
+ return { roots: this.roots, runtimePath: this.runtimePath ?? (await getRuntimePath(this.runtime)) };
246
+ }
247
+ /**
248
+ * Attempt to start the daemon
249
+ * @returns true if daemon started successfully or was already running
250
+ * @throws CapabilityError if the daemon fails to start
251
+ */
252
+ async attemptStartDaemon(options = {}) {
253
+ const { isDaemonReachable } = await import("./utils/daemon-reachability.js");
254
+ const { toolingId, workspacePath: workspaceRoot } = await this.workspace();
255
+ // Check if already running before acquiring lock
256
+ if (await isDaemonReachable(this.runtime, 1000, await this.resolveSocketPath())) {
257
+ return true;
258
+ }
259
+ // Use a lock file to serialize daemon launches
260
+ // This prevents multiple clients from spawning daemons simultaneously
261
+ const pathOptions = await this.pathOptions();
262
+ const lockFile = getDaemonLaunchLockPath(toolingId, pathOptions);
263
+ // C15: the daemon launch carries PM's base set and the host's re-entry
264
+ // facts and roots, from the handed runtime alone.
265
+ const daemonEnv = composePMHostEnv(this.runtime);
266
+ // Env knob read from the handed runtime's snapshot (RC04 moves it to a manifest key).
267
+ const startTimeoutMs = resolvePMDaemonStartTimeoutMs(this.runtime.getEnvSnapshot().VIBES_PM_DAEMON_START_TIMEOUT_MS);
268
+ const launch = async (lease) => {
269
+ // Double-check: maybe another process started it while we waited
270
+ if (await isDaemonReachable(this.runtime, 1000, await this.resolveSocketPath())) {
271
+ return true;
272
+ }
273
+ await this.cleanupStaleDaemonArtifacts();
274
+ // Launching this workspace's daemon never signals another workspace's
275
+ // (pm.md D3): strays are reported by `vibes pm daemon reconcile`.
276
+ if (await isDaemonReachable(this.runtime, 1000, await this.resolveSocketPath())) {
277
+ return true;
278
+ }
279
+ const stdoutPath = getPMDaemonStdoutLogPath(workspaceRoot, pathOptions);
280
+ const stderrPath = getPMDaemonStderrLogPath(workspaceRoot, pathOptions);
281
+ await (await pmFileSystem(this.runtime)).mkdir(pathOptions.runtimePath.dirname(stdoutPath), { recursive: true });
282
+ // Re-enter only through the handed runtime's declared host command
283
+ // shape (`runtime/host-command`; compiled and source hosts both declare
284
+ // it) or the embedding host's resolved argv. The launch's shape is
285
+ // `daemon-launch-child.ts`'s: a daemon launch, so PM is never this
286
+ // process's descendant, with `--detached` (stdout/stderr are the log
287
+ // files above, so serve's orphaned-stdio guard does not refuse under a
288
+ // non-TTY caller; without it every agent's `vibes pm daemon restart`
289
+ // stopped the daemon and failed to start one, measured 2026-08-28), the
290
+ // admitted root in argv (never an env var, rc02-rc03 §2.2) and
291
+ // RLIMIT_NOFILE raised for the whole tree the daemon spawns.
292
+ const hostArgv = options.selfSpawnArgv?.length
293
+ ? options.selfSpawnArgv
294
+ : (await getRuntimeHostCommands(this.runtime)).selfSpawnArgv('PM daemon');
295
+ lease.preserveOnFailure = true;
296
+ const spawned = await attempt(() => spawnDetachedDaemon(this.runtime, { hostArgv, workspaceRoot, env: daemonEnv, stdoutPath, stderrPath }));
297
+ if (!spawned.ok) {
298
+ // Rejection is not an exit receipt: the provider or supervision
299
+ // wrapper may fail after starting a child but before handing it over.
300
+ throw new CapabilityError('The daemon launch outcome is unknown; launch custody is retained', 'INTERNAL', {
301
+ reason: 'pm-daemon-launch-outcome-unknown', cause: spawned.failure,
302
+ recoveryHint: 'Inspect readDaemonLaunchLockState(). The originating owner may release the exact lease only after proving no child was started or observing its exit. Otherwise the next launch recovers the orphaned guard itself once its launcher is gone, or run `vibes pm daemon recover`.'
303
+ });
304
+ }
305
+ const proc = spawned.value;
306
+ const started = await attempt(async () => {
307
+ if (proc.pid === undefined) {
308
+ throw new CapabilityError('The daemon launch returned no child pid', 'INTERNAL', {
309
+ reason: 'pm-daemon-launch-no-pid',
310
+ details: { workspace: workspaceRoot }
311
+ });
312
+ }
313
+ await guardDaemonLaunchChild(lease, proc.pid);
314
+ const healthTimeoutMs = 1000;
315
+ // Wait for the daemon's socket to answer, bounded by the runtime
316
+ // lifecycle (RC07). Poll: the daemon (owner) publishes no
317
+ // cross-process readiness event; a child that exited ends the wait.
318
+ let exitedEarly = false;
319
+ const reachable = await pollUntil(this.runtime, async () => {
320
+ if (await isDaemonReachable(this.runtime, healthTimeoutMs, await this.resolveSocketPath())) {
321
+ return true;
322
+ }
323
+ if (proc.exitCode !== null) {
324
+ exitedEarly = true;
325
+ return true;
326
+ }
327
+ return false;
328
+ }, { timeoutMs: startTimeoutMs, intervalMs: 100, reason: 'pm-daemon-ready' });
329
+ if (reachable && !exitedEarly) {
330
+ proc.unref();
331
+ return true;
332
+ }
333
+ if (exitedEarly && (await isDaemonReachable(this.runtime, healthTimeoutMs, await this.resolveSocketPath()))) {
334
+ return true;
335
+ }
336
+ // If we reach here, daemon failed to start
337
+ let errorDetails = '';
338
+ if (proc.exitCode !== null) {
339
+ // A daemon is not this process's child: its exit code never reaches the launcher.
340
+ errorDetails = 'Daemon process exited before its socket answered.';
341
+ }
342
+ const tail = await attempt(async () => {
343
+ const { readPMDaemonLogTail } = await import("./utils/logging.js");
344
+ return readPMDaemonLogTail(this.runtime, 20);
345
+ });
346
+ // The start failure below stays the error; an unreadable log is reported beside it, as its cause.
347
+ let logReadFailure;
348
+ if (tail.ok) {
349
+ if (tail.value.length > 0)
350
+ errorDetails = tail.value.join('\n');
351
+ }
352
+ else {
353
+ logReadFailure = tail.failure;
354
+ getPMDaemonLogger(this.runtime).warn('Failed to read PM daemon log tail', formatPMError(tail.failure));
355
+ }
356
+ if (!errorDetails.trim() && proc.exitCode === null) {
357
+ errorDetails = `Daemon did not become reachable within ${startTimeoutMs}ms.`;
358
+ }
359
+ throw new CapabilityError(errorDetails.trim()
360
+ ? `Failed to start PM daemon. Recent logs:\n${errorDetails}`
361
+ : 'Failed to start PM daemon (no error details available)', 'UNAVAILABLE', { reason: 'pm-daemon-start-failed', details: { workspace: workspaceRoot }, cause: logReadFailure });
362
+ });
363
+ if (started.ok)
364
+ return started.value;
365
+ // This launch owns the child handle. Never release launch custody
366
+ // while our failed startup can still become another daemon.
367
+ const reaped = await attempt(async () => {
368
+ await this.reapFailedDaemonLaunch(proc);
369
+ lease.preserveOnFailure = false;
370
+ });
371
+ if (!reaped.ok) {
372
+ throw new CapabilityError('The failed PM daemon launch could not be reaped.', 'INTERNAL', {
373
+ reason: 'pm-daemon-launch-cleanup-failed',
374
+ details: { pid: proc.pid, workspace: workspaceRoot },
375
+ recoveryHint: 'Launch custody is retained. Inspect readDaemonLaunchLockState(); the originating owner may release its exact lease only after proving its child exited. Once the child has exited, the next launch reclaims its guard; `vibes pm daemon recover` reports the guard state without touching live custody.',
376
+ cause: new AggregateError([started.failure, reaped.failure], 'PM daemon startup and cleanup failed')
377
+ });
378
+ }
379
+ return rethrowFailure(started.failure);
380
+ };
381
+ const lockTimeoutMs = getPMDaemonLaunchLockTimeoutMs(startTimeoutMs);
382
+ const guardProbe = {
383
+ lockFile,
384
+ socketPath: await this.resolveSocketPath(),
385
+ pidFile: getDaemonPidPath(toolingId, pathOptions),
386
+ startTimeoutMs
387
+ };
388
+ // Best-effort pre-pass: an ancient orphan must not cost a full acquire
389
+ // timeout. It never throws and never blocks the launch below.
390
+ await bestEffortRecoverOrphanedGuard(this.runtime, guardProbe);
391
+ const launched = await attempt(() => withDaemonLaunchLock(this.runtime, lockFile, lockTimeoutMs, launch, { unresolvedLaunch: true }));
392
+ if (launched.ok)
393
+ return launched.value;
394
+ // A launch blocked only by a dead launcher's orphaned guard heals
395
+ // here: prove absence, clear it, launch once. Any other timeout
396
+ // keeps its error, with the guard's verdict beside it.
397
+ if (!isLaunchLockTimeoutError(launched.failure))
398
+ return rethrowFailure(launched.failure);
399
+ const timeoutMessage = failureText(launched.failure);
400
+ const recovery = await attempt(() => tryRecoverOrphanedLaunchGuard(this.runtime, guardProbe));
401
+ if (!recovery.ok) {
402
+ throw new CapabilityError(`${timeoutMessage}; orphan-guard probe failed (${failureLabel(recovery.failure)})`, 'TIMEOUT', {
403
+ reason: LAUNCH_LOCK_TIMEOUT_REASON,
404
+ retryable: true,
405
+ details: { lockFile },
406
+ cause: new AggregateError([launched.failure, recovery.failure], 'The launch lock timed out and its orphan-guard probe failed')
407
+ });
408
+ }
409
+ if (!recovery.value.recovered) {
410
+ throw new CapabilityError(`${timeoutMessage}; ${describeRecoveryRefusal(recovery.value)}. ` +
411
+ "Run 'vibes pm daemon recover' to re-check.", 'TIMEOUT', { reason: LAUNCH_LOCK_TIMEOUT_REASON, retryable: true, details: { lockFile, recoveryRefusal: recovery.value.reason }, cause: launched.failure });
412
+ }
413
+ getPMDaemonLogger(this.runtime).warn('recovered orphaned launch guard during auto-start; retrying launch', {
414
+ lockFile
415
+ });
416
+ return await withDaemonLaunchLock(this.runtime, lockFile, lockTimeoutMs, launch, {
417
+ unresolvedLaunch: true
418
+ });
419
+ }
420
+ /** Signal only the child this launch owns, and observe its exit before releasing the lease. */
421
+ async reapFailedDaemonLaunch(proc) {
422
+ if (proc.exitCode !== null)
423
+ return;
424
+ await proc.kill('SIGTERM');
425
+ // The handle publishes exit through exitCode, not an exit promise.
426
+ // Poll that owned handle under the runtime lifecycle, never a guessed pid.
427
+ if (await pollUntil(this.runtime, async () => proc.exitCode !== null, {
428
+ timeoutMs: 2000, intervalMs: 50, reason: 'pm-daemon-launch-exit'
429
+ }))
430
+ return;
431
+ await proc.kill('SIGKILL');
432
+ if (!(await pollUntil(this.runtime, async () => proc.exitCode !== null, {
433
+ timeoutMs: 3000, intervalMs: 50, reason: 'pm-daemon-launch-exit'
434
+ }))) {
435
+ throw new CapabilityError('The launched PM daemon did not exit after termination.', 'TIMEOUT', {
436
+ reason: 'pm-daemon-launch-survived', details: { pid: proc.pid }
437
+ });
438
+ }
439
+ }
440
+ async cleanupStaleDaemonArtifacts() {
441
+ const [{ getDaemonPidPath, readDaemonPid }, { isDaemonReachable }] = await Promise.all([
442
+ import("./utils/daemon-pid.js"),
443
+ import("./utils/daemon-reachability.js")
444
+ ]);
445
+ const pidFile = getDaemonPidPath((await this.workspace()).toolingId, await this.pathOptions());
446
+ const pid = await readDaemonPid(this.runtime, pidFile);
447
+ const reachable = await isDaemonReachable(this.runtime, 750, await this.resolveSocketPath());
448
+ if (pid !== null && !reachable) {
449
+ // A timeout is not absence. Neither pid-file age nor argv resemblance
450
+ // authorizes disconnecting a live incumbent from its identity.
451
+ throw new CapabilityError('The recorded PM daemon is alive but its socket did not answer.', 'UNAVAILABLE', {
452
+ reason: 'pm-daemon-unreachable',
453
+ details: { pid, workspace: (await this.workspace()).workspacePath },
454
+ recoveryHint: 'Inspect the daemon logs and restart it through its owning PM daemon.'
455
+ });
456
+ }
457
+ if (pid === null && !reachable) {
458
+ // Native socket ownership is stricter than the RPC handshake: a live
459
+ // listener with no pid file must not be unlinked either.
460
+ await removeSocket(this.runtime, await this.resolveSocketPath());
461
+ await this.removeFileIfPresent(pidFile);
462
+ }
463
+ }
464
+ /** Remove `path`; an already-absent file (`ENOENT`) is the goal, any other failure propagates. */
465
+ async removeFileIfPresent(path) {
466
+ const files = await pmFileSystem(this.runtime);
467
+ const removed = await attempt(() => files.remove(path));
468
+ if (!removed.ok && !hasErrno(removed.failure, 'ENOENT'))
469
+ rethrowFailure(removed.failure);
470
+ }
471
+ /**
472
+ * Ensure daemon is running (check, attempt, fail with useful error)
473
+ */
474
+ async ensureDaemonRunning(options = {}) {
475
+ await this.attemptStartDaemon(options);
476
+ }
477
+ /**
478
+ * A read: the same RPC, but it never starts the daemon. Status, logs and
479
+ * config lookups report that the daemon is not running instead of spawning
480
+ * one, so running a read command anywhere has no side effects.
481
+ */
482
+ read(command, params = {}, timeoutMs = DEFAULT_TIMEOUT_MS) {
483
+ return this.rpc(command, params, timeoutMs, false);
484
+ }
485
+ /** An RPC whose reply is read through `schema` where it arrives. */
486
+ async callReply(schema, command, params = {}, timeoutMs = DEFAULT_TIMEOUT_MS) {
487
+ return parseReply(command, schema, await this.rpc(command, params, timeoutMs));
488
+ }
489
+ /** A read whose reply is read through `schema` where it arrives. */
490
+ async readReply(schema, command, params = {}, timeoutMs = DEFAULT_TIMEOUT_MS) {
491
+ return parseReply(command, schema, await this.read(command, params, timeoutMs));
492
+ }
493
+ /**
494
+ * Make an RPC call to the PM daemon via the runtime-rpc-unix three-verb
495
+ * protocol. Each call opens a connection, invokes one method on the PM
496
+ * RPC root (the method name IS the command name), and closes. The legacy
497
+ * HTTP `fetch('http://pm/rpc', { unix })` + `dateReviver` envelope is gone.
498
+ */
499
+ async rpc(command, params = {}, timeoutMs = DEFAULT_TIMEOUT_MS, startDaemon = true, callerSignal,
500
+ /**
501
+ * Whether `reply` asks this call to keep its connection until the
502
+ * daemon that sent it closes it (a shutdown reply: the daemon closes
503
+ * every session when its listener stops). Bounded by the call's deadline.
504
+ */
505
+ holdUntilClosed) {
506
+ // One lifecycle-bounded wait (RC07): the RPC's deadline, and the runtime's
507
+ // disposal, abort it; the abort closes the connection it opened.
508
+ const invoke = async (signal) => {
509
+ const socketPath = await this.resolveSocketPath();
510
+ const connectTimeoutMs = Math.min(timeoutMs, DEFAULT_TIMEOUT_MS);
511
+ const dialOnce = () => attempt(() => connectUnix(socketPath, { runtime: this.runtime, timeoutMs: connectTimeoutMs, signal }));
512
+ let connected = await dialOnce();
513
+ // Auto-start the daemon on the default socket only when no daemon is
514
+ // listening there (`socket-unreachable`), never before every call.
515
+ if (!connected.ok &&
516
+ startDaemon &&
517
+ this.usesDefaultSocket &&
518
+ this.autoStartDaemon &&
519
+ isDaemonUnavailableError(connected.failure)) {
520
+ await this.ensureDaemonRunning();
521
+ connected = await dialOnce();
522
+ }
523
+ for (let retry = 0; !connected.ok &&
524
+ retry < 3 &&
525
+ !signal.aborted &&
526
+ isCapabilityError(connected.failure) &&
527
+ (connected.failure.reason === 'rpc-handshake-timeout' ||
528
+ connected.failure.reason === 'socket-connect-timeout' ||
529
+ connected.failure.reason === 'rpc-handshake-closed'); retry++) {
530
+ await this.runtime.lifecycle.delay(250 * (retry + 1), signal);
531
+ if (signal.aborted)
532
+ break;
533
+ connected = await dialOnce();
534
+ }
535
+ if (!connected.ok)
536
+ return rethrowFailure(connected.failure);
537
+ const connection = connected.value;
538
+ const closeOnAbort = () => {
539
+ void attempt(() => connection.close()).then((closed) => {
540
+ if (closed.ok)
541
+ return;
542
+ getPMDaemonLogger(this.runtime).warn('PM RPC connection close after abort failed', {
543
+ command,
544
+ ...formatPMError(closed.failure)
545
+ });
546
+ });
547
+ };
548
+ signal.addEventListener('abort', closeOnAbort, { once: true });
549
+ try {
550
+ const { root } = wireConsumer({
551
+ // The PM root's methods are its stable wire commands (C19).
552
+ rootMethods: PM_COMMAND_IDS,
553
+ rootRef: connection.rootRef,
554
+ send: (req) => connection.send(req),
555
+ openStream: (ref, channel) => connection.openStream(asRefId(ref), channel),
556
+ closed: connection.closed
557
+ });
558
+ const served = z.custom((value) => z.object({ [command]: z.function() }).safeParse(value).success).safeParse(root);
559
+ if (!served.success) {
560
+ throw new CapabilityError(`PM daemon has no RPC method '${command}'`, 'UNAVAILABLE', {
561
+ reason: 'pm-daemon-method-missing',
562
+ retryable: false,
563
+ details: { command }
564
+ });
565
+ }
566
+ const result = await served.data[command](params);
567
+ const success = RpcSuccessSchema.safeParse(result);
568
+ if (!success.success) {
569
+ const failure = RpcFailureSchema.safeParse(result);
570
+ throw new CapabilityError(failure.success ? failure.data.error : `Command failed: ${command}`, 'INTERNAL', {
571
+ reason: 'pm-daemon-command-failed',
572
+ details: { command }
573
+ });
574
+ }
575
+ if (holdUntilClosed?.(success.data))
576
+ await connection.closed;
577
+ return success.data;
578
+ }
579
+ finally {
580
+ signal.removeEventListener('abort', closeOnAbort);
581
+ await connection.close();
582
+ }
583
+ };
584
+ // A caller's signal joins the wait: its abort closes the connection,
585
+ // which ends the daemon's work for it (runtime-rpc rule 19).
586
+ const waited = await attempt(() => this.runtime.lifecycle.wait(invoke, callerSignal ? { timeoutMs, reason: `pm-rpc:${command}`, signal: callerSignal } : { timeoutMs, reason: `pm-rpc:${command}` }));
587
+ if (waited.ok)
588
+ return waited.value;
589
+ // A daemon from an older build does not serve this command: it is not
590
+ // advertised on its root. That is a missing method, typed, never a fallback.
591
+ if (waited.failure instanceof Error && NotAdvertisedSchema.safeParse(waited.failure).success) {
592
+ throw new CapabilityError(`PM daemon has no RPC method '${command}'`, 'UNAVAILABLE', {
593
+ reason: 'pm-daemon-method-missing',
594
+ retryable: false,
595
+ details: { command },
596
+ recoveryHint: "Restart the PM daemon from the current CLI: 'vibes pm daemon restart'."
597
+ });
598
+ }
599
+ throw normalizeRpcFailure(waited.failure);
600
+ }
601
+ // ─────────────────────────────────────────────────────────────────────────────
602
+ // Process Management
603
+ // ─────────────────────────────────────────────────────────────────────────────
604
+ async start(config, options) {
605
+ const { state } = await this.callReply(ProcessStateReplySchema, 'start', { config, options }, rpcTimeoutForStart(options));
606
+ return state;
607
+ }
608
+ async stop(processId, options) {
609
+ await this.rpc('stop', { processId, options });
610
+ }
611
+ /**
612
+ * Restart a managed process. `guard.expectedPid` lets a body that asks to
613
+ * be rolled prove it IS the process the daemon tracks under `processId`;
614
+ * the daemon refuses when the tracked pid differs. Measured 2026-09-05: an
615
+ * orphan carrying an inherited VIBES_PM_MANAGED stamp rolled the healthy
616
+ * shared MCP host every five minutes (552 of 586 restarts).
617
+ */
618
+ async restart(processId, options, guard) {
619
+ const params = { processId, options };
620
+ if (guard?.expectedPid !== undefined)
621
+ params.expectedPid = guard.expectedPid;
622
+ const { state } = await this.callReply(ProcessStateReplySchema, 'restart', params, rpcTimeoutForStart(options));
623
+ return state;
624
+ }
625
+ /**
626
+ * The daemon's health, or `null` when no daemon is listening (its socket
627
+ * missing or refusing: the confirmed-absence codes). Any other failure,
628
+ * a timeout from a daemon that accepted the call included, propagates.
629
+ * The default 1 s suits a liveness probe; work that must wait for a busy
630
+ * daemon passes a longer `timeoutMs`.
631
+ */
632
+ async health(timeoutMs = 1000) {
633
+ const read = await attempt(() => this.readReply(HealthReplySchema, 'health', {}, timeoutMs));
634
+ if (read.ok)
635
+ return read.value.health;
636
+ if (isDaemonUnavailableError(read.failure))
637
+ return null;
638
+ return rethrowFailure(read.failure);
639
+ }
640
+ async reconcileState() {
641
+ const { summary } = await this.callReply(ReconcileReplySchema, 'reconcile');
642
+ return summary;
643
+ }
644
+ /**
645
+ * Ask the daemon to perform its own orderly shutdown.
646
+ *
647
+ * This is intentionally an RPC instead of a caller-side signal: the daemon
648
+ * is the only owner that can drain managed children, persist their stopped
649
+ * state, and remove its socket/PID artifacts coherently.
650
+ */
651
+ async shutdownDaemon() {
652
+ return this.callReply(DaemonShutdownReceiptSchema, 'shutdown', {}, 2_000);
653
+ }
654
+ /** Release the serving daemon while preserving its tracked managed runs. */
655
+ async handoffDaemon() {
656
+ return this.callReply(DaemonHandoffReceiptSchema, 'handoff', {}, 2_000);
657
+ }
658
+ async getStatus(processId) {
659
+ const { state } = await this.readReply(OptionalProcessStateReplySchema, 'status', { processId });
660
+ return state ?? undefined;
661
+ }
662
+ async getAllStatus() {
663
+ const read = await attempt(() => this.readReply(ProcessStatesReplySchema, 'status-all'));
664
+ if (read.ok)
665
+ return read.value.states;
666
+ if (isDaemonUnavailableError(read.failure))
667
+ return [];
668
+ return rethrowFailure(read.failure);
669
+ }
670
+ async isRunning(processId) {
671
+ const { isRunning } = await this.readReply(IsRunningReplySchema, 'is-running', { processId });
672
+ return isRunning;
673
+ }
674
+ /**
675
+ * Await a run's exit through the daemon's `await-exit`: one RPC that ends
676
+ * on the exit (never a status poll). `run` names the run; absent, the run
677
+ * current now is read once and pinned, so a re-issue never latches onto a
678
+ * later run. The deadline is the caller's (default the host timer ceiling
679
+ * less the RPC margin); the caller's signal closes the connection.
680
+ *
681
+ * Re-issue: when the daemon answers `interrupted` (a new host generation,
682
+ * or shutdown) or the connection drops before a reply, the same
683
+ * `{ processId, run }` is sent again within the remaining deadline. Each
684
+ * re-issue follows a daemon event, never a timer: after a shutdown the
685
+ * client first awaits the old daemon closing its connection, then goes
686
+ * through the launch-lock-serialized `ensureDaemonRunning` (auto-start
687
+ * clients). A re-issue no daemon answers refuses `UNAVAILABLE`
688
+ * `pm-await-exit-interrupted`.
689
+ */
690
+ async awaitExit(processId, options = {}) {
691
+ const parsed = AwaitExitOptionsSchema.safeParse({ run: options.run, timeoutMs: options.timeoutMs });
692
+ if (!parsed.success) {
693
+ throw new CapabilityError('awaitExit received invalid options.', 'INVALID_INPUT', {
694
+ reason: 'pm-await-exit-options-invalid',
695
+ details: { processId, fields: [...new Set(parsed.error.issues.map((issue) => issue.path.join('.') || '(options)'))] }
696
+ });
697
+ }
698
+ const { signal } = options;
699
+ const budgetMs = parsed.data.timeoutMs ?? AWAIT_EXIT_MAX_MS - AWAIT_EXIT_RPC_MARGIN_MS;
700
+ const deadline = this.runtime.lifecycle.now() + budgetMs;
701
+ const remaining = () => {
702
+ const left = Math.floor(deadline - this.runtime.lifecycle.now());
703
+ if (left >= 1)
704
+ return left;
705
+ throw new CapabilityError(`Process '${processId}' did not exit within ${budgetMs}ms.`, 'TIMEOUT', {
706
+ reason: 'pm-await-exit-timeout',
707
+ retryable: true,
708
+ details: { processId, timeoutMs: budgetMs }
709
+ });
710
+ };
711
+ const run = parsed.data.run ?? (await this.currentRun(processId));
712
+ let reissue = false;
713
+ for (;;) {
714
+ if (reissue && this.usesDefaultSocket && this.autoStartDaemon)
715
+ await this.ensureDaemonRunning();
716
+ const timeoutMs = remaining();
717
+ const params = run ? { processId, run, timeoutMs } : { processId, timeoutMs };
718
+ const replied = await attempt(() => this.rpc('await-exit', params, Math.min(AWAIT_EXIT_MAX_MS, timeoutMs + AWAIT_EXIT_RPC_MARGIN_MS), false, signal, isShutdownInterrupt));
719
+ if (!replied.ok) {
720
+ if (signal?.aborted)
721
+ return rethrowFailure(replied.failure);
722
+ if (isConnectionLost(replied.failure)) {
723
+ reissue = true;
724
+ continue;
725
+ }
726
+ if (reissue && isDaemonUnavailableError(replied.failure))
727
+ throw awaitExitInterrupted(processId, replied.failure);
728
+ if (isWaitTimeout(replied.failure))
729
+ remaining();
730
+ return rethrowFailure(replied.failure);
731
+ }
732
+ const reply = parseReply('await-exit', AwaitExitReplySchema, replied.value);
733
+ switch (reply.outcome) {
734
+ case 'exited':
735
+ return reply.exit;
736
+ case 'deadline':
737
+ throw new CapabilityError(`Process '${processId}' did not exit within ${budgetMs}ms.`, 'TIMEOUT', {
738
+ reason: 'pm-await-exit-timeout',
739
+ retryable: true,
740
+ details: { processId, timeoutMs: budgetMs }
741
+ });
742
+ case 'absent':
743
+ throw new CapabilityError(`Process '${processId}' has no state to await.`, 'NOT_FOUND', {
744
+ reason: 'pm-process-state-not-found',
745
+ details: { processId }
746
+ });
747
+ case 'superseded':
748
+ throw new CapabilityError(`Process '${processId}' started a later run before the awaited one exited.`, 'CONFLICT', {
749
+ reason: 'pm-await-exit-run-superseded',
750
+ details: { processId }
751
+ });
752
+ case 'interrupted':
753
+ // A shutdown reply returned only once its own daemon closed the
754
+ // connection (`isShutdownInterrupt`): the re-issue reaches its successor.
755
+ reissue = true;
756
+ }
757
+ }
758
+ }
759
+ /** The run `processId` is on now, read once; no state refuses `NOT_FOUND` `pm-process-state-not-found`. */
760
+ async currentRun(processId) {
761
+ const state = await this.getStatus(processId);
762
+ if (!state) {
763
+ throw new CapabilityError(`Process '${processId}' has no state to await.`, 'NOT_FOUND', {
764
+ reason: 'pm-process-state-not-found',
765
+ details: { processId }
766
+ });
767
+ }
768
+ return state.startedAt ? { startedAt: state.startedAt } : undefined;
769
+ }
770
+ async getLogs(processId, options) {
771
+ const { logs } = await this.readReply(LogsReplySchema, 'logs', { processId, options });
772
+ return logs;
773
+ }
774
+ /** What `processId`'s logs gained since `offsets`, complete lines only, redacted by the daemon (RC05). */
775
+ async getLogsSince(processId, offsets) {
776
+ return this.readReply(LogsSinceReplySchema, 'logs-since', { processId, offsets });
777
+ }
778
+ async register(config) {
779
+ await this.rpc('register', { config });
780
+ }
781
+ async unregister(processId) {
782
+ const { unregistered } = await this.callReply(UnregisterReplySchema, 'unregister', { processId });
783
+ return unregistered;
784
+ }
785
+ /** Ordinary tasks on the client the caller already selected. */
786
+ async runTask(task, options) {
787
+ return runPmTaskOnClient(this, task, options);
788
+ }
789
+ /** Local owner capability: terminal acknowledgement is awaited before ephemeral task release. */
790
+ async runSupervisedTask(task, options) {
791
+ const scope = await this.taskSupervisionScope();
792
+ return runPmTaskOnClient(this, task, options, {
793
+ scope, admissionId: crypto.randomUUID(), callbacks: options.supervision
794
+ });
795
+ }
796
+ async admitSupervisedTask(identity, task, options) {
797
+ const timeoutMs = 'processId' in task ? rpcTimeoutForPreset(undefined, 30 * 60_000) : rpcTimeoutForStart();
798
+ const reply = await this.rpc('admit-task', {
799
+ identity: pmTaskProcessIdentityOf(identity), task, runId: options.runId, tags: options.tags ?? []
800
+ }, timeoutMs, true, options.signal);
801
+ const { state } = parseReply('admit-task', ProcessStateReplySchema, reply);
802
+ return state;
803
+ }
804
+ async supervisedAdmission(identity) {
805
+ const { admission } = await this.readReply(SupervisedAdmissionReplySchema, 'task-admission', { identity: pmTaskProcessIdentityOf(identity) });
806
+ return admission;
807
+ }
808
+ async acknowledgeSupervised(receipt) {
809
+ const { acknowledged } = await this.callReply(SupervisedAcknowledgementReplySchema, 'acknowledge-task', { receipt });
810
+ return acknowledged;
811
+ }
812
+ async taskSupervisionScope() {
813
+ const expected = await this.workspace();
814
+ // Admission waits as long as any other PM read: health()'s 1 s liveness cap
815
+ // failed whole check and publish graphs while the daemon was busy admitting
816
+ // their siblings (2026-10-27: 62 of 82 packages skipped in one publish).
817
+ const health = await this.health(DEFAULT_TIMEOUT_MS);
818
+ const scope = health?.healthy ? health.taskSupervision?.scope : undefined;
819
+ if (!scope || scope.workspacePath !== expected.workspacePath || scope.toolingId !== expected.toolingId) {
820
+ throw new CapabilityError('The selected PM daemon cannot preserve supervised task settlement in this scope.', 'UNAVAILABLE', {
821
+ reason: 'pm-task-supervision-unavailable', retryable: false
822
+ });
823
+ }
824
+ return scope;
825
+ }
826
+ async getConfig(processId) {
827
+ const { config } = await this.readReply(ConfigReplySchema, 'get-config', { processId });
828
+ return config ?? undefined;
829
+ }
830
+ async getAllConfigs() {
831
+ const { configs } = await this.readReply(ConfigsReplySchema, 'get-all-configs');
832
+ return configs;
833
+ }
834
+ async touch(processId, timestamp) {
835
+ const payload = timestamp instanceof Date ? timestamp.toISOString() : timestamp;
836
+ await this.rpc('touch', { processId, timestamp: payload });
837
+ }
838
+ // ─────────────────────────────────────────────────────────────────────────────
839
+ // Liveness / Presence Profiles (pm-infra-liveness-fleet Phase 2)
840
+ // Reusable targeting + active profile surface. Concrete fleet proxy / remote
841
+ // activation can be driven from instance providers (pm/fleet/*) or daemon extensions.
842
+ // Per SPEC §CLI/manager (for changes here): " - **CLI** (`src/cli/`): ... " + "Does not own" pm/ workspace data.
843
+ // set now returns the handler result (incl. proxy after materialization) for --json in liveness set impl.
844
+ // get unwraps but augments active with proxy info from liveness-get reply (for list --env surface).
845
+ // ─────────────────────────────────────────────────────────────────────────────
846
+ async setLivenessProfile(profile, options) {
847
+ return this.callReply(LivenessSetReplySchema, 'liveness-set', { profile, ...options });
848
+ }
849
+ async getActiveLivenessProfile(options) {
850
+ const { active, proxy } = await this.readReply(LivenessGetReplySchema, 'liveness-get', { ...options });
851
+ if (!active)
852
+ return undefined;
853
+ // If top-level proxy present in reply (from get), surface it on the active shape too for callers.
854
+ if (proxy && !active.proxy) {
855
+ return { ...active, proxy };
856
+ }
857
+ return active;
858
+ }
859
+ // ─────────────────────────────────────────────────────────────────────────────
860
+ // Resource Management
861
+ // ─────────────────────────────────────────────────────────────────────────────
862
+ async setupResource(config, options) {
863
+ // Extended timeout for resource setup (resources can take time to become ready)
864
+ const timeoutMs = Math.max(120000, (config.readyTimeout || 60000) + 30000);
865
+ const { result } = await this.callReply(ResourceSetupReplySchema, 'resource-setup', { config, options: options ?? {} }, timeoutMs);
866
+ return result;
867
+ }
868
+ /**
869
+ * Set up a declared resource by id: the daemon resolves its config against
870
+ * its own graph (pm.md C1). Same budget as {@link setupResource}'s floor.
871
+ */
872
+ async setupDeclaredResource(resourceId, options, readyTimeoutMs = 60000) {
873
+ const timeoutMs = Math.max(120000, readyTimeoutMs + 30000);
874
+ const { result } = await this.callReply(ResourceSetupReplySchema, 'resource-setup', { resourceId, options: options ?? {} }, timeoutMs);
875
+ return result;
876
+ }
877
+ async stopResource(resourceId) {
878
+ const state = await this.getResourceState(resourceId);
879
+ await this.rpc('resource-stop', { resourceId, state });
880
+ }
881
+ async resumeResource(resourceId) {
882
+ const state = await this.getResourceState(resourceId);
883
+ await this.rpc('resource-resume', { resourceId, state });
884
+ }
885
+ async restartResource(resourceId) {
886
+ const state = await this.getResourceState(resourceId);
887
+ await this.rpc('resource-restart', { resourceId, state });
888
+ }
889
+ async teardownResource(resourceId) {
890
+ const state = await this.getResourceState(resourceId);
891
+ await this.rpc('resource-teardown', { resourceId, state });
892
+ }
893
+ async getResourceStatus(resourceId, options, config) {
894
+ const { status } = await this.readReply(ResourceStatusReplySchema, 'resource-status', {
895
+ resourceId,
896
+ options: options ?? {},
897
+ config
898
+ });
899
+ return status;
900
+ }
901
+ async checkResourceStaleness(config) {
902
+ return this.readReply(ResourceStalenessReplySchema, 'resource-check-staleness', { config });
903
+ }
904
+ async getResourceState(resourceId) {
905
+ const { state } = await this.readReply(ResourceStateReplySchema, 'resource-get-state', { resourceId });
906
+ return state ?? undefined;
907
+ }
908
+ async getAllResourceStates() {
909
+ const { states } = await this.readReply(ResourceStatesReplySchema, 'resource-get-all-states');
910
+ return states;
911
+ }
912
+ async getAllResourceStateSummaries() {
913
+ const states = await this.getAllResourceStates();
914
+ const { summarizeResourceState } = await import("./resources/resource-state-summary.js");
915
+ return states.map((state) => summarizeResourceState(state));
916
+ }
917
+ // ─────────────────────────────────────────────────────────────────────────────
918
+ // Preset Management
919
+ // ─────────────────────────────────────────────────────────────────────────────
920
+ /**
921
+ * Start a declared preset by id. The daemon resolves it against its own
922
+ * graph (pm.md C1): the client sends the id, never a config.
923
+ *
924
+ * Preset starts can take a while when maxProcessConcurrency serializes warmup:
925
+ * each process holds its semaphore slot until it reports healthy (warmupMs
926
+ * budget is up to ~2.5min per app). A 15-app preset at concurrency 2 can take
927
+ * 20+ minutes end-to-end; budget 30min so the CLI doesn't abort the RPC.
928
+ */
929
+ async startPreset(presetId, options) {
930
+ const { result } = await this.callReply(PresetStartReplySchema, 'preset-start', { presetId, options }, rpcTimeoutForPreset(options, 30 * 60_000));
931
+ return result;
932
+ }
933
+ /** Stop a declared preset by id. Stops are teardown-only and fast; 5min covers large presets. */
934
+ async stopPreset(presetId) {
935
+ const { result } = await this.callReply(PresetStopReplySchema, 'preset-stop', { presetId }, 5 * 60_000);
936
+ return result;
937
+ }
938
+ /** Restart a declared preset by id: stop, then the long start (see startPreset). */
939
+ async restartPreset(presetId, options) {
940
+ const { result } = await this.callReply(PresetStartReplySchema, 'preset-restart', { presetId, options }, rpcTimeoutForPreset(options, 35 * 60_000));
941
+ return result;
942
+ }
943
+ /**
944
+ * Tear down a declared preset by id (destructive: processes and resources).
945
+ * Resources like kind clusters can take minutes to delete; 10min covers it.
946
+ */
947
+ async teardownPreset(presetId) {
948
+ const { result } = await this.callReply(PresetStopReplySchema, 'preset-teardown', { presetId }, 10 * 60_000);
949
+ return result;
950
+ }
951
+ /**
952
+ * Start every declared process and resource, in dependency order. The
953
+ * daemon reads its own graph; `declared` counts what it found.
954
+ */
955
+ async startAll(options) {
956
+ return this.callReply(StartAllReplySchema, 'start-all', { options }, rpcTimeoutForPreset(options, 30 * 60_000));
957
+ }
958
+ /**
959
+ * Start one declared process or resource by id, with its declared
960
+ * dependencies and conflicts, resolved by the daemon against its graph.
961
+ * A target with dependencies runs as a preset, so it gets the preset budget.
962
+ */
963
+ async startDeclared(id, options, target = {}) {
964
+ // `kind: 'process'`: a resource id refuses `pm-target-not-process` before any setup.
965
+ const params = target.kind ? { id, options, kind: target.kind } : { id, options };
966
+ const { started } = await this.callReply(StartDeclaredReplySchema, 'start-declared', params, rpcTimeoutForPreset(options, 30 * 60_000));
967
+ return started;
968
+ }
969
+ // ─────────────────────────────────────────────────────────────────────────────
970
+ // Worker Runtime Management
971
+ // ─────────────────────────────────────────────────────────────────────────────
972
+ async ensureWorkerRuntime(target) {
973
+ await this.rpc('ensure-worker-runtime', createWorkerRuntimeRequest(target, (await this.workspace()).workspacePath));
974
+ }
975
+ /**
976
+ * Whether the worker runtime answers on its socket. No PM daemon listening
977
+ * (confirmed absence) is `false`; any other failure propagates typed.
978
+ */
979
+ async checkWorkersReady(timeout = 5000, target) {
980
+ const rpcTimeout = Math.max(1000, timeout + 500);
981
+ const read = await attempt(async () => this.readReply(WorkersReadyReplySchema, 'check-workers-ready', {
982
+ ...createWorkerRuntimeRequest(target, (await this.workspace()).workspacePath),
983
+ timeout
984
+ }, rpcTimeout));
985
+ if (read.ok)
986
+ return read.value.ready ?? false;
987
+ if (isDaemonUnavailableError(read.failure))
988
+ return false;
989
+ return rethrowFailure(read.failure);
990
+ }
991
+ async cleanupSocket(processId) {
992
+ await this.rpc('cleanup-socket', { processId });
993
+ }
994
+ async getSocketStatus(processId) {
995
+ const { status } = await this.readReply(SocketStatusReplySchema, 'socket-status', { processId });
996
+ return status;
997
+ }
998
+ /**
999
+ * Disconnect from daemon (no-op for HTTP - connections are stateless)
1000
+ */
1001
+ disconnect() {
1002
+ // HTTP connections are stateless - nothing to disconnect
1003
+ }
1004
+ }
1005
+ //# sourceMappingURL=client.js.map