@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
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { createHmac, randomUUID } from 'node:crypto';
|
|
2
|
+
import { canonicalJson } from '@noodle-borg/compiler';
|
|
3
|
+
/** Generic execution evidence adapter. It stores no application input and cannot dispatch or replay work. */
|
|
4
|
+
export function createOperationEvidencePort(options) {
|
|
5
|
+
if (options.identityKey.length < 32 || !/^[A-Za-z0-9_-]{16,128}$/.test(options.epoch))
|
|
6
|
+
throw new Error('Invalid operation evidence configuration');
|
|
7
|
+
const hash = (value) => createHmac('sha256', options.identityKey).update(canonicalJson(value)).digest('hex');
|
|
8
|
+
const now = () => options.now?.() ?? Date.now();
|
|
9
|
+
return {
|
|
10
|
+
async begin(intent) {
|
|
11
|
+
const startedAt = now();
|
|
12
|
+
const bound = options.executionBoundMs(intent);
|
|
13
|
+
const days = await options.historyDays();
|
|
14
|
+
if (!Number.isSafeInteger(bound) ||
|
|
15
|
+
bound === undefined ||
|
|
16
|
+
bound < 1 ||
|
|
17
|
+
!Number.isInteger(days) ||
|
|
18
|
+
days < 1 ||
|
|
19
|
+
days > 365 ||
|
|
20
|
+
bound >= days * 86_400_000 ||
|
|
21
|
+
!(await options.authorize(intent)))
|
|
22
|
+
throw new Error('Operation evidence authority unavailable');
|
|
23
|
+
const connectionId = intent.operation.credentialBinding?.connectionId;
|
|
24
|
+
const generation = connectionId === undefined ? undefined : options.connectionGeneration(connectionId);
|
|
25
|
+
if (connectionId !== undefined && generation === undefined)
|
|
26
|
+
throw new Error('Original connected account unavailable');
|
|
27
|
+
const record = {
|
|
28
|
+
scope: options.scope,
|
|
29
|
+
id: intent.id,
|
|
30
|
+
lease: randomUUID(),
|
|
31
|
+
epoch: options.epoch,
|
|
32
|
+
deploymentId: options.deploymentId,
|
|
33
|
+
tool: intent.tool,
|
|
34
|
+
connector: intent.operation.connectorId,
|
|
35
|
+
operation: intent.operation.operation,
|
|
36
|
+
...(connectionId === undefined ? {} : { connectionId }),
|
|
37
|
+
...(generation === undefined ? {} : { generation }),
|
|
38
|
+
actorDigest: hash(intent.caller ?? null),
|
|
39
|
+
intentDigest: hash({
|
|
40
|
+
scope: options.scope,
|
|
41
|
+
deploymentId: options.deploymentId,
|
|
42
|
+
epoch: options.epoch,
|
|
43
|
+
operation: intent.operation,
|
|
44
|
+
input: intent.arguments,
|
|
45
|
+
caller: intent.caller ?? null,
|
|
46
|
+
revision: intent.executionRevision ?? null,
|
|
47
|
+
generation: generation ?? null,
|
|
48
|
+
}),
|
|
49
|
+
startedAt,
|
|
50
|
+
executionDeadline: startedAt + bound,
|
|
51
|
+
historyExpiresAt: startedAt + days * 86_400_000,
|
|
52
|
+
outcome: 'dispatching',
|
|
53
|
+
};
|
|
54
|
+
if (!(await options.store.claim(record)))
|
|
55
|
+
return undefined;
|
|
56
|
+
return {
|
|
57
|
+
async finish(evidence) {
|
|
58
|
+
const completionDays = await options.historyDays();
|
|
59
|
+
if (!Number.isInteger(completionDays) || completionDays < 1 || completionDays > 365)
|
|
60
|
+
throw new Error('Operation history policy unavailable');
|
|
61
|
+
if (!(await options.store.finish(options.scope, record.id, record.lease, record.epoch, evidence, now(), completionDays)))
|
|
62
|
+
throw new Error('Operation evidence claim expired');
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** Store adapters use the same narrow transition; late results cannot replace an expired/terminal claim. */
|
|
69
|
+
export function completeOperationEvidence(record, lease, epoch, evidence, now, historyDays) {
|
|
70
|
+
if (record.lease !== lease ||
|
|
71
|
+
record.epoch !== epoch ||
|
|
72
|
+
record.outcome !== 'dispatching' ||
|
|
73
|
+
record.executionDeadline <= now)
|
|
74
|
+
return undefined;
|
|
75
|
+
return {
|
|
76
|
+
...record,
|
|
77
|
+
outcome: evidence.outcome,
|
|
78
|
+
completedAt: now,
|
|
79
|
+
historyExpiresAt: now +
|
|
80
|
+
(historyDays === undefined
|
|
81
|
+
? record.historyExpiresAt - record.startedAt
|
|
82
|
+
: historyDays * 86_400_000),
|
|
83
|
+
...(evidence.reference === undefined ? {} : { reference: evidence.reference }),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export function operationEvidenceKey(scope, id) {
|
|
87
|
+
return JSON.stringify([scope.org, scope.app, scope.env, scope.installationId, id]);
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=operation-evidence.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { createServer } from 'node:http';
|
|
2
|
+
import { applySecurityHeaders, sendJson } from '@noodle-borg/transport-http';
|
|
3
|
+
import { resolveBuildInfo, serviceInfoPayload } from './build-info.js';
|
|
4
|
+
import { ServerRegistry } from './registry.js';
|
|
5
|
+
import { closeHttpServer, listenHttpServer } from './service-resource-cleanup.js';
|
|
6
|
+
export function resolveRecoveryMode(value) {
|
|
7
|
+
if (value === undefined)
|
|
8
|
+
return undefined;
|
|
9
|
+
if (value === 'quarantined' || value === 'reopened')
|
|
10
|
+
return value;
|
|
11
|
+
throw new Error('Invalid recovery mode; expected quarantined or reopened');
|
|
12
|
+
}
|
|
13
|
+
/** Deliberately no authorization/store lookup, artifact serving or application dispatch. */
|
|
14
|
+
export function createRecoveryQuarantineHandler(options) {
|
|
15
|
+
const build = options.buildInfo ?? resolveBuildInfo();
|
|
16
|
+
return (req, res) => {
|
|
17
|
+
applySecurityHeaders(res, options.tls ?? {});
|
|
18
|
+
res.setHeader('cache-control', 'no-store');
|
|
19
|
+
const path = new URL(req.url ?? '/', 'http://localhost').pathname;
|
|
20
|
+
if (req.method === 'GET') {
|
|
21
|
+
if (path === '/healthz')
|
|
22
|
+
return sendJson(res, 200, { status: 'ok' });
|
|
23
|
+
if (path === '/readyz')
|
|
24
|
+
return sendJson(res, 503, { status: 'quarantined' });
|
|
25
|
+
if (path === '/v1/service/info')
|
|
26
|
+
return sendJson(res, 200, serviceInfoPayload(build, false));
|
|
27
|
+
}
|
|
28
|
+
sendJson(res, 503, {
|
|
29
|
+
error: 'This service is quarantined for recovery.',
|
|
30
|
+
code: 'recovery_quarantined',
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/** No restored store is constructed or borrowed; even startup migrations/workers remain stopped. */
|
|
35
|
+
export async function serveRecoveryQuarantine(options) {
|
|
36
|
+
const host = options.host ?? '127.0.0.1';
|
|
37
|
+
const http = createServer(createRecoveryQuarantineHandler(options));
|
|
38
|
+
await listenHttpServer(http, options.port ?? 8787, host);
|
|
39
|
+
const { port } = http.address();
|
|
40
|
+
return {
|
|
41
|
+
http,
|
|
42
|
+
port,
|
|
43
|
+
url: `http://${host.includes(':') ? `[${host}]` : host}:${port}`,
|
|
44
|
+
// The existing programmatic return contract gets an empty local registry, never restored authority.
|
|
45
|
+
registry: new ServerRegistry(),
|
|
46
|
+
close: () => closeHttpServer(http),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=recovery-quarantine.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { publicSurfaceDelegatedAuthErrors } from '@noodle-borg/assistant-gateway/portable';
|
|
2
|
-
import { compile, InMemoryCatalog, } from '@noodle-borg/compiler';
|
|
2
|
+
import { compile, InMemoryCatalog, RECORD_CONNECTOR_ID, } from '@noodle-borg/compiler';
|
|
3
3
|
import { compileConnectors, delegatedTokenExchangeIdentityErrors, } from '@noodle-borg/connector-defs';
|
|
4
|
-
import { InMemoryConnectorRegistry, resolveManagedOrigins, } from '@noodle-borg/runtime';
|
|
4
|
+
import { InMemoryConnectorRegistry, resolveManagedOrigins, resolveVariableEnvironment, } from '@noodle-borg/runtime';
|
|
5
5
|
import { AppPackageSnapshotError, createAppPackageSnapshot, } from './app-package-snapshot.js';
|
|
6
6
|
import { missingServerConfigErrors } from './assistant-bindings.js';
|
|
7
7
|
import { ManagedConfigBroker } from './credential-broker.js';
|
|
@@ -20,6 +20,17 @@ export async function compileRegistryTarget(context, input) {
|
|
|
20
20
|
const cc = compileConnectors(connectors);
|
|
21
21
|
if (!cc.ok)
|
|
22
22
|
return { ok: false, errors: cc.errors };
|
|
23
|
+
if (cc.catalog.some((entry) => entry.id === RECORD_CONNECTOR_ID))
|
|
24
|
+
return {
|
|
25
|
+
ok: false,
|
|
26
|
+
errors: [
|
|
27
|
+
{
|
|
28
|
+
code: 'reserved_connector',
|
|
29
|
+
path: 'connectors',
|
|
30
|
+
message: 'The native record connector is platform-owned and cannot be supplied by an application.',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
};
|
|
23
34
|
catalogConnectors = cc.catalog;
|
|
24
35
|
httpConnectors = cc.connectors;
|
|
25
36
|
secretBindings = cc.secretBindings;
|
|
@@ -49,25 +60,54 @@ export async function compileRegistryTarget(context, input) {
|
|
|
49
60
|
const projectionErrors = compiled.ok
|
|
50
61
|
? publicSurfaceDelegatedAuthErrors(compiled.artifact, secretBindings)
|
|
51
62
|
: [];
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
63
|
+
const resolvedSecrets = await context.configStore.resolveConfigValues('secret', scope);
|
|
64
|
+
const resolvedVariables = await context.configStore.resolveConfigValues('variable', scope);
|
|
65
|
+
const businessVariables = new Set(compiled.ok
|
|
66
|
+
? compiled.artifact.server.variables
|
|
67
|
+
?.filter((declaration) => declaration.portal !== undefined)
|
|
68
|
+
.map((declaration) => declaration.name)
|
|
69
|
+
: []);
|
|
56
70
|
const connectorConfigErrors = [
|
|
57
71
|
...missingSecretErrors(secretBindings, resolvedSecrets),
|
|
58
|
-
...missingVariableErrors(variableBindings, resolvedVariables),
|
|
72
|
+
...missingVariableErrors(variableBindings.filter((name) => !businessVariables.has(name)), resolvedVariables),
|
|
59
73
|
];
|
|
60
74
|
if (!compiled.ok) {
|
|
61
75
|
return { ok: false, errors: [...connectorConfigErrors, ...compiled.errors] };
|
|
62
76
|
}
|
|
63
|
-
const missingServerConfig = missingServerConfigErrors(compiled.artifact, resolvedSecrets, resolvedVariables)
|
|
77
|
+
const missingServerConfig = missingServerConfigErrors(compiled.artifact, resolvedSecrets, resolvedVariables).filter((error) => error.code !== 'missing_variable' ||
|
|
78
|
+
!businessVariables.has(error.path.replace(/^variables\./, '')));
|
|
64
79
|
const errors = [
|
|
65
80
|
...identityErrors,
|
|
66
81
|
...projectionErrors,
|
|
67
82
|
...connectorConfigErrors,
|
|
68
83
|
...missingServerConfig,
|
|
69
84
|
];
|
|
70
|
-
const
|
|
85
|
+
const settings = resolveVariableEnvironment(compiled.artifact.server.variables ?? [], resolvedVariables);
|
|
86
|
+
if (!settings.ok)
|
|
87
|
+
errors.push({ ...settings.error, path: 'server.variables' });
|
|
88
|
+
if (settings.ok && deploymentId === undefined && settings.missing.length > 0) {
|
|
89
|
+
const previous = await context.activeArtifact();
|
|
90
|
+
if (previous !== undefined) {
|
|
91
|
+
const previouslyMissing = resolveVariableEnvironment(previous.server.variables ?? [], resolvedVariables);
|
|
92
|
+
for (const declaration of compiled.artifact.server.variables ?? []) {
|
|
93
|
+
if (!settings.missing.includes(declaration.name))
|
|
94
|
+
continue;
|
|
95
|
+
const old = previous.server.variables?.find((entry) => entry.name === declaration.name);
|
|
96
|
+
if (declaration.requiredFor.some((tool) => previous.tools.some((entry) => entry.name === tool) &&
|
|
97
|
+
!(previouslyMissing.ok &&
|
|
98
|
+
previouslyMissing.missing.includes(declaration.name) &&
|
|
99
|
+
old?.requiredFor.includes(tool))))
|
|
100
|
+
errors.push({
|
|
101
|
+
code: 'configuration_required',
|
|
102
|
+
path: `variables.${declaration.name}`,
|
|
103
|
+
message: 'Configure the new requirement before updating an existing capability.',
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const originResolution = resolveManagedOrigins(compiled.artifact, resolvedVariables, {
|
|
109
|
+
allowUnconfiguredPortal: true,
|
|
110
|
+
});
|
|
71
111
|
if (!originResolution.ok) {
|
|
72
112
|
const missingVariables = new Set(errors.filter((error) => error.code === 'missing_variable').map((error) => error.path));
|
|
73
113
|
errors.push(...originResolution.errors
|
|
@@ -92,7 +132,8 @@ export async function compileRegistryTarget(context, input) {
|
|
|
92
132
|
if (errors.length > 0 || !originResolution.ok) {
|
|
93
133
|
return { ok: false, errors, compiledArtifact: compiled.artifact };
|
|
94
134
|
}
|
|
95
|
-
|
|
135
|
+
// Keep declarations reusable; serving binds live operator settings once for each request.
|
|
136
|
+
const artifact = compiled.artifact;
|
|
96
137
|
const localAuthority = context.delegatedExchange === undefined &&
|
|
97
138
|
secretBindings.some((binding) => binding.authKind === 'delegatedTokenExchange')
|
|
98
139
|
? await context.localDevtoolsDelegatedExchange?.resolve()
|
|
@@ -138,18 +179,26 @@ export async function compileRegistryTarget(context, input) {
|
|
|
138
179
|
}),
|
|
139
180
|
});
|
|
140
181
|
const stateConnector = createDeploymentStateConnector(artifact.server.state, boundDeploymentId, context.stateHandleStoreFactory);
|
|
182
|
+
const nativeRecords = context.nativeRecords?.({
|
|
183
|
+
tenant,
|
|
184
|
+
artifact,
|
|
185
|
+
...(boundDeploymentId === undefined ? {} : { deploymentId: boundDeploymentId }),
|
|
186
|
+
});
|
|
141
187
|
return {
|
|
142
188
|
artifact,
|
|
143
189
|
deps: {
|
|
144
190
|
connectors: new InMemoryConnectorRegistry([
|
|
145
191
|
...context.platformConnectors,
|
|
192
|
+
...(nativeRecords === undefined ? [] : [nativeRecords]),
|
|
146
193
|
...(stateConnector !== undefined ? [stateConnector] : []),
|
|
147
194
|
...httpConnectors,
|
|
148
195
|
]),
|
|
149
196
|
broker,
|
|
150
197
|
tenantId: `${tenant.org}/${tenant.app}/${tenant.env}`,
|
|
151
198
|
...(boundDeploymentId !== undefined ? { deploymentId: boundDeploymentId } : {}),
|
|
152
|
-
env: () => context.configStore.
|
|
199
|
+
env: () => context.configStore.transactConfig === undefined
|
|
200
|
+
? context.configStore.resolveConfigValues('variable', scope)
|
|
201
|
+
: context.configStore.transactConfig(scope.org, (transaction) => transaction.resolveConfigValues('variable', scope)),
|
|
153
202
|
...(context.policyGate !== undefined ? { policy: context.policyGate } : {}),
|
|
154
203
|
...(context.knowledgeSearch !== undefined && (artifact.server.knowledge?.length ?? 0) > 0
|
|
155
204
|
? {
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { normalizeServerVersion } from '@noodle-borg/module';
|
|
2
2
|
import { deployAccessRequiresActor, deployerRequiredError, deploymentOwnerSubject, emptyMembershipSourcesError, membershipSourcesRequireOrgMembersError, missingCapabilityErrors, serverAuthRequiredError, } from './registry-helpers.js';
|
|
3
3
|
import { idempotentDeploymentId, mintDeploymentId } from './registry-targets.js';
|
|
4
|
+
/** Serialize candidate validation/activation with hierarchical configuration writers. */
|
|
5
|
+
export async function withDeploymentConfiguration(config, org, work) {
|
|
6
|
+
if (!config.transactConfig)
|
|
7
|
+
return work();
|
|
8
|
+
let result;
|
|
9
|
+
try {
|
|
10
|
+
return await config.transactConfig(org, async () => {
|
|
11
|
+
result = await work();
|
|
12
|
+
return result;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
// A nested activation rejection has rolled back; preserve its already mapped public diagnostic.
|
|
17
|
+
if (result?.ok === false)
|
|
18
|
+
return result;
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
4
22
|
export async function preflightRegistryDeploy(input) {
|
|
5
23
|
const { actor, accessMode, orgMembershipSources } = input.options;
|
|
6
24
|
if (input.options.serverVersion !== undefined) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { withDeploymentConfiguration } from './registry-deploy-transaction.js';
|
|
1
2
|
import { deploymentOwnerSubject, missingCapabilityErrors } from './registry-helpers.js';
|
|
2
3
|
import { activateInMemory } from './registry-state.js';
|
|
3
4
|
import { recordMatchesTenant, servedTargetFor, tenantDeploymentKey, tenantKey, tryServedTargetFor, } from './registry-targets.js';
|
|
@@ -7,7 +8,7 @@ import { recordMatchesTenant, servedTargetFor, tenantDeploymentKey, tenantKey, t
|
|
|
7
8
|
*/
|
|
8
9
|
export async function rollbackWithMappedErrors(input) {
|
|
9
10
|
try {
|
|
10
|
-
const result = await input.run
|
|
11
|
+
const result = await withDeploymentConfiguration(input.configStore, input.org, input.run);
|
|
11
12
|
if (result.ok)
|
|
12
13
|
await input.pairKnowledge();
|
|
13
14
|
return result;
|
|
@@ -57,7 +57,7 @@ export declare function registryArchiveApp(state: RegistryStateView, org: string
|
|
|
57
57
|
export declare function registryRestoreApp(state: RegistryStateView, org: string, app: string, compileRecord: CompileCustomerAuthRecord): Promise<AppRestoreResult | undefined>;
|
|
58
58
|
/** Compile exact private auth snapshots for a later atomic bulk-restore precondition. */
|
|
59
59
|
export declare function registryCustomerAuthRestoreProjections(state: RegistryStateView, deploymentIds: readonly string[], compileRecord: CompileCustomerAuthRecord): Promise<readonly CustomerAuthRestoreProjection[]>;
|
|
60
|
-
export declare function registrySweepArchived(state: RegistryStateView, before: string): Promise<readonly DeployRecord[]>;
|
|
60
|
+
export declare function registrySweepArchived(state: RegistryStateView, before: string, onPurge?: (org: string, app: string, at: string, retired?: boolean) => Promise<void>): Promise<readonly DeployRecord[]>;
|
|
61
61
|
/** The `apps` resource, store-first with a no-store fallback over the registry's own record cache. */
|
|
62
62
|
export declare function registryListApps(state: RegistryStateView, org: string, opts: {
|
|
63
63
|
readonly includeArchived?: boolean;
|
|
@@ -9,7 +9,7 @@ import { assertCustomerAuthRestorePrecondition, assertUniqueActiveCustomerAuthAu
|
|
|
9
9
|
import { assertDeploymentActivationUnlocked, assertDeploymentAppendUnlocked, } from './deployment-lock.js';
|
|
10
10
|
import { defaultActiveRecord } from './deployment-versioning.js';
|
|
11
11
|
import { recordMatchesTenant, tenantDeploymentKey, tenantKey } from './registry-targets.js';
|
|
12
|
-
import { appArchivedAt, deploymentSummary, paginateAppSummaries, planAppArchive, planAppRestore, resolveProductionEnvironment, summarizeApps, summarizeEnvs, withoutArchiveStamp, } from './store/records.js';
|
|
12
|
+
import { appArchivedAt, deploymentSummary, paginateAppSummaries, planAppArchive, planAppRestore, planArchivedAppSweep, resolveProductionEnvironment, summarizeApps, summarizeEnvs, withoutArchiveStamp, } from './store/records.js';
|
|
13
13
|
import { validateSlug, validateTenantRef } from './store/validate.js';
|
|
14
14
|
export function reconcilePlatformAccountResetRegistryCache(state, input) {
|
|
15
15
|
for (const app of input.apps) {
|
|
@@ -269,13 +269,13 @@ function deactivateScope(records, candidate) {
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
export async function registrySweepArchived(state, before) {
|
|
272
|
+
export async function registrySweepArchived(state, before, onPurge) {
|
|
273
273
|
let deleted;
|
|
274
274
|
if (state.store !== undefined) {
|
|
275
275
|
deleted = await state.store.sweepArchived(before);
|
|
276
276
|
}
|
|
277
277
|
else {
|
|
278
|
-
deleted = [...state.records.values()]
|
|
278
|
+
deleted = planArchivedAppSweep([...state.records.values()], before);
|
|
279
279
|
}
|
|
280
280
|
const ids = new Set(deleted.map((record) => record.deploymentId));
|
|
281
281
|
for (const id of ids) {
|
|
@@ -283,6 +283,9 @@ export async function registrySweepArchived(state, before) {
|
|
|
283
283
|
state.servers.delete(id);
|
|
284
284
|
}
|
|
285
285
|
purgeActiveTenantEntries(state, ids);
|
|
286
|
+
const apps = new Map(deleted.map((record) => [`${record.orgSlug}/${record.appSlug}`, record]));
|
|
287
|
+
for (const app of apps.values())
|
|
288
|
+
await onPurge?.(app.orgSlug, app.appSlug, new Date().toISOString(), true);
|
|
286
289
|
return deleted;
|
|
287
290
|
}
|
|
288
291
|
/** The `apps` resource, store-first with a no-store fallback over the registry's own record cache. */
|
|
@@ -1,7 +1,34 @@
|
|
|
1
1
|
import { createHash, randomUUID } from 'node:crypto';
|
|
2
|
+
import { RECORD_CONNECTOR_ID } from '@noodle-borg/compiler';
|
|
2
3
|
import { parseAppPackageSnapshot } from './app-package-snapshot.js';
|
|
3
4
|
import { hasExactCustomerAuthProjection } from './customer-auth-audience-binding.js';
|
|
4
5
|
import { deploymentOwnerSubject } from './registry-helpers.js';
|
|
6
|
+
import { validateTenantRef } from './store.js';
|
|
7
|
+
/** Replace only the platform record port; unrelated compiled runtime ports retain their authority. */
|
|
8
|
+
export function rebindNativeRecords(target, record, factory) {
|
|
9
|
+
const native = factory?.({
|
|
10
|
+
tenant: recordTenant(record),
|
|
11
|
+
artifact: target.served.artifact,
|
|
12
|
+
deploymentId: record.deploymentId,
|
|
13
|
+
});
|
|
14
|
+
const previous = target.served.deps.connectors;
|
|
15
|
+
return {
|
|
16
|
+
...target,
|
|
17
|
+
served: {
|
|
18
|
+
...target.served,
|
|
19
|
+
deps: {
|
|
20
|
+
...target.served.deps,
|
|
21
|
+
connectors: {
|
|
22
|
+
resolve: (ref) => ref.connectorId === RECORD_CONNECTOR_ID
|
|
23
|
+
? native?.version === ref.connectorVersion
|
|
24
|
+
? native
|
|
25
|
+
: undefined
|
|
26
|
+
: previous.resolve(ref),
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
5
32
|
/**
|
|
6
33
|
* Build the front-door {@link ServedTarget} for a persisted record: its access mode plus the credential the
|
|
7
34
|
* front-door checks. Legacy alpha records without an identity access mode are not served.
|
|
@@ -163,4 +190,26 @@ function deploymentSlug(name) {
|
|
|
163
190
|
.replace(/[^a-z0-9]+/g, '-')
|
|
164
191
|
.replace(/^-+|-+$/g, '') || 'server');
|
|
165
192
|
}
|
|
193
|
+
/** Immutable source projection shared by registry installation consumers. */
|
|
194
|
+
export async function deploymentSourceFor(state, tenant, deploymentId) {
|
|
195
|
+
const safeTenant = validateTenantRef(tenant);
|
|
196
|
+
const record = state.store
|
|
197
|
+
? await state.store.get(deploymentId)
|
|
198
|
+
: state.records.get(deploymentId);
|
|
199
|
+
if (record === undefined ||
|
|
200
|
+
record.archivedAt !== undefined ||
|
|
201
|
+
record.orgSlug !== safeTenant.org ||
|
|
202
|
+
record.appSlug !== safeTenant.app ||
|
|
203
|
+
record.environment !== safeTenant.env)
|
|
204
|
+
return undefined;
|
|
205
|
+
return {
|
|
206
|
+
manifest: record.manifest,
|
|
207
|
+
...(record.connectors === undefined ? {} : { connectors: record.connectors }),
|
|
208
|
+
...(record.hostedAssets === undefined
|
|
209
|
+
? {}
|
|
210
|
+
: { hostedAssets: structuredClone(record.hostedAssets) }),
|
|
211
|
+
...(record.accessMode === undefined ? {} : { accessMode: record.accessMode }),
|
|
212
|
+
...(record.serverVersion === undefined ? {} : { serverVersion: record.serverVersion }),
|
|
213
|
+
};
|
|
214
|
+
}
|
|
166
215
|
//# sourceMappingURL=registry-targets.js.map
|
|
@@ -10,6 +10,7 @@ import type { DelegatedExchangeOptions } from './delegated-token-exchange.js';
|
|
|
10
10
|
import type { ExternalCredentialExchangeRuntimeOptions } from './external-credential-exchange.js';
|
|
11
11
|
import type { GoogleWorkloadIdentityRuntimeOptions } from './google-workload-identity.js';
|
|
12
12
|
import type { LocalDevtoolsDelegatedExchangeRuntime } from './local-devtools-delegated-exchange.js';
|
|
13
|
+
import type { NativeRecordConnectorFactory } from './native-record-connector.js';
|
|
13
14
|
import type { OAuthStore } from './oauth/store.js';
|
|
14
15
|
import type { StateHandleStoreFactory } from './state-connector-factory.js';
|
|
15
16
|
import type { DeployRecord, SecretEnvelope, TenantAuthConfig } from './store.js';
|
|
@@ -93,6 +94,7 @@ export interface AccessUpdateOptions {
|
|
|
93
94
|
readonly serverVersion?: string | undefined;
|
|
94
95
|
}
|
|
95
96
|
export interface ServerRegistryOptions {
|
|
97
|
+
readonly nativeRecords?: NativeRecordConnectorFactory;
|
|
96
98
|
/** Pure renderer injection used for deployment-bound package construction and failure testing. */
|
|
97
99
|
readonly renderAppPackage?: AppPackageRenderer;
|
|
98
100
|
readonly customerVerifierFactory?: (auth: TenantAuthConfig) => OwnerTokenVerifier;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { CapabilityName } from '@noodle-borg/capabilities';
|
|
2
|
-
import type { CatalogConnector, LocalAssetOptions, PackagedAsset } from '@noodle-borg/compiler';
|
|
2
|
+
import type { CatalogConnector, HostedPackagedAsset, LocalAssetOptions, PackagedAsset } from '@noodle-borg/compiler';
|
|
3
3
|
import type { RollbackResult } from '@noodle-borg/control-plane/portable';
|
|
4
4
|
import { type KnowledgeDeployHooks, type KnowledgeSearchPortFactory } from '@noodle-borg/knowledge-operations/portable';
|
|
5
5
|
import type { PlatformIdentityRecoveryPlan } from '@noodle-borg/module';
|
|
6
6
|
import { type EndpointUrlOptions } from '@noodle-borg/module';
|
|
7
7
|
import type { Connector, SecretBox } from '@noodle-borg/runtime';
|
|
8
8
|
import type { ServedTarget } from '@noodle-borg/transport-http';
|
|
9
|
+
import type { NativeRecordConnectorFactory } from './native-record-connector.js';
|
|
9
10
|
import { type ActiveDeployProvenance } from './registry-helpers.js';
|
|
10
11
|
import type { AccessUpdateOptions, AccessUpdateResult, DeployOptions, DeployPreflightResult, RecoverResult, RunDeployResult, ServerRegistryOptions } from './registry-types.js';
|
|
11
12
|
import { type AppArchiveResult, type AppRestoreResult, type AppSummary, type ArtifactStore, type ConfigStore, type CustomerAuthRestoreProjection, type DeploymentListFilter, type DeploymentLock, type DeploymentLockUpdateResult, type DeploymentStatus, type DeploymentSummary, type DeployRecord, type EnvSummary, type ProductionEnvironmentChange, type TenantRef } from './store.js';
|
|
@@ -18,8 +19,9 @@ export declare class ServerRegistry {
|
|
|
18
19
|
setServiceCapabilities(capabilities: readonly CapabilityName[]): void;
|
|
19
20
|
supportsTransactionalModuleDeploymentActivation(): boolean;
|
|
20
21
|
setPlatformConnectors(input: {
|
|
21
|
-
readonly catalog
|
|
22
|
-
readonly connectors
|
|
22
|
+
readonly catalog?: readonly CatalogConnector[];
|
|
23
|
+
readonly connectors?: readonly Connector[];
|
|
24
|
+
readonly nativeRecords?: NativeRecordConnectorFactory;
|
|
23
25
|
}): void;
|
|
24
26
|
setLocalAssetOptions(options: LocalAssetOptions): void;
|
|
25
27
|
getLocalAsset(pathname: string): PackagedAsset | undefined;
|
|
@@ -35,6 +37,7 @@ export declare class ServerRegistry {
|
|
|
35
37
|
getActiveByTenantVersion(ref: TenantRef, serverVersion: string): Promise<ServedTarget | undefined>;
|
|
36
38
|
listDeployments(filter: DeploymentListFilter): Promise<readonly DeploymentSummary[]>;
|
|
37
39
|
getAppArchivedAt(org: string, app: string): Promise<string | undefined>;
|
|
40
|
+
setApplicationLifecycleObserver(observer: (org: string, app: string, at: string, retired?: boolean) => Promise<void>): void;
|
|
38
41
|
archiveApp(org: string, app: string, at: string): Promise<AppArchiveResult | undefined>;
|
|
39
42
|
restoreApp(org: string, app: string): Promise<AppRestoreResult | undefined>;
|
|
40
43
|
sweepArchived(before: string): Promise<readonly DeployRecord[]>;
|
|
@@ -45,12 +48,21 @@ export declare class ServerRegistry {
|
|
|
45
48
|
readonly apps: readonly AppSummary[];
|
|
46
49
|
readonly truncated: boolean;
|
|
47
50
|
}>;
|
|
51
|
+
getAppGeneration(org: string, app: string): Promise<string | undefined>;
|
|
48
52
|
getApp(org: string, app: string): Promise<AppSummary | undefined>;
|
|
49
53
|
listEnvironments(org: string, app: string, opts?: {
|
|
50
54
|
includeArchived?: boolean;
|
|
51
55
|
}): Promise<readonly EnvSummary[]>;
|
|
52
56
|
getEnvironment(org: string, app: string, env: string): Promise<EnvSummary | undefined>;
|
|
53
57
|
setProductionEnvironment(org: string, app: string, env: string): Promise<ProductionEnvironmentChange | undefined>;
|
|
58
|
+
/** Immutable executable bytes for a same-tenant installation; never includes configuration or credentials. */
|
|
59
|
+
getDeploymentSource(tenant: TenantRef, deploymentId: string): Promise<{
|
|
60
|
+
serverVersion?: string;
|
|
61
|
+
accessMode?: import("@noodle-borg/module").AccessMode;
|
|
62
|
+
hostedAssets?: readonly HostedPackagedAsset[];
|
|
63
|
+
connectors?: string;
|
|
64
|
+
manifest: string;
|
|
65
|
+
} | undefined>;
|
|
54
66
|
getDeployment(org: string, deploymentId: string): Promise<DeploymentSummary | undefined>;
|
|
55
67
|
/** Store-first historical package read; never recompiles or rerenders deployment bytes. */
|
|
56
68
|
getDeploymentPackage(org: string, deploymentId: string): Promise<import("./registry-package.js").DeploymentPackage | undefined>;
|