@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
@@ -482,4 +482,18 @@ export function mergeDerivedRiskMaps(requiredArgs, optionalArgs = {}) {
482
482
  }
483
483
  return merged;
484
484
  }
485
+ /**
486
+ * Refuses any input key outside `allowed`. For the confirm-gated tools a stray `confirm: true` or
487
+ * `confirmationToken` is refused out loud, so the model is never left thinking it counted.
488
+ *
489
+ * @throws {ToolInputError} Naming the first unexpected key.
490
+ * @complexity O(k) in the input's key count.
491
+ */
492
+ export function refuseUnexpectedKeys({ input, allowed }, _optional = {}) {
493
+ const extra = Object.keys(input).find((key) => !allowed.includes(key));
494
+ if (extra !== undefined) {
495
+ throw new ToolInputError({ message: `'${extra}' is not an input of this tool. Only a click in the confirm dialog confirms it — nothing in the tool input can.` });
496
+ }
497
+ }
498
+ export const refuseUnexpectedKeysPort = (input, allowed) => refuseUnexpectedKeys({ input, allowed });
485
499
  //# sourceMappingURL=registration-kit.js.map
@@ -0,0 +1,57 @@
1
+ /**
2
+ * @file Scheduled publishing — the one rule for "is this published row live yet?".
3
+ *
4
+ * A scheduled post is NOT a third status. It is a `status: "published"` row whose `publishAt` is
5
+ * still in the future: stored as published, hidden from every public read until that instant
6
+ * passes. Render-time on purpose — there is no background job to miss, crash or lag, so a post is
7
+ * live at the first request after its time with nothing else having to run.
8
+ *
9
+ * Why not a `"scheduled"` status: `PostStatus` is a two-value union matched by ~50 call sites
10
+ * (admin editors, headless contracts, publish-to-live), and every one of them would have had to
11
+ * learn a third value. Here they keep working unchanged and only the public read gates add this
12
+ * check. Lives in `contracts/site` (beside `isTrashed`) so a host routing layer can apply the same
13
+ * rule without importing the post feature — the cycle `soft-delete.ts`'s own header describes.
14
+ *
15
+ * `publishAt` and `nowIso` are both ISO-8601 UTC strings from `Date.prototype.toISOString()`
16
+ * (`normalizePublishAt` in the cms `posts/post.ts` is the only writer), so a plain string compare
17
+ * orders them correctly.
18
+ */
19
+ export interface SchedulableRecord {
20
+ readonly status: string;
21
+ readonly publishAt?: string | null;
22
+ }
23
+ /** The current instant in the same ISO shape `publishAt` is stored in. */
24
+ export declare function currentIso(): string;
25
+ /** True when a published row's go-live time is still ahead of `nowIso`. A draft is never "scheduled":
26
+ * its `publishAt` only takes effect once it is published. @complexity O(1). */
27
+ export declare function isScheduledAt({ record, nowIso }: {
28
+ record: SchedulableRecord;
29
+ nowIso: string;
30
+ }, _optional?: {}): boolean;
31
+ /** The date a post's date line shows (owner policy): its go-live time when it has one —
32
+ * so a scheduled post's Preview shows the day it will go live, and the same post shows that date once
33
+ * live — else `updatedAt`, since `PostRecord` has no separate published-at column. @complexity O(1). */
34
+ export declare function postDisplayDateIso(record: {
35
+ readonly publishAt?: string | null;
36
+ readonly updatedAt: string;
37
+ }): string;
38
+ /** Newest display date first ({@link postDisplayDateIso}), then `id` ascending — the in-JS twin of
39
+ * the post repo's `ORDER BY coalesce(publish_at, updated_at) DESC, id ASC`. @complexity O(1). */
40
+ export declare function comparePostsByDisplayDate(a: {
41
+ readonly id: string;
42
+ readonly publishAt?: string | null;
43
+ readonly updatedAt: string;
44
+ }, b: {
45
+ readonly id: string;
46
+ readonly publishAt?: string | null;
47
+ readonly updatedAt: string;
48
+ }): number;
49
+ /** Published, not trashed, and past its go-live time — the whole public-visibility rule for a post
50
+ * or page row. @complexity O(1). */
51
+ export declare function isLiveAt({ record, nowIso }: {
52
+ record: SchedulableRecord & {
53
+ readonly deletedAt?: string | null;
54
+ };
55
+ nowIso: string;
56
+ }, _optional?: {}): boolean;
57
+ //# sourceMappingURL=scheduled-publish.d.ts.map
@@ -0,0 +1,33 @@
1
+ import { isTrashed } from "./contracts/site/soft-delete.js";
2
+ /** The current instant in the same ISO shape `publishAt` is stored in. */
3
+ export function currentIso() {
4
+ return new Date().toISOString();
5
+ }
6
+ /** True when a published row's go-live time is still ahead of `nowIso`. A draft is never "scheduled":
7
+ * its `publishAt` only takes effect once it is published. @complexity O(1). */
8
+ export function isScheduledAt({ record, nowIso }, _optional = {}) {
9
+ return record.status === "published" && typeof record.publishAt === "string" && record.publishAt > nowIso;
10
+ }
11
+ /** The date a post's date line shows (owner policy): its go-live time when it has one —
12
+ * so a scheduled post's Preview shows the day it will go live, and the same post shows that date once
13
+ * live — else `updatedAt`, since `PostRecord` has no separate published-at column. @complexity O(1). */
14
+ export function postDisplayDateIso(record) {
15
+ return record.publishAt ?? record.updatedAt;
16
+ }
17
+ /** Newest display date first ({@link postDisplayDateIso}), then `id` ascending — the in-JS twin of
18
+ * the post repo's `ORDER BY coalesce(publish_at, updated_at) DESC, id ASC`. @complexity O(1). */
19
+ export function comparePostsByDisplayDate(a, b) {
20
+ const left = postDisplayDateIso(a);
21
+ const right = postDisplayDateIso(b);
22
+ if (left !== right)
23
+ return left < right ? 1 : -1;
24
+ if (a.id < b.id)
25
+ return -1;
26
+ return a.id > b.id ? 1 : 0;
27
+ }
28
+ /** Published, not trashed, and past its go-live time — the whole public-visibility rule for a post
29
+ * or page row. @complexity O(1). */
30
+ export function isLiveAt({ record, nowIso }, _optional = {}) {
31
+ return record.status === "published" && !isTrashed(record) && !isScheduledAt({ record, nowIso });
32
+ }
33
+ //# sourceMappingURL=scheduled-publish.js.map
@@ -55,6 +55,14 @@ export interface EnsureSettingDefinitionsDeps {
55
55
  ids: IdGenerator;
56
56
  principals: SettingsPrincipalLookupPort;
57
57
  }
