@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
package/build/consts.d.ts CHANGED
@@ -5,6 +5,9 @@ export declare const ENV_TARGET = "VIABLE_TARGET";
5
5
  export declare const ENV_LLM = "VIABLE_LLM";
6
6
  export declare const ENV_HARNESS = "VIABLE_HARNESS";
7
7
  export declare const ENV_PROJECT_DIR = "VIABLE_PROJECT_DIR";
8
+ /** The URL-configured MCP host's address — see `CONNECT_DEFAULT_MCP_URL`. */
9
+ export declare const ENV_MCP_URL = "VIABLE_MCP_URL";
10
+ export declare const DEFAULT_MCP_URL = "https://api.owlmeans.com/mcp";
8
11
  /** The service alias the SDK's own client context registers under. */
9
12
  export declare const SDK_SERVICE = "viable-sdk";
10
13
  /**
@@ -12,27 +15,39 @@ export declare const SDK_SERVICE = "viable-sdk";
12
15
  *
13
16
  * Every MCP host bounds a tool call, and the strictest default in the field is sixty seconds
14
17
  * (Codex). Forty-five leaves room for the round trip and keeps the connector inside every host's
15
- * ceiling without configuration — which is why long operations are JOBS that return at once and
16
- * are polled, rather than calls that block.
18
+ * ceiling without configuration — long operations return a domain status and continue server-side.
17
19
  */
18
20
  export declare const TOOL_DEADLINE_MS = 45000;
19
21
  /**
20
- * The longest a job poll may hold its answer, in seconds.
22
+ * How long a tool in the delegated mode waits for its call — or for a model task that call is
23
+ * waiting on — before answering "still running". Inside {@link TOOL_DEADLINE_MS}, so the answer
24
+ * always beats the host's ceiling.
25
+ */
26
+ export declare const HANDOVER_WAIT_MS = 40000;
27
+ /**
28
+ * How long a story tool waits for its planning transition to COMMIT, in milliseconds.
21
29
  *
22
- * Strictly under {@link TOOL_DEADLINE_MS}, with room for the round trip. Set equal to it, a poll
23
- * that used its whole window lost the race with its own deadline every time — and the tool's own
24
- * "call this next" line suggested exactly that value, so an agent following the instructions it
25
- * was given failed on every poll that ran the full window.
30
+ * Well under {@link TOOL_DEADLINE_MS}: the same call has already resolved the story and posted the
31
+ * transition, and on the platform a person's narrative is re-formatted by a model before it is
32
+ * appended. A commit that is late is not a failure — the transition is durable and nothing is
33
+ * undone — so `develop_story` answers from the story status instead of waiting out the host's ceiling.
26
34
  */
27
- export declare const JOB_POLL_MAX_SEC = 30;
35
+ export declare const COMMIT_WAIT_MS = 20000;
36
+ /** How long one long poll of a commit may hold, in seconds — what the platform holds at most for a connector. */
37
+ export declare const COMMIT_POLL_SEC = 20;
38
+ /** How many stories one page of `list_stories` carries when the caller names no size. */
39
+ export declare const STORY_PAGE_SIZE = 25;
28
40
  /** How long `next_task` waits before answering "nothing yet". Under every host's ceiling. */
29
41
  export declare const NEXT_TASK_WAIT_MS = 30000;
42
+ /**
43
+ * How long `next_question` waits before answering "nothing yet".
44
+ *
45
+ * The same window as a model task's, and for the host's reasons rather than the person's: nobody
46
+ * is expected to answer inside it. What the wait buys is a parent that asked one call too early —
47
+ * the platform queues the question a moment after the domain status reported it — and what the ceiling buys
48
+ * is that the call returns before the host's own deadline turns it into a broken server.
49
+ */
50
+ export declare const NEXT_QUESTION_WAIT_MS = 30000;
30
51
  /** How long a pull waits for an operation before answering empty. */
31
52
  export declare const PULL_WAIT_MS = 30000;
