@noodleseed/one 0.45.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/saas-scaffold-template.js +1 -1
- package/dist/saas-scaffold-template.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/dist/widget-scaffold-template.d.ts.map +1 -1
- package/dist/widget-scaffold-template.js +4 -2
- package/dist/widget-scaffold-template.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js +3 -3
- 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.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-ref.js +6 -4
- 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/assistant.d.ts +9 -0
- package/node_modules/@noodle-borg/authoring/dist/assistant.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/assistant.js.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/server.d.ts +7 -0
- package/node_modules/@noodle-borg/authoring/dist/server.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/server.js +2 -0
- package/node_modules/@noodle-borg/authoring/dist/server.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.d.ts +10 -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 +6 -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 +4 -0
- package/node_modules/@noodle-borg/compiler/dist/compile.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts +52 -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 +17 -0
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.js +1 -0
- package/node_modules/@noodle-borg/protocol/dist/mapping.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/assistant-interactive.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/assistant-interactive.js +7 -3
- package/node_modules/@noodle-borg/service/dist/assistant-interactive.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/assistant-presentation.d.ts +11 -0
- package/node_modules/@noodle-borg/service/dist/assistant-presentation.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/assistant-presentation.js +67 -3
- package/node_modules/@noodle-borg/service/dist/assistant-presentation.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/assistant-interaction-stream.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-stream.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-stream.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interactions.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interactions.js +6 -2
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interactions.js.map +1 -1
- 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/node_modules/@noodle-borg/wire-contracts/dist/assistant.d.ts +3 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/assistant.d.ts.map +1 -1
- package/node_modules/@noodle-borg/wire-contracts/dist/assistant.js +3 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/assistant.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-interactive.js","sourceRoot":"","sources":["../src/assistant-interactive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAWvF,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,
|
|
1
|
+
{"version":3,"file":"assistant-interactive.js","sourceRoot":"","sources":["../src/assistant-interactive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAWvF,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC3B,+BAA+B,EAC/B,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iCAAiC,GAOlC,MAAM,sBAAsB,CAAC;AAG9B,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAc3D,6FAA6F;AAC7F,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,KAW3C;IACC,MAAM,WAAW,GAAG;QAClB,GAAG,KAAK,CAAC,WAAW;QACpB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,OAAO,EAAE,KAAK,CAAC,OAAO;KACvB,CAAC;IACF,IAAI,wBAAwB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QACrD,MAAM,QAAQ,GAAG,MAAM,0BAA0B,CAC/C,KAAK,CAAC,QAAQ,EACd,KAAK,CAAC,IAAI,CAAC,IAAI,EACf,KAAK,CAAC,SAAS,EACf,WAAW,CACZ,CAAC;QACF,IAAI,CAAC;YACH,IAAI,QAAQ,CAAC,MAAM,KAAK,gBAAgB,EAAE,CAAC;gBACzC,MAAM,WAAW,GAAG,MAAM,+BAA+B,CAAC;oBACxD,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,OAAO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IAE5E,OAAO,WAAW,CAAC,YAA8D,CAAC;AACpF,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,WAAmF;IAEnF,MAAM,YAAY,GAAG,WAAW,CAAC,YAAoD,CAAC;IACtF,OAAO,YAAY,EAAE,IAAI,KAAK,uBAAuB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;AACnF,CAAC"}
|
|
@@ -10,6 +10,7 @@ export type AssistantPresentationValue = AssistantPresentationScalar | Assistant
|
|
|
10
10
|
type ArgumentReview = {
|
|
11
11
|
readonly ok: true;
|
|
12
12
|
readonly value: unknown;
|
|
13
|
+
readonly reviewSchema: JsonSchema;
|
|
13
14
|
} | {
|
|
14
15
|
readonly ok: false;
|
|
15
16
|
readonly code: 'arguments_not_presentable';
|
|
@@ -18,6 +19,16 @@ type ArgumentReview = {
|
|
|
18
19
|
export declare function assistantArgumentReview(schema: JsonSchema, value: unknown): ArgumentReview;
|
|
19
20
|
/** Present the original tool input plus every elicited value that will affect prepared execution. */
|
|
20
21
|
export declare function assistantPreparedArgumentReview(schema: JsonSchema, review: ConfirmationReview): ArgumentReview;
|
|
22
|
+
/** Attach portable display metadata to the already-persisted review JSON without changing execution input. */
|
|
23
|
+
export declare function assistantConfirmationReview(input: {
|
|
24
|
+
readonly title?: string;
|
|
25
|
+
readonly description: string;
|
|
26
|
+
readonly review: Extract<ArgumentReview, {
|
|
27
|
+
readonly ok: true;
|
|
28
|
+
}>;
|
|
29
|
+
}): Readonly<Record<string, unknown>>;
|
|
30
|
+
/** Decode enriched and legacy persisted reviews into the additive public proposal shape. */
|
|
31
|
+
export declare function assistantConfirmationProposal(review: unknown): Readonly<Record<string, unknown>>;
|
|
21
32
|
/** Redact and bound execution output before SSE, history, audit, or model narration. */
|
|
22
33
|
export declare function assistantSafeOutput(schema: JsonSchema | undefined, value: unknown): AssistantPresentationValue;
|
|
23
34
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-presentation.d.ts","sourceRoot":"","sources":["../src/assistant-presentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAmB,MAAM,sBAAsB,CAAC;AAShF,KAAK,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACpD,KAAK,2BAA2B,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AACpE,UAAU,0BAA2B,SAAQ,aAAa,CAAC,0BAA0B,CAAC;CAAG;AACzF,UAAU,2BAA2B;IACnC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,0BAA0B,CAAC;CACpD;AACD,MAAM,MAAM,0BAA0B,GAClC,2BAA2B,GAC3B,0BAA0B,GAC1B,2BAA2B,CAAC;AAChC,KAAK,cAAc,GACf;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"assistant-presentation.d.ts","sourceRoot":"","sources":["../src/assistant-presentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAmB,MAAM,sBAAsB,CAAC;AAShF,KAAK,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACpD,KAAK,2BAA2B,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AACpE,UAAU,0BAA2B,SAAQ,aAAa,CAAC,0BAA0B,CAAC;CAAG;AACzF,UAAU,2BAA2B;IACnC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,0BAA0B,CAAC;CACpD;AACD,MAAM,MAAM,0BAA0B,GAClC,2BAA2B,GAC3B,0BAA0B,GAC1B,2BAA2B,CAAC;AAChC,KAAK,cAAc,GACf;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAA;CAAE,GACjF;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAA;CAAE,CAAC;AAEvE,sGAAsG;AACtG,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,GAAG,cAAc,CAK1F;AAED,qGAAqG;AACrG,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,kBAAkB,GACzB,cAAc,CA4ChB;AAID,8GAA8G;AAC9G,wBAAgB,2BAA2B,CAAC,KAAK,EAAE;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CACjE,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAQpC;AAED,4FAA4F;AAC5F,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAUhG;AAED,wFAAwF;AACxF,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,KAAK,EAAE,OAAO,GACb,0BAA0B,CAK5B"}
|
|
@@ -9,13 +9,13 @@ const SENSITIVE_KEY = /(?:secret|token|api[-_]?key|password|credential|authoriza
|
|
|
9
9
|
export function assistantArgumentReview(schema, value) {
|
|
10
10
|
const projected = boundedProjection(schema, value, 'REVIEW');
|
|
11
11
|
return projected.complete
|
|
12
|
-
? { ok: true, value: projected.value }
|
|
12
|
+
? { ok: true, value: projected.value, reviewSchema: presentationSchema(schema) }
|
|
13
13
|
: { ok: false, code: 'arguments_not_presentable' };
|
|
14
14
|
}
|
|
15
15
|
/** Present the original tool input plus every elicited value that will affect prepared execution. */
|
|
16
16
|
export function assistantPreparedArgumentReview(schema, review) {
|
|
17
17
|
if (review.action !== undefined) {
|
|
18
|
-
|
|
18
|
+
const reviewSchema = {
|
|
19
19
|
type: 'object',
|
|
20
20
|
properties: {
|
|
21
21
|
action: {
|
|
@@ -30,7 +30,8 @@ export function assistantPreparedArgumentReview(schema, review) {
|
|
|
30
30
|
toolInput: schema,
|
|
31
31
|
elicited: { type: 'object' },
|
|
32
32
|
},
|
|
33
|
-
}
|
|
33
|
+
};
|
|
34
|
+
return assistantArgumentReview(reviewSchema, {
|
|
34
35
|
action: {
|
|
35
36
|
connector: `${review.action.connectorId}@${review.action.connectorVersion}`,
|
|
36
37
|
operation: review.action.operation,
|
|
@@ -54,6 +55,29 @@ export function assistantPreparedArgumentReview(schema, review) {
|
|
|
54
55
|
additionalProperties: false,
|
|
55
56
|
}, { toolInput: review.input, elicited: review.elicited });
|
|
56
57
|
}
|
|
58
|
+
const CONFIRMATION_PRESENTATION = '__noodleConfirmationPresentation';
|
|
59
|
+
/** Attach portable display metadata to the already-persisted review JSON without changing execution input. */
|
|
60
|
+
export function assistantConfirmationReview(input) {
|
|
61
|
+
return {
|
|
62
|
+
[CONFIRMATION_PRESENTATION]: true,
|
|
63
|
+
value: input.review.value,
|
|
64
|
+
...(input.title ? { title: input.title } : {}),
|
|
65
|
+
description: input.description,
|
|
66
|
+
reviewSchema: input.review.reviewSchema,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/** Decode enriched and legacy persisted reviews into the additive public proposal shape. */
|
|
70
|
+
export function assistantConfirmationProposal(review) {
|
|
71
|
+
if (!isRecord(review) || review[CONFIRMATION_PRESENTATION] !== true) {
|
|
72
|
+
return { arguments: review ?? {} };
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
arguments: review.value ?? {},
|
|
76
|
+
...(typeof review.title === 'string' ? { title: review.title } : {}),
|
|
77
|
+
...(typeof review.description === 'string' ? { description: review.description } : {}),
|
|
78
|
+
...(isRecord(review.reviewSchema) ? { reviewSchema: review.reviewSchema } : {}),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
57
81
|
/** Redact and bound execution output before SSE, history, audit, or model narration. */
|
|
58
82
|
export function assistantSafeOutput(schema, value) {
|
|
59
83
|
// Connector/widget metadata is a host-only side channel. It must never enter assistant narration,
|
|
@@ -75,6 +99,46 @@ function boundedProjection(schema, value, label) {
|
|
|
75
99
|
}
|
|
76
100
|
return { value: { notice: `[${label} OMITTED: exceeds 16 KiB]` }, complete: false };
|
|
77
101
|
}
|
|
102
|
+
function presentationSchema(schema, depth = 0) {
|
|
103
|
+
if (depth >= MAX_DEPTH)
|
|
104
|
+
return {};
|
|
105
|
+
const result = {};
|
|
106
|
+
for (const key of ['type', 'title', 'description', 'format']) {
|
|
107
|
+
if (typeof schema[key] === 'string')
|
|
108
|
+
result[key] = schema[key].slice(0, 512);
|
|
109
|
+
}
|
|
110
|
+
if (Array.isArray(schema.enum))
|
|
111
|
+
result.enum = schema.enum.slice(0, 64);
|
|
112
|
+
if (Array.isArray(schema.required))
|
|
113
|
+
result.required = schema.required.slice(0, 128);
|
|
114
|
+
if (typeof schema.additionalProperties === 'boolean') {
|
|
115
|
+
result.additionalProperties = schema.additionalProperties;
|
|
116
|
+
}
|
|
117
|
+
if (isRecord(schema.properties)) {
|
|
118
|
+
result.properties = Object.fromEntries(Object.entries(schema.properties)
|
|
119
|
+
.slice(0, MAX_CONTAINER_ENTRIES)
|
|
120
|
+
.map(([name, value]) => [
|
|
121
|
+
name,
|
|
122
|
+
isRecord(value) ? presentationSchema(value, depth + 1) : {},
|
|
123
|
+
]));
|
|
124
|
+
}
|
|
125
|
+
if (isRecord(schema.items))
|
|
126
|
+
result.items = presentationSchema(schema.items, depth + 1);
|
|
127
|
+
if (depth === 0) {
|
|
128
|
+
try {
|
|
129
|
+
if (new TextEncoder().encode(JSON.stringify(result)).byteLength > MAX_PRESENTATION_BYTES) {
|
|
130
|
+
return typeof result.type === 'string' ? { type: result.type } : {};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
return {};
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return result;
|
|
138
|
+
}
|
|
139
|
+
function isRecord(value) {
|
|
140
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
141
|
+
}
|
|
78
142
|
function project(schema, value, depth, ancestors, state) {
|
|
79
143
|
if (isSensitiveSchema(schema))
|
|
80
144
|
return '[REDACTED]';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-presentation.js","sourceRoot":"","sources":["../src/assistant-presentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAElF,MAAM,sBAAsB,GAAG,EAAE,GAAG,IAAI,CAAC;AACzC,MAAM,SAAS,GAAG,CAAC,CAAC;AACpB,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAClC,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAChC,MAAM,aAAa,GAAG,wEAAwE,CAAC;AAgB/F,sGAAsG;AACtG,MAAM,UAAU,uBAAuB,CAAC,MAAkB,EAAE,KAAc;IACxE,MAAM,SAAS,GAAG,iBAAiB,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC7D,OAAO,SAAS,CAAC,QAAQ;QACvB,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"assistant-presentation.js","sourceRoot":"","sources":["../src/assistant-presentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAChF,OA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ity } 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,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAGnE,eAAO,MAAM,0CAA0C,IAAI,CAAC;AAC5D,eAAO,MAAM,+BAA+B,EAAG,oBAA6B,CAAC;AAC7E,eAAO,MAAM,mCAAmC,EAAG,wBAAiC,CAAC;AACrF,eAAO,MAAM,6BAA6B,EAAG,UAAmB,CAAC;AAEjE,MAAM,MAAM,6BAA6B,GACrC,OAAO,mCAAmC,GAC1C,OAAO,6BAA6B,CAAC;AACzC,MAAM,MAAM,4BAA4B,GAAG,OAAO,+BAA+B,CAAC;AAClF,MAAM,MAAM,+BAA+B,GAAG,oBAAoB,GAAG,mBAAmB,CAAC;AAUzF,eAAO,MAAM,yCAAyC;;;;;;;;kBAQpD,CAAC;AAEH,eAAO,MAAM,0CAA0C;;;;;;;;;;;;;;;;;kBAmBnB,CAAC;AAErC,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;kBAsCrD,CAAC;AAEL,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,yCAAyC,CACjD,CAAC;AACF,MAAM,MAAM,oCAAoC,GAAG,CAAC,C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oCAAoC,EAAE,OAAO,EAAE,MAAM;CAKxE;AAED,wBAAgB,wCAAwC,CACtD,KAAK,EAAE,OAAO,GACb,mCAAmC,CAMrC;AAED,wBAAgB,0CAA0C,CAAC,KAAK,EAAE;IAChE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,mCAAmC,CAAC;IACtD,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,OAAO,CAAC,CAAC;IAChE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,GAAG,MAAM,CAQT;AAED,wBAAgB,oCAAoC,CAClD,QAAQ,EAAE,oCAAoC,EAC9C,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,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,wB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,OAAwB;IAExB,uBAAuB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC3C,IAAI,QAAQ,CAAC,sBAAsB,KAAK,CAAC,EAAE,CAAC;QAC1C,OAAO,CAAC,QAAQ,CAAC;YACf,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,wBAAwB,CAAC;YAChC,OAAO,EAAE,8DAA8D;SACxE,CAAC,CAAC;IACL,CAAC;IACD,IAAI,QAAQ,CAAC,oBAAoB,KAAK,QAAQ,CAAC,mBAAmB,EAAE,CAAC;QACnE,OAAO,CAAC,QAAQ,CAAC;YACf,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,sBAAsB,CAAC;YAC9B,OAAO,EAAE,kEAAkE;SAC5E,CAAC,CAAC;IACL,CAAC;IACD,IAAI,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,EAAE,MAAM,IAAI,CAAC;AAC/B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAEvE,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,6BAA6B,CAAC;AACtF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,KAAK,EAAE,2CAA2C,EAAE,MAAM,4BAA4B,CAAC;AAG9F,OAAO,EAAE,KAAK,oBAAoB,EAAsC,MAAM,qBAAqB,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAC3C,QAAQ,CAAC,WAAW,EAAE;QACpB,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;QACtC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;KAC7B,CAAC;CACH;AAED,UAAU,gCAAgC;IACxC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;I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