@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,286 @@
1
+ import type { SpecCategory } from '../ba/consts.js';
2
+ export interface MetadataFile<T extends Record<string, unknown> = Record<string, unknown>> {
3
+ path: string;
4
+ data: T;
5
+ body: string;
6
+ }
7
+ export interface MetadataWriteInput<T extends Record<string, unknown> = Record<string, unknown>> {
8
+ data?: Partial<T>;
9
+ body: string;
10
+ }
11
+ export declare enum MetadataKind {
12
+ Project = "project",
13
+ Story = "story",
14
+ Source = "source",
15
+ History = "history"
16
+ }
17
+ export declare enum MetadataListKind {
18
+ Stories = "stories",
19
+ Meta = "meta",
20
+ All = "all"
21
+ }
22
+ /**
23
+ * Identifies a single metadata document to read:
24
+ * - Project: kind=Project, no ref/category needed
25
+ * - Story: kind=Story, ref=story-code
26
+ * - Source: kind=Source, ref=source-path, category=SpecCategory
27
+ */
28
+ export interface MetadataRef {
29
+ kind: MetadataKind;
30
+ ref?: string;
31
+ category?: SpecCategory;
32
+ }
33
+ /**
34
+ * Identifies a list of metadata documents to enumerate:
35
+ * - Stories: kind=Stories → returns story codes
36
+ * - Meta: kind=Meta → returns co-located *.spec/.ux/.ui.md paths;
37
+ * category narrows to one suffix
38
+ */
39
+ export interface MetadataListRef {
40
+ kind: MetadataListKind;
41
+ category?: SpecCategory;
42
+ }
43
+ /** Frontmatter for docs/project.md */
44
+ export interface ProjectMeta extends Record<string, unknown> {
45
+ name: string;
46
+ alias: string;
47
+ /**
48
+ * The language every piece of generated UI text is written in — labels, headings, empty
49
+ * states, validation messages, i18n values.
50
+ *
51
+ * Recorded on the project rather than asked per pass, because a screen scaffolded in one
52
+ * language and extended in another is a mixed interface that nothing reports: the code
53
+ * compiles, the tests pass, and only a reader of the running app can see it. An IETF tag
54
+ * (`en`, `pl`, `pt-BR`).
55
+ */
56
+ language: string;
57
+ }
58
+ /**
59
+ * Frontmatter for `.agents/memory/history.md`.
60
+ *
61
+ * `lastEvent` is written verbatim on every record and rendered as the first line of the history
62
+ * block. That is what makes "the summary always names the most recent event" a property of the
63
+ * file rather than a hope about the model that folded it.
64
+ */
65
+ export interface HistoryMeta extends Record<string, unknown> {
66
+ version: number;
67
+ updatedAt: string;
68
+ lastEvent: string;
69
+ }
70
+ /** Frontmatter for docs/entities/<name>.md */
71
+ export interface EntityMeta extends Record<string, unknown> {
72
+ name: string;
73
+ attributes: Array<{
74
+ name: string;
75
+ description: string;
76
+ }>;
77
+ }
78
+ /** Ref to a screen inside a docs/stories/<code>.md index */
79
+ export interface StoryScreenRef {
80
+ name: string;
81
+ path: string;
82
+ /** Top-menu group this screen renders under. A label, never a URL segment. */
83
+ section?: string;
84
+ components: StoryComponentRef[];
85
+ }
86
+ /** Ref to a component inside a docs/stories/<code>.md index */
87
+ export interface StoryComponentRef {
88
+ name: string;
89
+ path: string;
90
+ }
91
+ /** Frontmatter for docs/stories/<code>.md */
92
+ export interface StoryMeta extends Record<string, unknown> {
93
+ code: string;
94
+ status: string;
95
+ primary: boolean;
96
+ /** The audience this story serves; its screens live under that area's entrypoint. */
97
+ area: string;
98
+ /**
99
+ * The top-menu section the scaffold reserved for this story, inside its area.
100
+ *
101
+ * Assigned before any of the story's code exists, so that the stub screen drawn at
102
+ * initialization and the real screen developed later land in the SAME menu group — a story
103
+ * that moves section when it is implemented leaves its own dashboard behind.
104
+ */
105
+ section?: string;
106
+ entity: string;
107
+ entities: string[];
108
+ screens: StoryScreenRef[];
109
+ transitions: Array<{
110
+ from: string;
111
+ to: string;
112
+ initiator: string;
113
+ action: string;
114
+ type: string;
115
+ }>;
116
+ }
117
+ /** Frontmatter for co-located <screen>.spec.md */
118
+ export interface ScreenMeta extends Record<string, unknown> {
119
+ name: string;
120
+ stories: string[];
121
+ area?: string;
122
+ section?: string;
123
+ components: string[];
124
+ }
125
+ /** Frontmatter for co-located <component>.spec.md */
126
+ export interface ComponentMeta extends Record<string, unknown> {
127
+ name: string;
128
+ stories: string[];
129
+ entities: string[];
130
+ }
131
+ /**
132
+ * Payload the agent passes to store.writeStory — all data the developer
133
+ * collected during one develop run.
134
+ */
135
+ export interface StoryWriteInput {
136
+ code: string;
137
+ narrative: string;
138
+ status: string;
139
+ primary: boolean;
140
+ /** Carried through a develop run so the rewrite does not drop the scaffold's assignment. */
141
+ section?: string;
142
+ /** Likewise the reserved screen name. */
143
+ screen?: string;
144
+ userStory: import('../ba/types.js').UserStory;
145
+ /** Each entry maps a StoryScreen to its source path in the target project */
146
+ screenPaths: Record<string, string>;
147
+ /** Each entry maps a StoryComponent to its source path in the target project */
148
+ componentPaths: Record<string, string>;
149
+ transitions: Array<{
150
+ from: string;
151
+ to: string;
152
+ initiator: string;
153
+ action: string;
154
+ type: string;
155
+ }>;
156
+ }
157
+ /**
158
+ * What a registry entry names.
159
+ *
160
+ * One entry per artifact the pipeline can generate, so that "where does this live" and "what is
161
+ * it called" have exactly one answer for the whole life of the project.
162
+ */
163
+ export declare enum RegistryKind {
164
+ /** The single directory segment an entity owns across models/, resources/ and backend models/ */
165
+ EntityDir = "entity-dir",
166
+ ModelType = "model-type",
167
+ Resource = "resource",
168
+ BackendModel = "backend-model",
169
+ ApiHandlers = "api-handlers",
170
+ Service = "service",
171
+ Layout = "layout",
172
+ Screen = "screen",
173
+ Component = "component",
174
+ ViewModel = "view-model",
175
+ State = "state",
176
+ /** Alias-only entry for one endpoint — carries no source path of its own */
177
+ ApiEntrypoint = "api-entrypoint"
178
+ }
179
+ /**
180
+ * One allocated name.
181
+ *
182
+ * `name` is the lookup key — the entity name for entity-scoped kinds, the definition otherwise.
183
+ * Everything else is what generated code must use verbatim: a coder that writes a different
184
+ * directory, and a fixer that renames a reference instead of declaring the missing thing, are the
185
+ * two failure modes this record exists to make impossible.
186
+ */
187
+ export interface RegistryAllocation extends Record<string, unknown> {
188
+ kind: RegistryKind;
189
+ name: string;
190
+ /** Repo-relative source path; empty for alias-only kinds */
191
+ path: string;
192
+ /** Resource alias (also the physical table name) or entrypoint alias */
193
+ alias?: string;
194
+ /** Dotted `app.*` reference the generated code uses to reach the alias */
195
+ appRef?: string;
196
+ /** Exported symbol — screen/layout/component/handler */
197
+ symbol?: string;
198
+ /**
199
+ * The FULL assembled route, recorded when an entrypoint is declared — area prefix included.
200
+ *
201
+ * The declaration that produces it carries only the tail, because a child path is appended to
202
+ * its parent's; `areaSegment` is what shortens this value when a declaration is written back.
203
+ */
204
+ url?: string;
205
+ /** Parent entrypoint alias — for a screen that is its AREA, for an endpoint its group */
206
+ parent?: string;
207
+ /** The area a screen belongs to — one of the four {@link ProjectArea} values. */
208
+ area?: string;
209
+ /** Top-menu group of a screen. A label, never a URL segment. */
210
+ section?: string;
211
+ /**
212
+ * A SCAFFOLD placeholder — drawn at initialization, replaced or deleted later.
213
+ *
214
+ * The flag is what makes cleanup deterministic instead of a judgement call. It survives until
215
+ * either the story behind the artifact is implemented (the file is rewritten in place and the
216
+ * flag is cleared) or something else edits the file, which clears the flag as well: whoever
217
+ * edited it meant it, so nothing may delete it afterwards.
218
+ */
219
+ stub?: boolean;
220
+ /**
221
+ * SHA-256 of the file exactly as the scaffold wrote it.
222
+ *
223
+ * Compared against the file on disk before a stub is deleted. A mismatch means the file is no
224
+ * longer the placeholder that was written — free flight, the editor or a story implementation
225
+ * has been in it — so it is kept, and only the `stub` flag is dropped.
226
+ */
227
+ hash?: string;
228
+ /** This widget is on its area home's shortlist and renders there in `compact` mode too. */
229
+ home?: boolean;
230
+ /** Story code that OWNS the allocation — the one its file is named after. */
231
+ story: string;
232
+ /**
233
+ * Every story this one artifact stands in for, the owner included.
234
+ *
235
+ * A preview widget is drawn per user story only when each story genuinely needs its own; two
236
+ * steps of one flow that act on the same record through the same shape share ONE widget, and
237
+ * then the widget belongs to a SET. `story` stays the code the file is named after, because
238
+ * `widgetDefinition(code)` derives the filename from exactly one; this is what lets
239
+ * `byStory` answer to every member, and what stops a departing member from retiring an
240
+ * artifact the others still name.
241
+ *
242
+ * Absent on an artifact nobody shares — the ordinary case, and the shape every slot drawn
243
+ * before sharing existed carries.
244
+ */
245
+ stories?: string[];
246
+ }
247
+ /** Frontmatter for .agents/memory/registry.md */
248
+ export interface RegistryMeta extends Record<string, unknown> {
249
+ version: number;
250
+ entries: RegistryAllocation[];
251
+ }
252
+ /**
253
+ * One place the repository no longer matches the layout the pipeline derives paths from.
254
+ *
255
+ * `expected` is what `naming.ts` would build; `actual` is what is on disk. Both are recorded
256
+ * because a later run has to do two different things with them — address the file where it is,
257
+ * and stop proposing to move it back.
258
+ */
259
+ export interface LayoutDeviation {
260
+ /** What the pipeline would have derived — a repo-relative path or a directory. */
261
+ expected: string;
262
+ /** Where the thing actually is. Empty when it was removed outright. */
263
+ actual: string;
264
+ /** Why it moved, in one sentence, as the run that observed it understood it. */
265
+ reason: string;
266
+ }
267
+ /**
268
+ * Frontmatter for `.agents/memory/layout.md`.
269
+ *
270
+ * A generated target IS-A `@owlmeans/create-app` project, and every path the pipeline writes is
271
+ * derived from that. The volume is the user's, though: they rename, they move, they merge a pull
272
+ * request. Recording the divergence is what keeps the next run from fighting it — an agent that
273
+ * re-derives a path it was already told is wrong recreates the file in the old place, and the
274
+ * project then has two.
275
+ *
276
+ * `layout` is which of the two generated shapes the tree started as, so that a slot published
277
+ * before the `create-app` adoption is still addressed in its own vocabulary.
278
+ */
279
+ export interface LayoutMeta extends Record<string, unknown> {
280
+ version: number;
281
+ /** `v1` (packages/{common,backend,frontend}) or `v2` (sources/*). */
282
+ layout: string;
283
+ updatedAt: string;
284
+ deviations: LayoutDeviation[];
285
+ }
286
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/metadata/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACvF,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,CAAC,CAAA;IACP,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,kB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export var MetadataKind;
2
+ (function (MetadataKind) {
3
+ MetadataKind["Project"] = "project";
4
+ MetadataKind["Story"] = "story";
5
+ MetadataKind["Source"] = "source";
6
+ MetadataKind["History"] = "history";
7
+ })(MetadataKind || (MetadataKind = {}));
8
+ export var MetadataListKind;
9
+ (function (MetadataListKind) {
10
+ MetadataListKind["Stories"] = "stories";
11
+ MetadataListKind["Meta"] = "meta";
12
+ // All metadata: the docs/ and .agents/ trees + co-located *.spec/.ux/.ui.md beside sources
13
+ MetadataListKind["All"] = "all";
14
+ })(MetadataListKind || (MetadataListKind = {}));
15
+ // ─── Name registry (.agents/memory/registry.md) ───────────────────────────────────────
16
+ /**
17
+ * What a registry entry names.
18
+ *
19
+ * One entry per artifact the pipeline can generate, so that "where does this live" and "what is
20
+ * it called" have exactly one answer for the whole life of the project.
21
+ */
22
+ export var RegistryKind;
23
+ (function (RegistryKind) {
24
+ /** The single directory segment an entity owns across models/, resources/ and backend models/ */
25
+ RegistryKind["EntityDir"] = "entity-dir";
26
+ RegistryKind["ModelType"] = "model-type";
27
+ RegistryKind["Resource"] = "resource";
28
+ RegistryKind["BackendModel"] = "backend-model";
29
+ RegistryKind["ApiHandlers"] = "api-handlers";
30
+ RegistryKind["Service"] = "service";
31
+ RegistryKind["Layout"] = "layout";
32
+ RegistryKind["Screen"] = "screen";
33
+ RegistryKind["Component"] = "component";
34
+ RegistryKind["ViewModel"] = "view-model";
35
+ RegistryKind["State"] = "state";
36
+ /** Alias-only entry for one endpoint — carries no source path of its own */
37
+ RegistryKind["ApiEntrypoint"] = "api-entrypoint";
38
+ })(RegistryKind || (RegistryKind = {}));
39
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/metadata/types.ts"],"names":[],"mappings":"AAcA,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf,iCAAiB,CAAA;IACjB,mCAAmB,CAAA;AACrB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAED,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,iCAAa,CAAA;IACb,2FAA2F;IAC3F,+BAAW,CAAA;AACb,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AAmJD,yFAAyF;AAEzF;;;;;GAKG;AACH,MAAM,CAAN,IAAY,YAeX;AAfD,WAAY,YAAY;IACtB,iGAAiG;IACjG,wCAAwB,CAAA;IACxB,wCAAwB,CAAA;IACxB,qCAAqB,CAAA;IACrB,8CAA8B,CAAA;IAC9B,4CAA4B,CAAA;IAC5B,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,iCAAiB,CAAA;IACjB,uCAAuB,CAAA;IACvB,wCAAwB,CAAA;IACxB,+BAAe,CAAA;IACf,4EAA4E;IAC5E,gDAAgC,CAAA;AAClC,CAAC,EAfW,YAAY,KAAZ,YAAY,QAevB"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * What the moderation gate refuses, and nothing more.
3
+ *
4
+ * The set is deliberately about the SHAPE of what is being built, never its sector: a product
5
+ * that handles money, credentials or medical data is ordinary, and a platform that refuses
6
+ * those refuses most of its own market. What is not ordinary is a product whose purpose is to
7
+ * collect someone else's credentials, to be mistaken for someone who did not ask to be
8
+ * represented, or to push messages at people who never asked for them.
9
+ *
10
+ * Every generated app has a sign-in screen of its own — that is what an application is — so a
11
+ * login is never evidence of anything here.
12
+ *
13
+ * The set is CLOSED. A new refusal shape belongs inside one of these four, phrased into the
14
+ * policy prompt: each value is a wire contract with user-facing wording in seven languages
15
+ * behind it, and a fifth one silently renders as the generic refusal until every one of those
16
+ * catches up.
17
+ */
18
+ export declare enum ModerationCategory {
19
+ /** Captures credentials, OTPs, card numbers or recovery phrases for a service the requester does not run. */
20
+ CredentialHarvesting = "credential-harvesting",
21
+ /** Presents itself as a named third party — an organization OR a real person — rather than as its own product. */
22
+ BrandImpersonation = "brand-impersonation",
23
+ /** Collects payment details on behalf of a merchant that is not the requester. */
24
+ PaymentCapture = "payment-capture",
25
+ /** Tooling whose purpose is abuse: credential stuffers, phishing-kit builders, bulk-spam senders. */
26
+ AbuseTooling = "abuse-tooling"
27
+ }
28
+ /**
29
+ * What is being classified. Carried into the trace so a refusal can be attributed.
30
+ *
31
+ * Each value has a framing sentence behind it that tells the classifier whose words it is
32
+ * reading — the same text means different things as a customer's request, as our own generated
33
+ * specification, and as a file already sitting inside an approved project.
34
+ */
35
+ export declare enum ModerationSubject {
36
+ Prompt = "prompt",
37
+ Specification = "specification",
38
+ Story = "story",
39
+ /**
40
+ * A file a human wrote through the project's own editor.
41
+ *
42
+ * Deliberately separate from the three above: this is code inside an already-approved
43
+ * product, so the framing has to stop the classifier from refusing ordinary application
44
+ * source that happens to contain the word "password" or a payment form.
45
+ */
46
+ Source = "source",
47
+ /**
48
+ * What a project is CALLED — and, through its slug, what it is reachable at.
49
+ *
50
+ * The only subject that judges an identifier rather than a product, and the only one whose
51
+ * answer may disagree with {@link ModerationSubject.Specification} about the same brand. A
52
+ * consumer turns a project's name into a hostname on a domain all of its customers share, so
53
+ * "a dashboard for our Shopify store" is an ordinary thing to build while `shopify-dashboard`
54
+ * is not a name it may be reachable at. Descriptions may name a brand; identifiers may not.
55
+ */
56
+ Name = "name"
57
+ }
58
+ //# sourceMappingURL=consts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/moderation/consts.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;GAgBG;AACH,oBAAY,kBAAkB;IAC5B,6GAA6G;IAC7G,oBAAoB,0BAA0B;IAC9C,kHAAkH;IAClH,kBAAkB,wBAAwB;IAC1C,kFAAkF;IAClF,cAAc,oBAAoB;IAClC,qGAAqG;IACrG,YAAY,kBAAkB;CAC/B;AAED;;;;;;GAMG;AACH,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,KAAK,UAAU;IACf;;;;;;OAMG;IACH,MAAM,WAAW;IACjB;;;;;;;;OAQG;IACH,IAAI,SAAS;CACd"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * What the moderation gate refuses, and nothing more.
3
+ *
4
+ * The set is deliberately about the SHAPE of what is being built, never its sector: a product
5
+ * that handles money, credentials or medical data is ordinary, and a platform that refuses
6
+ * those refuses most of its own market. What is not ordinary is a product whose purpose is to
7
+ * collect someone else's credentials, to be mistaken for someone who did not ask to be
8
+ * represented, or to push messages at people who never asked for them.
9
+ *
10
+ * Every generated app has a sign-in screen of its own — that is what an application is — so a
11
+ * login is never evidence of anything here.
12
+ *
13
+ * The set is CLOSED. A new refusal shape belongs inside one of these four, phrased into the
14
+ * policy prompt: each value is a wire contract with user-facing wording in seven languages
15
+ * behind it, and a fifth one silently renders as the generic refusal until every one of those
16
+ * catches up.
17
+ */
18
+ export var ModerationCategory;
19
+ (function (ModerationCategory) {
20
+ /** Captures credentials, OTPs, card numbers or recovery phrases for a service the requester does not run. */
21
+ ModerationCategory["CredentialHarvesting"] = "credential-harvesting";
22
+ /** Presents itself as a named third party — an organization OR a real person — rather than as its own product. */
23
+ ModerationCategory["BrandImpersonation"] = "brand-impersonation";
24
+ /** Collects payment details on behalf of a merchant that is not the requester. */
25
+ ModerationCategory["PaymentCapture"] = "payment-capture";
26
+ /** Tooling whose purpose is abuse: credential stuffers, phishing-kit builders, bulk-spam senders. */
27
+ ModerationCategory["AbuseTooling"] = "abuse-tooling";
28
+ })(ModerationCategory || (ModerationCategory = {}));
29
+ /**
30
+ * What is being classified. Carried into the trace so a refusal can be attributed.
31
+ *
32
+ * Each value has a framing sentence behind it that tells the classifier whose words it is
33
+ * reading — the same text means different things as a customer's request, as our own generated
34
+ * specification, and as a file already sitting inside an approved project.
35
+ */
36
+ export var ModerationSubject;
37
+ (function (ModerationSubject) {
38
+ ModerationSubject["Prompt"] = "prompt";
39
+ ModerationSubject["Specification"] = "specification";
40
+ ModerationSubject["Story"] = "story";
41
+ /**
42
+ * A file a human wrote through the project's own editor.
43
+ *
44
+ * Deliberately separate from the three above: this is code inside an already-approved
45
+ * product, so the framing has to stop the classifier from refusing ordinary application
46
+ * source that happens to contain the word "password" or a payment form.
47
+ */
48
+ ModerationSubject["Source"] = "source";
49
+ /**
50
+ * What a project is CALLED — and, through its slug, what it is reachable at.
51
+ *
52
+ * The only subject that judges an identifier rather than a product, and the only one whose
53
+ * answer may disagree with {@link ModerationSubject.Specification} about the same brand. A
54
+ * consumer turns a project's name into a hostname on a domain all of its customers share, so
55
+ * "a dashboard for our Shopify store" is an ordinary thing to build while `shopify-dashboard`
56
+ * is not a name it may be reachable at. Descriptions may name a brand; identifiers may not.
57
+ */
58
+ ModerationSubject["Name"] = "name";
59
+ })(ModerationSubject || (ModerationSubject = {}));
60
+ //# sourceMappingURL=consts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/moderation/consts.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAN,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,6GAA6G;IAC7G,oEAA8C,CAAA;IAC9C,kHAAkH;IAClH,gEAA0C,CAAA;IAC1C,kFAAkF;IAClF,wDAAkC,CAAA;IAClC,qGAAqG;IACrG,oDAA8B,CAAA;AAChC,CAAC,EATW,kBAAkB,KAAlB,kBAAkB,QAS7B;AAED;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,iBAsBX;AAtBD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,oDAA+B,CAAA;IAC/B,oCAAe,CAAA;IACf;;;;;;OAMG;IACH,sCAAiB,CAAA;IACjB;;;;;;;;OAQG;IACH,kCAAa,CAAA;AACf,CAAC,EAtBW,iBAAiB,KAAjB,iBAAiB,QAsB5B"}
@@ -0,0 +1,5 @@
1
+ export * from './consts.js';
2
+ export * from './schemas.js';
3
+ export * from './utils.js';
4
+ export type * from './types.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/moderation/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,mBAAmB,YAAY,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './consts.js';
2
+ export * from './schemas.js';
3
+ export * from './utils.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/moderation/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA"}
@@ -0,0 +1,19 @@
1
+ import type { JSONSchemaType } from 'ajv';
2
+ import type { ModerationVerdict } from './types.js';
3
+ /**
4
+ * What the classifier must answer with.
5
+ *
6
+ * Kept minimal on purpose: a schema the model must satisfy is also a schema it will try to
7
+ * fill, and every extra field is another thing it can hallucinate a reason into. The decision
8
+ * is one boolean; the category exists so the browser can phrase the refusal; the evidence
9
+ * exists so a human reviewing the trace can see what the model actually reacted to.
10
+ *
11
+ * `category` is a free string here even though only `ModerationCategory` values mean anything,
12
+ * and that is deliberate. Constrained to the enum it made **every** call fail: with nothing to
13
+ * categorise, a model that allows still fills the field — `"none"`, `""`, `"n/a"` — the
14
+ * response fails validation, the retry budget runs out, and the gate fails open on every
15
+ * request while looking like it is working. The value is narrowed in code instead
16
+ * (`normalizeCategory`), where an unrecognized one is simply absent.
17
+ */
18
+ export declare const ModerationVerdictSchema: JSONSchemaType<ModerationVerdict>;
19
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/moderation/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,uBAAuB,EAAE,cAAc,CAAC,iBAAiB,CASrB,CAAA"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * What the classifier must answer with.
3
+ *
4
+ * Kept minimal on purpose: a schema the model must satisfy is also a schema it will try to
5
+ * fill, and every extra field is another thing it can hallucinate a reason into. The decision
6
+ * is one boolean; the category exists so the browser can phrase the refusal; the evidence
7
+ * exists so a human reviewing the trace can see what the model actually reacted to.
8
+ *
9
+ * `category` is a free string here even though only `ModerationCategory` values mean anything,
10
+ * and that is deliberate. Constrained to the enum it made **every** call fail: with nothing to
11
+ * categorise, a model that allows still fills the field — `"none"`, `""`, `"n/a"` — the
12
+ * response fails validation, the retry budget runs out, and the gate fails open on every
13
+ * request while looking like it is working. The value is narrowed in code instead
14
+ * (`normalizeCategory`), where an unrecognized one is simply absent.
15
+ */
16
+ export const ModerationVerdictSchema = {
17
+ type: 'object',
18
+ properties: {
19
+ allowed: { type: 'boolean' },
20
+ category: { type: 'string', maxLength: 64, nullable: true },
21
+ evidence: { type: 'string', maxLength: 500, nullable: true },
22
+ },
23
+ required: ['allowed'],
24
+ additionalProperties: false,
25
+ };
26
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/moderation/schemas.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAsC;IACxE,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QAC5B,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC3D,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC7D;IACD,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,oBAAoB,EAAE,KAAK;CACoB,CAAA"}
@@ -0,0 +1,64 @@
1
+ import type { ModerationCategory, ModerationSubject } from './consts.js';
2
+ /**
3
+ * What the moderation classifier returns.
4
+ *
5
+ * `evidence` is diagnostic only — it reaches the trace and the logs, never the user. What the
6
+ * user is told derives from `category` in the browser, so a refusal reads the same in all
7
+ * seven languages and the model never gets to write UI copy.
8
+ */
9
+ export interface ModerationVerdict {
10
+ allowed: boolean;
11
+ /**
12
+ * Free string on the wire, narrowed to {@link ModerationCategory} by `normalizeCategory`.
13
+ * A model that is allowing has nothing to categorise and will still put something here.
14
+ */
15
+ category?: string;
16
+ evidence?: string;
17
+ }
18
+ /**
19
+ * The three outcomes, separated from the IO so the policy can be read and tested on its own.
20
+ *
21
+ * `shadow` means the verdict was negative and is being recorded but not acted on.
22
+ */
23
+ export type ModerationAction = 'allow' | 'refuse' | 'shadow';
24
+ /**
25
+ * The two operational levers on the gate.
26
+ *
27
+ * Both exist because a blocking classifier will eventually be wrong about a real customer, and
28
+ * at that moment the fix has to be faster than a deploy. `enforce: false` keeps the verdicts
29
+ * flowing into the traces while refusing nothing, which is also how a change to the policy
30
+ * prompt should be evaluated before it is trusted.
31
+ */
32
+ export interface ModerationPolicy {
33
+ /** Defaults to ON. Set false to compute and trace verdicts without acting on them. */
34
+ enforce?: boolean;
35
+ /** Entity ids released from the gate entirely. */
36
+ bypassEntities?: string[];
37
+ }
38
+ /** What a caller needs in order to refuse: never the model's own words. */
39
+ export interface ModerationOutcome {
40
+ action: ModerationAction;
41
+ /**
42
+ * Always present when `action` is not `allow`.
43
+ *
44
+ * A refusal has to tell the user something specific, so an unrecognized category from the
45
+ * model is replaced rather than dropped — see `normalizeCategory`.
46
+ */
47
+ category?: ModerationCategory;
48
+ /** Diagnostic only. Logged and traced, never rendered. */
49
+ evidence?: string;
50
+ }
51
+ /** One classification request. */
52
+ export interface ModerationInput {
53
+ subject: ModerationSubject;
54
+ /** One text, or several judged together — several is one call, not several. */
55
+ text: string | string[];
56
+ /** Whose request this is — the one thing a bypass can be keyed on. */
57
+ entityId?: string;
58
+ /**
59
+ * Extra framing appended to the subject's own, for a subject whose meaning depends on where
60
+ * the text came from — a file's path, for instance.
61
+ */
62
+ context?: string;
63
+ }
64
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/moderation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAExE;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE5D;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kDAAkD;IAClD,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAC1B;AAED,2EAA2E;AAC3E,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,gBAAgB,CAAA;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,kCAAkC;AAClC,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,iBAAiB,CAAA;IAC1B,+EAA+E;IAC/E,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACvB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/moderation/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import { ModerationCategory } from './consts.js';
2
+ import type { ModerationAction, ModerationPolicy, ModerationVerdict } from './types.js';
3
+ /**
4
+ * Narrow whatever the model put in `category` to a real one, or to nothing.
5
+ *
6
+ * The wire field is a free string on purpose — see {@link ModerationVerdictSchema}. A model
7
+ * that is allowing has nothing to categorise and still fills the field, so anything
8
+ * unrecognized is treated as absent rather than as a failure.
9
+ */
10
+ export declare const normalizeCategory: (category?: string) => ModerationCategory | undefined;
11
+ /**
12
+ * What to do about a verdict.
13
+ *
14
+ * Pure, because this is the part with the operational levers on it and the part most likely
15
+ * to be wrong in a hurry: `enforce` turns the whole gate into an observer without a deploy,
16
+ * and `bypassEntities` releases one entity when a real customer is wrongly refused.
17
+ */
18
+ export declare const decideModeration: (verdict: ModerationVerdict, policy?: ModerationPolicy & {
19
+ entityId?: string;
20
+ }) => ModerationAction;
21
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/moderation/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEvF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,cAAe,MAAM,KAAG,kBAAkB,GAAG,SAM1E,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,YAClB,iBAAiB,WAAU,gBAAgB,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,KAC3E,gBAOF,CAAA"}