@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,107 +1,6 @@
1
- import { ConnectHarness, ModelTaskMode, ModelTaskResultKind, ModelTaskRole } from '@owlmeans/viable-common';
1
+ import { ConnectHarness, ModelTaskMode, ModelTaskResultKind } from '@owlmeans/viable-common';
2
2
  import Ajv from 'ajv';
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
- const HOW_TO_RUN = {
15
- [ConnectHarness.ClaudeCode]: 'Use the Agent tool with subagent_type "viable-worker", which install_harness writes to\n'
16
- + '.claude/agents/viable-worker.md with effort: low. If that subagent is not installed, either\n'
17
- + 'call install_harness now or answer INLINE: reason minimally and produce only the answer.\n'
18
- + 'Give the worker the SYSTEM PROMPT as its opening instruction, then the CONVERSATION in\n'
19
- + 'order, then the shape rule below. Take its final message verbatim.',
20
- [ConnectHarness.Codex]: 'Spawn a subagent with the "viable-worker" role, which install_harness writes to config.toml\n'
21
- + 'as `[agents.viable-worker]` with a low model_reasoning_effort. If it is not installed or\n'
22
- + 'your session has no subagents, answer the task INLINE in a single reply: reason minimally,\n'
23
- + 'produce only the answer in the required shape, and nothing else.',
24
- [ConnectHarness.Copilot]: 'Delegate to the "viable-worker" custom agent, which install_harness writes to\n'
25
- + '.github/agents/viable-worker.agent.md. If it is not installed or delegation is\n'
26
- + 'unavailable, answer the task INLINE in a single reply: reason minimally and produce only\n'
27
- + 'the answer in the required shape.',
28
- [ConnectHarness.OpenCode]: 'Invoke the `viable-worker` subagent (@viable-worker, or the Task tool), which install_harness\n'
29
- + 'writes to .opencode/agent/viable-worker.md. If it is not installed, answer INLINE instead:\n'
30
- + 'reason minimally and produce only the answer. Give the worker the SYSTEM PROMPT, then the\n'
31
- + 'CONVERSATION, then the shape rule below.',
32
- [ConnectHarness.Other]: 'Run this in a fresh, isolated context — not in this conversation. Reason minimally. Produce\n'
33
- + 'only the answer in the required shape.',
34
- };
35
- const SHAPE = {
36
- [ModelTaskMode.Text]: 'The answer is plain text. Send it as the `result` string, verbatim.',
37
- [ModelTaskMode.Json]: 'The answer must be ONE JSON object matching the OUTPUT SCHEMA below — no prose, no code fence,\n'
38
- + 'no explanation. Send it as `result`.',
39
- [ModelTaskMode.Tools]: 'Answer with a JSON array of tool calls chosen from the TOOLS below, each\n'
40
- + '{"name": "...", "args": {...}} — nothing else around it. If no tool call is needed and the\n'
41
- + 'work is done, answer in plain text instead: that is how the caller learns the turn is over.\n'
42
- + 'Send whichever it is as `result`.',
43
- };
44
- const ROLE_LABEL = {
45
- [ModelTaskRole.System]: 'system',
46
- [ModelTaskRole.User]: 'user',
47
- [ModelTaskRole.Assistant]: 'assistant',
48
- [ModelTaskRole.Tool]: 'tool',
49
- };
50
- /**
51
- * What `next_task` hands the parent agent.
52
- *
53
- * Text rather than a structure, because the reader is a language model working from a tool result:
54
- * it has to be able to act on this without a schema in front of it. Everything it must do is
55
- * stated in order — how to run it, what to call afterwards, what shape the answer takes — before
56
- * the material itself, so a model that stops reading early has still read the instruction.
57
- *
58
- * The task id appears at the top and in the follow-up call on purpose. It is the only thing that
59
- * routes an answer back, and a parent that paraphrases the rest but copies the id still works.
60
- */
61
- export const renderTaskEnvelope = (task, opts) => {
62
- const model = task.tier != null ? opts.tiers?.[task.tier] : undefined;
63
- const lines = [
64
- `=== VIABLE MODEL TASK ${task.id} ===`,
65
- `role: ${task.role} · tier: ${task.tier}${model != null ? ` → run on: ${model}` : ''}`,
66
- `mode: ${task.mode} · reasoning: LOW${task.maxOutputChars != null ? ` · answer limit: ${task.maxOutputChars} chars` : ''}`,
67
- ...(task.attempt > 0
68
- ? [`This is attempt ${task.attempt + 1}. The previous answer was refused${task.feedback != null ? `: ${task.feedback}` : '.'}`]
69
- : []),
70
- '',
71
- 'HOW TO RUN THIS (do not answer it yourself, in this conversation):',
72
- HOW_TO_RUN[opts.harness] ?? HOW_TO_RUN[ConnectHarness.Other],
73
- '',
74
- 'WHAT TO SEND BACK — call exactly:',
75
- ` submit_task_result { "taskId": "${task.id}", "result": <the subagent's final answer> }`,
76
- SHAPE[task.mode],
77
- 'Do not summarise, improve or reinterpret the answer. Pass it through as it was produced.',
78
- '',
79
- ];
80
- if (task.system != null && task.system !== '') {
81
- lines.push('--- SYSTEM PROMPT (give this to the subagent as its instructions) ---', task.system, '');
82
- }
83
- lines.push('--- CONVERSATION (give this to the subagent, in order) ---');
84
- for (const message of task.messages) {
85
- const label = message.name != null
86
- ? `${ROLE_LABEL[message.role]}:${message.name}`
87
- : ROLE_LABEL[message.role];
88
- lines.push(`[${label}] ${message.content}`);
89
- if (message.toolCalls != null) {
90
- for (const call of message.toolCalls) {
91
- lines.push(`[${label} → ${call.name}] ${JSON.stringify(call.args)}`);
92
- }
93
- }
94
- }
95
- lines.push('');
96
- if (task.mode === ModelTaskMode.Tools && task.tools != null) {
97
- lines.push('--- TOOLS THE SUBAGENT MAY CALL ---', JSON.stringify(task.tools, null, 2), '');
98
- }
99
- if (task.mode === ModelTaskMode.Json && task.outputSchema != null) {
100
- lines.push('--- OUTPUT SCHEMA ---', JSON.stringify(task.outputSchema, null, 2), '');
101
- }
102
- lines.push(`=== END TASK ${task.id} ===`);
103
- return lines.join('\n');
104
- };
3
+ import { HOW_TO_RUN, ROLE_LABEL, SHAPE } from './consts.local.js';
105
4
  /** Strip a code fence a model wrapped its answer in. */
