@jini-ai/cms 0.1.0

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 (527) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +84 -0
  3. package/dist/content-types/agent-tools.d.ts +65 -0
  4. package/dist/content-types/agent-tools.d.ts.map +1 -0
  5. package/dist/content-types/agent-tools.js +172 -0
  6. package/dist/content-types/agent-tools.js.map +1 -0
  7. package/dist/content-types/cleanup.d.ts +118 -0
  8. package/dist/content-types/cleanup.d.ts.map +1 -0
  9. package/dist/content-types/cleanup.js +65 -0
  10. package/dist/content-types/cleanup.js.map +1 -0
  11. package/dist/content-types/errors.d.ts +90 -0
  12. package/dist/content-types/errors.d.ts.map +1 -0
  13. package/dist/content-types/errors.js +119 -0
  14. package/dist/content-types/errors.js.map +1 -0
  15. package/dist/content-types/field-defs.d.ts +25 -0
  16. package/dist/content-types/field-defs.d.ts.map +1 -0
  17. package/dist/content-types/field-defs.js +155 -0
  18. package/dist/content-types/field-defs.js.map +1 -0
  19. package/dist/content-types/index-provisioning.d.ts +94 -0
  20. package/dist/content-types/index-provisioning.d.ts.map +1 -0
  21. package/dist/content-types/index-provisioning.js +133 -0
  22. package/dist/content-types/index-provisioning.js.map +1 -0
  23. package/dist/content-types/index.d.ts +63 -0
  24. package/dist/content-types/index.d.ts.map +1 -0
  25. package/dist/content-types/index.js +36 -0
  26. package/dist/content-types/index.js.map +1 -0
  27. package/dist/content-types/lifecycle-dispatch.d.ts +38 -0
  28. package/dist/content-types/lifecycle-dispatch.d.ts.map +1 -0
  29. package/dist/content-types/lifecycle-dispatch.js +28 -0
  30. package/dist/content-types/lifecycle-dispatch.js.map +1 -0
  31. package/dist/content-types/lifecycle.d.ts +104 -0
  32. package/dist/content-types/lifecycle.d.ts.map +1 -0
  33. package/dist/content-types/lifecycle.js +143 -0
  34. package/dist/content-types/lifecycle.js.map +1 -0
  35. package/dist/content-types/list.d.ts +44 -0
  36. package/dist/content-types/list.d.ts.map +1 -0
  37. package/dist/content-types/list.js +13 -0
  38. package/dist/content-types/list.js.map +1 -0
  39. package/dist/content-types/repo.memory.d.ts +72 -0
  40. package/dist/content-types/repo.memory.d.ts.map +1 -0
  41. package/dist/content-types/repo.memory.js +71 -0
  42. package/dist/content-types/repo.memory.js.map +1 -0
  43. package/dist/content-types/tool-registrations.d.ts +65 -0
  44. package/dist/content-types/tool-registrations.d.ts.map +1 -0
  45. package/dist/content-types/tool-registrations.js +180 -0
  46. package/dist/content-types/tool-registrations.js.map +1 -0
  47. package/dist/content-types/types.d.ts +78 -0
  48. package/dist/content-types/types.d.ts.map +1 -0
  49. package/dist/content-types/types.js +32 -0
  50. package/dist/content-types/types.js.map +1 -0
  51. package/dist/content-types/write-service.d.ts +141 -0
  52. package/dist/content-types/write-service.d.ts.map +1 -0
  53. package/dist/content-types/write-service.js +180 -0
  54. package/dist/content-types/write-service.js.map +1 -0
  55. package/dist/core/commands/change-set.d.ts +98 -0
  56. package/dist/core/commands/change-set.d.ts.map +1 -0
  57. package/dist/core/commands/change-set.js +2 -0
  58. package/dist/core/commands/change-set.js.map +1 -0
  59. package/dist/core/commands/command.d.ts +168 -0
  60. package/dist/core/commands/command.d.ts.map +1 -0
  61. package/dist/core/commands/command.js +173 -0
  62. package/dist/core/commands/command.js.map +1 -0
  63. package/dist/core/index.d.ts +45 -0
  64. package/dist/core/index.d.ts.map +1 -0
  65. package/dist/core/index.js +43 -0
  66. package/dist/core/index.js.map +1 -0
  67. package/dist/core/ports.d.ts +139 -0
  68. package/dist/core/ports.d.ts.map +1 -0
  69. package/dist/core/ports.js +2 -0
  70. package/dist/core/ports.js.map +1 -0
  71. package/dist/core/tools/registration-kit.d.ts +308 -0
  72. package/dist/core/tools/registration-kit.d.ts.map +1 -0
  73. package/dist/core/tools/registration-kit.js +381 -0
  74. package/dist/core/tools/registration-kit.js.map +1 -0
  75. package/dist/entries/agent-tools.d.ts +78 -0
  76. package/dist/entries/agent-tools.d.ts.map +1 -0
  77. package/dist/entries/agent-tools.js +158 -0
  78. package/dist/entries/agent-tools.js.map +1 -0
  79. package/dist/entries/errors.d.ts +43 -0
  80. package/dist/entries/errors.d.ts.map +1 -0
  81. package/dist/entries/errors.js +59 -0
  82. package/dist/entries/errors.js.map +1 -0
  83. package/dist/entries/field-validation.d.ts +70 -0
  84. package/dist/entries/field-validation.d.ts.map +1 -0
  85. package/dist/entries/field-validation.js +87 -0
  86. package/dist/entries/field-validation.js.map +1 -0
  87. package/dist/entries/index.d.ts +55 -0
  88. package/dist/entries/index.d.ts.map +1 -0
  89. package/dist/entries/index.js +38 -0
  90. package/dist/entries/index.js.map +1 -0
  91. package/dist/entries/lifecycle-dispatch.d.ts +15 -0
  92. package/dist/entries/lifecycle-dispatch.d.ts.map +1 -0
  93. package/dist/entries/lifecycle-dispatch.js +16 -0
  94. package/dist/entries/lifecycle-dispatch.js.map +1 -0
  95. package/dist/entries/list.d.ts +47 -0
  96. package/dist/entries/list.d.ts.map +1 -0
  97. package/dist/entries/list.js +12 -0
  98. package/dist/entries/list.js.map +1 -0
  99. package/dist/entries/repo.memory.d.ts +64 -0
  100. package/dist/entries/repo.memory.d.ts.map +1 -0
  101. package/dist/entries/repo.memory.js +73 -0
  102. package/dist/entries/repo.memory.js.map +1 -0
  103. package/dist/entries/tool-registrations.d.ts +52 -0
  104. package/dist/entries/tool-registrations.d.ts.map +1 -0
  105. package/dist/entries/tool-registrations.js +141 -0
  106. package/dist/entries/tool-registrations.js.map +1 -0
  107. package/dist/entries/types.d.ts +55 -0
  108. package/dist/entries/types.d.ts.map +1 -0
  109. package/dist/entries/types.js +2 -0
  110. package/dist/entries/types.js.map +1 -0
  111. package/dist/entries/write-service.d.ts +202 -0
  112. package/dist/entries/write-service.d.ts.map +1 -0
  113. package/dist/entries/write-service.js +204 -0
  114. package/dist/entries/write-service.js.map +1 -0
  115. package/dist/identity/admin-crud-service.d.ts +252 -0
  116. package/dist/identity/admin-crud-service.d.ts.map +1 -0
  117. package/dist/identity/admin-crud-service.js +437 -0
  118. package/dist/identity/admin-crud-service.js.map +1 -0
  119. package/dist/identity/agent-tool-input.d.ts +58 -0
  120. package/dist/identity/agent-tool-input.d.ts.map +1 -0
  121. package/dist/identity/agent-tool-input.js +126 -0
  122. package/dist/identity/agent-tool-input.js.map +1 -0
  123. package/dist/identity/agent-tools.d.ts +101 -0
  124. package/dist/identity/agent-tools.d.ts.map +1 -0
  125. package/dist/identity/agent-tools.js +290 -0
  126. package/dist/identity/agent-tools.js.map +1 -0
  127. package/dist/identity/auth-service.d.ts +87 -0
  128. package/dist/identity/auth-service.d.ts.map +1 -0
  129. package/dist/identity/auth-service.js +141 -0
  130. package/dist/identity/auth-service.js.map +1 -0
  131. package/dist/identity/authorize.d.ts +90 -0
  132. package/dist/identity/authorize.d.ts.map +1 -0
  133. package/dist/identity/authorize.js +94 -0
  134. package/dist/identity/authorize.js.map +1 -0
  135. package/dist/identity/grant-service.d.ts +198 -0
  136. package/dist/identity/grant-service.d.ts.map +1 -0
  137. package/dist/identity/grant-service.js +361 -0
  138. package/dist/identity/grant-service.js.map +1 -0
  139. package/dist/identity/hasher.d.ts +39 -0
  140. package/dist/identity/hasher.d.ts.map +1 -0
  141. package/dist/identity/hasher.js +39 -0
  142. package/dist/identity/hasher.js.map +1 -0
  143. package/dist/identity/index.d.ts +59 -0
  144. package/dist/identity/index.d.ts.map +1 -0
  145. package/dist/identity/index.js +51 -0
  146. package/dist/identity/index.js.map +1 -0
  147. package/dist/identity/password-policy.d.ts +58 -0
  148. package/dist/identity/password-policy.d.ts.map +1 -0
  149. package/dist/identity/password-policy.js +67 -0
  150. package/dist/identity/password-policy.js.map +1 -0
  151. package/dist/identity/permission-migrations.d.ts +86 -0
  152. package/dist/identity/permission-migrations.d.ts.map +1 -0
  153. package/dist/identity/permission-migrations.js +67 -0
  154. package/dist/identity/permission-migrations.js.map +1 -0
  155. package/dist/identity/permissions.d.ts +35 -0
  156. package/dist/identity/permissions.d.ts.map +1 -0
  157. package/dist/identity/permissions.js +603 -0
  158. package/dist/identity/permissions.js.map +1 -0
  159. package/dist/identity/ports.d.ts +201 -0
  160. package/dist/identity/ports.d.ts.map +1 -0
  161. package/dist/identity/ports.js +2 -0
  162. package/dist/identity/ports.js.map +1 -0
  163. package/dist/identity/repo.memory.d.ts +164 -0
  164. package/dist/identity/repo.memory.d.ts.map +1 -0
  165. package/dist/identity/repo.memory.js +224 -0
  166. package/dist/identity/repo.memory.js.map +1 -0
  167. package/dist/identity/seed.d.ts +42 -0
  168. package/dist/identity/seed.d.ts.map +1 -0
  169. package/dist/identity/seed.js +277 -0
  170. package/dist/identity/seed.js.map +1 -0
  171. package/dist/identity/tool-registrations.d.ts +50 -0
  172. package/dist/identity/tool-registrations.d.ts.map +1 -0
  173. package/dist/identity/tool-registrations.js +419 -0
  174. package/dist/identity/tool-registrations.js.map +1 -0
  175. package/dist/identity/types.d.ts +185 -0
  176. package/dist/identity/types.d.ts.map +1 -0
  177. package/dist/identity/types.js +64 -0
  178. package/dist/identity/types.js.map +1 -0
  179. package/dist/identity/username.d.ts +12 -0
  180. package/dist/identity/username.d.ts.map +1 -0
  181. package/dist/identity/username.js +14 -0
  182. package/dist/identity/username.js.map +1 -0
  183. package/dist/media/agent-tools.d.ts +66 -0
  184. package/dist/media/agent-tools.d.ts.map +1 -0
  185. package/dist/media/agent-tools.js +131 -0
  186. package/dist/media/agent-tools.js.map +1 -0
  187. package/dist/media/blob-gc-lock.d.ts +37 -0
  188. package/dist/media/blob-gc-lock.d.ts.map +1 -0
  189. package/dist/media/blob-gc-lock.js +55 -0
  190. package/dist/media/blob-gc-lock.js.map +1 -0
  191. package/dist/media/blob-gc.d.ts +246 -0
  192. package/dist/media/blob-gc.d.ts.map +1 -0
  193. package/dist/media/blob-gc.js +254 -0
  194. package/dist/media/blob-gc.js.map +1 -0
  195. package/dist/media/blob-key.d.ts +28 -0
  196. package/dist/media/blob-key.d.ts.map +1 -0
  197. package/dist/media/blob-key.js +11 -0
  198. package/dist/media/blob-key.js.map +1 -0
  199. package/dist/media/blob-store.fs.d.ts +23 -0
  200. package/dist/media/blob-store.fs.d.ts.map +1 -0
  201. package/dist/media/blob-store.fs.js +48 -0
  202. package/dist/media/blob-store.fs.js.map +1 -0
  203. package/dist/media/blob-store.memory.d.ts +22 -0
  204. package/dist/media/blob-store.memory.d.ts.map +1 -0
  205. package/dist/media/blob-store.memory.js +23 -0
  206. package/dist/media/blob-store.memory.js.map +1 -0
  207. package/dist/media/content-type-sniffer.d.ts +49 -0
  208. package/dist/media/content-type-sniffer.d.ts.map +1 -0
  209. package/dist/media/content-type-sniffer.js +141 -0
  210. package/dist/media/content-type-sniffer.js.map +1 -0
  211. package/dist/media/image-transformer.d.ts +45 -0
  212. package/dist/media/image-transformer.d.ts.map +1 -0
  213. package/dist/media/image-transformer.js +23 -0
  214. package/dist/media/image-transformer.js.map +1 -0
  215. package/dist/media/image-transformer.sharp.d.ts +26 -0
  216. package/dist/media/image-transformer.sharp.d.ts.map +1 -0
  217. package/dist/media/image-transformer.sharp.js +91 -0
  218. package/dist/media/image-transformer.sharp.js.map +1 -0
  219. package/dist/media/index.d.ts +43 -0
  220. package/dist/media/index.d.ts.map +1 -0
  221. package/dist/media/index.js +31 -0
  222. package/dist/media/index.js.map +1 -0
  223. package/dist/media/media-service.d.ts +244 -0
  224. package/dist/media/media-service.d.ts.map +1 -0
  225. package/dist/media/media-service.js +345 -0
  226. package/dist/media/media-service.js.map +1 -0
  227. package/dist/media/ports.d.ts +142 -0
  228. package/dist/media/ports.d.ts.map +1 -0
  229. package/dist/media/ports.js +2 -0
  230. package/dist/media/ports.js.map +1 -0
  231. package/dist/media/rendition-service.d.ts +66 -0
  232. package/dist/media/rendition-service.d.ts.map +1 -0
  233. package/dist/media/rendition-service.js +135 -0
  234. package/dist/media/rendition-service.js.map +1 -0
  235. package/dist/media/repo.memory.d.ts +107 -0
  236. package/dist/media/repo.memory.d.ts.map +1 -0
  237. package/dist/media/repo.memory.js +131 -0
  238. package/dist/media/repo.memory.js.map +1 -0
  239. package/dist/media/tool-registrations.d.ts +42 -0
  240. package/dist/media/tool-registrations.d.ts.map +1 -0
  241. package/dist/media/tool-registrations.js +121 -0
  242. package/dist/media/tool-registrations.js.map +1 -0
  243. package/dist/media/transform-lock.d.ts +36 -0
  244. package/dist/media/transform-lock.d.ts.map +1 -0
  245. package/dist/media/transform-lock.js +50 -0
  246. package/dist/media/transform-lock.js.map +1 -0
  247. package/dist/media/transform-registry.d.ts +103 -0
  248. package/dist/media/transform-registry.d.ts.map +1 -0
  249. package/dist/media/transform-registry.js +87 -0
  250. package/dist/media/transform-registry.js.map +1 -0
  251. package/dist/media/transform-types.d.ts +82 -0
  252. package/dist/media/transform-types.d.ts.map +1 -0
  253. package/dist/media/transform-types.js +47 -0
  254. package/dist/media/transform-types.js.map +1 -0
  255. package/dist/media/types.d.ts +150 -0
  256. package/dist/media/types.d.ts.map +1 -0
  257. package/dist/media/types.js +26 -0
  258. package/dist/media/types.js.map +1 -0
  259. package/dist/navigation/agent-tools.d.ts +90 -0
  260. package/dist/navigation/agent-tools.d.ts.map +1 -0
  261. package/dist/navigation/agent-tools.js +225 -0
  262. package/dist/navigation/agent-tools.js.map +1 -0
  263. package/dist/navigation/contracts.d.ts +98 -0
  264. package/dist/navigation/contracts.d.ts.map +1 -0
  265. package/dist/navigation/contracts.js +70 -0
  266. package/dist/navigation/contracts.js.map +1 -0
  267. package/dist/navigation/index.d.ts +39 -0
  268. package/dist/navigation/index.d.ts.map +1 -0
  269. package/dist/navigation/index.js +30 -0
  270. package/dist/navigation/index.js.map +1 -0
  271. package/dist/navigation/menu-service.d.ts +256 -0
  272. package/dist/navigation/menu-service.d.ts.map +1 -0
  273. package/dist/navigation/menu-service.js +382 -0
  274. package/dist/navigation/menu-service.js.map +1 -0
  275. package/dist/navigation/ports.d.ts +147 -0
  276. package/dist/navigation/ports.d.ts.map +1 -0
  277. package/dist/navigation/ports.js +2 -0
  278. package/dist/navigation/ports.js.map +1 -0
  279. package/dist/navigation/read-model.d.ts +11 -0
  280. package/dist/navigation/read-model.d.ts.map +1 -0
  281. package/dist/navigation/read-model.js +27 -0
  282. package/dist/navigation/read-model.js.map +1 -0
  283. package/dist/navigation/reconcile.d.ts +57 -0
  284. package/dist/navigation/reconcile.d.ts.map +1 -0
  285. package/dist/navigation/reconcile.js +33 -0
  286. package/dist/navigation/reconcile.js.map +1 -0
  287. package/dist/navigation/repo.memory.d.ts +137 -0
  288. package/dist/navigation/repo.memory.d.ts.map +1 -0
  289. package/dist/navigation/repo.memory.js +95 -0
  290. package/dist/navigation/repo.memory.js.map +1 -0
  291. package/dist/navigation/resolver.d.ts +110 -0
  292. package/dist/navigation/resolver.d.ts.map +1 -0
  293. package/dist/navigation/resolver.js +131 -0
  294. package/dist/navigation/resolver.js.map +1 -0
  295. package/dist/navigation/tool-registrations.d.ts +43 -0
  296. package/dist/navigation/tool-registrations.d.ts.map +1 -0
  297. package/dist/navigation/tool-registrations.js +126 -0
  298. package/dist/navigation/tool-registrations.js.map +1 -0
  299. package/dist/navigation/types.d.ts +207 -0
  300. package/dist/navigation/types.d.ts.map +1 -0
  301. package/dist/navigation/types.js +14 -0
  302. package/dist/navigation/types.js.map +1 -0
  303. package/dist/presentation/index.d.ts +15 -0
  304. package/dist/presentation/index.d.ts.map +1 -0
  305. package/dist/presentation/index.js +15 -0
  306. package/dist/presentation/index.js.map +1 -0
  307. package/dist/presentation/presentation.d.ts +72 -0
  308. package/dist/presentation/presentation.d.ts.map +1 -0
  309. package/dist/presentation/presentation.js +51 -0
  310. package/dist/presentation/presentation.js.map +1 -0
  311. package/dist/presentation/repo.memory.d.ts +9 -0
  312. package/dist/presentation/repo.memory.d.ts.map +1 -0
  313. package/dist/presentation/repo.memory.js +21 -0
  314. package/dist/presentation/repo.memory.js.map +1 -0
  315. package/dist/server/index.d.ts +28 -0
  316. package/dist/server/index.d.ts.map +1 -0
  317. package/dist/server/index.js +28 -0
  318. package/dist/server/index.js.map +1 -0
  319. package/dist/settings/agent-tools.d.ts +83 -0
  320. package/dist/settings/agent-tools.d.ts.map +1 -0
  321. package/dist/settings/agent-tools.js +200 -0
  322. package/dist/settings/agent-tools.js.map +1 -0
  323. package/dist/settings/agent-writable-preferences.d.ts +67 -0
  324. package/dist/settings/agent-writable-preferences.d.ts.map +1 -0
  325. package/dist/settings/agent-writable-preferences.js +144 -0
  326. package/dist/settings/agent-writable-preferences.js.map +1 -0
  327. package/dist/settings/change-feed.d.ts +74 -0
  328. package/dist/settings/change-feed.d.ts.map +1 -0
  329. package/dist/settings/change-feed.js +61 -0
  330. package/dist/settings/change-feed.js.map +1 -0
  331. package/dist/settings/definitions-dispatch.d.ts +51 -0
  332. package/dist/settings/definitions-dispatch.d.ts.map +1 -0
  333. package/dist/settings/definitions-dispatch.js +86 -0
  334. package/dist/settings/definitions-dispatch.js.map +1 -0
  335. package/dist/settings/dictionaries/index.d.ts +45 -0
  336. package/dist/settings/dictionaries/index.d.ts.map +1 -0
  337. package/dist/settings/dictionaries/index.js +69 -0
  338. package/dist/settings/dictionaries/index.js.map +1 -0
  339. package/dist/settings/dictionaries/settings-dialog.ar.d.ts +3 -0
  340. package/dist/settings/dictionaries/settings-dialog.ar.d.ts.map +1 -0
  341. package/dist/settings/dictionaries/settings-dialog.ar.js +28 -0
  342. package/dist/settings/dictionaries/settings-dialog.ar.js.map +1 -0
  343. package/dist/settings/dictionaries/settings-dialog.bn.d.ts +3 -0
  344. package/dist/settings/dictionaries/settings-dialog.bn.d.ts.map +1 -0
  345. package/dist/settings/dictionaries/settings-dialog.bn.js +28 -0
  346. package/dist/settings/dictionaries/settings-dialog.bn.js.map +1 -0
  347. package/dist/settings/dictionaries/settings-dialog.de.d.ts +3 -0
  348. package/dist/settings/dictionaries/settings-dialog.de.d.ts.map +1 -0
  349. package/dist/settings/dictionaries/settings-dialog.de.js +28 -0
  350. package/dist/settings/dictionaries/settings-dialog.de.js.map +1 -0
  351. package/dist/settings/dictionaries/settings-dialog.es.d.ts +3 -0
  352. package/dist/settings/dictionaries/settings-dialog.es.d.ts.map +1 -0
  353. package/dist/settings/dictionaries/settings-dialog.es.js +28 -0
  354. package/dist/settings/dictionaries/settings-dialog.es.js.map +1 -0
  355. package/dist/settings/dictionaries/settings-dialog.fa.d.ts +3 -0
  356. package/dist/settings/dictionaries/settings-dialog.fa.d.ts.map +1 -0
  357. package/dist/settings/dictionaries/settings-dialog.fa.js +28 -0
  358. package/dist/settings/dictionaries/settings-dialog.fa.js.map +1 -0
  359. package/dist/settings/dictionaries/settings-dialog.fr.d.ts +3 -0
  360. package/dist/settings/dictionaries/settings-dialog.fr.d.ts.map +1 -0
  361. package/dist/settings/dictionaries/settings-dialog.fr.js +28 -0
  362. package/dist/settings/dictionaries/settings-dialog.fr.js.map +1 -0
  363. package/dist/settings/dictionaries/settings-dialog.hi.d.ts +3 -0
  364. package/dist/settings/dictionaries/settings-dialog.hi.d.ts.map +1 -0
  365. package/dist/settings/dictionaries/settings-dialog.hi.js +28 -0
  366. package/dist/settings/dictionaries/settings-dialog.hi.js.map +1 -0
  367. package/dist/settings/dictionaries/settings-dialog.hu.d.ts +3 -0
  368. package/dist/settings/dictionaries/settings-dialog.hu.d.ts.map +1 -0
  369. package/dist/settings/dictionaries/settings-dialog.hu.js +28 -0
  370. package/dist/settings/dictionaries/settings-dialog.hu.js.map +1 -0
  371. package/dist/settings/dictionaries/settings-dialog.id.d.ts +3 -0
  372. package/dist/settings/dictionaries/settings-dialog.id.d.ts.map +1 -0
  373. package/dist/settings/dictionaries/settings-dialog.id.js +28 -0
  374. package/dist/settings/dictionaries/settings-dialog.id.js.map +1 -0
  375. package/dist/settings/dictionaries/settings-dialog.it.d.ts +3 -0
  376. package/dist/settings/dictionaries/settings-dialog.it.d.ts.map +1 -0
  377. package/dist/settings/dictionaries/settings-dialog.it.js +28 -0
  378. package/dist/settings/dictionaries/settings-dialog.it.js.map +1 -0
  379. package/dist/settings/dictionaries/settings-dialog.ja.d.ts +3 -0
  380. package/dist/settings/dictionaries/settings-dialog.ja.d.ts.map +1 -0
  381. package/dist/settings/dictionaries/settings-dialog.ja.js +28 -0
  382. package/dist/settings/dictionaries/settings-dialog.ja.js.map +1 -0
  383. package/dist/settings/dictionaries/settings-dialog.ko.d.ts +3 -0
  384. package/dist/settings/dictionaries/settings-dialog.ko.d.ts.map +1 -0
  385. package/dist/settings/dictionaries/settings-dialog.ko.js +28 -0
  386. package/dist/settings/dictionaries/settings-dialog.ko.js.map +1 -0
  387. package/dist/settings/dictionaries/settings-dialog.pl.d.ts +3 -0
  388. package/dist/settings/dictionaries/settings-dialog.pl.d.ts.map +1 -0
  389. package/dist/settings/dictionaries/settings-dialog.pl.js +28 -0
  390. package/dist/settings/dictionaries/settings-dialog.pl.js.map +1 -0
  391. package/dist/settings/dictionaries/settings-dialog.pt-BR.d.ts +3 -0
  392. package/dist/settings/dictionaries/settings-dialog.pt-BR.d.ts.map +1 -0
  393. package/dist/settings/dictionaries/settings-dialog.pt-BR.js +28 -0
  394. package/dist/settings/dictionaries/settings-dialog.pt-BR.js.map +1 -0
  395. package/dist/settings/dictionaries/settings-dialog.ru.d.ts +3 -0
  396. package/dist/settings/dictionaries/settings-dialog.ru.d.ts.map +1 -0
  397. package/dist/settings/dictionaries/settings-dialog.ru.js +28 -0
  398. package/dist/settings/dictionaries/settings-dialog.ru.js.map +1 -0
  399. package/dist/settings/dictionaries/settings-dialog.th.d.ts +3 -0
  400. package/dist/settings/dictionaries/settings-dialog.th.d.ts.map +1 -0
  401. package/dist/settings/dictionaries/settings-dialog.th.js +28 -0
  402. package/dist/settings/dictionaries/settings-dialog.th.js.map +1 -0
  403. package/dist/settings/dictionaries/settings-dialog.tr.d.ts +3 -0
  404. package/dist/settings/dictionaries/settings-dialog.tr.d.ts.map +1 -0
  405. package/dist/settings/dictionaries/settings-dialog.tr.js +28 -0
  406. package/dist/settings/dictionaries/settings-dialog.tr.js.map +1 -0
  407. package/dist/settings/dictionaries/settings-dialog.uk.d.ts +3 -0
  408. package/dist/settings/dictionaries/settings-dialog.uk.d.ts.map +1 -0
  409. package/dist/settings/dictionaries/settings-dialog.uk.js +28 -0
  410. package/dist/settings/dictionaries/settings-dialog.uk.js.map +1 -0
  411. package/dist/settings/dictionaries/settings-dialog.ur.d.ts +3 -0
  412. package/dist/settings/dictionaries/settings-dialog.ur.d.ts.map +1 -0
  413. package/dist/settings/dictionaries/settings-dialog.ur.js +28 -0
  414. package/dist/settings/dictionaries/settings-dialog.ur.js.map +1 -0
  415. package/dist/settings/dictionaries/settings-dialog.zh-CN.d.ts +3 -0
  416. package/dist/settings/dictionaries/settings-dialog.zh-CN.d.ts.map +1 -0
  417. package/dist/settings/dictionaries/settings-dialog.zh-CN.js +28 -0
  418. package/dist/settings/dictionaries/settings-dialog.zh-CN.js.map +1 -0
  419. package/dist/settings/dictionaries/settings-dialog.zh-TW.d.ts +3 -0
  420. package/dist/settings/dictionaries/settings-dialog.zh-TW.d.ts.map +1 -0
  421. package/dist/settings/dictionaries/settings-dialog.zh-TW.js +28 -0
  422. package/dist/settings/dictionaries/settings-dialog.zh-TW.js.map +1 -0
  423. package/dist/settings/ensure-definitions.d.ts +88 -0
  424. package/dist/settings/ensure-definitions.d.ts.map +1 -0
  425. package/dist/settings/ensure-definitions.js +91 -0
  426. package/dist/settings/ensure-definitions.js.map +1 -0
  427. package/dist/settings/errors.d.ts +36 -0
  428. package/dist/settings/errors.d.ts.map +1 -0
  429. package/dist/settings/errors.js +40 -0
  430. package/dist/settings/errors.js.map +1 -0
  431. package/dist/settings/index.d.ts +37 -0
  432. package/dist/settings/index.d.ts.map +1 -0
  433. package/dist/settings/index.js +36 -0
  434. package/dist/settings/index.js.map +1 -0
  435. package/dist/settings/ports.d.ts +117 -0
  436. package/dist/settings/ports.d.ts.map +1 -0
  437. package/dist/settings/ports.js +2 -0
  438. package/dist/settings/ports.js.map +1 -0
  439. package/dist/settings/purge-service.d.ts +53 -0
  440. package/dist/settings/purge-service.d.ts.map +1 -0
  441. package/dist/settings/purge-service.js +105 -0
  442. package/dist/settings/purge-service.js.map +1 -0
  443. package/dist/settings/repo.memory.d.ts +119 -0
  444. package/dist/settings/repo.memory.d.ts.map +1 -0
  445. package/dist/settings/repo.memory.js +199 -0
  446. package/dist/settings/repo.memory.js.map +1 -0
  447. package/dist/settings/settings.d.ts +124 -0
  448. package/dist/settings/settings.d.ts.map +1 -0
  449. package/dist/settings/settings.js +238 -0
  450. package/dist/settings/settings.js.map +1 -0
  451. package/dist/settings/tool-registrations.d.ts +56 -0
  452. package/dist/settings/tool-registrations.d.ts.map +1 -0
  453. package/dist/settings/tool-registrations.js +240 -0
  454. package/dist/settings/tool-registrations.js.map +1 -0
  455. package/dist/settings/types.d.ts +125 -0
  456. package/dist/settings/types.d.ts.map +1 -0
  457. package/dist/settings/types.js +3 -0
  458. package/dist/settings/types.js.map +1 -0
  459. package/dist/settings/ui-tab-definitions.d.ts +41 -0
  460. package/dist/settings/ui-tab-definitions.d.ts.map +1 -0
  461. package/dist/settings/ui-tab-definitions.js +148 -0
  462. package/dist/settings/ui-tab-definitions.js.map +1 -0
  463. package/dist/settings/write-service.d.ts +314 -0
  464. package/dist/settings/write-service.d.ts.map +1 -0
  465. package/dist/settings/write-service.js +677 -0
  466. package/dist/settings/write-service.js.map +1 -0
  467. package/dist/taxonomy/agent-tools.d.ts +76 -0
  468. package/dist/taxonomy/agent-tools.d.ts.map +1 -0
  469. package/dist/taxonomy/agent-tools.js +178 -0
  470. package/dist/taxonomy/agent-tools.js.map +1 -0
  471. package/dist/taxonomy/content-lookup.d.ts +45 -0
  472. package/dist/taxonomy/content-lookup.d.ts.map +1 -0
  473. package/dist/taxonomy/content-lookup.js +9 -0
  474. package/dist/taxonomy/content-lookup.js.map +1 -0
  475. package/dist/taxonomy/index.d.ts +38 -0
  476. package/dist/taxonomy/index.d.ts.map +1 -0
  477. package/dist/taxonomy/index.js +38 -0
  478. package/dist/taxonomy/index.js.map +1 -0
  479. package/dist/taxonomy/list.d.ts +39 -0
  480. package/dist/taxonomy/list.d.ts.map +1 -0
  481. package/dist/taxonomy/list.js +19 -0
  482. package/dist/taxonomy/list.js.map +1 -0
  483. package/dist/taxonomy/merge-term.d.ts +94 -0
  484. package/dist/taxonomy/merge-term.d.ts.map +1 -0
  485. package/dist/taxonomy/merge-term.js +65 -0
  486. package/dist/taxonomy/merge-term.js.map +1 -0
  487. package/dist/taxonomy/repo.memory.d.ts +160 -0
  488. package/dist/taxonomy/repo.memory.d.ts.map +1 -0
  489. package/dist/taxonomy/repo.memory.js +171 -0
  490. package/dist/taxonomy/repo.memory.js.map +1 -0
  491. package/dist/taxonomy/validation-chain.d.ts +114 -0
  492. package/dist/taxonomy/validation-chain.d.ts.map +1 -0
  493. package/dist/taxonomy/validation-chain.js +152 -0
  494. package/dist/taxonomy/validation-chain.js.map +1 -0
  495. package/dist/taxonomy/write-service.d.ts +387 -0
  496. package/dist/taxonomy/write-service.d.ts.map +1 -0
  497. package/dist/taxonomy/write-service.js +350 -0
  498. package/dist/taxonomy/write-service.js.map +1 -0
  499. package/dist/workspace/agent-tools.d.ts +67 -0
  500. package/dist/workspace/agent-tools.d.ts.map +1 -0
  501. package/dist/workspace/agent-tools.js +103 -0
  502. package/dist/workspace/agent-tools.js.map +1 -0
  503. package/dist/workspace/create.d.ts +116 -0
  504. package/dist/workspace/create.d.ts.map +1 -0
  505. package/dist/workspace/create.js +69 -0
  506. package/dist/workspace/create.js.map +1 -0
  507. package/dist/workspace/delete.d.ts +50 -0
  508. package/dist/workspace/delete.d.ts.map +1 -0
  509. package/dist/workspace/delete.js +24 -0
  510. package/dist/workspace/delete.js.map +1 -0
  511. package/dist/workspace/index.d.ts +27 -0
  512. package/dist/workspace/index.d.ts.map +1 -0
  513. package/dist/workspace/index.js +27 -0
  514. package/dist/workspace/index.js.map +1 -0
  515. package/dist/workspace/repo.memory.d.ts +34 -0
  516. package/dist/workspace/repo.memory.d.ts.map +1 -0
  517. package/dist/workspace/repo.memory.js +50 -0
  518. package/dist/workspace/repo.memory.js.map +1 -0
  519. package/dist/workspace/tool-registrations.d.ts +38 -0
  520. package/dist/workspace/tool-registrations.d.ts.map +1 -0
  521. package/dist/workspace/tool-registrations.js +71 -0
  522. package/dist/workspace/tool-registrations.js.map +1 -0
  523. package/dist/workspace/update.d.ts +52 -0
  524. package/dist/workspace/update.d.ts.map +1 -0
  525. package/dist/workspace/update.js +41 -0
  526. package/dist/workspace/update.js.map +1 -0
  527. package/package.json +149 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for describing the origin of the Work and