32
- /** How often a socket says it is still there. Presence outlives three missed pings. */
33
- export declare const PING_INTERVAL_MS = 30000;
34
- /** How long the socket handshake may take before the connector falls back to polling. */
35
- export declare const SOCKET_HANDSHAKE_MS = 10000;
36
- /** Reconnection backoff, in order. The last entry repeats. */
37
- export declare const RECONNECT_BACKOFF_MS: number[];
38
53
  //# sourceMappingURL=consts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,eAAO,MAAM,SAAS,qBAAqB,CAAA;AAC3C,eAAO,MAAM,WAAW,mBAAmB,CAAA;AAC3C,eAAO,MAAM,UAAU,kBAAkB,CAAA;AAC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jC,yFAAyF;AACzF,eAAO,MAAM,eAAe,KAAK,CAAA;AAEjC,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,QAAS,CAAA;AAEvC;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,QAAS,CAAA;AAE3C,qEAAqE;AACrE,eAAO,MAAM,YAAY,QAAS,CAAA"}
package/build/consts.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { CONNECT_DEFAULT_MCP_URL, CONNECT_ENV_MCP_URL } from '@owlmeans/viable-common';
1
2
  /** Where the connector reads its configuration from. Only the token is a secret. */
2
3
  export const ENV_TOKEN = 'VIABLE_API_TOKEN';
3
4
  export const ENV_API_URL = 'VIABLE_API_URL';
@@ -5,6 +6,9 @@ export const ENV_TARGET = 'VIABLE_TARGET';
5
6
  export const ENV_LLM = 'VIABLE_LLM';
6
7
  export const ENV_HARNESS = 'VIABLE_HARNESS';
7
8
  export const ENV_PROJECT_DIR = 'VIABLE_PROJECT_DIR';
9
+ /** The URL-configured MCP host's address — see `CONNECT_DEFAULT_MCP_URL`. */
10
+ export const ENV_MCP_URL = CONNECT_ENV_MCP_URL;
11
+ export const DEFAULT_MCP_URL = CONNECT_DEFAULT_MCP_URL;
8
12
  /** The service alias the SDK's own client context registers under. */
9
13
  export const SDK_SERVICE = 'viable-sdk';
10
14
  /**
@@ -12,27 +16,39 @@ export const SDK_SERVICE = 'viable-sdk';
12
16
  *
13
17
  * Every MCP host bounds a tool call, and the strictest default in the field is sixty seconds
14
18
  * (Codex). Forty-five leaves room for the round trip and keeps the connector inside every host's
15
- * ceiling without configuration — which is why long operations are JOBS that return at once and
16
- * are polled, rather than calls that block.
19
+ * ceiling without configuration — long operations return a domain status and continue server-side.
17
20
  */
18
21
  export const TOOL_DEADLINE_MS = 45_000;
19
22
  /**
20
- * The longest a job poll may hold its answer, in seconds.
23
+ * How long a tool in the delegated mode waits for its call — or for a model task that call is
24
+ * waiting on — before answering "still running". Inside {@link TOOL_DEADLINE_MS}, so the answer
25
+ * always beats the host's ceiling.
26
+ */
27
+ export const HANDOVER_WAIT_MS = 40_000;
28
+ /**
29
+ * How long a story tool waits for its planning transition to COMMIT, in milliseconds.
21
30
  *
22
- * Strictly under {@link TOOL_DEADLINE_MS}, with room for the round trip. Set equal to it, a poll
23
- * that used its whole window lost the race with its own deadline every time — and the tool's own
24
- * "call this next" line suggested exactly that value, so an agent following the instructions it
25
- * was given failed on every poll that ran the full window.
31
+ * Well under {@link TOOL_DEADLINE_MS}: the same call has already resolved the story and posted the
32
+ * transition, and on the platform a person's narrative is re-formatted by a model before it is
33
+ * appended. A commit that is late is not a failure — the transition is durable and nothing is
34
+ * undone — so `develop_story` answers from the story status instead of waiting out the host's ceiling.
26
35
  */
27
- export const JOB_POLL_MAX_SEC = 30;
36
+ export const COMMIT_WAIT_MS = 20_000;
37
+ /** How long one long poll of a commit may hold, in seconds — what the platform holds at most for a connector. */
38
+ export const COMMIT_POLL_SEC = 20;
39
+ /** How many stories one page of `list_stories` carries when the caller names no size. */
40
+ export const STORY_PAGE_SIZE = 25;
28
41
  /** How long `next_task` waits before answering "nothing yet". Under every host's ceiling. */
29
42
  export const NEXT_TASK_WAIT_MS = 30_000;
