@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
@@ -1,7 +1,6 @@
1
1
  import { SubProject } from '@owlmeans/viable-common';
2
- import type { SlotShellResult } from '@owlmeans/viable-common';
3
- import type { BootCheckReport, BootCheckStatus } from './boot-check.js';
4
- import type { LocalFileHelper } from './files.js';
2
+ import type { LocalFileHelper } from './files/types.js';
3
+ import type { LocalShellHelper } from './shell/types.js';
5
4
  /**
6
5
  * The shell half of the local executor — every `SlotShellCommand`, against a directory.
7
6
  *
@@ -9,81 +8,7 @@ import type { LocalFileHelper } from './files.js';
9
8
  * success**. It is not a transcript — a command that fails returns the diagnostics a fixer or a
10
9
  * person can act on, and a command that succeeds returns nothing at all.
11
10
  */
12
- /**
13
- * The one reason a script refuses that is NOT a verdict about the code.
14
- *
15
- * A build with nothing to build on is an ordinary no-op that the next trigger repeats correctly —
16
- * it happens between attaching to a fresh clone and the first install. It must not be reported as
17
- * a failed build, or the connector announces broken code during a window in which nothing was
18
- * even attempted.
19
- */
20
- export declare const NOT_INSTALLED_REASON = "cannot run: the target's dependencies are not installed yet";
21
11
  /** Whether a refusal describes the code, or merely a window in which nothing ran. */
22
12
  export declare const isBuildVerdict: (reason: string | null) => boolean;
23
- export declare const createLocalShellHelper: (fileHelper: LocalFileHelper, subproject?: SubProject) => {
24
- bun: (args?: string, options?: {
25
- subproject?: SubProject;
26
- }) => Promise<string | null>;
27
- /**
28
- * Throw the lockfile away and install again.
29
- *
30
- * The truncate is the point. `bun install` on its own reproduces whatever the lockfile says,
31
- * and a target's lockfile was written the day the project was created — so a framework
32
- * package republished afterwards is invisible to it no matter how often the target is
33
- * rebuilt. Emptied rather than deleted, matching initialization: bun reads an empty file as
34
- * "no lockfile", so a failed install leaves a state the next attempt resolves cleanly instead
35
- * of one where a stale lock has come back.
36
- */
37
- reinstall: () => Promise<string | null>;
38
- buildCommon: () => Promise<string | null>;
39
- validate: (subprojectOverride?: SubProject) => Promise<string | null>;
40
- /** The buildability check for the UI: the browser bundle really built, or the reason it did not. */
41
- validateWithRenderer: () => Promise<string | null>;
42
- /**
43
- * Rebuild the whole target, in dependency order.
44
- *
45
- * The libraries first, because everything else resolves them from `node_modules` at RUN time
46
- * and follows each to its `build/index.js` — a bundle built before them starts with
47
- * `Cannot find package '<slug>-backend'`, a message about a dependency for a build that never
48
- * happened. The remaining three are independent, so all of them run and their problems are
49
- * reported together rather than one round trip at a time.
50
- */
51
- build: () => Promise<string | null>;
52
- /** Build the api only — the type check the frontend renderer build cannot give it. */
53
- validateBackend: () => Promise<string | null>;
54
- /**
55
- * Reconcile the target's database with its code.
56
- *
57
- * The target owns its own structure: every `@owlmeans/postgres` resource creates and updates
58
- * its table while the context initializes. So a sync is not a command run against the source
59
- * tree — it is *check that the database is there, then restart the backend* — and there is
60
- * nothing to generate and no migration file to apply.
61
- *
62
- * A local target's database is the developer's. The platform provisions none, so an absent
63
- * URL is reported by NAME rather than repaired: it is a line the person has to write, and
64
- * "database unavailable" would send them looking at a server instead.
65
- */
66
- dbSync: () => Promise<string | null>;
67
- /**
68
- * Answering, not enforcing.
69
- *
70
- * The connector refuses on its own before every spawn regardless; this exists so a caller can
71
- * ask BEFORE letting a merge reach a build, and report the violations to the person whose
72
- * repository they belong to.
73
- */
74
- integrity: () => Promise<SlotShellResult>;
75
- /**
76
- * Start a real boot in isolation and return at once.
77
- *
78
- * A second start joins the running check rather than spawning another instance onto the port.
79
- * The verdict is read with {@link bootCheckStatus}; `wait` is the legacy blocking path for a
80
- * caller that predates the job.
81
- */
82
- bootCheck: (options?: {
83
- skipBuild?: boolean;
84
- wait?: boolean;
85
- }) => Promise<BootCheckReport | null>;
86
- bootCheckStatus: () => Promise<BootCheckStatus>;
87
- };
88
- export type LocalShellHelper = ReturnType<typeof createLocalShellHelper>;
13
+ export declare const createLocalShellHelper: (fileHelper: LocalFileHelper, subproject?: SubProject) => LocalShellHelper;
89
14
  //# sourceMappingURL=shell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../src/executor/shell.ts"],"names":[],"mappings":"AAIA,OAAO,EACkB,UAAU,EAElC,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAK9D,OAAO,KAAK,EAAgB,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAErF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAKjD;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,gEAAgE,CAAA;AAEjG,qFAAqF;AACrF,eAAO,MAAM,cAAc,WAAY,MAAM,GAAG,IAAI,KAAG,OACG,CAAA;AAqB1D,eAAO,MAAM,sBAAsB,eAAgB,eAAe,eAAe,UAAU;iBA+EpE,MAAM,YAAY;QAAE,UAAU,CAAC,EAAE,UAAU,CAAA;KAAE,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IASzF;;;;;;;;;OASG;qBACkB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;uBAapB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;oCAOP,UAAU,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAgBzE,oGAAoG;gCACpE,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAGtD;;;;;;;;OAQG;iBACc,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAevC,sFAAsF;2BAC3D,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAGjD;;;;;;;;;;;OAWG;kBACe,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAoBxC;;;;;;OAMG;qBACkB,OAAO,CAAC,eAAe,CAAC;IAU7C;;;;;;OAMG;0BAEQ;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,KAC/C,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;2BA0CP,OAAO,CAAC,eAAe,CAAC;CAItD,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
