@owlmeans/viable-sdk 0.1.18-rc.8 → 0.1.18

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 (498) hide show
  1. package/README.md +29 -11
  2. package/agent-meta/manifest.json +16 -0
  3. package/agent-meta/skills/viable-sdk/SKILL.md +1033 -0
  4. package/build/api/collect/types.d.ts +30 -0
  5. package/build/api/collect/types.d.ts.map +1 -0
  6. package/build/api/collect/types.js +2 -0
  7. package/build/api/collect/types.js.map +1 -0
  8. package/build/api/collect.d.ts +14 -0
  9. package/build/api/collect.d.ts.map +1 -0
  10. package/build/api/collect.js +132 -0
  11. package/build/api/collect.js.map +1 -0
  12. package/build/api/consts.local.d.ts +21 -0
  13. package/build/api/consts.local.d.ts.map +1 -0
  14. package/build/api/consts.local.js +25 -0
  15. package/build/api/consts.local.js.map +1 -0
  16. package/build/api/index.d.ts +5 -0
  17. package/build/api/index.d.ts.map +1 -1
  18. package/build/api/index.js +2 -0
  19. package/build/api/index.js.map +1 -1
  20. package/build/api/remote.d.ts +13 -6
  21. package/build/api/remote.d.ts.map +1 -1
  22. package/build/api/remote.js +302 -35
  23. package/build/api/remote.js.map +1 -1
  24. package/build/api/transport/types.d.ts +14 -0
  25. package/build/api/transport/types.d.ts.map +1 -0
  26. package/build/api/transport/types.js +2 -0
  27. package/build/api/transport/types.js.map +1 -0
  28. package/build/api/transport.d.ts +4 -0
  29. package/build/api/transport.d.ts.map +1 -0
  30. package/build/api/transport.js +32 -0
  31. package/build/api/transport.js.map +1 -0
  32. package/build/api/types.d.ts +9 -0
  33. package/build/api/types.d.ts.map +1 -0
  34. package/build/api/types.js +2 -0
  35. package/build/api/types.js.map +1 -0
  36. package/build/api/types.local.d.ts +3 -0
  37. package/build/api/types.local.d.ts.map +1 -0
  38. package/build/api/types.local.js +2 -0
  39. package/build/api/types.local.js.map +1 -0
  40. package/build/consts.d.ts +29 -14
  41. package/build/consts.d.ts.map +1 -1
  42. package/build/consts.js +30 -14
  43. package/build/consts.js.map +1 -1
  44. package/build/context/consts.local.d.ts +18 -0
  45. package/build/context/consts.local.d.ts.map +1 -0
  46. package/build/context/consts.local.js +18 -0
  47. package/build/context/consts.local.js.map +1 -0
  48. package/build/context/index.d.ts +3 -7
  49. package/build/context/index.d.ts.map +1 -1
  50. package/build/context/index.js +58 -25
  51. package/build/context/index.js.map +1 -1
  52. package/build/context/types.d.ts +26 -0
  53. package/build/context/types.d.ts.map +1 -0
  54. package/build/context/types.js +2 -0
  55. package/build/context/types.js.map +1 -0
  56. package/build/executor/boot-check.d.ts +1 -40
  57. package/build/executor/boot-check.d.ts.map +1 -1
  58. package/build/executor/boot-check.js +22 -19
  59. package/build/executor/boot-check.js.map +1 -1
  60. package/build/executor/consts.d.ts +55 -0
  61. package/build/executor/consts.d.ts.map +1 -0
  62. package/build/executor/consts.js +66 -0
  63. package/build/executor/consts.js.map +1 -0
  64. package/build/executor/consts.local.d.ts +63 -0
  65. package/build/executor/consts.local.d.ts.map +1 -0
  66. package/build/executor/consts.local.js +69 -0
  67. package/build/executor/consts.local.js.map +1 -0
  68. package/build/executor/env/types.d.ts +40 -0
  69. package/build/executor/env/types.d.ts.map +1 -0
  70. package/build/executor/env/types.js +2 -0
  71. package/build/executor/env/types.js.map +1 -0
  72. package/build/executor/env.d.ts +11 -20
  73. package/build/executor/env.d.ts.map +1 -1
  74. package/build/executor/env.js +39 -59
  75. package/build/executor/env.js.map +1 -1
  76. package/build/executor/errors.d.ts +15 -0
  77. package/build/executor/errors.d.ts.map +1 -1
  78. package/build/executor/errors.js +19 -2
  79. package/build/executor/errors.js.map +1 -1
  80. package/build/executor/files/types.d.ts +106 -0
  81. package/build/executor/files/types.d.ts.map +1 -0
  82. package/build/executor/files/types.js +2 -0
  83. package/build/executor/files/types.js.map +1 -0
  84. package/build/executor/files.d.ts +2 -50
  85. package/build/executor/files.d.ts.map +1 -1
  86. package/build/executor/files.js +225 -68
  87. package/build/executor/files.js.map +1 -1
  88. package/build/executor/git/types.d.ts +19 -0
  89. package/build/executor/git/types.d.ts.map +1 -0
  90. package/build/executor/git/types.js +2 -0
  91. package/build/executor/git/types.js.map +1 -0
  92. package/build/executor/git.d.ts +4 -36
  93. package/build/executor/git.d.ts.map +1 -1
  94. package/build/executor/git.js +206 -241
  95. package/build/executor/git.js.map +1 -1
  96. package/build/executor/glob/types.d.ts +12 -0
  97. package/build/executor/glob/types.d.ts.map +1 -0
  98. package/build/executor/glob/types.js +2 -0
  99. package/build/executor/glob/types.js.map +1 -0
  100. package/build/executor/glob.d.ts +4 -0
  101. package/build/executor/glob.d.ts.map +1 -0
  102. package/build/executor/glob.js +11 -0
  103. package/build/executor/glob.js.map +1 -0
  104. package/build/executor/health/types.d.ts +39 -0
  105. package/build/executor/health/types.d.ts.map +1 -0
  106. package/build/executor/health/types.js +2 -0
  107. package/build/executor/health/types.js.map +1 -0
  108. package/build/executor/health.d.ts +3 -83
  109. package/build/executor/health.d.ts.map +1 -1
  110. package/build/executor/health.js +76 -91
  111. package/build/executor/health.js.map +1 -1
  112. package/build/executor/index.d.ts +14 -15
  113. package/build/executor/index.d.ts.map +1 -1
  114. package/build/executor/index.js +36 -18
  115. package/build/executor/index.js.map +1 -1
  116. package/build/executor/integrity/types.d.ts +25 -0
  117. package/build/executor/integrity/types.d.ts.map +1 -0
  118. package/build/executor/integrity/types.js +2 -0
  119. package/build/executor/integrity/types.js.map +1 -0
  120. package/build/executor/integrity.d.ts +5 -15
  121. package/build/executor/integrity.d.ts.map +1 -1
  122. package/build/executor/integrity.js +28 -39
  123. package/build/executor/integrity.js.map +1 -1
  124. package/build/executor/layout/types.d.ts +69 -0
  125. package/build/executor/layout/types.d.ts.map +1 -0
  126. package/build/executor/layout/types.js +2 -0
  127. package/build/executor/layout/types.js.map +1 -0
  128. package/build/executor/layout.d.ts +9 -56
  129. package/build/executor/layout.d.ts.map +1 -1
  130. package/build/executor/layout.js +35 -82
  131. package/build/executor/layout.js.map +1 -1
  132. package/build/executor/shell/types.d.ts +76 -0
  133. package/build/executor/shell/types.d.ts.map +1 -0
  134. package/build/executor/shell/types.js +2 -0
  135. package/build/executor/shell/types.js.map +1 -0
  136. package/build/executor/shell.d.ts +3 -78
  137. package/build/executor/shell.d.ts.map +1 -1
  138. package/build/executor/shell.js +61 -91
  139. package/build/executor/shell.js.map +1 -1
  140. package/build/executor/spawn/types.d.ts +98 -0
  141. package/build/executor/spawn/types.d.ts.map +1 -0
  142. package/build/executor/spawn/types.js +2 -0
  143. package/build/executor/spawn/types.js.map +1 -0
  144. package/build/executor/spawn.d.ts +3 -103
  145. package/build/executor/spawn.d.ts.map +1 -1
  146. package/build/executor/spawn.js +192 -274
  147. package/build/executor/spawn.js.map +1 -1
  148. package/build/executor/types.d.ts +123 -0
  149. package/build/executor/types.d.ts.map +1 -0
  150. package/build/executor/types.js +2 -0
  151. package/build/executor/types.js.map +1 -0
  152. package/build/executor/types.local.d.ts +6 -0
  153. package/build/executor/types.local.d.ts.map +1 -0
  154. package/build/executor/types.local.js +2 -0
  155. package/build/executor/types.local.js.map +1 -0
  156. package/build/index.d.ts +14 -1
  157. package/build/index.d.ts.map +1 -1
  158. package/build/index.js +5 -1
  159. package/build/index.js.map +1 -1
  160. package/build/project/consts.d.ts +17 -0
  161. package/build/project/consts.d.ts.map +1 -0
  162. package/build/project/consts.js +17 -0
  163. package/build/project/consts.js.map +1 -0
  164. package/build/project/consts.local.d.ts +4 -0
  165. package/build/project/consts.local.d.ts.map +1 -0
  166. package/build/project/consts.local.js +4 -0
  167. package/build/project/consts.local.js.map +1 -0
  168. package/build/project/dotenv/types.d.ts +39 -0
  169. package/build/project/dotenv/types.d.ts.map +1 -0
  170. package/build/project/dotenv/types.js +2 -0
  171. package/build/project/dotenv/types.js.map +1 -0
  172. package/build/project/dotenv.d.ts +4 -0
  173. package/build/project/dotenv.d.ts.map +1 -0
  174. package/build/project/dotenv.js +56 -0
  175. package/build/project/dotenv.js.map +1 -0
  176. package/build/project/env/types.d.ts +40 -0
  177. package/build/project/env/types.d.ts.map +1 -0
  178. package/build/project/env/types.js +2 -0
  179. package/build/project/env/types.js.map +1 -0
  180. package/build/project/env.d.ts +2 -98
  181. package/build/project/env.d.ts.map +1 -1
  182. package/build/project/env.js +63 -215
  183. package/build/project/env.js.map +1 -1
  184. package/build/project/marker/types.d.ts +33 -0
  185. package/build/project/marker/types.d.ts.map +1 -0
  186. package/build/project/marker/types.js +2 -0
  187. package/build/project/marker/types.js.map +1 -0
  188. package/build/project/marker.d.ts +4 -25
  189. package/build/project/marker.d.ts.map +1 -1
  190. package/build/project/marker.js +40 -43
  191. package/build/project/marker.js.map +1 -1
  192. package/build/project/probe/types.d.ts +22 -0
  193. package/build/project/probe/types.d.ts.map +1 -0
  194. package/build/project/probe/types.js +2 -0
  195. package/build/project/probe/types.js.map +1 -0
  196. package/build/project/probe.d.ts +4 -0
  197. package/build/project/probe.d.ts.map +1 -0
  198. package/build/project/probe.js +39 -0
  199. package/build/project/probe.js.map +1 -0
  200. package/build/project/report/types.d.ts +18 -0
  201. package/build/project/report/types.d.ts.map +1 -0
  202. package/build/project/report/types.js +2 -0
  203. package/build/project/report/types.js.map +1 -0
  204. package/build/project/report.d.ts +7 -0
  205. package/build/project/report.d.ts.map +1 -0
  206. package/build/project/report.js +68 -0
  207. package/build/project/report.js.map +1 -0
  208. package/build/project/setup/types.d.ts +32 -0
  209. package/build/project/setup/types.d.ts.map +1 -0
  210. package/build/project/setup/types.js +2 -0
  211. package/build/project/setup/types.js.map +1 -0
  212. package/build/project/setup.d.ts +4 -53
  213. package/build/project/setup.d.ts.map +1 -1
  214. package/build/project/setup.js +112 -175
  215. package/build/project/setup.js.map +1 -1
  216. package/build/project/types.d.ts +37 -0
  217. package/build/project/types.d.ts.map +1 -0
  218. package/build/project/types.js +2 -0
  219. package/build/project/types.js.map +1 -0
  220. package/build/run/consts.local.d.ts +3 -0
  221. package/build/run/consts.local.d.ts.map +1 -0
  222. package/build/run/consts.local.js +26 -0
  223. package/build/run/consts.local.js.map +1 -0
  224. package/build/run/index.d.ts +11 -69
  225. package/build/run/index.d.ts.map +1 -1
  226. package/build/run/index.js +9 -147
  227. package/build/run/index.js.map +1 -1
  228. package/build/run/local/types.d.ts +39 -0
  229. package/build/run/local/types.d.ts.map +1 -0
  230. package/build/run/local/types.js +2 -0
  231. package/build/run/local/types.js.map +1 -0
  232. package/build/run/local.d.ts +3 -0
  233. package/build/run/local.d.ts.map +1 -0
  234. package/build/run/local.js +130 -0
  235. package/build/run/local.js.map +1 -0
  236. package/build/run/process/types.d.ts +15 -0
  237. package/build/run/process/types.d.ts.map +1 -0
  238. package/build/run/process/types.js +2 -0
  239. package/build/run/process/types.js.map +1 -0
  240. package/build/run/process.d.ts +4 -0
  241. package/build/run/process.d.ts.map +1 -0
  242. package/build/run/process.js +20 -0
  243. package/build/run/process.js.map +1 -0
  244. package/build/run/serve.d.ts +14 -9
  245. package/build/run/serve.d.ts.map +1 -1
  246. package/build/run/serve.js +1 -25
  247. package/build/run/serve.js.map +1 -1
  248. package/build/run/state/types.d.ts +35 -0
  249. package/build/run/state/types.d.ts.map +1 -0
  250. package/build/run/state/types.js +2 -0
  251. package/build/run/state/types.js.map +1 -0
  252. package/build/run/state.d.ts +3 -62
  253. package/build/run/state.d.ts.map +1 -1
  254. package/build/run/state.js +96 -123
  255. package/build/run/state.js.map +1 -1
  256. package/build/run/types.d.ts +78 -0
  257. package/build/run/types.d.ts.map +1 -0
  258. package/build/run/types.js +2 -0
  259. package/build/run/types.js.map +1 -0
  260. package/build/session/consts.local.d.ts +5 -0
  261. package/build/session/consts.local.d.ts.map +1 -0
  262. package/build/session/consts.local.js +5 -0
  263. package/build/session/consts.local.js.map +1 -0
  264. package/build/session/index.d.ts +5 -10
  265. package/build/session/index.d.ts.map +1 -1
  266. package/build/session/index.js +84 -15
  267. package/build/session/index.js.map +1 -1
  268. package/build/session/questions.d.ts +16 -0
  269. package/build/session/questions.d.ts.map +1 -0
  270. package/build/session/questions.js +17 -0
  271. package/build/session/questions.js.map +1 -0
  272. package/build/session/queue.d.ts +61 -0
  273. package/build/session/queue.d.ts.map +1 -0
  274. package/build/session/queue.js +156 -0
  275. package/build/session/queue.js.map +1 -0
  276. package/build/session/tasks.d.ts +11 -30
  277. package/build/session/tasks.d.ts.map +1 -1
  278. package/build/session/tasks.js +18 -78
  279. package/build/session/tasks.js.map +1 -1
  280. package/build/session/types.d.ts +20 -0
  281. package/build/session/types.d.ts.map +1 -0
  282. package/build/session/types.js +2 -0
  283. package/build/session/types.js.map +1 -0
  284. package/build/task/consts.d.ts +12 -0
  285. package/build/task/consts.d.ts.map +1 -0
  286. package/build/task/consts.js +12 -0
  287. package/build/task/consts.js.map +1 -0
  288. package/build/task/consts.local.d.ts +19 -0
  289. package/build/task/consts.local.d.ts.map +1 -0
  290. package/build/task/consts.local.js +72 -0
  291. package/build/task/consts.local.js.map +1 -0
  292. package/build/task/driver.d.ts +1 -28
  293. package/build/task/driver.d.ts.map +1 -1
  294. package/build/task/driver.js +2 -9
  295. package/build/task/driver.js.map +1 -1
  296. package/build/task/envelope/types.d.ts +29 -0
  297. package/build/task/envelope/types.d.ts.map +1 -0
  298. package/build/task/envelope/types.js +2 -0
  299. package/build/task/envelope/types.js.map +1 -0
  300. package/build/task/envelope.d.ts +4 -34
  301. package/build/task/envelope.d.ts.map +1 -1
  302. package/build/task/envelope.js +103 -165
  303. package/build/task/envelope.js.map +1 -1
  304. package/build/task/index.d.ts +5 -0
  305. package/build/task/index.d.ts.map +1 -1
  306. package/build/task/index.js +2 -0
  307. package/build/task/index.js.map +1 -1
  308. package/build/task/inquiry/types.d.ts +38 -0
  309. package/build/task/inquiry/types.d.ts.map +1 -0
  310. package/build/task/inquiry/types.js +2 -0
  311. package/build/task/inquiry/types.js.map +1 -0
  312. package/build/task/inquiry.d.ts +5 -0
  313. package/build/task/inquiry.d.ts.map +1 -0
  314. package/build/task/inquiry.js +188 -0
  315. package/build/task/inquiry.js.map +1 -0
  316. package/build/task/types.d.ts +48 -0
  317. package/build/task/types.d.ts.map +1 -0
  318. package/build/task/types.js +2 -0
  319. package/build/task/types.js.map +1 -0
  320. package/build/tools/account/types.d.ts +24 -0
  321. package/build/tools/account/types.d.ts.map +1 -0
  322. package/build/tools/account/types.js +2 -0
  323. package/build/tools/account/types.js.map +1 -0
  324. package/build/tools/account.d.ts +4 -0
  325. package/build/tools/account.d.ts.map +1 -0
  326. package/build/tools/account.js +72 -0
  327. package/build/tools/account.js.map +1 -0
  328. package/build/tools/blueprints/types.d.ts +5 -0
  329. package/build/tools/blueprints/types.d.ts.map +1 -0
  330. package/build/tools/blueprints/types.js +2 -0
  331. package/build/tools/blueprints/types.js.map +1 -0
  332. package/build/tools/blueprints.d.ts +4 -0
  333. package/build/tools/blueprints.d.ts.map +1 -0
  334. package/build/tools/blueprints.js +23 -0
  335. package/build/tools/blueprints.js.map +1 -0
  336. package/build/tools/catalogue/types.d.ts +8 -0
  337. package/build/tools/catalogue/types.d.ts.map +1 -0
  338. package/build/tools/catalogue/types.js +2 -0
  339. package/build/tools/catalogue/types.js.map +1 -0
  340. package/build/tools/catalogue.d.ts +8 -6
  341. package/build/tools/catalogue.d.ts.map +1 -1
  342. package/build/tools/catalogue.js +2565 -213
  343. package/build/tools/catalogue.js.map +1 -1
  344. package/build/tools/config/types.d.ts +19 -0
  345. package/build/tools/config/types.d.ts.map +1 -0
  346. package/build/tools/config/types.js +2 -0
  347. package/build/tools/config/types.js.map +1 -0
  348. package/build/tools/config.d.ts +4 -0
  349. package/build/tools/config.d.ts.map +1 -0
  350. package/build/tools/config.js +42 -0
  351. package/build/tools/config.js.map +1 -0
  352. package/build/tools/consts.d.ts +61 -0
  353. package/build/tools/consts.d.ts.map +1 -0
  354. package/build/tools/consts.js +515 -0
  355. package/build/tools/consts.js.map +1 -0
  356. package/build/tools/consts.local.d.ts +131 -0
  357. package/build/tools/consts.local.d.ts.map +1 -0
  358. package/build/tools/consts.local.js +236 -0
  359. package/build/tools/consts.local.js.map +1 -0
  360. package/build/tools/control/types.d.ts +17 -0
  361. package/build/tools/control/types.d.ts.map +1 -0
  362. package/build/tools/control/types.js +2 -0
  363. package/build/tools/control/types.js.map +1 -0
  364. package/build/tools/control.d.ts +4 -0
  365. package/build/tools/control.d.ts.map +1 -0
  366. package/build/tools/control.js +44 -0
  367. package/build/tools/control.js.map +1 -0
  368. package/build/tools/feed/types.d.ts +21 -0
  369. package/build/tools/feed/types.d.ts.map +1 -0
  370. package/build/tools/feed/types.js +2 -0
  371. package/build/tools/feed/types.js.map +1 -0
  372. package/build/tools/feed.d.ts +4 -0
  373. package/build/tools/feed.d.ts.map +1 -0
  374. package/build/tools/feed.js +75 -0
  375. package/build/tools/feed.js.map +1 -0
  376. package/build/tools/git/types.d.ts +25 -0
  377. package/build/tools/git/types.d.ts.map +1 -0
  378. package/build/tools/git/types.js +2 -0
  379. package/build/tools/git/types.js.map +1 -0
  380. package/build/tools/git.d.ts +4 -0
  381. package/build/tools/git.d.ts.map +1 -0
  382. package/build/tools/git.js +83 -0
  383. package/build/tools/git.js.map +1 -0
  384. package/build/tools/handover/types.d.ts +49 -0
  385. package/build/tools/handover/types.d.ts.map +1 -0
  386. package/build/tools/handover/types.js +2 -0
  387. package/build/tools/handover/types.js.map +1 -0
  388. package/build/tools/handover.d.ts +8 -0
  389. package/build/tools/handover.d.ts.map +1 -0
  390. package/build/tools/handover.js +138 -0
  391. package/build/tools/handover.js.map +1 -0
  392. package/build/tools/host/types.d.ts +34 -0
  393. package/build/tools/host/types.d.ts.map +1 -0
  394. package/build/tools/host/types.js +2 -0
  395. package/build/tools/host/types.js.map +1 -0
  396. package/build/tools/host.d.ts +4 -0
  397. package/build/tools/host.d.ts.map +1 -0
  398. package/build/tools/host.js +13 -0
  399. package/build/tools/host.js.map +1 -0
  400. package/build/tools/iam/types.d.ts +44 -0
  401. package/build/tools/iam/types.d.ts.map +1 -0
  402. package/build/tools/iam/types.js +2 -0
  403. package/build/tools/iam/types.js.map +1 -0
  404. package/build/tools/iam.d.ts +4 -0
  405. package/build/tools/iam.d.ts.map +1 -0
  406. package/build/tools/iam.js +229 -0
  407. package/build/tools/iam.js.map +1 -0
  408. package/build/tools/index.d.ts +27 -1
  409. package/build/tools/index.d.ts.map +1 -1
  410. package/build/tools/index.js +14 -1
  411. package/build/tools/index.js.map +1 -1
  412. package/build/tools/inflight/types.d.ts +47 -0
  413. package/build/tools/inflight/types.d.ts.map +1 -0
  414. package/build/tools/inflight/types.js +2 -0
  415. package/build/tools/inflight/types.js.map +1 -0
  416. package/build/tools/inflight.d.ts +3 -0
  417. package/build/tools/inflight.d.ts.map +1 -0
  418. package/build/tools/inflight.js +88 -0
  419. package/build/tools/inflight.js.map +1 -0
  420. package/build/tools/kits/types.d.ts +12 -0
  421. package/build/tools/kits/types.d.ts.map +1 -0
  422. package/build/tools/kits/types.js +2 -0
  423. package/build/tools/kits/types.js.map +1 -0
  424. package/build/tools/kits.d.ts +4 -0
  425. package/build/tools/kits.d.ts.map +1 -0
  426. package/build/tools/kits.js +33 -0
  427. package/build/tools/kits.js.map +1 -0
  428. package/build/tools/mcp.d.ts +13 -19
  429. package/build/tools/mcp.d.ts.map +1 -1
  430. package/build/tools/mcp.js +117 -38
  431. package/build/tools/mcp.js.map +1 -1
  432. package/build/tools/platform.d.ts +14 -0
  433. package/build/tools/platform.d.ts.map +1 -0
  434. package/build/tools/platform.js +90 -0
  435. package/build/tools/platform.js.map +1 -0
  436. package/build/tools/production/types.d.ts +22 -0
  437. package/build/tools/production/types.d.ts.map +1 -0
  438. package/build/tools/production/types.js +2 -0
  439. package/build/tools/production/types.js.map +1 -0
  440. package/build/tools/production.d.ts +4 -0
  441. package/build/tools/production.d.ts.map +1 -0
  442. package/build/tools/production.js +80 -0
  443. package/build/tools/production.js.map +1 -0
  444. package/build/tools/refusal/types.d.ts +95 -0
  445. package/build/tools/refusal/types.d.ts.map +1 -0
  446. package/build/tools/refusal/types.js +2 -0
  447. package/build/tools/refusal/types.js.map +1 -0
  448. package/build/tools/refusal.d.ts +4 -0
  449. package/build/tools/refusal.d.ts.map +1 -0
  450. package/build/tools/refusal.js +663 -0
  451. package/build/tools/refusal.js.map +1 -0
  452. package/build/tools/settings/types.d.ts +42 -0
  453. package/build/tools/settings/types.d.ts.map +1 -0
  454. package/build/tools/settings/types.js +2 -0
  455. package/build/tools/settings/types.js.map +1 -0
  456. package/build/tools/settings.d.ts +4 -0
  457. package/build/tools/settings.d.ts.map +1 -0
  458. package/build/tools/settings.js +71 -0
  459. package/build/tools/settings.js.map +1 -0
  460. package/build/tools/status/types.d.ts +25 -0
  461. package/build/tools/status/types.d.ts.map +1 -0
  462. package/build/tools/status/types.js +2 -0
  463. package/build/tools/status/types.js.map +1 -0
  464. package/build/tools/status.d.ts +4 -0
  465. package/build/tools/status.d.ts.map +1 -0
  466. package/build/tools/status.js +183 -0
  467. package/build/tools/status.js.map +1 -0
  468. package/build/tools/stories/types.d.ts +48 -0
  469. package/build/tools/stories/types.d.ts.map +1 -0
  470. package/build/tools/stories/types.js +2 -0
  471. package/build/tools/stories/types.js.map +1 -0
  472. package/build/tools/stories.d.ts +8 -0
  473. package/build/tools/stories.d.ts.map +1 -0
  474. package/build/tools/stories.js +79 -0
  475. package/build/tools/stories.js.map +1 -0
  476. package/build/tools/types.d.ts +177 -26
  477. package/build/tools/types.d.ts.map +1 -1
  478. package/build/tools/types.js +1 -32
  479. package/build/tools/types.js.map +1 -1
  480. package/build/types.d.ts +391 -26
  481. package/build/types.d.ts.map +1 -1
  482. package/build/utils.d.ts +8 -0
  483. package/build/utils.d.ts.map +1 -0
  484. package/build/utils.js +12 -0
  485. package/build/utils.js.map +1 -0
  486. package/package.json +30 -34
  487. package/build/harness/index.d.ts +0 -28
  488. package/build/harness/index.d.ts.map +0 -1
  489. package/build/harness/index.js +0 -83
  490. package/build/harness/index.js.map +0 -1
  491. package/build/harness/templates.d.ts +0 -30
  492. package/build/harness/templates.d.ts.map +0 -1
  493. package/build/harness/templates.js +0 -154
  494. package/build/harness/templates.js.map +0 -1
  495. package/build/tools/jobs.d.ts +0 -12
  496. package/build/tools/jobs.d.ts.map +0 -1
  497. package/build/tools/jobs.js +0 -47
  498. package/build/tools/jobs.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/executor/glob/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { GlobHelper } from './glob/types.js';
