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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (498) hide show
  1. package/README.md +29 -11
  2. package/agent-meta/manifest.json +16 -0
  3. package/agent-meta/skills/viable-sdk/SKILL.md +1033 -0
  4. package/build/api/collect/types.d.ts +30 -0
  5. package/build/api/collect/types.d.ts.map +1 -0
  6. package/build/api/collect/types.js +2 -0
  7. package/build/api/collect/types.js.map +1 -0
  8. package/build/api/collect.d.ts +14 -0
  9. package/build/api/collect.d.ts.map +1 -0
  10. package/build/api/collect.js +132 -0
  11. package/build/api/collect.js.map +1 -0
  12. package/build/api/consts.local.d.ts +21 -0
  13. package/build/api/consts.local.d.ts.map +1 -0
  14. package/build/api/consts.local.js +25 -0
  15. package/build/api/consts.local.js.map +1 -0
  16. package/build/api/index.d.ts +5 -0
  17. package/build/api/index.d.ts.map +1 -1
  18. package/build/api/index.js +2 -0
  19. package/build/api/index.js.map +1 -1
  20. package/build/api/remote.d.ts +13 -6
  21. package/build/api/remote.d.ts.map +1 -1
  22. package/build/api/remote.js +302 -35
  23. package/build/api/remote.js.map +1 -1
  24. package/build/api/transport/types.d.ts +14 -0
  25. package/build/api/transport/types.d.ts.map +1 -0
  26. package/build/api/transport/types.js +2 -0
  27. package/build/api/transport/types.js.map +1 -0
  28. package/build/api/transport.d.ts +4 -0
  29. package/build/api/transport.d.ts.map +1 -0
  30. package/build/api/transport.js +32 -0
  31. package/build/api/transport.js.map +1 -0
  32. package/build/api/types.d.ts +9 -0
  33. package/build/api/types.d.ts.map +1 -0
  34. package/build/api/types.js +2 -0
  35. package/build/api/types.js.map +1 -0
  36. package/build/api/types.local.d.ts +3 -0
  37. package/build/api/types.local.d.ts.map +1 -0
  38. package/build/api/types.local.js +2 -0
  39. package/build/api/types.local.js.map +1 -0
  40. package/build/consts.d.ts +29 -14
  41. package/build/consts.d.ts.map +1 -1
  42. package/build/consts.js +30 -14
  43. package/build/consts.js.map +1 -1
  44. package/build/context/consts.local.d.ts +18 -0
  45. package/build/context/consts.local.d.ts.map +1 -0
  46. package/build/context/consts.local.js +18 -0
  47. package/build/context/consts.local.js.map +1 -0
  48. package/build/context/index.d.ts +3 -7
  49. package/build/context/index.d.ts.map +1 -1
  50. package/build/context/index.js +58 -25
  51. package/build/context/index.js.map +1 -1
  52. package/build/context/types.d.ts +26 -0
  53. package/build/context/types.d.ts.map +1 -0
  54. package/build/context/types.js +2 -0
  55. package/build/context/types.js.map +1 -0
  56. package/build/executor/boot-check.d.ts +1 -40
  57. package/build/executor/boot-check.d.ts.map +1 -1
  58. package/build/executor/boot-check.js +22 -19
  59. package/build/executor/boot-check.js.map +1 -1
  60. package/build/executor/consts.d.ts +55 -0
  61. package/build/executor/consts.d.ts.map +1 -0
  62. package/build/executor/consts.js +66 -0
  63. package/build/executor/consts.js.map +1 -0
  64. package/build/executor/consts.local.d.ts +63 -0
  65. package/build/executor/consts.local.d.ts.map +1 -0
  66. package/build/executor/consts.local.js +69 -0
  67. package/build/executor/consts.local.js.map +1 -0
  68. package/build/executor/env/types.d.ts +40 -0
  69. package/build/executor/env/types.d.ts.map +1 -0
  70. package/build/executor/env/types.js +2 -0
  71. package/build/executor/env/types.js.map +1 -0
  72. package/build/executor/env.d.ts +11 -20
  73. package/build/executor/env.d.ts.map +1 -1
  74. package/build/executor/env.js +39 -59
  75. package/build/executor/env.js.map +1 -1
  76. package/build/executor/errors.d.ts +15 -0
  77. package/build/executor/errors.d.ts.map +1 -1
  78. package/build/executor/errors.js +19 -2
  79. package/build/executor/errors.js.map +1 -1
  80. package/build/executor/files/types.d.ts +106 -0
  81. package/build/executor/files/types.d.ts.map +1 -0
  82. package/build/executor/files/types.js +2 -0
  83. package/build/executor/files/types.js.map +1 -0
  84. package/build/executor/files.d.ts +2 -50
  85. package/build/executor/files.d.ts.map +1 -1
  86. package/build/executor/files.js +225 -68
  87. package/build/executor/files.js.map +1 -1
  88. package/build/executor/git/types.d.ts +19 -0
  89. package/build/executor/git/types.d.ts.map +1 -0
  90. package/build/executor/git/types.js +2 -0
  91. package/build/executor/git/types.js.map +1 -0
  92. package/build/executor/git.d.ts +4 -36
  93. package/build/executor/git.d.ts.map +1 -1
  94. package/build/executor/git.js +206 -241
  95. package/build/executor/git.js.map +1 -1
  96. package/build/executor/glob/types.d.ts +12 -0
  97. package/build/executor/glob/types.d.ts.map +1 -0
  98. package/build/executor/glob/types.js +2 -0
  99. package/build/executor/glob/types.js.map +1 -0
  100. package/build/executor/glob.d.ts +4 -0
  101. package/build/executor/glob.d.ts.map +1 -0
  102. package/build/executor/glob.js +11 -0
  103. package/build/executor/glob.js.map +1 -0
  104. package/build/executor/health/types.d.ts +39 -0
  105. package/build/executor/health/types.d.ts.map +1 -0
  106. package/build/executor/health/types.js +2 -0
  107. package/build/executor/health/types.js.map +1 -0
  108. package/build/executor/health.d.ts +3 -83
  109. package/build/executor/health.d.ts.map +1 -1
  110. package/build/executor/health.js +76 -91
  111. package/build/executor/health.js.map +1 -1
  112. package/build/executor/index.d.ts +14 -15
  113. package/build/executor/index.d.ts.map +1 -1
  114. package/build/executor/index.js +36 -18
  115. package/build/executor/index.js.map +1 -1
  116. package/build/executor/integrity/types.d.ts +25 -0
  117. package/build/executor/integrity/types.d.ts.map +1 -0
  118. package/build/executor/integrity/types.js +2 -0
  119. package/build/executor/integrity/types.js.map +1 -0
  120. package/build/executor/integrity.d.ts +5 -15
  121. package/build/executor/integrity.d.ts.map +1 -1
  122. package/build/executor/integrity.js +28 -39
  123. package/build/executor/integrity.js.map +1 -1
  124. package/build/executor/layout/types.d.ts +69 -0
  125. package/build/executor/layout/types.d.ts.map +1 -0
  126. package/build/executor/layout/types.js +2 -0
  127. package/build/executor/layout/types.js.map +1 -0
  128. package/build/executor/layout.d.ts +9 -56
  129. package/build/executor/layout.d.ts.map +1 -1
  130. package/build/executor/layout.js +35 -82
  131. package/build/executor/layout.js.map +1 -1
  132. package/build/executor/shell/types.d.ts +76 -0
  133. package/build/executor/shell/types.d.ts.map +1 -0
  134. package/build/executor/shell/types.js +2 -0
  135. package/build/executor/shell/types.js.map +1 -0
  136. package/build/executor/shell.d.ts +3 -78
  137. package/build/executor/shell.d.ts.map +1 -1
  138. package/build/executor/shell.js +61 -91
  139. package/build/executor/shell.js.map +1 -1
  140. package/build/executor/spawn/types.d.ts +98 -0
  141. package/build/executor/spawn/types.d.ts.map +1 -0
  142. package/build/executor/spawn/types.js +2 -0
  143. package/build/executor/spawn/types.js.map +1 -0
  144. package/build/executor/spawn.d.ts +3 -103
  145. package/build/executor/spawn.d.ts.map +1 -1
  146. package/build/executor/spawn.js +192 -274
  147. package/build/executor/spawn.js.map +1 -1
  148. package/build/executor/types.d.ts +123 -0
  149. package/build/executor/types.d.ts.map +1 -0
  150. package/build/executor/types.js +2 -0
  151. package/build/executor/types.js.map +1 -0
  152. package/build/executor/types.local.d.ts +6 -0
  153. package/build/executor/types.local.d.ts.map +1 -0
  154. package/build/executor/types.local.js +2 -0
  155. package/build/executor/types.local.js.map +1 -0
  156. package/build/index.d.ts +14 -1
  157. package/build/index.d.ts.map +1 -1
  158. package/build/index.js +5 -1
  159. package/build/index.js.map +1 -1
  160. package/build/project/consts.d.ts +17 -0
  161. package/build/project/consts.d.ts.map +1 -0
  162. package/build/project/consts.js +17 -0
  163. package/build/project/consts.js.map +1 -0
  164. package/build/project/consts.local.d.ts +4 -0
  165. package/build/project/consts.local.d.ts.map +1 -0
  166. package/build/project/consts.local.js +4 -0
  167. package/build/project/consts.local.js.map +1 -0
  168. package/build/project/dotenv/types.d.ts +39 -0
  169. package/build/project/dotenv/types.d.ts.map +1 -0
  170. package/build/project/dotenv/types.js +2 -0
  171. package/build/project/dotenv/types.js.map +1 -0
  172. package/build/project/dotenv.d.ts +4 -0
  173. package/build/project/dotenv.d.ts.map +1 -0
  174. package/build/project/dotenv.js +56 -0
  175. package/build/project/dotenv.js.map +1 -0
  176. package/build/project/env/types.d.ts +40 -0
  177. package/build/project/env/types.d.ts.map +1 -0
  178. package/build/project/env/types.js +2 -0
  179. package/build/project/env/types.js.map +1 -0
  180. package/build/project/env.d.ts +2 -98
  181. package/build/project/env.d.ts.map +1 -1
  182. package/build/project/env.js +63 -215
  183. package/build/project/env.js.map +1 -1
  184. package/build/project/marker/types.d.ts +33 -0
  185. package/build/project/marker/types.d.ts.map +1 -0
  186. package/build/project/marker/types.js +2 -0
  187. package/build/project/marker/types.js.map +1 -0
  188. package/build/project/marker.d.ts +4 -25
  189. package/build/project/marker.d.ts.map +1 -1
  190. package/build/project/marker.js +40 -43
  191. package/build/project/marker.js.map +1 -1
  192. package/build/project/probe/types.d.ts +22 -0
  193. package/build/project/probe/types.d.ts.map +1 -0
  194. package/build/project/probe/types.js +2 -0
  195. package/build/project/probe/types.js.map +1 -0
  196. package/build/project/probe.d.ts +4 -0
  197. package/build/project/probe.d.ts.map +1 -0
  198. package/build/project/probe.js +39 -0
  199. package/build/project/probe.js.map +1 -0
  200. package/build/project/report/types.d.ts +18 -0
  201. package/build/project/report/types.d.ts.map +1 -0
  202. package/build/project/report/types.js +2 -0
  203. package/build/project/report/types.js.map +1 -0
  204. package/build/project/report.d.ts +7 -0
  205. package/build/project/report.d.ts.map +1 -0
  206. package/build/project/report.js +68 -0
  207. package/build/project/report.js.map +1 -0
  208. package/build/project/setup/types.d.ts +32 -0
  209. package/build/project/setup/types.d.ts.map +1 -0
  210. package/build/project/setup/types.js +2 -0
  211. package/build/project/setup/types.js.map +1 -0
  212. package/build/project/setup.d.ts +4 -53
  213. package/build/project/setup.d.ts.map +1 -1
  214. package/build/project/setup.js +112 -175
  215. package/build/project/setup.js.map +1 -1
  216. package/build/project/types.d.ts +37 -0
  217. package/build/project/types.d.ts.map +1 -0
  218. package/build/project/types.js +2 -0
  219. package/build/project/types.js.map +1 -0
  220. package/build/run/consts.local.d.ts +3 -0
  221. package/build/run/consts.local.d.ts.map +1 -0
  222. package/build/run/consts.local.js +26 -0
  223. package/build/run/consts.local.js.map +1 -0
  224. package/build/run/index.d.ts +11 -69
  225. package/build/run/index.d.ts.map +1 -1
  226. package/build/run/index.js +9 -147
  227. package/build/run/index.js.map +1 -1
  228. package/build/run/local/types.d.ts +39 -0
  229. package/build/run/local/types.d.ts.map +1 -0
  230. package/build/run/local/types.js +2 -0
  231. package/build/run/local/types.js.map +1 -0
  232. package/build/run/local.d.ts +3 -0
  233. package/build/run/local.d.ts.map +1 -0
  234. package/build/run/local.js +130 -0
  235. package/build/run/local.js.map +1 -0
  236. package/build/run/process/types.d.ts +15 -0
  237. package/build/run/process/types.d.ts.map +1 -0
  238. package/build/run/process/types.js +2 -0
  239. package/build/run/process/types.js.map +1 -0
  240. package/build/run/process.d.ts +4 -0
  241. package/build/run/process.d.ts.map +1 -0
  242. package/build/run/process.js +20 -0
  243. package/build/run/process.js.map +1 -0
  244. package/build/run/serve.d.ts +14 -9
  245. package/build/run/serve.d.ts.map +1 -1
  246. package/build/run/serve.js +1 -25
  247. package/build/run/serve.js.map +1 -1
  248. package/build/run/state/types.d.ts +35 -0
  249. package/build/run/state/types.d.ts.map +1 -0
  250. package/build/run/state/types.js +2 -0
  251. package/build/run/state/types.js.map +1 -0
  252. package/build/run/state.d.ts +3 -62
  253. package/build/run/state.d.ts.map +1 -1
  254. package/build/run/state.js +96 -123
  255. package/build/run/state.js.map +1 -1
  256. package/build/run/types.d.ts +78 -0
  257. package/build/run/types.d.ts.map +1 -0
  258. package/build/run/types.js +2 -0
  259. package/build/run/types.js.map +1 -0
  260. package/build/session/consts.local.d.ts +5 -0
  261. package/build/session/consts.local.d.ts.map +1 -0
  262. package/build/session/consts.local.js +5 -0
  263. package/build/session/consts.local.js.map +1 -0
  264. package/build/session/index.d.ts +5 -10
  265. package/build/session/index.d.ts.map +1 -1
  266. package/build/session/index.js +84 -15
  267. package/build/session/index.js.map +1 -1
  268. package/build/session/questions.d.ts +16 -0
  269. package/build/session/questions.d.ts.map +1 -0
  270. package/build/session/questions.js +17 -0
  271. package/build/session/questions.js.map +1 -0
  272. package/build/session/queue.d.ts +61 -0
  273. package/build/session/queue.d.ts.map +1 -0
  274. package/build/session/queue.js +156 -0
  275. package/build/session/queue.js.map +1 -0
  276. package/build/session/tasks.d.ts +11 -30
  277. package/build/session/tasks.d.ts.map +1 -1
  278. package/build/session/tasks.js +18 -78
  279. package/build/session/tasks.js.map +1 -1
  280. package/build/session/types.d.ts +20 -0
  281. package/build/session/types.d.ts.map +1 -0
  282. package/build/session/types.js +2 -0
  283. package/build/session/types.js.map +1 -0
  284. package/build/task/consts.d.ts +12 -0
  285. package/build/task/consts.d.ts.map +1 -0
  286. package/build/task/consts.js +12 -0
  287. package/build/task/consts.js.map +1 -0
  288. package/build/task/consts.local.d.ts +19 -0
  289. package/build/task/consts.local.d.ts.map +1 -0
  290. package/build/task/consts.local.js +72 -0
  291. package/build/task/consts.local.js.map +1 -0
  292. package/build/task/driver.d.ts +1 -28
  293. package/build/task/driver.d.ts.map +1 -1
  294. package/build/task/driver.js +2 -9
  295. package/build/task/driver.js.map +1 -1
  296. package/build/task/envelope/types.d.ts +29 -0
  297. package/build/task/envelope/types.d.ts.map +1 -0
  298. package/build/task/envelope/types.js +2 -0
  299. package/build/task/envelope/types.js.map +1 -0
  300. package/build/task/envelope.d.ts +4 -34
  301. package/build/task/envelope.d.ts.map +1 -1
  302. package/build/task/envelope.js +103 -165
  303. package/build/task/envelope.js.map +1 -1
  304. package/build/task/index.d.ts +5 -0
  305. package/build/task/index.d.ts.map +1 -1
  306. package/build/task/index.js +2 -0
  307. package/build/task/index.js.map +1 -1
  308. package/build/task/inquiry/types.d.ts +38 -0
  309. package/build/task/inquiry/types.d.ts.map +1 -0
  310. package/build/task/inquiry/types.js +2 -0
  311. package/build/task/inquiry/types.js.map +1 -0
  312. package/build/task/inquiry.d.ts +5 -0
  313. package/build/task/inquiry.d.ts.map +1 -0
  314. package/build/task/inquiry.js +188 -0
  315. package/build/task/inquiry.js.map +1 -0
  316. package/build/task/types.d.ts +48 -0
  317. package/build/task/types.d.ts.map +1 -0
  318. package/build/task/types.js +2 -0
  319. package/build/task/types.js.map +1 -0
  320. package/build/tools/account/types.d.ts +24 -0
  321. package/build/tools/account/types.d.ts.map +1 -0
  322. package/build/tools/account/types.js +2 -0
  323. package/build/tools/account/types.js.map +1 -0
  324. package/build/tools/account.d.ts +4 -0
  325. package/build/tools/account.d.ts.map +1 -0
  326. package/build/tools/account.js +72 -0
  327. package/build/tools/account.js.map +1 -0
  328. package/build/tools/blueprints/types.d.ts +5 -0
  329. package/build/tools/blueprints/types.d.ts.map +1 -0
  330. package/build/tools/blueprints/types.js +2 -0
  331. package/build/tools/blueprints/types.js.map +1 -0
  332. package/build/tools/blueprints.d.ts +4 -0
  333. package/build/tools/blueprints.d.ts.map +1 -0
  334. package/build/tools/blueprints.js +23 -0
  335. package/build/tools/blueprints.js.map +1 -0
  336. package/build/tools/catalogue/types.d.ts +8 -0
  337. package/build/tools/catalogue/types.d.ts.map +1 -0
  338. package/build/tools/catalogue/types.js +2 -0
  339. package/build/tools/catalogue/types.js.map +1 -0
  340. package/build/tools/catalogue.d.ts +8 -6
  341. package/build/tools/catalogue.d.ts.map +1 -1
  342. package/build/tools/catalogue.js +2565 -213
  343. package/build/tools/catalogue.js.map +1 -1
  344. package/build/tools/config/types.d.ts +19 -0
  345. package/build/tools/config/types.d.ts.map +1 -0
  346. package/build/tools/config/types.js +2 -0
  347. package/build/tools/config/types.js.map +1 -0
  348. package/build/tools/config.d.ts +4 -0
  349. package/build/tools/config.d.ts.map +1 -0
  350. package/build/tools/config.js +42 -0
  351. package/build/tools/config.js.map +1 -0
  352. package/build/tools/consts.d.ts +61 -0
  353. package/build/tools/consts.d.ts.map +1 -0
  354. package/build/tools/consts.js +515 -0
  355. package/build/tools/consts.js.map +1 -0
  356. package/build/tools/consts.local.d.ts +131 -0
  357. package/build/tools/consts.local.d.ts.map +1 -0
  358. package/build/tools/consts.local.js +236 -0
  359. package/build/tools/consts.local.js.map +1 -0
  360. package/build/tools/control/types.d.ts +17 -0
  361. package/build/tools/control/types.d.ts.map +1 -0
  362. package/build/tools/control/types.js +2 -0
  363. package/build/tools/control/types.js.map +1 -0
  364. package/build/tools/control.d.ts +4 -0
  365. package/build/tools/control.d.ts.map +1 -0
  366. package/build/tools/control.js +44 -0
  367. package/build/tools/control.js.map +1 -0
  368. package/build/tools/feed/types.d.ts +21 -0
  369. package/build/tools/feed/types.d.ts.map +1 -0
  370. package/build/tools/feed/types.js +2 -0
  371. package/build/tools/feed/types.js.map +1 -0
  372. package/build/tools/feed.d.ts +4 -0
  373. package/build/tools/feed.d.ts.map +1 -0
  374. package/build/tools/feed.js +75 -0
  375. package/build/tools/feed.js.map +1 -0
  376. package/build/tools/git/types.d.ts +25 -0
  377. package/build/tools/git/types.d.ts.map +1 -0
  378. package/build/tools/git/types.js +2 -0
  379. package/build/tools/git/types.js.map +1 -0
  380. package/build/tools/git.d.ts +4 -0
  381. package/build/tools/git.d.ts.map +1 -0
  382. package/build/tools/git.js +83 -0
  383. package/build/tools/git.js.map +1 -0
  384. package/build/tools/handover/types.d.ts +49 -0
  385. package/build/tools/handover/types.d.ts.map +1 -0
  386. package/build/tools/handover/types.js +2 -0
  387. package/build/tools/handover/types.js.map +1 -0
  388. package/build/tools/handover.d.ts +8 -0
  389. package/build/tools/handover.d.ts.map +1 -0
  390. package/build/tools/handover.js +138 -0
  391. package/build/tools/handover.js.map +1 -0
  392. package/build/tools/host/types.d.ts +34 -0
  393. package/build/tools/host/types.d.ts.map +1 -0
  394. package/build/tools/host/types.js +2 -0
  395. package/build/tools/host/types.js.map +1 -0
  396. package/build/tools/host.d.ts +4 -0
  397. package/build/tools/host.d.ts.map +1 -0
  398. package/build/tools/host.js +13 -0
  399. package/build/tools/host.js.map +1 -0
  400. package/build/tools/iam/types.d.ts +44 -0
  401. package/build/tools/iam/types.d.ts.map +1 -0
  402. package/build/tools/iam/types.js +2 -0
  403. package/build/tools/iam/types.js.map +1 -0
  404. package/build/tools/iam.d.ts +4 -0
  405. package/build/tools/iam.d.ts.map +1 -0
  406. package/build/tools/iam.js +229 -0
  407. package/build/tools/iam.js.map +1 -0
  408. package/build/tools/index.d.ts +27 -1
  409. package/build/tools/index.d.ts.map +1 -1
  410. package/build/tools/index.js +14 -1
  411. package/build/tools/index.js.map +1 -1
  412. package/build/tools/inflight/types.d.ts +47 -0
  413. package/build/tools/inflight/types.d.ts.map +1 -0
  414. package/build/tools/inflight/types.js +2 -0
  415. package/build/tools/inflight/types.js.map +1 -0
  416. package/build/tools/inflight.d.ts +3 -0
  417. package/build/tools/inflight.d.ts.map +1 -0
  418. package/build/tools/inflight.js +88 -0
  419. package/build/tools/inflight.js.map +1 -0
  420. package/build/tools/kits/types.d.ts +12 -0
  421. package/build/tools/kits/types.d.ts.map +1 -0
  422. package/build/tools/kits/types.js +2 -0
  423. package/build/tools/kits/types.js.map +1 -0
  424. package/build/tools/kits.d.ts +4 -0
  425. package/build/tools/kits.d.ts.map +1 -0
  426. package/build/tools/kits.js +33 -0
  427. package/build/tools/kits.js.map +1 -0
  428. package/build/tools/mcp.d.ts +13 -19
  429. package/build/tools/mcp.d.ts.map +1 -1
  430. package/build/tools/mcp.js +117 -38
  431. package/build/tools/mcp.js.map +1 -1
  432. package/build/tools/platform.d.ts +14 -0
  433. package/build/tools/platform.d.ts.map +1 -0
  434. package/build/tools/platform.js +90 -0
  435. package/build/tools/platform.js.map +1 -0
  436. package/build/tools/production/types.d.ts +22 -0
  437. package/build/tools/production/types.d.ts.map +1 -0
  438. package/build/tools/production/types.js +2 -0
  439. package/build/tools/production/types.js.map +1 -0
  440. package/build/tools/production.d.ts +4 -0
  441. package/build/tools/production.d.ts.map +1 -0
  442. package/build/tools/production.js +80 -0
  443. package/build/tools/production.js.map +1 -0
  444. package/build/tools/refusal/types.d.ts +95 -0
  445. package/build/tools/refusal/types.d.ts.map +1 -0
  446. package/build/tools/refusal/types.js +2 -0
  447. package/build/tools/refusal/types.js.map +1 -0
  448. package/build/tools/refusal.d.ts +4 -0
  449. package/build/tools/refusal.d.ts.map +1 -0
  450. package/build/tools/refusal.js +663 -0
  451. package/build/tools/refusal.js.map +1 -0
  452. package/build/tools/settings/types.d.ts +42 -0
  453. package/build/tools/settings/types.d.ts.map +1 -0
  454. package/build/tools/settings/types.js +2 -0
  455. package/build/tools/settings/types.js.map +1 -0
  456. package/build/tools/settings.d.ts +4 -0
  457. package/build/tools/settings.d.ts.map +1 -0
  458. package/build/tools/settings.js +71 -0
  459. package/build/tools/settings.js.map +1 -0
  460. package/build/tools/status/types.d.ts +25 -0
  461. package/build/tools/status/types.d.ts.map +1 -0
  462. package/build/tools/status/types.js +2 -0
  463. package/build/tools/status/types.js.map +1 -0
  464. package/build/tools/status.d.ts +4 -0
  465. package/build/tools/status.d.ts.map +1 -0
  466. package/build/tools/status.js +183 -0
  467. package/build/tools/status.js.map +1 -0
  468. package/build/tools/stories/types.d.ts +48 -0
  469. package/build/tools/stories/types.d.ts.map +1 -0
  470. package/build/tools/stories/types.js +2 -0
  471. package/build/tools/stories/types.js.map +1 -0
  472. package/build/tools/stories.d.ts +8 -0
  473. package/build/tools/stories.d.ts.map +1 -0
  474. package/build/tools/stories.js +79 -0
  475. package/build/tools/stories.js.map +1 -0
  476. package/build/tools/types.d.ts +177 -26
  477. package/build/tools/types.d.ts.map +1 -1
  478. package/build/tools/types.js +1 -32
  479. package/build/tools/types.js.map +1 -1
  480. package/build/types.d.ts +391 -26
  481. package/build/types.d.ts.map +1 -1
  482. package/build/utils.d.ts +8 -0
  483. package/build/utils.d.ts.map +1 -0
  484. package/build/utils.js +12 -0
  485. package/build/utils.js.map +1 -0
  486. package/package.json +30 -34
  487. package/build/harness/index.d.ts +0 -28
  488. package/build/harness/index.d.ts.map +0 -1
  489. package/build/harness/index.js +0 -83
  490. package/build/harness/index.js.map +0 -1
  491. package/build/harness/templates.d.ts +0 -30
  492. package/build/harness/templates.d.ts.map +0 -1
  493. package/build/harness/templates.js +0 -154
  494. package/build/harness/templates.js.map +0 -1
  495. package/build/tools/jobs.d.ts +0 -12
  496. package/build/tools/jobs.d.ts.map +0 -1
  497. package/build/tools/jobs.js +0 -47
  498. package/build/tools/jobs.js.map +0 -1
