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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (498) hide show
  1. package/README.md +29 -11
  2. package/agent-meta/manifest.json +16 -0
  3. package/agent-meta/skills/viable-sdk/SKILL.md +1033 -0
  4. package/build/api/collect/types.d.ts +30 -0
  5. package/build/api/collect/types.d.ts.map +1 -0
  6. package/build/api/collect/types.js +2 -0
  7. package/build/api/collect/types.js.map +1 -0
  8. package/build/api/collect.d.ts +14 -0
  9. package/build/api/collect.d.ts.map +1 -0
  10. package/build/api/collect.js +132 -0
  11. package/build/api/collect.js.map +1 -0
  12. package/build/api/consts.local.d.ts +21 -0
  13. package/build/api/consts.local.d.ts.map +1 -0
  14. package/build/api/consts.local.js +25 -0
  15. package/build/api/consts.local.js.map +1 -0
  16. package/build/api/index.d.ts +5 -0
  17. package/build/api/index.d.ts.map +1 -1
  18. package/build/api/index.js +2 -0
  19. package/build/api/index.js.map +1 -1
  20. package/build/api/remote.d.ts +13 -6
  21. package/build/api/remote.d.ts.map +1 -1
  22. package/build/api/remote.js +302 -35
  23. package/build/api/remote.js.map +1 -1
  24. package/build/api/transport/types.d.ts +14 -0
  25. package/build/api/transport/types.d.ts.map +1 -0
  26. package/build/api/transport/types.js +2 -0
  27. package/build/api/transport/types.js.map +1 -0
  28. package/build/api/transport.d.ts +4 -0
  29. package/build/api/transport.d.ts.map +1 -0
  30. package/build/api/transport.js +32 -0
  31. package/build/api/transport.js.map +1 -0
  32. package/build/api/types.d.ts +9 -0
  33. package/build/api/types.d.ts.map +1 -0
  34. package/build/api/types.js +2 -0
  35. package/build/api/types.js.map +1 -0
  36. package/build/api/types.local.d.ts +3 -0
  37. package/build/api/types.local.d.ts.map +1 -0
  38. package/build/api/types.local.js +2 -0
  39. package/build/api/types.local.js.map +1 -0
  40. package/build/consts.d.ts +29 -14
  41. package/build/consts.d.ts.map +1 -1
  42. package/build/consts.js +30 -14
  43. package/build/consts.js.map +1 -1
  44. package/build/context/consts.local.d.ts +18 -0
  45. package/build/context/consts.local.d.ts.map +1 -0
  46. package/build/context/consts.local.js +18 -0
  47. package/build/context/consts.local.js.map +1 -0
  48. package/build/context/index.d.ts +3 -7
  49. package/build/context/index.d.ts.map +1 -1
  50. package/build/context/index.js +58 -25
  51. package/build/context/index.js.map +1 -1
  52. package/build/context/types.d.ts +26 -0
  53. package/build/context/types.d.ts.map +1 -0
  54. package/build/context/types.js +2 -0
  55. package/build/context/types.js.map +1 -0
  56. package/build/executor/boot-check.d.ts +1 -40
  57. package/build/executor/boot-check.d.ts.map +1 -1
  58. package/build/executor/boot-check.js +22 -19
  59. package/build/executor/boot-check.js.map +1 -1
  60. package/build/executor/consts.d.ts +55 -0
  61. package/build/executor/consts.d.ts.map +1 -0
  62. package/build/executor/consts.js +66 -0
  63. package/build/executor/consts.js.map +1 -0
  64. package/build/executor/consts.local.d.ts +63 -0
  65. package/build/executor/consts.local.d.ts.map +1 -0
  66. package/build/executor/consts.local.js +69 -0
  67. package/build/executor/consts.local.js.map +1 -0
  68. package/build/executor/env/types.d.ts +40 -0
  69. package/build/executor/env/types.d.ts.map +1 -0
  70. package/build/executor/env/types.js +2 -0
  71. package/build/executor/env/types.js.map +1 -0
  72. package/build/executor/env.d.ts +11 -20
  73. package/build/executor/env.d.ts.map +1 -1
  74. package/build/executor/env.js +39 -59
  75. package/build/executor/env.js.map +1 -1
  76. package/build/executor/errors.d.ts +15 -0
  77. package/build/executor/errors.d.ts.map +1 -1
  78. package/build/executor/errors.js +19 -2
  79. package/build/executor/errors.js.map +1 -1
  80. package/build/executor/files/types.d.ts +106 -0
  81. package/build/executor/files/types.d.ts.map +1 -0
  82. package/build/executor/files/types.js +2 -0
  83. package/build/executor/files/types.js.map +1 -0
  84. package/build/executor/files.d.ts +2 -50
  85. package/build/executor/files.d.ts.map +1 -1
  86. package/build/executor/files.js +225 -68
  87. package/build/executor/files.js.map +1 -1
  88. package/build/executor/git/types.d.ts +19 -0
  89. package/build/executor/git/types.d.ts.map +1 -0
  90. package/build/executor/git/types.js +2 -0
  91. package/build/executor/git/types.js.map +1 -0
  92. package/build/executor/git.d.ts +4 -36
  93. package/build/executor/git.d.ts.map +1 -1
  94. package/build/executor/git.js +206 -241
  95. package/build/executor/git.js.map +1 -1
  96. package/build/executor/glob/types.d.ts +12 -0
  97. package/build/executor/glob/types.d.ts.map +1 -0
  98. package/build/executor/glob/types.js +2 -0
  99. package/build/executor/glob/types.js.map +1 -0
  100. package/build/executor/glob.d.ts +4 -0
  101. package/build/executor/glob.d.ts.map +1 -0
  102. package/build/executor/glob.js +11 -0
  103. package/build/executor/glob.js.map +1 -0
  104. package/build/executor/health/types.d.ts +39 -0
  105. package/build/executor/health/types.d.ts.map +1 -0
  106. package/build/executor/health/types.js +2 -0
  107. package/build/executor/health/types.js.map +1 -0
  108. package/build/executor/health.d.ts +3 -83
  109. package/build/executor/health.d.ts.map +1 -1
  110. package/build/executor/health.js +76 -91
  111. package/build/executor/health.js.map +1 -1
  112. package/build/executor/index.d.ts +14 -15
  113. package/build/executor/index.d.ts.map +1 -1
  114. package/build/executor/index.js +36 -18
  115. package/build/executor/index.js.map +1 -1
  116. package/build/executor/integrity/types.d.ts +25 -0
  117. package/build/executor/integrity/types.d.ts.map +1 -0
  118. package/build/executor/integrity/types.js +2 -0
  119. package/build/executor/integrity/types.js.map +1 -0
  120. package/build/executor/integrity.d.ts +5 -15
  121. package/build/executor/integrity.d.ts.map +1 -1
  122. package/build/executor/integrity.js +28 -39
  123. package/build/executor/integrity.js.map +1 -1
  124. package/build/executor/layout/types.d.ts +69 -0
  125. package/build/executor/layout/types.d.ts.map +1 -0
  126. package/build/executor/layout/types.js +2 -0
  127. package/build/executor/layout/types.js.map +1 -0
  128. package/build/executor/layout.d.ts +9 -56
  129. package/build/executor/layout.d.ts.map +1 -1
  130. package/build/executor/layout.js +35 -82
  131. package/build/executor/layout.js.map +1 -1
  132. package/build/executor/shell/types.d.ts +76 -0
  133. package/build/executor/shell/types.d.ts.map +1 -0
  134. package/build/executor/shell/types.js +2 -0
  135. package/build/executor/shell/types.js.map +1 -0
  136. package/build/executor/shell.d.ts +3 -78
  137. package/build/executor/shell.d.ts.map +1 -1
  138. package/build/executor/shell.js +61 -91
  139. package/build/executor/shell.js.map +1 -1
  140. package/build/executor/spawn/types.d.ts +98 -0
  141. package/build/executor/spawn/types.d.ts.map +1 -0
  142. package/build/executor/spawn/types.js +2 -0
  143. package/build/executor/spawn/types.js.map +1 -0
  144. package/build/executor/spawn.d.ts +3 -103
  145. package/build/executor/spawn.d.ts.map +1 -1
  146. package/build/executor/spawn.js +192 -274
  147. package/build/executor/spawn.js.map +1 -1
  148. package/build/executor/types.d.ts +123 -0
  149. package/build/executor/types.d.ts.map +1 -0
  150. package/build/executor/types.js +2 -0
  151. package/build/executor/types.js.map +1 -0
  152. package/build/executor/types.local.d.ts +6 -0
  153. package/build/executor/types.local.d.ts.map +1 -0
  154. package/build/executor/types.local.js +2 -0
  155. package/build/executor/types.local.js.map +1 -0
  156. package/build/index.d.ts +14 -1
  157. package/build/index.d.ts.map +1 -1
  158. package/build/index.js +5 -1
  159. package/build/index.js.map +1 -1
  160. package/build/project/consts.d.ts +17 -0
  161. package/build/project/consts.d.ts.map +1 -0
  162. package/build/project/consts.js +17 -0
  163. package/build/project/consts.js.map +1 -0
  164. package/build/project/consts.local.d.ts +4 -0
  165. package/build/project/consts.local.d.ts.map +1 -0
  166. package/build/project/consts.local.js +4 -0
  167. package/build/project/consts.local.js.map +1 -0
  168. package/build/project/dotenv/types.d.ts +39 -0
  169. package/build/project/dotenv/types.d.ts.map +1 -0
  170. package/build/project/dotenv/types.js +2 -0
  171. package/build/project/dotenv/types.js.map +1 -0
  172. package/build/project/dotenv.d.ts +4 -0
  173. package/build/project/dotenv.d.ts.map +1 -0
  174. package/build/project/dotenv.js +56 -0
  175. package/build/project/dotenv.js.map +1 -0
  176. package/build/project/env/types.d.ts +40 -0
  177. package/build/project/env/types.d.ts.map +1 -0
  178. package/build/project/env/types.js +2 -0
  179. package/build/project/env/types.js.map +1 -0
  180. package/build/project/env.d.ts +2 -98
  181. package/build/project/env.d.ts.map +1 -1
  182. package/build/project/env.js +63 -215
  183. package/build/project/env.js.map +1 -1
  184. package/build/project/marker/types.d.ts +33 -0
  185. package/build/project/marker/types.d.ts.map +1 -0
  186. package/build/project/marker/types.js +2 -0
  187. package/build/project/marker/types.js.map +1 -0
  188. package/build/project/marker.d.ts +4 -25
  189. package/build/project/marker.d.ts.map +1 -1
  190. package/build/project/marker.js +40 -43
  191. package/build/project/marker.js.map +1 -1
  192. package/build/project/probe/types.d.ts +22 -0
  193. package/build/project/probe/types.d.ts.map +1 -0
  194. package/build/project/probe/types.js +2 -0
  195. package/build/project/probe/types.js.map +1 -0
  196. package/build/project/probe.d.ts +4 -0
  197. package/build/project/probe.d.ts.map +1 -0
  198. package/build/project/probe.js +39 -0
  199. package/build/project/probe.js.map +1 -0
  200. package/build/project/report/types.d.ts +18 -0
  201. package/build/project/report/types.d.ts.map +1 -0
  202. package/build/project/report/types.js +2 -0
  203. package/build/project/report/types.js.map +1 -0
  204. package/build/project/report.d.ts +7 -0
  205. package/build/project/report.d.ts.map +1 -0
  206. package/build/project/report.js +68 -0
  207. package/build/project/report.js.map +1 -0
  208. package/build/project/setup/types.d.ts +32 -0
  209. package/build/project/setup/types.d.ts.map +1 -0
  210. package/build/project/setup/types.js +2 -0
  211. package/build/project/setup/types.js.map +1 -0
  212. package/build/project/setup.d.ts +4 -53
  213. package/build/project/setup.d.ts.map +1 -1
  214. package/build/project/setup.js +112 -175
  215. package/build/project/setup.js.map +1 -1
  216. package/build/project/types.d.ts +37 -0
  217. package/build/project/types.d.ts.map +1 -0
  218. package/build/project/types.js +2 -0
  219. package/build/project/types.js.map +1 -0
  220. package/build/run/consts.local.d.ts +3 -0
  221. package/build/run/consts.local.d.ts.map +1 -0
  222. package/build/run/consts.local.js +26 -0
  223. package/build/run/consts.local.js.map +1 -0
  224. package/build/run/index.d.ts +11 -69
  225. package/build/run/index.d.ts.map +1 -1
  226. package/build/run/index.js +9 -147
  227. package/build/run/index.js.map +1 -1
  228. package/build/run/local/types.d.ts +39 -0
  229. package/build/run/local/types.d.ts.map +1 -0
  230. package/build/run/local/types.js +2 -0
  231. package/build/run/local/types.js.map +1 -0
  232. package/build/run/local.d.ts +3 -0
  233. package/build/run/local.d.ts.map +1 -0
  234. package/build/run/local.js +130 -0
  235. package/build/run/local.js.map +1 -0
  236. package/build/run/process/types.d.ts +15 -0
  237. package/build/run/process/types.d.ts.map +1 -0
  238. package/build/run/process/types.js +2 -0
  239. package/build/run/process/types.js.map +1 -0
  240. package/build/run/process.d.ts +4 -0
  241. package/build/run/process.d.ts.map +1 -0
  242. package/build/run/process.js +20 -0
  243. package/build/run/process.js.map +1 -0
  244. package/build/run/serve.d.ts +14 -9
  245. package/build/run/serve.d.ts.map +1 -1
  246. package/build/run/serve.js +1 -25
  247. package/build/run/serve.js.map +1 -1
  248. package/build/run/state/types.d.ts +35 -0
  249. package/build/run/state/types.d.ts.map +1 -0
  250. package/build/run/state/types.js +2 -0
  251. package/build/run/state/types.js.map +1 -0
  252. package/build/run/state.d.ts +3 -62
  253. package/build/run/state.d.ts.map +1 -1
  254. package/build/run/state.js +96 -123
  255. package/build/run/state.js.map +1 -1
  256. package/build/run/types.d.ts +78 -0
  257. package/build/run/types.d.ts.map +1 -0
  258. package/build/run/types.js +2 -0
  259. package/build/run/types.js.map +1 -0
  260. package/build/session/consts.local.d.ts +5 -0
  261. package/build/session/consts.local.d.ts.map +1 -0
  262. package/build/session/consts.local.js +5 -0
  263. package/build/session/consts.local.js.map +1 -0
  264. package/build/session/index.d.ts +5 -10
  265. package/build/session/index.d.ts.map +1 -1
  266. package/build/session/index.js +84 -15
  267. package/build/session/index.js.map +1 -1
  268. package/build/session/questions.d.ts +16 -0
  269. package/build/session/questions.d.ts.map +1 -0
  270. package/build/session/questions.js +17 -0
  271. package/build/session/questions.js.map +1 -0
  272. package/build/session/queue.d.ts +61 -0
  273. package/build/session/queue.d.ts.map +1 -0
  274. package/build/session/queue.js +156 -0
  275. package/build/session/queue.js.map +1 -0
  276. package/build/session/tasks.d.ts +11 -30
  277. package/build/session/tasks.d.ts.map +1 -1
  278. package/build/session/tasks.js +18 -78
  279. package/build/session/tasks.js.map +1 -1
  280. package/build/session/types.d.ts +20 -0
  281. package/build/session/types.d.ts.map +1 -0
  282. package/build/session/types.js +2 -0
  283. package/build/session/types.js.map +1 -0
  284. package/build/task/consts.d.ts +12 -0
  285. package/build/task/consts.d.ts.map +1 -0
  286. package/build/task/consts.js +12 -0
  287. package/build/task/consts.js.map +1 -0
  288. package/build/task/consts.local.d.ts +19 -0
  289. package/build/task/consts.local.d.ts.map +1 -0
  290. package/build/task/consts.local.js +72 -0
  291. package/build/task/consts.local.js.map +1 -0
  292. package/build/task/driver.d.ts +1 -28
  293. package/build/task/driver.d.ts.map +1 -1
  294. package/build/task/driver.js +2 -9
  295. package/build/task/driver.js.map +1 -1
  296. package/build/task/envelope/types.d.ts +29 -0
  297. package/build/task/envelope/types.d.ts.map +1 -0
  298. package/build/task/envelope/types.js +2 -0
  299. package/build/task/envelope/types.js.map +1 -0
  300. package/build/task/envelope.d.ts +4 -34
  301. package/build/task/envelope.d.ts.map +1 -1
  302. package/build/task/envelope.js +103 -165
  303. package/build/task/envelope.js.map +1 -1
  304. package/build/task/index.d.ts +5 -0
  305. package/build/task/index.d.ts.map +1 -1
  306. package/build/task/index.js +2 -0
  307. package/build/task/index.js.map +1 -1
  308. package/build/task/inquiry/types.d.ts +38 -0
  309. package/build/task/inquiry/types.d.ts.map +1 -0
  310. package/build/task/inquiry/types.js +2 -0
  311. package/build/task/inquiry/types.js.map +1 -0
  312. package/build/task/inquiry.d.ts +5 -0
  313. package/build/task/inquiry.d.ts.map +1 -0
  314. package/build/task/inquiry.js +188 -0
  315. package/build/task/inquiry.js.map +1 -0
  316. package/build/task/types.d.ts +48 -0
  317. package/build/task/types.d.ts.map +1 -0
  318. package/build/task/types.js +2 -0
  319. package/build/task/types.js.map +1 -0
  320. package/build/tools/account/types.d.ts +24 -0
  321. package/build/tools/account/types.d.ts.map +1 -0
  322. package/build/tools/account/types.js +2 -0
  323. package/build/tools/account/types.js.map +1 -0
  324. package/build/tools/account.d.ts +4 -0
  325. package/build/tools/account.d.ts.map +1 -0
  326. package/build/tools/account.js +72 -0
  327. package/build/tools/account.js.map +1 -0
  328. package/build/tools/blueprints/types.d.ts +5 -0
  329. package/build/tools/blueprints/types.d.ts.map +1 -0
  330. package/build/tools/blueprints/types.js +2 -0
  331. package/build/tools/blueprints/types.js.map +1 -0
  332. package/build/tools/blueprints.d.ts +4 -0
  333. package/build/tools/blueprints.d.ts.map +1 -0
  334. package/build/tools/blueprints.js +23 -0
  335. package/build/tools/blueprints.js.map +1 -0
  336. package/build/tools/catalogue/types.d.ts +8 -0
  337. package/build/tools/catalogue/types.d.ts.map +1 -0
  338. package/build/tools/catalogue/types.js +2 -0
  339. package/build/tools/catalogue/types.js.map +1 -0
  340. package/build/tools/catalogue.d.ts +8 -6
  341. package/build/tools/catalogue.d.ts.map +1 -1
  342. package/build/tools/catalogue.js +2565 -213
  343. package/build/tools/catalogue.js.map +1 -1
  344. package/build/tools/config/types.d.ts +19 -0
  345. package/build/tools/config/types.d.ts.map +1 -0
  346. package/build/tools/config/types.js +2 -0
  347. package/build/tools/config/types.js.map +1 -0
  348. package/build/tools/config.d.ts +4 -0
  349. package/build/tools/config.d.ts.map +1 -0
  350. package/build/tools/config.js +42 -0
  351. package/build/tools/config.js.map +1 -0
  352. package/build/tools/consts.d.ts +61 -0
  353. package/build/tools/consts.d.ts.map +1 -0
  354. package/build/tools/consts.js +515 -0
  355. package/build/tools/consts.js.map +1 -0
  356. package/build/tools/consts.local.d.ts +131 -0
  357. package/build/tools/consts.local.d.ts.map +1 -0
  358. package/build/tools/consts.local.js +236 -0
  359. package/build/tools/consts.local.js.map +1 -0
  360. package/build/tools/control/types.d.ts +17 -0
  361. package/build/tools/control/types.d.ts.map +1 -0
  362. package/build/tools/control/types.js +2 -0
  363. package/build/tools/control/types.js.map +1 -0
  364. package/build/tools/control.d.ts +4 -0
  365. package/build/tools/control.d.ts.map +1 -0
  366. package/build/tools/control.js +44 -0
  367. package/build/tools/control.js.map +1 -0
  368. package/build/tools/feed/types.d.ts +21 -0
  369. package/build/tools/feed/types.d.ts.map +1 -0
  370. package/build/tools/feed/types.js +2 -0
  371. package/build/tools/feed/types.js.map +1 -0
  372. package/build/tools/feed.d.ts +4 -0
  373. package/build/tools/feed.d.ts.map +1 -0
  374. package/build/tools/feed.js +75 -0
  375. package/build/tools/feed.js.map +1 -0
  376. package/build/tools/git/types.d.ts +25 -0
  377. package/build/tools/git/types.d.ts.map +1 -0
  378. package/build/tools/git/types.js +2 -0
  379. package/build/tools/git/types.js.map +1 -0
  380. package/build/tools/git.d.ts +4 -0
  381. package/build/tools/git.d.ts.map +1 -0
  382. package/build/tools/git.js +83 -0
  383. package/build/tools/git.js.map +1 -0
  384. package/build/tools/handover/types.d.ts +49 -0
  385. package/build/tools/handover/types.d.ts.map +1 -0
  386. package/build/tools/handover/types.js +2 -0
  387. package/build/tools/handover/types.js.map +1 -0
  388. package/build/tools/handover.d.ts +8 -0
  389. package/build/tools/handover.d.ts.map +1 -0
  390. package/build/tools/handover.js +138 -0
  391. package/build/tools/handover.js.map +1 -0
  392. package/build/tools/host/types.d.ts +34 -0
  393. package/build/tools/host/types.d.ts.map +1 -0
  394. package/build/tools/host/types.js +2 -0
  395. package/build/tools/host/types.js.map +1 -0
  396. package/build/tools/host.d.ts +4 -0
  397. package/build/tools/host.d.ts.map +1 -0
  398. package/build/tools/host.js +13 -0
  399. package/build/tools/host.js.map +1 -0
  400. package/build/tools/iam/types.d.ts +44 -0
  401. package/build/tools/iam/types.d.ts.map +1 -0
  402. package/build/tools/iam/types.js +2 -0
  403. package/build/tools/iam/types.js.map +1 -0
  404. package/build/tools/iam.d.ts +4 -0
  405. package/build/tools/iam.d.ts.map +1 -0
  406. package/build/tools/iam.js +229 -0
  407. package/build/tools/iam.js.map +1 -0
  408. package/build/tools/index.d.ts +27 -1
  409. package/build/tools/index.d.ts.map +1 -1
  410. package/build/tools/index.js +14 -1
  411. package/build/tools/index.js.map +1 -1
  412. package/build/tools/inflight/types.d.ts +47 -0
  413. package/build/tools/inflight/types.d.ts.map +1 -0
  414. package/build/tools/inflight/types.js +2 -0
  415. package/build/tools/inflight/types.js.map +1 -0
  416. package/build/tools/inflight.d.ts +3 -0
  417. package/build/tools/inflight.d.ts.map +1 -0
  418. package/build/tools/inflight.js +88 -0
  419. package/build/tools/inflight.js.map +1 -0
  420. package/build/tools/kits/types.d.ts +12 -0
  421. package/build/tools/kits/types.d.ts.map +1 -0
  422. package/build/tools/kits/types.js +2 -0
  423. package/build/tools/kits/types.js.map +1 -0
  424. package/build/tools/kits.d.ts +4 -0
  425. package/build/tools/kits.d.ts.map +1 -0
  426. package/build/tools/kits.js +33 -0
  427. package/build/tools/kits.js.map +1 -0
  428. package/build/tools/mcp.d.ts +13 -19
  429. package/build/tools/mcp.d.ts.map +1 -1
  430. package/build/tools/mcp.js +117 -38
  431. package/build/tools/mcp.js.map +1 -1
  432. package/build/tools/platform.d.ts +14 -0
  433. package/build/tools/platform.d.ts.map +1 -0
  434. package/build/tools/platform.js +90 -0
  435. package/build/tools/platform.js.map +1 -0
  436. package/build/tools/production/types.d.ts +22 -0
  437. package/build/tools/production/types.d.ts.map +1 -0
  438. package/build/tools/production/types.js +2 -0
  439. package/build/tools/production/types.js.map +1 -0
  440. package/build/tools/production.d.ts +4 -0
  441. package/build/tools/production.d.ts.map +1 -0
  442. package/build/tools/production.js +80 -0
  443. package/build/tools/production.js.map +1 -0
  444. package/build/tools/refusal/types.d.ts +95 -0
  445. package/build/tools/refusal/types.d.ts.map +1 -0
  446. package/build/tools/refusal/types.js +2 -0
  447. package/build/tools/refusal/types.js.map +1 -0
  448. package/build/tools/refusal.d.ts +4 -0
  449. package/build/tools/refusal.d.ts.map +1 -0
  450. package/build/tools/refusal.js +663 -0
  451. package/build/tools/refusal.js.map +1 -0
  452. package/build/tools/settings/types.d.ts +42 -0
  453. package/build/tools/settings/types.d.ts.map +1 -0
  454. package/build/tools/settings/types.js +2 -0
  455. package/build/tools/settings/types.js.map +1 -0
  456. package/build/tools/settings.d.ts +4 -0
  457. package/build/tools/settings.d.ts.map +1 -0
  458. package/build/tools/settings.js +71 -0
  459. package/build/tools/settings.js.map +1 -0
  460. package/build/tools/status/types.d.ts +25 -0
  461. package/build/tools/status/types.d.ts.map +1 -0
  462. package/build/tools/status/types.js +2 -0
  463. package/build/tools/status/types.js.map +1 -0
  464. package/build/tools/status.d.ts +4 -0
  465. package/build/tools/status.d.ts.map +1 -0
  466. package/build/tools/status.js +183 -0
  467. package/build/tools/status.js.map +1 -0
  468. package/build/tools/stories/types.d.ts +48 -0
  469. package/build/tools/stories/types.d.ts.map +1 -0
  470. package/build/tools/stories/types.js +2 -0
  471. package/build/tools/stories/types.js.map +1 -0
  472. package/build/tools/stories.d.ts +8 -0
  473. package/build/tools/stories.d.ts.map +1 -0
  474. package/build/tools/stories.js +79 -0
  475. package/build/tools/stories.js.map +1 -0
  476. package/build/tools/types.d.ts +177 -26
  477. package/build/tools/types.d.ts.map +1 -1
  478. package/build/tools/types.js +1 -32
  479. package/build/tools/types.js.map +1 -1
  480. package/build/types.d.ts +391 -26
  481. package/build/types.d.ts.map +1 -1
  482. package/build/utils.d.ts +8 -0
  483. package/build/utils.d.ts.map +1 -0
  484. package/build/utils.js +12 -0
  485. package/build/utils.js.map +1 -0
  486. package/package.json +30 -34
  487. package/build/harness/index.d.ts +0 -28
  488. package/build/harness/index.d.ts.map +0 -1
  489. package/build/harness/index.js +0 -83
  490. package/build/harness/index.js.map +0 -1
  491. package/build/harness/templates.d.ts +0 -30
  492. package/build/harness/templates.d.ts.map +0 -1
  493. package/build/harness/templates.js +0 -154
  494. package/build/harness/templates.js.map +0 -1
  495. package/build/tools/jobs.d.ts +0 -12
  496. package/build/tools/jobs.d.ts.map +0 -1
  497. package/build/tools/jobs.js +0 -47
  498. package/build/tools/jobs.js.map +0 -1
