@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
@@ -0,0 +1,308 @@
1
+ /**
2
+ * @file The cross-domain half of the agent-tool wiring split: everything a domain's own
3
+ * `tool-registrations.ts` needs that is NOT specific to that domain.
4
+ *
5
+ * Why this file exists at all. Every domain's wiring repeats the same five moves — index its
6
+ * catalog by id, read a handful of fields off `ctx.input`, run the tool's permission check,
7
+ * decorate a shape rejection with the published schema, and then loop the handler map into
8
+ * `ToolRegistration`s behind a build-time risk/schema gate. Those five moves were previously copied
9
+ * per domain inside one shared `assistant/tool-registrations.ts`, which is exactly why that file
10
+ * grew past 2000 lines and why three independent domain slices could not be developed in parallel
11
+ * without colliding on it. Each domain now owns a `tool-registrations.ts` next to its own code and
12
+ * imports the shared moves from here; `assistant/tool-registrations.ts` is reduced to the
13
+ * aggregator that assembles them.
14
+ *
15
+ * The membership test for anything in this file is "would a fourth, not-yet-written domain need
16
+ * it?". Domain-shaped things deliberately stay out: each domain's model-facing `to*View`
17
+ * projections, its dependency-bag builder, its own `DERIVED_RISK_BY_TOOL_ID` slice (a claim about
18
+ * that domain's handlers, so it is maintained where those handlers live), and its unwired-tool set.
19
+ *
20
+ * What is deliberately NOT abstracted here is the authorization DECISION. {@link requireToolPermission}
21
+ * performs a check a caller asks for; it never decides that a check is needed. The "one
22
+ * evaluator" rule is a per-tool fact — some domains self-enforce inside their service function and
23
+ * must NOT be double-checked here, others have no service-layer gate at all and must be checked at
24
+ * the handler — and that judgement stays recorded in the domain file next to the handler it
25
+ * describes, where a reviewer reading the handler can see it.
26
+ */
27
+ import { type ToolHandler, type ToolRegistration } from "@jini-ai/core";
28
+ import { type AuthorizeFn } from "../commands/command.js";
29
+ export type { ToolHandler, ToolRegistration };
30
+ /**
31
+ * Mirrors the `AgentToolSideEffect` union every domain's `agent-tools.ts` declares for itself.
32
+ *
33
+ * `deletes-durable-state` is a distinct member rather than a flavor of `mutates-durable-state`, and
34
+ * the distinction is load-bearing rather than cosmetic. Every gate in this file compares the two
35
+ * classifications for EQUALITY, so the strength of the check is exactly the resolution of the
36
+ * vocabulary: folding a delete into `mutates-durable-state` would let a tool that removes content
37
+ * from every read path carry the same declared risk as one that edits a title, and
38
+ * {@link assertToolIsWirable} would have nothing to object to. A separate member means a delete tool
39
+ * whose declaration drifts toward the milder classification fails the build.
40
+ *
41
+ * Widening this union is safe for the twelve domains that declare their own narrower copy: a
42
+ * narrower union stays assignable to this one, and nothing in the codebase switches exhaustively on
43
+ * the type (verified by grep before adding the member).
44
+ */
45
+ export type AgentToolSideEffect = "none" | "mutates-durable-state" | "deletes-durable-state" | "mints-token";
46
+ /** Mirrors the `AgentToolActorClassRule` union every domain's `agent-tools.ts` declares for itself. */
47
+ export type AgentToolActorClassRule = "confirmer-must-equal-own-delegatedBy" | "user-only" | "none";
48
+ /**
49
+ * The structural minimum this wiring layer needs from a catalog entry, satisfied by every domain's
50
+ * own `AgentToolDefinition` without any of them having to import it.
51
+ *
52
+ * Deliberately a structural supertype rather than a single shared interface the twelve catalogs
53
+ * would all import: those catalogs are domain-owned declarations, and a domain must stay
54
+ * free to tighten its own copy — `identity/agent-tools.ts` makes `inputSchema` REQUIRED because
55
+ * every one of its entries is wired, and adds `authorization.orPermission` because three of its
56
+ * gates are genuinely an OR. Both remain assignable to this. Widening happens here, in the consumer,
57
+ * so no domain's declaration is loosened to accommodate another's.
58
+ */
59
+ export interface WirableToolDefinition {
60
+ name: string;
61
+ description: string;
62
+ sideEffects: AgentToolSideEffect;
63
+ authorization: {
64
+ permission: string;
65
+ orPermission?: string;
66
+ };
67
+ actorClassRule?: AgentToolActorClassRule;
68
+ inputSchema?: Readonly<Record<string, unknown>>;
69
+ }
70
+ /**
71
+ * A domain's independent classification of what its own handlers actually do, keyed by tool id.
72
+ *
73
+ * The point of the type is the point of the pattern: a tool's risk must not be self-declared. A
74
+ * catalog entry that quietly downgraded itself to `sideEffects:'none'` would otherwise become
75
+ * "safe" by editing one word in a file that carries no knowledge of which domain function runs.
76
+ * Each domain's `tool-registrations.ts` maintains its slice next to the handlers it describes, and
77
+ * {@link assertToolIsWirable} refuses to build when the two disagree. An id absent from the map
78
+ * cannot be wired at all, so the conservative default is "refuse", not "assume safe".
79
+ */
80
+ export type DerivedRiskByToolId = ReadonlyMap<string, AgentToolSideEffect>;
81
+ /**
82
+ * Audit provenance stamped onto every revision row a tool handler writes.
83
+ *
84
+ * A constant, not `ctx.principal`'s own kind, and that is the point: `ctx.principal.id` is the
85
+ * HUMAN admin's principal id — the host's proxy reads it from the browser session and stamps it
86
+ * into the run's `contextRef`, and the daemon hands it back to the handler. So a content-type change made by the assistant and one the same person made by clicking
87
+ * through the admin UI record an identical `actorId`. What distinguishes them is the path, and
88
+ * reaching a `tool-registrations.ts` handler IS the agent path — those handlers are only ever
89
+ * invoked by `@jini-ai/daemon`'s `ToolExecutor` during a run. `'agent'` is therefore a fact about
90
+ * the call site, not a default.
91
+ */
92
+ export declare const AGENT_TOOL_PRINCIPAL_KIND: "agent";
93
+ /**
94
+ * Actor-class rules that cannot be honored while no confirmation transport is wired.
95
+ *
96
+ * `confirmer-must-equal-own-delegatedBy` means "a human must confirm this, and the confirmer must
97
+ * be the principal who delegated". A host can only deliver that by building `ToolExecutor` with an
98
+ * `ExecutionDelegate`. Without one, `descriptor.requiresConfirmation` would park the execution on a
99
+ * promise only `resumeConfirmation` can settle — and nothing would call it. The park is also unbounded, because `descriptor.timeoutMs`'s timer is armed only AFTER the
100
+ * confirmation await.
101
+ *
102
+ * So a tool carrying this rule must not be wired at all. Today none is — `collections_execute_cleanup`,
103
+ * `database_execute_migrate_forward`, and `backup_execute_restore` all carry it and all three are
104
+ * declared unwired — which makes this guard a statement of the invariant rather than a fix: a
105
+ * future edit wiring any of them fails the build instead of silently shipping a tool whose stated
106
+ * human-confirmation requirement is unenforceable. When a confirmation transport does land, this
107
+ * constant is the deliberate place to relax.
108
+ */
109
+ export declare const ACTOR_CLASS_RULES_REQUIRING_CONFIRMATION_TRANSPORT: Set<string>;
110
+ /**
111
+ * Indexes a domain catalog by tool id — the single lookup used for descriptors, risk metadata, and
112
+ * schema-bearing error messages.
113
+ *
114
+ * @param catalog - The domain's own `agent-tools.ts` catalog array.
115
+ * @returns The catalog keyed by `name`.
116
+ * @complexity O(n) once at module load, O(1) per subsequent lookup.
117
+ * @overallScore 100
118
+ */
119
+ export declare function indexCatalogById<T extends {
120
+ name: string;
121
+ }>(catalog: readonly T[]): ReadonlyMap<string, T>;
122
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
123
+ /** Narrows `ctx.input` to a record, refusing anything else. The first line of most handlers. */
124
+ export declare function requireInputRecord(input: unknown): Record<string, unknown>;
125
+ export declare function requireString(input: Record<string, unknown>, key: string): string;
126
+ export declare function requireNumber(input: Record<string, unknown>, key: string): number;
127
+ export declare function requireObject(input: Record<string, unknown>, key: string): Record<string, unknown>;
128
+ export declare function optionalString(input: Record<string, unknown>, key: string): string | undefined;
129
+ export declare function optionalNumber(input: Record<string, unknown>, key: string): number | undefined;
130
+ export declare function optionalBoolean(input: Record<string, unknown>, key: string): boolean | undefined;
131
+ /**
132
+ * The reader for a parameterless tool: `ctx.input` may be omitted entirely or passed as `{}`,
133
+ * nothing else. Refusing a populated object is deliberate — silently ignoring keys would teach a
134
+ * model that a filter it invented was applied.
135
+ */
136
+ export declare function requireNoInput(input: unknown): void;
137
+ /**
138
+ * Wraps a `Result<T, Error>`-returning domain call as a value: `ToolExecutor` treats a thrown error
139
+ * as a `'failed'` execution, so an `{ok:false}` becomes a throw rather than a silently-swallowed
140
+ * value.
141
+ */
142
+ export declare function fromResult<T>(fn: () => Promise<{
143
+ ok: true;
144
+ value: T;
145
+ } | {
146
+ ok: false;
147
+ error: Error;
148
+ }>): Promise<T>;
149
+ /**
150
+ * Runs the identical inline `authorize()` check the corresponding admin HTTP route performs, for a
151
+ * tool whose own domain function carries no `authorize()` call to inherit.
152
+ *
153
+ * This is NOT a second evaluator alongside another check — that is exactly the single-evaluator
154
+ * rule's concern. For each tool that
155
+ * calls it, this IS the only gate that tool's execution ever reaches, reached by an identical path
156
+ * to the one a human clicking the same admin route reaches. Domains split cleanly on which kind
157
+ * they are: content-types/Forms/Identity mutations and every Widgets write-service call self-enforce
158
+ * inside the domain function and must NOT call this; Comments/Members/Newsletter/Media/Menus/
159
+ * Database/Recovery gate in the route instead, so their handlers call this in the route's place.
160
+ * Which kind a given tool is stays documented next to that tool's handler, not here.
161
+ *
162
+ * Throws `core/commands`'s `ForbiddenError` — the same class `executeCommand` itself throws — so a
163
+ * tool caller and a route caller see the identical error shape for an identical denial. Throw
164
+ * rather than a 403 body because the caller here is `ToolExecutor`, which reads a thrown error as a
165
+ * failed execution and has no response to write to.
166
+ *
167
+ * @param deps - The `authorize()` evaluator and the workspace the run is scoped to.
168
+ * @param required - Who is asking, for what permission, optionally against which entity.
169
+ * @throws {ForbiddenError} If `authorize()` denies.
170
+ * @complexity O(1) beyond the injected `authorize()` call.
171
+ * @overallScore 100
172
+ */
173
+ export declare function requireToolPermission(deps: {
174
+ authorize: AuthorizeFn;
175
+ workspaceId: string;
176
+ }, required: {
177
+ principalId: string;
178
+ permission: string;
179
+ entityType?: string | undefined;
180
+ entityId?: string | undefined;
181
+ }): Promise<void>;
182
+ /**
183
+ * Re-throws a rejection with the tool's published `inputSchema` appended, so a model can correct
184
+ * its call in a single turn instead of guessing the rest of the shape from one field's complaint.
185
+ *
186
+ * `isShapeRejection` is the domain's own decision and has no default: only errors a DIFFERENT input
187
+ * would fix are decorated. A `ForbiddenError` or a slug conflict is not a shape problem, and
188
+ * appending a schema to one would be noise the model must read past — worse, it would imply the
189
+ * call is retryable when it is not.
190
+ *
191
+ * @param spec.toolId - The tool whose schema is published with the failure.
192
+ * @param spec.catalog - The domain catalog, consulted for that schema.
193
+ * @param spec.isShapeRejection - Predicate selecting the errors worth decorating.
194
+ * @param fn - The domain call.
195
+ * @throws The original error unchanged when it is not a shape rejection, or a decorated `Error`
196
+ * when it is. A tool whose catalog entry publishes no schema still gets the retry-is-futile note.
197
+ * @complexity O(1) beyond the wrapped call, plus the schema's own serialization on the failure path.
198
+ * @overallScore 100
199
+ */
200
+ export declare function withSchemaOnRejection<T>(spec: {
201
+ toolId: string;
202
+ catalog: ReadonlyMap<string, WirableToolDefinition>;
203
+ isShapeRejection: (error: unknown) => boolean;
204
+ }, fn: () => Promise<T>): Promise<T>;
205
+ /**
206
+ * The synchronous half of {@link withSchemaOnRejection}, for a domain that validates BEFORE the
207
+ * call rather than inside it (content-types parses `fields` at a boundary parser, so its rejection
208
+ * never reaches a `try` around a domain call).
209
+ *
210
+ * @returns The `Error` to throw — returned rather than thrown so the caller's own `throw` keeps
211
+ * TypeScript's control-flow narrowing at the call site.
212
+ * @complexity O(s) in the serialized schema size, on the failure path only.
213
+ * @overallScore 100
214
+ */
215
+ export declare function decorateWithSchema(params: {
216
+ toolId: string;
217
+ catalog: ReadonlyMap<string, WirableToolDefinition>;
218
+ message: string;
219
+ }): Error;
220
+ /**
221
+ * Build-time gate on a single tool's risk metadata: refuses to wire a tool whose declared
222
+ * `sideEffects` disagrees with the wiring layer's own {@link DerivedRiskByToolId} classification,
223
+ * whose id that layer has not classified at all, or whose `actorClassRule` needs a confirmation
224
+ * transport that does not exist.
225
+ *
226
+ * Throws rather than warning, and at registration time rather than call time: a metadata
227
+ * inconsistency is a developer error that should stop the daemon booting, not a runtime condition
228
+ * to degrade around.
229
+ *
230
+ * @param params.toolId - The wired tool id.
231
+ * @param params.catalogEntry - Its `agent-tools.ts` entry, the declared side of the comparison.
232
+ * @param params.derivedRisk - The wiring layer's independent classification, the derived side.
233
+ * @throws {Error} If the tool is unclassified, misclassified, or needs missing confirmation support.
234
+ * @complexity O(1) — two map/set lookups.
235
+ * @overallScore 100
236
+ */
237
+ export declare function assertToolIsWirable(params: {
238
+ toolId: string;
239
+ catalogEntry: WirableToolDefinition;
240
+ derivedRisk: DerivedRiskByToolId;
241
+ }): void;
242
+ /**
243
+ * Turns one domain's handler map into `ToolRegistration`s, applying every build-time gate the
244
+ * wiring layer owes each tool, and tripwiring on any catalog entry that is neither wired nor
245
+ * explicitly declared unwired.
246
+ *
247
+ * The tripwire is the reason this is one shared function rather than a loop each domain copies.
248
+ * "Add a catalog entry, forget to wire it" is the failure this layer is meant to make impossible,
249
+ * and a per-domain copy of the check is a per-domain opportunity to get it subtly wrong — one of
250
+ * the copies this replaced omitted the schema assertion, another omitted the unwired-set escape
251
+ * hatch. Silence is never the outcome: an unwired entry either appears in `unwiredToolIds` with a
252
+ * recorded reason next to it, or the build fails.
253
+ *
254
+ * `policy.authorize` is a pass-through `'allow'` for every registration, and that is by design
255
+ * rather than an omission: each tool's permission is evaluated exactly once — inside its domain
256
+ * function for the self-enforcing domains, or by the handler's own {@link requireToolPermission}
257
+ * call for the domains whose gate lives in the route. A check here would be a SECOND evaluator of
258
+ * the same rule, and a `ToolPolicy`-only check would be bypassable by any future non-tool caller of
259
+ * the same domain function, which is precisely why the chokepoint owns the gate.
260
+ *
261
+ * `descriptor.requiresConfirmation` is deliberately never set — see
262
+ * {@link ACTOR_CLASS_RULES_REQUIRING_CONFIRMATION_TRANSPORT} for why that omission is safe rather
263
+ * than a hole.
264
+ *
265
+ * @param spec.domain - Human-readable domain name, used only in failure messages.
266
+ * @param spec.catalogModule - Path of the catalog file, named in the drift message so the failure
267
+ * points at the file to edit.
268
+ * @param spec.catalog - That domain's catalog indexed by id (see {@link indexCatalogById}).
269
+ * @param spec.handlers - Tool id to handler. Registration order follows this map's key order.
270
+ * @param spec.derivedRisk - The domain's own risk classification (see {@link DerivedRiskByToolId}).
271
+ * @param spec.unwiredToolIds - Catalog ids deliberately not wired. Omit when the domain wires its
272
+ * entire catalog, which makes ANY unwired entry a build failure.
273
+ * @throws {Error} On catalog drift, an unclassified/misclassified tool, a wired tool publishing no
274
+ * `inputSchema`, or a catalog entry that is neither wired nor declared unwired.
275
+ * @complexity O(h + c) in the handler and catalog counts.
276
+ * @overallScore 100
277
+ */
278
+ export declare function buildDomainRegistrations(spec: {
279
+ domain: string;
280
+ catalogModule: string;
281
+ catalog: ReadonlyMap<string, WirableToolDefinition>;
282
+ handlers: Record<string, ToolHandler>;
283
+ derivedRisk: DerivedRiskByToolId;
284
+ unwiredToolIds?: ReadonlySet<string>;
285
+ }): ToolRegistration[];
286
+ /**
287
+ * Folds every domain's risk slice into the one map the assistant-level
288
+ * `assertRiskMetadataIsWirable(toolId, catalogEntry)` consults, refusing any id two domains both
289
+ * claim.
290
+ *
291
+ * That refusal is the structural answer to the failure this restructure was prompted by: three
292
+ * domain slices were developed in parallel, each checking its new ids only against the ids that
293
+ * existed before it started, so a name two of them both picked would have been discovered at
294
+ * runtime as a silently double-registered tool. A cross-domain id collision now fails the build.
295
+ * The one real collision in the current catalogs — `backup_create_restore_point`, declared by both
296
+ * Database and Recovery — passes because Recovery declares it unwired and therefore contributes no
297
+ * risk entry for it, which is exactly the resolution this check is meant to force.
298
+ *
299
+ * @param slices - Each domain's name (for the failure message) and its own risk map.
300
+ * @throws {Error} If two domains classify the same tool id.
301
+ * @complexity O(t) in the total classified-tool count.
302
+ * @overallScore 100
303
+ */
304
+ export declare function mergeDerivedRiskMaps(slices: readonly {
305
+ domain: string;
306
+ risk: DerivedRiskByToolId;
307
+ }[]): DerivedRiskByToolId;
308
+ //# sourceMappingURL=registration-kit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registration-kit.d.ts","sourceRoot":"","sources":["../../../src/core/tools/registration-kit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAkB,KAAK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