@@ -0,0 +1,229 @@
1
+ import { IamGrantMode } from '@owlmeans/viable-common';
2
+ import { APP_GRANT_ACTIONS, APP_GROUP_ACTIONS, APP_ORGANIZATION_ACTIONS, APP_USER_ACTIONS, IAM_EXTERNAL, IAM_RESTRICTED_NOTE, IAM_ROWS_SHOWN, REVOKE_ONLY_GRANT_MODES, } from './consts.local.js';
3
+ export const createIamToolHelper = () => {
4
+ /** A named string argument, trimmed — `''` when it was not given. */
5
+ const text = (args, key) => typeof args[key] === 'string' ? args[key].trim() : '';
6
+ const given = (args, key) => args[key] != null;
7
+ const actions = (list) => `${list.slice(0, -1).join(', ')} or ${list[list.length - 1]}`;
8
+ /** The rows a listing prints — at most {@link IAM_ROWS_SHOWN}, the rest counted. */
9
+ const rows = (response, line, none) => {
10
+ if (response.external === true)
11
+ return IAM_EXTERNAL;
12
+ if (response.items.length < 1)
13
+ return none;
14
+ const shown = response.items.slice(0, IAM_ROWS_SHOWN).map(item => ` ${line(item)}`);
15
+ if (response.items.length > IAM_ROWS_SHOWN)
16
+ shown.push(` … and ${response.items.length - IAM_ROWS_SHOWN} more`);
17
+ return shown.join('\n');
18
+ };
19
+ const userMissing = (args) => {
20
+ switch (args.action) {
21
+ case 'invite':
22
+ return text(args, 'email') === '' ? 'Not done. Name the person to invite by email.' : null;
23
+ case 'update':
24
+ if (text(args, 'profileId') === '')
25
+ return 'Not done. Name the user to update by profileId (app_users lists them).';
26
+ return !given(args, 'name') && !given(args, 'role') && !given(args, 'disabled')
27
+ ? 'Not done. Say what changes: name, role or disabled.' : null;
28
+ case 'remove':
29
+ if (text(args, 'profileId') === '')
30
+ return 'Not done. Name the user to remove by profileId (app_users lists them).';
31
+ return args.confirm !== true
32
+ ? 'Not done. Removing a user takes away their access to this application (their account and other'
33
+ + ' applications stay). Ask the user, then call it again with confirm: true.'
34
+ : null;
35
+ default:
36
+ return `Say what to do with action: ${actions(APP_USER_ACTIONS)}.`;
37
+ }
38
+ };
39
+ /** A grant names exactly one subject; a group always with its organization. */
40
+ const subjectMissing = (args, listing) => {
41
+ const person = text(args, 'profileId') !== '';
42
+ const group = text(args, 'group') !== '';
43
+ if (person && group)
44
+ return 'Not done. Name a person (profileId) or a group (group), not both.';
45
+ if (group && text(args, 'entitySlug') === '') {
46
+ return 'Not done. A group lives in one organization — name it with entitySlug (app_organizations lists them).';
47
+ }
48
+ if (!listing && !person && !group)
49
+ return 'Not done. Name who it is for: a person (profileId) or a group (group + entitySlug).';
50
+ return null;
51
+ };
52
+ const grantMissing = (args) => {
53
+ if (!APP_GRANT_ACTIONS.includes(args.action)) {
54
+ return `Say what to do with action: ${actions(APP_GRANT_ACTIONS)}.`;
55
+ }
56
+ if (text(args, 'permission') === '')
57
+ return 'Not done. Name the permission (app_permissions lists them).';
58
+ const mode = text(args, 'mode');
59
+ if (args.action === 'assign' && REVOKE_ONLY_GRANT_MODES.includes(mode)) {
60
+ return `Not done. mode: ${mode} only takes something back — use it with action: revoke. A grant takes`
61
+ + ' mode blanket or resources, or none.';
62
+ }
63
+ return subjectMissing(args, false);
64
+ };
65
+ const organizationMissing = (args) => {
66
+ if (!APP_ORGANIZATION_ACTIONS.includes(args.action)) {
67
+ return `Say what to do with action: ${actions(APP_ORGANIZATION_ACTIONS)}.`;
68
+ }
69
+ if (text(args, 'entitySlug') === '')
70
+ return 'Not done. Name the organization by entitySlug (app_organizations lists them).';
71
+ switch (args.action) {
72
+ case 'rename':
73
+ return text(args, 'title') === '' ? 'Not done. Give the organization\'s new title.' : null;
74
+ case 'add-member':
75
+ return text(args, 'email') === '' ? 'Not done. Name the person to add by email.' : null;
76
+ case 'update-member':
77
+ if (text(args, 'profileId') === '')
78
+ return 'Not done. Name the member by profileId (app_organizations { entitySlug } lists them).';
79
+ return !given(args, 'owner') && !Array.isArray(args.groups) ? 'Not done. Say what changes: owner or groups.' : null;
80
+ default:
81
+ return text(args, 'profileId') === '' ? 'Not done. Name the member to remove by profileId.' : null;
82
+ }
83
+ };
84
+ const groupMissing = (args) => {
85
+ if (!APP_GROUP_ACTIONS.includes(args.action)) {
86
+ return `Say what to do with action: ${actions(APP_GROUP_ACTIONS)}.`;
87
+ }
88
+ if (text(args, 'entitySlug') === '')
89
+ return 'Not done. Name the group\'s organization by entitySlug.';
90
+ if (text(args, 'group') === '')
91
+ return 'Not done. Name the group by its key.';
92
+ switch (args.action) {
93
+ case 'update':
94
+ return !given(args, 'title') && !Array.isArray(args.bundles)
95
+ ? 'Not done. Say what changes: title, or bundles (the whole list — it replaces the group\'s).' : null;
96
+ case 'delete':
97
+ return args.confirm !== true
98
+ ? 'Not done. Deleting a group takes what it grants away from every member. Ask the user, then call it'
99
+ + ' again with confirm: true.'
100
+ : null;
101
+ case 'add-members':
102
+ case 'remove-members':
103
+ return !Array.isArray(args.profileIds) || args.profileIds.length < 1
104
+ ? 'Not done. List the members by profileIds.' : null;
105
+ default:
106
+ return null;
107
+ }
108
+ };
109
+ const missing = (tool, args) => {
110
+ switch (tool) {
111
+ case 'manage_app_user': return userMissing(args);
112
+ case 'manage_app_grant': return grantMissing(args);
113
+ case 'app_grants': return subjectMissing(args, true);
114
+ case 'manage_app_organization': return organizationMissing(args);
115
+ case 'manage_app_group': return groupMissing(args);
116
+ case 'set_app_permission_default':
117
+ if (text(args, 'permission') === '')
118
+ return 'Not done. Name the permission (app_permissions lists them).';
119
+ return !given(args, 'defaultClass') && !given(args, 'entityScoped')
120
+ ? 'Not done. Say what changes: defaultClass or entityScoped.' : null;
121
+ default:
122
+ return null;
123
+ }
124
+ };
125
+ const grantBody = args => {
126
+ const group = text(args, 'group');
127
+ const entitySlug = text(args, 'entitySlug');
128
+ const resources = Array.isArray(args.resources) ? args.resources.filter(item => typeof item === 'string') : undefined;
129
+ return {
130
+ permission: text(args, 'permission'),
131
+ ...(group !== ''
132
+ ? { group: { entitySlug, key: group } }
133
+ : { profileId: text(args, 'profileId'), ...(entitySlug !== '' ? { entitySlug } : {}) }),
134
+ ...(resources != null && resources.length > 0 ? { resources } : {}),
135
+ ...(typeof args.mode === 'string' ? { mode: args.mode } : {}),
136
+ ...(typeof args.scope === 'string' ? { scope: args.scope } : {}),
137
+ };
138
+ };
139
+ const renderUser = user => [
140
+ user.name ?? user.email ?? user.profileId,
141
+ ...(user.name != null && user.email != null ? [`<${user.email}>`] : []),
142
+ `· ${user.role}`,
143
+ ...(user.disabled === true ? ['· disabled'] : []),
144
+ ...(user.grantCount != null ? [`· ${user.grantCount} grant(s)`] : []),
145
+ ...(user.home != null ? [`· app ${user.home}`] : []),
146
+ `· profileId ${user.profileId}`,
147
+ ].join(' ');
148
+ const renderUsers = (response, lead) => `${lead}${response.external === true ? '' : ` (${response.items.length})`}:\n`
149
+ + rows(response, renderUser, ' nobody yet — manage_app_user { action: invite, email } invites someone.');
150
+ const renderDefinition = definition => [
151
+ definition.name,
152
+ ...(definition.title != null && definition.title !== '' ? [`"${definition.title}"`] : []),
153
+ ...(definition.area != null ? [`· ${definition.area} area`] : []),
154
+ `· default: ${definition.defaultClass ?? 'none'}`,
155
+ ...(definition.entityScoped === true ? ['· bound to an organization'] : []),
156
+ ...(definition.resourceScoped === true ? ['· per record'] : []),
157
+ ...(definition.managed === true ? ['· the platform\'s own'] : []),
158
+ ].join(' ');
159
+ const renderPermissions = response => [
160
+ `The application's permissions (${response.items.length}) — tenancy: operators ${response.tenancy.operators ? 'act' : 'do not act'}`
161
+ + ` in an organization, users ${response.tenancy.users ? 'act' : 'do not act'} in one:`,
162
+ rows(response, renderDefinition, ' none declared yet.'),
163
+ ].join('\n');
164
+ const subjectOf = (grant) => grant.group != null ? `group ${grant.group.key} of ${grant.group.entitySlug}` : `user ${grant.profileId ?? '?'}`;
165
+ const renderGrant = grant => [
166
+ `${grant.permission} → ${subjectOf(grant)}`,
167
+ ...(grant.resources != null && grant.resources.length > 0 ? [`· records ${grant.resources.join(', ')}`] : []),
168
+ ...(grant.mode != null ? [`· ${grant.mode}`] : []),
169
+ ...(grant.entitySlug != null ? [`· in ${grant.entitySlug}`] : []),
170
+ ...(grant.origin != null ? [`· ${grant.origin}${grant.through != null ? ` through ${subjectOf({ group: grant.through })}` : ''}`] : []),
171
+ ...(grant.restricted === true ? ['· restricted'] : []),
172
+ ].join(' ');
173
+ const renderGrants = response => {
174
+ const restricted = response.items.filter(grant => grant.restricted === true).length;
175
+ const held = response.items.length - restricted;
176
+ const counts = response.external === true ? ''
177
+ : ` (${held} held${restricted > 0 ? `, ${restricted} restricted` : ''})`;
178
+ return `Grants${counts}:\n` + rows(response, renderGrant, ' none.')
179
+ + (restricted > 0 ? `\n${IAM_RESTRICTED_NOTE}` : '');
180
+ };
181
+ const renderRevoke = body => {
182
+ const subject = subjectOf(body);
183
+ const mode = body.mode ?? (body.resources != null ? IamGrantMode.Resources : IamGrantMode.All);
184
+ switch (mode) {
185
+ case IamGrantMode.Inherit:
186
+ return `Took back ${subject}'s own grant or restriction of ${body.permission}: it holds what it inherits again.`;
187
+ case IamGrantMode.Resources:
188
+ return `Revoked ${body.permission}${body.resources != null ? ` (records ${body.resources.join(', ')})` : ''}`
189
+ + ` from ${subject}.`;
190
+ default:
191
+ return `Revoked ${body.permission} from ${subject}. A declared permission is now restricted for them,`
192
+ + ' inherited grants included — a revoke with mode: inherit lifts that.';
193
+ }
194
+ };
195
+ const renderOrganization = organization => `${organization.entitySlug}${organization.title != null ? ` "${organization.title}"` : ''}`
196
+ + `${organization.members != null ? ` · ${organization.members} member(s)` : ''}`;
197
+ const renderOrganizations = response => `Organizations with people in this application${response.external === true ? '' : ` (${response.items.length})`}:\n`
198
+ + rows(response, renderOrganization, ' none yet.');
199
+ const renderMember = member => [
200
+ member.name ?? member.email ?? member.profileId,
201
+ ...(member.name != null && member.email != null ? [`<${member.email}>`] : []),
202
+ ...(member.owner ? ['· owner'] : []),
203
+ ...(member.groups.length > 0 ? [`· groups ${member.groups.join(', ')}`] : []),
204
+ ...(member.managed === true ? ['· staff'] : []),
205
+ `· profileId ${member.profileId}`,
206
+ ].join(' ');
207
+ const renderMembers = (response, lead) => `${lead}${response.external === true ? '' : ` (${response.items.length})`}:\n` + rows(response, renderMember, ' nobody.');
208
+ const bundleOf = (bundle) => [
209
+ ...(bundle.permissions != null && bundle.permissions.length > 0 ? [bundle.permissions.join(', ')] : []),
210
+ ...(bundle.filter != null ? [`every permission matching ${JSON.stringify(bundle.filter)}`] : []),
211
+ ].join(' + ') || 'nothing';
212
+ const renderGroup = group => [
213
+ `${group.key}${group.title != null ? ` "${group.title}"` : ''}`,
214
+ ...(group.members != null ? [`· ${group.members} member(s)`] : []),
215
+ ...(group.managed === true
216
+ ? ['· the platform\'s staff group: its members, bundles and existence are the platform\'s; its permissions'
217
+ + ' can be granted and restricted (manage_app_grant with group)']
218
+ : []),
219
+ `· grants ${group.bundles.length > 0 ? group.bundles.map(bundleOf).join('; ') : 'nothing'}`,
220
+ ].join(' ');
221
+ const renderGroups = (response, entitySlug) => `Groups of ${entitySlug}${response.external === true ? '' : ` (${response.items.length})`}:\n`
222
+ + rows(response, renderGroup, ' none yet — manage_app_group { action: create } adds one.');
223
+ return {
224
+ missing, grantBody, renderUsers, renderUser, renderPermissions, renderDefinition, renderGrants, renderGrant,
225
+ renderRevoke, renderOrganizations, renderOrganization, renderMembers, renderMember, renderGroups, renderGroup,
226
+ };
227
+ };
228
+ export const iamToolHelper = createIamToolHelper();
229
+ //# sourceMappingURL=iam.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iam.js","sourceRoot":"","sources":["../../src/tools/iam.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAkE,MAAM,yBAAyB,CAAA;AACtH,OAAO,EACL,iBAAiB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,YAAY,EAAE,mBAAmB,EACnH,cAAc,EAAE,uBAAuB,GACxC,MA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C,KAAK,CAAC,OAAO,KAAK,IAAI;YACxB,CAAC,CAAC,CAAC,wGAAwG;sBACvG,8DAA8D,CAAC;YACnE,CAAC,CAAC,EAAE,CAAC;QACP,YAAY,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE;KAC5F,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAEX,MAAM,YAAY,GAAkC,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,CAC3E,aAAa,UAAU,GAAG,QAAQ,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK;UAC5F,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,4DAA4D,CAAC,CAAA;IAE7F,OAAO;QACL,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW;QAC3G,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW;KAC9G,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,EAAE,CAAA"}
@@ -1,5 +1,31 @@
1
1
  export * from './types.js';
