@jini-ai/core 0.7.3-next.1 → 0.7.3-next.3

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 (558) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +68 -0
  3. package/dist/admin-runtime/admin-http.d.ts +43 -0
  4. package/dist/admin-runtime/admin-http.js +11 -0
  5. package/dist/admin-runtime/index.d.ts +1 -0
  6. package/dist/config/env-schema.d.ts +31 -0
  7. package/dist/config/env-schema.js +29 -0
  8. package/dist/contracts/agents/definition.d.ts +9 -1
  9. package/dist/contracts/agents/index.d.ts +1 -0
  10. package/dist/contracts/agents/inventory.d.ts +29 -0
  11. package/dist/contracts/agents/inventory.js +8 -0
  12. package/dist/contracts/agents/provider-ports.d.ts +117 -0
  13. package/dist/contracts/agents/provider-ports.js +2 -0
  14. package/dist/contracts/agents/proxy-provider-kit.d.ts +122 -0
  15. package/dist/contracts/agents/proxy-provider-kit.js +119 -0
  16. package/dist/contracts/agents/proxy-provider.d.ts +34 -0
  17. package/dist/contracts/agents/proxy-provider.js +2 -0
  18. package/dist/contracts/blob-gc.d.ts +69 -0
  19. package/dist/contracts/blob-gc.js +13 -0
  20. package/dist/contracts/credentials.d.ts +5 -19
  21. package/dist/contracts/desktop-zoom.d.ts +7 -0
  22. package/dist/contracts/desktop-zoom.js +6 -0
  23. package/dist/contracts/events/change-set.d.ts +12 -3
  24. package/dist/contracts/events/command.d.ts +11 -5
  25. package/dist/contracts/events/ports.d.ts +38 -0
  26. package/dist/contracts/events/ports.js +8 -1
  27. package/dist/contracts/events.d.ts +2 -1
  28. package/dist/contracts/events.js +1 -1
  29. package/dist/contracts/execution.d.ts +541 -0
  30. package/dist/contracts/execution.js +2 -0
  31. package/dist/contracts/find-in-page.d.ts +12 -0
  32. package/dist/contracts/find-in-page.js +7 -0
  33. package/dist/contracts/headless/chart-providers.d.ts +12 -0
  34. package/dist/contracts/headless/chart-providers.js +2 -0
  35. package/dist/contracts/headless/chat-attachment.d.ts +21 -0
  36. package/dist/contracts/headless/chat-attachment.js +9 -0
  37. package/dist/contracts/headless/contracts.d.ts +179 -0
  38. package/dist/contracts/headless/contracts.js +2 -0
  39. package/dist/contracts/headless/form-delivery-status.d.ts +35 -0
  40. package/dist/contracts/headless/form-delivery-status.js +2 -0
  41. package/dist/contracts/headless/member-login.d.ts +3 -0
  42. package/dist/contracts/headless/member-login.js +3 -0
  43. package/dist/contracts/headless/operator-locale.d.ts +17 -0
  44. package/dist/contracts/headless/operator-locale.js +2 -0
  45. package/dist/contracts/headless/plugin-export-catalog.d.ts +21 -0
  46. package/dist/contracts/headless/plugin-export-catalog.js +2 -0
  47. package/dist/contracts/headless/plugin-host.d.ts +128 -0
  48. package/dist/contracts/headless/plugin-host.js +2 -0
  49. package/dist/contracts/headless/plugin-install-source.d.ts +82 -0
  50. package/dist/contracts/headless/plugin-install-source.js +12 -0
  51. package/dist/contracts/headless/site-cookie-consent.d.ts +41 -0
  52. package/dist/contracts/headless/site-cookie-consent.js +2 -0
  53. package/dist/contracts/hosted-mcp/admissions.d.ts +125 -0
  54. package/dist/contracts/hosted-mcp/admissions.js +3 -0
  55. package/dist/contracts/hosted-mcp/record.d.ts +7 -2
  56. package/dist/contracts/hosted-mcp.d.ts +1 -0
  57. package/dist/contracts/mail.d.ts +28 -2
  58. package/dist/contracts/mail.js +3 -0
  59. package/dist/contracts/observability.d.ts +15 -0
  60. package/dist/contracts/observability.js +1 -0
  61. package/dist/contracts/run-attempt.d.ts +14 -0
  62. package/dist/contracts/run-attempt.js +7 -0
  63. package/dist/contracts/server/api-error.js +1 -0
  64. package/dist/contracts/server/client-facing-error.d.ts +25 -0
  65. package/dist/contracts/server/client-facing-error.js +21 -0
  66. package/dist/contracts/server/deferred-body.d.ts +65 -0
  67. package/dist/contracts/server/deferred-body.js +2 -0
  68. package/dist/contracts/server/failure-copy.d.ts +19 -0
  69. package/dist/contracts/server/failure-copy.js +26 -0
  70. package/dist/contracts/server/json-route.d.ts +52 -26
  71. package/dist/contracts/server/json-route.js +128 -32
  72. package/dist/contracts/server/request-body.d.ts +12 -0
  73. package/dist/contracts/server/request-body.js +7 -3
  74. package/dist/contracts/server/route-reply.d.ts +32 -0
  75. package/dist/contracts/server/route-reply.js +26 -0
  76. package/dist/contracts/server.d.ts +4 -0
  77. package/dist/contracts/server.js +4 -0
  78. package/dist/contracts/site/admin-sites.d.ts +134 -0
  79. package/dist/contracts/site/admin-sites.js +7 -0
  80. package/dist/contracts/site/admin-surfaces-connections.d.ts +128 -0
  81. package/dist/contracts/site/admin-surfaces-connections.js +2 -0
  82. package/dist/contracts/site/agent-plugins-admin-surfaces.d.ts +218 -0
  83. package/dist/contracts/site/agent-plugins-admin-surfaces.js +2 -0
  84. package/dist/contracts/site/agent-plugins-connect.d.ts +25 -0
  85. package/dist/contracts/site/agent-plugins-connect.js +2 -0
  86. package/dist/contracts/site/agent-plugins-lifecycle.d.ts +151 -0
  87. package/dist/contracts/site/agent-plugins-lifecycle.js +2 -0
  88. package/dist/contracts/site/agent-plugins-manifest.d.ts +41 -0
  89. package/dist/contracts/site/agent-plugins-manifest.js +11 -0
  90. package/dist/contracts/site/agent-runtime.d.ts +110 -0
  91. package/dist/contracts/site/agent-runtime.js +2 -0
  92. package/dist/contracts/site/agentic-core.d.ts +44 -0
  93. package/dist/contracts/site/agentic-core.js +9 -0
  94. package/dist/contracts/site/agentic-dom.d.ts +27 -0
  95. package/dist/contracts/site/agentic-dom.js +2 -0
  96. package/dist/contracts/site/agentic.d.ts +37 -0
  97. package/dist/contracts/site/agentic.js +8 -0
  98. package/dist/contracts/site/analytics.d.ts +81 -0
  99. package/dist/contracts/site/analytics.js +2 -0
  100. package/dist/contracts/site/api-ai-assistant-api-types.d.ts +182 -0
  101. package/dist/contracts/site/api-ai-assistant-api-types.js +2 -0
  102. package/dist/contracts/site/api-connections-hosted-mcp.d.ts +176 -0
  103. package/dist/contracts/site/api-connections-hosted-mcp.js +2 -0
  104. package/dist/contracts/site/api-security-api-types.d.ts +177 -0
  105. package/dist/contracts/site/api-security-api-types.js +2 -0
  106. package/dist/contracts/site/approval-i18n.d.ts +32 -0
  107. package/dist/contracts/site/approval-i18n.js +156 -0
  108. package/dist/contracts/site/asset-transfer-tool-ports.d.ts +54 -0
  109. package/dist/contracts/site/asset-transfer-tool-ports.js +2 -0
  110. package/dist/contracts/site/assistant-host-ports.d.ts +23 -0
  111. package/dist/contracts/site/assistant-host-ports.js +2 -0
  112. package/dist/contracts/site/assistant-mcp-services.d.ts +26 -0
  113. package/dist/contracts/site/assistant-mcp-services.js +8 -0
  114. package/dist/contracts/site/assistant-tool-contributions.d.ts +45 -0
  115. package/dist/contracts/site/assistant-tool-contributions.js +2 -0
  116. package/dist/contracts/site/chat-core.d.ts +93 -0
  117. package/dist/contracts/site/chat-core.js +13 -0
  118. package/dist/contracts/site/client-directives.d.ts +21 -0
  119. package/dist/contracts/site/client-directives.js +8 -0
  120. package/dist/contracts/site/cms-admin-media.d.ts +61 -0
  121. package/dist/contracts/site/cms-admin-media.js +7 -0
  122. package/dist/contracts/site/cms-agent-plugins.d.ts +114 -0
  123. package/dist/contracts/site/cms-agent-plugins.js +17 -0
  124. package/dist/contracts/site/cms-assistant.d.ts +74 -0
  125. package/dist/contracts/site/cms-assistant.js +17 -0
  126. package/dist/contracts/site/cms-core.d.ts +17 -0
  127. package/dist/contracts/site/cms-core.js +12 -0
  128. package/dist/contracts/site/cms-external-mcp.d.ts +206 -0
  129. package/dist/contracts/site/cms-external-mcp.js +13 -0
  130. package/dist/contracts/site/cms-forms.d.ts +192 -0
  131. package/dist/contracts/site/cms-forms.js +15 -0
  132. package/dist/contracts/site/cms-integrations.d.ts +47 -0
  133. package/dist/contracts/site/cms-integrations.js +8 -0
  134. package/dist/contracts/site/cms-mail.d.ts +39 -0
  135. package/dist/contracts/site/cms-mail.js +12 -0
  136. package/dist/contracts/site/cms-media.d.ts +449 -0
  137. package/dist/contracts/site/cms-media.js +3 -0
  138. package/dist/contracts/site/cms-menus.d.ts +109 -0
  139. package/dist/contracts/site/cms-menus.js +13 -0
  140. package/dist/contracts/site/cms-plugins.d.ts +81 -0
  141. package/dist/contracts/site/cms-plugins.js +13 -0
  142. package/dist/contracts/site/cms-publish-content.d.ts +129 -0
  143. package/dist/contracts/site/cms-publish-content.js +13 -0
  144. package/dist/contracts/site/cms-recovery.d.ts +37 -0
  145. package/dist/contracts/site/cms-recovery.js +13 -0
  146. package/dist/contracts/site/cms-seo.d.ts +124 -0
  147. package/dist/contracts/site/cms-seo.js +17 -0
  148. package/dist/contracts/site/cms-settings.d.ts +47 -0
  149. package/dist/contracts/site/cms-settings.js +15 -0
  150. package/dist/contracts/site/cms-sites.d.ts +24 -0
  151. package/dist/contracts/site/cms-sites.js +12 -0
  152. package/dist/contracts/site/cms-system-deploy.d.ts +37 -0
  153. package/dist/contracts/site/cms-system-deploy.js +9 -0
  154. package/dist/contracts/site/cms-trash.d.ts +235 -0
  155. package/dist/contracts/site/cms-trash.js +10 -0
  156. package/dist/contracts/site/cms-workspace.d.ts +14 -0
  157. package/dist/contracts/site/cms-workspace.js +7 -0
  158. package/dist/contracts/site/comments-providers.d.ts +187 -0
  159. package/dist/contracts/site/comments-providers.js +2 -0
  160. package/dist/contracts/site/commerce.d.ts +35 -0
  161. package/dist/contracts/site/commerce.js +12 -0
  162. package/dist/contracts/site/composition-provider-config-source.d.ts +46 -0
  163. package/dist/contracts/site/composition-provider-config-source.js +2 -0
  164. package/dist/contracts/site/content-editor-ports.d.ts +239 -0
  165. package/dist/contracts/site/content-editor-ports.js +2 -0
  166. package/dist/contracts/site/contracts-resources.d.ts +21 -0
  167. package/dist/contracts/site/contracts-resources.js +7 -0
  168. package/dist/contracts/site/cookie-consent-react.d.ts +44 -0
  169. package/dist/contracts/site/cookie-consent-react.js +8 -0
  170. package/dist/contracts/site/cookie-consent.d.ts +100 -0
  171. package/dist/contracts/site/cookie-consent.js +9 -0
  172. package/dist/contracts/site/core-commands.d.ts +66 -0
  173. package/dist/contracts/site/core-commands.js +15 -0
  174. package/dist/contracts/site/core-consent-refusal.d.ts +7 -0
  175. package/dist/contracts/site/core-consent-refusal.js +2 -0
  176. package/dist/contracts/site/core-custom-credential-categories.d.ts +14 -0
  177. package/dist/contracts/site/core-custom-credential-categories.js +7 -0
  178. package/dist/contracts/site/core-public-page-security-headers.d.ts +13 -0
  179. package/dist/contracts/site/core-public-page-security-headers.js +3 -0
  180. package/dist/contracts/site/core-run-events.d.ts +49 -0
  181. package/dist/contracts/site/core-run-events.js +11 -0
  182. package/dist/contracts/site/core-runtime-mode.d.ts +9 -0
  183. package/dist/contracts/site/core-runtime-mode.js +2 -0
  184. package/dist/contracts/site/core-theme-slots.d.ts +31 -0
  185. package/dist/contracts/site/core-theme-slots.js +3 -0
  186. package/dist/contracts/site/credential-project-half.d.ts +18 -0
  187. package/dist/contracts/site/credential-project-half.js +2 -0
  188. package/dist/contracts/site/custom-credential-publish-compatibility.d.ts +11 -0
  189. package/dist/contracts/site/custom-credential-publish-compatibility.js +2 -0
  190. package/dist/contracts/site/daemon-core-rpc.d.ts +114 -0
  191. package/dist/contracts/site/daemon-core-rpc.js +2 -0
  192. package/dist/contracts/site/daemon-http.d.ts +197 -0
  193. package/dist/contracts/site/daemon-http.js +11 -0
  194. package/dist/contracts/site/daemon-surface-exchanges.d.ts +46 -0
  195. package/dist/contracts/site/daemon-surface-exchanges.js +2 -0
  196. package/dist/contracts/site/daemon-tool-audit.d.ts +43 -0
  197. package/dist/contracts/site/daemon-tool-audit.js +9 -0
  198. package/dist/contracts/site/daemon-tool-recovery.d.ts +36 -0
  199. package/dist/contracts/site/daemon-tool-recovery.js +9 -0
  200. package/dist/contracts/site/daemon.d.ts +45 -0
  201. package/dist/contracts/site/daemon.js +2 -0
  202. package/dist/contracts/site/database-introspection.d.ts +46 -0
  203. package/dist/contracts/site/database-introspection.js +2 -0
  204. package/dist/contracts/site/db-data-modules.d.ts +61 -0
  205. package/dist/contracts/site/db-data-modules.js +6 -0
  206. package/dist/contracts/site/deployment-admin.d.ts +74 -0
  207. package/dist/contracts/site/deployment-admin.js +2 -0
  208. package/dist/contracts/site/dev-supervisor-dev-restart.d.ts +26 -0
  209. package/dist/contracts/site/dev-supervisor-dev-restart.js +10 -0
  210. package/dist/contracts/site/devops-deploy.d.ts +77 -0
  211. package/dist/contracts/site/devops-deploy.js +9 -0
  212. package/dist/contracts/site/diagnostics-domain-dns.d.ts +10 -0
  213. package/dist/contracts/site/diagnostics-domain-dns.js +7 -0
  214. package/dist/contracts/site/diagnostics-observability.d.ts +66 -0
  215. package/dist/contracts/site/diagnostics-observability.js +2 -0
  216. package/dist/contracts/site/events-outbox.d.ts +56 -0
  217. package/dist/contracts/site/events-outbox.js +10 -0
  218. package/dist/contracts/site/export-run.d.ts +54 -0
  219. package/dist/contracts/site/export-run.js +9 -0
  220. package/dist/contracts/site/external-mcp-tool-ports.d.ts +28 -0
  221. package/dist/contracts/site/external-mcp-tool-ports.js +2 -0
  222. package/dist/contracts/site/fs-durable-json.d.ts +22 -0
  223. package/dist/contracts/site/fs-durable-json.js +7 -0
  224. package/dist/contracts/site/gated-mutations/watermark.d.ts +44 -0
  225. package/dist/contracts/site/gated-mutations/watermark.js +37 -0
  226. package/dist/contracts/site/gated-mutations-ports.d.ts +45 -0
  227. package/dist/contracts/site/gated-mutations-ports.js +6 -0
  228. package/dist/contracts/site/gated-results.d.ts +17 -0
  229. package/dist/contracts/site/gated-results.js +8 -0
  230. package/dist/contracts/site/headless-assistant-permanent-deletes-policy.d.ts +16 -0
  231. package/dist/contracts/site/headless-assistant-permanent-deletes-policy.js +8 -0
  232. package/dist/contracts/site/hooks-sites-port-hooks.d.ts +151 -0
  233. package/dist/contracts/site/hooks-sites-port-hooks.js +7 -0
  234. package/dist/contracts/site/host-node.d.ts +213 -0
  235. package/dist/contracts/site/host-node.js +2 -0
  236. package/dist/contracts/site/html-region-ports.d.ts +103 -0
  237. package/dist/contracts/site/html-region-ports.js +2 -0
  238. package/dist/contracts/site/http-kit-rate-limit.d.ts +21 -0
  239. package/dist/contracts/site/http-kit-rate-limit.js +8 -0
  240. package/dist/contracts/site/http-kit-settings.d.ts +12 -0
  241. package/dist/contracts/site/http-kit-settings.js +8 -0
  242. package/dist/contracts/site/human-confirm.d.ts +42 -0
  243. package/dist/contracts/site/human-confirm.js +2 -0
  244. package/dist/contracts/site/installed-skill.d.ts +16 -0
  245. package/dist/contracts/site/installed-skill.js +2 -0
  246. package/dist/contracts/site/integrations-api-connections.d.ts +19 -0
  247. package/dist/contracts/site/integrations-api-connections.js +7 -0
  248. package/dist/contracts/site/integrations-credentialed-http.d.ts +16 -0
  249. package/dist/contracts/site/integrations-credentialed-http.js +8 -0
  250. package/dist/contracts/site/legacy-owner-store.d.ts +15 -0
  251. package/dist/contracts/site/legacy-owner-store.js +5 -0
  252. package/dist/contracts/site/lifecycle-boot-lifecycle.d.ts +27 -0
  253. package/dist/contracts/site/lifecycle-boot-lifecycle.js +10 -0
  254. package/dist/contracts/site/lifecycle-host-tools.d.ts +64 -0
  255. package/dist/contracts/site/lifecycle-host-tools.js +2 -0
  256. package/dist/contracts/site/media-provider-contribution.d.ts +118 -0
  257. package/dist/contracts/site/media-provider-contribution.js +3 -0
  258. package/dist/contracts/site/media-providers-catalog.d.ts +42 -0
  259. package/dist/contracts/site/media-providers-catalog.js +7 -0
  260. package/dist/contracts/site/media-tool-ports.d.ts +166 -0
  261. package/dist/contracts/site/media-tool-ports.js +2 -0
  262. package/dist/contracts/site/media-upload-limits.d.ts +6 -0
  263. package/dist/contracts/site/media-upload-limits.js +7 -0
  264. package/dist/contracts/site/nav.d.ts +46 -0
  265. package/dist/contracts/site/nav.js +10 -0
  266. package/dist/contracts/site/oauth-callback-page.d.ts +47 -0
  267. package/dist/contracts/site/oauth-callback-page.js +31 -0
  268. package/dist/contracts/site/packaging-electron.d.ts +20 -0
  269. package/dist/contracts/site/packaging-electron.js +7 -0
  270. package/dist/contracts/site/page-html-store.d.ts +138 -0
  271. package/dist/contracts/site/page-html-store.js +2 -0
  272. package/dist/contracts/site/platform-mail.d.ts +221 -0
  273. package/dist/contracts/site/platform-mail.js +2 -0
  274. package/dist/contracts/site/platform-process.d.ts +23 -0
  275. package/dist/contracts/site/platform-process.js +7 -0
  276. package/dist/contracts/site/platform-server-logs.d.ts +51 -0
  277. package/dist/contracts/site/platform-server-logs.js +15 -0
  278. package/dist/contracts/site/platform-site-dir.d.ts +58 -0
  279. package/dist/contracts/site/platform-site-dir.js +7 -0
  280. package/dist/contracts/site/plugin-directory.d.ts +29 -0
  281. package/dist/contracts/site/plugin-directory.js +2 -0
  282. package/dist/contracts/site/plugins-host.d.ts +92 -0
  283. package/dist/contracts/site/plugins-host.js +2 -0
  284. package/dist/contracts/site/post-author.d.ts +8 -0
  285. package/dist/contracts/site/post-author.js +5 -0
  286. package/dist/contracts/site/post-kind.d.ts +10 -0
  287. package/dist/contracts/site/post-kind.js +2 -0
  288. package/dist/contracts/site/post-revision-lock.d.ts +17 -0
  289. package/dist/contracts/site/post-revision-lock.js +16 -0
  290. package/dist/contracts/site/project-key-attachments.d.ts +78 -0
  291. package/dist/contracts/site/project-key-attachments.js +2 -0
  292. package/dist/contracts/site/protocol-mcp-ui.d.ts +37 -0
  293. package/dist/contracts/site/protocol-mcp-ui.js +12 -0
  294. package/dist/contracts/site/public-origin.d.ts +9 -0
  295. package/dist/contracts/site/public-origin.js +22 -0
  296. package/dist/contracts/site/publish-ports.d.ts +42 -0
  297. package/dist/contracts/site/publish-ports.js +31 -0
  298. package/dist/contracts/site/recovery-operation-lock.d.ts +27 -0
  299. package/dist/contracts/site/recovery-operation-lock.js +11 -0
  300. package/dist/contracts/site/recovery-reconcile-interrupted-migration.d.ts +16 -0
  301. package/dist/contracts/site/recovery-reconcile-interrupted-migration.js +12 -0
  302. package/dist/contracts/site/request-facts.d.ts +28 -0
  303. package/dist/contracts/site/request-facts.js +28 -0
  304. package/dist/contracts/site/routines.d.ts +64 -0
  305. package/dist/contracts/site/routines.js +2 -0
  306. package/dist/contracts/site/sandbox-node-worker.d.ts +15 -0
  307. package/dist/contracts/site/sandbox-node-worker.js +9 -0
  308. package/dist/contracts/site/search.d.ts +181 -0
  309. package/dist/contracts/site/search.js +2 -0
  310. package/dist/contracts/site/secrets-credential-sets.d.ts +117 -0
  311. package/dist/contracts/site/secrets-credential-sets.js +2 -0
  312. package/dist/contracts/site/secrets-credential-token.d.ts +11 -0
  313. package/dist/contracts/site/secrets-credential-token.js +7 -0
  314. package/dist/contracts/site/seo-content-analysis.d.ts +18 -0
  315. package/dist/contracts/site/seo-content-analysis.js +7 -0
  316. package/dist/contracts/site/site-assistant-visitor-tools-management.d.ts +85 -0
  317. package/dist/contracts/site/site-assistant-visitor-tools-management.js +8 -0
  318. package/dist/contracts/site/site-import-history.d.ts +67 -0
  319. package/dist/contracts/site/site-import-history.js +2 -0
  320. package/dist/contracts/site/site-key.d.ts +133 -0
  321. package/dist/contracts/site/site-key.js +9 -0
  322. package/dist/contracts/site/site-serving-gate.d.ts +13 -0
  323. package/dist/contracts/site/site-serving-gate.js +22 -0
  324. package/dist/contracts/site/skill-install.d.ts +17 -0
  325. package/dist/contracts/site/skill-install.js +2 -0
  326. package/dist/contracts/site/skills-install.d.ts +21 -0
  327. package/dist/contracts/site/skills-install.js +7 -0
  328. package/dist/contracts/site/soft-delete.d.ts +13 -0
  329. package/dist/contracts/site/soft-delete.js +13 -0
  330. package/dist/contracts/site/source-control-credentials.d.ts +197 -0
  331. package/dist/contracts/site/source-control-credentials.js +2 -0
  332. package/dist/contracts/site/strict-base64.d.ts +30 -0
  333. package/dist/contracts/site/strict-base64.js +33 -0
  334. package/dist/contracts/site/tool-metadata-approval-policy.d.ts +13 -0
  335. package/dist/contracts/site/tool-metadata-approval-policy.js +2 -0
  336. package/dist/contracts/site/ui-sections.d.ts +27 -0
  337. package/dist/contracts/site/ui-sections.js +13 -0
  338. package/dist/contracts/site/user-management-react.d.ts +276 -0
  339. package/dist/contracts/site/user-management-react.js +9 -0
  340. package/dist/contracts/site/user-management-server.d.ts +104 -0
  341. package/dist/contracts/site/user-management-server.js +2 -0
  342. package/dist/contracts/site/user-management.d.ts +379 -0
  343. package/dist/contracts/site/user-management.js +2 -0
  344. package/dist/contracts/site/vault-context.d.ts +15 -0
  345. package/dist/contracts/site/vault-context.js +6 -0
  346. package/dist/contracts/site/vendor-credentials.d.ts +37 -0
  347. package/dist/contracts/site/vendor-credentials.js +2 -0
  348. package/dist/contracts/site/web-evidence-capture-budget.d.ts +16 -0
  349. package/dist/contracts/site/web-evidence-capture-budget.js +7 -0
  350. package/dist/contracts/site/web-evidence-playwright.d.ts +38 -0
  351. package/dist/contracts/site/web-evidence-playwright.js +9 -0
  352. package/dist/contracts/site/web-screenshot.d.ts +58 -0
  353. package/dist/contracts/site/web-screenshot.js +7 -0
  354. package/dist/contracts/site/widgets-html.d.ts +40 -0
  355. package/dist/contracts/site/widgets-html.js +7 -0
  356. package/dist/contracts/speech-transcription.d.ts +27 -0
  357. package/dist/contracts/speech-transcription.js +8 -0
  358. package/dist/contracts/standing-draft.d.ts +38 -0
  359. package/dist/contracts/standing-draft.js +2 -0
  360. package/dist/contracts/storage/cleanup-preview.d.ts +23 -0
  361. package/dist/contracts/storage/cleanup-preview.js +2 -0
  362. package/dist/contracts/storage/rows.d.ts +6 -2
  363. package/dist/contracts/storage/rows.js +3 -3
  364. package/dist/contracts/storage/sqlite-compaction.d.ts +108 -0
  365. package/dist/contracts/storage/sqlite-compaction.js +7 -0
  366. package/dist/contracts/storage.d.ts +2 -0
  367. package/dist/contracts/tool-result-block.d.ts +21 -0
  368. package/dist/contracts/tool-result-block.js +8 -0
  369. package/dist/errors/catalog.js +2 -2
  370. package/dist/errors/reporter.d.ts +81 -13
  371. package/dist/errors/reporter.js +220 -32
  372. package/dist/errors/route-refusal.d.ts +29 -0
  373. package/dist/errors/route-refusal.js +25 -0
  374. package/dist/errors/testing.d.ts +6 -7
  375. package/dist/errors/testing.js +7 -4
  376. package/dist/extension-capability-vocabulary.d.ts +29 -0
  377. package/dist/extension-capability-vocabulary.js +31 -0
  378. package/dist/gated-mutations/gateway.d.ts +2 -0
  379. package/dist/gated-mutations/gateway.js +4 -1
  380. package/dist/index.d.ts +2 -1
  381. package/dist/index.js +1 -0
  382. package/dist/keyset-cursor.d.ts +25 -0
  383. package/dist/keyset-cursor.js +20 -0
  384. package/dist/native-approval-memory.d.ts +22 -0
  385. package/dist/native-approval-memory.js +32 -0
  386. package/dist/net/public-dns-vocabulary.d.ts +17 -0
  387. package/dist/net/public-dns-vocabulary.js +14 -0
  388. package/dist/object-store.d.ts +7 -0
  389. package/dist/object-store.js +1 -0
  390. package/dist/operator-locale.d.ts +29 -0
  391. package/dist/operator-locale.js +27 -0
  392. package/dist/optimistic-concurrency.d.ts +23 -0
  393. package/dist/origin-validation.d.ts +7 -0
  394. package/dist/origin-validation.js +8 -1
  395. package/dist/primitives/creator-kind.d.ts +27 -0
  396. package/dist/primitives/creator-kind.js +20 -0
  397. package/dist/primitives/index.d.ts +2 -0
  398. package/dist/primitives/index.js +2 -0
  399. package/dist/primitives/lazy-proxy.d.ts +5 -0
  400. package/dist/primitives/lazy-proxy.js +17 -0
  401. package/dist/redaction-collectors.js +60 -39
  402. package/dist/redaction-exact-secrets.js +4 -4
  403. package/dist/redaction-labels.d.ts +3 -1
  404. package/dist/redaction-labels.js +3 -3
  405. package/dist/redaction-patterns.d.ts +3 -1
  406. package/dist/redaction-patterns.js +1 -1
  407. package/dist/redaction-spans.d.ts +5 -1
  408. package/dist/redaction-spans.js +2 -2
  409. package/dist/registration-kit.d.ts +12 -0
  410. package/dist/registration-kit.js +14 -0
  411. package/dist/scheduled-publish.d.ts +57 -0
  412. package/dist/scheduled-publish.js +33 -0
  413. package/dist/settings/ensure-definitions.d.ts +8 -0
  414. package/dist/settings/guarded-reads.d.ts +58 -0
  415. package/dist/settings/guarded-reads.js +48 -0
  416. package/dist/settings/index.d.ts +3 -2
  417. package/dist/settings/index.js +1 -0
  418. package/dist/settings/settings.d.ts +8 -0
  419. package/dist/settings/write-definition-rename.js +2 -2
  420. package/dist/settings/write-definition-retype.js +4 -4
  421. package/dist/settings/write-definition-status.js +4 -4
  422. package/dist/settings/write-service.d.ts +14 -6
  423. package/dist/settings/write-service.js +2 -2
  424. package/dist/surface-exchanges.d.ts +32 -1
  425. package/dist/text/descriptor-i18n.d.ts +4 -1
  426. package/dist/text/descriptor-i18n.js +4 -1
  427. package/dist/text/index.d.ts +3 -0
  428. package/dist/text/index.js +2 -0
  429. package/dist/text/merge-locale-overlays.d.ts +25 -0
  430. package/dist/text/merge-locale-overlays.js +23 -0
  431. package/dist/text/upload-limit-message.d.ts +19 -0
  432. package/dist/text/upload-limit-message.js +29 -0
  433. package/dist/tool-access-change.d.ts +12 -0
  434. package/dist/tool-access-change.js +6 -0
  435. package/dist/tool-metadata/agent-pause.d.ts +21 -0
  436. package/dist/tool-metadata/agent-pause.js +9 -0
  437. package/dist/tool-metadata/agent-plugins.d.ts +72 -0
  438. package/dist/tool-metadata/agent-plugins.js +54 -0
  439. package/dist/tool-metadata/analytics.d.ts +14 -0
  440. package/dist/tool-metadata/analytics.js +17 -0
  441. package/dist/tool-metadata/change-sets.d.ts +24 -0
  442. package/dist/tool-metadata/change-sets.js +19 -0
  443. package/dist/tool-metadata/comments.d.ts +105 -0
  444. package/dist/tool-metadata/comments.js +106 -0
  445. package/dist/tool-metadata/commerce.d.ts +30 -0
  446. package/dist/tool-metadata/commerce.js +11 -0
  447. package/dist/tool-metadata/consent.d.ts +57 -0
  448. package/dist/tool-metadata/consent.js +16 -0
  449. package/dist/tool-metadata/content-duplication.d.ts +13 -0
  450. package/dist/tool-metadata/content-duplication.js +14 -0
  451. package/dist/tool-metadata/content-types.d.ts +74 -0
  452. package/dist/tool-metadata/content-types.js +96 -0
  453. package/dist/tool-metadata/custom-credentials.d.ts +117 -0
  454. package/dist/tool-metadata/custom-credentials.js +105 -0
  455. package/dist/tool-metadata/database-transfer.d.ts +48 -0
  456. package/dist/tool-metadata/database-transfer.js +32 -0
  457. package/dist/tool-metadata/database.d.ts +90 -0
  458. package/dist/tool-metadata/database.js +111 -0
  459. package/dist/tool-metadata/deploy-ops.d.ts +99 -0
  460. package/dist/tool-metadata/deploy-ops.js +96 -0
  461. package/dist/tool-metadata/deployments.d.ts +101 -0
  462. package/dist/tool-metadata/deployments.js +81 -0
  463. package/dist/tool-metadata/domain-dns.d.ts +84 -0
  464. package/dist/tool-metadata/domain-dns.js +99 -0
  465. package/dist/tool-metadata/email-templates.d.ts +54 -0
  466. package/dist/tool-metadata/email-templates.js +41 -0
  467. package/dist/tool-metadata/entries.d.ts +54 -0
  468. package/dist/tool-metadata/entries.js +70 -0
  469. package/dist/tool-metadata/external-mcp.d.ts +86 -0
  470. package/dist/tool-metadata/external-mcp.js +80 -0
  471. package/dist/tool-metadata/files-copy.d.ts +14 -0
  472. package/dist/tool-metadata/files-copy.js +18 -0
  473. package/dist/tool-metadata/forms.d.ts +94 -0
  474. package/dist/tool-metadata/forms.js +117 -0
  475. package/dist/tool-metadata/frontend-control.d.ts +118 -0
  476. package/dist/tool-metadata/frontend-control.js +78 -0
  477. package/dist/tool-metadata/fs-files.d.ts +36 -0
  478. package/dist/tool-metadata/fs-files.js +46 -0
  479. package/dist/tool-metadata/identity.d.ts +184 -0
  480. package/dist/tool-metadata/identity.js +226 -0
  481. package/dist/tool-metadata/image-transform.d.ts +14 -0
  482. package/dist/tool-metadata/image-transform.js +18 -0
  483. package/dist/tool-metadata/mail-status.d.ts +132 -0
  484. package/dist/tool-metadata/mail-status.js +104 -0
  485. package/dist/tool-metadata/media-generation.d.ts +24 -0
  486. package/dist/tool-metadata/media-generation.js +29 -0
  487. package/dist/tool-metadata/media-import.d.ts +34 -0
  488. package/dist/tool-metadata/media-import.js +40 -0
  489. package/dist/tool-metadata/media-video-conversion.d.ts +19 -0
  490. package/dist/tool-metadata/media-video-conversion.js +20 -0
  491. package/dist/tool-metadata/media.d.ts +106 -0
  492. package/dist/tool-metadata/media.js +103 -0
  493. package/dist/tool-metadata/members.d.ts +71 -0
  494. package/dist/tool-metadata/members.js +69 -0
  495. package/dist/tool-metadata/navigation.d.ts +54 -0
  496. package/dist/tool-metadata/navigation.js +71 -0
  497. package/dist/tool-metadata/newsletter.d.ts +190 -0
  498. package/dist/tool-metadata/newsletter.js +246 -0
  499. package/dist/tool-metadata/observability.d.ts +13 -0
  500. package/dist/tool-metadata/observability.js +8 -0
  501. package/dist/tool-metadata/pages.d.ts +47 -0
  502. package/dist/tool-metadata/pages.js +67 -0
  503. package/dist/tool-metadata/permanent-delete.d.ts +139 -0
  504. package/dist/tool-metadata/permanent-delete.js +121 -0
  505. package/dist/tool-metadata/plugin-runtime.d.ts +144 -0
  506. package/dist/tool-metadata/plugin-runtime.js +88 -0
  507. package/dist/tool-metadata/post.d.ts +87 -0
  508. package/dist/tool-metadata/post.js +117 -0
  509. package/dist/tool-metadata/recovery.d.ts +65 -0
  510. package/dist/tool-metadata/recovery.js +78 -0
  511. package/dist/tool-metadata/redirects.d.ts +73 -0
  512. package/dist/tool-metadata/redirects.js +93 -0
  513. package/dist/tool-metadata/routines.d.ts +61 -0
  514. package/dist/tool-metadata/routines.js +40 -0
  515. package/dist/tool-metadata/search.d.ts +49 -0
  516. package/dist/tool-metadata/search.js +33 -0
  517. package/dist/tool-metadata/seo.d.ts +64 -0
  518. package/dist/tool-metadata/seo.js +83 -0
  519. package/dist/tool-metadata/server-logs.d.ts +14 -0
  520. package/dist/tool-metadata/server-logs.js +11 -0
  521. package/dist/tool-metadata/settings.d.ts +90 -0
  522. package/dist/tool-metadata/settings.js +117 -0
  523. package/dist/tool-metadata/site-backup.d.ts +84 -0
  524. package/dist/tool-metadata/site-backup.js +30 -0
  525. package/dist/tool-metadata/site-evidence.d.ts +13 -0
  526. package/dist/tool-metadata/site-evidence.js +10 -0
  527. package/dist/tool-metadata/site-guide.d.ts +18 -0
  528. package/dist/tool-metadata/site-guide.js +15 -0
  529. package/dist/tool-metadata/site-inspection.d.ts +44 -0
  530. package/dist/tool-metadata/site-inspection.js +53 -0
  531. package/dist/tool-metadata/site-update.d.ts +30 -0
  532. package/dist/tool-metadata/site-update.js +22 -0
  533. package/dist/tool-metadata/sites.d.ts +52 -0
  534. package/dist/tool-metadata/sites.js +55 -0
  535. package/dist/tool-metadata/skills.d.ts +13 -0
  536. package/dist/tool-metadata/skills.js +10 -0
  537. package/dist/tool-metadata/source-control.d.ts +26 -0
  538. package/dist/tool-metadata/source-control.js +23 -0
  539. package/dist/tool-metadata/trash.d.ts +32 -0
  540. package/dist/tool-metadata/trash.js +27 -0
  541. package/dist/tool-metadata/visitor-tools.d.ts +49 -0
  542. package/dist/tool-metadata/visitor-tools.js +12 -0
  543. package/dist/tool-metadata/web-screenshot.d.ts +14 -0
  544. package/dist/tool-metadata/web-screenshot.js +23 -0
  545. package/dist/tool-metadata/web.d.ts +14 -0
  546. package/dist/tool-metadata/web.js +21 -0
  547. package/dist/tool-metadata/webhooks.d.ts +65 -0
  548. package/dist/tool-metadata/webhooks.js +77 -0
  549. package/dist/tool-metadata/widgets.d.ts +124 -0
  550. package/dist/tool-metadata/widgets.js +161 -0
  551. package/dist/tool-metadata/workspace.d.ts +43 -0
  552. package/dist/tool-metadata/workspace.js +49 -0
  553. package/dist/tool-read-cards.d.ts +88 -0
  554. package/dist/tool-read-cards.js +158 -0
  555. package/dist/tool-registry.d.ts +25 -0
  556. package/package.json +1382 -6
  557. package/plugin-directory.d.ts +2 -2
  558. package/plugin-directory.js +16 -10