2
+ export declare const createGlobHelper: () => GlobHelper;
3
+ export declare const globHelper: GlobHelper;
4
+ //# sourceMappingURL=glob.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/executor/glob.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,eAAO,MAAM,gBAAgB,QAAO,UASnC,CAAA;AAED,eAAO,MAAM,UAAU,YAAqB,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { globby } from 'globby';
2
+ export const createGlobHelper = () => {
3
+ const list = async (patterns, options = {}) => {
4
+ const all = Array.isArray(patterns) ? patterns : [patterns];
5
+ const ignore = [...(Array.isArray(options.ignore) ? options.ignore : []), ...all.filter(x => x.startsWith('!')).map(x => x.slice(1))];
6
+ return await globby(all.filter(x => !x.startsWith('!')), { ...options, ignore });
7
+ };
8
+ return { list };
9
+ };
10
+ export const globHelper = createGlobHelper();
11
+ //# sourceMappingURL=glob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glob.js","sourceRoot":"","sources":["../../src/executor/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAe,EAAE;IAC/C,MAAM,IAAI,GAAG,KAAK,EAAE,QAA2B,EAAE,OAAO,GAAY,EAAE,EAAqB,EAAE;QAC3F,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;QAC3D,MAAM,MAAM,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAErI,OAAO,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;IAClF,CAAC,CAAA;IAED,OAAO,EAAE,IAAI,EAAE,CAAA;AACjB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,EAAE,CAAA"}
@@ -0,0 +1,39 @@
1
+ import type { TargetHealthInput, TargetHealthProbes, TargetHealthReading } from '../types.js';
2
+ /**
3
+ * Reading the target's own health endpoint, and deciding what its answer means.
4
+ *
5
+ * Two callers need it and they must agree: the boot check, which waits for a boot to resolve one
6
+ * way or the other, and the local run's status, which is the only thing that ever notices a target
7
+ * that came up and then stopped being able to serve. The classifier is pure and the IO is a thin
8
+ * wrapper over it.
9
+ */
10
+ export interface HealthHelper {
11
+ /**
12
+ * What a target's answer means.
13
+ *
14
+ * The order of these checks is the contract, not a style choice:
15
+ *
16
+ * 1. **Identity outranks health.** A leftover process answering `200 ok` is still a leftover, and
17
+ * everything it reports describes the build IT was started with. Terminal, because waiting
18
+ * never turns another process's health into ours — the port has to be taken back.
19
+ * 2. **A non-2xx is a failure even when the body cannot be parsed.** This is what made a target
20
+ * answering 503 with an HTML error page read as *ready*: an unparseable body left `phase`
21
+ * undefined, and undefined meant "an old target that only listens once it is up".
22
+ * 3. **A target that says it failed is terminal**, and its own message is the reason.
23
+ * 4. **A database the target cannot reach is a failure it will not report any other way.** It
24
+ * answers `200 {status:'OK'}` with `db.ok: false`, which by rule 2's fallback would also have
25
+ * read as ready. Not terminal: a database that went away can come back.
26
+ * 5. **A queue store it cannot reach is the same failure with a different dependency** — an app
27
+ * whose jobs cannot be enqueued serves pages and silently does none of the work behind them.
28
+ * 6. Only then does a missing phase mean "an older target, and a reachable port is the answer".
29
+ */
30
+ classifyTargetHealth: (input: TargetHealthInput) => TargetHealthReading;
31
+ /**
32
+ * Ask the target how it is, and classify the answer.
33
+ *
34
+ * The TCP probe runs first and short-circuits: there is no point spending a request timeout on a
35
+ * port nothing is listening on, and a target mid-restart is exactly when this is called most.
36
+ */
37
+ readTargetHealth: (port: number, bootId: string, timeoutMs: number, probes?: TargetHealthProbes) => Promise<TargetHealthReading>;
38
+ }
39
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/executor/health/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAE7F;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;;;;;;;;;;;;OAkBG;IACH,oBAAoB,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,mBAAmB,CAAA;IACvE;;;;;OAKG;IACH,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,kBAAkB,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAA;CACjI"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/executor/health/types.ts"],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import type { HealthHelper } from './health/types.js';
1
2
  /**
2
3
  * Reading the target's own health endpoint, and deciding what its answer means.
3
4
  *
@@ -6,87 +7,6 @@
6
7
  * that came up and then stopped being able to serve. The classifier is pure and the IO is a thin
7
8
  * wrapper over it.
8
9
  */
