@flowdular/sdk 0.2.4 → 0.3.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/.ai/agents/sandbox/business-manager.md +5 -1
- package/.ai/blueprints/author-spec/README.md +1 -1
- package/.ai/blueprints/author-spec/spec-requirements.yaml +44 -0
- package/.ai/blueprints/author-spec/steps.yaml +5 -5
- package/.ai/blueprints/author-spec/templates/module.yaml +99 -3
- package/.ai/blueprints/edit-module/gates.yaml +4 -0
- package/.ai/blueprints/edit-module/required-files.yaml +9 -0
- package/.ai/blueprints/new-module/gates.yaml +4 -0
- package/.ai/blueprints/new-module/spec-requirements.yaml +2 -2
- package/.ai/blueprints/release/gates.yaml +4 -0
- package/.ai/platform-capabilities.md +128 -0
- package/.ai/policies/capabilities.yaml +100 -0
- package/.ai/policies/path-ownership.yaml +5 -2
- package/.ai/policies/task-budgets.yaml +5 -3
- package/.ai/references/catalog/module.json +4 -4
- package/.ai/references/catalog/package.json +2 -2
- package/.ai/references/catalog/spec/module.yaml +5 -3
- package/.ai/references/catalog/src/platform.ts +2 -0
- package/.ai/references/catalog/src/services/catalog-service.ts +89 -1
- package/.ai/references/catalog/src/services/data-classes.ts +47 -0
- package/.ai/references/catalog/src/services/database-repository.ts +98 -1
- package/.ai/references/catalog/src/services/repository.ts +22 -1
- package/.ai/references/catalog/tests/data-classes.test.ts +157 -0
- package/.ai/references/catalog.provenance.json +12 -10
- package/.ai/skills/README.md +10 -0
- package/.ai/skills/agent-tool-design/SKILL.md +1 -2
- package/.ai/skills/auth-security-review/SKILL.md +1 -1
- package/.ai/skills/business-agent-design/SKILL.md +0 -1
- package/.ai/skills/deploy-operate/SKILL.md +114 -0
- package/.ai/skills/module-new/SKILL.md +29 -3
- package/.ai/skills/module-update/SKILL.md +9 -3
- package/.ai/skills/perf-audit/SKILL.md +0 -1
- package/.ai/skills/release-eject-pr/SKILL.md +0 -1
- package/.ai/skills/spec-interview/SKILL.md +120 -0
- package/.ai/skills/test-hardening/SKILL.md +1 -0
- package/.ai/skills/ux-design/SKILL.md +34 -3
- package/.ai/skills/variables/SKILL.md +0 -2
- package/.ai/skills/workflow-development/SKILL.md +0 -1
- package/AGENTS.md +4 -0
- package/docs/agent-contract.md +2 -2
- package/docs/design-system.md +185 -31
- package/modules/access/migrations/0001_access_core.down.sql +1 -0
- package/modules/access/migrations/0001_access_core.up.sql +28 -0
- package/modules/access/migrations/README.md +3 -0
- package/modules/access/module.json +33 -0
- package/modules/access/package.json +43 -0
- package/modules/access/spec/module.yaml +225 -0
- package/modules/access/src/acl/permissions.ts +6 -0
- package/modules/access/src/api/endpoints.ts +244 -0
- package/modules/access/src/client/ActivityView.tsrx +245 -0
- package/modules/access/src/client/AttestationsView.tsrx +176 -0
- package/modules/access/src/client/ReviewView.tsrx +586 -0
- package/modules/access/src/client/api.ts +132 -0
- package/modules/access/src/client/contribution.tsrx +41 -0
- package/modules/access/src/client/index.ts +41 -0
- package/modules/access/src/client/navigation.ts +57 -0
- package/modules/access/src/client/presentation.ts +69 -0
- package/modules/access/src/client/state.ts +72 -0
- package/modules/access/src/domain/types.ts +189 -0
- package/modules/access/src/index.ts +38 -0
- package/modules/access/src/platform.ts +60 -0
- package/modules/access/src/server/index.ts +42 -0
- package/modules/access/src/server/runtime.ts +105 -0
- package/modules/access/src/services/access-service.ts +298 -0
- package/modules/access/src/services/audit-window.ts +78 -0
- package/modules/access/src/services/auth-directory.ts +72 -0
- package/modules/access/src/services/changes.ts +91 -0
- package/modules/access/src/services/data-classes.ts +28 -0
- package/modules/access/src/services/database-repository.ts +185 -0
- package/modules/access/src/services/directory.ts +102 -0
- package/modules/access/src/services/index.ts +33 -0
- package/modules/access/src/services/list-exports.ts +150 -0
- package/modules/access/src/services/migration.ts +54 -0
- package/modules/access/src/services/repository.ts +30 -0
- package/modules/access/src/services/review.ts +178 -0
- package/modules/access/translations/en.json +155 -0
- package/modules/access/translations/pl.json +155 -0
- package/modules/agents/migrations/0022_credential_rotation_inventory.down.sql +2 -0
- package/modules/agents/migrations/0022_credential_rotation_inventory.up.sql +7 -0
- package/modules/agents/migrations/0023_agents_retention_indexes.down.sql +2 -0
- package/modules/agents/migrations/0023_agents_retention_indexes.up.sql +9 -0
- package/modules/agents/migrations/0024_agent_meter_refusals.down.sql +3 -0
- package/modules/agents/migrations/0024_agent_meter_refusals.up.sql +22 -0
- package/modules/agents/migrations/0025_agent_list_indexes.down.sql +3 -0
- package/modules/agents/migrations/0025_agent_list_indexes.up.sql +11 -0
- package/modules/agents/module.json +30 -4
- package/modules/agents/package.json +2 -1
- package/modules/agents/spec/module.yaml +63 -5
- package/modules/agents/src/api/endpoints.ts +291 -33
- package/modules/agents/src/cli/commands.json +11 -0
- package/modules/agents/src/cli/index.ts +45 -0
- package/modules/agents/src/client/AgentDashboardWidget.tsrx +19 -11
- package/modules/agents/src/client/AgentDefinitionList.tsrx +53 -10
- package/modules/agents/src/client/AgentPlaygroundView.tsrx +4 -4
- package/modules/agents/src/client/AgentProceduresView.tsrx +2 -2
- package/modules/agents/src/client/AgentRunsView.tsrx +143 -40
- package/modules/agents/src/client/AgentsView.tsrx +109 -33
- package/modules/agents/src/client/api.ts +99 -21
- package/modules/agents/src/client/state.ts +97 -0
- package/modules/agents/src/domain/types.ts +44 -4
- package/modules/agents/src/platform.ts +42 -0
- package/modules/agents/src/server/action-execution.ts +201 -106
- package/modules/agents/src/server/runtime.ts +32 -0
- package/modules/agents/src/services/agent-service.ts +158 -30
- package/modules/agents/src/services/credential-rotation.ts +185 -0
- package/modules/agents/src/services/credential-vault.ts +71 -46
- package/modules/agents/src/services/data-classes.ts +176 -0
- package/modules/agents/src/services/database-repository.ts +393 -101
- package/modules/agents/src/services/metering.ts +111 -0
- package/modules/agents/src/services/migration.ts +109 -0
- package/modules/agents/src/services/module-agent-preflight.ts +17 -9
- package/modules/agents/src/services/notifications.ts +98 -0
- package/modules/agents/src/services/provider-repository.ts +9 -18
- package/modules/agents/src/services/provider-service.ts +1 -9
- package/modules/agents/src/services/reports.ts +107 -0
- package/modules/agents/src/services/repository.ts +86 -6
- package/modules/agents/src/services/usage-service.ts +2 -0
- package/modules/agents/src/services/worker.ts +114 -4
- package/modules/agents/src/settings.ts +14 -3
- package/modules/agents/translations/en.json +14 -4
- package/modules/agents/translations/pl.json +14 -4
- package/modules/approvals/migrations/0001_approvals_core.down.sql +3 -0
- package/modules/approvals/migrations/0001_approvals_core.up.sql +78 -0
- package/modules/approvals/migrations/0002_approvals_expiry_routing_role.down.sql +2 -0
- package/modules/approvals/migrations/0002_approvals_expiry_routing_role.up.sql +19 -0
- package/modules/approvals/migrations/0003_approvals_retention_indexes.down.sql +6 -0
- package/modules/approvals/migrations/0003_approvals_retention_indexes.up.sql +14 -0
- package/modules/approvals/migrations/0004_approvals_inbox_keyset_indexes.down.sql +5 -0
- package/modules/approvals/migrations/0004_approvals_inbox_keyset_indexes.up.sql +12 -0
- package/modules/approvals/migrations/README.md +3 -0
- package/modules/approvals/module.json +34 -0
- package/modules/approvals/package.json +43 -0
- package/modules/approvals/spec/module.yaml +318 -0
- package/modules/approvals/src/acl/permissions.ts +7 -0
- package/modules/approvals/src/api/endpoints.ts +457 -0
- package/modules/approvals/src/client/ApprovalRequestDrawer.tsrx +138 -0
- package/modules/approvals/src/client/ApprovalsView.tsrx +562 -0
- package/modules/approvals/src/client/PendingCountWidget.tsrx +52 -0
- package/modules/approvals/src/client/api.ts +203 -0
- package/modules/approvals/src/client/approvals.css +51 -0
- package/modules/approvals/src/client/contribution.tsrx +44 -0
- package/modules/approvals/src/client/index.ts +26 -0
- package/modules/approvals/src/client/navigation.ts +39 -0
- package/modules/approvals/src/client/pending-count.ts +26 -0
- package/modules/approvals/src/client/presentation.ts +52 -0
- package/modules/approvals/src/client/state.ts +141 -0
- package/modules/approvals/src/domain/capability.ts +95 -0
- package/modules/approvals/src/domain/types.ts +154 -0
- package/modules/approvals/src/index.ts +52 -0
- package/modules/approvals/src/platform.ts +128 -0
- package/modules/approvals/src/server/index.ts +42 -0
- package/modules/approvals/src/server/runtime.ts +181 -0
- package/modules/approvals/src/services/approvals-service.ts +557 -0
- package/modules/approvals/src/services/callbacks.ts +75 -0
- package/modules/approvals/src/services/data-classes.ts +167 -0
- package/modules/approvals/src/services/database-repository.ts +724 -0
- package/modules/approvals/src/services/eligibility.ts +121 -0
- package/modules/approvals/src/services/expiry-runner.ts +81 -0
- package/modules/approvals/src/services/index.ts +31 -0
- package/modules/approvals/src/services/migration.ts +222 -0
- package/modules/approvals/src/services/notifications.ts +95 -0
- package/modules/approvals/src/services/repository.ts +161 -0
- package/modules/approvals/src/services/service-error.ts +70 -0
- package/modules/approvals/src/settings.ts +102 -0
- package/modules/approvals/translations/en.json +104 -0
- package/modules/approvals/translations/pl.json +104 -0
- package/modules/audit/migrations/0001_audit_core.down.sql +8 -0
- package/modules/audit/migrations/0001_audit_core.up.sql +107 -0
- package/modules/audit/migrations/0002_audit_sweep_routing_role.down.sql +2 -0
- package/modules/audit/migrations/0002_audit_sweep_routing_role.up.sql +21 -0
- package/modules/audit/migrations/0003_audit_export_request.down.sql +12 -0
- package/modules/audit/migrations/0003_audit_export_request.up.sql +40 -0
- package/modules/audit/migrations/0004_audit_hold_seal_erasure.down.sql +17 -0
- package/modules/audit/migrations/0004_audit_hold_seal_erasure.up.sql +192 -0
- package/modules/audit/migrations/0005_audit_event_format.down.sql +17 -0
- package/modules/audit/migrations/0005_audit_event_format.up.sql +60 -0
- package/modules/audit/migrations/0006_audit_own_class_walks.down.sql +3 -0
- package/modules/audit/migrations/0006_audit_own_class_walks.up.sql +14 -0
- package/modules/audit/migrations/README.md +3 -0
- package/modules/audit/module.json +32 -0
- package/modules/audit/package.json +49 -0
- package/modules/audit/spec/module.yaml +809 -0
- package/modules/audit/src/acl/permissions.ts +7 -0
- package/modules/audit/src/api/endpoints.ts +315 -0
- package/modules/audit/src/cli/commands.json +95 -0
- package/modules/audit/src/cli/index.ts +658 -0
- package/modules/audit/src/client/DataClassesView.tsrx +420 -0
- package/modules/audit/src/client/ExportsView.tsrx +256 -0
- package/modules/audit/src/client/HoldsView.tsrx +604 -0
- package/modules/audit/src/client/SweepsView.tsrx +251 -0
- package/modules/audit/src/client/api.ts +185 -0
- package/modules/audit/src/client/contribution.tsrx +52 -0
- package/modules/audit/src/client/index.ts +23 -0
- package/modules/audit/src/client/navigation.ts +74 -0
- package/modules/audit/src/client/presentation.ts +105 -0
- package/modules/audit/src/client/state.ts +86 -0
- package/modules/audit/src/domain/data-classes.ts +16 -0
- package/modules/audit/src/domain/types.ts +339 -0
- package/modules/audit/src/index.ts +76 -0
- package/modules/audit/src/platform.ts +44 -0
- package/modules/audit/src/server/index.ts +177 -0
- package/modules/audit/src/server/runtime.ts +303 -0
- package/modules/audit/src/services/anchor-key.ts +143 -0
- package/modules/audit/src/services/anchor-rotation.ts +147 -0
- package/modules/audit/src/services/audit-runners.ts +278 -0
- package/modules/audit/src/services/backup-guard.ts +95 -0
- package/modules/audit/src/services/database-repository.ts +1946 -0
- package/modules/audit/src/services/declared-classes.ts +64 -0
- package/modules/audit/src/services/erasure-port.ts +126 -0
- package/modules/audit/src/services/erasure-service.ts +770 -0
- package/modules/audit/src/services/export-directory.ts +106 -0
- package/modules/audit/src/services/export-service.ts +714 -0
- package/modules/audit/src/services/hold-service.ts +295 -0
- package/modules/audit/src/services/index.ts +17 -0
- package/modules/audit/src/services/migration.ts +658 -0
- package/modules/audit/src/services/own-classes.ts +318 -0
- package/modules/audit/src/services/platform-version.ts +23 -0
- package/modules/audit/src/services/repository.ts +495 -0
- package/modules/audit/src/services/retention-service.ts +191 -0
- package/modules/audit/src/services/seal-service.ts +769 -0
- package/modules/audit/src/services/service-error.ts +61 -0
- package/modules/audit/src/services/subject-keys.ts +90 -0
- package/modules/audit/src/services/sweep-service.ts +298 -0
- package/modules/audit/src/services/zip.ts +217 -0
- package/modules/audit/src/settings.ts +69 -0
- package/modules/audit/translations/en.json +210 -0
- package/modules/audit/translations/pl.json +210 -0
- package/modules/auth/README.md +77 -29
- package/modules/auth/migrations/0016_external_identities.up.sql +16 -0
- package/modules/auth/migrations/0017_mfa_key_id.up.sql +8 -0
- package/modules/auth/migrations/0018_retire_bundled_module_scopes.up.sql +29 -0
- package/modules/auth/migrations/0019_notifications_member_scopes.up.sql +44 -0
- package/modules/auth/migrations/0020_identity_providers.up.sql +61 -0
- package/modules/auth/migrations/0021_membership_status.up.sql +19 -0
- package/modules/auth/migrations/0022_auth_provider_scopes.up.sql +45 -0
- package/modules/auth/migrations/0023_enterprise_module_scopes.down.sql +19 -0
- package/modules/auth/migrations/0023_enterprise_module_scopes.up.sql +71 -0
- package/modules/auth/migrations/0024_approvals_member_scopes.down.sql +22 -0
- package/modules/auth/migrations/0024_approvals_member_scopes.up.sql +48 -0
- package/modules/auth/migrations/0025_audit_holds_owner_scope.down.sql +21 -0
- package/modules/auth/migrations/0025_audit_holds_owner_scope.up.sql +47 -0
- package/modules/auth/migrations/0026_auth_export_keyset_indexes.down.sql +6 -0
- package/modules/auth/migrations/0026_auth_export_keyset_indexes.up.sql +15 -0
- package/modules/auth/migrations/0027_workflow_automation_profile_scopes.down.sql +34 -0
- package/modules/auth/migrations/0027_workflow_automation_profile_scopes.up.sql +72 -0
- package/modules/auth/migrations/0028_auth_member_search_prefix_indexes.down.sql +6 -0
- package/modules/auth/migrations/0028_auth_member_search_prefix_indexes.up.sql +21 -0
- package/modules/auth/migrations/0029_reports_exports_access_scopes.down.sql +22 -0
- package/modules/auth/migrations/0029_reports_exports_access_scopes.up.sql +56 -0
- package/modules/auth/migrations/0030_auth_membership_keyset_index.down.sql +4 -0
- package/modules/auth/migrations/0030_auth_membership_keyset_index.up.sql +10 -0
- package/modules/auth/migrations/0031_membership_scope_backfills_under_rls.down.sql +4 -0
- package/modules/auth/migrations/0031_membership_scope_backfills_under_rls.up.sql +31 -0
- package/modules/auth/migrations/0032_audit_actor_service.down.sql +9 -0
- package/modules/auth/migrations/0032_audit_actor_service.up.sql +10 -0
- package/modules/auth/migrations/0033_auth_account_keyset_indexes.down.sql +5 -0
- package/modules/auth/migrations/0033_auth_account_keyset_indexes.up.sql +23 -0
- package/modules/auth/module.json +3 -3
- package/modules/auth/package.json +2 -1
- package/modules/auth/spec/module.yaml +372 -3
- package/modules/auth/src/acl/scopes.ts +50 -6
- package/modules/auth/src/cli/commands.json +11 -0
- package/modules/auth/src/cli/greenfield.ts +2 -2
- package/modules/auth/src/cli/index.ts +14 -0
- package/modules/auth/src/cli/secrets.ts +114 -0
- package/modules/auth/src/client/AuthenticationCore.tsrx +61 -8
- package/modules/auth/src/client/api.ts +72 -6
- package/modules/auth/src/client/contribution.tsrx +23 -0
- package/modules/auth/src/client/index.ts +6 -0
- package/modules/auth/src/client/providers/IdentityProviderForm.tsrx +191 -0
- package/modules/auth/src/client/providers/IdentityProvidersView.tsrx +358 -0
- package/modules/auth/src/client/providers/api.ts +128 -0
- package/modules/auth/src/client/providers/provider-columns.tsrx +60 -0
- package/modules/auth/src/client/providers/state.ts +35 -0
- package/modules/auth/src/client/security/SecurityView.tsrx +9 -1
- package/modules/auth/src/client/state.ts +15 -1
- package/modules/auth/src/domain/types.ts +55 -0
- package/modules/auth/src/index.ts +11 -1
- package/modules/auth/src/middleware/authentication.ts +4 -0
- package/modules/auth/src/server/endpoints.ts +467 -171
- package/modules/auth/src/server/http.ts +3 -2
- package/modules/auth/src/server/index.ts +22 -1
- package/modules/auth/src/server/membership-endpoints.ts +62 -0
- package/modules/auth/src/server/mfa-enforcement.ts +156 -0
- package/modules/auth/src/server/oidc.ts +389 -0
- package/modules/auth/src/server/provider-endpoints.ts +246 -0
- package/modules/auth/src/server/provider-host.ts +77 -0
- package/modules/auth/src/server/runtime.ts +231 -55
- package/modules/auth/src/services/auth-service-error.ts +7 -2
- package/modules/auth/src/services/auth-service.ts +948 -51
- package/modules/auth/src/services/data-classes.ts +236 -0
- package/modules/auth/src/services/database-repository.ts +853 -71
- package/modules/auth/src/services/identity-provider-service.ts +571 -0
- package/modules/auth/src/services/mail-delivery.ts +16 -16
- package/modules/auth/src/services/mail-message.ts +54 -0
- package/modules/auth/src/services/mail-port.ts +24 -0
- package/modules/auth/src/services/mail-smtp.ts +85 -0
- package/modules/auth/src/services/mfa-rotation.ts +144 -0
- package/modules/auth/src/services/migration.ts +810 -0
- package/modules/auth/src/services/password.ts +14 -0
- package/modules/auth/src/services/provider-secret-rotation.ts +169 -0
- package/modules/auth/src/services/provider-secrets.ts +136 -0
- package/modules/auth/src/services/repository.ts +321 -5
- package/modules/auth/src/services/session-sweep-runner.ts +73 -0
- package/modules/auth/src/services/settings-store.ts +10 -83
- package/modules/auth/src/services/totp.ts +88 -62
- package/modules/auth/src/services/validation.ts +194 -7
- package/modules/auth/src/settings.ts +18 -0
- package/modules/auth/translations/en.json +84 -1
- package/modules/auth/translations/pl.json +84 -1
- package/modules/automations/migrations/0005_secret_rotation_inventory.down.sql +1 -0
- package/modules/automations/migrations/0005_secret_rotation_inventory.up.sql +6 -0
- package/modules/automations/migrations/0006_automations_list_sort_indexes.down.sql +4 -0
- package/modules/automations/migrations/0006_automations_list_sort_indexes.up.sql +11 -0
- package/modules/automations/module.json +24 -6
- package/modules/automations/package.json +4 -1
- package/modules/automations/spec/module.yaml +81 -7
- package/modules/automations/src/api/endpoints.ts +202 -28
- package/modules/automations/src/cli/commands.json +17 -0
- package/modules/automations/src/cli/index.ts +114 -0
- package/modules/automations/src/client/AutomationScheduleForm.tsrx +77 -19
- package/modules/automations/src/client/AutomationSchedulesView.tsrx +144 -40
- package/modules/automations/src/client/AutomationTriggersView.tsrx +131 -32
- package/modules/automations/src/client/api.ts +62 -19
- package/modules/automations/src/client/presentation.ts +20 -2
- package/modules/automations/src/client/state.ts +84 -0
- package/modules/automations/src/domain/cadence.ts +99 -3
- package/modules/automations/src/domain/cron.ts +366 -0
- package/modules/automations/src/domain/time-zone.ts +61 -0
- package/modules/automations/src/platform.ts +38 -4
- package/modules/automations/src/server/index.ts +11 -0
- package/modules/automations/src/server/runtime.ts +46 -22
- package/modules/{automations-workflows-integration/src/server/adapter.ts → automations/src/server/workflow-target.ts} +13 -14
- package/modules/{automations-workflows-integration/src/server/tools.ts → automations/src/server/workflow-tools.ts} +0 -0
- package/modules/automations/src/services/data-classes.ts +62 -0
- package/modules/automations/src/services/database-repository.ts +152 -38
- package/modules/automations/src/services/migration.ts +119 -9
- package/modules/automations/src/services/repository.ts +52 -1
- package/modules/automations/src/services/schedule-runner.ts +84 -0
- package/modules/automations/src/services/schedule-service.ts +152 -26
- package/modules/automations/src/services/secret-rotation.ts +176 -0
- package/modules/automations/src/services/secret-vault.ts +68 -41
- package/modules/automations/src/services/trigger-service.ts +13 -10
- package/modules/automations/translations/en.json +15 -2
- package/modules/automations/translations/pl.json +15 -2
- package/modules/connectors/migrations/0001_connectors_core.down.sql +3 -0
- package/modules/connectors/migrations/0001_connectors_core.up.sql +72 -0
- package/modules/connectors/migrations/0002_connectors_call_keys.down.sql +3 -0
- package/modules/connectors/migrations/0002_connectors_call_keys.up.sql +18 -0
- package/modules/connectors/migrations/README.md +3 -0
- package/modules/connectors/module.json +28 -0
- package/modules/{automations-workflows-integration → connectors}/package.json +27 -26
- package/modules/connectors/spec/module.yaml +447 -0
- package/modules/connectors/src/acl/permissions.ts +6 -0
- package/modules/connectors/src/agent/tools.ts +180 -0
- package/modules/connectors/src/api/endpoints.ts +572 -0
- package/modules/connectors/src/client/ConnectorCallsView.tsrx +358 -0
- package/modules/connectors/src/client/ConnectorForm.tsrx +424 -0
- package/modules/connectors/src/client/ConnectorsView.tsrx +711 -0
- package/modules/connectors/src/client/api.ts +281 -0
- package/modules/connectors/src/client/consent.ts +48 -0
- package/modules/connectors/src/client/contribution.tsrx +37 -0
- package/modules/connectors/src/client/index.ts +22 -0
- package/modules/connectors/src/client/navigation.ts +42 -0
- package/modules/connectors/src/client/presentation.ts +38 -0
- package/modules/connectors/src/client/state.ts +175 -0
- package/modules/connectors/src/domain/calls.ts +70 -0
- package/modules/connectors/src/domain/definitions.ts +190 -0
- package/modules/connectors/src/domain/http-json.ts +68 -0
- package/modules/connectors/src/domain/types.ts +185 -0
- package/modules/connectors/src/index.ts +64 -0
- package/modules/connectors/src/platform.ts +56 -0
- package/modules/connectors/src/server/index.ts +66 -0
- package/modules/connectors/src/server/runtime.ts +163 -0
- package/modules/connectors/src/services/call-service.ts +903 -0
- package/modules/connectors/src/services/connectors-service.ts +653 -0
- package/modules/connectors/src/services/credential-vault.ts +188 -0
- package/modules/connectors/src/services/data-classes.ts +158 -0
- package/modules/connectors/src/services/database-repository.ts +897 -0
- package/modules/connectors/src/services/egress.ts +261 -0
- package/modules/connectors/src/services/index.ts +19 -0
- package/modules/connectors/src/services/migration.ts +166 -0
- package/modules/connectors/src/services/repository.ts +175 -0
- package/modules/connectors/src/services/service-error.ts +46 -0
- package/modules/connectors/src/settings.ts +69 -0
- package/modules/connectors/translations/en.json +191 -0
- package/modules/connectors/translations/pl.json +191 -0
- package/modules/directory/migrations/0001_directory_core.down.sql +5 -0
- package/modules/directory/migrations/0001_directory_core.up.sql +111 -0
- package/modules/directory/migrations/README.md +3 -0
- package/modules/directory/module.json +27 -0
- package/modules/directory/package.json +46 -0
- package/modules/directory/spec/module.yaml +351 -0
- package/modules/directory/src/acl/permissions.ts +7 -0
- package/modules/directory/src/api/endpoints.ts +478 -0
- package/modules/directory/src/api/scim-endpoints.ts +516 -0
- package/modules/directory/src/client/GroupMappingsView.tsrx +430 -0
- package/modules/directory/src/client/ProvisioningLogView.tsrx +248 -0
- package/modules/directory/src/client/ScimTokensView.tsrx +587 -0
- package/modules/directory/src/client/api.ts +222 -0
- package/modules/directory/src/client/contribution.tsrx +46 -0
- package/modules/directory/src/client/index.ts +22 -0
- package/modules/directory/src/client/navigation.ts +57 -0
- package/modules/directory/src/client/presentation.ts +143 -0
- package/modules/directory/src/client/state.ts +173 -0
- package/modules/directory/src/domain/scim.ts +346 -0
- package/modules/directory/src/domain/types.ts +166 -0
- package/modules/directory/src/index.ts +44 -0
- package/modules/directory/src/platform.ts +43 -0
- package/modules/directory/src/server/index.ts +17 -0
- package/modules/directory/src/server/runtime.ts +124 -0
- package/modules/directory/src/services/auth-port.ts +127 -0
- package/modules/directory/src/services/data-classes.ts +41 -0
- package/modules/directory/src/services/database-repository.ts +1067 -0
- package/modules/directory/src/services/directory-service.ts +311 -0
- package/modules/directory/src/services/index.ts +43 -0
- package/modules/directory/src/services/migration.ts +146 -0
- package/modules/directory/src/services/provisioning-service.ts +1420 -0
- package/modules/directory/src/services/rate-limiter.ts +103 -0
- package/modules/directory/src/services/repository.ts +208 -0
- package/modules/directory/src/services/service-error.ts +42 -0
- package/modules/directory/src/services/token-service.ts +215 -0
- package/modules/directory/src/settings.ts +86 -0
- package/modules/directory/translations/en.json +185 -0
- package/modules/directory/translations/pl.json +185 -0
- package/modules/documents/migrations/0001_documents_core.down.sql +1 -0
- package/modules/documents/migrations/0001_documents_core.up.sql +35 -0
- package/modules/documents/migrations/0002_documents_files_page.down.sql +1 -0
- package/modules/documents/migrations/0002_documents_files_page.up.sql +6 -0
- package/modules/documents/migrations/README.md +3 -0
- package/modules/documents/module.json +28 -0
- package/modules/documents/package.json +49 -0
- package/modules/documents/spec/module.yaml +247 -0
- package/modules/documents/src/acl/permissions.ts +6 -0
- package/modules/documents/src/api/endpoints.ts +401 -0
- package/modules/documents/src/client/DocumentUploader.tsrx +148 -0
- package/modules/documents/src/client/DocumentsView.tsrx +540 -0
- package/modules/documents/src/client/api.ts +209 -0
- package/modules/documents/src/client/contribution.tsrx +29 -0
- package/modules/documents/src/client/download.ts +70 -0
- package/modules/documents/src/client/index.ts +22 -0
- package/modules/documents/src/client/navigation.ts +25 -0
- package/modules/documents/src/client/presentation.ts +110 -0
- package/modules/documents/src/client/state.ts +117 -0
- package/modules/documents/src/domain/attachments.ts +84 -0
- package/modules/documents/src/domain/types.ts +80 -0
- package/modules/documents/src/index.ts +46 -0
- package/modules/documents/src/platform.ts +61 -0
- package/modules/documents/src/server/index.ts +30 -0
- package/modules/documents/src/server/runtime.ts +107 -0
- package/modules/documents/src/services/attachments.ts +39 -0
- package/modules/documents/src/services/data-classes.ts +25 -0
- package/modules/documents/src/services/database-repository.ts +259 -0
- package/modules/documents/src/services/documents-service.ts +586 -0
- package/modules/documents/src/services/index.ts +18 -0
- package/modules/documents/src/services/migration.ts +82 -0
- package/modules/documents/src/services/repository.ts +48 -0
- package/modules/documents/src/settings.ts +107 -0
- package/modules/documents/translations/en.json +111 -0
- package/modules/documents/translations/pl.json +111 -0
- package/modules/exports/migrations/0001_exports_core.down.sql +2 -0
- package/modules/exports/migrations/0001_exports_core.up.sql +28 -0
- package/modules/exports/migrations/0002_exports_job_routing_role.down.sql +4 -0
- package/modules/exports/migrations/0002_exports_job_routing_role.up.sql +21 -0
- package/modules/exports/migrations/README.md +3 -0
- package/modules/exports/module.json +28 -0
- package/modules/exports/package.json +44 -0
- package/modules/exports/spec/module.yaml +229 -0
- package/modules/exports/src/acl/permissions.ts +6 -0
- package/modules/exports/src/api/endpoints.ts +211 -0
- package/modules/exports/src/client/ExportsView.tsrx +327 -0
- package/modules/exports/src/client/api.ts +133 -0
- package/modules/exports/src/client/contribution.tsrx +31 -0
- package/modules/exports/src/client/index.ts +20 -0
- package/modules/exports/src/client/navigation.ts +25 -0
- package/modules/exports/src/client/presentation.ts +53 -0
- package/modules/exports/src/client/state.ts +56 -0
- package/modules/exports/src/domain/lists.ts +29 -0
- package/modules/exports/src/domain/types.ts +120 -0
- package/modules/exports/src/index.ts +41 -0
- package/modules/exports/src/platform.ts +80 -0
- package/modules/exports/src/server/index.ts +51 -0
- package/modules/exports/src/server/runtime.ts +160 -0
- package/modules/exports/src/services/data-classes.ts +56 -0
- package/modules/exports/src/services/database-repository.ts +405 -0
- package/modules/exports/src/services/export-runner.ts +123 -0
- package/modules/exports/src/services/export-service.ts +356 -0
- package/modules/exports/src/services/index.ts +6 -0
- package/modules/exports/src/services/list-registry.ts +105 -0
- package/modules/exports/src/services/migration.ts +89 -0
- package/modules/exports/src/services/repository.ts +97 -0
- package/modules/exports/src/settings.ts +70 -0
- package/modules/exports/translations/en.json +69 -0
- package/modules/exports/translations/pl.json +69 -0
- package/modules/import/migrations/0001_import_core.down.sql +6 -0
- package/modules/import/migrations/0001_import_core.up.sql +61 -0
- package/modules/import/migrations/0002_import_job_routing_role.down.sql +4 -0
- package/modules/import/migrations/0002_import_job_routing_role.up.sql +20 -0
- package/modules/import/migrations/0003_import_jobs_export_index.down.sql +1 -0
- package/modules/import/migrations/0003_import_jobs_export_index.up.sql +7 -0
- package/modules/import/migrations/0004_import_jobs_traceparent.down.sql +1 -0
- package/modules/import/migrations/0004_import_jobs_traceparent.up.sql +7 -0
- package/modules/import/migrations/README.md +3 -0
- package/modules/import/module.json +37 -0
- package/modules/import/package.json +50 -0
- package/modules/import/spec/module.yaml +335 -0
- package/modules/import/src/acl/permissions.ts +6 -0
- package/modules/import/src/api/endpoints.ts +400 -0
- package/modules/import/src/client/ImportJobDrawer.tsrx +229 -0
- package/modules/import/src/client/ImportsView.tsrx +455 -0
- package/modules/import/src/client/NewImportForm.tsrx +274 -0
- package/modules/import/src/client/api.ts +243 -0
- package/modules/import/src/client/contribution.tsrx +29 -0
- package/modules/import/src/client/index.ts +23 -0
- package/modules/import/src/client/navigation.ts +25 -0
- package/modules/import/src/client/presentation.ts +59 -0
- package/modules/import/src/client/state.ts +43 -0
- package/modules/import/src/domain/csv.ts +258 -0
- package/modules/import/src/domain/ports.ts +157 -0
- package/modules/import/src/domain/types.ts +179 -0
- package/modules/import/src/index.ts +58 -0
- package/modules/import/src/platform.ts +60 -0
- package/modules/import/src/server/index.ts +49 -0
- package/modules/import/src/server/runtime.ts +158 -0
- package/modules/import/src/services/csv-source.ts +121 -0
- package/modules/import/src/services/data-classes.ts +63 -0
- package/modules/import/src/services/database-repository.ts +780 -0
- package/modules/import/src/services/import-runner.ts +127 -0
- package/modules/import/src/services/import-service.ts +872 -0
- package/modules/import/src/services/index.ts +6 -0
- package/modules/import/src/services/migration.ts +156 -0
- package/modules/import/src/services/port-registry.ts +158 -0
- package/modules/import/src/services/repository.ts +147 -0
- package/modules/import/src/settings.ts +70 -0
- package/modules/import/translations/en.json +175 -0
- package/modules/import/translations/pl.json +175 -0
- package/modules/metering/migrations/0001_metering_core.down.sql +6 -0
- package/modules/metering/migrations/0001_metering_core.up.sql +119 -0
- package/modules/metering/migrations/0002_metering_bucket_export.down.sql +3 -0
- package/modules/metering/migrations/0002_metering_bucket_export.up.sql +5 -0
- package/modules/metering/migrations/README.md +3 -0
- package/modules/metering/module.json +46 -0
- package/modules/metering/package.json +50 -0
- package/modules/metering/spec/module.yaml +269 -0
- package/modules/metering/src/acl/permissions.ts +5 -0
- package/modules/metering/src/api/endpoints.ts +104 -0
- package/modules/metering/src/cli/commands.json +28 -0
- package/modules/metering/src/cli/index.ts +246 -0
- package/modules/metering/src/client/LimitsView.tsrx +170 -0
- package/modules/metering/src/client/UsageSummaryWidget.tsrx +63 -0
- package/modules/metering/src/client/UsageView.tsrx +205 -0
- package/modules/metering/src/client/api.ts +91 -0
- package/modules/metering/src/client/contribution.tsrx +42 -0
- package/modules/metering/src/client/index.ts +26 -0
- package/modules/metering/src/client/navigation.ts +54 -0
- package/modules/metering/src/client/presentation.ts +63 -0
- package/modules/metering/src/client/state.ts +31 -0
- package/modules/metering/src/domain/meters.ts +100 -0
- package/modules/metering/src/domain/types.ts +71 -0
- package/modules/metering/src/index.ts +51 -0
- package/modules/metering/src/platform.ts +84 -0
- package/modules/metering/src/server/index.ts +40 -0
- package/modules/metering/src/server/runtime.ts +165 -0
- package/modules/metering/src/services/data-classes.ts +34 -0
- package/modules/metering/src/services/database-repository.ts +574 -0
- package/modules/metering/src/services/index.ts +9 -0
- package/modules/metering/src/services/meter-registry.ts +145 -0
- package/modules/metering/src/services/metering-service.ts +441 -0
- package/modules/metering/src/services/migration.ts +183 -0
- package/modules/metering/src/services/notifications.ts +75 -0
- package/modules/metering/src/services/reports.ts +105 -0
- package/modules/metering/src/services/repository.ts +132 -0
- package/modules/metering/src/services/service-error.ts +46 -0
- package/modules/metering/src/settings.ts +47 -0
- package/modules/metering/translations/en.json +68 -0
- package/modules/metering/translations/pl.json +68 -0
- package/modules/notifications/migrations/0001_notifications_core.down.sql +1 -0
- package/modules/notifications/migrations/0001_notifications_core.up.sql +26 -0
- package/modules/notifications/migrations/0002_notifications_preferences.down.sql +1 -0
- package/modules/notifications/migrations/0002_notifications_preferences.up.sql +17 -0
- package/modules/notifications/migrations/0003_notifications_webhook_subscriptions.down.sql +1 -0
- package/modules/notifications/migrations/0003_notifications_webhook_subscriptions.up.sql +30 -0
- package/modules/notifications/migrations/0004_notifications_deliveries.down.sql +1 -0
- package/modules/notifications/migrations/0004_notifications_deliveries.up.sql +35 -0
- package/modules/notifications/migrations/0005_notifications_delivery_routing_role.down.sql +2 -0
- package/modules/notifications/migrations/0005_notifications_delivery_routing_role.up.sql +17 -0
- package/modules/notifications/migrations/0006_notifications_delivery_title.down.sql +1 -0
- package/modules/notifications/migrations/0006_notifications_delivery_title.up.sql +11 -0
- package/modules/notifications/migrations/0007_notifications_secret_rotation_inventory.down.sql +2 -0
- package/modules/notifications/migrations/0007_notifications_secret_rotation_inventory.up.sql +19 -0
- package/modules/notifications/migrations/0008_notifications_delivery_claim.down.sql +8 -0
- package/modules/notifications/migrations/0008_notifications_delivery_claim.up.sql +19 -0
- package/modules/notifications/migrations/0009_notifications_kind_approvals.down.sql +16 -0
- package/modules/notifications/migrations/0009_notifications_kind_approvals.up.sql +18 -0
- package/modules/notifications/migrations/0010_notifications_kind_meter_threshold.down.sql +16 -0
- package/modules/notifications/migrations/0010_notifications_kind_meter_threshold.up.sql +18 -0
- package/modules/notifications/migrations/0011_notifications_retention_keyset.down.sql +5 -0
- package/modules/notifications/migrations/0011_notifications_retention_keyset.up.sql +15 -0
- package/modules/notifications/migrations/0012_notifications_email_channel.down.sql +12 -0
- package/modules/notifications/migrations/0012_notifications_email_channel.up.sql +38 -0
- package/modules/notifications/migrations/0013_notifications_list_pages.down.sql +5 -0
- package/modules/notifications/migrations/0013_notifications_list_pages.up.sql +13 -0
- package/modules/notifications/migrations/README.md +3 -0
- package/modules/notifications/module.json +32 -0
- package/modules/notifications/package.json +49 -0
- package/modules/notifications/spec/module.yaml +718 -0
- package/modules/notifications/src/acl/permissions.ts +11 -0
- package/modules/notifications/src/api/endpoints.ts +814 -0
- package/modules/notifications/src/cli/commands.json +17 -0
- package/modules/notifications/src/cli/index.ts +126 -0
- package/modules/notifications/src/client/DeliveriesView.tsrx +483 -0
- package/modules/notifications/src/client/FactList.tsrx +24 -0
- package/modules/notifications/src/client/NotificationPreferencesView.tsrx +240 -0
- package/modules/notifications/src/client/NotificationsInboxView.tsrx +592 -0
- package/modules/notifications/src/client/UnreadCountWidget.tsrx +62 -0
- package/modules/notifications/src/client/WebhookForm.tsrx +297 -0
- package/modules/notifications/src/client/WebhooksView.tsrx +637 -0
- package/modules/notifications/src/client/api.ts +382 -0
- package/modules/notifications/src/client/contribution.tsrx +83 -0
- package/modules/notifications/src/client/inbox.ts +41 -0
- package/modules/notifications/src/client/index.ts +29 -0
- package/modules/notifications/src/client/navigation.ts +92 -0
- package/modules/notifications/src/client/notifications.css +70 -0
- package/modules/notifications/src/client/presentation.ts +81 -0
- package/modules/notifications/src/client/state.ts +246 -0
- package/modules/notifications/src/client/unread-count.ts +26 -0
- package/modules/notifications/src/domain/locale.ts +47 -0
- package/modules/notifications/src/domain/publish.ts +46 -0
- package/modules/notifications/src/domain/types.ts +186 -0
- package/modules/notifications/src/index.ts +62 -0
- package/modules/notifications/src/platform.ts +85 -0
- package/modules/notifications/src/server/index.ts +82 -0
- package/modules/notifications/src/server/runtime.ts +251 -0
- package/modules/notifications/src/services/data-classes.ts +139 -0
- package/modules/notifications/src/services/database-repository.ts +1334 -0
- package/modules/notifications/src/services/delivery-payload.ts +93 -0
- package/modules/notifications/src/services/delivery-runner.ts +170 -0
- package/modules/notifications/src/services/delivery-service.ts +811 -0
- package/modules/notifications/src/services/egress.ts +239 -0
- package/modules/notifications/src/services/email-channel.ts +93 -0
- package/modules/notifications/src/services/index.ts +23 -0
- package/modules/notifications/src/services/migration.ts +572 -0
- package/modules/notifications/src/services/notifications-service.ts +297 -0
- package/modules/notifications/src/services/paging.ts +60 -0
- package/modules/notifications/src/services/publish-service.ts +133 -0
- package/modules/notifications/src/services/repository.ts +342 -0
- package/modules/notifications/src/services/secret-rotation.ts +177 -0
- package/modules/notifications/src/services/secret-vault.ts +168 -0
- package/modules/notifications/src/services/service-error.ts +67 -0
- package/modules/notifications/src/services/signature.ts +81 -0
- package/modules/notifications/src/services/webhook-service.ts +307 -0
- package/modules/notifications/src/settings.ts +130 -0
- package/modules/notifications/translations/en.json +255 -0
- package/modules/notifications/translations/pl.json +255 -0
- package/modules/profile/module.json +3 -3
- package/modules/profile/package.json +1 -1
- package/modules/profile/spec/module.yaml +3 -3
- package/modules/profile/src/services/database-repository.ts +3 -13
- package/modules/reports/module.json +28 -0
- package/modules/reports/package.json +42 -0
- package/modules/reports/spec/module.yaml +231 -0
- package/modules/reports/src/acl/permissions.ts +5 -0
- package/modules/reports/src/api/endpoints.ts +72 -0
- package/modules/reports/src/client/ReportsSummaryWidget.tsrx +52 -0
- package/modules/reports/src/client/ReportsView.tsrx +246 -0
- package/modules/reports/src/client/api.ts +65 -0
- package/modules/reports/src/client/contribution.tsrx +36 -0
- package/modules/reports/src/client/index.ts +18 -0
- package/modules/reports/src/client/navigation.ts +39 -0
- package/modules/reports/src/client/presentation.ts +123 -0
- package/modules/reports/src/client/state.ts +28 -0
- package/modules/reports/src/domain/providers.ts +115 -0
- package/modules/reports/src/domain/types.ts +44 -0
- package/modules/reports/src/index.ts +47 -0
- package/modules/reports/src/platform.ts +37 -0
- package/modules/reports/src/server/index.ts +21 -0
- package/modules/reports/src/server/runtime.ts +40 -0
- package/modules/reports/src/services/index.ts +17 -0
- package/modules/reports/src/services/provider-registry.ts +144 -0
- package/modules/reports/src/services/range.ts +65 -0
- package/modules/reports/src/services/reports-service.ts +316 -0
- package/modules/reports/src/services/service-error.ts +26 -0
- package/modules/reports/src/settings.ts +49 -0
- package/modules/reports/translations/en.json +35 -0
- package/modules/reports/translations/pl.json +35 -0
- package/modules/sandbox/module.json +4 -4
- package/modules/sandbox/package.json +1 -1
- package/modules/sandbox/spec/module.yaml +3 -3
- package/modules/sandbox/src/services/database-repository.ts +14 -23
- package/modules/sandbox/src/services/directory.ts +16 -0
- package/modules/sandbox/src/services/sandbox-service.ts +13 -11
- package/modules/search/migrations/0001_search_core.down.sql +1 -0
- package/modules/search/migrations/0001_search_core.up.sql +22 -0
- package/modules/search/migrations/0002_search_recent_export.down.sql +3 -0
- package/modules/search/migrations/0002_search_recent_export.up.sql +5 -0
- package/modules/search/migrations/README.md +3 -0
- package/modules/search/module.json +28 -0
- package/modules/search/package.json +43 -0
- package/modules/search/spec/module.yaml +177 -0
- package/modules/search/src/acl/permissions.ts +5 -0
- package/modules/search/src/api/endpoints.ts +221 -0
- package/modules/search/src/client/SearchView.tsrx +346 -0
- package/modules/search/src/client/api.ts +157 -0
- package/modules/search/src/client/contribution.tsrx +31 -0
- package/modules/search/src/client/index.ts +17 -0
- package/modules/search/src/client/navigation.ts +97 -0
- package/modules/search/src/client/search.css +56 -0
- package/modules/search/src/client/state.ts +113 -0
- package/modules/search/src/domain/data-classes.ts +73 -0
- package/modules/search/src/domain/providers.ts +88 -0
- package/modules/search/src/domain/types.ts +56 -0
- package/modules/search/src/index.ts +46 -0
- package/modules/search/src/platform.ts +42 -0
- package/modules/search/src/server/index.ts +25 -0
- package/modules/search/src/server/runtime.ts +123 -0
- package/modules/search/src/services/database-repository.ts +163 -0
- package/modules/search/src/services/index.ts +21 -0
- package/modules/search/src/services/migration.ts +65 -0
- package/modules/search/src/services/provider-registry.ts +137 -0
- package/modules/search/src/services/repository.ts +43 -0
- package/modules/search/src/services/search-service.ts +442 -0
- package/modules/search/src/services/service-error.ts +35 -0
- package/modules/search/src/settings.ts +68 -0
- package/modules/search/translations/en.json +45 -0
- package/modules/search/translations/pl.json +45 -0
- package/modules/system/module.json +2 -2
- package/modules/system/package.json +1 -1
- package/modules/system/spec/module.yaml +30 -3
- package/modules/system/src/client/FlagsPanel.tsrx +127 -0
- package/modules/system/src/client/ModuleSettingRow.tsrx +17 -7
- package/modules/system/src/client/ModuleSettingsSection.tsrx +10 -71
- package/modules/system/src/client/ModulesView.tsrx +91 -65
- package/modules/system/src/client/flags.ts +35 -0
- package/modules/system/src/client/index.ts +8 -0
- package/modules/system/src/client/navigation.ts +8 -0
- package/modules/system/src/client/settings-state.ts +159 -0
- package/modules/system/src/client/state.ts +2 -0
- package/modules/system/src/domain/time-zone.ts +105 -0
- package/modules/system/src/index.ts +12 -0
- package/modules/system/src/platform.ts +5 -1
- package/modules/system/src/server/endpoints.ts +72 -21
- package/modules/system/src/settings.ts +28 -0
- package/modules/system/translations/en.json +17 -0
- package/modules/system/translations/pl.json +17 -0
- package/modules/users/module.json +30 -4
- package/modules/users/package.json +4 -1
- package/modules/users/spec/module.yaml +290 -7
- package/modules/users/src/api/endpoints.ts +228 -15
- package/modules/users/src/client/InviteMemberForm.tsrx +2 -2
- package/modules/users/src/client/MemberDrawer.tsrx +142 -26
- package/modules/users/src/client/UserAccountForm.tsrx +2 -2
- package/modules/users/src/client/UsersView.tsrx +432 -71
- package/modules/users/src/client/api.ts +106 -12
- package/modules/users/src/client/contribution.tsrx +5 -0
- package/modules/users/src/client/member-columns.tsrx +22 -9
- package/modules/users/src/client/state.ts +172 -7
- package/modules/users/src/domain/lists.ts +9 -0
- package/modules/users/src/index.ts +11 -0
- package/modules/users/src/platform.ts +50 -1
- package/modules/users/src/services/member-export.ts +51 -0
- package/modules/users/src/services/member-import.ts +249 -0
- package/modules/users/src/services/member-search.ts +145 -0
- package/modules/users/src/services/users-service.ts +117 -4
- package/modules/users/translations/en.json +57 -8
- package/modules/users/translations/pl.json +57 -8
- package/modules/workflows/migrations/0004_payload_rotation_inventory.up.sql +17 -0
- package/modules/workflows/migrations/0005_workflows_human_approval.up.sql +28 -0
- package/modules/workflows/migrations/0006_workflows_retention_indexes.up.sql +11 -0
- package/modules/workflows/migrations/0007_workflows_erasure_subject_indexes.up.sql +17 -0
- package/modules/workflows/migrations/0008_workflows_subject_account.up.sql +24 -0
- package/modules/workflows/migrations/0009_workflows_definition_list_indexes.up.sql +9 -0
- package/modules/workflows/module.json +34 -6
- package/modules/workflows/package.json +2 -1
- package/modules/workflows/spec/module.yaml +26 -9
- package/modules/workflows/src/api/endpoints.ts +131 -25
- package/modules/workflows/src/cli/commands.json +17 -0
- package/modules/workflows/src/cli/index.ts +114 -0
- package/modules/workflows/src/client/WorkflowExecutionHistory.tsrx +36 -27
- package/modules/workflows/src/client/WorkflowInspector.tsrx +116 -0
- package/modules/workflows/src/client/WorkflowNodePalette.tsrx +1 -0
- package/modules/workflows/src/client/WorkflowsView.tsrx +236 -99
- package/modules/workflows/src/client/api.ts +54 -34
- package/modules/workflows/src/client/canvas-model.ts +12 -0
- package/modules/workflows/src/client/state.ts +95 -0
- package/modules/workflows/src/domain/events.ts +25 -11
- package/modules/workflows/src/domain/graph.ts +135 -1
- package/modules/workflows/src/domain/types.ts +91 -4
- package/modules/workflows/src/platform.ts +12 -0
- package/modules/workflows/src/server/runtime.ts +78 -5
- package/modules/workflows/src/services/approvals.ts +62 -0
- package/modules/workflows/src/services/cursors.ts +37 -0
- package/modules/workflows/src/services/data-classes.ts +232 -0
- package/modules/workflows/src/services/database-repository.ts +660 -171
- package/modules/workflows/src/services/migration.ts +240 -0
- package/modules/workflows/src/services/notifications.ts +98 -0
- package/modules/workflows/src/services/payload-codec.ts +51 -28
- package/modules/workflows/src/services/payload-rotation.ts +171 -0
- package/modules/workflows/src/services/repository.ts +123 -8
- package/modules/workflows/src/services/simulation.ts +7 -0
- package/modules/workflows/src/services/worker.ts +446 -25
- package/modules/workflows/src/services/workflows-service.ts +264 -103
- package/modules/workflows/translations/en.json +12 -4
- package/modules/workflows/translations/pl.json +12 -4
- package/modules.json +48 -4
- package/package.json +64 -6
- package/packages/client/package.json +1 -0
- package/packages/client/src/ApplicationShell.tsrx +43 -0
- package/packages/client/src/contributions.ts +55 -0
- package/packages/client/src/i18n/locales/en.json +5 -0
- package/packages/client/src/i18n/locales/pl.json +5 -0
- package/packages/client/src/index.ts +13 -1
- package/packages/client/src/routing.ts +22 -0
- package/packages/client/src/shell/CommandPalette.tsrx +223 -11
- package/packages/client/src/shell/command-search.ts +126 -0
- package/packages/client/src/shell/command.ts +30 -0
- package/packages/client/src/shell/navigation.ts +12 -0
- package/packages/client/src/shell/palette-keys.ts +27 -0
- package/packages/client/src/shell/shell.css +7 -0
- package/packages/contracts/schemas/module-spec.schema.json +287 -1
- package/packages/contracts/schemas/module.schema.json +25 -0
- package/packages/contracts/src/index.ts +144 -1
- package/packages/database/src/backup.ts +179 -0
- package/packages/database/src/decoders.ts +25 -0
- package/packages/database/src/index.ts +17 -0
- package/packages/database/src/record-history.ts +5 -14
- package/packages/harness/src/index.ts +2 -0
- package/packages/harness/src/runtime.ts +218 -1
- package/packages/harness/src/tool-adapters.ts +19 -1
- package/packages/kernel/src/acl.ts +179 -0
- package/packages/kernel/src/capability-registry.ts +69 -2
- package/packages/kernel/src/data-class-registry.ts +354 -0
- package/packages/kernel/src/index.ts +65 -4
- package/packages/kernel/src/keyring.ts +208 -0
- package/packages/kernel/src/module-compatibility.ts +35 -4
- package/packages/kernel/src/module-registry.ts +49 -2
- package/packages/kernel/src/module-settings.ts +189 -27
- package/packages/server/package.json +2 -1
- package/packages/server/src/composition.ts +38 -0
- package/packages/server/src/endpoint.ts +104 -47
- package/packages/server/src/export/csv.ts +34 -0
- package/packages/server/src/export/definition.ts +346 -0
- package/packages/server/src/export/index.ts +61 -0
- package/packages/server/src/export/run.ts +116 -0
- package/packages/server/src/index.ts +155 -0
- package/packages/server/src/jobs/index.ts +93 -0
- package/packages/server/src/jobs/runner.ts +486 -0
- package/packages/server/src/log.ts +291 -0
- package/packages/server/src/mail/config.ts +184 -0
- package/packages/server/src/mail/contracts.ts +251 -0
- package/packages/server/src/mail/index.ts +31 -0
- package/packages/server/src/mail/port.ts +101 -0
- package/packages/server/src/mail/smtp.ts +191 -0
- package/packages/server/src/mail/template.ts +105 -0
- package/packages/server/src/metrics.ts +447 -0
- package/packages/server/src/pagination.ts +246 -0
- package/packages/server/src/trace/context.ts +103 -0
- package/packages/server/src/trace/egress.ts +66 -0
- package/packages/server/src/trace/error-sink.ts +296 -0
- package/packages/server/src/trace/exporter.ts +295 -0
- package/packages/server/src/trace/index.ts +60 -0
- package/packages/server/src/trace/job-sink.ts +172 -0
- package/packages/server/src/trace/tracer.ts +338 -0
- package/packages/server/src/web.ts +5 -1
- package/packages/storage/package.json +40 -0
- package/packages/storage/src/config.ts +189 -0
- package/packages/storage/src/content-type.ts +124 -0
- package/packages/storage/src/contracts.ts +112 -0
- package/packages/storage/src/envelope.ts +189 -0
- package/packages/storage/src/index.ts +43 -0
- package/packages/storage/src/local.ts +75 -0
- package/packages/storage/src/port.ts +251 -0
- package/packages/storage/src/read-token.ts +130 -0
- package/packages/storage/src/s3.ts +144 -0
- package/packages/storage/src/scanner.ts +22 -0
- package/packages/storage/src/sigv4.ts +104 -0
- package/packages/storage/src/store.ts +13 -0
- package/packages/ui/package.json +1 -0
- package/packages/ui/src/components/Button.tsrx +3 -0
- package/packages/ui/src/components/ConfirmDialog.tsrx +13 -2
- package/packages/ui/src/components/DateField.tsrx +92 -0
- package/packages/ui/src/components/DatePicker.tsrx +525 -0
- package/packages/ui/src/components/DateRangeField.tsrx +93 -0
- package/packages/ui/src/components/Drawer.tsrx +10 -1
- package/packages/ui/src/components/FileUpload.tsrx +158 -0
- package/packages/ui/src/components/Pagination.tsrx +130 -0
- package/packages/ui/src/components/Select.tsrx +78 -0
- package/packages/ui/src/components/Table.tsrx +498 -81
- package/packages/ui/src/components/Tabs.tsrx +53 -0
- package/packages/ui/src/components/ToastHost.tsrx +48 -0
- package/packages/ui/src/components/calendar.ts +243 -0
- package/packages/ui/src/components/date-field.ts +62 -0
- package/packages/ui/src/components/file-upload.ts +49 -0
- package/packages/ui/src/components/focus-trap.ts +62 -0
- package/packages/ui/src/components/pagination.ts +68 -0
- package/packages/ui/src/components/table-sorting.ts +49 -0
- package/packages/ui/src/components/tabs.ts +61 -0
- package/packages/ui/src/components/toast-store.ts +116 -0
- package/packages/ui/src/icons/Icon.tsrx +5 -0
- package/packages/ui/src/index.ts +45 -0
- package/packages/ui/src/styles/components.css +598 -0
- package/modules/automations-workflows-integration/module.json +0 -27
- package/modules/automations-workflows-integration/spec/module.yaml +0 -93
- package/modules/automations-workflows-integration/src/index.ts +0 -14
- package/modules/automations-workflows-integration/src/platform.ts +0 -24
- package/modules/automations-workflows-integration/src/server/index.ts +0 -11
- package/modules/automations-workflows-integration/translations/en.json +0 -21
- package/modules/automations-workflows-integration/translations/pl.json +0 -21
- package/modules/workflows/src/services/cursor-codec.ts +0 -62
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TableSort } from '@flowdular/sdk/ui';
|
|
1
2
|
import { cell, createStore } from 'segment-state';
|
|
2
3
|
import type {
|
|
3
4
|
WorkflowDefinition,
|
|
@@ -6,16 +7,110 @@ import type {
|
|
|
6
7
|
WorkflowGraphV1,
|
|
7
8
|
WorkflowRunDetail,
|
|
8
9
|
WorkflowRunSummary,
|
|
10
|
+
WorkflowSortDirection,
|
|
9
11
|
} from '../domain/types.ts';
|
|
10
12
|
import type {
|
|
11
13
|
WorkflowActionCatalogItem,
|
|
12
14
|
WorkflowAgentCatalogItem,
|
|
13
15
|
} from './api.ts';
|
|
14
16
|
|
|
17
|
+
/**
|
|
18
|
+
* The pages a reader has walked. `cursors[i]` is the cursor that opened page
|
|
19
|
+
* `i`; page 0 opens with none. `nextCursor` is what the page on screen handed
|
|
20
|
+
* back, null on the last page.
|
|
21
|
+
*/
|
|
22
|
+
export interface PageCursors {
|
|
23
|
+
readonly pageIndex: number;
|
|
24
|
+
readonly cursors: readonly string[];
|
|
25
|
+
readonly nextCursor: string | null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const FIRST_PAGE: PageCursors = {
|
|
29
|
+
pageIndex: 0,
|
|
30
|
+
cursors: [],
|
|
31
|
+
nextCursor: null,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export interface PageRequest {
|
|
35
|
+
readonly pageIndex: number;
|
|
36
|
+
readonly cursor: string | null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const FIRST_PAGE_REQUEST: PageRequest = { pageIndex: 0, cursor: null };
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* How to reach `pageIndex` from the pages walked so far: an earlier page
|
|
43
|
+
* reopens with the cursor stored for it, the next page with the cursor the
|
|
44
|
+
* current one handed back. Null when no cursor leads there.
|
|
45
|
+
*/
|
|
46
|
+
export function pageRequest(
|
|
47
|
+
pages: PageCursors,
|
|
48
|
+
pageIndex: number,
|
|
49
|
+
): PageRequest | null {
|
|
50
|
+
if (pageIndex <= 0) return { pageIndex: 0, cursor: null };
|
|
51
|
+
if (pageIndex <= pages.pageIndex) {
|
|
52
|
+
const cursor = pages.cursors[pageIndex];
|
|
53
|
+
return cursor ? { pageIndex, cursor } : null;
|
|
54
|
+
}
|
|
55
|
+
if (pageIndex === pages.pageIndex + 1 && pages.nextCursor) {
|
|
56
|
+
return { pageIndex, cursor: pages.nextCursor };
|
|
57
|
+
}
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** The pages walked once the requested one arrived with `nextCursor` behind it. */
|
|
62
|
+
export function pageOpened(
|
|
63
|
+
pages: PageCursors,
|
|
64
|
+
request: PageRequest,
|
|
65
|
+
nextCursor: string | null,
|
|
66
|
+
): PageCursors {
|
|
67
|
+
const cursors = pages.cursors.slice(0, request.pageIndex);
|
|
68
|
+
while (cursors.length < request.pageIndex) cursors.push('');
|
|
69
|
+
cursors.push(request.cursor ?? '');
|
|
70
|
+
return { pageIndex: request.pageIndex, cursors, nextCursor };
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface ListOrder<Sort extends string> {
|
|
74
|
+
readonly sort: Sort;
|
|
75
|
+
readonly direction: WorkflowSortDirection;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The server order a table's sorting state asks for. `columns` maps a column
|
|
80
|
+
* key to the sort key it carries; a table sorted by nothing, or by a column
|
|
81
|
+
* the server does not sort on, asks for the default order.
|
|
82
|
+
*/
|
|
83
|
+
export function listOrder<Sort extends string>(
|
|
84
|
+
sorts: readonly TableSort[],
|
|
85
|
+
columns: Readonly<Record<string, Sort>>,
|
|
86
|
+
fallback: ListOrder<Sort>,
|
|
87
|
+
): ListOrder<Sort> {
|
|
88
|
+
const first = sorts[0];
|
|
89
|
+
const sort = first ? columns[first.key] : undefined;
|
|
90
|
+
return first && sort
|
|
91
|
+
? { sort, direction: first.desc ? 'desc' : 'asc' }
|
|
92
|
+
: fallback;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Whether the typed term still has to reach the server. The rows on screen
|
|
97
|
+
* answer it only once a page was loaded with exactly this term.
|
|
98
|
+
*/
|
|
99
|
+
export function searchPending(query: string, applied: string): boolean {
|
|
100
|
+
return query.trim() !== applied;
|
|
101
|
+
}
|
|
102
|
+
|
|
15
103
|
export function createWorkflowsClientState() {
|
|
16
104
|
const store = createStore({
|
|
17
105
|
definitions: cell<readonly WorkflowDefinition[]>([]),
|
|
106
|
+
definitionSorts: cell<readonly TableSort[]>([]),
|
|
107
|
+
definitionPages: cell<PageCursors>(FIRST_PAGE),
|
|
108
|
+
/* The term the rows on screen were loaded with. */
|
|
109
|
+
appliedQuery: '',
|
|
18
110
|
runs: cell<readonly WorkflowRunSummary[]>([]),
|
|
111
|
+
runSorts: cell<readonly TableSort[]>([]),
|
|
112
|
+
runPages: cell<PageCursors>(FIRST_PAGE),
|
|
113
|
+
appliedRunQuery: '',
|
|
19
114
|
detail: cell<WorkflowDefinitionDetail | null>(null),
|
|
20
115
|
graph: cell<WorkflowGraphV1 | null>(null),
|
|
21
116
|
selectedNodeId: '',
|
|
@@ -83,6 +83,13 @@ const EVENT_REQUIREMENTS = {
|
|
|
83
83
|
} as const satisfies Record<WorkflowRunEventTypeV1, readonly string[]>;
|
|
84
84
|
|
|
85
85
|
const EVENT_TYPES = new Set<string>(Object.keys(EVENT_REQUIREMENTS));
|
|
86
|
+
/** Statuses a run may settle from; every one of them is a claimed live run. */
|
|
87
|
+
const SETTLEABLE: readonly string[] = [
|
|
88
|
+
'running',
|
|
89
|
+
'waiting-agent',
|
|
90
|
+
'waiting-approval',
|
|
91
|
+
'waiting-retry',
|
|
92
|
+
];
|
|
86
93
|
const TERMINAL = new Set<WorkflowRunStatus>([
|
|
87
94
|
'succeeded',
|
|
88
95
|
'failed',
|
|
@@ -237,9 +244,13 @@ export function projectWorkflowRunEvents(
|
|
|
237
244
|
break;
|
|
238
245
|
case 'run.claimed':
|
|
239
246
|
if (
|
|
240
|
-
![
|
|
241
|
-
|
|
242
|
-
|
|
247
|
+
![
|
|
248
|
+
'queued',
|
|
249
|
+
'running',
|
|
250
|
+
'waiting-agent',
|
|
251
|
+
'waiting-approval',
|
|
252
|
+
'waiting-retry',
|
|
253
|
+
].includes(status)
|
|
243
254
|
)
|
|
244
255
|
transitionError(event, status);
|
|
245
256
|
status = 'running';
|
|
@@ -284,10 +295,15 @@ export function projectWorkflowRunEvents(
|
|
|
284
295
|
outcomePort: null,
|
|
285
296
|
});
|
|
286
297
|
nodeStatuses.set(nodeId, 'waiting-child');
|
|
287
|
-
|
|
288
|
-
requiredString(event.payload, 'childKind')
|
|
289
|
-
|
|
290
|
-
|
|
298
|
+
{
|
|
299
|
+
const childKind = requiredString(event.payload, 'childKind');
|
|
300
|
+
status =
|
|
301
|
+
childKind === 'agent'
|
|
302
|
+
? 'waiting-agent'
|
|
303
|
+
: childKind === 'approval'
|
|
304
|
+
? 'waiting-approval'
|
|
305
|
+
: 'running';
|
|
306
|
+
}
|
|
291
307
|
break;
|
|
292
308
|
}
|
|
293
309
|
case 'node.attempt.settled': {
|
|
@@ -347,13 +363,11 @@ export function projectWorkflowRunEvents(
|
|
|
347
363
|
status = 'cancel-requested';
|
|
348
364
|
break;
|
|
349
365
|
case 'run.succeeded':
|
|
350
|
-
if (!
|
|
351
|
-
transitionError(event, status);
|
|
366
|
+
if (!SETTLEABLE.includes(status)) transitionError(event, status);
|
|
352
367
|
status = 'succeeded';
|
|
353
368
|
break;
|
|
354
369
|
case 'run.failed':
|
|
355
|
-
if (!
|
|
356
|
-
transitionError(event, status);
|
|
370
|
+
if (!SETTLEABLE.includes(status)) transitionError(event, status);
|
|
357
371
|
status = 'failed';
|
|
358
372
|
break;
|
|
359
373
|
case 'run.refused':
|
|
@@ -5,13 +5,14 @@ import type {
|
|
|
5
5
|
WorkflowDryRunResponseV1,
|
|
6
6
|
WorkflowGateExpressionV1,
|
|
7
7
|
WorkflowGraphV1,
|
|
8
|
+
WorkflowHumanApprovalNodeV1,
|
|
8
9
|
WorkflowNodeV1,
|
|
9
10
|
WorkflowPayloadEvidenceV1,
|
|
10
11
|
WorkflowReferenceSummaryV1,
|
|
11
12
|
WorkflowTargetMappingV1,
|
|
12
13
|
WorkflowValidationIssueV1,
|
|
13
14
|
} from './types.ts';
|
|
14
|
-
import { WORKFLOW_LIMITS } from './types.ts';
|
|
15
|
+
import { APPROVAL_LIMITS, WORKFLOW_LIMITS } from './types.ts';
|
|
15
16
|
|
|
16
17
|
const IDENTIFIER = /^[a-z][a-z0-9-]*(\.[a-z][a-z0-9-]*)+$/;
|
|
17
18
|
const PORT = /^[a-z][a-z0-9-]*$/;
|
|
@@ -43,6 +44,16 @@ export interface WorkflowReferenceCatalog {
|
|
|
43
44
|
readonly risk?: 'read' | 'workspace-write' | 'external' | 'destructive';
|
|
44
45
|
readonly idempotency?: 'required' | 'none';
|
|
45
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* approvals.core and the roles the workspace defines, resolved once before
|
|
49
|
+
* the compiler walks the graph. A catalog without this member reads as an
|
|
50
|
+
* absent approvals module, which is the answer a graph compiled with no
|
|
51
|
+
* catalog at all already gets.
|
|
52
|
+
*/
|
|
53
|
+
approval?(): {
|
|
54
|
+
readonly available: boolean;
|
|
55
|
+
readonly roleKeys: readonly string[];
|
|
56
|
+
};
|
|
46
57
|
}
|
|
47
58
|
|
|
48
59
|
export const EMPTY_WORKFLOW_GRAPH: WorkflowGraphV1 = Object.freeze({
|
|
@@ -137,6 +148,7 @@ const EXPECTED_PORTS: Record<
|
|
|
137
148
|
gate: { inputs: ['input'], outputs: ['pass', 'fail'] },
|
|
138
149
|
validator: { inputs: ['input'], outputs: ['pass', 'fail'] },
|
|
139
150
|
action: { inputs: ['input'], outputs: ['success', 'failure'] },
|
|
151
|
+
'human-approval': { inputs: ['input'], outputs: ['approved'] },
|
|
140
152
|
merge: { inputs: ['items'], outputs: ['data'] },
|
|
141
153
|
output: { inputs: ['input'], outputs: [] },
|
|
142
154
|
};
|
|
@@ -449,6 +461,112 @@ function stableTopologicalOrder(
|
|
|
449
461
|
return { order, cyclic: order.length !== nodes.length };
|
|
450
462
|
}
|
|
451
463
|
|
|
464
|
+
/**
|
|
465
|
+
* A human-approval node carries the whole requirement in the published graph,
|
|
466
|
+
* so publishing is where a role the workspace does not define has to be caught:
|
|
467
|
+
* a run that reached the node with an unresolvable requirement would pause on
|
|
468
|
+
* nobody. An absent approvals module is the same class of problem and gets its
|
|
469
|
+
* own stable code.
|
|
470
|
+
*/
|
|
471
|
+
function approvalIssues(
|
|
472
|
+
node: WorkflowHumanApprovalNodeV1,
|
|
473
|
+
catalog: WorkflowReferenceCatalog | undefined,
|
|
474
|
+
): readonly WorkflowValidationIssueV1[] {
|
|
475
|
+
const issues: WorkflowValidationIssueV1[] = [];
|
|
476
|
+
const at = { kind: 'node', nodeId: node.id } as const;
|
|
477
|
+
const approval = catalog?.approval?.();
|
|
478
|
+
if (!approval?.available) {
|
|
479
|
+
issues.push(
|
|
480
|
+
issue(
|
|
481
|
+
'WORKFLOW_APPROVAL_CAPABILITY_UNAVAILABLE',
|
|
482
|
+
`Node "${node.id}" needs approvals.core, which is not composed.`,
|
|
483
|
+
at,
|
|
484
|
+
),
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
/* approvals.core receives `prompt ?? label` as the request title and a
|
|
488
|
+
summary naming the label, so a value it would refuse has to fail the
|
|
489
|
+
publish rather than the run that reaches the node. The label carries the
|
|
490
|
+
title limit because it is the title whenever no prompt is set, and being
|
|
491
|
+
bounded there keeps the composed summary inside APPROVAL_LIMITS.summary. */
|
|
492
|
+
for (const [name, value] of [
|
|
493
|
+
['prompt', node.prompt],
|
|
494
|
+
['label', node.label],
|
|
495
|
+
] as const) {
|
|
496
|
+
if (typeof value === 'string' && value.length > APPROVAL_LIMITS.title) {
|
|
497
|
+
issues.push(
|
|
498
|
+
issue(
|
|
499
|
+
'WORKFLOW_LIMIT_EXCEEDED',
|
|
500
|
+
`Node "${node.id}" sets a ${name} of ${value.length} characters; approvals.core accepts ${APPROVAL_LIMITS.title}.`,
|
|
501
|
+
{ ...at, path: `/${name}` },
|
|
502
|
+
),
|
|
503
|
+
);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
const requirement: unknown = node.requirement;
|
|
507
|
+
if (!isRecord(requirement)) {
|
|
508
|
+
issues.push(
|
|
509
|
+
issue(
|
|
510
|
+
'WORKFLOW_APPROVAL_REQUIREMENT_INVALID',
|
|
511
|
+
`Node "${node.id}" declares no approval requirement.`,
|
|
512
|
+
{ ...at, path: '/requirement' },
|
|
513
|
+
),
|
|
514
|
+
);
|
|
515
|
+
return issues;
|
|
516
|
+
}
|
|
517
|
+
const roleKey = requirement.roleKey;
|
|
518
|
+
const scope = requirement.scope;
|
|
519
|
+
const hasRole = typeof roleKey === 'string' && roleKey !== '';
|
|
520
|
+
const hasScope = typeof scope === 'string' && scope !== '';
|
|
521
|
+
if (!hasRole && !hasScope) {
|
|
522
|
+
issues.push(
|
|
523
|
+
issue(
|
|
524
|
+
'WORKFLOW_APPROVAL_REQUIREMENT_INVALID',
|
|
525
|
+
`Node "${node.id}" must name a role key or a scope.`,
|
|
526
|
+
{ ...at, path: '/requirement' },
|
|
527
|
+
),
|
|
528
|
+
);
|
|
529
|
+
}
|
|
530
|
+
const bound = (value: unknown, name: string, max: number): void => {
|
|
531
|
+
if (value === undefined) return;
|
|
532
|
+
if (
|
|
533
|
+
!Number.isSafeInteger(value) ||
|
|
534
|
+
(value as number) < 1 ||
|
|
535
|
+
(value as number) > max
|
|
536
|
+
) {
|
|
537
|
+
issues.push(
|
|
538
|
+
issue(
|
|
539
|
+
'WORKFLOW_APPROVAL_REQUIREMENT_INVALID',
|
|
540
|
+
`Node "${node.id}" must set ${name} between 1 and ${max}.`,
|
|
541
|
+
{ ...at, path: `/requirement/${name}` },
|
|
542
|
+
),
|
|
543
|
+
);
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
bound(
|
|
547
|
+
requirement.decisions,
|
|
548
|
+
'decisions',
|
|
549
|
+
WORKFLOW_LIMITS.maxApprovalDecisions,
|
|
550
|
+
);
|
|
551
|
+
bound(
|
|
552
|
+
requirement.expiresInDays,
|
|
553
|
+
'expiresInDays',
|
|
554
|
+
WORKFLOW_LIMITS.maxApprovalExpiryDays,
|
|
555
|
+
);
|
|
556
|
+
/* A scope requirement is shape-checked only: scopes come from every composed
|
|
557
|
+
module, and this compiler resolves the workspace's roles alone. */
|
|
558
|
+
if (hasRole && approval && !approval.roleKeys.includes(roleKey as string)) {
|
|
559
|
+
issues.push(
|
|
560
|
+
issue(
|
|
561
|
+
'WORKFLOW_APPROVAL_ROLE_UNKNOWN',
|
|
562
|
+
`Node "${node.id}" names role "${roleKey as string}", which this workspace does not define.`,
|
|
563
|
+
{ ...at, path: '/requirement/roleKey' },
|
|
564
|
+
),
|
|
565
|
+
);
|
|
566
|
+
}
|
|
567
|
+
return issues;
|
|
568
|
+
}
|
|
569
|
+
|
|
452
570
|
export function compileWorkflowGraph(
|
|
453
571
|
graph: WorkflowGraphV1,
|
|
454
572
|
catalog?: WorkflowReferenceCatalog,
|
|
@@ -623,6 +741,22 @@ export function compileWorkflowGraph(
|
|
|
623
741
|
available,
|
|
624
742
|
});
|
|
625
743
|
}
|
|
744
|
+
if (node.type === 'human-approval') {
|
|
745
|
+
issues.push(...approvalIssues(node, catalog));
|
|
746
|
+
/* validate() accepts an unparsed graph, so the node may carry no
|
|
747
|
+
requirement at all. `approvalIssues` has already reported that;
|
|
748
|
+
the reference names nothing rather than throwing over it. */
|
|
749
|
+
const requirement: unknown = node.requirement;
|
|
750
|
+
const named = isRecord(requirement)
|
|
751
|
+
? (requirement.roleKey ?? requirement.scope)
|
|
752
|
+
: undefined;
|
|
753
|
+
references.push({
|
|
754
|
+
kind: 'approval',
|
|
755
|
+
id: typeof named === 'string' ? named : '',
|
|
756
|
+
version: '1',
|
|
757
|
+
available: catalog?.approval?.().available === true,
|
|
758
|
+
});
|
|
759
|
+
}
|
|
626
760
|
if (node.type === 'action') {
|
|
627
761
|
const action = catalog?.action(
|
|
628
762
|
node.action.actionId,
|
|
@@ -22,8 +22,34 @@ export const WORKFLOW_LIMITS = Object.freeze({
|
|
|
22
22
|
maxRunEvents: 10_000,
|
|
23
23
|
maxInteractivePage: 100,
|
|
24
24
|
maxReplayEvents: 100,
|
|
25
|
+
/* What a node may ask approvals.core for, bounded where approvals.core
|
|
26
|
+
bounds it: a requirement it would refuse has to be a publish issue rather
|
|
27
|
+
than a run that reaches the node and refuses there. */
|
|
28
|
+
maxApprovalDecisions: 16,
|
|
29
|
+
maxApprovalExpiryDays: 90,
|
|
25
30
|
});
|
|
26
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Longest values approvals.core accepts on a request, mirrored so a node whose
|
|
34
|
+
* prompt or label it would refuse is caught at validation instead of at the
|
|
35
|
+
* node. It must not drift from `APPROVAL_LIMITS` in that module's
|
|
36
|
+
* `domain/capability.ts`.
|
|
37
|
+
*/
|
|
38
|
+
export const APPROVAL_LIMITS = Object.freeze({
|
|
39
|
+
title: 200,
|
|
40
|
+
summary: 2_000,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* How long a run paused on a human approval sleeps before it looks at the
|
|
45
|
+
* request again. approvals.core calls back in process when a decision lands, so
|
|
46
|
+
* this is what resumes a run whose callback never arrives: the process that
|
|
47
|
+
* opened the request restarted, or approvals.core dropped the callback to stay
|
|
48
|
+
* inside its own bound on the pending ones. Shorter costs one claim per pending
|
|
49
|
+
* approval per interval.
|
|
50
|
+
*/
|
|
51
|
+
export const WORKFLOW_APPROVAL_RECHECK_MS = 5 * 60 * 1_000;
|
|
52
|
+
|
|
27
53
|
export interface WorkflowPortV1 {
|
|
28
54
|
readonly name: string;
|
|
29
55
|
readonly schemaId: string;
|
|
@@ -128,6 +154,25 @@ export interface WorkflowActionNodeV1 extends WorkflowNodeBaseV1 {
|
|
|
128
154
|
};
|
|
129
155
|
}
|
|
130
156
|
|
|
157
|
+
/**
|
|
158
|
+
* The requirement a human-approval node carries. It is the kernel
|
|
159
|
+
* `ApprovalRequirement` pinned into the published graph: who has to agree, how
|
|
160
|
+
* many of them, and how long the run waits before the request expires.
|
|
161
|
+
*/
|
|
162
|
+
export interface WorkflowApprovalRequirementV1 {
|
|
163
|
+
readonly roleKey?: string;
|
|
164
|
+
readonly scope?: string;
|
|
165
|
+
readonly decisions?: number;
|
|
166
|
+
readonly expiresInDays?: number;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface WorkflowHumanApprovalNodeV1 extends WorkflowNodeBaseV1 {
|
|
170
|
+
readonly type: 'human-approval';
|
|
171
|
+
readonly requirement: WorkflowApprovalRequirementV1;
|
|
172
|
+
/** Shown to the deciders; the node label is the fallback. */
|
|
173
|
+
readonly prompt?: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
131
176
|
export interface WorkflowMergeNodeV1 extends WorkflowNodeBaseV1 {
|
|
132
177
|
readonly type: 'merge';
|
|
133
178
|
readonly mode: 'all';
|
|
@@ -144,6 +189,7 @@ export type WorkflowNodeV1 =
|
|
|
144
189
|
| WorkflowGateNodeV1
|
|
145
190
|
| WorkflowValidatorNodeV1
|
|
146
191
|
| WorkflowActionNodeV1
|
|
192
|
+
| WorkflowHumanApprovalNodeV1
|
|
147
193
|
| WorkflowMergeNodeV1
|
|
148
194
|
| WorkflowOutputNodeV1;
|
|
149
195
|
|
|
@@ -226,7 +272,7 @@ export interface WorkflowValidationIssueV1 {
|
|
|
226
272
|
}
|
|
227
273
|
|
|
228
274
|
export interface WorkflowReferenceSummaryV1 {
|
|
229
|
-
readonly kind: 'agent' | 'action' | 'schema';
|
|
275
|
+
readonly kind: 'agent' | 'action' | 'schema' | 'approval';
|
|
230
276
|
readonly id: string;
|
|
231
277
|
readonly version: string;
|
|
232
278
|
readonly available: boolean;
|
|
@@ -258,6 +304,10 @@ export type WorkflowRunStatus =
|
|
|
258
304
|
| 'queued'
|
|
259
305
|
| 'running'
|
|
260
306
|
| 'waiting-agent'
|
|
307
|
+
/* A run asleep on a person. It leaves the worker's claim queue until the
|
|
308
|
+
approval resolves or its recheck falls due, so a request open for days
|
|
309
|
+
costs nothing and never starves a newly queued run. */
|
|
310
|
+
| 'waiting-approval'
|
|
261
311
|
| 'waiting-retry'
|
|
262
312
|
| 'cancel-requested'
|
|
263
313
|
| 'succeeded'
|
|
@@ -355,7 +405,7 @@ export interface WorkflowNodeAttempt {
|
|
|
355
405
|
readonly sideEffectIdempotencyKey: string;
|
|
356
406
|
readonly input: WorkflowPayloadEvidenceV1;
|
|
357
407
|
readonly output: WorkflowPayloadEvidenceV1;
|
|
358
|
-
readonly childKind: 'agent' | 'action' | null;
|
|
408
|
+
readonly childKind: 'agent' | 'action' | 'approval' | null;
|
|
359
409
|
readonly childId: string | null;
|
|
360
410
|
readonly childObservationDeadlineAt: number | null;
|
|
361
411
|
readonly failureCode: string | null;
|
|
@@ -438,21 +488,58 @@ export interface WorkflowRunDetail {
|
|
|
438
488
|
readonly output: WorkflowPayloadEvidenceV1;
|
|
439
489
|
}
|
|
440
490
|
|
|
491
|
+
export type WorkflowSortDirection = 'asc' | 'desc';
|
|
492
|
+
|
|
493
|
+
/** The page of a keyset list: `sort` and `direction` name an indexed order. */
|
|
494
|
+
export interface WorkflowListQuery<Sort extends string> {
|
|
495
|
+
readonly sort?: Sort;
|
|
496
|
+
readonly direction?: WorkflowSortDirection;
|
|
497
|
+
readonly limit?: number;
|
|
498
|
+
readonly cursor?: string | null;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export interface WorkflowDefinitionFilters {
|
|
502
|
+
readonly status?: WorkflowDefinition['status'];
|
|
503
|
+
/** Matched inside the name or the key, case-insensitively. */
|
|
504
|
+
readonly search?: string;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
export type WorkflowDefinitionSort = 'name' | 'updatedAt';
|
|
508
|
+
|
|
509
|
+
export interface WorkflowDefinitionListQuery
|
|
510
|
+
extends WorkflowDefinitionFilters,
|
|
511
|
+
WorkflowListQuery<WorkflowDefinitionSort> {}
|
|
512
|
+
|
|
513
|
+
export interface WorkflowDefinitionPage {
|
|
514
|
+
readonly definitions: readonly WorkflowDefinition[];
|
|
515
|
+
readonly nextCursor: string | null;
|
|
516
|
+
}
|
|
517
|
+
|
|
441
518
|
export interface WorkflowRunFilters {
|
|
442
519
|
readonly workflowId?: string;
|
|
443
520
|
readonly mode?: WorkflowRunMode;
|
|
444
521
|
readonly status?: WorkflowRunStatus;
|
|
445
522
|
readonly actorKind?: Actor['kind'];
|
|
446
523
|
readonly originKind?: WorkflowExecutionOrigin['kind'];
|
|
447
|
-
|
|
448
|
-
readonly
|
|
524
|
+
/** Matched inside the workflow name or key, the actor label or the run id. */
|
|
525
|
+
readonly search?: string;
|
|
449
526
|
}
|
|
450
527
|
|
|
528
|
+
export type WorkflowRunSort = 'queuedAt';
|
|
529
|
+
|
|
530
|
+
export interface WorkflowRunListQuery
|
|
531
|
+
extends WorkflowRunFilters,
|
|
532
|
+
WorkflowListQuery<WorkflowRunSort> {}
|
|
533
|
+
|
|
451
534
|
export interface WorkflowRunPage {
|
|
452
535
|
readonly runs: readonly WorkflowRunSummary[];
|
|
453
536
|
readonly nextCursor: string | null;
|
|
454
537
|
}
|
|
455
538
|
|
|
539
|
+
export type WorkflowAuditSort = 'sequence' | 'occurredAt';
|
|
540
|
+
|
|
541
|
+
export type WorkflowAuditListQuery = WorkflowListQuery<WorkflowAuditSort>;
|
|
542
|
+
|
|
456
543
|
export interface WorkflowSimulationFixture {
|
|
457
544
|
readonly nodeId: string;
|
|
458
545
|
readonly outcomePort?: string;
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
WORKFLOW_EXECUTION_CAPABILITY,
|
|
12
12
|
type WorkflowExecutionCapability,
|
|
13
13
|
} from './domain/types.ts';
|
|
14
|
+
import { workflowsDataClasses } from './services/data-classes.ts';
|
|
14
15
|
|
|
15
16
|
export function createServerComposition(
|
|
16
17
|
context: PlatformServerContext,
|
|
@@ -22,6 +23,13 @@ export function createServerComposition(
|
|
|
22
23
|
),
|
|
23
24
|
databases: context.databases,
|
|
24
25
|
capabilities: context.capabilities,
|
|
26
|
+
/* Which roles a workspace defines is auth.core's answer, asked when a
|
|
27
|
+
graph carrying a human-approval node is validated, never cached, so a
|
|
28
|
+
role deleted since the last publish is caught by the next one. */
|
|
29
|
+
roles: async (tenantId) =>
|
|
30
|
+
(await (await context.auth.service()).listRoles(tenantId)).map(
|
|
31
|
+
(role) => role.key,
|
|
32
|
+
),
|
|
25
33
|
});
|
|
26
34
|
/* The runtime opens its database leases lazily, so the capability is a
|
|
27
35
|
forwarder rather than a resolved object: registration must not force a
|
|
@@ -40,6 +48,10 @@ export function createServerComposition(
|
|
|
40
48
|
cancel: async (runId, contextValue) =>
|
|
41
49
|
(await capability()).cancel(runId, contextValue),
|
|
42
50
|
} satisfies WorkflowExecutionCapability);
|
|
51
|
+
/* The sweep, the export and the erasure run here, on this module's own
|
|
52
|
+
leases and under its own tenant transaction; the platform only holds the
|
|
53
|
+
declaration. */
|
|
54
|
+
context.dataClasses.declare(workflowsDataClasses(() => runtime.repository()));
|
|
43
55
|
return {
|
|
44
56
|
routes: createWorkflowsRoutes(context.auth, runtime),
|
|
45
57
|
start: () => runtime.start(),
|
|
@@ -8,12 +8,22 @@ import {
|
|
|
8
8
|
} from '@flowdular/sdk/database';
|
|
9
9
|
import {
|
|
10
10
|
createPlatformCapabilityRegistry,
|
|
11
|
+
parsePreviousKeys,
|
|
11
12
|
type PlatformCapabilityRegistry,
|
|
12
13
|
} from '@flowdular/sdk/kernel';
|
|
13
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
APPROVALS_REQUESTS_CAPABILITY,
|
|
16
|
+
type ApprovalsRequests,
|
|
17
|
+
type WorkspaceRolesResolver,
|
|
18
|
+
} from '../services/approvals.ts';
|
|
19
|
+
import {
|
|
20
|
+
NOTIFICATIONS_PUBLISH_CAPABILITY,
|
|
21
|
+
type NotificationPublisher,
|
|
22
|
+
} from '../services/notifications.ts';
|
|
14
23
|
import {
|
|
15
24
|
createWorkflowPayloadCodec,
|
|
16
25
|
decodeWorkflowPayloadKey,
|
|
26
|
+
type WorkflowPayloadCodec,
|
|
17
27
|
} from '../services/payload-codec.ts';
|
|
18
28
|
import {
|
|
19
29
|
DatabaseWorkflowsRepository,
|
|
@@ -37,8 +47,15 @@ export interface WorkflowsRuntimeOptions {
|
|
|
37
47
|
| undefined;
|
|
38
48
|
readonly repository?: WorkflowsRepository;
|
|
39
49
|
readonly capabilities?: PlatformCapabilityRegistry;
|
|
50
|
+
/* Roles the workspace defines, read through auth.core when a graph carries a
|
|
51
|
+
human-approval node. */
|
|
52
|
+
readonly roles?: WorkspaceRolesResolver;
|
|
40
53
|
readonly payloadKey?: Buffer;
|
|
54
|
+
/* Keys a rotation has not finished retiring. They open stored payloads and
|
|
55
|
+
verify outstanding cursors; nothing is ever written or signed with them. */
|
|
56
|
+
readonly previousPayloadKeys?: readonly Buffer[];
|
|
41
57
|
readonly cursorKey?: Buffer;
|
|
58
|
+
readonly previousCursorKeys?: readonly Buffer[];
|
|
42
59
|
readonly payloadRetentionMs?: number;
|
|
43
60
|
readonly worker?: WorkflowWorkerOptions;
|
|
44
61
|
readonly environment?: NodeJS.ProcessEnv;
|
|
@@ -47,6 +64,10 @@ export interface WorkflowsRuntimeOptions {
|
|
|
47
64
|
|
|
48
65
|
export interface WorkflowsRuntime {
|
|
49
66
|
service(): Promise<WorkflowsService>;
|
|
67
|
+
/* The store the declared data classes sweep, export and erase through. It
|
|
68
|
+
opens the runtime's own leases on first use, like the service does, so
|
|
69
|
+
declaring a class at composition opens no connection. */
|
|
70
|
+
repository(): Promise<WorkflowsRepository>;
|
|
50
71
|
start(): void;
|
|
51
72
|
stop(): void | Promise<void>;
|
|
52
73
|
dispose(): void | Promise<void>;
|
|
@@ -109,9 +130,22 @@ export function workflowsRuntimeOptionsFromEnvironment(
|
|
|
109
130
|
payloadKey: environment.FD_WORKFLOWS_PAYLOAD_KEY
|
|
110
131
|
? decodeWorkflowPayloadKey(environment.FD_WORKFLOWS_PAYLOAD_KEY)
|
|
111
132
|
: derivedDevelopmentKey(workspaceRoot, 'payload'),
|
|
133
|
+
previousPayloadKeys: parsePreviousKeys(
|
|
134
|
+
environment.FD_WORKFLOWS_PAYLOAD_KEY_PREVIOUS,
|
|
135
|
+
(entry) =>
|
|
136
|
+
decodeWorkflowPayloadKey(entry, 'FD_WORKFLOWS_PAYLOAD_KEY_PREVIOUS'),
|
|
137
|
+
),
|
|
112
138
|
cursorKey: environment.FD_WORKFLOWS_CURSOR_KEY
|
|
113
|
-
? decodeWorkflowPayloadKey(
|
|
139
|
+
? decodeWorkflowPayloadKey(
|
|
140
|
+
environment.FD_WORKFLOWS_CURSOR_KEY,
|
|
141
|
+
'FD_WORKFLOWS_CURSOR_KEY',
|
|
142
|
+
)
|
|
114
143
|
: derivedDevelopmentKey(workspaceRoot, 'cursor'),
|
|
144
|
+
previousCursorKeys: parsePreviousKeys(
|
|
145
|
+
environment.FD_WORKFLOWS_CURSOR_KEY_PREVIOUS,
|
|
146
|
+
(entry) =>
|
|
147
|
+
decodeWorkflowPayloadKey(entry, 'FD_WORKFLOWS_CURSOR_KEY_PREVIOUS'),
|
|
148
|
+
),
|
|
115
149
|
worker: {
|
|
116
150
|
leaseMs: environmentInteger(
|
|
117
151
|
environment.FD_WORKFLOWS_WORKER_LEASE_MS,
|
|
@@ -140,6 +174,24 @@ export function workflowsRuntimeOptionsFromEnvironment(
|
|
|
140
174
|
};
|
|
141
175
|
}
|
|
142
176
|
|
|
177
|
+
/**
|
|
178
|
+
* The codec a process outside the runtime seals with: the same current key and
|
|
179
|
+
* retired keys the runtime itself would resolve from this environment.
|
|
180
|
+
*/
|
|
181
|
+
export function workflowPayloadCodecFromEnvironment(
|
|
182
|
+
environment: NodeJS.ProcessEnv = process.env,
|
|
183
|
+
workspaceRoot = process.cwd(),
|
|
184
|
+
): WorkflowPayloadCodec {
|
|
185
|
+
const options = workflowsRuntimeOptionsFromEnvironment(
|
|
186
|
+
environment,
|
|
187
|
+
workspaceRoot,
|
|
188
|
+
);
|
|
189
|
+
return createWorkflowPayloadCodec(
|
|
190
|
+
options.payloadKey ?? derivedDevelopmentKey(workspaceRoot, 'payload'),
|
|
191
|
+
options.previousPayloadKeys ?? [],
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
143
195
|
export function createWorkflowsRuntime(
|
|
144
196
|
options: WorkflowsRuntimeOptions,
|
|
145
197
|
): WorkflowsRuntime {
|
|
@@ -210,7 +262,7 @@ export function createWorkflowsRuntime(
|
|
|
210
262
|
runtime: runtimeLease.database,
|
|
211
263
|
background: backgroundLease.database,
|
|
212
264
|
},
|
|
213
|
-
createWorkflowPayloadCodec(payloadKey),
|
|
265
|
+
createWorkflowPayloadCodec(payloadKey, options.previousPayloadKeys ?? []),
|
|
214
266
|
options.payloadRetentionMs,
|
|
215
267
|
);
|
|
216
268
|
};
|
|
@@ -221,7 +273,11 @@ export function createWorkflowsRuntime(
|
|
|
221
273
|
if (!service) {
|
|
222
274
|
const serviceOptions: WorkflowsServiceOptions = {
|
|
223
275
|
capabilities,
|
|
224
|
-
|
|
276
|
+
cursorKeys: {
|
|
277
|
+
current: cursorKey,
|
|
278
|
+
previous: options.previousCursorKeys ?? [],
|
|
279
|
+
},
|
|
280
|
+
...(options.roles ? { roles: options.roles } : {}),
|
|
225
281
|
onRunQueued: () => worker?.kick(),
|
|
226
282
|
};
|
|
227
283
|
service = new WorkflowsService(repository, serviceOptions);
|
|
@@ -229,7 +285,20 @@ export function createWorkflowsRuntime(
|
|
|
229
285
|
worker ??= new WorkflowWorker(
|
|
230
286
|
repository,
|
|
231
287
|
() => service?.executionDependencies() ?? null,
|
|
232
|
-
|
|
288
|
+
{
|
|
289
|
+
...options.worker,
|
|
290
|
+
/* notifications.core is optional and is not declared as a
|
|
291
|
+
dependency. The lookup happens when a run settles, so a module
|
|
292
|
+
composed after this one is found and an absent one is a no-op. */
|
|
293
|
+
notifications: () =>
|
|
294
|
+
capabilities.get<NotificationPublisher>(
|
|
295
|
+
NOTIFICATIONS_PUBLISH_CAPABILITY,
|
|
296
|
+
),
|
|
297
|
+
/* approvals.core is optional too. A human-approval node refuses with
|
|
298
|
+
a stable code when it is absent; every other node is unaffected. */
|
|
299
|
+
approvals: () =>
|
|
300
|
+
capabilities.get<ApprovalsRequests>(APPROVALS_REQUESTS_CAPABILITY),
|
|
301
|
+
},
|
|
233
302
|
);
|
|
234
303
|
if (started) worker.start();
|
|
235
304
|
return service;
|
|
@@ -240,6 +309,10 @@ export function createWorkflowsRuntime(
|
|
|
240
309
|
|
|
241
310
|
return {
|
|
242
311
|
service: resolved,
|
|
312
|
+
repository: async () => {
|
|
313
|
+
await resolved();
|
|
314
|
+
return repository!;
|
|
315
|
+
},
|
|
243
316
|
start() {
|
|
244
317
|
if (disposed) throw new Error('Workflows runtime is disposed.');
|
|
245
318
|
started = true;
|