@@ -0,0 +1,379 @@
1
+ import type { UUID } from "../../primitives/ids.js";
2
+ import type { ISODateTime } from "../../primitives/time.js";
3
+ /**
4
+ * @file Identity and RBAC record and repository-port contracts. Additive copy of the type
5
+ * declarations in `@jini-ai/user-management` (`core/types.ts`, `core/ports.ts`) with their full
6
+ * structural closure; that package keeps its identical declarations, its error classes, its runtime
7
+ * policy and its exports until the paired cutover.
8
+ *
9
+ * Type-only definitions for the principal-centric identity & authorization model: every actor
10
+ * (human user, AI agent, API key, system) is rooted as a `PrincipalRecord`; humans get RBAC
11
+ * (`roles` -> `policies` -> permissions); machines get direct policy grants (`principal_policies`).
12
+ * Dependency-inversion seams (port/adapter rule-of-two) for the identity/RBAC tables, plus
13
+ * `PasswordHasherPort` — the hashing seam behind which argon2id lives.
14
+ *
15
+ * `authorize()` itself is deliberately NOT a port (one evaluator). Interfaces and types only — no
16
+ * feature logic.
17
+ */
18
+ /**
19
+ * Every actor is one of these. `member` is a host's public-site sign-up (a front-end account, not an
20
+ * operator): it may hold a principal row for identity and audit, but `principalKindMayExercisePermission`
21
+ * (`principal-kind-policy.ts`) bars it from every operator permission, so `authorize()` denies it
22
+ * whatever grants reach it.
23
+ */
24
+ export type PrincipalKind = "user" | "agent" | "api_key" | "system" | "member";
25
+ /** Disable-only lifecycle — there is no hard-delete state. See docs/decisions/DR-001-identity-and-session-boundary.md. */
26
+ export type PrincipalStatus = "active" | "disabled";
27
+ /**
28
+ * Root identity row for every actor. `change_set.actorId` references
29
+ * a principal by composite `(workspaceId, id)`.
30
+ * See docs/decisions/DR-001-identity-and-session-boundary.md.
31
+ */
32
+ export interface PrincipalRecord {
33
+ id: UUID;
34
+ workspaceId: UUID;
35
+ kind: PrincipalKind;
36
+ displayName: string;
37
+ status: PrincipalStatus;
38
+ disabledAt?: ISODateTime | undefined;
39
+ createdAt: ISODateTime;
40
+ }
41
+ /**
42
+ * Human auth credentials. A `UserRecord` is only ever created together with a
43
+ * NEW `kind='user'` principal in the same transaction — never
44
+ * attached to a pre-existing principal. `username` is unique per workspace,
45
+ * compared case-insensitively and Unicode-NFC-normalized (behavior.spec §5).
46
+ * See docs/decisions/DR-001-identity-and-session-boundary.md.
47
+ */
48
+ export interface UserRecord {
49
+ principalId: UUID;
50
+ workspaceId: UUID;
51
+ /** Stored pre-normalized (NFC + lowercase) so lookups are direct equality. */
52
+ username: string;
53
+ email?: string | undefined;
54
+ /** argon2id hash; the raw password is never stored. See docs/decisions/DR-001-identity-and-session-boundary.md. */
55
+ passwordHash: string;
56
+ lastLoginAt?: ISODateTime | undefined;
57
+ /** Edit basis for optimistic concurrency: 1 on create, +1 on each versioned save. Never a credential. */
58
+ version: number;
59
+ }
60
+ /**
61
+ * Revocable server-side session. `tokenHash` is a hash of the opaque
62
+ * bearer value carried by the `HttpOnly`/`SameSite=Strict` cookie; the raw
63
+ * token is never persisted. Lifetime is an **absolute** expiry fixed
64
+ * at creation (behavior.spec §4) — no sliding renewal in v1.
65
+ * See docs/decisions/DR-001-identity-and-session-boundary.md.
66
+ */
67
+ export interface SessionRecord {
68
+ id: UUID;
69
+ workspaceId: UUID;
70
+ principalId: UUID;
71
+ tokenHash: string;
72
+ createdAt: ISODateTime;
73
+ expiresAt: ISODateTime;
74
+ revokedAt?: ISODateTime;
75
+ ip?: string | undefined;
76
+ userAgent?: string | undefined;
77
+ }
78
+ /** Named RBAC role. Built-ins are seeded `isBuiltin=true`, immutable. See docs/decisions/DR-001-identity-and-session-boundary.md. */
79
+ export interface RoleRecord {
80
+ id: UUID;
81
+ workspaceId: UUID;
82
+ name: string;
83
+ isBuiltin: boolean;
84
+ /** Edit basis for optimistic concurrency: 1 on create, +1 on each versioned save. Never a credential. */
85
+ version: number;
86
+ }
87
+ /**
88
+ * A permission bundle. `isFrozen` is reserved for the API-key
89
+ * issuance-snapshot mechanism — out of scope this pass, so
90
+ * every policy built here is `isFrozen=false`; the field exists so the schema
91
+ * is additive-ready, not a later repaint.
92
+ * See docs/decisions/DR-001-identity-and-session-boundary.md.
93
+ */
94
+ export interface PolicyRecord {
95
+ id: UUID;
96
+ workspaceId: UUID;
97
+ name: string;
98
+ description?: string | undefined;
99
+ isBuiltin: boolean;
100
+ isFrozen: boolean;
101
+ /** Edit basis for optimistic concurrency: 1 on create, +1 on each versioned save. Never a credential. */
102
+ version: number;
103
+ }
104
+ /**
105
+ * A single permission carried by a policy. `resourceType`
106
+ * null = unscoped; non-null = matches only when it equals `context.entityType`
107
+ * `constraintJson` non-null and uninterpretable => fail-closed
108
+ * deny — the v1 evaluator interprets no constraint shape, so any
109
+ * non-null value here is treated as "cannot interpret."
110
+ * See docs/decisions/DR-001-identity-and-session-boundary.md.
111
+ */
112
+ export interface PolicyPermissionRecord {
113
+ id: UUID;
114
+ workspaceId: UUID;
115
+ policyId: UUID;
116
+ /** Dotted catalog permission string, or `"*"` (owner built-in policy only). */
117
+ permission: string;
118
+ resourceType?: string | null;
119
+ constraintJson?: string | null;
120
+ }
121
+ /** Role -> policy join. Not user-writable in v1 — seed-only rows. See docs/decisions/DR-001-identity-and-session-boundary.md. */
122
+ export interface RolePolicyRecord {
123
+ id: UUID;
124
+ workspaceId: UUID;
125
+ roleId: UUID;
126
+ policyId: UUID;
127
+ }
128
+ /** Principal -> role join, the human grant path. See docs/decisions/DR-001-identity-and-session-boundary.md. */
129
+ export interface PrincipalRoleRecord {
130
+ id: UUID;
131
+ workspaceId: UUID;
132
+ principalId: UUID;
133
+ roleId: UUID;
134
+ }
135
+ /** Principal -> policy direct grant, the machine grant path. See docs/decisions/DR-001-identity-and-session-boundary.md. */
136
+ export interface PrincipalPolicyRecord {
137
+ id: UUID;
138
+ workspaceId: UUID;
139
+ principalId: UUID;
140
+ policyId: UUID;
141
+ }
142
+ export interface PrincipalRepoPort {
143
+ findById(required: {
144
+ workspaceId: UUID;
145
+ id: UUID;
146
+ }): Promise<PrincipalRecord | null>;
147
+ list(required: {
148
+ workspaceId: UUID;
149
+ }): Promise<PrincipalRecord[]>;
150
+ save(record: PrincipalRecord): Promise<void>;
151
+ /** Atomically insert by (workspaceId, id), or return the unchanged existing row.
152
+ * Durable adapters must enforce uniqueness in storage across connections/processes.
153
+ * Optional for existing hosts; ensurePrincipal fails closed without this capability. */
154
+ insertIfAbsent?(required: {
155
+ record: PrincipalRecord;
156
+ }, optional?: Record<string, never>): Promise<PrincipalRecord>;
157
+ }
158
+ export interface UserRepoPort {
159
+ findByPrincipalId(required: {
160
+ workspaceId: UUID;
161
+ principalId: UUID;
162
+ }): Promise<UserRecord | null>;
163
+ /** `username` must already be normalized (NFC + lowercase) by the caller. */
164
+ findByUsername(required: {
165
+ workspaceId: UUID;
166
+ username: string;
167
+ }): Promise<UserRecord | null>;
168
+ /** All `users` rows in the workspace (Users admin screen listing). Not paginated in v1 — matches `PrincipalRepoPort.list`/`RoleRepoPort.list`/`PolicyRepoPort.list`. */
169
+ list(required: {
170
+ workspaceId: UUID;
171
+ }): Promise<UserRecord[]>;
172
+ /** Whole-row save. With `expectedVersion`, refuses (RecordVersionConflictError) unless the stored user is still at that version — the editor's basis. Create/seed passes none. */
173
+ save(record: UserRecord, optional?: {
174
+ expectedVersion?: number;
175
+ }): Promise<void>;
176
+ /** Set only `lastLoginAt` on an existing row (no-op when gone), so a concurrent password reset is never reverted by a stale snapshot. */
177
+ recordLogin(required: {
178
+ workspaceId: UUID;
179
+ principalId: UUID;
180
+ lastLoginAt: ISODateTime;
181
+ }): Promise<void>;
182
+ }
183
+ export interface SessionRepoPort {
184
+ findById(required: {
185
+ workspaceId: UUID;
186
+ id: UUID;
187
+ }): Promise<SessionRecord | null>;
188
+ findByTokenHash(required: {
189
+ workspaceId: UUID;
190
+ tokenHash: string;
191
+ }): Promise<SessionRecord | null>;
192
+ save(record: SessionRecord): Promise<void>;
193
+ /** Server-side revocation (logout, disable-cascade). Idempotent. */
194
+ revoke(required: {
195
+ workspaceId: UUID;
196
+ id: UUID;
197
+ revokedAt: ISODateTime;
198
+ }): Promise<void>;
199
+ /** — every session bound to a principal, active or not (`RESET_USER_PASSWORD`
200
+ * revokes each active one; unlike `DISABLE_PRINCIPAL`, which needs no session enumeration because
201
+ * `validateSession`'s status check already invalidates every session for a disabled principal).
202
+ * See docs/decisions/DR-002-grant-authority-and-admin-safety.md.
203
+ */
204
+ listByPrincipalId(required: {
205
+ workspaceId: UUID;
206
+ principalId: UUID;
207
+ }): Promise<SessionRecord[]>;
208
+ }
209
+ export interface RoleRepoPort {
210
+ findById(required: {
211
+ workspaceId: UUID;
212
+ id: UUID;
213
+ }): Promise<RoleRecord | null>;
214
+ findByName(required: {
215
+ workspaceId: UUID;
216
+ name: string;
217
+ }): Promise<RoleRecord | null>;
218
+ list(required: {
219
+ workspaceId: UUID;
220
+ }): Promise<RoleRecord[]>;
221
+ /** Whole-row save. With `expectedVersion`, refuses (RecordVersionConflictError) unless the stored role is still at that version — the editor's basis. Create/seed passes none. */
222
+ save(record: RoleRecord, optional?: {
223
+ expectedVersion?: number;
224
+ }): Promise<void>;
225
+ /**. Callers must apply the is_builtin + zero-reference guards
226
+ * themselves (see `admin-crud-service.ts`'s `deleteRole`) — this method performs the row deletion
227
+ * only, no business rule (mirrors `WorkspaceRepoPort.delete`'s convention).
228
+ * See docs/decisions/DR-002-grant-authority-and-admin-safety.md.
229
+ */
230
+ delete(required: {
231
+ workspaceId: UUID;
232
+ id: UUID;
233
+ }): Promise<void>;
234
+ }
235
+ export interface PolicyRepoPort {
236
+ findById(required: {
237
+ workspaceId: UUID;
238
+ id: UUID;
239
+ }): Promise<PolicyRecord | null>;
240
+ findByName(required: {
241
+ workspaceId: UUID;
242
+ name: string;
243
+ }): Promise<PolicyRecord | null>;
244
+ list(required: {
245
+ workspaceId: UUID;
246
+ }): Promise<PolicyRecord[]>;
247
+ /** Whole-row save. With `expectedVersion`, refuses (RecordVersionConflictError) unless the stored policy is still at that version — the editor's basis. Create/seed passes none. */
248
+ save(record: PolicyRecord, optional?: {
249
+ expectedVersion?: number;
250
+ }): Promise<void>;
251
+ /**. See `RoleRepoPort.delete`'s doc — same "no business rule here"
252
+ * contract.
253
+ * See docs/decisions/DR-002-grant-authority-and-admin-safety.md.
254
+ */
255
+ delete(required: {
256
+ workspaceId: UUID;
257
+ id: UUID;
258
+ }): Promise<void>;
259
+ }
260
+ export interface PolicyPermissionRepoPort {
261
+ listByPolicyId(required: {
262
+ workspaceId: UUID;
263
+ policyId: UUID;
264
+ }): Promise<PolicyPermissionRecord[]>;
265
+ save(record: PolicyPermissionRecord): Promise<void>;
266
+ /** — cascades a `DELETE_POLICY` to the deleted policy's OWN
267
+ * `policy_permissions` rows only (never a different policy's rows, state.spec §3's `DELETE_POLICY`
268
+ * row).
269
+ * See docs/decisions/DR-002-grant-authority-and-admin-safety.md.
270
+ */
271
+ deleteByPolicyId(required: {
272
+ workspaceId: UUID;
273
+ policyId: UUID;
274
+ }): Promise<void>;
275
+ /** — removes ONE permission row by its own id, the inverse of `save`. Deliberately keyed by
276
+ * `id` alone (plus the workspace scope every port call carries): `removePolicyPermission` proves
277
+ * the row belongs to the named policy via `listByPolicyId` BEFORE calling this, so a
278
+ * policy-scoped delete signature here would only duplicate a check the caller has already done
279
+ * against rows it is holding.
280
+ * See docs/decisions/DR-002-grant-authority-and-admin-safety.md.
281
+ */
282
+ delete(required: {
283
+ workspaceId: UUID;
284
+ id: UUID;
285
+ }): Promise<void>;
286
+ }
287
+ export interface RolePolicyRepoPort {
288
+ listByRoleId(required: {
289
+ workspaceId: UUID;
290
+ roleId: UUID;
291
+ }): Promise<RolePolicyRecord[]>;
292
+ save(record: RolePolicyRecord): Promise<void>;
293
+ /** — the policy-side reference check `deletePolicy` needs (: no
294
+ * writer creates such a row for a non-built-in policy today, but the guard checks for real —
295
+ * defensive against that constraint ever being lifted, not a assumption baked into the guard).
296
+ * See docs/decisions/DR-002-grant-authority-and-admin-safety.md.
297
+ */
298
+ listByPolicyId(required: {
299
+ workspaceId: UUID;
300
+ policyId: UUID;
301
+ }): Promise<RolePolicyRecord[]>;
302
+ }
303
+ export interface PrincipalRoleRepoPort {
304
+ listByPrincipalId(required: {
305
+ workspaceId: UUID;
306
+ principalId: UUID;
307
+ }): Promise<PrincipalRoleRecord[]>;
308
+ save(record: PrincipalRoleRecord): Promise<void>;
309
+ /** — the reference check `deleteRole` needs. See docs/decisions/DR-002-grant-authority-and-admin-safety.md. */
310
+ listByRoleId(required: {
311
+ workspaceId: UUID;
312
+ roleId: UUID;
313
+ }): Promise<PrincipalRoleRecord[]>;
314
+ }
315
+ export interface PrincipalPolicyRepoPort {
316
+ listByPrincipalId(required: {
317
+ workspaceId: UUID;
318
+ principalId: UUID;
319
+ }): Promise<PrincipalPolicyRecord[]>;
320
+ save(record: PrincipalPolicyRecord): Promise<void>;
321
+ /** — the reference check `deletePolicy` needs; this is the
322
+ * reference source that matters in practice (`ATTACH_POLICY` does write these rows for
323
+ * non-built-in policies, unlike `role_policies`).
324
+ * See docs/decisions/DR-002-grant-authority-and-admin-safety.md.
325
+ */
326
+ listByPolicyId(required: {
327
+ workspaceId: UUID;
328
+ policyId: UUID;
329
+ }): Promise<PrincipalPolicyRecord[]>;
330
+ }
331
+ /**
332
+ * Atomic identity work over the repositories bound to this port. Commit on resolution;
333
+ * roll back every write on rejection. Guard reads and all competing grant/status/reference
334
+ * writers must be serialized within the workspace, including writers outside a transaction.
335
+ * SQL adapters must bind these repositories to the transaction connection and acquire locks
336
+ * sufficient to prevent phantom owner/reference rows; a bare read-committed transaction is
337
+ * insufficient. Nested runs join the current unit of work.
338
+ */
339
+ export interface IdentityTransactionPort {
340
+ run<T>(required: {
341
+ workspaceId: UUID;
342
+ execute: () => Promise<T>;
343
+ }): Promise<T>;
344
+ }
345
+ /**
346
+ * The nine identity repo ports, bagged for the functions in this library that
347
+ * need several of them at once (`authorize`, seeding, the auth service).
348
+ * Composition roots (`server/app.ts` / `server/deps.ts`) assemble this from
349
+ * individual `RouteDeps` fields.
350
+ */
351
+ export interface IdentityRepos {
352
+ /** Required by guarded mutations; omission fails closed rather than weakening isolation. */
353
+ transactions: IdentityTransactionPort;
354
+ principals: PrincipalRepoPort;
355
+ users: UserRepoPort;
356
+ sessions: SessionRepoPort;
357
+ roles: RoleRepoPort;
358
+ policies: PolicyRepoPort;
359
+ policyPermissions: PolicyPermissionRepoPort;
360
+ rolePolicies: RolePolicyRepoPort;
361
+ principalRoles: PrincipalRoleRepoPort;
362
+ principalPolicies: PrincipalPolicyRepoPort;
363
+ }
364
+ /**
365
+ * Password hashing seam. `argon2` (native argon2id bindings) is the
366
+ * v1 adapter — see `hasher.ts`. Declared as a port per the spec's own
367
+ * "rule-of-two candidate" language; only one real adapter exists this pass.
368
+ * See docs/decisions/DR-002-grant-authority-and-admin-safety.md.
369
+ */
370
+ export interface PasswordHasherPort {
371
+ hash(required: {
372
+ password: string;
373
+ }): Promise<string>;
374
+ verify(required: {
375
+ hash: string;
376
+ password: string;
377
+ }): Promise<boolean>;
378
+ }
379
+ //# sourceMappingURL=user-management.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=user-management.js.map
@@ -0,0 +1,15 @@
1
+ export declare function authorizeScopedVaultContext({ context, scope }: {
2
+ readonly context: {
3
+ readonly workspaceId?: string;
4
+ readonly kind: string;
5
+ readonly ownerKey: string;
6
+ readonly principalId: string | null;
7
+ readonly binding?: string | null;
8
+ };
9
+ readonly scope: {
10
+ readonly workspaceId?: string;
11
+ readonly kind: string;
12
+ readonly ownerKey: string;
13
+ };
14
+ }, _optional?: {}): Promise<void>;
15
+ //# sourceMappingURL=vault-context.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { VaultError } from '../vault.js';
2
+ export async function authorizeScopedVaultContext({ context, scope }, _optional = {}) {
3
+ if (("workspaceId" in scope && context.workspaceId !== scope.workspaceId) || context.kind !== scope.kind || context.ownerKey !== scope.ownerKey || context.principalId !== null || ("binding" in context && context.binding !== null))
4
+ throw new VaultError({ code: 'context' });
5
+ }
6
+ //# sourceMappingURL=vault-context.js.map
@@ -0,0 +1,37 @@
1
+ import type { VaultRepoPort, VendorCredentialSetRecord as JiniVendorRecord, VendorCredentialSetRepoPort as JiniVendorRepo } from "../vault.js";
2
+ import type { CredentialTokenHint } from "./secrets-credential-token.js";
3
+ import type { CredentialProjectHalf } from "./credential-project-half.js";
4
+ export interface VendorCredentialSetRecord extends JiniVendorRecord {
5
+ readonly tokenHint?: CredentialTokenHint | null;
6
+ }
7
+ /** Workspace-scoped persistence for {@link VendorCredentialSetRecord} (ADR-007 §1).
8
+ *
9
+ * `insert`/`update`/`delete` own the `isDefault` invariant: if the written `record.isDefault` is `true`,
10
+ * `insert`/`update` atomically clear `isDefault` on every OTHER row sharing `(workspaceId, vendorId)` in
11
+ * the SAME transaction as the write, and `delete` promotes the group's most-recently-updated remaining
12
+ * row if the deleted row WAS the default. The store's write path decides the VALUE of `isDefault`
13
+ * (e.g. "first row for a vendor auto-defaults"); this port only guarantees the group-wide invariant
14
+ * once that value is decided. A `null` default is still treated as "no default" defensively (e.g. a
15
+ * hand-edited row). `delete` is a no-op for a missing row (the route's 204, idempotent). Collections
16
+ * are small (bounded by how many connections a human saves), so no pagination/cap.
17
+ *
18
+ * `updateAccountLabel` is a TARGETED single-field write, deliberately not `update()`'s full-row
19
+ * replace: healing an account label after a verify must never disturb `sealed`, `isDefault`,
20
+ * `tokenTail`, or `updatedAt` (a verify is a read of the provider, not a change to the credential).
21
+ * No-op for a missing row: the human-gated verify route has no reason to treat a row that vanished
22
+ * mid-request as anything but "nothing to heal". */
23
+ export interface VendorCredentialSetRepoPort extends JiniVendorRepo {
24
+ readonly vault?: VaultRepoPort;
25
+ /** The project store this site's rows fall back to (`publish-credentials/store.ts`'s scope rule: site
26
+ * first, then project; new rows go to the project unless saved "only for this site"). Absent = site only. */
27
+ readonly project?: VendorCredentialProjectScope;
28
+ }
29
+ /**
30
+ * The project store's half of the vendor-credential store (owner 2026-10-25: keys save to the project
31
+ * by default). The same repo shape over the project's own `secrets_vault`, opened with the project's
32
+ * keyring and sealer, under the project's workspace id. Attached by the composition root only where a
33
+ * project store opened; Fly/production has none (the project is the site there).
34
+ */
35
+ export interface VendorCredentialProjectScope extends CredentialProjectHalf<VendorCredentialSetRepoPort> {
36
+ }
37
+ //# sourceMappingURL=vendor-credentials.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=vendor-credentials.js.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @file Host-supplied screenshot capture time limits. Types only; this module owns the
3
+ * declarations that `@jini-ai/diagnostics/web-evidence/capture-budget` (`capture-budget.ts`) used
4
+ * to declare. That package imports them from here and keeps its runtime values.
5
+ */
6
+ /** Host values. There are no defaults on purpose: the cap and the reserve belong to the host. */
7
+ export interface CaptureBudgetLimits {
8
+ baseMs: number;
9
+ /** Extra time a full-page scroll needs. */
10
+ fullPageMs: number;
11
+ /** The total never exceeds this. */
12
+ capMs: number;
13
+ /** Time kept at the end of the capture for the fallback on the current page. */
14
+ reserveMs: number;
15
+ }
16
+ //# sourceMappingURL=web-evidence-capture-budget.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @file Host-supplied screenshot capture time limits. Types only; this module owns the
3
+ * declarations that `@jini-ai/diagnostics/web-evidence/capture-budget` (`capture-budget.ts`) used
4
+ * to declare. That package imports them from here and keeps its runtime values.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=web-evidence-capture-budget.js.map
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @file Screenshot-browser request routing: the routed-request slice, routing decisions and the
3
+ * per-capture router report. Types only; this module owns the declarations that
4
+ * `@jini-ai/diagnostics/web-evidence/playwright` (`request-guard.ts`) used to declare. That package
5
+ * imports them from here and keeps its runtime values. The Buffer-carrying shapes (`RouteLike`,
6
+ * `FetchedResource`, `OwnSiteFetch`, `RequestRouter`, `RequestRouterOptions`) stay in diagnostics.
7
+ */
8
+ /** The slice of a Playwright `Request` the router reads — structural, so tests pass plain objects. */
9
+ export interface RoutedRequest {
10
+ url(): string;
11
+ method(): string;
12
+ headers(): Record<string, string>;
13
+ /** Transport only: request bodies are never retained as evidence. */
14
+ postData?(): string | null;
15
+ resourceType(): string;
16
+ isNavigationRequest(): boolean;
17
+ frame(): {
18
+ parentFrame(): unknown;
19
+ };
20
+ }
21
+ export type AbortReason = "scheme" | "method" | "resource-type" | "budget" | "refused" | "failed";
22
+ export type RoutedMethod = "GET" | "HEAD" | "POST" | "PUT" | "PATCH";
23
+ export type RequestDecision = {
24
+ action: "fetch";
25
+ via: "guarded" | "own-site";
26
+ method: RoutedMethod;
27
+ } | {
28
+ action: "abort";
29
+ reason: AbortReason;
30
+ };
31
+ export interface RequestRouterReport {
32
+ fulfilled: number;
33
+ blocked: number;
34
+ /** The page's own (main-frame) navigation, or a redirect hop of it, was refused by the egress guard. */
35
+ navigationRefused: boolean;
36
+ bytes: number;
37
+ }
38
+ //# sourceMappingURL=web-evidence-playwright.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @file Screenshot-browser request routing: the routed-request slice, routing decisions and the
3
+ * per-capture router report. Types only; this module owns the declarations that
4
+ * `@jini-ai/diagnostics/web-evidence/playwright` (`request-guard.ts`) used to declare. That package
5
+ * imports them from here and keeps its runtime values. The Buffer-carrying shapes (`RouteLike`,
6
+ * `FetchedResource`, `OwnSiteFetch`, `RequestRouter`, `RequestRouterOptions`) stay in diagnostics.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=web-evidence-playwright.js.map
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @file The page-capture contract shared by the `web_screenshot_page` service (which asks for a capture)
3
+ * and the browser adapters that take one (the Playwright capture in diagnostics' web-evidence, the
4
+ * desktop-native capture in integrations). Types only, so neither side depends on the other.
5
+ */
6
+ /** The viewport a capture renders at: CSS size, pixel ratio and touch/mobile emulation. */
7
+ export interface PageCaptureViewport {
8
+ readonly width: number;
9
+ readonly height: number;
10
+ readonly deviceScaleFactor: number;
11
+ readonly isMobile: boolean;
12
+ /** Widest image the service stores for this viewport; the capture itself ignores it. */
13
+ readonly maxImageWidth: number;
14
+ }
15
+ export interface PageCaptureRequest {
16
+ url: string;
17
+ viewport: PageCaptureViewport;
18
+ fullPage: boolean;
19
+ maxPageHeightPx: number;
20
+ settleMs: number;
21
+ /** Optional shared render selector/seconds override; otherwise settleMs applies. */
22
+ waitFor?: string | number;
23
+ dismissCookieBanners?: boolean;
24
+ /** Exact origins fetched through the own-site loopback path instead of the public egress guard. */
25
+ allowedOrigins: readonly string[];
26
+ }
27
+ export interface PageCapture {
28
+ png: Buffer;
29
+ finalUrl: string;
30
+ /** The main document's HTTP status; `null` when the browser reported none. */
31
+ status: number | null;
32
+ title: string;
33
+ /** Document height in CSS px (the viewport height when not full-page). */
34
+ pageHeight: number;
35
+ /** Height actually captured, in CSS px. */
36
+ capturedHeight: number;
37
+ blockedRequests: number;
38
+ /** Set when the picture is a best-effort frame (e.g. the page was still animating at the deadline). */
39
+ note?: string;
40
+ }
41
+ export type PageCaptureFailure = "refused" | "unavailable" | "timeout" | "failed";
42
+ /** What a caller-safe capture failure carries; the error class that holds it is the service's own. */
43
+ export interface PageCaptureFailureFields {
44
+ kind: PageCaptureFailure;
45
+ message: string;
46
+ /** A `timeout` only: the limit that ended the capture, in ms. */
47
+ limitMs?: number;
48
+ /** A `timeout` only: whether the page had loaded when the limit ended the capture. */
49
+ loaded?: boolean;
50
+ }
51
+ export interface PageCapturePort {
52
+ /** @throws PageCaptureError for every failure a caller should hear about. */
53
+ capture(required: PageCaptureRequest, optional?: {
54
+ signal?: AbortSignal;
55
+ }): Promise<PageCapture>;
56
+ close(required?: {}, optional?: {}): Promise<void>;
57
+ }
58
+ //# sourceMappingURL=web-screenshot.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @file The page-capture contract shared by the `web_screenshot_page` service (which asks for a capture)
3
+ * and the browser adapters that take one (the Playwright capture in diagnostics' web-evidence, the
4
+ * desktop-native capture in integrations). Types only, so neither side depends on the other.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=web-screenshot.js.map
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @file The host-facing port and admitted-export shape behind CMS's HTML plugin-export embeds
3
+ * (`@jini-ai/cms/widgets/html`). Rendering, substitution and fragment validation stay in cms; these
4
+ * types sit in core so a host's plugin runtime can implement the port without depending on cms.
5
+ */
6
+ /**
7
+ * Visitor-consent category an export is gated on. Restated here because core cannot import cms's
8
+ * `CONSENT_CATEGORIES` value (contracts/consent-category.ts); keep the two unions identical.
9
+ */
10
+ export type PluginExportConsentCategory = 'necessary' | 'functional' | 'analytics' | 'marketing';
11
+ /** Host-prepared, admitted export. The host owns enablement, aliases, schema validation,
12
+ * static-export policy, contained file reads, and public host-link readiness. No secrets belong here.
13
+ * `props` must be the schema-validated marker props; `host` contains only declared public values.
14
+ */
15
+ export interface PluginExportTemplate {
16
+ readonly plugin: string;
17
+ readonly component: string;
18
+ readonly version: number;
19
+ readonly minVersion?: number;
20
+ readonly consent: PluginExportConsentCategory;
21
+ readonly template: string;
22
+ readonly props: Readonly<Record<string, unknown>>;
23
+ readonly host?: Readonly<Record<string, unknown>>;
24
+ /** Exact https origins a whole `{{props.x}}` URL slot may name; also what admits an iframe. */
25
+ readonly frameHosts?: readonly string[];
26
+ /** The site's consent is off, so a gated frame loads at once rather than waiting for a choice. */
27
+ readonly consentOff?: boolean;
28
+ /** The export ships scripts, so its template may hand them values through data attributes. */
29
+ readonly scriptData?: boolean;
30
+ }
31
+ /** CMS knows no plugin lifecycle. Unavailable, invalid, or unsupported exports return undefined.
32
+ * Diagnostics are host-owned and must only be exposed to an authenticated editor audience.
33
+ */
34
+ export interface PluginExportsPort {
35
+ resolve(required: {
36
+ config: Readonly<Record<string, unknown>>;
37
+ workspaceId: string;
38
+ }, optional?: Record<string, never>): Promise<PluginExportTemplate | undefined>;
39
+ }
40
+ //# sourceMappingURL=widgets-html.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @file The host-facing port and admitted-export shape behind CMS's HTML plugin-export embeds
3
+ * (`@jini-ai/cms/widgets/html`). Rendering, substitution and fragment validation stay in cms; these
4
+ * types sit in core so a host's plugin runtime can implement the port without depending on cms.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=widgets-html.js.map
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @file The neutral on-device speech contract shared by a desktop shell's main process, its
3
+ * sandboxed preload bridge, and the renderer-side voice input that calls it. One definition here
4
+ * means the shell and the renderer cannot drift apart on the wire shape that crosses the IPC
5
+ * boundary.
6
+ */
7
+ /** Successful recognition of silence returns empty text, never null; elapsedMs supports latency logs. */
8
+ export interface TranscriptionResult {
9
+ text: string;
10
+ elapsedMs: number;
11
+ }
12
+ /** Whether the recognizer can run now; `reason` carries a host-owned code explaining why not. */
13
+ export interface TranscriptionAvailability {
14
+ available: boolean;
15
+ reason?: string | undefined;
16
+ }
17
+ /** One captured utterance: mono PCM samples and the rate they were captured at. */
18
+ export interface SpeechTranscribeRequest {
19
+ samples: Float32Array | readonly number[];
20
+ sampleRate: number;
21
+ }
22
+ /** The renderer-visible bridge a desktop shell exposes under a host-owned global name. */
23
+ export interface SpeechBridge {
24
+ isAvailable(): Promise<TranscriptionAvailability>;
25
+ transcribe(args: SpeechTranscribeRequest): Promise<TranscriptionResult>;
26
+ }
27
+ //# sourceMappingURL=speech-transcription.d.ts.map