9
- /** The shape a target's `/api/healtz` answers with. Every field is optional by contract. */
10
- export interface TargetHealthBody {
11
- phase?: string;
12
- error?: string;
13
- bootId?: string;
14
- db?: {
15
- ok?: boolean;
16
- error?: string;
17
- summary?: string;
18
- };
19
- /**
20
- * The target's own verdict on its job queue store, reported exactly like `db`.
21
- *
22
- * Absent from every target that has no queue — most of them — so an omitted value means
23
- * "nothing to report", never "unhealthy".
24
- */
25
- valkey?: {
26
- ok?: boolean;
27
- error?: string;
28
- summary?: string;
29
- };
30
- }
31
- export interface TargetHealthInput {
32
- /** Boot id handed to the current child; '' when none was minted. */
33
- bootId: string;
34
- /** Whether a TCP connect to the port succeeded at all. */
35
- listening: boolean;
36
- /** HTTP status of the answer; null when the request never completed. */
37
- status: number | null;
38
- /** Parsed body, or null when there was none or it was not JSON. */
39
- body: TargetHealthBody | null;
40
- /** Why the request failed, when it did. */
41
- failure?: string;
42
- }
43
- export interface TargetHealthReading {
44
- /** The target says it is serving. */
45
- ready: boolean;
46
- /** No amount of waiting changes this answer — the caller must act. */
47
- terminal: boolean;
48
- /** Human-readable cause, '' when ready. */
49
- reason: string;
50
- /** The answer came from a process this connector did not start. */
51
- foreign: boolean;
52
- /** The phase the target reported, when it reported one. */
53
- phase?: string;
54
- dbOk?: boolean;
55
- valkeyOk?: boolean;
56
- }
57
- /** Where the api answers. The worker has a health port but no api base in front of it. */
58
- export declare const TARGET_HEALTH_PATH = "/api/healtz";
59
- /**
60
- * What a target's answer means.
61
- *
62
- * The order of these checks is the contract, not a style choice:
63
- *
64
- * 1. **Identity outranks health.** A leftover process answering `200 ok` is still a leftover, and
65
- * everything it reports describes the build IT was started with. Terminal, because waiting
66
- * never turns another process's health into ours — the port has to be taken back.
67
- * 2. **A non-2xx is a failure even when the body cannot be parsed.** This is what made a target
68
- * answering 503 with an HTML error page read as *ready*: an unparseable body left `phase`
69
- * undefined, and undefined meant "an old target that only listens once it is up".
70
- * 3. **A target that says it failed is terminal**, and its own message is the reason.
71
- * 4. **A database the target cannot reach is a failure it will not report any other way.** It
72
- * answers `200 {status:'OK'}` with `db.ok: false`, which by rule 2's fallback would also have
73
- * read as ready. Not terminal: a database that went away can come back.
74
- * 5. **A queue store it cannot reach is the same failure with a different dependency** — an app
75
- * whose jobs cannot be enqueued serves pages and silently does none of the work behind them.
76
- * 6. Only then does a missing phase mean "an older target, and a reachable port is the answer".
77
- */
78
- export declare const classifyTargetHealth: (input: TargetHealthInput) => TargetHealthReading;
79
- export interface TargetHealthProbes {
80
- probe?: (port: number) => Promise<boolean>;
81
- fetch?: typeof globalThis.fetch;
82
- /** The worker answers the same contract at a path of its own. */
83
- path?: string;
84
- }
85
- /**
86
- * Ask the target how it is, and classify the answer.
87
- *
88
- * The TCP probe runs first and short-circuits: there is no point spending a request timeout on a
89
- * port nothing is listening on, and a target mid-restart is exactly when this is called most.
90
- */
91
- export declare const readTargetHealth: (port: number, bootId: string, timeoutMs: number, probes?: TargetHealthProbes) => Promise<TargetHealthReading>;
10
+ export declare const createHealthHelper: () => HealthHelper;
11
+ export declare const healthHelper: HealthHelper;
92
12
  //# sourceMappingURL=health.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../src/executor/health.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,4FAA4F;AAC5F,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MA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O,UAAU,CAAC,KAAK,CAAA;IAC/B,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,SACrB,MAAM,UAAU,MAAM,aAAa,MAAM,WAAU,kBAAkB,KAC1E,OAAO,CAAC,mBAAmB,CAwB7B,CAAA"}