43
+ /**
44
+ * How long `next_question` waits before answering "nothing yet".
45
+ *
46
+ * The same window as a model task's, and for the host's reasons rather than the person's: nobody
47
+ * is expected to answer inside it. What the wait buys is a parent that asked one call too early —
48
+ * the platform queues the question a moment after the domain status reported it — and what the ceiling buys
49
+ * is that the call returns before the host's own deadline turns it into a broken server.
50
+ */
51
+ export const NEXT_QUESTION_WAIT_MS = 30_000;
30
52
  /** How long a pull waits for an operation before answering empty. */
31
53
  export const PULL_WAIT_MS = 30_000;
32
- /** How often a socket says it is still there. Presence outlives three missed pings. */
33
- export const PING_INTERVAL_MS = 30_000;
34
- /** How long the socket handshake may take before the connector falls back to polling. */
35
- export const SOCKET_HANDSHAKE_MS = 10_000;
36
- /** Reconnection backoff, in order. The last entry repeats. */
37
- export const RECONNECT_BACKOFF_MS = [1_000, 2_000, 5_000, 10_000, 30_000];
38
54
  //# sourceMappingURL=consts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAA;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAA;AACzC,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAA;AACnC,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAAA;AAEnD,sEAAsE;AACtE,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAA;AAEvC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAEtC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAA;AAElC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAA;AAEvC,qEAAqE;AACrE,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAA;AAElC,uFAAuF;AACvF,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAEtC,yFAAyF;AACzF,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAA;AAEzC,8DAA8D;AAC9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA"}