2
- export * from './jobs.js';
2
+ export * from './consts.js';
3
+ export * from './host.js';
4
+ export type * from './host/types.js';
5
+ export * from './status.js';
6
+ export type * from './status/types.js';
7
+ export * from './refusal.js';
8
+ export type * from './refusal/types.js';
9
+ export * from './platform.js';
10
+ export * from './stories.js';
11
+ export type * from './stories/types.js';
12
+ export * from './settings.js';
13
+ export type * from './settings/types.js';
14
+ export * from './account.js';
15
+ export type * from './account/types.js';
16
+ export * from './git.js';
17
+ export type * from './git/types.js';
18
+ export * from './production.js';
19
+ export type * from './production/types.js';
20
+ export * from './iam.js';
21
+ export type * from './iam/types.js';
22
+ export * from './control.js';
23
+ export type * from './control/types.js';
3
24
  export * from './catalogue.js';
25
+ export type * from './catalogue/types.js';
4
26
  export * from './mcp.js';
27
+ export * from './inflight.js';
28
+ export type * from './inflight/types.js';
29
+ export * from './handover.js';
30
+ export type * from './handover/types.js';
5
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,mBAAmB,iBAAiB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,mBAAmB,mBAAmB,CAAA;AACtC,cAAc,cAAc,CAAA;AAC5B,mBAAmB,oBAAoB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,mBAAmB,oBAAoB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,mBAAmB,qBAAqB,CAAA;AACxC,cAAc,cAAc,CAAA;AAC5B,mBAAmB,oBAAoB,CAAA;AACvC,cAAc,UAAU,CAAA;AACxB,mBAAmB,gBAAgB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,mBAAmB,uBAAuB,CAAA;AAC1C,cAAc,UAAU,CAAA;AACxB,mBAAmB,gBAAgB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,mBAAmB,oBAAoB,CAAA;AACvC,cAAc,gBAAgB,CAAA;AAC9B,mBAAmB,sBAAsB,CAAA;AACzC,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,mBAAmB,qBAAqB,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,mBAAmB,qBAAqB,CAAA"}
@@ -1,5 +1,18 @@
1
1
  export * from './types.js';
