@owlmeans/viable-common 0.0.4

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 (453) hide show
  1. package/README.md +68 -0
  2. package/agent-meta/manifest.json +16 -0
  3. package/agent-meta/skills/viable-common/SKILL.md +179 -0
  4. package/build/agent/index.d.ts +4 -0
  5. package/build/agent/index.d.ts.map +1 -0
  6. package/build/agent/index.js +3 -0
  7. package/build/agent/index.js.map +1 -0
  8. package/build/agent/memory.d.ts +12 -0
  9. package/build/agent/memory.d.ts.map +1 -0
  10. package/build/agent/memory.js +11 -0
  11. package/build/agent/memory.js.map +1 -0
  12. package/build/agent/spectator/consts.d.ts +9 -0
  13. package/build/agent/spectator/consts.d.ts.map +1 -0
  14. package/build/agent/spectator/consts.js +10 -0
  15. package/build/agent/spectator/consts.js.map +1 -0
  16. package/build/agent/spectator/index.d.ts +3 -0
  17. package/build/agent/spectator/index.d.ts.map +1 -0
  18. package/build/agent/spectator/index.js +2 -0
  19. package/build/agent/spectator/index.js.map +1 -0
  20. package/build/agent/spectator/types.d.ts +13 -0
  21. package/build/agent/spectator/types.d.ts.map +1 -0
  22. package/build/agent/spectator/types.js +2 -0
  23. package/build/agent/spectator/types.js.map +1 -0
  24. package/build/agent/types.d.ts +10 -0
  25. package/build/agent/types.d.ts.map +1 -0
  26. package/build/agent/types.js +2 -0
  27. package/build/agent/types.js.map +1 -0
  28. package/build/areas/consts.d.ts +88 -0
  29. package/build/areas/consts.d.ts.map +1 -0
  30. package/build/areas/consts.js +106 -0
  31. package/build/areas/consts.js.map +1 -0
  32. package/build/areas/index.d.ts +3 -0
  33. package/build/areas/index.d.ts.map +1 -0
  34. package/build/areas/index.js +2 -0
  35. package/build/areas/index.js.map +1 -0
  36. package/build/areas/types.d.ts +28 -0
  37. package/build/areas/types.d.ts.map +1 -0
  38. package/build/areas/types.js +2 -0
  39. package/build/areas/types.js.map +1 -0
  40. package/build/ba/consts.d.ts +38 -0
  41. package/build/ba/consts.d.ts.map +1 -0
  42. package/build/ba/consts.js +41 -0
  43. package/build/ba/consts.js.map +1 -0
  44. package/build/ba/helpers.d.ts +41 -0
  45. package/build/ba/helpers.d.ts.map +1 -0
  46. package/build/ba/helpers.js +79 -0
  47. package/build/ba/helpers.js.map +1 -0
  48. package/build/ba/index.d.ts +5 -0
  49. package/build/ba/index.d.ts.map +1 -0
  50. package/build/ba/index.js +4 -0
  51. package/build/ba/index.js.map +1 -0
  52. package/build/ba/schemas.d.ts +13 -0
  53. package/build/ba/schemas.d.ts.map +1 -0
  54. package/build/ba/schemas.js +181 -0
  55. package/build/ba/schemas.js.map +1 -0
  56. package/build/ba/types.d.ts +113 -0
  57. package/build/ba/types.d.ts.map +1 -0
  58. package/build/ba/types.js +2 -0
  59. package/build/ba/types.js.map +1 -0
  60. package/build/blueprint/case.d.ts +73 -0
  61. package/build/blueprint/case.d.ts.map +1 -0
  62. package/build/blueprint/case.js +244 -0
  63. package/build/blueprint/case.js.map +1 -0
  64. package/build/blueprint/consts.d.ts +11 -0
  65. package/build/blueprint/consts.d.ts.map +1 -0
  66. package/build/blueprint/consts.js +11 -0
  67. package/build/blueprint/consts.js.map +1 -0
  68. package/build/blueprint/index.d.ts +6 -0
  69. package/build/blueprint/index.d.ts.map +1 -0
  70. package/build/blueprint/index.js +6 -0
  71. package/build/blueprint/index.js.map +1 -0
  72. package/build/blueprint/resolve.d.ts +51 -0
  73. package/build/blueprint/resolve.d.ts.map +1 -0
  74. package/build/blueprint/resolve.js +108 -0
  75. package/build/blueprint/resolve.js.map +1 -0
  76. package/build/blueprint/schemas.d.ts +41 -0
  77. package/build/blueprint/schemas.d.ts.map +1 -0
  78. package/build/blueprint/schemas.js +27 -0
  79. package/build/blueprint/schemas.js.map +1 -0
  80. package/build/blueprint/types.d.ts +186 -0
  81. package/build/blueprint/types.d.ts.map +1 -0
  82. package/build/blueprint/types.js +32 -0
  83. package/build/blueprint/types.js.map +1 -0
  84. package/build/branding.d.ts +19 -0
  85. package/build/branding.d.ts.map +1 -0
  86. package/build/branding.js +32 -0
  87. package/build/branding.js.map +1 -0
  88. package/build/connect/consts.d.ts +378 -0
  89. package/build/connect/consts.d.ts.map +1 -0
  90. package/build/connect/consts.js +425 -0
  91. package/build/connect/consts.js.map +1 -0
  92. package/build/connect/entrypoints.d.ts +41 -0
  93. package/build/connect/entrypoints.d.ts.map +1 -0
  94. package/build/connect/entrypoints.js +141 -0
  95. package/build/connect/entrypoints.js.map +1 -0
  96. package/build/connect/errors.d.ts +50 -0
  97. package/build/connect/errors.d.ts.map +1 -0
  98. package/build/connect/errors.js +77 -0
  99. package/build/connect/errors.js.map +1 -0
  100. package/build/connect/index.d.ts +8 -0
  101. package/build/connect/index.d.ts.map +1 -0
  102. package/build/connect/index.js +6 -0
  103. package/build/connect/index.js.map +1 -0
  104. package/build/connect/ops.d.ts +192 -0
  105. package/build/connect/ops.d.ts.map +1 -0
  106. package/build/connect/ops.js +2 -0
  107. package/build/connect/ops.js.map +1 -0
  108. package/build/connect/references.d.ts +194 -0
  109. package/build/connect/references.d.ts.map +1 -0
  110. package/build/connect/references.js +62 -0
  111. package/build/connect/references.js.map +1 -0
  112. package/build/connect/schemas.d.ts +59 -0
  113. package/build/connect/schemas.d.ts.map +1 -0
  114. package/build/connect/schemas.js +346 -0
  115. package/build/connect/schemas.js.map +1 -0
  116. package/build/connect/types.d.ts +428 -0
  117. package/build/connect/types.d.ts.map +1 -0
  118. package/build/connect/types.js +2 -0
  119. package/build/connect/types.js.map +1 -0
  120. package/build/consts.d.ts +9 -0
  121. package/build/consts.d.ts.map +1 -0
  122. package/build/consts.js +31 -0
  123. package/build/consts.js.map +1 -0
  124. package/build/convert/consts.d.ts +539 -0
  125. package/build/convert/consts.d.ts.map +1 -0
  126. package/build/convert/consts.js +630 -0
  127. package/build/convert/consts.js.map +1 -0
  128. package/build/convert/helpers.d.ts +91 -0
  129. package/build/convert/helpers.d.ts.map +1 -0
  130. package/build/convert/helpers.js +301 -0
  131. package/build/convert/helpers.js.map +1 -0
  132. package/build/convert/index.d.ts +11 -0
  133. package/build/convert/index.d.ts.map +1 -0
  134. package/build/convert/index.js +4 -0
  135. package/build/convert/index.js.map +1 -0
  136. package/build/convert/schemas.d.ts +62 -0
  137. package/build/convert/schemas.d.ts.map +1 -0
  138. package/build/convert/schemas.js +626 -0
  139. package/build/convert/schemas.js.map +1 -0
  140. package/build/convert/types.d.ts +683 -0
  141. package/build/convert/types.d.ts.map +1 -0
  142. package/build/convert/types.js +2 -0
  143. package/build/convert/types.js.map +1 -0
  144. package/build/design/consts.d.ts +25 -0
  145. package/build/design/consts.d.ts.map +1 -0
  146. package/build/design/consts.js +26 -0
  147. package/build/design/consts.js.map +1 -0
  148. package/build/design/helpers.d.ts +60 -0
  149. package/build/design/helpers.d.ts.map +1 -0
  150. package/build/design/helpers.js +221 -0
  151. package/build/design/helpers.js.map +1 -0
  152. package/build/design/index.d.ts +6 -0
  153. package/build/design/index.d.ts.map +1 -0
  154. package/build/design/index.js +5 -0
  155. package/build/design/index.js.map +1 -0
  156. package/build/design/runtime.d.ts +126 -0
  157. package/build/design/runtime.d.ts.map +1 -0
  158. package/build/design/runtime.js +65 -0
  159. package/build/design/runtime.js.map +1 -0
  160. package/build/design/schemas.d.ts +21 -0
  161. package/build/design/schemas.d.ts.map +1 -0
  162. package/build/design/schemas.js +369 -0
  163. package/build/design/schemas.js.map +1 -0
  164. package/build/design/types.d.ts +199 -0
  165. package/build/design/types.d.ts.map +1 -0
  166. package/build/design/types.js +2 -0
  167. package/build/design/types.js.map +1 -0
  168. package/build/dev/consts.d.ts +32 -0
  169. package/build/dev/consts.d.ts.map +1 -0
  170. package/build/dev/consts.js +33 -0
  171. package/build/dev/consts.js.map +1 -0
  172. package/build/dev/index.d.ts +4 -0
  173. package/build/dev/index.d.ts.map +1 -0
  174. package/build/dev/index.js +3 -0
  175. package/build/dev/index.js.map +1 -0
  176. package/build/dev/schemas.d.ts +15 -0
  177. package/build/dev/schemas.d.ts.map +1 -0
  178. package/build/dev/schemas.js +116 -0
  179. package/build/dev/schemas.js.map +1 -0
  180. package/build/dev/types.d.ts +42 -0
  181. package/build/dev/types.d.ts.map +1 -0
  182. package/build/dev/types.js +2 -0
  183. package/build/dev/types.js.map +1 -0
  184. package/build/execution/consts.d.ts +36 -0
  185. package/build/execution/consts.d.ts.map +1 -0
  186. package/build/execution/consts.js +37 -0
  187. package/build/execution/consts.js.map +1 -0
  188. package/build/execution/index.d.ts +3 -0
  189. package/build/execution/index.d.ts.map +1 -0
  190. package/build/execution/index.js +2 -0
  191. package/build/execution/index.js.map +1 -0
  192. package/build/execution/types.d.ts +50 -0
  193. package/build/execution/types.d.ts.map +1 -0
  194. package/build/execution/types.js +2 -0
  195. package/build/execution/types.js.map +1 -0
  196. package/build/index.d.ts +22 -0
  197. package/build/index.d.ts.map +1 -0
  198. package/build/index.js +21 -0
  199. package/build/index.js.map +1 -0
  200. package/build/integrity/consts.d.ts +226 -0
  201. package/build/integrity/consts.d.ts.map +1 -0
  202. package/build/integrity/consts.js +401 -0
  203. package/build/integrity/consts.js.map +1 -0
  204. package/build/integrity/index.d.ts +4 -0
  205. package/build/integrity/index.d.ts.map +1 -0
  206. package/build/integrity/index.js +3 -0
  207. package/build/integrity/index.js.map +1 -0
  208. package/build/integrity/types.d.ts +35 -0
  209. package/build/integrity/types.d.ts.map +1 -0
  210. package/build/integrity/types.js +2 -0
  211. package/build/integrity/types.js.map +1 -0
  212. package/build/integrity/verify.d.ts +23 -0
  213. package/build/integrity/verify.d.ts.map +1 -0
  214. package/build/integrity/verify.js +198 -0
  215. package/build/integrity/verify.js.map +1 -0
  216. package/build/metadata/consts.d.ts +101 -0
  217. package/build/metadata/consts.d.ts.map +1 -0
  218. package/build/metadata/consts.js +104 -0
  219. package/build/metadata/consts.js.map +1 -0
  220. package/build/metadata/index.d.ts +3 -0
  221. package/build/metadata/index.d.ts.map +1 -0
  222. package/build/metadata/index.js +3 -0
  223. package/build/metadata/index.js.map +1 -0
  224. package/build/metadata/types.d.ts +286 -0
  225. package/build/metadata/types.d.ts.map +1 -0
  226. package/build/metadata/types.js +39 -0
  227. package/build/metadata/types.js.map +1 -0
  228. package/build/moderation/consts.d.ts +58 -0
  229. package/build/moderation/consts.d.ts.map +1 -0
  230. package/build/moderation/consts.js +60 -0
  231. package/build/moderation/consts.js.map +1 -0
  232. package/build/moderation/index.d.ts +5 -0
  233. package/build/moderation/index.d.ts.map +1 -0
  234. package/build/moderation/index.js +4 -0
  235. package/build/moderation/index.js.map +1 -0
  236. package/build/moderation/schemas.d.ts +19 -0
  237. package/build/moderation/schemas.d.ts.map +1 -0
  238. package/build/moderation/schemas.js +26 -0
  239. package/build/moderation/schemas.js.map +1 -0
  240. package/build/moderation/types.d.ts +64 -0
  241. package/build/moderation/types.d.ts.map +1 -0
  242. package/build/moderation/types.js +2 -0
  243. package/build/moderation/types.js.map +1 -0
  244. package/build/moderation/utils.d.ts +21 -0
  245. package/build/moderation/utils.d.ts.map +1 -0
  246. package/build/moderation/utils.js +31 -0
  247. package/build/moderation/utils.js.map +1 -0
  248. package/build/preview/consts.d.ts +10 -0
  249. package/build/preview/consts.d.ts.map +1 -0
  250. package/build/preview/consts.js +11 -0
  251. package/build/preview/consts.js.map +1 -0
  252. package/build/preview/index.d.ts +3 -0
  253. package/build/preview/index.d.ts.map +1 -0
  254. package/build/preview/index.js +2 -0
  255. package/build/preview/index.js.map +1 -0
  256. package/build/preview/types.d.ts +60 -0
  257. package/build/preview/types.d.ts.map +1 -0
  258. package/build/preview/types.js +2 -0
  259. package/build/preview/types.js.map +1 -0
  260. package/build/scaffold/consts.d.ts +25 -0
  261. package/build/scaffold/consts.d.ts.map +1 -0
  262. package/build/scaffold/consts.js +26 -0
  263. package/build/scaffold/consts.js.map +1 -0
  264. package/build/scaffold/helpers.d.ts +35 -0
  265. package/build/scaffold/helpers.d.ts.map +1 -0
  266. package/build/scaffold/helpers.js +54 -0
  267. package/build/scaffold/helpers.js.map +1 -0
  268. package/build/scaffold/index.d.ts +5 -0
  269. package/build/scaffold/index.d.ts.map +1 -0
  270. package/build/scaffold/index.js +4 -0
  271. package/build/scaffold/index.js.map +1 -0
  272. package/build/scaffold/schemas.d.ts +5 -0
  273. package/build/scaffold/schemas.d.ts.map +1 -0
  274. package/build/scaffold/schemas.js +273 -0
  275. package/build/scaffold/schemas.js.map +1 -0
  276. package/build/scaffold/types.d.ts +144 -0
  277. package/build/scaffold/types.d.ts.map +1 -0
  278. package/build/scaffold/types.js +2 -0
  279. package/build/scaffold/types.js.map +1 -0
  280. package/build/skills/catalogue.d.ts +47 -0
  281. package/build/skills/catalogue.d.ts.map +1 -0
  282. package/build/skills/catalogue.js +1566 -0
  283. package/build/skills/catalogue.js.map +1 -0
  284. package/build/skills/consts.d.ts +104 -0
  285. package/build/skills/consts.d.ts.map +1 -0
  286. package/build/skills/consts.js +170 -0
  287. package/build/skills/consts.js.map +1 -0
  288. package/build/skills/index.d.ts +4 -0
  289. package/build/skills/index.d.ts.map +1 -0
  290. package/build/skills/index.js +4 -0
  291. package/build/skills/index.js.map +1 -0
  292. package/build/skills/roles.d.ts +52 -0
  293. package/build/skills/roles.d.ts.map +1 -0
  294. package/build/skills/roles.js +256 -0
  295. package/build/skills/roles.js.map +1 -0
  296. package/build/slot/consts.d.ts +305 -0
  297. package/build/slot/consts.d.ts.map +1 -0
  298. package/build/slot/consts.js +376 -0
  299. package/build/slot/consts.js.map +1 -0
  300. package/build/slot/helpers.d.ts +25 -0
  301. package/build/slot/helpers.d.ts.map +1 -0
  302. package/build/slot/helpers.js +27 -0
  303. package/build/slot/helpers.js.map +1 -0
  304. package/build/slot/index.d.ts +6 -0
  305. package/build/slot/index.d.ts.map +1 -0
  306. package/build/slot/index.js +5 -0
  307. package/build/slot/index.js.map +1 -0
  308. package/build/slot/layout.d.ts +72 -0
  309. package/build/slot/layout.d.ts.map +1 -0
  310. package/build/slot/layout.js +82 -0
  311. package/build/slot/layout.js.map +1 -0
  312. package/build/slot/schemas.d.ts +12 -0
  313. package/build/slot/schemas.d.ts.map +1 -0
  314. package/build/slot/schemas.js +43 -0
  315. package/build/slot/schemas.js.map +1 -0
  316. package/build/slot/types.d.ts +147 -0
  317. package/build/slot/types.d.ts.map +1 -0
  318. package/build/slot/types.js +2 -0
  319. package/build/slot/types.js.map +1 -0
  320. package/build/topology/card.d.ts +23 -0
  321. package/build/topology/card.d.ts.map +1 -0
  322. package/build/topology/card.js +95 -0
  323. package/build/topology/card.js.map +1 -0
  324. package/build/topology/consts.d.ts +32 -0
  325. package/build/topology/consts.d.ts.map +1 -0
  326. package/build/topology/consts.js +55 -0
  327. package/build/topology/consts.js.map +1 -0
  328. package/build/topology/helpers.d.ts +44 -0
  329. package/build/topology/helpers.d.ts.map +1 -0
  330. package/build/topology/helpers.js +112 -0
  331. package/build/topology/helpers.js.map +1 -0
  332. package/build/topology/index.d.ts +5 -0
  333. package/build/topology/index.d.ts.map +1 -0
  334. package/build/topology/index.js +4 -0
  335. package/build/topology/index.js.map +1 -0
  336. package/build/topology/types.d.ts +83 -0
  337. package/build/topology/types.d.ts.map +1 -0
  338. package/build/topology/types.js +2 -0
  339. package/build/topology/types.js.map +1 -0
  340. package/build/types.d.ts +88 -0
  341. package/build/types.d.ts.map +1 -0
  342. package/build/types.js +2 -0
  343. package/build/types.js.map +1 -0
  344. package/build/ux/consts.d.ts +5 -0
  345. package/build/ux/consts.d.ts.map +1 -0
  346. package/build/ux/consts.js +6 -0
  347. package/build/ux/consts.js.map +1 -0
  348. package/build/ux/index.d.ts +4 -0
  349. package/build/ux/index.d.ts.map +1 -0
  350. package/build/ux/index.js +3 -0
  351. package/build/ux/index.js.map +1 -0
  352. package/build/ux/schemas.d.ts +8 -0
  353. package/build/ux/schemas.d.ts.map +1 -0
  354. package/build/ux/schemas.js +91 -0
  355. package/build/ux/schemas.js.map +1 -0
  356. package/build/ux/types.d.ts +21 -0
  357. package/build/ux/types.d.ts.map +1 -0
  358. package/build/ux/types.js +2 -0
  359. package/build/ux/types.js.map +1 -0
  360. package/package.json +71 -0
  361. package/src/agent/index.ts +4 -0
  362. package/src/agent/memory.ts +16 -0
  363. package/src/agent/spectator/consts.ts +10 -0
  364. package/src/agent/spectator/index.ts +3 -0
  365. package/src/agent/spectator/types.ts +14 -0
  366. package/src/agent/types.ts +10 -0
  367. package/src/areas/consts.ts +112 -0
  368. package/src/areas/index.ts +3 -0
  369. package/src/areas/types.ts +29 -0
  370. package/src/ba/consts.ts +40 -0
  371. package/src/ba/helpers.ts +93 -0
  372. package/src/ba/index.ts +5 -0
  373. package/src/ba/schemas.ts +196 -0
  374. package/src/ba/types.ts +125 -0
  375. package/src/blueprint/case.ts +272 -0
  376. package/src/blueprint/consts.ts +11 -0
  377. package/src/blueprint/index.ts +6 -0
  378. package/src/blueprint/resolve.ts +133 -0
  379. package/src/blueprint/schemas.ts +44 -0
  380. package/src/blueprint/types.ts +204 -0
  381. package/src/branding.ts +34 -0
  382. package/src/connect/consts.ts +441 -0
  383. package/src/connect/entrypoints.ts +291 -0
  384. package/src/connect/errors.ts +91 -0
  385. package/src/connect/index.ts +7 -0
  386. package/src/connect/ops.ts +208 -0
  387. package/src/connect/references.ts +89 -0
  388. package/src/connect/schemas.ts +384 -0
  389. package/src/connect/types.ts +456 -0
  390. package/src/consts.ts +34 -0
  391. package/src/convert/consts.ts +672 -0
  392. package/src/convert/helpers.ts +340 -0
  393. package/src/convert/index.ts +10 -0
  394. package/src/convert/schemas.ts +663 -0
  395. package/src/convert/types.ts +741 -0
  396. package/src/design/consts.ts +26 -0
  397. package/src/design/helpers.ts +255 -0
  398. package/src/design/index.ts +5 -0
  399. package/src/design/runtime.ts +142 -0
  400. package/src/design/schemas.ts +384 -0
  401. package/src/design/types.ts +191 -0
  402. package/src/dev/consts.ts +35 -0
  403. package/src/dev/index.ts +4 -0
  404. package/src/dev/schemas.ts +124 -0
  405. package/src/dev/types.ts +47 -0
  406. package/src/execution/consts.ts +37 -0
  407. package/src/execution/index.ts +3 -0
  408. package/src/execution/types.ts +55 -0
  409. package/src/index.ts +22 -0
  410. package/src/integrity/consts.ts +477 -0
  411. package/src/integrity/index.ts +3 -0
  412. package/src/integrity/types.ts +37 -0
  413. package/src/integrity/verify.ts +221 -0
  414. package/src/metadata/consts.ts +118 -0
  415. package/src/metadata/index.ts +3 -0
  416. package/src/metadata/types.ts +310 -0
  417. package/src/moderation/consts.ts +59 -0
  418. package/src/moderation/index.ts +4 -0
  419. package/src/moderation/schemas.ts +28 -0
  420. package/src/moderation/types.ts +68 -0
  421. package/src/moderation/utils.ts +35 -0
  422. package/src/preview/consts.ts +9 -0
  423. package/src/preview/index.ts +3 -0
  424. package/src/preview/types.ts +79 -0
  425. package/src/scaffold/consts.ts +26 -0
  426. package/src/scaffold/helpers.ts +84 -0
  427. package/src/scaffold/index.ts +4 -0
  428. package/src/scaffold/schemas.ts +283 -0
  429. package/src/scaffold/types.ts +118 -0
  430. package/src/skills/catalogue.ts +1617 -0
  431. package/src/skills/consts.ts +183 -0
  432. package/src/skills/index.ts +4 -0
  433. package/src/skills/roles.ts +299 -0
  434. package/src/slot/consts.ts +393 -0
  435. package/src/slot/helpers.ts +34 -0
  436. package/src/slot/index.ts +5 -0
  437. package/src/slot/layout.ts +141 -0
  438. package/src/slot/schemas.ts +46 -0
  439. package/src/slot/types.ts +164 -0
  440. package/src/topology/card.ts +106 -0
  441. package/src/topology/consts.ts +59 -0
  442. package/src/topology/helpers.ts +138 -0
  443. package/src/topology/index.ts +5 -0
  444. package/src/topology/types.ts +86 -0
  445. package/src/types.ts +104 -0
  446. package/src/ux/consts.ts +5 -0
  447. package/src/ux/index.ts +4 -0
  448. package/src/ux/schemas.ts +97 -0
  449. package/src/ux/types.ts +25 -0
  450. package/tests/connect-convert.spec.ts +161 -0
  451. package/tests/convert.spec.ts +318 -0
  452. package/tests/design.spec.ts +136 -0
  453. package/tsconfig.json +16 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["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B,CAAA;AAC5D,eAAO,MAAM,gBAAgB,qBAAqB,CAAA;AAClD,eAAO,MAAM,sBAAsB,2BAA2B,CAAA;AAE9D,sDAAsD;AACtD,eAAO,MAAM,mBAAmB,oBAAoB,CAAA;AAEpD;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;QAyBhB,kGAAkG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BpG,CAAA"}