1
+ {"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../src/executor/health.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD;;;;;;;GAOG;AAEH,eAAO,MAAM,kBAAkB,QAAO,YAoGrC,CAAA;AAED,eAAO,MAAM,YAAY,cAAuB,CAAA"}
@@ -1,98 +1,83 @@
1
- import { TARGET_API_BASE } from '@owlmeans/viable-common';
2
- import { probeListening } from './spawn.js';
3
- /** Where the api answers. The worker has a health port but no api base in front of it. */
4
- export const TARGET_HEALTH_PATH = `/${TARGET_API_BASE}/healtz`;
5
- const ok = () => ({ ready: true, terminal: false, reason: '', foreign: false });
6
- const not = (reason, terminal = false, extra = {}) => ({ ready: false, terminal, reason, foreign: false, ...extra });
1
+ import { spawnHelper } from './spawn.js';
2
+ import { TARGET_HEALTH_PATH } from './consts.js';
7
3
  /**
8
- * What a target's answer means.
4
+ * Reading the target's own health endpoint, and deciding what its answer means.
9
5
  *
10
- * The order of these checks is the contract, not a style choice:
11
- *
12
- * 1. **Identity outranks health.** A leftover process answering `200 ok` is still a leftover, and
13
- * everything it reports describes the build IT was started with. Terminal, because waiting
14
- * never turns another process's health into ours — the port has to be taken back.
15
- * 2. **A non-2xx is a failure even when the body cannot be parsed.** This is what made a target
16
- * answering 503 with an HTML error page read as *ready*: an unparseable body left `phase`
17
- * undefined, and undefined meant "an old target that only listens once it is up".
18
- * 3. **A target that says it failed is terminal**, and its own message is the reason.
19
- * 4. **A database the target cannot reach is a failure it will not report any other way.** It
20
- * answers `200 {status:'OK'}` with `db.ok: false`, which by rule 2's fallback would also have
21
- * read as ready. Not terminal: a database that went away can come back.
22
- * 5. **A queue store it cannot reach is the same failure with a different dependency** — an app
23
- * whose jobs cannot be enqueued serves pages and silently does none of the work behind them.
24
- * 6. Only then does a missing phase mean "an older target, and a reachable port is the answer".
6
+ * Two callers need it and they must agree: the boot check, which waits for a boot to resolve one
7
+ * way or the other, and the local run's status, which is the only thing that ever notices a target
8
+ * that came up and then stopped being able to serve. The classifier is pure and the IO is a thin
9
+ * wrapper over it.
25
10
  */