2
- export * from './jobs.js';
2
+ export * from './consts.js';
3
+ export * from './host.js';
4
+ export * from './status.js';
5
+ export * from './refusal.js';
6
+ export * from './platform.js';
7
+ export * from './stories.js';
8
+ export * from './settings.js';
9
+ export * from './account.js';
10
+ export * from './git.js';
11
+ export * from './production.js';
12
+ export * from './iam.js';
13
+ export * from './control.js';
3
14
  export * from './catalogue.js';
4
15
  export * from './mcp.js';
16
+ export * from './inflight.js';
17
+ export * from './handover.js';
5
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AAEzB,cAAc,aAAa,CAAA;AAE3B,cAAc,cAAc,CAAA;AAE5B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAE5B,cAAc,eAAe,CAAA;AAE7B,cAAc,cAAc,CAAA;AAE5B,cAAc,UAAU,CAAA;AAExB,cAAc,iBAAiB,CAAA;AAE/B,cAAc,UAAU,CAAA;AAExB,cAAc,cAAc,CAAA;AAE5B,cAAc,gBAAgB,CAAA;AAE9B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAE7B,cAAc,eAAe,CAAA"}
@@ -0,0 +1,47 @@
1
+ import type { McpToolAnswer } from '../types.js';
2
+ /** One platform call a tool started, running or settled. */
3
+ export interface InflightCall {
4
+ /** The tool that started it. */
5
+ tool: string;
6
+ /** The tool and its arguments — an identical repeat joins this call instead of starting another. */
7
+ key: string;
8
+ /** Resolves with the call's answer, refusals already phrased; never rejects. */
9
+ done: Promise<McpToolAnswer>;
10
+ /** The answer once the call settled; `null` while it runs. */
11
+ answer: McpToolAnswer | null;
12
+ }
13
+ /**
14
+ * The platform calls the delegated mode's tools started, kept until somebody has been given their
15
+ * answer.
16
+ *
17
+ * A call is ATTENDED while a tool is waiting on it — the one that started it, or an identical repeat
18
+ * that joined it — and that tool answers with it. Once every waiter has answered something else (a
19
+ * model task the call is blocked on, or "still running"), it is DETACHED, and its answer, when it
20
+ * comes, is reported by `submit_task_result` or `next_task`.
21
+ */
22
+ export interface InflightCalls {
23
+ /**
24
+ * The call this tool already runs with these arguments, or a new one `run` starts. Either way the
25
+ * caller is counted as waiting on it until it calls `release` or `forget`.
26
+ */
27
+ join: (tool: string, args: Record<string, unknown>, run: () => Promise<McpToolAnswer>) => InflightCall;
28
+ /** The caller stops waiting without the answer; the call goes on, detached once nobody waits. */
29
+ release: (call: InflightCall) => void;
30
+ /** The caller answered with the call's own answer: nobody needs to be told it again. */
31
+ forget: (call: InflightCall) => void;
32
+ /** Detached calls that settled, each forgotten as it is returned — reported exactly once. */
33
+ drainSettled: () => InflightCall[];
34
+ /** Whether a detached call has settled and nobody has been told yet. */
35
+ hasSettled: () => boolean;
36
+ /**
37
+ * Calls still running that no tool waits on — the ones whose answer the task loop will report.
38
+ * An attended call is left out: the tool waiting on it answers with it.
39
+ */
40
+ running: () => InflightCall[];
41
+ /**
42
+ * Whether a detached call has settled, waiting up to `waitMs` for one to; `true` at once when one
43
+ * already has. Takes nothing — `drainSettled` does.
44
+ */
45
+ settled: (waitMs: number, signal?: AbortSignal) => Promise<boolean>;
46
+ }
47
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/inflight/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,4DAA4D;AAC5D,MAAM,WAAW,YAAY;IAC3B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,oGAAoG;IACpG,GAAG,EAAE,MAAM,CAAA;IACX,gFAAgF;IAChF,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IAC5B,8DAA8D;IAC9D,MAAM,EAAE,aAAa,GAAG,IAAI,CAAA;CAC7B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,KAAK,YAAY,CAAA;IACtG,iGAAiG;IACjG,OAAO,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAA;IACrC,wFAAwF;IACxF,MAAM,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAA;IACpC,6FAA6F;IAC7F,YAAY,EAAE,MAAM,YAAY,EAAE,CAAA;IAClC,wEAAwE;IACxE,UAAU,EAAE,MAAM,OAAO,CAAA;IACzB;;;OAGG;IACH,OAAO,EAAE,MAAM,YAAY,EAAE,CAAA;IAC7B;;;OAGG;IACH,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CACpE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tools/inflight/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { InflightCalls } from './inflight/types.js';
2
+ export declare const createInflightCalls: () => InflightCalls;
3
+ //# sourceMappingURL=inflight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inflight.d.ts","sourceRoot":"","sources":["../../src/tools/inflight.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAWtE,eAAO,MAAM,mBAAmB,QAAO,aAyFtC,CAAA"}
@@ -0,0 +1,88 @@
1
+ /** The same arguments in any key order are the same call. */
2
+ const canonical = (value) => {
3
+ if (Array.isArray(value))
4
+ return value.map(canonical);
5
+ if (value == null || typeof value !== 'object')
6
+ return value;
7
+ return Object.fromEntries(Object.keys(value).sort()
8
+ .map(key => [key, canonical(value[key])]));
9
+ };
10
+ export const createInflightCalls = () => {
11
+ const calls = new Map();
12
+ /** How many tools are waiting on each call; a call nobody waits on is detached. */
13
+ const waiters = new Map();
14
+ const listeners = [];
15
+ const detachedAndSettled = () => [...calls.values()].filter(call => call.answer != null && (waiters.get(call) ?? 0) < 1);
16
+ const wake = () => {
17
+ if (detachedAndSettled().length < 1)
18
+ return;
19
+ for (const listener of listeners.splice(0))
20
+ listener();
21
+ };
22
+ const join = (tool, args, run) => {
23
+ const key = `${tool} ${JSON.stringify(canonical(args))}`;
24
+ let call = calls.get(key);
25
+ if (call == null) {
26
+ const started = { tool, key, done: Promise.resolve(null), answer: null };
27
+ started.done = run().then(answer => {
28
+ started.answer = answer;
29
+ wake();
30
+ return answer;
31
+ });
32
+ call = started;
33
+ calls.set(key, call);
34
+ }
35
+ waiters.set(call, (waiters.get(call) ?? 0) + 1);
36
+ return call;
37
+ };
38
+ const release = (call) => {
39
+ const left = (waiters.get(call) ?? 1) - 1;
40
+ if (left > 0) {
41
+ waiters.set(call, left);
42
+ return;
43
+ }
44
+ waiters.delete(call);
45
+ wake();
46
+ };
47
+ const forget = (call) => {
48
+ waiters.delete(call);
49
+ if (calls.get(call.key) === call)
50
+ calls.delete(call.key);
51
+ };
52
+ const drainSettled = () => {
53
+ const settled = detachedAndSettled();
54
+ for (const call of settled)
55
+ forget(call);
56
+ return settled;
57
+ };
58
+ const hasSettled = () => detachedAndSettled().length > 0;
59
+ const running = () => [...calls.values()].filter(call => call.answer == null && (waiters.get(call) ?? 0) < 1);
60
+ const settled = async (waitMs, signal) => {
61
+ if (detachedAndSettled().length > 0)
62
+ return true;
63
+ if (waitMs <= 0 || signal?.aborted === true)
64
+ return false;
65
+ return await new Promise(resolve => {
66
+ const leave = () => {
67
+ clearTimeout(timer);
68
+ signal?.removeEventListener('abort', abandon);
69
+ const at = listeners.indexOf(listener);
70
+ if (at >= 0)
71
+ listeners.splice(at, 1);
72
+ };
73
+ const abandon = () => {
74
+ leave();
75
+ resolve(false);
76
+ };
77
+ const listener = () => {
78
+ leave();
79
+ resolve(true);
80
+ };
81
+ const timer = setTimeout(abandon, waitMs);
82
+ signal?.addEventListener('abort', abandon, { once: true });
83
+ listeners.push(listener);
84
+ });
85
+ };
86
+ return { join, release, forget, drainSettled, hasSettled, running, settled };
87
+ };
88
+ //# sourceMappingURL=inflight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inflight.js","sourceRoot":"","sources":["../../src/tools/inflight.ts"],"names":[],"mappings":"AAGA,6DAA6D;AAC7D,MAAM,SAAS,GAAG,CAAC,KAAc,EAAW,EAAE;IAC5C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IACrD,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAE5D,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,KAAgC,CAAC,CAAC,IAAI,EAAE;SAC3E,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,SAAS,CAAE,KAAiC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC3E,CAAC,CAAA;AAED,MAAM,CAAC,M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,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC1B,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;IAED,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,CAAA;AAC9E,CAAC,CAAA"}
@@ -0,0 +1,12 @@
1
+ import type { ConnectKitApplyResult, PlanningKitView } from '@owlmeans/viable-common';
2
+ /** The planning kits a project is offered, and the result of applying one, as a parent reads them. */
3
+ export interface KitsUtils {
4
+ /**
5
+ * Every kit offered for a project: what it is for, the container its cards live in, each card
6
+ * type with its main flow, and each flow's statuses in order (the planning intrinsic in brackets).
7
+ */
8
+ renderKits: (projectId: string, kits: PlanningKitView[]) => string;
9
+ /** What applying a kit wrote, left out and warned about. */
10
+ renderKitApply: (projectId: string, kit: string, result: ConnectKitApplyResult) => string;
11
+ }
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/kits/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAErF,sGAAsG;AACtG,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,MAAM,CAAA;IAClE,4DAA4D;IAC5D,cAAc,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,KAAK,MAAM,CAAA;CAC1F"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tools/kits/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { KitsUtils } from './kits/types.js';
2
+ export declare const createKitsUtils: () => KitsUtils;
3
+ export declare const kitsUtils: KitsUtils;
4
+ //# sourceMappingURL=kits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kits.d.ts","sourceRoot":"","sources":["../../src/tools/kits.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,eAAO,MAAM,eAAe,QAAO,SAiClC,CAAA;AAED,eAAO,MAAM,SAAS,WAAoB,CAAA"}
@@ -0,0 +1,33 @@
1
+ export const createKitsUtils = () => {
2
+ /**
3
+ * One kit as a parent reads it: what it is for, the container its cards live in, each card type
4
+ * with its main flow, and each flow's statuses in order (the planning intrinsic in brackets).
5
+ */
6
+ const renderKit = (kit) => {
7
+ const flows = new Map(kit.flows.map(flow => [flow.key, flow]));
8
+ return [
9
+ `${kit.id} · ${kit.title} (${kit.kind})`,
10
+ ` ${kit.purpose}`,
11
+ ` container: ${kit.container.label} (${kit.container.key})`,
12
+ ...kit.types.map(type => ` type ${type.key} · ${type.label} — flow ${flows.get(type.flow)?.label ?? type.flow}`),
13
+ ...kit.flows.map(flow => ` flow ${flow.key}: ${flow.statuses.map(status => `${status.label} [${status.intrinsic}]`).join(' → ')}`),
14
+ ].join('\n');
15
+ };
16
+ const renderKits = (projectId, kits) => kits.length < 1
17
+ ? `no planning kits are offered for ${projectId}`
18
+ : [
19
+ `planning kits for ${projectId}`,
20
+ ...kits.map(renderKit),
21
+ 'next: apply_planning_kit with a kit id (and the type keys to keep, or none for every type)',
22
+ ].join('\n\n');
23
+ const renderKitApply = (projectId, kit, result) => [
24
+ `planning kit ${kit} applied to ${projectId}`,
25
+ `written: ${result.applied.length > 0 ? result.applied.join(', ') : 'nothing'}`,
26
+ ...(result.skipped.length > 0 ? [`left out: ${result.skipped.join(', ')}`] : []),
27
+ ...result.warnings.map(warning => `warning: ${warning}`),
28
+ 'The platform rebuilds the preview with the new types; list_stories and project_status show the project as it stands.',
29
+ ].join('\n');
30
+ return { renderKits, renderKitApply };
31
+ };
32
+ export const kitsUtils = createKitsUtils();
33
+ //# sourceMappingURL=kits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kits.js","sourceRoot":"","sources":["../../src/tools/kits.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,eAAe,GAAG,GAAc,EAAE;IAC7C;;;OAGG;IACH,MAAM,SAAS,GAAG,CAAC,GAAoB,EAAU,EAAE;QACjD,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;QAC9D,OAAO;YACL,GAAG,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,IAAI,GAAG;YACxC,KAAK,GAAG,CAAC,OAAO,EAAE;YAClB,gBAAgB,GAAG,CAAC,SAAS,CAAC,KAAK,KAAK,GAAG,CAAC,SAAS,CAAC,GAAG,GAAG;YAC5D,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,IAAI,CAAC,GAAG,MAAM,IAAI,CAAC,KAAK,WAAW,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACjH,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,KAAK,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;SACpI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACd,CAAC,CAAA;IAED,MAAM,UAAU,GAAG,CAAC,SAAiB,EAAE,IAAuB,EAAU,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;QACxF,CAAC,CAAC,oCAAoC,SAAS,EAAE;QACjD,CAAC,CAAC;YACA,qBAAqB,SAAS,EAAE;YAChC,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;YACtB,4FAA4F;SAC7F,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAEhB,MAAM,cAAc,GAAG,CAAC,SAAiB,EAAE,GAAW,EAAE,MAA6B,EAAU,EAAE,CAAC;QAChG,gBAAgB,GAAG,eAAe,SAAS,EAAE;QAC7C,YAAY,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE;QAC/E,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAChF,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,YAAY,OAAO,EAAE,CAAC;QACxD,sHAAsH;KACvH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAEZ,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA;AACvC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,EAAE,CAAA"}
@@ -1,19 +1,4 @@
1
- import type { ToolDeps } from './types.js';
2
- /** The minimum of an MCP server this adapter needs. Typed structurally so the SDK stays optional. */
3
- export interface McpServerLike {
4
- registerTool: (name: string, config: {
5
- title?: string;
6
- description?: string;
7
- inputSchema?: unknown;
8
- }, cb: (args: Record<string, unknown>) => Promise<{
9
- content: Array<{
10
- type: 'text';
11
- text: string;
12
- }>;
13
- structuredContent?: object;
14
- isError?: boolean;
15
- }>) => unknown;
16
- }
1
+ import type { ToolDeps, McpServerLike } from './types.js';
17
2
  /**
18
3
  * Put the catalogue on an MCP server.
19
4
  *
@@ -22,14 +7,23 @@ export interface McpServerLike {
22
7
  * rather than as a slow platform. And containment: a thrown error becomes an `isError` result the
23
8
  * model can read and act on, because an exception crossing the transport tells it only that
24
9
  * something went wrong somewhere.
10
+ *
11
+ * In the delegated mode a platform call may itself stop for a model call this session's parent
12
+ * performs — the parent that is blocked on this very tool. There a tool is the HANDOVER instead of
13
+ * a deadline: its call races a model task arriving, the task is answered first, and the call's own
14
+ * result is delivered by `submit_task_result` / `next_task` once it settles. The task loop and the
15
+ * tools that never reach the platform keep the deadline.
25
16
  */
