@noodleseed/one 0.152.0 → 0.154.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/app-purge-reconciliation-args.d.ts +28 -0
- package/dist/commands/app-purge-reconciliation-args.d.ts.map +1 -0
- package/dist/commands/app-purge-reconciliation-args.js +124 -0
- package/dist/commands/app-purge-reconciliation-args.js.map +1 -0
- package/dist/commands/app-purge-reconciliation-files.d.ts +8 -0
- package/dist/commands/app-purge-reconciliation-files.d.ts.map +1 -0
- package/dist/commands/app-purge-reconciliation-files.js +109 -0
- package/dist/commands/app-purge-reconciliation-files.js.map +1 -0
- package/dist/commands/app-purge-reconciliation-ops.d.ts +3 -0
- package/dist/commands/app-purge-reconciliation-ops.d.ts.map +1 -0
- package/dist/commands/app-purge-reconciliation-ops.js +190 -0
- package/dist/commands/app-purge-reconciliation-ops.js.map +1 -0
- 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/billing-ops.d.ts.map +1 -1
- package/dist/commands/billing-ops.js +7 -0
- package/dist/commands/billing-ops.js.map +1 -1
- package/dist/commands/billing-org-transfer-files.d.ts +12 -0
- package/dist/commands/billing-org-transfer-files.d.ts.map +1 -0
- package/dist/commands/billing-org-transfer-files.js +112 -0
- package/dist/commands/billing-org-transfer-files.js.map +1 -0
- package/dist/commands/billing-org-transfer-ops.d.ts +4 -0
- package/dist/commands/billing-org-transfer-ops.d.ts.map +1 -0
- package/dist/commands/billing-org-transfer-ops.js +534 -0
- package/dist/commands/billing-org-transfer-ops.js.map +1 -0
- 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/service-ops.d.ts.map +1 -1
- package/dist/commands/service-ops.js +4 -1
- package/dist/commands/service-ops.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/cli-catalog/dist/catalog-data-account.js +96 -0
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-billing.js +116 -1
- 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/app-purge-reconciliation-port.d.ts +25 -0
- package/node_modules/@noodle-borg/control-plane/dist/app-purge-reconciliation-port.js +10 -0
- package/node_modules/@noodle-borg/control-plane/dist/deploy-auth.d.ts +0 -1
- package/node_modules/@noodle-borg/control-plane/dist/portable.d.ts +1 -0
- package/node_modules/@noodle-borg/control-plane/dist/portable.js +1 -0
- package/node_modules/@noodle-borg/control-plane/package.json +3 -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/app-purge-reconciliation.js +72 -0
- 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 +17 -5
- 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 +29 -3
- 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/in-memory.js +4 -8
- package/node_modules/@noodle-borg/service/dist/store/json-file.js +6 -3
- package/node_modules/@noodle-borg/service/dist/store/records.js +21 -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 +5 -4
- 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/@noodle-borg/wire-contracts/dist/app-purge-reconciliation.d.ts +177 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/app-purge-reconciliation.js +189 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/assistant.d.ts +1 -1
- package/node_modules/@noodle-borg/wire-contracts/dist/billing-org-transfer.d.ts +629 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/billing-org-transfer.js +259 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/control-plane.d.ts +21 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/control-plane.js +23 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/index.d.ts +2 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/index.js +2 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/platform-account-reset.d.ts +4 -4
- 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
|
@@ -77,6 +77,5 @@ export declare function exchangeExternalCredential(input: {
|
|
|
77
77
|
readonly config: ExternalCredentialProviderConfig;
|
|
78
78
|
readonly nowMs: number;
|
|
79
79
|
}): Promise<ExternalCredentialExchangeResponse>;
|
|
80
|
-
export declare function validateExternalCredentialProviderEndpoint(config: ExternalCredentialProviderConfig): URL;
|
|
81
80
|
export {};
|
|
82
81
|
//# sourceMappingURL=external-credential-exchange.d.ts.map
|
|
@@ -111,7 +111,7 @@ export async function exchangeExternalCredential(input) {
|
|
|
111
111
|
}
|
|
112
112
|
return externalCredentialExchangeResponseSchema.parse(await readBoundedJson(response, EXTERNAL_CREDENTIAL_EXCHANGE_MAX_RESPONSE_BYTES));
|
|
113
113
|
}
|
|
114
|
-
|
|
114
|
+
function validateExternalCredentialProviderEndpoint(config) {
|
|
115
115
|
if (!isVisibleBoundedUrlText(config.endpoint) || !isVisibleBoundedUrlText(config.allowedOrigin)) {
|
|
116
116
|
throw new Error('external credential provider endpoint is not allowed');
|
|
117
117
|
}
|
|
@@ -1,75 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { effectiveProto } from '@noodle-borg/transport-http';
|
|
3
|
-
export async function readBody(req, max) {
|
|
4
|
-
const body = await readBodyBuffer(req, max);
|
|
5
|
-
return body.ok ? { ok: true, text: body.buffer.toString('utf8') } : body;
|
|
6
|
-
}
|
|
7
|
-
async function readBodyBuffer(req, max) {
|
|
8
|
-
const chunks = [];
|
|
9
|
-
let size = 0;
|
|
10
|
-
for await (const chunk of req) {
|
|
11
|
-
const buf = chunk;
|
|
12
|
-
size += buf.length;
|
|
13
|
-
if (size > max)
|
|
14
|
-
return { ok: false, receivedBytes: size, maxBytes: max };
|
|
15
|
-
chunks.push(buf);
|
|
16
|
-
}
|
|
17
|
-
return { ok: true, buffer: Buffer.concat(chunks) };
|
|
18
|
-
}
|
|
19
|
-
/** Read exact request bytes for signature-verified provider webhooks. */
|
|
20
|
-
export function readRawBody(req, max) {
|
|
21
|
-
return readBodyBuffer(req, max);
|
|
22
|
-
}
|
|
23
|
-
export async function readDeployBody(req, max) {
|
|
24
|
-
const encoding = (req.headers['content-encoding'] ?? 'identity').trim().toLowerCase();
|
|
25
|
-
if (encoding !== 'identity' && encoding !== 'gzip') {
|
|
26
|
-
return { ok: false, status: 415, error: `unsupported content encoding "${encoding}"` };
|
|
27
|
-
}
|
|
28
|
-
const body = await readBodyBuffer(req, max);
|
|
29
|
-
if (!body.ok) {
|
|
30
|
-
return {
|
|
31
|
-
ok: false,
|
|
32
|
-
status: 413,
|
|
33
|
-
error: `${encoding === 'gzip' ? 'compressed deploy' : 'deploy'} request exceeds the ${body.maxBytes} byte limit (received at least ${body.receivedBytes} bytes)`,
|
|
34
|
-
receivedBytes: body.receivedBytes,
|
|
35
|
-
maxBytes: body.maxBytes,
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
if (encoding === 'identity') {
|
|
39
|
-
return { ok: true, text: body.buffer.toString('utf8'), encoding };
|
|
40
|
-
}
|
|
41
|
-
try {
|
|
42
|
-
const expanded = gunzipSync(body.buffer, { maxOutputLength: max });
|
|
43
|
-
return { ok: true, text: expanded.toString('utf8'), encoding };
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
const code = error instanceof Error && 'code' in error ? String(error.code) : '';
|
|
47
|
-
if (code === 'ERR_BUFFER_TOO_LARGE') {
|
|
48
|
-
return {
|
|
49
|
-
ok: false,
|
|
50
|
-
status: 413,
|
|
51
|
-
error: `expanded deploy request exceeds the ${max} byte limit`,
|
|
52
|
-
maxBytes: max,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
return { ok: false, status: 400, error: 'invalid gzip deploy request' };
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
export async function readJsonBody(req, max) {
|
|
59
|
-
const body = await readBody(req, max);
|
|
60
|
-
if (!body.ok)
|
|
61
|
-
return { ok: false, status: 413, error: 'request body too large' };
|
|
62
|
-
try {
|
|
63
|
-
return { ok: true, value: JSON.parse(body.text) };
|
|
64
|
-
}
|
|
65
|
-
catch (error) {
|
|
66
|
-
return { ok: false, status: 400, error: `invalid JSON: ${error.message}` };
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
export function sendJson(res, status, body) {
|
|
70
|
-
res.writeHead(status, { 'content-type': 'application/json; charset=utf-8' });
|
|
71
|
-
res.end(JSON.stringify(body));
|
|
72
|
-
}
|
|
1
|
+
import { effectiveProto, sendJson, } from '@noodle-borg/transport-http';
|
|
73
2
|
/**
|
|
74
3
|
* Log a thrown route error (redacted to name/message/short-stack — never a body, key, or secret) and
|
|
75
4
|
* answer 500 if the response hasn't already started. The shared catch tail for async route handlers so
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { TenantAuthConfig, TenantBridgeAuthConfig } from './store.js';
|
|
2
|
-
export declare function managedVariableNamesInString(value: string): readonly string[];
|
|
3
2
|
export declare function resolveManagedVariablesInString(value: string, variables: Readonly<Record<string, string>>): string;
|
|
4
3
|
export declare function serverAuthVariableBindings(auth: TenantAuthConfig | undefined): readonly string[];
|
|
5
4
|
export declare function resolveTenantBridgeAuthVariables(auth: TenantBridgeAuthConfig, variables: Readonly<Record<string, string>>): TenantBridgeAuthConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const MANAGED_VARIABLE_RE = /\$\{env\.([A-Za-z0-9_]+)\}/g;
|
|
2
|
-
|
|
2
|
+
function managedVariableNamesInString(value) {
|
|
3
3
|
const names = new Set();
|
|
4
4
|
for (const match of value.matchAll(MANAGED_VARIABLE_RE)) {
|
|
5
5
|
if (match[1] !== undefined)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { renderOAuthPage } from './branding.js';
|
|
2
2
|
const FIREBASE_AUTHORIZE_PATH = '/oauth/customer/firebase/authorize';
|
|
3
3
|
const FIREBASE_CALLBACK_PATH = '/oauth/customer/firebase/callback';
|
|
4
|
-
|
|
4
|
+
const MICROSOFT_CALLBACK_PATH = '/oauth/customer/microsoft/callback';
|
|
5
5
|
const MICROSOFT_REQUIRED_SCOPES = ['openid', 'profile', 'email', 'offline_access'];
|
|
6
6
|
export function bridgeAuthorizeUrl(auth, input) {
|
|
7
7
|
const issuer = trimTrailingSlash(input.issuer);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { capabilitiesForDeveloperResource, isDeveloperCapability, isDeveloperResource, } from '@noodle-borg/developer-mcp';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const DEVELOPER_GRANT_VERSION = 2;
|
|
4
|
+
const DEVELOPER_GRANT_ACCESS_MODEL = 'live_user';
|
|
5
5
|
export class InMemoryDeveloperGrantStore {
|
|
6
6
|
#records = new Map();
|
|
7
7
|
#now;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { InMemoryIntentCaptureSettingsStore, InMemoryIntentEventStore, InMemoryRequestEventStore, } from '@noodle-borg/observability';
|
|
2
|
-
import { applySecurityHeaders, enforceHttps, } from '@noodle-borg/transport-http';
|
|
3
|
-
import { sendJson } from './http-util.js';
|
|
2
|
+
import { applySecurityHeaders, enforceHttps, sendJson, } from '@noodle-borg/transport-http';
|
|
4
3
|
import { dispatchAnalyticsReads } from './routes/analytics-dispatch.js';
|
|
5
4
|
import { dispatchIntentCaptureRoutes } from './routes/intent-capture-dispatch.js';
|
|
6
5
|
export function createObservabilityStores(options) {
|
|
@@ -11,7 +10,7 @@ export function createObservabilityStores(options) {
|
|
|
11
10
|
new Set(options.intentCapturePreviewOrgs ?? []),
|
|
12
11
|
];
|
|
13
12
|
}
|
|
14
|
-
|
|
13
|
+
async function resolveIntentMode(target, ref, previewOrgs, settings) {
|
|
15
14
|
if (target === undefined)
|
|
16
15
|
return undefined;
|
|
17
16
|
const resolved = ref ??
|
|
@@ -36,7 +36,7 @@ export function servedTargetFor(record, served, customerVerifierFactory) {
|
|
|
36
36
|
: {}),
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
class MissingCustomerAuthError extends Error {
|
|
40
40
|
deploymentId;
|
|
41
41
|
constructor(deploymentId) {
|
|
42
42
|
super('customers access mode requires server.auth');
|
|
@@ -54,7 +54,7 @@ export function tryServedTargetFor(record, served, customerVerifierFactory) {
|
|
|
54
54
|
throw error;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
function servedTargetMatchesRecord(target, record) {
|
|
58
58
|
const expectedOwner = record.accessMode === 'owner-only' ? deploymentOwnerSubject(record) : undefined;
|
|
59
59
|
const expectedMembership = record.accessMode === 'org-members' ? record.orgMembershipSources : undefined;
|
|
60
60
|
return (target.deploymentId === record.deploymentId &&
|
|
@@ -98,7 +98,7 @@ function sameStrings(left, right) {
|
|
|
98
98
|
left.length === right.length &&
|
|
99
99
|
left.every((value, index) => value === right[index])));
|
|
100
100
|
}
|
|
101
|
-
|
|
101
|
+
function customerTargetFields(auth, customerVerifierFactory) {
|
|
102
102
|
if (auth.kind === 'bridge') {
|
|
103
103
|
return {
|
|
104
104
|
verifyToken: customerVerifierFactory?.(auth) ?? denyAllCustomerToken,
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { accessModeSchema } from '@noodle-borg/wire-contracts';
|
|
2
|
-
export function isAccessMode(value) {
|
|
3
|
-
return accessModeSchema.safeParse(value).success;
|
|
4
|
-
}
|
|
5
1
|
export function isIdentityAccessMode(accessMode) {
|
|
6
2
|
return (accessMode === 'owner-only' ||
|
|
7
3
|
accessMode === 'org-members' ||
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { normalizeServerVersion } from '@noodle-borg/module';
|
|
2
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
2
3
|
import { accessUpdateRequestSchema } from '@noodle-borg/wire-contracts';
|
|
3
|
-
import { readJsonBody, sendJson } from '../http-util.js';
|
|
4
4
|
import { deploymentOwnerSubject } from '../registry-helpers.js';
|
|
5
5
|
import { authorizeControlPlane } from './control-plane.js';
|
|
6
6
|
import { canManageMembers } from './org-admin.js';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
1
2
|
import { AlertRuleResponseSchema, AlertRulesListResponseSchema } from '@noodle-borg/wire-contracts';
|
|
2
3
|
import { buildAlertWebhookPayload, deliverAlertWebhook, validateAlertWebhookUrl, } from '../alert-webhook.js';
|
|
3
|
-
import {
|
|
4
|
+
import { sendForbidden } from '../http-util.js';
|
|
4
5
|
import { ALERT_METRICS, ALERT_WINDOWS_MINUTES, MAX_ALERT_RULES_PER_ENV, } from '../store/alert-rules.js';
|
|
5
6
|
import { sendContract } from './apps.js';
|
|
6
7
|
import { authorizeControlPlane, authorizeTenantControl } from './control-plane.js';
|
|
7
8
|
import { canManageMembers } from './org-admin.js';
|
|
8
9
|
/** Redact a webhook URL to its origin — path/query (where tokens live) never leave the service. */
|
|
9
|
-
|
|
10
|
+
function redactWebhookUrl(url) {
|
|
10
11
|
try {
|
|
11
12
|
return `${new URL(url).origin}/…`;
|
|
12
13
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { aggregateRequestEvents, parseRequestEventQuery } from '@noodle-borg/observability';
|
|
2
|
-
import {
|
|
2
|
+
import { sendJson } from '@noodle-borg/transport-http';
|
|
3
|
+
import { normalizedTimestamps } from '../http-util.js';
|
|
3
4
|
import { authorizeTenantControl, developerGrantRouteAccess } from './control-plane.js';
|
|
4
5
|
/**
|
|
5
6
|
* Tenant analytics read routes (ADR 0121 Stage B): `metrics` (aggregated), `events` (the stream), and
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { AppPurgeReconciliationError, } from '@noodle-borg/control-plane/portable';
|
|
2
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
3
|
+
import { APP_PURGE_RECONCILIATION_MAX_CANDIDATES, AppPurgeReconciliationApplyRequestSchema, AppPurgeReconciliationApplyResponseSchema, AppPurgeReconciliationPreviewRequestSchema, AppPurgeReconciliationPreviewResponseSchema, } from '@noodle-borg/wire-contracts';
|
|
4
|
+
import { sendForbidden } from '../http-util.js';
|
|
5
|
+
import { authorizeControlPlane } from './control-plane.js';
|
|
6
|
+
const UNAVAILABLE = {
|
|
7
|
+
ok: false,
|
|
8
|
+
code: 'app_purge_reconciliation_unavailable',
|
|
9
|
+
error: 'app purge reconciliation is unavailable',
|
|
10
|
+
};
|
|
11
|
+
/** Super-admin-only, exact-set historical repair boundary from ADR 0225. */
|
|
12
|
+
export async function handleAppPurgeReconciliationRoute(req, res, deps, action) {
|
|
13
|
+
const identity = await authorizeControlPlane(req, res, deps.gate, { requireIdentity: true });
|
|
14
|
+
if (identity === false)
|
|
15
|
+
return;
|
|
16
|
+
if (!identity.superAdmin)
|
|
17
|
+
return sendForbidden(res, 'super-admin required');
|
|
18
|
+
const url = new URL(req.url ?? '/', 'http://localhost');
|
|
19
|
+
if (url.search !== '') {
|
|
20
|
+
return sendJson(res, 400, { ok: false, error: 'query parameters are not supported' });
|
|
21
|
+
}
|
|
22
|
+
const contentType = req.headers['content-type']?.split(';', 1)[0]?.trim().toLowerCase();
|
|
23
|
+
if (contentType !== 'application/json') {
|
|
24
|
+
return sendJson(res, 415, { ok: false, error: 'content type must be application/json' });
|
|
25
|
+
}
|
|
26
|
+
const body = await readJsonBody(req, deps.maxBody);
|
|
27
|
+
if (!body.ok)
|
|
28
|
+
return sendJson(res, body.status, { ok: false, error: body.error });
|
|
29
|
+
const parsed = action === 'preview'
|
|
30
|
+
? AppPurgeReconciliationPreviewRequestSchema.safeParse(body.value)
|
|
31
|
+
: AppPurgeReconciliationApplyRequestSchema.safeParse(body.value);
|
|
32
|
+
if (!parsed.success) {
|
|
33
|
+
return sendJson(res, 400, { ok: false, error: 'invalid app purge reconciliation request' });
|
|
34
|
+
}
|
|
35
|
+
if (deps.operator === undefined || !/^[0-9a-f]{40}$/.test(deps.releaseSha)) {
|
|
36
|
+
return sendJson(res, 503, UNAVAILABLE);
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
const now = deps.clock?.() ?? new Date();
|
|
40
|
+
if (action === 'preview') {
|
|
41
|
+
const request = AppPurgeReconciliationPreviewRequestSchema.parse(parsed.data);
|
|
42
|
+
const artifact = await deps.operator.preview({
|
|
43
|
+
releaseSha: deps.releaseSha,
|
|
44
|
+
limit: request.limit ?? APP_PURGE_RECONCILIATION_MAX_CANDIDATES,
|
|
45
|
+
now,
|
|
46
|
+
});
|
|
47
|
+
return sendJson(res, 200, AppPurgeReconciliationPreviewResponseSchema.parse({ ok: true, artifact }));
|
|
48
|
+
}
|
|
49
|
+
const request = AppPurgeReconciliationApplyRequestSchema.parse(parsed.data);
|
|
50
|
+
const response = await deps.operator.apply({
|
|
51
|
+
request,
|
|
52
|
+
actor: {
|
|
53
|
+
subject: identity.subject,
|
|
54
|
+
...(identity.email === undefined ? {} : { email: identity.email }),
|
|
55
|
+
},
|
|
56
|
+
currentReleaseSha: deps.releaseSha,
|
|
57
|
+
now,
|
|
58
|
+
});
|
|
59
|
+
return sendJson(res, 200, AppPurgeReconciliationApplyResponseSchema.parse(response));
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
if (error instanceof AppPurgeReconciliationError) {
|
|
63
|
+
return sendJson(res, 409, {
|
|
64
|
+
ok: false,
|
|
65
|
+
code: error.code,
|
|
66
|
+
error: 'app purge reconciliation request conflicts with current state',
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return sendJson(res, 503, UNAVAILABLE);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=app-purge-reconciliation.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { sendJson } from '@noodle-borg/transport-http';
|
|
1
2
|
import { AppResponseSchema, AppsListResponseSchema } from '@noodle-borg/wire-contracts';
|
|
2
|
-
import { sendJson } from '../http-util.js';
|
|
3
3
|
import { authorizeTenantControl, developerGrantRouteAccess } from './control-plane.js';
|
|
4
4
|
import { appWithEndpointUrl } from './endpoint-enrichment.js';
|
|
5
5
|
const MAX_APPS_LIMIT = 500;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { sendJson } from '@noodle-borg/transport-http';
|
|
1
2
|
import { CustomerAuthAudienceConflictError } from '../customer-auth-audience-binding.js';
|
|
2
|
-
import { sendForbidden
|
|
3
|
+
import { sendForbidden } from '../http-util.js';
|
|
3
4
|
import { authorizeControlPlane } from './control-plane.js';
|
|
4
5
|
import { respondDeploymentActivationError } from './deployment-activation-response.js';
|
|
5
6
|
import { canManageMembers } from './org-admin.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
1
2
|
import { AssetPlanError } from '../assets.js';
|
|
2
|
-
import { baseFromRequest,
|
|
3
|
+
import { baseFromRequest, sendForbidden } from '../http-util.js';
|
|
3
4
|
import { parsePreparedAssets } from './assets.js';
|
|
4
5
|
import { authorizeControlPlane } from './control-plane.js';
|
|
5
6
|
export async function handleAssetPreflight(req, res, options, maxBody, tenant, gate, controlPlane, audit) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { assistantAppearanceOverrideSchema, assistantBrowserConfiguration, resolveAssistantAppearanceConfiguration, } from '@noodle-borg/assistant-gateway/portable';
|
|
2
|
-
import { readJsonBody,
|
|
2
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
3
|
+
import { sendForbidden } from '../http-util.js';
|
|
3
4
|
import { now } from './assistant-route-http.js';
|
|
4
5
|
import { authorizeControlPlane } from './control-plane.js';
|
|
5
6
|
export async function handleAssistantAppearance(req, res, tenant, deps) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { readJsonBody,
|
|
1
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
2
|
+
import { sendForbidden } from '../http-util.js';
|
|
2
3
|
import { now } from './assistant-route-http.js';
|
|
3
4
|
import { authorizeControlPlane } from './control-plane.js';
|
|
4
5
|
export async function handleAssistantClients(req, res, tenant, id, action, deps) {
|
|
@@ -3,7 +3,8 @@ import { probeAssistantModelBoundary } from '@noodle-borg/assistant-gateway/mode
|
|
|
3
3
|
import { assistantCustomerIssuer, completeElevation, publicSurfaceOf, } from '@noodle-borg/assistant-gateway/portable';
|
|
4
4
|
import { guardedFetch } from '@noodle-borg/connector-http';
|
|
5
5
|
import { tenantMcpUrl } from '@noodle-borg/module';
|
|
6
|
-
import { readJsonBody,
|
|
6
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
7
|
+
import { sendForbidden } from '../http-util.js';
|
|
7
8
|
import { resolveAssistantModelBinding } from './assistant-model-binding.js';
|
|
8
9
|
import { now } from './assistant-route-http.js';
|
|
9
10
|
import { authorizeControlPlane } from './control-plane.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { completeElevation, publicSurfaceOf } from '@noodle-borg/assistant-gateway/portable';
|
|
2
2
|
import { anonymousBehavior } from '@noodle-borg/compiler';
|
|
3
3
|
import { claimableStateHandleNames } from '@noodle-borg/runtime';
|
|
4
|
+
import { sendJson } from '@noodle-borg/transport-http';
|
|
4
5
|
import { assistantSessionResponseSchema } from '@noodle-borg/wire-contracts';
|
|
5
|
-
import { sendJson } from '../http-util.js';
|
|
6
6
|
function isMixed(surface) {
|
|
7
7
|
return surface?.mode === 'mixed';
|
|
8
8
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ADMISSION_DEFAULTS, clamp } from '@noodle-borg/admission-limits/portable';
|
|
2
2
|
import { assistantEmbedOperatorView, parsePublicEmbedBudget, publicSurfaceOf, surfaceEnvelope, } from '@noodle-borg/assistant-gateway/portable';
|
|
3
|
-
import { readJsonBody,
|
|
3
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
4
|
+
import { sendForbidden } from '../http-util.js';
|
|
4
5
|
import { now } from './assistant-route-http.js';
|
|
5
6
|
import { authorizeControlPlane } from './control-plane.js';
|
|
6
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assistantInteractionTool, assistantViewAvailableData, auditAssistantInteraction, recoverableAssistantView, } from '@noodle-borg/assistant-gateway/portable';
|
|
2
|
-
import { sendJson } from '
|
|
2
|
+
import { sendJson } from '@noodle-borg/transport-http';
|
|
3
3
|
import { now } from './assistant.js';
|
|
4
4
|
import { assistantInteractionScope } from './assistant-interaction-resolution.js';
|
|
5
5
|
import { endInteractionSse, writeInputRequested, writeInteractionError, writeInteractionResolved, writeInteractionSseHeaders, writeToolCompleted, writeToolProposed, writeViewAvailable, } from './assistant-interaction-stream.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AssistantInteractionCapacityError, assistantConfirmationReview, assistantConfirmationTransition, assistantInputTransition, assistantInteractionTool, assistantPreparedArgumentReview, assistantPreparedToolContinuation, assistantSafeOutput, assistantToolContinuation, assistantViewAvailableData, auditAssistantInteraction, recoverableAssistantView, withAssistantSessionExecutionAuthority, } from '@noodle-borg/assistant-gateway/portable';
|
|
2
2
|
import { executePreparedTool, executeToolInteractive, resumeTool, resumeToolPreparation, } from '@noodle-borg/runtime';
|
|
3
|
-
import { readJsonBody, sendJson } from '
|
|
3
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
4
4
|
import { applyBrowserCors, authenticateSession, now, } from './assistant.js';
|
|
5
5
|
import { replayOrConflict, writeUnknownOutcome } from './assistant-interaction-replay.js';
|
|
6
6
|
import { parseInteractionResponse, validateInputContent } from './assistant-interaction-request.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { authorizePublicConfiguration, effectiveAssistantBrowserConfiguration, publicEmbedTenant, publicSurfaceOf, } from '@noodle-borg/assistant-gateway/portable';
|
|
2
|
-
import { sendJson } from '
|
|
2
|
+
import { sendJson } from '@noodle-borg/transport-http';
|
|
3
3
|
import { applyBrowserCors } from './assistant-route-http.js';
|
|
4
4
|
/** Browser-safe first paint for a public launcher; never mints a session or spends admission. */
|
|
5
5
|
export async function handlePublicAssistantConfiguration(req, res, embedId, deps) {
|
|
@@ -2,8 +2,8 @@ import { randomBytes } from 'node:crypto';
|
|
|
2
2
|
import { ADMISSION_DEFAULTS, clientAddressBucket } from '@noodle-borg/admission-limits/portable';
|
|
3
3
|
import { effectiveAssistantBrowserConfiguration, mintPublicSession, publicEmbedTenant, publicSurfaceOf, } from '@noodle-borg/assistant-gateway/portable';
|
|
4
4
|
import { assistantSessionUsageRequestEvent, captureAssistantUsage, captureRefusedAssistantSession, } from '@noodle-borg/observability';
|
|
5
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
5
6
|
import { assistantSessionResponseSchema } from '@noodle-borg/wire-contracts';
|
|
6
|
-
import { readJsonBody, sendJson } from '../http-util.js';
|
|
7
7
|
import { applyBrowserCors, assistantSessionEndpoints, now } from './assistant-route-http.js';
|
|
8
8
|
/**
|
|
9
9
|
* The transport half of anonymous session minting. Every decision — which refusal, in which order, and
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bearerToken } from '@noodle-borg/transport-http';
|
|
1
2
|
import { sendForbidden, sendUnauthorized } from '../http-util.js';
|
|
2
3
|
export function handleAssistantPreflight(req, res) {
|
|
3
4
|
const origin = typeof req.headers.origin === 'string' ? req.headers.origin : 'null';
|
|
@@ -11,13 +12,13 @@ export function handleAssistantPreflight(req, res) {
|
|
|
11
12
|
res.end();
|
|
12
13
|
}
|
|
13
14
|
export async function authenticateSession(req, res, deps) {
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
15
|
+
const token = bearerToken(req.headers.authorization);
|
|
16
|
+
if (token === null) {
|
|
16
17
|
applyBrowserCors(req, res);
|
|
17
18
|
sendUnauthorized(res, 'invalid assistant session');
|
|
18
19
|
return undefined;
|
|
19
20
|
}
|
|
20
|
-
const session = await deps.store.getSession(
|
|
21
|
+
const session = await deps.store.getSession(token, now(deps));
|
|
21
22
|
if (!session) {
|
|
22
23
|
applyBrowserCors(req, res);
|
|
23
24
|
sendUnauthorized(res, 'invalid assistant session');
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* `contract/v1/assistant-sandbox-document.html` and to the published client's srcdoc fallback; any
|
|
8
8
|
* relay-protocol change is a coordinated contract event, never a local edit.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
const ASSISTANT_SANDBOX_DOCUMENT = `<!doctype html><meta charset="utf-8"><style>html,body,iframe{border:0;margin:0;width:100%;height:100%;overflow:hidden}body{background:transparent}</style><script>
|
|
11
11
|
let inner;
|
|
12
12
|
const ready={jsonrpc:'2.0',method:'ui/notifications/sandbox-proxy-ready',params:{}};
|
|
13
13
|
// Re-announce until the host acknowledges with the resource: when this document is hosted
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ADMISSION_DEFAULTS } from '@noodle-borg/admission-limits/portable';
|
|
2
2
|
import { parseAssistantContextPreferences, resolveInvocationContextSnapshot, surfaceEnvelope, withAssistantSessionExecutionAuthority, } from '@noodle-borg/assistant-gateway/portable';
|
|
3
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
3
4
|
import { assistantSuggestionsRequestSchema } from '@noodle-borg/wire-contracts';
|
|
4
|
-
import { readJsonBody, sendJson } from '../http-util.js';
|
|
5
5
|
import { generateInitialAssistantSuggestions } from './assistant-agent.js';
|
|
6
6
|
import { applyBrowserCors, authenticateSession, now } from './assistant-route-http.js';
|
|
7
7
|
import { sessionScopedTarget } from './assistant-session-target.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ASSISTANT_USAGE_METHOD, aggregateAssistantUsage } from '@noodle-borg/observability';
|
|
2
|
-
import {
|
|
2
|
+
import { sendJson } from '@noodle-borg/transport-http';
|
|
3
|
+
import { normalizedTimestamps } from '../http-util.js';
|
|
3
4
|
import { authorizeTenantControl, developerGrantRouteAccess } from './control-plane.js';
|
|
4
5
|
const WINDOWS_MS = new Map([
|
|
5
6
|
['24h', 24 * 60 * 60 * 1000],
|
|
@@ -6,8 +6,9 @@ import { tenantMcpUrl } from '@noodle-borg/module';
|
|
|
6
6
|
import { assistantAppToolCallRecorder, assistantRefusedTurnUsageRequestEvent, assistantSessionUsageRequestEvent, assistantTurnNumber, assistantTurnUsageRequestEvent, captureAssistantUsage, } from '@noodle-borg/observability';
|
|
7
7
|
import { mapExecutionError, mapResourceContents, mapResourcesList, mapToolOutput, mapToolsList, } from '@noodle-borg/protocol';
|
|
8
8
|
import { executeResource } from '@noodle-borg/runtime';
|
|
9
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
9
10
|
import { assistantMessageTurnRequestSchema, assistantResumeTurnRequestSchema, assistantSessionResponseSchema, } from '@noodle-borg/wire-contracts';
|
|
10
|
-
import {
|
|
11
|
+
import { sendForbidden, sendUnauthorized } from '../http-util.js';
|
|
11
12
|
import { createAssistantTurnStats, runAgentTurn } from './assistant-agent.js';
|
|
12
13
|
import { elevateAssistantSession } from './assistant-elevation.js';
|
|
13
14
|
import { executeAssistantKnowledgeSearch, findAssistantKnowledgeComponent, resolveAssistantKnowledge, } from './assistant-knowledge.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { applySecurityHeaders, enforceHttps } from '@noodle-borg/transport-http';
|
|
2
|
-
import { baseFromRequest, normalizeServiceBase
|
|
1
|
+
import { applySecurityHeaders, enforceHttps, sendJson, } from '@noodle-borg/transport-http';
|
|
2
|
+
import { baseFromRequest, normalizeServiceBase } from '../http-util.js';
|
|
3
3
|
/** Provider-neutral discovery and its shipped Google-named compatibility route share exact bytes. */
|
|
4
4
|
export function dispatchAuthDiscoveryRoute(req, res, url, options, tls) {
|
|
5
5
|
if (req.method !== 'GET' || (url.pathname !== '/v1/auth' && url.pathname !== '/v1/auth/google')) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { bearerToken } from '@noodle-borg/control-plane/portable';
|
|
2
2
|
import { normalizeServerVersion, tenantMcpUrl } from '@noodle-borg/module';
|
|
3
3
|
import { freezeCustomerRoutes, resolveCustomerRouteBinding, } from '@noodle-borg/runtime';
|
|
4
|
-
import { sendJson } from '
|
|
4
|
+
import { sendJson } from '@noodle-borg/transport-http';
|
|
5
5
|
/** Verify one real customer identity and probe delegated bindings without calling business APIs. */
|
|
6
6
|
export async function handleLiveAuthDoctor(req, res, registry, tenant, options) {
|
|
7
7
|
let serverVersion;
|
|
@@ -54,7 +54,7 @@ function encodedConfigRouteRef(kind, encodedScope, encodedName, searchParams, re
|
|
|
54
54
|
return invalidConfigRouteRef(kind, encodedName, reveal);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
function configRouteRef(kind, scope, encodedName, searchParams, reveal = false) {
|
|
58
58
|
let safeScope;
|
|
59
59
|
try {
|
|
60
60
|
safeScope = validateConfigScope(scope);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DEVELOPER_CLI_PATH } from '@noodle-borg/developer-mcp';
|
|
2
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
2
3
|
import { configValueSetRequestSchema, EffectiveConfigResponseSchema, formatWireError, RevealSecretResponseSchema, } from '@noodle-borg/wire-contracts';
|
|
3
4
|
import { projectEffectiveConfig, } from '../config-value-projection.js';
|
|
4
|
-
import {
|
|
5
|
+
import { sendForbidden } from '../http-util.js';
|
|
5
6
|
import { authorizeControlPlane } from './control-plane.js';
|
|
6
7
|
export async function handleConfigValues(req, res, gate, controlPlane, configStore, registry, maxBody, ref, audit, developerGrants) {
|
|
7
8
|
const identity = await authorizeControlPlane(req, res, gate, {
|
|
@@ -2,10 +2,10 @@ import { cspFaultsInManifest } from '@noodle-borg/compiler';
|
|
|
2
2
|
import { ensurePersonalWorkspace } from '@noodle-borg/control-plane/portable';
|
|
3
3
|
import { DEVELOPER_ASSISTANT_PATH, DEVELOPER_CLI_PATH, } from '@noodle-borg/developer-mcp';
|
|
4
4
|
import { normalizeServerVersion } from '@noodle-borg/module';
|
|
5
|
-
import { noopLogger } from '@noodle-borg/transport-http';
|
|
6
|
-
import { deployRequestSchema, formatWireError, } from '@noodle-borg/wire-contracts';
|
|
5
|
+
import { noopLogger, readDeployBody, sendJson } from '@noodle-borg/transport-http';
|
|
6
|
+
import { deployRequestSchema, formatWireError, WhoamiIdentityResponseSchema, } from '@noodle-borg/wire-contracts';
|
|
7
7
|
import { authorizeDeveloperGrant, } from '../auth/developer-grant-guard.js';
|
|
8
|
-
import { baseFromRequest,
|
|
8
|
+
import { baseFromRequest, sendForbidden, sendUnauthorized } from '../http-util.js';
|
|
9
9
|
import { endpointUrlOptionsForOrg } from '../mcp-public-routing.js';
|
|
10
10
|
import { manifestUsesUserRoot } from '../registry-access.js';
|
|
11
11
|
import { isIdentityAccessMode } from './access-mode.js';
|
|
@@ -14,7 +14,6 @@ import { provisionPublicEmbed } from './deploy-public-embed.js';
|
|
|
14
14
|
import { respondDeploymentActivationError } from './deployment-activation-response.js';
|
|
15
15
|
import { tenantMcpUrl } from './endpoint-enrichment.js';
|
|
16
16
|
import { canManageMembers } from './org-admin.js';
|
|
17
|
-
export { handleConfigValues } from './config-values.js';
|
|
18
17
|
export async function handleDeploy(req, res, registry, options, maxBody, tenant, gate, controlPlane, audit) {
|
|
19
18
|
// GHD-3: a GitHub run deploys with a run-scoped token on x-noodle-run-token — NOT a control-plane
|
|
20
19
|
// identity. When that header is present the human control-plane auth (bearer + org membership) is
|
|
@@ -444,7 +443,7 @@ export async function authorizeDeploymentOwnerSelection(res, controlPlane, org,
|
|
|
444
443
|
}
|
|
445
444
|
return { ok: true, ownerSubject: requestedOwnerSubject };
|
|
446
445
|
}
|
|
447
|
-
export async function handleWhoami(req, res, gate, controlPlane, options = {}) {
|
|
446
|
+
export async function handleWhoami(req, res, gate, controlPlane, options = {}, scope) {
|
|
448
447
|
// Identity introspection names no org or environment, so no grant context can describe it.
|
|
449
448
|
const identity = await authorizeControlPlane(req, res, gate, {
|
|
450
449
|
requireIdentity: true,
|
|
@@ -452,6 +451,19 @@ export async function handleWhoami(req, res, gate, controlPlane, options = {}) {
|
|
|
452
451
|
});
|
|
453
452
|
if (identity === false)
|
|
454
453
|
return;
|
|
454
|
+
if (scope === 'identity') {
|
|
455
|
+
const response = WhoamiIdentityResponseSchema.parse({
|
|
456
|
+
ok: true,
|
|
457
|
+
data: {
|
|
458
|
+
identity: {
|
|
459
|
+
subject: identity.subject,
|
|
460
|
+
email: identity.email,
|
|
461
|
+
superAdmin: identity.superAdmin,
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
});
|
|
465
|
+
return sendJson(res, 200, response);
|
|
466
|
+
}
|
|
455
467
|
if (!identity.superAdmin && options.controlPlaneSignupMode === 'public') {
|
|
456
468
|
await ensurePersonalWorkspace(controlPlane, identity);
|
|
457
469
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cspFaultsInManifest } from '@noodle-borg/compiler';
|
|
2
|
+
import { readDeployBody, sendJson } from '@noodle-borg/transport-http';
|
|
2
3
|
import { deployPreflightRequestSchema, formatWireError } from '@noodle-borg/wire-contracts';
|
|
3
|
-
import { readDeployBody, sendJson } from '../http-util.js';
|
|
4
4
|
import { manifestUsesUserRoot } from '../registry-access.js';
|
|
5
5
|
import { isIdentityAccessMode } from './access-mode.js';
|
|
6
6
|
import { authorizeDeploymentOwnerSelection, authorizeTenantControl, developerGrantRouteAccess, } from './control-plane.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeploymentActivationError } from '@noodle-borg/module';
|
|
2
|
-
import { sendJson } from '
|
|
2
|
+
import { sendJson } from '@noodle-borg/transport-http';
|
|
3
3
|
/** Translate provider-neutral activation failures without exposing commercial account details. */
|
|
4
4
|
export async function respondDeploymentActivationError(res, error, context) {
|
|
5
5
|
if (!(error instanceof DeploymentActivationError))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { normalizeServerVersion } from '@noodle-borg/module';
|
|
2
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
2
3
|
import { deploymentLockRequestSchema } from '@noodle-borg/wire-contracts';
|
|
3
|
-
import { readJsonBody, sendJson } from '../http-util.js';
|
|
4
4
|
import { authorizeControlPlane } from './control-plane.js';
|
|
5
5
|
import { canManageMembers } from './org-admin.js';
|
|
6
6
|
export async function handleDeploymentLockUpdate(req, res, registry, gate, controlPlane, audit, maxBody, tenant) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { sha256Canonical } from '@noodle-borg/app-package';
|
|
2
|
+
import { sendJson } from '@noodle-borg/transport-http';
|
|
2
3
|
import { DeploymentPackageResponseShapeSchema } from '@noodle-borg/wire-contracts';
|
|
3
4
|
import { parseAppPackageSnapshot } from '../app-package-snapshot.js';
|
|
4
|
-
import { sendJson } from '../http-util.js';
|
|
5
5
|
import { authorizeTenantControl, developerGrantRouteAccess } from './control-plane.js';
|
|
6
6
|
const PACKAGE_UNAVAILABLE = {
|
|
7
7
|
code: 'package_unavailable',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { sendJson } from '@noodle-borg/transport-http';
|
|
1
2
|
import { DeploymentResponseSchema } from '@noodle-borg/wire-contracts';
|
|
2
|
-
import { sendJson } from '../http-util.js';
|
|
3
3
|
import { sendContract } from './apps.js';
|
|
4
4
|
import { authorizeTenantControl, developerGrantRouteAccess } from './control-plane.js';
|
|
5
5
|
import { withEndpointUrl } from './endpoint-enrichment.js';
|