@wildo-ai/saas-models 1.1.2 → 1.1.4
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/dist/esm/__tests__/setup.d.ts.map +1 -1
- package/dist/esm/_inspect.d.ts.map +1 -1
- package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications-context.schemas.d.ts +14 -10
- package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.resources-config.schemas.js +4 -3
- package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +0 -4
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.js +59 -17
- package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts +77 -21
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js +85 -23
- package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.d.ts +4 -3
- package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.js +45 -0
- package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.schemas.js +7 -1
- package/dist/esm/billing/price.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js +52 -11
- package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.d.ts +2 -2
- package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +2 -2
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.d.ts +2 -2
- package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.schemas.js +7 -3
- package/dist/esm/billing/product.shared.schemas.js.map +1 -1
- package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js +15 -1
- package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.d.ts +7 -3
- package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.js +22 -3
- package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
- package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
- package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +71 -2
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js +20 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
- package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +85 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +157 -0
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +23 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +56 -0
- package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +658 -26
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +873 -27
- package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +104 -3
- package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +54 -26
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +132 -3
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +17 -0
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js +27 -4
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts +82 -29
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js +95 -29
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js +12 -5
- package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +21 -0
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.js +20 -0
- package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +7 -5
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +8 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
- package/dist/esm/config/auth-config-resolution.shared.utils.js +29 -0
- package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
- package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +95 -17
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.js +86 -8
- package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +26 -26
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts +139 -3
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js +151 -4
- package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
- package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
- package/dist/esm/config-authoring.entry.d.ts.map +1 -1
- package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +34 -0
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +34 -0
- package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
- package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +45 -12
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
- package/dist/esm/external-data.exports.d.ts.map +1 -1
- package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +110 -58
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +183 -15
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +15 -3
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +32 -5
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
- package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +87 -7
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +59 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +61 -0
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts +97 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js +41 -0
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -0
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +205 -2
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +85 -1
- package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +175 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js +207 -0
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -0
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +5 -28
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-capability.shared.schemas.js +4 -2
- package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +28 -8
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +15 -4
- package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts +165 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js +39 -0
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +338 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +332 -0
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -0
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +178 -9
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js +181 -9
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +7 -5
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js +7 -5
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts +40 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js +80 -0
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -0
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/features/application-features.shared.resources-config.schemas.js +12 -0
- package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
- package/dist/esm/features/core-feature-definitions.shared.js +7 -1
- package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
- package/dist/esm/features/feature-builders.shared.d.ts +32 -0
- package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-builders.shared.js +32 -0
- package/dist/esm/features/feature-builders.shared.js.map +1 -1
- package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/features/user-features.shared.resources-config.schemas.js +12 -0
- package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts +73 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js +62 -0
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -0
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts +14 -2
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/file-upload-grant.shared.schemas.js +44 -5
- package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.schemas.d.ts +15 -8
- package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/files.shared.schemas.js +15 -8
- package/dist/esm/files/files.shared.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/actors.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts +54 -5
- package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +0 -3
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.js +0 -5
- package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +14 -0
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +40 -3
- package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +19 -0
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +33 -0
- package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts +14 -9
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +14 -9
- package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/flows.shared.schemas.js +3 -2
- package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +130 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +153 -0
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -0
- package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -3
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +1 -4
- package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts +0 -16
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js +1 -17
- package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +3 -3
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js +3 -3
- package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +2 -8
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +4 -15
- package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +112 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +113 -0
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -0
- package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.utils.js +1 -0
- package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
- package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +8 -0
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts +46 -0
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.js +49 -0
- package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +320 -50
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +137 -36
- package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
- package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
- package/dist/esm/index.d.ts +15 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
- package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +11 -2
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts +15 -0
- package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.js +15 -0
- package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +19 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +30 -0
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +65 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts +6 -4
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.js +6 -4
- package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.d.ts +167 -5
- package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.js +191 -6
- package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.d.ts +158 -0
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js +200 -1
- package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +13 -0
- package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js +22 -1
- package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +26 -0
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.js +25 -0
- package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +25 -0
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.js +42 -17
- package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +3 -2
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.js +9 -2
- package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
- package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +18 -3
- package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +13 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +13 -0
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
- package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.d.ts +71 -2
- package/dist/esm/public-runtime/index.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.js +62 -1
- package/dist/esm/public-runtime/index.js.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +6 -5
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js +6 -5
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts +16 -3
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.js +16 -3
- package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts +137 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.js +1255 -0
- package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts +114 -0
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.js +129 -0
- package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts +11 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js +11 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.d.ts +28 -3
- package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.js +52 -0
- package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
- package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.d.ts +1 -0
- package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.js +203 -25
- package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.d.ts +297 -68
- package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources-registry.shared.core.definitions.js +151 -5
- package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-relationships.shared.factory.js +15 -0
- package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
- package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.d.ts +54 -0
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.js +69 -0
- package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.d.ts +11 -2
- package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.js +34 -3
- package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources.shared.utils.d.ts +32 -7
- package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.utils.js +32 -7
- package/dist/esm/resources/resources.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts +51 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.js +53 -0
- package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -0
- package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.d.ts +16 -2
- package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.js +19 -5
- package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js +11 -0
- package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
- package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts +25 -0
- package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
- package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +38 -0
- package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +38 -0
- package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +5 -12
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +0 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +84 -5
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.js +83 -3
- package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +1 -0
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js +11 -0
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +15 -0
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +21 -4
- package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +61 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +238 -6
- package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +37 -27
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +134 -12
- package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +2 -6
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +32 -8
- package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +45 -2
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +45 -2
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts +35 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +257 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts +143 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js +219 -0
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +27 -0
- package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +75 -7
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +69 -8
- package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +31 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js +198 -0
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +31 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +191 -0
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +307 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +530 -0
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +4 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +29 -0
- package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +4 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +29 -0
- package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +6 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +31 -0
- package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts +13 -0
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js +24 -3
- package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
- package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +4 -4
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +4 -4
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self.shared.resources-config.schemas.js +33 -3
- package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts +17 -1
- package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.resources-config.schemas.js +136 -5
- package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/users.shared.schemas.d.ts +60 -13
- package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.schemas.js +56 -9
- package/dist/esm/users/users.shared.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -72,8 +72,18 @@ export var FlowsActors_MessageContentType;
|
|
|
72
72
|
export const FlowActorExecution_MessageSchema = z.object({
|
|
73
73
|
/** Stable per-message id (client-correlatable across stream deltas). */
|
|
74
74
|
id: z.uuid(),
|
|
75
|
-
role: z.enum(FlowsActors_ConversationRole)
|
|
76
|
-
|
|
75
|
+
role: z.enum(FlowsActors_ConversationRole)
|
|
76
|
+
.describe('Who produced this message.\n\nValues:\n'
|
|
77
|
+
+ '- `user`: the person, or the client acting for them.\n'
|
|
78
|
+
+ '- `assistant`: the agent.\n'
|
|
79
|
+
+ '- `system`: instructions the agent was given, not part of the conversation a person sees.\n'
|
|
80
|
+
+ '- `tool`: the result of something the agent called.'),
|
|
81
|
+
contentType: z.enum(FlowsActors_MessageContentType).default(FlowsActors_MessageContentType.TEXT)
|
|
82
|
+
.describe('How to render `content`.\n\nValues:\n'
|
|
83
|
+
+ '- `text`: plain text.\n'
|
|
84
|
+
+ '- `markdown`: text with Markdown formatting.\n'
|
|
85
|
+
+ '- `progress`: an interim note about work in flight; `data` carries the detail.\n'
|
|
86
|
+
+ '- `data`: a structured payload rather than prose; read `data`, not `content`.'),
|
|
77
87
|
/** Rendered text content (may be assembled from streamed deltas). */
|
|
78
88
|
content: z.string(),
|
|
79
89
|
/** Structured payload for `DATA`/`PROGRESS` messages (tool results, progress). */
|
|
@@ -117,9 +127,36 @@ export const FlowActorExecution_PausedApprovalSchema = z.object({
|
|
|
117
127
|
pendingToolArgs: z.record(z.string(), z.unknown()).optional(),
|
|
118
128
|
/** ISO timestamp when the approval was requested. */
|
|
119
129
|
requestedAt: z.string(),
|
|
120
|
-
/**
|
|
130
|
+
/**
|
|
131
|
+
* ISO instant after which the paused turn must not be resumed.
|
|
132
|
+
*
|
|
133
|
+
* SET ON EVERY SUSPENSION since 2026-09-08 (#465). It was declared here, carried on the
|
|
134
|
+
* approval-request WebSocket payload and read and converted by the browser, and NO WRITER EVER SET
|
|
135
|
+
* IT — so a pending approval never expired and the field described a timeout that did not exist.
|
|
136
|
+
*
|
|
137
|
+
* The terminal state on expiry is `FlowsActors_Status.FAILED`, which the status vocabulary already
|
|
138
|
+
* named ("resolves to PROCESSING→COMPLETED on approval, or a terminal state on denial/expiry").
|
|
139
|
+
* Nothing new was invented for it.
|
|
140
|
+
*
|
|
141
|
+
* Still optional: a suspension persisted before that date carries none, and an absent expiry means
|
|
142
|
+
* the pause does not lapse — which is what those turns were paused under.
|
|
143
|
+
*/
|
|
121
144
|
expiresAt: z.string().optional(),
|
|
122
145
|
});
|
|
146
|
+
/**
|
|
147
|
+
* How long a human has to answer an approval-gated tool call before the turn is refused.
|
|
148
|
+
*
|
|
149
|
+
* **24 hours.** An agent pausing for a person should span a working day plus a night, so a request
|
|
150
|
+
* raised late in the afternoon is still answerable the next morning. Much beyond that and the
|
|
151
|
+
* decision stops being meaningful rather than merely late: the person is approving a tool call made
|
|
152
|
+
* against a conversation, a world and an intent that have all moved on, and "do you approve this?"
|
|
153
|
+
* with no memory of the question is a prompt people click through.
|
|
154
|
+
*
|
|
155
|
+
* A framework default rather than an operator knob, for now. If an application ever needs its own,
|
|
156
|
+
* the knob goes beside the consent lifetime in the auth config — but nobody has asked, and a
|
|
157
|
+
* timeout that every application authors identically is a default wearing a config field.
|
|
158
|
+
*/
|
|
159
|
+
export const FLOW_ACTOR_APPROVAL_DEFAULT_TIMEOUT_MS = 24 * 60 * 60 * 1000;
|
|
123
160
|
/** Serialize paused-approval state for the scalar `pausedApproval` string column. */
|
|
124
161
|
export function serializeFlowActorPausedApproval(state) {
|
|
125
162
|
return JSON.stringify(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows-actors-execution.shared.schemas.js","sourceRoot":"","sources":["../../../../src/flows-actors/flows-actors-execution.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,EAA2E,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AACpJ,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EACL,gBAAgB,EAChB,kCAAkC,GACnC,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACL,yBAAyB,EACzB,gCAAgC,GAEjC,MAAM,kDAAkD,CAAC;AAE1D,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAErB,iEAAiE;AACjE,8BAA8B;AAC9B,iEAAiE;AAEjE;;;;;GAKG;AACH,MAAM,C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CAAC,CAAC;AAExC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yCAAyC,GAAG,yBAAyB,CAAC;IACjF,gBAAgB,EAAE,qBAAqB;IACvC,mBAAmB,EAAE,sBAAsB;IAC3C,WAAW,EAAE,uBAAuB;IACpC,UAAU,EAAE,4BAA4B;IACxC,QAAQ,EAAE,mCAAmC;CAC9C,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7D,MAAM,EAAE,4BAA4B,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC5D,aAAa,EAAE,4BAA4B,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,EAAE;IAC1E,QAAQ,EAAE,4BAA4B,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE;IAChE,UAAU,EAAE,4BAA4B,CAAC,KAAK,CAAC,UAAU;IACzD;;;;;;;;;;;;;;OAcG;IACH,cAAc,EAAE,4BAA4B,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE;CAC5E,CAAC,CAAC","sourcesContent":["/**\n * Flows-Actors Execution — Persisted Resource Schema (POLYMORPHIC)\n * ================================================================\n *\n * A persisted record of a single flow/actor **system execution** — in v1 the\n * durable source of truth for a conversational chat log (`messages[]`) plus the\n * execution's lifecycle status.\n *\n * POLYMORPHIC ACROSS OWNER SCOPE. The SAME base envelope is stamped out as THREE\n * genuine single-scope resources by `declarePolymorphicSchemas()`, one owner FK\n * injected per variant:\n * - `userFlowActorExecutions` (USER_SELF — `userId`) ← WS chat + user-delegated A2A\n * - `organizationFlowActorExecutions` (ORGANIZATIONS — `organizationId`) ← org-machine A2A\n * - `applicationFlowActorExecutions` (APPLICATION — `applicationId`) ← app-machine A2A\n *\n * A conversation is owned by EXACTLY ONE scope (its injected owner FK). There is\n * no cross-scope audit dimension on the base — ownership IS the scope. This is the\n * honest \"one concept, N owners\" model (mirrors billing accounts / subscriptions)\n * and needs ZERO core-authorizer change: each variant satisfies its own scope\n * authorizer, and `polymorphicRole` resolves the operation roles per scope. A\n * machine (API key / OIDC client) reaches its org/app variant exactly as it\n * reaches any other org/app resource — standard RBAC via its granted roles.\n *\n * KIND-AGNOSTIC BY DESIGN. A `FlowActorSystem_Kind` discriminant lets the SAME\n * resource persist both flow and actor executions. v1 implements the ACTOR\n * conversational path; the FLOW path drops in without reshaping the base envelope.\n *\n * @see flows-actors.system.shared.schemas.ts — the base execution envelope\n * @see billing-account.shared.schemas.ts — the polymorphic-scope precedent\n * @see requests/websocket.shared.schemas.ts — the streamed message payload this\n * log mirrors (`WS_FlowsActorsMessagePayloadSchema`)\n */\n\nimport { z } from 'zod';\nimport { initZodDecorators, addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\nimport { FLOWS_ACTORS_DEFAULT_AGENT_INSTANCE, FLOWS_ACTORS_NO_MACHINE_CREDENTIAL, FlowsActors_Status } from './flows-actors.commons.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport { FlowActorSystem_Kind } from './flows-actors.system.shared.schemas';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport {\n CoreResourceType,\n coreResourceShared_FieldIdentifier,\n} from '../resources/resources.shared.core.definitions';\nimport {\n declarePolymorphicSchemas,\n optOutPolymorphicAutoBusinessKey,\n type PolymorphicVariantDefinition,\n} from '../resources/utils/resource-polymorphism.schemas';\n\ninitZodDecorators(z);\n\n//===============================================================\n// Conversational message log\n//===============================================================\n\n/**\n * Author of a persisted conversational message. `TOOL` records a tool-call /\n * tool-result turn (grounding retrieval); `SYSTEM` records a system/status note.\n * WS-streamed messages are always server→client, so the transport shape carries\n * no role — the persisted log adds it to reconstruct a full transcript.\n */\nexport enum FlowsActors_ConversationRole {\n USER = 'user',\n ASSISTANT = 'assistant',\n SYSTEM = 'system',\n TOOL = 'tool',\n}\n\n/**\n * Rendering hint for a message body. Mirrors the streamed\n * `WS_FlowsActorsMessagePayloadSchema.messageType` literal union exactly\n * (`text | markdown | progress | data`) as an enum so the persisted log and the\n * live stream share one vocabulary (framework rule: enums over literal unions).\n */\nexport enum FlowsActors_MessageContentType {\n TEXT = 'text',\n MARKDOWN = 'markdown',\n PROGRESS = 'progress',\n DATA = 'data',\n}\n\nexport const FlowActorExecution_MessageSchema = z.object({\n /** Stable per-message id (client-correlatable across stream deltas). */\n id: z.uuid(),\n role: z.enum(FlowsActors_ConversationRole),\n contentType: z.enum(FlowsActors_MessageContentType).default(FlowsActors_MessageContentType.TEXT),\n /** Rendered text content (may be assembled from streamed deltas). */\n content: z.string(),\n /** Structured payload for `DATA`/`PROGRESS` messages (tool results, progress). */\n data: z.record(z.string(), z.unknown()).optional(),\n createdAt: z.date().default(() => new Date()),\n});\nexport type FlowActorExecution_Message = z.infer<typeof FlowActorExecution_MessageSchema>;\n\n/**\n * The SUSPENDED-TURN state persisted when an agent turn pauses at a human-in-the-loop\n * approval boundary (execution `status` = `AWAITING_APPROVAL`). It is stored SERIALIZED as a\n * JSON string in the `pausedApproval` scalar field — NOT as a nested Zod object — because heavy\n * nested sub-structures do not round-trip through the Zod→Mongoose embedded-subdocument\n * conversion (see the per-kind state note below). Parse/serialize ONLY via the helpers below at\n * the persistence boundary; the record column itself stays a plain string.\n */\nexport const FlowActorExecution_PausedApprovalSchema = z.object({\n /**\n * Correlates the emitted approval REQUEST with the inbound decision (idempotency key).\n *\n * An OPAQUE identifier minted by the model SDK — NOT a Wildo id and NOT a UUID. It was typed\n * `z.uuid()` on the reasonable-looking assumption that an id is a uuid, and the SDK produces\n * values like `aitxt-3Xfhq68r7GTRXEuV1YzU4eEc`.\n *\n * That single wrong assumption made EVERY paused turn unresumable, and hid completely: serializing\n * is `JSON.stringify` and does not validate, so the pause persisted perfectly; only the resume's\n * `parse` rejected it, as a CORRUPTED blob. The turn then stayed paused forever with a\n * \"state is unreadable\" error naming the wrong cause. Unit fixtures used a real uuid, so they were\n * more conformant than production and could never reproduce it — the live lane found it.\n *\n * Validate it as an opaque non-empty string. We do not own the format and must not assert one.\n */\n approvalId: z.string().min(1),\n /**\n * The AI-SDK model-message array to RESUME from — opaque to us (the SDK's own resume\n * contract). Captured when the approval-gated tool call suspended the stream; on the human\n * decision the runtime appends a tool-approval-response and re-invokes with these messages.\n */\n sdkModelMessages: z.array(z.record(z.string(), z.unknown())),\n /** The approval-gated tool the model wants to call (drives the human-facing prompt). */\n pendingToolName: z.string(),\n /** The pending tool call's arguments (drives the human-facing action description). */\n pendingToolArgs: z.record(z.string(), z.unknown()).optional(),\n /** ISO timestamp when the approval was requested. */\n requestedAt: z.string(),\n /** Optional ISO expiry after which the paused turn is auto-failed. */\n expiresAt: z.string().optional(),\n});\nexport type FlowActorExecution_PausedApproval = z.infer<typeof FlowActorExecution_PausedApprovalSchema>;\n\n/** Serialize paused-approval state for the scalar `pausedApproval` string column. */\nexport function serializeFlowActorPausedApproval(state: FlowActorExecution_PausedApproval): string {\n return JSON.stringify(state);\n}\n\n/**\n * Parse the scalar `pausedApproval` string column back to typed state. Throws (ZodError /\n * SyntaxError) on a malformed blob — a corrupted paused record must fail loudly at resume,\n * never silently resume from garbage.\n */\nexport function parseFlowActorPausedApproval(raw: string): FlowActorExecution_PausedApproval {\n return FlowActorExecution_PausedApprovalSchema.parse(JSON.parse(raw));\n}\n\n//===============================================================\n// Per-kind execution state (reused from the shared execution types)\n//===============================================================\n\n// NOTE (v1 scope): the persisted record is the CONVERSATIONAL envelope only —\n// `kind` + `status`/`statusChanges` + the `messages[]` chat log. The richer\n// per-kind graph-state slots (`flowState` node-states / `actorState` plan+tasks,\n// sliced from `FlowSystem_Execution` / `ActorSystem_Execution`) are intentionally\n// NOT persisted yet: the v1 conversational runtime never writes them, and those\n// heavy nested sub-structures (required `plan`/`walkthrough`/`standaloneTasks`\n// with embedded `_id`s) do not round-trip through the Zod→Mongoose embedded-\n// subdocument conversion as optional slots (empty subdocs get instantiated and\n// fail required-path validation). When the flow/actor orchestration runtime\n// actually produces graph state, add typed `flowState`/`actorState` back WITH the\n// embedded-subdocument treatment (see the zod↔mongoose nested-union / embedded-id\n// notes) rather than a raw `.pick()`. `kind` already preserves discrimination.\n\n//===============================================================\n// Base execution record — NO owner scope FK (injected per variant)\n//===============================================================\n\n/**\n * The conversation envelope shared by every scope variant. It carries NO owner\n * scope FK: `declarePolymorphicSchemas()` injects exactly ONE (`userId` /\n * `organizationId` / `applicationId`) per variant. Do NOT add an `initiator`\n * snapshot here — a nested `initiator.userId`/`.organizationId` collides with the\n * contextual scope filter (it matches the field identifier at every schema path\n * and injects an exact-subdocument clause that never equals the stored snapshot,\n * so every scoped read/update silently matches zero rows). Ownership lives ONLY on\n * the single injected top-level owner FK.\n */\nexport const FlowActorExecutionBaseSchema = z.object({\n /** MongoDB document id — auto-generated / auto-managed (excluded from create). */\n _id: z.string().min(1).isPrimaryKey(),\n\n /**\n * Stable business id of the execution, generated by the conversational runtime\n * and echoed over the WebSocket channel (`WS_FlowsActors*.executionId`). Unique\n * per variant collection (a UUID — no cross-collection collision). Immutable\n * once created.\n */\n executionId: z.uuid().isUnique({ scope: 'global', sparse: false }).excludeFromUpdate().isSummaryField(),\n\n // === System identity (set on create, immutable) ===\n /** Ref of the executed flow/actor system (`FlowActorSystem.ref`). */\n systemRef: z.string().isDBIndexed().excludeFromUpdate().isSummaryField(),\n /** Discriminant selecting which state slot is populated. */\n kind: z.enum(FlowActorSystem_Kind).isDBIndexed().excludeFromUpdate().isSummaryField(),\n\n // === Runtime status ===\n /**\n * WHICH agent this conversation was opened through — part of the read filter, not metadata.\n *\n * The task family carried this from gate #3; executions did not, so a caller holding a\n * `contextId` could continue that thread through a DIFFERENT declared agent and load the prior\n * transcript into the other agent's context. A2A agents are declared as separate resource servers\n * with per-instance token audiences, and the plane at risk here holds the full message log — not\n * a 120-character title (review finding G5-8).\n *\n * The WebSocket surface has no agent, and the default A2A agent is an identity of its own; both\n * store {@link FLOWS_ACTORS_DEFAULT_AGENT_INSTANCE}.\n */\n resourceServerInstanceRef: z.string().min(1).isDBIndexed(),\n\n /**\n * WHICH machine credential opened this conversation — part of the read filter, not metadata.\n *\n * Identical axis and identical reasoning to the task family: the injected scope FK does not\n * identify the principal on the machine variants (`applicationId` is a deployment singleton;\n * `organizationId` is shared by every machine client of one tenant), so without it a\n * separately-credentialed client could read and continue another client's conversation — which\n * carries the full message log, not merely a title.\n *\n * User-delegated turns store {@link FLOWS_ACTORS_NO_MACHINE_CREDENTIAL}: the human is the\n * principal there and the `userId` owner FK already discriminates.\n */\n machineCredentialId: z.string().min(1).isDBIndexed(),\n\n status: z.enum(FlowsActors_Status).isDBIndexed().isSummaryField(),\n statusChanges: z.array(z.object({\n status: z.enum(FlowsActors_Status),\n timestamp: z.date(),\n })).default([]),\n\n // === Conversational log (chat history) ===\n /**\n * The conversation transcript.\n *\n * ## Provenance: SUBJECT_PROVIDED, and the asymmetry is the reason (review finding F5-6)\n *\n * This array MIXES subject-authored turns (`role: USER`) with model-generated ones\n * (`role: ASSISTANT`), and provenance is declared per FIELD — there is no per-element mechanism,\n * so one classification must cover both. The two ways of being wrong are not equally bad:\n *\n * • Classifying DERIVED would EXCLUDE the subject's own words from an Art. 20 bundle. That is a\n * failure of the right the article exists to serve.\n * • Classifying SUBJECT_PROVIDED includes the assistant's replies alongside them. That is\n * over-delivery — but of a transcript the subject was a party to and already saw, which is the\n * natural unit a person means by \"my conversation\".\n *\n * So the classification follows the ASYMMETRY, not a per-element truth we cannot express. Revisit\n * only if per-element provenance ever exists; splitting the array by role at export time was\n * considered and rejected as inventing a second mechanism for one field.\n *\n * ⚠️ **This is a LABELLING change, not a behaviour change**, and the first version of this note\n * failed to say so. `resolvePortabilityFieldScope` maps `SUBJECT_PROVIDED` *and* `OBSERVED` to\n * `INCLUDED`, and the resource default was already `OBSERVED` — so `messages` was in the Art. 20\n * bundle before and after. Nothing about an export changes.\n *\n * The rejected alternative the first version omitted is the one that was actually in force:\n * **`OBSERVED`** — \"data generated by the subject's USE of the service\", a defensible reading of a\n * mixed transcript. It is rejected for precision rather than effect: the USER turns are authored\n * BY the subject, not merely observed of them, and a classification should say the truest thing\n * available even when two values resolve alike today.\n *\n * The task family's `output`/`artifacts` are DERIVED by contrast, and that is not an\n * inconsistency: those are model output ABOUT the work, with no subject-authored content mixed in.\n */\n // RESET on erasure — returns this field to its schema default. It holds the conversation itself,\n // which the category above correctly declares as personal data. RESET rather than REMOVE or MASK\n // because the field is non-nullable WITH a `.default()`: REMOVE needs a clearable field and MASK\n // needs a string. The value comes from the schema, so there is no second copy to drift.\n messages: addImpersonalizeWith(\n FlowActorExecution_MessageSchema.array().default([])\n .portabilityProvenance(DataPortabilityProvenance.SUBJECT_PROVIDED)\n // The conversation itself. Category as well as provenance, so a notice can enumerate it: the two\n // axes answer different questions and a provenance alone leaves the field an OUTSTANDING gap.\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.RESET,\n ),\n\n // === HITL (human-in-the-loop) suspension ===\n /**\n * Serialized {@link FlowActorExecution_PausedApproval} — present ONLY while `status` is\n * `AWAITING_APPROVAL`. A scalar JSON string (see that schema's doc for why it is NOT a nested\n * object: the Zod→Mongoose round-trip). Set on pause, cleared on resume / terminal completion;\n * never authored on create.\n */\n /**\n * Serialized suspended-turn state; `null` once a decision releases the pause.\n *\n * `.nullish()`, not `.optional()`, and the difference is load-bearing at the READ. Clearing writes\n * an explicit `null`; the write then re-parses the row to project its response, and under\n * `.optional()` that projection throws `expected string, received null`. The clear PERSISTS (there\n * is no transaction to roll back) and the operation still fails — so the pause was released and\n * the resume aborted, leaving the turn `failed` with its work never done, reported as a resource\n * transformation error that names nothing about approvals.\n *\n * The input contract needing `.nullish()` (see `FlowActorExecutionUpdateInternalSchema`) is a\n * SEPARATE surface from this one. Fixing only that gets the value written and still throws on the\n * way out — both must admit null or neither does.\n */\n // This blob contains SDK resume messages and pending tool arguments. It is\n // runtime continuation state, not conversation content: generic client reads,\n // summaries and generated API schemas must never disclose it.\n pausedApproval: z.string().nullish().excludeFromCreate().isBackendOnly(),\n\n // === Timing (system-managed; defaults are load-bearing — the create pipeline\n // strips these then date-coerces, so a missing default → Invalid Date) ===\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate().isSummaryField(),\n /** Set on terminal completion (via UPDATE); never on create. */\n finishedAt: z.date().optional().excludeFromCreate().isSummaryField(),\n});\nexport type FlowActorExecutionBase = z.infer<typeof FlowActorExecutionBaseSchema>;\n\n//===============================================================\n// Polymorphic declaration — one owner-scope variant per scope\n//===============================================================\n\n/**\n * The three owner-scope variants a flows-actors execution is stamped out for.\n * Each is `isPrimaryScope: true` (the injected owner FK is the primary scope), and\n * each opts OUT of the singleton auto-business-key: a conversation is MULTI-ROW\n * per scope (many discussions per user/org/app), so the injected owner FK must NOT\n * be marked `.isUnique()` — otherwise the second conversation per scope would fail\n * with a duplicate-key error. Mirrors subscriptions / usage-records / SSO\n * connections (all multi-row polymorphic resources).\n */\nexport const FLOW_ACTOR_EXECUTION_SCOPE_VARIANTS: PolymorphicVariantDefinition[] = [\n { parentResourceType: CoreResourceType.USERS, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USERS], isPrimaryScope: true },\n { parentResourceType: CoreResourceType.ORGANIZATIONS, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATIONS], isPrimaryScope: true },\n { parentResourceType: CoreResourceType.APPLICATION, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION], isPrimaryScope: true },\n].map(optOutPolymorphicAutoBusinessKey);\n\n/**\n * Polymorphic declaration for flows-actors executions. Produces 3 variants:\n * - users → `userFlowActorExecutions` (`userId` injected)\n * - organizations→ `organizationFlowActorExecutions` (`organizationId` injected)\n * - applications → `applicationFlowActorExecutions` (`applicationId` injected)\n */\nexport const flowActorExecutionsPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'flowActorExecutions',\n baseFieldIdentifier: 'flowActorExecutionId',\n baseEnumKey: 'FLOW_ACTOR_EXECUTIONS',\n baseSchema: FlowActorExecutionBaseSchema,\n variants: FLOW_ACTOR_EXECUTION_SCOPE_VARIANTS,\n});\n\n/**\n * Owner-agnostic UPDATE DTO — status transitions, appended messages, completion\n * time. Shared across all variants because it references NO owner FK (owner is\n * immutable). `updatedAt` is system-managed; identity fields are `.excludeFromUpdate()`.\n */\nexport const FlowActorExecutionUpdateInternalSchema = z.object({\n status: FlowActorExecutionBaseSchema.shape.status.optional(),\n statusChanges: FlowActorExecutionBaseSchema.shape.statusChanges.optional(),\n messages: FlowActorExecutionBaseSchema.shape.messages.optional(),\n finishedAt: FlowActorExecutionBaseSchema.shape.finishedAt,\n /**\n * The suspended-turn state, written when a turn pauses for a human decision and cleared when one\n * arrives.\n *\n * ⚠️ THIS SCHEMA IS AN ALLOW-LIST, and omitting a field here does not fail — it makes the write\n * SUCCEED and persist nothing. `pausedApproval` was added to the base envelope when the column was\n * introduced but never here, so every approval pause wrote its status and its messages and\n * silently dropped the one field that makes the turn resumable. The row read back as\n * `AWAITING_APPROVAL` with no state to resume from: a turn stuck forever, with no error anywhere.\n * Adding a persisted field is therefore never done without adding it to this contract.\n *\n * `.nullish()` rather than `.optional()` because clearing is a real transition: the resume writes\n * an explicit `null` to release the pause, and under `.optional()` that null is rejected — which\n * would leave a resumed turn still advertising a decision nobody can answer.\n */\n pausedApproval: FlowActorExecutionBaseSchema.shape.pausedApproval.nullish(),\n});\n\n//===============================================================\n// Exported runtime type\n//===============================================================\n\n/**\n * Runtime shape of a persisted execution (the base envelope). The owner FK is\n * variant-specific (`userId` | `organizationId` | `applicationId`) and read from\n * the concrete variant; the conversational runtime supplies it explicitly on create.\n */\nexport type FlowActorExecution = z.infer<typeof FlowActorExecutionBaseSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"flows-actors-execution.shared.schemas.js","sourceRoot":"","sources":["../../../src/flows-actors/flows-actors-execution.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,EAA2E,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AACpJ,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EACL,gBAAgB,EAChB,kCAAkC,GACnC,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACL,yBAAyB,EACzB,gCAAgC,GAEjC,MAAM,kDAAkD,CAAC;AAE1D,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAErB,iEAAiE;AACjE,8BAA8B;AAC9B,iEAAiE;AAEjE;;;;;GAKG;AACH,MAAM,CAAN,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACtC,6CAAa,CAAA;IACb,uDAAuB,CAAA;IACvB,iDAAiB,CAAA;IACjB,6CAAa,CAAA;AACf,CAAC,EALW,4BAA4B,KAA5B,4BAA4B,QAKvC;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,8BAKX;AALD,WAAY,8BAA8B;IACxC,+CAAa,CAAA;IACb,uDAAqB,CAAA;IACrB,uDAAqB,CAAA;IACrB,+CAAa,CAAA;AACf,CAAC,EALW,8BAA8B,KAA9B,8BAA8B,QAKzC;AAED,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,wEAAwE;IACxE,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE;I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pC,UAAU,EAAE,4BAA4B;IACxC,QAAQ,EAAE,mCAAmC;CAC9C,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7D,MAAM,EAAE,4BAA4B,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC5D,aAAa,EAAE,4BAA4B,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,EAAE;IAC1E,QAAQ,EAAE,4BAA4B,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE;IAChE,UAAU,EAAE,4BAA4B,CAAC,KAAK,CAAC,UAAU;IACzD;;;;;;;;;;;;;;OAcG;IACH,cAAc,EAAE,4BAA4B,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE;CAC5E,CAAC,CAAC","sourcesContent":["/**\n * Flows-Actors Execution — Persisted Resource Schema (POLYMORPHIC)\n * ================================================================\n *\n * A persisted record of a single flow/actor **system execution** — in v1 the\n * durable source of truth for a conversational chat log (`messages[]`) plus the\n * execution's lifecycle status.\n *\n * POLYMORPHIC ACROSS OWNER SCOPE. The SAME base envelope is stamped out as THREE\n * genuine single-scope resources by `declarePolymorphicSchemas()`, one owner FK\n * injected per variant:\n * - `userFlowActorExecutions` (USER_SELF — `userId`) ← WS chat + user-delegated A2A\n * - `organizationFlowActorExecutions` (ORGANIZATIONS — `organizationId`) ← org-machine A2A\n * - `applicationFlowActorExecutions` (APPLICATION — `applicationId`) ← app-machine A2A\n *\n * A conversation is owned by EXACTLY ONE scope (its injected owner FK). There is\n * no cross-scope audit dimension on the base — ownership IS the scope. This is the\n * honest \"one concept, N owners\" model (mirrors billing accounts / subscriptions)\n * and needs ZERO core-authorizer change: each variant satisfies its own scope\n * authorizer, and `polymorphicRole` resolves the operation roles per scope. A\n * machine (API key / OIDC client) reaches its org/app variant exactly as it\n * reaches any other org/app resource — standard RBAC via its granted roles.\n *\n * KIND-AGNOSTIC BY DESIGN. A `FlowActorSystem_Kind` discriminant lets the SAME\n * resource persist both flow and actor executions. v1 implements the ACTOR\n * conversational path; the FLOW path drops in without reshaping the base envelope.\n *\n * @see flows-actors.system.shared.schemas.ts — the base execution envelope\n * @see billing-account.shared.schemas.ts — the polymorphic-scope precedent\n * @see requests/websocket.shared.schemas.ts — the streamed message payload this\n * log mirrors (`WS_FlowsActorsMessagePayloadSchema`)\n */\n\nimport { z } from 'zod';\nimport { initZodDecorators, addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\nimport { FLOWS_ACTORS_DEFAULT_AGENT_INSTANCE, FLOWS_ACTORS_NO_MACHINE_CREDENTIAL, FlowsActors_Status } from './flows-actors.commons.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport { FlowActorSystem_Kind } from './flows-actors.system.shared.schemas';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport {\n CoreResourceType,\n coreResourceShared_FieldIdentifier,\n} from '../resources/resources.shared.core.definitions';\nimport {\n declarePolymorphicSchemas,\n optOutPolymorphicAutoBusinessKey,\n type PolymorphicVariantDefinition,\n} from '../resources/utils/resource-polymorphism.schemas';\n\ninitZodDecorators(z);\n\n//===============================================================\n// Conversational message log\n//===============================================================\n\n/**\n * Author of a persisted conversational message. `TOOL` records a tool-call /\n * tool-result turn (grounding retrieval); `SYSTEM` records a system/status note.\n * WS-streamed messages are always server→client, so the transport shape carries\n * no role — the persisted log adds it to reconstruct a full transcript.\n */\nexport enum FlowsActors_ConversationRole {\n USER = 'user',\n ASSISTANT = 'assistant',\n SYSTEM = 'system',\n TOOL = 'tool',\n}\n\n/**\n * Rendering hint for a message body. Mirrors the streamed\n * `WS_FlowsActorsMessagePayloadSchema.messageType` literal union exactly\n * (`text | markdown | progress | data`) as an enum so the persisted log and the\n * live stream share one vocabulary (framework rule: enums over literal unions).\n */\nexport enum FlowsActors_MessageContentType {\n TEXT = 'text',\n MARKDOWN = 'markdown',\n PROGRESS = 'progress',\n DATA = 'data',\n}\n\nexport const FlowActorExecution_MessageSchema = z.object({\n /** Stable per-message id (client-correlatable across stream deltas). */\n id: z.uuid(),\n role: z.enum(FlowsActors_ConversationRole)\n .describe(\n 'Who produced this message.\\n\\nValues:\\n'\n + '- `user`: the person, or the client acting for them.\\n'\n + '- `assistant`: the agent.\\n'\n + '- `system`: instructions the agent was given, not part of the conversation a person sees.\\n'\n + '- `tool`: the result of something the agent called.',\n ),\n contentType: z.enum(FlowsActors_MessageContentType).default(FlowsActors_MessageContentType.TEXT)\n .describe(\n 'How to render `content`.\\n\\nValues:\\n'\n + '- `text`: plain text.\\n'\n + '- `markdown`: text with Markdown formatting.\\n'\n + '- `progress`: an interim note about work in flight; `data` carries the detail.\\n'\n + '- `data`: a structured payload rather than prose; read `data`, not `content`.',\n ),\n /** Rendered text content (may be assembled from streamed deltas). */\n content: z.string(),\n /** Structured payload for `DATA`/`PROGRESS` messages (tool results, progress). */\n data: z.record(z.string(), z.unknown()).optional(),\n createdAt: z.date().default(() => new Date()),\n});\nexport type FlowActorExecution_Message = z.infer<typeof FlowActorExecution_MessageSchema>;\n\n/**\n * The SUSPENDED-TURN state persisted when an agent turn pauses at a human-in-the-loop\n * approval boundary (execution `status` = `AWAITING_APPROVAL`). It is stored SERIALIZED as a\n * JSON string in the `pausedApproval` scalar field — NOT as a nested Zod object — because heavy\n * nested sub-structures do not round-trip through the Zod→Mongoose embedded-subdocument\n * conversion (see the per-kind state note below). Parse/serialize ONLY via the helpers below at\n * the persistence boundary; the record column itself stays a plain string.\n */\nexport const FlowActorExecution_PausedApprovalSchema = z.object({\n /**\n * Correlates the emitted approval REQUEST with the inbound decision (idempotency key).\n *\n * An OPAQUE identifier minted by the model SDK — NOT a Wildo id and NOT a UUID. It was typed\n * `z.uuid()` on the reasonable-looking assumption that an id is a uuid, and the SDK produces\n * values like `aitxt-3Xfhq68r7GTRXEuV1YzU4eEc`.\n *\n * That single wrong assumption made EVERY paused turn unresumable, and hid completely: serializing\n * is `JSON.stringify` and does not validate, so the pause persisted perfectly; only the resume's\n * `parse` rejected it, as a CORRUPTED blob. The turn then stayed paused forever with a\n * \"state is unreadable\" error naming the wrong cause. Unit fixtures used a real uuid, so they were\n * more conformant than production and could never reproduce it — the live lane found it.\n *\n * Validate it as an opaque non-empty string. We do not own the format and must not assert one.\n */\n approvalId: z.string().min(1),\n /**\n * The AI-SDK model-message array to RESUME from — opaque to us (the SDK's own resume\n * contract). Captured when the approval-gated tool call suspended the stream; on the human\n * decision the runtime appends a tool-approval-response and re-invokes with these messages.\n */\n sdkModelMessages: z.array(z.record(z.string(), z.unknown())),\n /** The approval-gated tool the model wants to call (drives the human-facing prompt). */\n pendingToolName: z.string(),\n /** The pending tool call's arguments (drives the human-facing action description). */\n pendingToolArgs: z.record(z.string(), z.unknown()).optional(),\n /** ISO timestamp when the approval was requested. */\n requestedAt: z.string(),\n /**\n * ISO instant after which the paused turn must not be resumed.\n *\n * SET ON EVERY SUSPENSION since 2026-09-08 (#465). It was declared here, carried on the\n * approval-request WebSocket payload and read and converted by the browser, and NO WRITER EVER SET\n * IT — so a pending approval never expired and the field described a timeout that did not exist.\n *\n * The terminal state on expiry is `FlowsActors_Status.FAILED`, which the status vocabulary already\n * named (\"resolves to PROCESSING→COMPLETED on approval, or a terminal state on denial/expiry\").\n * Nothing new was invented for it.\n *\n * Still optional: a suspension persisted before that date carries none, and an absent expiry means\n * the pause does not lapse — which is what those turns were paused under.\n */\n expiresAt: z.string().optional(),\n});\nexport type FlowActorExecution_PausedApproval = z.infer<typeof FlowActorExecution_PausedApprovalSchema>;\n\n/**\n * How long a human has to answer an approval-gated tool call before the turn is refused.\n *\n * **24 hours.** An agent pausing for a person should span a working day plus a night, so a request\n * raised late in the afternoon is still answerable the next morning. Much beyond that and the\n * decision stops being meaningful rather than merely late: the person is approving a tool call made\n * against a conversation, a world and an intent that have all moved on, and \"do you approve this?\"\n * with no memory of the question is a prompt people click through.\n *\n * A framework default rather than an operator knob, for now. If an application ever needs its own,\n * the knob goes beside the consent lifetime in the auth config — but nobody has asked, and a\n * timeout that every application authors identically is a default wearing a config field.\n */\nexport const FLOW_ACTOR_APPROVAL_DEFAULT_TIMEOUT_MS = 24 * 60 * 60 * 1000;\n\n/** Serialize paused-approval state for the scalar `pausedApproval` string column. */\nexport function serializeFlowActorPausedApproval(state: FlowActorExecution_PausedApproval): string {\n return JSON.stringify(state);\n}\n\n/**\n * Parse the scalar `pausedApproval` string column back to typed state. Throws (ZodError /\n * SyntaxError) on a malformed blob — a corrupted paused record must fail loudly at resume,\n * never silently resume from garbage.\n */\nexport function parseFlowActorPausedApproval(raw: string): FlowActorExecution_PausedApproval {\n return FlowActorExecution_PausedApprovalSchema.parse(JSON.parse(raw));\n}\n\n//===============================================================\n// Per-kind execution state (reused from the shared execution types)\n//===============================================================\n\n// NOTE (v1 scope): the persisted record is the CONVERSATIONAL envelope only —\n// `kind` + `status`/`statusChanges` + the `messages[]` chat log. The richer\n// per-kind graph-state slots (`flowState` node-states / `actorState` plan+tasks,\n// sliced from `FlowSystem_Execution` / `ActorSystem_Execution`) are intentionally\n// NOT persisted yet: the v1 conversational runtime never writes them, and those\n// heavy nested sub-structures (required `plan`/`walkthrough`/`standaloneTasks`\n// with embedded `_id`s) do not round-trip through the Zod→Mongoose embedded-\n// subdocument conversion as optional slots (empty subdocs get instantiated and\n// fail required-path validation). When the flow/actor orchestration runtime\n// actually produces graph state, add typed `flowState`/`actorState` back WITH the\n// embedded-subdocument treatment (see the zod↔mongoose nested-union / embedded-id\n// notes) rather than a raw `.pick()`. `kind` already preserves discrimination.\n\n//===============================================================\n// Base execution record — NO owner scope FK (injected per variant)\n//===============================================================\n\n/**\n * The conversation envelope shared by every scope variant. It carries NO owner\n * scope FK: `declarePolymorphicSchemas()` injects exactly ONE (`userId` /\n * `organizationId` / `applicationId`) per variant. Do NOT add an `initiator`\n * snapshot here — a nested `initiator.userId`/`.organizationId` collides with the\n * contextual scope filter (it matches the field identifier at every schema path\n * and injects an exact-subdocument clause that never equals the stored snapshot,\n * so every scoped read/update silently matches zero rows). Ownership lives ONLY on\n * the single injected top-level owner FK.\n */\nexport const FlowActorExecutionBaseSchema = z.object({\n /** MongoDB document id — auto-generated / auto-managed (excluded from create). */\n _id: z.string().min(1).isPrimaryKey(),\n\n /**\n * Stable business id of the execution, generated by the conversational runtime\n * and echoed over the WebSocket channel (`WS_FlowsActors*.executionId`). Unique\n * per variant collection (a UUID — no cross-collection collision). Immutable\n * once created.\n */\n executionId: z.uuid().isUnique({ scope: 'global', sparse: false }).excludeFromUpdate().isSummaryField(),\n\n // === System identity (set on create, immutable) ===\n /** Ref of the executed flow/actor system (`FlowActorSystem.ref`). */\n systemRef: z.string().isDBIndexed().excludeFromUpdate().isSummaryField(),\n /** Discriminant selecting which state slot is populated. */\n kind: z.enum(FlowActorSystem_Kind).isDBIndexed().excludeFromUpdate().isSummaryField(),\n\n // === Runtime status ===\n /**\n * WHICH agent this conversation was opened through — part of the read filter, not metadata.\n *\n * The task family carried this from gate #3; executions did not, so a caller holding a\n * `contextId` could continue that thread through a DIFFERENT declared agent and load the prior\n * transcript into the other agent's context. A2A agents are declared as separate resource servers\n * with per-instance token audiences, and the plane at risk here holds the full message log — not\n * a 120-character title (review finding G5-8).\n *\n * The WebSocket surface has no agent, and the default A2A agent is an identity of its own; both\n * store {@link FLOWS_ACTORS_DEFAULT_AGENT_INSTANCE}.\n */\n resourceServerInstanceRef: z.string().min(1).isDBIndexed(),\n\n /**\n * WHICH machine credential opened this conversation — part of the read filter, not metadata.\n *\n * Identical axis and identical reasoning to the task family: the injected scope FK does not\n * identify the principal on the machine variants (`applicationId` is a deployment singleton;\n * `organizationId` is shared by every machine client of one tenant), so without it a\n * separately-credentialed client could read and continue another client's conversation — which\n * carries the full message log, not merely a title.\n *\n * User-delegated turns store {@link FLOWS_ACTORS_NO_MACHINE_CREDENTIAL}: the human is the\n * principal there and the `userId` owner FK already discriminates.\n */\n machineCredentialId: z.string().min(1).isDBIndexed(),\n\n status: z.enum(FlowsActors_Status).isDBIndexed().isSummaryField(),\n statusChanges: z.array(z.object({\n status: z.enum(FlowsActors_Status),\n timestamp: z.date(),\n })).default([]),\n\n // === Conversational log (chat history) ===\n /**\n * The conversation transcript.\n *\n * ## Provenance: SUBJECT_PROVIDED, and the asymmetry is the reason (review finding F5-6)\n *\n * This array MIXES subject-authored turns (`role: USER`) with model-generated ones\n * (`role: ASSISTANT`), and provenance is declared per FIELD — there is no per-element mechanism,\n * so one classification must cover both. The two ways of being wrong are not equally bad:\n *\n * • Classifying DERIVED would EXCLUDE the subject's own words from an Art. 20 bundle. That is a\n * failure of the right the article exists to serve.\n * • Classifying SUBJECT_PROVIDED includes the assistant's replies alongside them. That is\n * over-delivery — but of a transcript the subject was a party to and already saw, which is the\n * natural unit a person means by \"my conversation\".\n *\n * So the classification follows the ASYMMETRY, not a per-element truth we cannot express. Revisit\n * only if per-element provenance ever exists; splitting the array by role at export time was\n * considered and rejected as inventing a second mechanism for one field.\n *\n * ⚠️ **This is a LABELLING change, not a behaviour change**, and the first version of this note\n * failed to say so. `resolvePortabilityFieldScope` maps `SUBJECT_PROVIDED` *and* `OBSERVED` to\n * `INCLUDED`, and the resource default was already `OBSERVED` — so `messages` was in the Art. 20\n * bundle before and after. Nothing about an export changes.\n *\n * The rejected alternative the first version omitted is the one that was actually in force:\n * **`OBSERVED`** — \"data generated by the subject's USE of the service\", a defensible reading of a\n * mixed transcript. It is rejected for precision rather than effect: the USER turns are authored\n * BY the subject, not merely observed of them, and a classification should say the truest thing\n * available even when two values resolve alike today.\n *\n * The task family's `output`/`artifacts` are DERIVED by contrast, and that is not an\n * inconsistency: those are model output ABOUT the work, with no subject-authored content mixed in.\n */\n // RESET on erasure — returns this field to its schema default. It holds the conversation itself,\n // which the category above correctly declares as personal data. RESET rather than REMOVE or MASK\n // because the field is non-nullable WITH a `.default()`: REMOVE needs a clearable field and MASK\n // needs a string. The value comes from the schema, so there is no second copy to drift.\n messages: addImpersonalizeWith(\n FlowActorExecution_MessageSchema.array().default([])\n .portabilityProvenance(DataPortabilityProvenance.SUBJECT_PROVIDED)\n // The conversation itself. Category as well as provenance, so a notice can enumerate it: the two\n // axes answer different questions and a provenance alone leaves the field an OUTSTANDING gap.\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.RESET,\n ),\n\n // === HITL (human-in-the-loop) suspension ===\n /**\n * Serialized {@link FlowActorExecution_PausedApproval} — present ONLY while `status` is\n * `AWAITING_APPROVAL`. A scalar JSON string (see that schema's doc for why it is NOT a nested\n * object: the Zod→Mongoose round-trip). Set on pause, cleared on resume / terminal completion;\n * never authored on create.\n */\n /**\n * Serialized suspended-turn state; `null` once a decision releases the pause.\n *\n * `.nullish()`, not `.optional()`, and the difference is load-bearing at the READ. Clearing writes\n * an explicit `null`; the write then re-parses the row to project its response, and under\n * `.optional()` that projection throws `expected string, received null`. The clear PERSISTS (there\n * is no transaction to roll back) and the operation still fails — so the pause was released and\n * the resume aborted, leaving the turn `failed` with its work never done, reported as a resource\n * transformation error that names nothing about approvals.\n *\n * The input contract needing `.nullish()` (see `FlowActorExecutionUpdateInternalSchema`) is a\n * SEPARATE surface from this one. Fixing only that gets the value written and still throws on the\n * way out — both must admit null or neither does.\n */\n // This blob contains SDK resume messages and pending tool arguments. It is\n // runtime continuation state, not conversation content: generic client reads,\n // summaries and generated API schemas must never disclose it.\n pausedApproval: z.string().nullish().excludeFromCreate().isBackendOnly(),\n\n // === Timing (system-managed; defaults are load-bearing — the create pipeline\n // strips these then date-coerces, so a missing default → Invalid Date) ===\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate().isSummaryField(),\n /** Set on terminal completion (via UPDATE); never on create. */\n finishedAt: z.date().optional().excludeFromCreate().isSummaryField(),\n});\nexport type FlowActorExecutionBase = z.infer<typeof FlowActorExecutionBaseSchema>;\n\n//===============================================================\n// Polymorphic declaration — one owner-scope variant per scope\n//===============================================================\n\n/**\n * The three owner-scope variants a flows-actors execution is stamped out for.\n * Each is `isPrimaryScope: true` (the injected owner FK is the primary scope), and\n * each opts OUT of the singleton auto-business-key: a conversation is MULTI-ROW\n * per scope (many discussions per user/org/app), so the injected owner FK must NOT\n * be marked `.isUnique()` — otherwise the second conversation per scope would fail\n * with a duplicate-key error. Mirrors subscriptions / usage-records / SSO\n * connections (all multi-row polymorphic resources).\n */\nexport const FLOW_ACTOR_EXECUTION_SCOPE_VARIANTS: PolymorphicVariantDefinition[] = [\n { parentResourceType: CoreResourceType.USERS, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USERS], isPrimaryScope: true },\n { parentResourceType: CoreResourceType.ORGANIZATIONS, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATIONS], isPrimaryScope: true },\n { parentResourceType: CoreResourceType.APPLICATION, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION], isPrimaryScope: true },\n].map(optOutPolymorphicAutoBusinessKey);\n\n/**\n * Polymorphic declaration for flows-actors executions. Produces 3 variants:\n * - users → `userFlowActorExecutions` (`userId` injected)\n * - organizations→ `organizationFlowActorExecutions` (`organizationId` injected)\n * - applications → `applicationFlowActorExecutions` (`applicationId` injected)\n */\nexport const flowActorExecutionsPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'flowActorExecutions',\n baseFieldIdentifier: 'flowActorExecutionId',\n baseEnumKey: 'FLOW_ACTOR_EXECUTIONS',\n baseSchema: FlowActorExecutionBaseSchema,\n variants: FLOW_ACTOR_EXECUTION_SCOPE_VARIANTS,\n});\n\n/**\n * Owner-agnostic UPDATE DTO — status transitions, appended messages, completion\n * time. Shared across all variants because it references NO owner FK (owner is\n * immutable). `updatedAt` is system-managed; identity fields are `.excludeFromUpdate()`.\n */\nexport const FlowActorExecutionUpdateInternalSchema = z.object({\n status: FlowActorExecutionBaseSchema.shape.status.optional(),\n statusChanges: FlowActorExecutionBaseSchema.shape.statusChanges.optional(),\n messages: FlowActorExecutionBaseSchema.shape.messages.optional(),\n finishedAt: FlowActorExecutionBaseSchema.shape.finishedAt,\n /**\n * The suspended-turn state, written when a turn pauses for a human decision and cleared when one\n * arrives.\n *\n * ⚠️ THIS SCHEMA IS AN ALLOW-LIST, and omitting a field here does not fail — it makes the write\n * SUCCEED and persist nothing. `pausedApproval` was added to the base envelope when the column was\n * introduced but never here, so every approval pause wrote its status and its messages and\n * silently dropped the one field that makes the turn resumable. The row read back as\n * `AWAITING_APPROVAL` with no state to resume from: a turn stuck forever, with no error anywhere.\n * Adding a persisted field is therefore never done without adding it to this contract.\n *\n * `.nullish()` rather than `.optional()` because clearing is a real transition: the resume writes\n * an explicit `null` to release the pause, and under `.optional()` that null is rejected — which\n * would leave a resumed turn still advertising a decision nobody can answer.\n */\n pausedApproval: FlowActorExecutionBaseSchema.shape.pausedApproval.nullish(),\n});\n\n//===============================================================\n// Exported runtime type\n//===============================================================\n\n/**\n * Runtime shape of a persisted execution (the base envelope). The owner FK is\n * variant-specific (`userId` | `organizationId` | `applicationId`) and read from\n * the concrete variant; the conversational runtime supplies it explicitly on create.\n */\nexport type FlowActorExecution = z.infer<typeof FlowActorExecutionBaseSchema>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows-actors-task.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"flows-actors-task.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/flows-actors/flows-actors-task.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAGH,OAAO,EAAE,qBAAqB,EAAoB,MAAM,gDAAgD,CAAC;AA4DzG;;;;;;;;;GASG;AACH,eAAO,MAAM,kCAAkC,oRAgL9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows-actors-task.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"flows-actors-task.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/flows-actors/flows-actors-task.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAsC,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAS/G,OAAO,EAGL,KAAK,4BAA4B,EAClC,MAAM,kDAAkD,CAAC;AAkB1D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8OlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAMxE;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,EAAE,4BAA4B,EAIlC,CAAC;AAExC;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAM/C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAe5C,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -27,6 +27,25 @@ export declare enum FlowsActors_Status {
|
|
|
27
27
|
CANCELLED = "cancelled",
|
|
28
28
|
ABORTED = "aborted"
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* What each run state MEANS to somebody watching a run — the words, made reachable.
|
|
32
|
+
*
|
|
33
|
+
* The members carry their meanings in JSDoc, which no runtime surface can read, so every surface
|
|
34
|
+
* that had to SHOW one either invented words or printed a bare token. The published API reference
|
|
35
|
+
* did the second: the top-level `status` field carries a description from its resource
|
|
36
|
+
* specification, and the identical enum one level down in `statusChanges[]` carried nothing,
|
|
37
|
+
* because field-doc injection reaches top-level properties only.
|
|
38
|
+
*
|
|
39
|
+
* Authored once here and rendered into every `.describe()` that needs it, so three schemas cannot
|
|
40
|
+
* drift into three accounts of one vocabulary. Exhaustive by type: a tenth state does not compile
|
|
41
|
+
* until it has been worded.
|
|
42
|
+
*/
|
|
43
|
+
export declare const FLOWS_ACTORS_STATUS_MEANINGS: Readonly<Record<FlowsActors_Status, string>>;
|
|
44
|
+
/**
|
|
45
|
+
* One `Values:` legend, in the shape the generated API reference already uses for a described enum,
|
|
46
|
+
* so a NESTED field reads exactly like a top-level one rather than like a second convention.
|
|
47
|
+
*/
|
|
48
|
+
export declare function describeFlowsActorsStatus(lead: string): string;
|
|
30
49
|
export declare const FlowsActors_LeafElements_RelationshipSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
31
50
|
kind: z.ZodLiteral<FlowsActors_ElementKind.ACTOR>;
|
|
32
51
|
actorId: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows-actors.commons.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"flows-actors.commons.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/flows-actors/flows-actors.commons.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC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33,6 +33,39 @@ export var FlowsActors_Status;
|
|
|
33
33
|
FlowsActors_Status["CANCELLED"] = "cancelled";
|
|
34
34
|
FlowsActors_Status["ABORTED"] = "aborted";
|
|
35
35
|
})(FlowsActors_Status || (FlowsActors_Status = {}));
|
|
36
|
+
/**
|
|
37
|
+
* What each run state MEANS to somebody watching a run — the words, made reachable.
|
|
38
|
+
*
|
|
39
|
+
* The members carry their meanings in JSDoc, which no runtime surface can read, so every surface
|
|
40
|
+
* that had to SHOW one either invented words or printed a bare token. The published API reference
|
|
41
|
+
* did the second: the top-level `status` field carries a description from its resource
|
|
42
|
+
* specification, and the identical enum one level down in `statusChanges[]` carried nothing,
|
|
43
|
+
* because field-doc injection reaches top-level properties only.
|
|
44
|
+
*
|
|
45
|
+
* Authored once here and rendered into every `.describe()` that needs it, so three schemas cannot
|
|
46
|
+
* drift into three accounts of one vocabulary. Exhaustive by type: a tenth state does not compile
|
|
47
|
+
* until it has been worded.
|
|
48
|
+
*/
|
|
49
|
+
export const FLOWS_ACTORS_STATUS_MEANINGS = {
|
|
50
|
+
[FlowsActors_Status.READY]: 'Created and ready to start; no work has been done yet.',
|
|
51
|
+
[FlowsActors_Status.PENDING]: 'Accepted and queued, waiting for a runner to pick it up.',
|
|
52
|
+
[FlowsActors_Status.PROCESSING]: 'Running now.',
|
|
53
|
+
[FlowsActors_Status.AWAITING_APPROVAL]: 'Paused at an approval point: it called something a person must authorize, and it resumes or ends when that decision arrives.',
|
|
54
|
+
[FlowsActors_Status.COMPLETED]: 'Finished, and did what it set out to do.',
|
|
55
|
+
[FlowsActors_Status.FAILED]: 'Stopped because something went wrong.',
|
|
56
|
+
[FlowsActors_Status.CANCELLED]: 'Stopped because somebody asked it to stop.',
|
|
57
|
+
[FlowsActors_Status.ABORTED]: 'Stopped by the system rather than by a person — a shutdown, a timeout, a lost runner.',
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* One `Values:` legend, in the shape the generated API reference already uses for a described enum,
|
|
61
|
+
* so a NESTED field reads exactly like a top-level one rather than like a second convention.
|
|
62
|
+
*/
|
|
63
|
+
export function describeFlowsActorsStatus(lead) {
|
|
64
|
+
const legend = Object.entries(FLOWS_ACTORS_STATUS_MEANINGS)
|
|
65
|
+
.map(([value, meaning]) => `- \`${value}\`: ${meaning}`)
|
|
66
|
+
.join('\n');
|
|
67
|
+
return `${lead}\n\nValues:\n${legend}`;
|
|
68
|
+
}
|
|
36
69
|
//===============================================================
|
|
37
70
|
// Relationship
|
|
38
71
|
//===============================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows-actors.commons.shared.schemas.js","sourceRoot":"","sources":["../../../../src/flows-actors/flows-actors.commons.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,iEAAiE;AACjE,WAAW;AACX,iEAAiE;AAEjE,MAAM,CAAN,IAAY,uBAQX;AARD,WAAY,uBAAuB;IACjC,wCAAa,CAAA;IACb,0CAAe,CAAA;IACf,wDAA6B,CAAA;IAC7B,kDAAuB,CAAA;IACvB,8CAAmB,CAAA;IACnB,8CAAmB,CAAA;IACnB,wDAA6B,CAAA;AAC/B,CAAC,EARW,uBAAuB,KAAvB,uBAAuB,QAQlC;AAED,MAAM,CAAN,IAAY,kBAkBX;AAlBD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,yCAAmB,CAAA;IACnB,+CAAyB,CAAA;IACzB;;;;;;;;OAQG;IACH,6DAAuC,CAAA;IACvC,6CAAuB,CAAA;IACvB,uCAAiB,CAAA;IACjB,6CAAuB,CAAA;IACvB,yCAAmB,CAAA;AACrB,CAAC,EAlBW,kBAAkB,KAAlB,kBAAkB,QAkB7B;AAED,iEAAiE;AACjE,gBAAgB;AAChB,iEAAiE;AAGjE,MAAM,CAAC,MAAM,2CAA2C,GAAG,CAAC,CAAC,kBAAkB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,CAAC,MAAM,CAAC;IACpD,KAAK,EAAG,2CAA2C;IACnD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,yBAAyB,EAAE,CAAC;IACpG,OAAO,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD,oBAAoB,EAAE,CAAC,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC,QAAQ,EAAE;IAC1E,KAAK,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IAC1C,WAAW,EAAE,6BAA6B,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;CAC9D,CAAC,CAAC;AAKH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,kBAAkB,CAAC;AAErE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,WAAW,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { ResourcePrimaryScope } from \"../resources/resources.shared.schemas\";\nimport { RolesSchema } from \"../security/authorizations/roles.shared.schemas\";\nimport { WildoError_BackendSchema } from \"../errors/errors.shared.schemas\";\n\n//===============================================================\n// General\n//===============================================================\n\nexport enum FlowsActors_ElementKind {\n FLOW = \"flow\",\n ACTOR = \"actor\",\n ACTOR_SYSTEM = \"actor.system\",\n FLOW_STEP = \"flow.step\",\n TASK = \"actor.task\",\n PLAN = \"actor.plan\",\n PLAN_STEP = \"actor.plan.step\",\n}\n\nexport enum FlowsActors_Status {\n READY = \"ready\",\n PENDING = \"pending\",\n PROCESSING = \"processing\",\n /**\n * The turn is SUSPENDED at a human-in-the-loop approval boundary: the agent called\n * an approval-gated tool, the run state is persisted (see `pausedApproval` on the\n * execution record), and the runtime is waiting for a decision — a\n * `FLOWS_ACTORS_APPROVAL_RESPONSE` over WebSocket, or an A2A `input-required` task\n * resolution. NON-terminal: resolves to PROCESSING→COMPLETED on approval, or a\n * terminal state on denial/expiry. Machine (org/app) turns never enter this state —\n * approval-gated tools are auto-denied for them (HITL is user-delegated-only in v1).\n */\n AWAITING_APPROVAL = \"awaiting_approval\",\n COMPLETED = \"completed\",\n FAILED = \"failed\",\n CANCELLED = \"cancelled\",\n ABORTED = \"aborted\",\n}\n\n//===============================================================\n// Relationship\n//===============================================================\n\n\nexport const FlowsActors_LeafElements_RelationshipSchema = z.discriminatedUnion(\"kind\", [\n z.object({\n kind: z.literal(FlowsActors_ElementKind.ACTOR),\n actorId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.FLOW_STEP),\n flowId: z.string(),\n stepId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.TASK),\n taskId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.PLAN_STEP),\n planId: z.string(),\n planStepId: z.string(),\n actorSystemId: z.string(),\n }),\n]);\nexport type FlowsActors_LeafElements_Relationship = z.infer<typeof FlowsActors_LeafElements_RelationshipSchema>;\n\n\nexport const FlowsActors_SimpleRelationshipSchema = z.discriminatedUnion(\"kind\", [\n z.object({\n kind: z.literal(FlowsActors_ElementKind.ACTOR),\n actorId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.FLOW),\n flowId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.FLOW_STEP),\n flowId: z.string(),\n stepId: z.string(),\n }),\n\n z.object({\n kind: z.literal(FlowsActors_ElementKind.TASK),\n taskId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.PLAN),\n planId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.ACTOR_SYSTEM),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.PLAN_STEP),\n planId: z.string(),\n planStepId: z.string(),\n actorSystemId: z.string(),\n }),\n]);\nexport type FlowsActors_SimpleRelationship = z.infer<typeof FlowsActors_SimpleRelationshipSchema>;\n\n\nexport enum FlowsActors_Relation {\n CREATED_BY = \"created_by\",\n PARENT_OF = \"parent_of\",\n CHILD_OF = \"child_of\",\n PART_OF = \"part_of\",\n IS_FALLBACK = \"is_fallback\",\n DEPENDS_ON = \"depends_on\",\n BLOCKED_BY = \"blocked_by\",\n}\n\nexport const FlowsActors_RelationshipSchema = z.discriminatedUnion(\"kind\", [\n z.object({\n kind: z.literal(FlowsActors_ElementKind.FLOW),\n relation: z.enum(FlowsActors_Relation),\n flowId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.ACTOR),\n relation: z.enum(FlowsActors_Relation),\n actorId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.FLOW_STEP),\n relation: z.enum(FlowsActors_Relation),\n flowId: z.string(),\n stepId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.TASK),\n relation: z.enum(FlowsActors_Relation),\n taskId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.PLAN),\n relation: z.enum(FlowsActors_Relation),\n planId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.PLAN_STEP),\n relation: z.enum(FlowsActors_Relation),\n planId: z.string(),\n planStepId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.ACTOR_SYSTEM),\n relation: z.enum(FlowsActors_Relation),\n actorSystemId: z.string(),\n }),\n]);\nexport type FlowsActors_Relationship = z.infer<typeof FlowsActors_RelationshipSchema>;\n\n//===============================================================\n// FlowsActors_Event\n// --------\n// FlowsActors_Events are immutable messages that flow through the system topics,\n// carrying payloads and metadata between flows and actors. They\n// enable loose coupling, traceability through correlation IDs,\n// and event sourcing patterns for building scalable, resilient\n// distributed systems with clear audit trails.\n//===============================================================\n\nexport enum FlowsActors_Event_DeliveryStatus {\n PENDING = \"pending\",\n DELIVERED = \"delivered\",\n FAILED = \"failed\",\n DEAD_LETTER = \"dead_letter\",\n}\n\nexport enum FlowsActors_Event_Type {\n\n COMPLETED = \"completed\",\n FAILED = \"failed\",\n CANCELLED = \"cancelled\",\n ABORTED = \"aborted\",\n REQUESTED = \"requested\",\n ACTIONED = \"actioned\",\n}\n\nexport const FlowsActors_Event_ContextSchema = z.object({});\nexport type FlowsActors_Event_Context = z.infer<typeof FlowsActors_Event_ContextSchema>;\n\nexport const FlowsActors_EventSchema = z.object({\n _id: z.string().optional(),\n eventType: z.enum(FlowsActors_Event_Type),\n origin : FlowsActors_SimpleRelationshipSchema.optional(),\n eventContext: FlowsActors_Event_ContextSchema.optional(),\n\n topic: z.string(),\n payload: z.any(),\n\n sequenceNumber: z.number().optional(),\n tracking : z.object({\n timestamp: z.string(),\n\n correlationId: z.string().optional(),\n causationId: z.string().optional(),\n }),\n});\nexport type FlowsActors_Event = z.infer<typeof FlowsActors_EventSchema>;\n\nexport const FlowsActors_Event_TemplateSchema = z.object({\n eventType: z.string(),\n eventContext: FlowsActors_Event_ContextSchema.optional(),\n topic: z.string(),\n\n payloadMapping: z.record(z.string(), z.string()),\n});\nexport type FlowsActors_Event_Template = z.infer<typeof FlowsActors_Event_TemplateSchema>;\n\n//===============================================================\n// State\n//===============================================================\nexport enum FlowsActors_CircuitBreaker_Status {\n CLOSED = \"closed\", // circuit is closed, requests are allowed\n OPEN = \"open\", // circuit is open, requests are blocked\n HALF_OPEN = \"half_open\", // circuit is half-open, requests are allowed after a timeout\n}\n\nexport const FlowsActors_Checkpoint_Schema = z.object({\n point : FlowsActors_LeafElements_RelationshipSchema,\n timestamp: z.string().refine((val) => !isNaN(Date.parse(val)), { error: 'Invalid datetime string' }),\n context: z.any().optional(),\n});\nexport type FlowsActors_Checkpoint = z.infer<typeof FlowsActors_Checkpoint_Schema>;\n\nexport const FlowsActors_Error_State_BaseSchema = z.object({\n circuitBreakerStatus: z.enum(FlowsActors_CircuitBreaker_Status).optional(),\n error: WildoError_BackendSchema.optional(),\n checkpoints: FlowsActors_Checkpoint_Schema.array().optional(),\n});\nexport type FlowsActors_Error_State_Base = z.infer<typeof FlowsActors_Error_State_BaseSchema>;\n\n\n\n/**\n * The stored `machineCredentialId` of a turn that had NO machine credential — i.e. a\n * user-delegated turn, where the human IS the principal and `userId` already discriminates.\n *\n * ## Why a sentinel rather than an absent field\n *\n * Both flows-actors families (executions and tasks) are owned by an injected scope FK, and for the\n * MACHINE variants that FK does not identify the principal:\n *\n * - `applicationId` is a DEPLOYMENT SINGLETON, so every app-scope OAuth client resolves to the\n * same owner filter — client B could read and cancel client A's work.\n * - `organizationId` is shared by every machine client of one tenant, with the same consequence\n * inside that tenant.\n *\n * Since the conversation title / task title carries the opening characters of the originating\n * prompt, that is a cross-client disclosure of prompt text between separately-credentialed\n * principals — the harm the per-agent axis was added to prevent, one axis short.\n *\n * Storing a normalised value on EVERY row (rather than leaving user-delegated rows null) keeps the\n * filter a plain equality on both persistence adapters, instead of depending on how each one\n * matches an absent field. The `*` characters cannot occur in a credential id.\n */\nexport const FLOWS_ACTORS_NO_MACHINE_CREDENTIAL = '*user-delegated*';\n\n/**\n * The stored agent identity of the DEFAULT (unnamed) A2A agent, and of any transport that has no\n * agent at all — the WebSocket conversation surface.\n *\n * Declared A2A instance refs are constrained to `^[a-z0-9][a-z0-9-]*$`, so the `*` characters make\n * this unreachable by any real ref. Storing a normalised value on EVERY row keeps the read filter a\n * plain equality on both persistence adapters rather than depending on how each matches an absent\n * field.\n *\n * ONE source for both families: `A2A_DEFAULT_INSTANCE_REF` aliases this rather than restating it,\n * because two constants with the same literal are exactly how the task and execution planes would\n * drift apart.\n */\nexport const FLOWS_ACTORS_DEFAULT_AGENT_INSTANCE = '*default*';\n"]}
|
|
1
|
+
{"version":3,"file":"flows-actors.commons.shared.schemas.js","sourceRoot":"","sources":["../../../src/flows-actors/flows-actors.commons.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,iEAAiE;AACjE,WAAW;AACX,iEAAiE;AAEjE,MAAM,CAAN,IAAY,uBAQX;AARD,WAAY,uBAAuB;IACjC,wCAAa,CAAA;IACb,0CAAe,CAAA;IACf,wDAA6B,CAAA;IAC7B,kDAAuB,CAAA;IACvB,8CAAmB,CAAA;IACnB,8CAAmB,CAAA;IACnB,wDAA6B,CAAA;AAC/B,CAAC,EARW,uBAAuB,KAAvB,uBAAuB,QAQlC;AAED,MAAM,CAAN,IAAY,kBAkBX;AAlBD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,yCAAmB,CAAA;IACnB,+CAAyB,CAAA;IACzB;;;;;;;;OAQG;IACH,6DAAuC,CAAA;IACvC,6CAAuB,CAAA;IACvB,uCAAiB,CAAA;IACjB,6CAAuB,CAAA;IACvB,yCAAmB,CAAA;AACrB,CAAC,EAlBW,kBAAkB,KAAlB,kBAAkB,QAkB7B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAiD;IACxF,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,wDAAwD;IACpF,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,0DAA0D;IACxF,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,cAAc;IAC/C,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,EAAE,8HAA8H;IACtK,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,0CAA0C;IAC1E,CAAC,kBAAkB,CAAC,MAAM,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AkB,CAAC;AAErE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,WAAW,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { ResourcePrimaryScope } from \"../resources/resources.shared.schemas\";\nimport { RolesSchema } from \"../security/authorizations/roles.shared.schemas\";\nimport { WildoError_BackendSchema } from \"../errors/errors.shared.schemas\";\n\n//===============================================================\n// General\n//===============================================================\n\nexport enum FlowsActors_ElementKind {\n FLOW = \"flow\",\n ACTOR = \"actor\",\n ACTOR_SYSTEM = \"actor.system\",\n FLOW_STEP = \"flow.step\",\n TASK = \"actor.task\",\n PLAN = \"actor.plan\",\n PLAN_STEP = \"actor.plan.step\",\n}\n\nexport enum FlowsActors_Status {\n READY = \"ready\",\n PENDING = \"pending\",\n PROCESSING = \"processing\",\n /**\n * The turn is SUSPENDED at a human-in-the-loop approval boundary: the agent called\n * an approval-gated tool, the run state is persisted (see `pausedApproval` on the\n * execution record), and the runtime is waiting for a decision — a\n * `FLOWS_ACTORS_APPROVAL_RESPONSE` over WebSocket, or an A2A `input-required` task\n * resolution. NON-terminal: resolves to PROCESSING→COMPLETED on approval, or a\n * terminal state on denial/expiry. Machine (org/app) turns never enter this state —\n * approval-gated tools are auto-denied for them (HITL is user-delegated-only in v1).\n */\n AWAITING_APPROVAL = \"awaiting_approval\",\n COMPLETED = \"completed\",\n FAILED = \"failed\",\n CANCELLED = \"cancelled\",\n ABORTED = \"aborted\",\n}\n\n/**\n * What each run state MEANS to somebody watching a run — the words, made reachable.\n *\n * The members carry their meanings in JSDoc, which no runtime surface can read, so every surface\n * that had to SHOW one either invented words or printed a bare token. The published API reference\n * did the second: the top-level `status` field carries a description from its resource\n * specification, and the identical enum one level down in `statusChanges[]` carried nothing,\n * because field-doc injection reaches top-level properties only.\n *\n * Authored once here and rendered into every `.describe()` that needs it, so three schemas cannot\n * drift into three accounts of one vocabulary. Exhaustive by type: a tenth state does not compile\n * until it has been worded.\n */\nexport const FLOWS_ACTORS_STATUS_MEANINGS: Readonly<Record<FlowsActors_Status, string>> = {\n [FlowsActors_Status.READY]: 'Created and ready to start; no work has been done yet.',\n [FlowsActors_Status.PENDING]: 'Accepted and queued, waiting for a runner to pick it up.',\n [FlowsActors_Status.PROCESSING]: 'Running now.',\n [FlowsActors_Status.AWAITING_APPROVAL]: 'Paused at an approval point: it called something a person must authorize, and it resumes or ends when that decision arrives.',\n [FlowsActors_Status.COMPLETED]: 'Finished, and did what it set out to do.',\n [FlowsActors_Status.FAILED]: 'Stopped because something went wrong.',\n [FlowsActors_Status.CANCELLED]: 'Stopped because somebody asked it to stop.',\n [FlowsActors_Status.ABORTED]: 'Stopped by the system rather than by a person — a shutdown, a timeout, a lost runner.',\n};\n\n/**\n * One `Values:` legend, in the shape the generated API reference already uses for a described enum,\n * so a NESTED field reads exactly like a top-level one rather than like a second convention.\n */\nexport function describeFlowsActorsStatus(lead: string): string {\n const legend = Object.entries(FLOWS_ACTORS_STATUS_MEANINGS)\n .map(([value, meaning]) => `- \\`${value}\\`: ${meaning}`)\n .join('\\n');\n return `${lead}\\n\\nValues:\\n${legend}`;\n}\n\n//===============================================================\n// Relationship\n//===============================================================\n\n\nexport const FlowsActors_LeafElements_RelationshipSchema = z.discriminatedUnion(\"kind\", [\n z.object({\n kind: z.literal(FlowsActors_ElementKind.ACTOR),\n actorId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.FLOW_STEP),\n flowId: z.string(),\n stepId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.TASK),\n taskId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.PLAN_STEP),\n planId: z.string(),\n planStepId: z.string(),\n actorSystemId: z.string(),\n }),\n]);\nexport type FlowsActors_LeafElements_Relationship = z.infer<typeof FlowsActors_LeafElements_RelationshipSchema>;\n\n\nexport const FlowsActors_SimpleRelationshipSchema = z.discriminatedUnion(\"kind\", [\n z.object({\n kind: z.literal(FlowsActors_ElementKind.ACTOR),\n actorId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.FLOW),\n flowId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.FLOW_STEP),\n flowId: z.string(),\n stepId: z.string(),\n }),\n\n z.object({\n kind: z.literal(FlowsActors_ElementKind.TASK),\n taskId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.PLAN),\n planId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.ACTOR_SYSTEM),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.PLAN_STEP),\n planId: z.string(),\n planStepId: z.string(),\n actorSystemId: z.string(),\n }),\n]);\nexport type FlowsActors_SimpleRelationship = z.infer<typeof FlowsActors_SimpleRelationshipSchema>;\n\n\nexport enum FlowsActors_Relation {\n CREATED_BY = \"created_by\",\n PARENT_OF = \"parent_of\",\n CHILD_OF = \"child_of\",\n PART_OF = \"part_of\",\n IS_FALLBACK = \"is_fallback\",\n DEPENDS_ON = \"depends_on\",\n BLOCKED_BY = \"blocked_by\",\n}\n\nexport const FlowsActors_RelationshipSchema = z.discriminatedUnion(\"kind\", [\n z.object({\n kind: z.literal(FlowsActors_ElementKind.FLOW),\n relation: z.enum(FlowsActors_Relation),\n flowId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.ACTOR),\n relation: z.enum(FlowsActors_Relation),\n actorId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.FLOW_STEP),\n relation: z.enum(FlowsActors_Relation),\n flowId: z.string(),\n stepId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.TASK),\n relation: z.enum(FlowsActors_Relation),\n taskId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.PLAN),\n relation: z.enum(FlowsActors_Relation),\n planId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.PLAN_STEP),\n relation: z.enum(FlowsActors_Relation),\n planId: z.string(),\n planStepId: z.string(),\n actorSystemId: z.string(),\n }),\n z.object({\n kind: z.literal(FlowsActors_ElementKind.ACTOR_SYSTEM),\n relation: z.enum(FlowsActors_Relation),\n actorSystemId: z.string(),\n }),\n]);\nexport type FlowsActors_Relationship = z.infer<typeof FlowsActors_RelationshipSchema>;\n\n//===============================================================\n// FlowsActors_Event\n// --------\n// FlowsActors_Events are immutable messages that flow through the system topics,\n// carrying payloads and metadata between flows and actors. They\n// enable loose coupling, traceability through correlation IDs,\n// and event sourcing patterns for building scalable, resilient\n// distributed systems with clear audit trails.\n//===============================================================\n\nexport enum FlowsActors_Event_DeliveryStatus {\n PENDING = \"pending\",\n DELIVERED = \"delivered\",\n FAILED = \"failed\",\n DEAD_LETTER = \"dead_letter\",\n}\n\nexport enum FlowsActors_Event_Type {\n\n COMPLETED = \"completed\",\n FAILED = \"failed\",\n CANCELLED = \"cancelled\",\n ABORTED = \"aborted\",\n REQUESTED = \"requested\",\n ACTIONED = \"actioned\",\n}\n\nexport const FlowsActors_Event_ContextSchema = z.object({});\nexport type FlowsActors_Event_Context = z.infer<typeof FlowsActors_Event_ContextSchema>;\n\nexport const FlowsActors_EventSchema = z.object({\n _id: z.string().optional(),\n eventType: z.enum(FlowsActors_Event_Type),\n origin : FlowsActors_SimpleRelationshipSchema.optional(),\n eventContext: FlowsActors_Event_ContextSchema.optional(),\n\n topic: z.string(),\n payload: z.any(),\n\n sequenceNumber: z.number().optional(),\n tracking : z.object({\n timestamp: z.string(),\n\n correlationId: z.string().optional(),\n causationId: z.string().optional(),\n }),\n});\nexport type FlowsActors_Event = z.infer<typeof FlowsActors_EventSchema>;\n\nexport const FlowsActors_Event_TemplateSchema = z.object({\n eventType: z.string(),\n eventContext: FlowsActors_Event_ContextSchema.optional(),\n topic: z.string(),\n\n payloadMapping: z.record(z.string(), z.string()),\n});\nexport type FlowsActors_Event_Template = z.infer<typeof FlowsActors_Event_TemplateSchema>;\n\n//===============================================================\n// State\n//===============================================================\nexport enum FlowsActors_CircuitBreaker_Status {\n CLOSED = \"closed\", // circuit is closed, requests are allowed\n OPEN = \"open\", // circuit is open, requests are blocked\n HALF_OPEN = \"half_open\", // circuit is half-open, requests are allowed after a timeout\n}\n\nexport const FlowsActors_Checkpoint_Schema = z.object({\n point : FlowsActors_LeafElements_RelationshipSchema,\n timestamp: z.string().refine((val) => !isNaN(Date.parse(val)), { error: 'Invalid datetime string' }),\n context: z.any().optional(),\n});\nexport type FlowsActors_Checkpoint = z.infer<typeof FlowsActors_Checkpoint_Schema>;\n\nexport const FlowsActors_Error_State_BaseSchema = z.object({\n circuitBreakerStatus: z.enum(FlowsActors_CircuitBreaker_Status).optional(),\n error: WildoError_BackendSchema.optional(),\n checkpoints: FlowsActors_Checkpoint_Schema.array().optional(),\n});\nexport type FlowsActors_Error_State_Base = z.infer<typeof FlowsActors_Error_State_BaseSchema>;\n\n\n\n/**\n * The stored `machineCredentialId` of a turn that had NO machine credential — i.e. a\n * user-delegated turn, where the human IS the principal and `userId` already discriminates.\n *\n * ## Why a sentinel rather than an absent field\n *\n * Both flows-actors families (executions and tasks) are owned by an injected scope FK, and for the\n * MACHINE variants that FK does not identify the principal:\n *\n * - `applicationId` is a DEPLOYMENT SINGLETON, so every app-scope OAuth client resolves to the\n * same owner filter — client B could read and cancel client A's work.\n * - `organizationId` is shared by every machine client of one tenant, with the same consequence\n * inside that tenant.\n *\n * Since the conversation title / task title carries the opening characters of the originating\n * prompt, that is a cross-client disclosure of prompt text between separately-credentialed\n * principals — the harm the per-agent axis was added to prevent, one axis short.\n *\n * Storing a normalised value on EVERY row (rather than leaving user-delegated rows null) keeps the\n * filter a plain equality on both persistence adapters, instead of depending on how each one\n * matches an absent field. The `*` characters cannot occur in a credential id.\n */\nexport const FLOWS_ACTORS_NO_MACHINE_CREDENTIAL = '*user-delegated*';\n\n/**\n * The stored agent identity of the DEFAULT (unnamed) A2A agent, and of any transport that has no\n * agent at all — the WebSocket conversation surface.\n *\n * Declared A2A instance refs are constrained to `^[a-z0-9][a-z0-9-]*$`, so the `*` characters make\n * this unreachable by any real ref. Storing a normalised value on EVERY row keeps the read filter a\n * plain equality on both persistence adapters rather than depending on how each matches an absent\n * field.\n *\n * ONE source for both families: `A2A_DEFAULT_INSTANCE_REF` aliases this rather than restating it,\n * because two constants with the same literal are exactly how the task and execution planes would\n * drift apart.\n */\nexport const FLOWS_ACTORS_DEFAULT_AGENT_INSTANCE = '*default*';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows-actors.configuration.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"flows-actors.configuration.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/flows-actors/flows-actors.configuration.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,6BAA6B,EAAE,MAAM,sEAAsE,CAAC;AAGrH,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAqBzG,eAAO,MAAM,+BAA+B;;;;;;;;iBAQ1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAMxF,eAAO,MAAM,+CAA+C;;;;;;;;;;;;;;;;;;;;;;;;iBAS1D,CAAC;AACH,MAAM,MAAM,wCAAwC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+CAA+C,CAAC,CAAC;AAEvH,eAAO,MAAM,0CAA0C;;;;;;;;;;;;;;;;iBAOrD,CAAC;AACH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0CAA0C,CAAC,CAAC;AAE7G,eAAO,MAAM,yCAAyC;;;;;;;;;;;iBAMpD,CAAC;AACH,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAC;AAE3G,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAItD,CAAC;AACH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,CAAC;AAE/G,eAAO,MAAM,2CAA2C;;;;;;;;iBAQtD,CAAC;AACH,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,CAAC;AAEhH,eAAO,MAAM,6CAA6C;;;;;;;;;;;;iBAIxD,CAAC;AACH,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6CAA6C,CAAC,CAAC;AAEnH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAS3C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows-actors.frontend.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"flows-actors.frontend.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/flows-actors/flows-actors.frontend.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAazG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AAO,6CAA6C,CAAC,CAAC"}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/**
|
|
3
|
-
* The artifact MODALITY axis
|
|
4
|
-
* uses to
|
|
5
|
-
* `operationDefinition.outputModality` names its produced modality; the
|
|
6
|
-
* executor resolves that modality to a provider protocol (TEXT/STRUCTURED →
|
|
7
|
-
* `LLM_PROVIDER`, IMAGE → `IMAGE_PROVIDER`, CODING → `AGENT_CLIENT_PROTOCOL`, …).
|
|
3
|
+
* The artifact MODALITY axis: the single vocabulary the actor-agent system
|
|
4
|
+
* uses to DESCRIBE what an operation consumes and produces.
|
|
8
5
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
6
|
+
* It is descriptive, not a dispatch key. Which provider protocol an agent
|
|
7
|
+
* reaches is decided by the arm of its `config` discriminated union (an image
|
|
8
|
+
* configuration routes to `IMAGE_PROVIDER`, a coding-agent configuration to
|
|
9
|
+
* `AGENT_CLIENT_PROTOCOL`, anything else to the `LLM_PROVIDER` path). An
|
|
10
|
+
* agent's `outputModality` is not read on that path.
|
|
11
|
+
*
|
|
12
|
+
* IMAGE is wired (gpt-image logo generation). AUDIO and VIDEO are RESERVED and
|
|
13
|
+
* no provider serves either. Nothing refuses them by modality: the
|
|
14
|
+
* configuration union simply has no audio or video arm, so an agent that would
|
|
15
|
+
* produce one cannot be declared. Adding such an arm therefore means adding the
|
|
16
|
+
* `AUDIO_PROVIDER` / `VIDEO_PROVIDER` transport in the same change, or the new
|
|
17
|
+
* arm reaches the LLM path and is answered by the wrong protocol.
|
|
13
18
|
*/
|
|
14
19
|
export declare enum FlowsActors_IO_PartKind {
|
|
15
20
|
TEXT = "text",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows-actors.io.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"flows-actors.io.shared.schemas.d.ts","sourceRoot":"","sources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
9
|
// of generated content across workflow executions.
|
|
10
10
|
//===============================================================
|
|
11
11
|
/**
|
|
12
|
-
* The artifact MODALITY axis
|
|
13
|
-
* uses to
|
|
14
|
-
* `operationDefinition.outputModality` names its produced modality; the
|
|
15
|
-
* executor resolves that modality to a provider protocol (TEXT/STRUCTURED →
|
|
16
|
-
* `LLM_PROVIDER`, IMAGE → `IMAGE_PROVIDER`, CODING → `AGENT_CLIENT_PROTOCOL`, …).
|
|
12
|
+
* The artifact MODALITY axis: the single vocabulary the actor-agent system
|
|
13
|
+
* uses to DESCRIBE what an operation consumes and produces.
|
|
17
14
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
15
|
+
* It is descriptive, not a dispatch key. Which provider protocol an agent
|
|
16
|
+
* reaches is decided by the arm of its `config` discriminated union (an image
|
|
17
|
+
* configuration routes to `IMAGE_PROVIDER`, a coding-agent configuration to
|
|
18
|
+
* `AGENT_CLIENT_PROTOCOL`, anything else to the `LLM_PROVIDER` path). An
|
|
19
|
+
* agent's `outputModality` is not read on that path.
|
|
20
|
+
*
|
|
21
|
+
* IMAGE is wired (gpt-image logo generation). AUDIO and VIDEO are RESERVED and
|
|
22
|
+
* no provider serves either. Nothing refuses them by modality: the
|
|
23
|
+
* configuration union simply has no audio or video arm, so an agent that would
|
|
24
|
+
* produce one cannot be declared. Adding such an arm therefore means adding the
|
|
25
|
+
* `AUDIO_PROVIDER` / `VIDEO_PROVIDER` transport in the same change, or the new
|
|
26
|
+
* arm reaches the LLM path and is answered by the wrong protocol.
|
|
22
27
|
*/
|
|
23
28
|
export var FlowsActors_IO_PartKind;
|
|
24
29
|
(function (FlowsActors_IO_PartKind) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows-actors.io.shared.schemas.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"flows-actors.io.shared.schemas.js","sourceRoot":"","sources":["../../../src/flows-actors/flows-actors.io.shared.schemas.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AAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;SAC/C,CAAC;KACH,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAmC,uBAAuB,CAAC","sourcesContent":["import { z } from \"zod\";\n\n\n\n//===============================================================\n// Artifact\n// --------\n// Artifacts are outputs generated by steps during task execution,\n// including text, files, structured data, and binary content.\n// They provide persistent storage for intermediate and final results,\n// enabling data flow between steps, audit trails, and retrieval\n// of generated content across workflow executions.\n//===============================================================\n\n/**\n * The artifact MODALITY axis: the single vocabulary the actor-agent system\n * uses to DESCRIBE what an operation consumes and produces.\n *\n * It is descriptive, not a dispatch key. Which provider protocol an agent\n * reaches is decided by the arm of its `config` discriminated union (an image\n * configuration routes to `IMAGE_PROVIDER`, a coding-agent configuration to\n * `AGENT_CLIENT_PROTOCOL`, anything else to the `LLM_PROVIDER` path). An\n * agent's `outputModality` is not read on that path.\n *\n * IMAGE is wired (gpt-image logo generation). AUDIO and VIDEO are RESERVED and\n * no provider serves either. Nothing refuses them by modality: the\n * configuration union simply has no audio or video arm, so an agent that would\n * produce one cannot be declared. Adding such an arm therefore means adding the\n * `AUDIO_PROVIDER` / `VIDEO_PROVIDER` transport in the same change, or the new\n * arm reaches the LLM path and is answered by the wrong protocol.\n */\nexport enum FlowsActors_IO_PartKind {\n TEXT = \"text\",\n FILE = \"file\",\n RAW_DATA = \"raw_data\",\n STRUCTURED = \"structured\",\n /** Generated image bytes (text-to-image). Wired via `IMAGE_PROVIDER`. */\n IMAGE = \"image\",\n /** RESERVED — generated audio. No transport yet; executor fail-closes. */\n AUDIO = \"audio\",\n /** RESERVED — generated video. No transport yet; executor fail-closes. */\n VIDEO = \"video\",\n}\n\n\n\nconst _ArtifactDefinitionSchema = z.object({\n type: z.enum(FlowsActors_IO_PartKind),\n ref: z.string(),\n displayName: z.string(),\n description: z.string().optional(),\n specs: z.any()\n});\n\nexport const ArtifactDefinitionSchema: typeof _ArtifactDefinitionSchema = _ArtifactDefinitionSchema;\nexport type ArtifactDefinition = z.infer<typeof _ArtifactDefinitionSchema>;\n\nconst _ArtifactInstance_ContentBaseSchema = z.object({\n mimeType: z.string().optional(),\n size: z.number().optional(),\n checksum: z.string().optional(),\n});\n\nexport const ArtifactInstance_ContentBaseSchema: typeof _ArtifactInstance_ContentBaseSchema = _ArtifactInstance_ContentBaseSchema;\nexport type ArtifactInstance_ContentBase = z.infer<typeof _ArtifactInstance_ContentBaseSchema>;\n\nconst _ArtifactInstance_BaseSchema = z.object({\n ref: z.string(),\n definitionRef: z.string().optional(),\n type: z.enum(FlowsActors_IO_PartKind),\n name: z.string(),\n description: z.string().optional(),\n origin : z.object({\n taskId: z.string().optional(),\n stepId: z.string().optional(),\n }),\n \n \n content: z.any(),\n \n createdAt: z.string(),\n metadata: z.record(z.string(), z.unknown()).optional(),\n});\n\nexport const ArtifactInstance_BaseSchema: typeof _ArtifactInstance_BaseSchema = _ArtifactInstance_BaseSchema;\nexport type ArtifactInstance_Base = z.infer<typeof _ArtifactInstance_BaseSchema>;\n\n\nconst _ArtifactInstanceSchema = z.discriminatedUnion(\"type\", [\n _ArtifactInstance_BaseSchema.extend({ \n type: z.literal(FlowsActors_IO_PartKind.TEXT), \n content: _ArtifactInstance_ContentBaseSchema.extend({ \n text: z.string() \n }) \n }),\n _ArtifactInstance_BaseSchema.extend({ \n type: z.literal(FlowsActors_IO_PartKind.FILE), \n content: _ArtifactInstance_ContentBaseSchema.extend({ \n storage: z.object({ data: z.string().optional(), url: z.string().optional(), path: z.string().optional() }) \n }) \n }),\n _ArtifactInstance_BaseSchema.extend({ \n type: z.literal(FlowsActors_IO_PartKind.RAW_DATA), \n content: _ArtifactInstance_ContentBaseSchema.extend({ \n // Artifact instances are durable/client-visible values, so they carry only\n // the produced data. The executable Zod contract that validated the value\n // remains in the runtime invocation contract, identified there by schema\n // ref + digest; embedding a Zod instance here would neither serialize nor\n // have an OpenAPI representation.\n data: z.any(),\n }) \n }),\n _ArtifactInstance_BaseSchema.extend({\n type: z.literal(FlowsActors_IO_PartKind.STRUCTURED),\n content: _ArtifactInstance_ContentBaseSchema.extend({\n // Keep this branch symmetrical with RAW_DATA: validation authority is a\n // runtime contract, while the persisted artifact is the validated value.\n data: z.any(),\n })\n }),\n _ArtifactInstance_BaseSchema.extend({\n type: z.literal(FlowsActors_IO_PartKind.IMAGE),\n content: _ArtifactInstance_ContentBaseSchema.extend({\n // Same storage triad as FILE — a generated image is a file whose\n // modality carries pixel dimensions worth surfacing without fetching.\n storage: z.object({ data: z.string().optional(), url: z.string().optional(), path: z.string().optional() }),\n width: z.number().int().positive().optional(),\n height: z.number().int().positive().optional(),\n })\n }),\n]);\n\nexport const ArtifactInstanceSchema: typeof _ArtifactInstanceSchema = _ArtifactInstanceSchema;\nexport type ArtifactInstance = z.infer<typeof _ArtifactInstanceSchema>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows-actors.system.shared.definitions.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"flows-actors.system.shared.definitions.d.ts","sourceRoot":"","sources":["../../../src/flows-actors/flows-actors.system.shared.definitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAgBzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows-actors.system.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"flows-actors.system.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/flows-actors/flows-actors.system.shared.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAiC,iCAAiC,EAAE,kBAAkB,EAA6B,MAAM,uCAAuC,CAAC;AAyBxK,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,oBAAY,sBAAsB;IAChC,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,QAAQ,aAAa;CACtB;AAED,oBAAY,0BAA0B;IACpC,YAAY,iBAAiB;IAC7B,QAAQ,aAAa;CACtB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoBrC,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAQ9E,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAS7C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE7F,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;iBAgB1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { FlowsActors_Configuration_Schema } from './flows-actors.configuration.shared.schemas.js';
|
|
3
|
-
import { FlowsActors_Checkpoint_Schema, FlowsActors_CircuitBreaker_Status, FlowsActors_Status } from './flows-actors.commons.shared.schemas.js';
|
|
3
|
+
import { FlowsActors_Checkpoint_Schema, FlowsActors_CircuitBreaker_Status, FlowsActors_Status, describeFlowsActorsStatus } from './flows-actors.commons.shared.schemas.js';
|
|
4
4
|
import { WildoError_BackendSchema } from '../errors/errors.shared.schemas.js';
|
|
5
5
|
import { ExecutionContext_InitiatorIdsSchema } from '../runtime/execution-context.shared.schemas.js';
|
|
6
6
|
//===============================================================
|
|
@@ -93,7 +93,8 @@ export const FlowActorSystem_ExecutionSchema = z.object({
|
|
|
93
93
|
status: z.enum(FlowsActors_Status),
|
|
94
94
|
initiator: ExecutionContext_InitiatorIdsSchema.optional(),
|
|
95
95
|
statusChanges: z.array(z.object({
|
|
96
|
-
status: z.enum(FlowsActors_Status)
|
|
96
|
+
status: z.enum(FlowsActors_Status)
|
|
97
|
+
.describe(describeFlowsActorsStatus("The state this run moved into at `timestamp`. The list is the run's history, oldest first.")),
|
|
97
98
|
timestamp: z.string().refine((val) => !isNaN(Date.parse(val)), { error: 'Invalid datetime string' }),
|
|
98
99
|
})),
|
|
99
100
|
createdAt: z.string().refine((val) => !isNaN(Date.parse(val)), { error: 'Invalid datetime string' }),
|