@contractspec/lib.contracts 1.62.0 → 1.64.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 +760 -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/workflow/index.js
DELETED
|
@@ -1,1546 +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/registry.ts
|
|
154
|
-
init_registry_utils();
|
|
155
|
-
import { compareVersions } from "compare-versions";
|
|
156
|
-
var keyOfSpecContract = (spec) => `${spec.meta.key}.v${spec.meta.version}`;
|
|
157
|
-
|
|
158
|
-
class SpecContractRegistry {
|
|
159
|
-
contractType;
|
|
160
|
-
items = new Map;
|
|
161
|
-
constructor(contractType, items) {
|
|
162
|
-
this.contractType = contractType;
|
|
163
|
-
if (items) {
|
|
164
|
-
items.forEach((p) => this.register(p));
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
register(p) {
|
|
168
|
-
const key = keyOfSpecContract(p);
|
|
169
|
-
if (this.items.has(key))
|
|
170
|
-
throw new Error(`Duplicate contract \`${this.contractType}\` ${key}`);
|
|
171
|
-
this.items.set(key, p);
|
|
172
|
-
return this;
|
|
173
|
-
}
|
|
174
|
-
count() {
|
|
175
|
-
return this.items.size;
|
|
176
|
-
}
|
|
177
|
-
list() {
|
|
178
|
-
return [...this.items.values()];
|
|
179
|
-
}
|
|
180
|
-
get(key, version) {
|
|
181
|
-
if (version != null)
|
|
182
|
-
return this.items.get(`${key}.v${version}`);
|
|
183
|
-
let candidate;
|
|
184
|
-
for (const [k, p] of this.items.entries()) {
|
|
185
|
-
if (!k.startsWith(`${key}.v`))
|
|
186
|
-
continue;
|
|
187
|
-
if (!candidate || compareVersions(p.meta.version, candidate.meta.version) > 0) {
|
|
188
|
-
candidate = p;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
return candidate;
|
|
192
|
-
}
|
|
193
|
-
has(key, version) {
|
|
194
|
-
return !!this.get(key, version);
|
|
195
|
-
}
|
|
196
|
-
filter(criteria) {
|
|
197
|
-
return filterBy(this.list(), criteria);
|
|
198
|
-
}
|
|
199
|
-
listByTag(tag) {
|
|
200
|
-
return this.list().filter((p) => p.meta.tags?.includes(tag));
|
|
201
|
-
}
|
|
202
|
-
listByOwner(owner) {
|
|
203
|
-
return this.list().filter((p) => p.meta.owners?.includes(owner));
|
|
204
|
-
}
|
|
205
|
-
groupBy(keyFn) {
|
|
206
|
-
return groupBy(this.list(), keyFn);
|
|
207
|
-
}
|
|
208
|
-
getUniqueTags() {
|
|
209
|
-
return getUniqueTags(this.list());
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// src/workflow/spec.ts
|
|
214
|
-
class WorkflowRegistry extends SpecContractRegistry {
|
|
215
|
-
constructor(items) {
|
|
216
|
-
super("workflow", items);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
// src/workflow/validation.ts
|
|
221
|
-
class WorkflowValidationError extends Error {
|
|
222
|
-
issues;
|
|
223
|
-
constructor(message, issues) {
|
|
224
|
-
super(message);
|
|
225
|
-
this.issues = issues;
|
|
226
|
-
this.name = "WorkflowValidationError";
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
function validateWorkflowSpec(spec, options = {}) {
|
|
230
|
-
const issues = [];
|
|
231
|
-
const { definition } = spec;
|
|
232
|
-
if (!definition.steps.length) {
|
|
233
|
-
issues.push({
|
|
234
|
-
level: "error",
|
|
235
|
-
message: "Workflow must declare at least one step."
|
|
236
|
-
});
|
|
237
|
-
return issues;
|
|
238
|
-
}
|
|
239
|
-
const stepsById = indexSteps(definition, issues);
|
|
240
|
-
const entryStepId = definition.entryStepId ?? definition.steps[0]?.id ?? null;
|
|
241
|
-
if (!entryStepId) {
|
|
242
|
-
issues.push({
|
|
243
|
-
level: "error",
|
|
244
|
-
message: "Workflow requires an entry step (definition.entryStepId)."
|
|
245
|
-
});
|
|
246
|
-
} else if (!stepsById.has(entryStepId)) {
|
|
247
|
-
issues.push({
|
|
248
|
-
level: "error",
|
|
249
|
-
message: `Entry step "${entryStepId}" is not defined in steps.`
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
const adjacency = buildAdjacency(definition, stepsById, issues);
|
|
253
|
-
validateStepActions(definition.steps, options, issues);
|
|
254
|
-
validateReachability(entryStepId, stepsById, adjacency, issues);
|
|
255
|
-
detectCycles(adjacency, issues);
|
|
256
|
-
return issues;
|
|
257
|
-
}
|
|
258
|
-
function assertWorkflowSpecValid(spec, options = {}) {
|
|
259
|
-
const issues = validateWorkflowSpec(spec, options);
|
|
260
|
-
const errors = issues.filter((issue) => issue.level === "error");
|
|
261
|
-
if (errors.length) {
|
|
262
|
-
throw new WorkflowValidationError(`Workflow ${spec.meta.key}.v${spec.meta.version} is invalid`, issues);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
function indexSteps(definition, issues) {
|
|
266
|
-
const stepsById = new Map;
|
|
267
|
-
for (const step of definition.steps) {
|
|
268
|
-
if (stepsById.has(step.id)) {
|
|
269
|
-
issues.push({
|
|
270
|
-
level: "error",
|
|
271
|
-
message: `Duplicate step id "${step.id}" detected.`
|
|
272
|
-
});
|
|
273
|
-
continue;
|
|
274
|
-
}
|
|
275
|
-
stepsById.set(step.id, step);
|
|
276
|
-
if (step.type === "automation" && !step.action?.operation) {
|
|
277
|
-
issues.push({
|
|
278
|
-
level: "warning",
|
|
279
|
-
message: `Automation step "${step.id}" does not declare an operation.`
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
if (step.type === "human" && !step.action?.form) {
|
|
283
|
-
issues.push({
|
|
284
|
-
level: "warning",
|
|
285
|
-
message: `Human step "${step.id}" does not declare a form.`
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
if (step.guard && !step.guard.value.trim()) {
|
|
289
|
-
issues.push({
|
|
290
|
-
level: "error",
|
|
291
|
-
message: `Guard for step "${step.id}" must have a non-empty value.`
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
return stepsById;
|
|
296
|
-
}
|
|
297
|
-
function buildAdjacency(definition, stepsById, issues) {
|
|
298
|
-
const adjacency = new Map;
|
|
299
|
-
const incoming = new Map;
|
|
300
|
-
for (const stepId of stepsById.keys()) {
|
|
301
|
-
adjacency.set(stepId, new Set);
|
|
302
|
-
incoming.set(stepId, 0);
|
|
303
|
-
}
|
|
304
|
-
for (const transition of definition.transitions) {
|
|
305
|
-
const from = stepsById.get(transition.from);
|
|
306
|
-
const to = stepsById.get(transition.to);
|
|
307
|
-
if (!from) {
|
|
308
|
-
issues.push({
|
|
309
|
-
level: "error",
|
|
310
|
-
message: `Transition refers to unknown "from" step "${transition.from}".`
|
|
311
|
-
});
|
|
312
|
-
continue;
|
|
313
|
-
}
|
|
314
|
-
if (!to) {
|
|
315
|
-
issues.push({
|
|
316
|
-
level: "error",
|
|
317
|
-
message: `Transition refers to unknown "to" step "${transition.to}".`
|
|
318
|
-
});
|
|
319
|
-
continue;
|
|
320
|
-
}
|
|
321
|
-
adjacency.get(transition.from)?.add(transition.to);
|
|
322
|
-
incoming.set(transition.to, (incoming.get(transition.to) ?? 0) + 1);
|
|
323
|
-
validateTransition(transition, issues);
|
|
324
|
-
}
|
|
325
|
-
const roots = [...incoming.entries()].filter(([, count]) => count === 0).map(([id]) => id);
|
|
326
|
-
if (roots.length > 1) {
|
|
327
|
-
issues.push({
|
|
328
|
-
level: "warning",
|
|
329
|
-
message: `Workflow has multiple potential entry steps: ${roots.join(", ")}`
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
return adjacency;
|
|
333
|
-
}
|
|
334
|
-
function validateTransition(transition, issues) {
|
|
335
|
-
if (transition.condition && !transition.condition.trim()) {
|
|
336
|
-
issues.push({
|
|
337
|
-
level: "error",
|
|
338
|
-
message: `Transition ${transition.from} -> ${transition.to} declares an empty condition.`
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
function validateStepActions(steps, options, issues) {
|
|
343
|
-
for (const step of steps) {
|
|
344
|
-
const action = step.action;
|
|
345
|
-
if (!action)
|
|
346
|
-
continue;
|
|
347
|
-
if (action.operation && options.operations) {
|
|
348
|
-
const op = options.operations.get(action.operation.key, action.operation.version);
|
|
349
|
-
if (!op) {
|
|
350
|
-
issues.push({
|
|
351
|
-
level: "error",
|
|
352
|
-
message: `Step "${step.id}" references unknown operation ${action.operation.key}.v${action.operation.version}.`
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
if (action.form && options.forms) {
|
|
357
|
-
const form = options.forms.get(action.form.key, action.form.version);
|
|
358
|
-
if (!form) {
|
|
359
|
-
issues.push({
|
|
360
|
-
level: "error",
|
|
361
|
-
message: `Step "${step.id}" references unknown form ${action.form.key}.v${action.form.version}.`
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
function validateReachability(entryStepId, stepsById, adjacency, issues) {
|
|
368
|
-
if (!entryStepId || !stepsById.has(entryStepId))
|
|
369
|
-
return;
|
|
370
|
-
const visited = new Set;
|
|
371
|
-
const queue = [entryStepId];
|
|
372
|
-
visited.add(entryStepId);
|
|
373
|
-
while (queue.length) {
|
|
374
|
-
const current = queue.shift();
|
|
375
|
-
if (!current)
|
|
376
|
-
continue;
|
|
377
|
-
const neighbours = adjacency.get(current);
|
|
378
|
-
if (!neighbours)
|
|
379
|
-
continue;
|
|
380
|
-
for (const next of neighbours) {
|
|
381
|
-
if (visited.has(next))
|
|
382
|
-
continue;
|
|
383
|
-
visited.add(next);
|
|
384
|
-
queue.push(next);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
for (const stepId of stepsById.keys()) {
|
|
388
|
-
if (!visited.has(stepId)) {
|
|
389
|
-
issues.push({
|
|
390
|
-
level: "error",
|
|
391
|
-
message: `Step "${stepId}" is unreachable from entry step "${entryStepId}".`
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
function detectCycles(adjacency, issues) {
|
|
397
|
-
const visited = new Set;
|
|
398
|
-
const stack = new Set;
|
|
399
|
-
let cycleReported = false;
|
|
400
|
-
const dfs = (node) => {
|
|
401
|
-
if (stack.has(node)) {
|
|
402
|
-
if (!cycleReported) {
|
|
403
|
-
issues.push({
|
|
404
|
-
level: "error",
|
|
405
|
-
message: `Workflow contains a cycle involving step "${node}".`
|
|
406
|
-
});
|
|
407
|
-
cycleReported = true;
|
|
408
|
-
}
|
|
409
|
-
return;
|
|
410
|
-
}
|
|
411
|
-
if (visited.has(node))
|
|
412
|
-
return;
|
|
413
|
-
stack.add(node);
|
|
414
|
-
const neighbours = adjacency.get(node);
|
|
415
|
-
if (neighbours) {
|
|
416
|
-
for (const next of neighbours)
|
|
417
|
-
dfs(next);
|
|
418
|
-
}
|
|
419
|
-
stack.delete(node);
|
|
420
|
-
visited.add(node);
|
|
421
|
-
};
|
|
422
|
-
for (const node of adjacency.keys())
|
|
423
|
-
dfs(node);
|
|
424
|
-
}
|
|
425
|
-
function validateWorkflowConsistency(deps) {
|
|
426
|
-
const issues = [];
|
|
427
|
-
for (const workflow of deps.workflows.list()) {
|
|
428
|
-
const specOptions = {
|
|
429
|
-
operations: deps.operations,
|
|
430
|
-
forms: deps.forms
|
|
431
|
-
};
|
|
432
|
-
const specIssues = validateWorkflowSpec(workflow, specOptions);
|
|
433
|
-
issues.push(...specIssues.map((i) => ({
|
|
434
|
-
...i,
|
|
435
|
-
message: `[${workflow.meta.key}.v${workflow.meta.version}] ${i.message}`
|
|
436
|
-
})));
|
|
437
|
-
if (deps.capabilities) {
|
|
438
|
-
for (const step of workflow.definition.steps) {
|
|
439
|
-
for (const capRef of step.requiredCapabilities ?? []) {
|
|
440
|
-
const cap = deps.capabilities.get(capRef.key, capRef.version);
|
|
441
|
-
if (!cap) {
|
|
442
|
-
issues.push({
|
|
443
|
-
level: "error",
|
|
444
|
-
message: `[${workflow.meta.key}.v${workflow.meta.version}] Step "${step.id}" references unknown capability "${capRef.key}.v${capRef.version}"`,
|
|
445
|
-
context: { stepId: step.id, capability: capRef }
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
if (workflow.definition.compensation && deps.operations) {
|
|
452
|
-
for (const compStep of workflow.definition.compensation.steps) {
|
|
453
|
-
const op = deps.operations.get(compStep.operation.key, compStep.operation.version);
|
|
454
|
-
if (!op) {
|
|
455
|
-
issues.push({
|
|
456
|
-
level: "error",
|
|
457
|
-
message: `[${workflow.meta.key}.v${workflow.meta.version}] Compensation for step "${compStep.stepId}" references unknown operation "${compStep.operation.key}.v${compStep.operation.version}"`,
|
|
458
|
-
context: { stepId: compStep.stepId, operation: compStep.operation }
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
if (workflow.definition.sla?.stepDurationMs) {
|
|
464
|
-
const stepIds = new Set(workflow.definition.steps.map((s) => s.id));
|
|
465
|
-
for (const stepId of Object.keys(workflow.definition.sla.stepDurationMs)) {
|
|
466
|
-
if (!stepIds.has(stepId)) {
|
|
467
|
-
issues.push({
|
|
468
|
-
level: "warning",
|
|
469
|
-
message: `[${workflow.meta.key}.v${workflow.meta.version}] SLA references unknown step "${stepId}"`,
|
|
470
|
-
context: { stepId }
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
return {
|
|
477
|
-
valid: issues.filter((i) => i.level === "error").length === 0,
|
|
478
|
-
issues
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
function assertWorkflowConsistency(deps) {
|
|
482
|
-
const result = validateWorkflowConsistency(deps);
|
|
483
|
-
if (!result.valid) {
|
|
484
|
-
throw new WorkflowValidationError("Workflow consistency check failed", result.issues);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
function validateSlaConfig(spec) {
|
|
488
|
-
const issues = [];
|
|
489
|
-
const sla = spec.definition.sla;
|
|
490
|
-
if (!sla)
|
|
491
|
-
return issues;
|
|
492
|
-
if (sla.totalDurationMs !== undefined && sla.totalDurationMs <= 0) {
|
|
493
|
-
issues.push({
|
|
494
|
-
level: "error",
|
|
495
|
-
message: "SLA totalDurationMs must be positive",
|
|
496
|
-
context: { totalDurationMs: sla.totalDurationMs }
|
|
497
|
-
});
|
|
498
|
-
}
|
|
499
|
-
if (sla.stepDurationMs) {
|
|
500
|
-
for (const [stepId, duration] of Object.entries(sla.stepDurationMs)) {
|
|
501
|
-
if (duration <= 0) {
|
|
502
|
-
issues.push({
|
|
503
|
-
level: "error",
|
|
504
|
-
message: `SLA stepDurationMs for "${stepId}" must be positive`,
|
|
505
|
-
context: { stepId, duration }
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
const stepDurationsSum = Object.values(sla.stepDurationMs).reduce((sum, d) => sum + d, 0);
|
|
510
|
-
if (sla.totalDurationMs && stepDurationsSum > sla.totalDurationMs) {
|
|
511
|
-
issues.push({
|
|
512
|
-
level: "warning",
|
|
513
|
-
message: `Sum of step durations (${stepDurationsSum}ms) exceeds total duration (${sla.totalDurationMs}ms)`,
|
|
514
|
-
context: { stepDurationsSum, totalDurationMs: sla.totalDurationMs }
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
return issues;
|
|
519
|
-
}
|
|
520
|
-
function validateCompensation(spec) {
|
|
521
|
-
const issues = [];
|
|
522
|
-
const compensation = spec.definition.compensation;
|
|
523
|
-
if (!compensation)
|
|
524
|
-
return issues;
|
|
525
|
-
const stepIds = new Set(spec.definition.steps.map((s) => s.id));
|
|
526
|
-
const coveredSteps = new Set;
|
|
527
|
-
for (const compStep of compensation.steps) {
|
|
528
|
-
if (!stepIds.has(compStep.stepId)) {
|
|
529
|
-
issues.push({
|
|
530
|
-
level: "error",
|
|
531
|
-
message: `Compensation references unknown step "${compStep.stepId}"`,
|
|
532
|
-
context: { stepId: compStep.stepId }
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
|
-
if (coveredSteps.has(compStep.stepId)) {
|
|
536
|
-
issues.push({
|
|
537
|
-
level: "warning",
|
|
538
|
-
message: `Multiple compensation handlers for step "${compStep.stepId}"`,
|
|
539
|
-
context: { stepId: compStep.stepId }
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
coveredSteps.add(compStep.stepId);
|
|
543
|
-
if (!compStep.operation?.key || !compStep.operation?.version) {
|
|
544
|
-
issues.push({
|
|
545
|
-
level: "error",
|
|
546
|
-
message: `Compensation for step "${compStep.stepId}" must specify operation with key and version`,
|
|
547
|
-
context: { stepId: compStep.stepId }
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
const automationSteps = spec.definition.steps.filter((s) => s.type === "automation");
|
|
552
|
-
for (const step of automationSteps) {
|
|
553
|
-
if (!coveredSteps.has(step.id)) {
|
|
554
|
-
issues.push({
|
|
555
|
-
level: "warning",
|
|
556
|
-
message: `Automation step "${step.id}" has no compensation handler`,
|
|
557
|
-
context: { stepId: step.id }
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
return issues;
|
|
562
|
-
}
|
|
563
|
-
function validateRetryConfig(spec) {
|
|
564
|
-
const issues = [];
|
|
565
|
-
for (const step of spec.definition.steps) {
|
|
566
|
-
if (!step.retry)
|
|
567
|
-
continue;
|
|
568
|
-
if (step.retry.maxAttempts <= 0) {
|
|
569
|
-
issues.push({
|
|
570
|
-
level: "error",
|
|
571
|
-
message: `Step "${step.id}" retry maxAttempts must be positive`,
|
|
572
|
-
context: { stepId: step.id, maxAttempts: step.retry.maxAttempts }
|
|
573
|
-
});
|
|
574
|
-
}
|
|
575
|
-
if (step.retry.delayMs <= 0) {
|
|
576
|
-
issues.push({
|
|
577
|
-
level: "error",
|
|
578
|
-
message: `Step "${step.id}" retry delayMs must be positive`,
|
|
579
|
-
context: { stepId: step.id, delayMs: step.retry.delayMs }
|
|
580
|
-
});
|
|
581
|
-
}
|
|
582
|
-
if (step.retry.maxDelayMs !== undefined && step.retry.maxDelayMs < step.retry.delayMs) {
|
|
583
|
-
issues.push({
|
|
584
|
-
level: "warning",
|
|
585
|
-
message: `Step "${step.id}" retry maxDelayMs (${step.retry.maxDelayMs}) is less than delayMs (${step.retry.delayMs})`,
|
|
586
|
-
context: { stepId: step.id }
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
return issues;
|
|
591
|
-
}
|
|
592
|
-
function validateWorkflowComprehensive(spec, options = {}) {
|
|
593
|
-
const issues = [];
|
|
594
|
-
issues.push(...validateWorkflowSpec(spec, options));
|
|
595
|
-
issues.push(...validateSlaConfig(spec));
|
|
596
|
-
issues.push(...validateCompensation(spec));
|
|
597
|
-
issues.push(...validateRetryConfig(spec));
|
|
598
|
-
return {
|
|
599
|
-
valid: issues.filter((i) => i.level === "error").length === 0,
|
|
600
|
-
issues
|
|
601
|
-
};
|
|
602
|
-
}
|
|
603
|
-
// src/workflow/expression.ts
|
|
604
|
-
function evaluateExpression(expression, ctx) {
|
|
605
|
-
if (!expression)
|
|
606
|
-
return true;
|
|
607
|
-
const trimmed = expression.trim();
|
|
608
|
-
if (!trimmed)
|
|
609
|
-
return true;
|
|
610
|
-
const orParts = splitByOperator(trimmed, "||");
|
|
611
|
-
if (orParts.length > 1)
|
|
612
|
-
return orParts.some((part) => evaluateExpression(part, ctx));
|
|
613
|
-
const andParts = splitByOperator(trimmed, "&&");
|
|
614
|
-
if (andParts.length > 1)
|
|
615
|
-
return andParts.every((part) => evaluateExpression(part, ctx));
|
|
616
|
-
return evaluateSingle(trimmed, ctx);
|
|
617
|
-
}
|
|
618
|
-
function evaluateSingle(expr, ctx) {
|
|
619
|
-
const trimmed = expr.trim();
|
|
620
|
-
if (!trimmed)
|
|
621
|
-
return true;
|
|
622
|
-
if (trimmed.startsWith("!"))
|
|
623
|
-
return !evaluateSingle(trimmed.slice(1), ctx);
|
|
624
|
-
const comparisonMatch = trimmed.match(/^(data|input|output)\.([A-Za-z0-9_.[\]]+)\s*(===|==|!==|!=|>=|<=|>|<)\s*(.+)$/);
|
|
625
|
-
if (comparisonMatch) {
|
|
626
|
-
const [, root, path, operator, rawRight] = comparisonMatch;
|
|
627
|
-
const left = resolveRoot(root, ctx, path);
|
|
628
|
-
const right = parseLiteral(rawRight);
|
|
629
|
-
return compare(left, right, operator);
|
|
630
|
-
}
|
|
631
|
-
const truthyMatch = trimmed.match(/^(data|input|output)\.([A-Za-z0-9_.[\]]+)$/);
|
|
632
|
-
if (truthyMatch) {
|
|
633
|
-
const [, root, path] = truthyMatch;
|
|
634
|
-
const value = resolveRoot(root, ctx, path);
|
|
635
|
-
return Boolean(value);
|
|
636
|
-
}
|
|
637
|
-
const literal = parseLiteral(trimmed);
|
|
638
|
-
return Boolean(literal);
|
|
639
|
-
}
|
|
640
|
-
function compare(left, right, operator) {
|
|
641
|
-
switch (operator) {
|
|
642
|
-
case "===":
|
|
643
|
-
case "==":
|
|
644
|
-
return left === right;
|
|
645
|
-
case "!==":
|
|
646
|
-
case "!=":
|
|
647
|
-
return left !== right;
|
|
648
|
-
case ">":
|
|
649
|
-
return Number(left) > Number(right);
|
|
650
|
-
case ">=":
|
|
651
|
-
return Number(left) >= Number(right);
|
|
652
|
-
case "<":
|
|
653
|
-
return Number(left) < Number(right);
|
|
654
|
-
case "<=":
|
|
655
|
-
return Number(left) <= Number(right);
|
|
656
|
-
default:
|
|
657
|
-
return false;
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
function parseLiteral(value) {
|
|
661
|
-
const trimmed = (value ?? "").trim();
|
|
662
|
-
if (trimmed.startsWith('"') && trimmed.endsWith('"') || trimmed.startsWith("'") && trimmed.endsWith("'"))
|
|
663
|
-
return trimmed.slice(1, -1);
|
|
664
|
-
if (/^-?\d+(\.\d+)?$/.test(trimmed))
|
|
665
|
-
return Number(trimmed);
|
|
666
|
-
if (/^true$/i.test(trimmed))
|
|
667
|
-
return true;
|
|
668
|
-
if (/^false$/i.test(trimmed))
|
|
669
|
-
return false;
|
|
670
|
-
if (/^null$/i.test(trimmed))
|
|
671
|
-
return null;
|
|
672
|
-
if (/^undefined$/i.test(trimmed))
|
|
673
|
-
return;
|
|
674
|
-
return trimmed;
|
|
675
|
-
}
|
|
676
|
-
function resolveRoot(root, ctx, path) {
|
|
677
|
-
const source = root === "data" ? ctx.data : root === "input" ? ctx.input : ctx.output;
|
|
678
|
-
return resolvePath(source, path);
|
|
679
|
-
}
|
|
680
|
-
function resolvePath(source, path) {
|
|
681
|
-
if (source == null)
|
|
682
|
-
return;
|
|
683
|
-
if (!path)
|
|
684
|
-
return source;
|
|
685
|
-
const segments = path.replace(/\[(\d+)\]/g, ".$1").split(".").filter(Boolean);
|
|
686
|
-
let current = source;
|
|
687
|
-
for (const segment of segments) {
|
|
688
|
-
if (current == null)
|
|
689
|
-
return;
|
|
690
|
-
current = current[segment];
|
|
691
|
-
}
|
|
692
|
-
return current;
|
|
693
|
-
}
|
|
694
|
-
function splitByOperator(expr, operator) {
|
|
695
|
-
const parts = [];
|
|
696
|
-
let buffer = "";
|
|
697
|
-
let inSingleQuote = false;
|
|
698
|
-
let inDoubleQuote = false;
|
|
699
|
-
for (let i = 0;i < expr.length; i++) {
|
|
700
|
-
const char = expr[i];
|
|
701
|
-
if (!char)
|
|
702
|
-
continue;
|
|
703
|
-
const next = expr.slice(i, i + operator.length);
|
|
704
|
-
if (char === "'" && !inDoubleQuote) {
|
|
705
|
-
inSingleQuote = !inSingleQuote;
|
|
706
|
-
buffer += char;
|
|
707
|
-
continue;
|
|
708
|
-
}
|
|
709
|
-
if (char === '"' && !inSingleQuote) {
|
|
710
|
-
inDoubleQuote = !inDoubleQuote;
|
|
711
|
-
buffer += char;
|
|
712
|
-
continue;
|
|
713
|
-
}
|
|
714
|
-
if (!inSingleQuote && !inDoubleQuote && next === operator) {
|
|
715
|
-
parts.push(buffer.trim());
|
|
716
|
-
buffer = "";
|
|
717
|
-
i += operator.length - 1;
|
|
718
|
-
continue;
|
|
719
|
-
}
|
|
720
|
-
buffer += char;
|
|
721
|
-
}
|
|
722
|
-
if (buffer.trim().length)
|
|
723
|
-
parts.push(buffer.trim());
|
|
724
|
-
return parts;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
// src/workflow/runner.ts
|
|
728
|
-
import { randomUUID } from "crypto";
|
|
729
|
-
class WorkflowRunner {
|
|
730
|
-
config;
|
|
731
|
-
constructor(config) {
|
|
732
|
-
this.config = config;
|
|
733
|
-
}
|
|
734
|
-
async preFlightCheck(workflowName, version, resolvedConfig) {
|
|
735
|
-
const spec = this.getSpec(workflowName, version);
|
|
736
|
-
return this.performPreFlight(spec, resolvedConfig);
|
|
737
|
-
}
|
|
738
|
-
async start(workflowName, version, initialData) {
|
|
739
|
-
const spec = this.getSpec(workflowName, version);
|
|
740
|
-
const entryStepId = resolveEntryStepId(spec);
|
|
741
|
-
const now = new Date;
|
|
742
|
-
const workflowId = randomUUID();
|
|
743
|
-
const state = {
|
|
744
|
-
workflowId,
|
|
745
|
-
workflowName: spec.meta.key,
|
|
746
|
-
workflowVersion: spec.meta.version,
|
|
747
|
-
currentStep: entryStepId,
|
|
748
|
-
data: { ...initialData ?? {} },
|
|
749
|
-
retryCounts: {},
|
|
750
|
-
history: [],
|
|
751
|
-
status: "running",
|
|
752
|
-
createdAt: now,
|
|
753
|
-
updatedAt: now
|
|
754
|
-
};
|
|
755
|
-
const resolvedAppConfig = this.config.appConfigProvider ? await this.config.appConfigProvider(state) : undefined;
|
|
756
|
-
const preFlightResult = await this.performPreFlight(spec, resolvedAppConfig);
|
|
757
|
-
if (!preFlightResult.canStart) {
|
|
758
|
-
throw new WorkflowPreFlightError(preFlightResult.issues);
|
|
759
|
-
}
|
|
760
|
-
await this.config.stateStore.create(state);
|
|
761
|
-
this.emit("workflow.started", {
|
|
762
|
-
workflowId,
|
|
763
|
-
workflowName: spec.meta.key,
|
|
764
|
-
workflowVersion: spec.meta.version,
|
|
765
|
-
currentStep: entryStepId
|
|
766
|
-
});
|
|
767
|
-
return workflowId;
|
|
768
|
-
}
|
|
769
|
-
async executeStep(workflowId, input) {
|
|
770
|
-
const state = await this.getStateOrThrow(workflowId);
|
|
771
|
-
if (isTerminalStatus(state.status)) {
|
|
772
|
-
throw new Error(`Workflow ${workflowId} is in terminal status "${state.status}".`);
|
|
773
|
-
}
|
|
774
|
-
const spec = this.getSpec(state.workflowName, state.workflowVersion);
|
|
775
|
-
const step = getCurrentStep(spec, state.currentStep);
|
|
776
|
-
const guardOk = await this.evaluateGuard(step, state, input);
|
|
777
|
-
if (!guardOk)
|
|
778
|
-
throw new Error(`GuardRejected: ${state.workflowName} -> ${step.id}`);
|
|
779
|
-
const execution = {
|
|
780
|
-
stepId: step.id,
|
|
781
|
-
startedAt: new Date,
|
|
782
|
-
status: "running",
|
|
783
|
-
input
|
|
784
|
-
};
|
|
785
|
-
const workingState = {
|
|
786
|
-
...state,
|
|
787
|
-
data: { ...state.data },
|
|
788
|
-
history: [...state.history]
|
|
789
|
-
};
|
|
790
|
-
try {
|
|
791
|
-
const output = await this.runStepAction(step, workingState, input);
|
|
792
|
-
execution.output = output;
|
|
793
|
-
execution.status = "completed";
|
|
794
|
-
execution.completedAt = new Date;
|
|
795
|
-
workingState.history.push(execution);
|
|
796
|
-
workingState.updatedAt = new Date;
|
|
797
|
-
if (isRecord(input)) {
|
|
798
|
-
workingState.data = { ...workingState.data, ...input };
|
|
799
|
-
}
|
|
800
|
-
if (isRecord(output)) {
|
|
801
|
-
workingState.data = { ...workingState.data, ...output };
|
|
802
|
-
}
|
|
803
|
-
const nextStepId = this.pickNextStepId(spec, workingState, step, input, output);
|
|
804
|
-
if (nextStepId) {
|
|
805
|
-
workingState.currentStep = nextStepId;
|
|
806
|
-
workingState.status = "running";
|
|
807
|
-
} else if (!hasOutgoing(spec, step.id)) {
|
|
808
|
-
workingState.status = "completed";
|
|
809
|
-
} else {
|
|
810
|
-
throw new Error(`No transition matched after executing step "${step.id}".`);
|
|
811
|
-
}
|
|
812
|
-
await this.config.stateStore.update(workflowId, () => workingState);
|
|
813
|
-
this.emit("workflow.step_completed", {
|
|
814
|
-
workflowId,
|
|
815
|
-
workflowName: state.workflowName,
|
|
816
|
-
stepId: step.id,
|
|
817
|
-
status: workingState.status
|
|
818
|
-
});
|
|
819
|
-
} catch (error) {
|
|
820
|
-
execution.status = "failed";
|
|
821
|
-
execution.completedAt = new Date;
|
|
822
|
-
execution.error = error instanceof Error ? error.message : String(error);
|
|
823
|
-
workingState.history.push(execution);
|
|
824
|
-
workingState.updatedAt = new Date;
|
|
825
|
-
if (step.retry) {
|
|
826
|
-
const retries = state.retryCounts?.[step.id] ?? 0;
|
|
827
|
-
if (retries < step.retry.maxAttempts) {
|
|
828
|
-
const backoff = step.retry.backoff ?? "exponential";
|
|
829
|
-
const baseDelay = step.retry.delayMs ?? 1000;
|
|
830
|
-
const delay = backoff === "exponential" ? baseDelay * Math.pow(2, retries) : baseDelay;
|
|
831
|
-
const cappedDelay = Math.min(delay, step.retry.maxDelayMs ?? Infinity);
|
|
832
|
-
workingState.retryCounts = {
|
|
833
|
-
...state.retryCounts ?? {},
|
|
834
|
-
[step.id]: retries + 1
|
|
835
|
-
};
|
|
836
|
-
workingState.status = "running";
|
|
837
|
-
await this.config.stateStore.update(workflowId, () => workingState);
|
|
838
|
-
this.emit("workflow.step_retrying", {
|
|
839
|
-
workflowId,
|
|
840
|
-
workflowName: state.workflowName,
|
|
841
|
-
stepId: step.id,
|
|
842
|
-
attempt: retries + 1,
|
|
843
|
-
delay: cappedDelay,
|
|
844
|
-
error: execution.error
|
|
845
|
-
});
|
|
846
|
-
await new Promise((resolve) => setTimeout(resolve, cappedDelay));
|
|
847
|
-
return this.executeStep(workflowId, input);
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
workingState.status = "failed";
|
|
851
|
-
await this.config.stateStore.update(workflowId, () => workingState);
|
|
852
|
-
this.emit("workflow.step_failed", {
|
|
853
|
-
workflowId,
|
|
854
|
-
workflowName: state.workflowName,
|
|
855
|
-
stepId: step.id,
|
|
856
|
-
error: execution.error ?? "unknown"
|
|
857
|
-
});
|
|
858
|
-
if (spec.definition.compensation?.trigger === "on_failure") {
|
|
859
|
-
await this.rollback(workflowId);
|
|
860
|
-
}
|
|
861
|
-
throw error;
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
async rollback(workflowId) {
|
|
865
|
-
const state = await this.getStateOrThrow(workflowId);
|
|
866
|
-
const spec = this.getSpec(state.workflowName, state.workflowVersion);
|
|
867
|
-
if (!spec.definition.compensation) {
|
|
868
|
-
return;
|
|
869
|
-
}
|
|
870
|
-
this.emit("workflow.rollback_started", { workflowId });
|
|
871
|
-
const completedSteps = state.history.filter((h) => h.status === "completed").reverse();
|
|
872
|
-
for (const execution of completedSteps) {
|
|
873
|
-
const compStep = spec.definition.compensation.steps.find((s) => s.stepId === execution.stepId);
|
|
874
|
-
if (compStep) {
|
|
875
|
-
const input = {
|
|
876
|
-
stepId: execution.stepId,
|
|
877
|
-
originalInput: execution.input,
|
|
878
|
-
originalOutput: execution.output,
|
|
879
|
-
workflowData: state.data
|
|
880
|
-
};
|
|
881
|
-
try {
|
|
882
|
-
const step = getCurrentStep(spec, execution.stepId);
|
|
883
|
-
const resolvedAppConfig = this.config.appConfigProvider ? await this.config.appConfigProvider(state) : undefined;
|
|
884
|
-
const executorContext = {
|
|
885
|
-
workflow: state,
|
|
886
|
-
step,
|
|
887
|
-
resolvedAppConfig,
|
|
888
|
-
integrations: resolvedAppConfig?.integrations ?? [],
|
|
889
|
-
knowledge: resolvedAppConfig?.knowledge ?? [],
|
|
890
|
-
branding: resolvedAppConfig?.branding,
|
|
891
|
-
translation: resolvedAppConfig?.translation,
|
|
892
|
-
translationResolver: this.config.translationResolver,
|
|
893
|
-
secretProvider: this.config.secretProvider
|
|
894
|
-
};
|
|
895
|
-
await this.config.opExecutor(compStep.operation, input, executorContext);
|
|
896
|
-
this.emit("workflow.compensation_step_completed", {
|
|
897
|
-
workflowId,
|
|
898
|
-
stepId: execution.stepId,
|
|
899
|
-
compensationOp: compStep.operation.key
|
|
900
|
-
});
|
|
901
|
-
} catch (error) {
|
|
902
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
903
|
-
this.emit("workflow.compensation_step_failed", {
|
|
904
|
-
workflowId,
|
|
905
|
-
stepId: execution.stepId,
|
|
906
|
-
compensationOp: compStep.operation.key,
|
|
907
|
-
error: errorMessage
|
|
908
|
-
});
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
this.emit("workflow.rollback_completed", { workflowId });
|
|
913
|
-
}
|
|
914
|
-
async getState(workflowId) {
|
|
915
|
-
return this.getStateOrThrow(workflowId);
|
|
916
|
-
}
|
|
917
|
-
async cancel(workflowId) {
|
|
918
|
-
const state = await this.getStateOrThrow(workflowId);
|
|
919
|
-
if (state.status === "cancelled")
|
|
920
|
-
return;
|
|
921
|
-
const nextState = {
|
|
922
|
-
...state,
|
|
923
|
-
status: "cancelled",
|
|
924
|
-
updatedAt: new Date
|
|
925
|
-
};
|
|
926
|
-
await this.config.stateStore.update(workflowId, () => nextState);
|
|
927
|
-
this.emit("workflow.cancelled", {
|
|
928
|
-
workflowId,
|
|
929
|
-
workflowName: state.workflowName
|
|
930
|
-
});
|
|
931
|
-
}
|
|
932
|
-
async performPreFlight(spec, resolvedConfig) {
|
|
933
|
-
if (!resolvedConfig) {
|
|
934
|
-
return { canStart: true, issues: [] };
|
|
935
|
-
}
|
|
936
|
-
const issues = [];
|
|
937
|
-
const integrationBySlot = new Map;
|
|
938
|
-
for (const integration of resolvedConfig.integrations) {
|
|
939
|
-
integrationBySlot.set(integration.slot.slotId, integration);
|
|
940
|
-
}
|
|
941
|
-
for (const step of spec.definition.steps) {
|
|
942
|
-
for (const slotId of step.requiredIntegrations ?? []) {
|
|
943
|
-
const integration = integrationBySlot.get(slotId);
|
|
944
|
-
if (!integration) {
|
|
945
|
-
issues.push({
|
|
946
|
-
stepId: step.id,
|
|
947
|
-
type: "integration",
|
|
948
|
-
identifier: slotId,
|
|
949
|
-
severity: "error",
|
|
950
|
-
reason: `Integration slot "${slotId}" is not bound in the resolved app config.`
|
|
951
|
-
});
|
|
952
|
-
continue;
|
|
953
|
-
}
|
|
954
|
-
const status = integration.connection.status;
|
|
955
|
-
if (status === "disconnected" || status === "error") {
|
|
956
|
-
issues.push({
|
|
957
|
-
stepId: step.id,
|
|
958
|
-
type: "integration",
|
|
959
|
-
identifier: slotId,
|
|
960
|
-
severity: "error",
|
|
961
|
-
reason: `Integration slot "${slotId}" is in status "${status}".`
|
|
962
|
-
});
|
|
963
|
-
} else if (status === "unknown") {
|
|
964
|
-
issues.push({
|
|
965
|
-
stepId: step.id,
|
|
966
|
-
type: "integration",
|
|
967
|
-
identifier: slotId,
|
|
968
|
-
severity: "warning",
|
|
969
|
-
reason: `Integration slot "${slotId}" reports unknown health status.`
|
|
970
|
-
});
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
const enabledCapabilities = new Set(resolvedConfig.capabilities.enabled.map(capabilityKey));
|
|
975
|
-
for (const step of spec.definition.steps) {
|
|
976
|
-
for (const required of step.requiredCapabilities ?? []) {
|
|
977
|
-
if (!enabledCapabilities.has(capabilityKey(required))) {
|
|
978
|
-
issues.push({
|
|
979
|
-
stepId: step.id,
|
|
980
|
-
type: "capability",
|
|
981
|
-
identifier: capabilityKey(required),
|
|
982
|
-
severity: "error",
|
|
983
|
-
reason: `Capability "${required.key}@${required.version}" is not enabled.`
|
|
984
|
-
});
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
const canStart = issues.every((issue) => issue.severity !== "error");
|
|
989
|
-
return { canStart, issues };
|
|
990
|
-
}
|
|
991
|
-
async evaluateGuard(step, state, input) {
|
|
992
|
-
if (!step.guard)
|
|
993
|
-
return true;
|
|
994
|
-
if (this.config.guardEvaluator)
|
|
995
|
-
return this.config.guardEvaluator(step.guard, {
|
|
996
|
-
workflow: state,
|
|
997
|
-
step,
|
|
998
|
-
input
|
|
999
|
-
});
|
|
1000
|
-
if (step.guard.type === "expression") {
|
|
1001
|
-
return evaluateExpression(step.guard.value, {
|
|
1002
|
-
data: state.data,
|
|
1003
|
-
input
|
|
1004
|
-
});
|
|
1005
|
-
}
|
|
1006
|
-
return true;
|
|
1007
|
-
}
|
|
1008
|
-
async runStepAction(step, state, input) {
|
|
1009
|
-
if (step.type === "automation") {
|
|
1010
|
-
const op = step.action?.operation;
|
|
1011
|
-
if (!op)
|
|
1012
|
-
throw new Error(`Automation step "${step.id}" requires an operation.`);
|
|
1013
|
-
const resolvedAppConfig = this.config.appConfigProvider ? await this.config.appConfigProvider(state) : undefined;
|
|
1014
|
-
const executorContext = {
|
|
1015
|
-
workflow: state,
|
|
1016
|
-
step,
|
|
1017
|
-
resolvedAppConfig,
|
|
1018
|
-
integrations: resolvedAppConfig?.integrations ?? [],
|
|
1019
|
-
knowledge: resolvedAppConfig?.knowledge ?? [],
|
|
1020
|
-
branding: resolvedAppConfig?.branding,
|
|
1021
|
-
translation: resolvedAppConfig?.translation,
|
|
1022
|
-
translationResolver: this.config.translationResolver,
|
|
1023
|
-
secretProvider: this.config.secretProvider
|
|
1024
|
-
};
|
|
1025
|
-
if (this.config.enforceCapabilities) {
|
|
1026
|
-
await this.config.enforceCapabilities(op, executorContext);
|
|
1027
|
-
}
|
|
1028
|
-
return this.config.opExecutor(op, input, executorContext);
|
|
1029
|
-
}
|
|
1030
|
-
if (step.type === "human") {
|
|
1031
|
-
return input;
|
|
1032
|
-
}
|
|
1033
|
-
return input;
|
|
1034
|
-
}
|
|
1035
|
-
pickNextStepId(spec, state, step, input, output) {
|
|
1036
|
-
const transitions = spec.definition.transitions.filter((t) => t.from === step.id);
|
|
1037
|
-
for (const transition of transitions) {
|
|
1038
|
-
if (evaluateExpression(transition.condition, {
|
|
1039
|
-
data: state.data,
|
|
1040
|
-
input,
|
|
1041
|
-
output
|
|
1042
|
-
})) {
|
|
1043
|
-
const target = spec.definition.steps.find((s) => s.id === transition.to);
|
|
1044
|
-
if (!target)
|
|
1045
|
-
throw new Error(`Transition ${transition.from} -> ${transition.to} points to missing step.`);
|
|
1046
|
-
return target.id;
|
|
1047
|
-
}
|
|
1048
|
-
}
|
|
1049
|
-
return null;
|
|
1050
|
-
}
|
|
1051
|
-
getSpec(name, version) {
|
|
1052
|
-
const spec = this.config.registry.get(name, version);
|
|
1053
|
-
if (!spec)
|
|
1054
|
-
throw new Error(`Workflow spec not found for ${name}${version ? `.v${version}` : ""}`);
|
|
1055
|
-
return spec;
|
|
1056
|
-
}
|
|
1057
|
-
async getStateOrThrow(workflowId) {
|
|
1058
|
-
const state = await this.config.stateStore.get(workflowId);
|
|
1059
|
-
if (!state)
|
|
1060
|
-
throw new Error(`Workflow state not found for ${workflowId}`);
|
|
1061
|
-
return state;
|
|
1062
|
-
}
|
|
1063
|
-
emit(event, payload) {
|
|
1064
|
-
this.config.eventEmitter?.(event, payload);
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
function resolveEntryStepId(spec) {
|
|
1068
|
-
const entry = spec.definition.entryStepId ?? spec.definition.steps[0]?.id ?? null;
|
|
1069
|
-
if (!entry)
|
|
1070
|
-
throw new Error(`Workflow ${spec.meta.key}.v${spec.meta.version} has no entry step.`);
|
|
1071
|
-
return entry;
|
|
1072
|
-
}
|
|
1073
|
-
function getCurrentStep(spec, stepId) {
|
|
1074
|
-
const step = spec.definition.steps.find((s) => s.id === stepId);
|
|
1075
|
-
if (!step)
|
|
1076
|
-
throw new Error(`Step "${stepId}" not found in workflow ${spec.meta.key}.v${spec.meta.version}.`);
|
|
1077
|
-
return step;
|
|
1078
|
-
}
|
|
1079
|
-
function hasOutgoing(spec, stepId) {
|
|
1080
|
-
return spec.definition.transitions.some((t) => t.from === stepId);
|
|
1081
|
-
}
|
|
1082
|
-
function isRecord(value) {
|
|
1083
|
-
return value != null && typeof value === "object" && !Array.isArray(value);
|
|
1084
|
-
}
|
|
1085
|
-
function isTerminalStatus(status) {
|
|
1086
|
-
return status === "completed" || status === "failed" || status === "cancelled";
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
class WorkflowPreFlightError extends Error {
|
|
1090
|
-
issues;
|
|
1091
|
-
constructor(issues) {
|
|
1092
|
-
super(`Workflow pre-flight failed: ${issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.type}:${issue.identifier}`).join(", ")}`);
|
|
1093
|
-
this.issues = issues;
|
|
1094
|
-
this.name = "WorkflowPreFlightError";
|
|
1095
|
-
}
|
|
1096
|
-
}
|
|
1097
|
-
function capabilityKey(ref) {
|
|
1098
|
-
return `${ref.key}@${ref.version}`;
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
// src/workflow/adapters/memory-store.ts
|
|
1102
|
-
function cloneState(state) {
|
|
1103
|
-
return {
|
|
1104
|
-
...state,
|
|
1105
|
-
data: deepCopy(state.data),
|
|
1106
|
-
history: state.history.map((execution) => ({
|
|
1107
|
-
...execution,
|
|
1108
|
-
input: deepCopy(execution.input),
|
|
1109
|
-
output: deepCopy(execution.output),
|
|
1110
|
-
startedAt: new Date(execution.startedAt),
|
|
1111
|
-
completedAt: execution.completedAt ? new Date(execution.completedAt) : undefined
|
|
1112
|
-
})),
|
|
1113
|
-
createdAt: new Date(state.createdAt),
|
|
1114
|
-
updatedAt: new Date(state.updatedAt)
|
|
1115
|
-
};
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
class InMemoryStateStore {
|
|
1119
|
-
items = new Map;
|
|
1120
|
-
async create(state) {
|
|
1121
|
-
if (this.items.has(state.workflowId))
|
|
1122
|
-
throw new Error(`Workflow state already exists: ${state.workflowId}`);
|
|
1123
|
-
this.items.set(state.workflowId, cloneState(state));
|
|
1124
|
-
}
|
|
1125
|
-
async get(workflowId) {
|
|
1126
|
-
const state = this.items.get(workflowId);
|
|
1127
|
-
return state ? cloneState(state) : undefined;
|
|
1128
|
-
}
|
|
1129
|
-
async update(workflowId, updater) {
|
|
1130
|
-
const current = this.items.get(workflowId);
|
|
1131
|
-
if (!current)
|
|
1132
|
-
throw new Error(`Workflow state not found for ${workflowId}`);
|
|
1133
|
-
const next = cloneState(updater(cloneState(current)));
|
|
1134
|
-
this.items.set(workflowId, next);
|
|
1135
|
-
return cloneState(next);
|
|
1136
|
-
}
|
|
1137
|
-
async list(filters) {
|
|
1138
|
-
const all = [...this.items.values()];
|
|
1139
|
-
const filtered = filters?.status ? all.filter((state) => state.status === filters.status) : all;
|
|
1140
|
-
return filtered.map(cloneState);
|
|
1141
|
-
}
|
|
1142
|
-
clear() {
|
|
1143
|
-
this.items.clear();
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
function deepCopy(value) {
|
|
1147
|
-
if (value instanceof Date)
|
|
1148
|
-
return new Date(value.getTime());
|
|
1149
|
-
if (Array.isArray(value))
|
|
1150
|
-
return value.map((item) => deepCopy(item));
|
|
1151
|
-
if (value && typeof value === "object") {
|
|
1152
|
-
const result = {};
|
|
1153
|
-
for (const [key, val] of Object.entries(value)) {
|
|
1154
|
-
result[key] = deepCopy(val);
|
|
1155
|
-
}
|
|
1156
|
-
return result;
|
|
1157
|
-
}
|
|
1158
|
-
return value;
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
// src/workflow/adapters/db-adapter.ts
|
|
1162
|
-
class PrismaStateStore {
|
|
1163
|
-
prisma;
|
|
1164
|
-
constructor(prisma) {
|
|
1165
|
-
this.prisma = prisma;
|
|
1166
|
-
}
|
|
1167
|
-
async create(state) {
|
|
1168
|
-
await this.prisma.workflowState.create({
|
|
1169
|
-
data: {
|
|
1170
|
-
id: state.workflowId,
|
|
1171
|
-
name: state.workflowName,
|
|
1172
|
-
version: state.workflowVersion,
|
|
1173
|
-
status: state.status,
|
|
1174
|
-
currentStep: state.currentStep,
|
|
1175
|
-
data: state.data,
|
|
1176
|
-
history: state.history,
|
|
1177
|
-
retryCounts: state.retryCounts ?? {},
|
|
1178
|
-
createdAt: state.createdAt,
|
|
1179
|
-
updatedAt: state.updatedAt
|
|
1180
|
-
}
|
|
1181
|
-
});
|
|
1182
|
-
}
|
|
1183
|
-
async get(workflowId) {
|
|
1184
|
-
const record = await this.prisma.workflowState.findUnique({
|
|
1185
|
-
where: { id: workflowId }
|
|
1186
|
-
});
|
|
1187
|
-
if (!record)
|
|
1188
|
-
return;
|
|
1189
|
-
return {
|
|
1190
|
-
workflowId: record.id,
|
|
1191
|
-
workflowName: record.name,
|
|
1192
|
-
workflowVersion: record.version,
|
|
1193
|
-
currentStep: record.currentStep,
|
|
1194
|
-
data: record.data,
|
|
1195
|
-
history: record.history,
|
|
1196
|
-
retryCounts: record.retryCounts,
|
|
1197
|
-
status: record.status,
|
|
1198
|
-
createdAt: record.createdAt,
|
|
1199
|
-
updatedAt: record.updatedAt
|
|
1200
|
-
};
|
|
1201
|
-
}
|
|
1202
|
-
async update(workflowId, updater) {
|
|
1203
|
-
const current = await this.get(workflowId);
|
|
1204
|
-
if (!current) {
|
|
1205
|
-
throw new Error(`Workflow ${workflowId} not found`);
|
|
1206
|
-
}
|
|
1207
|
-
const next = updater(current);
|
|
1208
|
-
const updated = await this.prisma.workflowState.update({
|
|
1209
|
-
where: { id: workflowId },
|
|
1210
|
-
data: {
|
|
1211
|
-
status: next.status,
|
|
1212
|
-
currentStep: next.currentStep,
|
|
1213
|
-
data: next.data,
|
|
1214
|
-
history: next.history,
|
|
1215
|
-
retryCounts: next.retryCounts,
|
|
1216
|
-
updatedAt: next.updatedAt
|
|
1217
|
-
}
|
|
1218
|
-
});
|
|
1219
|
-
return {
|
|
1220
|
-
workflowId: updated.id,
|
|
1221
|
-
workflowName: updated.name,
|
|
1222
|
-
workflowVersion: updated.version,
|
|
1223
|
-
currentStep: updated.currentStep,
|
|
1224
|
-
data: updated.data,
|
|
1225
|
-
history: updated.history,
|
|
1226
|
-
retryCounts: updated.retryCounts,
|
|
1227
|
-
status: updated.status,
|
|
1228
|
-
createdAt: updated.createdAt,
|
|
1229
|
-
updatedAt: updated.updatedAt
|
|
1230
|
-
};
|
|
1231
|
-
}
|
|
1232
|
-
async list(filters) {
|
|
1233
|
-
const where = {};
|
|
1234
|
-
if (filters?.status) {
|
|
1235
|
-
where.status = filters.status;
|
|
1236
|
-
}
|
|
1237
|
-
const records = await this.prisma.workflowState.findMany({
|
|
1238
|
-
where
|
|
1239
|
-
});
|
|
1240
|
-
return records.map((record) => ({
|
|
1241
|
-
workflowId: record.id,
|
|
1242
|
-
workflowName: record.name,
|
|
1243
|
-
workflowVersion: record.version,
|
|
1244
|
-
currentStep: record.currentStep,
|
|
1245
|
-
data: record.data,
|
|
1246
|
-
history: record.history,
|
|
1247
|
-
retryCounts: record.retryCounts,
|
|
1248
|
-
status: record.status,
|
|
1249
|
-
createdAt: record.createdAt,
|
|
1250
|
-
updatedAt: record.updatedAt
|
|
1251
|
-
}));
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
// src/workflow/adapters/file-adapter.ts
|
|
1256
|
-
function createFileStateStore(_options) {
|
|
1257
|
-
throw new Error("File-backed state store adapter not implemented. Provide a custom adapter that satisfies StateStore.");
|
|
1258
|
-
}
|
|
1259
|
-
// src/workflow/context.ts
|
|
1260
|
-
class WorkflowContextError extends Error {
|
|
1261
|
-
errorType;
|
|
1262
|
-
workflowId;
|
|
1263
|
-
details;
|
|
1264
|
-
constructor(type, workflowId, message, details) {
|
|
1265
|
-
super(message);
|
|
1266
|
-
this.name = "WorkflowContextError";
|
|
1267
|
-
this.errorType = type;
|
|
1268
|
-
this.workflowId = workflowId;
|
|
1269
|
-
this.details = details;
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
class WorkflowContextImpl {
|
|
1274
|
-
state;
|
|
1275
|
-
spec;
|
|
1276
|
-
constructor(state, spec) {
|
|
1277
|
-
this.state = state;
|
|
1278
|
-
this.spec = spec;
|
|
1279
|
-
}
|
|
1280
|
-
get workflowId() {
|
|
1281
|
-
return this.state.workflowId;
|
|
1282
|
-
}
|
|
1283
|
-
get workflowKey() {
|
|
1284
|
-
return this.state.workflowName;
|
|
1285
|
-
}
|
|
1286
|
-
get workflowVersion() {
|
|
1287
|
-
return this.state.workflowVersion;
|
|
1288
|
-
}
|
|
1289
|
-
get currentStep() {
|
|
1290
|
-
return this.state.currentStep;
|
|
1291
|
-
}
|
|
1292
|
-
get status() {
|
|
1293
|
-
return this.state.status;
|
|
1294
|
-
}
|
|
1295
|
-
get data() {
|
|
1296
|
-
return this.state.data;
|
|
1297
|
-
}
|
|
1298
|
-
get history() {
|
|
1299
|
-
return this.state.history;
|
|
1300
|
-
}
|
|
1301
|
-
getState() {
|
|
1302
|
-
return this.state;
|
|
1303
|
-
}
|
|
1304
|
-
getData(key) {
|
|
1305
|
-
return this.state.data[key];
|
|
1306
|
-
}
|
|
1307
|
-
isTerminal() {
|
|
1308
|
-
return this.state.status === "completed" || this.state.status === "failed" || this.state.status === "cancelled";
|
|
1309
|
-
}
|
|
1310
|
-
isRunning() {
|
|
1311
|
-
return this.state.status === "running";
|
|
1312
|
-
}
|
|
1313
|
-
getCurrentStepDef() {
|
|
1314
|
-
return this.spec.definition.steps.find((s) => s.id === this.state.currentStep);
|
|
1315
|
-
}
|
|
1316
|
-
getRetryCount(stepId) {
|
|
1317
|
-
const id = stepId ?? this.state.currentStep;
|
|
1318
|
-
return this.state.retryCounts?.[id] ?? 0;
|
|
1319
|
-
}
|
|
1320
|
-
canTransition(toStepId) {
|
|
1321
|
-
const transitions = this.spec.definition.transitions.filter((t) => t.from === this.state.currentStep && t.to === toStepId);
|
|
1322
|
-
return transitions.length > 0;
|
|
1323
|
-
}
|
|
1324
|
-
getAvailableTransitions() {
|
|
1325
|
-
return this.spec.definition.transitions.filter((t) => t.from === this.state.currentStep).map((t) => ({
|
|
1326
|
-
from: t.from,
|
|
1327
|
-
to: t.to,
|
|
1328
|
-
label: t.label,
|
|
1329
|
-
condition: t.condition
|
|
1330
|
-
}));
|
|
1331
|
-
}
|
|
1332
|
-
hasNextStep() {
|
|
1333
|
-
return this.spec.definition.transitions.some((t) => t.from === this.state.currentStep);
|
|
1334
|
-
}
|
|
1335
|
-
getRemainingTime(slaKey) {
|
|
1336
|
-
const sla = this.spec.definition.sla;
|
|
1337
|
-
if (!sla)
|
|
1338
|
-
return null;
|
|
1339
|
-
const now = Date.now();
|
|
1340
|
-
if (slaKey === "totalDuration") {
|
|
1341
|
-
if (!sla.totalDurationMs)
|
|
1342
|
-
return null;
|
|
1343
|
-
const elapsed2 = now - this.state.createdAt.getTime();
|
|
1344
|
-
return Math.max(0, sla.totalDurationMs - elapsed2);
|
|
1345
|
-
}
|
|
1346
|
-
const stepLimit = sla.stepDurationMs?.[slaKey];
|
|
1347
|
-
if (!stepLimit)
|
|
1348
|
-
return null;
|
|
1349
|
-
const stepExecution = this.state.history.find((h) => h.stepId === slaKey && h.status === "running");
|
|
1350
|
-
if (!stepExecution)
|
|
1351
|
-
return stepLimit;
|
|
1352
|
-
const elapsed = now - stepExecution.startedAt.getTime();
|
|
1353
|
-
return Math.max(0, stepLimit - elapsed);
|
|
1354
|
-
}
|
|
1355
|
-
isSlaViolated(slaKey) {
|
|
1356
|
-
const remaining = this.getRemainingTime(slaKey);
|
|
1357
|
-
return remaining !== null && remaining <= 0;
|
|
1358
|
-
}
|
|
1359
|
-
getAllSlaStatuses() {
|
|
1360
|
-
const sla = this.spec.definition.sla;
|
|
1361
|
-
if (!sla)
|
|
1362
|
-
return [];
|
|
1363
|
-
const statuses = [];
|
|
1364
|
-
const now = Date.now();
|
|
1365
|
-
if (sla.totalDurationMs) {
|
|
1366
|
-
const elapsed = now - this.state.createdAt.getTime();
|
|
1367
|
-
const remaining = Math.max(0, sla.totalDurationMs - elapsed);
|
|
1368
|
-
statuses.push({
|
|
1369
|
-
key: "totalDuration",
|
|
1370
|
-
type: "workflow",
|
|
1371
|
-
limitMs: sla.totalDurationMs,
|
|
1372
|
-
elapsedMs: elapsed,
|
|
1373
|
-
remainingMs: remaining,
|
|
1374
|
-
violated: remaining <= 0,
|
|
1375
|
-
percentUsed: elapsed / sla.totalDurationMs * 100
|
|
1376
|
-
});
|
|
1377
|
-
}
|
|
1378
|
-
if (sla.stepDurationMs) {
|
|
1379
|
-
for (const [stepId, limitMs] of Object.entries(sla.stepDurationMs)) {
|
|
1380
|
-
const stepExecution = this.state.history.find((h) => h.stepId === stepId && h.status === "running");
|
|
1381
|
-
const elapsed = stepExecution ? now - stepExecution.startedAt.getTime() : 0;
|
|
1382
|
-
const remaining = Math.max(0, limitMs - elapsed);
|
|
1383
|
-
statuses.push({
|
|
1384
|
-
key: stepId,
|
|
1385
|
-
type: "step",
|
|
1386
|
-
stepId,
|
|
1387
|
-
limitMs,
|
|
1388
|
-
elapsedMs: elapsed,
|
|
1389
|
-
remainingMs: remaining,
|
|
1390
|
-
violated: stepExecution !== undefined && remaining <= 0,
|
|
1391
|
-
percentUsed: elapsed / limitMs * 100
|
|
1392
|
-
});
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
return statuses;
|
|
1396
|
-
}
|
|
1397
|
-
hasCompensation() {
|
|
1398
|
-
return this.spec.definition.compensation !== undefined;
|
|
1399
|
-
}
|
|
1400
|
-
getCompensableSteps() {
|
|
1401
|
-
const compensation = this.spec.definition.compensation;
|
|
1402
|
-
if (!compensation)
|
|
1403
|
-
return [];
|
|
1404
|
-
return compensation.steps.map((s) => s.stepId);
|
|
1405
|
-
}
|
|
1406
|
-
getEvents() {
|
|
1407
|
-
const events = [];
|
|
1408
|
-
for (const execution of this.state.history) {
|
|
1409
|
-
events.push({
|
|
1410
|
-
timestamp: execution.startedAt,
|
|
1411
|
-
type: "step_started",
|
|
1412
|
-
stepId: execution.stepId,
|
|
1413
|
-
input: execution.input
|
|
1414
|
-
});
|
|
1415
|
-
if (execution.completedAt) {
|
|
1416
|
-
if (execution.status === "completed") {
|
|
1417
|
-
events.push({
|
|
1418
|
-
timestamp: execution.completedAt,
|
|
1419
|
-
type: "step_completed",
|
|
1420
|
-
stepId: execution.stepId,
|
|
1421
|
-
output: execution.output
|
|
1422
|
-
});
|
|
1423
|
-
} else if (execution.status === "failed") {
|
|
1424
|
-
events.push({
|
|
1425
|
-
timestamp: execution.completedAt,
|
|
1426
|
-
type: "step_failed",
|
|
1427
|
-
stepId: execution.stepId,
|
|
1428
|
-
error: execution.error
|
|
1429
|
-
});
|
|
1430
|
-
}
|
|
1431
|
-
}
|
|
1432
|
-
}
|
|
1433
|
-
events.sort((a, b) => a.timestamp.getTime() - b.timestamp.getTime());
|
|
1434
|
-
return events;
|
|
1435
|
-
}
|
|
1436
|
-
}
|
|
1437
|
-
function createWorkflowContext(state, spec) {
|
|
1438
|
-
return new WorkflowContextImpl(state, spec);
|
|
1439
|
-
}
|
|
1440
|
-
function calculateWorkflowProgress(ctx) {
|
|
1441
|
-
const state = ctx.getState();
|
|
1442
|
-
const completedSteps = new Set(state.history.filter((h) => h.status === "completed").map((h) => h.stepId));
|
|
1443
|
-
const _totalSteps = completedSteps.size + (ctx.isTerminal() ? 0 : 1);
|
|
1444
|
-
if (ctx.status === "completed")
|
|
1445
|
-
return 100;
|
|
1446
|
-
if (ctx.status === "failed" || ctx.status === "cancelled") {
|
|
1447
|
-
return completedSteps.size > 0 ? Math.min(99, completedSteps.size * 20) : 0;
|
|
1448
|
-
}
|
|
1449
|
-
return Math.min(99, completedSteps.size * 20);
|
|
1450
|
-
}
|
|
1451
|
-
function getWorkflowDuration(ctx) {
|
|
1452
|
-
const state = ctx.getState();
|
|
1453
|
-
const endTime = ctx.isTerminal() ? state.updatedAt.getTime() : Date.now();
|
|
1454
|
-
return endTime - state.createdAt.getTime();
|
|
1455
|
-
}
|
|
1456
|
-
function getAverageStepDuration(ctx) {
|
|
1457
|
-
const completedSteps = ctx.history.filter((h) => h.status === "completed" && h.completedAt);
|
|
1458
|
-
if (completedSteps.length === 0)
|
|
1459
|
-
return 0;
|
|
1460
|
-
const totalDuration = completedSteps.reduce((sum, step) => {
|
|
1461
|
-
if (!step.completedAt)
|
|
1462
|
-
return sum;
|
|
1463
|
-
const duration = step.completedAt.getTime() - step.startedAt.getTime();
|
|
1464
|
-
return sum + duration;
|
|
1465
|
-
}, 0);
|
|
1466
|
-
return totalDuration / completedSteps.length;
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
// src/workflow/sla-monitor.ts
|
|
1470
|
-
class SLAMonitor {
|
|
1471
|
-
eventEmitter;
|
|
1472
|
-
constructor(eventEmitter) {
|
|
1473
|
-
this.eventEmitter = eventEmitter;
|
|
1474
|
-
}
|
|
1475
|
-
check(state, spec) {
|
|
1476
|
-
const sla = spec.definition.sla;
|
|
1477
|
-
if (!sla)
|
|
1478
|
-
return;
|
|
1479
|
-
const now = new Date().getTime();
|
|
1480
|
-
if (sla.totalDurationMs) {
|
|
1481
|
-
const duration = now - state.createdAt.getTime();
|
|
1482
|
-
if (duration > sla.totalDurationMs) {
|
|
1483
|
-
if (state.status === "running" || state.status === "paused") {
|
|
1484
|
-
this.eventEmitter("workflow.sla_breach", {
|
|
1485
|
-
workflowId: state.workflowId,
|
|
1486
|
-
workflowName: state.workflowName,
|
|
1487
|
-
type: "workflow_duration",
|
|
1488
|
-
expectedMs: sla.totalDurationMs,
|
|
1489
|
-
actualMs: duration,
|
|
1490
|
-
breachedAt: new Date
|
|
1491
|
-
});
|
|
1492
|
-
}
|
|
1493
|
-
}
|
|
1494
|
-
}
|
|
1495
|
-
if (sla.stepDurationMs) {
|
|
1496
|
-
if (state.status === "running" && state.currentStep) {
|
|
1497
|
-
const currentExecution = state.history.find((h) => h.stepId === state.currentStep && h.status === "running");
|
|
1498
|
-
if (currentExecution) {
|
|
1499
|
-
const stepLimit = sla.stepDurationMs[state.currentStep];
|
|
1500
|
-
if (stepLimit) {
|
|
1501
|
-
const stepDuration = now - currentExecution.startedAt.getTime();
|
|
1502
|
-
if (stepDuration > stepLimit) {
|
|
1503
|
-
this.eventEmitter("workflow.sla_breach", {
|
|
1504
|
-
workflowId: state.workflowId,
|
|
1505
|
-
workflowName: state.workflowName,
|
|
1506
|
-
type: "step_duration",
|
|
1507
|
-
stepId: state.currentStep,
|
|
1508
|
-
expectedMs: stepLimit,
|
|
1509
|
-
actualMs: stepDuration,
|
|
1510
|
-
breachedAt: new Date
|
|
1511
|
-
});
|
|
1512
|
-
}
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
-
}
|
|
1516
|
-
}
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
// src/workflow/index.ts
|
|
1521
|
-
var defineWorkflow = (spec2) => spec2;
|
|
1522
|
-
export {
|
|
1523
|
-
validateWorkflowSpec,
|
|
1524
|
-
validateWorkflowConsistency,
|
|
1525
|
-
validateWorkflowComprehensive,
|
|
1526
|
-
validateSlaConfig,
|
|
1527
|
-
validateRetryConfig,
|
|
1528
|
-
validateCompensation,
|
|
1529
|
-
getWorkflowDuration,
|
|
1530
|
-
getAverageStepDuration,
|
|
1531
|
-
evaluateExpression,
|
|
1532
|
-
defineWorkflow,
|
|
1533
|
-
createWorkflowContext,
|
|
1534
|
-
createFileStateStore,
|
|
1535
|
-
calculateWorkflowProgress,
|
|
1536
|
-
assertWorkflowSpecValid,
|
|
1537
|
-
assertWorkflowConsistency,
|
|
1538
|
-
WorkflowValidationError,
|
|
1539
|
-
WorkflowRunner,
|
|
1540
|
-
WorkflowRegistry,
|
|
1541
|
-
WorkflowPreFlightError,
|
|
1542
|
-
WorkflowContextError,
|
|
1543
|
-
SLAMonitor,
|
|
1544
|
-
PrismaStateStore,
|
|
1545
|
-
InMemoryStateStore
|
|
1546
|
-
};
|