58
+ /**
59
+ * {@link ensureSettingDefinitions} as an injected collaborator. A feature that registers its
60
+ * definitions takes the registrar on its existing deps instead of importing it, so the host binds
61
+ * the ledger's implementation at composition and a test can hand in a spy.
62
+ */
63
+ export interface EnsureSettingDefinitionsPort {
64
+ ensureSettingDefinitions: typeof ensureSettingDefinitions;
65
+ }
58
66
  interface SettingDefinitionsInput {
59
67
  namespace: string;
60
68
  definitions: readonly SettingDefinitionSpec[];
@@ -0,0 +1,58 @@
1
+ import type { JsonValue } from "../primitives/index.js";
2
+ import type { SettingsRepoPort } from "./ports.js";
3
+ import { type getEffective, type ResolvedSetting } from "./settings.js";
4
+ import type { SettingScopeContext } from "./types.js";
5
+ /**
6
+ * @file Host-facing read policies over the settings ledger that security-relevant readers share:
7
+ * a fail-closed effective read and a raw read of one principal's own user layer. Hosts supply the
8
+ * namespace, key, refusal copy and projection; nothing here knows a product's settings.
9
+ */
10
+ /** Read-failure policy: HTTP readers propagate the error so a UI can show "unknown"; launch-time
11
+ * readers deny and log the host's safe diagnostic. */
12
+ export interface FailClosedReadOptions {
13
+ readFailure?: "deny" | "throw";
14
+ }
15
+ /**
16
+ * Resolve one effective setting and project it, denying on any failure. The ledger is read fresh
17
+ * on every call because another process may have changed a grant since the last read.
18
+ * @param required.getEffective The host's `getEffective` (injected so hosts avoid module cycles).
19
+ * @param required.project Maps the resolved setting (null when undefined) to the caller's value;
20
+ * a throw here is treated exactly like a storage failure.
21
+ * @param required.denied Lazily builds the refusal value returned after a denied failure.
22
+ * @param required.deniedWarning The host's safe diagnostic, logged instead of the error.
23
+ * @throws the original error unchanged when `readFailure` is "throw".
24
+ * @complexity O(1) settings resolutions plus the projection's own cost.
25
+ */
26
+ export declare function readEffectiveFailClosed<T>(required: {
27
+ settingsRepo: SettingsRepoPort;
28
+ getEffective: typeof getEffective;
29
+ settingsReady: Promise<void>;
30
+ namespace: string;
31
+ key: string;
32
+ scopeContext: SettingScopeContext;
33
+ project: (required: {
34
+ setting: ResolvedSetting | null;
35
+ }) => T | Promise<T>;
36
+ denied: () => T;
37
+ deniedWarning: string;
38
+ warn: (message: string) => void;
39
+ }, optional?: FailClosedReadOptions): Promise<T>;
40
+ /**
41
+ * Read the addressed principal's own user-layer object, preserving fields an effective projection
42
+ * omits, so a read-modify-write patch never drops sibling entries. A cleared, missing or non-object
43
+ * row reads as `{}` with revision 0.
44
+ * @throws Error(notReadyMessage) when the definition is not registered yet.
45
+ * @complexity O(1) — one definition read and one user-layer read.
46
+ */
47
+ export declare function readUserLayerObject(required: {
48
+ settingsRepo: SettingsRepoPort;
49
+ namespace: string;
50
+ key: string;
51
+ workspaceId: string;
52
+ principalId: string;
53
+ notReadyMessage: string;
54
+ }, _optional?: Record<string, never>): Promise<{
55
+ raw: Record<string, JsonValue>;
56
+ revisionSeq: number;
57
+ }>;
58
+ //# sourceMappingURL=guarded-reads.d.ts.map
@@ -0,0 +1,48 @@
1
+ import { isNonArrayRecord } from "../records.js";
2
+ import { resolveDefinitionRaw } from "./settings.js";
3
+ /**
4
+ * Resolve one effective setting and project it, denying on any failure. The ledger is read fresh
5
+ * on every call because another process may have changed a grant since the last read.
6
+ * @param required.getEffective The host's `getEffective` (injected so hosts avoid module cycles).
7
+ * @param required.project Maps the resolved setting (null when undefined) to the caller's value;
8
+ * a throw here is treated exactly like a storage failure.
9
+ * @param required.denied Lazily builds the refusal value returned after a denied failure.
10
+ * @param required.deniedWarning The host's safe diagnostic, logged instead of the error.
11
+ * @throws the original error unchanged when `readFailure` is "throw".
12
+ * @complexity O(1) settings resolutions plus the projection's own cost.
13
+ */
14
+ export async function readEffectiveFailClosed(required, optional = {}) {
15
+ try {
16
+ await required.settingsReady;
17
+ const setting = await required.getEffective({ deps: { repo: required.settingsRepo }, namespace: required.namespace,
18
+ key: required.key, scopeContext: required.scopeContext });
19
+ return await required.project({ setting });
20
+ }
21
+ catch (error) {
22
+ if (optional.readFailure === "throw")
23
+ throw error;
24
+ // Storage exceptions may contain sensitive values; never copy them into daemon logs.
25
+ required.warn(required.deniedWarning);
26
+ return required.denied();
27
+ }
28
+ }
29
+ /**
30
+ * Read the addressed principal's own user-layer object, preserving fields an effective projection
31
+ * omits, so a read-modify-write patch never drops sibling entries. A cleared, missing or non-object
32
+ * row reads as `{}` with revision 0.
33
+ * @throws Error(notReadyMessage) when the definition is not registered yet.
34
+ * @complexity O(1) — one definition read and one user-layer read.
35
+ */
36
+ export async function readUserLayerObject(required, _optional = {}) {
37
+ const definition = await resolveDefinitionRaw({ repo: required.settingsRepo }, {
38
+ namespace: required.namespace, key: required.key, workspaceId: required.workspaceId,
39
+ });
40
+ if (!definition)
41
+ throw new Error(required.notReadyMessage);
42
+ const row = await required.settingsRepo.getUserValue({ workspaceId: required.workspaceId, principalId: required.principalId, settingId: definition.settingId });
43
+ const candidate = { value: row?.state === "set" ? row.valueJson : null };
44
+ // The guard excludes null, primitives and arrays, so the only JsonValue member left is JsonObject.
45
+ const raw = isNonArrayRecord(candidate) ? candidate.value : {};
46
+ return { raw, revisionSeq: row?.seq ?? 0 };
47
+ }
48
+ //# sourceMappingURL=guarded-reads.js.map
@@ -14,7 +14,7 @@ export { SCOPE_BIT, type SettingScope, type SettingOwnerKind, type DefinitionSta
14
14
  export { DefinitionInvalidError, ScopeNotAllowedError, SecretNotSupportedError, ValueValidationFailedError, SettingsRevisionConflictError, RenameRetypeConflictError, AliasDepthExceededError, DefinitionTombstonedError, DefinitionNotFoundError, PurgeRequiredError, ForbiddenError, PrincipalNotFoundError, } from "./errors.js";
15
15
  export type { SettingsRepoPort } from "./ports.js";
16
16
  export { InMemorySettingsRepo } from "./repo.memory.js";
17
- export { type DefinitionInput, validateDefinitionInput, validateValueAgainstSchema, type SettingCoercer, invalidateDefinitionNamespaceCache, invalidateWorkspaceSettingsCache, resolveDefinitionRaw, resolveDefinition, type ResolvedSetting, getEffective, } from "./settings.js";
17
+ export { type DefinitionInput, validateDefinitionInput, validateValueAgainstSchema, type SettingCoercer, invalidateDefinitionNamespaceCache, invalidateWorkspaceSettingsCache, resolveDefinitionRaw, resolveDefinition, type ResolvedSetting, getEffective, type GetEffectivePort, } from "./settings.js";
18
18
  export { type AuthorizeFn, type SettingsWriteServiceDeps, deriveRequiredPermission, type RegisterDefinitionsRequired, registerDefinitions } from "./write-service.js";
19
19
  export { type SetValueRequired, set, type ClearValueRequired, clear } from "./write-values.js";
20
20
  export { type SettingsValueWriteOptions } from "./write-value-revisions.js";
@@ -25,7 +25,7 @@ export { type ReconcileDefinitionDefaultRequired, reconcileDefinitionDefault, ty
25
25
  export { type PurgeServiceDeps, type PurgeTenantSettingsRequired, purgeTenantSettings, } from "./purge-service.js";
26
26
  export { type ChangeFeedViewer, isRevisionVisibleTo, type ChangeFeedBatch, collectChangedNamespaces, } from "./change-feed.js";
27
27
  export { type DefinitionOpRequestItem, type DefinitionOpContext, type DefinitionOpHandler, NON_REGISTER_DEFINITION_OP_NAMES, type NonRegisterDefinitionOp, parseNonRegisterDefinitionOp, NON_REGISTER_DEFINITION_OPS, } from "./definitions-dispatch.js";
28
- export { type SettingDefinitionSpec, type EnsureSettingDefinitionsDeps, type EnsureSettingDefinitionsInput, ensureSettingDefinitions, } from "./ensure-definitions.js";
28
+ export { type SettingDefinitionSpec, type EnsureSettingDefinitionsDeps, type EnsureSettingDefinitionsInput, type EnsureSettingDefinitionsPort, ensureSettingDefinitions, } from "./ensure-definitions.js";
29
29
  export { INSTRUCTIONS_NAMESPACE, NOTIFICATIONS_NAMESPACE, PRIVACY_NAMESPACE, APPEARANCE_NAMESPACE, LANGUAGE_NAMESPACE, type EnsureSettingsUiTabDefinitionsInput, ensureSettingsUiTabDefinitions, } from "./ui-tab-definitions.js";
30
30
  export { type AgentWritablePreference, AGENT_PREFERENCE_WRITE_SCOPE, AGENT_WRITABLE_PREFERENCES, AGENT_WRITABLE_PREFERENCE_IDS, resolveAgentWritablePreference, AGENT_PREFERENCE_REQUIRED_SCOPE_BIT, } from "./agent-writable-preferences.js";
31
31
  /** The agent-tool catalog for this domain. */
@@ -46,4 +46,5 @@ export type { SettingsPrincipalLookupPort } from "./principal-lookup.js";
46
46
  export type { Authorize, SettingsPermissions, SettingsService, SettingsChangeFeed, EffectiveSettingRow, RawSetting, DefinitionResult, TargetWorkspaceResolution, UserLayerReadTarget, } from "./route-policy.js";
47
47
  export { resolveTargetWorkspaceId, resolveUserLayerReadTarget, settingsWritePermission } from "./route-policy.js";
48
48
  export { createCmsSettingsService, createCmsSettingsChangeFeed } from "./cms-adapter.js";
49
+ export { type FailClosedReadOptions, readEffectiveFailClosed, readUserLayerObject } from "./guarded-reads.js";
49
50
  //# sourceMappingURL=index.d.ts.map
@@ -42,4 +42,5 @@ export { SETTINGS_DIALOG_DICTIONARIES, translateSettingsDialog } from "./diction
42
42
  export { AGENT_WRITE_CONFIRMATION_SETTINGS, AGENT_WRITE_DENIED_SETTINGS, findAgentWriteRule } from "./agent-write-denylist.js";
43
43
  export { resolveTargetWorkspaceId, resolveUserLayerReadTarget, settingsWritePermission } from "./route-policy.js";
44
44
  export { createCmsSettingsService, createCmsSettingsChangeFeed } from "./cms-adapter.js";
45
+ export { readEffectiveFailClosed, readUserLayerObject } from "./guarded-reads.js";
45
46
  //# sourceMappingURL=index.js.map
@@ -120,6 +120,14 @@ export interface ResolvedSetting {
120
120
  sourceLayer: "user" | "workspace" | "global" | "default";
121
121
  defVersion: number;
122
122
  }
123
+ /**
124
+ * {@link getEffective} as an injected collaborator. A feature that reads an effective setting takes
125
+ * the reader on its existing required args instead of importing it, so the host binds the ledger's
126
+ * implementation at composition and a test can hand in a spy.
127
+ */
128
+ export interface GetEffectivePort {
129
+ getEffective: typeof getEffective;
130
+ }
123
131
  /**
124
132
  * — total for a live key: never throws, never returns
125
133
  * undefined. Precedence `user ?? workspace ?? global ?? default`. A
@@ -106,8 +106,8 @@ async function applyRenameInTransaction({ deps, input, current }) {
106
106
  */
107
107
  export async function renameDefinition(required) {
108
108
  const { deps, input } = required;
109
- await authorizeDefinitionsManage(deps, input.callerPrincipalId, input.authWorkspaceId);
110
- const current = await resolveActiveDefinitionOrThrow(deps, input, "rename");
109
+ await authorizeDefinitionsManage({ deps, callerPrincipalId: input.callerPrincipalId, authWorkspaceId: input.authWorkspaceId });
110
+ const current = await resolveActiveDefinitionOrThrow({ deps, input, verb: "rename" });
111
111
  await assertRenameTargetFree(deps, input);
112
112
  const result = await deps.repo.transaction(() => applyRenameInTransaction({ deps, input, current }));
113
113
  // Both the old (alias-marker) namespace and the new (active-row) namespace
@@ -59,8 +59,8 @@ async function writeRetypedVersion({ deps, input, current }) {
59
59
  */
60
60
  export async function retypeDefinition(required) {
61
61
  const { deps, input } = required;
62
- await authorizeDefinitionsManage(deps, input.callerPrincipalId, input.authWorkspaceId);
63
- const current = await resolveActiveDefinitionOrThrow(deps, input, "retype");
62
+ await authorizeDefinitionsManage({ deps, callerPrincipalId: input.callerPrincipalId, authWorkspaceId: input.authWorkspaceId });
63
+ const current = await resolveActiveDefinitionOrThrow({ deps, input, verb: "retype" });
64
64
  const namespaceOrKeyChanged = (input.newNamespace !== undefined && input.newNamespace !== current.namespace) ||
65
65
  (input.newKey !== undefined && input.newKey !== current.key);
66
66
  const schemaChanged = JSON.stringify(input.schema) !== JSON.stringify(current.schema);
@@ -86,8 +86,8 @@ export async function retypeDefinition(required) {
86
86
  * scopes: SCOPE_BIT.user, callerPrincipalId, authWorkspaceId } });
87
87
  */
88
88
  export async function extendDefinitionScopes({ deps, input }, _options = {}) {
89
- await authorizeDefinitionsManage(deps, input.callerPrincipalId, input.authWorkspaceId);
90
- const current = await resolveActiveDefinitionOrThrow(deps, input, "extend the scopes of");
89
+ await authorizeDefinitionsManage({ deps, callerPrincipalId: input.callerPrincipalId, authWorkspaceId: input.authWorkspaceId });
90
+ const current = await resolveActiveDefinitionOrThrow({ deps, input, verb: "extend the scopes of" });
91
91
  const validBits = SCOPE_BIT.global | SCOPE_BIT.workspace | SCOPE_BIT.user;
92
92
  if (current.ownerKind !== "core" || !Number.isInteger(input.scopes) || input.scopes <= 0 || input.scopes > validBits) {
93
93
  throw new DefinitionInvalidError("Only core definitions can gain valid source-declared scope bits");
@@ -36,8 +36,8 @@ import { authorizeDefinitionsManage, resolveActiveDefinitionOrThrow } from './wr
36
36
  */
37
37
  export async function reconcileDefinitionDefault(required) {
38
38
  const { deps, input } = required;
39
- await authorizeDefinitionsManage(deps, input.callerPrincipalId, input.authWorkspaceId);
40
- const current = await resolveActiveDefinitionOrThrow(deps, input, "reconcile the default of");
39
+ await authorizeDefinitionsManage({ deps, callerPrincipalId: input.callerPrincipalId, authWorkspaceId: input.authWorkspaceId });
40
+ const current = await resolveActiveDefinitionOrThrow({ deps, input, verb: "reconcile the default of" });
41
41
  if (current.ownerKind !== "core") {
42
42
  throw new DefinitionInvalidError(`cannot reconcile the default of '${input.namespace}.${input.key}': only 'core' definitions are code-owned, and this one is '${current.ownerKind}' (operator-owned)`);
43
43
  }
@@ -79,8 +79,8 @@ export async function reconcileDefinitionDefault(required) {
79
79
  * written once; both thin exports below just name their target status.
80
80
  */
81
81
  async function transitionDefinitionStatus(deps, input, target) {
82
- await authorizeDefinitionsManage(deps, input.callerPrincipalId, input.authWorkspaceId);
83
- const current = await resolveActiveDefinitionOrThrow(deps, input, target.revisionOp);
82
+ await authorizeDefinitionsManage({ deps, callerPrincipalId: input.callerPrincipalId, authWorkspaceId: input.authWorkspaceId });
83
+ const current = await resolveActiveDefinitionOrThrow({ deps, input, verb: target.revisionOp });
84
84
  const result = await deps.repo.transaction(async () => {
85
85
  const now = kernelNowIso({ clock: deps.clock });
86
86
  await deps.repo.saveDefinition({ ...current, status: target.status, updatedAt: now });
@@ -76,12 +76,20 @@ export declare function registerDefinitions(required: RegisterDefinitionsRequire
76
76
  * `registerDefinitions`'s own `settings.definitions.manage` check (same
77
77
  * permission also gates `purge`/`coerce` per §7 — high privilege, human-only).
78
78
  */
79
- export declare function authorizeDefinitionsManage(deps: SettingsWriteServiceDeps, callerPrincipalId: UUID, authWorkspaceId: UUID): Promise<void>;
79
+ export declare function authorizeDefinitionsManage({ deps, callerPrincipalId, authWorkspaceId }: {
80
+ deps: SettingsWriteServiceDeps;
81
+ callerPrincipalId: UUID;
82
+ authWorkspaceId: UUID;
83
+ }, _optional?: Record<string, never>): Promise<void>;
80
84
  /** Resolves the canonical active definition at (namespace,key,workspaceId), rejecting anything but `status='active'`. */
81
- export declare function resolveActiveDefinitionOrThrow(deps: SettingsWriteServiceDeps, input: {
82
- namespace: string;
83
- key: string;
84
- workspaceId: UUID | null;
85
- }, verb: string): Promise<SettingDefinitionRecord>;
85
+ export declare function resolveActiveDefinitionOrThrow({ deps, input, verb }: {
86
+ deps: SettingsWriteServiceDeps;
87
+ input: {
88
+ namespace: string;
89
+ key: string;
90
+ workspaceId: UUID | null;
91
+ };
92
+ verb: string;
93
+ }, _optional?: Record<string, never>): Promise<SettingDefinitionRecord>;
86
94
  export type ActiveDefinition = Awaited<ReturnType<typeof resolveActiveDefinitionOrThrow>>;
87
95
  //# sourceMappingURL=write-service.d.ts.map
@@ -92,7 +92,7 @@ export async function registerDefinitions(required) {
92
92
  * `registerDefinitions`'s own `settings.definitions.manage` check (same
93
93
  * permission also gates `purge`/`coerce` per §7 — high privilege, human-only).
94
94
  */
95
- export async function authorizeDefinitionsManage(deps, callerPrincipalId, authWorkspaceId) {
95
+ export async function authorizeDefinitionsManage({ deps, callerPrincipalId, authWorkspaceId }, _optional = {}) {
96
96
  const authResult = await deps.authorize({
97
97
  principalId: callerPrincipalId,
98
98
  permission: "settings.definitions.manage",
@@ -104,7 +104,7 @@ export async function authorizeDefinitionsManage(deps, callerPrincipalId, authWo
104
104
  }
105
105
  }
106
106
  /** Resolves the canonical active definition at (namespace,key,workspaceId), rejecting anything but `status='active'`. */
107
- export async function resolveActiveDefinitionOrThrow(deps, input, verb) {
107
+ export async function resolveActiveDefinitionOrThrow({ deps, input, verb }, _optional = {}) {
108
108
  const current = await deps.repo.findActiveDefinition(input);
109
109
  if (!current) {
110
110
  throw new DefinitionNotFoundError(`setting '${input.namespace}.${input.key}' was not found`);
@@ -155,6 +155,35 @@ export interface SurfaceDeliverySpec {
155
155
  toolId?: string;
156
156
  channel?: SurfaceAnswerChannel;
157
157
  }
158
+ /**
159
+ * What the authoritative exchange reports about a confirmation card, in order: `open` once the card
160
+ * has been emitted, then at most one of `answered` (an accepted, correctly bound delivery) or `ended`
161
+ * (expired or abandoned with no answer). It never carries the raw answer, prompt or tool result.
162
+ * `answered` with `confirmed: true` means only "the owner said yes": it is reported before the host's
163
+ * approver and grant rechecks, so it is not proof the effect ran.
164
+ */
165
+ export type ApprovalReceipt = {
166
+ exchangeId: string;
167
+ kind: 'open';
168
+ } | {
169
+ exchangeId: string;
170
+ kind: 'answered';
171
+ confirmed: boolean;
172
+ } | {
173
+ exchangeId: string;
174
+ kind: 'ended';
175
+ reason: 'expired' | 'abandoned';
176
+ };
177
+ /**
178
+ * Observe-only hook a host injects for confirmation exchanges on a run-bound (leased) call. Called
179
+ * synchronously inside try/catch, never awaited, its return value ignored: an observer that throws,
180
+ * hangs or returns a rejected promise cannot change the answer, the delivery or the effect count.
181
+ */
182
+ export type ApprovalReceiptObserver = (required: {
183
+ receipt: ApprovalReceipt;
184
+ runId: string;
185
+ principalId: string;
186
+ }, optional?: Record<string, never>) => void;
158
187
  export interface SurfaceExchangeStore {
159
188
  /** Restore an unanswered call through its original executor, or observe its still-live card.
160
189
  * Streams human-only emissions until the exchange settles. A late answer is delivered once to
@@ -180,7 +209,9 @@ export interface SurfaceExchangeStore {
180
209
  open(args: {
181
210
  binding: SurfaceExchangeBinding;
182
211
  emit: SurfaceEmitter;
183
- }, optional?: Record<string, never>): SurfaceExchange;
212
+ }, optional?: {
213
+ onApprovalReceipt?: ApprovalReceiptObserver;
214
+ }): SurfaceExchange;
184
215
  /**
185
216
  * Routes one inbound message to the exchange it names, queueing it if nothing is waiting yet.
186
217
  * See {@link SurfaceDeliverySpec} for why `toolId` is optional rather than part of
@@ -8,7 +8,10 @@
8
8
  * is harmless (never shown), so a reworded English string only loses its translation, never the host.
9
9
  *
10
10
  * Shared by every descriptor parser that has person-facing text (deploy targets,
11
- * `@jini-ai/devops/deploy`'s `parseDeployTargetsFile`; a host's own descriptor parsers).
11
+ * `@jini-ai/devops/deploy`'s `parseDeployTargetsFile`; a host's own descriptor parsers such as its
12
+ * deploy-target registry and its source-control (git host) provider registry). Those host parsers
13
+ * import this module directly: a per-package forwarding wrapper with the same `{ value, at }`
14
+ * signature would add a second public entry for one implementation.
12
15
  */
13
16
  /** Locale → English source text → translation. */
14
17
  export type DescriptorI18n = Readonly<Record<string, Readonly<Record<string, string>>>>;
@@ -8,7 +8,10 @@
8
8
  * is harmless (never shown), so a reworded English string only loses its translation, never the host.
9
9
  *
10
10
  * Shared by every descriptor parser that has person-facing text (deploy targets,
11
- * `@jini-ai/devops/deploy`'s `parseDeployTargetsFile`; a host's own descriptor parsers).
11
+ * `@jini-ai/devops/deploy`'s `parseDeployTargetsFile`; a host's own descriptor parsers such as its
12
+ * deploy-target registry and its source-control (git host) provider registry). Those host parsers
13
+ * import this module directly: a per-package forwarding wrapper with the same `{ value, at }`
14
+ * signature would add a second public entry for one implementation.
12
15
  */
13
16
  /** A BCP 47-shaped tag as the admin's locales spell them (`es`, `pt-BR`, `zh-TW`). */
14
17
  const LOCALE_PATTERN = /^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/;
@@ -9,6 +9,8 @@ export { createTaggedTextSuppressor, emitWithTextSuppressor, possibleTagStart, M
9
9
  export type { TaggedTextMatchers, TaggedTextSuppressor, ArtifactTextSuppressor, ArtifactTextSuppressorStats, StreamTextEvent, StreamEventSink } from './tagged-text-suppression.js';
10
10
  export { createDictionaryTranslator } from './dictionary-translator.js';
11
11
  export type { Translate, DictionaryTranslator, LocaleDictionary } from './dictionary-translator.js';
12
+ export { mergeLocaleOverlays } from './merge-locale-overlays.js';
13
+ export type { MergedLocaleDictionary } from './merge-locale-overlays.js';
12
14
  export { interpolate, splitOnPlaceholders, pickPlural, localeEntry } from './template-i18n.js';
13
15
  export { formatTimestamp, formatRelativeMinutesAgo } from './format-timestamp.js';
14
16
  export { resolveActiveTabId } from './resolve-active-tab-id.js';
@@ -17,4 +19,5 @@ export { isAbortError } from './is-abort-error.js';
17
19
  export { extensionForMimeType } from './mime.js';
18
20
  export { formatByteSize } from './format-byte-size.js';
19
21
  export type { FormatByteSizeOptions } from './format-byte-size.js';
22
+ export { describeUploadOverLimit } from './upload-limit-message.js';
20
23
  //# sourceMappingURL=index.d.ts.map
@@ -5,6 +5,7 @@ export { captureLineTail } from "./line-tail.js";
5
5
  export { parseDescriptorI18n } from "./descriptor-i18n.js";
6
6
  export { createTaggedTextSuppressor, emitWithTextSuppressor, possibleTagStart, MAX_CANDIDATE_LENGTH } from './tagged-text-suppression.js';
7
7
  export { createDictionaryTranslator } from './dictionary-translator.js';
8
+ export { mergeLocaleOverlays } from './merge-locale-overlays.js';
8
9
  export { interpolate, splitOnPlaceholders, pickPlural, localeEntry } from './template-i18n.js';
9
10
  export { formatTimestamp, formatRelativeMinutesAgo } from './format-timestamp.js';
10
11
  export { resolveActiveTabId } from './resolve-active-tab-id.js';
@@ -12,4 +13,5 @@ export { redactOAuthUrls } from './redact-urls.js';
12
13
  export { isAbortError } from './is-abort-error.js';
13
14
  export { extensionForMimeType } from './mime.js';
14
15
  export { formatByteSize } from './format-byte-size.js';
16
+ export { describeUploadOverLimit } from './upload-limit-message.js';
15
17
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @file One shared way for a feature's i18n module to fold per-locale "overlay" tables (audit
3
+ * strings, match-type labels, password-field copy, …) into its main per-locale dictionary.
4
+ *
5
+ * Several `*-i18n.ts` modules each hand-rolled the same `Object.fromEntries(Object.entries(BASE)
6
+ * .map(([locale, entries]) => [locale, { ...entries, ...(OVERLAY[locale] ?? {}) }]))` expression.
7
+ * Hoisting it here keeps the "an overlay may not cover every locale" guard in one tested place
8
+ * instead of an untestable module-level branch in each dictionary file.
9
+ */
10
+ import type { LocaleDictionary } from './dictionary-translator.js';
11
+ /** The merged result: a fresh, caller-owned locale → (English source string → translated string) table. */
12
+ export type MergedLocaleDictionary = Record<string, Record<string, string>>;
13
+ /**
14
+ * Returns a new dictionary with one entry per locale of `base` (overlay-only locales are ignored,
15
+ * matching the hand-rolled expressions this replaced). Each locale's entries are `base[locale]`
16
+ * followed by every overlay's entries for that locale, in argument order, so a later overlay wins
17
+ * on a key collision. An overlay that has no entry for a locale contributes nothing to it.
18
+ * Inputs are never mutated.
19
+ */
20
+ export declare function mergeLocaleOverlays({ base }: {
21
+ base: LocaleDictionary;
22
+ }, { overlays }?: {
23
+ overlays?: readonly LocaleDictionary[];
24
+ }): MergedLocaleDictionary;
25
+ //# sourceMappingURL=merge-locale-overlays.d.ts.map
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @file One shared way for a feature's i18n module to fold per-locale "overlay" tables (audit
3
+ * strings, match-type labels, password-field copy, …) into its main per-locale dictionary.
4
+ *
5
+ * Several `*-i18n.ts` modules each hand-rolled the same `Object.fromEntries(Object.entries(BASE)
6
+ * .map(([locale, entries]) => [locale, { ...entries, ...(OVERLAY[locale] ?? {}) }]))` expression.
7
+ * Hoisting it here keeps the "an overlay may not cover every locale" guard in one tested place
8
+ * instead of an untestable module-level branch in each dictionary file.
9
+ */
10
+ /**
11
+ * Returns a new dictionary with one entry per locale of `base` (overlay-only locales are ignored,
12
+ * matching the hand-rolled expressions this replaced). Each locale's entries are `base[locale]`
13
+ * followed by every overlay's entries for that locale, in argument order, so a later overlay wins
14
+ * on a key collision. An overlay that has no entry for a locale contributes nothing to it.
15
+ * Inputs are never mutated.
16
+ */
17
+ export function mergeLocaleOverlays({ base }, { overlays = [] } = {}) {
18
+ return Object.fromEntries(Object.entries(base).map(([locale, entries]) => [
19
+ locale,
20
+ Object.assign({}, entries, ...overlays.map((overlay) => overlay[locale] ?? {})),
21
+ ]));
22
+ }
23
+ //# sourceMappingURL=merge-locale-overlays.js.map
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @file The one sentence every upload surface uses when a file is over the limit, so the server, the
3
+ * Library screen and the chat composer all say the same thing in the same words.
4
+ */
5
+ /**
6
+ * "That file is 200 MB; the limit is 50 MB." 1024-based, like every other upload limit here.
7
+ * The file's size is rounded UP to a tenth so a file that is only a byte over never reads as
8
+ * "50 MB; the limit is 50 MB" (which would look like it should have been accepted).
9
+ *
10
+ * @param required.fileBytes - The size of the file that was refused.
11
+ * @param required.limitBytes - The largest size this surface accepts.
12
+ * @returns A plain-words sentence naming both sizes.
13
+ * @complexity O(1).
14
+ */
15
+ export declare function describeUploadOverLimit({ fileBytes, limitBytes }: {
16
+ fileBytes: number;
17
+ limitBytes: number;
18
+ }): string;
19
+ //# sourceMappingURL=upload-limit-message.d.ts.map
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @file The one sentence every upload surface uses when a file is over the limit, so the server, the
3
+ * Library screen and the chat composer all say the same thing in the same words.
4
+ */
5
+ const BYTES_PER_KB = 1024;
6
+ const BYTES_PER_MB = 1024 * 1024;
7
+ /** A size to one decimal in the unit a person reads; `roundUp` keeps an over-limit file above the limit. */
8
+ function plainSize({ bytes, roundUp }) {
9
+ const round = roundUp ? Math.ceil : Math.round;
10
+ if (bytes >= BYTES_PER_MB)
11
+ return `${round((bytes / BYTES_PER_MB) * 10) / 10} MB`;
12
+ if (bytes >= BYTES_PER_KB)
13
+ return `${round((bytes / BYTES_PER_KB) * 10) / 10} KB`;
14
+ return `${bytes} bytes`;
15
+ }
16
+ /**
17
+ * "That file is 200 MB; the limit is 50 MB." 1024-based, like every other upload limit here.
18
+ * The file's size is rounded UP to a tenth so a file that is only a byte over never reads as
19
+ * "50 MB; the limit is 50 MB" (which would look like it should have been accepted).
20
+ *
21
+ * @param required.fileBytes - The size of the file that was refused.
22
+ * @param required.limitBytes - The largest size this surface accepts.
23
+ * @returns A plain-words sentence naming both sizes.
24
+ * @complexity O(1).
25
+ */
26
+ export function describeUploadOverLimit({ fileBytes, limitBytes }) {
27
+ return `That file is ${plainSize({ bytes: fileBytes, roundUp: true })}; the limit is ${plainSize({ bytes: limitBytes, roundUp: false })}.`;
28
+ }
29
+ //# sourceMappingURL=upload-limit-message.js.map
@@ -0,0 +1,12 @@
1
+ /** @file Tool-access lowering seam shared by every host that saves an OFF decision: the notify effect and the error for an unconfirmed stop. */
2
+ import type { ToolAccessChange } from "./contracts/site/daemon.js";
3
+ /** Host effect used after saving a decision that lowers tool access. */
4
+ export type NotifyToolAccessChanged = (input?: {
5
+ readonly lowered?: ToolAccessChange;
6
+ }) => Promise<void>;
7
+ /** A durable OFF decision stands even when cleanup fails; never report an unconfirmed stop. */
8
+ export declare class ToolAccessLoweringError extends Error {
9
+ readonly code = "TOOL_ACCESS_STOP_FAILED";
10
+ constructor();
11
+ }
12
+ //# sourceMappingURL=tool-access-change.d.ts.map
@@ -0,0 +1,6 @@
1
+ /** A durable OFF decision stands even when cleanup fails; never report an unconfirmed stop. */
2
+ export class ToolAccessLoweringError extends Error {
3
+ code = 'TOOL_ACCESS_STOP_FAILED';
4
+ constructor() { super("Tool access changed, but affected answers could not be confirmed stopped."); }
5
+ }
6
+ //# sourceMappingURL=tool-access-change.js.map