@noodleseed/one 0.46.0 → 0.47.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/auth-ops.d.ts.map +1 -1
- package/dist/commands/auth-ops.js +28 -4
- package/dist/commands/auth-ops.js.map +1 -1
- package/dist/commands/billing-enforcement-ops.d.ts +2 -0
- package/dist/commands/billing-enforcement-ops.d.ts.map +1 -0
- package/dist/commands/billing-enforcement-ops.js +312 -0
- package/dist/commands/billing-enforcement-ops.js.map +1 -0
- package/dist/commands/billing-metering-ops.d.ts +2 -0
- package/dist/commands/billing-metering-ops.d.ts.map +1 -0
- package/dist/commands/billing-metering-ops.js +128 -0
- package/dist/commands/billing-metering-ops.js.map +1 -0
- package/dist/commands/billing-metering-validation-ops.d.ts +2 -0
- package/dist/commands/billing-metering-validation-ops.d.ts.map +1 -0
- package/dist/commands/billing-metering-validation-ops.js +186 -0
- package/dist/commands/billing-metering-validation-ops.js.map +1 -0
- package/dist/commands/billing-ops.d.ts.map +1 -1
- package/dist/commands/billing-ops.js +6 -0
- package/dist/commands/billing-ops.js.map +1 -1
- package/dist/commands/catalog-data-resources.d.ts.map +1 -1
- package/dist/commands/catalog-data-resources.js +14 -3
- package/dist/commands/catalog-data-resources.js.map +1 -1
- package/dist/commands/catalog-render.d.ts.map +1 -1
- package/dist/commands/catalog-render.js +7 -5
- package/dist/commands/catalog-render.js.map +1 -1
- package/dist/commands/deploy-ops.d.ts.map +1 -1
- package/dist/commands/deploy-ops.js +10 -1
- package/dist/commands/deploy-ops.js.map +1 -1
- package/dist/commands/deploy-output.d.ts.map +1 -1
- package/dist/commands/deploy-output.js +4 -0
- package/dist/commands/deploy-output.js.map +1 -1
- package/dist/commands/deploy-version-resolution.d.ts +1 -0
- package/dist/commands/deploy-version-resolution.d.ts.map +1 -1
- package/dist/commands/deploy-version-resolution.js +8 -0
- package/dist/commands/deploy-version-resolution.js.map +1 -1
- package/dist/commands/mcp-apps-chatgpt.d.ts +7 -0
- package/dist/commands/mcp-apps-chatgpt.d.ts.map +1 -0
- package/dist/commands/mcp-apps-chatgpt.js +143 -0
- package/dist/commands/mcp-apps-chatgpt.js.map +1 -0
- package/dist/commands/mcp-apps.d.ts.map +1 -1
- package/dist/commands/mcp-apps.js +2 -114
- package/dist/commands/mcp-apps.js.map +1 -1
- package/dist/deploy-payload-size.d.ts +3 -0
- package/dist/deploy-payload-size.d.ts.map +1 -0
- package/dist/deploy-payload-size.js +29 -0
- package/dist/deploy-payload-size.js.map +1 -0
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +16 -8
- package/dist/deploy.js.map +1 -1
- package/dist/sdk-version-skew.d.ts +3 -0
- package/dist/sdk-version-skew.d.ts.map +1 -0
- package/dist/sdk-version-skew.js +34 -0
- package/dist/sdk-version-skew.js.map +1 -0
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js +2 -2
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-ref.js +2 -2
- package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-ref.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/node_modules/@noodle-borg/authoring/dist/server.d.ts +5 -0
- package/node_modules/@noodle-borg/authoring/dist/server.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/server.js +1 -0
- package/node_modules/@noodle-borg/authoring/dist/server.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.d.ts +7 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.js +4 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/compile.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/compile.js +3 -0
- package/node_modules/@noodle-borg/compiler/dist/compile.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts +12 -0
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js +7 -0
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.js +18 -0
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.d.ts +3 -0
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.js +12 -3
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-profile.d.ts +96 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-profile.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-profile.js +198 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-profile.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/integration.d.ts +25 -2
- package/node_modules/@noodle-borg/service/dist/billing/integration.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/integration.js +51 -5
- package/node_modules/@noodle-borg/service/dist/billing/integration.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/meter-capacity.d.ts +77 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-capacity.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-capacity.js +202 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-capacity.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation-contract.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation-contract.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation-contract.js +93 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation-contract.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation.d.ts +76 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation.js +233 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-live-validation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness-health.d.ts +89 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness-health.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness-health.js +191 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness-health.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness.d.ts +99 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness.js +136 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-readiness.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-runtime-config.d.ts +9 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-runtime-config.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-runtime-config.js +24 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-runtime-config.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-validation-epoch.d.ts +75 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-validation-epoch.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-validation-epoch.js +127 -0
- package/node_modules/@noodle-borg/service/dist/billing/meter-validation-epoch.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile-schema.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile-schema.js +107 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.d.ts +18 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.js +341 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-clock.d.ts +3 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-clock.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-clock.js +9 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-clock.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epoch-fixtures.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epoch-fixtures.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epoch-fixtures.js +102 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epoch-fixtures.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.d.ts +41 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.js +289 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-evidence-retention.d.ts +16 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-evidence-retention.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-evidence-retention.js +126 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-evidence-retention.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-live-validation.d.ts +33 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-live-validation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-live-validation.js +436 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-live-validation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-maintenance.d.ts +26 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-maintenance.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-maintenance.js +146 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-maintenance.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-partition.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-partition.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-partition.js +42 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-partition.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-prepare-preflight.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-prepare-preflight.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-prepare-preflight.js +44 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-prepare-preflight.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness-live.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness-live.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness-live.js +189 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness-live.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.d.ts +18 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.js +342 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-reconciliation.d.ts +27 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-reconciliation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-reconciliation.js +304 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-reconciliation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-retention.d.ts +22 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-retention.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-retention.js +224 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-retention.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-runtime.d.ts +33 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-runtime.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-runtime.js +173 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-runtime.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-schema.d.ts +7 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-schema.js +50 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-store.d.ts +34 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-store.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-store.js +157 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-store.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler.d.ts +56 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler.js +264 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-schema.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-schema.js +414 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-validation.d.ts +43 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-validation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-validation.js +321 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-validation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-lock.d.ts +10 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-lock.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-lock.js +13 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-lock.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-schema.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-schema.js +248 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-window-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-compaction.d.ts +29 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-compaction.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-compaction.js +240 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-compaction.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-health-schema.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-health-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-health-schema.js +140 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-writer-health-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-migration.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-migration.js +4 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-migration.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-schema.js +6 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-schema.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres.js +3 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/service-meter-runtime.d.ts +7 -0
- package/node_modules/@noodle-borg/service/dist/billing/service-meter-runtime.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/service-meter-runtime.js +19 -0
- package/node_modules/@noodle-borg/service/dist/billing/service-meter-runtime.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/shadow-meter.d.ts +9 -4
- package/node_modules/@noodle-borg/service/dist/billing/shadow-meter.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/shadow-meter.js +34 -95
- package/node_modules/@noodle-borg/service/dist/billing/shadow-meter.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/usage-identity.d.ts +14 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-identity.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-identity.js +87 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-identity.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-observer.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-observer.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-observer.js +26 -0
- package/node_modules/@noodle-borg/service/dist/billing/usage-observer.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing-public.d.ts +16 -0
- package/node_modules/@noodle-borg/service/dist/billing-public.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing-public.js +15 -0
- package/node_modules/@noodle-borg/service/dist/billing-public.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/customer-verifier.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/customer-verifier.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/customer-verifier.js +15 -0
- package/node_modules/@noodle-borg/service/dist/customer-verifier.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/http-util.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/http-util.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/http-util.js +1 -1
- package/node_modules/@noodle-borg/service/dist/http-util.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/index.d.ts +2 -7
- package/node_modules/@noodle-borg/service/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/index.js +1 -6
- package/node_modules/@noodle-borg/service/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/main.js +3 -0
- package/node_modules/@noodle-borg/service/dist/main.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/options.d.ts +18 -0
- package/node_modules/@noodle-borg/service/dist/options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/persistence-options.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/persistence-options.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/persistence-options.js +22 -0
- package/node_modules/@noodle-borg/service/dist/persistence-options.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-cohort.d.ts +17 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-cohort.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-cohort.js +145 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-cohort.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-readiness.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-readiness.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-readiness.js +78 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-readiness.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-validation.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-validation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-validation.js +108 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-meter-validation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-dispatch.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-dispatch.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/commercial-dispatch.js +99 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-dispatch.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.d.ts +25 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.js +35 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.js +3 -1
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve-options.d.ts +93 -0
- package/node_modules/@noodle-borg/service/dist/serve-options.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/serve-options.js +2 -0
- package/node_modules/@noodle-borg/service/dist/serve-options.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/serve.d.ts +2 -92
- package/node_modules/@noodle-borg/service/dist/serve.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.js +64 -59
- package/node_modules/@noodle-borg/service/dist/serve.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.d.ts +22 -0
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.js +51 -0
- package/node_modules/@noodle-borg/service/dist/service-resource-cleanup.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/service.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.js +10 -21
- package/node_modules/@noodle-borg/service/dist/service.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/cloudsql-pool.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/cloudsql-pool.js +7 -1
- package/node_modules/@noodle-borg/service/dist/store/cloudsql-pool.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-billing.d.ts +6 -2
- package/node_modules/@noodle-borg/service/dist/store/postgres-billing.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-billing.js +11 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-billing.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-server.js","sourceRoot":"","sources":["../src/sdk-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C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9 @@ export type McpToolInteractionOutcome = {
|
|
|
8
8
|
} | {
|
|
9
9
|
readonly status: 'failed';
|
|
10
10
|
readonly error: ExecutionError;
|
|
11
|
+
} | {
|
|
12
|
+
readonly status: 'interaction_unavailable';
|
|
13
|
+
readonly interaction: 'confirmation' | 'input';
|
|
11
14
|
} | {
|
|
12
15
|
readonly status: 'stopped';
|
|
13
16
|
readonly action: 'decline' | 'cancel';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-interaction.d.ts","sourceRoot":"","sources":["../src/tool-interaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAOxE,OAAO,EAAE,KAAK,eAAe,EAA4B,MAAM,uBAAuB,CAAC;AACvF,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EAOpB,MAAM,sBAAsB,CAAC;AAM9B,KAAK,YAAY,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,MAAM,MAAM,yBAAyB,GACjC;IAAE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GAC1D;IAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAA;CAAE,GAC7D;IACE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,cAAc,CAAC;CAC3C,CAAC;AAEN,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAA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GAAG,QAAQ,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,cAAc,CAAC;CAC3C,CAAC;AAEN,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,wBAAwB,CAAC,EAAE,eAAe,GAAG,aAAa,CAAC;IACpE,QAAQ,CAAC,eAAe,EAAE,CACxB,SAAS,EAAE,yBAAyB,GAAG,2BAA2B,KAC/D,IAAI,CAAC;CACX;AAED,+EAA+E;AAC/E,wBAAsB,qBAAqB,CAAC,EAC1C,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,wBAAwB,EACxB,eAAe,GAChB,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAgF9D"}
|
|
@@ -5,10 +5,19 @@ import { confirmationElicitationRequest, isAffirmativeConfirmation, } from './co
|
|
|
5
5
|
/** Execute one MCP tool through only standard negotiated form interactions. */
|
|
6
6
|
export async function runMcpToolInteraction({ server, artifact, tool, toolName, toolArguments, deps, formElicitationTransport, onProtocolError, }) {
|
|
7
7
|
const confirmationRequired = tool !== undefined && requiresToolConfirmation(tool.annotations);
|
|
8
|
-
|
|
8
|
+
const inputRequired = toolRequiresFormElicitation(tool);
|
|
9
|
+
if ((confirmationRequired || inputRequired) &&
|
|
9
10
|
!supportsFormElicitation(server, formElicitationTransport)) {
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
if (inputRequired)
|
|
12
|
+
return { status: 'interaction_unavailable', interaction: 'input' };
|
|
13
|
+
if (artifact.server.interactions?.confirmationFallback === 'host') {
|
|
14
|
+
const result = await executeToolInteractive(artifact, toolName, toolArguments, deps);
|
|
15
|
+
if (isInputRequired(result)) {
|
|
16
|
+
return { status: 'interaction_unavailable', interaction: 'input' };
|
|
17
|
+
}
|
|
18
|
+
return result.status === 'stopped' ? { ...result, source: 'input' } : result;
|
|
19
|
+
}
|
|
20
|
+
return { status: 'interaction_unavailable', interaction: 'confirmation' };
|
|
12
21
|
}
|
|
13
22
|
if (confirmationRequired && tool !== undefined) {
|
|
14
23
|
let preparation = await prepareToolForConfirmation(artifact, toolName, toolArguments, deps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-interaction.js","sourceRoot":"","sources":["../src/tool-interaction.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,SAAS,EACT,QAAQ,GACT,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAwB,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAGL,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,0BAA0B,EAC1B,UAAU,EACV,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-interaction.js","sourceRoot":"","sources":["../src/tool-interaction.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,SAAS,EACT,QAAQ,GACT,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAwB,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAGL,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,0BAA0B,EAC1B,UAAU,EACV,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,+BAA+B,CAAC;AA8BvC,+EAA+E;AAC/E,MAAM,CAAC,KAAK,UAAU,qBAAqB,CA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,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CACjG,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB,CAC9B,MAAc,EACd,SAA8D;IAE9D,OAAO,CACL,SAAS,KAAK,aAAa,IAAI,MAAM,CAAC,qBAAqB,EAAE,EAAE,WAAW,EAAE,IAAI,KAAK,SAAS,CAC/F,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,sBAAsB,CACnC,MAAc,EACd,MAA+B,EAC/B,aAAyB;IAEzB,IAAI,CAAC;QACH,OAAO,MAAM,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAAC,MAAM,CAAC;QACP,aAAa,EAAE,CAAC;QAChB,MAAM,IAAI,QAAQ,CAChB,SAAS,CAAC,aAAa,EACvB,2DAA2D,CAC5D,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { AuditEventInput } from '@noodle-borg/module';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { ControlPlaneIdentity } from '../auth/deploy-gate.js';
|
|
4
|
+
export declare const BILLING_ENFORCEMENT_PROFILE_SCHEMA_VERSION = 1;
|
|
5
|
+
export declare const BILLING_ENFORCEMENT_COHORT_KIND: "legacy_internal_v1";
|
|
6
|
+
export declare const LEGACY_INTERNAL_ENFORCEMENT_PROFILE: "legacy_internal_exempt";
|
|
7
|
+
export declare const POST_SEAL_ENFORCEMENT_PROFILE: "enforced";
|
|
8
|
+
export type BillingEnforcementProfileMode = typeof LEGACY_INTERNAL_ENFORCEMENT_PROFILE | typeof POST_SEAL_ENFORCEMENT_PROFILE;
|
|
9
|
+
export type BillingEnforcementCohortKind = typeof BILLING_ENFORCEMENT_COHORT_KIND;
|
|
10
|
+
export type BillingEnforcementProfileSource = 'legacy_cohort_seal' | 'post_seal_account';
|
|
11
|
+
export declare const BillingEnforcementCohortSealRequestSchema: z.ZodObject<{
|
|
12
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
13
|
+
cohortKind: z.ZodLiteral<"legacy_internal_v1">;
|
|
14
|
+
legacyAccountProfile: z.ZodLiteral<"legacy_internal_exempt">;
|
|
15
|
+
postSealAccountProfile: z.ZodLiteral<"enforced">;
|
|
16
|
+
reason: z.ZodString;
|
|
17
|
+
idempotencyKey: z.ZodString;
|
|
18
|
+
confirmed: z.ZodLiteral<true>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
export declare const BillingEnforcementCohortSealResponseSchema: z.ZodObject<{
|
|
21
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
22
|
+
cohortKind: z.ZodLiteral<"legacy_internal_v1">;
|
|
23
|
+
state: z.ZodLiteral<"sealed">;
|
|
24
|
+
replayed: z.ZodBoolean;
|
|
25
|
+
sealId: z.ZodString;
|
|
26
|
+
sealedAt: z.ZodISODateTime;
|
|
27
|
+
legacyAccountProfile: z.ZodLiteral<"legacy_internal_exempt">;
|
|
28
|
+
postSealAccountProfile: z.ZodLiteral<"enforced">;
|
|
29
|
+
billingAccountCount: z.ZodNumber;
|
|
30
|
+
profiledAccountCount: z.ZodNumber;
|
|
31
|
+
legacyInternalExemptAccountCount: z.ZodNumber;
|
|
32
|
+
enforcedAccountCount: z.ZodNumber;
|
|
33
|
+
unprofiledAccountCount: z.ZodNumber;
|
|
34
|
+
billingAttributionComplete: z.ZodLiteral<true>;
|
|
35
|
+
attributionBlockerCount: z.ZodLiteral<0>;
|
|
36
|
+
activationState: z.ZodLiteral<"not_active">;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export declare const BillingEnforcementCohortStatusResponseSchema: z.ZodObject<{
|
|
39
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
40
|
+
cohortKind: z.ZodLiteral<"legacy_internal_v1">;
|
|
41
|
+
state: z.ZodEnum<{
|
|
42
|
+
sealed: "sealed";
|
|
43
|
+
unsealed: "unsealed";
|
|
44
|
+
}>;
|
|
45
|
+
sealId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
46
|
+
sealedAt: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodNull]>;
|
|
47
|
+
legacyAccountProfile: z.ZodLiteral<"legacy_internal_exempt">;
|
|
48
|
+
postSealAccountProfile: z.ZodLiteral<"enforced">;
|
|
49
|
+
billingAccountCount: z.ZodNumber;
|
|
50
|
+
profiledAccountCount: z.ZodNumber;
|
|
51
|
+
legacyInternalExemptAccountCount: z.ZodNumber;
|
|
52
|
+
enforcedAccountCount: z.ZodNumber;
|
|
53
|
+
unprofiledAccountCount: z.ZodNumber;
|
|
54
|
+
billingAttributionComplete: z.ZodBoolean;
|
|
55
|
+
attributionBlockerCount: z.ZodNumber;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
export type BillingEnforcementCohortSealRequest = z.infer<typeof BillingEnforcementCohortSealRequestSchema>;
|
|
58
|
+
export type BillingEnforcementCohortSealResponse = z.infer<typeof BillingEnforcementCohortSealResponseSchema>;
|
|
59
|
+
export type BillingEnforcementCohortStatusResponse = z.infer<typeof BillingEnforcementCohortStatusResponseSchema>;
|
|
60
|
+
export interface BillingAccountEnforcementProfileRecord {
|
|
61
|
+
readonly schemaVersion: 1;
|
|
62
|
+
readonly billingAccountId: string;
|
|
63
|
+
readonly version: number;
|
|
64
|
+
readonly mode: BillingEnforcementProfileMode;
|
|
65
|
+
readonly cohortKind: BillingEnforcementCohortKind;
|
|
66
|
+
readonly cohortSealId: string;
|
|
67
|
+
readonly source: BillingEnforcementProfileSource;
|
|
68
|
+
readonly effectiveFrom: string;
|
|
69
|
+
readonly createdAt: string;
|
|
70
|
+
}
|
|
71
|
+
export interface BillingEnforcementProfileStore {
|
|
72
|
+
/** PostgreSQL stores persist seal success audits with the classification transaction. */
|
|
73
|
+
readonly successAuditMode?: 'transactional';
|
|
74
|
+
getEnforcementCohortStatus(): Promise<BillingEnforcementCohortStatusResponse>;
|
|
75
|
+
sealEnforcementCohort(input: {
|
|
76
|
+
readonly request: BillingEnforcementCohortSealRequest;
|
|
77
|
+
readonly actor: ControlPlaneIdentity;
|
|
78
|
+
readonly service: string;
|
|
79
|
+
}): Promise<BillingEnforcementCohortSealResponse>;
|
|
80
|
+
getActiveBillingAccountEnforcementProfile(billingAccountId: string): Promise<BillingAccountEnforcementProfileRecord | undefined>;
|
|
81
|
+
}
|
|
82
|
+
export type BillingEnforcementCohortConflictCode = 'idempotency_key_conflict' | 'enforcement_cohort_already_sealed' | 'billing_attribution_incomplete' | 'enforcement_profile_state_conflict' | 'serialization_conflict';
|
|
83
|
+
export declare class BillingEnforcementCohortConflictError extends Error {
|
|
84
|
+
readonly code: BillingEnforcementCohortConflictCode;
|
|
85
|
+
constructor(code: BillingEnforcementCohortConflictCode, message: string);
|
|
86
|
+
}
|
|
87
|
+
export declare function parseBillingEnforcementCohortSealRequest(value: unknown): BillingEnforcementCohortSealRequest;
|
|
88
|
+
export declare function billingEnforcementCohortRequestFingerprint(input: {
|
|
89
|
+
readonly action: 'seal';
|
|
90
|
+
readonly request: BillingEnforcementCohortSealRequest;
|
|
91
|
+
readonly actor: Pick<ControlPlaneIdentity, 'subject' | 'email'>;
|
|
92
|
+
readonly service: string;
|
|
93
|
+
}): string;
|
|
94
|
+
export declare function billingEnforcementCohortSuccessAudit(response: BillingEnforcementCohortSealResponse, actor: Pick<ControlPlaneIdentity, 'subject' | 'email'>): AuditEventInput;
|
|
95
|
+
export declare function normalizeBillingEnforcementServiceUrl(value: string): string;
|
|
96
|
+
//# sourceMappingURL=enforcement-profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enforcement-profile.d.ts","sourceRoot":"","sources":["../../src/billing/enforcement-profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK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OAAO,CAAC,GACrD,eAAe,CAyBjB;AAED,wBAAgB,qCAAqC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAa3E"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { billingContentChecksum } from './model.js';
|
|
3
|
+
export const BILLING_ENFORCEMENT_PROFILE_SCHEMA_VERSION = 1;
|
|
4
|
+
export const BILLING_ENFORCEMENT_COHORT_KIND = 'legacy_internal_v1';
|
|
5
|
+
export const LEGACY_INTERNAL_ENFORCEMENT_PROFILE = 'legacy_internal_exempt';
|
|
6
|
+
export const POST_SEAL_ENFORCEMENT_PROFILE = 'enforced';
|
|
7
|
+
const scalarSchema = (label, max) => z
|
|
8
|
+
.string()
|
|
9
|
+
.trim()
|
|
10
|
+
.min(1, `${label} is required`)
|
|
11
|
+
.max(max, `${label} must be ${max} characters or fewer`)
|
|
12
|
+
.refine((value) => !hasControlCharacters(value), `${label} cannot contain control characters`);
|
|
13
|
+
export const BillingEnforcementCohortSealRequestSchema = z.strictObject({
|
|
14
|
+
schemaVersion: z.literal(BILLING_ENFORCEMENT_PROFILE_SCHEMA_VERSION),
|
|
15
|
+
cohortKind: z.literal(BILLING_ENFORCEMENT_COHORT_KIND),
|
|
16
|
+
legacyAccountProfile: z.literal(LEGACY_INTERNAL_ENFORCEMENT_PROFILE),
|
|
17
|
+
postSealAccountProfile: z.literal(POST_SEAL_ENFORCEMENT_PROFILE),
|
|
18
|
+
reason: scalarSchema('reason', 512),
|
|
19
|
+
idempotencyKey: scalarSchema('idempotencyKey', 256),
|
|
20
|
+
confirmed: z.literal(true),
|
|
21
|
+
});
|
|
22
|
+
export const BillingEnforcementCohortSealResponseSchema = z
|
|
23
|
+
.strictObject({
|
|
24
|
+
schemaVersion: z.literal(BILLING_ENFORCEMENT_PROFILE_SCHEMA_VERSION),
|
|
25
|
+
cohortKind: z.literal(BILLING_ENFORCEMENT_COHORT_KIND),
|
|
26
|
+
state: z.literal('sealed'),
|
|
27
|
+
replayed: z.boolean(),
|
|
28
|
+
sealId: scalarSchema('sealId', 128),
|
|
29
|
+
sealedAt: z.iso.datetime({ offset: true }),
|
|
30
|
+
legacyAccountProfile: z.literal(LEGACY_INTERNAL_ENFORCEMENT_PROFILE),
|
|
31
|
+
postSealAccountProfile: z.literal(POST_SEAL_ENFORCEMENT_PROFILE),
|
|
32
|
+
billingAccountCount: z.number().int().nonnegative(),
|
|
33
|
+
profiledAccountCount: z.number().int().nonnegative(),
|
|
34
|
+
legacyInternalExemptAccountCount: z.number().int().nonnegative(),
|
|
35
|
+
enforcedAccountCount: z.number().int().nonnegative(),
|
|
36
|
+
unprofiledAccountCount: z.number().int().nonnegative(),
|
|
37
|
+
billingAttributionComplete: z.literal(true),
|
|
38
|
+
attributionBlockerCount: z.literal(0),
|
|
39
|
+
activationState: z.literal('not_active'),
|
|
40
|
+
})
|
|
41
|
+
.superRefine(validateSealResponse);
|
|
42
|
+
export const BillingEnforcementCohortStatusResponseSchema = z
|
|
43
|
+
.strictObject({
|
|
44
|
+
schemaVersion: z.literal(BILLING_ENFORCEMENT_PROFILE_SCHEMA_VERSION),
|
|
45
|
+
cohortKind: z.literal(BILLING_ENFORCEMENT_COHORT_KIND),
|
|
46
|
+
state: z.enum(['unsealed', 'sealed']),
|
|
47
|
+
sealId: z.union([scalarSchema('sealId', 128), z.null()]),
|
|
48
|
+
sealedAt: z.union([z.iso.datetime({ offset: true }), z.null()]),
|
|
49
|
+
legacyAccountProfile: z.literal(LEGACY_INTERNAL_ENFORCEMENT_PROFILE),
|
|
50
|
+
postSealAccountProfile: z.literal(POST_SEAL_ENFORCEMENT_PROFILE),
|
|
51
|
+
billingAccountCount: z.number().int().nonnegative(),
|
|
52
|
+
profiledAccountCount: z.number().int().nonnegative(),
|
|
53
|
+
legacyInternalExemptAccountCount: z.number().int().nonnegative(),
|
|
54
|
+
enforcedAccountCount: z.number().int().nonnegative(),
|
|
55
|
+
unprofiledAccountCount: z.number().int().nonnegative(),
|
|
56
|
+
billingAttributionComplete: z.boolean(),
|
|
57
|
+
attributionBlockerCount: z.number().int().nonnegative(),
|
|
58
|
+
})
|
|
59
|
+
.superRefine((response, context) => {
|
|
60
|
+
const hasSealIdentity = response.sealedAt !== null && response.sealId !== null;
|
|
61
|
+
const hasNoSealIdentity = response.sealedAt === null && response.sealId === null;
|
|
62
|
+
if ((response.state === 'sealed' && !hasSealIdentity) ||
|
|
63
|
+
(response.state === 'unsealed' && !hasNoSealIdentity)) {
|
|
64
|
+
context.addIssue({
|
|
65
|
+
code: 'custom',
|
|
66
|
+
path: ['sealedAt'],
|
|
67
|
+
message: 'sealId and sealedAt must be present exactly when the cohort is sealed',
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
validateAggregateCounts(response, context);
|
|
71
|
+
if (response.billingAttributionComplete !== (response.attributionBlockerCount === 0)) {
|
|
72
|
+
context.addIssue({
|
|
73
|
+
code: 'custom',
|
|
74
|
+
path: ['billingAttributionComplete'],
|
|
75
|
+
message: 'billingAttributionComplete must match attributionBlockerCount',
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
export class BillingEnforcementCohortConflictError extends Error {
|
|
80
|
+
code;
|
|
81
|
+
constructor(code, message) {
|
|
82
|
+
super(message);
|
|
83
|
+
this.name = 'BillingEnforcementCohortConflictError';
|
|
84
|
+
this.code = code;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
export function parseBillingEnforcementCohortSealRequest(value) {
|
|
88
|
+
const result = BillingEnforcementCohortSealRequestSchema.safeParse(value);
|
|
89
|
+
if (!result.success) {
|
|
90
|
+
throw new Error(`invalid billing enforcement cohort seal: ${z.prettifyError(result.error)}`);
|
|
91
|
+
}
|
|
92
|
+
return result.data;
|
|
93
|
+
}
|
|
94
|
+
export function billingEnforcementCohortRequestFingerprint(input) {
|
|
95
|
+
return billingContentChecksum({
|
|
96
|
+
schemaVersion: input.request.schemaVersion,
|
|
97
|
+
action: input.action,
|
|
98
|
+
request: input.request,
|
|
99
|
+
actor: { subject: input.actor.subject, email: input.actor.email },
|
|
100
|
+
service: normalizeBillingEnforcementServiceUrl(input.service),
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
export function billingEnforcementCohortSuccessAudit(response, actor) {
|
|
104
|
+
return {
|
|
105
|
+
eventType: 'billing.enforcement.cohort.sealed',
|
|
106
|
+
org: 'platform',
|
|
107
|
+
actorSubject: actor.subject,
|
|
108
|
+
actorEmail: actor.email,
|
|
109
|
+
decision: 'allow',
|
|
110
|
+
status: response.replayed ? 200 : 201,
|
|
111
|
+
details: {
|
|
112
|
+
cohortKind: response.cohortKind,
|
|
113
|
+
state: response.state,
|
|
114
|
+
replayed: response.replayed,
|
|
115
|
+
sealId: response.sealId,
|
|
116
|
+
billingAccountCount: response.billingAccountCount,
|
|
117
|
+
profiledAccountCount: response.profiledAccountCount,
|
|
118
|
+
legacyInternalExemptAccountCount: response.legacyInternalExemptAccountCount,
|
|
119
|
+
enforcedAccountCount: response.enforcedAccountCount,
|
|
120
|
+
unprofiledAccountCount: response.unprofiledAccountCount,
|
|
121
|
+
billingAttributionComplete: response.billingAttributionComplete,
|
|
122
|
+
attributionBlockerCount: response.attributionBlockerCount,
|
|
123
|
+
legacyAccountProfile: response.legacyAccountProfile,
|
|
124
|
+
postSealAccountProfile: response.postSealAccountProfile,
|
|
125
|
+
activationState: response.activationState,
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
export function normalizeBillingEnforcementServiceUrl(value) {
|
|
130
|
+
const parsed = new URL(value);
|
|
131
|
+
if ((parsed.protocol !== 'https:' && parsed.protocol !== 'http:') ||
|
|
132
|
+
parsed.username !== '' ||
|
|
133
|
+
parsed.password !== '' ||
|
|
134
|
+
parsed.pathname !== '/' ||
|
|
135
|
+
parsed.search !== '' ||
|
|
136
|
+
parsed.hash !== '') {
|
|
137
|
+
throw new Error('billing enforcement service must be an HTTP(S) origin');
|
|
138
|
+
}
|
|
139
|
+
return parsed.origin;
|
|
140
|
+
}
|
|
141
|
+
function hasControlCharacters(value) {
|
|
142
|
+
return [...value].some((character) => {
|
|
143
|
+
const code = character.charCodeAt(0);
|
|
144
|
+
return code <= 0x1f || code === 0x7f;
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function validateAggregateCounts(response, context) {
|
|
148
|
+
if (response.billingAccountCount !==
|
|
149
|
+
response.legacyInternalExemptAccountCount +
|
|
150
|
+
response.enforcedAccountCount +
|
|
151
|
+
response.unprofiledAccountCount) {
|
|
152
|
+
context.addIssue({
|
|
153
|
+
code: 'custom',
|
|
154
|
+
path: ['billingAccountCount'],
|
|
155
|
+
message: 'billingAccountCount must equal the enforcement profile classification counts',
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
if (response.profiledAccountCount !==
|
|
159
|
+
response.legacyInternalExemptAccountCount + response.enforcedAccountCount) {
|
|
160
|
+
context.addIssue({
|
|
161
|
+
code: 'custom',
|
|
162
|
+
path: ['profiledAccountCount'],
|
|
163
|
+
message: 'profiledAccountCount must equal the active enforcement profile counts',
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function validateSealResponse(response, context) {
|
|
168
|
+
validateAggregateCounts(response, context);
|
|
169
|
+
if (response.unprofiledAccountCount !== 0) {
|
|
170
|
+
context.addIssue({
|
|
171
|
+
code: 'custom',
|
|
172
|
+
path: ['unprofiledAccountCount'],
|
|
173
|
+
message: 'a sealed cohort cannot contain an unprofiled billing account',
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
if (response.profiledAccountCount !== response.billingAccountCount) {
|
|
177
|
+
context.addIssue({
|
|
178
|
+
code: 'custom',
|
|
179
|
+
path: ['profiledAccountCount'],
|
|
180
|
+
message: 'every billing account must be profiled when the cohort is sealed',
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
if (response.legacyInternalExemptAccountCount !== response.billingAccountCount) {
|
|
184
|
+
context.addIssue({
|
|
185
|
+
code: 'custom',
|
|
186
|
+
path: ['legacyInternalExemptAccountCount'],
|
|
187
|
+
message: 'every account in the sealed launch cohort must be legacy internal exempt',
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
if (response.enforcedAccountCount !== 0) {
|
|
191
|
+
context.addIssue({
|
|
192
|
+
code: 'custom',
|
|
193
|
+
path: ['enforcedAccountCount'],
|
|
194
|
+
message: 'the immutable seal result cannot contain a post-seal enforced account',
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=enforcement-profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enforcement-profile.js","sourceRoot":"","sources":["../../src/billing/enforcement-profile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,CAAC,MAAM,0CAA0C,GAAG,CAAC,CAAC;AAC5D,MAAM,CAAC,MAAM,+BAA+B,GAAG,oBAA6B,CAAC;AAC7E,MAAM,CAAC,MAAM,mCAAmC,GAAG,wBAAiC,CAAC;AACrF,MAAM,CAAC,MAAM,6BAA6B,GAAG,UAAmB,CAAC;AAQjE,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,EAAE,CAClD,CAAC;KACE,MAAM,EAAE;KACR,IAAI,EAAE;KACN,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,cAAc,CAAC;KAC9B,GAAG,CAAC,GAAG,EAAE,GAAG,KAAK,YAAY,GAAG,sBAAsB,CAAC;KACvD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,oCAAoC,CAAC,CAAC;AAEnG,MAAM,CAAC,MAAM,yCAAyC,GAAG,CAAC,CAAC,YAAY,CAAC;IACtE,aAAa,EAAE,CAA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AI,QAAQ,CAAC,gCAAgC,KAAK,QAAQ,CAAC,mBAAmB,EAAE,CAAC;QAC/E,OAAO,CAAC,QAAQ,CAAC;YACf,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,kCAAkC,CAAC;YAC1C,OAAO,EAAE,0EAA0E;SACpF,CAAC,CAAC;IACL,CAAC;IACD,IAAI,QAAQ,CAAC,oBAAoB,KAAK,CAAC,EAAE,CAAC;QACxC,OAAO,CAAC,QAAQ,CAAC;YACf,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,sBAAsB,CAAC;YAC9B,OAAO,EAAE,uEAAuE;SACjF,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type HostedToolDispatchHook, type Logger } from '@noodle-borg/transport-http';
|
|
2
|
+
import type { Pool } from 'pg';
|
|
3
|
+
import type { BillingMeterReadinessStore } from './meter-readiness.js';
|
|
4
|
+
import type { BillingMeterLiveRuntimeExpectation } from './meter-readiness-health.js';
|
|
5
|
+
import type { BillingMeterValidationEpochStore } from './meter-validation-epoch.js';
|
|
6
|
+
import type { BillingMeterValidationEpochPreparePreflight } from './postgres-meter-epochs.js';
|
|
7
|
+
import { type BillingUsageObserver } from './usage-observer.js';
|
|
2
8
|
import type { BillingUsageStore } from './usage-store.js';
|
|
3
9
|
interface BillingUsageIntegration {
|
|
4
10
|
readonly dispatch?: HostedToolDispatchHook;
|
|
@@ -7,7 +13,24 @@ interface BillingUsageIntegration {
|
|
|
7
13
|
readonly clock?: () => Date;
|
|
8
14
|
};
|
|
9
15
|
}
|
|
16
|
+
interface BillingServiceIntegrationOptions {
|
|
17
|
+
readonly billingUsageHmacKey?: string;
|
|
18
|
+
readonly clock?: () => Date;
|
|
19
|
+
readonly logger?: Logger;
|
|
20
|
+
readonly validationRuntime?: BillingMeterLiveRuntimeExpectation;
|
|
21
|
+
}
|
|
10
22
|
/** Keep optional shadow wiring and the matching read projection on one service-owned switch. */
|
|
11
|
-
export declare function billingUsageIntegration(store: BillingUsageStore, hmacKey: string | undefined, clock: (() => Date) | undefined, logger: Logger): BillingUsageIntegration;
|
|
23
|
+
export declare function billingUsageIntegration(store: BillingUsageStore, hmacKey: string | undefined, clock: (() => Date) | undefined, logger: Logger, observerOverride?: BillingUsageObserver): BillingUsageIntegration;
|
|
24
|
+
/** Keep Postgres-only readiness loading out of the lightweight in-memory service path. */
|
|
25
|
+
export declare function createPostgresBillingMeterReadinessStore(pool: Pool, options: BillingServiceIntegrationOptions): Promise<BillingMeterReadinessStore>;
|
|
26
|
+
/** Keep the Postgres-only validation lifecycle out of the lightweight in-memory service path. */
|
|
27
|
+
export declare function createPostgresBillingMeterValidationEpochStore(pool: Pool, options: {
|
|
28
|
+
readonly billingUsageHmacKey?: string;
|
|
29
|
+
readonly releaseSha?: string;
|
|
30
|
+
/** Foundation checks run before writer-session baselines in the same lifecycle transaction. */
|
|
31
|
+
readonly foundationPreflight?: BillingMeterValidationEpochPreparePreflight;
|
|
32
|
+
}): Promise<BillingMeterValidationEpochStore>;
|
|
33
|
+
/** Start optional v1 shadow observation without duplicating its configuration guard in the server. */
|
|
34
|
+
export declare function startConfiguredShadowBillingObservation(store: BillingUsageStore, options: BillingServiceIntegrationOptions): Promise<void>;
|
|
12
35
|
export {};
|
|
13
36
|
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../src/billing/integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../src/billing/integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAE,KAAK,MAAM,EAAc,MAAM,6BAA6B,CAAC;AACnG,OAAO,KAAK,EAAE,IAAI,EAA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B,8CAA8C,CAClE,IAAI,EAAE,IAAI,EACV,OAAO,EAAE;IACP,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,+FAA+F;IAC/F,QAAQ,CAAC,mBAAmB,CAAC,EAAE,2CAA2C,CAAC;CAC5E,GACA,OAAO,CAAC,gCAAgC,CAAC,CAmB3C;AAED,sGAAsG;AACtG,wBAAsB,uCAAuC,CAC3D,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,IAAI,CAAC,CAQf"}
|
|
@@ -1,20 +1,66 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { noopLogger } from '@noodle-borg/transport-http';
|
|
2
|
+
import { deriveBillingMeterKeyGeneration } from './meter-readiness.js';
|
|
3
|
+
import { createShadowBillingObserver, startShadowBillingObservation } from './shadow-meter.js';
|
|
4
|
+
import { parseBillingUsageHmacKey } from './usage-identity.js';
|
|
5
|
+
import { createFailOpenBillingUsageDispatch } from './usage-observer.js';
|
|
2
6
|
/** Keep optional shadow wiring and the matching read projection on one service-owned switch. */
|
|
3
|
-
export function billingUsageIntegration(store, hmacKey, clock, logger) {
|
|
7
|
+
export function billingUsageIntegration(store, hmacKey, clock, logger, observerOverride) {
|
|
4
8
|
const readOptions = {
|
|
5
9
|
billingUsageEnabled: hmacKey !== undefined,
|
|
6
10
|
...(clock !== undefined ? { clock } : {}),
|
|
7
11
|
};
|
|
8
12
|
if (hmacKey === undefined)
|
|
9
13
|
return { readOptions };
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
const observer = observerOverride ??
|
|
15
|
+
createShadowBillingObserver({
|
|
12
16
|
store,
|
|
13
17
|
hmacKey,
|
|
14
18
|
...(clock !== undefined ? { clock } : {}),
|
|
15
19
|
logger,
|
|
16
|
-
})
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
dispatch: createFailOpenBillingUsageDispatch(observer, logger),
|
|
17
23
|
readOptions,
|
|
18
24
|
};
|
|
19
25
|
}
|
|
26
|
+
/** Keep Postgres-only readiness loading out of the lightweight in-memory service path. */
|
|
27
|
+
export async function createPostgresBillingMeterReadinessStore(pool, options) {
|
|
28
|
+
const { PostgresBillingMeterReadinessStore } = await import('./postgres-meter-readiness.js');
|
|
29
|
+
return new PostgresBillingMeterReadinessStore(pool, {
|
|
30
|
+
...(options.billingUsageHmacKey !== undefined
|
|
31
|
+
? { keyGeneration: deriveBillingMeterKeyGeneration(options.billingUsageHmacKey) }
|
|
32
|
+
: {}),
|
|
33
|
+
...(options.validationRuntime !== undefined
|
|
34
|
+
? { validationRuntime: options.validationRuntime }
|
|
35
|
+
: {}),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/** Keep the Postgres-only validation lifecycle out of the lightweight in-memory service path. */
|
|
39
|
+
export async function createPostgresBillingMeterValidationEpochStore(pool, options) {
|
|
40
|
+
const [{ PostgresBillingMeterValidationEpochStore }, { prepareBillingMeterWriterEpochBaselines },] = await Promise.all([
|
|
41
|
+
import('./postgres-meter-epochs.js'),
|
|
42
|
+
import('./postgres-meter-live-validation.js'),
|
|
43
|
+
]);
|
|
44
|
+
const { foundationPreflight, ...storeOptions } = options;
|
|
45
|
+
return new PostgresBillingMeterValidationEpochStore(pool, {
|
|
46
|
+
...storeOptions,
|
|
47
|
+
...(foundationPreflight === undefined
|
|
48
|
+
? {}
|
|
49
|
+
: {
|
|
50
|
+
preparePreflight: async (input) => (await foundationPreflight(input)) &&
|
|
51
|
+
(await prepareBillingMeterWriterEpochBaselines(input)),
|
|
52
|
+
}),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/** Start optional v1 shadow observation without duplicating its configuration guard in the server. */
|
|
56
|
+
export async function startConfiguredShadowBillingObservation(store, options) {
|
|
57
|
+
if (options.billingUsageHmacKey === undefined)
|
|
58
|
+
return;
|
|
59
|
+
parseBillingUsageHmacKey(options.billingUsageHmacKey);
|
|
60
|
+
await startShadowBillingObservation({
|
|
61
|
+
store,
|
|
62
|
+
startedAt: (options.clock ?? (() => new Date()))().toISOString(),
|
|
63
|
+
logger: options.logger ?? noopLogger,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
20
66
|
//# sourceMappingURL=integration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.js","sourceRoot":"","sources":["../../src/billing/integration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration.js","sourceRoot":"","sources":["../../src/billing/integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGnG,OAAO,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAC;AAIvE,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAC/F,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAA6B,kCAAkC,EAAE,MAAM,qBAAqB,CAAC;AAkBpG,gGAAgG;AAChG,MAAM,UAAU,uBAAuB,CACrC,KAAwB,EACxB,OAA2B,EAC3B,KAA+B,EAC/B,MAAc,EACd,gBAAuC;IAEvC,MAAM,WAAW,GAAG;QAClB,mBAAmB,EAAE,OAAO,KAAK,SAAS;QAC1C,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1C,CAAC;IACF,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,EAAE,WAAW,EAAE,CAAC;IAClD,MAAM,QAAQ,GACZ,gBAAgB;QAChB,2BAA2B,CAAC;YAC1B,KAAK;YACL,OAAO;YACP,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACzC,MAAM;SACP,CAAC,CAAC;IACL,OAAO;QACL,QAAQ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