141
+ reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Support. While redistributing the Work or
166
+ Derivative Works thereof, You may choose to offer, and charge a
167
+ fee for, acceptance of support, warranty, indemnity, or other
168
+ liability obligations and/or rights consistent with this License.
169
+ However, in accepting such obligations, You may act only on Your
170
+ own behalf and on Your sole responsibility, not on behalf of any
171
+ other Contributor, and only if You agree to indemnify, defend,
172
+ and hold each Contributor harmless for any liability incurred by,
173
+ or claims asserted against, such Contributor by reason of your
174
+ accepting any such warranty or support.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Open Design contributors
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # `@jini-ai/cms`
2
+
3
+ Content-model capability for Jini-hosted products.
4
+
5
+ > **Status: placeholder.** No implementation yet. The package builds, typechecks, and has a green
6
+ > suite so the first port commit lands on working infrastructure rather than discovering it is
7
+ > broken. Created 2026-08-02.
8
+
9
+ ## Layers
10
+
11
+ | subpath | runtime | contents |
12
+ |---|---|---|
13
+ | `.` / `./core` | universal | Content contracts and types, ports, pure domain services, kernel registries. No Express, no `node:*`, no DOM. |
14
+ | `./server` | node | Concrete adapters for the ports in `/core`: SQLite/Postgres repositories, filesystem blob stores, image transformers. |
15
+
16
+ `/server` depends on `/core`. The reverse is a boundary violation — if a core module wants
17
+ something from `/server`, the dependency is backwards and the fix is a port (interface) in core,
18
+ not a widened export.
19
+
20
+ `./server` means *the Node-bound layer*, not *the HTTP server* — same convention as
21
+ `@jini-ai/admin`. HTTP transport is out of scope; Jini has `@jini-ai/http-kit` and
22
+ `@jini-ai/server`.
23
+
24
+ ## Why the split exists before there is any code to split
25
+
26
+ The source of this port is an existing CMS runtime, and the boundary is drawn where a measured defect was.
27
+
28
+ There, the content model and its HTTP composition root share one `src/` tree with nothing
29
+ enforcing a boundary between them. Measured 2026-08-02:
30
+
31
+ - **53 import edges point into the composition root.** 22 of them are domain modules importing a
32
+ 454-line `RouteDeps` type whose first line is `import type { Express } from "express"`.
33
+ - **Git history shows the cost:** no content module could be changed without also changing the
34
+ server. `features/theme` and `server` co-changed in 71% of commits touching the former;
35
+ `identity` and `server` in 45%.
36
+ - **33 of 38 modules formed a single strongly-connected component** — none could be extracted
37
+ without dragging the other 32.
38
+
39
+ The decomposition itself was sound (propagation cost 11%, a textbook Martin instability gradient,
40
+ domain modules that essentially never co-change with each other). What was missing was
41
+ *enforcement*. Full analysis: `ADS-memory/reports/refactors/2026-08-02-module-graph-analysis.md`
42
+ in the originating repo.
43
+
44
+ A package's `exports` map is precisely the enforcement a single `src/` tree cannot provide. A
45
+ consumer of `@jini-ai/cms/core` physically cannot reach a Node adapter, and `/core` physically
46
+ cannot import a transport type, because the module resolver refuses. Porting into this shape from
47
+ the first commit means that failure mode cannot recur here.
48
+
49
+ ## Port inventory
50
+
51
+ Not yet moved. Order matters for the first item only.
52
+
53
+ **Kernel first** — the source repo's `src/core/{ports,commands,events,tools}` — because every domain module
54
+ depends on it.
55
+
56
+ **Then domain modules, in any order.** The source repo's git history shows domain modules essentially never
57
+ co-change with each other, so each can be ported independently without coordination: `post`,
58
+ `taxonomy`, `entries`, `content-types`, `media`, `seo`, `comments`, `forms`, `navigation`,
59
+ `redirects`, `widgets`, `newsletter`, `members`.
60
+
61
+ **Explicitly not ported:**
62
+
63
+ - `src/server/**` — Express composition root; superseded by `@jini-ai/http-kit` / `@jini-ai/server`.
64
+ - Admin UI — `@jini-ai/admin` already owns that surface.
65
+
66
+ When porting tests, `git mv` them rather than re-authoring: re-authoring costs a full pass and
67
+ still loses coverage.
68
+
69
+ ## Scripts
70
+
71
+ ```bash
72
+ pnpm --filter @jini-ai/cms build
73
+ pnpm --filter @jini-ai/cms typecheck
74
+ pnpm --filter @jini-ai/cms test
75
+ ```
76
+
77
+ ## Notes for the first real commit
78
+
79
+ - **Add coverage thresholds.** `vitest.config.ts` deliberately has none — on a placeholder they
80
+ would be either vacuously true or an immediate blocker. Set them against what the first ported
81
+ module actually measures. Siblings run 98–100%.
82
+ - **Delete the layer markers.** `CMS_CORE_LAYER` and `CMS_SERVER_LAYER` exist only to give the
83
+ entry points something real to resolve. They have no purpose once real exports land.
84
+ - **Replace `src/core/__tests__/layers.test.ts`.** It proves the package wiring, not behavior.
@@ -0,0 +1,65 @@
1
+ /**
2
+ * @file REQ-22/REQ-23 — the Collections content-types agent-tool catalog, instantiating
3
+ * a REQ-22 naming/callability convention (mirrors `features/database/agent-tools.ts`'s
4
+ * shape for this domain).
5
+ *
6
+ * Purpose:
7
+ * A static, in-process catalog describing every agent-callable tool this domain exposes and the
8
+ * permission/actor-class rule each one carries. `collections_content_type_list` (admin-UI-backend-
9
+ * gap closure, mirroring `routes/admin/content-types/list.ts`) and `collections_plan_cleanup` are
10
+ * both free reads (`admin.collections.read`, `sideEffects:'none'`) — the former lists the registry,
11
+ * the latter only recomputes and returns an eligibility plan. `collections_execute_cleanup` is the
12
+ * one destructive tool, gated to
13
+ * `admin.collections.manage` and restricted to `confirmer-must-equal-own-delegatedBy`. There is
14
+ * deliberately no `collections_confirm_cleanup` tool and no tool description implying an agent can
15
+ * perform the confirm() step — confirmation of a destructive cleanup is human-UI-only (mirrors
16
+ * the Database library's "Restore is a Recovery tool, not a Database tool" discipline: a lever an agent must
17
+ * never be handed directly).
18
+ *
19
+ * How it relates to the project:
20
+ * The server-side tool filter consumes this catalog to decide which tool names an agent
21
+ * session may even see; `authorize()` and the confirmation-token gateway (`core/gated-mutations`)
22
+ * enforce the actual permission/actor-class checks at call time — this module only declares the
23
+ * catalog shape, it performs no I/O and no enforcement itself.
24
+ *
25
+ * Architectural role:
26
+ * `features/content-types` domain logic. Performs no I/O and no enforcement. Depends only on this
27
+ * package's own `types.ts` (the field-kind enum) and `index-provisioning.ts` (the identifier
28
+ * grammar pattern) — imported so the published JSON Schemas cannot drift from the single sources
29
+ * of those two values, rather than restating either.
30
+ */
31
+ export type AgentToolSideEffect = "none" | "mutates-durable-state" | "mints-token";
32
+ export type AgentToolActorClassRule = "confirmer-must-equal-own-delegatedBy" | "user-only" | "none";
33
+ export interface AgentToolDefinition {
34
+ name: string;
35
+ description: string;
36
+ sideEffects: AgentToolSideEffect;
37
+ authorization: {
38
+ permission: string;
39
+ };
40
+ actorClassRule?: AgentToolActorClassRule;
41
+ /**
42
+ * JSON Schema for this tool's `input`, published to the model via `ToolDescriptor.inputSchema`
43
+ * (`assistant/tool-registrations.ts`). Optional because the two cleanup entries are not wired to
44
+ * handlers yet and their input shape is not designed; `tool-registrations.ts` asserts that every
45
+ * tool it DOES wire has one.
46
+ *
47
+ * These schemas are hand-authored, and enforcement lives elsewhere — `field-defs.ts` for
48
+ * structure and `write-service.ts`'s CIC U-002-B1 chain for the domain rules. That is a
49
+ * deliberate two-artifact design, so the pair is pinned against drift by a fixture corpus in
50
+ * `__tests__/unit/agent-tools.schema-agreement.unit.test.ts`. The two values a schema would
51
+ * otherwise duplicate — the field-kind enum and the identifier grammar — are imported from their
52
+ * single sources rather than restated.
53
+ */
54
+ inputSchema?: Readonly<Record<string, unknown>>;
55
+ }
56
+ /**
57
+ * REQ-22/REQ-23 — the Collections content-types domain's fixed agent-tool catalog.
58
+ *
59
+ * `collections_content_type_list` is ordered first, mirroring `identity/agent-tools.ts`'s
60
+ * "read-tools-first" convention: a model cannot call `update_fields`/`deprecate`/`reactivate`/
61
+ * `tombstone` without a `key` and current `expectedVersion`, and this is the only way to learn
62
+ * either for a content type it did not itself just create.
63
+ */
64
+ export declare const contentTypesAgentToolCatalog: AgentToolDefinition[];
65
+ //# sourceMappingURL=agent-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tools.d.ts","sourceRoot":"","sources":["../../src/content-types/agent-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAKH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,uBAAuB,GAAG,aAAa,CAAC;AAEnF,MAAM,MAAM,uBAAuB,GAAG,sCAAsC,GAAG,WAAW,GAAG,MAAM,CAAC;AAEpG,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,mBAAmB,CAAC;IACjC,aAAa,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,cAAc,CAAC,EAAE,uBAAuB,CAAC;IACzC;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACjD;AA2DD;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,EAAE,mBAAmB,EA+E7D,CAAC"}
@@ -0,0 +1,172 @@
1
+ /**
2
+ * @file REQ-22/REQ-23 — the Collections content-types agent-tool catalog, instantiating
3
+ * a REQ-22 naming/callability convention (mirrors `features/database/agent-tools.ts`'s
4
+ * shape for this domain).
5
+ *
6
+ * Purpose:
7
+ * A static, in-process catalog describing every agent-callable tool this domain exposes and the
8
+ * permission/actor-class rule each one carries. `collections_content_type_list` (admin-UI-backend-
9
+ * gap closure, mirroring `routes/admin/content-types/list.ts`) and `collections_plan_cleanup` are
10
+ * both free reads (`admin.collections.read`, `sideEffects:'none'`) — the former lists the registry,
11
+ * the latter only recomputes and returns an eligibility plan. `collections_execute_cleanup` is the
12
+ * one destructive tool, gated to
13
+ * `admin.collections.manage` and restricted to `confirmer-must-equal-own-delegatedBy`. There is
14
+ * deliberately no `collections_confirm_cleanup` tool and no tool description implying an agent can
15
+ * perform the confirm() step — confirmation of a destructive cleanup is human-UI-only (mirrors
16
+ * the Database library's "Restore is a Recovery tool, not a Database tool" discipline: a lever an agent must
17
+ * never be handed directly).
18
+ *
19
+ * How it relates to the project:
20
+ * The server-side tool filter consumes this catalog to decide which tool names an agent
21
+ * session may even see; `authorize()` and the confirmation-token gateway (`core/gated-mutations`)
22
+ * enforce the actual permission/actor-class checks at call time — this module only declares the
23
+ * catalog shape, it performs no I/O and no enforcement itself.
24
+ *
25
+ * Architectural role:
26
+ * `features/content-types` domain logic. Performs no I/O and no enforcement. Depends only on this
27
+ * package's own `types.ts` (the field-kind enum) and `index-provisioning.ts` (the identifier
28
+ * grammar pattern) — imported so the published JSON Schemas cannot drift from the single sources
29
+ * of those two values, rather than restating either.
30
+ */
31
+ import { IDENTIFIER_GRAMMAR_PATTERN } from "./index-provisioning.js";
32
+ import { CONTENT_TYPE_FIELD_KINDS } from "./types.js";
33
+ /** One entry of a `fields` array, as published to the model. Mirrors what `field-defs.ts` enforces. */
34
+ const FIELD_DEF_SCHEMA = {
35
+ type: "object",
36
+ additionalProperties: false,
37
+ required: ["name", "kind", "required", "queryable"],
38
+ properties: {
39
+ name: {
40
+ type: "string",
41
+ pattern: IDENTIFIER_GRAMMAR_PATTERN,
42
+ description: "Field name. Lowercase letters, digits and underscores; must start with a letter; max 64 characters.",
43
+ },
44
+ kind: {
45
+ type: "string",
46
+ enum: [...CONTENT_TYPE_FIELD_KINDS],
47
+ description: "One of the five supported storage kinds. No other value is accepted.",
48
+ },
49
+ required: { type: "boolean", description: "Whether an entry must supply this field. Must be a real boolean, not a string." },
50
+ queryable: {
51
+ type: "boolean",
52
+ description: "Whether this field gets a queryable index. Must be a real boolean, not a string. At most 20 queryable fields per content type.",
53
+ },
54
+ },
55
+ };
56
+ /** The input shape of the one read tool this catalog carries — it takes no arguments. */
57
+ const NO_INPUT_SCHEMA = {
58
+ type: "object",
59
+ additionalProperties: false,
60
+ required: [],
61
+ properties: {},
62
+ };
63
+ /** The `fields` property shared by `define` and `update_fields`. */
64
+ const FIELDS_SCHEMA = {
65
+ type: "array",
66
+ maxItems: 500,
67
+ items: FIELD_DEF_SCHEMA,
68
+ description: "The COMPLETE field list. Both tools that accept it replace the whole schema — omitted fields are dropped, not preserved.",
69
+ };
70
+ /** `expectedVersion` — present on every tool that mutates an existing content type (OCC). */
71
+ const EXPECTED_VERSION_SCHEMA = {
72
+ type: "integer",
73
+ description: "The content type's current `version`, for optimistic concurrency. Read it first; a stale value is rejected with VersionConflictError rather than overwriting.",
74
+ };
75
+ /** The input schema shared by the three lifecycle transitions, which take exactly `{key, expectedVersion}`. */
76
+ const LIFECYCLE_INPUT_SCHEMA = {
77
+ type: "object",
78
+ additionalProperties: false,
79
+ required: ["key", "expectedVersion"],
80
+ properties: {
81
+ key: { type: "string", pattern: IDENTIFIER_GRAMMAR_PATTERN, description: "The content type's key." },
82
+ expectedVersion: EXPECTED_VERSION_SCHEMA,
83
+ },
84
+ };
85
+ /**
86
+ * REQ-22/REQ-23 — the Collections content-types domain's fixed agent-tool catalog.
87
+ *
88
+ * `collections_content_type_list` is ordered first, mirroring `identity/agent-tools.ts`'s
89
+ * "read-tools-first" convention: a model cannot call `update_fields`/`deprecate`/`reactivate`/
90
+ * `tombstone` without a `key` and current `expectedVersion`, and this is the only way to learn
91
+ * either for a content type it did not itself just create.
92
+ */
93
+ export const contentTypesAgentToolCatalog = [
94
+ {
95
+ name: "collections_content_type_list",
96
+ description: "Lists every content type registered in the workspace — active, deprecated, and tombstoned alike — with its key, label, status, version, and fields. Read-only. Call this before update_fields/deprecate/reactivate/tombstone to find a content type's key and current version.",
97
+ sideEffects: "none",
98
+ authorization: { permission: "admin.collections.read" },
99
+ inputSchema: NO_INPUT_SCHEMA,
100
+ },
101
+ {
102
+ name: "collections_plan_cleanup",
103
+ description: "Recomputes and returns the destructive-removal eligibility plan for a tombstoned content type. Read-only; performs no removal.",
104
+ sideEffects: "none",
105
+ authorization: { permission: "admin.collections.read" },
106
+ },
107
+ {
108
+ name: "collections_execute_cleanup",
109
+ description: "Executes the destructive, atomic removal of a tombstoned content type and all of its scoped rows, using a previously redeemed token.",
110
+ sideEffects: "mutates-durable-state",
111
+ authorization: { permission: "admin.collections.manage" },
112
+ actorClassRule: "confirmer-must-equal-own-delegatedBy",
113
+ },
114
+ {
115
+ name: "collections_content_type_define",
116
+ description: "Registers a new operator-defined content type in the registry.",
117
+ sideEffects: "mutates-durable-state",
118
+ authorization: { permission: "admin.collections.manage" },
119
+ inputSchema: {
120
+ type: "object",
121
+ additionalProperties: false,
122
+ required: ["key", "label", "fields"],
123
+ properties: {
124
+ key: {
125
+ type: "string",
126
+ pattern: IDENTIFIER_GRAMMAR_PATTERN,
127
+ description: "Permanent identifier for the content type. Cannot be changed later. 'post' and 'page' are permanently reserved and will be rejected.",
128
+ },
129
+ label: { type: "string", description: "Human-readable display name shown in the admin UI." },
130
+ fields: FIELDS_SCHEMA,
131
+ },
132
+ },
133
+ },
134
+ {
135
+ name: "collections_content_type_update_fields",
136
+ description: "Full-replaces a content type's field schema.",
137
+ sideEffects: "mutates-durable-state",
138
+ authorization: { permission: "admin.collections.manage" },
139
+ inputSchema: {
140
+ type: "object",
141
+ additionalProperties: false,
142
+ required: ["key", "fields", "expectedVersion"],
143
+ properties: {
144
+ key: { type: "string", pattern: IDENTIFIER_GRAMMAR_PATTERN, description: "The content type's key." },
145
+ fields: FIELDS_SCHEMA,
146
+ expectedVersion: EXPECTED_VERSION_SCHEMA,
147
+ },
148
+ },
149
+ },
150
+ {
151
+ name: "collections_content_type_deprecate",
152
+ description: "Deprecates an active content type, blocking new entry creation only.",
153
+ sideEffects: "mutates-durable-state",
154
+ authorization: { permission: "admin.collections.manage" },
155
+ inputSchema: LIFECYCLE_INPUT_SCHEMA,
156
+ },
157
+ {
158
+ name: "collections_content_type_reactivate",
159
+ description: "Reactivates a deprecated content type back to active.",
160
+ sideEffects: "mutates-durable-state",
161
+ authorization: { permission: "admin.collections.manage" },
162
+ inputSchema: LIFECYCLE_INPUT_SCHEMA,
163
+ },
164
+ {
165
+ name: "collections_content_type_tombstone",
166
+ description: "Tombstones a deprecated content type and tears down its provisioned queryable-field indexes.",
167
+ sideEffects: "mutates-durable-state",
168
+ authorization: { permission: "admin.collections.manage" },
169
+ inputSchema: LIFECYCLE_INPUT_SCHEMA,
170
+ },
171
+ ];
172
+ //# sourceMappingURL=agent-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tools.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,oDAAoD,EAAE;gBAC5F,MAAM,EAAE,aAAa;aACtB;SACF;KACF;IACD;QACE,IAAI,EAAE,wCAAwC;QAC9C,WAAW,EAAE,8CAA8C;QAC3D,WAAW,EAAE,uBAAuB;QACpC,aAAa,EAAE,EAAE,UAAU,EAAE,0BAA0B,EAAE;QACzD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,oBAAoB,EAAE,KAAK;YAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,iBAAiB,CAAC;YAC9C,UAAU,EAAE;gBACV,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,0BAA0B,EAAE,WAAW,EAAE,yBAAyB,EAAE;gBACpG,MAAM,EAAE,aAAa;gBACrB,eAAe,EAAE,uBAAuB;aACzC;SACF;KACF;IACD;QACE,IAAI,EAAE,oCAAoC;QAC1C,WAAW,EAAE,sEAAsE;QACnF,WAAW,EAAE,uBAAuB;QACpC,aAAa,EAAE,EAAE,UAAU,EAAE,0BAA0B,EAAE;QACzD,WAAW,EAAE,sBAAsB;KACpC;IACD;QACE,IAAI,EAAE,qCAAqC;QAC3C,WAAW,EAAE,uDAAuD;QACpE,WAAW,EAAE,uBAAuB;QACpC,aAAa,EAAE,EAAE,UAAU,EAAE,0BAA0B,EAAE;QACzD,WAAW,EAAE,sBAAsB;KACpC;IACD;QACE,IAAI,EAAE,oCAAoC;QAC1C,WAAW,EAAE,8FAA8F;QAC3G,WAAW,EAAE,uBAAuB;QACpC,aAAa,EAAE,EAAE,UAAU,EAAE,0BAA0B,EAAE;QACzD,WAAW,EAAE,sBAAsB;KACpC;CACF,CAAC"}
@@ -0,0 +1,118 @@
1
+ import type { ClockPort } from "../core/ports.js";
2
+ import { CleanupNotEligibleError } from "./errors.js";
3
+ import type { AuthorizeFn } from "./write-service.js";
4
+ import type { Result } from "./types.js";
5
+ /**
6
+ * @file REQ-20/REQ-21 — the destructive cleanup ceremony, instantiating the
7
+ * gated-mutation gateway (`domain="collections"`, `action="cleanup"`) around a tombstoned content
8
+ * type's final, irreversible removal (the disable -> tombstone -> cleanup
9
+ * lifecycle).
10
+ *
11
+ * Purpose:
12
+ * `planCleanup` is the eligibility gate (C-405): a content type must be `status='tombstone'`, its
13
+ * retention window (30 days since `tombstonedAt`, inclusive) must have elapsed, and an
14
+ * `exportReference` must be present — checked in that fixed order, stopping at the first failure
15
+ * (behavior.spec.md §2.3), before the actual gated-mutation `plan()` is ever reached. `executeCleanup`
16
+ * forwards straight to the gated-mutation gateway's own `execute()` (token redemption, actor-class
17
+ * check, plan-staleness re-check all live there — this module does not re-implement them) and
18
+ * only performs the actual multi-table removal after the gateway confirms the token; a rejected
19
+ * gateway call never triggers any local removal (EC-10, INV-07).
20
+ *
21
+ * How it relates to the project:
22
+ * `deps.gateway` in `planCleanup`/`executeCleanup` is intentionally two different narrow port
23
+ * shapes (`plan`-only, `execute`-only) rather than one shared gateway interface — each function
24
+ * only ever calls the one method it needs, matching how a real gated-mutation gateway's `core/gated-mutations`
25
+ * composition would be split per call site.
26
+ *
27
+ * Architectural role:
28
+ * `features/content-types` domain logic, composing `write-service.ts`'s `AuthorizeFn` shape.
29
+ */
30
+ export interface CleanupEligibilityCheckRepoPort {
31
+ findByKey(params: {
32
+ workspaceId: string;
33
+ key: string;
34
+ }): Promise<{
35
+ status: "active" | "deprecated" | "tombstone";
36
+ tombstonedAt: string | null;
37
+ } | null>;
38
+ }
39
+ export interface PlanCleanupGatewayPort {
40
+ plan(input: {
41
+ principalId: string;
42
+ workspaceId: string;
43
+ contentTypeKey: string;
44
+ domain: "collections";
45
+ action: "cleanup";
46
+ }): Promise<Result<{
47
+ planId: string;
48
+ planHash: string;
49
+ }, unknown>>;
50
+ }
51
+ export interface PlanCleanupRequired {
52
+ deps: {
53
+ repo: CleanupEligibilityCheckRepoPort;
54
+ gateway: PlanCleanupGatewayPort;
55
+ clock: ClockPort;
56
+ authorize: AuthorizeFn;
57
+ };
58
+ input: {
59
+ workspaceId: string;
60
+ actorId: string;
61
+ contentTypeKey: string;
62
+ exportReference: string;
63
+ };
64
+ }
65
+ /**
66
+ * REQ-20 — the fixed-order eligibility gate: `status==='tombstone'` -> retention window elapsed
67
+ * (>=30 days since `tombstonedAt`, inclusive lower bound) -> `exportReference` present. Only once
68
+ * all three pass does this call reach the real `gateway.plan()`.
69
+ *
70
+ * @complexity O(1) — one repo read, one date diff, one delegated gateway call at most.
71
+ * @overallScore 100
72
+ */
73
+ export declare function planCleanup(required: PlanCleanupRequired): Promise<Result<{
74
+ planId: string;
75
+ planHash: string;
76
+ }, CleanupNotEligibleError>>;
77
+ export interface ExecuteCleanupGatewayPort {
78
+ execute(input: {
79
+ principalId: string;
80
+ principalKind: string;
81
+ confirmationToken: string;
82
+ contentTypeKey: string;
83
+ }): Promise<Result<unknown, unknown>>;
84
+ }
85
+ export interface CleanupRemovalRepoPort {
86
+ removeContentTypeAndAllScopedRows(params: {
87
+ contentTypeKey: string;
88
+ }): Promise<{
89
+ removedEntryCount: number;
90
+ }>;
91
+ transaction<T>(fn: () => Promise<T>): Promise<T>;
92
+ }
93
+ export interface ExecuteCleanupRequired {
94
+ deps: {
95
+ repo: CleanupRemovalRepoPort;
96
+ gateway: ExecuteCleanupGatewayPort;
97
+ };
98
+ input: {
99
+ principalId: string;
100
+ principalKind: string;
101
+ confirmationToken: string;
102
+ contentTypeKey: string;
103
+ };
104
+ }
105
+ /**
106
+ * REQ-21/INV-07 — forwards straight to the gated-mutation gateway's own `execute()`; only once
107
+ * that confirms (token redeemed, actor-class checked, plan still fresh) does this function perform
108
+ * the actual atomic multi-table removal. A gateway rejection (expired/already-redeemed token,
109
+ * stale plan) is forwarded verbatim and no local removal is ever attempted (EC-10).
110
+ *
111
+ * @complexity O(1) plus one delegated gateway call and, on success, one same-tx multi-table
112
+ * removal.
113
+ * @overallScore 100
114
+ */
115
+ export declare function executeCleanup(required: ExecuteCleanupRequired): Promise<Result<{
116
+ removedEntryCount: number;
117
+ }, un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