@noodleseed/one 0.162.0 → 0.163.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/commands/billing-catalog-ops.d.ts +4 -0
- package/dist/commands/billing-catalog-ops.d.ts.map +1 -0
- package/dist/commands/billing-catalog-ops.js +58 -0
- package/dist/commands/billing-catalog-ops.js.map +1 -0
- package/dist/commands/billing-ops.d.ts.map +1 -1
- package/dist/commands/billing-ops.js +3 -0
- package/dist/commands/billing-ops.js.map +1 -1
- package/dist/commands/catalog.d.ts.map +1 -1
- package/dist/commands/catalog.js +2 -0
- package/dist/commands/catalog.js.map +1 -1
- package/dist/commands/config-values.d.ts.map +1 -1
- package/dist/commands/config-values.js +16 -0
- package/dist/commands/config-values.js.map +1 -1
- package/dist/commands/installation-variables.d.ts +26 -0
- package/dist/commands/installation-variables.d.ts.map +1 -0
- package/dist/commands/installation-variables.js +171 -0
- package/dist/commands/installation-variables.js.map +1 -0
- package/dist/commands/solutions-activity.d.ts +5 -0
- package/dist/commands/solutions-activity.d.ts.map +1 -0
- package/dist/commands/solutions-activity.js +116 -0
- package/dist/commands/solutions-activity.js.map +1 -0
- package/dist/commands/solutions-connections.d.ts +7 -0
- package/dist/commands/solutions-connections.d.ts.map +1 -0
- package/dist/commands/solutions-connections.js +88 -0
- package/dist/commands/solutions-connections.js.map +1 -0
- package/dist/commands/solutions-installation-options.d.ts +5 -0
- package/dist/commands/solutions-installation-options.d.ts.map +1 -0
- package/dist/commands/solutions-installation-options.js +52 -0
- package/dist/commands/solutions-installation-options.js.map +1 -0
- package/dist/commands/solutions-onboarding.d.ts +5 -0
- package/dist/commands/solutions-onboarding.d.ts.map +1 -0
- package/dist/commands/solutions-onboarding.js +113 -0
- package/dist/commands/solutions-onboarding.js.map +1 -0
- package/dist/commands/solutions-ops.d.ts.map +1 -1
- package/dist/commands/solutions-ops.js +278 -17
- package/dist/commands/solutions-ops.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/admission-limits/dist/counter-store.d.ts +21 -2
- package/node_modules/@noodle-borg/admission-limits/dist/counter-store.js +10 -1
- package/node_modules/@noodle-borg/admission-limits/dist/in-memory-counter-store.d.ts +5 -1
- package/node_modules/@noodle-borg/admission-limits/dist/in-memory-counter-store.js +31 -2
- package/node_modules/@noodle-borg/admission-limits/dist/portable.d.ts +3 -0
- package/node_modules/@noodle-borg/admission-limits/dist/portable.js +3 -0
- package/node_modules/@noodle-borg/admission-limits/dist/public-admission-assertion.d.ts +28 -0
- package/node_modules/@noodle-borg/admission-limits/dist/public-admission-assertion.js +124 -0
- package/node_modules/@noodle-borg/admission-limits/dist/public-record-admission.d.ts +54 -0
- package/node_modules/@noodle-borg/admission-limits/dist/public-record-admission.js +74 -0
- package/node_modules/@noodle-borg/admission-limits/dist/request-attribution.d.ts +11 -0
- package/node_modules/@noodle-borg/admission-limits/dist/request-attribution.js +19 -0
- package/node_modules/@noodle-borg/agent-kit/dist/curated/error-fixes.js +2 -0
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js +5 -5
- package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js +3 -0
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.js +15 -3
- package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-configuration.d.ts +9 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-configuration.js +33 -2
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-execution-bound.d.ts +3 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-execution-bound.js +29 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-interaction-state.d.ts +5 -3
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-interaction-state.js +21 -10
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-store.d.ts +1 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-store.js +3 -3
- package/node_modules/@noodle-borg/assistant-gateway/dist/portable.d.ts +1 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/portable.js +1 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/session-target.js +5 -4
- package/node_modules/@noodle-borg/authoring/dist/config.d.ts +20 -0
- package/node_modules/@noodle-borg/authoring/dist/config.js +29 -2
- package/node_modules/@noodle-borg/authoring/dist/connectors.d.ts +6 -1
- package/node_modules/@noodle-borg/authoring/dist/connectors.js +5 -0
- package/node_modules/@noodle-borg/authoring/dist/index.d.ts +2 -2
- package/node_modules/@noodle-borg/authoring/dist/json-schema.d.ts +1 -1
- package/node_modules/@noodle-borg/authoring/dist/json-schema.js +15 -2
- package/node_modules/@noodle-borg/authoring/dist/load-authored.js +1 -1
- package/node_modules/@noodle-borg/authoring/dist/managed-collection.d.ts +18 -4
- package/node_modules/@noodle-borg/authoring/dist/managed-collection.js +22 -3
- package/node_modules/@noodle-borg/authoring/dist/platform.d.ts +3 -0
- package/node_modules/@noodle-borg/authoring/dist/platform.js +4 -0
- package/node_modules/@noodle-borg/authoring/dist/server-presentation.js +43 -0
- package/node_modules/@noodle-borg/authoring/dist/server.d.ts +3 -1
- package/node_modules/@noodle-borg/authoring/dist/server.js +4 -44
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-billing.js +18 -0
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-config.js +31 -4
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-solutions.js +778 -0
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-tenant-resources.js +0 -241
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-types.js +7 -0
- package/node_modules/@noodle-borg/cli-catalog/dist/index.js +20 -0
- package/node_modules/@noodle-borg/compiler/dist/artifact/assemble.js +2 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/catalog-emission.js +3 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/config.js +3 -0
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.d.ts +17 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/version.d.ts +6 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/version.js +6 -1
- package/node_modules/@noodle-borg/compiler/dist/business-variables.d.ts +27 -0
- package/node_modules/@noodle-borg/compiler/dist/business-variables.js +230 -0
- package/node_modules/@noodle-borg/compiler/dist/compile.js +7 -1
- package/node_modules/@noodle-borg/compiler/dist/errors.d.ts +1 -1
- package/node_modules/@noodle-borg/compiler/dist/index.d.ts +3 -0
- package/node_modules/@noodle-borg/compiler/dist/index.js +3 -0
- package/node_modules/@noodle-borg/compiler/dist/managed-collection-controls.d.ts +52 -0
- package/node_modules/@noodle-borg/compiler/dist/managed-collection-controls.js +92 -0
- package/node_modules/@noodle-borg/compiler/dist/managed-collections.d.ts +26 -1
- package/node_modules/@noodle-borg/compiler/dist/managed-collections.js +190 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts +100 -36
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js +2 -0
- package/node_modules/@noodle-borg/compiler/dist/native-record-operations.d.ts +7 -0
- package/node_modules/@noodle-borg/compiler/dist/native-record-operations.js +59 -0
- package/node_modules/@noodle-borg/connector-defs/dist/compile-http.js +83 -8
- package/node_modules/@noodle-borg/connector-defs/dist/schema.d.ts +31 -1
- package/node_modules/@noodle-borg/connector-defs/dist/schema.js +16 -0
- package/node_modules/@noodle-borg/connector-http/dist/http-connector.d.ts +12 -3
- package/node_modules/@noodle-borg/connector-http/dist/http-connector.js +41 -2
- package/node_modules/@noodle-borg/connector-http/dist/http-response.js +3 -2
- package/node_modules/@noodle-borg/connector-http/dist/mcp/config.js +1 -1
- package/node_modules/@noodle-borg/connector-http/dist/url-resolution.js +1 -1
- package/node_modules/@noodle-borg/control-plane/dist/contracts.d.ts +2 -1
- package/node_modules/@noodle-borg/control-plane/dist/in-memory-organization-store.d.ts +3 -0
- package/node_modules/@noodle-borg/control-plane/dist/in-memory-organization-store.js +11 -0
- package/node_modules/@noodle-borg/control-plane/dist/organization-agreements.d.ts +45 -0
- package/node_modules/@noodle-borg/control-plane/dist/organization-agreements.js +74 -0
- 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/module/dist/contract.d.ts +20 -0
- package/node_modules/@noodle-borg/module/dist/platform-human-identity.d.ts +2 -0
- package/node_modules/@noodle-borg/protocol/dist/request-deps.js +1 -0
- package/node_modules/@noodle-borg/protocol/dist/request-state.d.ts +1 -0
- package/node_modules/@noodle-borg/protocol/dist/request-state.js +11 -2
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.d.ts +2 -0
- package/node_modules/@noodle-borg/protocol/dist/v2/input-required.js +2 -1
- package/node_modules/@noodle-borg/protocol/dist/v2/server.js +2 -1
- package/node_modules/@noodle-borg/runtime/dist/ambient-context.js +6 -1
- package/node_modules/@noodle-borg/runtime/dist/broker/types.d.ts +2 -0
- package/node_modules/@noodle-borg/runtime/dist/business-variables.d.ts +15 -0
- package/node_modules/@noodle-borg/runtime/dist/business-variables.js +75 -0
- package/node_modules/@noodle-borg/runtime/dist/confirmation-continuation.js +2 -1
- package/node_modules/@noodle-borg/runtime/dist/confirmation.js +23 -3
- package/node_modules/@noodle-borg/runtime/dist/connector/types.d.ts +17 -1
- package/node_modules/@noodle-borg/runtime/dist/connector-snapshot.js +6 -0
- package/node_modules/@noodle-borg/runtime/dist/execute.d.ts +18 -3
- package/node_modules/@noodle-borg/runtime/dist/execute.js +13 -3
- package/node_modules/@noodle-borg/runtime/dist/index.d.ts +2 -0
- package/node_modules/@noodle-borg/runtime/dist/index.js +1 -0
- package/node_modules/@noodle-borg/runtime/dist/interactive.js +11 -0
- package/node_modules/@noodle-borg/runtime/dist/managed-origins.d.ts +3 -1
- package/node_modules/@noodle-borg/runtime/dist/managed-origins.js +32 -7
- package/node_modules/@noodle-borg/runtime/dist/operation-credential.js +6 -0
- package/node_modules/@noodle-borg/runtime/dist/operation-evidence.d.ts +30 -0
- package/node_modules/@noodle-borg/runtime/dist/operation-evidence.js +68 -0
- package/node_modules/@noodle-borg/runtime/dist/operation-execution.d.ts +2 -2
- package/node_modules/@noodle-borg/runtime/dist/operation-execution.js +142 -71
- package/node_modules/@noodle-borg/runtime/dist/result.d.ts +6 -4
- package/node_modules/@noodle-borg/runtime/dist/tool-dispatch.d.ts +7 -0
- package/node_modules/@noodle-borg/runtime/dist/tool-dispatch.js +48 -4
- package/node_modules/@noodle-borg/service/dist/admission.js +2 -1
- package/node_modules/@noodle-borg/service/dist/application-activity.js +236 -0
- package/node_modules/@noodle-borg/service/dist/application-business-notice.js +28 -0
- package/node_modules/@noodle-borg/service/dist/application-runtime-target.js +141 -0
- package/node_modules/@noodle-borg/service/dist/application-settings-targets.js +72 -0
- package/node_modules/@noodle-borg/service/dist/application-settings.js +210 -0
- package/node_modules/@noodle-borg/service/dist/business-api-admission.js +121 -0
- package/node_modules/@noodle-borg/service/dist/business-information/activity-pagination.js +73 -0
- package/node_modules/@noodle-borg/service/dist/business-information/business-notice.d.ts +24 -0
- package/node_modules/@noodle-borg/service/dist/business-information/business-notice.js +18 -0
- package/node_modules/@noodle-borg/service/dist/business-information/collection-controls.js +51 -0
- package/node_modules/@noodle-borg/service/dist/business-information/contracts.d.ts +439 -0
- package/node_modules/@noodle-borg/service/dist/business-information/definition-resolver.js +94 -0
- package/node_modules/@noodle-borg/service/dist/business-information/in-memory-installation-lifecycle.js +136 -0
- package/node_modules/@noodle-borg/service/dist/business-information/in-memory-invitations.js +160 -0
- package/node_modules/@noodle-borg/service/dist/business-information/in-memory-locks.js +23 -0
- package/node_modules/@noodle-borg/service/dist/business-information/in-memory-store.js +287 -132
- package/node_modules/@noodle-borg/service/dist/business-information/installation-capacity.js +10 -0
- package/node_modules/@noodle-borg/service/dist/business-information/invitations.js +68 -0
- package/node_modules/@noodle-borg/service/dist/business-information/legacy-request-migration.js +60 -0
- package/node_modules/@noodle-borg/service/dist/business-information/managed-releases.js +245 -0
- package/node_modules/@noodle-borg/service/dist/business-information/managed-solution-blueprints.js +51 -0
- package/node_modules/@noodle-borg/service/dist/business-information/managed-solution-executable.js +76 -0
- package/node_modules/@noodle-borg/service/dist/business-information/model.js +124 -23
- package/node_modules/@noodle-borg/service/dist/business-information/native-query.js +162 -0
- package/node_modules/@noodle-borg/service/dist/business-information/native-storage-budget.js +60 -0
- package/node_modules/@noodle-borg/service/dist/business-information/pagination.js +28 -0
- package/node_modules/@noodle-borg/service/dist/business-information/portable.js +9 -0
- package/node_modules/@noodle-borg/service/dist/business-information/principal-authority.d.ts +11 -0
- package/node_modules/@noodle-borg/service/dist/business-information/principal-authority.js +42 -0
- package/node_modules/@noodle-borg/service/dist/business-information/profiles.js +137 -6
- package/node_modules/@noodle-borg/service/dist/business-information/reader-floor.js +26 -0
- package/node_modules/@noodle-borg/service/dist/business-information/source-credential-fence.js +79 -0
- package/node_modules/@noodle-borg/service/dist/business-information/source-custody-budget.js +30 -0
- package/node_modules/@noodle-borg/service/dist/business-information/source-custody-memory.js +122 -0
- package/node_modules/@noodle-borg/service/dist/business-information/source-executor.js +191 -0
- package/node_modules/@noodle-borg/service/dist/business-information/source-ingestion-contracts.js +2 -0
- package/node_modules/@noodle-borg/service/dist/business-information/source-ingestion-coordinator.js +136 -0
- package/node_modules/@noodle-borg/service/dist/business-information/source-ingestion-failures.js +32 -0
- package/node_modules/@noodle-borg/service/dist/business-information/source-ingestion-memory-state.js +154 -0
- package/node_modules/@noodle-borg/service/dist/business-information/source-ingestion-memory-store.js +568 -0
- package/node_modules/@noodle-borg/service/dist/business-information/source-ingestion-memory-types.js +26 -0
- package/node_modules/@noodle-borg/service/dist/business-information/source-ingestion-memory-values.js +59 -0
- package/node_modules/@noodle-borg/service/dist/business-information/source-ingestion-pagination.js +54 -0
- package/node_modules/@noodle-borg/service/dist/business-information/source-ingestion-validation.js +163 -0
- package/node_modules/@noodle-borg/service/dist/business-information/source-refresh-retention.js +29 -0
- package/node_modules/@noodle-borg/service/dist/business-information-runtime.js +80 -0
- package/node_modules/@noodle-borg/service/dist/business-onboarding.js +73 -0
- package/node_modules/@noodle-borg/service/dist/connections/types.js +8 -0
- package/node_modules/@noodle-borg/service/dist/credential-binding-index.js +38 -33
- package/node_modules/@noodle-borg/service/dist/deployment-execution.js +275 -0
- package/node_modules/@noodle-borg/service/dist/external-credential-binding-broker.js +19 -1
- package/node_modules/@noodle-borg/service/dist/external-credential-exchange.d.ts +16 -1
- package/node_modules/@noodle-borg/service/dist/modules/host.js +4 -1
- package/node_modules/@noodle-borg/service/dist/native-record-connector.d.ts +20 -0
- package/node_modules/@noodle-borg/service/dist/native-record-connector.js +206 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store.d.ts +3 -0
- package/node_modules/@noodle-borg/service/dist/operation-evidence.js +89 -0
- package/node_modules/@noodle-borg/service/dist/recovery-quarantine.js +49 -0
- package/node_modules/@noodle-borg/service/dist/registry-compile.js +60 -11
- package/node_modules/@noodle-borg/service/dist/registry-deploy-transaction.js +18 -0
- package/node_modules/@noodle-borg/service/dist/registry-rollback.js +2 -1
- package/node_modules/@noodle-borg/service/dist/registry-state.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/registry-state.js +6 -3
- package/node_modules/@noodle-borg/service/dist/registry-targets.js +49 -0
- package/node_modules/@noodle-borg/service/dist/registry-types.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/registry.d.ts +15 -3
- package/node_modules/@noodle-borg/service/dist/registry.js +177 -137
- package/node_modules/@noodle-borg/service/dist/routes/assistant-appearance.js +3 -2
- 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-embeds.js +8 -3
- 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 +48 -36
- package/node_modules/@noodle-borg/service/dist/routes/assistant-public-configuration.js +3 -2
- package/node_modules/@noodle-borg/service/dist/routes/assistant-public-session.js +10 -10
- package/node_modules/@noodle-borg/service/dist/routes/assistant-session-target.js +32 -3
- package/node_modules/@noodle-borg/service/dist/routes/assistant-suggestions.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-transcript.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant.js +10 -10
- package/node_modules/@noodle-borg/service/dist/routes/business-information-activity.js +83 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-admission.js +26 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-channels.js +153 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-connections.js +107 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-dispatch.js +87 -4
- package/node_modules/@noodle-borg/service/dist/routes/business-information-external.js +79 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-installation.js +24 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-notice.js +69 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-onboarding.js +58 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-paths.js +76 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-public.js +151 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-reader-floor.js +15 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-record-create.js +29 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-record-reads.js +36 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-request.js +64 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-settings.js +64 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-source.js +249 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-staff.js +258 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-wire.js +226 -26
- package/node_modules/@noodle-borg/service/dist/routes/business-information.js +238 -197
- package/node_modules/@noodle-borg/service/dist/routes/config-values-dispatch.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/config-values.js +26 -4
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.js +19 -233
- package/node_modules/@noodle-borg/service/dist/routes/deployment-activation-response.js +13 -4
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.js +4 -0
- package/node_modules/@noodle-borg/service/dist/service.js +57 -11
- package/node_modules/@noodle-borg/service/dist/solution-installation-activation.js +149 -0
- package/node_modules/@noodle-borg/service/dist/source-configuration-authority.js +94 -0
- package/node_modules/@noodle-borg/service/dist/state-catalog.js +6 -5
- package/node_modules/@noodle-borg/service/dist/store/config-values.d.ts +42 -17
- package/node_modules/@noodle-borg/service/dist/store/config-values.js +123 -24
- package/node_modules/@noodle-borg/service/dist/store/in-memory.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/store/in-memory.js +3 -0
- package/node_modules/@noodle-borg/service/dist/store/json-file.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/store/json-file.js +3 -0
- package/node_modules/@noodle-borg/service/dist/store.d.ts +3 -1
- package/node_modules/@noodle-borg/service/package.json +2 -2
- package/node_modules/@noodle-borg/transport-http/dist/serve-request.js +9 -0
- package/node_modules/@noodle-borg/transport-http/package.json +1 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/application-activity.d.ts +143 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/application-activity.js +90 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/application-channels.d.ts +130 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/application-channels.js +77 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/application-connections.d.ts +105 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/application-connections.js +67 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/application-onboarding.d.ts +27 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/application-onboarding.js +28 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/application-settings.d.ts +112 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/application-settings.js +88 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/assistant.d.ts +1 -1
- package/node_modules/@noodle-borg/wire-contracts/dist/billing-catalog.d.ts +62 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/billing-catalog.js +57 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/billing-enforcement.d.ts +12 -12
- package/node_modules/@noodle-borg/wire-contracts/dist/billing-metering.d.ts +4 -4
- package/node_modules/@noodle-borg/wire-contracts/dist/billing-org-transfer.d.ts +3 -3
- package/node_modules/@noodle-borg/wire-contracts/dist/business-information-query.d.ts +25 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/business-information-query.js +37 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/business-information.d.ts +1816 -158
- package/node_modules/@noodle-borg/wire-contracts/dist/business-information.js +416 -41
- package/node_modules/@noodle-borg/wire-contracts/dist/control-plane.d.ts +2 -2
- package/node_modules/@noodle-borg/wire-contracts/dist/distribution.d.ts +5 -5
- package/node_modules/@noodle-borg/wire-contracts/dist/index.d.ts +8 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/index.js +8 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/knowledge.d.ts +3 -3
- package/node_modules/@noodle-borg/wire-contracts/dist/managed-assistant-sponsorship.d.ts +7 -7
- package/node_modules/@noodle-borg/wire-contracts/dist/platform-account-reset.d.ts +5 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/platform-account-reset.js +1 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/platform-auth.d.ts +66 -66
- package/node_modules/@noodle-borg/wire-contracts/dist/solution-onboarding.d.ts +143 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/solution-onboarding.js +94 -0
- package/node_modules/@noodleseed/assistant/README.md +5 -0
- package/package.json +2 -2
|
@@ -6,14 +6,14 @@ import { DeploymentLockedError, deploymentLockedConflict, deploymentLockedPrefli
|
|
|
6
6
|
import { defaultActiveRecord } from './deployment-versioning.js';
|
|
7
7
|
import { updateRegistryAccess } from './registry-access.js';
|
|
8
8
|
import { compileRegistryTarget } from './registry-compile.js';
|
|
9
|
-
import { preflightRegistryDeploy, resolveDeployAttempt } from './registry-deploy-transaction.js';
|
|
9
|
+
import { preflightRegistryDeploy, resolveDeployAttempt, withDeploymentConfiguration, } from './registry-deploy-transaction.js';
|
|
10
10
|
import { deploymentOwnerSubject, missingCapabilityErrors, } from './registry-helpers.js';
|
|
11
11
|
import { registryDeploymentPackage, renderDeploymentPackageSnapshot } from './registry-package.js';
|
|
12
12
|
import { recoverRegistryRecords } from './registry-recover.js';
|
|
13
13
|
import { rollbackDeployment, rollbackWithMappedErrors } from './registry-rollback.js';
|
|
14
14
|
import { activeRecord, activeRecordVersion, persistDeployRecord, reconcilePlatformAccountResetRegistryCache, registryAppArchivedAt, registryArchiveApp, registryCustomerAuthRestoreProjections, registryGetApp, registryGetDeployment, registryGetEnvironment, registryListApps, registryListEnvironments, registryRestoreApp, registrySetProductionEnvironment, registrySweepArchived, setRegistryDeploymentLock, } from './registry-state.js';
|
|
15
15
|
import { deploymentStatusFor } from './registry-status.js';
|
|
16
|
-
import { emptySecretEnvelope, recordTenant, servedTargetFor, targetForPersistedRecord, tenantDeploymentKey, tenantKey, } from './registry-targets.js';
|
|
16
|
+
import { deploymentSourceFor, emptySecretEnvelope, rebindNativeRecords, recordTenant, servedTargetFor, targetForPersistedRecord, tenantDeploymentKey, tenantKey, } from './registry-targets.js';
|
|
17
17
|
import { withBuiltinStateCatalog } from './state-catalog.js';
|
|
18
18
|
import { deploymentSummary, matchesDeploymentFilter, validateDeploymentListFilter, } from './store/records.js';
|
|
19
19
|
import { InMemoryConfigStore, validateTenantRef, } from './store.js';
|
|
@@ -23,12 +23,14 @@ export class ServerRegistry {
|
|
|
23
23
|
#activeTenants = new Map();
|
|
24
24
|
#productionEnvironments = new Map();
|
|
25
25
|
#store;
|
|
26
|
+
#applicationLifecycleObserver;
|
|
26
27
|
#configStore;
|
|
27
28
|
#customerVerifierFactory;
|
|
28
29
|
#policyGate;
|
|
29
30
|
#transactionalModuleDeploymentActivation;
|
|
30
31
|
#platformCatalog;
|
|
31
32
|
#platformConnectors;
|
|
33
|
+
#nativeRecords;
|
|
32
34
|
#stateHandleStoreFactory;
|
|
33
35
|
#delegatedCredentialStore;
|
|
34
36
|
#sealCustomerCredential;
|
|
@@ -57,6 +59,7 @@ export class ServerRegistry {
|
|
|
57
59
|
options.transactionalModuleDeploymentActivation === true;
|
|
58
60
|
this.#platformCatalog = withBuiltinStateCatalog(options.platformCatalog ?? []);
|
|
59
61
|
this.#platformConnectors = options.platformConnectors ?? [];
|
|
62
|
+
this.#nativeRecords = options.nativeRecords;
|
|
60
63
|
this.#stateHandleStoreFactory = options.stateHandleStoreFactory;
|
|
61
64
|
this.#delegatedCredentialStore = options.delegatedCredentialStore;
|
|
62
65
|
this.#sealCustomerCredential = options.sealCustomerCredential;
|
|
@@ -80,8 +83,22 @@ export class ServerRegistry {
|
|
|
80
83
|
return this.#transactionalModuleDeploymentActivation;
|
|
81
84
|
}
|
|
82
85
|
setPlatformConnectors(input) {
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
if (input.catalog !== undefined)
|
|
87
|
+
this.#platformCatalog = withBuiltinStateCatalog(input.catalog);
|
|
88
|
+
if (input.connectors !== undefined)
|
|
89
|
+
this.#platformConnectors = input.connectors;
|
|
90
|
+
this.#nativeRecords = input.nativeRecords;
|
|
91
|
+
if (input.catalog !== undefined || input.connectors !== undefined) {
|
|
92
|
+
this.#servers.clear();
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
// Bind the new native-record port without resetting unrelated deployment-owned state or hooks.
|
|
96
|
+
for (const [id, target] of this.#servers) {
|
|
97
|
+
const record = this.#records.get(id);
|
|
98
|
+
if (!record)
|
|
99
|
+
continue;
|
|
100
|
+
this.#servers.set(id, rebindNativeRecords(target, record, input.nativeRecords));
|
|
101
|
+
}
|
|
85
102
|
}
|
|
86
103
|
setLocalAssetOptions(options) {
|
|
87
104
|
this.#localAssetOptions = options;
|
|
@@ -91,103 +108,80 @@ export class ServerRegistry {
|
|
|
91
108
|
return this.#localAssetsByPath.get(pathname);
|
|
92
109
|
}
|
|
93
110
|
async deploy(tenant, manifest, options = {}) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const version = Date.now();
|
|
131
|
-
const built = preflight.bindDeployment(deploymentId);
|
|
132
|
-
const serverAuth = built.artifact.server.auth;
|
|
133
|
-
const ownerSubject = accessMode === 'owner-only' ? (options.ownerSubject ?? actor?.subject) : undefined;
|
|
134
|
-
const record = {
|
|
135
|
-
schemaVersion: 1,
|
|
136
|
-
deploymentId,
|
|
137
|
-
orgSlug: safeTenant.org,
|
|
138
|
-
appSlug: safeTenant.app,
|
|
139
|
-
environment: safeTenant.env,
|
|
140
|
-
...(safeServerVersion !== undefined ? { serverVersion: safeServerVersion } : {}),
|
|
141
|
-
deploymentVersion: version,
|
|
142
|
-
active: automationId === undefined,
|
|
143
|
-
serverName: built.artifact.server.name,
|
|
144
|
-
createdAt: new Date().toISOString(),
|
|
145
|
-
...(actor ? { createdBySubject: actor.subject, createdByEmail: actor.email } : {}),
|
|
146
|
-
...(ownerSubject !== undefined ? { ownerSubject } : {}),
|
|
147
|
-
...(deploymentSource !== undefined ? { deploymentSource } : {}),
|
|
148
|
-
...(accessMode !== undefined ? { accessMode } : {}),
|
|
149
|
-
...(orgMembershipSources !== undefined ? { orgMembershipSources } : {}),
|
|
150
|
-
...(serverAuth !== undefined ? { serverAuth } : {}),
|
|
151
|
-
manifest,
|
|
152
|
-
...(connectors !== undefined ? { connectors } : {}),
|
|
153
|
-
...(hostedAssets !== undefined && hostedAssets.length > 0 ? { hostedAssets } : {}),
|
|
154
|
-
...(appPackageSnapshot !== undefined ? { appPackageSnapshot } : {}),
|
|
155
|
-
secrets: emptySecretEnvelope(),
|
|
156
|
-
};
|
|
157
|
-
if (await this.#hasCustomerAuthAudienceConflict(record, serverAuth)) {
|
|
158
|
-
return customerAuthAudienceConflictFailure();
|
|
159
|
-
}
|
|
160
|
-
let active;
|
|
161
|
-
try {
|
|
162
|
-
active = await withKnowledgePublication(this.#knowledgeHooks, safeTenant, deploymentId, built.artifact.server.knowledge, () => persistDeployRecord(this.#stateView(), record, safeTenant, automationId === undefined));
|
|
163
|
-
}
|
|
164
|
-
catch (error) {
|
|
165
|
-
if (error instanceof KnowledgePublicationError) {
|
|
166
|
-
return { ok: false, errors: error.errors };
|
|
111
|
+
return withDeploymentConfiguration(this.#configStore, tenant.org, async () => {
|
|
112
|
+
const { connectors, actor, accessMode, hostedAssets, serverVersion, deploymentSource, idempotencyKey, } = options;
|
|
113
|
+
const { orgMembershipSources } = options;
|
|
114
|
+
const { automationId } = options;
|
|
115
|
+
const safeTenant = validateTenantRef(tenant);
|
|
116
|
+
const safeServerVersion = serverVersion !== undefined ? normalizeServerVersion(serverVersion) : undefined;
|
|
117
|
+
if (safeServerVersion !== undefined) {
|
|
118
|
+
const active = await activeRecordVersion(this.#stateView(), safeTenant, safeServerVersion);
|
|
119
|
+
if (active?.deploymentLock !== undefined)
|
|
120
|
+
return deploymentLockedConflict();
|
|
121
|
+
}
|
|
122
|
+
const preflight = await preflightRegistryDeploy({
|
|
123
|
+
options,
|
|
124
|
+
serviceCapabilities: this.#serviceCapabilities,
|
|
125
|
+
compile: () => this.#compileTarget(safeTenant, manifest, connectors, hostedAssets, false),
|
|
126
|
+
});
|
|
127
|
+
if (!preflight.ok)
|
|
128
|
+
return preflight;
|
|
129
|
+
const attempt = await resolveDeployAttempt({
|
|
130
|
+
serverName: preflight.serverName,
|
|
131
|
+
...(idempotencyKey !== undefined ? { idempotencyKey } : {}),
|
|
132
|
+
...(this.#store !== undefined ? { store: this.#store } : {}),
|
|
133
|
+
records: this.#records,
|
|
134
|
+
tenant: safeTenant,
|
|
135
|
+
manifest,
|
|
136
|
+
options,
|
|
137
|
+
});
|
|
138
|
+
if (attempt.replay !== undefined)
|
|
139
|
+
return attempt.replay;
|
|
140
|
+
const { deploymentId } = attempt;
|
|
141
|
+
let appPackageSnapshot = preflight.appPackageSnapshot;
|
|
142
|
+
if (preflight.appPackageArtifact !== undefined && appPackageSnapshot === undefined) {
|
|
143
|
+
const rendered = renderDeploymentPackageSnapshot(preflight.appPackageArtifact, this.#appPackageRenderer);
|
|
144
|
+
if (!rendered.ok)
|
|
145
|
+
return rendered;
|
|
146
|
+
appPackageSnapshot = rendered.snapshot;
|
|
167
147
|
}
|
|
168
|
-
|
|
148
|
+
const version = Date.now();
|
|
149
|
+
const built = preflight.bindDeployment(deploymentId);
|
|
150
|
+
const serverAuth = built.artifact.server.auth;
|
|
151
|
+
const ownerSubject = accessMode === 'owner-only' ? (options.ownerSubject ?? actor?.subject) : undefined;
|
|
152
|
+
const record = {
|
|
153
|
+
schemaVersion: 1,
|
|
154
|
+
deploymentId,
|
|
155
|
+
orgSlug: safeTenant.org,
|
|
156
|
+
appSlug: safeTenant.app,
|
|
157
|
+
environment: safeTenant.env,
|
|
158
|
+
...(safeServerVersion !== undefined ? { serverVersion: safeServerVersion } : {}),
|
|
159
|
+
deploymentVersion: version,
|
|
160
|
+
active: automationId === undefined,
|
|
161
|
+
serverName: built.artifact.server.name,
|
|
162
|
+
createdAt: new Date().toISOString(),
|
|
163
|
+
...(actor ? { createdBySubject: actor.subject, createdByEmail: actor.email } : {}),
|
|
164
|
+
...(ownerSubject !== undefined ? { ownerSubject } : {}),
|
|
165
|
+
...(deploymentSource !== undefined ? { deploymentSource } : {}),
|
|
166
|
+
...(accessMode !== undefined ? { accessMode } : {}),
|
|
167
|
+
...(orgMembershipSources !== undefined ? { orgMembershipSources } : {}),
|
|
168
|
+
...(serverAuth !== undefined ? { serverAuth } : {}),
|
|
169
|
+
manifest,
|
|
170
|
+
...(connectors !== undefined ? { connectors } : {}),
|
|
171
|
+
...(hostedAssets !== undefined && hostedAssets.length > 0 ? { hostedAssets } : {}),
|
|
172
|
+
...(appPackageSnapshot !== undefined ? { appPackageSnapshot } : {}),
|
|
173
|
+
secrets: emptySecretEnvelope(),
|
|
174
|
+
};
|
|
175
|
+
if (await this.#hasCustomerAuthAudienceConflict(record, serverAuth)) {
|
|
169
176
|
return customerAuthAudienceConflictFailure();
|
|
170
177
|
}
|
|
171
|
-
|
|
172
|
-
return deploymentLockedConflict();
|
|
173
|
-
throw error;
|
|
174
|
-
}
|
|
175
|
-
if (automationId !== undefined) {
|
|
176
|
-
let activation;
|
|
178
|
+
let active;
|
|
177
179
|
try {
|
|
178
|
-
|
|
179
|
-
automationId,
|
|
180
|
-
});
|
|
180
|
+
active = await withKnowledgePublication(this.#knowledgeHooks, safeTenant, deploymentId, built.artifact.server.knowledge, () => persistDeployRecord(this.#stateView(), record, safeTenant, automationId === undefined));
|
|
181
181
|
}
|
|
182
182
|
catch (error) {
|
|
183
|
-
if (error instanceof
|
|
184
|
-
return {
|
|
185
|
-
ok: false,
|
|
186
|
-
superseded: true,
|
|
187
|
-
deploymentId,
|
|
188
|
-
deploymentVersion: version,
|
|
189
|
-
...(safeServerVersion !== undefined ? { serverVersion: safeServerVersion } : {}),
|
|
190
|
-
};
|
|
183
|
+
if (error instanceof KnowledgePublicationError) {
|
|
184
|
+
return { ok: false, errors: error.errors };
|
|
191
185
|
}
|
|
192
186
|
if (error instanceof CustomerAuthAudienceConflictError) {
|
|
193
187
|
return customerAuthAudienceConflictFailure();
|
|
@@ -196,40 +190,66 @@ export class ServerRegistry {
|
|
|
196
190
|
return deploymentLockedConflict();
|
|
197
191
|
throw error;
|
|
198
192
|
}
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
193
|
+
if (automationId !== undefined) {
|
|
194
|
+
let activation;
|
|
195
|
+
try {
|
|
196
|
+
activation = await this.#store?.activateDeployment(safeTenant, deploymentId, undefined, {
|
|
197
|
+
automationId,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
catch (error) {
|
|
201
|
+
if (error instanceof DeploymentActivationError &&
|
|
202
|
+
error.code === 'automation_superseded') {
|
|
203
|
+
return {
|
|
204
|
+
ok: false,
|
|
205
|
+
superseded: true,
|
|
206
|
+
deploymentId,
|
|
207
|
+
deploymentVersion: version,
|
|
208
|
+
...(safeServerVersion !== undefined ? { serverVersion: safeServerVersion } : {}),
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
if (error instanceof CustomerAuthAudienceConflictError) {
|
|
212
|
+
return customerAuthAudienceConflictFailure();
|
|
213
|
+
}
|
|
214
|
+
if (error instanceof DeploymentLockedError)
|
|
215
|
+
return deploymentLockedConflict();
|
|
216
|
+
throw error;
|
|
217
|
+
}
|
|
218
|
+
if (activation === undefined) {
|
|
219
|
+
return {
|
|
220
|
+
ok: false,
|
|
221
|
+
errors: [
|
|
222
|
+
{
|
|
223
|
+
code: 'run_activation_failed',
|
|
224
|
+
path: 'deploymentId',
|
|
225
|
+
message: 'deployment could not be activated for this automation run',
|
|
226
|
+
},
|
|
227
|
+
],
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
active = activation.active;
|
|
231
|
+
this.#records.set(active.deploymentId, active);
|
|
232
|
+
const previous = activation.previousActive;
|
|
233
|
+
if (previous !== undefined && previous.deploymentId !== active.deploymentId) {
|
|
234
|
+
this.#records.set(previous.deploymentId, { ...previous, active: false });
|
|
235
|
+
}
|
|
210
236
|
}
|
|
211
|
-
active
|
|
212
|
-
|
|
213
|
-
const previous = activation.previousActive;
|
|
214
|
-
if (previous !== undefined && previous.deploymentId !== active.deploymentId) {
|
|
215
|
-
this.#records.set(previous.deploymentId, { ...previous, active: false });
|
|
237
|
+
if (await this.#hasCustomerAuthAudienceConflict(active, serverAuth)) {
|
|
238
|
+
return customerAuthAudienceConflictFailure();
|
|
216
239
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
...(accessMode !== undefined ? { accessMode } : {}),
|
|
231
|
-
...(activeOwnerSubject !== undefined ? { ownerSubject: activeOwnerSubject } : {}),
|
|
232
|
-
};
|
|
240
|
+
this.#servers.set(deploymentId, servedTargetFor(active, built, this.#customerVerifierFactory));
|
|
241
|
+
this.#activeTenants.set(tenantDeploymentKey(safeTenant, safeServerVersion), deploymentId);
|
|
242
|
+
this.#activeTenants.delete(tenantKey(safeTenant));
|
|
243
|
+
const activeOwnerSubject = deploymentOwnerSubject(active);
|
|
244
|
+
return {
|
|
245
|
+
ok: true,
|
|
246
|
+
deploymentId,
|
|
247
|
+
deploymentVersion: version,
|
|
248
|
+
...(safeServerVersion !== undefined ? { serverVersion: safeServerVersion } : {}),
|
|
249
|
+
...(accessMode !== undefined ? { accessMode } : {}),
|
|
250
|
+
...(activeOwnerSubject !== undefined ? { ownerSubject: activeOwnerSubject } : {}),
|
|
251
|
+
};
|
|
252
|
+
});
|
|
233
253
|
}
|
|
234
254
|
/** Read-only deploy validation used by the CLI before config writes, asset upload, or persistence. */
|
|
235
255
|
async preflightDeploy(tenant, manifest, options = {}) {
|
|
@@ -264,6 +284,7 @@ export class ServerRegistry {
|
|
|
264
284
|
}
|
|
265
285
|
async #compileTarget(tenant, manifest, connectors, hostedAssets, renderAppPackage = false, deploymentId) {
|
|
266
286
|
return compileRegistryTarget({
|
|
287
|
+
activeArtifact: async () => (await this.getActiveByTenant(tenant))?.served.artifact,
|
|
267
288
|
configStore: this.#configStore,
|
|
268
289
|
platformCatalog: this.#platformCatalog,
|
|
269
290
|
localAssetOptions: this.#localAssetOptions,
|
|
@@ -277,6 +298,7 @@ export class ServerRegistry {
|
|
|
277
298
|
googleWorkloadIdentity: this.#googleWorkloadIdentity,
|
|
278
299
|
stateHandleStoreFactory: this.#stateHandleStoreFactory,
|
|
279
300
|
platformConnectors: this.#platformConnectors,
|
|
301
|
+
nativeRecords: this.#nativeRecords,
|
|
280
302
|
policyGate: this.#policyGate,
|
|
281
303
|
appPackageRenderer: this.#appPackageRenderer,
|
|
282
304
|
knowledgeSearch: this.#knowledgeSearch,
|
|
@@ -293,12 +315,10 @@ export class ServerRegistry {
|
|
|
293
315
|
const cached = this.#servers.get(deploymentId);
|
|
294
316
|
if (cached)
|
|
295
317
|
return cached;
|
|
296
|
-
if (!this.#store)
|
|
297
|
-
return undefined;
|
|
298
318
|
const inflight = this.#inflight.get(deploymentId);
|
|
299
319
|
if (inflight)
|
|
300
320
|
return inflight;
|
|
301
|
-
const promise = this.#loadAndCompile(
|
|
321
|
+
const promise = this.#loadAndCompile(deploymentId).finally(() => {
|
|
302
322
|
this.#inflight.delete(deploymentId);
|
|
303
323
|
});
|
|
304
324
|
this.#inflight.set(deploymentId, promise);
|
|
@@ -362,18 +382,29 @@ export class ServerRegistry {
|
|
|
362
382
|
getAppArchivedAt(org, app) {
|
|
363
383
|
return registryAppArchivedAt(this.#stateView(), org, app);
|
|
364
384
|
}
|
|
365
|
-
|
|
366
|
-
|
|
385
|
+
setApplicationLifecycleObserver(observer) {
|
|
386
|
+
this.#applicationLifecycleObserver = observer;
|
|
387
|
+
}
|
|
388
|
+
async archiveApp(org, app, at) {
|
|
389
|
+
const result = await registryArchiveApp(this.#stateView(), org, app, at);
|
|
390
|
+
if (result)
|
|
391
|
+
await this.#applicationLifecycleObserver?.(org, app, result.archivedAt);
|
|
392
|
+
return result;
|
|
367
393
|
}
|
|
368
394
|
restoreApp(org, app) {
|
|
369
395
|
return registryRestoreApp(this.#stateView(), org, app, (record) => this.#compilePersistedRecord(record));
|
|
370
396
|
}
|
|
371
397
|
sweepArchived(before) {
|
|
372
|
-
return registrySweepArchived(this.#stateView(), before);
|
|
398
|
+
return registrySweepArchived(this.#stateView(), before, this.#applicationLifecycleObserver);
|
|
373
399
|
}
|
|
374
400
|
listApps(org, opts = {}) {
|
|
375
401
|
return registryListApps(this.#stateView(), org, opts);
|
|
376
402
|
}
|
|
403
|
+
async getAppGeneration(org, app) {
|
|
404
|
+
return this.#store
|
|
405
|
+
? this.#store.getAppGeneration(org, app)
|
|
406
|
+
: (await this.getApp(org, app))?.createdAt;
|
|
407
|
+
}
|
|
377
408
|
getApp(org, app) {
|
|
378
409
|
return registryGetApp(this.#stateView(), org, app);
|
|
379
410
|
}
|
|
@@ -386,6 +417,10 @@ export class ServerRegistry {
|
|
|
386
417
|
setProductionEnvironment(org, app, env) {
|
|
387
418
|
return registrySetProductionEnvironment(this.#stateView(), org, app, env);
|
|
388
419
|
}
|
|
420
|
+
/** Immutable executable bytes for a same-tenant installation; never includes configuration or credentials. */
|
|
421
|
+
getDeploymentSource(tenant, deploymentId) {
|
|
422
|
+
return deploymentSourceFor(this.#stateView(), tenant, deploymentId);
|
|
423
|
+
}
|
|
389
424
|
getDeployment(org, deploymentId) {
|
|
390
425
|
return registryGetDeployment(this.#stateView(), org, deploymentId);
|
|
391
426
|
}
|
|
@@ -428,6 +463,8 @@ export class ServerRegistry {
|
|
|
428
463
|
async rollback(ref, deploymentId) {
|
|
429
464
|
const safe = validateTenantRef(ref);
|
|
430
465
|
return rollbackWithMappedErrors({
|
|
466
|
+
configStore: this.#configStore,
|
|
467
|
+
org: safe.org,
|
|
431
468
|
run: () => rollbackDeployment(this.#stateView(), safe, deploymentId, (record) => this.#compilePersistedRecord(record), this.#serviceCapabilities, this.#customerVerifierFactory, (record, auth) => this.#hasCustomerAuthAudienceConflict(record, auth)),
|
|
432
469
|
pairKnowledge: async () => this.#knowledgeHooks?.rollback(deploymentId),
|
|
433
470
|
isAudienceConflict: (error) => error instanceof CustomerAuthAudienceConflictError,
|
|
@@ -447,7 +484,6 @@ export class ServerRegistry {
|
|
|
447
484
|
return this.#knowledgeSearch;
|
|
448
485
|
}
|
|
449
486
|
async #targetForPersistedRecord(record) {
|
|
450
|
-
const store = this.#store;
|
|
451
487
|
return targetForPersistedRecord(record, {
|
|
452
488
|
records: this.#records,
|
|
453
489
|
servers: this.#servers,
|
|
@@ -455,11 +491,15 @@ export class ServerRegistry {
|
|
|
455
491
|
? { customerVerifierFactory: this.#customerVerifierFactory }
|
|
456
492
|
: {}),
|
|
457
493
|
hasCustomerAuthConflict: (candidate, auth) => this.#hasCustomerAuthAudienceConflict(candidate, auth),
|
|
458
|
-
|
|
494
|
+
load: () => this.#loadAndCompile(record),
|
|
459
495
|
});
|
|
460
496
|
}
|
|
461
|
-
async #loadAndCompile(
|
|
462
|
-
const record = typeof source === 'string'
|
|
497
|
+
async #loadAndCompile(source) {
|
|
498
|
+
const record = typeof source === 'string'
|
|
499
|
+
? this.#store
|
|
500
|
+
? await this.#store.get(source)
|
|
501
|
+
: this.#records.get(source)
|
|
502
|
+
: source;
|
|
463
503
|
if (!record)
|
|
464
504
|
return undefined;
|
|
465
505
|
const deploymentId = record.deploymentId;
|
|
@@ -2,6 +2,7 @@ import { assistantAppearanceOverrideSchema, assistantBrowserConfiguration, resol
|
|
|
2
2
|
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
3
3
|
import { sendForbidden } from '../http-util.js';
|
|
4
4
|
import { now } from './assistant-route-http.js';
|
|
5
|
+
import { activeAssistantTarget } from './assistant-session-target.js';
|
|
5
6
|
import { authorizeControlPlane } from './control-plane.js';
|
|
6
7
|
export async function handleAssistantAppearance(req, res, tenant, deps) {
|
|
7
8
|
const store = deps.appearance;
|
|
@@ -52,7 +53,7 @@ export async function handleAssistantAppearance(req, res, tenant, deps) {
|
|
|
52
53
|
currentRevision: updated.currentRevision,
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
|
-
const target = await deps.registry
|
|
56
|
+
const target = await activeAssistantTarget({ registry: deps.registry }, tenant);
|
|
56
57
|
await deps.audit.emit({
|
|
57
58
|
eventType: updated.record.override === undefined
|
|
58
59
|
? 'assistant.appearance.reset'
|
|
@@ -73,7 +74,7 @@ export async function handleAssistantAppearance(req, res, tenant, deps) {
|
|
|
73
74
|
return respond(res, tenant, deps, updated.record, target);
|
|
74
75
|
}
|
|
75
76
|
async function respond(res, tenant, deps, knownRecord, knownTarget) {
|
|
76
|
-
const target = knownTarget ?? (await deps.registry
|
|
77
|
+
const target = knownTarget ?? (await activeAssistantTarget({ registry: deps.registry }, tenant));
|
|
77
78
|
const developer = target && assistantBrowserConfiguration(target.served.artifact.server);
|
|
78
79
|
const record = knownRecord ?? (await deps.appearance?.get(tenant));
|
|
79
80
|
const resolution = resolveAssistantAppearanceConfiguration(developer, record?.override);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
2
2
|
import { sendForbidden } from '../http-util.js';
|
|
3
3
|
import { now } from './assistant-route-http.js';
|
|
4
|
+
import { activeAssistantTarget } from './assistant-session-target.js';
|
|
4
5
|
import { authorizeControlPlane } from './control-plane.js';
|
|
5
6
|
export async function handleAssistantClients(req, res, tenant, id, action, deps) {
|
|
6
7
|
const identity = await authorizeControlPlane(req, res, deps.gate, { requireIdentity: false });
|
|
@@ -29,7 +30,7 @@ export async function handleAssistantClients(req, res, tenant, id, action, deps)
|
|
|
29
30
|
if (typeof name !== 'string' || name.trim().length < 1 || name.length > 80) {
|
|
30
31
|
return sendJson(res, 400, { error: '"name" must be a non-empty string' });
|
|
31
32
|
}
|
|
32
|
-
const target = await deps.registry
|
|
33
|
+
const target = await activeAssistantTarget({ registry: deps.registry }, tenant);
|
|
33
34
|
const assistant = target?.served.artifact.server.assistant;
|
|
34
35
|
if (!target?.deploymentId || !assistant)
|
|
35
36
|
return sendJson(res, 409, { error: 'deployment has no embedded assistant' });
|
|
@@ -7,6 +7,7 @@ import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
|
7
7
|
import { sendForbidden } from '../http-util.js';
|
|
8
8
|
import { resolveAssistantModelBinding } from './assistant-model-binding.js';
|
|
9
9
|
import { now } from './assistant-route-http.js';
|
|
10
|
+
import { activeAssistantTarget } from './assistant-session-target.js';
|
|
10
11
|
import { authorizeControlPlane } from './control-plane.js';
|
|
11
12
|
/**
|
|
12
13
|
* The doctor half of the assistant boundary, kept out of `assistant.ts` for the same reason the
|
|
@@ -43,7 +44,7 @@ export async function handleAssistantDoctor(req, res, tenant, deps) {
|
|
|
43
44
|
(typeof userId !== 'string' || userId.length < 1 || userId.length > 240))) {
|
|
44
45
|
return sendJson(res, 400, { error: 'clientId, clientSecret, and origin are required' });
|
|
45
46
|
}
|
|
46
|
-
const target = await deps.registry
|
|
47
|
+
const target = await activeAssistantTarget({ registry: deps.registry }, tenant);
|
|
47
48
|
const assistant = target?.served.artifact.server.assistant;
|
|
48
49
|
const deploymentOk = Boolean(target?.deploymentId && assistant);
|
|
49
50
|
const client = await deps.store.authenticateClient(clientId, clientSecret);
|
|
@@ -3,6 +3,7 @@ import { assistantEmbedOperatorView, parsePublicEmbedBudget, publicSurfaceOf, su
|
|
|
3
3
|
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
4
4
|
import { sendForbidden } from '../http-util.js';
|
|
5
5
|
import { now } from './assistant-route-http.js';
|
|
6
|
+
import { activeAssistantTarget } from './assistant-session-target.js';
|
|
6
7
|
import { authorizeControlPlane } from './control-plane.js';
|
|
7
8
|
/**
|
|
8
9
|
* The operator's view of a tenant's public surfaces, and the one control over them.
|
|
@@ -45,6 +46,9 @@ export async function handleAssistantEmbeds(req, res, tenant, embedId, deps) {
|
|
|
45
46
|
const budget = parsePublicEmbedBudget(body.value);
|
|
46
47
|
if (!budget.ok)
|
|
47
48
|
return sendJson(res, 400, { error: budget.error });
|
|
49
|
+
const owned = (await embeds.list(tenant)).some((record) => record.embedId === embedId && record.revokedAt === undefined);
|
|
50
|
+
if (!owned)
|
|
51
|
+
return sendJson(res, 404, { error: 'embed not found' });
|
|
48
52
|
const updated = await embeds.setBudget(embedId, budget.value, now(deps));
|
|
49
53
|
// 404 here rather than the mint route's 403: this caller has already proven org membership, so
|
|
50
54
|
// telling them an id of theirs does not exist is information they are entitled to.
|
|
@@ -59,13 +63,14 @@ export async function handleAssistantEmbeds(req, res, tenant, embedId, deps) {
|
|
|
59
63
|
return sendJson(res, 405, { error: 'method not allowed' });
|
|
60
64
|
}
|
|
61
65
|
async function view(record, tenant, defaults, deps, counters) {
|
|
62
|
-
const target = await deps.registry
|
|
66
|
+
const target = await activeAssistantTarget({ registry: deps.registry }, tenant);
|
|
63
67
|
const at = now(deps);
|
|
64
68
|
// The same bounds admission resolves, not the bare defaults: a sponsored surface enforces the
|
|
65
69
|
// hosted envelope, and reporting the unsponsored one told an operator a number nothing honours.
|
|
66
70
|
const deploymentId = target?.deploymentId ?? '';
|
|
67
|
-
const bounds =
|
|
68
|
-
?.publicAdmission
|
|
71
|
+
const bounds = target?.served.artifact.server.assistant?.model?.kind === 'noodle-managed'
|
|
72
|
+
? (await deps.managedModelResolver?.resolve({ tenant, deploymentId }))?.publicAdmission
|
|
73
|
+
: undefined;
|
|
69
74
|
return assistantEmbedOperatorView({
|
|
70
75
|
record,
|
|
71
76
|
surface: publicSurfaceOf(target?.served.artifact.server.assistant),
|
|
@@ -62,7 +62,7 @@ export async function replayOrConflict(res, deps, session, interaction, action)
|
|
|
62
62
|
const tool = assistantInteractionTool(current) ?? 'unknown_tool';
|
|
63
63
|
const result = current.publicOutcome.result ?? current.publicOutcome;
|
|
64
64
|
writeToolCompleted(res, current.id, tool, result, true);
|
|
65
|
-
const deployment = await sessionScopedTarget(deps.registry, session);
|
|
65
|
+
const deployment = await sessionScopedTarget(deps.registry, session, deps.resolveRuntimeTarget);
|
|
66
66
|
const view = deployment
|
|
67
67
|
? assistantViewAvailableData(deployment.served.artifact, {
|
|
68
68
|
id: current.id,
|