@@ -1,89 +1,29 @@
1
+ import { OpQueue } from './queue.js';
2
+ /** When the platform stops waiting for a task; one without a readable time waits behind every other. */
3
+ const expiryOf = (task) => {
4
+ const at = Date.parse(task.expiresAt);
5
+ return Number.isNaN(at) ? Number.POSITIVE_INFINITY : at;
6
+ };
1
7
  /**
2
8
  * Model tasks waiting for the parent agent.
3
9
  *
4
- * A queue rather than a callback because of who drains it: the parent agent asks for work when it
5
- * is ready, through a tool call, and may take minutes to answer. Nothing here pushes — the whole
6
- * point of the local-LLM mode is that the platform waits on somebody else's schedule.
7
- *
8
- * The operation id is kept beside each task and never shown to the parent. It is what an answer is
9
- * routed back on, and a parent that could name one could answer an operation it was never given.
10
+ * Everything about how they queue, redeliver and settle is {@link OpQueue}'s; what is left here is
11
+ * the name the rest of the SDK reads them under. A task is a model CALL — the parent runs it in a
12
+ * clean subagent and submits the answer back — which is a different thing from a question, and the
13
+ * two must never drain into one another's tools.
10
14
  */
11
- export class TaskQueue {
12
- queue = [];
13
- ops = new Map();
15
+ export class TaskQueue extends OpQueue {
14
16
  /**
15
- * Every task this session has ever been handed.
16
- *
17
- * The platform redelivers an operation on every poll until it is answered — that is what makes a
18
- * connector restart cost a round trip instead of a run. A model task takes a parent agent tens of
19
- * seconds to answer, so without this the queue grew one copy per poll for the whole time it was
20
- * being answered, and the parent then ran the same task over and over: real model calls, paid
21
- * for, thrown away. Kept after settling too, so a redelivery that raced the platform's deletion
22
- * is ignored rather than answered a second time.
17
+ * The task that expires first goes first. The platform gives up on a task at its `expiresAt` —
18
+ * a synchronous check inside a blocked call within seconds, a run's call within minutes — so the
19
+ * one with the least time left is the one a parent must not find behind the others.
23
20
  */
24
- seen = new Set();
25
- /** Handed out and not yet answered. An answer is checked against the task that asked for it. */
26
- outstanding = new Map();
27
- waiting = [];
28
- /** @returns whether the task was accepted — `false` for a redelivery of one already handed over. */
29
- push(task, opId) {
30
- // The op id is refreshed even for a known task: a redelivery carries the same id today, and
31
- // answering the wrong operation is worse than answering none.
32
- this.ops.set(task.id, opId);
33
- if (this.seen.has(task.id))
34
- return false;
35
- this.seen.add(task.id);
36
- const next = this.waiting.shift();
37
- if (next != null) {
38
- clearTimeout(next.timer);
39
- next.resolve(task);
40
- return true;
41
- }
42
- this.queue.push(task);
43
- return true;
44
- }
45
- /** The next task, or null once `waitMs` elapses. Never rejects: nothing to do is not a failure. */
46
- async take(waitMs) {
47
- const ready = this.queue.shift();
48
- if (ready != null) {
49
- this.outstanding.set(ready.id, ready);
50
- return ready;
51
- }
52
- if (waitMs <= 0)
53
- return null;
54
- return await new Promise(resolve => {
55
- const entry = {
56
- resolve: task => {
57
- if (task != null)
58
- this.outstanding.set(task.id, task);
59
- resolve(task);
60
- },
61
- timer: setTimeout(() => {
62
- const at = this.waiting.indexOf(entry);
63
- if (at >= 0)
64
- this.waiting.splice(at, 1);
65
- resolve(null);
66
- }, waitMs),
67
- };
68
- this.waiting.push(entry);
69
- });
70
- }
71
- opIdOf(taskId) {
72
- return this.ops.get(taskId) ?? null;
21
+ constructor() {
22
+ super((a, b) => expiryOf(a) - expiryOf(b));
73
23
  }
74
- outstandingById(taskId) {
75
- return this.outstanding.get(taskId) ?? null;
76
- }
77
- /** Handed out and still unanswered, oldest first. */
24
+ /** Handed to the parent and still unanswered, oldest first. */
78
25
  outstandingTasks() {
79
- return [...this.outstanding.values()];
80
- }
81
- settle(taskId) {
82
- this.ops.delete(taskId);
83
- this.outstanding.delete(taskId);
84
- }
85
- size() {
86
- return this.queue.length;
26
+ return this.outstanding();
87
27
  }
88
28
  }
89
29
  //# sourceMappingURL=tasks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/session/tasks.ts"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,MAA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AM,CAAA;IAC1B,CAAC;CACF"}
1
+ {"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/session/tasks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,wGAAwG;AACxG,MAAM,QAAQ,GAAG,CAAC,IAAe,EAAU,EAAE;IAC3C,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IAErC,OAAO,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAA;AACzD,CAAC,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,OAAO,SAAU,SAAQ,OAAkB;IAC/C;;;;OAIG;IACH;QACE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5C,CAAC;IAED,+DAA+D;IAC/D,gBAAgB;QACd,OAAO,IAAI,CAAC,WAAW,EAAE,CAAA;IAC3B,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ import type { ConnectorApi, LocalExecutor, OpenSessionArgs } from '../types.js';
2
+ export interface SessionOptions {
3
+ api: ConnectorApi;
4
+ open: OpenSessionArgs;
5
+ /** Absent for a cloud target: the platform's own pod executes its commands. */
6
+ executor?: LocalExecutor;
7
+ /** Which deployment this is, recorded in the project's marker so a later connector finds it. */
8
+ apiUrl?: string;
9
+ log?: (line: string) => void;
10
+ }
11
+ export interface Waiting<T> {
12
+ resolve: (item: T | null) => void;
13
+ timer: ReturnType<typeof setTimeout>;
14
+ }
15
+ /** A caller told when an item is queued, without taking it. */
16
+ export interface Watching {
17
+ resolve: (ready: boolean) => void;
18
+ timer: ReturnType<typeof setTimeout>;
19
+ }
20
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/session/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE/E,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,YAAY,CAAA;IACjB,IAAI,EAAE,eAAe,CAAA;IACrB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB,gGAAgG;IAChG,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAC7B;AAED,MAAM,WAAW,OAAO,CAAC,CAAC;IACxB,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAA;IACjC,KAAK,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAA;CACrC;AAED,+DAA+D;AAC/D,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IACjC,KAAK,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAA;CACrC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/session/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The two values a confirmed and a refused question answer with.
3
+ *
4
+ * Mirrors `CONFIRM_YES` / `CONFIRM_NO` in `@owlmeans/llm-common` — the package that reads the
5
+ * answer — value for value, and is deliberately a copy rather than an import: this package is
6
+ * installed by developers to drive their own machine and must not carry the model runtime, which
7
+ * is the same reason {@link ConnectInquiryKind} mirrors `InquiryKind`. The two must stay equal, or
8
+ * a person's "yes" reaches the asker as a value it has never heard of.
9
+ */
10
+ export declare const CONFIRM_YES = "yes";
11
+ export declare const CONFIRM_NO = "no";
12
+ //# sourceMappingURL=consts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/task/consts.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,QAAQ,CAAA;AAEhC,eAAO,MAAM,UAAU,OAAO,CAAA"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The two values a confirmed and a refused question answer with.
3
+ *
4
+ * Mirrors `CONFIRM_YES` / `CONFIRM_NO` in `@owlmeans/llm-common` — the package that reads the
5
+ * answer — value for value, and is deliberately a copy rather than an import: this package is
6
+ * installed by developers to drive their own machine and must not carry the model runtime, which
7
+ * is the same reason {@link ConnectInquiryKind} mirrors `InquiryKind`. The two must stay equal, or
8
+ * a person's "yes" reaches the asker as a value it has never heard of.
9
+ */
10
+ export const CONFIRM_YES = 'yes';
11
+ export const CONFIRM_NO = 'no';
12
+ //# sourceMappingURL=consts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/task/consts.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAA;AAEhC,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAA"}
@@ -0,0 +1,19 @@
1
+ import { ModelTaskRole, ConnectHarness, ModelTaskMode } from '@owlmeans/viable-common';
2
+ export declare const ROLE_TO_LC: Record<ModelTaskRole, string>;
3
+ /**
4
+ * How each parent agent is told to run a task in a CLEAN subagent.
5
+ *
6
+ * The instruction differs per harness only in the mechanism — which tool spawns a subagent, what
7
+ * the effort knob is called — never in what is being asked. A harness with no subagent mechanism
8
+ * Every one of them carries the inline fallback, which is the same request with the isolation
9
+ * stated rather than enforced. None may assert that the worker EXISTS: `install_harness` is what
10
+ * writes it, nothing in the flow requires that to have been run, and a block that names a file as
11
+ * a fact sends a literal agent to a subagent type it does not have — on the first task, before it
12
+ * has done anything.
13
+ */
14
+ export declare const HOW_TO_RUN: Record<ConnectHarness, string>;
15
+ export declare const SHAPE: Record<ModelTaskMode, string>;
16
+ export declare const ROLE_LABEL: Record<ModelTaskRole, string>;
17
+ /** What a parent may send for a confirm question, beyond the two values themselves. */
18
+ export declare const CONFIRM_WORDS: Record<string, string>;
19
+ //# sourceMappingURL=consts.local.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../../src/task/consts.local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAGtF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAOpD,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CA6BrD,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAU/C,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAKpD,CAAA;AAED,uFAAuF;AACvF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQhD,CAAA"}
@@ -0,0 +1,72 @@
1
+ import { ModelTaskRole, ConnectHarness, ModelTaskMode } from '@owlmeans/viable-common';
2
+ import { CONFIRM_NO, CONFIRM_YES } from './consts.js';
3
+ export const ROLE_TO_LC = {
4
+ [ModelTaskRole.System]: 'system',
5
+ [ModelTaskRole.User]: 'user',
6
+ [ModelTaskRole.Assistant]: 'assistant',
7
+ // A chat model called without the tool definitions cannot receive a tool turn; the content is
8
+ // what mattered anyway, and presenting it as a user turn keeps the conversation readable.
9
+ [ModelTaskRole.Tool]: 'user',
10
+ };
11
+ /**
12
+ * How each parent agent is told to run a task in a CLEAN subagent.
13
+ *
14
+ * The instruction differs per harness only in the mechanism — which tool spawns a subagent, what
15
+ * the effort knob is called — never in what is being asked. A harness with no subagent mechanism
16
+ * Every one of them carries the inline fallback, which is the same request with the isolation
17
+ * stated rather than enforced. None may assert that the worker EXISTS: `install_harness` is what
18
+ * writes it, nothing in the flow requires that to have been run, and a block that names a file as
19
+ * a fact sends a literal agent to a subagent type it does not have — on the first task, before it
20
+ * has done anything.
21
+ */
22
+ export const HOW_TO_RUN = {
23
+ [ConnectHarness.ClaudeCode]: 'Use the Agent tool with subagent_type "viable-worker", which install_harness writes to\n'
24
+ + '.claude/agents/viable-worker.md with effort: low. If that subagent is not installed, either\n'
25
+ + 'call install_harness now or answer INLINE: reason minimally and produce only the answer.\n'
26
+ + 'Give the worker the SYSTEM PROMPT as its opening instruction, then the CONVERSATION in\n'
27
+ + 'order, then the shape rule below. Take its final message verbatim.',
28
+ [ConnectHarness.Codex]: 'Spawn a subagent with the "viable-worker" role, which install_harness writes to config.toml\n'
29
+ + 'as `[agents.viable-worker]` with a low model_reasoning_effort. If it is not installed or\n'
30
+ + 'your session has no subagents, answer the task INLINE in a single reply: reason minimally,\n'
31
+ + 'produce only the answer in the required shape, and nothing else. Give the worker the SYSTEM\n'
32
+ + 'PROMPT first, then the CONVERSATION in order, then the shape rule below. Do not pass this\n'
33
+ + 'outer HOW TO RUN or submit_task_result instruction to the worker: only the parent submits its\n'
34
+ + 'final answer. A text task returns the requested text or source, never a JSON tool-call array;\n'
35
+ + 'that array is only valid in tools mode. Take the worker\'s final message verbatim.',
36
+ [ConnectHarness.Copilot]: 'Delegate to the "viable-worker" custom agent, which install_harness writes to\n'
37
+ + '.github/agents/viable-worker.agent.md. If it is not installed or delegation is\n'
38
+ + 'unavailable, answer the task INLINE in a single reply: reason minimally and produce only\n'
39
+ + 'the answer in the required shape.',
40
+ [ConnectHarness.OpenCode]: 'Invoke the `viable-worker` subagent (@viable-worker, or the Task tool), which install_harness\n'
41
+ + 'writes to .opencode/agent/viable-worker.md. If it is not installed, answer INLINE instead:\n'
42
+ + 'reason minimally and produce only the answer. Give the worker the SYSTEM PROMPT, then the\n'
43
+ + 'CONVERSATION, then the shape rule below.',
44
+ [ConnectHarness.Other]: 'Run this in a fresh, isolated context — not in this conversation. Reason minimally. Produce\n'
45
+ + 'only the answer in the required shape.',
46
+ };
47
+ export const SHAPE = {
48
+ [ModelTaskMode.Text]: 'The answer is plain text. Send it as the `result` string, verbatim.',
49
+ [ModelTaskMode.Json]: 'The answer must be ONE JSON object matching the OUTPUT SCHEMA below — no prose, no code fence,\n'
50
+ + 'no explanation. Send it as `result`.',
51
+ [ModelTaskMode.Tools]: 'Answer with a JSON array of tool calls chosen from the TOOLS below, each\n'
52
+ + '{"name": "...", "args": {...}} — nothing else around it. If no tool call is needed and the\n'
53
+ + 'work is done, answer in plain text instead: that is how the caller learns the turn is over.\n'
54
+ + 'Send whichever it is as `result`.',
55
+ };
56
+ export const ROLE_LABEL = {
57
+ [ModelTaskRole.System]: 'system',
58
+ [ModelTaskRole.User]: 'user',
59
+ [ModelTaskRole.Assistant]: 'assistant',
60
+ [ModelTaskRole.Tool]: 'tool',
61
+ };
62
+ /** What a parent may send for a confirm question, beyond the two values themselves. */
63
+ export const CONFIRM_WORDS = {
64
+ yes: CONFIRM_YES,
65
+ y: CONFIRM_YES,
66
+ true: CONFIRM_YES,
67
+ ok: CONFIRM_YES,
68
+ no: CONFIRM_NO,
69
+ n: CONFIRM_NO,
70
+ false: CONFIRM_NO,
71
+ };
72
+ //# sourceMappingURL=consts.local.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../../src/task/consts.local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACtF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAErD,MAAM,CAAC,MAAM,UAAU,GAAkC;IACvD,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,QAAQ;IAChC,CAAC,aAAa,CAAC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a,CAAC,IAAI,CAAC,EAAE,MAAM;CAC7B,CAAA;AAED,uFAAuF;AACvF,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,GAAG,EAAE,WAAW;IAChB,CAAC,EAAE,WAAW;IACd,IAAI,EAAE,WAAW;IACjB,EAAE,EAAE,WAAW;IACf,EAAE,EAAE,UAAU;IACd,CAAC,EAAE,UAAU;IACb,KAAK,EAAE,UAAU;CAClB,CAAA"}
@@ -1,30 +1,3 @@
1
- import type { ModelTask, ModelTaskResult } from '@owlmeans/viable-common';
2
- /**
3
- * Something that can answer a model task without a coding agent in front of it.
4
- *
5
- * Two consumers, and both are the reason it is an interface rather than a function on the session:
6
- * the end-to-end tests, which have to play the parent agent deterministically, and the CLI this
7
- * SDK exists to make possible, where the "parent agent" is the CLI's own model.
8
- */
9
- export interface TaskDriver {
10
- answer: (task: ModelTask) => Promise<ModelTaskResult>;
11
- }
12
- /** The minimum a chat model must offer to stand in for a parent agent. */
13
- export interface DriverModel {
14
- invoke: (messages: Array<{
15
- role: string;
16
- content: string;
17
- }>) => Promise<string>;
18
- }
19
- export interface LangchainLikeModel {
20
- invoke: (messages: unknown) => Promise<{
21
- content: unknown;
22
- }>;
23
- bindTools?: (tools: unknown[], kwargs?: unknown) => LangchainLikeModel;
24
- }
25
- export interface ModelDriverOptions {
26
- /** One model per tier. A tier with no model falls back to the first one given. */
27
- models: Partial<Record<string, LangchainLikeModel>>;
28
- }
1
+ import type { ModelDriverOptions, TaskDriver } from './types.js';
29
2
  export declare const makeModelTaskDriver: (opts: ModelDriverOptions) => TaskDriver;
30
3
  //# sourceMappingURL=driver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/task/driver.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzE;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,OAAO,CAAC,eAAe,CAAC,CAAA;CACtD;AAED,0EAA0E;AAC1E,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAChF;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;IAC5D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,kBAAkB,CAAA;CACvE;AAED,MAAM,WAAW,kBAAkB;IACjC,kFAAkF;IAClF,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAA;CACpD;AA8DD,eAAO,MAAM,mBAAmB,SAAU,kBAAkB,KAAG,UAwE9D,CAAA"}
1
+ {"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/task/driver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAsB,kBAAkB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAqDpF,eAAO,MAAM,mBAAmB,SAAU,kBAAkB,KAAG,UAwE9D,CAAA"}
@@ -1,17 +1,10 @@
1
- import { ModelTaskMode, ModelTaskResultKind, ModelTaskRole } from '@owlmeans/viable-common';
1
+ import { ModelTaskMode, ModelTaskResultKind } from '@owlmeans/viable-common';
2
+ import { ROLE_TO_LC } from './consts.local.js';
2
3
  const textOf = (content) => typeof content === 'string'
3
4
  ? content
4
5
  : Array.isArray(content)
5
6
  ? content.map(part => part.text ?? '').join('')
6
7
  : String(content ?? '');
7
- const ROLE_TO_LC = {
8
- [ModelTaskRole.System]: 'system',
9
- [ModelTaskRole.User]: 'user',
10
- [ModelTaskRole.Assistant]: 'assistant',
11
- // A chat model called without the tool definitions cannot receive a tool turn; the content is
12
- // what mattered anyway, and presenting it as a user turn keeps the conversation readable.
13
- [ModelTaskRole.Tool]: 'user',
14
- };
15
8
  /**
16
9
  * A reference parent agent, backed by a chat model.
17
10
  *
@@ -1 +1 @@
1
- {"version":3,"file":"driver.js","sourceRoot":"","sources":["../../src/task/driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AA6B3F,MAAM,MAAM,GAAG,CAAC,OAAgB,EAAU,EAAE,CAAC,OAAO,OAAO,KAAK,QAAQ;IACtE,CAAC,CAAC,OAAO;IACT,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QACtB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAE,IAA0B,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QACtE,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAA;AAE3B,MAAM,UAAU,GAAkC;IAChD,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,QAAQ;IAChC,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM;IAC5B,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,WAAW;IACtC,8FAA8F;IAC9F,0FAA0F;IAC1F,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM;CAC7B,CAAA;AAED;;;;;;;;GAQG;AACH;;;;;;;;;;GAUG;AACH,MAAM,WAAW,GAAG,CAClB,MAAe,EACgD,EAAE;IACjE,MAAM,OAAO,GAAG,MAA8D,CAAA;IAC9E,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAChC,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO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oBAC3D,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,CAAA;YAChF,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,0FAA0F;gBAC1F,uFAAuF;gBACvF,mDAAmD;gBACnD,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAG,CAAW,CAAC,OAAO,EAAE,CAAA;YAC1F,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,29 @@
1
+ import type { ModelTask } from '@owlmeans/viable-common';
2
+ import type { EnvelopeOptions, ParsedTaskResult } from '../types.js';
3
+ /** One model task handed to a parent agent, and the answer it sends back checked against it. */
4
+ export interface TaskEnvelopeModel {
5
+ readonly task: ModelTask;
6
+ /**
7
+ * What `next_task` hands the parent agent.
8
+ *
9
+ * Text rather than a structure, because the reader is a language model working from a tool result:
10
+ * it has to be able to act on this without a schema in front of it. Everything it must do is
11
+ * stated in order — how to run it, what to call afterwards, what shape the answer takes — before
12
+ * the material itself, so a model that stops reading early has still read the instruction.
13
+ *
14
+ * The task id appears at the top and in the follow-up call on purpose. It is the only thing that
15
+ * routes an answer back, and a parent that paraphrases the rest but copies the id still works.
16
+ */
17
+ renderTaskEnvelope: (opts: EnvelopeOptions) => string;
18
+ /**
19
+ * Check a parent's answer against what the task asked for, before the platform ever sees it.
20
+ *
21
+ * The refusal is worth more than the parse. A malformed answer that reaches the platform costs a
22
+ * whole retry — another task, another subagent, another wait — while one caught here is a sentence
23
+ * the parent can act on immediately, with the subagent's context still open. So a failure comes
24
+ * back as a `problem`, not as a thrown error, and the caller renders it as a tool error the model
25
+ * reads and corrects.
26
+ */
27
+ parseTaskResult: (raw: unknown) => ParsedTaskResult;
28
+ }
29
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/task/envelope/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEpE,gGAAgG;AAChG,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB;;;;;;;;;;OAUG;IACH,kBAAkB,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,MAAM,CAAA;IACrD;;;;;;;;OAQG;IACH,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,gBAAgB,CAAA;CACpD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/task/envelope/types.ts"],"names":[],"mappings":""}
@@ -1,35 +1,5 @@
1
- import { ConnectHarness } from '@owlmeans/viable-common';
2
- import type { ModelTask, ModelTaskResult } from '@owlmeans/viable-common';
3
- export interface EnvelopeOptions {
4
- harness: ConnectHarness;
5
- /** What the parent said it would run each tier on. Display only. */
6
- tiers?: Partial<Record<string, string>>;
7
- }
8
- /**
9
- * What `next_task` hands the parent agent.
10
- *
11
- * Text rather than a structure, because the reader is a language model working from a tool result:
12
- * it has to be able to act on this without a schema in front of it. Everything it must do is
13
- * stated in order — how to run it, what to call afterwards, what shape the answer takes — before
14
- * the material itself, so a model that stops reading early has still read the instruction.
15
- *
16
- * The task id appears at the top and in the follow-up call on purpose. It is the only thing that
17
- * routes an answer back, and a parent that paraphrases the rest but copies the id still works.
18
- */
19
- export declare const renderTaskEnvelope: (task: ModelTask, opts: EnvelopeOptions) => string;
20
- export interface ParsedTaskResult {
21
- result?: ModelTaskResult;
22
- /** Present when the answer did not match what was asked. Quoted back to the parent verbatim. */
23
- problem?: string;
24
- }
25
- /**
26
- * Check a parent's answer against what the task asked for, before the platform ever sees it.
27
- *
28
- * The refusal is worth more than the parse. A malformed answer that reaches the platform costs a
29
- * whole retry — another task, another subagent, another wait — while one caught here is a sentence
30
- * the parent can act on immediately, with the subagent's context still open. So a failure comes
31
- * back as a `problem`, not as a thrown error, and the caller renders it as a tool error the model
32
- * reads and corrects.
33
- */
34
- export declare const parseTaskResult: (task: ModelTask, raw: unknown) => ParsedTaskResult;
1
+ import { type ModelTask } from '@owlmeans/viable-common';
2
+ import type { TaskEnvelopeModel } from './envelope/types.js';
3
+ /** One model task handed to a parent agent, and the answer it sends back checked against it. */
4
+ export declare const makeTaskEnvelopeModel: (task: ModelTask) => TaskEnvelopeModel;
35
5
  //# sourceMappingURL=envelope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../src/task/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqD,MAAM,yBAAyB,CAAA;AAC3G,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AA4DzE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,cAAc,CAAA;IACvB,oEAAoE;IACpE,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CACxC;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,SAAU,SAAS,QAAQ,eAAe,KAAG,MAgD3E,CAAA;AAWD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB,gGAAgG;IAChG,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAiDD;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,SACpB,SAAS,OAAO,OAAO,KAC5B,gBAqEF,CAAA"}
1
+ {"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../src/task/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsD,KAAK,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAI5G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AA0D5D,gGAAgG;AAChG,eAAO,MAAM,qBAAqB,SAAU,SAAS,KAAG,iBA2HvD,CAAA"}