@jini-ai/core 0.7.3-next.2 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +68 -0
- package/dist/admin-runtime/admin-http.d.ts +43 -0
- package/dist/admin-runtime/admin-http.js +11 -0
- package/dist/admin-runtime/index.d.ts +1 -0
- package/dist/batch-tool-inputs.d.ts +3 -3
- package/dist/batch-tool-inputs.js +18 -6
- package/dist/config/env-schema.d.ts +31 -0
- package/dist/config/env-schema.js +29 -0
- package/dist/contracts/agents/definition.d.ts +9 -1
- package/dist/contracts/agents/index.d.ts +1 -0
- package/dist/contracts/agents/inventory.d.ts +29 -0
- package/dist/contracts/agents/inventory.js +8 -0
- package/dist/contracts/agents/provider-ports.d.ts +117 -0
- package/dist/contracts/agents/provider-ports.js +2 -0
- package/dist/contracts/agents/proxy-provider-kit.d.ts +122 -0
- package/dist/contracts/agents/proxy-provider-kit.js +119 -0
- package/dist/contracts/agents/proxy-provider.d.ts +34 -0
- package/dist/contracts/agents/proxy-provider.js +2 -0
- package/dist/contracts/blob-gc.d.ts +69 -0
- package/dist/contracts/blob-gc.js +13 -0
- package/dist/contracts/credentials.d.ts +5 -19
- package/dist/contracts/desktop-zoom.d.ts +7 -0
- package/dist/contracts/desktop-zoom.js +6 -0
- package/dist/contracts/events/change-set.d.ts +12 -3
- package/dist/contracts/events/command.d.ts +11 -5
- package/dist/contracts/events/ports.d.ts +38 -0
- package/dist/contracts/events/ports.js +8 -1
- package/dist/contracts/events.d.ts +2 -1
- package/dist/contracts/events.js +1 -1
- package/dist/contracts/execution.d.ts +541 -0
- package/dist/contracts/execution.js +2 -0
- package/dist/contracts/find-in-page.d.ts +12 -0
- package/dist/contracts/find-in-page.js +7 -0
- package/dist/contracts/headless/chart-providers.d.ts +12 -0
- package/dist/contracts/headless/chart-providers.js +2 -0
- package/dist/contracts/headless/chat-attachment.d.ts +21 -0
- package/dist/contracts/headless/chat-attachment.js +9 -0
- package/dist/contracts/headless/contracts.d.ts +179 -0
- package/dist/contracts/headless/contracts.js +2 -0
- package/dist/contracts/headless/form-delivery-status.d.ts +35 -0
- package/dist/contracts/headless/form-delivery-status.js +2 -0
- package/dist/contracts/headless/member-login.d.ts +3 -0
- package/dist/contracts/headless/member-login.js +3 -0
- package/dist/contracts/headless/operator-locale.d.ts +17 -0
- package/dist/contracts/headless/operator-locale.js +2 -0
- package/dist/contracts/headless/plugin-export-catalog.d.ts +21 -0
- package/dist/contracts/headless/plugin-export-catalog.js +2 -0
- package/dist/contracts/headless/plugin-host.d.ts +128 -0
- package/dist/contracts/headless/plugin-host.js +2 -0
- package/dist/contracts/headless/plugin-install-source.d.ts +82 -0
- package/dist/contracts/headless/plugin-install-source.js +12 -0
- package/dist/contracts/headless/site-cookie-consent.d.ts +41 -0
- package/dist/contracts/headless/site-cookie-consent.js +2 -0
- package/dist/contracts/hosted-mcp/admissions.d.ts +125 -0
- package/dist/contracts/hosted-mcp/admissions.js +3 -0
- package/dist/contracts/hosted-mcp/record.d.ts +9 -3
- package/dist/contracts/hosted-mcp.d.ts +1 -0
- package/dist/contracts/mail.d.ts +28 -2
- package/dist/contracts/mail.js +3 -0
- package/dist/contracts/observability.d.ts +12 -0
- package/dist/contracts/run-attempt.d.ts +14 -0
- package/dist/contracts/run-attempt.js +7 -0
- package/dist/contracts/server/api-error.js +1 -0
- package/dist/contracts/server/client-facing-error.d.ts +25 -0
- package/dist/contracts/server/client-facing-error.js +21 -0
- package/dist/contracts/server/deferred-body.d.ts +65 -0
- package/dist/contracts/server/deferred-body.js +2 -0
- package/dist/contracts/server/failure-copy.d.ts +19 -0
- package/dist/contracts/server/failure-copy.js +26 -0
- package/dist/contracts/server/json-route.d.ts +52 -26
- package/dist/contracts/server/json-route.js +128 -32
- package/dist/contracts/server/request-body.d.ts +12 -0
- package/dist/contracts/server/request-body.js +8 -4
- package/dist/contracts/server/route-reply.d.ts +32 -0
- package/dist/contracts/server/route-reply.js +26 -0
- package/dist/contracts/server.d.ts +4 -0
- package/dist/contracts/server.js +4 -0
- package/dist/contracts/site/admin-sites.d.ts +134 -0
- package/dist/contracts/site/admin-sites.js +7 -0
- package/dist/contracts/site/admin-surfaces-connections.d.ts +128 -0
- package/dist/contracts/site/admin-surfaces-connections.js +2 -0
- package/dist/contracts/site/agent-plugins-admin-surfaces.d.ts +218 -0
- package/dist/contracts/site/agent-plugins-admin-surfaces.js +2 -0
- package/dist/contracts/site/agent-plugins-connect.d.ts +25 -0
- package/dist/contracts/site/agent-plugins-connect.js +2 -0
- package/dist/contracts/site/agent-plugins-lifecycle.d.ts +151 -0
- package/dist/contracts/site/agent-plugins-lifecycle.js +2 -0
- package/dist/contracts/site/agent-plugins-manifest.d.ts +41 -0
- package/dist/contracts/site/agent-plugins-manifest.js +11 -0
- package/dist/contracts/site/agent-runtime.d.ts +110 -0
- package/dist/contracts/site/agent-runtime.js +2 -0
- package/dist/contracts/site/agentic-core.d.ts +44 -0
- package/dist/contracts/site/agentic-core.js +9 -0
- package/dist/contracts/site/agentic-dom.d.ts +27 -0
- package/dist/contracts/site/agentic-dom.js +2 -0
- package/dist/contracts/site/agentic.d.ts +37 -0
- package/dist/contracts/site/agentic.js +8 -0
- package/dist/contracts/site/analytics.d.ts +81 -0
- package/dist/contracts/site/analytics.js +2 -0
- package/dist/contracts/site/api-ai-assistant-api-types.d.ts +182 -0
- package/dist/contracts/site/api-ai-assistant-api-types.js +2 -0
- package/dist/contracts/site/api-connections-hosted-mcp.d.ts +176 -0
- package/dist/contracts/site/api-connections-hosted-mcp.js +2 -0
- package/dist/contracts/site/api-security-api-types.d.ts +177 -0
- package/dist/contracts/site/api-security-api-types.js +2 -0
- package/dist/contracts/site/approval-i18n.d.ts +32 -0
- package/dist/contracts/site/approval-i18n.js +156 -0
- package/dist/contracts/site/asset-transfer-tool-ports.d.ts +54 -0
- package/dist/contracts/site/asset-transfer-tool-ports.js +2 -0
- package/dist/contracts/site/assistant-host-ports.d.ts +23 -0
- package/dist/contracts/site/assistant-host-ports.js +2 -0
- package/dist/contracts/site/assistant-mcp-services.d.ts +26 -0
- package/dist/contracts/site/assistant-mcp-services.js +8 -0
- package/dist/contracts/site/assistant-tool-contributions.d.ts +45 -0
- package/dist/contracts/site/assistant-tool-contributions.js +2 -0
- package/dist/contracts/site/chat-core.d.ts +93 -0
- package/dist/contracts/site/chat-core.js +13 -0
- package/dist/contracts/site/client-directives.d.ts +21 -0
- package/dist/contracts/site/client-directives.js +8 -0
- package/dist/contracts/site/cms-admin-media.d.ts +61 -0
- package/dist/contracts/site/cms-admin-media.js +7 -0
- package/dist/contracts/site/cms-agent-plugins.d.ts +114 -0
- package/dist/contracts/site/cms-agent-plugins.js +17 -0
- package/dist/contracts/site/cms-assistant.d.ts +74 -0
- package/dist/contracts/site/cms-assistant.js +17 -0
- package/dist/contracts/site/cms-core.d.ts +17 -0
- package/dist/contracts/site/cms-core.js +12 -0
- package/dist/contracts/site/cms-external-mcp.d.ts +206 -0
- package/dist/contracts/site/cms-external-mcp.js +13 -0
- package/dist/contracts/site/cms-forms.d.ts +192 -0
- package/dist/contracts/site/cms-forms.js +15 -0
- package/dist/contracts/site/cms-integrations.d.ts +47 -0
- package/dist/contracts/site/cms-integrations.js +8 -0
- package/dist/contracts/site/cms-mail.d.ts +39 -0
- package/dist/contracts/site/cms-mail.js +12 -0
- package/dist/contracts/site/cms-media.d.ts +464 -0
- package/dist/contracts/site/cms-media.js +3 -0
- package/dist/contracts/site/cms-menus.d.ts +109 -0
- package/dist/contracts/site/cms-menus.js +13 -0
- package/dist/contracts/site/cms-plugins.d.ts +81 -0
- package/dist/contracts/site/cms-plugins.js +13 -0
- package/dist/contracts/site/cms-publish-content.d.ts +129 -0
- package/dist/contracts/site/cms-publish-content.js +13 -0
- package/dist/contracts/site/cms-recovery.d.ts +37 -0
- package/dist/contracts/site/cms-recovery.js +13 -0
- package/dist/contracts/site/cms-seo.d.ts +124 -0
- package/dist/contracts/site/cms-seo.js +17 -0
- package/dist/contracts/site/cms-settings.d.ts +47 -0
- package/dist/contracts/site/cms-settings.js +15 -0
- package/dist/contracts/site/cms-sites.d.ts +24 -0
- package/dist/contracts/site/cms-sites.js +12 -0
- package/dist/contracts/site/cms-system-deploy.d.ts +37 -0
- package/dist/contracts/site/cms-system-deploy.js +9 -0
- package/dist/contracts/site/cms-trash.d.ts +235 -0
- package/dist/contracts/site/cms-trash.js +10 -0
- package/dist/contracts/site/cms-workspace.d.ts +14 -0
- package/dist/contracts/site/cms-workspace.js +7 -0
- package/dist/contracts/site/comments-providers.d.ts +187 -0
- package/dist/contracts/site/comments-providers.js +2 -0
- package/dist/contracts/site/commerce.d.ts +35 -0
- package/dist/contracts/site/commerce.js +12 -0
- package/dist/contracts/site/composition-provider-config-source.d.ts +46 -0
- package/dist/contracts/site/composition-provider-config-source.js +2 -0
- package/dist/contracts/site/content-editor-ports.d.ts +239 -0
- package/dist/contracts/site/content-editor-ports.js +2 -0
- package/dist/contracts/site/contracts-resources.d.ts +21 -0
- package/dist/contracts/site/contracts-resources.js +7 -0
- package/dist/contracts/site/cookie-consent-react.d.ts +44 -0
- package/dist/contracts/site/cookie-consent-react.js +8 -0
- package/dist/contracts/site/cookie-consent.d.ts +100 -0
- package/dist/contracts/site/cookie-consent.js +9 -0
- package/dist/contracts/site/core-commands.d.ts +66 -0
- package/dist/contracts/site/core-commands.js +15 -0
- package/dist/contracts/site/core-consent-refusal.d.ts +7 -0
- package/dist/contracts/site/core-consent-refusal.js +2 -0
- package/dist/contracts/site/core-custom-credential-categories.d.ts +14 -0
- package/dist/contracts/site/core-custom-credential-categories.js +7 -0
- package/dist/contracts/site/core-public-page-security-headers.d.ts +13 -0
- package/dist/contracts/site/core-public-page-security-headers.js +3 -0
- package/dist/contracts/site/core-run-events.d.ts +49 -0
- package/dist/contracts/site/core-run-events.js +11 -0
- package/dist/contracts/site/core-runtime-mode.d.ts +9 -0
- package/dist/contracts/site/core-runtime-mode.js +2 -0
- package/dist/contracts/site/core-theme-slots.d.ts +31 -0
- package/dist/contracts/site/core-theme-slots.js +3 -0
- package/dist/contracts/site/credential-project-half.d.ts +18 -0
- package/dist/contracts/site/credential-project-half.js +2 -0
- package/dist/contracts/site/custom-credential-publish-compatibility.d.ts +11 -0
- package/dist/contracts/site/custom-credential-publish-compatibility.js +2 -0
- package/dist/contracts/site/daemon-core-rpc.d.ts +114 -0
- package/dist/contracts/site/daemon-core-rpc.js +2 -0
- package/dist/contracts/site/daemon-http.d.ts +197 -0
- package/dist/contracts/site/daemon-http.js +11 -0
- package/dist/contracts/site/daemon-surface-exchanges.d.ts +46 -0
- package/dist/contracts/site/daemon-surface-exchanges.js +2 -0
- package/dist/contracts/site/daemon-tool-audit.d.ts +43 -0
- package/dist/contracts/site/daemon-tool-audit.js +9 -0
- package/dist/contracts/site/daemon-tool-recovery.d.ts +36 -0
- package/dist/contracts/site/daemon-tool-recovery.js +9 -0
- package/dist/contracts/site/daemon.d.ts +45 -0
- package/dist/contracts/site/daemon.js +2 -0
- package/dist/contracts/site/database-introspection.d.ts +46 -0
- package/dist/contracts/site/database-introspection.js +2 -0
- package/dist/contracts/site/db-data-modules.d.ts +61 -0
- package/dist/contracts/site/db-data-modules.js +6 -0
- package/dist/contracts/site/deployment-admin.d.ts +74 -0
- package/dist/contracts/site/deployment-admin.js +2 -0
- package/dist/contracts/site/dev-supervisor-dev-restart.d.ts +26 -0
- package/dist/contracts/site/dev-supervisor-dev-restart.js +10 -0
- package/dist/contracts/site/devops-deploy.d.ts +77 -0
- package/dist/contracts/site/devops-deploy.js +9 -0
- package/dist/contracts/site/diagnostics-domain-dns.d.ts +10 -0
- package/dist/contracts/site/diagnostics-domain-dns.js +7 -0
- package/dist/contracts/site/diagnostics-observability.d.ts +66 -0
- package/dist/contracts/site/diagnostics-observability.js +2 -0
- package/dist/contracts/site/events-outbox.d.ts +56 -0
- package/dist/contracts/site/events-outbox.js +10 -0
- package/dist/contracts/site/export-run.d.ts +54 -0
- package/dist/contracts/site/export-run.js +9 -0
- package/dist/contracts/site/external-mcp-tool-ports.d.ts +30 -0
- package/dist/contracts/site/external-mcp-tool-ports.js +2 -0
- package/dist/contracts/site/fs-durable-json.d.ts +22 -0
- package/dist/contracts/site/fs-durable-json.js +7 -0
- package/dist/contracts/site/gated-mutations/watermark.d.ts +44 -0
- package/dist/contracts/site/gated-mutations/watermark.js +37 -0
- package/dist/contracts/site/gated-mutations-ports.d.ts +45 -0
- package/dist/contracts/site/gated-mutations-ports.js +6 -0
- package/dist/contracts/site/gated-results.d.ts +17 -0
- package/dist/contracts/site/gated-results.js +8 -0
- package/dist/contracts/site/headless-assistant-permanent-deletes-policy.d.ts +16 -0
- package/dist/contracts/site/headless-assistant-permanent-deletes-policy.js +8 -0
- package/dist/contracts/site/hooks-sites-port-hooks.d.ts +151 -0
- package/dist/contracts/site/hooks-sites-port-hooks.js +7 -0
- package/dist/contracts/site/host-node.d.ts +213 -0
- package/dist/contracts/site/host-node.js +2 -0
- package/dist/contracts/site/html-region-ports.d.ts +103 -0
- package/dist/contracts/site/html-region-ports.js +2 -0
- package/dist/contracts/site/http-kit-rate-limit.d.ts +21 -0
- package/dist/contracts/site/http-kit-rate-limit.js +8 -0
- package/dist/contracts/site/http-kit-settings.d.ts +12 -0
- package/dist/contracts/site/http-kit-settings.js +8 -0
- package/dist/contracts/site/human-confirm.d.ts +42 -0
- package/dist/contracts/site/human-confirm.js +2 -0
- package/dist/contracts/site/installed-skill.d.ts +16 -0
- package/dist/contracts/site/installed-skill.js +2 -0
- package/dist/contracts/site/integrations-api-connections.d.ts +19 -0
- package/dist/contracts/site/integrations-api-connections.js +7 -0
- package/dist/contracts/site/integrations-credentialed-http.d.ts +16 -0
- package/dist/contracts/site/integrations-credentialed-http.js +8 -0
- package/dist/contracts/site/legacy-owner-store.d.ts +15 -0
- package/dist/contracts/site/legacy-owner-store.js +5 -0
- package/dist/contracts/site/lifecycle-boot-lifecycle.d.ts +27 -0
- package/dist/contracts/site/lifecycle-boot-lifecycle.js +10 -0
- package/dist/contracts/site/lifecycle-host-tools.d.ts +64 -0
- package/dist/contracts/site/lifecycle-host-tools.js +2 -0
- package/dist/contracts/site/media-provider-contribution.d.ts +118 -0
- package/dist/contracts/site/media-provider-contribution.js +3 -0
- package/dist/contracts/site/media-providers-catalog.d.ts +42 -0
- package/dist/contracts/site/media-providers-catalog.js +7 -0
- package/dist/contracts/site/media-tool-ports.d.ts +170 -0
- package/dist/contracts/site/media-tool-ports.js +2 -0
- package/dist/contracts/site/media-upload-limits.d.ts +6 -0
- package/dist/contracts/site/media-upload-limits.js +7 -0
- package/dist/contracts/site/nav.d.ts +46 -0
- package/dist/contracts/site/nav.js +10 -0
- package/dist/contracts/site/oauth-callback-page.d.ts +47 -0
- package/dist/contracts/site/oauth-callback-page.js +31 -0
- package/dist/contracts/site/packaging-electron.d.ts +20 -0
- package/dist/contracts/site/packaging-electron.js +7 -0
- package/dist/contracts/site/page-html-store.d.ts +138 -0
- package/dist/contracts/site/page-html-store.js +2 -0
- package/dist/contracts/site/platform-mail.d.ts +221 -0
- package/dist/contracts/site/platform-mail.js +2 -0
- package/dist/contracts/site/platform-process.d.ts +23 -0
- package/dist/contracts/site/platform-process.js +7 -0
- package/dist/contracts/site/platform-server-logs.d.ts +51 -0
- package/dist/contracts/site/platform-server-logs.js +15 -0
- package/dist/contracts/site/platform-site-dir.d.ts +58 -0
- package/dist/contracts/site/platform-site-dir.js +7 -0
- package/dist/contracts/site/plugin-directory.d.ts +29 -0
- package/dist/contracts/site/plugin-directory.js +2 -0
- package/dist/contracts/site/plugins-host.d.ts +92 -0
- package/dist/contracts/site/plugins-host.js +2 -0
- package/dist/contracts/site/post-author.d.ts +8 -0
- package/dist/contracts/site/post-author.js +5 -0
- package/dist/contracts/site/post-kind.d.ts +10 -0
- package/dist/contracts/site/post-kind.js +2 -0
- package/dist/contracts/site/post-revision-lock.d.ts +17 -0
- package/dist/contracts/site/post-revision-lock.js +16 -0
- package/dist/contracts/site/project-key-attachments.d.ts +78 -0
- package/dist/contracts/site/project-key-attachments.js +2 -0
- package/dist/contracts/site/protocol-mcp-ui.d.ts +37 -0
- package/dist/contracts/site/protocol-mcp-ui.js +12 -0
- package/dist/contracts/site/public-origin.d.ts +9 -0
- package/dist/contracts/site/public-origin.js +22 -0
- package/dist/contracts/site/publish-ports.d.ts +42 -0
- package/dist/contracts/site/publish-ports.js +31 -0
- package/dist/contracts/site/recovery-operation-lock.d.ts +27 -0
- package/dist/contracts/site/recovery-operation-lock.js +11 -0
- package/dist/contracts/site/recovery-reconcile-interrupted-migration.d.ts +16 -0
- package/dist/contracts/site/recovery-reconcile-interrupted-migration.js +12 -0
- package/dist/contracts/site/request-facts.d.ts +28 -0
- package/dist/contracts/site/request-facts.js +28 -0
- package/dist/contracts/site/routines.d.ts +64 -0
- package/dist/contracts/site/routines.js +2 -0
- package/dist/contracts/site/sandbox-node-worker.d.ts +15 -0
- package/dist/contracts/site/sandbox-node-worker.js +9 -0
- package/dist/contracts/site/search.d.ts +181 -0
- package/dist/contracts/site/search.js +2 -0
- package/dist/contracts/site/secrets-credential-sets.d.ts +117 -0
- package/dist/contracts/site/secrets-credential-sets.js +2 -0
- package/dist/contracts/site/secrets-credential-token.d.ts +11 -0
- package/dist/contracts/site/secrets-credential-token.js +7 -0
- package/dist/contracts/site/seo-content-analysis.d.ts +18 -0
- package/dist/contracts/site/seo-content-analysis.js +7 -0
- package/dist/contracts/site/site-assistant-visitor-tools-management.d.ts +85 -0
- package/dist/contracts/site/site-assistant-visitor-tools-management.js +8 -0
- package/dist/contracts/site/site-import-history.d.ts +67 -0
- package/dist/contracts/site/site-import-history.js +2 -0
- package/dist/contracts/site/site-key.d.ts +133 -0
- package/dist/contracts/site/site-key.js +9 -0
- package/dist/contracts/site/site-serving-gate.d.ts +13 -0
- package/dist/contracts/site/site-serving-gate.js +22 -0
- package/dist/contracts/site/skill-install.d.ts +17 -0
- package/dist/contracts/site/skill-install.js +2 -0
- package/dist/contracts/site/skills-install.d.ts +21 -0
- package/dist/contracts/site/skills-install.js +7 -0
- package/dist/contracts/site/soft-delete.d.ts +13 -0
- package/dist/contracts/site/soft-delete.js +13 -0
- package/dist/contracts/site/source-control-credentials.d.ts +197 -0
- package/dist/contracts/site/source-control-credentials.js +2 -0
- package/dist/contracts/site/strict-base64.d.ts +30 -0
- package/dist/contracts/site/strict-base64.js +33 -0
- package/dist/contracts/site/tool-metadata-approval-policy.d.ts +13 -0
- package/dist/contracts/site/tool-metadata-approval-policy.js +2 -0
- package/dist/contracts/site/ui-sections.d.ts +27 -0
- package/dist/contracts/site/ui-sections.js +13 -0
- package/dist/contracts/site/user-management-react.d.ts +276 -0
- package/dist/contracts/site/user-management-react.js +9 -0
- package/dist/contracts/site/user-management-server.d.ts +104 -0
- package/dist/contracts/site/user-management-server.js +2 -0
- package/dist/contracts/site/user-management.d.ts +379 -0
- package/dist/contracts/site/user-management.js +2 -0
- package/dist/contracts/site/vault-context.d.ts +15 -0
- package/dist/contracts/site/vault-context.js +6 -0
- package/dist/contracts/site/vendor-credentials.d.ts +37 -0
- package/dist/contracts/site/vendor-credentials.js +2 -0
- package/dist/contracts/site/web-evidence-capture-budget.d.ts +16 -0
- package/dist/contracts/site/web-evidence-capture-budget.js +7 -0
- package/dist/contracts/site/web-evidence-playwright.d.ts +38 -0
- package/dist/contracts/site/web-evidence-playwright.js +9 -0
- package/dist/contracts/site/web-screenshot.d.ts +58 -0
- package/dist/contracts/site/web-screenshot.js +7 -0
- package/dist/contracts/site/widgets-html.d.ts +40 -0
- package/dist/contracts/site/widgets-html.js +7 -0
- package/dist/contracts/speech-transcription.d.ts +27 -0
- package/dist/contracts/speech-transcription.js +8 -0
- package/dist/contracts/standing-draft.d.ts +38 -0
- package/dist/contracts/standing-draft.js +2 -0
- package/dist/contracts/storage/cleanup-preview.d.ts +23 -0
- package/dist/contracts/storage/cleanup-preview.js +2 -0
- package/dist/contracts/storage/rows.d.ts +6 -2
- package/dist/contracts/storage/rows.js +3 -3
- package/dist/contracts/storage/sqlite-compaction.d.ts +108 -0
- package/dist/contracts/storage/sqlite-compaction.js +7 -0
- package/dist/contracts/storage.d.ts +2 -0
- package/dist/contracts/tool-result-block.d.ts +21 -0
- package/dist/contracts/tool-result-block.js +8 -0
- package/dist/contracts/vault/vendor-credential-sets.d.ts +12 -0
- package/dist/errors/catalog.js +3 -3
- package/dist/errors/reporter.d.ts +81 -13
- package/dist/errors/reporter.js +220 -32
- package/dist/errors/route-refusal.d.ts +29 -0
- package/dist/errors/route-refusal.js +25 -0
- package/dist/errors/testing.d.ts +6 -7
- package/dist/errors/testing.js +7 -4
- package/dist/extension-capability-vocabulary.d.ts +29 -0
- package/dist/extension-capability-vocabulary.js +31 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/keyset-cursor.d.ts +25 -0
- package/dist/keyset-cursor.js +20 -0
- package/dist/native-approval-memory.d.ts +22 -0
- package/dist/native-approval-memory.js +32 -0
- package/dist/net/public-dns-vocabulary.d.ts +17 -0
- package/dist/net/public-dns-vocabulary.js +14 -0
- package/dist/object-store.d.ts +7 -0
- package/dist/object-store.js +1 -0
- package/dist/operator-locale.d.ts +29 -0
- package/dist/operator-locale.js +27 -0
- package/dist/optimistic-concurrency.d.ts +23 -0
- package/dist/origin-validation.d.ts +7 -0
- package/dist/origin-validation.js +8 -1
- package/dist/primitives/creator-kind.d.ts +27 -0
- package/dist/primitives/creator-kind.js +20 -0
- package/dist/primitives/index.d.ts +2 -0
- package/dist/primitives/index.js +2 -0
- package/dist/primitives/lazy-proxy.d.ts +5 -0
- package/dist/primitives/lazy-proxy.js +17 -0
- package/dist/records.d.ts +1 -1
- package/dist/records.js +1 -1
- package/dist/redaction-collectors.js +84 -40
- package/dist/redaction-exact-secrets.js +4 -4
- package/dist/redaction-labels.d.ts +3 -1
- package/dist/redaction-labels.js +3 -3
- package/dist/redaction-patterns.d.ts +5 -2
- package/dist/redaction-patterns.js +19 -10
- package/dist/redaction-spans.d.ts +5 -1
- package/dist/redaction-spans.js +2 -2
- package/dist/redaction.d.ts +5 -0
- package/dist/redaction.js +5 -0
- package/dist/registration-kit.d.ts +12 -0
- package/dist/registration-kit.js +21 -4
- package/dist/scheduled-publish.d.ts +57 -0
- package/dist/scheduled-publish.js +33 -0
- package/dist/settings/ensure-definitions.d.ts +8 -0
- package/dist/settings/guarded-reads.d.ts +58 -0
- package/dist/settings/guarded-reads.js +48 -0
- package/dist/settings/index.d.ts +3 -2
- package/dist/settings/index.js +1 -0
- package/dist/settings/settings.d.ts +8 -0
- package/dist/settings/write-definition-rename.js +2 -2
- package/dist/settings/write-definition-retype.js +4 -4
- package/dist/settings/write-definition-status.js +4 -4
- package/dist/settings/write-service.d.ts +14 -6
- package/dist/settings/write-service.js +2 -2
- package/dist/surface-exchanges.d.ts +32 -1
- package/dist/text/descriptor-i18n.d.ts +4 -1
- package/dist/text/descriptor-i18n.js +4 -1
- package/dist/text/format-timestamp.js +3 -2
- package/dist/text/index.d.ts +3 -0
- package/dist/text/index.js +2 -0
- package/dist/text/merge-locale-overlays.d.ts +25 -0
- package/dist/text/merge-locale-overlays.js +23 -0
- package/dist/text/upload-limit-message.d.ts +19 -0
- package/dist/text/upload-limit-message.js +29 -0
- package/dist/tool-access-change.d.ts +12 -0
- package/dist/tool-access-change.js +6 -0
- package/dist/tool-metadata/agent-pause.d.ts +21 -0
- package/dist/tool-metadata/agent-pause.js +9 -0
- package/dist/tool-metadata/agent-plugins.d.ts +72 -0
- package/dist/tool-metadata/agent-plugins.js +54 -0
- package/dist/tool-metadata/analytics.d.ts +14 -0
- package/dist/tool-metadata/analytics.js +17 -0
- package/dist/tool-metadata/change-sets.d.ts +24 -0
- package/dist/tool-metadata/change-sets.js +19 -0
- package/dist/tool-metadata/comments.d.ts +105 -0
- package/dist/tool-metadata/comments.js +106 -0
- package/dist/tool-metadata/commerce.d.ts +30 -0
- package/dist/tool-metadata/commerce.js +11 -0
- package/dist/tool-metadata/consent.d.ts +57 -0
- package/dist/tool-metadata/consent.js +16 -0
- package/dist/tool-metadata/content-duplication.d.ts +13 -0
- package/dist/tool-metadata/content-duplication.js +14 -0
- package/dist/tool-metadata/content-types.d.ts +74 -0
- package/dist/tool-metadata/content-types.js +96 -0
- package/dist/tool-metadata/custom-credentials.d.ts +117 -0
- package/dist/tool-metadata/custom-credentials.js +105 -0
- package/dist/tool-metadata/database-transfer.d.ts +48 -0
- package/dist/tool-metadata/database-transfer.js +32 -0
- package/dist/tool-metadata/database.d.ts +90 -0
- package/dist/tool-metadata/database.js +111 -0
- package/dist/tool-metadata/deploy-ops.d.ts +99 -0
- package/dist/tool-metadata/deploy-ops.js +96 -0
- package/dist/tool-metadata/deployments.d.ts +101 -0
- package/dist/tool-metadata/deployments.js +81 -0
- package/dist/tool-metadata/domain-dns.d.ts +84 -0
- package/dist/tool-metadata/domain-dns.js +99 -0
- package/dist/tool-metadata/email-templates.d.ts +54 -0
- package/dist/tool-metadata/email-templates.js +41 -0
- package/dist/tool-metadata/entries.d.ts +54 -0
- package/dist/tool-metadata/entries.js +70 -0
- package/dist/tool-metadata/external-mcp.d.ts +86 -0
- package/dist/tool-metadata/external-mcp.js +80 -0
- package/dist/tool-metadata/files-copy.d.ts +14 -0
- package/dist/tool-metadata/files-copy.js +18 -0
- package/dist/tool-metadata/forms.d.ts +94 -0
- package/dist/tool-metadata/forms.js +117 -0
- package/dist/tool-metadata/frontend-control.d.ts +118 -0
- package/dist/tool-metadata/frontend-control.js +78 -0
- package/dist/tool-metadata/fs-files.d.ts +36 -0
- package/dist/tool-metadata/fs-files.js +46 -0
- package/dist/tool-metadata/identity.d.ts +184 -0
- package/dist/tool-metadata/identity.js +226 -0
- package/dist/tool-metadata/image-transform.d.ts +14 -0
- package/dist/tool-metadata/image-transform.js +18 -0
- package/dist/tool-metadata/mail-status.d.ts +132 -0
- package/dist/tool-metadata/mail-status.js +104 -0
- package/dist/tool-metadata/media-generation.d.ts +25 -0
- package/dist/tool-metadata/media-generation.js +30 -0
- package/dist/tool-metadata/media-import.d.ts +34 -0
- package/dist/tool-metadata/media-import.js +40 -0
- package/dist/tool-metadata/media-video-conversion.d.ts +19 -0
- package/dist/tool-metadata/media-video-conversion.js +20 -0
- package/dist/tool-metadata/media.d.ts +106 -0
- package/dist/tool-metadata/media.js +103 -0
- package/dist/tool-metadata/members.d.ts +71 -0
- package/dist/tool-metadata/members.js +69 -0
- package/dist/tool-metadata/navigation.d.ts +54 -0
- package/dist/tool-metadata/navigation.js +71 -0
- package/dist/tool-metadata/newsletter.d.ts +190 -0
- package/dist/tool-metadata/newsletter.js +246 -0
- package/dist/tool-metadata/observability.d.ts +13 -0
- package/dist/tool-metadata/observability.js +8 -0
- package/dist/tool-metadata/pages.d.ts +47 -0
- package/dist/tool-metadata/pages.js +67 -0
- package/dist/tool-metadata/permanent-delete.d.ts +139 -0
- package/dist/tool-metadata/permanent-delete.js +121 -0
- package/dist/tool-metadata/plugin-runtime.d.ts +144 -0
- package/dist/tool-metadata/plugin-runtime.js +88 -0
- package/dist/tool-metadata/post.d.ts +87 -0
- package/dist/tool-metadata/post.js +117 -0
- package/dist/tool-metadata/recovery.d.ts +65 -0
- package/dist/tool-metadata/recovery.js +78 -0
- package/dist/tool-metadata/redirects.d.ts +73 -0
- package/dist/tool-metadata/redirects.js +93 -0
- package/dist/tool-metadata/routines.d.ts +61 -0
- package/dist/tool-metadata/routines.js +40 -0
- package/dist/tool-metadata/search.d.ts +49 -0
- package/dist/tool-metadata/search.js +33 -0
- package/dist/tool-metadata/seo.d.ts +64 -0
- package/dist/tool-metadata/seo.js +83 -0
- package/dist/tool-metadata/server-logs.d.ts +14 -0
- package/dist/tool-metadata/server-logs.js +11 -0
- package/dist/tool-metadata/settings.d.ts +90 -0
- package/dist/tool-metadata/settings.js +117 -0
- package/dist/tool-metadata/site-backup.d.ts +84 -0
- package/dist/tool-metadata/site-backup.js +30 -0
- package/dist/tool-metadata/site-evidence.d.ts +13 -0
- package/dist/tool-metadata/site-evidence.js +10 -0
- package/dist/tool-metadata/site-guide.d.ts +18 -0
- package/dist/tool-metadata/site-guide.js +15 -0
- package/dist/tool-metadata/site-inspection.d.ts +44 -0
- package/dist/tool-metadata/site-inspection.js +53 -0
- package/dist/tool-metadata/site-update.d.ts +30 -0
- package/dist/tool-metadata/site-update.js +22 -0
- package/dist/tool-metadata/sites.d.ts +52 -0
- package/dist/tool-metadata/sites.js +55 -0
- package/dist/tool-metadata/skills.d.ts +13 -0
- package/dist/tool-metadata/skills.js +10 -0
- package/dist/tool-metadata/source-control.d.ts +26 -0
- package/dist/tool-metadata/source-control.js +23 -0
- package/dist/tool-metadata/trash.d.ts +32 -0
- package/dist/tool-metadata/trash.js +27 -0
- package/dist/tool-metadata/visitor-tools.d.ts +49 -0
- package/dist/tool-metadata/visitor-tools.js +12 -0
- package/dist/tool-metadata/web-screenshot.d.ts +14 -0
- package/dist/tool-metadata/web-screenshot.js +23 -0
- package/dist/tool-metadata/web.d.ts +14 -0
- package/dist/tool-metadata/web.js +21 -0
- package/dist/tool-metadata/webhooks.d.ts +65 -0
- package/dist/tool-metadata/webhooks.js +77 -0
- package/dist/tool-metadata/widgets.d.ts +124 -0
- package/dist/tool-metadata/widgets.js +161 -0
- package/dist/tool-metadata/workspace.d.ts +43 -0
- package/dist/tool-metadata/workspace.js +49 -0
- package/dist/tool-read-cards.d.ts +88 -0
- package/dist/tool-read-cards.js +158 -0
- package/dist/tool-registry.d.ts +25 -0
- package/package.json +1430 -5
|
@@ -115,7 +115,7 @@ export const API_KEY_QUERY = /([?&](?:key|api_key|api-key)=)[^&#\s,;"']+/gi;
|
|
|
115
115
|
// correlation ID uses uppercase hex and is meant to reach the model and be quoted to an
|
|
116
116
|
// operator; delegated-tool-calls is the route segment named in delegated tool failures.
|
|
117
117
|
// Matching the ENTIRE run keeps a secret glued onto either spelling redactable.
|
|
118
|
-
const SECRET_LABELS = 'authorization|bearer|api[-_]?key|access[-_]?token|refresh[-_]?token|client[-_]?secret|password|secret|cookie';
|
|
118
|
+
const SECRET_LABELS = 'authorization|bearer|api[-_]?key|access[-_]?token|refresh[-_]?token|id[-_]?token|auth[-_]?token|client[-_]?secret|signing[-_]?secret|webhook[-_]?secret|password|passwd|pwd|secret|cookie';
|
|
119
119
|
// Keep historical URL categories and the bounded sanitizer's vocabulary stable.
|
|
120
120
|
const SERIALIZED_SECRET_LABELS = `${SECRET_LABELS}|x[-_](?:goog[-_])?api[-_]?key|api key|token|set[-_]cookie|private[-_]?key`;
|
|
121
121
|
export const EMPTY_QUOTED_ASSIGNMENT_RE = new RegExp(`\\b(?:${SERIALIZED_SECRET_LABELS})\\s*[:=]\\s*$`, 'i');
|
|
@@ -143,36 +143,45 @@ export const CHAINED_LABEL_RE = new RegExp(`(?:${RUNTIME_SECRET_LABELS})\\b["']?
|
|
|
143
143
|
// The value is read in a lookahead so the scan resumes at it (`Bearer Bearer x` masks both),
|
|
144
144
|
// as the earlier lookbehind form did, without a lookbehind test at every position.
|
|
145
145
|
// Quotes and field delimiters end the value; punctuation such as `!` remains credential text.
|
|
146
|
-
export const SHORT_BEARER_RE = new RegExp(
|
|
147
|
-
|
|
146
|
+
export const SHORT_BEARER_RE = new RegExp(`\\bBearer\\s+["']?(?!${GENERATED_MARKER}(?=$|[\\s"',;<>}]))(?=([^\\s"',;<>}]+))`, 'gi');
|
|
147
|
+
// Digest credentials are a comma-separated parameter list; masking only the first word leaves
|
|
148
|
+
// quoted usernames, nonces and responses in provider failures. Stop before the next header.
|
|
149
|
+
const DIGEST_PARAMETER = `[\\w-]+[ \\t]*=[ \\t]*(?:${QUOTED_SECRET_VALUE}|[^\\s"',;}]+)`;
|
|
150
|
+
const CUSTOM_AUTH_HEADER_NAME = 'x-(?:[a-z0-9]+-)*(?:auth(?:orization)?|key|token|secret|credential)';
|
|
151
|
+
export const NON_BEARER_AUTH_RE = new RegExp(`(?<![\\w-])(?:(?:proxy-)?authorization|${CUSTOM_AUTH_HEADER_NAME})["']?\\s*[:=]\\s*["']?((?:Basic|Token|ApiKey)\\s+[^\\s"',;}]+|Digest[ \\t]+${DIGEST_PARAMETER}(?:,[ \\t]*${DIGEST_PARAMETER})*)`, 'gi');
|
|
152
|
+
// Only credential-named custom headers carry authority; X-Request-Id and other labels stay readable.
|
|
153
|
+
export const CUSTOM_AUTH_HEADER_RE = new RegExp(`(?<![\\w-])(["']?)(${CUSTOM_AUTH_HEADER_NAME})\\1\\s*[:=]\\s*(${QUOTED_SECRET_VALUE}|[^\\s,"';}]+)`, 'gi');
|
|
148
154
|
// Cookie pairs belong to one header value, including pairs after a semicolon and a space.
|
|
149
155
|
export const COOKIE_HEADER_RE = /\bcookie\s*:\s*([^\r\n]+)/gi;
|
|
150
156
|
export const PROVIDER_API_KEY_QUERY = /([?&]key=)([^&\s"']+)/gi;
|
|
151
157
|
// URL userinfo and signed query values have explicit credential context; unlike opaque runs,
|
|
152
158
|
// they are safe to recognize in the conservative policy. Keep scheme/host and query names
|
|
153
159
|
// readable for debugging without exposing credentials that authorize access to the resource.
|
|
154
|
-
// Matching starts at `//` and reads
|
|
160
|
+
// Matching starts at `//` and reads userinfo through the LAST `@` within the authority: unescaped
|
|
161
|
+
// at-signs in a password must not leave its suffix visible. No scheme
|
|
155
162
|
// scan is needed, so a scheme of any length (glued text included) cannot hide its userinfo:
|
|
156
163
|
// an unbounded scheme run rescanned the suffix from every start
|
|
157
164
|
// (`'a.'.repeat(20000)` blocked ~3.6 s), trying a bounded scheme at every position cost ~2 s on
|
|
158
165
|
// 10 MiB of `'eyJ-'`, and a 32-character scheme lookbehind missed longer schemes.
|
|
159
166
|
// The same authority syntax also appears in scheme-relative URLs (`//user:pw@host`).
|
|
160
|
-
export const URL_CREDENTIALS_RE = /\/\/([^/\s
|
|
167
|
+
export const URL_CREDENTIALS_RE = /\/\/([^/\s?#]+)@/g;
|
|
161
168
|
export const SIGNED_QUERY_RE = /([?&](?:signature|sig|x-amz-signature|x-goog-signature|access_token|refresh_token)=)([^&#\s,;"']+)/gi;
|
|
162
169
|
// A secret word must END a name segment (split at . _ - or the name's end): api_key, apiKey,
|
|
163
170
|
// authtoken, X-Amz-Signature and custom.Token-value are masked, while author, keyword, design,
|
|
164
|
-
// signup and page stay readable.
|
|
165
|
-
//
|
|
171
|
+
// signup and page stay readable. Code parameters require an explicit credential name: zipcode
|
|
172
|
+
// and error_code are ordinary diagnostics, while authorization/activation codes grant access.
|
|
173
|
+
// Other names that end in a secret word (monkey) retain the historical policy. Empty values stay.
|
|
166
174
|
// Match through a trailing fragment; field separators (&/;), quotes, parentheses or whitespace end it.
|
|
167
175
|
// Both name runs are bounded so a long separator-free run costs linear time, not quadratic.
|
|
168
|
-
const URL_SECRET_WORDS = 'token|key|secret|signature|sig|
|
|
169
|
-
|
|
176
|
+
const URL_SECRET_WORDS = 'token|key|secret|signature|sig|password|passwd|pwd|auth|authorization|credential';
|
|
177
|
+
const URL_CODE_NAME = '(?:(?:activation|authorization|auth|device|user|recovery)[._-])?code';
|
|
178
|
+
export const URL_SECRET_PARAM_RE = new RegExp(`[?&#;]([\\w.-]{0,128}?(?:${URL_SECRET_WORDS})s?(?=[._=-])[\\w.-]{0,128}|${URL_CODE_NAME})=[^&;\\s"'<>()]+`, 'gi');
|
|
170
179
|
// A parameter the labeled rule already names (password, client_secret, ...) keeps that category.
|
|
171
180
|
export const LABELED_URL_PARAM_NAME_RE = new RegExp(`(?:^|[.-])(?:${SECRET_LABELS})$`, 'i');
|
|
172
181
|
// Only an entire generated marker is already masked. A secret glued onto marker-like text still
|
|
173
182
|
// needs masking; a substring check would preserve credential suffixes in echoed header/query values.
|
|
174
183
|
const MASKED_VALUE_RE = new RegExp(`^["']?${GENERATED_MARKER}["']?$`);
|
|
175
|
-
export function isMaskedValue(value) {
|
|
184
|
+
export function isMaskedValue({ value }, _optional = {}) {
|
|
176
185
|
return MASKED_VALUE_RE.test(value);
|
|
177
186
|
}
|
|
178
187
|
//# sourceMappingURL=redaction-patterns.js.map
|
|
@@ -21,7 +21,11 @@ export declare function mergeSpans(spans: readonly Span[], { keepAdjacent }?: {
|
|
|
21
21
|
keepAdjacent?: boolean | undefined;
|
|
22
22
|
}): Span[];
|
|
23
23
|
/** Adds one span per match of `regex`; `spanOf` maps a match to its value range, or skips it. */
|
|
24
|
-
export declare function collectMatches({ text, add }
|
|
24
|
+
export declare function collectMatches({ pass: { text, add }, regex, spanOf }: {
|
|
25
|
+
pass: SpanPass;
|
|
26
|
+
regex: RegExp;
|
|
27
|
+
spanOf: (match: RegExpMatchArray, index: number) => Span | undefined;
|
|
28
|
+
}, _optional?: Record<string, never>): void;
|
|
25
29
|
/** Span of the match's trailing capture `group`, unless that value is already a generated marker
|
|
26
30
|
* (already masked values are not new credentials and should not inflate the audit count). */
|
|
27
31
|
export declare function trailingValue({ category, group }: {
|
package/dist/redaction-spans.js
CHANGED
|
@@ -59,7 +59,7 @@ function orderedSpanRanks({ spans }) {
|
|
|
59
59
|
return ranks;
|
|
60
60
|
}
|
|
61
61
|
/** Adds one span per match of `regex`; `spanOf` maps a match to its value range, or skips it. */
|
|
62
|
-
export function collectMatches({ text, add }, regex, spanOf) {
|
|
62
|
+
export function collectMatches({ pass: { text, add }, regex, spanOf }, _optional = {}) {
|
|
63
63
|
// Clone so a caller-owned or shared regex never carries lastIndex state across requests;
|
|
64
64
|
// non-global extra patterns use the same every-occurrence contract as the built-ins.
|
|
65
65
|
const flags = regex.flags.includes('g') ? regex.flags : `${regex.flags}g`;
|
|
@@ -74,7 +74,7 @@ export function collectMatches({ text, add }, regex, spanOf) {
|
|
|
74
74
|
export function trailingValue({ category, group }, _optional = {}) {
|
|
75
75
|
return (match, index) => {
|
|
76
76
|
const value = match[group] ?? '';
|
|
77
|
-
if (isMaskedValue(value))
|
|
77
|
+
if (isMaskedValue({ value }))
|
|
78
78
|
return undefined;
|
|
79
79
|
const end = index + match[0].length;
|
|
80
80
|
return { start: end - value.length, end, category };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Redaction and secret-pattern vocabulary without the core composition/tool barrel. */
|
|
2
|
+
export { redactSecrets, redactSecretsWithCounts } from './redact.js';
|
|
3
|
+
export { SECRET_SHAPE_PATTERNS, PEM_PATTERN_NAME, type SecretShapePattern, } from './secret-shapes.js';
|
|
4
|
+
export { GENERATED_MARKER_RE, LABELED_SECRET_RE, OPAQUE_TOKEN_RE, NON_SECRET_TOKEN_RE, type SecretRedactionPattern, type SecretRedactionOptions, } from './redaction-patterns.js';
|
|
5
|
+
//# sourceMappingURL=redaction.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Redaction and secret-pattern vocabulary without the core composition/tool barrel. */
|
|
2
|
+
export { redactSecrets, redactSecretsWithCounts } from './redact.js';
|
|
3
|
+
export { SECRET_SHAPE_PATTERNS, PEM_PATTERN_NAME, } from './secret-shapes.js';
|
|
4
|
+
export { GENERATED_MARKER_RE, LABELED_SECRET_RE, OPAQUE_TOKEN_RE, NON_SECRET_TOKEN_RE, } from './redaction-patterns.js';
|
|
5
|
+
//# sourceMappingURL=redaction.js.map
|
|
@@ -360,4 +360,16 @@ export declare function mergeDerivedRiskMaps(requiredArgs: {
|
|
|
360
360
|
risk: DerivedRiskByToolId;
|
|
361
361
|
}[];
|
|
362
362
|
}, optionalArgs?: Record<string, never>): DerivedRiskByToolId;
|
|
363
|
+
/**
|
|
364
|
+
* Refuses any input key outside `allowed`. For the confirm-gated tools a stray `confirm: true` or
|
|
365
|
+
* `confirmationToken` is refused out loud, so the model is never left thinking it counted.
|
|
366
|
+
*
|
|
367
|
+
* @throws {ToolInputError} Naming the first unexpected key.
|
|
368
|
+
* @complexity O(k) in the input's key count.
|
|
369
|
+
*/
|
|
370
|
+
export declare function refuseUnexpectedKeys({ input, allowed }: {
|
|
371
|
+
input: Record<string, unknown>;
|
|
372
|
+
allowed: readonly string[];
|
|
373
|
+
}, _optional?: {}): void;
|
|
374
|
+
export declare const refuseUnexpectedKeysPort: (input: Record<string, unknown>, allowed: readonly string[]) => void;
|
|
363
375
|
//# sourceMappingURL=registration-kit.d.ts.map
|
package/dist/registration-kit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isRecord } from "./records.js";
|
|
1
|
+
import { isNonArrayRecord, isRecord } from "./records.js";
|
|
2
2
|
export { isRecord, isNonArrayRecord } from "./records.js";
|
|
3
3
|
/**
|
|
4
4
|
* @file The cross-domain half of the agent-tool wiring split: everything a domain's own
|
|
@@ -106,7 +106,8 @@ export function indexCatalogById(required, _optional = {}) {
|
|
|
106
106
|
export function requireInputRecord(required, _optional = {}) {
|
|
107
107
|
const { input } = required;
|
|
108
108
|
const candidate = { value: input };
|
|
109
|
-
|
|
109
|
+
// Tool arguments follow an object schema; the general isRecord predicate also admits arrays.
|
|
110
|
+
if (!isNonArrayRecord(candidate))
|
|
110
111
|
throw new ToolInputError({ message: "input must be an object" });
|
|
111
112
|
return candidate.value;
|
|
112
113
|
}
|
|
@@ -299,14 +300,16 @@ export async function withSchemaOnRejection(spec, _optional = {}) {
|
|
|
299
300
|
*/
|
|
300
301
|
export function decorateWithSchema(params) {
|
|
301
302
|
const schema = params.catalog.get(params.toolId)?.inputSchema;
|
|
303
|
+
// Domain refusals may already be sentences; append guidance without doubling their punctuation.
|
|
304
|
+
const message = /[.!?]$/.test(params.message) ? params.message : `${params.message}.`;
|
|
302
305
|
// A `ToolInputError`, not a plain `Error`: every rejection reaching here already passed the
|
|
303
306
|
// caller's own `isShapeRejection` predicate — "a DIFFERENT input would fix this" — which is
|
|
304
307
|
// exactly what the marker means. `@jini-ai/daemon`'s `ToolExecutor` reads it off the thrown error
|
|
305
308
|
// to tag the execution result `errorKind: 'validation'` rather than folding it into the same
|
|
306
309
|
// redacted-500 bucket a genuine internal failure gets.
|
|
307
310
|
return new ToolInputError({ message: schema
|
|
308
|
-
? `${
|
|
309
|
-
: `${
|
|
311
|
+
? `${message} ${RETRY_IS_FUTILE} Schema for '${params.toolId}': ${JSON.stringify(schema)}`
|
|
312
|
+
: `${message} ${RETRY_IS_FUTILE}` });
|
|
310
313
|
}
|
|
311
314
|
// ---------------------------------------------------------------------------
|
|
312
315
|
// Build-time gates
|
|
@@ -482,4 +485,18 @@ export function mergeDerivedRiskMaps(requiredArgs, optionalArgs = {}) {
|
|
|
482
485
|
}
|
|
483
486
|
return merged;
|
|
484
487
|
}
|
|
488
|
+
/**
|
|
489
|
+
* Refuses any input key outside `allowed`. For the confirm-gated tools a stray `confirm: true` or
|
|
490
|
+
* `confirmationToken` is refused out loud, so the model is never left thinking it counted.
|
|
491
|
+
*
|
|
492
|
+
* @throws {ToolInputError} Naming the first unexpected key.
|
|
493
|
+
* @complexity O(k) in the input's key count.
|
|
494
|
+
*/
|
|
495
|
+
export function refuseUnexpectedKeys({ input, allowed }, _optional = {}) {
|
|
496
|
+
const extra = Object.keys(input).find((key) => !allowed.includes(key));
|
|
497
|
+
if (extra !== undefined) {
|
|
498
|
+
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.` });
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
export const refuseUnexpectedKeysPort = (input, allowed) => refuseUnexpectedKeys({ input, allowed });
|
|
485
502
|
//# 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
|
package/dist/settings/index.d.ts
CHANGED
|
@@ -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
|
package/dist/settings/index.js
CHANGED
|
@@ -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
|
|
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
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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?:
|
|
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>>>>;
|