@noodleseed/one 0.152.0 → 0.153.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-product-skill-state.d.ts +2 -2
- package/dist/agent-product-skill-state.d.ts.map +1 -1
- package/dist/agent-product-skill-state.js.map +1 -1
- package/dist/agent-skills-state.d.ts +2 -2
- package/dist/agent-skills-state.d.ts.map +1 -1
- package/dist/agent-skills-state.js +1 -1
- package/dist/agent-skills-state.js.map +1 -1
- package/dist/agents.d.ts +2 -3
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js.map +1 -1
- package/dist/checklist.d.ts +2 -1
- package/dist/checklist.d.ts.map +1 -1
- package/dist/commands/apps-ops.d.ts +0 -4
- package/dist/commands/apps-ops.d.ts.map +1 -1
- package/dist/commands/apps-ops.js +3 -3
- package/dist/commands/apps-ops.js.map +1 -1
- package/dist/commands/auth-ops.d.ts +0 -14
- package/dist/commands/auth-ops.d.ts.map +1 -1
- package/dist/commands/auth-ops.js +1 -1
- package/dist/commands/auth-ops.js.map +1 -1
- package/dist/commands/author-loop.d.ts +0 -2
- package/dist/commands/author-loop.d.ts.map +1 -1
- package/dist/commands/author-loop.js +2 -2
- package/dist/commands/author-loop.js.map +1 -1
- package/dist/commands/catalog.d.ts +1 -7
- package/dist/commands/catalog.d.ts.map +1 -1
- package/dist/commands/catalog.js +3 -3
- package/dist/commands/catalog.js.map +1 -1
- package/dist/commands/config-values.d.ts +1 -47
- package/dist/commands/config-values.d.ts.map +1 -1
- package/dist/commands/config-values.js +11 -11
- package/dist/commands/config-values.js.map +1 -1
- package/dist/commands/connect-oauth.d.ts +0 -1
- package/dist/commands/connect-oauth.d.ts.map +1 -1
- package/dist/commands/connect-oauth.js +1 -1
- package/dist/commands/connect-oauth.js.map +1 -1
- package/dist/commands/connect.d.ts +0 -1
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/connect.js +1 -1
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/customer-auth-smoke.d.ts +2 -1
- package/dist/commands/customer-auth-smoke.d.ts.map +1 -1
- package/dist/commands/customer-auth-smoke.js +3 -2
- package/dist/commands/customer-auth-smoke.js.map +1 -1
- package/dist/commands/deploy-ops.d.ts +0 -9
- package/dist/commands/deploy-ops.d.ts.map +1 -1
- package/dist/commands/deploy-ops.js +3 -4
- package/dist/commands/deploy-ops.js.map +1 -1
- package/dist/commands/deploy-resume.d.ts +0 -1
- package/dist/commands/deploy-resume.d.ts.map +1 -1
- package/dist/commands/deploy-resume.js +1 -1
- package/dist/commands/deploy-resume.js.map +1 -1
- package/dist/commands/deploy-version-resolution.d.ts +0 -2
- package/dist/commands/deploy-version-resolution.d.ts.map +1 -1
- package/dist/commands/deploy-version-resolution.js +1 -1
- package/dist/commands/deploy-version-resolution.js.map +1 -1
- package/dist/commands/deployments-ops.d.ts +0 -2
- package/dist/commands/deployments-ops.d.ts.map +1 -1
- package/dist/commands/deployments-ops.js +2 -2
- package/dist/commands/deployments-ops.js.map +1 -1
- package/dist/commands/envs-ops.d.ts +0 -3
- package/dist/commands/envs-ops.d.ts.map +1 -1
- package/dist/commands/envs-ops.js +3 -3
- package/dist/commands/envs-ops.js.map +1 -1
- package/dist/commands/feedback-ops.d.ts +0 -8
- package/dist/commands/feedback-ops.d.ts.map +1 -1
- package/dist/commands/feedback-ops.js +1 -1
- package/dist/commands/feedback-ops.js.map +1 -1
- package/dist/commands/github-ops.d.ts +0 -2
- package/dist/commands/github-ops.d.ts.map +1 -1
- package/dist/commands/github-ops.js +2 -2
- package/dist/commands/github-ops.js.map +1 -1
- package/dist/commands/mcp-apps.d.ts +0 -1
- package/dist/commands/mcp-apps.d.ts.map +1 -1
- package/dist/commands/org-admin.d.ts +0 -17
- package/dist/commands/org-admin.d.ts.map +1 -1
- package/dist/commands/org-admin.js +1 -2
- package/dist/commands/org-admin.js.map +1 -1
- package/dist/commands/output.d.ts +3 -12
- package/dist/commands/output.d.ts.map +1 -1
- package/dist/commands/output.js.map +1 -1
- package/dist/commands/platform-account-reset-files.d.ts +0 -3
- package/dist/commands/platform-account-reset-files.d.ts.map +1 -1
- package/dist/commands/platform-account-reset-files.js +1 -1
- package/dist/commands/platform-account-reset-files.js.map +1 -1
- package/dist/commands/platform-auth-rollout-acceleration-files.d.ts +0 -3
- package/dist/commands/platform-auth-rollout-acceleration-files.d.ts.map +1 -1
- package/dist/commands/platform-auth-rollout-acceleration-files.js +1 -1
- package/dist/commands/platform-auth-rollout-acceleration-files.js.map +1 -1
- package/dist/commands/project-setup.d.ts +0 -1
- package/dist/commands/project-setup.d.ts.map +1 -1
- package/dist/commands/project-setup.js +1 -1
- package/dist/commands/project-setup.js.map +1 -1
- package/dist/commands/resource-shared.d.ts +0 -6
- package/dist/commands/resource-shared.d.ts.map +1 -1
- package/dist/commands/resource-shared.js +1 -1
- package/dist/commands/resource-shared.js.map +1 -1
- package/dist/commands/session.d.ts +3 -13
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +2 -2
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/target-picker.d.ts +0 -2
- package/dist/commands/target-picker.d.ts.map +1 -1
- package/dist/commands/target-picker.js +1 -1
- package/dist/commands/target-picker.js.map +1 -1
- package/dist/commands/update-ops.d.ts +0 -8
- package/dist/commands/update-ops.d.ts.map +1 -1
- package/dist/commands/update-ops.js +1 -1
- package/dist/commands/update-ops.js.map +1 -1
- package/dist/control-plane.d.ts +1 -1
- package/dist/control-plane.d.ts.map +1 -1
- package/dist/control-plane.js.map +1 -1
- package/dist/deploy.d.ts +0 -12
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +2 -2
- package/dist/deploy.js.map +1 -1
- package/dist/dev.d.ts.map +1 -1
- package/dist/dev.js +2 -3
- package/dist/dev.js.map +1 -1
- package/dist/devtools-auth-session.d.ts +0 -1
- package/dist/devtools-auth-session.d.ts.map +1 -1
- package/dist/devtools-auth-session.js.map +1 -1
- package/dist/devtools-chat.d.ts +1 -1
- package/dist/devtools-chat.d.ts.map +1 -1
- package/dist/devtools-chat.js.map +1 -1
- package/dist/devtools-delegated-exchange-state.d.ts +1 -1
- package/dist/devtools-delegated-exchange-state.d.ts.map +1 -1
- package/dist/devtools-design-contract.d.ts +3 -3
- package/dist/devtools-design-contract.d.ts.map +1 -1
- package/dist/devtools-design-contract.js +1 -1
- package/dist/devtools-design-contract.js.map +1 -1
- package/dist/devtools-preview.d.ts +1 -1
- package/dist/devtools-preview.d.ts.map +1 -1
- package/dist/devtools-rpc-forwarder.d.ts +2 -1
- package/dist/devtools-rpc-forwarder.d.ts.map +1 -1
- package/dist/devtools-rpc-forwarder.js +11 -12
- package/dist/devtools-rpc-forwarder.js.map +1 -1
- package/dist/gradient.d.ts +0 -3
- package/dist/gradient.d.ts.map +1 -1
- package/dist/gradient.js +1 -3
- package/dist/gradient.js.map +1 -1
- package/dist/local-compile.d.ts +2 -1
- package/dist/local-compile.d.ts.map +1 -1
- package/dist/local-target.d.ts +2 -1
- package/dist/local-target.d.ts.map +1 -1
- package/dist/node-version.d.ts +0 -2
- package/dist/node-version.d.ts.map +1 -1
- package/dist/node-version.js +2 -2
- package/dist/node-version.js.map +1 -1
- package/dist/plugin-mode/build-readiness-tools.d.ts +5 -4
- package/dist/plugin-mode/build-readiness-tools.d.ts.map +1 -1
- package/dist/plugin-mode/plugin-operation-contract.d.ts +0 -35
- package/dist/plugin-mode/plugin-operation-contract.d.ts.map +1 -1
- package/dist/plugin-mode/plugin-operation-contract.js +1 -1
- package/dist/plugin-mode/plugin-operation-contract.js.map +1 -1
- package/dist/project-entrypoint.d.ts +2 -1
- package/dist/project-entrypoint.d.ts.map +1 -1
- package/dist/project.d.ts +3 -3
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js.map +1 -1
- package/dist/skills-update.d.ts +0 -1
- package/dist/skills-update.d.ts.map +1 -1
- package/dist/skills-update.js +1 -1
- package/dist/skills-update.js.map +1 -1
- package/dist/status.d.ts +0 -9
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +0 -16
- package/dist/status.js.map +1 -1
- package/dist/update-binary.d.ts +3 -2
- package/dist/update-binary.d.ts.map +1 -1
- package/dist/update-check.d.ts +0 -3
- package/dist/update-check.d.ts.map +1 -1
- package/dist/update-check.js +1 -1
- package/dist/update-check.js.map +1 -1
- package/dist/validate.d.ts +2 -1
- package/dist/validate.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js +5 -3
- package/node_modules/@noodle-borg/agent-kit/dist/plugin-bootstrap-skill.d.ts +0 -2
- package/node_modules/@noodle-borg/agent-kit/dist/plugin-bootstrap-skill.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/plugin-bundle.d.ts +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js +5 -5
- package/node_modules/@noodle-borg/agent-kit/dist/skill-router.d.ts +2 -3
- package/node_modules/@noodle-borg/agent-kit/dist/skill-router.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/node_modules/@noodle-borg/agent-packaging/dist/host-package-assets.js +1 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-configuration.js +2 -1
- package/node_modules/@noodle-borg/assistant-gateway/package.json +1 -1
- package/node_modules/@noodle-borg/authoring/dist/assistant.d.ts +2 -1
- package/node_modules/@noodle-borg/authoring/dist/connections.d.ts +0 -2
- package/node_modules/@noodle-borg/authoring/dist/connections.js +1 -1
- package/node_modules/@noodle-borg/authoring/dist/load-authored.js +2 -2
- package/node_modules/@noodle-borg/authoring/dist/react/bridge.d.ts +3 -2
- package/node_modules/@noodle-borg/authoring/dist/react/form-components.d.ts +0 -8
- package/node_modules/@noodle-borg/authoring/dist/react/form-components.js +2 -4
- package/node_modules/@noodle-borg/authoring/dist/react/hooks.d.ts +2 -2
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.d.ts +11 -11
- package/node_modules/@noodle-borg/compiler/dist/compile.d.ts +0 -1
- package/node_modules/@noodle-borg/compiler/dist/fulfilment-structural.d.ts +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/expression.d.ts +14 -14
- package/node_modules/@noodle-borg/compiler/dist/manifest/naming.d.ts +0 -2
- package/node_modules/@noodle-borg/compiler/dist/manifest/naming.js +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/website-projection.d.ts +2 -1
- package/node_modules/@noodle-borg/compiler/package.json +1 -4
- package/node_modules/@noodle-borg/connector-defs/dist/credential-profiles.js +1 -1
- package/node_modules/@noodle-borg/connector-defs/dist/schema.d.ts +0 -6
- package/node_modules/@noodle-borg/connector-http/dist/http-connector.d.ts +2 -2
- package/node_modules/@noodle-borg/connector-http/dist/http-response.d.ts +2 -1
- package/node_modules/@noodle-borg/connector-http/dist/mcp/config.js +1 -1
- package/node_modules/@noodle-borg/control-plane/dist/deploy-auth.d.ts +0 -1
- package/node_modules/@noodle-borg/developer-mcp/dist/widgets/shared.js +1 -1
- package/node_modules/@noodle-borg/knowledge-operations/dist/crawl-lifecycle.d.ts +2 -1
- package/node_modules/@noodle-borg/knowledge-operations/package.json +1 -2
- package/node_modules/@noodle-borg/observability/dist/request-events-postgres.js +3 -1
- package/node_modules/@noodle-borg/plugin-distribution/dist/openai-submission-render.js +1 -1
- package/node_modules/@noodle-borg/protocol/dist/index.d.ts +1 -1
- package/node_modules/@noodle-borg/protocol/dist/index.js +1 -1
- package/node_modules/@noodle-borg/protocol/dist/interaction-envelope.js +2 -2
- package/node_modules/@noodle-borg/protocol/dist/jsonrpc.d.ts +1 -1
- package/node_modules/@noodle-borg/protocol/dist/jsonrpc.js +1 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.d.ts +4 -6
- package/node_modules/@noodle-borg/protocol/dist/mapping.js +1 -1
- package/node_modules/@noodle-borg/protocol/dist/observation.d.ts +0 -9
- package/node_modules/@noodle-borg/protocol/dist/observation.js +1 -1
- package/node_modules/@noodle-borg/protocol/dist/v2/handler.d.ts +2 -1
- package/node_modules/@noodle-borg/protocol/dist/v2/versions.d.ts +4 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/versions.js +2 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/domain-projection.d.ts +2 -1
- package/node_modules/@noodle-borg/protocol/package.json +0 -1
- package/node_modules/@noodle-borg/runtime/dist/broker/types.d.ts +2 -2
- package/node_modules/@noodle-borg/service/dist/app-package-snapshot.d.ts +1 -2
- package/node_modules/@noodle-borg/service/dist/app-package-snapshot.js +1 -2
- package/node_modules/@noodle-borg/service/dist/archive-preflight.js +1 -1
- package/node_modules/@noodle-borg/service/dist/assets.js +1 -1
- package/node_modules/@noodle-borg/service/dist/assistant-bindings.js +2 -2
- package/node_modules/@noodle-borg/service/dist/client-compatibility.js +1 -2
- package/node_modules/@noodle-borg/service/dist/developer-mcp/mount.js +2 -2
- package/node_modules/@noodle-borg/service/dist/external-credential-exchange.d.ts +0 -1
- package/node_modules/@noodle-borg/service/dist/external-credential-exchange.js +1 -1
- package/node_modules/@noodle-borg/service/dist/http-util.js +1 -72
- package/node_modules/@noodle-borg/service/dist/managed-config-expressions.d.ts +0 -1
- package/node_modules/@noodle-borg/service/dist/managed-config-expressions.js +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/customer-bridge.js +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/developer-grant.js +2 -2
- package/node_modules/@noodle-borg/service/dist/observability-runtime.js +2 -3
- package/node_modules/@noodle-borg/service/dist/registry-targets.js +3 -3
- package/node_modules/@noodle-borg/service/dist/routes/access-mode.js +0 -4
- package/node_modules/@noodle-borg/service/dist/routes/access.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/alerts.js +3 -2
- package/node_modules/@noodle-borg/service/dist/routes/analytics.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/apps.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/archive.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/asset-control-plane.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-appearance.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-clients.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-doctor.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-elevation.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-embeds.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-replay.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interactions.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-public-configuration.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-public-session.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-route-http.js +4 -3
- package/node_modules/@noodle-borg/service/dist/routes/assistant-sandbox.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-suggestions.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-usage.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.js +2 -2
- package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-live.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/config-values-paths.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/config-values.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.js +2 -3
- package/node_modules/@noodle-borg/service/dist/routes/deploy-preflight.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/deployment-activation-response.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/deployment-lock.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/deployment-package.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/deployments.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/diagnostics.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/environment-production.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/envs.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/google-workload-identity.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/intent-capture.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/logs.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/openai-apps-challenge.js +1 -2
- package/node_modules/@noodle-borg/service/dist/routes/org-admin.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/org-domains.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/org-mcp-subdomain.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/paths.js +0 -39
- package/node_modules/@noodle-borg/service/dist/routes/protected-resource-metadata.js +3 -3
- package/node_modules/@noodle-borg/service/dist/routes/rollback.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/service-principals-dispatch.js +2 -3
- package/node_modules/@noodle-borg/service/dist/routes/service-principals.js +1 -1
- package/node_modules/@noodle-borg/service/dist/service-config.d.ts +3 -2
- package/node_modules/@noodle-borg/service/dist/service-config.js +1 -1
- package/node_modules/@noodle-borg/service/dist/service.js +2 -2
- package/node_modules/@noodle-borg/service/dist/store/alert-rules.js +1 -1
- package/node_modules/@noodle-borg/service/dist/store/audit.js +1 -1
- package/node_modules/@noodle-borg/service/dist/store/records.js +1 -1
- package/node_modules/@noodle-borg/service/dist/store/validate.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/store/validate.js +1 -1
- package/node_modules/@noodle-borg/service/dist/store.d.ts +2 -2
- package/node_modules/@noodle-borg/service/dist/store.js +1 -1
- package/node_modules/@noodle-borg/service/package.json +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/client-identity.js +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/handler.d.ts +1 -2
- package/node_modules/@noodle-borg/transport-http/dist/identity-authorization.d.ts +51 -0
- package/node_modules/@noodle-borg/transport-http/dist/identity-authorization.js +7 -7
- package/node_modules/@noodle-borg/transport-http/dist/index.d.ts +4 -2
- package/node_modules/@noodle-borg/transport-http/dist/index.js +3 -1
- package/node_modules/@noodle-borg/transport-http/dist/request-body.d.ts +29 -0
- package/node_modules/@noodle-borg/transport-http/dist/request-body.js +64 -0
- package/node_modules/@noodle-borg/transport-http/dist/responses.d.ts +28 -0
- package/node_modules/@noodle-borg/transport-http/dist/routing.d.ts +2 -4
- package/node_modules/@noodle-borg/transport-http/dist/routing.js +3 -3
- package/node_modules/@noodle-borg/transport-http/dist/serve-request.js +2 -13
- package/node_modules/@noodle-borg/transport-http/package.json +0 -1
- package/node_modules/@noodleseed/assistant/package.json +2 -1
- package/package.json +2 -2
- package/dist/commands/catalog-data-billing.d.ts +0 -3
- package/dist/commands/catalog-data-billing.d.ts.map +0 -1
- package/dist/commands/catalog-data-billing.js +0 -3
- package/dist/commands/catalog-data-billing.js.map +0 -1
- package/dist/commands/catalog-data-policy.d.ts +0 -3
- package/dist/commands/catalog-data-policy.d.ts.map +0 -1
- package/dist/commands/catalog-data-policy.js +0 -3
- package/dist/commands/catalog-data-policy.js.map +0 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/catalog-emission.d.ts +0 -50
- package/node_modules/@noodle-borg/compiler/dist/context-compile.d.ts +0 -17
- package/node_modules/@noodle-borg/transport-http/dist/module-http.d.ts +0 -13
- package/node_modules/@noodle-borg/transport-http/dist/module-http.js +0 -28
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
+
import type { AccessMode, DataPlaneIdentityAuthorizer, OrgMembershipSource, OwnerTokenVerifier } from '@noodle-borg/module';
|
|
3
|
+
import { type ProtocolRequestContext } from '@noodle-borg/protocol';
|
|
4
|
+
export interface IdentityAuthorizationOptions {
|
|
5
|
+
readonly accessMode: AccessMode | undefined;
|
|
6
|
+
readonly ownerSubject: string | undefined;
|
|
7
|
+
readonly org: string | undefined;
|
|
8
|
+
readonly orgMembershipSources: readonly OrgMembershipSource[] | undefined;
|
|
9
|
+
readonly verifyOwnerToken: OwnerTokenVerifier | undefined;
|
|
10
|
+
readonly authorizeDataPlaneIdentity: DataPlaneIdentityAuthorizer | undefined;
|
|
11
|
+
/** Whether to trust forwarded-proto when reconstructing the public resource/PRM URLs. */
|
|
12
|
+
readonly trustProxy: boolean;
|
|
13
|
+
/** Public resource URL supplied by a trusted edge for MCP-subdomain routes. */
|
|
14
|
+
readonly publicResourceUrl?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Bounded identity-denial taxonomy retained by request analytics (#1309). Derived structurally at
|
|
18
|
+
* this seam — the token verifier stays opaque — and never carries token material or claims.
|
|
19
|
+
*/
|
|
20
|
+
type IdentityDenialReason = 'missing_token' | 'verifier_unavailable' | 'token_rejected' | 'identity_not_customer' | 'owner_unconfigured' | 'owner_mismatch' | 'org_membership_denied';
|
|
21
|
+
export type IdentityAuthResult = {
|
|
22
|
+
readonly allow: true;
|
|
23
|
+
readonly caller?: NonNullable<ProtocolRequestContext['caller']>;
|
|
24
|
+
readonly customerIssuer?: string;
|
|
25
|
+
readonly customerRouting?: Readonly<Record<string, string>>;
|
|
26
|
+
readonly subject?: string;
|
|
27
|
+
} | {
|
|
28
|
+
readonly allow: false;
|
|
29
|
+
readonly reason: IdentityDenialReason;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Identity gate (OA-1/OA-3): require a verified token and authorize it against the deployment access mode.
|
|
33
|
+
* `allow: true` means the request may proceed, with caller and subject fields when available. `allow: false`
|
|
34
|
+
* means this function already wrote the denial response. Missing tokens and absent verifiers fail closed.
|
|
35
|
+
*/
|
|
36
|
+
export declare function authorizeIdentityMode(req: IncomingMessage, res: ServerResponse, auth: IdentityAuthorizationOptions): Promise<IdentityAuthResult>;
|
|
37
|
+
/**
|
|
38
|
+
* Public endpoints stay anonymous unless a valid service-principal bearer is supplied. Invalid, human,
|
|
39
|
+
* and customer bearers retain the pre-existing public behavior and are ignored rather than challenged.
|
|
40
|
+
*/
|
|
41
|
+
export declare function authorizePublicServiceMode(req: IncomingMessage, auth: IdentityAuthorizationOptions): Promise<IdentityAuthResult>;
|
|
42
|
+
export declare function authorizeMixedMode(req: IncomingMessage, res: ServerResponse, auth: IdentityAuthorizationOptions): Promise<IdentityAuthResult>;
|
|
43
|
+
export declare function isIdentityMode(mode: AccessMode | undefined): boolean;
|
|
44
|
+
/** The credential carried by one `Authorization` header value, or null when it is not a bearer. */
|
|
45
|
+
export declare function bearerToken(headerValue: string | undefined): string | null;
|
|
46
|
+
/** The canonical resource identifier (the tenant MCP URL) a token must be audience-bound to (RFC 8707). */
|
|
47
|
+
export declare function canonicalResourceUrl(req: IncomingMessage, auth: Pick<IdentityAuthorizationOptions, 'trustProxy' | 'publicResourceUrl'>): string;
|
|
48
|
+
/** The RFC 9728 protected-resource-metadata URL for this request (well-known prefix before the path). */
|
|
49
|
+
export declare function protectedResourceMetadataUrl(req: IncomingMessage, auth: IdentityAuthorizationOptions): string;
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=identity-authorization.d.ts.map
|
|
@@ -8,7 +8,7 @@ import { header } from './request-capture.js';
|
|
|
8
8
|
*/
|
|
9
9
|
export async function authorizeIdentityMode(req, res, auth) {
|
|
10
10
|
const challenge = protectedResourceMetadataUrl(req, auth);
|
|
11
|
-
const token = bearerToken(req);
|
|
11
|
+
const token = bearerToken(header(req, 'authorization'));
|
|
12
12
|
if (token === null || auth.verifyOwnerToken === undefined) {
|
|
13
13
|
sendUnauthorized(res, challenge);
|
|
14
14
|
return { allow: false, reason: token === null ? 'missing_token' : 'verifier_unavailable' };
|
|
@@ -75,7 +75,7 @@ export async function authorizeIdentityMode(req, res, auth) {
|
|
|
75
75
|
* and customer bearers retain the pre-existing public behavior and are ignored rather than challenged.
|
|
76
76
|
*/
|
|
77
77
|
export async function authorizePublicServiceMode(req, auth) {
|
|
78
|
-
const token = bearerToken(req);
|
|
78
|
+
const token = bearerToken(header(req, 'authorization'));
|
|
79
79
|
if (token === null || auth.verifyOwnerToken === undefined)
|
|
80
80
|
return { allow: true };
|
|
81
81
|
const verification = await auth.verifyOwnerToken(token, canonicalResourceUrl(req, auth));
|
|
@@ -84,7 +84,7 @@ export async function authorizePublicServiceMode(req, auth) {
|
|
|
84
84
|
: { allow: true };
|
|
85
85
|
}
|
|
86
86
|
export async function authorizeMixedMode(req, res, auth) {
|
|
87
|
-
const token = bearerToken(req);
|
|
87
|
+
const token = bearerToken(header(req, 'authorization'));
|
|
88
88
|
if (token === null)
|
|
89
89
|
return { allow: true };
|
|
90
90
|
const challenge = protectedResourceMetadataUrl(req, auth);
|
|
@@ -114,11 +114,11 @@ export function isIdentityMode(mode) {
|
|
|
114
114
|
mode === 'authenticated' ||
|
|
115
115
|
mode === 'customers');
|
|
116
116
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if (!
|
|
117
|
+
/** The credential carried by one `Authorization` header value, or null when it is not a bearer. */
|
|
118
|
+
export function bearerToken(headerValue) {
|
|
119
|
+
if (!headerValue)
|
|
120
120
|
return null;
|
|
121
|
-
const match = /^Bearer\s+(.+)$/i.exec(
|
|
121
|
+
const match = /^Bearer\s+(.+)$/i.exec(headerValue);
|
|
122
122
|
return match?.[1] ?? null;
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export { applySecurityHeaders, effectiveProto, enforceHttps, type TlsPosture, } from './front-door.js';
|
|
2
|
-
export { type AccessMode, type AdmissionCategory, type AdmissionContext, type AdmissionDecision, type AdmissionGate, createMcpHttpHandler, createMcpRouter, type DataPlaneAuthorizationResult, type DataPlaneIdentityAuthorizer, type HttpHandlerOptions, type InvocationClientHint, type InvocationClientLocationHint, type InvocationContextResolutionInput, type InvocationContextResolver, type
|
|
2
|
+
export { type AccessMode, type AdmissionCategory, type AdmissionContext, type AdmissionDecision, type AdmissionGate, createMcpHttpHandler, createMcpRouter, type DataPlaneAuthorizationResult, type DataPlaneIdentityAuthorizer, type HttpHandlerOptions, type InvocationClientHint, type InvocationClientLocationHint, type InvocationContextResolutionInput, type InvocationContextResolver, type OriginPolicy, type OwnerTokenVerifier, type ServedTarget, type ServerLookup, type TenantPreflight, type TenantRouteRef, } from './handler.js';
|
|
3
|
+
export { bearerToken } from './identity-authorization.js';
|
|
3
4
|
export { createLogger, type LogFields, type Logger, type LoggerOptions, type LogLevel, type LogSink, noopLogger, stderrSink, stdoutSink, } from './logging.js';
|
|
4
|
-
export { type ModuleJsonBodyResult, readModuleJsonBody, sendModuleJson, } from './module-http.js';
|
|
5
5
|
export { resolveTrustedPublicOrg, resolveTrustedTenantMcpResource, type TrustedPublicOrg, type TrustedPublicRef, type TrustedPublicRouting, type TrustedTenantMcpResource, trustedPublicMcpRef, trustedPublicOrgWellKnownRef, } from './public-routing.js';
|
|
6
|
+
export { readBody, readDeployBody, readJsonBody } from './request-body.js';
|
|
7
|
+
export { sendJson } from './responses.js';
|
|
6
8
|
export { type RunningServer, type ServeOptions, serveHttp } from './serve.js';
|
|
7
9
|
export type { HostedToolAuthorizationObservation, HostedToolAuthorizationObserver, ServicePrincipalToolAuthorizationObservation, } from './service-principal-authorization.js';
|
|
8
10
|
export { preflightServicePrincipalToolCall, sendServicePrincipalToolDenial, } from './service-principal-authorization.js';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export { applySecurityHeaders, effectiveProto, enforceHttps, } from './front-door.js';
|
|
2
2
|
export { createMcpHttpHandler, createMcpRouter, } from './handler.js';
|
|
3
|
+
export { bearerToken } from './identity-authorization.js';
|
|
3
4
|
export { createLogger, noopLogger, stderrSink, stdoutSink, } from './logging.js';
|
|
4
|
-
export { readModuleJsonBody, sendModuleJson, } from './module-http.js';
|
|
5
5
|
export { resolveTrustedPublicOrg, resolveTrustedTenantMcpResource, trustedPublicMcpRef, trustedPublicOrgWellKnownRef, } from './public-routing.js';
|
|
6
|
+
export { readBody, readDeployBody, readJsonBody } from './request-body.js';
|
|
7
|
+
export { sendJson } from './responses.js';
|
|
6
8
|
export { serveHttp } from './serve.js';
|
|
7
9
|
export { preflightServicePrincipalToolCall, sendServicePrincipalToolDenial, } from './service-principal-authorization.js';
|
|
8
10
|
export { toWebRequest, writeWebResponse } from './web-bridge.js';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IncomingMessage } from 'node:http';
|
|
2
|
+
export declare function readBody(req: IncomingMessage, max: number): Promise<{
|
|
3
|
+
ok: true;
|
|
4
|
+
text: string;
|
|
5
|
+
} | {
|
|
6
|
+
ok: false;
|
|
7
|
+
receivedBytes: number;
|
|
8
|
+
maxBytes: number;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function readDeployBody(req: IncomingMessage, max: number): Promise<{
|
|
11
|
+
ok: true;
|
|
12
|
+
text: string;
|
|
13
|
+
encoding: 'identity' | 'gzip';
|
|
14
|
+
} | {
|
|
15
|
+
ok: false;
|
|
16
|
+
status: 400 | 413 | 415;
|
|
17
|
+
error: string;
|
|
18
|
+
receivedBytes?: number;
|
|
19
|
+
maxBytes?: number;
|
|
20
|
+
}>;
|
|
21
|
+
export declare function readJsonBody(req: IncomingMessage, max: number): Promise<{
|
|
22
|
+
ok: true;
|
|
23
|
+
value: unknown;
|
|
24
|
+
} | {
|
|
25
|
+
ok: false;
|
|
26
|
+
status: 400 | 413;
|
|
27
|
+
error: string;
|
|
28
|
+
}>;
|
|
29
|
+
//# sourceMappingURL=request-body.d.ts.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { gunzipSync } from 'node:zlib';
|
|
2
|
+
export async function readBody(req, max) {
|
|
3
|
+
const body = await readBodyBuffer(req, max);
|
|
4
|
+
return body.ok ? { ok: true, text: body.buffer.toString('utf8') } : body;
|
|
5
|
+
}
|
|
6
|
+
async function readBodyBuffer(req, max) {
|
|
7
|
+
const chunks = [];
|
|
8
|
+
let size = 0;
|
|
9
|
+
for await (const chunk of req) {
|
|
10
|
+
const buf = chunk;
|
|
11
|
+
size += buf.length;
|
|
12
|
+
if (size > max)
|
|
13
|
+
return { ok: false, receivedBytes: size, maxBytes: max };
|
|
14
|
+
chunks.push(buf);
|
|
15
|
+
}
|
|
16
|
+
return { ok: true, buffer: Buffer.concat(chunks) };
|
|
17
|
+
}
|
|
18
|
+
export async function readDeployBody(req, max) {
|
|
19
|
+
const encoding = (req.headers['content-encoding'] ?? 'identity').trim().toLowerCase();
|
|
20
|
+
if (encoding !== 'identity' && encoding !== 'gzip') {
|
|
21
|
+
return { ok: false, status: 415, error: `unsupported content encoding "${encoding}"` };
|
|
22
|
+
}
|
|
23
|
+
const body = await readBodyBuffer(req, max);
|
|
24
|
+
if (!body.ok) {
|
|
25
|
+
return {
|
|
26
|
+
ok: false,
|
|
27
|
+
status: 413,
|
|
28
|
+
error: `${encoding === 'gzip' ? 'compressed deploy' : 'deploy'} request exceeds the ${body.maxBytes} byte limit (received at least ${body.receivedBytes} bytes)`,
|
|
29
|
+
receivedBytes: body.receivedBytes,
|
|
30
|
+
maxBytes: body.maxBytes,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
if (encoding === 'identity') {
|
|
34
|
+
return { ok: true, text: body.buffer.toString('utf8'), encoding };
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
const expanded = gunzipSync(body.buffer, { maxOutputLength: max });
|
|
38
|
+
return { ok: true, text: expanded.toString('utf8'), encoding };
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
const code = error instanceof Error && 'code' in error ? String(error.code) : '';
|
|
42
|
+
if (code === 'ERR_BUFFER_TOO_LARGE') {
|
|
43
|
+
return {
|
|
44
|
+
ok: false,
|
|
45
|
+
status: 413,
|
|
46
|
+
error: `expanded deploy request exceeds the ${max} byte limit`,
|
|
47
|
+
maxBytes: max,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return { ok: false, status: 400, error: 'invalid gzip deploy request' };
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export async function readJsonBody(req, max) {
|
|
54
|
+
const body = await readBody(req, max);
|
|
55
|
+
if (!body.ok)
|
|
56
|
+
return { ok: false, status: 413, error: 'request body too large' };
|
|
57
|
+
try {
|
|
58
|
+
return { ok: true, value: JSON.parse(body.text) };
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
return { ok: false, status: 400, error: `invalid JSON: ${error.message}` };
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=request-body.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
+
import type { AdmissionContext, AdmissionGate } from '@noodle-borg/module';
|
|
3
|
+
import type { Logger } from './logging.js';
|
|
4
|
+
/** Emit one `mcp.request` lifecycle line with safe scalar fields only. */
|
|
5
|
+
export declare function logRequest(logger: Logger, routeId: string, req: IncomingMessage, res: ServerResponse, start: number): void;
|
|
6
|
+
export declare function guard(res: ServerResponse, fn: Promise<void>): Promise<void>;
|
|
7
|
+
export declare function sendJson(res: ServerResponse, status: number, body: unknown): void;
|
|
8
|
+
/** A transport-level JSON-RPC error response with no id (per the Streamable HTTP spec). */
|
|
9
|
+
export declare function rpcError(code: number, message: string): {
|
|
10
|
+
jsonrpc: '2.0';
|
|
11
|
+
id: null;
|
|
12
|
+
error: {
|
|
13
|
+
code: number;
|
|
14
|
+
message: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare function admissionRpcError(context: AdmissionContext, decision: Exclude<Awaited<ReturnType<AdmissionGate>>, {
|
|
18
|
+
allow: true;
|
|
19
|
+
}>): {
|
|
20
|
+
jsonrpc: '2.0';
|
|
21
|
+
id: string | number | null;
|
|
22
|
+
error: {
|
|
23
|
+
code: number;
|
|
24
|
+
message: string;
|
|
25
|
+
data: Record<string, string | number>;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=responses.d.ts.map
|
|
@@ -5,7 +5,7 @@ export interface PublicTenantRouting {
|
|
|
5
5
|
readonly edgeToken: string;
|
|
6
6
|
readonly resolveTenant: (ref: PublicMcpRouteRef) => Promise<TenantRouteRef | undefined>;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
type ParsedRoute = {
|
|
9
9
|
readonly kind: 'tenant';
|
|
10
10
|
readonly ref: TenantRouteRef;
|
|
11
11
|
readonly logId: string;
|
|
@@ -23,7 +23,5 @@ export type RouteResolution = {
|
|
|
23
23
|
readonly status: 403;
|
|
24
24
|
};
|
|
25
25
|
export declare function resolveRoute(req: IncomingMessage, pathname: string, publicTenantRouting: PublicTenantRouting | undefined): Promise<RouteResolution>;
|
|
26
|
-
export
|
|
27
|
-
export declare function tenantLogId(ref: TenantRouteRef): string;
|
|
28
|
-
export declare function safeDecode(value: string): string | null;
|
|
26
|
+
export {};
|
|
29
27
|
//# sourceMappingURL=routing.d.ts.map
|
|
@@ -27,7 +27,7 @@ export async function resolveRoute(req, pathname, publicTenantRouting) {
|
|
|
27
27
|
}
|
|
28
28
|
return { ok: true, route: parseRoute(pathname) };
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
function parseRoute(pathname) {
|
|
31
31
|
const tenant = parseLegacyTenantMcpPath(pathname);
|
|
32
32
|
if (tenant !== undefined) {
|
|
33
33
|
return { kind: 'tenant', ref: tenant, logId: tenantLogId(tenant) };
|
|
@@ -41,10 +41,10 @@ export function parseRoute(pathname) {
|
|
|
41
41
|
}
|
|
42
42
|
return null;
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
function tenantLogId(ref) {
|
|
45
45
|
return `${ref.org}/${ref.app}/${ref.env}${ref.serverVersion !== undefined ? `@${ref.serverVersion}` : ''}`;
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
function safeDecode(value) {
|
|
48
48
|
try {
|
|
49
49
|
return decodeURIComponent(value);
|
|
50
50
|
}
|
|
@@ -3,6 +3,7 @@ import { createDualEraMcpHandler, handleStatelessHttp, JSON_RPC, } from '@noodle
|
|
|
3
3
|
import { admissionContexts, requestsInvocationContext } from './admission-context.js';
|
|
4
4
|
import { authorizeIdentityMode, authorizeMixedMode, authorizePublicServiceMode, canonicalResourceUrl, isIdentityMode, } from './identity-authorization.js';
|
|
5
5
|
import { invocationClientHint } from './invocation-client-hints.js';
|
|
6
|
+
import { readBody } from './request-body.js';
|
|
6
7
|
import { emitDeniedRequestEvent, emitIntentEvents, emitRequestEvent, header, } from './request-capture.js';
|
|
7
8
|
import { admissionRpcError, rpcError, sendJson } from './responses.js';
|
|
8
9
|
import { preflightServicePrincipalToolCall, sendServicePrincipalToolDenial, } from './service-principal-authorization.js';
|
|
@@ -284,21 +285,9 @@ function boundedReason(reason) {
|
|
|
284
285
|
.slice(0, 32);
|
|
285
286
|
return token.length === 0 ? 'denied' : token;
|
|
286
287
|
}
|
|
287
|
-
|
|
288
|
+
function originAllowed(origin, allowed) {
|
|
288
289
|
if (allowed === undefined)
|
|
289
290
|
return true;
|
|
290
291
|
return typeof allowed === 'function' ? allowed(origin) : allowed.includes(origin);
|
|
291
292
|
}
|
|
292
|
-
export async function readBody(req, max) {
|
|
293
|
-
const chunks = [];
|
|
294
|
-
let size = 0;
|
|
295
|
-
for await (const chunk of req) {
|
|
296
|
-
const buf = chunk;
|
|
297
|
-
size += buf.length;
|
|
298
|
-
if (size > max)
|
|
299
|
-
return { ok: false };
|
|
300
|
-
chunks.push(buf);
|
|
301
|
-
}
|
|
302
|
-
return { ok: true, text: Buffer.concat(chunks).toString('utf8') };
|
|
303
|
-
}
|
|
304
293
|
//# sourceMappingURL=serve-request.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noodleseed/assistant",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.0",
|
|
4
4
|
"description": "Embed the Noodle Seed customer-branded assistant in your web app with managed or framework-owned UI, a framework-neutral MCP App host, a DOM-free client, and a backend session helper. Authoring and deploying the server is @noodleseed/one.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -90,6 +90,7 @@
|
|
|
90
90
|
"access": "public"
|
|
91
91
|
},
|
|
92
92
|
"scripts": {
|
|
93
|
+
"attw": "attw --pack . --format json",
|
|
93
94
|
"build": "tsup",
|
|
94
95
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
95
96
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noodleseed/one",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.153.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Noodle CLI by Noodle Seed — author, run, and deploy declarative MCP servers. Embedding the assistant in your own web app is @noodleseed/assistant.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
"@modelcontextprotocol/client": "2.0.0",
|
|
237
237
|
"@modelcontextprotocol/server": "2.0.0",
|
|
238
238
|
"@noodle-borg/admission-limits": "0.0.0",
|
|
239
|
-
"@noodle-borg/agent-kit": "0.
|
|
239
|
+
"@noodle-borg/agent-kit": "0.92.0",
|
|
240
240
|
"@noodle-borg/app-audit": "0.0.0",
|
|
241
241
|
"@noodle-borg/app-package": "0.0.0",
|
|
242
242
|
"@noodle-borg/assistant-gateway": "0.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-data-billing.d.ts","sourceRoot":"","sources":["../../src/commands/catalog-data-billing.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,cAAc,kCAAkC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-data-billing.js","sourceRoot":"","sources":["../../src/commands/catalog-data-billing.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,cAAc,kCAAkC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-data-policy.d.ts","sourceRoot":"","sources":["../../src/commands/catalog-data-policy.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,cAAc,iCAAiC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-data-policy.js","sourceRoot":"","sources":["../../src/commands/catalog-data-policy.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,cAAc,iCAAiC,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { ConnectorCatalog } from '../catalog/types.js';
|
|
2
|
-
import { type StructuralAmbientContext } from '../context-compile.js';
|
|
3
|
-
import type { CompileError } from '../errors.js';
|
|
4
|
-
import { type DeclaredConnectorRef } from '../fulfilment-emit.js';
|
|
5
|
-
import type { StructFulfilment } from '../fulfilment-structural.js';
|
|
6
|
-
import type { Manifest } from '../manifest/schema.js';
|
|
7
|
-
import type { ArtifactMeta, ArtifactPrompt, ArtifactResource, ArtifactTool, JsonSchema, RuntimeArtifact } from './types.js';
|
|
8
|
-
/** A tool whose structural checks passed, paired with its parsed fulfilment + resolved schemas. */
|
|
9
|
-
export interface StructuralTool {
|
|
10
|
-
readonly tool: Manifest['tools'][number];
|
|
11
|
-
readonly index: number;
|
|
12
|
-
readonly inputSchema: JsonSchema;
|
|
13
|
-
readonly outputSchema?: JsonSchema;
|
|
14
|
-
readonly fulfilment: StructFulfilment;
|
|
15
|
-
}
|
|
16
|
-
/** A resource whose structural checks passed, paired with its parsed fulfilment + URI classification. */
|
|
17
|
-
export interface StructuralResource {
|
|
18
|
-
readonly resource: NonNullable<Manifest['resources']>[number];
|
|
19
|
-
readonly isTemplate: boolean;
|
|
20
|
-
readonly variables: readonly string[];
|
|
21
|
-
readonly fulfilment: StructFulfilment;
|
|
22
|
-
}
|
|
23
|
-
/** A prompt whose structural checks passed, paired with its parsed fulfilment. */
|
|
24
|
-
export interface StructuralPrompt {
|
|
25
|
-
readonly prompt: NonNullable<Manifest['prompts']>[number];
|
|
26
|
-
readonly fulfilment: StructFulfilment;
|
|
27
|
-
}
|
|
28
|
-
interface CatalogArtifactEmissionInput {
|
|
29
|
-
readonly manifest: Manifest;
|
|
30
|
-
readonly catalog: ConnectorCatalog | undefined;
|
|
31
|
-
readonly structuralAmbientContext: StructuralAmbientContext | undefined;
|
|
32
|
-
readonly structuralTools: readonly StructuralTool[];
|
|
33
|
-
readonly structuralResources: readonly StructuralResource[];
|
|
34
|
-
readonly structuralPrompts: readonly StructuralPrompt[];
|
|
35
|
-
readonly toolUiMetaByName: ReadonlyMap<string, ArtifactMeta>;
|
|
36
|
-
readonly errors: CompileError[];
|
|
37
|
-
}
|
|
38
|
-
interface CatalogArtifactEmissionResult {
|
|
39
|
-
readonly artifactAmbientContext: NonNullable<NonNullable<RuntimeArtifact['server']['context']>['ambient']> | undefined;
|
|
40
|
-
readonly artifactTools: readonly ArtifactTool[];
|
|
41
|
-
readonly artifactResources: readonly ArtifactResource[];
|
|
42
|
-
readonly artifactPrompts: readonly ArtifactPrompt[];
|
|
43
|
-
readonly declared: Record<string, DeclaredConnectorRef>;
|
|
44
|
-
readonly customerEndpoints: RuntimeArtifact['customerEndpoints'];
|
|
45
|
-
}
|
|
46
|
-
/** Resolve connector references and emit catalog-dependent artifact surfaces. */
|
|
47
|
-
export declare function emitCatalogArtifactSurfaces({ manifest, catalog, structuralAmbientContext, structuralTools, structuralResources, structuralPrompts, toolUiMetaByName, errors, }: CatalogArtifactEmissionInput): CatalogArtifactEmissionResult;
|
|
48
|
-
export declare function isContextProvider(tool: object): boolean;
|
|
49
|
-
export {};
|
|
50
|
-
//# sourceMappingURL=catalog-emission.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ArtifactServer, JsonSchema } from './artifact/types.js';
|
|
2
|
-
import type { ConnectorCatalog } from './catalog/types.js';
|
|
3
|
-
import type { CustomerRoutingCollector } from './customer-routing.js';
|
|
4
|
-
import type { CompileError } from './errors.js';
|
|
5
|
-
import { type DeclaredConnectorRef } from './fulfilment-emit.js';
|
|
6
|
-
import { type StructFulfilment } from './fulfilment-structural.js';
|
|
7
|
-
import type { Manifest } from './manifest/schema.js';
|
|
8
|
-
import { type SchemasMap } from './manifest/schema-refs.js';
|
|
9
|
-
export interface StructuralAmbientContext {
|
|
10
|
-
readonly outputSchema: JsonSchema;
|
|
11
|
-
readonly fulfilment: StructFulfilment;
|
|
12
|
-
}
|
|
13
|
-
/** Parse the context provider and its output schema during catalog-independent compilation. */
|
|
14
|
-
export declare function parseAmbientContext(manifest: Manifest, schemas: SchemasMap, errors: CompileError[]): StructuralAmbientContext | undefined;
|
|
15
|
-
/** Resolve the provider against the connector catalog, enforcing its read-only contract. */
|
|
16
|
-
export declare function emitAmbientContext(structural: StructuralAmbientContext | undefined, catalog: ConnectorCatalog | undefined, declared: Record<string, DeclaredConnectorRef>, usedAliases: Set<string>, errors: CompileError[], customerRouting?: CustomerRoutingCollector): NonNullable<NonNullable<ArtifactServer['context']>['ambient']> | undefined;
|
|
17
|
-
//# sourceMappingURL=context-compile.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ServerResponse } from 'node:http';
|
|
2
|
-
export type ModuleJsonBodyResult = {
|
|
3
|
-
readonly ok: true;
|
|
4
|
-
readonly value: unknown;
|
|
5
|
-
} | {
|
|
6
|
-
readonly ok: false;
|
|
7
|
-
readonly status: 400 | 413;
|
|
8
|
-
readonly error: string;
|
|
9
|
-
};
|
|
10
|
-
/** Bounded JSON reader shared by trusted service modules without exposing service-owned helpers. */
|
|
11
|
-
export declare function readModuleJsonBody(request: AsyncIterable<Uint8Array | string>, maxBytes: number): Promise<ModuleJsonBodyResult>;
|
|
12
|
-
export declare function sendModuleJson(response: ServerResponse, status: number, value: unknown): void;
|
|
13
|
-
//# sourceMappingURL=module-http.d.ts.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/** Bounded JSON reader shared by trusted service modules without exposing service-owned helpers. */
|
|
2
|
-
export async function readModuleJsonBody(request, maxBytes) {
|
|
3
|
-
const chunks = [];
|
|
4
|
-
let size = 0;
|
|
5
|
-
for await (const chunk of request) {
|
|
6
|
-
const bytes = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
7
|
-
size += bytes.byteLength;
|
|
8
|
-
if (size > maxBytes) {
|
|
9
|
-
return { ok: false, status: 413, error: 'request body too large' };
|
|
10
|
-
}
|
|
11
|
-
chunks.push(bytes);
|
|
12
|
-
}
|
|
13
|
-
try {
|
|
14
|
-
return { ok: true, value: JSON.parse(Buffer.concat(chunks).toString('utf8')) };
|
|
15
|
-
}
|
|
16
|
-
catch {
|
|
17
|
-
return { ok: false, status: 400, error: 'invalid JSON request body' };
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export function sendModuleJson(response, status, value) {
|
|
21
|
-
const body = Buffer.from(JSON.stringify(value));
|
|
22
|
-
response.writeHead(status, {
|
|
23
|
-
'content-type': 'application/json; charset=utf-8',
|
|
24
|
-
'content-length': String(body.byteLength),
|
|
25
|
-
});
|
|
26
|
-
response.end(body);
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=module-http.js.map
|