1
+ {"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../src/executor/shell.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAwH,MAAM,yBAAyB,CAAA;AAQ1K,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAOxD;;;;;;GAMG;AAEH,qFAAqF;AACrF,eAAO,MAAM,cAAc,WAAY,MAAM,GAAG,IAAI,KAAG,OACG,CAAA;AAqB1D,eAAO,MAAM,sBAAsB,eAAgB,eAAe,eAAe,UAAU,KAAG,gBAwP7F,CAAA"}
@@ -1,14 +1,17 @@
1
1
  import fs from 'fs-extra';
2
2
  import { randomUUID } from 'node:crypto';
3
3
  import p from 'node:path';
4
- import { formatIntegrityReport, TARGET_BOOTCHECK_MARKER, TARGET_BOOTCHECK_PORT, TARGET_BOOTCHECK_SCHEMA } from '@owlmeans/viable-common';
5
- import { probePort, readEnvFile, ROOT_ENV_FILE, serviceEndpoint } from '../project/env.js';
6
- import { restartApi } from '../run/state.js';
4
+ import { TARGET_BOOTCHECK_MARKER, TARGET_BOOTCHECK_PORT, TARGET_BOOTCHECK_SCHEMA, targetIntegrityHelper } from '@owlmeans/viable-common';
5
+ import { makeProjectEnvHelper } from '../project/env.js';
6
+ import { probeHelper } from '../project/probe.js';
7
+ import { ROOT_ENV_FILE } from '../project/consts.js';
8
+ import { makeRunStateHelper } from '../run/state.js';
7
9
  import { createBootCheckJob, runBootCheck } from './boot-check.js';
8
- import { backendEnv, frontendEnv } from './env.js';
9
- import { verifyTarget } from './integrity.js';
10
- import { apiPath, hasWorker, libraryPaths, webPath, workerPath } from './layout.js';
11
- import { runCommand, runScript } from './spawn.js';
10
+ import { makeTargetEnvHelper } from './env.js';
11
+ import { integrityHelper } from './integrity.js';
12
+ import { makeLayoutHelper } from './layout.js';
13
+ import { spawnHelper } from './spawn.js';
14
+ import { NOT_INSTALLED_REASON } from './consts.js';
12
15
  /**
13
16
  * The shell half of the local executor — every `SlotShellCommand`, against a directory.
14
17
  *
@@ -16,15 +19,6 @@ import { runCommand, runScript } from './spawn.js';
16
19
  * success**. It is not a transcript — a command that fails returns the diagnostics a fixer or a
17
20
  * person can act on, and a command that succeeds returns nothing at all.
18
21
  */