26
- export const classifyTargetHealth = (input) => {
27
- if (!input.listening) {
28
- return not('The target backend is running but never bound its port');
29
- }
30
- if (input.failure != null) {
31
- // A timeout is materially different from a refused connection: the port answered, so
32
- // something is there — it just cannot serve its own health endpoint. Say which.
33
- const timedOut = /timeout|aborted/i.test(input.failure);
34
- return not(timedOut
35
- ? 'The target backend bound its port but its health endpoint did not answer in time'
36
- : `The target backend health check failed: ${input.failure}`);
37
- }
38
- const body = input.body;
39
- if (input.bootId !== '' && typeof body?.bootId === 'string' && body.bootId !== ''
40
- && body.bootId !== input.bootId) {
41
- return not('The backend port is held by a leftover process running an older build', true, { foreign: true, phase: body.phase });
42
- }
43
- if (input.status != null && (input.status < 200 || input.status >= 300)) {
44
- const detail = body?.error ?? body?.db?.error;
45
- return not(`The target backend health endpoint answered ${input.status}`
46
- + (detail != null && detail !== '' ? `: ${detail}` : ''), false, { phase: body?.phase });
47
- }
48
- if (body?.phase === 'failed') {
49
- const reason = body.error ?? body.db?.error ?? body.valkey?.error ?? 'unknown error';
50
- return not(`The target backend failed to initialize: ${reason}`, true, {
11
+ export const createHealthHelper = () => {
12
+ const ok = () => ({ ready: true, terminal: false, reason: '', foreign: false });
13
+ const not = (reason, terminal = false, extra = {}) => ({ ready: false, terminal, reason, foreign: false, ...extra });
14
+ const classifyTargetHealth = (input) => {
15
+ if (!input.listening) {
16
+ return not('The target backend is running but never bound its port');
17
+ }
18
+ if (input.failure != null) {
19
+ // A timeout is materially different from a refused connection: the port answered, so
20
+ // something is there — it just cannot serve its own health endpoint. Say which.
21
+ const timedOut = /timeout|aborted/i.test(input.failure);
22
+ return not(timedOut
23
+ ? 'The target backend bound its port but its health endpoint did not answer in time'
24
+ : `The target backend health check failed: ${input.failure}`);
25
+ }
26
+ const body = input.body;
27
+ if (input.bootId !== '' && typeof body?.bootId === 'string' && body.bootId !== ''
28
+ && body.bootId !== input.bootId) {
29
+ return not('The backend port is held by a leftover process running an older build', true, { foreign: true, phase: body.phase });
30
+ }
31
+ if (input.status != null && (input.status < 200 || input.status >= 300)) {
32
+ const detail = body?.error ?? body?.db?.error;
33
+ return not(`The target backend health endpoint answered ${input.status}`
34
+ + (detail != null && detail !== '' ? `: ${detail}` : ''), false, { phase: body?.phase });
35
+ }
36
+ if (body?.phase === 'failed') {
37
+ const reason = body.error ?? body.db?.error ?? body.valkey?.error ?? 'unknown error';
38
+ return not(`The target backend failed to initialize: ${reason}`, true, {
39
+ phase: body.phase, dbOk: body.db?.ok, valkeyOk: body.valkey?.ok,
40
+ });
41
+ }
42
+ if (body?.db?.ok === false) {
43
+ const detail = body.db.error ?? body.db.summary ?? 'unknown error';
44
+ return not(`The target backend cannot reach its database: ${detail}`, false, {
45
+ phase: body.phase, dbOk: false, valkeyOk: body.valkey?.ok,
46
+ });
47
+ }
48
+ if (body?.valkey?.ok === false) {
49
+ const detail = body.valkey.error ?? body.valkey.summary ?? 'unknown error';
50
+ return not(`The target backend cannot reach its queue store: ${detail}`, false, {
51
+ phase: body.phase, dbOk: body.db?.ok, valkeyOk: false,
52
+ });
53
+ }
54
+ if (body?.phase == null || body.phase === 'ready') {
55
+ return { ...ok(), phase: body?.phase, dbOk: body?.db?.ok, valkeyOk: body?.valkey?.ok };
56
+ }
57
+ return not('The target backend is still initializing', false, {
51
58
  phase: body.phase, dbOk: body.db?.ok, valkeyOk: body.valkey?.ok,
52
59
  });
53
- }
54
- if (body?.db?.ok === false) {
55
- const detail = body.db.error ?? body.db.summary ?? 'unknown error';
56
- return not(`The target backend cannot reach its database: ${detail}`, false, {
57
- phase: body.phase, dbOk: false, valkeyOk: body.valkey?.ok,
58
- });
59
- }
60
- if (body?.valkey?.ok === false) {
61
- const detail = body.valkey.error ?? body.valkey.summary ?? 'unknown error';
62
- return not(`The target backend cannot reach its queue store: ${detail}`, false, {
63
- phase: body.phase, dbOk: body.db?.ok, valkeyOk: false,
64
- });
65
- }
66
- if (body?.phase == null || body.phase === 'ready') {
67
- return { ...ok(), phase: body?.phase, dbOk: body?.db?.ok, valkeyOk: body?.valkey?.ok };
68
- }
69
- return not('The target backend is still initializing', false, {
70
- phase: body.phase, dbOk: body.db?.ok, valkeyOk: body.valkey?.ok,
71
- });
72
- };
73
- /**
74
- * Ask the target how it is, and classify the answer.
75
- *
76
- * The TCP probe runs first and short-circuits: there is no point spending a request timeout on a
77
- * port nothing is listening on, and a target mid-restart is exactly when this is called most.
78
- */
79
- export const readTargetHealth = async (port, bootId, timeoutMs, probes = {}) => {
80
- const probe = probes.probe ?? probeListening;
81
- const doFetch = probes.fetch ?? globalThis.fetch;
82
- if (!await probe(port)) {
83
- return classifyTargetHealth({ bootId, listening: false, status: null, body: null });
84
- }
85
- try {
86
- const response = await doFetch(`http://127.0.0.1:${port}${probes.path ?? TARGET_HEALTH_PATH}`, { signal: AbortSignal.timeout(timeoutMs) });
87
- const body = await response.json().catch(() => null);
88
- return classifyTargetHealth({ bootId, listening: true, status: response.status, body });
89
- }
90
- catch (e) {
91
- const error = e;
92
- return classifyTargetHealth({
93
- bootId, listening: true, status: null, body: null,
94
- failure: error?.name === 'TimeoutError' ? 'TimeoutError' : String(error?.message ?? e),
95
- });
96
- }
60
+ };
61
+ const readTargetHealth = async (port, bootId, timeoutMs, probes = {}) => {
62
+ const probe = probes.probe ?? spawnHelper.probeListening;
63
+ const doFetch = probes.fetch ?? globalThis.fetch;
64
+ if (!await probe(port)) {
65
+ return classifyTargetHealth({ bootId, listening: false, status: null, body: null });
66
+ }
67
+ try {
68
+ const response = await doFetch(`http://127.0.0.1:${port}${probes.path ?? TARGET_HEALTH_PATH}`, { signal: AbortSignal.timeout(timeoutMs) });
69
+ const body = await response.json().catch(() => null);
70
+ return classifyTargetHealth({ bootId, listening: true, status: response.status, body });
71
+ }
72
+ catch (e) {
73
+ const error = e;
74
+ return classifyTargetHealth({
75
+ bootId, listening: true, status: null, body: null,
76
+ failure: error?.name === 'TimeoutError' ? 'TimeoutError' : String(error?.message ?? e),
77
+ });
78
+ }
79
+ };
80
+ return { classifyTargetHealth, readTargetHealth };
97
81
  };
82
+ export const healthHelper = createHealthHelper();
98
83
  //# sourceMappingURL=health.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"health.js","sourceRoot":"","sources":["../../src/executor/health.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAsD3C,0FAA0F;AAC1F,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,eAAe,SAAS,CAAA;AAE9D,MAAM,EAAE,GAAG,GAAwB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAA;AAEpG,MAAM,GAAG,GAAG,CACV,MAAc,EAAE,QAAQ,GAAG,KAAK,EAAE,KAAK,GAAiC,EAAE,EACrD,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC,CAAA;AAExF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAwB,EAAuB,EAAE;IACpF,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;QACrB,OAAO,GAAG,CAAC,wDAAwD,CAAC,CAAA;IACtE,CAAC;IAED,IA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AAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,KAAK,GAAG,CAAU,CAAA;YAExB,OAAO,oBAAoB,CAAC;gBAC1B,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;gBACjD,OAAO,EAAE,KAAK,EAAE,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,IAAI,CAAC,CAAC;aACvF,CAAC,CAAA;QACJ,CAAC;IACH,CAAC,CAAA;IAED,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,CAAA;AACnD,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,EAAE,CAAA"}
@@ -1,27 +1,25 @@
1
- import type { SlotCommandPayload, TargetIntegrityReport, TargetPaths } from '@owlmeans/viable-common';
1
+ import type { LocalSlotExecutor, LocalSlotExecutorOptions } from './types.js';
2
2
  export * from './errors.js';
3
3
  export * from './layout.js';
4
+ export type * from './layout/types.js';
4
5
  export * from './integrity.js';
6
+ export type * from './integrity/types.js';
5
7
  export * from './files.js';
8
+ export type * from './files/types.js';
9
+ export type * from './types.js';
6
10
  export * from './env.js';
11
+ export type * from './env/types.js';
7
12
  export * from './health.js';
13
+ export type * from './health/types.js';
14
+ export * from './consts.js';
8
15
  export * from './boot-check.js';
9
16
  export * from './shell.js';
17
+ export type * from './shell/types.js';
10
18
  export * from './git.js';
11
- export { BUILD_TIMEOUT, MAX_OUTPUT_BUFFER, failureOutput, isAlive, killGroupAndWait, probeListening, runCommand, runScript, signalGroup, waitForPortFree, withDeadline } from './spawn.js';
12
- export interface LocalSlotExecutorOptions {
13
- /** Where the executor's own diagnostics go. NEVER stdout for a stdio MCP server. */
14
- log?: (line: string) => void;
15
- }
16
- export interface LocalSlotExecutor {
17
- /** Answer one slot command against the local tree. */
18
- execute: (payload: SlotCommandPayload) => Promise<unknown>;
19
- /** Which tree this directory holds, re-read per call. */
20
- layout: () => TargetPaths;
21
- /** Whether the tree is still the generated application. */
22
- integrity: () => Promise<TargetIntegrityReport>;
23
- dir: string;
24
- }
19
+ export type * from './git/types.js';
20
+ export * from './spawn.js';
21
+ export type * from './spawn/types.js';
22
+ export { BUILD_TIMEOUT, MAX_OUTPUT_BUFFER } from './consts.js';
25
23
  /**
26
24
  * Answer the platform's slot commands against a directory on this machine.
27
25
  *
@@ -36,4 +34,5 @@ export interface LocalSlotExecutor {
36
34
  * directory that no longer exists.
37
35
  */
38
36
  export declare const makeLocalSlotExecutor: (dir: string, opts?: LocalSlotExecutorOptions) => LocalSlotExecutor;
37
+ export type { LocalSlotExecutor, LocalSlotExecutorOptions } from './types.js';
39
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/executor/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,kBAAkB,EAAoD,qBAAqB,EAC3F,WAAW,EACZ,MAAM,yBAAyB,CAAA;AAShC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EACL,aAAa,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAC1F,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAClE,MAAM,YAAY,CAAA;AAEnB,MAAM,WAAW,wBAAwB;IACvC,oFAAoF;IACpF,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,OA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,YAAY,CAAA"}
@@ -1,21 +1,23 @@
1
1
  import p from 'node:path';
2
- import { commandDeadline, SlotCommandType, SlotFileCommand, SlotGitCommand, SlotShellCommand } from '@owlmeans/viable-common';
2
+ import { SlotCommandType, SlotFileCommand, SlotGitCommand, SlotShellCommand, slotCommandHelper } from '@owlmeans/viable-common';
3
3
  import { createLocalFileHelper } from './files.js';
4
- import { dispatchGitCommand } from './git.js';
5
- import { forgetIntegrity, verifyTarget } from './integrity.js';
6
- import { targetPaths } from './layout.js';
4
+ import { makeLocalGitHelper } from './git.js';
5
+ import { integrityHelper } from './integrity.js';
6
+ import { makeLayoutHelper } from './layout.js';
7
7
  import { createLocalShellHelper } from './shell.js';
8
- import { withDeadline } from './spawn.js';
8
+ import { spawnHelper } from './spawn.js';
9
9
  export * from './errors.js';
10
10
  export * from './layout.js';
11
11
  export * from './integrity.js';
12
12
  export * from './files.js';
13
13
  export * from './env.js';
14
14
  export * from './health.js';
15
+ export * from './consts.js';
15
16
  export * from './boot-check.js';
16
17
  export * from './shell.js';
17
18
  export * from './git.js';
18
- export { BUILD_TIMEOUT, MAX_OUTPUT_BUFFER, failureOutput, isAlive, killGroupAndWait, probeListening, runCommand, runScript, signalGroup, waitForPortFree, withDeadline } from './spawn.js';
19
+ export * from './spawn.js';
20
+ export { BUILD_TIMEOUT, MAX_OUTPUT_BUFFER } from './consts.js';
19
21
  /**
20
22
  * Answer the platform's slot commands against a directory on this machine.
21
23
  *
@@ -36,21 +38,21 @@ export const makeLocalSlotExecutor = (dir, opts = {}) => {
36
38
  const fileHelper = createLocalFileHelper(root);
37
39
  const shellHelper = createLocalShellHelper(fileHelper, args?.subproject);
38
40
  log(`Executing command [${type}]: ${command}`);
39
- return await withDeadline(`${type}:${command}`, commandDeadline(type, command), async () => {
41
+ return await spawnHelper.withDeadline(`${type}:${command}`, slotCommandHelper.commandDeadline(type, command), async () => {
40
42
  switch (type) {
41
43
  case SlotCommandType.Files:
42
44
  switch (command) {
43
45
  case SlotFileCommand.EmptyProject:
44
46
  await fileHelper.emptyProject(args?.ignore);
45
- forgetIntegrity();
47
+ integrityHelper.forgetIntegrity();
46
48
  return {};
47
49
  case SlotFileCommand.DeleteProject:
48
50
  await fileHelper.deleteProject();
49
- forgetIntegrity();
51
+ integrityHelper.forgetIntegrity();
50
52
  return {};
51
53
  case SlotFileCommand.InitializeProject:
52
54
  await fileHelper.initializeProject();
53
- forgetIntegrity();
55
+ integrityHelper.forgetIntegrity();
54
56
  return {};
55
57
  case SlotFileCommand.GetSourceList:
56
58
  return await fileHelper.getSourceList(args?.pattern, args?.options);
@@ -66,15 +68,31 @@ export const makeLocalSlotExecutor = (dir, opts = {}) => {
66
68
  return await fileHelper.readSources(args?.files);
67
69
  case SlotFileCommand.WriteFile:
68
70
  await fileHelper.writeFile(args?.filePath, args?.content);
69
- forgetIntegrity();
71
+ integrityHelper.forgetIntegrity();
70
72
  return {};
71
73
  case SlotFileCommand.WriteSource:
72
74
  await fileHelper.writeSource(args?.file);
73
- forgetIntegrity();
75
+ integrityHelper.forgetIntegrity();
74
76
  return {};
75
77
  case SlotFileCommand.DeleteFile:
76
78
  await fileHelper.deleteFile(args?.filePath, args?.noThrow);
77
- forgetIntegrity();
79
+ integrityHelper.forgetIntegrity();
80
+ return {};
81
+ case SlotFileCommand.StatTree:
82
+ return await fileHelper.statTree(args?.dir, args?.limit);
83
+ case SlotFileCommand.ReadHead:
84
+ // `{ result }`, exactly like ReadFile: the platform's remote helper reads one field
85
+ // for "the text of a file", and a second shape for the same thing would be a second
86
+ // parser to keep in step.
87
+ return { result: await fileHelper.readHead(args?.path, args?.bytes) };
88
+ case SlotFileCommand.Relocate: {
89
+ const result = await fileHelper.relocate(args?.dir, args?.keep);
90
+ integrityHelper.forgetIntegrity();
91
+ return result;
92
+ }
93
+ case SlotFileCommand.RemoveTree:
94
+ await fileHelper.removeTree(args?.dir);
95
+ integrityHelper.forgetIntegrity();
78
96
  return {};
79
97
  case SlotFileCommand.FindFilesWithEnvVars:
80
98
  return await fileHelper.findFilesWithEnvVars(args?.frontend);
@@ -101,7 +119,7 @@ export const makeLocalSlotExecutor = (dir, opts = {}) => {
101
119
  const result = await shellHelper.build();
102
120
  // The tree changed, so the next spawn re-reads it rather than trusting the verdict
103
121
  // this build was admitted on.
104
- forgetIntegrity();
122
+ integrityHelper.forgetIntegrity();
105
123
  return { result };
106
124
  }
107
125
  case SlotShellCommand.ValidateBackend:
@@ -134,11 +152,11 @@ export const makeLocalSlotExecutor = (dir, opts = {}) => {
134
152
  throw new Error(`Unknown command: ${command}`);
135
153
  }
136
154
  case SlotCommandType.Git: {
137
- const result = await dispatchGitCommand(root, command, args);
155
+ const result = await makeLocalGitHelper(root).dispatchGitCommand(command, args);
138
156
  if (command === SlotGitCommand.Discard || command === SlotGitCommand.RevertTo) {
139
157
  // Both rewrite the working tree wholesale, so the memoized verdict describes a tree
140
158
  // that no longer exists.
141
- forgetIntegrity();
159
+ integrityHelper.forgetIntegrity();
142
160
  }
143
161
  return result;
144
162
  }
@@ -149,8 +167,8 @@ export const makeLocalSlotExecutor = (dir, opts = {}) => {
149
167
  };
150
168
  return {
151
169
  execute,
152
- layout: () => targetPaths(root),
153
- integrity: async () => await verifyTarget(root),
170
+ layout: () => makeLayoutHelper(root).targetPaths(),
171
+ integrity: async () => await integrityHelper.verifyTarget(root),
154
172
  dir: root,
155
173
  };
156
174
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/executor/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,WAAW,CAAA;AAEzB,OAAO,EACL,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EACpF,MAAM,yBAAyB,CAAA;AAMhC,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,gBAAgB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