@flowdular/sdk 0.2.3 → 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 +3 -2
- 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 +3 -2
- 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 +5 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +5 -2
- 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 +3 -2
- 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 +66 -7
- package/packages/client/package.json +2 -1
- 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/dev-console/package.json +2 -1
- package/packages/dev-console/src/brand.d.mts +8 -0
- package/packages/dev-console/src/brand.mjs +33 -0
- package/packages/dev-console/src/index.mjs +2 -1
- 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
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
schemaVersion: 2
|
|
2
|
+
id: connectors.core
|
|
3
|
+
specVersion: 0.1.5
|
|
4
|
+
status: approved
|
|
5
|
+
name: Connectors Core
|
|
6
|
+
description: Gives a workspace a governed way to call external systems through connector definitions a module or the platform ships, instances an owner configures with sealed credentials and a host allowlist, a test call, a call log without payloads, and an explicit per-instance consent that lets workflows and agents use the connector as an external action, with a generic HTTP JSON connector as the reference.
|
|
7
|
+
profile: full
|
|
8
|
+
capabilities:
|
|
9
|
+
- api
|
|
10
|
+
- database
|
|
11
|
+
- client
|
|
12
|
+
- translations
|
|
13
|
+
dependencies:
|
|
14
|
+
- id: system.core
|
|
15
|
+
range: ^0.7.0
|
|
16
|
+
- id: auth.core
|
|
17
|
+
range: ^0.13.0
|
|
18
|
+
tenancy: required
|
|
19
|
+
locales:
|
|
20
|
+
- en
|
|
21
|
+
- pl
|
|
22
|
+
invariants:
|
|
23
|
+
- Persistence runs on the shared asynchronous database contract with explicit PostgreSQL SQL; every tenant table enables and forces row-level security with USING and WITH CHECK policies bound to the transaction-local tenant id, and the runtime role holds neither SUPERUSER nor BYPASSRLS.
|
|
24
|
+
- A connector definition lives only in the code registry, never in a tenant table; it is registered through the public capability connectors.definitions.v1 at composition with a stable key, a label, the authentication kinds it supports (api-key, bearer, oauth2-client-credentials, none), its operations (key, label, method, path template, input schema, output schema) and its default host allowlist; the platform ships the generic HTTP JSON definition, and a module may ship its own.
|
|
25
|
+
- An instance is created by a member holding connectors.instances.manage for one definition, with a base URL, an authentication kind and its credentials sealed under the module keyring FD_CONNECTORS_SECRET_KEY and never returned after creation, a host allowlist that defaults to the base URL host and must contain it, and two consent flags, allowWorkflows and allowAgents, both off by default and switched on only with an explicit confirmation recorded in the audit trail.
|
|
26
|
+
- Every outbound call from an instance obeys the notifications egress policy (https only, private, loopback and link-local ranges refused at save and at call, no redirects, a bounded timeout and response size) and the instance host allowlist, and is recorded in the call log with the operation, the outcome class, the status, the duration and the byte counts, never the request or response body, never a credential.
|
|
27
|
+
- A workflow action or an agent tool that calls a connector is exposed only for an instance whose consent flag is on; the tool is declared with risk workspace-write and the harness consent gate connectors.instance-consent, which admits the call only when the instance consent for that caller kind is on at invocation time; it runs only within the instance host allowlist and is audited per call with the run identity; the CLI runner and the harness keep refusing external risk, so a connector call is never an unattended CLI capability.
|
|
28
|
+
- A test call from the instance screen runs one operation with a member-supplied input and returns the outcome class and status only; the response body is shown truncated to a bounded size for diagnosis and is not stored.
|
|
29
|
+
- Disabling an instance stops every call at once, including calls already queued by workflows; deleting an instance requires it to be disabled and removes its sealed credentials, and the call log stays until retention removes it.
|
|
30
|
+
- Every outbound request is pinned to the addresses the egress check accepted, so the connection resolves nothing again and a name that answers publicly for the check and privately a moment later cannot be reached. The host name, the Host header and the TLS server name are unchanged, and the same pinning covers the OAuth2 token exchange.
|
|
31
|
+
- A call is refused before the socket unless its target is https on a port the definition names, and a definition that names no port accepts 443 only. The same rule applies to the OAuth2 token URL, at save and at call.
|
|
32
|
+
- The credential fingerprint an owner compares is a keyed digest under this module's own key, bound to the tenant and the instance, so holding the column reveals neither the credential nor whether two workspaces hold the same one. A cached access token is keyed by that fingerprint, so a replaced client secret can never be served from the token the previous one obtained.
|
|
33
|
+
- A connector call an unattended caller makes carries a durable idempotency key. connectors.core claims the key in connectors_call_keys before anything leaves the process and binds it to the recorded call in the same transaction as the call log row, so a replayed run answers the first call, success or failure, instead of reaching the external system twice.
|
|
34
|
+
- The caller kind of a tool call is the invocation the runtime states, an agent run or a workflow action, and never the tool's own assumption or anything in the input. connectors.core answers an agent run with allowAgents and a workflow action with allowWorkflows, in the consent gate and again in the call capability, and records that kind as the caller of the call log row.
|
|
35
|
+
- The idempotency key is claimed only once the credential is resolved, the OAuth2 token exchange included, and is bound to the recorded call only once the request was written to the socket. A refused call, and a failure raised before that point, leave the key unbound for the retry that follows the fix. Two attempts that read the same abandoned claim are answered by a retake that compares the claim time it read, so only one of them owns the key.
|
|
36
|
+
- A template value names a resource and never carries path syntax. A value with a segment that is a single or double dot is refused before the request is built, in the escaped expansion and in the reserved one.
|
|
37
|
+
- The agent tool has no server route. The harness runs it in this process, and a route under connectors.instances.read that made the credentialed call and returned the parsed body would give every member the connector itself. The run identity comes from the trusted tool context and never from a request header.
|
|
38
|
+
- connectors.core declares three data classes to the platform catalogue. Calls carry a 400 day default retention, a sweep and an export; audit rows and instances are kept until a person deletes them and are exportable, with instances exported without anything of the credential but its fingerprint. The call sweep removes the idempotency keys claimed before the same cutoff, so no key is left naming a call that is gone.
|
|
39
|
+
permissions:
|
|
40
|
+
- id: connectors.instances.read
|
|
41
|
+
description: Read connector definitions, instances without credentials and the call log of the active workspace.
|
|
42
|
+
- id: connectors.instances.manage
|
|
43
|
+
description: Create, change, enable, disable, test, consent and delete connector instances in the active workspace.
|
|
44
|
+
dataOwnership:
|
|
45
|
+
- connectors.core owns the definition registry, instances, sealed credentials, its own audit trail of instance changes and consents, and the call log.
|
|
46
|
+
- workflows.core and agents.core own the runs that call a connector and record the call in their own trails by call identifier.
|
|
47
|
+
entities:
|
|
48
|
+
- id: definition
|
|
49
|
+
name: Connector definition
|
|
50
|
+
description: One registered connector kind as the workspace sees it. It is the read view of the code registry rather than a tenant table, so connectors.core stores no definition row and a workspace cannot add, change or remove one.
|
|
51
|
+
fields:
|
|
52
|
+
- id: key
|
|
53
|
+
type: string
|
|
54
|
+
required: true
|
|
55
|
+
unique: tenant
|
|
56
|
+
maxLength: 96
|
|
57
|
+
- id: moduleId
|
|
58
|
+
type: string
|
|
59
|
+
required: true
|
|
60
|
+
maxLength: 64
|
|
61
|
+
- id: label
|
|
62
|
+
type: string
|
|
63
|
+
required: true
|
|
64
|
+
maxLength: 120
|
|
65
|
+
- id: authKinds
|
|
66
|
+
type: json
|
|
67
|
+
required: true
|
|
68
|
+
- id: operations
|
|
69
|
+
type: json
|
|
70
|
+
required: true
|
|
71
|
+
- id: allowedPorts
|
|
72
|
+
type: json
|
|
73
|
+
required: false
|
|
74
|
+
description: Ports an instance of this definition may reach. Absent means 443 only, and a definition reaching a service on another port names every port it accepts.
|
|
75
|
+
- id: instance
|
|
76
|
+
name: Connector instance
|
|
77
|
+
description: A configured connection of one definition in the workspace.
|
|
78
|
+
fields:
|
|
79
|
+
- id: definition
|
|
80
|
+
type: reference
|
|
81
|
+
required: true
|
|
82
|
+
reference: definition
|
|
83
|
+
- id: name
|
|
84
|
+
type: string
|
|
85
|
+
required: true
|
|
86
|
+
unique: tenant
|
|
87
|
+
maxLength: 120
|
|
88
|
+
- id: baseUrl
|
|
89
|
+
type: string
|
|
90
|
+
required: true
|
|
91
|
+
maxLength: 2048
|
|
92
|
+
- id: authKind
|
|
93
|
+
type: enum
|
|
94
|
+
required: true
|
|
95
|
+
values:
|
|
96
|
+
- none
|
|
97
|
+
- api-key
|
|
98
|
+
- bearer
|
|
99
|
+
- oauth2-client-credentials
|
|
100
|
+
- id: credentialFingerprint
|
|
101
|
+
type: string
|
|
102
|
+
required: false
|
|
103
|
+
maxLength: 32
|
|
104
|
+
- id: allowedHosts
|
|
105
|
+
type: json
|
|
106
|
+
required: true
|
|
107
|
+
- id: allowWorkflows
|
|
108
|
+
type: boolean
|
|
109
|
+
required: true
|
|
110
|
+
- id: allowAgents
|
|
111
|
+
type: boolean
|
|
112
|
+
required: true
|
|
113
|
+
- id: status
|
|
114
|
+
type: enum
|
|
115
|
+
required: true
|
|
116
|
+
values:
|
|
117
|
+
- active
|
|
118
|
+
- disabled
|
|
119
|
+
- id: lastCallAt
|
|
120
|
+
type: datetime
|
|
121
|
+
required: false
|
|
122
|
+
states:
|
|
123
|
+
field: status
|
|
124
|
+
values:
|
|
125
|
+
- active
|
|
126
|
+
- disabled
|
|
127
|
+
transitions:
|
|
128
|
+
- from: active
|
|
129
|
+
to: disabled
|
|
130
|
+
permission: connectors.instances.manage
|
|
131
|
+
- from: disabled
|
|
132
|
+
to: active
|
|
133
|
+
permission: connectors.instances.manage
|
|
134
|
+
- id: audit-entry
|
|
135
|
+
name: Connector audit entry
|
|
136
|
+
description: One instance change or consent decision, written in the same transaction as the change.
|
|
137
|
+
fields:
|
|
138
|
+
- id: instance
|
|
139
|
+
type: reference
|
|
140
|
+
required: true
|
|
141
|
+
reference: instance
|
|
142
|
+
- id: action
|
|
143
|
+
type: string
|
|
144
|
+
required: true
|
|
145
|
+
maxLength: 64
|
|
146
|
+
- id: actorAccountId
|
|
147
|
+
type: string
|
|
148
|
+
required: true
|
|
149
|
+
maxLength: 128
|
|
150
|
+
- id: occurredAt
|
|
151
|
+
type: datetime
|
|
152
|
+
required: true
|
|
153
|
+
- id: call
|
|
154
|
+
name: Connector call
|
|
155
|
+
description: One outbound call as recorded.
|
|
156
|
+
fields:
|
|
157
|
+
- id: instance
|
|
158
|
+
type: reference
|
|
159
|
+
required: true
|
|
160
|
+
reference: instance
|
|
161
|
+
- id: operation
|
|
162
|
+
type: string
|
|
163
|
+
required: true
|
|
164
|
+
maxLength: 64
|
|
165
|
+
- id: caller
|
|
166
|
+
type: enum
|
|
167
|
+
required: true
|
|
168
|
+
values:
|
|
169
|
+
- test
|
|
170
|
+
- workflow
|
|
171
|
+
- agent
|
|
172
|
+
- id: callerRef
|
|
173
|
+
type: string
|
|
174
|
+
required: false
|
|
175
|
+
maxLength: 200
|
|
176
|
+
- id: outcome
|
|
177
|
+
type: enum
|
|
178
|
+
required: true
|
|
179
|
+
values:
|
|
180
|
+
- succeeded
|
|
181
|
+
- failed
|
|
182
|
+
- refused
|
|
183
|
+
- id: status
|
|
184
|
+
type: integer
|
|
185
|
+
required: false
|
|
186
|
+
- id: errorClass
|
|
187
|
+
type: string
|
|
188
|
+
required: false
|
|
189
|
+
maxLength: 64
|
|
190
|
+
- id: durationMs
|
|
191
|
+
type: integer
|
|
192
|
+
required: true
|
|
193
|
+
- id: requestBytes
|
|
194
|
+
type: integer
|
|
195
|
+
required: true
|
|
196
|
+
- id: responseBytes
|
|
197
|
+
type: integer
|
|
198
|
+
required: true
|
|
199
|
+
- id: occurredAt
|
|
200
|
+
type: datetime
|
|
201
|
+
required: true
|
|
202
|
+
- id: call-key
|
|
203
|
+
name: Connector call idempotency key
|
|
204
|
+
description: One durable key bound to one call, claimed before anything leaves the process so a replayed unattended caller writes at most once. Swept with the call log.
|
|
205
|
+
fields:
|
|
206
|
+
- id: idempotencyKey
|
|
207
|
+
type: string
|
|
208
|
+
required: true
|
|
209
|
+
unique: tenant
|
|
210
|
+
maxLength: 128
|
|
211
|
+
- id: operationId
|
|
212
|
+
type: string
|
|
213
|
+
required: true
|
|
214
|
+
maxLength: 200
|
|
215
|
+
- id: inputDigest
|
|
216
|
+
type: string
|
|
217
|
+
required: true
|
|
218
|
+
maxLength: 64
|
|
219
|
+
- id: call
|
|
220
|
+
type: reference
|
|
221
|
+
required: false
|
|
222
|
+
reference: call
|
|
223
|
+
- id: claimedAt
|
|
224
|
+
type: datetime
|
|
225
|
+
required: true
|
|
226
|
+
- id: completedAt
|
|
227
|
+
type: datetime
|
|
228
|
+
required: false
|
|
229
|
+
screens:
|
|
230
|
+
- id: instances
|
|
231
|
+
kind: list
|
|
232
|
+
entity: instance
|
|
233
|
+
title: Connectors
|
|
234
|
+
columns:
|
|
235
|
+
- name
|
|
236
|
+
- definition
|
|
237
|
+
- baseUrl
|
|
238
|
+
- authKind
|
|
239
|
+
- status
|
|
240
|
+
- allowWorkflows
|
|
241
|
+
- allowAgents
|
|
242
|
+
- lastCallAt
|
|
243
|
+
filters:
|
|
244
|
+
- status
|
|
245
|
+
- definition
|
|
246
|
+
navigationGroup: Administration
|
|
247
|
+
- id: instance
|
|
248
|
+
kind: record
|
|
249
|
+
entity: instance
|
|
250
|
+
title: Connector
|
|
251
|
+
columns:
|
|
252
|
+
- name
|
|
253
|
+
- definition
|
|
254
|
+
- baseUrl
|
|
255
|
+
- authKind
|
|
256
|
+
- credentialFingerprint
|
|
257
|
+
- allowedHosts
|
|
258
|
+
- allowWorkflows
|
|
259
|
+
- allowAgents
|
|
260
|
+
- status
|
|
261
|
+
navigationGroup: Administration
|
|
262
|
+
- id: calls
|
|
263
|
+
kind: list
|
|
264
|
+
entity: call
|
|
265
|
+
title: Connector calls
|
|
266
|
+
columns:
|
|
267
|
+
- occurredAt
|
|
268
|
+
- instance
|
|
269
|
+
- operation
|
|
270
|
+
- caller
|
|
271
|
+
- outcome
|
|
272
|
+
- status
|
|
273
|
+
- errorClass
|
|
274
|
+
- durationMs
|
|
275
|
+
filters:
|
|
276
|
+
- outcome
|
|
277
|
+
- instance
|
|
278
|
+
navigationGroup: Administration
|
|
279
|
+
actions:
|
|
280
|
+
- id: create-instance
|
|
281
|
+
entity: instance
|
|
282
|
+
permission: connectors.instances.manage
|
|
283
|
+
kind: create
|
|
284
|
+
risk: workspace-write
|
|
285
|
+
idempotent: false
|
|
286
|
+
description: Create an active instance with credentials accepted once and sealed; the base URL is validated against the egress policy and the definition's host allowlist.
|
|
287
|
+
- id: update-instance
|
|
288
|
+
entity: instance
|
|
289
|
+
permission: connectors.instances.manage
|
|
290
|
+
kind: update
|
|
291
|
+
risk: workspace-write
|
|
292
|
+
idempotent: true
|
|
293
|
+
description: Change name, base URL, allowed hosts or credentials; a changed URL is validated again.
|
|
294
|
+
- id: consent
|
|
295
|
+
entity: instance
|
|
296
|
+
permission: connectors.instances.manage
|
|
297
|
+
kind: custom
|
|
298
|
+
risk: workspace-write
|
|
299
|
+
idempotent: true
|
|
300
|
+
description: Turn allowWorkflows or allowAgents on or off with an explicit confirmation, recorded in the audit trail.
|
|
301
|
+
- id: test-call
|
|
302
|
+
entity: instance
|
|
303
|
+
permission: connectors.instances.manage
|
|
304
|
+
kind: custom
|
|
305
|
+
risk: workspace-write
|
|
306
|
+
idempotent: false
|
|
307
|
+
description: Run one operation with a supplied input and return the outcome class, status and a truncated body for diagnosis.
|
|
308
|
+
- id: disable-instance
|
|
309
|
+
entity: instance
|
|
310
|
+
permission: connectors.instances.manage
|
|
311
|
+
kind: custom
|
|
312
|
+
risk: workspace-write
|
|
313
|
+
idempotent: true
|
|
314
|
+
description: Stop every call at once.
|
|
315
|
+
- id: enable-instance
|
|
316
|
+
entity: instance
|
|
317
|
+
permission: connectors.instances.manage
|
|
318
|
+
kind: custom
|
|
319
|
+
risk: workspace-write
|
|
320
|
+
idempotent: true
|
|
321
|
+
description: Allow calls again.
|
|
322
|
+
- id: delete-instance
|
|
323
|
+
entity: instance
|
|
324
|
+
permission: connectors.instances.manage
|
|
325
|
+
kind: delete
|
|
326
|
+
risk: destructive
|
|
327
|
+
idempotent: true
|
|
328
|
+
description: Delete a disabled instance and its sealed credentials; the call log stays.
|
|
329
|
+
widgets: []
|
|
330
|
+
settings:
|
|
331
|
+
- key: callTimeoutMs
|
|
332
|
+
type: integer
|
|
333
|
+
scope: platform
|
|
334
|
+
default: 10000
|
|
335
|
+
description: Timeout per connector call; 1000 to 60000.
|
|
336
|
+
- key: maxResponseBytes
|
|
337
|
+
type: integer
|
|
338
|
+
scope: platform
|
|
339
|
+
default: 1048576
|
|
340
|
+
description: Response size cap per call; 1024 to 16777216.
|
|
341
|
+
agentTools:
|
|
342
|
+
- id: connectors.call
|
|
343
|
+
permission: connectors.instances.read
|
|
344
|
+
description: Call an operation of a consented instance; exposed to an agent only for instances with allowAgents on, declared with risk workspace-write and admitted per call by the connectors.instance-consent gate, within the instance host allowlist and the definition port list. It declares contractVersion, an output schema, idempotency required with target-ledger protection and cooperative cancellation, so agents.core also publishes it as a workflow action. It has no server route, because the harness runs it in this process.
|
|
345
|
+
risk: workspace-write
|
|
346
|
+
outOfScope:
|
|
347
|
+
- OAuth2 authorization-code flows with a person in the loop are not offered; client credentials only.
|
|
348
|
+
- Inbound calls from external systems are the automations webhook triggers, not connectors.
|
|
349
|
+
- Rate limiting per external system beyond the platform timeout and size caps is the definition's concern later.
|
|
350
|
+
decisions:
|
|
351
|
+
- id: D-CONNECTORS-SCOPE
|
|
352
|
+
question: What is the first version?
|
|
353
|
+
answer: The definition contract and registry, owner-configured instances with sealed credentials and host allowlists, test calls, a call log without payloads, workflow actions and agent tools behind per-instance consent, and the generic HTTP JSON connector as the reference.
|
|
354
|
+
decidedBy: user
|
|
355
|
+
- id: D-CONNECTORS-EGRESS
|
|
356
|
+
question: How is the external risk ceiling raised?
|
|
357
|
+
answer: Only per instance with the owner's explicit consent, within the instance host allowlist, audited per call; the CLI runner still refuses external.
|
|
358
|
+
decidedBy: user
|
|
359
|
+
- id: D-CONNECTORS-TOOL-RISK
|
|
360
|
+
question: How is the agent tool declared given that the harness refuses external?
|
|
361
|
+
answer: The tool is declared with risk workspace-write on this module's surface and the harness is extended to admit it only when the instance consent is on, so the ceiling is raised by consent, not by a declaration a spec could copy.
|
|
362
|
+
decidedBy: default
|
|
363
|
+
- id: D-CONNECTORS-RETENTION
|
|
364
|
+
question: Who owns the retention of the call log, and for how long?
|
|
365
|
+
answer: connectors.core owns it and declares the data classes itself. Calls carry a 400 day default and are swept and exportable; audit rows and instances are kept until a person deletes them and are exportable, with instances exported without a credential. 400 days covers a financial year and the audit that follows it. The sweep removes the idempotency keys claimed before the same cutoff with the calls.
|
|
366
|
+
decidedBy: default
|
|
367
|
+
- id: D-CONNECTORS-PORTS
|
|
368
|
+
question: Which ports may an instance reach?
|
|
369
|
+
answer: 443 only, unless its definition names more through allowedPorts. A public address answering on an unnamed port is a different service from the one the definition was written for, so the port is part of the definition's contract rather than something an instance may choose.
|
|
370
|
+
decidedBy: default
|
|
371
|
+
- id: D-CONNECTORS-AGENT-ROUTE
|
|
372
|
+
question: Does the agent tool need a server route?
|
|
373
|
+
answer: No. The harness runs the tool in process, so a route would only add a second way in, under the read permission every member holds, that makes a credentialed outbound call and hands back the parsed body. The endpoint id stays as the tool's identity and nothing serves it.
|
|
374
|
+
decidedBy: default
|
|
375
|
+
- id: D-CONNECTORS-PERMISSIONS
|
|
376
|
+
question: Who manages connectors?
|
|
377
|
+
answer: Owners hold connectors.instances.read and manage; members hold read.
|
|
378
|
+
decidedBy: default
|
|
379
|
+
acceptanceScenarios:
|
|
380
|
+
- id: CONNECTORS-INSTANCE-CRUD
|
|
381
|
+
given: A principal holding connectors.instances.manage supplies a unique name, an https base URL on a public host, an api-key credential and an allowed host list.
|
|
382
|
+
when: The instance is created, updated, disabled, enabled and deleted after disabling.
|
|
383
|
+
then: Each accepted transition is persisted under the workspace's forced policy, the credential is never readable after creation and only its fingerprint changes on update, deleting an active instance is refused, and a member without the permission is refused before repository access.
|
|
384
|
+
- id: CONNECTORS-EGRESS
|
|
385
|
+
given: A base URL with an http scheme, a loopback or private address, a host that resolves to one, or a host outside the instance allowlist.
|
|
386
|
+
when: The instance is created or a call is made.
|
|
387
|
+
then: The save is refused with a stable error before any write, and a call is refused with outcome refused and errorClass egress-refused before any request leaves.
|
|
388
|
+
- id: CONNECTORS-TEST-CALL
|
|
389
|
+
given: An active instance pointing at a test server.
|
|
390
|
+
when: The owner runs a test call of an operation.
|
|
391
|
+
then: The request carries the sealed credential in the definition's authentication form, obeys the timeout and size caps, and the response shows outcome, status and a truncated body while the call log stores no body.
|
|
392
|
+
- id: CONNECTORS-CONSENT
|
|
393
|
+
given: An instance with both consent flags off.
|
|
394
|
+
when: A workflow action and an agent tool try to call it, then the owner consents to workflows only and both try again.
|
|
395
|
+
then: Both are refused before any request at first; after consent the workflow call succeeds and is audited with the run identity, the agent call is still refused, and each consent change is an audit row.
|
|
396
|
+
- id: CONNECTORS-DISABLE
|
|
397
|
+
given: An active instance with a queued workflow call.
|
|
398
|
+
when: The owner disables the instance.
|
|
399
|
+
then: The queued call fails with a stable code without any request leaving and later calls are refused until the instance is enabled.
|
|
400
|
+
- id: CONNECTORS-DENY
|
|
401
|
+
given: A principal is unauthenticated or lacks the required permission.
|
|
402
|
+
when: The principal reads or mutates instances or runs a test call.
|
|
403
|
+
then: The server denies the operation before repository access, and a mutation without a CSRF proof is refused first.
|
|
404
|
+
- id: CONNECTORS-PINNED-EGRESS
|
|
405
|
+
given: A host that answers the egress check with a public address and every later resolution with a private one, and an instance whose base URL is http or on a port the definition does not name.
|
|
406
|
+
when: A call is made.
|
|
407
|
+
then: The call reaches the address the check accepted and never the later one, with the Host header unchanged, and the http or unnamed-port target is refused with outcome refused and errorClass egress-refused before any socket is opened.
|
|
408
|
+
- id: CONNECTORS-CALL-IDEMPOTENCY
|
|
409
|
+
given: An instance consented to agents and an unattended caller holding one durable idempotency key.
|
|
410
|
+
when: The caller makes the same call twice under that key, and once more under the key with a different operation.
|
|
411
|
+
then: The external system is reached once, the repeat answers the recorded call with replayed set and no body, a recorded failure is replayed the same way, and the key bound to another operation or input is refused with a stable conflict.
|
|
412
|
+
- id: CONNECTORS-CONSENT-PER-CALLER
|
|
413
|
+
given: An instance with allowWorkflows on and allowAgents off.
|
|
414
|
+
when: The owner confirms a change to the workflow consent from the instance screen.
|
|
415
|
+
then: Only the workflow flag moves, the agent flag stays off, and the confirmation names the caller kind and the value it is about to write.
|
|
416
|
+
- id: CONNECTORS-TOOL-CALLER-KIND
|
|
417
|
+
given: One instance with allowWorkflows on and allowAgents off, and one with the mirror state.
|
|
418
|
+
when: A workflow action and an agent run call each of them through the registered tool.
|
|
419
|
+
then: The workflow action is admitted only by the instance with allowWorkflows and its call log row carries caller workflow, the agent run is admitted only by the instance with allowAgents, and every other combination is refused by the gate and again by the call capability.
|
|
420
|
+
- id: CONNECTORS-KEY-BINDING
|
|
421
|
+
given: An instance whose OAuth2 token endpoint refuses the first exchange, and an instance whose host accepts no connection.
|
|
422
|
+
when: An unattended caller makes the call under one durable key and retries under the same key.
|
|
423
|
+
then: Neither the refused token exchange nor the failure raised before the request was written binds the key, and the retry makes the call instead of replaying an answer the external system never gave.
|
|
424
|
+
- id: CONNECTORS-KEY-RETAKE-RACE
|
|
425
|
+
given: An idempotency key whose claim was abandoned past the claim window and two attempts that read it at the same moment.
|
|
426
|
+
when: Both try to take the claim over.
|
|
427
|
+
then: Exactly one is answered claimed and makes the call, the other is answered in flight, and the ledger holds the claim time of the one that won.
|
|
428
|
+
- id: CONNECTORS-PATH-SEGMENT
|
|
429
|
+
given: An operation whose path template expands a caller value as one escaped segment, and one that expands it as a whole path.
|
|
430
|
+
when: The value is a single or double dot segment.
|
|
431
|
+
then: The call is refused with outcome refused and errorClass invalid-input before any request is built, while a value that merely contains dots is expanded unchanged.
|
|
432
|
+
- id: CONNECTORS-RETENTION
|
|
433
|
+
given: Two workspaces with calls, audit rows and instances, some older than the retention period.
|
|
434
|
+
when: The platform sweeps and exports the connectors data classes for one workspace.
|
|
435
|
+
then: Only that workspace's calls older than the cutoff are removed together with the idempotency keys claimed before it, the other workspace keeps its rows, and the export carries calls, audit rows and instances without any credential and without any request or response body.
|
|
436
|
+
- id: CONNECTORS-INSTANCES-PAGING
|
|
437
|
+
given: A workspace with more instances than one page holds, narrowed by a status, definition or search filter.
|
|
438
|
+
when: A reader opens the connectors screen and walks its pages forward and back.
|
|
439
|
+
then: Each page carries at most 200 instances (50 by default) in name order, ascending or descending, and the next page opens from an opaque cursor bound to the workspace, the sort and the filters, so a cursor from another workspace, another sort or other filters is refused with a stable error.
|
|
440
|
+
- id: CONNECTORS-CALLS-PAGING
|
|
441
|
+
given: A workspace with more logged calls than one page holds, narrowed by an instance, outcome or operation filter.
|
|
442
|
+
when: A reader opens the call log and walks its pages forward and back.
|
|
443
|
+
then: Each page carries at most 200 calls (50 by default) in occurredAt order, descending or ascending, and the next page opens from an opaque cursor bound to the workspace, the sort and the filters, so a cursor from another workspace, another sort or other filters is refused with a stable error.
|
|
444
|
+
- id: CONNECTORS-TENANT-BOUNDARY
|
|
445
|
+
given: Two workspaces with instances and calls.
|
|
446
|
+
when: A runtime transaction bound to one workspace reads or writes any of them.
|
|
447
|
+
then: Only that workspace's rows are visible or mutable and a row carrying another tenant identifier is rejected by the forced policy.
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { defineApiAgentTool } from '@flowdular/sdk/harness/tool-adapters';
|
|
2
|
+
import type {
|
|
3
|
+
AgentTool,
|
|
4
|
+
AgentToolConsentDecision,
|
|
5
|
+
AgentToolContext,
|
|
6
|
+
} from '@flowdular/sdk/harness/runtime';
|
|
7
|
+
import { CONNECTORS_PERMISSIONS } from '../acl/permissions.ts';
|
|
8
|
+
import type { ConnectorCaller } from '../domain/types.ts';
|
|
9
|
+
import type { ConnectorsRuntime } from '../server/runtime.ts';
|
|
10
|
+
import { ConnectorsServiceError } from '../services/service-error.ts';
|
|
11
|
+
|
|
12
|
+
/** Characters of a response body one tool call hands back to the model. */
|
|
13
|
+
export const MAX_TOOL_BODY_CHARACTERS = 16_384;
|
|
14
|
+
|
|
15
|
+
export const CONNECTORS_TOOL_CONSENT_ID = 'connectors.instance-consent';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The identity the tool is published under. There is no server route behind it:
|
|
19
|
+
* the harness runs `execute` in this process, and a credentialed egress route
|
|
20
|
+
* under the read permission would have handed every member the call itself.
|
|
21
|
+
*/
|
|
22
|
+
export const CONNECTORS_CALL_TOOL_TARGET = 'connectors.calls.agent';
|
|
23
|
+
|
|
24
|
+
function instanceId(input: unknown): string | null {
|
|
25
|
+
const value = (input ?? {}) as Record<string, unknown>;
|
|
26
|
+
return typeof value.instanceId === 'string' && value.instanceId.length > 0
|
|
27
|
+
? value.instanceId
|
|
28
|
+
: null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Which consent flag of the instance admits this call. The invocation kind is
|
|
33
|
+
* the caller's own statement, so a workflow node is answered by allowWorkflows
|
|
34
|
+
* and a model turn by allowAgents; an absent kind is an agent run, because the
|
|
35
|
+
* workflow action runtime always states it.
|
|
36
|
+
*/
|
|
37
|
+
function callerOf(context: AgentToolContext): ConnectorCaller {
|
|
38
|
+
return context.invocation === 'workflow-action' ? 'workflow' : 'agent';
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Raises this tool's ceiling per instance instead of per declaration: the call
|
|
43
|
+
* is admitted only while the workspace owner keeps the consent flag of this
|
|
44
|
+
* caller kind on for the instance named, and the call capability enforces the
|
|
45
|
+
* same flag again before anything leaves the process.
|
|
46
|
+
*/
|
|
47
|
+
function consentGate(runtime: ConnectorsRuntime) {
|
|
48
|
+
return {
|
|
49
|
+
id: CONNECTORS_TOOL_CONSENT_ID,
|
|
50
|
+
async check(
|
|
51
|
+
input: unknown,
|
|
52
|
+
context: AgentToolContext,
|
|
53
|
+
): Promise<AgentToolConsentDecision> {
|
|
54
|
+
const id = instanceId(input);
|
|
55
|
+
if (!id) {
|
|
56
|
+
return { granted: false, reason: 'CONNECTOR_INSTANCE_UNKNOWN' };
|
|
57
|
+
}
|
|
58
|
+
const calls = await runtime.calls();
|
|
59
|
+
return (await calls.consented(context.tenantId, id, callerOf(context)))
|
|
60
|
+
? { granted: true }
|
|
61
|
+
: { granted: false, reason: 'CONNECTOR_CONSENT_MISSING' };
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The whole contract a workflow action needs on top of an agent tool: a
|
|
68
|
+
* version, an output schema, a required key backed by the call ledger, and a
|
|
69
|
+
* cancellation answer. Without every one of them agents.core declines to
|
|
70
|
+
* publish the tool as an action, which would leave the workflow consent flag
|
|
71
|
+
* unreachable however the workspace set it.
|
|
72
|
+
*/
|
|
73
|
+
export const CONNECTORS_CALL_CONTRACT_VERSION = 1;
|
|
74
|
+
|
|
75
|
+
const CALL_OUTPUT_SCHEMA = {
|
|
76
|
+
type: 'object',
|
|
77
|
+
additionalProperties: false,
|
|
78
|
+
required: [
|
|
79
|
+
'callId',
|
|
80
|
+
'outcome',
|
|
81
|
+
'status',
|
|
82
|
+
'errorClass',
|
|
83
|
+
'durationMs',
|
|
84
|
+
'responseBytes',
|
|
85
|
+
'bodyOmitted',
|
|
86
|
+
'replayed',
|
|
87
|
+
'body',
|
|
88
|
+
],
|
|
89
|
+
properties: {
|
|
90
|
+
callId: { type: 'string' },
|
|
91
|
+
outcome: { type: 'string', enum: ['succeeded', 'failed'] },
|
|
92
|
+
status: { type: ['integer', 'null'] },
|
|
93
|
+
errorClass: { type: ['string', 'null'] },
|
|
94
|
+
durationMs: { type: 'integer' },
|
|
95
|
+
responseBytes: { type: 'integer' },
|
|
96
|
+
bodyOmitted: { type: 'boolean' },
|
|
97
|
+
replayed: { type: 'boolean' },
|
|
98
|
+
body: {},
|
|
99
|
+
},
|
|
100
|
+
} as const;
|
|
101
|
+
|
|
102
|
+
export function connectorsAgentTools(
|
|
103
|
+
runtime: ConnectorsRuntime,
|
|
104
|
+
): readonly AgentTool[] {
|
|
105
|
+
return [
|
|
106
|
+
defineApiAgentTool({
|
|
107
|
+
id: 'connectors.call',
|
|
108
|
+
endpointId: CONNECTORS_CALL_TOOL_TARGET,
|
|
109
|
+
contractVersion: CONNECTORS_CALL_CONTRACT_VERSION,
|
|
110
|
+
description:
|
|
111
|
+
'Call one operation of a connector instance the workspace has consented to for agents.',
|
|
112
|
+
requiredPermissions: [CONNECTORS_PERMISSIONS.read],
|
|
113
|
+
risk: 'workspace-write',
|
|
114
|
+
idempotency: 'required',
|
|
115
|
+
/* connectors_call_keys binds the key to one call before anything
|
|
116
|
+
leaves the process and answers that call on a repeat. */
|
|
117
|
+
idempotencyProtection: 'target-ledger',
|
|
118
|
+
cancellation: 'cooperative',
|
|
119
|
+
consent: consentGate(runtime),
|
|
120
|
+
inputSchema: {
|
|
121
|
+
type: 'object',
|
|
122
|
+
additionalProperties: false,
|
|
123
|
+
required: ['instanceId', 'operation'],
|
|
124
|
+
properties: {
|
|
125
|
+
instanceId: { type: 'string' },
|
|
126
|
+
operation: { type: 'string' },
|
|
127
|
+
input: { type: 'object' },
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
outputSchema: CALL_OUTPUT_SCHEMA,
|
|
131
|
+
execute: async (input, context) => {
|
|
132
|
+
const value = (input ?? {}) as Record<string, unknown>;
|
|
133
|
+
if (!context.idempotencyKey) {
|
|
134
|
+
throw new ConnectorsServiceError(
|
|
135
|
+
'CONNECTOR_IDEMPOTENCY_KEY_REQUIRED',
|
|
136
|
+
'A connector call requires a durable idempotency key.',
|
|
137
|
+
409,
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
const calls = await runtime.calls();
|
|
141
|
+
const result = await calls.call({
|
|
142
|
+
/* Tenant and run identity come from the run, never from input. */
|
|
143
|
+
tenantId: context.tenantId,
|
|
144
|
+
instanceId: String(value.instanceId ?? ''),
|
|
145
|
+
operation: String(value.operation ?? ''),
|
|
146
|
+
input:
|
|
147
|
+
value.input && typeof value.input === 'object'
|
|
148
|
+
? (value.input as Record<string, unknown>)
|
|
149
|
+
: {},
|
|
150
|
+
caller: callerOf(context),
|
|
151
|
+
callerRef: context.runId,
|
|
152
|
+
idempotencyKey: context.idempotencyKey,
|
|
153
|
+
signal: context.signal,
|
|
154
|
+
});
|
|
155
|
+
if (result.outcome === 'refused') {
|
|
156
|
+
throw new ConnectorsServiceError(
|
|
157
|
+
'CONNECTOR_CALL_REFUSED',
|
|
158
|
+
`The connector call was refused: ${result.errorClass}.`,
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
const serialized =
|
|
162
|
+
result.body === null ? '' : JSON.stringify(result.body);
|
|
163
|
+
const omitted = serialized.length > MAX_TOOL_BODY_CHARACTERS;
|
|
164
|
+
return {
|
|
165
|
+
callId: result.callId,
|
|
166
|
+
outcome: result.outcome,
|
|
167
|
+
status: result.status,
|
|
168
|
+
errorClass: result.errorClass,
|
|
169
|
+
durationMs: result.durationMs,
|
|
170
|
+
responseBytes: result.responseBytes,
|
|
171
|
+
/* A body too large for one run window is dropped whole rather than
|
|
172
|
+
handed to the model as truncated JSON. */
|
|
173
|
+
bodyOmitted: omitted,
|
|
174
|
+
replayed: result.replayed,
|
|
175
|
+
body: omitted ? null : result.body,
|
|
176
|
+
};
|
|
177
|
+
},
|
|
178
|
+
}),
|
|
179
|
+
];
|
|
180
|
+
}
|