19
- /**
20
- * The one reason a script refuses that is NOT a verdict about the code.
21
- *
22
- * A build with nothing to build on is an ordinary no-op that the next trigger repeats correctly —
23
- * it happens between attaching to a fresh clone and the first install. It must not be reported as
24
- * a failed build, or the connector announces broken code during a window in which nothing was
25
- * even attempted.
26
- */
27
- export const NOT_INSTALLED_REASON = "cannot run: the target's dependencies are not installed yet";
28
22
  /** Whether a refusal describes the code, or merely a window in which nothing ran. */
29
23
  export const isBuildVerdict = (reason) => reason == null || !reason.includes(NOT_INSTALLED_REASON);
30
24
  /**
@@ -45,6 +39,9 @@ const jobFor = (dir) => {
45
39
  };
46
40
  export const createLocalShellHelper = (fileHelper, subproject) => {
47
41
  const root = p.resolve(fileHelper.getRootPath());
42
+ const layout = makeLayoutHelper(root);
43
+ const targetEnv = makeTargetEnvHelper(root);
44
+ const projectEnv = makeProjectEnvHelper(root);
48
45
  /**
49
46
  * Refuse to run anything in a tree that is no longer the generated application.
50
47
  *
@@ -57,11 +54,11 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
57
54
  * answers with. A caller needs no new branch to notice.
58
55
  */
59
56
  const refusal = async (prefix = 'Refused') => {
60
- const report = await verifyTarget(root);
57
+ const report = await integrityHelper.verifyTarget(root);
61
58
  return report.ok
62
59
  ? null
63
60
  : `${prefix}: the project in this directory is not a Viable application\n`
64
- + formatIntegrityReport(report);
61
+ + targetIntegrityHelper.formatIntegrityReport(report);
65
62
  };
66
63
  /**
67
64
  * Everything that must be true before a script may be spawned, in order.
@@ -83,7 +80,7 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
83
80
  const refused = await refusal(`${script} refused`);
84
81
  if (refused != null)
85
82
  return refused;
86
- return await runScript(script, cwd, env);
83
+ return await spawnHelper.runScript(script, cwd, env);
87
84
  };
88
85
  /**
89
86
  * Build every package this tree consumes through its `build/` output, in dependency order.
@@ -95,17 +92,21 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
95
92
  * read once the output is current.
96
93
  */