@@ -0,0 +1,425 @@
1
+ /**
2
+ * The connector contract — how an external coding agent drives the platform.
3
+ *
4
+ * A "connector session" is one external agent (Claude Code, Codex, Copilot, OpenCode, a CLI, a
5
+ * test) attached to one project. Two axes decide what the platform asks of it:
6
+ *
7
+ * - **target** — where the generated project's tree lives. `Cloud` is a publisher slot and the
8
+ * platform reaches it as it always has; `Local` is a directory on the user's own machine, and
9
+ * every file, shell and git command is executed THERE, by the connector, over this contract.
10
+ * - **llm** — who performs the model calls. `Cloud` is the platform's own configured presets,
11
+ * billed in credits; `Local` hands each call to the parent agent as a MODEL TASK, which it runs
12
+ * in a clean subagent and submits back.
13
+ *
14
+ * Everything here is serializable and runtime-free: the SDK, the manager API and the agent all
15
+ * read the same declarations, and none of them may reinvent a name the others parse.
16
+ */
17
+ /** Where the target project's tree lives for this session. */
18
+ export var ConnectTarget;
19
+ (function (ConnectTarget) {
20
+ /** A publisher slot: the platform executes commands inside the pod, as it always has. */
21
+ ConnectTarget["Cloud"] = "cloud";
22
+ /** A directory on the user's machine: the connector executes the commands. */
23
+ ConnectTarget["Local"] = "local";
24
+ })(ConnectTarget || (ConnectTarget = {}));
25
+ /** Who performs the model calls of a run. */
26
+ export var ConnectLlm;
27
+ (function (ConnectLlm) {
28
+ /** The platform's configured presets — billed against the organization's credits. */
29
+ ConnectLlm["Cloud"] = "cloud";
30
+ /**
31
+ * The parent agent. Each call becomes a `ModelTask` the connector delivers, the parent runs in
32
+ * a clean subagent at low reasoning, and submits back as a `ModelTaskResult`.
33
+ *
34
+ * A paid capability, and an experimental one — see `CONNECT_CAP_LOCAL_LLM_KEY`.
35
+ */
36
+ ConnectLlm["Local"] = "local";
37
+ })(ConnectLlm || (ConnectLlm = {}));
38
+ /**
39
+ * The parent agents the connector knows how to instruct.
40
+ *
41
+ * It decides ONE thing: the wording of "how to run this task" in a model-task envelope, and the
42
+ * files `install_harness` writes. Anything the platform does differently per harness beyond those
43
+ * two is a bug — the protocol is the same for all of them.
44
+ */
45
+ export var ConnectHarness;
46
+ (function (ConnectHarness) {
47
+ ConnectHarness["ClaudeCode"] = "claude-code";
48
+ ConnectHarness["Codex"] = "codex";
49
+ ConnectHarness["Copilot"] = "copilot";
50
+ ConnectHarness["OpenCode"] = "opencode";
51
+ ConnectHarness["Other"] = "other";
52
+ })(ConnectHarness || (ConnectHarness = {}));
53
+ /** What a session is doing. */
54
+ export var ConnectSessionStatus;
55
+ (function (ConnectSessionStatus) {
56
+ ConnectSessionStatus["Active"] = "active";
57
+ /** The connector said goodbye. */
58
+ ConnectSessionStatus["Closed"] = "closed";
59
+ /** No presence for {@link CONNECT_SESSION_EXPIRE_MS}; nothing said goodbye. */
60
+ ConnectSessionStatus["Expired"] = "expired";
61
+ /** A newer session for the same project took over. */
62
+ ConnectSessionStatus["Superseded"] = "superseded";
63
+ })(ConnectSessionStatus || (ConnectSessionStatus = {}));
64
+ /** What a connector is able to execute on this session. */
65
+ export var ConnectExecutor;
66
+ (function (ConnectExecutor) {
67
+ ConnectExecutor["Files"] = "files";
68
+ ConnectExecutor["Shell"] = "shell";
69
+ ConnectExecutor["Git"] = "git";
70
+ /**
71
+ * The parent agent PERFORMS the model calls of a run: each one arrives as a `ModelTask`, is run
72
+ * in a clean subagent and submitted back. Present exactly when `llm` is `Local`.
73
+ */
74
+ ConnectExecutor["Model"] = "model";
75
+ /**
76
+ * A PERSON can be asked a question and their answer brought back.
77
+ *
78
+ * Advertised always, and by every connector: a parent agent has a human in front of it by
79
+ * definition, which is the whole reason the platform can ask one anything at all. It is not a
80
+ * narrower `Model` — a model task is inference the platform pays for either way, an inquiry is
81
+ * a decision only a person can make, and a run that cannot ask assumes instead.
82
+ */
83
+ ConnectExecutor["Human"] = "human";
84
+ })(ConnectExecutor || (ConnectExecutor = {}));
85
+ /** What one operation asks a connector to do. */
86
+ export var ConnectOpKind;
87
+ (function (ConnectOpKind) {
88
+ /** Run a slot command against the local tree — the same vocabulary a publisher answers. */
89
+ ConnectOpKind["SlotCommand"] = "slot-command";
90
+ /** Run one model call and submit its answer. */
91
+ ConnectOpKind["ModelTask"] = "model-task";
92
+ /** Write the target's configuration (its `.env` files) and report what services are reachable. */
93
+ ConnectOpKind["Configure"] = "configure";
94
+ /**
95
+ * Put one question to the person the connector is working for, and bring back their answer.
96
+ *
97
+ * An operation like any other — queued to the project, redelivered to whichever session is
98
+ * attached, answered against its own op id — because the alternative was a second channel with
99
+ * its own delivery, expiry and reattachment rules for the one payload that already had them.
100
+ */
101
+ ConnectOpKind["Inquiry"] = "inquiry";
102
+ })(ConnectOpKind || (ConnectOpKind = {}));
103
+ /** How a connector is receiving operations. */
104
+ export var ConnectTransport;
105
+ (function (ConnectTransport) {
106
+ ConnectTransport["Socket"] = "socket";
107
+ ConnectTransport["Pull"] = "pull";
108
+ })(ConnectTransport || (ConnectTransport = {}));
109
+ /** Why an operation failed, in the terms the platform reacts to. */
110
+ export var ConnectOpErrorKind;
111
+ (function (ConnectOpErrorKind) {
112
+ /** The answer did not match the shape asked for; ask again. */
113
+ ConnectOpErrorKind["Malformed"] = "malformed";
114
+ /** The connector executed and refused — a path outside the project, a protected file. */
115
+ ConnectOpErrorKind["Refused"] = "refused";
116
+ /** The connector cannot serve this at all; the run should stop. */
117
+ ConnectOpErrorKind["Unavailable"] = "unavailable";
118
+ /** The connector ran out of time. */
119
+ ConnectOpErrorKind["Timeout"] = "timeout";
120
+ })(ConnectOpErrorKind || (ConnectOpErrorKind = {}));
121
+ /** What shape a model task's answer came back in. */
122
+ export var ModelTaskResultKind;
123
+ (function (ModelTaskResultKind) {
124
+ ModelTaskResultKind["Text"] = "text";
125
+ ModelTaskResultKind["Json"] = "json";
126
+ ModelTaskResultKind["ToolCalls"] = "tool-calls";
127
+ ModelTaskResultKind["Error"] = "error";
128
+ })(ModelTaskResultKind || (ModelTaskResultKind = {}));
129
+ /**
130
+ * The power classes a parent agent offers, and the platform asks for.
131
+ *
132
+ * Three, because a parent has at most a few models and the platform has seventeen roles. The
133
+ * mapping is data ({@link MODEL_TIER_ROLES}) rather than a per-role negotiation: a parent says
134
+ * which of its models is strong, standard and cheap, and the platform stamps each role's tier onto
135
+ * the task it hands out. A parent offering fewer tiers gets its best available one — never a
136
+ * silent downgrade to nothing.
137
+ */
138
+ export var ModelTier;
139
+ (function (ModelTier) {
140
+ ModelTier["Strong"] = "strong";
141
+ ModelTier["Standard"] = "standard";
142
+ ModelTier["Cheap"] = "cheap";
143
+ })(ModelTier || (ModelTier = {}));
144
+ /**
145
+ * Role → tier.
146
+ *
147
+ * Keyed by the role names the platform's model presets use (`ChatModelPurpose` in
148
+ * `@owlmeans/viable`), listed here because the parent-facing contract must not depend on the
149
+ * library that defines them. A role absent from this table gets {@link ModelTier.Standard}.
150
+ */
151
+ export const MODEL_TIER_ROLES = {
152
+ 'senior-ba': ModelTier.Strong,
153
+ 'senior-developer': ModelTier.Strong,
154
+ 'senior-ui-developer': ModelTier.Strong,
155
+ 'senior-designer': ModelTier.Strong,
156
+ 'dev-orchestrator': ModelTier.Strong,
157
+ 'backend-domain-architect': ModelTier.Strong,
158
+ 'data-architect': ModelTier.Strong,
159
+ 'api-architect': ModelTier.Strong,
160
+ 'view-architect': ModelTier.Strong,
161
+ 'state-architect': ModelTier.Strong,
162
+ 'navigation-architect': ModelTier.Strong,
163
+ 'middle-ba': ModelTier.Standard,
164
+ 'middle-developer': ModelTier.Standard,
165
+ 'middle-designer': ModelTier.Standard,
166
+ 'product-manager': ModelTier.Standard,
167
+ 'utility': ModelTier.Cheap,
168
+ 'picker': ModelTier.Cheap,
169
+ };
170
+ export const tierOfRole = (role) => MODEL_TIER_ROLES[role] ?? ModelTier.Standard;
171
+ /**
172
+ * Pick the best tier a parent actually offers, never below what was asked for by more than the
173
+ * offer allows.
174
+ *
175
+ * A parent that offers only one model answers every task with it; a parent that offers two gets
176
+ * the nearer of the two. Silence is not an option — a task the connector cannot place is a run
177
+ * that stops.
178
+ */
179
+ export const clampTier = (wanted, offered) => {
180
+ if (offered.length < 1 || offered.includes(wanted))
181
+ return wanted;
182
+ const ladder = [ModelTier.Strong, ModelTier.Standard, ModelTier.Cheap];
183
+ const from = ladder.indexOf(wanted);
184
+ // Prefer a stronger model over a weaker one: the task was sized for `wanted`.
185
+ for (let i = from; i >= 0; --i)
186
+ if (offered.includes(ladder[i]))
187
+ return ladder[i];
188
+ for (let i = from + 1; i < ladder.length; ++i)
189
+ if (offered.includes(ladder[i]))
190
+ return ladder[i];
191
+ return wanted;
192
+ };
193
+ /** What the model task asks the parent's subagent to produce. */
194
+ export var ModelTaskMode;
195
+ (function (ModelTaskMode) {
196
+ /** Prose or code. */
197
+ ModelTaskMode["Text"] = "text";
198
+ /** Exactly one JSON object matching `outputSchema`. */
199
+ ModelTaskMode["Json"] = "json";
200
+ /** A JSON array of tool calls chosen from `tools`. */
201
+ ModelTaskMode["Tools"] = "tools";
202
+ })(ModelTaskMode || (ModelTaskMode = {}));
203
+ /** Who a message in a model task's conversation came from. */
204
+ export var ModelTaskRole;
205
+ (function (ModelTaskRole) {
206
+ ModelTaskRole["System"] = "system";
207
+ ModelTaskRole["User"] = "user";
208
+ ModelTaskRole["Assistant"] = "assistant";
209
+ ModelTaskRole["Tool"] = "tool";
210
+ })(ModelTaskRole || (ModelTaskRole = {}));
211
+ /** The KIND of thing a job is, so a parent can be told what it is waiting for. */
212
+ export var ConnectJobKind;
213
+ (function (ConnectJobKind) {
214
+ ConnectJobKind["ProjectCreate"] = "project-create";
215
+ ConnectJobKind["ProjectInit"] = "project-init";
216
+ ConnectJobKind["ProjectReinit"] = "project-reinit";
217
+ ConnectJobKind["StoryDevelop"] = "story-develop";
218
+ ConnectJobKind["FreeFlight"] = "free-flight";
219
+ ConnectJobKind["PipelineResume"] = "pipeline-resume";
220
+ /**
221
+ * The four stages of a conversion, plus the purge.
222
+ *
223
+ * One kind per stage rather than one for the whole conversion: each stage is its own platform
224
+ * pipeline run, ends at a decision the user makes, and is looked up by the pipeline alias its
225
+ * kind names. A single `convert` kind would match whichever run row happened to be newest.
226
+ */
227
+ ConnectJobKind["ConvertIntake"] = "convert-intake";
228
+ ConnectJobKind["ConvertAnalysis"] = "convert-analysis";
229
+ ConnectJobKind["ConvertExtraction"] = "convert-extraction";
230
+ ConnectJobKind["ConvertImplementation"] = "convert-implementation";
231
+ ConnectJobKind["ConvertPurge"] = "convert-purge";
232
+ })(ConnectJobKind || (ConnectJobKind = {}));
233
+ export var ConnectJobStatus;
234
+ (function (ConnectJobStatus) {
235
+ ConnectJobStatus["Queued"] = "queued";
236
+ ConnectJobStatus["Running"] = "running";
237
+ /** Running, but waiting on the connector — see `ConnectJob.blockedOn`. */
238
+ ConnectJobStatus["Blocked"] = "blocked";
239
+ ConnectJobStatus["Done"] = "done";
240
+ ConnectJobStatus["Failed"] = "failed";
241
+ })(ConnectJobStatus || (ConnectJobStatus = {}));
242
+ /** What a blocked job is waiting for. */
243
+ export var ConnectJobBlock;
244
+ (function (ConnectJobBlock) {
245
+ /** Model tasks are queued and nobody is answering them. */
246
+ ConnectJobBlock["ModelTask"] = "model-task";
247
+ /** Slot commands are queued and no connector is attached. */
248
+ ConnectJobBlock["LocalOp"] = "local-op";
249
+ /** The local target has no database configured and the run needs one. */
250
+ ConnectJobBlock["Env"] = "env";
251
+ /** A question is waiting for a person and nobody has answered it. */
252
+ ConnectJobBlock["Question"] = "question";
253
+ })(ConnectJobBlock || (ConnectJobBlock = {}));
254
+ /**
255
+ * The shapes a question can take on the wire.
256
+ *
257
+ * Mirrors `InquiryKind` in `@owlmeans/llm-common` value for value, and is deliberately a SEPARATE
258
+ * name rather than an import: the connect module is the wire contract and owns its own vocabulary
259
+ * — the same reason `ModelTask` mirrors `DelegatedTask` — which also keeps `manager-api`, which
260
+ * does not depend on the model runtime, free of `@owlmeans/llm-common`. Values are byte-identical,
261
+ * so the platform's mapper is a widening rather than a translation table, and a test pins that.
262
+ */
263
+ export var ConnectInquiryKind;
264
+ (function (ConnectInquiryKind) {
265
+ /** Pick one of the offered options, or several when `multiple` is set. */
266
+ ConnectInquiryKind["Choice"] = "choice";
267
+ /** Free text. */
268
+ ConnectInquiryKind["Text"] = "text";
269
+ /** Yes or no. */
270
+ ConnectInquiryKind["Confirm"] = "confirm";
271
+ })(ConnectInquiryKind || (ConnectInquiryKind = {}));
272
+ /**
273
+ * How long the platform waits for a person to answer one question.
274
+ *
275
+ * The same forty-five minutes a model task gets, and for the same reason: the bound exists so a
276
+ * parent that has gone away eventually fails the step rather than holding a project lock forever,
277
+ * not to pace somebody who is thinking.
278
+ */
279
+ export const CONNECT_INQUIRY_TIMEOUT_MS = 2_700_000;
280
+ /** Options one choice question may offer. Beyond this it is a text question with a hint. */
281
+ export const CONNECT_INQUIRY_MAX_OPTIONS = 12;
282
+ /**
283
+ * The ceiling on an answer's text.
284
+ *
285
+ * ONE ceiling for the whole stack: the twin is `DEFAULT_INQUIRY_ANSWER_CHARS` in
286
+ * `@owlmeans/llm-common`, and the two must stay equal. Two ceilings means the layer with the
287
+ * larger one truncates silently at the smaller, and the caller records an assumption about an
288
+ * answer the person actually gave.
289
+ */
290
+ export const CONNECT_INQUIRY_MAX_TEXT = 2_000;
291
+ /**
292
+ * How long a session survives without a sign of life.
293
+ *
294
+ * A connector refreshes its presence on every socket ping, every long-poll and every submit. Ten
295
+ * minutes is generous on purpose: a parent agent running one model task in a subagent can be
296
+ * silent for several, and expiring a session under it would fail a run that was progressing.
297
+ */
298
+ export const CONNECT_SESSION_EXPIRE_MS = 600_000;
299
+ /** Presence key lifetime. Refreshed far more often than it expires. */
300
+ export const CONNECT_PRESENCE_TTL_MS = 90_000;
301
+ /**
302
+ * The longest a `pull` may hold its response open.
303
+ *
304
+ * Under the ~100 s an edge proxy allows an idle response, and under every MCP host's per-tool
305
+ * ceiling — Codex's default is 60 s. A poll that answers empty is not a failure; it is how a
306
+ * connector with nothing to do stays cheap.
307
+ */
308
+ export const CONNECT_PULL_MAX_WAIT_MS = 45_000;
309
+ /** Ops in flight for one project before a dispatcher waits for room. */
310
+ export const CONNECT_MAX_PENDING = 32;
311
+ /**
312
+ * How long the platform waits for a parent agent to answer one model task.
313
+ *
314
+ * Forty-five minutes: a subagent on a large refactor, a rate-limited provider, a human who walked
315
+ * away mid-turn. The bound exists so a dead parent eventually fails the step rather than holding a
316
+ * project lock forever — not to pace a working one.
317
+ */
318
+ export const CONNECT_MODEL_TASK_TIMEOUT_MS = 2_700_000;
319
+ /** How long the platform waits for a connector to write the target's configuration. */
320
+ export const CONNECT_CONFIGURE_TIMEOUT_MS = 60_000;
321
+ /**
322
+ * The capability key that gates the local-LLM mode.
323
+ *
324
+ * The scoped parameter a route passes to `entitled(...)` is composed by the platform, which owns
325
+ * the payment vocabulary — this is only the key a capability set stores.
326
+ */
327
+ export const CONNECT_CAP_LOCAL_LLM_KEY = 'connect--local-llm';
328
+ /** The access-token prefix the platform issues. Every connector token starts with it. */
329
+ export const CONNECT_TOKEN_PREFIX = 'vib_';
330
+ /**
331
+ * The marker a local project keeps so a connector attaching later knows which platform project it
332
+ * is. No secrets: an id, a slug and the API it belongs to.
333
+ */
334
+ export const CONNECT_MARKER_FILE = '.viable/connect.json';
335
+ /** Where a local run records its child processes. Never committed. */
336
+ export const CONNECT_RUN_FILE = '.viable/run.json';
337
+ /** Where a local target keeps the keypair its backend signs internal calls with. Never committed. */
338
+ export const CONNECT_LOCAL_SECRETS_FILE = '.viable/local.json';
339
+ /** The directory all three live in; a re-initialization must keep it. */
340
+ export const CONNECT_MARKER_DIR = '.viable';
341
+ /**
342
+ * The block a connector owns inside a target's `.env`.
343
+ *
344
+ * Everything between the markers is rewritten on every configure push; everything outside is the
345
+ * user's and is never touched. A local target's database URL is the user's line — the platform
346
+ * provisions no database on a developer's machine.
347
+ */
348
+ export const CONNECT_ENV_BEGIN = '# --- viable:managed ---';
349
+ export const CONNECT_ENV_END = '# --- /viable:managed ---';
350
+ /** Socket events a connector session carries. */
351
+ export const CONNECT_EVENT_OP = 'connect:op';
352
+ export const CONNECT_EVENT_SESSION = 'connect:session';
353
+ /** Redis resource aliases the platform registers for the relay. */
354
+ export const CONNECT_OP_PUBSUB = 'connect-op-pubsub';
355
+ export const CONNECT_RESULT_PUBSUB = 'connect-result-pubsub';
356
+ export const CONNECT_OP_STORE = 'connect-op-store';
357
+ export const CONNECT_SESSION_PUBSUB = 'connect-session-pubsub';
358
+ /** The backend resource alias for session records. */
359
+ export const RES_CONNECT_SESSION = 'connect-session';
360
+ /**
361
+ * The connector's route ids.
362
+ *
363
+ * Owned here rather than by the platform because they ARE the contract: the SDK, the MCP host and
364
+ * the manager API all address the same aliases, and a client that had to be handed its own copy of
365
+ * the tree would be a second place for a name to drift. The platform spreads the declarations
366
+ * these produce into its own entrypoint list and elevates handlers onto them.
367
+ */
368
+ export const connect = Object.freeze({
369
+ base: 'viable:manager-api:connect:base',
370
+ capabilities: 'viable:manager-api:connect:capabilities',
371
+ session: Object.freeze({
372
+ open: 'viable:manager-api:connect:session:open',
373
+ openDelegated: 'viable:manager-api:connect:session:open-delegated',
374
+ get: 'viable:manager-api:connect:session:get',
375
+ heartbeat: 'viable:manager-api:connect:session:heartbeat',
376
+ close: 'viable:manager-api:connect:session:close',
377
+ socket: 'viable:manager-api:connect:session:socket',
378
+ }),
379
+ op: Object.freeze({
380
+ pull: 'viable:manager-api:connect:op:pull',
381
+ submit: 'viable:manager-api:connect:op:submit',
382
+ }),
383
+ project: Object.freeze({
384
+ create: 'viable:manager-api:connect:project:create',
385
+ confirm: 'viable:manager-api:connect:project:confirm',
386
+ list: 'viable:manager-api:connect:project:list',
387
+ status: 'viable:manager-api:connect:project:status',
388
+ attach: 'viable:manager-api:connect:project:attach',
389
+ reinit: 'viable:manager-api:connect:project:reinit',
390
+ modify: 'viable:manager-api:connect:project:modify',
391
+ settings: 'viable:manager-api:connect:project:settings',
392
+ llm: 'viable:manager-api:connect:project:llm',
393
+ /** The per-project converter inference mode. Separate from `llm`: it is not a paid capability. */
394
+ converterLlm: 'viable:manager-api:connect:project:converter-llm',
395
+ job: 'viable:manager-api:connect:project:job',
396
+ }),
397
+ convert: Object.freeze({
398
+ create: 'viable:manager-api:connect:convert:create',
399
+ check: 'viable:manager-api:connect:convert:check',
400
+ start: 'viable:manager-api:connect:convert:start',
401
+ proceed: 'viable:manager-api:connect:convert:proceed',
402
+ cancel: 'viable:manager-api:connect:convert:cancel',
403
+ status: 'viable:manager-api:connect:convert:status',
404
+ purge: 'viable:manager-api:connect:convert:purge',
405
+ }),
406
+ inquiry: Object.freeze({
407
+ answer: 'viable:manager-api:connect:inquiry:answer',
408
+ }),
409
+ story: Object.freeze({
410
+ list: 'viable:manager-api:connect:story:list',
411
+ get: 'viable:manager-api:connect:story:get',
412
+ create: 'viable:manager-api:connect:story:create',
413
+ update: 'viable:manager-api:connect:story:update',
414
+ delete: 'viable:manager-api:connect:story:delete',
415
+ develop: 'viable:manager-api:connect:story:develop',
416
+ }),
417
+ files: Object.freeze({
418
+ list: 'viable:manager-api:connect:files:list',
419
+ }),
420
+ pipeline: Object.freeze({
421
+ state: 'viable:manager-api:connect:pipeline:state',
422
+ resume: 'viable:manager-api:connect:pipeline:resume',
423
+ }),
424
+ });
425
+ //# sourceMappingURL=consts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/connect/consts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,8DAA8D;AAC9D,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,yFAAyF;IACzF,gCAAe,CAAA;IACf,8EAA8E;IAC9E,gCAAe,C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AAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,MAAM,EAAE,2CAA2C;QACnD,KAAK,EAAE,0CAA0C;QACjD,KAAK,EAAE,0CAA0C;QACjD,OAAO,EAAE,4CAA4C;QACrD,MAAM,EAAE,2CAA2C;QACnD,MAAM,EAAE,2CAA2C;QACnD,KAAK,EAAE,0CAA0C;KAClD,CAAC;IACF,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,MAAM,EAAE,2CAA2C;KACpD,CAAC;IACF,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,uCAAuC;QAC7C,GAAG,EAAE,sCAAsC;QAC3C,MAAM,EAAE,yCAAyC;QACjD,MAAM,EAAE,yCAAyC;QACjD,MAAM,EAAE,yCAAyC;QACjD,OAAO,EAAE,0CAA0C;KACpD,CAAC;IACF,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,uCAAuC;KAC9C,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC;QACtB,KAAK,EAAE,2CAA2C;QAClD,MAAM,EAAE,4CAA4C;KACrD,CAAC;CACH,CAAC,CAAA"}
@@ -0,0 +1,41 @@
1
+ import type { CommonEntrypoint } from '@owlmeans/entrypoint';
2
+ /**
3
+ * What the platform injects when it mounts the connector routes.
4
+ *
5
+ * The names of the guard and the gates belong to the deployment, not to the contract: a connector
6
+ * API on another platform would guard the same paths with its own vocabulary. Everything else —
7
+ * paths, methods, schemas, parents — is fixed here so a client cannot address them differently.
8
+ */
9
+ export interface ConnectEntrypointOptions {
10
+ /** The guard alias every connector route carries. */
11
+ guard: string;
12
+ /** The gate alias and parameters that decide project ownership. */
13
+ gate?: {
14
+ alias: string;
15
+ params: string[];
16
+ };
17
+ /**
18
+ * The gate that decides whether the caller may use the local-LLM mode.
19
+ *
20
+ * Applied to the two routes that can turn it on — opening a delegated session and pinning a
21
+ * project to it. Everything else is free: `cloud` is the default and the platform writes it
22
+ * back by itself when a plan lapses.
23
+ */
24
+ localLlm?: {
25
+ alias: string;
26
+ params: string[];
27
+ };
28
+ /** The parent of the socket route — the platform's own websocket base. */
29
+ updateBase: string;
30
+ /** Path prefix; defaults to `/connect`. */
31
+ path?: string;
32
+ }
33
+ /**
34
+ * Declare the connector's HTTP and socket surface.
35
+ *
36
+ * One list, spread into the platform's own entrypoints. Handlers are elevated onto these aliases
37
+ * server-side and onto client entrypoints in the SDK — the same declarations both times, which is
38
+ * what makes a path or a schema impossible to get wrong on one side only.
39
+ */
40
+ export declare const connectEntrypoints: (opts: ConnectEntrypointOptions) => CommonEntrypoint[];
41
+ //# sourceMappingURL=entrypoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entrypoints.d.ts","sourceRoot":"","sources":["../../src/connect/entrypoints.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAA2B,MAAM,sBAAsB,CAAA;AAcrF;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAA;IACb,mEAAmE;IACnE,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAA;IAC1C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAA;IAC9C,0EAA0E;IAC1E,UAAU,EAAE,MAAM,CAAA;IAClB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,SAAU,wBAAwB,KAAG,gBAAgB,EAkPnF,CAAA"}
@@ -0,0 +1,141 @@
1
+ import { body, entrypoint, filter, gate, guard, params, query } from '@owlmeans/entrypoint';
2
+ import { route, RouteMethod, socket } from '@owlmeans/route';
3
+ import { ConverterProjectLlmBodySchema } from '../convert/schemas.js';
4
+ import { connect } from './consts.js';
5
+ import { ConnectAttachBodySchema, ConnectConfirmBodySchema, ConnectConvertCreateBodySchema, ConnectConvertProceedBodySchema, ConnectCreateBodySchema, ConnectInquiryParamsSchema, ConnectJobParamsSchema, ConnectModifyBodySchema, ConnectOpParamsSchema, ConnectOpResultSchema, ConnectPipelineParamsSchema, ConnectPipelineResumeBodySchema, ConnectProjectIdSchema, ConnectProjectLlmBodySchema, ConnectSessionOpenSchema, ConnectSessionParamsSchema, ConnectStoryBodySchema, ConnectStoryParamsSchema, ConnectStoryQuerySchema, ConnectWaitQuerySchema, InquiryAnswerSchema } from './schemas.js';
6
+ /**
7
+ * Declare the connector's HTTP and socket surface.
8
+ *
9
+ * One list, spread into the platform's own entrypoints. Handlers are elevated onto these aliases
10
+ * server-side and onto client entrypoints in the SDK — the same declarations both times, which is
11
+ * what makes a path or a schema impossible to get wrong on one side only.
12
+ */
13
+ export const connectEntrypoints = (opts) => {
14
+ const prefix = opts.path ?? '/connect';
15
+ const ownership = opts.gate != null
16
+ ? guard(opts.guard, gate(opts.gate.alias, opts.gate.params))
17
+ : guard(opts.guard);
18
+ const paid = opts.localLlm != null
19
+ ? gate(opts.localLlm.alias, opts.localLlm.params)
20
+ : undefined;
21
+ return [
22
+ entrypoint(route(connect.base, prefix), ownership),
23
+ entrypoint(route(connect.capabilities, '/capabilities', {
24
+ parent: connect.base, method: RouteMethod.GET
25
+ })),
26
+ // --- session ---------------------------------------------------------------------------
27
+ entrypoint(route(connect.session.open, '/session', { parent: connect.base, method: RouteMethod.POST }), filter(body(ConnectSessionOpenSchema))),
28
+ entrypoint(route(connect.session.openDelegated, '/session/delegated', {
29
+ parent: connect.base, method: RouteMethod.POST
30
+ }), filter(body(ConnectSessionOpenSchema), paid)),
31
+ entrypoint(route(connect.session.get, '/session/:sessionId', {
32
+ parent: connect.base, method: RouteMethod.GET
33
+ }), filter(params(ConnectSessionParamsSchema))),
34
+ entrypoint(route(connect.session.heartbeat, '/session/:sessionId/heartbeat', {
35
+ parent: connect.base, method: RouteMethod.POST
36
+ }), filter(params(ConnectSessionParamsSchema))),
37
+ entrypoint(route(connect.session.close, '/session/:sessionId/close', {
38
+ parent: connect.base, method: RouteMethod.POST
39
+ }), filter(params(ConnectSessionParamsSchema))),
40
+ entrypoint(route(connect.session.socket, '/connect/:sessionId', socket(opts.updateBase)), filter(params(ConnectSessionParamsSchema))),
41
+ // --- operations ------------------------------------------------------------------------
42
+ entrypoint(route(connect.op.pull, '/session/:sessionId/ops', {
43
+ parent: connect.base, method: RouteMethod.GET
44
+ }), filter(params(ConnectSessionParamsSchema, query(ConnectWaitQuerySchema)))),
45
+ entrypoint(route(connect.op.submit, '/session/:sessionId/ops/:opId', {
46
+ parent: connect.base, method: RouteMethod.POST
47
+ }), filter(params(ConnectOpParamsSchema, body(ConnectOpResultSchema)))),
48
+ // --- project ---------------------------------------------------------------------------
49
+ entrypoint(route(connect.project.create, '/project', { parent: connect.base, method: RouteMethod.POST }), filter(body(ConnectCreateBodySchema))),
50
+ entrypoint(route(connect.project.list, '/project', {
51
+ parent: connect.base, method: RouteMethod.GET
52
+ })),
53
+ entrypoint(route(connect.project.attach, '/project/attach', {
54
+ parent: connect.base, method: RouteMethod.POST
55
+ }), filter(body(ConnectAttachBodySchema))),
56
+ entrypoint(route(connect.project.confirm, '/project/:id/confirm', {
57
+ parent: connect.base, method: RouteMethod.POST
58
+ }), filter(params(ConnectProjectIdSchema, body(ConnectConfirmBodySchema)))),
59
+ entrypoint(route(connect.project.status, '/project/:id/status', {
60
+ parent: connect.base, method: RouteMethod.GET
61
+ }), filter(params(ConnectProjectIdSchema))),
62
+ entrypoint(route(connect.project.reinit, '/project/:id/reinit', {
63
+ parent: connect.base, method: RouteMethod.POST
64
+ }), filter(params(ConnectProjectIdSchema))),
65
+ entrypoint(route(connect.project.modify, '/project/:id/modify', {
66
+ parent: connect.base, method: RouteMethod.POST
67
+ }), filter(params(ConnectProjectIdSchema, body(ConnectModifyBodySchema)))),
68
+ entrypoint(route(connect.project.settings, '/project/:id/settings', {
69
+ parent: connect.base, method: RouteMethod.GET
70
+ }), filter(params(ConnectProjectIdSchema))),
71
+ entrypoint(route(connect.project.llm, '/project/:id/llm', {
72
+ parent: connect.base, method: RouteMethod.POST
73
+ }), filter(params(ConnectProjectIdSchema, body(ConnectProjectLlmBodySchema)), paid)),
74
+ entrypoint(route(connect.project.job, '/project/:id/job/:jobId', {
75
+ parent: connect.base, method: RouteMethod.GET
76
+ }), filter(params(ConnectJobParamsSchema, query(ConnectWaitQuerySchema)))),
77
+ // --- stories ---------------------------------------------------------------------------
78
+ entrypoint(route(connect.story.list, '/story/:id', { parent: connect.base, method: RouteMethod.GET }), filter(params(ConnectProjectIdSchema, query(ConnectStoryQuerySchema)))),
79
+ entrypoint(route(connect.story.create, '/story/:id', { parent: connect.base, method: RouteMethod.POST }), filter(params(ConnectProjectIdSchema, body(ConnectStoryBodySchema)))),
80
+ entrypoint(route(connect.story.get, '/story/:id/:storyId', {
81
+ parent: connect.base, method: RouteMethod.GET
82
+ }), filter(params(ConnectStoryParamsSchema))),
83
+ entrypoint(route(connect.story.update, '/story/:id/:storyId', {
84
+ parent: connect.base, method: RouteMethod.PUT
85
+ }), filter(params(ConnectStoryParamsSchema, body(ConnectStoryBodySchema)))),
86
+ entrypoint(route(connect.story.delete, '/story/:id/:storyId', {
87
+ parent: connect.base, method: RouteMethod.DELETE
88
+ }), filter(params(ConnectStoryParamsSchema))),
89
+ entrypoint(route(connect.story.develop, '/story/:id/:storyId/develop', {
90
+ parent: connect.base, method: RouteMethod.POST
91
+ }), filter(params(ConnectStoryParamsSchema))),
92
+ // --- generated files -------------------------------------------------------------------
93
+ entrypoint(route(connect.files.list, '/project/:id/files', {
94
+ parent: connect.base, method: RouteMethod.GET
95
+ }), filter(params(ConnectProjectIdSchema))),
96
+ entrypoint(route(connect.project.converterLlm, '/project/:id/converter-llm', {
97
+ parent: connect.base, method: RouteMethod.POST
98
+ }),
99
+ // No paid gate, unlike `project.llm`: delegated inference is the DEFAULT for a conversion,
100
+ // not an experimental capability. A conversion reads somebody else's whole repository, and
101
+ // handing those calls to the parent agent is what makes it affordable at all.
102
+ filter(params(ConnectProjectIdSchema, body(ConverterProjectLlmBodySchema)))),
103
+ // --- conversion ------------------------------------------------------------------------
104
+ entrypoint(route(connect.convert.create, '/convert', {
105
+ parent: connect.base, method: RouteMethod.POST
106
+ }), filter(body(ConnectConvertCreateBodySchema))),
107
+ entrypoint(route(connect.convert.check, '/convert/:id/check', {
108
+ parent: connect.base, method: RouteMethod.GET
109
+ }), filter(params(ConnectProjectIdSchema))),
110
+ entrypoint(route(connect.convert.start, '/convert/:id/start', {
111
+ parent: connect.base, method: RouteMethod.POST
112
+ }), filter(params(ConnectProjectIdSchema))),
113
+ entrypoint(route(connect.convert.proceed, '/convert/:id/proceed', {
114
+ parent: connect.base, method: RouteMethod.POST
115
+ }), filter(params(ConnectProjectIdSchema, body(ConnectConvertProceedBodySchema)))),
116
+ entrypoint(route(connect.convert.cancel, '/convert/:id/cancel', {
117
+ parent: connect.base, method: RouteMethod.POST
118
+ }), filter(params(ConnectProjectIdSchema))),
119
+ entrypoint(route(connect.convert.status, '/convert/:id', {
120
+ parent: connect.base, method: RouteMethod.GET
121
+ }), filter(params(ConnectProjectIdSchema))),
122
+ entrypoint(route(connect.convert.purge, '/convert/:id/purge', {
123
+ parent: connect.base, method: RouteMethod.POST
124
+ }), filter(params(ConnectProjectIdSchema))),
125
+ // --- inquiries -------------------------------------------------------------------------
126
+ // The fallback answer path: a connector answers through its own op id while it holds the
127
+ // question, but a run that parked while nobody was attached has no op to answer, and the
128
+ // question is then reachable only by its own id.
129
+ entrypoint(route(connect.inquiry.answer, '/project/:id/inquiry/:inquiryId', {
130
+ parent: connect.base, method: RouteMethod.POST
131
+ }), filter(params(ConnectInquiryParamsSchema, body(InquiryAnswerSchema)))),
132
+ // --- pipelines -------------------------------------------------------------------------
133
+ entrypoint(route(connect.pipeline.state, '/pipeline/:id/:runId', {
134
+ parent: connect.base, method: RouteMethod.GET
135
+ }), filter(params(ConnectPipelineParamsSchema))),
136
+ entrypoint(route(connect.pipeline.resume, '/pipeline/:id/:runId/resume', {
137
+ parent: connect.base, method: RouteMethod.POST
138
+ }), filter(params(ConnectPipelineParamsSchema, body(ConnectPipelineResumeBodySchema)))),
139
+ ];
140
+ };
141
+ //# sourceMappingURL=entrypoints.js.map