106
5
  const unfence = (raw) => {
107
6
  const trimmed = raw.trim();
@@ -156,75 +55,114 @@ const toolCallList = (parsed) => {
156
55
  return [parsed];
157
56
  return null;
158
57
  };
159
- /**
160
- * Check a parent's answer against what the task asked for, before the platform ever sees it.
161
- *
162
- * The refusal is worth more than the parse. A malformed answer that reaches the platform costs a
163
- * whole retry — another task, another subagent, another wait — while one caught here is a sentence
164
- * the parent can act on immediately, with the subagent's context still open. So a failure comes
165
- * back as a `problem`, not as a thrown error, and the caller renders it as a tool error the model
166
- * reads and corrects.
167
- */
168
- export const parseTaskResult = (task, raw) => {
169
- if (raw == null || (typeof raw === 'string' && raw.trim() === '')) {
170
- return { problem: 'The answer was empty. Run the task and send what the subagent produced.' };
171
- }
172
- if (task.mode === ModelTaskMode.Text) {
173
- const text = typeof raw === 'string' ? raw : JSON.stringify(raw);
174
- return { result: { taskId: task.id, kind: ModelTaskResultKind.Text, text } };
175
- }
176
- let parsed = raw;
177
- if (typeof raw === 'string') {
178
- try {
179
- parsed = JSON.parse(unfence(raw));
58
+ /** One model task handed to a parent agent, and the answer it sends back checked against it. */
59
+ export const makeTaskEnvelopeModel = (task) => {
60
+ const renderTaskEnvelope = (opts) => {
61
+ const model = task.tier != null ? opts.tiers?.[task.tier] : undefined;
62
+ const lines = [
63
+ `=== VIABLE MODEL TASK ${task.id} ===`,
64
+ `role: ${task.role} · tier: ${task.tier}${model != null ? ` → run on: ${model}` : ''}`,
65
+ `mode: ${task.mode} · reasoning: LOW${task.maxOutputChars != null ? ` · answer limit: ${task.maxOutputChars} chars` : ''}`,
66
+ ...(task.attempt > 0
67
+ ? [`This is attempt ${task.attempt + 1}. The previous answer was refused${task.feedback != null ? `: ${task.feedback}` : '.'}`]
68
+ : []),
69
+ '',
70
+ 'HOW TO RUN THIS (do not answer it yourself, in this conversation):',
71
+ HOW_TO_RUN[opts.harness] ?? HOW_TO_RUN[ConnectHarness.Other],
72
+ '',
73
+ 'WHAT TO SEND BACK — call exactly:',
74
+ ` submit_task_result { "taskId": "${task.id}", "result": <the subagent's final answer> }`,
75
+ SHAPE[task.mode],
76
+ 'Do not summarise, improve or reinterpret the answer. Pass it through as it was produced.',
77
+ '',
78
+ ];
79
+ if (task.system != null && task.system !== '') {
80
+ lines.push('--- SYSTEM PROMPT (give this to the subagent as its instructions) ---', task.system, '');
180
81
  }
181
- catch {
182
- if (task.mode === ModelTaskMode.Json) {
183
- return {
184
- problem: 'The answer was not valid JSON. Send ONE JSON object matching the schema, with no prose and no code fence.',
185
- };
82
+ lines.push('--- CONVERSATION (give this to the subagent, in order) ---');
83
+ for (const message of task.messages) {
84
+ const label = message.name != null
85
+ ? `${ROLE_LABEL[message.role]}:${message.name}`
86
+ : ROLE_LABEL[message.role];
87
+ lines.push(`[${label}] ${message.content}`);
88
+ if (message.toolCalls != null) {
89
+ for (const call of message.toolCalls) {
90
+ lines.push(`[${label} → ${call.name}] ${JSON.stringify(call.args)}`);
91
+ }
186
92
  }
187
- // Prose in a tools-mode task is not a malformed answer: it is how a model with tools bound
188
- // says it is finished. Refusing it stalls the agent loop it was ending — every attempt gives
189
- // the same reply and the run dies of exhausted retries with nothing wrong anywhere.
190
- return { result: { taskId: task.id, kind: ModelTaskResultKind.Text, text: raw } };
191
93
  }
192
- }
193
- if (task.mode === ModelTaskMode.Json) {
194
- if (typeof parsed !== 'object' || parsed == null || Array.isArray(parsed)) {
195
- return { problem: 'The answer must be a single JSON object, not an array or a scalar.' };
94
+ lines.push('');
95
+ if (task.mode === ModelTaskMode.Tools && task.tools != null) {
96
+ lines.push('--- TOOLS THE SUBAGENT MAY CALL ---', JSON.stringify(task.tools, null, 2), '');
196
97
  }
197
- const invalid = schemaProblem(task, parsed);
198
- if (invalid != null)
199
- return { problem: invalid };
200
- return { result: { taskId: task.id, kind: ModelTaskResultKind.Json, json: parsed } };
201
- }
202
- const listed = toolCallList(parsed);
203
- if (listed == null) {
204
- // Valid JSON that names no tool call — treated as the model's final say, for the same reason
205
- // prose is. What it may NOT do is name a tool that does not exist, which is checked below.
206
- return {
207
- result: {
208
- taskId: task.id,
209
- kind: ModelTaskResultKind.Text,
210
- text: typeof raw === 'string' ? raw : JSON.stringify(raw),
211
- },
212
- };
213
- }
214
- const known = new Set((task.tools ?? []).map(tool => tool.name));
215
- const calls = [];
216
- for (const entry of listed) {
217
- const call = entry;
218
- if (typeof call.name !== 'string') {
219
- return { problem: 'Every tool call needs a "name". ' + JSON.stringify(entry) };
98
+ if (task.mode === ModelTaskMode.Json && task.outputSchema != null) {
99
+ lines.push('--- OUTPUT SCHEMA ---', JSON.stringify(task.outputSchema, null, 2), '');
100
+ }
101
+ lines.push(`=== END TASK ${task.id} ===`);
102
+ return lines.join('\n');
103
+ };
104
+ const parseTaskResult = (raw) => {
105
+ if (raw == null || (typeof raw === 'string' && raw.trim() === '')) {
106
+ return { problem: 'The answer was empty. Run the task and send what the subagent produced.' };
107
+ }
108
+ if (task.mode === ModelTaskMode.Text) {
109
+ const text = typeof raw === 'string' ? raw : JSON.stringify(raw);
110
+ return { result: { taskId: task.id, kind: ModelTaskResultKind.Text, text } };
111
+ }
112
+ let parsed = raw;
113
+ if (typeof raw === 'string') {
114
+ try {
115
+ parsed = JSON.parse(unfence(raw));
116
+ }
117
+ catch {
118
+ if (task.mode === ModelTaskMode.Json) {
119
+ return {
120
+ problem: 'The answer was not valid JSON. Send ONE JSON object matching the schema, with no prose and no code fence.',
121
+ };
122
+ }
123
+ // Prose in a tools-mode task is not a malformed answer: it is how a model with tools bound
124
+ // says it is finished. Refusing it stalls the agent loop it was ending — every attempt gives
125
+ // the same reply and the run dies of exhausted retries with nothing wrong anywhere.
126
+ return { result: { taskId: task.id, kind: ModelTaskResultKind.Text, text: raw } };
127
+ }
220
128
  }
221
- if (known.size > 0 && !known.has(call.name)) {
129
+ if (task.mode === ModelTaskMode.Json) {
130
+ if (typeof parsed !== 'object' || parsed == null || Array.isArray(parsed)) {
131
+ return { problem: 'The answer must be a single JSON object, not an array or a scalar.' };
132
+ }
133
+ const invalid = schemaProblem(task, parsed);
134
+ if (invalid != null)
135
+ return { problem: invalid };
136
+ return { result: { taskId: task.id, kind: ModelTaskResultKind.Json, json: parsed } };
137
+ }
138
+ const listed = toolCallList(parsed);
139
+ if (listed == null) {
140
+ // Valid JSON that names no tool call — treated as the model's final say, for the same reason
141
+ // prose is. What it may NOT do is name a tool that does not exist, which is checked below.
222
142
  return {
223
- problem: `"${call.name}" is not one of the tools this task offers (${[...known].join(', ')}).`,
143
+ result: {
144
+ taskId: task.id,
145
+ kind: ModelTaskResultKind.Text,
146
+ text: typeof raw === 'string' ? raw : JSON.stringify(raw),
147
+ },
224
148
  };
225
149
  }
226
- calls.push({ name: call.name, args: (call.args ?? {}) });
227
- }
228
- return { result: { taskId: task.id, kind: ModelTaskResultKind.ToolCalls, toolCalls: calls } };
150
+ const known = new Set((task.tools ?? []).map(tool => tool.name));
151
+ const calls = [];
152
+ for (const entry of listed) {
153
+ const call = entry;
154
+ if (typeof call.name !== 'string') {
155
+ return { problem: 'Every tool call needs a "name". ' + JSON.stringify(entry) };
156
+ }
157
+ if (known.size > 0 && !known.has(call.name)) {
158
+ return {
159
+ problem: `"${call.name}" is not one of the tools this task offers (${[...known].join(', ')}).`,
160
+ };
161
+ }
162
+ calls.push({ name: call.name, args: (call.args ?? {}) });
163
+ }
164
+ return { result: { taskId: task.id, kind: ModelTaskResultKind.ToolCalls, toolCalls: calls } };
165
+ };
166
+ return { task, renderTaskEnvelope, parseTaskResult };
229
167
  };
230
168
  //# sourceMappingURL=envelope.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"envelope.js","sourceRoot":"","sources":["../../src/task/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAE3G,OAAO,GAAG,MAAM,KAAK,CAAA;AAErB;;;;;;;;;;GAUG;AACH,MAAM,UAAU,GAAmC;IACjD,CAAC,cAAc,CAAC,UAAU,CAAC,EACzB,0FAA0F;UACxF,+FAA+F;UAC/F,4FAA4F;UAC5F,0FAA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OAAO;oBACL,OAAO,EAAE,IAAI,IAAI,CAAC,IAAI,+CAA+C,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;iBAC/F,CAAA;YACH,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAA4B,EAAE,CAAC,CAAA;QACrF,CAAC;QAED,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,CAAA;IAC/F,CAAC,CAAA;IAED,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,eAAe,EAAE,CAAA;AACtD,CAAC,CAAA"}
@@ -1,3 +1,8 @@
1
1
  export * from './envelope.js';
2
+ export type * from './envelope/types.js';
3
+ export type * from './types.js';
4
+ export * from './inquiry.js';
5
+ export type * from './inquiry/types.js';
6
+ export * from './consts.js';
2
7
  export * from './driver.js';
3
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/task/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/task/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,mBAAmB,qBAAqB,CAAA;AACxC,mBAAmB,YAAY,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,mBAAmB,oBAAoB,CAAA;AACvC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA"}
@@ -1,3 +1,5 @@
1
1
  export * from './envelope.js';
2
+ export * from './inquiry.js';
3
+ export * from './consts.js';
2
4
  export * from './driver.js';
3
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/task/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/task/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAG7B,cAAc,cAAc,CAAA;AAE5B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA"}
@@ -0,0 +1,38 @@
1
+ import type { InquiryPayload } from '@owlmeans/viable-common';
2
+ import type { ParsedAnswer, QuestionEnvelopeOptions } from '../types.js';
3
+ /** One question handed to a parent agent, and the answer it sends back checked against it. */
4
+ export interface QuestionEnvelopeModel {
5
+ readonly inquiry: InquiryPayload;
6
+ /**
7
+ * What `next_question` hands the parent agent.
8
+ *
9
+ * Text, and in the same order a model task's envelope uses: how to handle it, what to call
10
+ * afterwards, then the material — so a model that stops reading early has still read the
11
+ * instruction. The question id appears at the top and in the follow-up call because it is the only
12
+ * thing that routes an answer back.
13
+ *
14
+ * The one thing this envelope says that the task envelope inverts: **do not isolate it**. A model
15
+ * task is handed to a clean subagent precisely so no context leaks into it; a question is handed to
16
+ * a PERSON, and a subagent has none. So there is no harness-specific isolation wording here at
17
+ * all — the harness is carried only because the caller has it and a future difference would belong
18
+ * beside the rest.
19
+ *
20
+ * The declined line is present on every question, whatever its kind. A parent whose user is not
21
+ * available has to have a way to say so: without one it either waits out a 45-minute timeout or
22
+ * invents an answer, and the second is worse.
23
+ */
24
+ renderQuestionEnvelope: (opts: QuestionEnvelopeOptions) => string;
25
+ /**
26
+ * Check what the parent sent against the question that asked for it, before the platform sees it.
27
+ *
28
+ * The same rule the model-task parser follows, for the same reason: a refusal caught here is a
29
+ * sentence the parent can act on immediately, with the person still in front of it, while one the
30
+ * platform catches costs a round trip on a question a human already answered. So a mismatch comes
31
+ * back as a `problem` rather than a throw, and every problem names what WOULD be accepted.
32
+ *
33
+ * `declined` short-circuits everything. It is a real answer — somebody saw the question and chose
34
+ * not to decide — and reading anything else beside it would let a parent both decline and answer.
35
+ */
36
+ parseAnswer: (raw: Record<string, unknown>) => ParsedAnswer;
37
+ }
38
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/task/inquiry/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAExE,8FAA8F;AAC9F,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAA;IAChC;;;;;;;;;;;;;;;;;OAiBG;IACH,sBAAsB,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,MAAM,CAAA;IACjE;;;;;;;;;;OAUG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,YAAY,CAAA;CAC5D"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/task/inquiry/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { type InquiryPayload } from '@owlmeans/viable-common';
2
+ import type { QuestionEnvelopeModel } from './inquiry/types.js';
3
+ /** One question handed to a parent agent, and the answer it sends back checked against it. */
4
+ export declare const makeQuestionEnvelopeModel: (inquiry: InquiryPayload) => QuestionEnvelopeModel;
5
+ //# sourceMappingURL=inquiry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inquiry.d.ts","sourceRoot":"","sources":["../../src/task/inquiry.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2E,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAItI,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAmF/D,8FAA8F;AAC9F,eAAO,MAAM,yBAAyB,YAAa,cAAc,KAAG,qBAwInE,CAAA"}
@@ -0,0 +1,188 @@
1
+ import { ConnectInquiryKind, CONNECT_INQUIRY_MAX_TEXT } from '@owlmeans/viable-common';
2
+ import { CONFIRM_WORDS } from './consts.local.js';
3
+ import { CONFIRM_NO, CONFIRM_YES } from './consts.js';
4
+ /** Whether this question actually carries values a parent can pick from. */
5
+ const hasOptions = (inquiry) => inquiry.options != null && inquiry.options.length > 0;
6
+ /**
7
+ * The call lines a question of THIS kind is answered with.
8
+ *
9
+ * Every line printed here has to be a call the parent can actually make. The value placeholder
10
+ * used to be one line for every kind — `"<one of the values below>"` — and a `Confirm` carries no
11
+ * options, so it pointed at nothing: the parent had to already know the two words, which is the
12
+ * one thing an envelope exists to make unnecessary. A confirm therefore prints its two values in
13
+ * the call itself, and a `Text` question — which has no values either — leads with the field it is
14
+ * actually answered in.
15
+ *
16
+ * A `Choice` that arrived with NO options is the same defect in the remaining kind, and it is a
17
+ * shape that reaches here: `InquiryPayload.options` is optional and only the free-flight
18
+ * `ask_user` tool enforces the "between 2 and max" rule, so nothing on the wire does. It is
19
+ * therefore read as a text question in both directions — the call prints `text`, and
20
+ * {@link QuestionEnvelopeModel.parseAnswer} takes text back — rather than pointing "below" at an OPTIONS section the
21
+ * envelope will not print.
22
+ *
23
+ * The two confirm words are the same pair {@link QuestionEnvelopeModel.parseAnswer} reads back, and it reads them in any
24
+ * case a parent sends, so a printed value is always an accepted one.
25
+ */
26
+ const answerCalls = (inquiry) => {
27
+ const call = (body) => `answer_question { "questionId": "${inquiry.id}", ${body} }`;
28
+ const lines = [];
29
+ if (inquiry.kind === ConnectInquiryKind.Confirm) {
30
+ lines.push(` ${call(`"answer": "${CONFIRM_YES}"`)} (they agreed)`, ` or ${call(`"answer": "${CONFIRM_NO}"`)} (they did not)`);
31
+ }
32
+ else if (inquiry.kind === ConnectInquiryKind.Text || !hasOptions(inquiry)) {
33
+ lines.push(` ${call('"text": "<what they said>"')} (their own words)`);
34
+ }
35
+ else {
36
+ lines.push(` ${call('"answer": "<one of the values below>"')}`);
37
+ if (inquiry.multiple === true) {
38
+ lines.push(` or ${call('"answer": ["<value>", "<value>"]')} (several)`);
39
+ }
40
+ if (inquiry.allowText === true) {
41
+ lines.push(` or ${call('"text": "<what they said>"')} (their own words)`);
42
+ }
43
+ }
44
+ // Present on every question whatever its kind: a parent whose user is not available has to have
45
+ // a way to say so, or it waits out the timeout or invents an answer.
46
+ lines.push(` or ${call('"declined": true')} (nobody can decide)`);
47
+ return lines;
48
+ };
49
+ /** The offered values, listed so a refusal is actionable without re-reading the envelope. */
50
+ const offered = (inquiry) => (inquiry.options ?? []).map(option => option.value).join(', ');
51
+ const asStrings = (value) => {
52
+ if (typeof value === 'string')
53
+ return [value];
54
+ if (Array.isArray(value) && value.every(entry => typeof entry === 'string')) {
55
+ return value;
56
+ }
57
+ return null;
58
+ };
59
+ /**
60
+ * The ONE ceiling, refused rather than silently applied.
61
+ *
62
+ * Cutting the text here would hand the asker most of a decision and say nothing; the person is
63
+ * still in front of the parent, so the honest answer is to ask them to be shorter and to say where
64
+ * a longer answer belongs.
65
+ */
66
+ const capText = (inquiry, answer) => (answer.text?.length ?? 0) > CONNECT_INQUIRY_MAX_TEXT
67
+ ? {
68
+ problem: `Too long — send at most ${CONNECT_INQUIRY_MAX_TEXT} characters; put anything`
69
+ + ' longer in the project instead.',
70
+ }
71
+ : { answer: { ...answer, inquiryId: inquiry.id } };
72
+ /** One question handed to a parent agent, and the answer it sends back checked against it. */
73
+ export const makeQuestionEnvelopeModel = (inquiry) => {
74
+ const renderQuestionEnvelope = (_opts) => {
75
+ const traits = [
76
+ ...(inquiry.multiple === true ? ['pick one or more'] : []),
77
+ ...(inquiry.allowText === true ? ['their own words are accepted instead of an option'] : []),
78
+ ];
79
+ const lines = [
80
+ `=== VIABLE QUESTION ${inquiry.id} ===`,
81
+ `kind: ${inquiry.kind}${traits.length > 0 ? ` · ${traits.join(' · ')}` : ''}`,
82
+ ...(inquiry.expiresAt != null ? [`expires: ${inquiry.expiresAt}`] : []),
83
+ '',
84
+ 'HOW TO ANSWER THIS (do not answer it yourself):',
85
+ 'Put this question to the person you are working for, in your own words. It is a decision about',
86
+ 'THEIR project, and a guess here is a whole application built on the wrong assumption. If they',
87
+ 'are not available, say so — do not invent an answer.',
88
+ '',
89
+ 'WHAT TO SEND BACK — call exactly:',
90
+ ...answerCalls(inquiry),
91
+ '',
92
+ '--- THE QUESTION ---',
93
+ inquiry.question,
94
+ ];
95
+ if (inquiry.context != null && inquiry.context !== '') {
96
+ lines.push('--- BACKGROUND ---', inquiry.context);
97
+ }
98
+ if (inquiry.options != null && inquiry.options.length > 0) {
99
+ lines.push('--- OPTIONS ---');
100
+ for (const option of inquiry.options) {
101
+ lines.push(` ${option.value} — ${option.label}`);
102
+ if (option.description != null && option.description !== '') {
103
+ lines.push(` ${option.description}`);
104
+ }
105
+ }
106
+ }
107
+ if (inquiry.default != null) {
108
+ lines.push('--- IF NOBODY ANSWERS ---', `The platform will assume: ${Array.isArray(inquiry.default) ? inquiry.default.join(', ') : inquiry.default}`);
109
+ }
110
+ lines.push(`=== END QUESTION ${inquiry.id} ===`);
111
+ return lines.join('\n');
112
+ };
113
+ const parseAnswer = (raw) => {
114
+ if (raw.declined === true) {
115
+ return { answer: { inquiryId: inquiry.id, declined: true } };
116
+ }
117
+ const text = typeof raw.text === 'string' ? raw.text.trim() : '';
118
+ const values = asStrings(raw.answer);
119
+ const hasAnswer = raw.answer != null;
120
+ if (!hasAnswer && text === '') {
121
+ return { problem: 'Send an answer, a text, or declined: true.' };
122
+ }
123
+ if (inquiry.kind === ConnectInquiryKind.Confirm) {
124
+ // A boolean is accepted as readily as a word: the tool's own schema offers `answer` as a
125
+ // string, and a model that sent `true` anyway has said exactly what was asked for.
126
+ const said = typeof raw.answer === 'boolean'
127
+ ? String(raw.answer)
128
+ : values?.[0] ?? text;
129
+ const confirmed = CONFIRM_WORDS[said.trim().toLowerCase()];
130
+ if (confirmed == null) {
131
+ return { problem: `Answer this one with "${CONFIRM_YES}" or "${CONFIRM_NO}".` };
132
+ }
133
+ return { answer: { inquiryId: inquiry.id, value: confirmed } };
134
+ }
135
+ if (inquiry.kind === ConnectInquiryKind.Choice) {
136
+ const known = new Set((inquiry.options ?? []).map(option => option.value));
137
+ if (known.size < 1) {
138
+ // A choice question that arrived carrying no choices. Nothing on the wire refuses one —
139
+ // `options` is optional and only the free-flight `ask_user` tool enforces the 2..max rule —
140
+ // and the value check below used to skip an empty set, so ANY string was recorded as a
141
+ // chosen value the asker can match against nothing, while the refusal that did fire read
142
+ // "one of the choices ()". The envelope prints `text` as the call for this shape, so text
143
+ // is what is taken back; a value is refused by naming the field that works.
144
+ return text !== ''
145
+ ? capText(inquiry, { inquiryId: inquiry.id, text })
146
+ : {
147
+ problem: 'This question offers no choices — send `text` with what they said,'
148
+ + ' or declined: true.',
149
+ };
150
+ }
151
+ if (values == null || values.length < 1) {
152
+ // Text alone is an answer only where the question said so. Elsewhere it is a value the
153
+ // asker cannot match against anything it offered, and accepting it silently loses the
154
+ // decision the person actually made.
155
+ if (inquiry.allowText === true && text !== '') {
156
+ return capText(inquiry, { inquiryId: inquiry.id, text });
157
+ }
158
+ return {
159
+ problem: `Answer with one of the choices (${offered(inquiry)})`
160
+ + `${inquiry.allowText === true ? ', or send `text` with what they said' : ''}.`,
161
+ };
162
+ }
163
+ if (values.length > 1 && inquiry.multiple !== true) {
164
+ return { problem: `This question takes ONE answer (${offered(inquiry)}).` };
165
+ }
166
+ for (const value of values) {
167
+ if (!known.has(value)) {
168
+ return { problem: `"${value}" is not one of the choices (${offered(inquiry)}).` };
169
+ }
170
+ }
171
+ // Through the same ceiling as every other text: a chosen value may carry the person's own
172
+ // words beside it, and that rider is the one path a length the wire schema refuses could
173
+ // otherwise take — refused there, it costs a round trip on a question already answered.
174
+ return capText(inquiry, {
175
+ inquiryId: inquiry.id,
176
+ value: inquiry.multiple === true ? values : values[0],
177
+ ...(text !== '' ? { text } : {}),
178
+ });
179
+ }
180
+ const said = text !== '' ? text : (values?.join('\n') ?? '').trim();
181
+ if (said === '') {
182
+ return { problem: 'Send what they said as `text`.' };
183
+ }
184
+ return capText(inquiry, { inquiryId: inquiry.id, text: said });
185
+ };
186
+ return { inquiry, renderQuestionEnvelope, parseAnswer };
187
+ };
188
+ //# sourceMappingURL=inquiry.js.map