@contractspec/lib.contracts 1.62.0 → 1.63.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/CHANGELOG.md +754 -0
- package/README.md +30 -96
- package/package.json +9 -4742
- package/dist/app-config/app-config.capability.d.ts +0 -2
- package/dist/app-config/app-config.capability.d.ts.map +0 -1
- package/dist/app-config/app-config.capability.js +0 -730
- package/dist/app-config/app-config.contracts.d.ts +0 -240
- package/dist/app-config/app-config.contracts.d.ts.map +0 -1
- package/dist/app-config/app-config.contracts.js +0 -927
- package/dist/app-config/app-config.contracts.test.d.ts +0 -2
- package/dist/app-config/app-config.contracts.test.d.ts.map +0 -1
- package/dist/app-config/app-config.feature.d.ts +0 -6
- package/dist/app-config/app-config.feature.d.ts.map +0 -1
- package/dist/app-config/app-config.feature.js +0 -255
- package/dist/app-config/branding.d.ts +0 -53
- package/dist/app-config/branding.d.ts.map +0 -1
- package/dist/app-config/branding.js +0 -1
- package/dist/app-config/branding.test.d.ts +0 -2
- package/dist/app-config/branding.test.d.ts.map +0 -1
- package/dist/app-config/docs/app-config.docblock.d.ts +0 -3
- package/dist/app-config/docs/app-config.docblock.d.ts.map +0 -1
- package/dist/app-config/docs/app-config.docblock.js +0 -383
- package/dist/app-config/events.d.ts +0 -116
- package/dist/app-config/events.d.ts.map +0 -1
- package/dist/app-config/events.js +0 -386
- package/dist/app-config/events.test.d.ts +0 -2
- package/dist/app-config/events.test.d.ts.map +0 -1
- package/dist/app-config/index.d.ts +0 -10
- package/dist/app-config/index.d.ts.map +0 -1
- package/dist/app-config/index.js +0 -3113
- package/dist/app-config/lifecycle-contracts.d.ts +0 -266
- package/dist/app-config/lifecycle-contracts.d.ts.map +0 -1
- package/dist/app-config/lifecycle-contracts.js +0 -1084
- package/dist/app-config/lifecycle-contracts.test.d.ts +0 -2
- package/dist/app-config/lifecycle-contracts.test.d.ts.map +0 -1
- package/dist/app-config/lifecycle.d.ts +0 -24
- package/dist/app-config/lifecycle.d.ts.map +0 -1
- package/dist/app-config/lifecycle.js +0 -1
- package/dist/app-config/lifecycle.test.d.ts +0 -2
- package/dist/app-config/lifecycle.test.d.ts.map +0 -1
- package/dist/app-config/runtime.d.ts +0 -112
- package/dist/app-config/runtime.d.ts.map +0 -1
- package/dist/app-config/runtime.js +0 -734
- package/dist/app-config/runtime.test.d.ts +0 -2
- package/dist/app-config/runtime.test.d.ts.map +0 -1
- package/dist/app-config/spec.d.ts +0 -170
- package/dist/app-config/spec.d.ts.map +0 -1
- package/dist/app-config/spec.js +0 -229
- package/dist/app-config/spec.test.d.ts +0 -2
- package/dist/app-config/spec.test.d.ts.map +0 -1
- package/dist/app-config/validation.d.ts +0 -44
- package/dist/app-config/validation.d.ts.map +0 -1
- package/dist/app-config/validation.js +0 -650
- package/dist/app-config/validation.test.d.ts +0 -2
- package/dist/app-config/validation.test.d.ts.map +0 -1
- package/dist/capabilities/capabilities.d.ts +0 -97
- package/dist/capabilities/capabilities.d.ts.map +0 -1
- package/dist/capabilities/capabilities.js +0 -217
- package/dist/capabilities/capabilities.test.d.ts +0 -2
- package/dist/capabilities/capabilities.test.d.ts.map +0 -1
- package/dist/capabilities/context.d.ts +0 -111
- package/dist/capabilities/context.d.ts.map +0 -1
- package/dist/capabilities/context.js +0 -101
- package/dist/capabilities/context.test.d.ts +0 -2
- package/dist/capabilities/context.test.d.ts.map +0 -1
- package/dist/capabilities/docs/capabilities.docblock.d.ts +0 -3
- package/dist/capabilities/docs/capabilities.docblock.d.ts.map +0 -1
- package/dist/capabilities/docs/capabilities.docblock.js +0 -353
- package/dist/capabilities/guards.d.ts +0 -122
- package/dist/capabilities/guards.d.ts.map +0 -1
- package/dist/capabilities/guards.js +0 -177
- package/dist/capabilities/index.d.ts +0 -7
- package/dist/capabilities/index.d.ts.map +0 -1
- package/dist/capabilities/index.js +0 -739
- package/dist/capabilities/meeting-recorder.d.ts +0 -6
- package/dist/capabilities/meeting-recorder.d.ts.map +0 -1
- package/dist/capabilities/meeting-recorder.js +0 -154
- package/dist/capabilities/openbanking.d.ts +0 -6
- package/dist/capabilities/openbanking.d.ts.map +0 -1
- package/dist/capabilities/openbanking.js +0 -166
- package/dist/capabilities/validation.d.ts +0 -80
- package/dist/capabilities/validation.d.ts.map +0 -1
- package/dist/capabilities/validation.js +0 -185
- package/dist/capabilities/validation.test.d.ts +0 -2
- package/dist/capabilities/validation.test.d.ts.map +0 -1
- package/dist/client/index.d.ts +0 -2
- package/dist/client/index.d.ts.map +0 -1
- package/dist/client/index.js +0 -1379
- package/dist/client/react/drivers/rn-reusables.d.ts +0 -22
- package/dist/client/react/drivers/rn-reusables.d.ts.map +0 -1
- package/dist/client/react/drivers/rn-reusables.js +0 -38
- package/dist/client/react/drivers/shadcn.d.ts +0 -8
- package/dist/client/react/drivers/shadcn.d.ts.map +0 -1
- package/dist/client/react/drivers/shadcn.js +0 -38
- package/dist/client/react/feature-render.d.ts +0 -16
- package/dist/client/react/feature-render.d.ts.map +0 -1
- package/dist/client/react/feature-render.js +0 -833
- package/dist/client/react/form-render.d.ts +0 -87
- package/dist/client/react/form-render.d.ts.map +0 -1
- package/dist/client/react/form-render.js +0 -681
- package/dist/client/react/index.d.ts +0 -5
- package/dist/client/react/index.d.ts.map +0 -1
- package/dist/client/react/index.js +0 -1376
- package/dist/contract-registry/index.d.ts +0 -4
- package/dist/contract-registry/index.d.ts.map +0 -1
- package/dist/contract-registry/index.js +0 -129
- package/dist/contract-registry/schemas.d.ts +0 -121
- package/dist/contract-registry/schemas.d.ts.map +0 -1
- package/dist/contract-registry/schemas.js +0 -129
- package/dist/contract-registry/schemas.test.d.ts +0 -2
- package/dist/contract-registry/schemas.test.d.ts.map +0 -1
- package/dist/contract-registry/types.d.ts +0 -43
- package/dist/contract-registry/types.d.ts.map +0 -1
- package/dist/contract-registry/types.js +0 -1
- package/dist/data-views/data-views.d.ts +0 -5
- package/dist/data-views/data-views.d.ts.map +0 -1
- package/dist/data-views/data-views.js +0 -232
- package/dist/data-views/data-views.test.d.ts +0 -2
- package/dist/data-views/data-views.test.d.ts.map +0 -1
- package/dist/data-views/docs/data-views.docblock.d.ts +0 -3
- package/dist/data-views/docs/data-views.docblock.d.ts.map +0 -1
- package/dist/data-views/docs/data-views.docblock.js +0 -164
- package/dist/data-views/index.d.ts +0 -5
- package/dist/data-views/index.d.ts.map +0 -1
- package/dist/data-views/index.js +0 -232
- package/dist/data-views/query-generator.d.ts +0 -36
- package/dist/data-views/query-generator.d.ts.map +0 -1
- package/dist/data-views/query-generator.js +0 -89
- package/dist/data-views/registry.d.ts +0 -13
- package/dist/data-views/registry.d.ts.map +0 -1
- package/dist/data-views/registry.js +0 -226
- package/dist/data-views/registry.test.d.ts +0 -2
- package/dist/data-views/registry.test.d.ts.map +0 -1
- package/dist/data-views/report/contractVerificationTable.d.ts +0 -5
- package/dist/data-views/report/contractVerificationTable.d.ts.map +0 -1
- package/dist/data-views/report/contractVerificationTable.js +0 -240
- package/dist/data-views/report/contractVerificationTable.test.d.ts +0 -2
- package/dist/data-views/report/contractVerificationTable.test.d.ts.map +0 -1
- package/dist/data-views/runtime.d.ts +0 -26
- package/dist/data-views/runtime.d.ts.map +0 -1
- package/dist/data-views/runtime.js +0 -108
- package/dist/data-views/runtime.test.d.ts +0 -2
- package/dist/data-views/runtime.test.d.ts.map +0 -1
- package/dist/data-views/spec.d.ts +0 -23
- package/dist/data-views/spec.d.ts.map +0 -1
- package/dist/data-views/spec.js +0 -38
- package/dist/data-views/spec.test.d.ts +0 -2
- package/dist/data-views/spec.test.d.ts.map +0 -1
- package/dist/data-views/types.d.ts +0 -153
- package/dist/data-views/types.d.ts.map +0 -1
- package/dist/data-views/types.js +0 -1
- package/dist/data-views/types.test.d.ts +0 -2
- package/dist/data-views/types.test.d.ts.map +0 -1
- package/dist/docs/accessibility_wcag_compliance_specs.docblock.d.ts +0 -3
- package/dist/docs/accessibility_wcag_compliance_specs.docblock.d.ts.map +0 -1
- package/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -513
- package/dist/docs/capabilities/documentationSystem.capability.d.ts +0 -2
- package/dist/docs/capabilities/documentationSystem.capability.d.ts.map +0 -1
- package/dist/docs/capabilities/documentationSystem.capability.js +0 -784
- package/dist/docs/capabilities/index.d.ts +0 -2
- package/dist/docs/capabilities/index.d.ts.map +0 -1
- package/dist/docs/capabilities/index.js +0 -784
- package/dist/docs/commands/docsGenerate.command.d.ts +0 -89
- package/dist/docs/commands/docsGenerate.command.d.ts.map +0 -1
- package/dist/docs/commands/docsGenerate.command.js +0 -1016
- package/dist/docs/commands/docsPublish.command.d.ts +0 -58
- package/dist/docs/commands/docsPublish.command.d.ts.map +0 -1
- package/dist/docs/commands/docsPublish.command.js +0 -995
- package/dist/docs/commands/index.d.ts +0 -3
- package/dist/docs/commands/index.d.ts.map +0 -1
- package/dist/docs/commands/index.js +0 -1120
- package/dist/docs/constants.d.ts +0 -5
- package/dist/docs/constants.d.ts.map +0 -1
- package/dist/docs/constants.js +0 -78
- package/dist/docs/contracts.d.ts +0 -431
- package/dist/docs/contracts.d.ts.map +0 -1
- package/dist/docs/contracts.js +0 -2383
- package/dist/docs/ensure-docblocks.d.ts +0 -2
- package/dist/docs/ensure-docblocks.d.ts.map +0 -1
- package/dist/docs/ensure-docblocks.js +0 -264
- package/dist/docs/events/docsGenerated.event.d.ts +0 -57
- package/dist/docs/events/docsGenerated.event.d.ts.map +0 -1
- package/dist/docs/events/docsGenerated.event.js +0 -533
- package/dist/docs/events/docsPublished.event.d.ts +0 -65
- package/dist/docs/events/docsPublished.event.d.ts.map +0 -1
- package/dist/docs/events/docsPublished.event.js +0 -534
- package/dist/docs/events/index.d.ts +0 -3
- package/dist/docs/events/index.d.ts.map +0 -1
- package/dist/docs/events/index.js +0 -567
- package/dist/docs/forms/docsSearch.form.d.ts +0 -17
- package/dist/docs/forms/docsSearch.form.d.ts.map +0 -1
- package/dist/docs/forms/docsSearch.form.js +0 -676
- package/dist/docs/forms/index.d.ts +0 -2
- package/dist/docs/forms/index.d.ts.map +0 -1
- package/dist/docs/forms/index.js +0 -676
- package/dist/docs/index.d.ts +0 -41
- package/dist/docs/index.d.ts.map +0 -1
- package/dist/docs/index.js +0 -5491
- package/dist/docs/meta.docs.d.ts +0 -3
- package/dist/docs/meta.docs.d.ts.map +0 -1
- package/dist/docs/meta.docs.js +0 -176
- package/dist/docs/presentations/docsLayout.presentation.d.ts +0 -3
- package/dist/docs/presentations/docsLayout.presentation.d.ts.map +0 -1
- package/dist/docs/presentations/docsLayout.presentation.js +0 -1090
- package/dist/docs/presentations/docsReferencePage.presentation.d.ts +0 -3
- package/dist/docs/presentations/docsReferencePage.presentation.d.ts.map +0 -1
- package/dist/docs/presentations/docsReferencePage.presentation.js +0 -1090
- package/dist/docs/presentations/index.d.ts +0 -3
- package/dist/docs/presentations/index.d.ts.map +0 -1
- package/dist/docs/presentations/index.js +0 -1118
- package/dist/docs/presentations.d.ts +0 -28
- package/dist/docs/presentations.d.ts.map +0 -1
- package/dist/docs/presentations.js +0 -97
- package/dist/docs/presentations.test.d.ts +0 -2
- package/dist/docs/presentations.test.d.ts.map +0 -1
- package/dist/docs/queries/contractReference.query.d.ts +0 -212
- package/dist/docs/queries/contractReference.query.d.ts.map +0 -1
- package/dist/docs/queries/contractReference.query.js +0 -966
- package/dist/docs/queries/docsIndex.query.d.ts +0 -267
- package/dist/docs/queries/docsIndex.query.d.ts.map +0 -1
- package/dist/docs/queries/docsIndex.query.js +0 -966
- package/dist/docs/queries/index.d.ts +0 -3
- package/dist/docs/queries/index.d.ts.map +0 -1
- package/dist/docs/queries/index.js +0 -1041
- package/dist/docs/registry.d.ts +0 -20
- package/dist/docs/registry.d.ts.map +0 -1
- package/dist/docs/registry.js +0 -153
- package/dist/docs/registry.test.d.ts +0 -2
- package/dist/docs/registry.test.d.ts.map +0 -1
- package/dist/docs/tech/auth/better-auth-nextjs.docblock.d.ts +0 -3
- package/dist/docs/tech/auth/better-auth-nextjs.docblock.d.ts.map +0 -1
- package/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -221
- package/dist/docs/tech/cli.docblock.d.ts +0 -3
- package/dist/docs/tech/cli.docblock.d.ts.map +0 -1
- package/dist/docs/tech/cli.docblock.js +0 -291
- package/dist/docs/tech/contracts/README.docblock.d.ts +0 -3
- package/dist/docs/tech/contracts/README.docblock.d.ts.map +0 -1
- package/dist/docs/tech/contracts/README.docblock.js +0 -164
- package/dist/docs/tech/contracts/migrations.docblock.d.ts +0 -3
- package/dist/docs/tech/contracts/migrations.docblock.d.ts.map +0 -1
- package/dist/docs/tech/contracts/migrations.docblock.js +0 -164
- package/dist/docs/tech/contracts/openapi-export.docblock.d.ts +0 -3
- package/dist/docs/tech/contracts/openapi-export.docblock.d.ts.map +0 -1
- package/dist/docs/tech/contracts/openapi-export.docblock.js +0 -201
- package/dist/docs/tech/contracts/openapi-import.docblock.d.ts +0 -3
- package/dist/docs/tech/contracts/openapi-import.docblock.d.ts.map +0 -1
- package/dist/docs/tech/contracts/openapi-import.docblock.js +0 -207
- package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.d.ts +0 -3
- package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.d.ts.map +0 -1
- package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +0 -225
- package/dist/docs/tech/contracts/overlays.docblock.d.ts +0 -3
- package/dist/docs/tech/contracts/overlays.docblock.d.ts.map +0 -1
- package/dist/docs/tech/contracts/overlays.docblock.js +0 -231
- package/dist/docs/tech/contracts/tests.docblock.d.ts +0 -3
- package/dist/docs/tech/contracts/tests.docblock.d.ts.map +0 -1
- package/dist/docs/tech/contracts/tests.docblock.js +0 -164
- package/dist/docs/tech/contracts/themes.docblock.d.ts +0 -3
- package/dist/docs/tech/contracts/themes.docblock.d.ts.map +0 -1
- package/dist/docs/tech/contracts/themes.docblock.js +0 -257
- package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.d.ts +0 -3
- package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.d.ts.map +0 -1
- package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.js +0 -269
- package/dist/docs/tech/docs-system.docblock.d.ts +0 -2
- package/dist/docs/tech/docs-system.docblock.d.ts.map +0 -1
- package/dist/docs/tech/docs-system.docblock.js +0 -264
- package/dist/docs/tech/lifecycle-stage-system.docblock.d.ts +0 -3
- package/dist/docs/tech/lifecycle-stage-system.docblock.d.ts.map +0 -1
- package/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -376
- package/dist/docs/tech/llm/llm-integration.docblock.d.ts +0 -8
- package/dist/docs/tech/llm/llm-integration.docblock.d.ts.map +0 -1
- package/dist/docs/tech/llm/llm-integration.docblock.js +0 -482
- package/dist/docs/tech/mcp-endpoints.docblock.d.ts +0 -3
- package/dist/docs/tech/mcp-endpoints.docblock.d.ts.map +0 -1
- package/dist/docs/tech/mcp-endpoints.docblock.js +0 -185
- package/dist/docs/tech/presentation-runtime.docblock.d.ts +0 -3
- package/dist/docs/tech/presentation-runtime.docblock.d.ts.map +0 -1
- package/dist/docs/tech/presentation-runtime.docblock.js +0 -221
- package/dist/docs/tech/report-verification-table.docblock.d.ts +0 -2
- package/dist/docs/tech/report-verification-table.docblock.d.ts.map +0 -1
- package/dist/docs/tech/report-verification-table.docblock.js +0 -191
- package/dist/docs/tech/report-verification-table.test.d.ts +0 -2
- package/dist/docs/tech/report-verification-table.test.d.ts.map +0 -1
- package/dist/docs/tech/schema/README.docblock.d.ts +0 -3
- package/dist/docs/tech/schema/README.docblock.d.ts.map +0 -1
- package/dist/docs/tech/schema/README.docblock.js +0 -164
- package/dist/docs/tech/studio/learning-events.docblock.d.ts +0 -3
- package/dist/docs/tech/studio/learning-events.docblock.d.ts.map +0 -1
- package/dist/docs/tech/studio/learning-events.docblock.js +0 -190
- package/dist/docs/tech/studio/learning-journeys.docblock.d.ts +0 -3
- package/dist/docs/tech/studio/learning-journeys.docblock.d.ts.map +0 -1
- package/dist/docs/tech/studio/learning-journeys.docblock.js +0 -227
- package/dist/docs/tech/studio/platform-admin-panel.docblock.d.ts +0 -3
- package/dist/docs/tech/studio/platform-admin-panel.docblock.d.ts.map +0 -1
- package/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -226
- package/dist/docs/tech/studio/project-access-teams.docblock.d.ts +0 -3
- package/dist/docs/tech/studio/project-access-teams.docblock.d.ts.map +0 -1
- package/dist/docs/tech/studio/project-access-teams.docblock.js +0 -200
- package/dist/docs/tech/studio/project-routing.docblock.d.ts +0 -3
- package/dist/docs/tech/studio/project-routing.docblock.d.ts.map +0 -1
- package/dist/docs/tech/studio/project-routing.docblock.js +0 -209
- package/dist/docs/tech/studio/sandbox-unlogged.docblock.d.ts +0 -3
- package/dist/docs/tech/studio/sandbox-unlogged.docblock.d.ts.map +0 -1
- package/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -183
- package/dist/docs/tech/studio/team-invitations.docblock.d.ts +0 -3
- package/dist/docs/tech/studio/team-invitations.docblock.d.ts.map +0 -1
- package/dist/docs/tech/studio/team-invitations.docblock.js +0 -228
- package/dist/docs/tech/studio/workspace-ops.docblock.d.ts +0 -3
- package/dist/docs/tech/studio/workspace-ops.docblock.d.ts.map +0 -1
- package/dist/docs/tech/studio/workspace-ops.docblock.js +0 -189
- package/dist/docs/tech/studio/workspaces.docblock.d.ts +0 -3
- package/dist/docs/tech/studio/workspaces.docblock.d.ts.map +0 -1
- package/dist/docs/tech/studio/workspaces.docblock.js +0 -204
- package/dist/docs/tech/telemetry-ingest.docblock.d.ts +0 -3
- package/dist/docs/tech/telemetry-ingest.docblock.d.ts.map +0 -1
- package/dist/docs/tech/telemetry-ingest.docblock.js +0 -305
- package/dist/docs/tech/vscode-extension.docblock.d.ts +0 -3
- package/dist/docs/tech/vscode-extension.docblock.d.ts.map +0 -1
- package/dist/docs/tech/vscode-extension.docblock.js +0 -241
- package/dist/docs/tech-contracts.docs.d.ts +0 -3
- package/dist/docs/tech-contracts.docs.d.ts.map +0 -1
- package/dist/docs/tech-contracts.docs.js +0 -239
- package/dist/docs/types.d.ts +0 -38
- package/dist/docs/types.d.ts.map +0 -1
- package/dist/docs/types.js +0 -1
- package/dist/docs/views/contractReference.dataView.d.ts +0 -3
- package/dist/docs/views/contractReference.dataView.d.ts.map +0 -1
- package/dist/docs/views/contractReference.dataView.js +0 -1047
- package/dist/docs/views/docsIndex.dataView.d.ts +0 -3
- package/dist/docs/views/docsIndex.dataView.d.ts.map +0 -1
- package/dist/docs/views/docsIndex.dataView.js +0 -1041
- package/dist/docs/views/exampleCatalog.dataView.d.ts +0 -3
- package/dist/docs/views/exampleCatalog.dataView.d.ts.map +0 -1
- package/dist/docs/views/exampleCatalog.dataView.js +0 -1025
- package/dist/docs/views/index.d.ts +0 -4
- package/dist/docs/views/index.d.ts.map +0 -1
- package/dist/docs/views/index.js +0 -1240
- package/dist/events.d.ts +0 -143
- package/dist/events.d.ts.map +0 -1
- package/dist/events.js +0 -228
- package/dist/events.test.d.ts +0 -2
- package/dist/events.test.d.ts.map +0 -1
- package/dist/examples/docs/examples.docblock.d.ts +0 -3
- package/dist/examples/docs/examples.docblock.d.ts.map +0 -1
- package/dist/examples/docs/examples.docblock.js +0 -307
- package/dist/examples/index.d.ts +0 -12
- package/dist/examples/index.d.ts.map +0 -1
- package/dist/examples/index.js +0 -604
- package/dist/examples/registry.d.ts +0 -39
- package/dist/examples/registry.d.ts.map +0 -1
- package/dist/examples/registry.js +0 -286
- package/dist/examples/registry.test.d.ts +0 -2
- package/dist/examples/registry.test.d.ts.map +0 -1
- package/dist/examples/schema.d.ts +0 -279
- package/dist/examples/schema.d.ts.map +0 -1
- package/dist/examples/schema.js +0 -166
- package/dist/examples/schema.test.d.ts +0 -2
- package/dist/examples/schema.test.d.ts.map +0 -1
- package/dist/examples/types.d.ts +0 -163
- package/dist/examples/types.d.ts.map +0 -1
- package/dist/examples/types.js +0 -77
- package/dist/examples/types.test.d.ts +0 -2
- package/dist/examples/types.test.d.ts.map +0 -1
- package/dist/examples/validation.d.ts +0 -62
- package/dist/examples/validation.d.ts.map +0 -1
- package/dist/examples/validation.js +0 -287
- package/dist/examples/validation.test.d.ts +0 -2
- package/dist/examples/validation.test.d.ts.map +0 -1
- package/dist/experiments/docs/experiments.docblock.d.ts +0 -3
- package/dist/experiments/docs/experiments.docblock.d.ts.map +0 -1
- package/dist/experiments/docs/experiments.docblock.js +0 -291
- package/dist/experiments/evaluator.d.ts +0 -34
- package/dist/experiments/evaluator.d.ts.map +0 -1
- package/dist/experiments/evaluator.js +0 -155
- package/dist/experiments/evaluator.test.d.ts +0 -2
- package/dist/experiments/evaluator.test.d.ts.map +0 -1
- package/dist/experiments/spec-resolver.d.ts +0 -13
- package/dist/experiments/spec-resolver.d.ts.map +0 -1
- package/dist/experiments/spec-resolver.js +0 -1
- package/dist/experiments/spec.d.ts +0 -80
- package/dist/experiments/spec.d.ts.map +0 -1
- package/dist/experiments/spec.js +0 -227
- package/dist/experiments/spec.test.d.ts +0 -2
- package/dist/experiments/spec.test.d.ts.map +0 -1
- package/dist/features/index.d.ts +0 -10
- package/dist/features/index.d.ts.map +0 -1
- package/dist/features/index.js +0 -275
- package/dist/features/install.d.ts +0 -15
- package/dist/features/install.d.ts.map +0 -1
- package/dist/features/install.js +0 -95
- package/dist/features/install.test.d.ts +0 -2
- package/dist/features/install.test.d.ts.map +0 -1
- package/dist/features/registry.d.ts +0 -22
- package/dist/features/registry.d.ts.map +0 -1
- package/dist/features/registry.js +0 -192
- package/dist/features/registry.test.d.ts +0 -2
- package/dist/features/registry.test.d.ts.map +0 -1
- package/dist/features/types.d.ts +0 -79
- package/dist/features/types.d.ts.map +0 -1
- package/dist/features/types.js +0 -1
- package/dist/features/types.test.d.ts +0 -2
- package/dist/features/types.test.d.ts.map +0 -1
- package/dist/features/validation.d.ts +0 -5
- package/dist/features/validation.d.ts.map +0 -1
- package/dist/features/validation.js +0 -48
- package/dist/features/validation.test.d.ts +0 -2
- package/dist/features/validation.test.d.ts.map +0 -1
- package/dist/features.capabilities.test.d.ts +0 -2
- package/dist/features.capabilities.test.d.ts.map +0 -1
- package/dist/forms/docs/forms.docblock.d.ts +0 -3
- package/dist/forms/docs/forms.docblock.d.ts.map +0 -1
- package/dist/forms/docs/forms.docblock.js +0 -164
- package/dist/forms/forms.d.ts +0 -265
- package/dist/forms/forms.d.ts.map +0 -1
- package/dist/forms/forms.js +0 -332
- package/dist/forms/index.d.ts +0 -2
- package/dist/forms/index.d.ts.map +0 -1
- package/dist/forms/index.js +0 -332
- package/dist/index.d.ts +0 -50
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -18411
- package/dist/install.d.ts +0 -76
- package/dist/install.d.ts.map +0 -1
- package/dist/install.js +0 -60
- package/dist/integrations/binding.d.ts +0 -15
- package/dist/integrations/binding.d.ts.map +0 -1
- package/dist/integrations/binding.js +0 -1
- package/dist/integrations/connection.d.ts +0 -48
- package/dist/integrations/connection.d.ts.map +0 -1
- package/dist/integrations/connection.js +0 -1
- package/dist/integrations/docs/integrations.docblock.d.ts +0 -3
- package/dist/integrations/docs/integrations.docblock.d.ts.map +0 -1
- package/dist/integrations/docs/integrations.docblock.js +0 -255
- package/dist/integrations/health.d.ts +0 -18
- package/dist/integrations/health.d.ts.map +0 -1
- package/dist/integrations/health.js +0 -103
- package/dist/integrations/health.test.d.ts +0 -2
- package/dist/integrations/health.test.d.ts.map +0 -1
- package/dist/integrations/index.d.ts +0 -12
- package/dist/integrations/index.d.ts.map +0 -1
- package/dist/integrations/index.js +0 -3984
- package/dist/integrations/integrations.capability.d.ts +0 -2
- package/dist/integrations/integrations.capability.d.ts.map +0 -1
- package/dist/integrations/integrations.capability.js +0 -726
- package/dist/integrations/integrations.feature.d.ts +0 -6
- package/dist/integrations/integrations.feature.d.ts.map +0 -1
- package/dist/integrations/integrations.feature.js +0 -301
- package/dist/integrations/meeting-recorder/contracts/index.d.ts +0 -8
- package/dist/integrations/meeting-recorder/contracts/index.d.ts.map +0 -1
- package/dist/integrations/meeting-recorder/contracts/index.js +0 -1231
- package/dist/integrations/meeting-recorder/contracts/meetings.d.ts +0 -452
- package/dist/integrations/meeting-recorder/contracts/meetings.d.ts.map +0 -1
- package/dist/integrations/meeting-recorder/contracts/meetings.js +0 -866
- package/dist/integrations/meeting-recorder/contracts/transcripts.d.ts +0 -167
- package/dist/integrations/meeting-recorder/contracts/transcripts.d.ts.map +0 -1
- package/dist/integrations/meeting-recorder/contracts/transcripts.js +0 -933
- package/dist/integrations/meeting-recorder/contracts/webhooks.d.ts +0 -86
- package/dist/integrations/meeting-recorder/contracts/webhooks.d.ts.map +0 -1
- package/dist/integrations/meeting-recorder/contracts/webhooks.js +0 -819
- package/dist/integrations/meeting-recorder/meeting-recorder.capability.d.ts +0 -2
- package/dist/integrations/meeting-recorder/meeting-recorder.capability.d.ts.map +0 -1
- package/dist/integrations/meeting-recorder/meeting-recorder.capability.js +0 -726
- package/dist/integrations/meeting-recorder/meeting-recorder.feature.d.ts +0 -6
- package/dist/integrations/meeting-recorder/meeting-recorder.feature.d.ts.map +0 -1
- package/dist/integrations/meeting-recorder/meeting-recorder.feature.js +0 -301
- package/dist/integrations/meeting-recorder/models.d.ts +0 -403
- package/dist/integrations/meeting-recorder/models.d.ts.map +0 -1
- package/dist/integrations/meeting-recorder/models.js +0 -152
- package/dist/integrations/meeting-recorder/telemetry.d.ts +0 -14
- package/dist/integrations/meeting-recorder/telemetry.d.ts.map +0 -1
- package/dist/integrations/meeting-recorder/telemetry.js +0 -84
- package/dist/integrations/openbanking/contracts/accounts.d.ts +0 -283
- package/dist/integrations/openbanking/contracts/accounts.d.ts.map +0 -1
- package/dist/integrations/openbanking/contracts/accounts.js +0 -974
- package/dist/integrations/openbanking/contracts/balances.d.ts +0 -159
- package/dist/integrations/openbanking/contracts/balances.d.ts.map +0 -1
- package/dist/integrations/openbanking/contracts/balances.js +0 -938
- package/dist/integrations/openbanking/contracts/index.d.ts +0 -8
- package/dist/integrations/openbanking/contracts/index.d.ts.map +0 -1
- package/dist/integrations/openbanking/contracts/index.js +0 -1399
- package/dist/integrations/openbanking/contracts/transactions.d.ts +0 -207
- package/dist/integrations/openbanking/contracts/transactions.d.ts.map +0 -1
- package/dist/integrations/openbanking/contracts/transactions.js +0 -944
- package/dist/integrations/openbanking/guards.d.ts +0 -9
- package/dist/integrations/openbanking/guards.d.ts.map +0 -1
- package/dist/integrations/openbanking/guards.js +0 -72
- package/dist/integrations/openbanking/guards.test.d.ts +0 -2
- package/dist/integrations/openbanking/guards.test.d.ts.map +0 -1
- package/dist/integrations/openbanking/models.d.ts +0 -224
- package/dist/integrations/openbanking/models.d.ts.map +0 -1
- package/dist/integrations/openbanking/models.js +0 -140
- package/dist/integrations/openbanking/openbanking.capability.d.ts +0 -2
- package/dist/integrations/openbanking/openbanking.capability.d.ts.map +0 -1
- package/dist/integrations/openbanking/openbanking.capability.js +0 -726
- package/dist/integrations/openbanking/openbanking.feature.d.ts +0 -6
- package/dist/integrations/openbanking/openbanking.feature.d.ts.map +0 -1
- package/dist/integrations/openbanking/openbanking.feature.js +0 -303
- package/dist/integrations/openbanking/telemetry.d.ts +0 -13
- package/dist/integrations/openbanking/telemetry.d.ts.map +0 -1
- package/dist/integrations/openbanking/telemetry.js +0 -81
- package/dist/integrations/operations.d.ts +0 -431
- package/dist/integrations/operations.d.ts.map +0 -1
- package/dist/integrations/operations.js +0 -943
- package/dist/integrations/operations.test.d.ts +0 -2
- package/dist/integrations/operations.test.d.ts.map +0 -1
- package/dist/integrations/providers/analytics-reader.d.ts +0 -104
- package/dist/integrations/providers/analytics-reader.d.ts.map +0 -1
- package/dist/integrations/providers/analytics-reader.js +0 -1
- package/dist/integrations/providers/analytics-writer.d.ts +0 -7
- package/dist/integrations/providers/analytics-writer.d.ts.map +0 -1
- package/dist/integrations/providers/analytics-writer.js +0 -1
- package/dist/integrations/providers/analytics.d.ts +0 -48
- package/dist/integrations/providers/analytics.d.ts.map +0 -1
- package/dist/integrations/providers/analytics.js +0 -1
- package/dist/integrations/providers/calendar.d.ts +0 -76
- package/dist/integrations/providers/calendar.d.ts.map +0 -1
- package/dist/integrations/providers/calendar.js +0 -1
- package/dist/integrations/providers/database.d.ts +0 -13
- package/dist/integrations/providers/database.d.ts.map +0 -1
- package/dist/integrations/providers/database.js +0 -1
- package/dist/integrations/providers/elevenlabs.d.ts +0 -4
- package/dist/integrations/providers/elevenlabs.d.ts.map +0 -1
- package/dist/integrations/providers/elevenlabs.js +0 -331
- package/dist/integrations/providers/email.d.ts +0 -84
- package/dist/integrations/providers/email.d.ts.map +0 -1
- package/dist/integrations/providers/email.js +0 -1
- package/dist/integrations/providers/embedding.d.ts +0 -22
- package/dist/integrations/providers/embedding.d.ts.map +0 -1
- package/dist/integrations/providers/embedding.js +0 -1
- package/dist/integrations/providers/fal.d.ts +0 -4
- package/dist/integrations/providers/fal.d.ts.map +0 -1
- package/dist/integrations/providers/fal.js +0 -357
- package/dist/integrations/providers/fathom.d.ts +0 -4
- package/dist/integrations/providers/fathom.d.ts.map +0 -1
- package/dist/integrations/providers/fathom.js +0 -371
- package/dist/integrations/providers/fireflies.d.ts +0 -4
- package/dist/integrations/providers/fireflies.d.ts.map +0 -1
- package/dist/integrations/providers/fireflies.js +0 -351
- package/dist/integrations/providers/gcs-storage.d.ts +0 -4
- package/dist/integrations/providers/gcs-storage.d.ts.map +0 -1
- package/dist/integrations/providers/gcs-storage.js +0 -342
- package/dist/integrations/providers/gmail.d.ts +0 -4
- package/dist/integrations/providers/gmail.d.ts.map +0 -1
- package/dist/integrations/providers/gmail.js +0 -354
- package/dist/integrations/providers/google-calendar.d.ts +0 -4
- package/dist/integrations/providers/google-calendar.d.ts.map +0 -1
- package/dist/integrations/providers/google-calendar.js +0 -337
- package/dist/integrations/providers/gradium.d.ts +0 -4
- package/dist/integrations/providers/gradium.d.ts.map +0 -1
- package/dist/integrations/providers/gradium.js +0 -355
- package/dist/integrations/providers/granola.d.ts +0 -4
- package/dist/integrations/providers/granola.d.ts.map +0 -1
- package/dist/integrations/providers/granola.js +0 -352
- package/dist/integrations/providers/index.d.ts +0 -39
- package/dist/integrations/providers/index.d.ts.map +0 -1
- package/dist/integrations/providers/index.js +0 -2317
- package/dist/integrations/providers/jira.d.ts +0 -4
- package/dist/integrations/providers/jira.d.ts.map +0 -1
- package/dist/integrations/providers/jira.js +0 -353
- package/dist/integrations/providers/linear.d.ts +0 -4
- package/dist/integrations/providers/linear.d.ts.map +0 -1
- package/dist/integrations/providers/linear.js +0 -352
- package/dist/integrations/providers/llm.d.ts +0 -80
- package/dist/integrations/providers/llm.d.ts.map +0 -1
- package/dist/integrations/providers/llm.js +0 -1
- package/dist/integrations/providers/meeting-recorder.d.ts +0 -130
- package/dist/integrations/providers/meeting-recorder.d.ts.map +0 -1
- package/dist/integrations/providers/meeting-recorder.js +0 -1
- package/dist/integrations/providers/mistral.d.ts +0 -4
- package/dist/integrations/providers/mistral.d.ts.map +0 -1
- package/dist/integrations/providers/mistral.js +0 -339
- package/dist/integrations/providers/notion.d.ts +0 -4
- package/dist/integrations/providers/notion.d.ts.map +0 -1
- package/dist/integrations/providers/notion.js +0 -358
- package/dist/integrations/providers/openbanking.d.ts +0 -126
- package/dist/integrations/providers/openbanking.d.ts.map +0 -1
- package/dist/integrations/providers/openbanking.js +0 -1
- package/dist/integrations/providers/payments.d.ts +0 -107
- package/dist/integrations/providers/payments.d.ts.map +0 -1
- package/dist/integrations/providers/payments.js +0 -1
- package/dist/integrations/providers/posthog-llm-telemetry.d.ts +0 -52
- package/dist/integrations/providers/posthog-llm-telemetry.d.ts.map +0 -1
- package/dist/integrations/providers/posthog-llm-telemetry.js +0 -241
- package/dist/integrations/providers/posthog.d.ts +0 -4
- package/dist/integrations/providers/posthog.d.ts.map +0 -1
- package/dist/integrations/providers/posthog.js +0 -351
- package/dist/integrations/providers/postmark.d.ts +0 -4
- package/dist/integrations/providers/postmark.d.ts.map +0 -1
- package/dist/integrations/providers/postmark.js +0 -343
- package/dist/integrations/providers/powens.d.ts +0 -4
- package/dist/integrations/providers/powens.d.ts.map +0 -1
- package/dist/integrations/providers/powens.js +0 -369
- package/dist/integrations/providers/project-management.d.ts +0 -33
- package/dist/integrations/providers/project-management.d.ts.map +0 -1
- package/dist/integrations/providers/project-management.js +0 -1
- package/dist/integrations/providers/providers.test.d.ts +0 -2
- package/dist/integrations/providers/providers.test.d.ts.map +0 -1
- package/dist/integrations/providers/qdrant.d.ts +0 -4
- package/dist/integrations/providers/qdrant.d.ts.map +0 -1
- package/dist/integrations/providers/qdrant.js +0 -346
- package/dist/integrations/providers/registry.d.ts +0 -7
- package/dist/integrations/providers/registry.d.ts.map +0 -1
- package/dist/integrations/providers/registry.js +0 -2102
- package/dist/integrations/providers/sms.d.ts +0 -32
- package/dist/integrations/providers/sms.d.ts.map +0 -1
- package/dist/integrations/providers/sms.js +0 -1
- package/dist/integrations/providers/storage.d.ts +0 -58
- package/dist/integrations/providers/storage.d.ts.map +0 -1
- package/dist/integrations/providers/storage.js +0 -1
- package/dist/integrations/providers/stripe.d.ts +0 -4
- package/dist/integrations/providers/stripe.d.ts.map +0 -1
- package/dist/integrations/providers/stripe.js +0 -350
- package/dist/integrations/providers/supabase-postgres.d.ts +0 -4
- package/dist/integrations/providers/supabase-postgres.d.ts.map +0 -1
- package/dist/integrations/providers/supabase-postgres.js +0 -332
- package/dist/integrations/providers/supabase-vector.d.ts +0 -4
- package/dist/integrations/providers/supabase-vector.d.ts.map +0 -1
- package/dist/integrations/providers/supabase-vector.js +0 -352
- package/dist/integrations/providers/tldv.d.ts +0 -4
- package/dist/integrations/providers/tldv.d.ts.map +0 -1
- package/dist/integrations/providers/tldv.js +0 -351
- package/dist/integrations/providers/twilio-sms.d.ts +0 -4
- package/dist/integrations/providers/twilio-sms.d.ts.map +0 -1
- package/dist/integrations/providers/twilio-sms.js +0 -336
- package/dist/integrations/providers/vector-store.d.ts +0 -40
- package/dist/integrations/providers/vector-store.d.ts.map +0 -1
- package/dist/integrations/providers/vector-store.js +0 -1
- package/dist/integrations/providers/voice.d.ts +0 -32
- package/dist/integrations/providers/voice.d.ts.map +0 -1
- package/dist/integrations/providers/voice.js +0 -1
- package/dist/integrations/runtime.d.ts +0 -96
- package/dist/integrations/runtime.d.ts.map +0 -1
- package/dist/integrations/runtime.js +0 -239
- package/dist/integrations/runtime.test.d.ts +0 -2
- package/dist/integrations/runtime.test.d.ts.map +0 -1
- package/dist/integrations/secrets/aws-secret-manager.d.ts +0 -29
- package/dist/integrations/secrets/aws-secret-manager.d.ts.map +0 -1
- package/dist/integrations/secrets/aws-secret-manager.js +0 -376
- package/dist/integrations/secrets/env-secret-provider.d.ts +0 -29
- package/dist/integrations/secrets/env-secret-provider.d.ts.map +0 -1
- package/dist/integrations/secrets/env-secret-provider.js +0 -189
- package/dist/integrations/secrets/gcp-secret-manager.d.ts +0 -30
- package/dist/integrations/secrets/gcp-secret-manager.d.ts.map +0 -1
- package/dist/integrations/secrets/gcp-secret-manager.js +0 -377
- package/dist/integrations/secrets/index.d.ts +0 -7
- package/dist/integrations/secrets/index.d.ts.map +0 -1
- package/dist/integrations/secrets/index.js +0 -1159
- package/dist/integrations/secrets/manager.d.ts +0 -45
- package/dist/integrations/secrets/manager.d.ts.map +0 -1
- package/dist/integrations/secrets/manager.js +0 -213
- package/dist/integrations/secrets/provider.d.ts +0 -50
- package/dist/integrations/secrets/provider.d.ts.map +0 -1
- package/dist/integrations/secrets/provider.js +0 -104
- package/dist/integrations/secrets/provider.test.d.ts +0 -2
- package/dist/integrations/secrets/provider.test.d.ts.map +0 -1
- package/dist/integrations/secrets/scaleway-secret-manager.d.ts +0 -36
- package/dist/integrations/secrets/scaleway-secret-manager.d.ts.map +0 -1
- package/dist/integrations/secrets/scaleway-secret-manager.js +0 -405
- package/dist/integrations/secrets-types.d.ts +0 -15
- package/dist/integrations/secrets-types.d.ts.map +0 -1
- package/dist/integrations/secrets-types.js +0 -1
- package/dist/integrations/spec.d.ts +0 -73
- package/dist/integrations/spec.d.ts.map +0 -1
- package/dist/integrations/spec.js +0 -232
- package/dist/integrations/spec.test.d.ts +0 -2
- package/dist/integrations/spec.test.d.ts.map +0 -1
- package/dist/jobs/define-job.d.ts +0 -16
- package/dist/jobs/define-job.d.ts.map +0 -1
- package/dist/jobs/define-job.js +0 -41
- package/dist/jobs/gcp-cloud-tasks.d.ts +0 -39
- package/dist/jobs/gcp-cloud-tasks.d.ts.map +0 -1
- package/dist/jobs/gcp-cloud-tasks.js +0 -103
- package/dist/jobs/gcp-pubsub.d.ts +0 -23
- package/dist/jobs/gcp-pubsub.d.ts.map +0 -1
- package/dist/jobs/gcp-pubsub.js +0 -91
- package/dist/jobs/handlers/gmail-sync-handler.d.ts +0 -6
- package/dist/jobs/handlers/gmail-sync-handler.d.ts.map +0 -1
- package/dist/jobs/handlers/gmail-sync-handler.js +0 -40
- package/dist/jobs/handlers/handlers.test.d.ts +0 -2
- package/dist/jobs/handlers/handlers.test.d.ts.map +0 -1
- package/dist/jobs/handlers/index.d.ts +0 -6
- package/dist/jobs/handlers/index.d.ts.map +0 -1
- package/dist/jobs/handlers/index.js +0 -83
- package/dist/jobs/handlers/ping-handler.d.ts +0 -7
- package/dist/jobs/handlers/ping-handler.d.ts.map +0 -1
- package/dist/jobs/handlers/ping-handler.js +0 -47
- package/dist/jobs/handlers/storage-document-handler.d.ts +0 -9
- package/dist/jobs/handlers/storage-document-handler.d.ts.map +0 -1
- package/dist/jobs/handlers/storage-document-handler.js +0 -47
- package/dist/jobs/index.d.ts +0 -3
- package/dist/jobs/index.d.ts.map +0 -1
- package/dist/jobs/index.js +0 -64
- package/dist/jobs/memory-queue.d.ts +0 -15
- package/dist/jobs/memory-queue.d.ts.map +0 -1
- package/dist/jobs/memory-queue.js +0 -129
- package/dist/jobs/queue.d.ts +0 -127
- package/dist/jobs/queue.d.ts.map +0 -1
- package/dist/jobs/queue.js +0 -55
- package/dist/jobs/queue.test.d.ts +0 -2
- package/dist/jobs/queue.test.d.ts.map +0 -1
- package/dist/jobs/scaleway-sqs-queue.d.ts +0 -28
- package/dist/jobs/scaleway-sqs-queue.d.ts.map +0 -1
- package/dist/jobs/scaleway-sqs-queue.js +0 -222
- package/dist/jsonschema.d.ts +0 -40
- package/dist/jsonschema.d.ts.map +0 -1
- package/dist/jsonschema.js +0 -73
- package/dist/jsonschema.test.d.ts +0 -2
- package/dist/jsonschema.test.d.ts.map +0 -1
- package/dist/knowledge/binding.d.ts +0 -23
- package/dist/knowledge/binding.d.ts.map +0 -1
- package/dist/knowledge/binding.js +0 -1
- package/dist/knowledge/docs/knowledge.docblock.d.ts +0 -3
- package/dist/knowledge/docs/knowledge.docblock.d.ts.map +0 -1
- package/dist/knowledge/docs/knowledge.docblock.js +0 -301
- package/dist/knowledge/index.d.ts +0 -5
- package/dist/knowledge/index.d.ts.map +0 -1
- package/dist/knowledge/index.js +0 -468
- package/dist/knowledge/ingestion/document-processor.d.ts +0 -23
- package/dist/knowledge/ingestion/document-processor.d.ts.map +0 -1
- package/dist/knowledge/ingestion/document-processor.js +0 -95
- package/dist/knowledge/ingestion/embedding-service.d.ts +0 -9
- package/dist/knowledge/ingestion/embedding-service.d.ts.map +0 -1
- package/dist/knowledge/ingestion/embedding-service.js +0 -57
- package/dist/knowledge/ingestion/gmail-adapter.d.ts +0 -15
- package/dist/knowledge/ingestion/gmail-adapter.d.ts.map +0 -1
- package/dist/knowledge/ingestion/gmail-adapter.js +0 -103
- package/dist/knowledge/ingestion/index.d.ts +0 -6
- package/dist/knowledge/ingestion/index.d.ts.map +0 -1
- package/dist/knowledge/ingestion/index.js +0 -252
- package/dist/knowledge/ingestion/ingestion.test.d.ts +0 -2
- package/dist/knowledge/ingestion/ingestion.test.d.ts.map +0 -1
- package/dist/knowledge/ingestion/storage-adapter.d.ts +0 -12
- package/dist/knowledge/ingestion/storage-adapter.d.ts.map +0 -1
- package/dist/knowledge/ingestion/storage-adapter.js +0 -62
- package/dist/knowledge/ingestion/vector-indexer.d.ts +0 -15
- package/dist/knowledge/ingestion/vector-indexer.d.ts.map +0 -1
- package/dist/knowledge/ingestion/vector-indexer.js +0 -63
- package/dist/knowledge/knowledge.capability.d.ts +0 -2
- package/dist/knowledge/knowledge.capability.d.ts.map +0 -1
- package/dist/knowledge/knowledge.capability.js +0 -726
- package/dist/knowledge/knowledge.feature.d.ts +0 -6
- package/dist/knowledge/knowledge.feature.d.ts.map +0 -1
- package/dist/knowledge/knowledge.feature.js +0 -301
- package/dist/knowledge/operations.d.ts +0 -312
- package/dist/knowledge/operations.d.ts.map +0 -1
- package/dist/knowledge/operations.js +0 -869
- package/dist/knowledge/operations.test.d.ts +0 -2
- package/dist/knowledge/operations.test.d.ts.map +0 -1
- package/dist/knowledge/query/index.d.ts +0 -2
- package/dist/knowledge/query/index.d.ts.map +0 -1
- package/dist/knowledge/query/index.js +0 -110
- package/dist/knowledge/query/service.d.ts +0 -26
- package/dist/knowledge/query/service.d.ts.map +0 -1
- package/dist/knowledge/query/service.js +0 -110
- package/dist/knowledge/query/service.test.d.ts +0 -2
- package/dist/knowledge/query/service.test.d.ts.map +0 -1
- package/dist/knowledge/runtime.d.ts +0 -29
- package/dist/knowledge/runtime.d.ts.map +0 -1
- package/dist/knowledge/runtime.js +0 -91
- package/dist/knowledge/runtime.test.d.ts +0 -2
- package/dist/knowledge/runtime.test.d.ts.map +0 -1
- package/dist/knowledge/source.d.ts +0 -30
- package/dist/knowledge/source.d.ts.map +0 -1
- package/dist/knowledge/source.js +0 -1
- package/dist/knowledge/spaces/email-threads.d.ts +0 -4
- package/dist/knowledge/spaces/email-threads.d.ts.map +0 -1
- package/dist/knowledge/spaces/email-threads.js +0 -102
- package/dist/knowledge/spaces/financial-docs.d.ts +0 -4
- package/dist/knowledge/spaces/financial-docs.d.ts.map +0 -1
- package/dist/knowledge/spaces/financial-docs.js +0 -102
- package/dist/knowledge/spaces/financial-overview.d.ts +0 -4
- package/dist/knowledge/spaces/financial-overview.d.ts.map +0 -1
- package/dist/knowledge/spaces/financial-overview.js +0 -102
- package/dist/knowledge/spaces/index.d.ts +0 -7
- package/dist/knowledge/spaces/index.d.ts.map +0 -1
- package/dist/knowledge/spaces/index.js +0 -273
- package/dist/knowledge/spaces/product-canon.d.ts +0 -4
- package/dist/knowledge/spaces/product-canon.d.ts.map +0 -1
- package/dist/knowledge/spaces/product-canon.js +0 -102
- package/dist/knowledge/spaces/spaces.test.d.ts +0 -2
- package/dist/knowledge/spaces/spaces.test.d.ts.map +0 -1
- package/dist/knowledge/spaces/support-faq.d.ts +0 -4
- package/dist/knowledge/spaces/support-faq.d.ts.map +0 -1
- package/dist/knowledge/spaces/support-faq.js +0 -103
- package/dist/knowledge/spaces/uploaded-docs.d.ts +0 -4
- package/dist/knowledge/spaces/uploaded-docs.d.ts.map +0 -1
- package/dist/knowledge/spaces/uploaded-docs.js +0 -102
- package/dist/knowledge/spec.d.ts +0 -43
- package/dist/knowledge/spec.d.ts.map +0 -1
- package/dist/knowledge/spec.js +0 -228
- package/dist/knowledge/spec.test.d.ts +0 -2
- package/dist/knowledge/spec.test.d.ts.map +0 -1
- package/dist/llm/exporters.d.ts +0 -69
- package/dist/llm/exporters.d.ts.map +0 -1
- package/dist/llm/exporters.js +0 -1261
- package/dist/llm/index.d.ts +0 -13
- package/dist/llm/index.d.ts.map +0 -1
- package/dist/llm/index.js +0 -1715
- package/dist/llm/prompts.d.ts +0 -54
- package/dist/llm/prompts.d.ts.map +0 -1
- package/dist/llm/prompts.js +0 -1706
- package/dist/llm/types.d.ts +0 -213
- package/dist/llm/types.d.ts.map +0 -1
- package/dist/llm/types.js +0 -1
- package/dist/markdown.d.ts +0 -17
- package/dist/markdown.d.ts.map +0 -1
- package/dist/markdown.js +0 -779
- package/dist/migrations.d.ts +0 -49
- package/dist/migrations.d.ts.map +0 -1
- package/dist/migrations.js +0 -67
- package/dist/migrations.test.d.ts +0 -2
- package/dist/migrations.test.d.ts.map +0 -1
- package/dist/model-registry.d.ts +0 -10
- package/dist/model-registry.d.ts.map +0 -1
- package/dist/model-registry.js +0 -64
- package/dist/model-registry.test.d.ts +0 -2
- package/dist/model-registry.test.d.ts.map +0 -1
- package/dist/node/app-config/app-config.capability.js +0 -730
- package/dist/node/app-config/app-config.contracts.js +0 -927
- package/dist/node/app-config/app-config.feature.js +0 -255
- package/dist/node/app-config/branding.js +0 -0
- package/dist/node/app-config/docs/app-config.docblock.js +0 -383
- package/dist/node/app-config/events.js +0 -386
- package/dist/node/app-config/index.js +0 -3113
- package/dist/node/app-config/lifecycle-contracts.js +0 -1084
- package/dist/node/app-config/lifecycle.js +0 -0
- package/dist/node/app-config/runtime.js +0 -734
- package/dist/node/app-config/spec.js +0 -229
- package/dist/node/app-config/validation.js +0 -650
- package/dist/node/capabilities/capabilities.js +0 -217
- package/dist/node/capabilities/context.js +0 -101
- package/dist/node/capabilities/docs/capabilities.docblock.js +0 -353
- package/dist/node/capabilities/guards.js +0 -177
- package/dist/node/capabilities/index.js +0 -739
- package/dist/node/capabilities/meeting-recorder.js +0 -154
- package/dist/node/capabilities/openbanking.js +0 -166
- package/dist/node/capabilities/validation.js +0 -185
- package/dist/node/client/index.js +0 -1379
- package/dist/node/client/react/drivers/rn-reusables.js +0 -38
- package/dist/node/client/react/drivers/shadcn.js +0 -38
- package/dist/node/client/react/feature-render.js +0 -833
- package/dist/node/client/react/form-render.js +0 -681
- package/dist/node/client/react/index.js +0 -1376
- package/dist/node/contract-registry/index.js +0 -129
- package/dist/node/contract-registry/schemas.js +0 -129
- package/dist/node/contract-registry/types.js +0 -0
- package/dist/node/data-views/data-views.js +0 -232
- package/dist/node/data-views/docs/data-views.docblock.js +0 -164
- package/dist/node/data-views/index.js +0 -232
- package/dist/node/data-views/query-generator.js +0 -89
- package/dist/node/data-views/registry.js +0 -226
- package/dist/node/data-views/report/contractVerificationTable.js +0 -240
- package/dist/node/data-views/runtime.js +0 -108
- package/dist/node/data-views/spec.js +0 -38
- package/dist/node/data-views/types.js +0 -0
- package/dist/node/docs/accessibility_wcag_compliance_specs.docblock.js +0 -513
- package/dist/node/docs/capabilities/documentationSystem.capability.js +0 -784
- package/dist/node/docs/capabilities/index.js +0 -784
- package/dist/node/docs/commands/docsGenerate.command.js +0 -1016
- package/dist/node/docs/commands/docsPublish.command.js +0 -995
- package/dist/node/docs/commands/index.js +0 -1120
- package/dist/node/docs/constants.js +0 -78
- package/dist/node/docs/contracts.js +0 -2383
- package/dist/node/docs/ensure-docblocks.js +0 -264
- package/dist/node/docs/events/docsGenerated.event.js +0 -533
- package/dist/node/docs/events/docsPublished.event.js +0 -534
- package/dist/node/docs/events/index.js +0 -567
- package/dist/node/docs/forms/docsSearch.form.js +0 -676
- package/dist/node/docs/forms/index.js +0 -676
- package/dist/node/docs/index.js +0 -5491
- package/dist/node/docs/meta.docs.js +0 -176
- package/dist/node/docs/presentations/docsLayout.presentation.js +0 -1090
- package/dist/node/docs/presentations/docsReferencePage.presentation.js +0 -1090
- package/dist/node/docs/presentations/index.js +0 -1118
- package/dist/node/docs/presentations.js +0 -97
- package/dist/node/docs/queries/contractReference.query.js +0 -966
- package/dist/node/docs/queries/docsIndex.query.js +0 -966
- package/dist/node/docs/queries/index.js +0 -1041
- package/dist/node/docs/registry.js +0 -153
- package/dist/node/docs/tech/auth/better-auth-nextjs.docblock.js +0 -221
- package/dist/node/docs/tech/cli.docblock.js +0 -291
- package/dist/node/docs/tech/contracts/README.docblock.js +0 -164
- package/dist/node/docs/tech/contracts/migrations.docblock.js +0 -164
- package/dist/node/docs/tech/contracts/openapi-export.docblock.js +0 -201
- package/dist/node/docs/tech/contracts/openapi-import.docblock.js +0 -207
- package/dist/node/docs/tech/contracts/ops-to-presentation-linking.docblock.js +0 -225
- package/dist/node/docs/tech/contracts/overlays.docblock.js +0 -231
- package/dist/node/docs/tech/contracts/tests.docblock.js +0 -164
- package/dist/node/docs/tech/contracts/themes.docblock.js +0 -257
- package/dist/node/docs/tech/contracts/vertical-pocket-family-office.docblock.js +0 -269
- package/dist/node/docs/tech/docs-system.docblock.js +0 -264
- package/dist/node/docs/tech/lifecycle-stage-system.docblock.js +0 -376
- package/dist/node/docs/tech/llm/llm-integration.docblock.js +0 -482
- package/dist/node/docs/tech/mcp-endpoints.docblock.js +0 -185
- package/dist/node/docs/tech/presentation-runtime.docblock.js +0 -221
- package/dist/node/docs/tech/report-verification-table.docblock.js +0 -191
- package/dist/node/docs/tech/schema/README.docblock.js +0 -164
- package/dist/node/docs/tech/studio/learning-events.docblock.js +0 -190
- package/dist/node/docs/tech/studio/learning-journeys.docblock.js +0 -227
- package/dist/node/docs/tech/studio/platform-admin-panel.docblock.js +0 -226
- package/dist/node/docs/tech/studio/project-access-teams.docblock.js +0 -200
- package/dist/node/docs/tech/studio/project-routing.docblock.js +0 -209
- package/dist/node/docs/tech/studio/sandbox-unlogged.docblock.js +0 -183
- package/dist/node/docs/tech/studio/team-invitations.docblock.js +0 -228
- package/dist/node/docs/tech/studio/workspace-ops.docblock.js +0 -189
- package/dist/node/docs/tech/studio/workspaces.docblock.js +0 -204
- package/dist/node/docs/tech/telemetry-ingest.docblock.js +0 -305
- package/dist/node/docs/tech/vscode-extension.docblock.js +0 -241
- package/dist/node/docs/tech-contracts.docs.js +0 -239
- package/dist/node/docs/types.js +0 -0
- package/dist/node/docs/views/contractReference.dataView.js +0 -1047
- package/dist/node/docs/views/docsIndex.dataView.js +0 -1041
- package/dist/node/docs/views/exampleCatalog.dataView.js +0 -1025
- package/dist/node/docs/views/index.js +0 -1240
- package/dist/node/events.js +0 -228
- package/dist/node/examples/docs/examples.docblock.js +0 -307
- package/dist/node/examples/index.js +0 -604
- package/dist/node/examples/registry.js +0 -286
- package/dist/node/examples/schema.js +0 -166
- package/dist/node/examples/types.js +0 -77
- package/dist/node/examples/validation.js +0 -287
- package/dist/node/experiments/docs/experiments.docblock.js +0 -291
- package/dist/node/experiments/evaluator.js +0 -155
- package/dist/node/experiments/spec-resolver.js +0 -0
- package/dist/node/experiments/spec.js +0 -227
- package/dist/node/features/index.js +0 -275
- package/dist/node/features/install.js +0 -95
- package/dist/node/features/registry.js +0 -192
- package/dist/node/features/types.js +0 -0
- package/dist/node/features/validation.js +0 -48
- package/dist/node/forms/docs/forms.docblock.js +0 -164
- package/dist/node/forms/forms.js +0 -332
- package/dist/node/forms/index.js +0 -332
- package/dist/node/index.js +0 -18411
- package/dist/node/install.js +0 -60
- package/dist/node/integrations/binding.js +0 -0
- package/dist/node/integrations/connection.js +0 -0
- package/dist/node/integrations/docs/integrations.docblock.js +0 -255
- package/dist/node/integrations/health.js +0 -103
- package/dist/node/integrations/index.js +0 -3984
- package/dist/node/integrations/integrations.capability.js +0 -726
- package/dist/node/integrations/integrations.feature.js +0 -301
- package/dist/node/integrations/meeting-recorder/contracts/index.js +0 -1231
- package/dist/node/integrations/meeting-recorder/contracts/meetings.js +0 -866
- package/dist/node/integrations/meeting-recorder/contracts/transcripts.js +0 -933
- package/dist/node/integrations/meeting-recorder/contracts/webhooks.js +0 -819
- package/dist/node/integrations/meeting-recorder/meeting-recorder.capability.js +0 -726
- package/dist/node/integrations/meeting-recorder/meeting-recorder.feature.js +0 -301
- package/dist/node/integrations/meeting-recorder/models.js +0 -152
- package/dist/node/integrations/meeting-recorder/telemetry.js +0 -84
- package/dist/node/integrations/openbanking/contracts/accounts.js +0 -974
- package/dist/node/integrations/openbanking/contracts/balances.js +0 -938
- package/dist/node/integrations/openbanking/contracts/index.js +0 -1399
- package/dist/node/integrations/openbanking/contracts/transactions.js +0 -944
- package/dist/node/integrations/openbanking/guards.js +0 -72
- package/dist/node/integrations/openbanking/models.js +0 -140
- package/dist/node/integrations/openbanking/openbanking.capability.js +0 -726
- package/dist/node/integrations/openbanking/openbanking.feature.js +0 -303
- package/dist/node/integrations/openbanking/telemetry.js +0 -81
- package/dist/node/integrations/operations.js +0 -943
- package/dist/node/integrations/providers/analytics-reader.js +0 -0
- package/dist/node/integrations/providers/analytics-writer.js +0 -0
- package/dist/node/integrations/providers/analytics.js +0 -0
- package/dist/node/integrations/providers/calendar.js +0 -0
- package/dist/node/integrations/providers/database.js +0 -0
- package/dist/node/integrations/providers/elevenlabs.js +0 -331
- package/dist/node/integrations/providers/email.js +0 -0
- package/dist/node/integrations/providers/embedding.js +0 -0
- package/dist/node/integrations/providers/fal.js +0 -357
- package/dist/node/integrations/providers/fathom.js +0 -371
- package/dist/node/integrations/providers/fireflies.js +0 -351
- package/dist/node/integrations/providers/gcs-storage.js +0 -342
- package/dist/node/integrations/providers/gmail.js +0 -354
- package/dist/node/integrations/providers/google-calendar.js +0 -337
- package/dist/node/integrations/providers/gradium.js +0 -355
- package/dist/node/integrations/providers/granola.js +0 -352
- package/dist/node/integrations/providers/index.js +0 -2317
- package/dist/node/integrations/providers/jira.js +0 -353
- package/dist/node/integrations/providers/linear.js +0 -352
- package/dist/node/integrations/providers/llm.js +0 -0
- package/dist/node/integrations/providers/meeting-recorder.js +0 -0
- package/dist/node/integrations/providers/mistral.js +0 -339
- package/dist/node/integrations/providers/notion.js +0 -358
- package/dist/node/integrations/providers/openbanking.js +0 -0
- package/dist/node/integrations/providers/payments.js +0 -0
- package/dist/node/integrations/providers/posthog-llm-telemetry.js +0 -241
- package/dist/node/integrations/providers/posthog.js +0 -351
- package/dist/node/integrations/providers/postmark.js +0 -343
- package/dist/node/integrations/providers/powens.js +0 -369
- package/dist/node/integrations/providers/project-management.js +0 -0
- package/dist/node/integrations/providers/qdrant.js +0 -346
- package/dist/node/integrations/providers/registry.js +0 -2102
- package/dist/node/integrations/providers/sms.js +0 -0
- package/dist/node/integrations/providers/storage.js +0 -0
- package/dist/node/integrations/providers/stripe.js +0 -350
- package/dist/node/integrations/providers/supabase-postgres.js +0 -332
- package/dist/node/integrations/providers/supabase-vector.js +0 -352
- package/dist/node/integrations/providers/tldv.js +0 -351
- package/dist/node/integrations/providers/twilio-sms.js +0 -336
- package/dist/node/integrations/providers/vector-store.js +0 -0
- package/dist/node/integrations/providers/voice.js +0 -0
- package/dist/node/integrations/runtime.js +0 -239
- package/dist/node/integrations/secrets/aws-secret-manager.js +0 -376
- package/dist/node/integrations/secrets/env-secret-provider.js +0 -189
- package/dist/node/integrations/secrets/gcp-secret-manager.js +0 -377
- package/dist/node/integrations/secrets/index.js +0 -1159
- package/dist/node/integrations/secrets/manager.js +0 -213
- package/dist/node/integrations/secrets/provider.js +0 -104
- package/dist/node/integrations/secrets/scaleway-secret-manager.js +0 -405
- package/dist/node/integrations/secrets-types.js +0 -0
- package/dist/node/integrations/spec.js +0 -232
- package/dist/node/jobs/define-job.js +0 -41
- package/dist/node/jobs/gcp-cloud-tasks.js +0 -103
- package/dist/node/jobs/gcp-pubsub.js +0 -91
- package/dist/node/jobs/handlers/gmail-sync-handler.js +0 -40
- package/dist/node/jobs/handlers/index.js +0 -83
- package/dist/node/jobs/handlers/ping-handler.js +0 -47
- package/dist/node/jobs/handlers/storage-document-handler.js +0 -47
- package/dist/node/jobs/index.js +0 -64
- package/dist/node/jobs/memory-queue.js +0 -129
- package/dist/node/jobs/queue.js +0 -55
- package/dist/node/jobs/scaleway-sqs-queue.js +0 -222
- package/dist/node/jsonschema.js +0 -73
- package/dist/node/knowledge/binding.js +0 -0
- package/dist/node/knowledge/docs/knowledge.docblock.js +0 -301
- package/dist/node/knowledge/index.js +0 -468
- package/dist/node/knowledge/ingestion/document-processor.js +0 -95
- package/dist/node/knowledge/ingestion/embedding-service.js +0 -57
- package/dist/node/knowledge/ingestion/gmail-adapter.js +0 -103
- package/dist/node/knowledge/ingestion/index.js +0 -252
- package/dist/node/knowledge/ingestion/storage-adapter.js +0 -62
- package/dist/node/knowledge/ingestion/vector-indexer.js +0 -63
- package/dist/node/knowledge/knowledge.capability.js +0 -726
- package/dist/node/knowledge/knowledge.feature.js +0 -301
- package/dist/node/knowledge/operations.js +0 -869
- package/dist/node/knowledge/query/index.js +0 -110
- package/dist/node/knowledge/query/service.js +0 -110
- package/dist/node/knowledge/runtime.js +0 -91
- package/dist/node/knowledge/source.js +0 -0
- package/dist/node/knowledge/spaces/email-threads.js +0 -102
- package/dist/node/knowledge/spaces/financial-docs.js +0 -102
- package/dist/node/knowledge/spaces/financial-overview.js +0 -102
- package/dist/node/knowledge/spaces/index.js +0 -273
- package/dist/node/knowledge/spaces/product-canon.js +0 -102
- package/dist/node/knowledge/spaces/support-faq.js +0 -103
- package/dist/node/knowledge/spaces/uploaded-docs.js +0 -102
- package/dist/node/knowledge/spec.js +0 -228
- package/dist/node/llm/exporters.js +0 -1261
- package/dist/node/llm/index.js +0 -1715
- package/dist/node/llm/prompts.js +0 -1706
- package/dist/node/llm/types.js +0 -0
- package/dist/node/markdown.js +0 -779
- package/dist/node/migrations.js +0 -67
- package/dist/node/model-registry.js +0 -64
- package/dist/node/onboarding-base.js +0 -810
- package/dist/node/openapi.js +0 -151
- package/dist/node/operations/index.js +0 -665
- package/dist/node/operations/operation.js +0 -51
- package/dist/node/operations/registry.js +0 -405
- package/dist/node/operations/report/getContractVerificationStatus.js +0 -170
- package/dist/node/operations/report/index.js +0 -305
- package/dist/node/ownership.js +0 -73
- package/dist/node/policy/context.js +0 -206
- package/dist/node/policy/docs/policy.docblock.js +0 -313
- package/dist/node/policy/engine.js +0 -325
- package/dist/node/policy/guards.js +0 -387
- package/dist/node/policy/index.js +0 -1313
- package/dist/node/policy/opa-adapter.js +0 -110
- package/dist/node/policy/registry.js +0 -221
- package/dist/node/policy/spec.js +0 -0
- package/dist/node/policy/validation.js +0 -391
- package/dist/node/presentations/docs/presentations-conventions.docblock.js +0 -171
- package/dist/node/presentations/index.js +0 -795
- package/dist/node/presentations/presentations.js +0 -38
- package/dist/node/presentations/registry.js +0 -221
- package/dist/node/presentations/transform-engine.js +0 -600
- package/dist/node/product-intent/contract-patch-intent.js +0 -68
- package/dist/node/product-intent/contract-spec-patch.js +0 -75
- package/dist/node/product-intent/evidence.js +0 -45
- package/dist/node/product-intent/findings.js +0 -81
- package/dist/node/product-intent/impact-report.js +0 -62
- package/dist/node/product-intent/index.js +0 -742
- package/dist/node/product-intent/insights.js +0 -63
- package/dist/node/product-intent/opportunity-brief.js +0 -106
- package/dist/node/product-intent/problems.js +0 -55
- package/dist/node/product-intent/registry.js +0 -242
- package/dist/node/product-intent/runtime.js +0 -320
- package/dist/node/product-intent/spec.js +0 -425
- package/dist/node/product-intent/task-pack.js +0 -69
- package/dist/node/product-intent/tickets.js +0 -57
- package/dist/node/product-intent/types.js +0 -378
- package/dist/node/product-intent/ui-wireframe.js +0 -73
- package/dist/node/prompt.js +0 -38
- package/dist/node/promptRegistry.js +0 -63
- package/dist/node/regenerator/adapters.js +0 -0
- package/dist/node/regenerator/docs/regenerator.docblock.js +0 -164
- package/dist/node/regenerator/executor.js +0 -157
- package/dist/node/regenerator/index.js +0 -342
- package/dist/node/regenerator/service.js +0 -183
- package/dist/node/regenerator/sinks.js +0 -64
- package/dist/node/regenerator/types.js +0 -0
- package/dist/node/regenerator/utils.js +0 -87
- package/dist/node/registry-utils.js +0 -163
- package/dist/node/registry.js +0 -215
- package/dist/node/resources.js +0 -83
- package/dist/node/schema-to-markdown.js +0 -278
- package/dist/node/serialization/index.js +0 -179
- package/dist/node/serialization/serializers.js +0 -180
- package/dist/node/serialization/types.js +0 -0
- package/dist/node/server/contracts-adapter-hydration.js +0 -71
- package/dist/node/server/contracts-adapter-input.js +0 -130
- package/dist/node/server/graphql-pothos.js +0 -338
- package/dist/node/server/index.js +0 -1469
- package/dist/node/server/mcp/createMcpServer.js +0 -994
- package/dist/node/server/mcp/mcpTypes.js +0 -0
- package/dist/node/server/mcp/registerPresentations.js +0 -877
- package/dist/node/server/mcp/registerPrompts.js +0 -109
- package/dist/node/server/mcp/registerResources.js +0 -75
- package/dist/node/server/mcp/registerTools.js +0 -86
- package/dist/node/server/provider-mcp.js +0 -994
- package/dist/node/server/rest-elysia.js +0 -209
- package/dist/node/server/rest-express.js +0 -224
- package/dist/node/server/rest-generic.js +0 -192
- package/dist/node/server/rest-next-app.js +0 -200
- package/dist/node/server/rest-next-mcp.js +0 -103
- package/dist/node/server/rest-next-pages.js +0 -211
- package/dist/node/telemetry/anomaly.js +0 -91
- package/dist/node/telemetry/docs/telemetry.docblock.js +0 -164
- package/dist/node/telemetry/index.js +0 -417
- package/dist/node/telemetry/spec.js +0 -261
- package/dist/node/telemetry/tracker.js +0 -129
- package/dist/node/tests/index.js +0 -231
- package/dist/node/tests/runner.js +0 -189
- package/dist/node/tests/spec.js +0 -74
- package/dist/node/themes.js +0 -225
- package/dist/node/translations/catalog.js +0 -0
- package/dist/node/translations/index.js +0 -533
- package/dist/node/translations/registry.js +0 -170
- package/dist/node/translations/spec.js +0 -36
- package/dist/node/translations/tenant.js +0 -0
- package/dist/node/translations/validation.js +0 -392
- package/dist/node/types.js +0 -0
- package/dist/node/versioning/index.js +0 -274
- package/dist/node/versioning/refs.js +0 -99
- package/dist/node/versioning/types.js +0 -55
- package/dist/node/versioning/utils.js +0 -184
- package/dist/node/workflow/adapters/db-adapter.js +0 -127
- package/dist/node/workflow/adapters/file-adapter.js +0 -38
- package/dist/node/workflow/adapters/index.js +0 -194
- package/dist/node/workflow/adapters/memory-store.js +0 -93
- package/dist/node/workflow/context.js +0 -247
- package/dist/node/workflow/expression.js +0 -157
- package/dist/node/workflow/index.js +0 -1546
- package/dist/node/workflow/overview.docblock.js +0 -164
- package/dist/node/workflow/runner.js +0 -532
- package/dist/node/workflow/sla-monitor.js +0 -84
- package/dist/node/workflow/spec.js +0 -221
- package/dist/node/workflow/state.js +0 -0
- package/dist/node/workflow/validation.js +0 -425
- package/dist/node/workspace-config/contractsrc-schema.js +0 -344
- package/dist/node/workspace-config/contractsrc-types.js +0 -0
- package/dist/node/workspace-config/index.js +0 -325
- package/dist/node/workspace-config/workspace-config.docblock.js +0 -188
- package/dist/onboarding-base.d.ts +0 -132
- package/dist/onboarding-base.d.ts.map +0 -1
- package/dist/onboarding-base.js +0 -810
- package/dist/openapi.d.ts +0 -34
- package/dist/openapi.d.ts.map +0 -1
- package/dist/openapi.js +0 -151
- package/dist/operations/index.d.ts +0 -4
- package/dist/operations/index.d.ts.map +0 -1
- package/dist/operations/index.js +0 -665
- package/dist/operations/operation.d.ts +0 -192
- package/dist/operations/operation.d.ts.map +0 -1
- package/dist/operations/operation.js +0 -51
- package/dist/operations/registry.d.ts +0 -59
- package/dist/operations/registry.d.ts.map +0 -1
- package/dist/operations/registry.js +0 -405
- package/dist/operations/report/getContractVerificationStatus.d.ts +0 -69
- package/dist/operations/report/getContractVerificationStatus.d.ts.map +0 -1
- package/dist/operations/report/getContractVerificationStatus.js +0 -170
- package/dist/operations/report/getContractVerificationStatus.test.d.ts +0 -2
- package/dist/operations/report/getContractVerificationStatus.test.d.ts.map +0 -1
- package/dist/operations/report/index.d.ts +0 -11
- package/dist/operations/report/index.d.ts.map +0 -1
- package/dist/operations/report/index.js +0 -305
- package/dist/operations/report/index.test.d.ts +0 -2
- package/dist/operations/report/index.test.d.ts.map +0 -1
- package/dist/ownership.d.ts +0 -212
- package/dist/ownership.d.ts.map +0 -1
- package/dist/ownership.js +0 -73
- package/dist/ownership.test.d.ts +0 -2
- package/dist/ownership.test.d.ts.map +0 -1
- package/dist/policy/context.d.ts +0 -235
- package/dist/policy/context.d.ts.map +0 -1
- package/dist/policy/context.js +0 -206
- package/dist/policy/context.test.d.ts +0 -2
- package/dist/policy/context.test.d.ts.map +0 -1
- package/dist/policy/docs/policy.docblock.d.ts +0 -3
- package/dist/policy/docs/policy.docblock.d.ts.map +0 -1
- package/dist/policy/docs/policy.docblock.js +0 -313
- package/dist/policy/engine.d.ts +0 -37
- package/dist/policy/engine.d.ts.map +0 -1
- package/dist/policy/engine.js +0 -325
- package/dist/policy/engine.test.d.ts +0 -2
- package/dist/policy/engine.test.d.ts.map +0 -1
- package/dist/policy/guards.d.ts +0 -157
- package/dist/policy/guards.d.ts.map +0 -1
- package/dist/policy/guards.js +0 -387
- package/dist/policy/guards.test.d.ts +0 -2
- package/dist/policy/guards.test.d.ts.map +0 -1
- package/dist/policy/index.d.ts +0 -13
- package/dist/policy/index.d.ts.map +0 -1
- package/dist/policy/index.js +0 -1313
- package/dist/policy/opa-adapter.d.ts +0 -42
- package/dist/policy/opa-adapter.d.ts.map +0 -1
- package/dist/policy/opa-adapter.js +0 -110
- package/dist/policy/opa-adapter.test.d.ts +0 -2
- package/dist/policy/opa-adapter.test.d.ts.map +0 -1
- package/dist/policy/registry.d.ts +0 -6
- package/dist/policy/registry.d.ts.map +0 -1
- package/dist/policy/registry.js +0 -221
- package/dist/policy/spec.d.ts +0 -103
- package/dist/policy/spec.d.ts.map +0 -1
- package/dist/policy/spec.js +0 -1
- package/dist/policy/validation.d.ts +0 -85
- package/dist/policy/validation.d.ts.map +0 -1
- package/dist/policy/validation.js +0 -391
- package/dist/policy/validation.test.d.ts +0 -2
- package/dist/policy/validation.test.d.ts.map +0 -1
- package/dist/presentations/docs/presentations-conventions.docblock.d.ts +0 -3
- package/dist/presentations/docs/presentations-conventions.docblock.d.ts.map +0 -1
- package/dist/presentations/docs/presentations-conventions.docblock.js +0 -171
- package/dist/presentations/index.d.ts +0 -4
- package/dist/presentations/index.d.ts.map +0 -1
- package/dist/presentations/index.js +0 -795
- package/dist/presentations/presentations.d.ts +0 -53
- package/dist/presentations/presentations.d.ts.map +0 -1
- package/dist/presentations/presentations.js +0 -38
- package/dist/presentations/registry.d.ts +0 -7
- package/dist/presentations/registry.d.ts.map +0 -1
- package/dist/presentations/registry.js +0 -221
- package/dist/presentations/transform-engine.d.ts +0 -63
- package/dist/presentations/transform-engine.d.ts.map +0 -1
- package/dist/presentations/transform-engine.js +0 -600
- package/dist/presentations/transform-engine.test.d.ts +0 -2
- package/dist/presentations/transform-engine.test.d.ts.map +0 -1
- package/dist/product-intent/contract-patch-intent.d.ts +0 -101
- package/dist/product-intent/contract-patch-intent.d.ts.map +0 -1
- package/dist/product-intent/contract-patch-intent.js +0 -68
- package/dist/product-intent/contract-spec-patch.d.ts +0 -87
- package/dist/product-intent/contract-spec-patch.d.ts.map +0 -1
- package/dist/product-intent/contract-spec-patch.js +0 -75
- package/dist/product-intent/evidence.d.ts +0 -15
- package/dist/product-intent/evidence.d.ts.map +0 -1
- package/dist/product-intent/evidence.js +0 -45
- package/dist/product-intent/findings.d.ts +0 -58
- package/dist/product-intent/findings.d.ts.map +0 -1
- package/dist/product-intent/findings.js +0 -81
- package/dist/product-intent/impact-report.d.ts +0 -58
- package/dist/product-intent/impact-report.d.ts.map +0 -1
- package/dist/product-intent/impact-report.js +0 -62
- package/dist/product-intent/index.d.ts +0 -14
- package/dist/product-intent/index.d.ts.map +0 -1
- package/dist/product-intent/index.js +0 -742
- package/dist/product-intent/insights.d.ts +0 -63
- package/dist/product-intent/insights.d.ts.map +0 -1
- package/dist/product-intent/insights.js +0 -63
- package/dist/product-intent/opportunity-brief.d.ts +0 -193
- package/dist/product-intent/opportunity-brief.d.ts.map +0 -1
- package/dist/product-intent/opportunity-brief.js +0 -106
- package/dist/product-intent/problems.d.ts +0 -60
- package/dist/product-intent/problems.d.ts.map +0 -1
- package/dist/product-intent/problems.js +0 -55
- package/dist/product-intent/registry.d.ts +0 -29
- package/dist/product-intent/registry.d.ts.map +0 -1
- package/dist/product-intent/registry.js +0 -242
- package/dist/product-intent/registry.test.d.ts +0 -2
- package/dist/product-intent/registry.test.d.ts.map +0 -1
- package/dist/product-intent/runtime.d.ts +0 -93
- package/dist/product-intent/runtime.d.ts.map +0 -1
- package/dist/product-intent/runtime.js +0 -320
- package/dist/product-intent/runtime.test.d.ts +0 -2
- package/dist/product-intent/runtime.test.d.ts.map +0 -1
- package/dist/product-intent/spec.d.ts +0 -665
- package/dist/product-intent/spec.d.ts.map +0 -1
- package/dist/product-intent/spec.js +0 -425
- package/dist/product-intent/task-pack.d.ts +0 -99
- package/dist/product-intent/task-pack.d.ts.map +0 -1
- package/dist/product-intent/task-pack.js +0 -69
- package/dist/product-intent/tickets.d.ts +0 -68
- package/dist/product-intent/tickets.d.ts.map +0 -1
- package/dist/product-intent/tickets.js +0 -57
- package/dist/product-intent/types.d.ts +0 -12
- package/dist/product-intent/types.d.ts.map +0 -1
- package/dist/product-intent/types.js +0 -378
- package/dist/product-intent/ui-wireframe.d.ts +0 -101
- package/dist/product-intent/ui-wireframe.d.ts.map +0 -1
- package/dist/product-intent/ui-wireframe.js +0 -73
- package/dist/prompt.d.ts +0 -50
- package/dist/prompt.d.ts.map +0 -1
- package/dist/prompt.js +0 -38
- package/dist/prompt.test.d.ts +0 -2
- package/dist/prompt.test.d.ts.map +0 -1
- package/dist/promptRegistry.d.ts +0 -12
- package/dist/promptRegistry.d.ts.map +0 -1
- package/dist/promptRegistry.js +0 -63
- package/dist/promptRegistry.test.d.ts +0 -2
- package/dist/promptRegistry.test.d.ts.map +0 -1
- package/dist/regenerator/adapters.d.ts +0 -16
- package/dist/regenerator/adapters.d.ts.map +0 -1
- package/dist/regenerator/adapters.js +0 -1
- package/dist/regenerator/docs/regenerator.docblock.d.ts +0 -3
- package/dist/regenerator/docs/regenerator.docblock.d.ts.map +0 -1
- package/dist/regenerator/docs/regenerator.docblock.js +0 -164
- package/dist/regenerator/executor.d.ts +0 -67
- package/dist/regenerator/executor.d.ts.map +0 -1
- package/dist/regenerator/executor.js +0 -157
- package/dist/regenerator/executor.test.d.ts +0 -2
- package/dist/regenerator/executor.test.d.ts.map +0 -1
- package/dist/regenerator/index.d.ts +0 -7
- package/dist/regenerator/index.d.ts.map +0 -1
- package/dist/regenerator/index.js +0 -342
- package/dist/regenerator/service.d.ts +0 -30
- package/dist/regenerator/service.d.ts.map +0 -1
- package/dist/regenerator/service.js +0 -183
- package/dist/regenerator/service.test.d.ts +0 -2
- package/dist/regenerator/service.test.d.ts.map +0 -1
- package/dist/regenerator/sinks.d.ts +0 -24
- package/dist/regenerator/sinks.d.ts.map +0 -1
- package/dist/regenerator/sinks.js +0 -64
- package/dist/regenerator/sinks.test.d.ts +0 -2
- package/dist/regenerator/sinks.test.d.ts.map +0 -1
- package/dist/regenerator/types.d.ts +0 -104
- package/dist/regenerator/types.d.ts.map +0 -1
- package/dist/regenerator/types.js +0 -1
- package/dist/regenerator/utils.d.ts +0 -7
- package/dist/regenerator/utils.d.ts.map +0 -1
- package/dist/regenerator/utils.js +0 -87
- package/dist/registry-utils.d.ts +0 -106
- package/dist/registry-utils.d.ts.map +0 -1
- package/dist/registry-utils.js +0 -163
- package/dist/registry-utils.test.d.ts +0 -2
- package/dist/registry-utils.test.d.ts.map +0 -1
- package/dist/registry.d.ts +0 -28
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js +0 -215
- package/dist/resources.d.ts +0 -61
- package/dist/resources.d.ts.map +0 -1
- package/dist/resources.js +0 -83
- package/dist/schema-to-markdown.d.ts +0 -57
- package/dist/schema-to-markdown.d.ts.map +0 -1
- package/dist/schema-to-markdown.js +0 -278
- package/dist/serialization/index.d.ts +0 -11
- package/dist/serialization/index.d.ts.map +0 -1
- package/dist/serialization/index.js +0 -179
- package/dist/serialization/serializers.d.ts +0 -36
- package/dist/serialization/serializers.d.ts.map +0 -1
- package/dist/serialization/serializers.js +0 -180
- package/dist/serialization/types.d.ts +0 -101
- package/dist/serialization/types.d.ts.map +0 -1
- package/dist/serialization/types.js +0 -1
- package/dist/server/contracts-adapter-hydration.d.ts +0 -12
- package/dist/server/contracts-adapter-hydration.d.ts.map +0 -1
- package/dist/server/contracts-adapter-hydration.js +0 -71
- package/dist/server/contracts-adapter-input.d.ts +0 -6
- package/dist/server/contracts-adapter-input.d.ts.map +0 -1
- package/dist/server/contracts-adapter-input.js +0 -130
- package/dist/server/graphql-pothos.d.ts +0 -27
- package/dist/server/graphql-pothos.d.ts.map +0 -1
- package/dist/server/graphql-pothos.js +0 -338
- package/dist/server/index.d.ts +0 -8
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/index.js +0 -1469
- package/dist/server/mcp/createMcpServer.d.ts +0 -11
- package/dist/server/mcp/createMcpServer.d.ts.map +0 -1
- package/dist/server/mcp/createMcpServer.js +0 -994
- package/dist/server/mcp/mcpTypes.d.ts +0 -23
- package/dist/server/mcp/mcpTypes.d.ts.map +0 -1
- package/dist/server/mcp/mcpTypes.js +0 -1
- package/dist/server/mcp/registerPresentations.d.ts +0 -4
- package/dist/server/mcp/registerPresentations.d.ts.map +0 -1
- package/dist/server/mcp/registerPresentations.js +0 -877
- package/dist/server/mcp/registerPrompts.d.ts +0 -5
- package/dist/server/mcp/registerPrompts.d.ts.map +0 -1
- package/dist/server/mcp/registerPrompts.js +0 -109
- package/dist/server/mcp/registerResources.d.ts +0 -5
- package/dist/server/mcp/registerResources.d.ts.map +0 -1
- package/dist/server/mcp/registerResources.js +0 -75
- package/dist/server/mcp/registerTools.d.ts +0 -5
- package/dist/server/mcp/registerTools.d.ts.map +0 -1
- package/dist/server/mcp/registerTools.js +0 -86
- package/dist/server/provider-mcp.d.ts +0 -2
- package/dist/server/provider-mcp.d.ts.map +0 -1
- package/dist/server/provider-mcp.js +0 -994
- package/dist/server/provider-mcp.test.d.ts +0 -2
- package/dist/server/provider-mcp.test.d.ts.map +0 -1
- package/dist/server/rest-elysia.d.ts +0 -37
- package/dist/server/rest-elysia.d.ts.map +0 -1
- package/dist/server/rest-elysia.js +0 -209
- package/dist/server/rest-express.d.ts +0 -12
- package/dist/server/rest-express.d.ts.map +0 -1
- package/dist/server/rest-express.js +0 -224
- package/dist/server/rest-generic.d.ts +0 -29
- package/dist/server/rest-generic.d.ts.map +0 -1
- package/dist/server/rest-generic.js +0 -192
- package/dist/server/rest-next-app.d.ts +0 -31
- package/dist/server/rest-next-app.d.ts.map +0 -1
- package/dist/server/rest-next-app.js +0 -200
- package/dist/server/rest-next-mcp.d.ts +0 -8
- package/dist/server/rest-next-mcp.d.ts.map +0 -1
- package/dist/server/rest-next-mcp.js +0 -103
- package/dist/server/rest-next-pages.d.ts +0 -6
- package/dist/server/rest-next-pages.d.ts.map +0 -1
- package/dist/server/rest-next-pages.js +0 -211
- package/dist/telemetry/anomaly.d.ts +0 -24
- package/dist/telemetry/anomaly.d.ts.map +0 -1
- package/dist/telemetry/anomaly.js +0 -91
- package/dist/telemetry/anomaly.test.d.ts +0 -2
- package/dist/telemetry/anomaly.test.d.ts.map +0 -1
- package/dist/telemetry/docs/telemetry.docblock.d.ts +0 -3
- package/dist/telemetry/docs/telemetry.docblock.d.ts.map +0 -1
- package/dist/telemetry/docs/telemetry.docblock.js +0 -164
- package/dist/telemetry/index.d.ts +0 -4
- package/dist/telemetry/index.d.ts.map +0 -1
- package/dist/telemetry/index.js +0 -417
- package/dist/telemetry/spec.d.ts +0 -88
- package/dist/telemetry/spec.d.ts.map +0 -1
- package/dist/telemetry/spec.js +0 -261
- package/dist/telemetry/spec.test.d.ts +0 -2
- package/dist/telemetry/spec.test.d.ts.map +0 -1
- package/dist/telemetry/tracker.d.ts +0 -49
- package/dist/telemetry/tracker.d.ts.map +0 -1
- package/dist/telemetry/tracker.js +0 -129
- package/dist/telemetry/tracker.test.d.ts +0 -2
- package/dist/telemetry/tracker.test.d.ts.map +0 -1
- package/dist/tests/index.d.ts +0 -3
- package/dist/tests/index.d.ts.map +0 -1
- package/dist/tests/index.js +0 -231
- package/dist/tests/runner.d.ts +0 -39
- package/dist/tests/runner.d.ts.map +0 -1
- package/dist/tests/runner.js +0 -189
- package/dist/tests/runner.test.d.ts +0 -2
- package/dist/tests/runner.test.d.ts.map +0 -1
- package/dist/tests/spec.d.ts +0 -83
- package/dist/tests/spec.d.ts.map +0 -1
- package/dist/tests/spec.js +0 -74
- package/dist/tests/spec.test.d.ts +0 -2
- package/dist/tests/spec.test.d.ts.map +0 -1
- package/dist/themes.d.ts +0 -51
- package/dist/themes.d.ts.map +0 -1
- package/dist/themes.js +0 -225
- package/dist/themes.test.d.ts +0 -2
- package/dist/themes.test.d.ts.map +0 -1
- package/dist/translations/catalog.d.ts +0 -26
- package/dist/translations/catalog.d.ts.map +0 -1
- package/dist/translations/catalog.js +0 -1
- package/dist/translations/index.d.ts +0 -45
- package/dist/translations/index.d.ts.map +0 -1
- package/dist/translations/index.js +0 -533
- package/dist/translations/registry.d.ts +0 -173
- package/dist/translations/registry.d.ts.map +0 -1
- package/dist/translations/registry.js +0 -170
- package/dist/translations/registry.test.d.ts +0 -2
- package/dist/translations/registry.test.d.ts.map +0 -1
- package/dist/translations/spec.d.ts +0 -154
- package/dist/translations/spec.d.ts.map +0 -1
- package/dist/translations/spec.js +0 -36
- package/dist/translations/spec.test.d.ts +0 -2
- package/dist/translations/spec.test.d.ts.map +0 -1
- package/dist/translations/tenant.d.ts +0 -12
- package/dist/translations/tenant.d.ts.map +0 -1
- package/dist/translations/tenant.js +0 -1
- package/dist/translations/validation.d.ts +0 -107
- package/dist/translations/validation.d.ts.map +0 -1
- package/dist/translations/validation.js +0 -392
- package/dist/translations/validation.test.d.ts +0 -2
- package/dist/translations/validation.test.d.ts.map +0 -1
- package/dist/types.d.ts +0 -213
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -1
- package/dist/versioning/index.d.ts +0 -10
- package/dist/versioning/index.d.ts.map +0 -1
- package/dist/versioning/index.js +0 -274
- package/dist/versioning/refs.d.ts +0 -177
- package/dist/versioning/refs.d.ts.map +0 -1
- package/dist/versioning/refs.js +0 -99
- package/dist/versioning/refs.test.d.ts +0 -5
- package/dist/versioning/refs.test.d.ts.map +0 -1
- package/dist/versioning/types.d.ts +0 -131
- package/dist/versioning/types.d.ts.map +0 -1
- package/dist/versioning/types.js +0 -55
- package/dist/versioning/utils.d.ts +0 -94
- package/dist/versioning/utils.d.ts.map +0 -1
- package/dist/versioning/utils.js +0 -184
- package/dist/versioning/utils.test.d.ts +0 -5
- package/dist/versioning/utils.test.d.ts.map +0 -1
- package/dist/workflow/adapters/db-adapter.d.ts +0 -44
- package/dist/workflow/adapters/db-adapter.d.ts.map +0 -1
- package/dist/workflow/adapters/db-adapter.js +0 -127
- package/dist/workflow/adapters/file-adapter.d.ts +0 -11
- package/dist/workflow/adapters/file-adapter.d.ts.map +0 -1
- package/dist/workflow/adapters/file-adapter.js +0 -38
- package/dist/workflow/adapters/index.d.ts +0 -4
- package/dist/workflow/adapters/index.d.ts.map +0 -1
- package/dist/workflow/adapters/index.js +0 -194
- package/dist/workflow/adapters/memory-store.d.ts +0 -14
- package/dist/workflow/adapters/memory-store.d.ts.map +0 -1
- package/dist/workflow/adapters/memory-store.js +0 -93
- package/dist/workflow/context.d.ts +0 -218
- package/dist/workflow/context.d.ts.map +0 -1
- package/dist/workflow/context.js +0 -247
- package/dist/workflow/context.test.d.ts +0 -2
- package/dist/workflow/context.test.d.ts.map +0 -1
- package/dist/workflow/expression.d.ts +0 -7
- package/dist/workflow/expression.d.ts.map +0 -1
- package/dist/workflow/expression.js +0 -157
- package/dist/workflow/expression.test.d.ts +0 -2
- package/dist/workflow/expression.test.d.ts.map +0 -1
- package/dist/workflow/index.d.ts +0 -14
- package/dist/workflow/index.d.ts.map +0 -1
- package/dist/workflow/index.js +0 -1546
- package/dist/workflow/overview.docblock.d.ts +0 -3
- package/dist/workflow/overview.docblock.d.ts.map +0 -1
- package/dist/workflow/overview.docblock.js +0 -164
- package/dist/workflow/runner.d.ts +0 -72
- package/dist/workflow/runner.d.ts.map +0 -1
- package/dist/workflow/runner.js +0 -532
- package/dist/workflow/runner.test.d.ts +0 -2
- package/dist/workflow/runner.test.d.ts.map +0 -1
- package/dist/workflow/sla-monitor.d.ts +0 -17
- package/dist/workflow/sla-monitor.d.ts.map +0 -1
- package/dist/workflow/sla-monitor.js +0 -84
- package/dist/workflow/spec.d.ts +0 -82
- package/dist/workflow/spec.d.ts.map +0 -1
- package/dist/workflow/spec.js +0 -221
- package/dist/workflow/state.d.ts +0 -32
- package/dist/workflow/state.d.ts.map +0 -1
- package/dist/workflow/state.js +0 -1
- package/dist/workflow/validation.d.ts +0 -88
- package/dist/workflow/validation.d.ts.map +0 -1
- package/dist/workflow/validation.js +0 -425
- package/dist/workflow/validation.test.d.ts +0 -2
- package/dist/workflow/validation.test.d.ts.map +0 -1
- package/dist/workspace-config/contractsrc-schema.d.ts +0 -145
- package/dist/workspace-config/contractsrc-schema.d.ts.map +0 -1
- package/dist/workspace-config/contractsrc-schema.js +0 -344
- package/dist/workspace-config/contractsrc-schema.test.d.ts +0 -2
- package/dist/workspace-config/contractsrc-schema.test.d.ts.map +0 -1
- package/dist/workspace-config/contractsrc-types.d.ts +0 -343
- package/dist/workspace-config/contractsrc-types.d.ts.map +0 -1
- package/dist/workspace-config/contractsrc-types.js +0 -1
- package/dist/workspace-config/index.d.ts +0 -6
- package/dist/workspace-config/index.d.ts.map +0 -1
- package/dist/workspace-config/index.js +0 -325
- package/dist/workspace-config/workspace-config.docblock.d.ts +0 -3
- package/dist/workspace-config/workspace-config.docblock.d.ts.map +0 -1
- package/dist/workspace-config/workspace-config.docblock.js +0 -188
package/dist/app-config/index.js
DELETED
|
@@ -1,3113 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
7
|
-
var __toCommonJS = (from) => {
|
|
8
|
-
var entry = __moduleCache.get(from), desc;
|
|
9
|
-
if (entry)
|
|
10
|
-
return entry;
|
|
11
|
-
entry = __defProp({}, "__esModule", { value: true });
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
13
|
-
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
14
|
-
get: () => from[key],
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
}));
|
|
17
|
-
__moduleCache.set(from, entry);
|
|
18
|
-
return entry;
|
|
19
|
-
};
|
|
20
|
-
var __export = (target, all) => {
|
|
21
|
-
for (var name in all)
|
|
22
|
-
__defProp(target, name, {
|
|
23
|
-
get: all[name],
|
|
24
|
-
enumerable: true,
|
|
25
|
-
configurable: true,
|
|
26
|
-
set: (newValue) => all[name] = () => newValue
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
30
|
-
var __require = import.meta.require;
|
|
31
|
-
|
|
32
|
-
// src/registry-utils.ts
|
|
33
|
-
var exports_registry_utils = {};
|
|
34
|
-
__export(exports_registry_utils, {
|
|
35
|
-
groupByToArray: () => groupByToArray,
|
|
36
|
-
groupByMultiple: () => groupByMultiple,
|
|
37
|
-
groupBy: () => groupBy,
|
|
38
|
-
getUniqueTags: () => getUniqueTags,
|
|
39
|
-
getUniqueOwners: () => getUniqueOwners,
|
|
40
|
-
getUniqueDomains: () => getUniqueDomains,
|
|
41
|
-
filterBy: () => filterBy,
|
|
42
|
-
GroupingStrategies: () => GroupingStrategies
|
|
43
|
-
});
|
|
44
|
-
function filterBy(items, filter) {
|
|
45
|
-
return items.filter((item) => {
|
|
46
|
-
if (filter.tags?.length) {
|
|
47
|
-
const hasMatchingTag = filter.tags.some((tag) => item.meta.tags?.includes(tag));
|
|
48
|
-
if (!hasMatchingTag)
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
if (filter.owners?.length) {
|
|
52
|
-
const hasMatchingOwner = filter.owners.some((owner) => item.meta.owners?.includes(owner));
|
|
53
|
-
if (!hasMatchingOwner)
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
if (filter.stability?.length) {
|
|
57
|
-
if (!filter.stability.includes(item.meta.stability ?? "stable")) {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
if (filter.domain) {
|
|
62
|
-
const itemDomain = GroupingStrategies.byDomain(item);
|
|
63
|
-
if (itemDomain !== filter.domain)
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
if (filter.keyPattern) {
|
|
67
|
-
const name = item.meta.key ?? item.meta.key ?? "";
|
|
68
|
-
const pattern = filter.keyPattern.replace(/\*/g, ".*").replace(/\?/g, ".");
|
|
69
|
-
const regex = new RegExp(`^${pattern}$`, "i");
|
|
70
|
-
if (!regex.test(name))
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
return true;
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function groupBy(items, keyFn) {
|
|
77
|
-
const groups = new Map;
|
|
78
|
-
for (const item of items) {
|
|
79
|
-
const key = keyFn(item);
|
|
80
|
-
const existing = groups.get(key);
|
|
81
|
-
if (existing) {
|
|
82
|
-
existing.push(item);
|
|
83
|
-
} else {
|
|
84
|
-
groups.set(key, [item]);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
return groups;
|
|
88
|
-
}
|
|
89
|
-
function groupByToArray(items, keyFn) {
|
|
90
|
-
const map = groupBy(items, keyFn);
|
|
91
|
-
return Array.from(map.entries()).map(([key, items2]) => ({ key, items: items2 }));
|
|
92
|
-
}
|
|
93
|
-
function groupByMultiple(items, keysFn) {
|
|
94
|
-
const groups = new Map;
|
|
95
|
-
for (const item of items) {
|
|
96
|
-
const keys = keysFn(item);
|
|
97
|
-
for (const key of keys) {
|
|
98
|
-
const existing = groups.get(key);
|
|
99
|
-
if (existing) {
|
|
100
|
-
existing.push(item);
|
|
101
|
-
} else {
|
|
102
|
-
groups.set(key, [item]);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return groups;
|
|
107
|
-
}
|
|
108
|
-
function getUniqueTags(items) {
|
|
109
|
-
const tags = new Set;
|
|
110
|
-
for (const item of items) {
|
|
111
|
-
for (const tag of item.meta.tags ?? []) {
|
|
112
|
-
tags.add(tag);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
return Array.from(tags).sort();
|
|
116
|
-
}
|
|
117
|
-
function getUniqueOwners(items) {
|
|
118
|
-
const owners = new Set;
|
|
119
|
-
for (const item of items) {
|
|
120
|
-
for (const owner of item.meta.owners ?? []) {
|
|
121
|
-
owners.add(owner);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return Array.from(owners).sort();
|
|
125
|
-
}
|
|
126
|
-
function getUniqueDomains(items) {
|
|
127
|
-
const domains = new Set;
|
|
128
|
-
for (const item of items) {
|
|
129
|
-
domains.add(GroupingStrategies.byDomain(item));
|
|
130
|
-
}
|
|
131
|
-
return Array.from(domains).sort();
|
|
132
|
-
}
|
|
133
|
-
var GroupingStrategies;
|
|
134
|
-
var init_registry_utils = __esm(() => {
|
|
135
|
-
GroupingStrategies = {
|
|
136
|
-
byTag: (item) => item.meta.tags?.[0] ?? "untagged",
|
|
137
|
-
byAllTags: (item) => item.meta.tags?.length ? item.meta.tags : ["untagged"],
|
|
138
|
-
byOwner: (item) => item.meta.owners?.[0] ?? "unowned",
|
|
139
|
-
byDomain: (item) => {
|
|
140
|
-
const name = item.meta.key ?? item.meta.key ?? "";
|
|
141
|
-
return name.split(".")[0] ?? "default";
|
|
142
|
-
},
|
|
143
|
-
byStability: (item) => item.meta.stability ?? "stable",
|
|
144
|
-
byUrlPath: (level) => (item) => {
|
|
145
|
-
if (!item.path)
|
|
146
|
-
return "root";
|
|
147
|
-
const segments = item.path.split("/").filter(Boolean);
|
|
148
|
-
return segments.slice(0, level).join("/") || "root";
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
// src/capabilities/capabilities.ts
|
|
154
|
-
import { compareVersions } from "compare-versions";
|
|
155
|
-
var capKey = (key, version) => `${key}.v${version}`;
|
|
156
|
-
|
|
157
|
-
class CapabilityRegistry {
|
|
158
|
-
items = new Map;
|
|
159
|
-
surfaceIndex = null;
|
|
160
|
-
register(spec) {
|
|
161
|
-
const key = capKey(spec.meta.key, spec.meta.version);
|
|
162
|
-
if (this.items.has(key))
|
|
163
|
-
throw new Error(`Duplicate capability ${key}`);
|
|
164
|
-
this.items.set(key, spec);
|
|
165
|
-
this.surfaceIndex = null;
|
|
166
|
-
return this;
|
|
167
|
-
}
|
|
168
|
-
list() {
|
|
169
|
-
return [...this.items.values()];
|
|
170
|
-
}
|
|
171
|
-
get(key, version) {
|
|
172
|
-
if (version != null)
|
|
173
|
-
return this.items.get(capKey(key, version));
|
|
174
|
-
let candidate;
|
|
175
|
-
for (const spec of this.items.values()) {
|
|
176
|
-
if (spec.meta.key !== key)
|
|
177
|
-
continue;
|
|
178
|
-
if (!candidate || compareVersions(spec.meta.version, candidate.meta.version) > 0) {
|
|
179
|
-
candidate = spec;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
return candidate;
|
|
183
|
-
}
|
|
184
|
-
satisfies(requirement, additional) {
|
|
185
|
-
if (requirement.optional)
|
|
186
|
-
return true;
|
|
187
|
-
if (additional?.some((ref) => matchesRequirement(ref, requirement)))
|
|
188
|
-
return true;
|
|
189
|
-
const spec = requirement.version ? this.get(requirement.key, requirement.version) : this.get(requirement.key);
|
|
190
|
-
if (!spec)
|
|
191
|
-
return false;
|
|
192
|
-
if (requirement.kind && spec.meta.kind !== requirement.kind)
|
|
193
|
-
return false;
|
|
194
|
-
if (requirement.version != null && spec.meta.version !== requirement.version)
|
|
195
|
-
return false;
|
|
196
|
-
return true;
|
|
197
|
-
}
|
|
198
|
-
buildSurfaceIndex() {
|
|
199
|
-
if (this.surfaceIndex)
|
|
200
|
-
return this.surfaceIndex;
|
|
201
|
-
this.surfaceIndex = new Map;
|
|
202
|
-
for (const spec of this.items.values()) {
|
|
203
|
-
const capabilityKey = capKey(spec.meta.key, spec.meta.version);
|
|
204
|
-
for (const surface of spec.provides ?? []) {
|
|
205
|
-
const surfaceKey = `${surface.surface}:${surface.key}`;
|
|
206
|
-
if (!this.surfaceIndex.has(surfaceKey)) {
|
|
207
|
-
this.surfaceIndex.set(surfaceKey, new Set);
|
|
208
|
-
}
|
|
209
|
-
this.surfaceIndex.get(surfaceKey)?.add(capabilityKey);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
return this.surfaceIndex;
|
|
213
|
-
}
|
|
214
|
-
getOperationsFor(capabilityKey, version) {
|
|
215
|
-
const spec = this.get(capabilityKey, version);
|
|
216
|
-
if (!spec)
|
|
217
|
-
return [];
|
|
218
|
-
return spec.provides?.filter((s) => s.surface === "operation").map((s) => s.key) ?? [];
|
|
219
|
-
}
|
|
220
|
-
getEventsFor(capabilityKey, version) {
|
|
221
|
-
const spec = this.get(capabilityKey, version);
|
|
222
|
-
if (!spec)
|
|
223
|
-
return [];
|
|
224
|
-
return spec.provides?.filter((s) => s.surface === "event").map((s) => s.key) ?? [];
|
|
225
|
-
}
|
|
226
|
-
getPresentationsFor(capabilityKey, version) {
|
|
227
|
-
const spec = this.get(capabilityKey, version);
|
|
228
|
-
if (!spec)
|
|
229
|
-
return [];
|
|
230
|
-
return spec.provides?.filter((s) => s.surface === "presentation").map((s) => s.key) ?? [];
|
|
231
|
-
}
|
|
232
|
-
getWorkflowsFor(capabilityKey, version) {
|
|
233
|
-
const spec = this.get(capabilityKey, version);
|
|
234
|
-
if (!spec)
|
|
235
|
-
return [];
|
|
236
|
-
return spec.provides?.filter((s) => s.surface === "workflow").map((s) => s.key) ?? [];
|
|
237
|
-
}
|
|
238
|
-
getResourcesFor(capabilityKey, version) {
|
|
239
|
-
const spec = this.get(capabilityKey, version);
|
|
240
|
-
if (!spec)
|
|
241
|
-
return [];
|
|
242
|
-
return spec.provides?.filter((s) => s.surface === "resource").map((s) => s.key) ?? [];
|
|
243
|
-
}
|
|
244
|
-
getCapabilitiesForOperation(operationKey) {
|
|
245
|
-
const index = this.buildSurfaceIndex();
|
|
246
|
-
const capKeys = index.get(`operation:${operationKey}`);
|
|
247
|
-
if (!capKeys)
|
|
248
|
-
return [];
|
|
249
|
-
return [...capKeys].map((k) => {
|
|
250
|
-
const spec = this.items.get(k);
|
|
251
|
-
return { key: spec?.meta.key ?? "", version: spec?.meta.version ?? "" };
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
getCapabilitiesForEvent(eventKey) {
|
|
255
|
-
const index = this.buildSurfaceIndex();
|
|
256
|
-
const capKeys = index.get(`event:${eventKey}`);
|
|
257
|
-
if (!capKeys)
|
|
258
|
-
return [];
|
|
259
|
-
return [...capKeys].map((k) => {
|
|
260
|
-
const spec = this.items.get(k);
|
|
261
|
-
return { key: spec?.meta.key ?? "", version: spec?.meta.version ?? "" };
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
getCapabilitiesForPresentation(presentationKey) {
|
|
265
|
-
const index = this.buildSurfaceIndex();
|
|
266
|
-
const capKeys = index.get(`presentation:${presentationKey}`);
|
|
267
|
-
if (!capKeys)
|
|
268
|
-
return [];
|
|
269
|
-
return [...capKeys].map((k) => {
|
|
270
|
-
const spec = this.items.get(k);
|
|
271
|
-
return { key: spec?.meta.key ?? "", version: spec?.meta.version ?? "" };
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
getAncestors(capabilityKey, version) {
|
|
275
|
-
const ancestors = [];
|
|
276
|
-
const visited = new Set;
|
|
277
|
-
let current = this.get(capabilityKey, version);
|
|
278
|
-
while (current?.extends) {
|
|
279
|
-
const parentKey = capKey(current.extends.key, current.extends.version);
|
|
280
|
-
if (visited.has(parentKey)) {
|
|
281
|
-
break;
|
|
282
|
-
}
|
|
283
|
-
visited.add(parentKey);
|
|
284
|
-
const parent = this.get(current.extends.key, current.extends.version);
|
|
285
|
-
if (!parent)
|
|
286
|
-
break;
|
|
287
|
-
ancestors.push(parent);
|
|
288
|
-
current = parent;
|
|
289
|
-
}
|
|
290
|
-
return ancestors;
|
|
291
|
-
}
|
|
292
|
-
getEffectiveRequirements(capabilityKey, version) {
|
|
293
|
-
const spec = this.get(capabilityKey, version);
|
|
294
|
-
if (!spec)
|
|
295
|
-
return [];
|
|
296
|
-
const ancestors = this.getAncestors(capabilityKey, version);
|
|
297
|
-
const requirementMap = new Map;
|
|
298
|
-
for (const ancestor of [...ancestors].reverse()) {
|
|
299
|
-
for (const req of ancestor.requires ?? []) {
|
|
300
|
-
requirementMap.set(req.key, req);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
for (const req of spec.requires ?? []) {
|
|
304
|
-
requirementMap.set(req.key, req);
|
|
305
|
-
}
|
|
306
|
-
return [...requirementMap.values()];
|
|
307
|
-
}
|
|
308
|
-
getEffectiveSurfaces(capabilityKey, version) {
|
|
309
|
-
const spec = this.get(capabilityKey, version);
|
|
310
|
-
if (!spec)
|
|
311
|
-
return [];
|
|
312
|
-
const ancestors = this.getAncestors(capabilityKey, version);
|
|
313
|
-
const surfaces = [];
|
|
314
|
-
for (const ancestor of [...ancestors].reverse()) {
|
|
315
|
-
surfaces.push(...ancestor.provides ?? []);
|
|
316
|
-
}
|
|
317
|
-
surfaces.push(...spec.provides ?? []);
|
|
318
|
-
return surfaces;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
function matchesRequirement(ref, requirement) {
|
|
322
|
-
if (ref.key !== requirement.key)
|
|
323
|
-
return false;
|
|
324
|
-
if (requirement.version != null && ref.version !== requirement.version)
|
|
325
|
-
return false;
|
|
326
|
-
return true;
|
|
327
|
-
}
|
|
328
|
-
function capabilityKey(spec) {
|
|
329
|
-
return capKey(spec.meta.key, spec.meta.version);
|
|
330
|
-
}
|
|
331
|
-
function defineCapability(spec) {
|
|
332
|
-
return spec;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
// src/capabilities/validation.ts
|
|
336
|
-
function validateCapabilityConsistency(deps) {
|
|
337
|
-
const errors = [];
|
|
338
|
-
const warnings = [];
|
|
339
|
-
for (const capability of deps.capabilities.list()) {
|
|
340
|
-
const capKey2 = `${capability.meta.key}.v${capability.meta.version}`;
|
|
341
|
-
for (const surface of capability.provides ?? []) {
|
|
342
|
-
const exists = checkSurfaceExists(deps, surface.surface, surface.key);
|
|
343
|
-
if (!exists) {
|
|
344
|
-
errors.push({
|
|
345
|
-
type: "missing_surface_spec",
|
|
346
|
-
message: `Capability "${capKey2}" provides ${surface.surface} "${surface.key}" but spec not found`,
|
|
347
|
-
capabilityKey: capKey2,
|
|
348
|
-
surface: surface.surface,
|
|
349
|
-
specKey: surface.key
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
if (deps.operations) {
|
|
355
|
-
for (const op of deps.operations.list()) {
|
|
356
|
-
if (op.capability) {
|
|
357
|
-
const capSpec = deps.capabilities.get(op.capability.key, op.capability.version);
|
|
358
|
-
if (!capSpec) {
|
|
359
|
-
errors.push({
|
|
360
|
-
type: "capability_not_found",
|
|
361
|
-
message: `Operation "${op.meta.key}" references capability "${op.capability.key}.v${op.capability.version}" but capability not found`,
|
|
362
|
-
specKey: op.meta.key,
|
|
363
|
-
capabilityKey: `${op.capability.key}.v${op.capability.version}`,
|
|
364
|
-
surface: "operation"
|
|
365
|
-
});
|
|
366
|
-
} else {
|
|
367
|
-
const inProvides = capSpec.provides?.some((p) => p.surface === "operation" && p.key === op.meta.key);
|
|
368
|
-
if (!inProvides) {
|
|
369
|
-
errors.push({
|
|
370
|
-
type: "surface_not_in_provides",
|
|
371
|
-
message: `Operation "${op.meta.key}" claims capability "${op.capability.key}.v${op.capability.version}" but not in capability's provides`,
|
|
372
|
-
specKey: op.meta.key,
|
|
373
|
-
capabilityKey: `${op.capability.key}.v${op.capability.version}`,
|
|
374
|
-
surface: "operation"
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
if (deps.events) {
|
|
382
|
-
for (const event of deps.events.list()) {
|
|
383
|
-
if (event.capability) {
|
|
384
|
-
const capSpec = deps.capabilities.get(event.capability.key, event.capability.version);
|
|
385
|
-
if (!capSpec) {
|
|
386
|
-
errors.push({
|
|
387
|
-
type: "capability_not_found",
|
|
388
|
-
message: `Event "${event.meta.key}" references capability "${event.capability.key}.v${event.capability.version}" but capability not found`,
|
|
389
|
-
specKey: event.meta.key,
|
|
390
|
-
capabilityKey: `${event.capability.key}.v${event.capability.version}`,
|
|
391
|
-
surface: "event"
|
|
392
|
-
});
|
|
393
|
-
} else {
|
|
394
|
-
const inProvides = capSpec.provides?.some((p) => p.surface === "event" && p.key === event.meta.key);
|
|
395
|
-
if (!inProvides) {
|
|
396
|
-
errors.push({
|
|
397
|
-
type: "surface_not_in_provides",
|
|
398
|
-
message: `Event "${event.meta.key}" claims capability "${event.capability.key}.v${event.capability.version}" but not in capability's provides`,
|
|
399
|
-
specKey: event.meta.key,
|
|
400
|
-
capabilityKey: `${event.capability.key}.v${event.capability.version}`,
|
|
401
|
-
surface: "event"
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
if (deps.presentations) {
|
|
409
|
-
for (const pres of deps.presentations.list()) {
|
|
410
|
-
if (pres.capability) {
|
|
411
|
-
const capSpec = deps.capabilities.get(pres.capability.key, pres.capability.version);
|
|
412
|
-
if (!capSpec) {
|
|
413
|
-
errors.push({
|
|
414
|
-
type: "capability_not_found",
|
|
415
|
-
message: `Presentation "${pres.meta.key}" references capability "${pres.capability.key}.v${pres.capability.version}" but capability not found`,
|
|
416
|
-
specKey: pres.meta.key,
|
|
417
|
-
capabilityKey: `${pres.capability.key}.v${pres.capability.version}`,
|
|
418
|
-
surface: "presentation"
|
|
419
|
-
});
|
|
420
|
-
} else {
|
|
421
|
-
const inProvides = capSpec.provides?.some((p) => p.surface === "presentation" && p.key === pres.meta.key);
|
|
422
|
-
if (!inProvides) {
|
|
423
|
-
errors.push({
|
|
424
|
-
type: "surface_not_in_provides",
|
|
425
|
-
message: `Presentation "${pres.meta.key}" claims capability "${pres.capability.key}.v${pres.capability.version}" but not in capability's provides`,
|
|
426
|
-
specKey: pres.meta.key,
|
|
427
|
-
capabilityKey: `${pres.capability.key}.v${pres.capability.version}`,
|
|
428
|
-
surface: "presentation"
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
return {
|
|
436
|
-
valid: errors.length === 0,
|
|
437
|
-
errors,
|
|
438
|
-
warnings
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
function checkSurfaceExists(deps, surface, key) {
|
|
442
|
-
switch (surface) {
|
|
443
|
-
case "operation":
|
|
444
|
-
return deps.operations?.has(key) ?? true;
|
|
445
|
-
case "event":
|
|
446
|
-
return deps.events?.has(key) ?? true;
|
|
447
|
-
case "presentation":
|
|
448
|
-
return deps.presentations?.has(key) ?? true;
|
|
449
|
-
case "workflow":
|
|
450
|
-
case "resource":
|
|
451
|
-
return true;
|
|
452
|
-
default:
|
|
453
|
-
return true;
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
function findOrphanSpecs(deps) {
|
|
457
|
-
const result = {
|
|
458
|
-
operations: [],
|
|
459
|
-
events: [],
|
|
460
|
-
presentations: []
|
|
461
|
-
};
|
|
462
|
-
if (deps.operations) {
|
|
463
|
-
for (const op of deps.operations.list()) {
|
|
464
|
-
if (!op.capability) {
|
|
465
|
-
result.operations.push(op.meta.key);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
if (deps.events) {
|
|
470
|
-
for (const event of deps.events.list()) {
|
|
471
|
-
if (!event.capability) {
|
|
472
|
-
result.events.push(event.meta.key);
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
if (deps.presentations) {
|
|
477
|
-
for (const pres of deps.presentations.list()) {
|
|
478
|
-
if (!pres.capability) {
|
|
479
|
-
result.presentations.push(pres.meta.key);
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
return result;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
// src/capabilities/context.ts
|
|
487
|
-
class CapabilityMissingError extends Error {
|
|
488
|
-
capabilityKey;
|
|
489
|
-
requiredVersion;
|
|
490
|
-
constructor(capabilityKey2, requiredVersion) {
|
|
491
|
-
const versionSuffix = requiredVersion ? `.v${requiredVersion}` : "";
|
|
492
|
-
super(`Missing required capability: ${capabilityKey2}${versionSuffix}`);
|
|
493
|
-
this.name = "CapabilityMissingError";
|
|
494
|
-
this.capabilityKey = capabilityKey2;
|
|
495
|
-
this.requiredVersion = requiredVersion;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
class CapabilityContextImpl {
|
|
500
|
-
capabilities;
|
|
501
|
-
capabilityVersions;
|
|
502
|
-
constructor(enabledCapabilities) {
|
|
503
|
-
const capSet = new Set;
|
|
504
|
-
const versionMap = new Map;
|
|
505
|
-
for (const cap of enabledCapabilities) {
|
|
506
|
-
capSet.add(cap.key);
|
|
507
|
-
versionMap.set(cap.key, cap.version);
|
|
508
|
-
}
|
|
509
|
-
this.capabilities = capSet;
|
|
510
|
-
this.capabilityVersions = versionMap;
|
|
511
|
-
}
|
|
512
|
-
hasCapability(key, version) {
|
|
513
|
-
if (!this.capabilities.has(key))
|
|
514
|
-
return false;
|
|
515
|
-
if (version != null) {
|
|
516
|
-
const enabledVersion = this.capabilityVersions.get(key);
|
|
517
|
-
return enabledVersion === version;
|
|
518
|
-
}
|
|
519
|
-
return true;
|
|
520
|
-
}
|
|
521
|
-
requireCapability(key, version) {
|
|
522
|
-
if (!this.hasCapability(key, version)) {
|
|
523
|
-
throw new CapabilityMissingError(key, version);
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
hasAllCapabilities(keys) {
|
|
527
|
-
return keys.every((k) => this.capabilities.has(k));
|
|
528
|
-
}
|
|
529
|
-
hasAnyCapability(keys) {
|
|
530
|
-
return keys.some((k) => this.capabilities.has(k));
|
|
531
|
-
}
|
|
532
|
-
getMatchingCapabilities(pattern) {
|
|
533
|
-
if (!pattern.includes("*")) {
|
|
534
|
-
return this.capabilities.has(pattern) ? [pattern] : [];
|
|
535
|
-
}
|
|
536
|
-
const regexPattern = pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*");
|
|
537
|
-
const regex = new RegExp(`^${regexPattern}$`);
|
|
538
|
-
return [...this.capabilities].filter((key) => regex.test(key));
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
function createCapabilityContext(enabledCapabilities) {
|
|
542
|
-
return new CapabilityContextImpl(enabledCapabilities);
|
|
543
|
-
}
|
|
544
|
-
function createEmptyCapabilityContext() {
|
|
545
|
-
return new CapabilityContextImpl([]);
|
|
546
|
-
}
|
|
547
|
-
function createBypassCapabilityContext(allCapabilities) {
|
|
548
|
-
return new CapabilityContextImpl(allCapabilities);
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
// src/capabilities/guards.ts
|
|
552
|
-
function checkCapabilityForOperation(ctx, operation) {
|
|
553
|
-
if (!operation.capability) {
|
|
554
|
-
return { allowed: true };
|
|
555
|
-
}
|
|
556
|
-
const { key, version } = operation.capability;
|
|
557
|
-
if (ctx.hasCapability(key, version)) {
|
|
558
|
-
return { allowed: true };
|
|
559
|
-
}
|
|
560
|
-
return {
|
|
561
|
-
allowed: false,
|
|
562
|
-
missingCapability: { key, version },
|
|
563
|
-
reason: `Operation "${operation.meta.key}" requires capability "${key}.v${version}"`
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
function assertCapabilityForOperation(ctx, operation) {
|
|
567
|
-
const result = checkCapabilityForOperation(ctx, operation);
|
|
568
|
-
if (!result.allowed && result.missingCapability) {
|
|
569
|
-
throw new CapabilityMissingError(result.missingCapability.key, result.missingCapability.version);
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
function checkCapabilityForEvent(ctx, event) {
|
|
573
|
-
if (!event.capability) {
|
|
574
|
-
return { allowed: true };
|
|
575
|
-
}
|
|
576
|
-
const { key, version } = event.capability;
|
|
577
|
-
if (ctx.hasCapability(key, version)) {
|
|
578
|
-
return { allowed: true };
|
|
579
|
-
}
|
|
580
|
-
return {
|
|
581
|
-
allowed: false,
|
|
582
|
-
missingCapability: { key, version },
|
|
583
|
-
reason: `Event "${event.meta.key}" requires capability "${key}.v${version}"`
|
|
584
|
-
};
|
|
585
|
-
}
|
|
586
|
-
function assertCapabilityForEvent(ctx, event) {
|
|
587
|
-
const result = checkCapabilityForEvent(ctx, event);
|
|
588
|
-
if (!result.allowed && result.missingCapability) {
|
|
589
|
-
throw new CapabilityMissingError(result.missingCapability.key, result.missingCapability.version);
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
function checkCapabilityForPresentation(ctx, presentation) {
|
|
593
|
-
if (!presentation.capability) {
|
|
594
|
-
return { allowed: true };
|
|
595
|
-
}
|
|
596
|
-
const { key, version } = presentation.capability;
|
|
597
|
-
if (ctx.hasCapability(key, version)) {
|
|
598
|
-
return { allowed: true };
|
|
599
|
-
}
|
|
600
|
-
return {
|
|
601
|
-
allowed: false,
|
|
602
|
-
missingCapability: { key, version },
|
|
603
|
-
reason: `Presentation "${presentation.meta.key}" requires capability "${key}.v${version}"`
|
|
604
|
-
};
|
|
605
|
-
}
|
|
606
|
-
function assertCapabilityForPresentation(ctx, presentation) {
|
|
607
|
-
const result = checkCapabilityForPresentation(ctx, presentation);
|
|
608
|
-
if (!result.allowed && result.missingCapability) {
|
|
609
|
-
throw new CapabilityMissingError(result.missingCapability.key, result.missingCapability.version);
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
function filterOperationsByCapability(ctx, operations) {
|
|
613
|
-
return operations.filter((op) => checkCapabilityForOperation(ctx, op).allowed);
|
|
614
|
-
}
|
|
615
|
-
function filterEventsByCapability(ctx, events) {
|
|
616
|
-
return events.filter((ev) => checkCapabilityForEvent(ctx, ev).allowed);
|
|
617
|
-
}
|
|
618
|
-
function filterPresentationsByCapability(ctx, presentations) {
|
|
619
|
-
return presentations.filter((pres) => checkCapabilityForPresentation(ctx, pres).allowed);
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
// src/ownership.ts
|
|
623
|
-
var StabilityEnum = {
|
|
624
|
-
Idea: "idea",
|
|
625
|
-
InCreation: "in_creation",
|
|
626
|
-
Experimental: "experimental",
|
|
627
|
-
Beta: "beta",
|
|
628
|
-
Stable: "stable",
|
|
629
|
-
Deprecated: "deprecated"
|
|
630
|
-
};
|
|
631
|
-
var OwnersEnum = {
|
|
632
|
-
PlatformCore: "platform.core",
|
|
633
|
-
PlatformSigil: "platform.sigil",
|
|
634
|
-
PlatformMarketplace: "platform.marketplace",
|
|
635
|
-
PlatformMessaging: "platform.messaging",
|
|
636
|
-
PlatformContent: "platform.content",
|
|
637
|
-
PlatformFeatureFlags: "platform.featureflags",
|
|
638
|
-
PlatformFinance: "platform.finance"
|
|
639
|
-
};
|
|
640
|
-
var Owners = OwnersEnum;
|
|
641
|
-
var TagsEnum = {
|
|
642
|
-
Spots: "spots",
|
|
643
|
-
Collectivity: "collectivity",
|
|
644
|
-
Marketplace: "marketplace",
|
|
645
|
-
Sellers: "sellers",
|
|
646
|
-
Auth: "auth",
|
|
647
|
-
Login: "login",
|
|
648
|
-
Signup: "signup",
|
|
649
|
-
Guide: "guide",
|
|
650
|
-
Docs: "docs",
|
|
651
|
-
I18n: "i18n",
|
|
652
|
-
Incident: "incident",
|
|
653
|
-
Automation: "automation",
|
|
654
|
-
Hygiene: "hygiene"
|
|
655
|
-
};
|
|
656
|
-
var Tags = TagsEnum;
|
|
657
|
-
|
|
658
|
-
// src/capabilities/openbanking.ts
|
|
659
|
-
var OWNERS = ["platform.finance"];
|
|
660
|
-
var TAGS = ["open-banking", "finance"];
|
|
661
|
-
var openBankingAccountsReadCapability = {
|
|
662
|
-
meta: {
|
|
663
|
-
key: "openbanking.accounts.read",
|
|
664
|
-
version: "1.0.0",
|
|
665
|
-
kind: "integration",
|
|
666
|
-
title: "Open Banking Accounts (Read)",
|
|
667
|
-
description: "Provides read-only access to linked bank accounts, including account summaries and metadata.",
|
|
668
|
-
domain: "finance",
|
|
669
|
-
owners: [...OWNERS],
|
|
670
|
-
tags: [...TAGS],
|
|
671
|
-
stability: StabilityEnum.Experimental
|
|
672
|
-
},
|
|
673
|
-
provides: [
|
|
674
|
-
{
|
|
675
|
-
surface: "operation",
|
|
676
|
-
key: "openbanking.accounts.list",
|
|
677
|
-
version: "1.0.0",
|
|
678
|
-
description: "List bank accounts linked to a Powens open banking connection."
|
|
679
|
-
},
|
|
680
|
-
{
|
|
681
|
-
surface: "operation",
|
|
682
|
-
key: "openbanking.accounts.get",
|
|
683
|
-
version: "1.0.0",
|
|
684
|
-
description: "Retrieve the canonical bank account record for a specific account."
|
|
685
|
-
},
|
|
686
|
-
{
|
|
687
|
-
surface: "operation",
|
|
688
|
-
key: "openbanking.accounts.sync",
|
|
689
|
-
version: "1.0.0",
|
|
690
|
-
description: "Trigger a refresh of bank account metadata from the open banking provider."
|
|
691
|
-
}
|
|
692
|
-
]
|
|
693
|
-
};
|
|
694
|
-
var openBankingTransactionsReadCapability = {
|
|
695
|
-
meta: {
|
|
696
|
-
key: "openbanking.transactions.read",
|
|
697
|
-
version: "1.0.0",
|
|
698
|
-
kind: "integration",
|
|
699
|
-
title: "Open Banking Transactions (Read)",
|
|
700
|
-
description: "Enables retrieval of transaction history for linked bank accounts via open banking providers.",
|
|
701
|
-
domain: "finance",
|
|
702
|
-
owners: [...OWNERS],
|
|
703
|
-
tags: [...TAGS, "transactions"],
|
|
704
|
-
stability: StabilityEnum.Experimental
|
|
705
|
-
},
|
|
706
|
-
provides: [
|
|
707
|
-
{
|
|
708
|
-
surface: "operation",
|
|
709
|
-
key: "openbanking.transactions.list",
|
|
710
|
-
version: "1.0.0",
|
|
711
|
-
description: "List transactions for a given bank account with optional date filtering."
|
|
712
|
-
},
|
|
713
|
-
{
|
|
714
|
-
surface: "operation",
|
|
715
|
-
key: "openbanking.transactions.sync",
|
|
716
|
-
version: "1.0.0",
|
|
717
|
-
description: "Synchronise transactions from the open banking provider into the canonical ledger."
|
|
718
|
-
}
|
|
719
|
-
]
|
|
720
|
-
};
|
|
721
|
-
var openBankingBalancesReadCapability = {
|
|
722
|
-
meta: {
|
|
723
|
-
key: "openbanking.balances.read",
|
|
724
|
-
version: "1.0.0",
|
|
725
|
-
kind: "integration",
|
|
726
|
-
title: "Open Banking Balances (Read)",
|
|
727
|
-
description: "Allows querying of current and available balances for linked bank accounts via open banking providers.",
|
|
728
|
-
domain: "finance",
|
|
729
|
-
owners: [...OWNERS],
|
|
730
|
-
tags: [...TAGS, "balances"],
|
|
731
|
-
stability: StabilityEnum.Experimental
|
|
732
|
-
},
|
|
733
|
-
provides: [
|
|
734
|
-
{
|
|
735
|
-
surface: "operation",
|
|
736
|
-
key: "openbanking.balances.get",
|
|
737
|
-
version: "1.0.0",
|
|
738
|
-
description: "Retrieve the latest known balances for a specified bank account."
|
|
739
|
-
},
|
|
740
|
-
{
|
|
741
|
-
surface: "operation",
|
|
742
|
-
key: "openbanking.balances.refresh",
|
|
743
|
-
version: "1.0.0",
|
|
744
|
-
description: "Force a balance refresh from the open banking provider."
|
|
745
|
-
}
|
|
746
|
-
]
|
|
747
|
-
};
|
|
748
|
-
function registerOpenBankingCapabilities(registry) {
|
|
749
|
-
return registry.register(openBankingAccountsReadCapability).register(openBankingTransactionsReadCapability).register(openBankingBalancesReadCapability);
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
// src/capabilities/meeting-recorder.ts
|
|
753
|
-
var OWNERS2 = ["platform.integrations"];
|
|
754
|
-
var TAGS2 = ["meeting-recorder", "transcripts", "integrations"];
|
|
755
|
-
var meetingRecorderMeetingsReadCapability = {
|
|
756
|
-
meta: {
|
|
757
|
-
key: "meeting-recorder.meetings.read",
|
|
758
|
-
version: "1.0.0",
|
|
759
|
-
kind: "integration",
|
|
760
|
-
title: "Meeting Recorder Meetings (Read)",
|
|
761
|
-
description: "Provides read-only access to recorded meetings and their metadata.",
|
|
762
|
-
domain: "integrations",
|
|
763
|
-
owners: [...OWNERS2],
|
|
764
|
-
tags: [...TAGS2, "meetings"],
|
|
765
|
-
stability: StabilityEnum.Experimental
|
|
766
|
-
},
|
|
767
|
-
provides: [
|
|
768
|
-
{
|
|
769
|
-
surface: "operation",
|
|
770
|
-
key: "meeting-recorder.meetings.list",
|
|
771
|
-
version: "1.0.0",
|
|
772
|
-
description: "List meetings available from the recorder provider."
|
|
773
|
-
},
|
|
774
|
-
{
|
|
775
|
-
surface: "operation",
|
|
776
|
-
key: "meeting-recorder.meetings.get",
|
|
777
|
-
version: "1.0.0",
|
|
778
|
-
description: "Fetch detailed metadata for a specific meeting."
|
|
779
|
-
}
|
|
780
|
-
]
|
|
781
|
-
};
|
|
782
|
-
var meetingRecorderTranscriptsReadCapability = {
|
|
783
|
-
meta: {
|
|
784
|
-
key: "meeting-recorder.transcripts.read",
|
|
785
|
-
version: "1.0.0",
|
|
786
|
-
kind: "integration",
|
|
787
|
-
title: "Meeting Recorder Transcripts (Read)",
|
|
788
|
-
description: "Enables retrieval of transcripts for recorded meetings from external providers.",
|
|
789
|
-
domain: "integrations",
|
|
790
|
-
owners: [...OWNERS2],
|
|
791
|
-
tags: [...TAGS2, "transcripts"],
|
|
792
|
-
stability: StabilityEnum.Experimental
|
|
793
|
-
},
|
|
794
|
-
provides: [
|
|
795
|
-
{
|
|
796
|
-
surface: "operation",
|
|
797
|
-
key: "meeting-recorder.transcripts.get",
|
|
798
|
-
version: "1.0.0",
|
|
799
|
-
description: "Fetch the transcript for a specific meeting recording."
|
|
800
|
-
},
|
|
801
|
-
{
|
|
802
|
-
surface: "operation",
|
|
803
|
-
key: "meeting-recorder.transcripts.sync",
|
|
804
|
-
version: "1.0.0",
|
|
805
|
-
description: "Trigger a transcript sync from the recorder provider."
|
|
806
|
-
}
|
|
807
|
-
]
|
|
808
|
-
};
|
|
809
|
-
var meetingRecorderWebhooksCapability = {
|
|
810
|
-
meta: {
|
|
811
|
-
key: "meeting-recorder.webhooks",
|
|
812
|
-
version: "1.0.0",
|
|
813
|
-
kind: "integration",
|
|
814
|
-
title: "Meeting Recorder Webhooks",
|
|
815
|
-
description: "Allows processing of webhook events for meeting transcript readiness.",
|
|
816
|
-
domain: "integrations",
|
|
817
|
-
owners: [...OWNERS2],
|
|
818
|
-
tags: [...TAGS2, "webhooks"],
|
|
819
|
-
stability: StabilityEnum.Experimental
|
|
820
|
-
},
|
|
821
|
-
provides: [
|
|
822
|
-
{
|
|
823
|
-
surface: "operation",
|
|
824
|
-
key: "meeting-recorder.webhooks.ingest",
|
|
825
|
-
version: "1.0.0",
|
|
826
|
-
description: "Ingest and verify meeting recorder webhook payloads."
|
|
827
|
-
}
|
|
828
|
-
]
|
|
829
|
-
};
|
|
830
|
-
function registerMeetingRecorderCapabilities(registry) {
|
|
831
|
-
return registry.register(meetingRecorderMeetingsReadCapability).register(meetingRecorderTranscriptsReadCapability).register(meetingRecorderWebhooksCapability);
|
|
832
|
-
}
|
|
833
|
-
// src/app-config/app-config.capability.ts
|
|
834
|
-
var AppConfigCapability = defineCapability({
|
|
835
|
-
meta: {
|
|
836
|
-
key: "app-config",
|
|
837
|
-
version: "1.0.0",
|
|
838
|
-
title: "App Configuration Capability",
|
|
839
|
-
description: "Provides tenant app configuration lifecycle management.",
|
|
840
|
-
domain: "platform",
|
|
841
|
-
owners: [OwnersEnum.PlatformSigil],
|
|
842
|
-
tags: [TagsEnum.Hygiene],
|
|
843
|
-
kind: "api",
|
|
844
|
-
stability: StabilityEnum.Stable
|
|
845
|
-
},
|
|
846
|
-
provides: [],
|
|
847
|
-
requires: []
|
|
848
|
-
});
|
|
849
|
-
|
|
850
|
-
// src/operations/operation.ts
|
|
851
|
-
var isEmitDeclRef = (e) => ("ref" in e);
|
|
852
|
-
var defineCommand = (spec) => ({
|
|
853
|
-
...spec,
|
|
854
|
-
meta: { ...spec.meta, kind: "command" },
|
|
855
|
-
policy: {
|
|
856
|
-
...spec.policy,
|
|
857
|
-
idempotent: spec.policy?.["policy"]?.idempotent ?? false
|
|
858
|
-
}
|
|
859
|
-
});
|
|
860
|
-
var defineQuery = (spec) => ({
|
|
861
|
-
...spec,
|
|
862
|
-
meta: { ...spec.meta, kind: "query" },
|
|
863
|
-
policy: { ...spec.policy, idempotent: true }
|
|
864
|
-
});
|
|
865
|
-
|
|
866
|
-
// src/registry.ts
|
|
867
|
-
init_registry_utils();
|
|
868
|
-
import { compareVersions as compareVersions2 } from "compare-versions";
|
|
869
|
-
var keyOfSpecContract = (spec) => `${spec.meta.key}.v${spec.meta.version}`;
|
|
870
|
-
|
|
871
|
-
class SpecContractRegistry {
|
|
872
|
-
contractType;
|
|
873
|
-
items = new Map;
|
|
874
|
-
constructor(contractType, items) {
|
|
875
|
-
this.contractType = contractType;
|
|
876
|
-
if (items) {
|
|
877
|
-
items.forEach((p) => this.register(p));
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
register(p) {
|
|
881
|
-
const key = keyOfSpecContract(p);
|
|
882
|
-
if (this.items.has(key))
|
|
883
|
-
throw new Error(`Duplicate contract \`${this.contractType}\` ${key}`);
|
|
884
|
-
this.items.set(key, p);
|
|
885
|
-
return this;
|
|
886
|
-
}
|
|
887
|
-
count() {
|
|
888
|
-
return this.items.size;
|
|
889
|
-
}
|
|
890
|
-
list() {
|
|
891
|
-
return [...this.items.values()];
|
|
892
|
-
}
|
|
893
|
-
get(key, version) {
|
|
894
|
-
if (version != null)
|
|
895
|
-
return this.items.get(`${key}.v${version}`);
|
|
896
|
-
let candidate;
|
|
897
|
-
for (const [k, p] of this.items.entries()) {
|
|
898
|
-
if (!k.startsWith(`${key}.v`))
|
|
899
|
-
continue;
|
|
900
|
-
if (!candidate || compareVersions2(p.meta.version, candidate.meta.version) > 0) {
|
|
901
|
-
candidate = p;
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
return candidate;
|
|
905
|
-
}
|
|
906
|
-
has(key, version) {
|
|
907
|
-
return !!this.get(key, version);
|
|
908
|
-
}
|
|
909
|
-
filter(criteria) {
|
|
910
|
-
return filterBy(this.list(), criteria);
|
|
911
|
-
}
|
|
912
|
-
listByTag(tag) {
|
|
913
|
-
return this.list().filter((p) => p.meta.tags?.includes(tag));
|
|
914
|
-
}
|
|
915
|
-
listByOwner(owner) {
|
|
916
|
-
return this.list().filter((p) => p.meta.owners?.includes(owner));
|
|
917
|
-
}
|
|
918
|
-
groupBy(keyFn) {
|
|
919
|
-
return groupBy(this.list(), keyFn);
|
|
920
|
-
}
|
|
921
|
-
getUniqueTags() {
|
|
922
|
-
return getUniqueTags(this.list());
|
|
923
|
-
}
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
// src/events.ts
|
|
927
|
-
function defineEvent(e) {
|
|
928
|
-
return e;
|
|
929
|
-
}
|
|
930
|
-
var eventKey = (key, version) => `${key}.v${version}`;
|
|
931
|
-
|
|
932
|
-
class EventRegistry extends SpecContractRegistry {
|
|
933
|
-
constructor(items) {
|
|
934
|
-
super("event", items);
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
// src/operations/registry.ts
|
|
939
|
-
function opKey(key, version) {
|
|
940
|
-
return `${key}.v${version}`;
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
class OperationSpecRegistry extends SpecContractRegistry {
|
|
944
|
-
handlers = new Map;
|
|
945
|
-
constructor(items) {
|
|
946
|
-
super("operation", items);
|
|
947
|
-
}
|
|
948
|
-
bind(spec, handler) {
|
|
949
|
-
const key = opKey(spec.meta.key, spec.meta.version);
|
|
950
|
-
if (!this.items.has(key))
|
|
951
|
-
throw new Error(`Cannot bind; spec not found: ${key}`);
|
|
952
|
-
if (this.handlers.has(key))
|
|
953
|
-
throw new Error(`Handler already bound for ${key}`);
|
|
954
|
-
this.handlers.set(key, handler);
|
|
955
|
-
return this;
|
|
956
|
-
}
|
|
957
|
-
getHandler(key, version) {
|
|
958
|
-
const spec = this.get(key, version);
|
|
959
|
-
if (!spec)
|
|
960
|
-
return;
|
|
961
|
-
return this.handlers.get(opKey(spec.meta.key, spec.meta.version));
|
|
962
|
-
}
|
|
963
|
-
listBound() {
|
|
964
|
-
const out = [];
|
|
965
|
-
for (const [k, spec] of this.items.entries()) {
|
|
966
|
-
const h = this.handlers.get(k);
|
|
967
|
-
if (h)
|
|
968
|
-
out.push({ spec, handler: h });
|
|
969
|
-
}
|
|
970
|
-
return out;
|
|
971
|
-
}
|
|
972
|
-
async execute(key, version, rawInput, ctx) {
|
|
973
|
-
const baseSpec = this.get(key, version);
|
|
974
|
-
if (!baseSpec)
|
|
975
|
-
throw new Error(`Spec not found for ${key}${version ? `.v${version}` : ""}`);
|
|
976
|
-
const spec = await ctx.specVariantResolver?.resolve({
|
|
977
|
-
name: baseSpec.meta.key,
|
|
978
|
-
version: baseSpec.meta.version,
|
|
979
|
-
kind: baseSpec.meta.kind
|
|
980
|
-
}, ctx) ?? baseSpec;
|
|
981
|
-
let handlerKey = opKey(spec.meta.key, spec.meta.version);
|
|
982
|
-
let handler = this.handlers.get(handlerKey);
|
|
983
|
-
if (!handler) {
|
|
984
|
-
const fallbackKey = opKey(baseSpec.meta.key, baseSpec.meta.version);
|
|
985
|
-
handler = this.handlers.get(fallbackKey);
|
|
986
|
-
handlerKey = fallbackKey;
|
|
987
|
-
}
|
|
988
|
-
if (!handler)
|
|
989
|
-
throw new Error(`No handler bound for ${handlerKey}`);
|
|
990
|
-
const parsedInput = spec.io.input?.getZod().parse(rawInput);
|
|
991
|
-
if (ctx.decide) {
|
|
992
|
-
const [service, command] = spec.meta.key.split(".");
|
|
993
|
-
if (!service || !command)
|
|
994
|
-
throw new Error(`Invalid spec name: ${spec.meta.key}`);
|
|
995
|
-
const decision = await ctx.decide({
|
|
996
|
-
service,
|
|
997
|
-
command,
|
|
998
|
-
version: spec.meta.version,
|
|
999
|
-
actor: ctx.actor ?? "anonymous",
|
|
1000
|
-
channel: ctx.channel,
|
|
1001
|
-
roles: ctx.roles,
|
|
1002
|
-
organizationId: ctx.organizationId,
|
|
1003
|
-
userId: ctx.userId,
|
|
1004
|
-
flags: []
|
|
1005
|
-
});
|
|
1006
|
-
if (decision.effect === "deny") {
|
|
1007
|
-
throw new Error(`PolicyDenied: ${spec.meta.key}.v${spec.meta.version}`);
|
|
1008
|
-
}
|
|
1009
|
-
if (decision.rateLimit && ctx.rateLimit) {
|
|
1010
|
-
const key2 = decision.rateLimit.key ?? "default";
|
|
1011
|
-
const rpm = decision.rateLimit.rpm ?? 60;
|
|
1012
|
-
await ctx.rateLimit(key2, 1, rpm);
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
const allowedEvents = new Map;
|
|
1016
|
-
if (spec.sideEffects?.emits) {
|
|
1017
|
-
for (const e of spec.sideEffects.emits) {
|
|
1018
|
-
if (isEmitDeclRef(e)) {
|
|
1019
|
-
const eventSpec = ctx.eventSpecResolver?.get(e.ref.key, e.ref.version);
|
|
1020
|
-
if (eventSpec) {
|
|
1021
|
-
allowedEvents.set(`${e.ref.key}.v${e.ref.version}`, eventSpec.payload);
|
|
1022
|
-
}
|
|
1023
|
-
} else {
|
|
1024
|
-
allowedEvents.set(`${e.key}.v${e.version}`, e.payload);
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
const emitGuard = async (eventName, eventVersion, payload) => {
|
|
1029
|
-
const key2 = eventKey(eventName, eventVersion);
|
|
1030
|
-
const schema = allowedEvents.get(key2);
|
|
1031
|
-
if (!schema)
|
|
1032
|
-
throw new Error(`UndeclaredEvent: ${key2} not allowed by ${opKey(spec.meta.key, spec.meta.version)}`);
|
|
1033
|
-
const parsed = schema.getZod().parse(payload);
|
|
1034
|
-
await ctx.eventPublisher?.({
|
|
1035
|
-
key: eventName,
|
|
1036
|
-
version: eventVersion,
|
|
1037
|
-
payload: parsed,
|
|
1038
|
-
traceId: ctx.traceId
|
|
1039
|
-
});
|
|
1040
|
-
};
|
|
1041
|
-
if (ctx.appConfig) {
|
|
1042
|
-
if (!ctx.branding) {
|
|
1043
|
-
ctx.branding = ctx.appConfig.branding;
|
|
1044
|
-
}
|
|
1045
|
-
if (!ctx.translation) {
|
|
1046
|
-
ctx.translation = { config: ctx.appConfig.translation };
|
|
1047
|
-
} else if (!ctx.translation.config) {
|
|
1048
|
-
ctx.translation = {
|
|
1049
|
-
...ctx.translation,
|
|
1050
|
-
config: ctx.appConfig.translation
|
|
1051
|
-
};
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
const telemetryContext = ctx.telemetry;
|
|
1055
|
-
const trackTelemetry = async (trigger, details) => {
|
|
1056
|
-
if (!telemetryContext || !trigger?.event)
|
|
1057
|
-
return;
|
|
1058
|
-
try {
|
|
1059
|
-
const props = trigger.properties?.(details) ?? {};
|
|
1060
|
-
await telemetryContext.track(trigger.event.key, trigger.event.version ?? "1.0.0", props, {
|
|
1061
|
-
tenantId: ctx.organizationId ?? undefined,
|
|
1062
|
-
organizationId: ctx.organizationId,
|
|
1063
|
-
userId: ctx.userId,
|
|
1064
|
-
actor: ctx.actor,
|
|
1065
|
-
channel: ctx.channel,
|
|
1066
|
-
metadata: ctx.traceId ? { traceId: ctx.traceId } : undefined
|
|
1067
|
-
});
|
|
1068
|
-
} catch (_error) {}
|
|
1069
|
-
};
|
|
1070
|
-
let result;
|
|
1071
|
-
try {
|
|
1072
|
-
result = await handler(parsedInput, {
|
|
1073
|
-
...ctx,
|
|
1074
|
-
__emitGuard__: emitGuard
|
|
1075
|
-
});
|
|
1076
|
-
} catch (error) {
|
|
1077
|
-
if (spec.telemetry?.failure) {
|
|
1078
|
-
await trackTelemetry(spec.telemetry.failure, {
|
|
1079
|
-
input: parsedInput ?? rawInput,
|
|
1080
|
-
error
|
|
1081
|
-
});
|
|
1082
|
-
}
|
|
1083
|
-
throw error;
|
|
1084
|
-
}
|
|
1085
|
-
if (spec.telemetry?.success) {
|
|
1086
|
-
await trackTelemetry(spec.telemetry.success, {
|
|
1087
|
-
input: parsedInput ?? rawInput,
|
|
1088
|
-
output: result
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
|
-
const outputModel = spec.io.output;
|
|
1092
|
-
if (outputModel?.getZod) {
|
|
1093
|
-
const parsedOutput = outputModel.getZod().parse(result);
|
|
1094
|
-
return parsedOutput;
|
|
1095
|
-
}
|
|
1096
|
-
return result;
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
// src/operations/report/getContractVerificationStatus.ts
|
|
1101
|
-
import {
|
|
1102
|
-
ScalarTypeEnum,
|
|
1103
|
-
SchemaModel,
|
|
1104
|
-
ZodSchemaType
|
|
1105
|
-
} from "@contractspec/lib.schema";
|
|
1106
|
-
import * as z from "zod";
|
|
1107
|
-
var REPORT_DOMAIN = "report";
|
|
1108
|
-
var REPORT_OWNERS = ["platform.core"];
|
|
1109
|
-
var REPORT_TAGS = ["report", "drift", "verification"];
|
|
1110
|
-
var REPORT_STABILITY = StabilityEnum.Experimental;
|
|
1111
|
-
var ContractVerificationStatusModel = new SchemaModel({
|
|
1112
|
-
name: "ContractVerificationStatus",
|
|
1113
|
-
fields: {
|
|
1114
|
-
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
1115
|
-
lastVerifiedSha: {
|
|
1116
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
1117
|
-
isOptional: true
|
|
1118
|
-
},
|
|
1119
|
-
lastVerifiedDate: {
|
|
1120
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
1121
|
-
isOptional: true
|
|
1122
|
-
},
|
|
1123
|
-
surfaces: {
|
|
1124
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
1125
|
-
isOptional: false,
|
|
1126
|
-
isArray: true
|
|
1127
|
-
},
|
|
1128
|
-
driftMismatches: {
|
|
1129
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
1130
|
-
isOptional: false
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
});
|
|
1134
|
-
var GetContractVerificationStatusInput = new SchemaModel({
|
|
1135
|
-
name: "GetContractVerificationStatusInput",
|
|
1136
|
-
fields: {
|
|
1137
|
-
projectPath: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
1138
|
-
baseline: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
1139
|
-
}
|
|
1140
|
-
});
|
|
1141
|
-
var GetContractVerificationStatusOutput = new ZodSchemaType(z.object({
|
|
1142
|
-
contracts: z.object({
|
|
1143
|
-
name: z.string(),
|
|
1144
|
-
lastVerifiedSha: z.string().optional(),
|
|
1145
|
-
lastVerifiedDate: z.string().optional(),
|
|
1146
|
-
surfaces: z.string().array(),
|
|
1147
|
-
driftMismatches: z.int()
|
|
1148
|
-
}).array()
|
|
1149
|
-
}), {
|
|
1150
|
-
name: "GetContractVerificationStatusOutput"
|
|
1151
|
-
});
|
|
1152
|
-
var GetContractVerificationStatusQuery = defineQuery({
|
|
1153
|
-
meta: {
|
|
1154
|
-
key: "report.getContractVerificationStatus",
|
|
1155
|
-
title: "Get Contract Verification Status",
|
|
1156
|
-
version: "1.0.0",
|
|
1157
|
-
description: "Retrieves per-contract verification status for the impact report.",
|
|
1158
|
-
goal: "Enable stakeholders to see contract health at a glance.",
|
|
1159
|
-
context: "Part of the impact report domain. Reads from drift check outputs and verified.json to provide a consolidated view of each contract's drift debt and surface coverage.",
|
|
1160
|
-
domain: REPORT_DOMAIN,
|
|
1161
|
-
owners: REPORT_OWNERS,
|
|
1162
|
-
tags: REPORT_TAGS,
|
|
1163
|
-
stability: REPORT_STABILITY
|
|
1164
|
-
},
|
|
1165
|
-
io: {
|
|
1166
|
-
input: GetContractVerificationStatusInput,
|
|
1167
|
-
output: GetContractVerificationStatusOutput,
|
|
1168
|
-
errors: {
|
|
1169
|
-
PROJECT_NOT_FOUND: {
|
|
1170
|
-
description: "Project path does not exist.",
|
|
1171
|
-
http: 404,
|
|
1172
|
-
when: "The provided projectPath does not resolve to a valid directory."
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
},
|
|
1176
|
-
policy: {
|
|
1177
|
-
auth: "anonymous",
|
|
1178
|
-
pii: []
|
|
1179
|
-
}
|
|
1180
|
-
});
|
|
1181
|
-
|
|
1182
|
-
// src/install.ts
|
|
1183
|
-
function makeEmit(_spec, ctx) {
|
|
1184
|
-
return {
|
|
1185
|
-
ref: async (ev, payload) => {
|
|
1186
|
-
await ctx.__emitGuard__?.(ev.meta.key, ev.meta.version, payload);
|
|
1187
|
-
},
|
|
1188
|
-
key: async (key, version, payload) => {
|
|
1189
|
-
await ctx.__emitGuard__?.(key, version, payload);
|
|
1190
|
-
},
|
|
1191
|
-
object: async (evt) => {
|
|
1192
|
-
await ctx.__emitGuard__?.(evt.key, evt.version, evt.payload);
|
|
1193
|
-
}
|
|
1194
|
-
};
|
|
1195
|
-
}
|
|
1196
|
-
function installOp(reg, spec, handler) {
|
|
1197
|
-
return reg.register(spec).bind(spec, handler);
|
|
1198
|
-
}
|
|
1199
|
-
function op(spec, handler) {
|
|
1200
|
-
return {
|
|
1201
|
-
spec,
|
|
1202
|
-
handler,
|
|
1203
|
-
install: (reg) => installOp(reg, spec, handler)
|
|
1204
|
-
};
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
// src/data-views/spec.ts
|
|
1208
|
-
function defineDataView(spec) {
|
|
1209
|
-
return spec;
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
// src/data-views/report/contractVerificationTable.ts
|
|
1213
|
-
var ContractVerificationTableDataView = defineDataView({
|
|
1214
|
-
meta: {
|
|
1215
|
-
key: "report.contractVerificationTable",
|
|
1216
|
-
title: "Contract Verification Table",
|
|
1217
|
-
version: "1.0.0",
|
|
1218
|
-
description: "Table view of per-contract verification status for the impact report.",
|
|
1219
|
-
domain: "report",
|
|
1220
|
-
owners: ["platform.core"],
|
|
1221
|
-
tags: ["report", "data-view", "verification"],
|
|
1222
|
-
stability: StabilityEnum.Experimental,
|
|
1223
|
-
entity: "contract-verification"
|
|
1224
|
-
},
|
|
1225
|
-
source: {
|
|
1226
|
-
primary: {
|
|
1227
|
-
key: GetContractVerificationStatusQuery.meta.key,
|
|
1228
|
-
version: GetContractVerificationStatusQuery.meta.version
|
|
1229
|
-
}
|
|
1230
|
-
},
|
|
1231
|
-
view: {
|
|
1232
|
-
kind: "table",
|
|
1233
|
-
fields: [
|
|
1234
|
-
{
|
|
1235
|
-
key: "name",
|
|
1236
|
-
label: "Contract / Endpoint / Event",
|
|
1237
|
-
dataPath: "name"
|
|
1238
|
-
},
|
|
1239
|
-
{
|
|
1240
|
-
key: "timeSinceVerified",
|
|
1241
|
-
label: "Time since verified",
|
|
1242
|
-
dataPath: "lastVerifiedDate"
|
|
1243
|
-
},
|
|
1244
|
-
{
|
|
1245
|
-
key: "driftMismatches",
|
|
1246
|
-
label: "Drift debt",
|
|
1247
|
-
dataPath: "driftMismatches",
|
|
1248
|
-
format: "number",
|
|
1249
|
-
sortable: true
|
|
1250
|
-
},
|
|
1251
|
-
{
|
|
1252
|
-
key: "surfaces",
|
|
1253
|
-
label: "Surfaces covered",
|
|
1254
|
-
dataPath: "surfaces",
|
|
1255
|
-
format: "badge"
|
|
1256
|
-
},
|
|
1257
|
-
{
|
|
1258
|
-
key: "lastVerifiedSha",
|
|
1259
|
-
label: "Last verified commit",
|
|
1260
|
-
dataPath: "lastVerifiedSha",
|
|
1261
|
-
width: "sm"
|
|
1262
|
-
}
|
|
1263
|
-
],
|
|
1264
|
-
primaryField: "name",
|
|
1265
|
-
secondaryFields: ["driftMismatches", "timeSinceVerified"],
|
|
1266
|
-
columns: [
|
|
1267
|
-
{ field: "name", width: "lg" },
|
|
1268
|
-
{ field: "lastVerifiedSha", width: "sm" },
|
|
1269
|
-
{ field: "timeSinceVerified", width: "sm" },
|
|
1270
|
-
{ field: "surfaces", width: "md" },
|
|
1271
|
-
{ field: "driftMismatches", width: "xs", align: "right" }
|
|
1272
|
-
]
|
|
1273
|
-
},
|
|
1274
|
-
policy: {
|
|
1275
|
-
flags: [],
|
|
1276
|
-
pii: []
|
|
1277
|
-
}
|
|
1278
|
-
});
|
|
1279
|
-
|
|
1280
|
-
// src/operations/report/index.ts
|
|
1281
|
-
var getContractVerificationStatusHandler = async (input, _ctx) => {
|
|
1282
|
-
try {
|
|
1283
|
-
const cmdProcess = Bun.spawn(["contractspec", "impl", "status", "--format", "json", "--all"], {
|
|
1284
|
-
cwd: input.projectPath
|
|
1285
|
-
});
|
|
1286
|
-
const cmdStdout = await cmdProcess.stdout;
|
|
1287
|
-
const output = await Bun.readableStreamToText(cmdStdout);
|
|
1288
|
-
if (!output) {
|
|
1289
|
-
return { contracts: [] };
|
|
1290
|
-
}
|
|
1291
|
-
const cliOutput = JSON.parse(output);
|
|
1292
|
-
const contracts = [];
|
|
1293
|
-
for (const spec of cliOutput.results || []) {
|
|
1294
|
-
const contract = {
|
|
1295
|
-
name: spec.specKey,
|
|
1296
|
-
lastVerifiedSha: spec.specHash,
|
|
1297
|
-
lastVerifiedDate: spec.specHash ? new Date().toISOString() : undefined,
|
|
1298
|
-
surfaces: spec.implementations.filter((impl) => impl.exists).map((impl) => impl.type),
|
|
1299
|
-
driftMismatches: spec.implementations.filter((impl) => !impl.exists).length
|
|
1300
|
-
};
|
|
1301
|
-
contracts.push(contract);
|
|
1302
|
-
}
|
|
1303
|
-
return { contracts };
|
|
1304
|
-
} catch (error) {
|
|
1305
|
-
console.error("Failed to get contract verification status:", error);
|
|
1306
|
-
return { contracts: [] };
|
|
1307
|
-
}
|
|
1308
|
-
};
|
|
1309
|
-
function registerReportContracts(registry) {
|
|
1310
|
-
installOp(registry, GetContractVerificationStatusQuery, getContractVerificationStatusHandler);
|
|
1311
|
-
return registry;
|
|
1312
|
-
}
|
|
1313
|
-
// src/app-config/spec.ts
|
|
1314
|
-
var blueprintKey = (meta) => `${meta.key}.v${meta.version}`;
|
|
1315
|
-
|
|
1316
|
-
class AppBlueprintRegistry extends SpecContractRegistry {
|
|
1317
|
-
constructor(items) {
|
|
1318
|
-
super("app-config", items);
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
function makeAppBlueprintKey(meta) {
|
|
1322
|
-
return blueprintKey(meta);
|
|
1323
|
-
}
|
|
1324
|
-
var defineAppConfig = (spec) => spec;
|
|
1325
|
-
|
|
1326
|
-
// src/app-config/app-config.feature.ts
|
|
1327
|
-
var AppConfigFeature = defineAppConfig({
|
|
1328
|
-
meta: {
|
|
1329
|
-
key: "app-config",
|
|
1330
|
-
version: "1.0.0",
|
|
1331
|
-
title: "App Configuration",
|
|
1332
|
-
description: "Tenant app configuration lifecycle management with draft, preview, and publish stages",
|
|
1333
|
-
domain: "platform",
|
|
1334
|
-
owners: ["@platform.sigil"],
|
|
1335
|
-
tags: ["app-config", "lifecycle", "configuration", "tenant"],
|
|
1336
|
-
stability: "beta"
|
|
1337
|
-
},
|
|
1338
|
-
operations: [],
|
|
1339
|
-
events: [
|
|
1340
|
-
{ key: "app_config.draft_created", version: "1.0.0" },
|
|
1341
|
-
{ key: "app_config.promoted_to_preview", version: "1.0.0" },
|
|
1342
|
-
{ key: "app_config.published", version: "1.0.0" },
|
|
1343
|
-
{ key: "app_config.rolled_back", version: "1.0.0" }
|
|
1344
|
-
],
|
|
1345
|
-
presentations: [],
|
|
1346
|
-
opToPresentation: [],
|
|
1347
|
-
presentationsTargets: [],
|
|
1348
|
-
capabilities: {
|
|
1349
|
-
provides: [{ key: "app-config", version: "1.0.0" }],
|
|
1350
|
-
requires: []
|
|
1351
|
-
}
|
|
1352
|
-
});
|
|
1353
|
-
// src/app-config/events.ts
|
|
1354
|
-
import { SchemaModel as SchemaModel2, ScalarTypeEnum as ScalarTypeEnum2 } from "@contractspec/lib.schema";
|
|
1355
|
-
var lifecycleOwnership = {
|
|
1356
|
-
title: "Tenant App Config Lifecycle",
|
|
1357
|
-
description: "Events emitted when tenant app configurations move through lifecycle stages.",
|
|
1358
|
-
domain: "app-config.lifecycle",
|
|
1359
|
-
owners: [OwnersEnum.PlatformSigil],
|
|
1360
|
-
tags: [TagsEnum.Hygiene],
|
|
1361
|
-
stability: StabilityEnum.Beta
|
|
1362
|
-
};
|
|
1363
|
-
var ConfigDraftCreatedEvent = defineEvent({
|
|
1364
|
-
meta: {
|
|
1365
|
-
...lifecycleOwnership,
|
|
1366
|
-
key: "app_config.draft_created",
|
|
1367
|
-
version: "1.0.0",
|
|
1368
|
-
description: "A new tenant config draft was created."
|
|
1369
|
-
},
|
|
1370
|
-
payload: new SchemaModel2({
|
|
1371
|
-
name: "ConfigDraftCreatedPayload",
|
|
1372
|
-
fields: {
|
|
1373
|
-
tenantId: { type: ScalarTypeEnum2.ID(), isOptional: false },
|
|
1374
|
-
appId: { type: ScalarTypeEnum2.ID(), isOptional: false },
|
|
1375
|
-
version: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
1376
|
-
blueprintName: {
|
|
1377
|
-
type: ScalarTypeEnum2.String_unsecure(),
|
|
1378
|
-
isOptional: false
|
|
1379
|
-
},
|
|
1380
|
-
blueprintVersion: {
|
|
1381
|
-
type: ScalarTypeEnum2.String_unsecure(),
|
|
1382
|
-
isOptional: false
|
|
1383
|
-
},
|
|
1384
|
-
createdBy: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
1385
|
-
clonedFrom: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: true }
|
|
1386
|
-
}
|
|
1387
|
-
})
|
|
1388
|
-
});
|
|
1389
|
-
var ConfigPromotedToPreviewEvent = defineEvent({
|
|
1390
|
-
meta: {
|
|
1391
|
-
...lifecycleOwnership,
|
|
1392
|
-
key: "app_config.promoted_to_preview",
|
|
1393
|
-
version: "1.0.0",
|
|
1394
|
-
description: "A tenant config draft was promoted to preview."
|
|
1395
|
-
},
|
|
1396
|
-
payload: new SchemaModel2({
|
|
1397
|
-
name: "ConfigPromotedToPreviewPayload",
|
|
1398
|
-
fields: {
|
|
1399
|
-
tenantId: { type: ScalarTypeEnum2.ID(), isOptional: false },
|
|
1400
|
-
appId: { type: ScalarTypeEnum2.ID(), isOptional: false },
|
|
1401
|
-
version: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
1402
|
-
promotedBy: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
1403
|
-
warnings: {
|
|
1404
|
-
type: ScalarTypeEnum2.String_unsecure(),
|
|
1405
|
-
isOptional: true,
|
|
1406
|
-
isArray: true
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
})
|
|
1410
|
-
});
|
|
1411
|
-
var ConfigPublishedEvent = defineEvent({
|
|
1412
|
-
meta: {
|
|
1413
|
-
...lifecycleOwnership,
|
|
1414
|
-
key: "app_config.published",
|
|
1415
|
-
version: "1.0.0",
|
|
1416
|
-
description: "A tenant config version was published to production."
|
|
1417
|
-
},
|
|
1418
|
-
payload: new SchemaModel2({
|
|
1419
|
-
name: "ConfigPublishedPayload",
|
|
1420
|
-
fields: {
|
|
1421
|
-
tenantId: { type: ScalarTypeEnum2.ID(), isOptional: false },
|
|
1422
|
-
appId: { type: ScalarTypeEnum2.ID(), isOptional: false },
|
|
1423
|
-
version: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
1424
|
-
previousVersion: {
|
|
1425
|
-
type: ScalarTypeEnum2.String_unsecure(),
|
|
1426
|
-
isOptional: true
|
|
1427
|
-
},
|
|
1428
|
-
publishedBy: {
|
|
1429
|
-
type: ScalarTypeEnum2.String_unsecure(),
|
|
1430
|
-
isOptional: false
|
|
1431
|
-
},
|
|
1432
|
-
changeSummary: {
|
|
1433
|
-
type: ScalarTypeEnum2.String_unsecure(),
|
|
1434
|
-
isOptional: true
|
|
1435
|
-
},
|
|
1436
|
-
changedSections: {
|
|
1437
|
-
type: ScalarTypeEnum2.String_unsecure(),
|
|
1438
|
-
isOptional: true,
|
|
1439
|
-
isArray: true
|
|
1440
|
-
}
|
|
1441
|
-
}
|
|
1442
|
-
})
|
|
1443
|
-
});
|
|
1444
|
-
var ConfigRolledBackEvent = defineEvent({
|
|
1445
|
-
meta: {
|
|
1446
|
-
...lifecycleOwnership,
|
|
1447
|
-
key: "app_config.rolled_back",
|
|
1448
|
-
version: "1.0.0",
|
|
1449
|
-
description: "A tenant config was rolled back to a previous version."
|
|
1450
|
-
},
|
|
1451
|
-
payload: new SchemaModel2({
|
|
1452
|
-
name: "ConfigRolledBackPayload",
|
|
1453
|
-
fields: {
|
|
1454
|
-
tenantId: { type: ScalarTypeEnum2.ID(), isOptional: false },
|
|
1455
|
-
appId: { type: ScalarTypeEnum2.ID(), isOptional: false },
|
|
1456
|
-
newVersion: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
|
|
1457
|
-
rolledBackFrom: {
|
|
1458
|
-
type: ScalarTypeEnum2.String_unsecure(),
|
|
1459
|
-
isOptional: false
|
|
1460
|
-
},
|
|
1461
|
-
rolledBackTo: {
|
|
1462
|
-
type: ScalarTypeEnum2.String_unsecure(),
|
|
1463
|
-
isOptional: false
|
|
1464
|
-
},
|
|
1465
|
-
rolledBackBy: {
|
|
1466
|
-
type: ScalarTypeEnum2.String_unsecure(),
|
|
1467
|
-
isOptional: false
|
|
1468
|
-
},
|
|
1469
|
-
reason: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false }
|
|
1470
|
-
}
|
|
1471
|
-
})
|
|
1472
|
-
});
|
|
1473
|
-
|
|
1474
|
-
// src/app-config/runtime.ts
|
|
1475
|
-
function resolveAppConfig(blueprint, tenant, deps = {}) {
|
|
1476
|
-
const capabilities2 = mergeCapabilities(blueprint.capabilities, tenant.capabilities);
|
|
1477
|
-
const features = mergeFeatures(blueprint.features, tenant.features);
|
|
1478
|
-
const dataViews = mergeMappings(blueprint.dataViews ?? {}, tenant.dataViewOverrides);
|
|
1479
|
-
const workflows = mergeMappings(blueprint.workflows ?? {}, tenant.workflowOverrides);
|
|
1480
|
-
const policies = mergePolicies(blueprint.policies ?? [], tenant.additionalPolicies ?? []);
|
|
1481
|
-
const theme = mergeTheme(blueprint.theme, tenant.themeOverride);
|
|
1482
|
-
const telemetry = mergeTelemetry(blueprint.telemetry, tenant.telemetryOverride);
|
|
1483
|
-
const experiments = mergeExperiments(blueprint.experiments, tenant.experiments);
|
|
1484
|
-
const featureFlags = mergeFeatureFlags(blueprint.featureFlags ?? [], tenant.featureFlags ?? []);
|
|
1485
|
-
const routes = mergeRoutes(blueprint.routes ?? [], tenant.routeOverrides ?? []);
|
|
1486
|
-
const { resolved: integrations } = evaluateIntegrationSlots(blueprint.integrationSlots, tenant.integrations, deps.integrationConnections, deps.integrationSpecs);
|
|
1487
|
-
const knowledge = resolveKnowledgeBindings(tenant.knowledge, deps.knowledgeSpaces, deps.knowledgeSources);
|
|
1488
|
-
const branding = resolveBranding(blueprint.branding, tenant);
|
|
1489
|
-
const translation = resolveTranslation(blueprint.translationCatalog, tenant.locales, tenant.translationOverrides);
|
|
1490
|
-
return {
|
|
1491
|
-
appId: blueprint.meta.appId,
|
|
1492
|
-
tenantId: tenant.meta.tenantId,
|
|
1493
|
-
environment: tenant.meta.environment,
|
|
1494
|
-
blueprintName: blueprint.meta.key,
|
|
1495
|
-
blueprintVersion: blueprint.meta.version,
|
|
1496
|
-
configVersion: tenant.meta.version,
|
|
1497
|
-
capabilities: capabilities2,
|
|
1498
|
-
features,
|
|
1499
|
-
dataViews,
|
|
1500
|
-
workflows,
|
|
1501
|
-
policies,
|
|
1502
|
-
theme,
|
|
1503
|
-
telemetry,
|
|
1504
|
-
experiments,
|
|
1505
|
-
featureFlags,
|
|
1506
|
-
routes,
|
|
1507
|
-
integrations,
|
|
1508
|
-
knowledge,
|
|
1509
|
-
translation,
|
|
1510
|
-
branding,
|
|
1511
|
-
notes: tenant.notes ?? blueprint.notes
|
|
1512
|
-
};
|
|
1513
|
-
}
|
|
1514
|
-
function composeAppConfig(blueprint, tenant, deps, options = {}) {
|
|
1515
|
-
const resolved = resolveAppConfig(blueprint, tenant, deps);
|
|
1516
|
-
const missing = [];
|
|
1517
|
-
const integrationEvaluation = evaluateIntegrationSlots(blueprint.integrationSlots, tenant.integrations, deps.integrationConnections, deps.integrationSpecs);
|
|
1518
|
-
resolved.integrations = integrationEvaluation.resolved;
|
|
1519
|
-
missing.push(...integrationEvaluation.missing);
|
|
1520
|
-
missing.push(...collectMissingKnowledge(tenant.knowledge ?? [], deps.knowledgeSpaces, deps.knowledgeSources));
|
|
1521
|
-
const capabilities2 = resolveCapabilityRefs(resolved.capabilities.enabled, deps.capabilities, missing);
|
|
1522
|
-
const features = resolveFeatureRefs(resolved.features.include, deps.features, missing);
|
|
1523
|
-
const dataViews = resolvePointerRecord(resolved.dataViews, deps.dataViews, "dataView", missing);
|
|
1524
|
-
const workflows = resolvePointerRecord(resolved.workflows, deps.workflows, "workflow", missing);
|
|
1525
|
-
const policies = resolvePolicies(resolved.policies, deps.policies, missing);
|
|
1526
|
-
const { theme, fallbacks, themeMissing } = resolveThemeBinding(resolved.theme, deps.themes);
|
|
1527
|
-
missing.push(...themeMissing);
|
|
1528
|
-
const { telemetry, telemetryMissing } = resolveTelemetryBinding(resolved.telemetry, deps.telemetry);
|
|
1529
|
-
missing.push(...telemetryMissing);
|
|
1530
|
-
const experiments = resolveExperimentsSpecs(resolved.experiments, deps.experiments, missing);
|
|
1531
|
-
if (options.strict && missing.length > 0) {
|
|
1532
|
-
const reasons = missing.map((item) => `${item.type}:${item.identifier}`).join(", ");
|
|
1533
|
-
throw new Error(`composeAppConfig: missing references -> ${reasons}`);
|
|
1534
|
-
}
|
|
1535
|
-
return {
|
|
1536
|
-
resolved,
|
|
1537
|
-
capabilities: capabilities2,
|
|
1538
|
-
features,
|
|
1539
|
-
dataViews,
|
|
1540
|
-
workflows,
|
|
1541
|
-
policies,
|
|
1542
|
-
theme,
|
|
1543
|
-
themeFallbacks: fallbacks,
|
|
1544
|
-
telemetry,
|
|
1545
|
-
experiments,
|
|
1546
|
-
integrations: resolved.integrations,
|
|
1547
|
-
knowledge: resolved.knowledge,
|
|
1548
|
-
missing
|
|
1549
|
-
};
|
|
1550
|
-
}
|
|
1551
|
-
function mergeCapabilities(blueprint, tenant) {
|
|
1552
|
-
const enabled = dedupeRefs([...blueprint?.enabled ?? [], ...tenant?.enable ?? []], capabilityKey2);
|
|
1553
|
-
const disabled = dedupeRefs([...blueprint?.disabled ?? [], ...tenant?.disable ?? []], capabilityKey2);
|
|
1554
|
-
const disabledKeys = new Set(disabled.map(capabilityKey2));
|
|
1555
|
-
const filteredEnabled = enabled.filter((ref) => !disabledKeys.has(capabilityKey2(ref)));
|
|
1556
|
-
return { enabled: filteredEnabled, disabled };
|
|
1557
|
-
}
|
|
1558
|
-
function mergeFeatures(blueprint, tenant) {
|
|
1559
|
-
const include = dedupeRefs([...blueprint?.include ?? [], ...tenant?.include ?? []], featureKey);
|
|
1560
|
-
const exclude = dedupeRefs([...blueprint?.exclude ?? [], ...tenant?.exclude ?? []], featureKey);
|
|
1561
|
-
const excludeSet = new Set(exclude.map(featureKey));
|
|
1562
|
-
const filteredInclude = include.filter((ref) => !excludeSet.has(featureKey(ref)));
|
|
1563
|
-
return { include: filteredInclude, exclude };
|
|
1564
|
-
}
|
|
1565
|
-
function mergeMappings(blueprint, overrides) {
|
|
1566
|
-
const merged = { ...blueprint };
|
|
1567
|
-
if (!overrides)
|
|
1568
|
-
return merged;
|
|
1569
|
-
for (const override of overrides) {
|
|
1570
|
-
if (!override)
|
|
1571
|
-
continue;
|
|
1572
|
-
if (!override.pointer) {
|
|
1573
|
-
delete merged[override.slot];
|
|
1574
|
-
} else {
|
|
1575
|
-
merged[override.slot] = override.pointer;
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
return merged;
|
|
1579
|
-
}
|
|
1580
|
-
function mergePolicies(blueprint, additional) {
|
|
1581
|
-
return dedupeRefs([...blueprint, ...additional], policyKey);
|
|
1582
|
-
}
|
|
1583
|
-
function mergeTheme(blueprint, override) {
|
|
1584
|
-
if (!blueprint && !override)
|
|
1585
|
-
return;
|
|
1586
|
-
const primary = override?.primary ?? blueprint?.primary;
|
|
1587
|
-
if (!primary)
|
|
1588
|
-
return;
|
|
1589
|
-
const fallbacks = override?.fallbacks ?? blueprint?.fallbacks ?? [];
|
|
1590
|
-
return { primary, fallbacks };
|
|
1591
|
-
}
|
|
1592
|
-
function mergeTelemetry(blueprint, override) {
|
|
1593
|
-
if (!blueprint && !override)
|
|
1594
|
-
return;
|
|
1595
|
-
const binding = {
|
|
1596
|
-
spec: blueprint?.spec,
|
|
1597
|
-
disabledEvents: blueprint?.disabledEvents ? [...blueprint.disabledEvents] : undefined,
|
|
1598
|
-
samplingOverrides: blueprint?.samplingOverrides ? { ...blueprint.samplingOverrides } : undefined
|
|
1599
|
-
};
|
|
1600
|
-
if (override?.spec !== undefined) {
|
|
1601
|
-
binding.spec = override.spec ?? undefined;
|
|
1602
|
-
}
|
|
1603
|
-
if (override?.disabledEvents) {
|
|
1604
|
-
binding.disabledEvents = dedupeStrings([
|
|
1605
|
-
...binding.disabledEvents ?? [],
|
|
1606
|
-
...override.disabledEvents
|
|
1607
|
-
]);
|
|
1608
|
-
}
|
|
1609
|
-
if (override?.samplingOverrides) {
|
|
1610
|
-
binding.samplingOverrides = {
|
|
1611
|
-
...binding.samplingOverrides ?? {},
|
|
1612
|
-
...override.samplingOverrides
|
|
1613
|
-
};
|
|
1614
|
-
}
|
|
1615
|
-
if (!binding.spec && !binding.disabledEvents?.length) {
|
|
1616
|
-
return;
|
|
1617
|
-
}
|
|
1618
|
-
return binding;
|
|
1619
|
-
}
|
|
1620
|
-
function mergeExperiments(blueprint, tenant) {
|
|
1621
|
-
const defaultActive = blueprint?.active ?? [];
|
|
1622
|
-
const defaultPaused = blueprint?.paused ?? [];
|
|
1623
|
-
const tenantActive = tenant?.active;
|
|
1624
|
-
const tenantPaused = tenant?.paused;
|
|
1625
|
-
const activeSource = tenantActive && tenantActive.length > 0 ? tenantActive : defaultActive;
|
|
1626
|
-
const pausedSource = tenantPaused && tenantPaused.length > 0 ? tenantPaused : defaultPaused;
|
|
1627
|
-
const active = dedupeRefs(activeSource, experimentKey);
|
|
1628
|
-
let paused = dedupeRefs(pausedSource, experimentKey);
|
|
1629
|
-
const activeKeys = new Set(active.map(experimentKey));
|
|
1630
|
-
paused = paused.filter((ref) => !activeKeys.has(experimentKey(ref)));
|
|
1631
|
-
const catalog = dedupeRefs([
|
|
1632
|
-
...defaultActive,
|
|
1633
|
-
...defaultPaused,
|
|
1634
|
-
...tenantActive ?? [],
|
|
1635
|
-
...tenantPaused ?? []
|
|
1636
|
-
], experimentKey);
|
|
1637
|
-
return { catalog, active, paused };
|
|
1638
|
-
}
|
|
1639
|
-
function resolveBranding(defaults, tenant) {
|
|
1640
|
-
const override = tenant.branding;
|
|
1641
|
-
const tenantMeta = tenant.meta;
|
|
1642
|
-
const baseDomain = "app.localhost";
|
|
1643
|
-
const domain = override?.customDomain ?? (override?.subdomain ? `${override.subdomain}.${baseDomain}` : `${tenantMeta.tenantId}.${baseDomain}`);
|
|
1644
|
-
const localePreferenceOrder = [];
|
|
1645
|
-
if (tenant.locales?.defaultLocale) {
|
|
1646
|
-
localePreferenceOrder.push(tenant.locales.defaultLocale);
|
|
1647
|
-
}
|
|
1648
|
-
if (override?.appName) {
|
|
1649
|
-
localePreferenceOrder.push("default", "en");
|
|
1650
|
-
}
|
|
1651
|
-
let appName;
|
|
1652
|
-
if (override?.appName) {
|
|
1653
|
-
for (const key of localePreferenceOrder) {
|
|
1654
|
-
const candidate = override.appName[key];
|
|
1655
|
-
if (candidate) {
|
|
1656
|
-
appName = candidate;
|
|
1657
|
-
break;
|
|
1658
|
-
}
|
|
1659
|
-
}
|
|
1660
|
-
if (!appName) {
|
|
1661
|
-
const [, firstValue] = Object.entries(override.appName)[0] ?? [];
|
|
1662
|
-
if (typeof firstValue === "string") {
|
|
1663
|
-
appName = firstValue;
|
|
1664
|
-
}
|
|
1665
|
-
}
|
|
1666
|
-
}
|
|
1667
|
-
if (!appName) {
|
|
1668
|
-
appName = defaults?.appNameKey ?? tenantMeta.appId;
|
|
1669
|
-
}
|
|
1670
|
-
const assetEntries = new Map;
|
|
1671
|
-
const applyAssets = (assets2) => {
|
|
1672
|
-
if (!assets2)
|
|
1673
|
-
return;
|
|
1674
|
-
for (const asset of assets2) {
|
|
1675
|
-
if (!asset?.type)
|
|
1676
|
-
continue;
|
|
1677
|
-
if ("url" in asset && asset.url) {
|
|
1678
|
-
assetEntries.set(asset.type, asset.url);
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1681
|
-
};
|
|
1682
|
-
applyAssets(defaults?.assets);
|
|
1683
|
-
applyAssets(override?.assets);
|
|
1684
|
-
const assets = {
|
|
1685
|
-
logo: assetEntries.get("logo"),
|
|
1686
|
-
logoDark: assetEntries.get("logo-dark"),
|
|
1687
|
-
favicon: assetEntries.get("favicon"),
|
|
1688
|
-
ogImage: assetEntries.get("og-image")
|
|
1689
|
-
};
|
|
1690
|
-
const colors = {
|
|
1691
|
-
primary: override?.colors?.primary ?? defaults?.colorTokens?.primary ?? "#1f2937",
|
|
1692
|
-
secondary: override?.colors?.secondary ?? defaults?.colorTokens?.secondary ?? "#4b5563"
|
|
1693
|
-
};
|
|
1694
|
-
return {
|
|
1695
|
-
appName,
|
|
1696
|
-
assets,
|
|
1697
|
-
colors,
|
|
1698
|
-
domain
|
|
1699
|
-
};
|
|
1700
|
-
}
|
|
1701
|
-
function resolveTranslation(catalogPointer, locales, overrides) {
|
|
1702
|
-
const defaultLocale = locales?.defaultLocale ?? "en";
|
|
1703
|
-
const enabled = locales?.enabledLocales ?? [];
|
|
1704
|
-
const supportedLocales = dedupeStrings([defaultLocale, ...enabled]);
|
|
1705
|
-
const entries = overrides?.entries ?? [];
|
|
1706
|
-
return {
|
|
1707
|
-
defaultLocale,
|
|
1708
|
-
supportedLocales,
|
|
1709
|
-
blueprintCatalog: catalogPointer,
|
|
1710
|
-
tenantOverrides: entries
|
|
1711
|
-
};
|
|
1712
|
-
}
|
|
1713
|
-
function mergeFeatureFlags(blueprint, overrides) {
|
|
1714
|
-
const merged = new Map;
|
|
1715
|
-
for (const flag of blueprint) {
|
|
1716
|
-
merged.set(flag.key, { ...flag });
|
|
1717
|
-
}
|
|
1718
|
-
for (const override of overrides) {
|
|
1719
|
-
merged.set(override.key, { ...override });
|
|
1720
|
-
}
|
|
1721
|
-
return [...merged.values()];
|
|
1722
|
-
}
|
|
1723
|
-
function mergeRoutes(blueprint, overrides) {
|
|
1724
|
-
const routes = new Map;
|
|
1725
|
-
for (const route of blueprint) {
|
|
1726
|
-
routes.set(route.path, { ...route });
|
|
1727
|
-
}
|
|
1728
|
-
for (const override of overrides) {
|
|
1729
|
-
const existing = routes.get(override.path) ?? { path: override.path };
|
|
1730
|
-
if (override.label !== undefined) {
|
|
1731
|
-
if (override.label === null)
|
|
1732
|
-
delete existing.label;
|
|
1733
|
-
else
|
|
1734
|
-
existing.label = override.label;
|
|
1735
|
-
}
|
|
1736
|
-
if (override.dataView !== undefined) {
|
|
1737
|
-
if (override.dataView === null)
|
|
1738
|
-
delete existing.dataView;
|
|
1739
|
-
else
|
|
1740
|
-
existing.dataView = override.dataView;
|
|
1741
|
-
}
|
|
1742
|
-
if (override.workflow !== undefined) {
|
|
1743
|
-
if (override.workflow === null)
|
|
1744
|
-
delete existing.workflow;
|
|
1745
|
-
else
|
|
1746
|
-
existing.workflow = override.workflow;
|
|
1747
|
-
}
|
|
1748
|
-
if (override.guard !== undefined) {
|
|
1749
|
-
if (override.guard === null)
|
|
1750
|
-
delete existing.guard;
|
|
1751
|
-
else
|
|
1752
|
-
existing.guard = override.guard;
|
|
1753
|
-
}
|
|
1754
|
-
if (override.featureFlag !== undefined) {
|
|
1755
|
-
if (override.featureFlag === null)
|
|
1756
|
-
delete existing.featureFlag;
|
|
1757
|
-
else
|
|
1758
|
-
existing.featureFlag = override.featureFlag;
|
|
1759
|
-
}
|
|
1760
|
-
if (override.experiment !== undefined) {
|
|
1761
|
-
if (override.experiment === null)
|
|
1762
|
-
delete existing.experiment;
|
|
1763
|
-
else
|
|
1764
|
-
existing.experiment = override.experiment;
|
|
1765
|
-
}
|
|
1766
|
-
routes.set(existing.path, existing);
|
|
1767
|
-
}
|
|
1768
|
-
return [...routes.values()];
|
|
1769
|
-
}
|
|
1770
|
-
function evaluateIntegrationSlots(slots, bindings, connections, specs) {
|
|
1771
|
-
const resolved = [];
|
|
1772
|
-
const missing = [];
|
|
1773
|
-
const missingKeys = new Set;
|
|
1774
|
-
const recordMissing = (entry) => {
|
|
1775
|
-
const key = `${entry.type}:${entry.identifier}`;
|
|
1776
|
-
if (missingKeys.has(key))
|
|
1777
|
-
return;
|
|
1778
|
-
missingKeys.add(key);
|
|
1779
|
-
missing.push(entry);
|
|
1780
|
-
};
|
|
1781
|
-
const slotList = slots ?? [];
|
|
1782
|
-
const slotById = new Map;
|
|
1783
|
-
for (const slot of slotList) {
|
|
1784
|
-
slotById.set(slot.slotId, slot);
|
|
1785
|
-
}
|
|
1786
|
-
const bindingsBySlot = new Map;
|
|
1787
|
-
for (const binding of bindings ?? []) {
|
|
1788
|
-
const slot = slotById.get(binding.slotId);
|
|
1789
|
-
if (!slot) {
|
|
1790
|
-
recordMissing({
|
|
1791
|
-
type: "integrationSlot",
|
|
1792
|
-
identifier: `slot:${binding.slotId}`
|
|
1793
|
-
});
|
|
1794
|
-
continue;
|
|
1795
|
-
}
|
|
1796
|
-
const entries = bindingsBySlot.get(binding.slotId);
|
|
1797
|
-
if (entries)
|
|
1798
|
-
entries.push(binding);
|
|
1799
|
-
else
|
|
1800
|
-
bindingsBySlot.set(binding.slotId, [binding]);
|
|
1801
|
-
}
|
|
1802
|
-
for (const slot of slotList) {
|
|
1803
|
-
const slotBindings = bindingsBySlot.get(slot.slotId) ?? [];
|
|
1804
|
-
if (slot.required && slotBindings.length === 0) {
|
|
1805
|
-
recordMissing({
|
|
1806
|
-
type: "integrationSlot",
|
|
1807
|
-
identifier: `slot:${slot.slotId}`
|
|
1808
|
-
});
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
if (!connections || !specs) {
|
|
1812
|
-
return { resolved, missing };
|
|
1813
|
-
}
|
|
1814
|
-
const connectionById = new Map;
|
|
1815
|
-
for (const connection of connections) {
|
|
1816
|
-
connectionById.set(connection.meta.id, connection);
|
|
1817
|
-
}
|
|
1818
|
-
for (const slot of slotList) {
|
|
1819
|
-
const slotBindings = bindingsBySlot.get(slot.slotId) ?? [];
|
|
1820
|
-
if (slotBindings.length === 0)
|
|
1821
|
-
continue;
|
|
1822
|
-
const orderedBindings = [...slotBindings].sort((a, b) => {
|
|
1823
|
-
const aPriority = a.priority ?? Number.MAX_SAFE_INTEGER;
|
|
1824
|
-
const bPriority = b.priority ?? Number.MAX_SAFE_INTEGER;
|
|
1825
|
-
if (aPriority === bPriority)
|
|
1826
|
-
return 0;
|
|
1827
|
-
return aPriority < bPriority ? -1 : 1;
|
|
1828
|
-
});
|
|
1829
|
-
let slotResolved = false;
|
|
1830
|
-
for (const binding of orderedBindings) {
|
|
1831
|
-
const connection = connectionById.get(binding.connectionId);
|
|
1832
|
-
if (!connection) {
|
|
1833
|
-
recordMissing({
|
|
1834
|
-
type: "integrationConnection",
|
|
1835
|
-
identifier: `connection:${binding.connectionId}`
|
|
1836
|
-
});
|
|
1837
|
-
continue;
|
|
1838
|
-
}
|
|
1839
|
-
const spec = specs.get(connection.meta.integrationKey, connection.meta.integrationVersion);
|
|
1840
|
-
if (!spec) {
|
|
1841
|
-
recordMissing({
|
|
1842
|
-
type: "integrationSpec",
|
|
1843
|
-
identifier: `spec:${connection.meta.integrationKey}.v${connection.meta.integrationVersion}`
|
|
1844
|
-
});
|
|
1845
|
-
continue;
|
|
1846
|
-
}
|
|
1847
|
-
if (spec.meta.category !== slot.requiredCategory) {
|
|
1848
|
-
recordMissing({
|
|
1849
|
-
type: "integrationSpec",
|
|
1850
|
-
identifier: `spec:${spec.meta.key}.category`
|
|
1851
|
-
});
|
|
1852
|
-
continue;
|
|
1853
|
-
}
|
|
1854
|
-
if (!spec.supportedModes.includes(connection.ownershipMode)) {
|
|
1855
|
-
recordMissing({
|
|
1856
|
-
type: "integrationSpec",
|
|
1857
|
-
identifier: `spec:${spec.meta.key}.mode:${connection.ownershipMode}`
|
|
1858
|
-
});
|
|
1859
|
-
continue;
|
|
1860
|
-
}
|
|
1861
|
-
if (slot.allowedModes && slot.allowedModes.length > 0 && !slot.allowedModes.includes(connection.ownershipMode)) {
|
|
1862
|
-
recordMissing({
|
|
1863
|
-
type: "integrationConnection",
|
|
1864
|
-
identifier: `connection:${connection.meta.id}:mode`
|
|
1865
|
-
});
|
|
1866
|
-
continue;
|
|
1867
|
-
}
|
|
1868
|
-
if (slot.requiredCapabilities && !slot.requiredCapabilities.every((requirement) => integrationProvidesCapability(spec, requirement))) {
|
|
1869
|
-
recordMissing({
|
|
1870
|
-
type: "integrationSpec",
|
|
1871
|
-
identifier: `spec:${spec.meta.key}.capabilities`
|
|
1872
|
-
});
|
|
1873
|
-
continue;
|
|
1874
|
-
}
|
|
1875
|
-
resolved.push({
|
|
1876
|
-
slot,
|
|
1877
|
-
binding,
|
|
1878
|
-
connection,
|
|
1879
|
-
spec
|
|
1880
|
-
});
|
|
1881
|
-
slotResolved = true;
|
|
1882
|
-
break;
|
|
1883
|
-
}
|
|
1884
|
-
if (!slotResolved && slot.required) {
|
|
1885
|
-
recordMissing({
|
|
1886
|
-
type: "integrationSlot",
|
|
1887
|
-
identifier: `slot:${slot.slotId}`
|
|
1888
|
-
});
|
|
1889
|
-
}
|
|
1890
|
-
}
|
|
1891
|
-
return { resolved, missing };
|
|
1892
|
-
}
|
|
1893
|
-
function integrationProvidesCapability(spec, required) {
|
|
1894
|
-
return spec.capabilities.provides.some((capability) => {
|
|
1895
|
-
if (capability.key !== required.key)
|
|
1896
|
-
return false;
|
|
1897
|
-
if (required.version == null)
|
|
1898
|
-
return true;
|
|
1899
|
-
return capability.version === required.version;
|
|
1900
|
-
});
|
|
1901
|
-
}
|
|
1902
|
-
function resolveKnowledgeBindings(bindings, spaces, sources) {
|
|
1903
|
-
if (!bindings?.length || !spaces)
|
|
1904
|
-
return [];
|
|
1905
|
-
const sourceList = sources ?? [];
|
|
1906
|
-
return bindings.map((binding) => {
|
|
1907
|
-
const space = spaces.get(binding.spaceKey, binding.spaceVersion);
|
|
1908
|
-
if (!space)
|
|
1909
|
-
return null;
|
|
1910
|
-
const relevantSources = sourceList.filter((source) => {
|
|
1911
|
-
if (source.meta.spaceKey !== binding.spaceKey)
|
|
1912
|
-
return false;
|
|
1913
|
-
if (binding.spaceVersion != null) {
|
|
1914
|
-
return source.meta.spaceVersion === binding.spaceVersion;
|
|
1915
|
-
}
|
|
1916
|
-
return true;
|
|
1917
|
-
});
|
|
1918
|
-
return {
|
|
1919
|
-
binding,
|
|
1920
|
-
space,
|
|
1921
|
-
sources: relevantSources
|
|
1922
|
-
};
|
|
1923
|
-
}).filter((entry) => entry !== null);
|
|
1924
|
-
}
|
|
1925
|
-
function collectMissingKnowledge(bindings, spaces, sources) {
|
|
1926
|
-
if (!bindings.length || !spaces)
|
|
1927
|
-
return [];
|
|
1928
|
-
const missing = [];
|
|
1929
|
-
const sourceList = sources ?? [];
|
|
1930
|
-
for (const binding of bindings) {
|
|
1931
|
-
const space = spaces.get(binding.spaceKey, binding.spaceVersion);
|
|
1932
|
-
if (!space) {
|
|
1933
|
-
missing.push({
|
|
1934
|
-
type: "knowledgeSpace",
|
|
1935
|
-
identifier: binding.spaceVersion ? `${binding.spaceKey}@${binding.spaceVersion}` : binding.spaceKey
|
|
1936
|
-
});
|
|
1937
|
-
continue;
|
|
1938
|
-
}
|
|
1939
|
-
if (sources) {
|
|
1940
|
-
const relevantSources = sourceList.filter((source) => {
|
|
1941
|
-
if (source.meta.spaceKey !== binding.spaceKey)
|
|
1942
|
-
return false;
|
|
1943
|
-
if (binding.spaceVersion != null) {
|
|
1944
|
-
return source.meta.spaceVersion === binding.spaceVersion;
|
|
1945
|
-
}
|
|
1946
|
-
return true;
|
|
1947
|
-
});
|
|
1948
|
-
if (relevantSources.length === 0) {
|
|
1949
|
-
missing.push({
|
|
1950
|
-
type: "knowledgeSource",
|
|
1951
|
-
identifier: binding.spaceVersion ? `${binding.spaceKey}@${binding.spaceVersion}` : binding.spaceKey
|
|
1952
|
-
});
|
|
1953
|
-
}
|
|
1954
|
-
}
|
|
1955
|
-
}
|
|
1956
|
-
return missing;
|
|
1957
|
-
}
|
|
1958
|
-
function resolveCapabilityRefs(refs, registry2, missing) {
|
|
1959
|
-
if (!registry2) {
|
|
1960
|
-
if (refs.length > 0) {
|
|
1961
|
-
for (const ref of refs) {
|
|
1962
|
-
missing.push({
|
|
1963
|
-
type: "capability",
|
|
1964
|
-
identifier: capabilityKey2(ref)
|
|
1965
|
-
});
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
return [];
|
|
1969
|
-
}
|
|
1970
|
-
const resolved = [];
|
|
1971
|
-
for (const ref of refs) {
|
|
1972
|
-
const spec = registry2.get(ref.key, ref.version);
|
|
1973
|
-
if (!spec) {
|
|
1974
|
-
missing.push({
|
|
1975
|
-
type: "capability",
|
|
1976
|
-
identifier: capabilityKey2(ref)
|
|
1977
|
-
});
|
|
1978
|
-
continue;
|
|
1979
|
-
}
|
|
1980
|
-
resolved.push(spec);
|
|
1981
|
-
}
|
|
1982
|
-
return resolved;
|
|
1983
|
-
}
|
|
1984
|
-
function resolveFeatureRefs(refs, registry2, missing) {
|
|
1985
|
-
if (!registry2) {
|
|
1986
|
-
if (refs.length > 0) {
|
|
1987
|
-
for (const ref of refs) {
|
|
1988
|
-
missing.push({ type: "feature", identifier: ref.key });
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
return [];
|
|
1992
|
-
}
|
|
1993
|
-
const resolved = [];
|
|
1994
|
-
for (const ref of refs) {
|
|
1995
|
-
const spec = registry2.get(ref.key);
|
|
1996
|
-
if (!spec) {
|
|
1997
|
-
missing.push({ type: "feature", identifier: ref.key });
|
|
1998
|
-
continue;
|
|
1999
|
-
}
|
|
2000
|
-
resolved.push(spec);
|
|
2001
|
-
}
|
|
2002
|
-
return resolved;
|
|
2003
|
-
}
|
|
2004
|
-
function resolvePointerRecord(record, registry2, type, missing) {
|
|
2005
|
-
if (!registry2) {
|
|
2006
|
-
if (Object.keys(record).length > 0) {
|
|
2007
|
-
for (const [slot, pointer] of Object.entries(record)) {
|
|
2008
|
-
missing.push({
|
|
2009
|
-
type,
|
|
2010
|
-
identifier: `${slot} -> ${specPointerKey(pointer)}`
|
|
2011
|
-
});
|
|
2012
|
-
}
|
|
2013
|
-
}
|
|
2014
|
-
return {};
|
|
2015
|
-
}
|
|
2016
|
-
const resolved = {};
|
|
2017
|
-
for (const [slot, pointer] of Object.entries(record)) {
|
|
2018
|
-
const spec = registry2.get(pointer.key, pointer.version);
|
|
2019
|
-
if (!spec) {
|
|
2020
|
-
missing.push({
|
|
2021
|
-
type,
|
|
2022
|
-
identifier: `${slot} -> ${specPointerKey(pointer)}`
|
|
2023
|
-
});
|
|
2024
|
-
continue;
|
|
2025
|
-
}
|
|
2026
|
-
resolved[slot] = spec;
|
|
2027
|
-
}
|
|
2028
|
-
return resolved;
|
|
2029
|
-
}
|
|
2030
|
-
function resolvePolicies(policies, registry2, missing) {
|
|
2031
|
-
if (!registry2) {
|
|
2032
|
-
if (policies.length > 0) {
|
|
2033
|
-
for (const policy of policies) {
|
|
2034
|
-
missing.push({
|
|
2035
|
-
type: "policy",
|
|
2036
|
-
identifier: policyKey(policy)
|
|
2037
|
-
});
|
|
2038
|
-
}
|
|
2039
|
-
}
|
|
2040
|
-
return [];
|
|
2041
|
-
}
|
|
2042
|
-
const resolved = [];
|
|
2043
|
-
for (const policy of policies) {
|
|
2044
|
-
const spec = registry2.get(policy.key, policy.version);
|
|
2045
|
-
if (!spec) {
|
|
2046
|
-
missing.push({
|
|
2047
|
-
type: "policy",
|
|
2048
|
-
identifier: policyKey(policy)
|
|
2049
|
-
});
|
|
2050
|
-
continue;
|
|
2051
|
-
}
|
|
2052
|
-
resolved.push(spec);
|
|
2053
|
-
}
|
|
2054
|
-
return resolved;
|
|
2055
|
-
}
|
|
2056
|
-
function resolveThemeBinding(binding, registry2) {
|
|
2057
|
-
const themeMissing = [];
|
|
2058
|
-
if (!binding) {
|
|
2059
|
-
return { theme: undefined, fallbacks: [], themeMissing };
|
|
2060
|
-
}
|
|
2061
|
-
if (!registry2) {
|
|
2062
|
-
themeMissing.push({
|
|
2063
|
-
type: "theme",
|
|
2064
|
-
identifier: `${binding.primary.key}.v${binding.primary.version}`
|
|
2065
|
-
});
|
|
2066
|
-
for (const fallback of binding.fallbacks ?? []) {
|
|
2067
|
-
themeMissing.push({
|
|
2068
|
-
type: "theme",
|
|
2069
|
-
identifier: `${fallback.key}.v${fallback.version}`
|
|
2070
|
-
});
|
|
2071
|
-
}
|
|
2072
|
-
return { theme: undefined, fallbacks: [], themeMissing };
|
|
2073
|
-
}
|
|
2074
|
-
const theme = registry2.get(binding.primary.key, binding.primary.version);
|
|
2075
|
-
if (!theme) {
|
|
2076
|
-
themeMissing.push({
|
|
2077
|
-
type: "theme",
|
|
2078
|
-
identifier: `${binding.primary.key}.v${binding.primary.version}`
|
|
2079
|
-
});
|
|
2080
|
-
}
|
|
2081
|
-
const fallbacks = [];
|
|
2082
|
-
for (const fallback of binding.fallbacks ?? []) {
|
|
2083
|
-
const spec = registry2.get(fallback.key, fallback.version);
|
|
2084
|
-
if (!spec) {
|
|
2085
|
-
themeMissing.push({
|
|
2086
|
-
type: "theme",
|
|
2087
|
-
identifier: `${fallback.key}.v${fallback.version}`
|
|
2088
|
-
});
|
|
2089
|
-
continue;
|
|
2090
|
-
}
|
|
2091
|
-
fallbacks.push(spec);
|
|
2092
|
-
}
|
|
2093
|
-
return { theme: theme ?? undefined, fallbacks, themeMissing };
|
|
2094
|
-
}
|
|
2095
|
-
function resolveTelemetryBinding(binding, registry2) {
|
|
2096
|
-
const telemetryMissing = [];
|
|
2097
|
-
if (!binding?.spec) {
|
|
2098
|
-
return { telemetry: undefined, telemetryMissing };
|
|
2099
|
-
}
|
|
2100
|
-
if (!registry2) {
|
|
2101
|
-
telemetryMissing.push({
|
|
2102
|
-
type: "telemetry",
|
|
2103
|
-
identifier: specPointerKey(binding.spec)
|
|
2104
|
-
});
|
|
2105
|
-
return { telemetry: undefined, telemetryMissing };
|
|
2106
|
-
}
|
|
2107
|
-
const telemetry = registry2.get(binding.spec.key, binding.spec.version);
|
|
2108
|
-
if (!telemetry) {
|
|
2109
|
-
telemetryMissing.push({
|
|
2110
|
-
type: "telemetry",
|
|
2111
|
-
identifier: specPointerKey(binding.spec)
|
|
2112
|
-
});
|
|
2113
|
-
}
|
|
2114
|
-
return { telemetry: telemetry ?? undefined, telemetryMissing };
|
|
2115
|
-
}
|
|
2116
|
-
function resolveExperimentsSpecs(experiments, registry2, missing) {
|
|
2117
|
-
const resolveList = (refs) => {
|
|
2118
|
-
if (refs.length === 0)
|
|
2119
|
-
return [];
|
|
2120
|
-
if (!registry2) {
|
|
2121
|
-
for (const ref of refs) {
|
|
2122
|
-
missing.push({
|
|
2123
|
-
type: "experiment",
|
|
2124
|
-
identifier: experimentKey(ref)
|
|
2125
|
-
});
|
|
2126
|
-
}
|
|
2127
|
-
return [];
|
|
2128
|
-
}
|
|
2129
|
-
const resolved = [];
|
|
2130
|
-
for (const ref of refs) {
|
|
2131
|
-
const spec = registry2.get(ref.key, ref.version);
|
|
2132
|
-
if (!spec) {
|
|
2133
|
-
missing.push({
|
|
2134
|
-
type: "experiment",
|
|
2135
|
-
identifier: experimentKey(ref)
|
|
2136
|
-
});
|
|
2137
|
-
continue;
|
|
2138
|
-
}
|
|
2139
|
-
resolved.push(spec);
|
|
2140
|
-
}
|
|
2141
|
-
return resolved;
|
|
2142
|
-
};
|
|
2143
|
-
return {
|
|
2144
|
-
active: resolveList(experiments.active),
|
|
2145
|
-
paused: resolveList(experiments.paused)
|
|
2146
|
-
};
|
|
2147
|
-
}
|
|
2148
|
-
function capabilityKey2(ref) {
|
|
2149
|
-
return `${ref.key}${ref.version ? `.v${ref.version}` : ""}`;
|
|
2150
|
-
}
|
|
2151
|
-
function featureKey(ref) {
|
|
2152
|
-
return ref.key;
|
|
2153
|
-
}
|
|
2154
|
-
function specPointerKey(pointer) {
|
|
2155
|
-
return `${pointer.key}${pointer.version ? `.v${pointer.version}` : ""}`;
|
|
2156
|
-
}
|
|
2157
|
-
function policyKey(ref) {
|
|
2158
|
-
return `${ref.key}${ref.version ? `.v${ref.version}` : ""}`;
|
|
2159
|
-
}
|
|
2160
|
-
function experimentKey(ref) {
|
|
2161
|
-
return `${ref.key}${ref.version ? `.v${ref.version}` : ""}`;
|
|
2162
|
-
}
|
|
2163
|
-
function dedupeRefs(refs, keyFn) {
|
|
2164
|
-
const map = new Map;
|
|
2165
|
-
for (const ref of refs) {
|
|
2166
|
-
map.set(keyFn(ref), ref);
|
|
2167
|
-
}
|
|
2168
|
-
return [...map.values()];
|
|
2169
|
-
}
|
|
2170
|
-
function dedupeStrings(values) {
|
|
2171
|
-
return [...new Set(values)];
|
|
2172
|
-
}
|
|
2173
|
-
|
|
2174
|
-
// src/app-config/validation.ts
|
|
2175
|
-
class ValidationRuleRegistry {
|
|
2176
|
-
blueprintRules = [];
|
|
2177
|
-
tenantRules = [];
|
|
2178
|
-
resolvedRules = [];
|
|
2179
|
-
register(rule) {
|
|
2180
|
-
if (rule.scope === "blueprint") {
|
|
2181
|
-
this.blueprintRules.push(rule);
|
|
2182
|
-
} else if (rule.scope === "tenant") {
|
|
2183
|
-
this.tenantRules.push(rule);
|
|
2184
|
-
} else {
|
|
2185
|
-
this.resolvedRules.push(rule);
|
|
2186
|
-
}
|
|
2187
|
-
return this;
|
|
2188
|
-
}
|
|
2189
|
-
validateBlueprint(blueprint, context2) {
|
|
2190
|
-
return dedupeIssues(this.blueprintRules.flatMap((rule) => rule.validate(blueprint, context2)));
|
|
2191
|
-
}
|
|
2192
|
-
validateTenant(blueprint, tenant, context2) {
|
|
2193
|
-
return dedupeIssues(this.tenantRules.flatMap((rule) => rule.validate(blueprint, tenant, context2)));
|
|
2194
|
-
}
|
|
2195
|
-
validateResolved(blueprint, resolved, context2) {
|
|
2196
|
-
return dedupeIssues(this.resolvedRules.flatMap((rule) => rule.validate(blueprint, resolved, context2)));
|
|
2197
|
-
}
|
|
2198
|
-
}
|
|
2199
|
-
var DOMAIN_REGEX = /^(?!:\/\/)([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.[A-Za-z]{2,}$/;
|
|
2200
|
-
var HTTPS_URL_REGEX = /^https:\/\//i;
|
|
2201
|
-
var ALLOWED_ASSET_EXTENSIONS = {
|
|
2202
|
-
logo: ["png", "svg", "webp"],
|
|
2203
|
-
"logo-dark": ["png", "svg", "webp"],
|
|
2204
|
-
favicon: ["ico", "png", "svg"],
|
|
2205
|
-
"og-image": ["png", "jpg", "jpeg", "webp"]
|
|
2206
|
-
};
|
|
2207
|
-
var EMPTY_CONTEXT = {};
|
|
2208
|
-
var registryInstance;
|
|
2209
|
-
function getRegistry() {
|
|
2210
|
-
if (!registryInstance) {
|
|
2211
|
-
registryInstance = createDefaultRegistry();
|
|
2212
|
-
}
|
|
2213
|
-
return registryInstance;
|
|
2214
|
-
}
|
|
2215
|
-
function validateConfig(blueprint, tenant, context2 = EMPTY_CONTEXT) {
|
|
2216
|
-
const registry2 = getRegistry();
|
|
2217
|
-
const blueprintResult = buildResult(registry2.validateBlueprint(blueprint, context2));
|
|
2218
|
-
const tenantResult = buildResult(registry2.validateTenant(blueprint, tenant, context2));
|
|
2219
|
-
return mergeResults(blueprintResult, tenantResult);
|
|
2220
|
-
}
|
|
2221
|
-
function validateBlueprint(blueprint, context2 = EMPTY_CONTEXT) {
|
|
2222
|
-
const issues = getRegistry().validateBlueprint(blueprint, context2);
|
|
2223
|
-
return buildResult(issues);
|
|
2224
|
-
}
|
|
2225
|
-
function validateTenantConfig(blueprint, tenant, context2 = EMPTY_CONTEXT) {
|
|
2226
|
-
const issues = getRegistry().validateTenant(blueprint, tenant, context2);
|
|
2227
|
-
return buildResult(issues);
|
|
2228
|
-
}
|
|
2229
|
-
function validateResolvedConfig(blueprint, resolved, context2 = EMPTY_CONTEXT) {
|
|
2230
|
-
const issues = getRegistry().validateResolved(blueprint, resolved, context2);
|
|
2231
|
-
return buildResult(issues);
|
|
2232
|
-
}
|
|
2233
|
-
function buildResult(issues) {
|
|
2234
|
-
const errors = issues.filter((issue) => issue.severity === "error");
|
|
2235
|
-
const warnings = issues.filter((issue) => issue.severity === "warning");
|
|
2236
|
-
const info = issues.filter((issue) => issue.severity === "info");
|
|
2237
|
-
return {
|
|
2238
|
-
valid: errors.length === 0,
|
|
2239
|
-
errors,
|
|
2240
|
-
warnings,
|
|
2241
|
-
info
|
|
2242
|
-
};
|
|
2243
|
-
}
|
|
2244
|
-
function mergeResults(...results) {
|
|
2245
|
-
const errors = results.flatMap((result) => result.errors);
|
|
2246
|
-
const warnings = results.flatMap((result) => result.warnings);
|
|
2247
|
-
const info = results.flatMap((result) => result.info);
|
|
2248
|
-
return {
|
|
2249
|
-
valid: errors.length === 0,
|
|
2250
|
-
errors,
|
|
2251
|
-
warnings,
|
|
2252
|
-
info
|
|
2253
|
-
};
|
|
2254
|
-
}
|
|
2255
|
-
function createDefaultRegistry() {
|
|
2256
|
-
return new ValidationRuleRegistry().register(blueprintIntegrationSlotRule).register(blueprintCapabilityRegistryRule).register(tenantCapabilityRule).register(tenantIntegrationBindingRule).register(tenantKnowledgeRule).register(tenantBrandingRule).register(tenantTranslationRule).register(resolvedIntegrationRule).register(resolvedTranslationRule);
|
|
2257
|
-
}
|
|
2258
|
-
var blueprintIntegrationSlotRule = {
|
|
2259
|
-
scope: "blueprint",
|
|
2260
|
-
name: "integration.duplicate-slots",
|
|
2261
|
-
category: "integration",
|
|
2262
|
-
validate(blueprint) {
|
|
2263
|
-
const issues = [];
|
|
2264
|
-
const seen = new Set;
|
|
2265
|
-
for (const slot of blueprint.integrationSlots ?? []) {
|
|
2266
|
-
if (seen.has(slot.slotId)) {
|
|
2267
|
-
issues.push(issue({
|
|
2268
|
-
code: "DUPLICATE_SLOT",
|
|
2269
|
-
severity: "error",
|
|
2270
|
-
path: `integrationSlots.${slot.slotId}`,
|
|
2271
|
-
message: `Duplicate integration slot id "${slot.slotId}".`
|
|
2272
|
-
}));
|
|
2273
|
-
} else {
|
|
2274
|
-
seen.add(slot.slotId);
|
|
2275
|
-
}
|
|
2276
|
-
if (slot.allowedModes && slot.allowedModes.length === 0) {
|
|
2277
|
-
issues.push(issue({
|
|
2278
|
-
code: "EMPTY_ALLOWED_MODES",
|
|
2279
|
-
severity: "warning",
|
|
2280
|
-
path: `integrationSlots.${slot.slotId}.allowedModes`,
|
|
2281
|
-
message: "allowedModes is empty; the slot will accept any supported mode."
|
|
2282
|
-
}));
|
|
2283
|
-
}
|
|
2284
|
-
}
|
|
2285
|
-
if (blueprint.branding && !blueprint.branding.appNameKey.trim()) {
|
|
2286
|
-
issues.push(issue({
|
|
2287
|
-
code: "MISSING_APP_NAME_KEY",
|
|
2288
|
-
severity: "warning",
|
|
2289
|
-
path: "branding.appNameKey",
|
|
2290
|
-
message: "branding.appNameKey should reference a translation catalog key."
|
|
2291
|
-
}));
|
|
2292
|
-
}
|
|
2293
|
-
return issues;
|
|
2294
|
-
}
|
|
2295
|
-
};
|
|
2296
|
-
var blueprintCapabilityRegistryRule = {
|
|
2297
|
-
scope: "blueprint",
|
|
2298
|
-
name: "capability.registry-check",
|
|
2299
|
-
category: "capability",
|
|
2300
|
-
validate(blueprint, context2) {
|
|
2301
|
-
const issues = [];
|
|
2302
|
-
const registry2 = context2.capabilities;
|
|
2303
|
-
if (!registry2)
|
|
2304
|
-
return issues;
|
|
2305
|
-
const required = blueprint.capabilities?.enabled ?? [];
|
|
2306
|
-
required.forEach((ref, index) => {
|
|
2307
|
-
if (!registry2.get(ref.key, ref.version)) {
|
|
2308
|
-
issues.push(issue({
|
|
2309
|
-
code: "MISSING_CAPABILITY",
|
|
2310
|
-
severity: "error",
|
|
2311
|
-
path: `capabilities.enabled[${index}]`,
|
|
2312
|
-
message: `Capability "${ref.key}@${ref.version}" is not registered.`
|
|
2313
|
-
}));
|
|
2314
|
-
}
|
|
2315
|
-
});
|
|
2316
|
-
return issues;
|
|
2317
|
-
}
|
|
2318
|
-
};
|
|
2319
|
-
var tenantCapabilityRule = {
|
|
2320
|
-
scope: "tenant",
|
|
2321
|
-
name: "capability.required-enabled",
|
|
2322
|
-
category: "capability",
|
|
2323
|
-
validate(blueprint, tenant, context2) {
|
|
2324
|
-
const issues = [];
|
|
2325
|
-
const registry2 = context2.capabilities;
|
|
2326
|
-
const requiredKeys = new Set((blueprint.capabilities?.enabled ?? []).map(capabilityRefKey));
|
|
2327
|
-
const disabled = tenant.capabilities?.disable ?? [];
|
|
2328
|
-
disabled.forEach((ref, index) => {
|
|
2329
|
-
if (requiredKeys.has(capabilityRefKey(ref))) {
|
|
2330
|
-
issues.push(issue({
|
|
2331
|
-
code: "DISABLED_REQUIRED_CAPABILITY",
|
|
2332
|
-
severity: "error",
|
|
2333
|
-
path: `capabilities.disable[${index}]`,
|
|
2334
|
-
message: `Capability "${ref.key}@${ref.version}" is required by the blueprint and cannot be disabled.`
|
|
2335
|
-
}));
|
|
2336
|
-
}
|
|
2337
|
-
});
|
|
2338
|
-
if (registry2) {
|
|
2339
|
-
(tenant.capabilities?.enable ?? []).forEach((ref, index) => {
|
|
2340
|
-
if (!registry2.get(ref.key, ref.version)) {
|
|
2341
|
-
issues.push(issue({
|
|
2342
|
-
code: "UNKNOWN_CAPABILITY_ENABLE",
|
|
2343
|
-
severity: "error",
|
|
2344
|
-
path: `capabilities.enable[${index}]`,
|
|
2345
|
-
message: `Capability "${ref.key}@${ref.version}" is not registered.`
|
|
2346
|
-
}));
|
|
2347
|
-
}
|
|
2348
|
-
});
|
|
2349
|
-
disabled.forEach((ref, index) => {
|
|
2350
|
-
if (!registry2.get(ref.key, ref.version)) {
|
|
2351
|
-
issues.push(issue({
|
|
2352
|
-
code: "UNKNOWN_CAPABILITY_DISABLE",
|
|
2353
|
-
severity: "warning",
|
|
2354
|
-
path: `capabilities.disable[${index}]`,
|
|
2355
|
-
message: `Capability "${ref.key}@${ref.version}" is not registered.`
|
|
2356
|
-
}));
|
|
2357
|
-
}
|
|
2358
|
-
});
|
|
2359
|
-
}
|
|
2360
|
-
return issues;
|
|
2361
|
-
}
|
|
2362
|
-
};
|
|
2363
|
-
var tenantIntegrationBindingRule = {
|
|
2364
|
-
scope: "tenant",
|
|
2365
|
-
name: "integration.slot-binding",
|
|
2366
|
-
category: "integration",
|
|
2367
|
-
validate(blueprint, tenant, context2) {
|
|
2368
|
-
const issues = [];
|
|
2369
|
-
const slots = new Map((blueprint.integrationSlots ?? []).map((slot) => [slot.slotId, slot]));
|
|
2370
|
-
const bindings = tenant.integrations ?? [];
|
|
2371
|
-
const connections = context2.tenantConnections?.reduce((map, connection) => map.set(connection.meta.id, connection), new Map) ?? new Map;
|
|
2372
|
-
const satisfiedSlots = new Set;
|
|
2373
|
-
bindings.forEach((binding) => {
|
|
2374
|
-
const path = `integrations.${binding.slotId}`;
|
|
2375
|
-
const slot = slots.get(binding.slotId);
|
|
2376
|
-
if (!slot) {
|
|
2377
|
-
issues.push(issue({
|
|
2378
|
-
code: "UNKNOWN_SLOT_BINDING",
|
|
2379
|
-
severity: "error",
|
|
2380
|
-
path,
|
|
2381
|
-
message: `Integration slot "${binding.slotId}" is not defined in the blueprint.`
|
|
2382
|
-
}));
|
|
2383
|
-
return;
|
|
2384
|
-
}
|
|
2385
|
-
let slotValid = true;
|
|
2386
|
-
const connection = connections.get(binding.connectionId);
|
|
2387
|
-
if (!connection) {
|
|
2388
|
-
issues.push(issue({
|
|
2389
|
-
code: "MISSING_INTEGRATION_CONNECTION",
|
|
2390
|
-
severity: "error",
|
|
2391
|
-
path,
|
|
2392
|
-
message: `Integration connection "${binding.connectionId}" was not found for tenant "${tenant.meta.tenantId}".`
|
|
2393
|
-
}));
|
|
2394
|
-
slotValid = false;
|
|
2395
|
-
return;
|
|
2396
|
-
}
|
|
2397
|
-
if (connection.meta.tenantId !== tenant.meta.tenantId) {
|
|
2398
|
-
issues.push(issue({
|
|
2399
|
-
code: "FOREIGN_CONNECTION",
|
|
2400
|
-
severity: "error",
|
|
2401
|
-
path,
|
|
2402
|
-
message: `Connection "${binding.connectionId}" belongs to tenant "${connection.meta.tenantId}", not "${tenant.meta.tenantId}".`
|
|
2403
|
-
}));
|
|
2404
|
-
slotValid = false;
|
|
2405
|
-
}
|
|
2406
|
-
if (slot.allowedModes && slot.allowedModes.length > 0) {
|
|
2407
|
-
if (!slot.allowedModes.includes(connection.ownershipMode)) {
|
|
2408
|
-
issues.push(issue({
|
|
2409
|
-
code: "MODE_MISMATCH",
|
|
2410
|
-
severity: "error",
|
|
2411
|
-
path,
|
|
2412
|
-
message: `Slot "${slot.slotId}" only allows modes [${slot.allowedModes.join(", ")}] but connection is "${connection.ownershipMode}".`
|
|
2413
|
-
}));
|
|
2414
|
-
slotValid = false;
|
|
2415
|
-
}
|
|
2416
|
-
}
|
|
2417
|
-
if (connection.status === "disconnected" || connection.status === "error") {
|
|
2418
|
-
issues.push(issue({
|
|
2419
|
-
code: "CONNECTION_NOT_READY",
|
|
2420
|
-
severity: "error",
|
|
2421
|
-
path,
|
|
2422
|
-
message: `Connection "${connection.meta.label}" is in status "${connection.status}".`
|
|
2423
|
-
}));
|
|
2424
|
-
slotValid = false;
|
|
2425
|
-
} else if (connection.status === "unknown") {
|
|
2426
|
-
issues.push(issue({
|
|
2427
|
-
code: "CONNECTION_STATUS_UNKNOWN",
|
|
2428
|
-
severity: "warning",
|
|
2429
|
-
path,
|
|
2430
|
-
message: `Connection "${connection.meta.label}" has unknown health status.`
|
|
2431
|
-
}));
|
|
2432
|
-
}
|
|
2433
|
-
const spec = lookupIntegrationSpec(context2.integrationSpecs, connection);
|
|
2434
|
-
if (!spec) {
|
|
2435
|
-
issues.push(issue({
|
|
2436
|
-
code: "INTEGRATION_SPEC_NOT_FOUND",
|
|
2437
|
-
severity: "warning",
|
|
2438
|
-
path,
|
|
2439
|
-
message: `Integration spec "${connection.meta.integrationKey}@${connection.meta.integrationVersion}" is not registered.`
|
|
2440
|
-
}));
|
|
2441
|
-
slotValid = false;
|
|
2442
|
-
return;
|
|
2443
|
-
}
|
|
2444
|
-
if (spec.meta.category !== slot.requiredCategory) {
|
|
2445
|
-
issues.push(issue({
|
|
2446
|
-
code: "CATEGORY_MISMATCH",
|
|
2447
|
-
severity: "error",
|
|
2448
|
-
path,
|
|
2449
|
-
message: `Slot "${slot.slotId}" requires category "${slot.requiredCategory}" but connection provides "${spec.meta.category}".`
|
|
2450
|
-
}));
|
|
2451
|
-
slotValid = false;
|
|
2452
|
-
}
|
|
2453
|
-
if (!spec.supportedModes.includes(connection.ownershipMode)) {
|
|
2454
|
-
issues.push(issue({
|
|
2455
|
-
code: "UNSUPPORTED_OWNERSHIP_MODE",
|
|
2456
|
-
severity: "error",
|
|
2457
|
-
path,
|
|
2458
|
-
message: `Integration spec "${spec.meta.key}" does not support ownership mode "${connection.ownershipMode}".`
|
|
2459
|
-
}));
|
|
2460
|
-
slotValid = false;
|
|
2461
|
-
}
|
|
2462
|
-
for (const required of slot.requiredCapabilities ?? []) {
|
|
2463
|
-
if (!integrationProvidesCapability2(spec, required)) {
|
|
2464
|
-
issues.push(issue({
|
|
2465
|
-
code: "CAPABILITY_NOT_PROVIDED",
|
|
2466
|
-
severity: "error",
|
|
2467
|
-
path,
|
|
2468
|
-
message: `Integration "${spec.meta.key}" does not provide required capability "${required.key}@${required.version}".`
|
|
2469
|
-
}));
|
|
2470
|
-
slotValid = false;
|
|
2471
|
-
}
|
|
2472
|
-
}
|
|
2473
|
-
if (slotValid) {
|
|
2474
|
-
satisfiedSlots.add(slot.slotId);
|
|
2475
|
-
}
|
|
2476
|
-
});
|
|
2477
|
-
for (const slot of slots.values()) {
|
|
2478
|
-
if (slot.required && !satisfiedSlots.has(slot.slotId)) {
|
|
2479
|
-
issues.push(issue({
|
|
2480
|
-
code: "MISSING_REQUIRED_SLOT",
|
|
2481
|
-
severity: "error",
|
|
2482
|
-
path: `integrations.${slot.slotId}`,
|
|
2483
|
-
message: `Required integration slot "${slot.slotId}" is not bound.`
|
|
2484
|
-
}));
|
|
2485
|
-
}
|
|
2486
|
-
}
|
|
2487
|
-
return issues;
|
|
2488
|
-
}
|
|
2489
|
-
};
|
|
2490
|
-
var tenantKnowledgeRule = {
|
|
2491
|
-
scope: "tenant",
|
|
2492
|
-
name: "knowledge.bindings",
|
|
2493
|
-
category: "knowledge",
|
|
2494
|
-
validate(_blueprint, tenant, context2) {
|
|
2495
|
-
const issues = [];
|
|
2496
|
-
const registry2 = context2.knowledgeSpaces;
|
|
2497
|
-
if (!registry2)
|
|
2498
|
-
return issues;
|
|
2499
|
-
const sources = context2.knowledgeSources ?? [];
|
|
2500
|
-
(tenant.knowledge ?? []).forEach((binding, index) => {
|
|
2501
|
-
const path = `knowledge[${index}]`;
|
|
2502
|
-
const space = registry2.get(binding.spaceKey, binding.spaceVersion);
|
|
2503
|
-
if (!space) {
|
|
2504
|
-
issues.push(issue({
|
|
2505
|
-
code: "UNKNOWN_KNOWLEDGE_SPACE",
|
|
2506
|
-
severity: "error",
|
|
2507
|
-
path: `${path}.spaceKey`,
|
|
2508
|
-
message: `Knowledge space "${binding.spaceKey}" is not registered.`
|
|
2509
|
-
}));
|
|
2510
|
-
return;
|
|
2511
|
-
}
|
|
2512
|
-
const hasSources = sources.some((source) => {
|
|
2513
|
-
if (source.meta.spaceKey !== binding.spaceKey)
|
|
2514
|
-
return false;
|
|
2515
|
-
if (binding.spaceVersion != null) {
|
|
2516
|
-
return source.meta.spaceVersion === binding.spaceVersion;
|
|
2517
|
-
}
|
|
2518
|
-
return true;
|
|
2519
|
-
});
|
|
2520
|
-
if (!hasSources) {
|
|
2521
|
-
issues.push(issue({
|
|
2522
|
-
code: "MISSING_KNOWLEDGE_SOURCES",
|
|
2523
|
-
severity: "error",
|
|
2524
|
-
path,
|
|
2525
|
-
message: `Knowledge space "${binding.spaceKey}" has no configured sources for tenant "${tenant.meta.tenantId}".`
|
|
2526
|
-
}));
|
|
2527
|
-
}
|
|
2528
|
-
if (space.meta.category === "external" || space.meta.category === "ephemeral") {
|
|
2529
|
-
issues.push(issue({
|
|
2530
|
-
code: "LOW_TRUST_KNOWLEDGE",
|
|
2531
|
-
severity: "warning",
|
|
2532
|
-
path,
|
|
2533
|
-
message: `Knowledge space "${binding.spaceKey}" has category "${space.meta.category}". Avoid using it for irreversible or policy decisions.`
|
|
2534
|
-
}));
|
|
2535
|
-
}
|
|
2536
|
-
});
|
|
2537
|
-
return issues;
|
|
2538
|
-
}
|
|
2539
|
-
};
|
|
2540
|
-
var tenantBrandingRule = {
|
|
2541
|
-
scope: "tenant",
|
|
2542
|
-
name: "branding.constraints",
|
|
2543
|
-
category: "branding",
|
|
2544
|
-
validate(_blueprint, tenant, context2) {
|
|
2545
|
-
const issues = [];
|
|
2546
|
-
const branding = tenant.branding;
|
|
2547
|
-
if (!branding)
|
|
2548
|
-
return issues;
|
|
2549
|
-
const domain = branding.customDomain?.trim();
|
|
2550
|
-
if (domain) {
|
|
2551
|
-
if (!DOMAIN_REGEX.test(domain)) {
|
|
2552
|
-
issues.push(issue({
|
|
2553
|
-
code: "INVALID_DOMAIN",
|
|
2554
|
-
severity: "error",
|
|
2555
|
-
path: "branding.customDomain",
|
|
2556
|
-
message: `Custom domain "${domain}" is not a valid hostname.`
|
|
2557
|
-
}));
|
|
2558
|
-
}
|
|
2559
|
-
const conflict = (context2.existingConfigs ?? []).find((config) => {
|
|
2560
|
-
if (config.meta.id === tenant.meta.id)
|
|
2561
|
-
return false;
|
|
2562
|
-
const otherDomain = config.branding?.customDomain?.trim();
|
|
2563
|
-
if (!otherDomain)
|
|
2564
|
-
return false;
|
|
2565
|
-
return otherDomain.toLowerCase() === domain.toLowerCase();
|
|
2566
|
-
});
|
|
2567
|
-
if (conflict) {
|
|
2568
|
-
issues.push(issue({
|
|
2569
|
-
code: "DUPLICATE_DOMAIN",
|
|
2570
|
-
severity: "error",
|
|
2571
|
-
path: "branding.customDomain",
|
|
2572
|
-
message: `Custom domain "${domain}" is already used by tenant "${conflict.meta.tenantId}".`
|
|
2573
|
-
}));
|
|
2574
|
-
}
|
|
2575
|
-
}
|
|
2576
|
-
(branding.assets ?? []).forEach((asset, index) => {
|
|
2577
|
-
const assetPath = `branding.assets[${index}]`;
|
|
2578
|
-
if (!HTTPS_URL_REGEX.test(asset.url)) {
|
|
2579
|
-
issues.push(issue({
|
|
2580
|
-
code: "INSECURE_ASSET_URL",
|
|
2581
|
-
severity: "error",
|
|
2582
|
-
path: `${assetPath}.url`,
|
|
2583
|
-
message: `Branding asset "${asset.type}" must use an HTTPS URL.`
|
|
2584
|
-
}));
|
|
2585
|
-
}
|
|
2586
|
-
const allowed = ALLOWED_ASSET_EXTENSIONS[asset.type] ?? ALLOWED_ASSET_EXTENSIONS.logo;
|
|
2587
|
-
const extension = extractExtension(asset.url);
|
|
2588
|
-
if (extension && allowed && !allowed.includes(extension)) {
|
|
2589
|
-
issues.push(issue({
|
|
2590
|
-
code: "UNEXPECTED_ASSET_TYPE",
|
|
2591
|
-
severity: "warning",
|
|
2592
|
-
path: `${assetPath}.url`,
|
|
2593
|
-
message: `Asset "${asset.type}" should use one of: ${(allowed ?? []).join(", ")}. Detected "${extension}".`
|
|
2594
|
-
}));
|
|
2595
|
-
}
|
|
2596
|
-
});
|
|
2597
|
-
return issues;
|
|
2598
|
-
}
|
|
2599
|
-
};
|
|
2600
|
-
var tenantTranslationRule = {
|
|
2601
|
-
scope: "tenant",
|
|
2602
|
-
name: "translation.consistency",
|
|
2603
|
-
category: "translation",
|
|
2604
|
-
validate(blueprint, tenant, context2) {
|
|
2605
|
-
const issues = [];
|
|
2606
|
-
const pointer = blueprint.translationCatalog;
|
|
2607
|
-
const catalogs = normalizeCatalogs(context2.translationCatalogs);
|
|
2608
|
-
const blueprintCatalog = pointer ? catalogs.blueprint.find((catalog) => catalog.meta.key === pointer.key && catalog.meta.version === pointer.version) : undefined;
|
|
2609
|
-
if (pointer && !blueprintCatalog) {
|
|
2610
|
-
issues.push(issue({
|
|
2611
|
-
code: "MISSING_BLUEPRINT_CATALOG",
|
|
2612
|
-
severity: "error",
|
|
2613
|
-
path: "translationCatalog",
|
|
2614
|
-
message: `Blueprint translation catalog "${pointer.key}@${pointer.version}" is not loaded in context.`
|
|
2615
|
-
}));
|
|
2616
|
-
}
|
|
2617
|
-
const requiredKeys = new Set;
|
|
2618
|
-
if (blueprint.branding?.appNameKey) {
|
|
2619
|
-
requiredKeys.add(blueprint.branding.appNameKey);
|
|
2620
|
-
if (blueprintCatalog && !hasTranslationEntry(blueprintCatalog.entries, blueprint.branding.appNameKey, blueprintCatalog.defaultLocale)) {
|
|
2621
|
-
issues.push(issue({
|
|
2622
|
-
code: "MISSING_TRANSLATION_KEY",
|
|
2623
|
-
severity: "error",
|
|
2624
|
-
path: "branding.appNameKey",
|
|
2625
|
-
message: `Translation key "${blueprint.branding.appNameKey}" is missing for locale "${blueprintCatalog.defaultLocale}".`
|
|
2626
|
-
}));
|
|
2627
|
-
}
|
|
2628
|
-
}
|
|
2629
|
-
const tenantLocales = tenant.locales;
|
|
2630
|
-
if (tenantLocales) {
|
|
2631
|
-
const { defaultLocale, enabledLocales } = tenantLocales;
|
|
2632
|
-
if (!enabledLocales.includes(defaultLocale)) {
|
|
2633
|
-
issues.push(issue({
|
|
2634
|
-
code: "LOCALE_NOT_ENABLED",
|
|
2635
|
-
severity: "warning",
|
|
2636
|
-
path: "locales.enabledLocales",
|
|
2637
|
-
message: `enabledLocales does not include defaultLocale "${defaultLocale}".`
|
|
2638
|
-
}));
|
|
2639
|
-
}
|
|
2640
|
-
if (blueprintCatalog) {
|
|
2641
|
-
const supported = new Set(blueprintCatalog.supportedLocales);
|
|
2642
|
-
for (const locale of [defaultLocale, ...enabledLocales]) {
|
|
2643
|
-
if (!supported.has(locale)) {
|
|
2644
|
-
issues.push(issue({
|
|
2645
|
-
code: "UNSUPPORTED_LOCALE",
|
|
2646
|
-
severity: "error",
|
|
2647
|
-
path: "locales.enabledLocales",
|
|
2648
|
-
message: `Locale "${locale}" is not supported by blueprint catalog "${blueprintCatalog.meta.key}".`
|
|
2649
|
-
}));
|
|
2650
|
-
}
|
|
2651
|
-
}
|
|
2652
|
-
}
|
|
2653
|
-
}
|
|
2654
|
-
const allowedKeys = new Set;
|
|
2655
|
-
for (const catalog of catalogs.blueprint) {
|
|
2656
|
-
for (const entry of catalog.entries) {
|
|
2657
|
-
allowedKeys.add(entry.key);
|
|
2658
|
-
}
|
|
2659
|
-
}
|
|
2660
|
-
for (const catalog of catalogs.platform) {
|
|
2661
|
-
for (const entry of catalog.entries) {
|
|
2662
|
-
allowedKeys.add(entry.key);
|
|
2663
|
-
}
|
|
2664
|
-
}
|
|
2665
|
-
const overrides = tenant.translationOverrides?.entries ?? [];
|
|
2666
|
-
overrides.forEach((entry, index) => {
|
|
2667
|
-
const path = `translationOverrides.entries[${index}]`;
|
|
2668
|
-
if (!allowedKeys.has(entry.key)) {
|
|
2669
|
-
issues.push(issue({
|
|
2670
|
-
code: "UNKNOWN_TRANSLATION_KEY",
|
|
2671
|
-
severity: "error",
|
|
2672
|
-
path,
|
|
2673
|
-
message: `Override references unknown key "${entry.key}".`
|
|
2674
|
-
}));
|
|
2675
|
-
}
|
|
2676
|
-
if (blueprintCatalog) {
|
|
2677
|
-
const supportedLocales = new Set([
|
|
2678
|
-
...blueprintCatalog.supportedLocales,
|
|
2679
|
-
...tenant.locales?.enabledLocales ?? [],
|
|
2680
|
-
tenant.locales?.defaultLocale ?? blueprintCatalog.defaultLocale
|
|
2681
|
-
]);
|
|
2682
|
-
if (!supportedLocales.has(entry.locale)) {
|
|
2683
|
-
issues.push(issue({
|
|
2684
|
-
code: "UNSUPPORTED_LOCALE_OVERRIDE",
|
|
2685
|
-
severity: "error",
|
|
2686
|
-
path,
|
|
2687
|
-
message: `Locale "${entry.locale}" is not enabled for tenant overrides.`
|
|
2688
|
-
}));
|
|
2689
|
-
}
|
|
2690
|
-
}
|
|
2691
|
-
});
|
|
2692
|
-
return issues;
|
|
2693
|
-
}
|
|
2694
|
-
};
|
|
2695
|
-
var resolvedIntegrationRule = {
|
|
2696
|
-
scope: "resolved",
|
|
2697
|
-
name: "integration.required-slots",
|
|
2698
|
-
category: "integration",
|
|
2699
|
-
validate(blueprint, resolved) {
|
|
2700
|
-
const issues = [];
|
|
2701
|
-
const requiredSlots = (blueprint.integrationSlots ?? []).filter((slot) => slot.required);
|
|
2702
|
-
for (const slot of requiredSlots) {
|
|
2703
|
-
const satisfied = resolved.integrations.some((integration) => integration.slot.slotId === slot.slotId);
|
|
2704
|
-
if (!satisfied) {
|
|
2705
|
-
issues.push(issue({
|
|
2706
|
-
code: "MISSING_REQUIRED_SLOT",
|
|
2707
|
-
severity: "error",
|
|
2708
|
-
path: `integrations.${slot.slotId}`,
|
|
2709
|
-
message: `Resolved config is missing integration slot "${slot.slotId}".`
|
|
2710
|
-
}));
|
|
2711
|
-
}
|
|
2712
|
-
}
|
|
2713
|
-
for (const integration of resolved.integrations) {
|
|
2714
|
-
if (integration.connection.status === "disconnected" || integration.connection.status === "error") {
|
|
2715
|
-
issues.push(issue({
|
|
2716
|
-
code: "CONNECTION_NOT_READY",
|
|
2717
|
-
severity: "error",
|
|
2718
|
-
path: `integrations.${integration.slot.slotId}`,
|
|
2719
|
-
message: `Resolved integration "${integration.slot.slotId}" uses a connection in status "${integration.connection.status}".`
|
|
2720
|
-
}));
|
|
2721
|
-
}
|
|
2722
|
-
}
|
|
2723
|
-
return issues;
|
|
2724
|
-
}
|
|
2725
|
-
};
|
|
2726
|
-
var resolvedTranslationRule = {
|
|
2727
|
-
scope: "resolved",
|
|
2728
|
-
name: "translation.default-locale",
|
|
2729
|
-
category: "translation",
|
|
2730
|
-
validate(_blueprint, resolved) {
|
|
2731
|
-
const issues = [];
|
|
2732
|
-
const translation = resolved.translation;
|
|
2733
|
-
if (translation && !translation.supportedLocales.includes(translation.defaultLocale)) {
|
|
2734
|
-
issues.push(issue({
|
|
2735
|
-
code: "DEFAULT_LOCALE_NOT_SUPPORTED",
|
|
2736
|
-
severity: "warning",
|
|
2737
|
-
path: "translation.defaultLocale",
|
|
2738
|
-
message: "supportedLocales should include defaultLocale for consistent fallback behaviour."
|
|
2739
|
-
}));
|
|
2740
|
-
}
|
|
2741
|
-
return issues;
|
|
2742
|
-
}
|
|
2743
|
-
};
|
|
2744
|
-
function issue(input) {
|
|
2745
|
-
return input;
|
|
2746
|
-
}
|
|
2747
|
-
function dedupeIssues(issues) {
|
|
2748
|
-
const map = new Map;
|
|
2749
|
-
for (const current of issues) {
|
|
2750
|
-
const key = `${current.code}|${current.path}|${current.severity}`;
|
|
2751
|
-
if (!map.has(key)) {
|
|
2752
|
-
map.set(key, current);
|
|
2753
|
-
}
|
|
2754
|
-
}
|
|
2755
|
-
return [...map.values()];
|
|
2756
|
-
}
|
|
2757
|
-
function capabilityRefKey(ref) {
|
|
2758
|
-
return `${ref.key}@${ref.version}`;
|
|
2759
|
-
}
|
|
2760
|
-
function integrationProvidesCapability2(spec, required) {
|
|
2761
|
-
return spec.capabilities.provides.some((provided) => provided.key === required.key && provided.version === required.version);
|
|
2762
|
-
}
|
|
2763
|
-
function lookupIntegrationSpec(registry2, connection) {
|
|
2764
|
-
if (!registry2)
|
|
2765
|
-
return;
|
|
2766
|
-
return registry2.get(connection.meta.integrationKey, connection.meta.integrationVersion);
|
|
2767
|
-
}
|
|
2768
|
-
function extractExtension(url) {
|
|
2769
|
-
const [raw] = url.split("?");
|
|
2770
|
-
if (!raw)
|
|
2771
|
-
return;
|
|
2772
|
-
const lastDot = raw.lastIndexOf(".");
|
|
2773
|
-
if (lastDot === -1)
|
|
2774
|
-
return;
|
|
2775
|
-
return raw.slice(lastDot + 1).toLowerCase();
|
|
2776
|
-
}
|
|
2777
|
-
function normalizeCatalogs(catalogs) {
|
|
2778
|
-
if (!catalogs)
|
|
2779
|
-
return { platform: [], blueprint: [] };
|
|
2780
|
-
const platform = catalogs.platform ? Array.isArray(catalogs.platform) ? catalogs.platform : [catalogs.platform] : [];
|
|
2781
|
-
const blueprint = catalogs.blueprint ? Array.isArray(catalogs.blueprint) ? catalogs.blueprint : [catalogs.blueprint] : [];
|
|
2782
|
-
return { platform, blueprint };
|
|
2783
|
-
}
|
|
2784
|
-
function hasTranslationEntry(entries, key, locale) {
|
|
2785
|
-
return entries.some((entry) => entry.key === key && entry.locale === locale);
|
|
2786
|
-
}
|
|
2787
|
-
// src/app-config/lifecycle-contracts.ts
|
|
2788
|
-
import { ScalarTypeEnum as ScalarTypeEnum3, SchemaModel as SchemaModel3 } from "@contractspec/lib.schema";
|
|
2789
|
-
var LifecyclePolicy = {
|
|
2790
|
-
auth: "admin",
|
|
2791
|
-
policies: [{ key: "platform.app-config.manage", version: "1.0.0" }]
|
|
2792
|
-
};
|
|
2793
|
-
var LifecycleReadPolicy = {
|
|
2794
|
-
auth: "admin",
|
|
2795
|
-
policies: [{ key: "platform.app-config.read", version: "1.0.0" }]
|
|
2796
|
-
};
|
|
2797
|
-
var ConfigVersionRecord = new SchemaModel3({
|
|
2798
|
-
name: "ConfigVersionRecord",
|
|
2799
|
-
fields: {
|
|
2800
|
-
meta: { type: ScalarTypeEnum3.JSONObject(), isOptional: false },
|
|
2801
|
-
config: { type: ScalarTypeEnum3.JSONObject(), isOptional: false }
|
|
2802
|
-
}
|
|
2803
|
-
});
|
|
2804
|
-
var ConfigTransitionRecord = new SchemaModel3({
|
|
2805
|
-
name: "ConfigTransitionRecord",
|
|
2806
|
-
fields: {
|
|
2807
|
-
tenantId: { type: ScalarTypeEnum3.ID(), isOptional: false },
|
|
2808
|
-
appId: { type: ScalarTypeEnum3.ID(), isOptional: false },
|
|
2809
|
-
fromStatus: {
|
|
2810
|
-
type: ScalarTypeEnum3.String_unsecure(),
|
|
2811
|
-
isOptional: false
|
|
2812
|
-
},
|
|
2813
|
-
toStatus: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2814
|
-
version: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2815
|
-
timestamp: { type: ScalarTypeEnum3.DateTime(), isOptional: false },
|
|
2816
|
-
actor: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2817
|
-
reason: { type: ScalarTypeEnum3.String_unsecure(), isOptional: true }
|
|
2818
|
-
}
|
|
2819
|
-
});
|
|
2820
|
-
var CreateDraftInput = new SchemaModel3({
|
|
2821
|
-
name: "CreateTenantConfigDraftInput",
|
|
2822
|
-
fields: {
|
|
2823
|
-
tenantId: { type: ScalarTypeEnum3.ID(), isOptional: false },
|
|
2824
|
-
appId: { type: ScalarTypeEnum3.ID(), isOptional: false },
|
|
2825
|
-
blueprintName: {
|
|
2826
|
-
type: ScalarTypeEnum3.String_unsecure(),
|
|
2827
|
-
isOptional: false
|
|
2828
|
-
},
|
|
2829
|
-
blueprintVersion: {
|
|
2830
|
-
type: ScalarTypeEnum3.Int_unsecure(),
|
|
2831
|
-
isOptional: false
|
|
2832
|
-
},
|
|
2833
|
-
environment: { type: ScalarTypeEnum3.String_unsecure(), isOptional: true },
|
|
2834
|
-
fromVersion: { type: ScalarTypeEnum3.String_unsecure(), isOptional: true },
|
|
2835
|
-
createdBy: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false }
|
|
2836
|
-
}
|
|
2837
|
-
});
|
|
2838
|
-
var CreateDraftOutput = new SchemaModel3({
|
|
2839
|
-
name: "CreateTenantConfigDraftOutput",
|
|
2840
|
-
fields: {
|
|
2841
|
-
version: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2842
|
-
status: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2843
|
-
createdAt: { type: ScalarTypeEnum3.DateTime(), isOptional: false }
|
|
2844
|
-
}
|
|
2845
|
-
});
|
|
2846
|
-
var CreateTenantConfigDraftCommand = defineCommand({
|
|
2847
|
-
meta: {
|
|
2848
|
-
key: "appConfig.lifecycle.createDraft",
|
|
2849
|
-
version: "1.0.0",
|
|
2850
|
-
description: "Creates a new draft tenant config version.",
|
|
2851
|
-
owners: [OwnersEnum.PlatformSigil],
|
|
2852
|
-
tags: [TagsEnum.Hygiene, "app-config"],
|
|
2853
|
-
stability: StabilityEnum.Experimental,
|
|
2854
|
-
goal: "Allow operators to start editing a new tenant config version.",
|
|
2855
|
-
context: "Invoked by the Studio or automation when starting a new configuration run."
|
|
2856
|
-
},
|
|
2857
|
-
io: {
|
|
2858
|
-
input: CreateDraftInput,
|
|
2859
|
-
output: CreateDraftOutput
|
|
2860
|
-
},
|
|
2861
|
-
policy: LifecyclePolicy,
|
|
2862
|
-
sideEffects: {
|
|
2863
|
-
emits: [
|
|
2864
|
-
{
|
|
2865
|
-
ref: ConfigDraftCreatedEvent.meta,
|
|
2866
|
-
when: "after successful draft creation"
|
|
2867
|
-
}
|
|
2868
|
-
]
|
|
2869
|
-
}
|
|
2870
|
-
});
|
|
2871
|
-
var PromotePreviewInput = new SchemaModel3({
|
|
2872
|
-
name: "PromoteTenantConfigPreviewInput",
|
|
2873
|
-
fields: {
|
|
2874
|
-
tenantId: { type: ScalarTypeEnum3.ID(), isOptional: false },
|
|
2875
|
-
appId: { type: ScalarTypeEnum3.ID(), isOptional: false },
|
|
2876
|
-
version: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2877
|
-
promotedBy: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false }
|
|
2878
|
-
}
|
|
2879
|
-
});
|
|
2880
|
-
var PromotePreviewOutput = new SchemaModel3({
|
|
2881
|
-
name: "PromoteTenantConfigPreviewOutput",
|
|
2882
|
-
fields: {
|
|
2883
|
-
version: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2884
|
-
status: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2885
|
-
warnings: {
|
|
2886
|
-
type: ScalarTypeEnum3.String_unsecure(),
|
|
2887
|
-
isOptional: true,
|
|
2888
|
-
isArray: true
|
|
2889
|
-
}
|
|
2890
|
-
}
|
|
2891
|
-
});
|
|
2892
|
-
var PromoteTenantConfigToPreviewCommand = defineCommand({
|
|
2893
|
-
meta: {
|
|
2894
|
-
key: "appConfig.lifecycle.promoteToPreview",
|
|
2895
|
-
version: "1.0.0",
|
|
2896
|
-
description: "Promotes a draft tenant config to preview/testing state.",
|
|
2897
|
-
owners: [OwnersEnum.PlatformSigil],
|
|
2898
|
-
tags: [TagsEnum.Hygiene, "app-config"],
|
|
2899
|
-
stability: StabilityEnum.Experimental,
|
|
2900
|
-
goal: "Enable validation and testing of draft configurations.",
|
|
2901
|
-
context: "Called when a draft passes initial checks and should be exposed to preview environments."
|
|
2902
|
-
},
|
|
2903
|
-
io: {
|
|
2904
|
-
input: PromotePreviewInput,
|
|
2905
|
-
output: PromotePreviewOutput
|
|
2906
|
-
},
|
|
2907
|
-
policy: LifecyclePolicy,
|
|
2908
|
-
sideEffects: {
|
|
2909
|
-
emits: [
|
|
2910
|
-
{
|
|
2911
|
-
ref: ConfigPromotedToPreviewEvent.meta,
|
|
2912
|
-
when: "after promotion to preview"
|
|
2913
|
-
}
|
|
2914
|
-
]
|
|
2915
|
-
}
|
|
2916
|
-
});
|
|
2917
|
-
var PublishConfigInput = new SchemaModel3({
|
|
2918
|
-
name: "PublishTenantConfigInput",
|
|
2919
|
-
fields: {
|
|
2920
|
-
tenantId: { type: ScalarTypeEnum3.ID(), isOptional: false },
|
|
2921
|
-
appId: { type: ScalarTypeEnum3.ID(), isOptional: false },
|
|
2922
|
-
version: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2923
|
-
environment: { type: ScalarTypeEnum3.String_unsecure(), isOptional: true },
|
|
2924
|
-
publishedBy: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2925
|
-
changeSummary: {
|
|
2926
|
-
type: ScalarTypeEnum3.String_unsecure(),
|
|
2927
|
-
isOptional: true
|
|
2928
|
-
}
|
|
2929
|
-
}
|
|
2930
|
-
});
|
|
2931
|
-
var PublishConfigOutput = new SchemaModel3({
|
|
2932
|
-
name: "PublishTenantConfigOutput",
|
|
2933
|
-
fields: {
|
|
2934
|
-
version: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2935
|
-
status: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2936
|
-
previousVersion: {
|
|
2937
|
-
type: ScalarTypeEnum3.String_unsecure(),
|
|
2938
|
-
isOptional: true
|
|
2939
|
-
},
|
|
2940
|
-
publishedAt: { type: ScalarTypeEnum3.DateTime(), isOptional: false }
|
|
2941
|
-
}
|
|
2942
|
-
});
|
|
2943
|
-
var PublishTenantConfigCommand = defineCommand({
|
|
2944
|
-
meta: {
|
|
2945
|
-
key: "appConfig.lifecycle.publish",
|
|
2946
|
-
version: "1.0.0",
|
|
2947
|
-
description: "Publishes a preview tenant config to production.",
|
|
2948
|
-
owners: [OwnersEnum.PlatformSigil],
|
|
2949
|
-
tags: [TagsEnum.Hygiene, "app-config"],
|
|
2950
|
-
stability: StabilityEnum.Experimental,
|
|
2951
|
-
goal: "Promote tested configurations to production safely.",
|
|
2952
|
-
context: "Triggered after validation passes and change management approvals are complete."
|
|
2953
|
-
},
|
|
2954
|
-
io: {
|
|
2955
|
-
input: PublishConfigInput,
|
|
2956
|
-
output: PublishConfigOutput
|
|
2957
|
-
},
|
|
2958
|
-
policy: LifecyclePolicy,
|
|
2959
|
-
sideEffects: {
|
|
2960
|
-
emits: [
|
|
2961
|
-
{
|
|
2962
|
-
ref: ConfigPublishedEvent.meta,
|
|
2963
|
-
when: "after publish succeeds"
|
|
2964
|
-
}
|
|
2965
|
-
]
|
|
2966
|
-
}
|
|
2967
|
-
});
|
|
2968
|
-
var RollbackConfigInput = new SchemaModel3({
|
|
2969
|
-
name: "RollbackTenantConfigInput",
|
|
2970
|
-
fields: {
|
|
2971
|
-
tenantId: { type: ScalarTypeEnum3.ID(), isOptional: false },
|
|
2972
|
-
appId: { type: ScalarTypeEnum3.ID(), isOptional: false },
|
|
2973
|
-
toVersion: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2974
|
-
environment: { type: ScalarTypeEnum3.String_unsecure(), isOptional: true },
|
|
2975
|
-
rolledBackBy: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2976
|
-
reason: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false }
|
|
2977
|
-
}
|
|
2978
|
-
});
|
|
2979
|
-
var RollbackConfigOutput = new SchemaModel3({
|
|
2980
|
-
name: "RollbackTenantConfigOutput",
|
|
2981
|
-
fields: {
|
|
2982
|
-
newVersion: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2983
|
-
status: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
|
|
2984
|
-
rolledBackFrom: { type: ScalarTypeEnum3.Int_unsecure(), isOptional: false }
|
|
2985
|
-
}
|
|
2986
|
-
});
|
|
2987
|
-
var RollbackTenantConfigCommand = defineCommand({
|
|
2988
|
-
meta: {
|
|
2989
|
-
key: "appConfig.lifecycle.rollback",
|
|
2990
|
-
version: "1.0.0",
|
|
2991
|
-
description: "Rolls back to a previously published tenant config version.",
|
|
2992
|
-
owners: [OwnersEnum.PlatformSigil],
|
|
2993
|
-
tags: [TagsEnum.Hygiene, "app-config"],
|
|
2994
|
-
stability: StabilityEnum.Experimental,
|
|
2995
|
-
goal: "Provide rapid recovery when new configs regress production.",
|
|
2996
|
-
context: "Called manually or automatically when monitoring detects regression and a rollback is required."
|
|
2997
|
-
},
|
|
2998
|
-
io: {
|
|
2999
|
-
input: RollbackConfigInput,
|
|
3000
|
-
output: RollbackConfigOutput
|
|
3001
|
-
},
|
|
3002
|
-
policy: LifecyclePolicy,
|
|
3003
|
-
sideEffects: {
|
|
3004
|
-
emits: [
|
|
3005
|
-
{
|
|
3006
|
-
ref: ConfigRolledBackEvent.meta,
|
|
3007
|
-
when: "after rollback completes"
|
|
3008
|
-
}
|
|
3009
|
-
]
|
|
3010
|
-
}
|
|
3011
|
-
});
|
|
3012
|
-
var ListVersionsInput = new SchemaModel3({
|
|
3013
|
-
name: "ListTenantConfigVersionsInput",
|
|
3014
|
-
fields: {
|
|
3015
|
-
tenantId: { type: ScalarTypeEnum3.ID(), isOptional: false },
|
|
3016
|
-
appId: { type: ScalarTypeEnum3.ID(), isOptional: false }
|
|
3017
|
-
}
|
|
3018
|
-
});
|
|
3019
|
-
var ListVersionsOutput = new SchemaModel3({
|
|
3020
|
-
name: "ListTenantConfigVersionsOutput",
|
|
3021
|
-
fields: {
|
|
3022
|
-
versions: { type: ConfigVersionRecord, isOptional: false, isArray: true },
|
|
3023
|
-
transitions: {
|
|
3024
|
-
type: ConfigTransitionRecord,
|
|
3025
|
-
isOptional: true,
|
|
3026
|
-
isArray: true
|
|
3027
|
-
}
|
|
3028
|
-
}
|
|
3029
|
-
});
|
|
3030
|
-
var ListTenantConfigVersionsQuery = defineQuery({
|
|
3031
|
-
meta: {
|
|
3032
|
-
key: "appConfig.lifecycle.listVersions",
|
|
3033
|
-
version: "1.0.0",
|
|
3034
|
-
description: "Lists all versions of a tenant configuration.",
|
|
3035
|
-
owners: [OwnersEnum.PlatformSigil],
|
|
3036
|
-
tags: ["app-config", TagsEnum.Hygiene],
|
|
3037
|
-
stability: StabilityEnum.Experimental,
|
|
3038
|
-
goal: "Support lifecycle views and change audit tooling.",
|
|
3039
|
-
context: "Used by the Studio to render history timelines and by automation for change tracking."
|
|
3040
|
-
},
|
|
3041
|
-
io: {
|
|
3042
|
-
input: ListVersionsInput,
|
|
3043
|
-
output: ListVersionsOutput
|
|
3044
|
-
},
|
|
3045
|
-
policy: LifecycleReadPolicy
|
|
3046
|
-
});
|
|
3047
|
-
var GetVersionInput = new SchemaModel3({
|
|
3048
|
-
name: "GetTenantConfigVersionInput",
|
|
3049
|
-
fields: {
|
|
3050
|
-
tenantId: { type: ScalarTypeEnum3.ID(), isOptional: false },
|
|
3051
|
-
appId: { type: ScalarTypeEnum3.ID(), isOptional: false },
|
|
3052
|
-
version: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false }
|
|
3053
|
-
}
|
|
3054
|
-
});
|
|
3055
|
-
var GetVersionOutput = new SchemaModel3({
|
|
3056
|
-
name: "GetTenantConfigVersionOutput",
|
|
3057
|
-
fields: {
|
|
3058
|
-
version: { type: ConfigVersionRecord, isOptional: false }
|
|
3059
|
-
}
|
|
3060
|
-
});
|
|
3061
|
-
var GetTenantConfigVersionQuery = defineQuery({
|
|
3062
|
-
meta: {
|
|
3063
|
-
key: "appConfig.lifecycle.getVersion",
|
|
3064
|
-
version: "1.0.0",
|
|
3065
|
-
description: "Fetches a single tenant config version by id.",
|
|
3066
|
-
owners: [OwnersEnum.PlatformSigil],
|
|
3067
|
-
tags: ["app-config", TagsEnum.Hygiene],
|
|
3068
|
-
stability: StabilityEnum.Experimental,
|
|
3069
|
-
goal: "Allow detail drill-down for lifecycle entries.",
|
|
3070
|
-
context: "Used by automation to fetch config payloads for comparison or export."
|
|
3071
|
-
},
|
|
3072
|
-
io: {
|
|
3073
|
-
input: GetVersionInput,
|
|
3074
|
-
output: GetVersionOutput
|
|
3075
|
-
},
|
|
3076
|
-
policy: LifecycleReadPolicy
|
|
3077
|
-
});
|
|
3078
|
-
var lifecycleContracts = {
|
|
3079
|
-
CreateTenantConfigDraftCommand,
|
|
3080
|
-
PromoteTenantConfigToPreviewCommand,
|
|
3081
|
-
PublishTenantConfigCommand,
|
|
3082
|
-
RollbackTenantConfigCommand,
|
|
3083
|
-
ListTenantConfigVersionsQuery,
|
|
3084
|
-
GetTenantConfigVersionQuery
|
|
3085
|
-
};
|
|
3086
|
-
function registerAppConfigLifecycleContracts(registry2) {
|
|
3087
|
-
return registry2.register(CreateTenantConfigDraftCommand).register(PromoteTenantConfigToPreviewCommand).register(PublishTenantConfigCommand).register(RollbackTenantConfigCommand).register(ListTenantConfigVersionsQuery).register(GetTenantConfigVersionQuery);
|
|
3088
|
-
}
|
|
3089
|
-
export {
|
|
3090
|
-
validateTenantConfig,
|
|
3091
|
-
validateResolvedConfig,
|
|
3092
|
-
validateConfig,
|
|
3093
|
-
validateBlueprint,
|
|
3094
|
-
resolveAppConfig,
|
|
3095
|
-
registerAppConfigLifecycleContracts,
|
|
3096
|
-
makeAppBlueprintKey,
|
|
3097
|
-
lifecycleContracts,
|
|
3098
|
-
defineAppConfig,
|
|
3099
|
-
composeAppConfig,
|
|
3100
|
-
RollbackTenantConfigCommand,
|
|
3101
|
-
PublishTenantConfigCommand,
|
|
3102
|
-
PromoteTenantConfigToPreviewCommand,
|
|
3103
|
-
ListTenantConfigVersionsQuery,
|
|
3104
|
-
GetTenantConfigVersionQuery,
|
|
3105
|
-
CreateTenantConfigDraftCommand,
|
|
3106
|
-
ConfigRolledBackEvent,
|
|
3107
|
-
ConfigPublishedEvent,
|
|
3108
|
-
ConfigPromotedToPreviewEvent,
|
|
3109
|
-
ConfigDraftCreatedEvent,
|
|
3110
|
-
AppConfigFeature,
|
|
3111
|
-
AppConfigCapability,
|
|
3112
|
-
AppBlueprintRegistry
|
|
3113
|
-
};
|