26
17
  export declare const registerCatalogue: (server: McpServerLike, deps: ToolDeps) => string[];
27
18
  /**
28
19
  * What the server tells a parent agent about itself, before any tool is called.
29
20
  *
30
- * It states the workflow and the two rules that are not discoverable from a tool list: that long
31
- * operations are jobs, and — in the delegated mode — that this session's model calls are the
32
- * parent's to perform. A parent that read only this could still drive the platform correctly.
21
+ * It states the workflow, a one-line map of every capability group (one tool named per family, the
22
+ * full list being `describe_platform`'s), and the rules that are not discoverable from a tool list:
23
+ * that long operations continue server-side and expose domain statuses, that an irreversible tool
24
+ * needs the user's agreement as `confirm: true`, what stays in the browser, and — in the delegated
25
+ * mode — that this session's model calls are the parent's to perform. A family whose tools this
26
+ * host does not offer is never named by tool.
33
27
  */
34
28
  export declare const serverInstructions: (deps: Pick<ToolDeps, 'host'>) => string;
35
29
  //# sourceMappingURL=mcp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/tools/mcp.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAE1C,qGAAqG;AACrG,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,CACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,EACvE,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC;QAC7C,OAAO,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;QAC9C,iBAAiB,CAAC,EAAE,MAAM,CAAA;QAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;KAClB,CAAC,KACC,OAAO,CAAA;CACb;AAgBD;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,WAAY,aAAa,QAAQ,QAAQ,KAAG,MAAM,EA+B/E,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,SAAU,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAG,MAkDjE,CAAA"}
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/tools/mcp.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAgBzD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,WAAY,aAAa,QAAQ,QAAQ,KAAG,MAAM,EAoB/E,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,SAAU,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAG,MAkIjE,CAAA"}