@flowdular/sdk 0.2.4 → 0.3.1
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 +130 -3
- 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/cli-extension/SKILL.md +1 -1
- package/.ai/skills/deploy-operate/SKILL.md +119 -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/0005_approvals_grant_audit.down.sql +4 -0
- package/modules/approvals/migrations/0005_approvals_grant_audit.up.sql +20 -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 +327 -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 +107 -0
- package/modules/approvals/src/domain/grant.ts +69 -0
- package/modules/approvals/src/domain/types.ts +168 -0
- package/modules/approvals/src/index.ts +61 -0
- package/modules/approvals/src/platform.ts +136 -0
- package/modules/approvals/src/server/index.ts +42 -0
- package/modules/approvals/src/server/runtime.ts +185 -0
- package/modules/approvals/src/services/approvals-service.ts +637 -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 +783 -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 +256 -0
- package/modules/approvals/src/services/notifications.ts +95 -0
- package/modules/approvals/src/services/repository.ts +169 -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/0003_connectors_rotation_inventory.down.sql +2 -0
- package/modules/connectors/migrations/0003_connectors_rotation_inventory.up.sql +19 -0
- package/modules/connectors/migrations/README.md +3 -0
- package/modules/connectors/module.json +32 -0
- package/modules/{automations-workflows-integration → connectors}/package.json +28 -26
- package/modules/connectors/spec/module.yaml +448 -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/cli/commands.json +17 -0
- package/modules/connectors/src/cli/index.ts +126 -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-rotation.ts +221 -0
- package/modules/connectors/src/services/credential-vault.ts +194 -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 +202 -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/0003_documents_rotation_inventory.down.sql +2 -0
- package/modules/documents/migrations/0003_documents_rotation_inventory.up.sql +18 -0
- package/modules/documents/migrations/README.md +3 -0
- package/modules/documents/module.json +32 -0
- package/modules/documents/package.json +50 -0
- package/modules/documents/spec/module.yaml +248 -0
- package/modules/documents/src/acl/permissions.ts +6 -0
- package/modules/documents/src/api/endpoints.ts +401 -0
- package/modules/documents/src/cli/commands.json +17 -0
- package/modules/documents/src/cli/index.ts +145 -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 +270 -0
- package/modules/documents/src/services/documents-service.ts +590 -0
- package/modules/documents/src/services/index.ts +18 -0
- package/modules/documents/src/services/migration.ts +117 -0
- package/modules/documents/src/services/repository.ts +58 -0
- package/modules/documents/src/services/storage-rotation.ts +157 -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/0003_exports_rotation_inventory.down.sql +1 -0
- package/modules/exports/migrations/0003_exports_rotation_inventory.up.sql +9 -0
- package/modules/exports/migrations/README.md +3 -0
- package/modules/exports/module.json +32 -0
- package/modules/exports/package.json +45 -0
- package/modules/exports/spec/module.yaml +230 -0
- package/modules/exports/src/acl/permissions.ts +6 -0
- package/modules/exports/src/api/endpoints.ts +211 -0
- package/modules/exports/src/cli/commands.json +17 -0
- package/modules/exports/src/cli/index.ts +145 -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 +50 -0
- package/modules/exports/src/server/runtime.ts +160 -0
- package/modules/exports/src/services/data-classes.ts +59 -0
- package/modules/exports/src/services/database-repository.ts +403 -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 +116 -0
- package/modules/exports/src/services/repository.ts +96 -0
- package/modules/exports/src/services/storage-rotation.ts +138 -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 +180 -0
- package/packages/database/src/decoders.ts +25 -0
- package/packages/database/src/index.ts +17 -0
- package/packages/database/src/migrations.ts +7 -0
- package/packages/database/src/record-history.ts +5 -14
- package/packages/harness/src/index.ts +2 -0
- package/packages/harness/src/runtime.ts +378 -2
- package/packages/harness/src/tool-adapters.ts +20 -9
- package/packages/kernel/src/acl.ts +179 -0
- package/packages/kernel/src/approval-grant.ts +310 -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 +85 -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 +238 -0
- package/packages/storage/src/index.ts +49 -0
- package/packages/storage/src/local.ts +75 -0
- package/packages/storage/src/port.ts +262 -0
- package/packages/storage/src/read-token.ts +130 -0
- package/packages/storage/src/reseal.ts +128 -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
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- The schedule and trigger lists page by keyset over the same order they show,
|
|
2
|
+
-- lower(label) then id, or updated_at then id, so each order gets an index
|
|
3
|
+
-- that starts with the tenant and ends with the id the keyset breaks ties on.
|
|
4
|
+
CREATE INDEX IF NOT EXISTS automations_schedules_tenant_label_key_idx
|
|
5
|
+
ON automations_schedules (tenant_id, lower(label), id);
|
|
6
|
+
CREATE INDEX IF NOT EXISTS automations_schedules_tenant_updated_idx
|
|
7
|
+
ON automations_schedules (tenant_id, updated_at, id);
|
|
8
|
+
CREATE INDEX IF NOT EXISTS automations_triggers_tenant_label_key_idx
|
|
9
|
+
ON automations_triggers (tenant_id, lower(label), id);
|
|
10
|
+
CREATE INDEX IF NOT EXISTS automations_triggers_tenant_updated_idx
|
|
11
|
+
ON automations_triggers (tenant_id, updated_at, id);
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"schemaVersion": 1,
|
|
4
4
|
"id": "automations.core",
|
|
5
5
|
"package": "@flowdular/module-automations",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.6.7",
|
|
7
7
|
"profile": "full",
|
|
8
|
-
"capabilities": ["api", "database", "client", "translations"],
|
|
8
|
+
"capabilities": ["api", "database", "client", "translations", "cli"],
|
|
9
9
|
"platform": {
|
|
10
10
|
"server": true,
|
|
11
11
|
"client": true
|
|
@@ -13,19 +13,37 @@
|
|
|
13
13
|
"dependencies": [
|
|
14
14
|
{
|
|
15
15
|
"id": "system.core",
|
|
16
|
-
"range": "0.
|
|
16
|
+
"range": "^0.7.0"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"id": "auth.core",
|
|
20
|
-
"range": "0.
|
|
20
|
+
"range": "^0.13.0"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"id": "agents.core",
|
|
24
|
-
"range": "0.
|
|
24
|
+
"range": "^0.12.0"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "workflows.core",
|
|
28
|
+
"range": "^0.6.0"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"provides": ["automations.targets.v1", "automations.execution.v1"],
|
|
32
|
+
"requires": [
|
|
33
|
+
{
|
|
34
|
+
"id": "agents.run-queue"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "workflows.execution.v1",
|
|
38
|
+
"optional": true
|
|
25
39
|
}
|
|
26
40
|
],
|
|
27
41
|
"tenancy": "required",
|
|
28
42
|
"locales": ["en", "pl"],
|
|
29
43
|
"stability": "experimental",
|
|
30
|
-
"
|
|
44
|
+
"cli": {
|
|
45
|
+
"catalog": "src/cli/commands.json",
|
|
46
|
+
"entry": "src/cli/index.ts"
|
|
47
|
+
},
|
|
48
|
+
"platformApi": "^0.1.0"
|
|
31
49
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowdular/module-automations",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./src/index.ts",
|
|
@@ -14,12 +14,15 @@
|
|
|
14
14
|
"test": "vitest run"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
+
"@flowdular/cli-protocol": "workspace:*",
|
|
17
18
|
"@flowdular/client": "workspace:*",
|
|
18
19
|
"@flowdular/contracts": "workspace:*",
|
|
19
20
|
"@flowdular/database": "workspace:*",
|
|
21
|
+
"@flowdular/harness": "workspace:*",
|
|
20
22
|
"@flowdular/kernel": "workspace:*",
|
|
21
23
|
"@flowdular/module-agents": "workspace:*",
|
|
22
24
|
"@flowdular/module-auth": "workspace:*",
|
|
25
|
+
"@flowdular/module-workflows": "workspace:*",
|
|
23
26
|
"@flowdular/server": "workspace:*",
|
|
24
27
|
"@flowdular/ui": "workspace:*",
|
|
25
28
|
"octane": "0.1.51",
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
schemaVersion: 1
|
|
2
2
|
id: automations.core
|
|
3
|
-
specVersion: 0.
|
|
3
|
+
specVersion: 0.6.7
|
|
4
4
|
status: approved
|
|
5
5
|
name: Automations Core
|
|
6
|
-
description: Runs agents without a person present, on a schedule or from a signed webhook, as a module a workspace can leave uninstalled.
|
|
6
|
+
description: Runs agents or published workflows without a person present, on a schedule or from a signed webhook, as a module a workspace can leave uninstalled.
|
|
7
7
|
profile: full
|
|
8
8
|
capabilities:
|
|
9
9
|
- api
|
|
10
10
|
- database
|
|
11
11
|
- client
|
|
12
12
|
- translations
|
|
13
|
+
- cli
|
|
13
14
|
dependencies:
|
|
14
15
|
- id: system.core
|
|
15
|
-
range: 0.
|
|
16
|
+
range: ^0.7.0
|
|
16
17
|
- id: auth.core
|
|
17
|
-
range: 0.
|
|
18
|
+
range: ^0.13.0
|
|
18
19
|
- id: agents.core
|
|
19
|
-
range: 0.
|
|
20
|
+
range: ^0.12.0
|
|
21
|
+
- id: workflows.core
|
|
22
|
+
range: ^0.6.0
|
|
20
23
|
tenancy: required
|
|
21
24
|
locales:
|
|
22
25
|
- en
|
|
@@ -25,14 +28,24 @@ invariants:
|
|
|
25
28
|
- Automations never reads or writes another module's database; it reaches agents.core only through the agents.run-queue platform capability.
|
|
26
29
|
- A workspace with automations.core disabled keeps every agent capability, including manual runs, usage accounting, and budget caps.
|
|
27
30
|
- A schedule fires at most once per slot, and a slot missed while the platform was down is skipped, never replayed.
|
|
31
|
+
- A cadence is either every:N whole minutes from 1 to 10080, or a five field cron expression with no seconds, bounded in length, whose fields accept *, numbers, three letter month and weekday names, lists, ranges and steps. An expression the module cannot honour, including one no real date matches, is refused when it is saved with the stable code INVALID_CADENCE.
|
|
32
|
+
- A cron slot is a wall clock time in the workspace zone read from the shared system.core.timeZone setting, resolved to one UTC instant that is what the schedule stores. A wall time a daylight saving change removes is skipped, a wall time that occurs twice fires at the first of the two, and an interval cadence carries no zone and never reads one.
|
|
33
|
+
- Changing the workspace time zone moves that workspace's pending cron slots into the new zone at once, each write conditional on the slot that was read, so a slot already due keeps the fire it owes and a concurrent fire wins.
|
|
28
34
|
- A webhook request is accepted only with a fresh, valid signature; every refusal returns one identical response and the reason goes to the audit trail alone.
|
|
29
35
|
- The trigger secret is stored encrypted with the key held outside the database, and is returned in full only at creation and rotation.
|
|
30
36
|
- A schedule or trigger whose agent no longer exists disables itself and records why, because a cross-module reference cannot be a foreign key.
|
|
31
37
|
- Automation events are appended to a hash-chained audit trail that verifies independently of the agents trail.
|
|
32
|
-
- The scheduler
|
|
38
|
+
- The scheduler is the platform job runner on the automations.core poll interval setting, a platform setting with a bounded deployment default so installing the module does not add an undeclared clock policy to agents.core, claiming a bounded page of routing columns read on the background role, one schedule fired per claim, and one schedule that cannot be read or fired costing no other schedule in the pass.
|
|
33
39
|
- A schedule stores its raw input template; only the queued run snapshot receives a single-pass resolved value from scope-filtered variable sources.
|
|
34
40
|
- Every request-time read and write runs on a tenant-scoped PostgreSQL handle under forced row-level security. The scheduler poll and the webhook trigger lookup are the only cross-tenant reads, they run on a separate read-only role, and that role is granted only the columns that route the work to a tenant under a policy of the table itself.
|
|
35
41
|
- A due schedule found by the cross-tenant poll, and a trigger found by the cross-tenant webhook lookup, are read again under the tenant that row named before anything acts on them, and a slot whose next run time moved in between is skipped.
|
|
42
|
+
- Automations reaches workflows.core only through the public workflows.execution.v1 capability. It owns no workflow worker, execution history, revision snapshot, or workflow permission, and while that capability is absent the workflow target is unavailable, existing workflow target configuration is retained, and automatic firing is skipped with safe audit evidence.
|
|
43
|
+
- A schedule or webhook can select a workflow only when the configuring user can read published workflows, execute workflow runs, and holds every permission the selected published workflow requires. The permission snapshot is captured from trusted authorization context and cannot be supplied or widened by a schedule template, webhook body, or adapter input.
|
|
44
|
+
- An automatic workflow invocation runs as the automations.core service actor with the configuring user in configuredBy and the schedule or trigger as a separate origin. Run now keeps the requesting user as the workflow actor with module origin automations.core and operation schedules.run-now.
|
|
45
|
+
- A workflow invocation uses a stable tenant-scoped idempotency key derived from the persisted schedule slot, the accepted webhook signature digest, or the Run now request id, so a repeated delivery resolves to the original run and a key reused for different input is refused by workflows.core without a retry under a new key.
|
|
46
|
+
- A missing, archived, unpublished, or newly unauthorized workflow never falls back to another workflow or agent and never substitutes a revision selected outside workflows.core; the schedule or trigger is made visibly unavailable until an authorized user updates it.
|
|
47
|
+
- The automations-workflows.schedule.run agent tool lets a workflow run node fire an automation schedule whose target is an agent only, under a node-derived idempotency key, so neither a workflow nor an agent can re-enter itself through an automation. The caller kind is the invocation the harness states, a kind it does not state counting as an agent run, so every agent run is refused and a workflow action runs whatever its run actor is; the actor is identity only and must hold automations.schedules.manage.
|
|
48
|
+
- automations.core declares one data class to the platform registry, automations.core.audit-events, holding the audit trail. It is exportable, and its export walks one workspace by keyset in bounded pages under this module's own tenant-scoped transaction. It carries no retention period and no sweep, because the trail is hash chained from its first event and removing the oldest links by age would make the chain unverifiable; schedules and webhook triggers are configuration a person manages, so they are not declared as a class that ages.
|
|
36
49
|
permissions:
|
|
37
50
|
- id: automations.schedules.read
|
|
38
51
|
description: Read schedules in the active tenant.
|
|
@@ -46,7 +59,12 @@ dataOwnership:
|
|
|
46
59
|
- automations.core owns schedule definitions, webhook trigger definitions, their encrypted secrets, and its own audit trail.
|
|
47
60
|
- agents.core keeps runs, run history, token usage, cost accounting, and budget caps, so cost protection survives with automations uninstalled.
|
|
48
61
|
- Automations stores an agent identifier and never copies agent definitions, skills, or provider credentials.
|
|
62
|
+
- For a workflow target automations.core stores the published workflow key, the configuring user, the trusted permission snapshot, and the run correlation; workflows.core keeps the selected revision, execution payload, evidence, usage, cost, status, cancellation, and run history.
|
|
49
63
|
acceptanceScenarios:
|
|
64
|
+
- id: AUTO-DATA-CLASS-EXPORT
|
|
65
|
+
given: Two workspaces hold automation audit events and the platform has sealed the data class registry.
|
|
66
|
+
when: The workspace export runs the automations.core.audit-events operation for one of them.
|
|
67
|
+
then: Every event of that workspace is written to the sink by a bounded keyset walk with the oldest and newest event time in the summary, the other workspace contributes nothing, a workspace without events answers no rows and no range, and the class declares no sweep so the hash chain keeps its first link.
|
|
50
68
|
- id: AUTO-SCHEDULE-FIRES
|
|
51
69
|
given: An enabled schedule on an existing agent is due.
|
|
52
70
|
when: The worker ticks twice inside the same slot.
|
|
@@ -55,6 +73,18 @@ acceptanceScenarios:
|
|
|
55
73
|
given: An enabled schedule was due several intervals ago because the platform was stopped.
|
|
56
74
|
when: The worker ticks after the platform starts.
|
|
57
75
|
then: One run is enqueued and the skipped slots are not replayed.
|
|
76
|
+
- id: AUTO-CRON-NEXT-RUN
|
|
77
|
+
given: A schedule manager saves a cron cadence in a workspace whose time zone is set.
|
|
78
|
+
when: The next run is computed, and later the workspace changes its time zone.
|
|
79
|
+
then: The stored next run is the first matching wall clock minute in that zone expressed in UTC, the schedules screen shows it in that zone, and the workspace's pending cron slots move when the zone changes while every:N schedules keep theirs.
|
|
80
|
+
- id: AUTO-CRON-DST
|
|
81
|
+
given: A daily cron slot falls in the hour a daylight saving change removes, and on another date in the hour it repeats.
|
|
82
|
+
when: The next run is computed across both transitions.
|
|
83
|
+
then: The removed slot is skipped for that day rather than moved, the repeated slot fires once at the first of its two readings, a computation from inside the repeated hour never answers a time already past, and the local hour is unchanged on every other day.
|
|
84
|
+
- id: AUTO-CRON-INVALID
|
|
85
|
+
given: A cadence is neither every:N in range nor a cron expression this module can honour.
|
|
86
|
+
when: A schedule manager saves it.
|
|
87
|
+
then: The server refuses with INVALID_CADENCE before anything is stored, and a stored cadence that stops being honourable disables its schedule with the reason instead of firing a slot it cannot advance past.
|
|
58
88
|
- id: AUTO-WEBHOOK-ACCEPT
|
|
59
89
|
given: A caller signs the body with the trigger secret and a fresh timestamp.
|
|
60
90
|
when: The request reaches the public fire endpoint.
|
|
@@ -86,8 +116,52 @@ acceptanceScenarios:
|
|
|
86
116
|
- id: AUTO-SCHEDULE-VARIABLES
|
|
87
117
|
given: A schedule manager can read the variables offered by the schedule editor, including agent.name through the agents.run-queue public capability.
|
|
88
118
|
when: The manager saves a template containing known variables and the schedule queues a run.
|
|
89
|
-
then: Unknown or forbidden variables are rejected, the stored schedule keeps the raw template, and the run receives one-pass resolved input from the active tenant only.
|
|
119
|
+
then: Unknown or forbidden variables are rejected, the stored schedule keeps the raw template, and the run receives one-pass resolved input from the active tenant only. The editor reads its variables, agents, targets and the workspace zone from one automations.options read apart from the schedule list, and the schedules screen reads that list in pages of at most 200 rows sorted by label or updatedAt with the enabled filter and label search applied on the server, through an opaque cursor bound to the tenant, the sort and the filters.
|
|
90
120
|
- id: AUTO-POLL-NARROW
|
|
91
121
|
given: Two workspaces each own an enabled schedule that is due.
|
|
92
122
|
when: The scheduler polls for due work across tenants.
|
|
93
123
|
then: The poll returns only the workspace id, schedule id and next run time; the label, input template, configuring actor and permission snapshot are unreadable on that connection, and it cannot write.
|
|
124
|
+
- id: AUTO-WORKFLOW-REGISTER
|
|
125
|
+
given: automations.core and workflows.core are composed.
|
|
126
|
+
when: Platform composition completes before module start hooks run.
|
|
127
|
+
then: Exactly one workflow target adapter is available to automations.core, a duplicate registration stops boot, and no second scheduler, webhook ingress, or workflow worker starts.
|
|
128
|
+
- id: AUTO-WORKFLOW-OPTIONAL
|
|
129
|
+
given: workflows.core is unavailable.
|
|
130
|
+
when: A user opens automations or an automatic trigger becomes due.
|
|
131
|
+
then: Agent targets continue to work, workflow targets are hidden or marked unavailable, existing workflow target configuration is retained, no workflow run is created, and automations records a safe unavailable outcome without reading workflow storage.
|
|
132
|
+
- id: AUTO-WORKFLOW-CONFIGURE
|
|
133
|
+
given: A user can manage the schedule or trigger, read workflow definitions, execute workflow runs, and holds every permission required by a published workflow.
|
|
134
|
+
when: The user selects that workflow as the automation target.
|
|
135
|
+
then: automations.core stores the workflow key, configuring user, trusted permission snapshot, and target input configuration without copying a workflow revision, graph, secret, or execution record. The schedule and trigger forms take their target choices from the same automations.options read, and the triggers screen reads its list in pages of at most 200 rows sorted by label or updatedAt with the enabled filter and label search applied on the server, through an opaque cursor bound to the tenant, the sort and the filters.
|
|
136
|
+
- id: AUTO-WORKFLOW-CONFIGURE-DENY
|
|
137
|
+
given: A user lacks automation management, workflow read, workflow execution, or one permission required by the selected workflow.
|
|
138
|
+
when: The user attempts to create or update a workflow schedule or trigger.
|
|
139
|
+
then: automations.core refuses before persisting the target and grants no permission of its own.
|
|
140
|
+
- id: AUTO-WORKFLOW-SCHEDULE
|
|
141
|
+
given: An enabled workflow schedule is due for a persisted slot and its once-resolved input template produces bounded JSON.
|
|
142
|
+
when: The automations worker fires that slot more than once because of polling or recovery.
|
|
143
|
+
then: One workflow is enqueued by published key with a schedule origin, the automations.core service actor, the configuring user, the trusted permission snapshot, and the same slot-derived idempotency key, and automations stores the returned run correlation.
|
|
144
|
+
- id: AUTO-WORKFLOW-RUN-NOW
|
|
145
|
+
given: An authorized user selects Run now on a workflow schedule and still holds every permission required by its published workflow.
|
|
146
|
+
when: automations.core invokes the target with a bounded request identifier.
|
|
147
|
+
then: The workflow actor is the real requesting user, the origin is module automations.core with operation schedules.run-now, the permission snapshot is the caller's current trusted snapshot, and the idempotency key derives from the request.
|
|
148
|
+
- id: AUTO-WORKFLOW-WEBHOOK
|
|
149
|
+
given: An enabled workflow trigger receives a fresh valid signature and a bounded JSON body.
|
|
150
|
+
when: The same signed request is delivered more than once.
|
|
151
|
+
then: automations.core verifies ingress once per delivery, passes the parsed JSON unchanged with a webhook origin and a stable signature-digest key, workflows.core returns the same run, and neither module exposes the secret or raw signature.
|
|
152
|
+
- id: AUTO-WORKFLOW-TENANT
|
|
153
|
+
given: Two tenants use the same workflow key and equivalent schedule or trigger identifiers and payloads.
|
|
154
|
+
when: Their automations fire.
|
|
155
|
+
then: Each invocation uses only its trusted tenant context, idempotency is isolated per tenant, each run resolves that tenant's published workflow, and neither tenant can observe or affect the other's target or run.
|
|
156
|
+
- id: AUTO-WORKFLOW-UNAVAILABLE-TARGET
|
|
157
|
+
given: A configured workflow is archived, unpublished, missing, or no longer authorized by the stored permission snapshot.
|
|
158
|
+
when: Its schedule or webhook attempts to fire.
|
|
159
|
+
then: workflows.core refuses with its stable code, no fallback target or revision is selected, automations records a safe correlated failure, and the schedule or trigger is made visibly unavailable until an authorized user updates it.
|
|
160
|
+
- id: AUTO-WORKFLOW-IDEMPOTENCY-CONFLICT
|
|
161
|
+
given: An automation source reuses a persisted slot or accepted signature digest with a different workflow key or parsed input hash.
|
|
162
|
+
when: automations.core calls workflows.execution.v1 with the existing idempotency key.
|
|
163
|
+
then: workflows.core returns WORKFLOW_IDEMPOTENCY_CONFLICT, no second run is created, and automations records the refusal without retrying under a new key.
|
|
164
|
+
- id: AUTO-WORKFLOW-ACTION
|
|
165
|
+
given: A workflow run node calls the automations-workflows.schedule.run tool with a durable node idempotency key.
|
|
166
|
+
when: The call is reached as a workflow action or as an agent run, with an actor that may be a user, a service, or an agent, and with or without automations.schedules.manage and the key.
|
|
167
|
+
then: Only a workflow action call whose actor holds the permission fires the schedule, whatever kind that actor is, the schedule may dispatch an agent target only, a retried node attempt reuses the same automation key, and every agent run, actorless call, or caller without the permission or key is refused before automations executes.
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { randomBytes } from 'node:crypto';
|
|
1
2
|
import {
|
|
3
|
+
decodeCursor,
|
|
2
4
|
defineEndpoint,
|
|
5
|
+
encodeCursor,
|
|
6
|
+
HttpProblem,
|
|
3
7
|
jsonResponse,
|
|
8
|
+
pageResponse,
|
|
4
9
|
problemResponse,
|
|
5
10
|
readJsonObject,
|
|
11
|
+
readPageQuery,
|
|
6
12
|
requiredString,
|
|
7
13
|
} from '@flowdular/sdk/server';
|
|
8
14
|
import type { AuthRuntime } from '@flowdular/sdk/modules/auth/server';
|
|
@@ -17,6 +23,12 @@ import type { CreateAutomationScheduleInput } from '../domain/types.ts';
|
|
|
17
23
|
import { scheduleVariablesForScopes } from '../domain/variables.ts';
|
|
18
24
|
import type { AutomationsRuntime } from '../server/runtime.ts';
|
|
19
25
|
import { AutomationsServiceError } from '../services/automations-service.ts';
|
|
26
|
+
import {
|
|
27
|
+
AUTOMATION_LIST_SORT_KEYS,
|
|
28
|
+
type AutomationListCursor,
|
|
29
|
+
type AutomationListQuery,
|
|
30
|
+
type AutomationListSortKey,
|
|
31
|
+
} from '../services/repository.ts';
|
|
20
32
|
import {
|
|
21
33
|
MAX_TRIGGER_BODY_BYTES,
|
|
22
34
|
TRIGGER_SIGNATURE_HEADER,
|
|
@@ -68,7 +80,7 @@ function scheduleInput(
|
|
|
68
80
|
min: 1,
|
|
69
81
|
max: 10_000,
|
|
70
82
|
}),
|
|
71
|
-
cadence: requiredString(value, 'cadence', { min: 7, max:
|
|
83
|
+
cadence: requiredString(value, 'cadence', { min: 7, max: 200 }),
|
|
72
84
|
enabled: requiredBoolean(value, 'enabled'),
|
|
73
85
|
};
|
|
74
86
|
}
|
|
@@ -98,6 +110,114 @@ function optionalTargetInput(value: Record<string, unknown>) {
|
|
|
98
110
|
return Object.keys(target).length === 0 ? undefined : target;
|
|
99
111
|
}
|
|
100
112
|
|
|
113
|
+
const LIST_PAGE_LIMIT = 50;
|
|
114
|
+
const MAX_LIST_PAGE_LIMIT = 200;
|
|
115
|
+
const MAX_LIST_SEARCH_LENGTH = 120;
|
|
116
|
+
|
|
117
|
+
function invalid(message: string): HttpProblem {
|
|
118
|
+
return new HttpProblem('INVALID_INPUT', message, 400);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function invalidCursor(): HttpProblem {
|
|
122
|
+
return new HttpProblem(
|
|
123
|
+
'CURSOR_INVALID',
|
|
124
|
+
'The page cursor is not valid.',
|
|
125
|
+
400,
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
interface ListRequest {
|
|
130
|
+
readonly query: AutomationListQuery;
|
|
131
|
+
/* Travels inside the cursor, so a cursor answers only the request that
|
|
132
|
+
minted it: the same workspace, order and filters. */
|
|
133
|
+
readonly scope: Record<string, string>;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function listRequest(
|
|
137
|
+
url: URL,
|
|
138
|
+
tenantId: string,
|
|
139
|
+
cursorSecret: Uint8Array,
|
|
140
|
+
): ListRequest {
|
|
141
|
+
const page = readPageQuery(url, {
|
|
142
|
+
maxLimit: MAX_LIST_PAGE_LIMIT,
|
|
143
|
+
defaultLimit: LIST_PAGE_LIMIT,
|
|
144
|
+
});
|
|
145
|
+
const sort = url.searchParams.get('sort') ?? 'label';
|
|
146
|
+
if (!AUTOMATION_LIST_SORT_KEYS.includes(sort as AutomationListSortKey)) {
|
|
147
|
+
throw invalid(
|
|
148
|
+
`sort must be one of ${AUTOMATION_LIST_SORT_KEYS.join(', ')}.`,
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
const direction = url.searchParams.get('direction') ?? 'asc';
|
|
152
|
+
if (direction !== 'asc' && direction !== 'desc') {
|
|
153
|
+
throw invalid('direction must be asc or desc.');
|
|
154
|
+
}
|
|
155
|
+
const enabledValue = url.searchParams.get('enabled') ?? '';
|
|
156
|
+
if (
|
|
157
|
+
enabledValue !== '' &&
|
|
158
|
+
enabledValue !== 'true' &&
|
|
159
|
+
enabledValue !== 'false'
|
|
160
|
+
) {
|
|
161
|
+
throw invalid('enabled must be true or false.');
|
|
162
|
+
}
|
|
163
|
+
const search = (url.searchParams.get('q') ?? '').trim();
|
|
164
|
+
if (search.length > MAX_LIST_SEARCH_LENGTH) {
|
|
165
|
+
throw invalid(`q is at most ${MAX_LIST_SEARCH_LENGTH} characters.`);
|
|
166
|
+
}
|
|
167
|
+
const scope = {
|
|
168
|
+
tenant: tenantId,
|
|
169
|
+
sort,
|
|
170
|
+
direction,
|
|
171
|
+
enabled: enabledValue,
|
|
172
|
+
q: search,
|
|
173
|
+
};
|
|
174
|
+
let after: AutomationListCursor | null = null;
|
|
175
|
+
if (page.cursor) {
|
|
176
|
+
const cursor = decodeCursor(page.cursor, cursorSecret);
|
|
177
|
+
for (const [key, value] of Object.entries(scope)) {
|
|
178
|
+
if (cursor[key] !== value) throw invalidCursor();
|
|
179
|
+
}
|
|
180
|
+
if (
|
|
181
|
+
typeof cursor.id !== 'string' ||
|
|
182
|
+
typeof cursor.value !== (sort === 'label' ? 'string' : 'number')
|
|
183
|
+
) {
|
|
184
|
+
throw invalidCursor();
|
|
185
|
+
}
|
|
186
|
+
after = { value: cursor.value!, id: cursor.id };
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
query: {
|
|
190
|
+
sort: sort as AutomationListSortKey,
|
|
191
|
+
direction,
|
|
192
|
+
...(enabledValue === '' ? {} : { enabled: enabledValue === 'true' }),
|
|
193
|
+
...(search === '' ? {} : { search }),
|
|
194
|
+
limit: page.limit,
|
|
195
|
+
after,
|
|
196
|
+
},
|
|
197
|
+
scope,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function listResponse<Item>(
|
|
202
|
+
page: {
|
|
203
|
+
readonly items: readonly Item[];
|
|
204
|
+
readonly next: AutomationListCursor | null;
|
|
205
|
+
},
|
|
206
|
+
request: ListRequest,
|
|
207
|
+
cursorSecret: Uint8Array,
|
|
208
|
+
): Response {
|
|
209
|
+
return pageResponse({
|
|
210
|
+
items: page.items,
|
|
211
|
+
limit: request.query.limit,
|
|
212
|
+
nextCursor: page.next
|
|
213
|
+
? encodeCursor(
|
|
214
|
+
{ ...request.scope, value: page.next.value, id: page.next.id },
|
|
215
|
+
cursorSecret,
|
|
216
|
+
)
|
|
217
|
+
: null,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
101
221
|
function triggerRejection(): Response {
|
|
102
222
|
return jsonResponse(
|
|
103
223
|
{
|
|
@@ -114,25 +234,48 @@ export function createAutomationsRoutes(
|
|
|
114
234
|
auth: AuthRuntime,
|
|
115
235
|
runtime: AutomationsRuntime,
|
|
116
236
|
) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
237
|
+
/* Module-owned and never stored: a cursor names a position in one
|
|
238
|
+
workspace's own list, so a restart invalidating one costs a client the
|
|
239
|
+
first page. */
|
|
240
|
+
const cursorSecret = randomBytes(32);
|
|
241
|
+
const options = defineEndpoint({
|
|
242
|
+
id: 'automations.options',
|
|
243
|
+
path: '/api/automations/options',
|
|
120
244
|
methods: ['GET'],
|
|
121
245
|
access: { kind: 'permission', permission: AUTOMATIONS_PERMISSIONS.read },
|
|
122
246
|
resolveIdentity: endpointIdentityFromContext,
|
|
123
247
|
handler: async ({ octane }) => {
|
|
124
248
|
const principal = principalFromContext(octane)!;
|
|
249
|
+
const schedules = await runtime.scheduleService();
|
|
125
250
|
return jsonResponse({
|
|
126
|
-
|
|
127
|
-
await runtime.scheduleService()
|
|
128
|
-
).list(principal.tenantId),
|
|
251
|
+
timeZone: schedules.timeZone(principal.tenantId),
|
|
129
252
|
variables: scheduleVariablesForScopes(principal.scopes),
|
|
130
|
-
agents: await (
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
)
|
|
253
|
+
agents: await schedules.agents(principal.tenantId),
|
|
254
|
+
targets: await schedules.targetOptions(
|
|
255
|
+
principal.tenantId,
|
|
256
|
+
userActor(principal),
|
|
257
|
+
principal.scopes,
|
|
258
|
+
),
|
|
259
|
+
});
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
/* The trigger form's half of the options, so a principal holding only the
|
|
263
|
+
trigger permissions still gets its targets. */
|
|
264
|
+
const triggerOptions = defineEndpoint({
|
|
265
|
+
id: 'automations.triggers.options',
|
|
266
|
+
path: '/api/automations/triggers/options',
|
|
267
|
+
methods: ['GET'],
|
|
268
|
+
access: {
|
|
269
|
+
kind: 'permission',
|
|
270
|
+
permission: AUTOMATIONS_PERMISSIONS.triggersRead,
|
|
271
|
+
},
|
|
272
|
+
resolveIdentity: endpointIdentityFromContext,
|
|
273
|
+
handler: async ({ octane }) => {
|
|
274
|
+
const principal = principalFromContext(octane)!;
|
|
275
|
+
const schedules = await runtime.scheduleService();
|
|
276
|
+
return jsonResponse({
|
|
277
|
+
agents: await schedules.agents(principal.tenantId),
|
|
278
|
+
targets: await schedules.targetOptions(
|
|
136
279
|
principal.tenantId,
|
|
137
280
|
userActor(principal),
|
|
138
281
|
principal.scopes,
|
|
@@ -140,6 +283,32 @@ export function createAutomationsRoutes(
|
|
|
140
283
|
});
|
|
141
284
|
},
|
|
142
285
|
});
|
|
286
|
+
const listSchedules = defineEndpoint({
|
|
287
|
+
id: 'automations.schedules.list',
|
|
288
|
+
path: '/api/automations/schedules',
|
|
289
|
+
methods: ['GET'],
|
|
290
|
+
access: { kind: 'permission', permission: AUTOMATIONS_PERMISSIONS.read },
|
|
291
|
+
resolveIdentity: endpointIdentityFromContext,
|
|
292
|
+
handler: async ({ octane }) => {
|
|
293
|
+
try {
|
|
294
|
+
const principal = principalFromContext(octane)!;
|
|
295
|
+
const request = listRequest(
|
|
296
|
+
new URL(octane.request.url),
|
|
297
|
+
principal.tenantId,
|
|
298
|
+
cursorSecret,
|
|
299
|
+
);
|
|
300
|
+
return listResponse(
|
|
301
|
+
await (
|
|
302
|
+
await runtime.scheduleService()
|
|
303
|
+
).list(principal.tenantId, request.query),
|
|
304
|
+
request,
|
|
305
|
+
cursorSecret,
|
|
306
|
+
);
|
|
307
|
+
} catch (error) {
|
|
308
|
+
return failure(error);
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
});
|
|
143
312
|
const createSchedule = defineEndpoint({
|
|
144
313
|
id: 'automations.schedules.create',
|
|
145
314
|
path: '/api/automations/schedules',
|
|
@@ -261,22 +430,23 @@ export function createAutomationsRoutes(
|
|
|
261
430
|
},
|
|
262
431
|
resolveIdentity: endpointIdentityFromContext,
|
|
263
432
|
handler: async ({ octane }) => {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
).list(principal.tenantId),
|
|
269
|
-
agents: await (
|
|
270
|
-
await runtime.scheduleService()
|
|
271
|
-
).agents(principal.tenantId),
|
|
272
|
-
targets: await (
|
|
273
|
-
await runtime.scheduleService()
|
|
274
|
-
).targetOptions(
|
|
433
|
+
try {
|
|
434
|
+
const principal = principalFromContext(octane)!;
|
|
435
|
+
const request = listRequest(
|
|
436
|
+
new URL(octane.request.url),
|
|
275
437
|
principal.tenantId,
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
438
|
+
cursorSecret,
|
|
439
|
+
);
|
|
440
|
+
return listResponse(
|
|
441
|
+
await (
|
|
442
|
+
await runtime.triggerService()
|
|
443
|
+
).list(principal.tenantId, request.query),
|
|
444
|
+
request,
|
|
445
|
+
cursorSecret,
|
|
446
|
+
);
|
|
447
|
+
} catch (error) {
|
|
448
|
+
return failure(error);
|
|
449
|
+
}
|
|
280
450
|
},
|
|
281
451
|
});
|
|
282
452
|
const createTrigger = defineEndpoint({
|
|
@@ -449,11 +619,13 @@ export function createAutomationsRoutes(
|
|
|
449
619
|
},
|
|
450
620
|
});
|
|
451
621
|
return [
|
|
622
|
+
options.serverRoute,
|
|
452
623
|
listSchedules.serverRoute,
|
|
453
624
|
createSchedule.serverRoute,
|
|
454
625
|
updateSchedule.serverRoute,
|
|
455
626
|
deleteSchedule.serverRoute,
|
|
456
627
|
runSchedule.serverRoute,
|
|
628
|
+
triggerOptions.serverRoute,
|
|
457
629
|
listTriggers.serverRoute,
|
|
458
630
|
createTrigger.serverRoute,
|
|
459
631
|
updateTrigger.serverRoute,
|
|
@@ -465,11 +637,13 @@ export function createAutomationsRoutes(
|
|
|
465
637
|
}
|
|
466
638
|
|
|
467
639
|
export const endpoints = [
|
|
640
|
+
'automations.options',
|
|
468
641
|
'automations.schedules.list',
|
|
469
642
|
'automations.schedules.create',
|
|
470
643
|
'automations.schedules.update',
|
|
471
644
|
'automations.schedules.delete',
|
|
472
645
|
'automations.schedules.run',
|
|
646
|
+
'automations.triggers.options',
|
|
473
647
|
'automations.triggers.list',
|
|
474
648
|
'automations.triggers.create',
|
|
475
649
|
'automations.triggers.update',
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"protocolVersion": 1,
|
|
3
|
+
"moduleId": "automations.core",
|
|
4
|
+
"commands": [
|
|
5
|
+
{
|
|
6
|
+
"path": ["automations", "secrets-rotate"],
|
|
7
|
+
"capability": {
|
|
8
|
+
"id": "automations.secrets.rotate",
|
|
9
|
+
"version": 1,
|
|
10
|
+
"summary": "Re-seal stored trigger secrets with the current encryption key.",
|
|
11
|
+
"risk": "process",
|
|
12
|
+
"requiresApprovedSpec": false,
|
|
13
|
+
"supportsDryRun": true
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|