1
+ {"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAEtF,oFAAoF;AACpF,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAA;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAA;AACzC,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAA;AACnC,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAAA;AACnD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAAA;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,uBAAuB,CAAA;AAEtD,sEAAsE;AACtE,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAA;AAEvC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAEtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAEtC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAA;AAEpC,iHAAiH;AACjH,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAA;AAEjC,yFAAyF;AACzF,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAA;AAEjC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAA;AAEvC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAA;AAE3C,qEAAqE;AACrE,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAA"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The platform's websocket namespace, which the planning commit feed is declared under.
3
+ *
4
+ * A literal because it belongs to the platform: `makePlanningProtocols` takes it as a parameter for
5
+ * exactly this reason, so that neither end has to import the other's constants.
6
+ */
7
+ export declare const UPDATE_BASE = "viable:manager-api:update:base";
8
+ /**
9
+ * The base alias and path manager-api mounts the planning protocol tree under.
10
+ *
11
+ * Literals for the same reason as {@link UPDATE_BASE}: they belong to manager-api, and
12
+ * `makePlanningProtocols` takes them as parameters so neither end imports the other's constants.
13
+ * Every planning alias and path derives from these, so the two ends agree on a route only while
14
+ * both build the tree from the same base, path and socket base.
15
+ */
16
+ export declare const PLANNING_BASE_ALIAS = "viable:manager-api:planning";
17
+ export declare const PLANNING_BASE_PATH = "/planning";
18
+ //# sourceMappingURL=consts.local.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../../src/context/consts.local.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,mCAAmC,CAAA;AAE3D;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,gCAAgC,CAAA;AAEhE,eAAO,MAAM,kBAAkB,cAAc,CAAA"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The platform's websocket namespace, which the planning commit feed is declared under.
3
+ *
4
+ * A literal because it belongs to the platform: `makePlanningProtocols` takes it as a parameter for
5
+ * exactly this reason, so that neither end has to import the other's constants.
6
+ */
7
+ export const UPDATE_BASE = 'viable:manager-api:update:base';
8
+ /**
9
+ * The base alias and path manager-api mounts the planning protocol tree under.
10
+ *
11
+ * Literals for the same reason as {@link UPDATE_BASE}: they belong to manager-api, and
12
+ * `makePlanningProtocols` takes them as parameters so neither end imports the other's constants.
13
+ * Every planning alias and path derives from these, so the two ends agree on a route only while
14
+ * both build the tree from the same base, path and socket base.
15
+ */
16
+ export const PLANNING_BASE_ALIAS = 'viable:manager-api:planning';
17
+ export const PLANNING_BASE_PATH = '/planning';
18
+ //# sourceMappingURL=consts.local.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../../src/context/consts.local.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,gCAAgC,CAAA;AAE3D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,6BAA6B,CAAA;AAEhE,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAA"}
@@ -1,11 +1,6 @@
1
- import type { ClientConfig, ClientContext } from '@owlmeans/client-context';
1
+ import { type ClientConfig, type ClientContext } from '@owlmeans/client-context';
2
2
  import { connect } from '@owlmeans/viable-common';
3
- export interface SdkContextOptions {
4
- apiUrl: string;
5
- token: string;
6
- /** The service alias the API is registered under. One deployment, one alias. */
7
- service?: string;
8
- }
3
+ import type { SdkContextOptions } from './types.js';
9
4
  /**
10
5
  * A client context that speaks to a viable deployment with one access token.
11
6
  *
@@ -19,4 +14,5 @@ export interface SdkContextOptions {
19
14
  */
20
15
  export declare const makeSdkContext: (opts: SdkContextOptions) => Promise<ClientContext<ClientConfig>>;
21
16
  export { connect };
17
+ export type { SdkContextOptions } from './types.js';
22
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAM3E,OAAO,EAAE,OAAO,EAA0C,MAAM,yBAAyB,CAAA;AAYzF,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,SAAgB,iBAAiB,KAAG,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CAmEjG,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAQnG,OAAO,EAAE,OAAO,EAAsD,MAAM,yBAAyB,CAAA;AAKrG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAenD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,SAAgB,iBAAiB,KAAG,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CA8FjG,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,CAAA;AAElB,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA"}
@@ -1,20 +1,27 @@
1
1
  import { AppType } from '@owlmeans/context';
2
2
  import { makeClientContext } from '@owlmeans/client-context';
3
3
  import { bind } from '@owlmeans/client-entrypoint';
4
+ import { appendPlanningClient } from '@owlmeans/client-planning';
4
5
  import { openProtocol, protocols } from '@owlmeans/entrypoint';
6
+ import { makePlanningProtocols } from '@owlmeans/planning';
5
7
  import { route } from '@owlmeans/route';
6
8
  import { authMiddleware, DEFAULT_GUARD } from '@owlmeans/auth-common';
7
9
  import { makeTokenCarrierGuard } from '@owlmeans/auth-token';
8
- import { connect, connectProtocols, CONNECT_TOKEN_PREFIX } from '@owlmeans/viable-common';
9
- import { SDK_SERVICE } from '../consts.js';
10
+ import { connect, connectProtocols, CONNECT_TOKEN_PREFIX, ConnectLlm } from '@owlmeans/viable-common';
11
+ import { appendCallCollectTransport } from '../api/collect.js';
12
+ import { COMMIT_POLL_SEC, SDK_SERVICE, TOOL_DEADLINE_MS } from '../consts.js';
10
13
  import { SdkAuthError, SdkMisconfigured } from '../errors.js';
14
+ import { PLANNING_BASE_ALIAS, PLANNING_BASE_PATH, UPDATE_BASE } from './consts.local.js';
15
+ const updateBase = openProtocol(route(UPDATE_BASE, '/update'));
11
16
  /**
12
- * The platform's websocket namespace, which the connector's socket route is declared under.
13
- *
14
- * A literal because it belongs to manager-api: the contract package takes it as a parameter for
15
- * exactly this reason, so that neither end has to import the other's constants.
17
+ * The planning tree exactly as manager-api mounts it, minus the ownership gate — a gate is the
18
+ * server's to apply, and a client binding carries none.
16
19
  */
17
- const UPDATE_BASE = 'viable:manager-api:update:base';
20
+ const sdkPlanningProtocols = () => makePlanningProtocols({
21
+ base: { alias: PLANNING_BASE_ALIAS, path: PLANNING_BASE_PATH },
22
+ guards: DEFAULT_GUARD,
23
+ socketBase: updateBase,
24
+ });
18
25
  /**
19
26
  * A client context that speaks to a viable deployment with one access token.
20
27
  *
@@ -27,14 +34,20 @@ const UPDATE_BASE = 'viable:manager-api:update:base';
27
34
  * form of authentication would be a connector whose access nobody can revoke by revoking a token.
28
35
  */
29
36
  export const makeSdkContext = async (opts) => {
30
- if (opts.token === '') {
31
- throw new SdkMisconfigured('token');
32
- }
33
- if (!opts.token.startsWith(CONNECT_TOKEN_PREFIX)) {
34
- // Refused here rather than at the first call: a value that is not one of this platform's
35
- // tokens produces a 401 with nothing in it about which of the several plausible mistakes was
36
- // made, and the answer is always the same one — that is not the token you were given.
37
- throw new SdkAuthError(`prefix:${CONNECT_TOKEN_PREFIX}`);
37
+ // A THUNK's value is unknown until it resolves — a holder that has not signed in yet returns
38
+ // `''` on purpose, and that is not a misconfiguration this constructor can see. Only a literal
39
+ // string is validated eagerly, exactly as it always was, so every existing caller that passes
40
+ // one keeps getting the same synchronous refusal.
41
+ if (typeof opts.token === 'string') {
42
+ if (opts.token === '') {
43
+ throw new SdkMisconfigured('token');
44
+ }
45
+ if (!opts.token.startsWith(CONNECT_TOKEN_PREFIX)) {
46
+ // Refused here rather than at the first call: a value that is not one of this platform's
47
+ // tokens produces a 401 with nothing in it about which of the several plausible mistakes was
48
+ // made, and the answer is always the same one — that is not the token you were given.
49
+ throw new SdkAuthError(`prefix:${CONNECT_TOKEN_PREFIX}`);
50
+ }
38
51
  }
39
52
  const service = opts.service ?? 'viable-manager-api';
40
53
  const url = new URL(opts.apiUrl);
@@ -67,21 +80,41 @@ export const makeSdkContext = async (opts) => {
67
80
  // The scheme the platform's own guard claims first; `Bearer` is accepted too, and is what a
68
81
  // host configured with a bare URL will send.
69
82
  scheme: 'auth-token',
83
+ onRejected: opts.onRejected,
70
84
  }));
71
85
  context.registerMiddleware(authMiddleware);
72
- const surface = connectProtocols({
73
- guard: DEFAULT_GUARD,
74
- updateBase: UPDATE_BASE,
75
- });
76
- // The socket route hangs under the platform's own websocket base, so that base has to exist
77
- // here too — a parent a registry cannot resolve fails the whole context at init, not the one
78
- // call that would have used it. It is a declaration-only namespace, so its client binding has
79
- // no screen or request implementation.
80
- const parent = openProtocol(route(UPDATE_BASE, '/update'));
81
- const entrypoints = [bind(parent), ...protocols(surface).map(declaration => bind(declaration))];
86
+ // ONE transport in front of the API client for every bound route — the connector's and the
87
+ // planning client's. In the delegated mode it names each write (`x-viable-call`) and collects an
88
+ // early `{ pending }` answer until the call settles; otherwise it only forwards.
89
+ appendCallCollectTransport(context, { delegated: opts.llm === ConnectLlm.Local });
90
+ const surface = connectProtocols({ guard: DEFAULT_GUARD });
91
+ // The story tools speak planning: the same tree the platform mounts, reached with the same token.
92
+ const planning = sdkPlanningProtocols();
93
+ // The planning commit feed hangs under the platform's own websocket base, so that base has to
94
+ // exist here too — a parent a registry cannot resolve fails the whole context at init, not the
95
+ // one call that would have used it. It is a declaration-only namespace, so its client binding has
96
+ // no screen or request implementation, and the SDK never opens the feed.
97
+ const entrypoints = [
98
+ bind(updateBase),
99
+ ...protocols(surface).map(declaration => bind(declaration)),
100
+ ...protocols(planning).map(declaration => bind(declaration)),
101
+ ];
82
102
  // Every caller gets a context-local client binding from the immutable protocol it shares with
83
103
  // the server. No alias lookup can drift from a path or contract declaration.
84
104
  context.registerEntrypoints(entrypoints);
105
+ appendPlanningClient(context, {
106
+ protocols: planning,
107
+ // Bound above, beside the connector routes, so one registration holds the whole surface.
108
+ bind: false,
109
+ // No socket opener: a commit is awaited by long poll only, which is the only transport the SDK
110
+ // speaks and the one that survives every proxy.
111
+ poll: COMMIT_POLL_SEC,
112
+ timeout: opts.timeout ?? TOOL_DEADLINE_MS,
113
+ // Nothing a tool does reads a flow or a type, and the bundle would otherwise be fetched in the
114
+ // background the moment the context is ready — a network call from a server nobody has asked
115
+ // anything yet. `model()` still loads it on first use.
116
+ schemas: false,
117
+ });
85
118
  await context.configure().init();
86
119
  return context;
87
120
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAE7D;;;;;GAKG;AACH,MAAM,WAAW,GAAG,gCAAgC,CAAA;AASpD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,IAAuB,EAAwC,EAAE;IACpG,IAAI,IAAI,CAAC,KAAK,KAAK,EAAE,EAAE,CAAC;QACtB,MAAM,IAAI,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACrC,CAAC;IACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACjD,yFAAyF;QACzF,6FAA6F;QAC7F,sFAAsF;QACtF,MAAM,IAAI,YAAY,CAAC,UAAU,oBAAoB,EAAE,CAAC,CAAA;IAC1D,CAAC;IAED,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C,GAAG,KAAK,UAAU,CAAC,KAAK,EAAE,CAAC,CAAA;IAEjF,MAAM,OAAO,GAAG,gBAAgB,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,CAAA;IAC1D,kGAAkG;IAClG,MAAM,QAAQ,GAAG,oBAAoB,EAAE,CAAA;IAEvC,8FAA8F;IAC9F,+FAA+F;IAC/F,kGAAkG;IAClG,yEAAyE;IACzE,MAAM,WAAW,GAAG;QAClB,IAAI,CAAC,UAAU,CAAC;QAChB,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC3D,GAAG,SAAS,CAAC,QAAqC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KAC1F,CAAA;IAED,8FAA8F;IAC9F,6EAA6E;IAC7E,OAAO,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAA;IAExC,oBAAoB,CAAC,OAAO,EAAE;QAC5B,SAAS,EAAE,QAAQ;QACnB,yFAAyF;QACzF,IAAI,EAAE,KAAK;QACX,+FAA+F;QAC/F,gDAAgD;QAChD,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,gBAAgB;QACzC,+FAA+F;QAC/F,6FAA6F;QAC7F,uDAAuD;QACvD,OAAO,EAAE,KAAK;KACf,CAAC,CAAA;IAEF,MAAM,OAAO,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,CAAA;IAEhC,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
@@ -0,0 +1,26 @@
1
+ import type { ConnectLlm } from '@owlmeans/viable-common';
2
+ export interface SdkContextOptions {
3
+ apiUrl: string;
4
+ /**
5
+ * A fixed token, or a thunk resolved on every request. The thunk form is what lets a
6
+ * credential holder (`@owlmeans/cli-auth`) hand the carrier guard something that changes
7
+ * across the process's lifetime — empty before a sign-in completes, a real token after — with
8
+ * no reconfiguration in between.
9
+ */
10
+ token: string | (() => string | Promise<string>);
11
+ /** The service alias the API is registered under. One deployment, one alias. */
12
+ service?: string;
13
+ /** The planning client's HTTP deadline. `TOOL_DEADLINE_MS` when absent. */
14
+ timeout?: number;
15
+ /**
16
+ * Who performs the platform's model calls for this connector. `ConnectLlm.Local` (the delegated
17
+ * mode) names every write with `x-viable-call` and collects an early `{ pending }` answer through
18
+ * `connect.call.collect`, so a write that waits on its own parent's model call is never bounded by
19
+ * one HTTP request. Absent or `cloud`, calls go out untouched.
20
+ */
21
+ llm?: ConnectLlm;
22
+ /** Called when the platform rejects a request that presented this token — a credential holder
23
+ * wires this to forgetting a dead token (and signing in again) or reporting the problem. */
24
+ onRejected?: () => void | Promise<void>;
25
+ }
26
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEzD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;IAChD,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,UAAU,CAAA;IAChB;gGAC4F;IAC5F,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACxC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":""}
@@ -1,5 +1,4 @@
1
- import { spawn as nodeSpawn } from 'node:child_process';
2
- import type { TargetHealthReading } from './health.js';
1
+ import type { BootCheckDeps, BootCheckJob, BootCheckReport } from './types.js';
3
2
  /**
4
3
  * Boot the generated backend for real, in isolation, and report what happened.
5
4
  *
@@ -11,32 +10,6 @@ import type { TargetHealthReading } from './health.js';
11
10
  * It runs the real thing, but never the live one: a second process, on its own port, against a
12
11
  * scratch schema, killed on every exit path.
13
12
  */
14
- /** How far the boot got. `ready` is the only success. */
15
- export type BootCheckPhase = 'build' | 'schema' | 'boot' | 'ready';
16
- export interface BootCheckReport {
17
- ok: boolean;
18
- phase: BootCheckPhase;
19
- /** The classifier's reason plus the captured startup log, or null when the boot succeeded. */
20
- error: string | null;
21
- dbOk?: boolean;
22
- }
23
- export interface BootCheckDeps {
24
- port: number;
25
- /** Argv marker that tells this instance apart from the live one for process matching. */
26
- marker: string;
27
- cwd: string;
28
- env: Record<string, string>;
29
- bootId: string;
30
- /** Omitted to reuse the artifacts already on disk. */
31
- build?: () => Promise<string | null>;
32
- readHealth?: (port: number, bootId: string, timeoutMs: number) => Promise<TargetHealthReading>;
33
- spawn?: typeof nodeSpawn;
34
- ddlWindowMs?: number;
35
- readyWindowMs?: number;
36
- readyPollMs?: number;
37
- /** Whole-run cap, so a wedged boot cannot outlive the caller's deadline. */
38
- timeoutMs?: number;
39
- }
40
13
  /**
41
14
  * DELIBERATE DIFFERENCE from the publisher: no `resetSchema` step, and therefore no `schema`
42
15
  * failure of its own.
@@ -49,18 +22,6 @@ export interface BootCheckDeps {
49
22
  * simply leaves what it created behind, and the next run reconciles into it.
50
23
  */
51
24
  export declare const runBootCheck: (deps: BootCheckDeps) => Promise<BootCheckReport>;
52
- export interface BootCheckStatus {
53
- running: boolean;
54
- startedAt: number | null;
55
- report: BootCheckReport | null;
56
- }
57
- export interface BootCheckJob {
58
- /** Start a check, or join the one already running. `true` when this call started it. */
59
- start: (run: () => Promise<BootCheckReport>) => boolean;
60
- status: () => BootCheckStatus;
61
- /** The running check, for the legacy blocking caller. */
62
- pending: () => Promise<BootCheckReport> | null;
63
- }
64
25
  /**
65
26
  * The job behind `BootCheck` / `BootCheckStatus`.
66
27
  *
@@ -1 +1 @@
1
- {"version":3,"file":"boot-check.d.ts","sourceRoot":"","sources":["../../src/executor/boot-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAIvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAGtD;;;;;;;;;;GAUG;AAEH,yDAAyD;AACzD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;AAElE,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,OAAO,CAAA;IACX,KAAK,EAAE,cAAc,CAAA;IACrB,8FAA8F;IAC9F,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,yFAAyF;IACzF,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACpC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAA;IAC9F,KAAK,CAAC,EAAE,OAAO,SAAS,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAID;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,SAAgB,aAAa,KAAG,OAAO,CAAC,eAAe,CA6F/E,CAAA;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,MAAM,EAAE,eAAe,GAAG,IAAI,CAAA;CAC/B;AAED,MAAM,WAAW,YAAY;IAC3B,wFAAwF;IACxF,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,KAAK,OAAO,CAAA;IACvD,MAAM,EAAE,MAAM,eAAe,CAAA;IAC7B,yDAAyD;IACzD,OAAO,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,CAAA;CAC/C;AAWD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,2BAA+B,YA2C7D,CAAA"}
1
+ {"version":3,"file":"boot-check.d.ts","sourceRoot":"","sources":["../../src/executor/boot-check.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE9E;;;;;;;;;;GAUG;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,SAAgB,aAAa,KAAG,OAAO,CAAC,eAAe,CA6F/E,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,2BAA+B,YA2C7D,CAAA"}
@@ -1,7 +1,18 @@
1
1
  import { spawn as nodeSpawn } from 'node:child_process';
2
- import { readTargetHealth } from './health.js';
3
- import { delay, killGroupAndWait, reclaimPort, waitForPortFree } from './spawn.js';
4
- const STARTUP_LOG_CAP = 16_384;
2
+ import { healthHelper } from './health.js';
3
+ import { spawnHelper } from './spawn.js';
4
+ import { STARTUP_LOG_CAP, WATCHDOG_MS } from './consts.local.js';
5
+ /**
6
+ * Boot the generated backend for real, in isolation, and report what happened.
7
+ *
8
+ * `tsc` cannot see a foreign key that names a resource nothing registers: the reference is a
9
+ * string in an AJV schema, and it is resolved while the OwlMeans context initializes. So a story
10
+ * can type-check, be stamped complete, and leave a backend that dies at boot — which is exactly
11
+ * what happened, because the only real boot in the pipeline ran AFTER the story was accepted.
12
+ *
13
+ * It runs the real thing, but never the live one: a second process, on its own port, against a
14
+ * scratch schema, killed on every exit path.
15
+ */
5
16
  /**
6
17
  * DELIBERATE DIFFERENCE from the publisher: no `resetSchema` step, and therefore no `schema`
7
18
  * failure of its own.
@@ -14,7 +25,7 @@ const STARTUP_LOG_CAP = 16_384;
14
25
  * simply leaves what it created behind, and the next run reconciles into it.
15
26
  */
16
27
  export const runBootCheck = async (deps) => {
17
- const { port, marker, cwd, env, bootId, build, readHealth = readTargetHealth, spawn = nodeSpawn, ddlWindowMs = 10_000, readyWindowMs = 90_000, readyPollMs = 2_000, timeoutMs = 480_000, } = deps;
28
+ const { port, marker, cwd, env, bootId, build, readHealth = healthHelper.readTargetHealth, spawn = nodeSpawn, ddlWindowMs = 10_000, readyWindowMs = 90_000, readyPollMs = 2_000, timeoutMs = 480_000, } = deps;
18
29
  const deadline = Date.now() + timeoutMs;
19
30
  let child = null;
20
31
  let log = '';
@@ -30,8 +41,8 @@ export const runBootCheck = async (deps) => {
30
41
  // Before the spawn, not only after it. The leftover this reclaims belongs to a run that never
31
42
  // finished, so it is already holding the port by the time anything asks for a fresh check —
32
43
  // and the target refuses to start on a taken port rather than stealing it, correctly.
33
- if (!await waitForPortFree(port, 2_000))
34
- await reclaimPort(port, marker);
44
+ if (!await spawnHelper.waitForPortFree(port, 2_000))
45
+ await spawnHelper.reclaimPort(port, marker);
35
46
  child = spawn('bun', ['dist/index.js', marker], {
36
47
  cwd,
37
48
  detached: true,
@@ -48,7 +59,7 @@ export const runBootCheck = async (deps) => {
48
59
  // is for. A target that survives it may still be degraded, which is what the poll asks about.
49
60
  const ddlDeadline = Date.now() + ddlWindowMs;
50
61
  while (Date.now() < ddlDeadline && !exited) {
51
- await delay(200);
62
+ await spawnHelper.delay(200);
52
63
  }
53
64
  if (exited) {
54
65
  return { ok: false, phase: 'boot', error: `The target backend exited while initializing:\n${log}` };
@@ -68,7 +79,7 @@ export const runBootCheck = async (deps) => {
68
79
  if (health.terminal) {
69
80
  return { ok: false, phase: 'boot', error: `${reason}\n${log}`.trim(), dbOk: health.dbOk };
70
81
  }
71
- await delay(readyPollMs);
82
+ await spawnHelper.delay(readyPollMs);
72
83
  }
73
84
  return { ok: false, phase: 'boot', error: `${reason}\n${log}`.trim() };
74
85
  }
@@ -80,7 +91,7 @@ export const runBootCheck = async (deps) => {
80
91
  // and one left holding the database would be indistinguishable from the live backend.
81
92
  if (child != null) {
82
93
  try {
83
- await killGroupAndWait(child);
94
+ await spawnHelper.killGroupAndWait(child);
84
95
  }
85
96
  catch {
86
97
  // Already gone.
@@ -91,22 +102,14 @@ export const runBootCheck = async (deps) => {
91
102
  // detached child alive, and every later check then fails with the target's own "the api port
92
103
  // is already in use" — which reads as a defect in the generated app rather than as a stray
93
104
  // process from a run that never finished.
94
- if (!await waitForPortFree(port))
95
- await reclaimPort(port, marker);
105
+ if (!await spawnHelper.waitForPortFree(port))
106
+ await spawnHelper.reclaimPort(port, marker);
96
107
  }
97
108
  catch {
98
109
  // Nothing else to do — the next check reclaims by marker anyway.
99
110
  }
100
111
  }
101
112
  };
102
- /**
103
- * Outer bound on one boot-check job.
104
- *
105
- * `runBootCheck` caps its own ready poll but not the build in front of it, so this is the only
106
- * thing that guarantees a poller eventually reads `running: false` — a check that outlives it is
107
- * abandoned, not awaited.
108
- */
109
- const WATCHDOG_MS = 600_000;
110
113
  /**
111
114
  * The job behind `BootCheck` / `BootCheckStatus`.
112
115
  *
@@ -1 +1 @@
1
- {"version":3,"file":"boot-check.js","sourceRoot":"","sources":["../../src/executor/boot-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAA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