@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,34 @@
1
+ import type { SlotMetadata } from './types.js'
2
+
3
+ /**
4
+ * The build-time environment keys a generated application reads its branding from.
5
+ *
6
+ * Named here, once, because two processes emit them — the publisher for the preview and the agent
7
+ * for a production publish — and a key spelled differently in one of them produces an application
8
+ * that silently falls back to its defaults with nothing anywhere reporting it.
9
+ */
10
+ export const BRANDING_ENV_KEYS = [
11
+ 'BRANDING_COPYRIGHT',
12
+ 'BRANDING_ORGANIZATION',
13
+ 'BRANDING_TERMS_URL',
14
+ 'BRANDING_PRIVACY_URL',
15
+ 'BRANDING_CREDIT',
16
+ 'BRANDING_PRODUCT',
17
+ ] as const
18
+
19
+ /**
20
+ * Slot metadata as build-time environment.
21
+ *
22
+ * `BRANDING_CREDIT` is the one value whose ABSENCE means something: only an explicit empty string
23
+ * hides the platform credit, so a metadata set that never carried the key keeps it. That is the
24
+ * safe direction — the opposite failure hands out a paid feature and nobody reports getting more
25
+ * than they paid for.
26
+ */
27
+ export const brandingEnv = (meta: Partial<SlotMetadata>): Record<string, string> => ({
28
+ BRANDING_COPYRIGHT: meta.brandingCopyright ?? '',
29
+ BRANDING_ORGANIZATION: meta.brandingOrganization ?? '',
30
+ BRANDING_TERMS_URL: meta.brandingTermsUrl ?? '',
31
+ BRANDING_PRIVACY_URL: meta.brandingPrivacyUrl ?? '',
32
+ BRANDING_CREDIT: meta.brandingCredit === '' ? '' : '1',
33
+ BRANDING_PRODUCT: meta.projectName ?? '',
34
+ })
@@ -0,0 +1,441 @@
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
+
18
+ /** Where the target project's tree lives for this session. */
19
+ export enum ConnectTarget {
20
+ /** A publisher slot: the platform executes commands inside the pod, as it always has. */
21
+ Cloud = 'cloud',
22
+ /** A directory on the user's machine: the connector executes the commands. */
23
+ Local = 'local',
24
+ }
25
+
26
+ /** Who performs the model calls of a run. */
27
+ export enum ConnectLlm {
28
+ /** The platform's configured presets — billed against the organization's credits. */
29
+ 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
+ Local = 'local',
37
+ }
38
+
39
+ /**
40
+ * The parent agents the connector knows how to instruct.
41
+ *
42
+ * It decides ONE thing: the wording of "how to run this task" in a model-task envelope, and the
43
+ * files `install_harness` writes. Anything the platform does differently per harness beyond those
44
+ * two is a bug — the protocol is the same for all of them.
45
+ */
46
+ export enum ConnectHarness {
47
+ ClaudeCode = 'claude-code',
48
+ Codex = 'codex',
49
+ Copilot = 'copilot',
50
+ OpenCode = 'opencode',
51
+ Other = 'other',
52
+ }
53
+
54
+ /** What a session is doing. */
55
+ export enum ConnectSessionStatus {
56
+ Active = 'active',
57
+ /** The connector said goodbye. */
58
+ Closed = 'closed',
59
+ /** No presence for {@link CONNECT_SESSION_EXPIRE_MS}; nothing said goodbye. */
60
+ Expired = 'expired',
61
+ /** A newer session for the same project took over. */
62
+ Superseded = 'superseded',
63
+ }
64
+
65
+ /** What a connector is able to execute on this session. */
66
+ export enum ConnectExecutor {
67
+ Files = 'files',
68
+ Shell = 'shell',
69
+ 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
+ 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
+ Human = 'human',
84
+ }
85
+
86
+ /** What one operation asks a connector to do. */
87
+ export enum ConnectOpKind {
88
+ /** Run a slot command against the local tree — the same vocabulary a publisher answers. */
89
+ SlotCommand = 'slot-command',
90
+ /** Run one model call and submit its answer. */
91
+ ModelTask = 'model-task',
92
+ /** Write the target's configuration (its `.env` files) and report what services are reachable. */
93
+ 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
+ Inquiry = 'inquiry',
102
+ }
103
+
104
+ /** How a connector is receiving operations. */
105
+ export enum ConnectTransport {
106
+ Socket = 'socket',
107
+ Pull = 'pull',
108
+ }
109
+
110
+ /** Why an operation failed, in the terms the platform reacts to. */
111
+ export enum ConnectOpErrorKind {
112
+ /** The answer did not match the shape asked for; ask again. */
113
+ Malformed = 'malformed',
114
+ /** The connector executed and refused — a path outside the project, a protected file. */
115
+ Refused = 'refused',
116
+ /** The connector cannot serve this at all; the run should stop. */
117
+ Unavailable = 'unavailable',
118
+ /** The connector ran out of time. */
119
+ Timeout = 'timeout',
120
+ }
121
+
122
+ /** What shape a model task's answer came back in. */
123
+ export enum ModelTaskResultKind {
124
+ Text = 'text',
125
+ Json = 'json',
126
+ ToolCalls = 'tool-calls',
127
+ Error = 'error',
128
+ }
129
+
130
+ /**
131
+ * The power classes a parent agent offers, and the platform asks for.
132
+ *
133
+ * Three, because a parent has at most a few models and the platform has seventeen roles. The
134
+ * mapping is data ({@link MODEL_TIER_ROLES}) rather than a per-role negotiation: a parent says
135
+ * which of its models is strong, standard and cheap, and the platform stamps each role's tier onto
136
+ * the task it hands out. A parent offering fewer tiers gets its best available one — never a
137
+ * silent downgrade to nothing.
138
+ */
139
+ export enum ModelTier {
140
+ Strong = 'strong',
141
+ Standard = 'standard',
142
+ Cheap = 'cheap',
143
+ }
144
+
145
+ /**
146
+ * Role → tier.
147
+ *
148
+ * Keyed by the role names the platform's model presets use (`ChatModelPurpose` in
149
+ * `@owlmeans/viable`), listed here because the parent-facing contract must not depend on the
150
+ * library that defines them. A role absent from this table gets {@link ModelTier.Standard}.
151
+ */
152
+ export const MODEL_TIER_ROLES: Record<string, ModelTier> = {
153
+ 'senior-ba': ModelTier.Strong,
154
+ 'senior-developer': ModelTier.Strong,
155
+ 'senior-ui-developer': ModelTier.Strong,
156
+ 'senior-designer': ModelTier.Strong,
157
+ 'dev-orchestrator': ModelTier.Strong,
158
+ 'backend-domain-architect': ModelTier.Strong,
159
+ 'data-architect': ModelTier.Strong,
160
+ 'api-architect': ModelTier.Strong,
161
+ 'view-architect': ModelTier.Strong,
162
+ 'state-architect': ModelTier.Strong,
163
+ 'navigation-architect': ModelTier.Strong,
164
+ 'middle-ba': ModelTier.Standard,
165
+ 'middle-developer': ModelTier.Standard,
166
+ 'middle-designer': ModelTier.Standard,
167
+ 'product-manager': ModelTier.Standard,
168
+ 'utility': ModelTier.Cheap,
169
+ 'picker': ModelTier.Cheap,
170
+ }
171
+
172
+ export const tierOfRole = (role: string): ModelTier =>
173
+ MODEL_TIER_ROLES[role] ?? ModelTier.Standard
174
+
175
+ /**
176
+ * Pick the best tier a parent actually offers, never below what was asked for by more than the
177
+ * offer allows.
178
+ *
179
+ * A parent that offers only one model answers every task with it; a parent that offers two gets
180
+ * the nearer of the two. Silence is not an option — a task the connector cannot place is a run
181
+ * that stops.
182
+ */
183
+ export const clampTier = (wanted: ModelTier, offered: ModelTier[]): ModelTier => {
184
+ if (offered.length < 1 || offered.includes(wanted)) return wanted
185
+ const ladder = [ModelTier.Strong, ModelTier.Standard, ModelTier.Cheap]
186
+ const from = ladder.indexOf(wanted)
187
+ // Prefer a stronger model over a weaker one: the task was sized for `wanted`.
188
+ for (let i = from; i >= 0; --i) if (offered.includes(ladder[i])) return ladder[i]
189
+ for (let i = from + 1; i < ladder.length; ++i) if (offered.includes(ladder[i])) return ladder[i]
190
+
191
+ return wanted
192
+ }
193
+
194
+ /** What the model task asks the parent's subagent to produce. */
195
+ export enum ModelTaskMode {
196
+ /** Prose or code. */
197
+ Text = 'text',
198
+ /** Exactly one JSON object matching `outputSchema`. */
199
+ Json = 'json',
200
+ /** A JSON array of tool calls chosen from `tools`. */
201
+ Tools = 'tools',
202
+ }
203
+
204
+ /** Who a message in a model task's conversation came from. */
205
+ export enum ModelTaskRole {
206
+ System = 'system',
207
+ User = 'user',
208
+ Assistant = 'assistant',
209
+ Tool = 'tool',
210
+ }
211
+
212
+ /** The KIND of thing a job is, so a parent can be told what it is waiting for. */
213
+ export enum ConnectJobKind {
214
+ ProjectCreate = 'project-create',
215
+ ProjectInit = 'project-init',
216
+ ProjectReinit = 'project-reinit',
217
+ StoryDevelop = 'story-develop',
218
+ FreeFlight = 'free-flight',
219
+ 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
+ ConvertIntake = 'convert-intake',
228
+ ConvertAnalysis = 'convert-analysis',
229
+ ConvertExtraction = 'convert-extraction',
230
+ ConvertImplementation = 'convert-implementation',
231
+ ConvertPurge = 'convert-purge',
232
+ }
233
+
234
+ export enum ConnectJobStatus {
235
+ Queued = 'queued',
236
+ Running = 'running',
237
+ /** Running, but waiting on the connector — see `ConnectJob.blockedOn`. */
238
+ Blocked = 'blocked',
239
+ Done = 'done',
240
+ Failed = 'failed',
241
+ }
242
+
243
+ /** What a blocked job is waiting for. */
244
+ export enum ConnectJobBlock {
245
+ /** Model tasks are queued and nobody is answering them. */
246
+ ModelTask = 'model-task',
247
+ /** Slot commands are queued and no connector is attached. */
248
+ LocalOp = 'local-op',
249
+ /** The local target has no database configured and the run needs one. */
250
+ Env = 'env',
251
+ /** A question is waiting for a person and nobody has answered it. */
252
+ Question = 'question',
253
+ }
254
+
255
+ /**
256
+ * The shapes a question can take on the wire.
257
+ *
258
+ * Mirrors `InquiryKind` in `@owlmeans/llm-common` value for value, and is deliberately a SEPARATE
259
+ * name rather than an import: the connect module is the wire contract and owns its own vocabulary
260
+ * — the same reason `ModelTask` mirrors `DelegatedTask` — which also keeps `manager-api`, which
261
+ * does not depend on the model runtime, free of `@owlmeans/llm-common`. Values are byte-identical,
262
+ * so the platform's mapper is a widening rather than a translation table, and a test pins that.
263
+ */
264
+ export enum ConnectInquiryKind {
265
+ /** Pick one of the offered options, or several when `multiple` is set. */
266
+ Choice = 'choice',
267
+ /** Free text. */
268
+ Text = 'text',
269
+ /** Yes or no. */
270
+ Confirm = 'confirm',
271
+ }
272
+
273
+ /**
274
+ * How long the platform waits for a person to answer one question.
275
+ *
276
+ * The same forty-five minutes a model task gets, and for the same reason: the bound exists so a
277
+ * parent that has gone away eventually fails the step rather than holding a project lock forever,
278
+ * not to pace somebody who is thinking.
279
+ */
280
+ export const CONNECT_INQUIRY_TIMEOUT_MS = 2_700_000
281
+
282
+ /** Options one choice question may offer. Beyond this it is a text question with a hint. */
283
+ export const CONNECT_INQUIRY_MAX_OPTIONS = 12
284
+
285
+ /**
286
+ * The ceiling on an answer's text.
287
+ *
288
+ * ONE ceiling for the whole stack: the twin is `DEFAULT_INQUIRY_ANSWER_CHARS` in
289
+ * `@owlmeans/llm-common`, and the two must stay equal. Two ceilings means the layer with the
290
+ * larger one truncates silently at the smaller, and the caller records an assumption about an
291
+ * answer the person actually gave.
292
+ */
293
+ export const CONNECT_INQUIRY_MAX_TEXT = 2_000
294
+
295
+ /**
296
+ * How long a session survives without a sign of life.
297
+ *
298
+ * A connector refreshes its presence on every socket ping, every long-poll and every submit. Ten
299
+ * minutes is generous on purpose: a parent agent running one model task in a subagent can be
300
+ * silent for several, and expiring a session under it would fail a run that was progressing.
301
+ */
302
+ export const CONNECT_SESSION_EXPIRE_MS = 600_000
303
+
304
+ /** Presence key lifetime. Refreshed far more often than it expires. */
305
+ export const CONNECT_PRESENCE_TTL_MS = 90_000
306
+
307
+ /**
308
+ * The longest a `pull` may hold its response open.
309
+ *
310
+ * Under the ~100 s an edge proxy allows an idle response, and under every MCP host's per-tool
311
+ * ceiling — Codex's default is 60 s. A poll that answers empty is not a failure; it is how a
312
+ * connector with nothing to do stays cheap.
313
+ */
314
+ export const CONNECT_PULL_MAX_WAIT_MS = 45_000
315
+
316
+ /** Ops in flight for one project before a dispatcher waits for room. */
317
+ export const CONNECT_MAX_PENDING = 32
318
+
319
+ /**
320
+ * How long the platform waits for a parent agent to answer one model task.
321
+ *
322
+ * Forty-five minutes: a subagent on a large refactor, a rate-limited provider, a human who walked
323
+ * away mid-turn. The bound exists so a dead parent eventually fails the step rather than holding a
324
+ * project lock forever — not to pace a working one.
325
+ */
326
+ export const CONNECT_MODEL_TASK_TIMEOUT_MS = 2_700_000
327
+
328
+ /** How long the platform waits for a connector to write the target's configuration. */
329
+ export const CONNECT_CONFIGURE_TIMEOUT_MS = 60_000
330
+
331
+ /**
332
+ * The capability key that gates the local-LLM mode.
333
+ *
334
+ * The scoped parameter a route passes to `entitled(...)` is composed by the platform, which owns
335
+ * the payment vocabulary — this is only the key a capability set stores.
336
+ */
337
+ export const CONNECT_CAP_LOCAL_LLM_KEY = 'connect--local-llm'
338
+
339
+ /** The access-token prefix the platform issues. Every connector token starts with it. */
340
+ export const CONNECT_TOKEN_PREFIX = 'vib_'
341
+
342
+ /**
343
+ * The marker a local project keeps so a connector attaching later knows which platform project it
344
+ * is. No secrets: an id, a slug and the API it belongs to.
345
+ */
346
+ export const CONNECT_MARKER_FILE = '.viable/connect.json'
347
+ /** Where a local run records its child processes. Never committed. */
348
+ export const CONNECT_RUN_FILE = '.viable/run.json'
349
+ /** Where a local target keeps the keypair its backend signs internal calls with. Never committed. */
350
+ export const CONNECT_LOCAL_SECRETS_FILE = '.viable/local.json'
351
+ /** The directory all three live in; a re-initialization must keep it. */
352
+ export const CONNECT_MARKER_DIR = '.viable'
353
+
354
+ /**
355
+ * The block a connector owns inside a target's `.env`.
356
+ *
357
+ * Everything between the markers is rewritten on every configure push; everything outside is the
358
+ * user's and is never touched. A local target's database URL is the user's line — the platform
359
+ * provisions no database on a developer's machine.
360
+ */
361
+ export const CONNECT_ENV_BEGIN = '# --- viable:managed ---'
362
+ export const CONNECT_ENV_END = '# --- /viable:managed ---'
363
+
364
+ /** Socket events a connector session carries. */
365
+ export const CONNECT_EVENT_OP = 'connect:op'
366
+ export const CONNECT_EVENT_SESSION = 'connect:session'
367
+
368
+ /** Redis resource aliases the platform registers for the relay. */
369
+ export const CONNECT_OP_PUBSUB = 'connect-op-pubsub'
370
+ export const CONNECT_RESULT_PUBSUB = 'connect-result-pubsub'
371
+ export const CONNECT_OP_STORE = 'connect-op-store'
372
+ export const CONNECT_SESSION_PUBSUB = 'connect-session-pubsub'
373
+
374
+ /** The backend resource alias for session records. */
375
+ export const RES_CONNECT_SESSION = 'connect-session'
376
+
377
+ /**
378
+ * The connector's route ids.
379
+ *
380
+ * Owned here rather than by the platform because they ARE the contract: the SDK, the MCP host and
381
+ * the manager API all address the same aliases, and a client that had to be handed its own copy of
382
+ * the tree would be a second place for a name to drift. The platform spreads the declarations
383
+ * these produce into its own entrypoint list and elevates handlers onto them.
384
+ */
385
+ export const connect = Object.freeze({
386
+ base: 'viable:manager-api:connect:base',
387
+ capabilities: 'viable:manager-api:connect:capabilities',
388
+ session: Object.freeze({
389
+ open: 'viable:manager-api:connect:session:open',
390
+ openDelegated: 'viable:manager-api:connect:session:open-delegated',
391
+ get: 'viable:manager-api:connect:session:get',
392
+ heartbeat: 'viable:manager-api:connect:session:heartbeat',
393
+ close: 'viable:manager-api:connect:session:close',
394
+ socket: 'viable:manager-api:connect:session:socket',
395
+ }),
396
+ op: Object.freeze({
397
+ pull: 'viable:manager-api:connect:op:pull',
398
+ submit: 'viable:manager-api:connect:op:submit',
399
+ }),
400
+ project: Object.freeze({
401
+ create: 'viable:manager-api:connect:project:create',
402
+ confirm: 'viable:manager-api:connect:project:confirm',
403
+ list: 'viable:manager-api:connect:project:list',
404
+ status: 'viable:manager-api:connect:project:status',
405
+ attach: 'viable:manager-api:connect:project:attach',
406
+ reinit: 'viable:manager-api:connect:project:reinit',
407
+ modify: 'viable:manager-api:connect:project:modify',
408
+ settings: 'viable:manager-api:connect:project:settings',
409
+ llm: 'viable:manager-api:connect:project:llm',
410
+ /** The per-project converter inference mode. Separate from `llm`: it is not a paid capability. */
411
+ converterLlm: 'viable:manager-api:connect:project:converter-llm',
412
+ job: 'viable:manager-api:connect:project:job',
413
+ }),
414
+ convert: Object.freeze({
415
+ create: 'viable:manager-api:connect:convert:create',
416
+ check: 'viable:manager-api:connect:convert:check',
417
+ start: 'viable:manager-api:connect:convert:start',
418
+ proceed: 'viable:manager-api:connect:convert:proceed',
419
+ cancel: 'viable:manager-api:connect:convert:cancel',
420
+ status: 'viable:manager-api:connect:convert:status',
421
+ purge: 'viable:manager-api:connect:convert:purge',
422
+ }),
423
+ inquiry: Object.freeze({
424
+ answer: 'viable:manager-api:connect:inquiry:answer',
425
+ }),
426
+ story: Object.freeze({
427
+ list: 'viable:manager-api:connect:story:list',
428
+ get: 'viable:manager-api:connect:story:get',
429
+ create: 'viable:manager-api:connect:story:create',
430
+ update: 'viable:manager-api:connect:story:update',
431
+ delete: 'viable:manager-api:connect:story:delete',
432
+ develop: 'viable:manager-api:connect:story:develop',
433
+ }),
434
+ files: Object.freeze({
435
+ list: 'viable:manager-api:connect:files:list',
436
+ }),
437
+ pipeline: Object.freeze({
438
+ state: 'viable:manager-api:connect:pipeline:state',
439
+ resume: 'viable:manager-api:connect:pipeline:resume',
440
+ }),
441
+ })