97
94
  const buildLibraries = async () => {
98
- for (const cwd of libraryPaths(root)) {
95
+ for (const cwd of layout.libraryPaths()) {
99
96
  const error = await runTargetScript('build', cwd);
100
97
  if (error != null) {
101
- return error;
98
+ // The publisher's own `buildLibraries` leaves this marker on a library build failure;
99
+ // matching it here is what lets `anchorDiagnostics` tell a library failure apart from a
100
+ // subsequent `validate()` on the caller's own subproject, whether the fixer ran against a
101
+ // slot or a local connector target — both report a bare `src/...` path otherwise.
102
+ return `${error}\nexit 1: bun run build (${p.basename(cwd)})`;
102
103
  }
103
104
  }
104
105
  return null;
105
106
  };
106
107
  const buildWorker = async () => {
107
- const dir = workerPath(root);
108
- if (dir == null || !hasWorker(root)) {
108
+ const dir = layout.workerPath();
109
+ if (dir == null || !layout.hasWorker()) {
109
110
  return null;
110
111
  }
111
112
  return await runTargetScript('build', dir);
@@ -115,19 +116,17 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
115
116
  const refused = await refusal();
116
117
  if (refused != null)
117
118
  return refused;
118
- const cmd = `bun ${args ?? 'install'}`;
119
- return await runCommand(cmd, { cwd: fileHelper.getRootPath(options?.subproject ?? subproject) });
119
+ // A connector target is agent-writable. Bun's default hardlink backend makes every file in
120
+ // node_modules share an inode with the machine cache, so an accidental dependency edit can
121
+ // poison every later install on that machine. Copy the registry payload into the target and
122
+ // refresh it for the initial install; this also prevents a stale development cache from
123
+ // winning over the immutable package body named by the lockfile.
124
+ const cmd = `bun ${args ?? 'install --force --backend=copyfile'}`;
125
+ return await spawnHelper.runCommand(cmd, {
126
+ cwd: fileHelper.getRootPath(options?.subproject ?? subproject),
127
+ env: options?.env,
128
+ });
120
129
  },
121
- /**
122
- * Throw the lockfile away and install again.
123
- *
124
- * The truncate is the point. `bun install` on its own reproduces whatever the lockfile says,
125
- * and a target's lockfile was written the day the project was created — so a framework
126
- * package republished afterwards is invisible to it no matter how often the target is
127
- * rebuilt. Emptied rather than deleted, matching initialization: bun reads an empty file as
128
- * "no lockfile", so a failed install leaves a state the next attempt resolves cleanly instead
129
- * of one where a stale lock has come back.
130
- */
131
130
  reinstall: async () => {
132
131
  const refused = await refusal();
133
132
  if (refused != null)
@@ -138,7 +137,7 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
138
137
  catch {
139
138
  // No lockfile to clear is not a failure — a tree may predate one, or have had it removed.
140
139
  }
141
- return await runCommand('bun install', { cwd: root });
140
+ return await spawnHelper.runCommand('bun install --force --backend=copyfile', { cwd: root });
142
141
  },
143
142
  buildCommon: async () => {
144
143
  const refused = await refusal();
@@ -154,88 +153,59 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
154
153
  if (libraries != null) {
155
154
  return libraries;
156
155
  }
156
+ // The same missing-cwd trap `runTargetScript` already refuses for a build — a role a
157
+ // recorded topology never mapped, or an empty/v1 tree — but `validate` spawns directly and
158
+ // had no such guard, so it answered `ENOENT … '/bin/sh'` about a package that was simply
159
+ // never there.
160
+ const cwd = fileHelper.getRootPath(subprojectOverride ?? subproject);
161
+ if (!await fs.pathExists(cwd)) {
162
+ return `validate cannot run: ${cwd} does not exist — the target project was never initialized in this directory`;
163
+ }
157
164
  // The diagnostics are on stdout; `tsc`'s stderr is about the compiler, not about the code.
158
- return await runCommand('bunx tsc --noEmit', {
159
- cwd: fileHelper.getRootPath(subprojectOverride ?? subproject),
160
- stdoutOnly: true,
161
- });
165
+ // A crash or a killed process can leave `stdout` empty on failure — falsy, but not `null` —
166
+ // and a fixer reading that as a diagnostic with nothing to repair loops on it forever.
167
+ const result = await spawnHelper.runCommand('bunx tsc --noEmit', { cwd, stdoutOnly: true });
168
+ return result === '' ? `validate: tsc produced no output for ${cwd}` : result;
162
169
  },
163
- /** The buildability check for the UI: the browser bundle really built, or the reason it did not. */
164
- validateWithRenderer: async () => await buildLibraries() ?? await runTargetScript('build', webPath(root), await frontendEnv(root)),
165
- /**
166
- * Rebuild the whole target, in dependency order.
167
- *
168
- * The libraries first, because everything else resolves them from `node_modules` at RUN time
169
- * and follows each to its `build/index.js` — a bundle built before them starts with
170
- * `Cannot find package '<slug>-backend'`, a message about a dependency for a build that never
171
- * happened. The remaining three are independent, so all of them run and their problems are
172
- * reported together rather than one round trip at a time.
173
- */
170
+ validateWithRenderer: async () => await buildLibraries() ?? await runTargetScript('build', layout.webPath(), await targetEnv.frontendEnv()),
174
171
  build: async () => {
175
172
  const libraries = await buildLibraries();
176
173
  if (libraries != null) {
177
174
  return libraries;
178
175
  }
179
176
  const errors = [
180
- await runTargetScript('build', apiPath(root)),
177
+ await runTargetScript('build', layout.apiPath()),
181
178
  await buildWorker(),
182
- await runTargetScript('build', webPath(root), await frontendEnv(root)),
179
+ await runTargetScript('build', layout.webPath(), await targetEnv.frontendEnv()),
183
180
  ].filter((error) => error != null);
184
181
  return errors.length > 0 ? errors.join('\n') : null;
185
182
  },
186
- /** Build the api only — the type check the frontend renderer build cannot give it. */
187
- validateBackend: async () => await buildLibraries() ?? await runTargetScript('build', apiPath(root)),
188
- /**
189
- * Reconcile the target's database with its code.
190
- *
191
- * The target owns its own structure: every `@owlmeans/postgres` resource creates and updates
192
- * its table while the context initializes. So a sync is not a command run against the source
193
- * tree — it is *check that the database is there, then restart the backend* — and there is
194
- * nothing to generate and no migration file to apply.
195
- *
196
- * A local target's database is the developer's. The platform provisions none, so an absent
197
- * URL is reported by NAME rather than repaired: it is a line the person has to write, and
198
- * "database unavailable" would send them looking at a server instead.
199
- */
183
+ validateBackend: async () => await buildLibraries() ?? await runTargetScript('build', layout.apiPath()),
200
184
  dbSync: async () => {
201
- const values = await readEnvFile(root, ROOT_ENV_FILE);
185
+ const values = await projectEnv.readEnvFile(ROOT_ENV_FILE);
202
186
  const url = values.DATABASE_URL ?? '';
203
187
  if (url === '') {
204
188
  return `DATABASE_URL is not set in ${ROOT_ENV_FILE}. A local target uses a database on `
205
189
  + `this machine and the platform provisions none — set it and run this again.`;
206
190
  }
207
- const endpoint = serviceEndpoint(url);
191
+ const endpoint = probeHelper.serviceEndpoint(url);
208
192
  if (endpoint == null) {
209
193
  return `DATABASE_URL in ${ROOT_ENV_FILE} is not a URL naming a host and a port.`;
210
194
  }
211
- if (!await probePort(endpoint.host, endpoint.port)) {
195
+ if (!await probeHelper.probePort(endpoint.host, endpoint.port)) {
212
196
  return `Nothing is listening at ${endpoint.host}:${endpoint.port} — `
213
197
  + `the database DATABASE_URL names is not reachable from this machine.`;
214
198
  }
215
- return await restartApi(root);
199
+ return await makeRunStateHelper(root).restartApi();
216
200
  },
217
- /**
218
- * Answering, not enforcing.
219
- *
220
- * The connector refuses on its own before every spawn regardless; this exists so a caller can
221
- * ask BEFORE letting a merge reach a build, and report the violations to the person whose
222
- * repository they belong to.
223
- */
224
201
  integrity: async () => {
225
- const report = await verifyTarget(root);
202
+ const report = await integrityHelper.verifyTarget(root);
226
203
  return {
227
- result: report.ok ? null : formatIntegrityReport(report),
204
+ result: report.ok ? null : targetIntegrityHelper.formatIntegrityReport(report),
228
205
  ok: report.ok,
229
206
  violations: report.violations.map(violation => `${violation.path}: ${violation.detail}`),
230
207
  };
231
208
  },
232
- /**
233
- * Start a real boot in isolation and return at once.
234
- *
235
- * A second start joins the running check rather than spawning another instance onto the port.
236
- * The verdict is read with {@link bootCheckStatus}; `wait` is the legacy blocking path for a
237
- * caller that predates the job.
238
- */
239
209
  bootCheck: async (options = {}) => {
240
210
  const job = jobFor(root);
241
211
  job.start(async () => {
@@ -245,7 +215,7 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
245
215
  if (refused != null) {
246
216
  return { ok: false, phase: 'build', error: refused };
247
217
  }
248
- const values = await readEnvFile(root, ROOT_ENV_FILE);
218
+ const values = await projectEnv.readEnvFile(ROOT_ENV_FILE);
249
219
  if ((values.DATABASE_URL ?? '') === '') {
250
220
  // Without a database the check cannot connect, and reporting that as a boot failure
251
221
  // would blame the generated code for a target that was never configured.
@@ -257,16 +227,16 @@ export const createLocalShellHelper = (fileHelper, subproject) => {
257
227
  return await runBootCheck({
258
228
  port: TARGET_BOOTCHECK_PORT,
259
229
  marker: TARGET_BOOTCHECK_MARKER,
260
- cwd: apiPath(root),
230
+ cwd: layout.apiPath(),
261
231
  env: {
262
- ...await backendEnv(root),
232
+ ...await targetEnv.backendEnv(),
263
233
  BACKEND_PORT: `${TARGET_BOOTCHECK_PORT}`,
264
234
  DATABASE_SCHEMA: TARGET_BOOTCHECK_SCHEMA,
265
235
  },
266
236
  bootId: randomUUID(),
267
237
  ...(options.skipBuild === true
268
238
  ? {}
269
- : { build: async () => await buildLibraries() ?? await runTargetScript('build', apiPath(root)) }),
239
+ : { build: async () => await buildLibraries() ?? await runTargetScript('build', layout.apiPath()) }),
270
240
  });
271
241
  });
272
242
  if (options.wait !== true)
@@ -1 +1 @@
1
- {"version":3,"file":"shell.js","sourceRoot":"","sources":["../../src/executor/shell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,CAAC,MAAM,WAAW,CAAA;AAEzB,OAAO,EACL,qBAAqB,EAAc,uBAAuB,EAAE,qBAAqB,EACjF,uBAAuB,EACxB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;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AE,CAAC,KAAK,EAAE,EAAE,CAAC;oBACvC,oFAAoF;oBACpF,yEAAyE;oBACzE,OAAO;wBACL,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ;wBAC1B,KAAK,EAAE,uBAAuB,aAAa,2BAA2B;qBACvE,CAAA;gBACH,CAAC;gBAED,OAAO,MAAM,YAAY,CAAC;oBACxB,IAAI,EAAE,qBAAqB;oBAC3B,MAAM,EAAE,uBAAuB;oBAC/B,GAAG,EAAE,MAAM,CAAC,OAAO,EAAE;oBACrB,GAAG,EAAE;wBACH,GAAG,MAAM,SAAS,CAAC,UAAU,EAAE;wBAC/B,YAAY,EAAE,GAAG,qBAAqB,EAAE;wBACxC,eAAe,EAAE,uBAAuB;qBACzC;oBACD,MAAM,EAAE,UAAU,EAAE;oBACpB,GAAG,CAAC,OAAO,CAAC,SAAS,KAAK,IAAI;wBAC5B,CAAC,CAAC,EAAE;wBACJ,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,CAAC,MAAM,cAAc,EAAE,IAAI,MAAM,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;iBACvG,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;YAEF,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI;gBAAE,OAAO,IAAI,CAAA;YAEtC,OAAO,MAAM,GAAG,CAAC,OAAO,EAAE,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAA;QACnD,CAAC;QAED,eAAe,EAAE,KAAK,IAA8B,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE;KAC7E,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
@@ -0,0 +1,98 @@
1
+ import type { ChildProcess } from 'node:child_process';
2
+ import type { RunOptions } from '../types.js';
3
+ /**
4
+ * Everything that starts, bounds or ends a child process on the developer's machine.
5
+ *
6
+ * Shared by the shell commands, the boot check and the local run so the three cannot disagree
7
+ * about what a failure looks like or when a port is free.
8
+ */
9
+ export interface SpawnHelper {
10
+ /**
11
+ * Compose a failed command's output into the text a fixer reads.
12
+ *
13
+ * Never interpolate the `ExecException` beside `stderr`: its string form is
14
+ * `Error: Command failed: <cmd>\n<stderr>`, so the naive `${stdout} ${error} ${stderr}` shape
15
+ * emitted every diagnostic twice and prefixed a runner sentence that is not a diagnostic at all.
16
+ * Both survive into the fix conversation — the duplicate doubles the prompt for nothing, and the
17
+ * preamble is what a model latches onto when it cannot see a real cause. Say it once, and say
18
+ * what actually ran only when there is nothing else to report.
19
+ */
20
+ failureOutput: (error: unknown, stdout: string, stderr: string, cmd: string) => string;
21
+ /**
22
+ * Run a shell command and answer "error text, or null".
23
+ *
24
+ * The one contract every shell command here shares. A caller never has to know whether the child
25
+ * exited non-zero, failed to spawn or produced nothing — those are all one answer.
26
+ */
27
+ runCommand: (cmd: string, options: RunOptions) => Promise<string | null>;
28
+ /**
29
+ * Run one of the target's own `scripts.*`, bounded.
30
+ *
31
+ * `spawn` rather than `exec` because a build's output is unbounded and streaming it costs nothing,
32
+ * and because a wedged `bunx` resolving forever must die rather than hold the caller open. The
33
+ * timeout is reported as a verdict, not thrown, so it reaches the same channel a failed build does.
34
+ */
35
+ runScript: (script: string, cwd: string, env?: Record<string, string>) => Promise<string | null>;
36
+ /**
37
+ * Bound one whole dispatch, whatever it is.
38
+ *
39
+ * Every operation below already bounds itself, but one that wedges AROUND its own bound — a lock
40
+ * nothing releases, a promise that never settles — holds the caller open with nothing to report,
41
+ * and the caller's timeout becomes the only limit. Reaching this means the operation failed to
42
+ * bound itself, not that it needed longer.
43
+ */
44
+ withDeadline: <T>(label: string, ms: number, fn: () => Promise<T>) => Promise<T>;
45
+ /** Whether anything answers a TCP connect on a local port. */
46
+ probeListening: (port: number, timeoutMs?: number) => Promise<boolean>;
47
+ /**
48
+ * Wait until nothing answers on a local port.
49
+ *
50
+ * The child spawned here is a shell wrapping `bun`, so the shell's exit is not proof the target is
51
+ * gone: a signal the shell dies from and `bun` survives leaves an orphan that still owns the port.
52
+ * Whether the port answers is the only fact that decides whether a replacement can bind, so a
53
+ * restart waits on that and never on an exit event.
54
+ */
55
+ waitForPortFree: (port: number, timeoutMs?: number, pollMs?: number) => Promise<boolean>;
56
+ /**
57
+ * Terminate a detached child's whole process group and wait until it is actually gone.
58
+ *
59
+ * Awaiting matters: the caller restarts right after, and a process still holding the port makes
60
+ * the replacement lose the bind and exit — leaving nothing listening and no error anyone reads.
61
+ */
62
+ killGroupAndWait: (proc: ChildProcess, options?: {
63
+ term?: number;
64
+ kill?: number;
65
+ }) => Promise<void>;
66
+ /**
67
+ * Take a port back from a leftover running the same command.
68
+ *
69
+ * A connector that was killed — a host restart, a Ctrl-C, a crashed run — leaves its DETACHED
70
+ * children alive, because detaching them is what keeps a build from dying with the tool that
71
+ * started it. What survives holds the target's port, and every later attempt then fails with the
72
+ * target's own "the api port is already in use", which reads as a defect in the generated app.
73
+ *
74
+ * Matched by the marker the spawn carries, never by the port alone: a process this connector did
75
+ * not start is not ours to signal, whatever it is sitting on.
76
+ */
77
+ reclaimPort: (port: number, marker: string) => Promise<boolean>;
78
+ /**
79
+ * The pids whose command line carries a marker.
80
+ *
81
+ * `/proc` rather than `ps`, for the same reason the publisher reads it: no shell, no parsing of a
82
+ * format that differs per platform. Somewhere without `/proc` simply has nothing to reclaim, which
83
+ * is the honest answer there.
84
+ */
85
+ findProcesses: (needles: string | string[]) => Promise<number[]>;
86
+ /**
87
+ * Signal a process GROUP, falling back to the process.
88
+ *
89
+ * The negative pid is the point: a child spawned detached through a shell survives a signal aimed
90
+ * at the shell's own pid, and what survives is the `bun` process holding the port.
91
+ */
92
+ signalGroup: (pid: number | undefined, signal: NodeJS.Signals) => boolean;
93
+ /** Whether a recorded pid is still a live process. */
94
+ isAlive: (pid: number | undefined) => boolean;
95
+ /** Resolve after `ms`, without holding the process open. */
96
+ delay: (ms: number) => Promise<void>;
97
+ }
98
+ //# sour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E,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACnG;;;;;;;;;;OAUG;IACH,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAC/D;;;;;;OAMG;IACH,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAChE;;;;;OAKG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,KAAK,OAAO,CAAA;IACzE,sDAAsD;IACtD,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,CAAA;IAC7C,4DAA4D;IAC5D,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACrC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/executor/spawn/types.ts"],"names":[],"mappings":""}