@wildo-ai/saas-models 1.1.7 → 1.1.9
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/_inspect.d.ts.map +1 -1
- package/dist/esm/_inspect.js.map +1 -1
- package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-metadata.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-subject.shared.schemas.js.map +1 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications-context.schemas.js.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.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/applications/applications.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
- package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
- 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.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/credit-pool.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -1
- package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -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.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product-definition.shared.schemas.js.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
- 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.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/promotions.shared.schemas.js.map +1 -1
- package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts.map +1 -1
- package/dist/esm/billing/public-pricing-catalog.shared.atoms.js.map +1 -1
- package/dist/esm/billing/public-pricing-catalog.shared.d.ts.map +1 -1
- package/dist/esm/billing/public-pricing-catalog.shared.js.map +1 -1
- package/dist/esm/billing/referral-reward.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral-reward.shared.schemas.js.map +1 -1
- package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/referral.shared.schemas.js.map +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.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
- package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -1
- package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
- 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/aggregation-query.shared.schemas.js.map +1 -1
- package/dist/esm/charts/aggregation.shared.definitions.d.ts.map +1 -1
- package/dist/esm/charts/aggregation.shared.definitions.js.map +1 -1
- package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
- package/dist/esm/charts/chart-definition-builder.shared.js.map +1 -1
- package/dist/esm/companion/artifact-placement.shared.definitions.d.ts.map +1 -1
- package/dist/esm/companion/artifact-placement.shared.definitions.js.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +13 -0
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js +13 -0
- 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/shared-library-companion.shared.definitions.js.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.js.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-logs.shared.resources-config.schemas.js.map +1 -1
- 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.map +1 -1
- 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.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.map +1 -1
- package/dist/esm/compliance/data-classification/data-classification.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/data-classification/data-classification.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -1
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -1
- package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js.map +1 -1
- package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
- 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 +32 -1
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +32 -0
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.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-category.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.js.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/retention-binding.shared.utils.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/retention-enforcement-records.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/retention-schedule.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js.map +1 -1
- package/dist/esm/compliance/privacy/sharing.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/sharing.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.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-render.shared.utils.js.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.map +1 -1
- package/dist/esm/compliance/review-cadence.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/risk-posture.shared.schemas.d.ts +15 -3
- package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/risk-posture.shared.schemas.js +14 -2
- package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
- package/dist/esm/config/app-frontend-type.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/app-frontend-type.shared.schemas.js.map +1 -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.map +1 -1
- package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -1
- package/dist/esm/config/configuration-validation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/configuration-validation.shared.schemas.js.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/chart-definition.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
- 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/navigation.shared.schemas.js.map +1 -1
- package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
- package/dist/esm/config/postgresql.shared.schemas.d.ts.map +1 -1
- package/dist/esm/config/postgresql.shared.schemas.js.map +1 -1
- package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
- package/dist/esm/config/registration-acquisition-policy.shared.utils.js.map +1 -1
- package/dist/esm/config-authoring.entry.d.ts.map +1 -1
- package/dist/esm/config-authoring.entry.js.map +1 -1
- package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
- package/dist/esm/crdt/crdt-merge.shared.utils.js.map +1 -1
- package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/data-seeding/data-seeding-config.shared.schemas.js.map +1 -1
- package/dist/esm/errors/caught-error-description.shared.utils.d.ts.map +1 -1
- package/dist/esm/errors/caught-error-description.shared.utils.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
- package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
- package/dist/esm/errors/errors.shared.utils.js.map +1 -1
- package/dist/esm/errors/resource-access-forbidden.shared.error.d.ts.map +1 -1
- package/dist/esm/errors/resource-access-forbidden.shared.error.js.map +1 -1
- package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -1
- package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -1
- package/dist/esm/errors/zod-issue-formatting.shared.utils.d.ts.map +1 -1
- package/dist/esm/errors/zod-issue-formatting.shared.utils.js.map +1 -1
- package/dist/esm/exports/tabular-csv.shared.utils.d.ts.map +1 -1
- package/dist/esm/exports/tabular-csv.shared.utils.js.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-description.shared.js.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js.map +1 -1
- 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/external-data-provenance.shared.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-provenance.shared.js.map +1 -1
- package/dist/esm/external-data.exports.d.ts.map +1 -1
- package/dist/esm/external-data.exports.js.map +1 -1
- package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/compose-provider-registry.shared.js.map +1 -1
- package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
- package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -1
- package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
- package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js.map +1 -1
- package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js.map +1 -1
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
- package/dist/esm/external-providers/provider-usage-cost.shared.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-usage-cost.shared.js.map +1 -1
- package/dist/esm/external-providers/provider-usage-pricing.example.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-usage-pricing.example.js.map +1 -1
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js.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.map +1 -1
- package/dist/esm/features/connected-feature.example.d.ts.map +1 -1
- package/dist/esm/features/connected-feature.example.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.map +1 -1
- package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
- 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-definition.shared.schemas.js.map +1 -1
- package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
- package/dist/esm/features/feature-registry.shared.js.map +1 -1
- package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/feature-resolution.shared.schemas.js.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/features/scope-features.shared.schemas.js.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.map +1 -1
- package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -1
- package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -1
- package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
- 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.resources-config.schemas.js.map +1 -1
- package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
- 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/files/files.shared.utils.js.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.resources-config.schemas.js.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-push-delivery-log.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.js.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.map +1 -1
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agent-traceability.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js.map +1 -1
- 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/autonomous-agents.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.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.resources-config.schemas.js.map +1 -1
- 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.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.resources-config.schemas.js.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-task.shared.schemas.js.map +1 -1
- 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.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.configuration.shared.schemas.js.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.frontend.shared.schemas.js.map +1 -1
- 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.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.definitions.js.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.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.map +1 -1
- package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/prompt-ir.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/review-deadlines.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
- package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/work-attribution.shared.schemas.js.map +1 -1
- package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts.map +1 -1
- package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
- package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
- package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-flow.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/guidance-state.shared.schemas.js.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.map +1 -1
- package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-config.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -1
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
- 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-id.shared.utils.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js.map +1 -1
- package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -1
- package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -1
- package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -1
- package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -1
- package/dist/esm/i18n/application-config-vocabulary.shared.d.ts.map +1 -1
- package/dist/esm/i18n/application-config-vocabulary.shared.js.map +1 -1
- package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts.map +1 -1
- package/dist/esm/i18n/engine-open-vocabulary-values.shared.js.map +1 -1
- package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts.map +1 -1
- package/dist/esm/i18n/engine-open-vocabulary.shared.js.map +1 -1
- package/dist/esm/i18n/interpolate-label-params.shared.utils.d.ts.map +1 -1
- package/dist/esm/i18n/interpolate-label-params.shared.utils.js.map +1 -1
- package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
- package/dist/esm/i18n/labelling.dto.shared.schemas.js.map +1 -1
- package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts.map +1 -1
- package/dist/esm/inbound/conversation-threads.shared.schemas.js.map +1 -1
- package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts.map +1 -1
- package/dist/esm/inbound/inbound-channels.shared.schemas.js.map +1 -1
- package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts.map +1 -1
- package/dist/esm/inbound/inbound-delivery.shared.schemas.js.map +1 -1
- package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts.map +1 -1
- package/dist/esm/inbound/inbound-endpoint-env.shared.js.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.d.ts +128 -0
- package/dist/esm/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.js +136 -0
- package/dist/esm/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts +32 -0
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js +66 -1
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows.exports.d.ts +1 -0
- package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
- package/dist/esm/meta-workflows.exports.js +1 -0
- package/dist/esm/meta-workflows.exports.js.map +1 -1
- package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/monitoring.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-context.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -1
- package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
- package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.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-contract.shared.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
- package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
- 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/notification-badges.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
- package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/application-owner-organization.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.map +1 -1
- package/dist/esm/organizations/organization-features.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-features.shared.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-members.shared.schemas.js.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.resources-config.schemas.js.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.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
- 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.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
- 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-inheritance.shared.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-members.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.example.js.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
- package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
- package/dist/esm/organizations/organization-units.shared.path.d.ts.map +1 -1
- package/dist/esm/organizations/organization-units.shared.path.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organization-units.shared.schemas.js.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.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts.map +1 -1
- package/dist/esm/organizations/service-provider-relationships.shared.schemas.js.map +1 -1
- package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
- 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/provider-registration-runtime.exports.js.map +1 -1
- package/dist/esm/public-runtime/index.d.ts.map +1 -1
- package/dist/esm/public-runtime/index.js.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts +70 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.js +85 -2
- 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/jobs.shared.utils.js.map +1 -1
- package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
- package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
- package/dist/esm/queue/queues.shared.utils.js.map +1 -1
- package/dist/esm/queue/rabbitmq-queue-args.shared.d.ts.map +1 -1
- package/dist/esm/queue/rabbitmq-queue-args.shared.js.map +1 -1
- package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -1
- package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -1
- package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
- package/dist/esm/requests/header-keys.shared.js.map +1 -1
- package/dist/esm/requests/http-requests.shared.d.ts.map +1 -1
- package/dist/esm/requests/http-requests.shared.js.map +1 -1
- package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -1
- package/dist/esm/requests/idempotency-key.shared.js.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
- package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
- package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
- package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
- 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/child-operations.shared.schemas.js.map +1 -1
- package/dist/esm/resources/collection-query-parameters.shared.d.ts.map +1 -1
- package/dist/esm/resources/collection-query-parameters.shared.js.map +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
- package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/embedded-resource-mark.shared.utils.js.map +1 -1
- package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/relationship-display.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
- package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
- 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.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.map +1 -1
- package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources-serialization.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
- package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
- 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/collection-export.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
- package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/composition-seedability.validation.js.map +1 -1
- package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -1
- package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/duplicate-relationship-registration.validation.js.map +1 -1
- package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
- package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -1
- package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/repository-dto-builder.utils.js.map +1 -1
- package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js.map +1 -1
- package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
- package/dist/esm/resources/utils/required-fk-fillability.validation.js.map +1 -1
- package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-operation-type-guards.utils.js.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.relationships.js.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-polymorphism.utils.js.map +1 -1
- package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-subtree.utils.js.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-context-needs.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +25 -0
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js +47 -19
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.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.path.utils.js.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.urls-builder.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-serialization.utils.js.map +1 -1
- package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
- 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-family-builder.utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-inference.utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-type-utils.js.map +1 -1
- package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/schema-variant-resolver.utils.js.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.map +1 -1
- package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
- package/dist/esm/resources/work-unit.shared.schemas.d.ts.map +1 -1
- package/dist/esm/resources/work-unit.shared.schemas.js.map +1 -1
- 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/runtime/execution-context.shared.schemas.js.map +1 -1
- package/dist/esm/runtime/runtime.shared.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/runtime.shared.schemas.js.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
- package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
- 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/authentication.shared.utils.js.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/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/mfa-backup-code-contract.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/mfa-backup-code-contract.shared.js.map +1 -1
- package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -1
- package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/password-reset.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
- package/dist/esm/security/authentications/same-origin-redirect-path.shared.d.ts.map +1 -1
- package/dist/esm/security/authentications/same-origin-redirect-path.shared.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-organization-unit-mapping.shared.js.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.resources-config.schemas.js.map +1 -1
- 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.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js.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.resources-config.schemas.js.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-dlq.shared.schemas.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -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.map +1 -1
- 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.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.resources-config.schemas.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
- package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts.map +1 -1
- package/dist/esm/security/credential-rotation-grace.shared.utils.js.map +1 -1
- package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.js.map +1 -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.map +1 -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.map +1 -1
- 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.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.resources-config.schemas.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.js.map +1 -1
- package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -1
- package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts.map +1 -1
- package/dist/esm/security/submission-challenge/submission-challenge.shared.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -1
- package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -1
- package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
- package/dist/esm/testing/resource-config-builders.js.map +1 -1
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/testing.js.map +1 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
- package/dist/esm/users/anonymous-users.shared.schema.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/inbound-contacts.shared.schemas.js.map +1 -1
- package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -1
- package/dist/esm/users/user-consent-decision.shared.utils.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-credentials.shared.schemas.js.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.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
- package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
- package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.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-profiles.shared.resources-config.schemas.js.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.map +1 -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.map +1 -1
- package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
- package/dist/esm/users/users.shared.schemas.js.map +1 -1
- package/package.json +4 -4
- package/dist/esm/__tests__/setup.d.ts +0 -2
- package/dist/esm/__tests__/setup.d.ts.map +0 -1
- package/dist/esm/__tests__/setup.js +0 -19
- package/dist/esm/__tests__/setup.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
|
@@ -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;;;;;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vG,qCAAqC,EAAE,4BAA4B,CAAC,KAAK,CAAC,qCAAqC;IAC/G,oCAAoC,EAAE,4BAA4B,CAAC,KAAK,CAAC,oCAAoC;IAC7G,uBAAuB,EAAE,4BAA4B,CAAC,KAAK,CAAC,uBAAuB;IACnF,eAAe,EAAE,4BAA4B,CAAC,KAAK,CAAC,eAAe;IACnE,SAAS,EAAE,4BAA4B,CAAC,KAAK,CAAC,SAAS;IACvD,eAAe,EAAE,4BAA4B,CAAC,KAAK,CAAC,eAAe;IACnE,gBAAgB,EAAE,4BAA4B,CAAC,KAAK,CAAC,gBAAgB;IACrE,6BAA6B,EAAE,4BAA4B,CAAC,KAAK,CAAC,6BAA6B;IAC/F,wFAAwF;IACxF,0BAA0B,EAAE,4BAA4B,CAAC,KAAK,CAAC,0BAA0B;IACzF,4BAA4B,EAAE,4BAA4B,CAAC,KAAK,CAAC,4BAA4B;IAC7F,+BAA+B,EAAE,4BAA4B,CAAC,KAAK,CAAC,+BAA+B;IACnG,+BAA+B,EAAE,4BAA4B,CAAC,KAAK,CAAC,+BAA+B;CACpG,CAAC,CAAC;AAaH;;;;;;;GAOG;AACH,MAAM,UAAU,iCAAiC,CAAC,WAAyD;IACzG,IAAI,CAAC,WAAW;QAAE,OAAO,EAAE,CAAC;IAC5B,OAAO,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;SAC5B,IAAI,EAAE;SACN,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;SAC1C,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,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_InitiationKind, FlowsActors_Status, describeFlowsActorsStatus } from './flows-actors.commons.shared.schemas';\nimport { HumanDecision_Outcome, HumanDecision_RequesterKind, HumanDecision_RouteKind, ReviewClockBasis } from './human-decision.shared.schemas';\nimport { AutonomousPrincipalSource, AutonomousTurnTrigger } from './autonomous-agents.shared.schemas';\nimport { WorkUnitRefSchema } from '../resources/work-unit.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().describe(\"The message's id (a UUID). For an agent reply it is the same `messageId` the live stream used, so a streamed reply can be matched to the stored one.\"),\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().describe('The text of the message, rendered as `contentType` says. An agent reply is the full text assembled from what was streamed.'),\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 * names for it. Nothing new was invented. Two producers write it and both read \"lapsed\" from\n * {@link isFlowActorPausedApprovalLapsed}: the refusal of a decision that arrives too late, and the\n * scheduled sweep that fails a pause nobody answered (#484), every minute since gates declare their own lapse (#1628).\n *\n * (That vocabulary's doc used to say a DENIAL was terminal too. It is not — a denial resumes the\n * turn so the model can answer the refusal — and the doc was corrected in the same change.)\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 * The DEFAULT, not a fixed rule: since #1628 a gate may declare its own lapse\n * (`humanApproval.deadlines.lapseAfter`, always elapsed time), and this is what a gate declaring none\n * gets. The gate is the right owner — how long \"do you approve deleting this customer?\" stays\n * meaningful depends on the action, not on the application.\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 * Whether a paused turn's approval window has CLOSED at `now` — the ONE definition of \"lapsed\".\n *\n * Two consumers act on it and neither may re-derive it (#484): the approval-response path, which\n * refuses a decision that arrives too late, and the scheduled sweep that fails a pause nobody ever\n * answered. Written twice, they would drift at exactly the boundary that matters — one inclusive,\n * one exclusive — and a decision arriving on the instant would be refused by one and resumed by the\n * other.\n *\n * - **Inclusive at the instant.** `expiresAt` is the moment after which the turn \"must not be\n * resumed\", so at `expiresAt` itself the window is already closed.\n * - **An absent expiry never lapses.** A suspension persisted before #465 carries none, and those\n * turns were paused under a contract with no timeout. Inventing one retroactively would fail them\n * on a rule they were never given.\n * - **An unparseable instant never lapses.** `new Date('garbage')` is `NaN`, every comparison with\n * which is false. Failing a turn on a value nobody can read would turn a corrupted field into a\n * destroyed conversation; leaving it paused keeps it recoverable, and the resume path already\n * refuses a blob it cannot parse.\n */\nexport function isFlowActorPausedApprovalLapsed(paused: Pick<FlowActorExecution_PausedApproval, 'expiresAt'>, now: Date): boolean {\n if (paused.expiresAt === undefined) return false;\n const expiresAtMs = new Date(paused.expiresAt).getTime();\n return Number.isFinite(expiresAtMs) && expiresAtMs <= now.getTime();\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`/`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 /**\n * WHICH context this conversation was opened in — the client's `contextResourceIdentifiers` on\n * `FLOWS_ACTORS_START`, folded into one indexed string by {@link canonicalizeFlowsActorsContextRef}\n * so history can list by it with plain equality on every adapter. Set on create, immutable.\n *\n * It is a PARTITION, not an access filter: the owner FK, the agent instance and the machine\n * credential above decide who may read a row; this decides which of a caller's own threads belong\n * to the surface asking. Without it every thread a user ever opened against a system lists\n * together, whatever it was about — measured 2026-09-22 on a tool that hosts one system for\n * several applications sharing one database, where the threads of one application appeared in\n * the next (#1454). `''` is \"no context\", never absent, so the equality filter can name it.\n */\n contextRef: z.string().isDBIndexed().excludeFromUpdate().default(''),\n\n status: z.enum(FlowsActors_Status).isDBIndexed().isSummaryField(),\n statusChanges: z.array(z.object({\n status: z.enum(FlowsActors_Status)\n .describe(describeFlowsActorsStatus(\"The state this run moved into at `timestamp`. The list is the run's history, oldest first.\")),\n timestamp: z.date().describe('When the run moved into `status`.'),\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 /** Which door opened the turn (#1594). Set on create by the backend; absent on rows older than the column. */\n initiationKind: z.enum(FlowsActors_InitiationKind).systemEnum('FlowsActors_InitiationKind').isBackendOnly().nullish(),\n\n // === Autonomous turn (#1611) ===\n //\n // Written on CREATE by the autonomous entry point (`startAutonomousAgentTurn`) and by nothing else,\n // and never updated: a turn keeps the agent, trigger and principal source it was opened with for its\n // whole life, including after a reviewer's decision resumes it.\n\n /**\n * The declared autonomous agent this turn runs as. The resume re-resolves the machine principal from\n * it (with the row's organization), so a binding removed while a decision waits stops the work.\n */\n autonomousAgentRef: z.string().min(1).isDBIndexed().excludeFromUpdate().optional(),\n /** What started the turn. An INBOUND_DELIVERY turn is offered only read or reviewer-gated tools, for its whole life. */\n autonomousTrigger: z.enum(AutonomousTurnTrigger).systemEnum('AutonomousTurnTrigger').excludeFromUpdate().optional(),\n /** Where the machine principal came from when the turn started: the tenant's own client, or a firm's admitted one. */\n autonomousPrincipalSource: z.enum(AutonomousPrincipalSource).systemEnum('AutonomousPrincipalSource').excludeFromUpdate().optional(),\n /**\n * The case the turn works on (#1598 attributes its model calls to it). Accepted at start only when the\n * turn's own principal can READ that row.\n */\n caseRef: WorkUnitRefSchema.excludeFromUpdate().optional(),\n /**\n * The concurrency slot of a `SKIP_IF_ACTIVE` agent: `<agentRef>|<organizationId>` while the turn is\n * active, absent otherwise. The unique index is what makes a second active turn's CREATE fail, which the\n * entry point turns into a skip — the check is the store's, so two occurrences arriving at once cannot\n * both see \"none active\".\n *\n * Released by the entry point, not by every terminal write: a terminal row still holding its key is\n * reclaimed with a compare-and-swap (on the key AND a terminal status) the next time the slot is\n * wanted. So a turn ended by a sweep, a lapse or an escalation lane needs no knowledge of the slot, and\n * a live turn's key can never be taken. `.optional()` (not nullish) so a clear REMOVES the field: a\n * stored null would be indexed by MongoDB's sparse index and collide with the next clear.\n */\n autonomousActiveSlotKey: z.string().min(1).isUnique({ scope: 'global', sparse: true }).isBackendOnly().optional(),\n\n // === Pending human decision (#1594) ===\n //\n // Real COLUMNS, on the row that holds the resume compare-and-swap, never in a second store: #1360\n // measured what a store beside the row costs (a second handle, drift, and a two-row write with no\n // transaction, which lets a reassignment and an answer both win). Present only while `status` is\n // AWAITING_APPROVAL; cleared by the CAS that releases the pause. All backend-only: the route says who\n // may answer, and listing it to a generic reader would reveal that a decision exists.\n //\n // DEVIATION from the issue's column list, deliberately: it named a `pendingDecisionRole` beside\n // `pendingDecisionEligibleRole`. For a ROLE route the route's role IS the eligible role, and a claimed\n // decision recovers its role from `pendingDecisionClaimedAt` plus the unchanged eligible role — so a\n // second column could only ever hold a copy that drifts.\n\n /** The one decision id, shared by both planes and every audit row (`HumanDecision_Request.decisionId`). Minted by the engine at pause. */\n pendingDecisionRef: z.string().min(1).isUnique({ scope: 'global', sparse: true }).isBackendOnly().nullish(),\n pendingDecisionRouteKind: z.enum(HumanDecision_RouteKind).systemEnum('HumanDecision_RouteKind').isDBIndexed().isBackendOnly().nullish(),\n /** The role every holder must meet (ROLE and ASSIGNEE). The listing's role filter. */\n pendingDecisionEligibleRole: z.string().min(1).isDBIndexed().isBackendOnly().nullish(),\n /** The organization the role is matched in. The listing's organization filter. */\n pendingDecisionOrganizationId: z.string().min(1).isDBIndexed().isBackendOnly().nullish(),\n /** Stamped from the requester's unit scope, so a unit-scoped holder can be matched (#1597). */\n pendingDecisionOrganizationUnitId: z.string().min(1).isBackendOnly().nullish(),\n /** ASSIGNEE only. The listing's \"assigned to me\" filter. */\n pendingDecisionAssigneeUserId: z.string().min(1).isDBIndexed().isBackendOnly().nullish(),\n /** Set when an ASSIGNEE route came from claiming a ROLE route; UNCLAIM restores ROLE. */\n pendingDecisionClaimedAt: z.date().isBackendOnly().nullish(),\n pendingDecisionRequesterKind: z.enum(HumanDecision_RequesterKind).systemEnum('HumanDecision_RequesterKind').isBackendOnly().nullish(),\n /** The user id for USER and DELEGATED_CLIENT; the credential id for MACHINE. What the resume rebuilds authority from. */\n pendingDecisionRequesterRef: z.string().min(1).isBackendOnly().nullish(),\n /** DELEGATED_CLIENT only: the client the person delegated to, re-checked at resume. */\n pendingDecisionRequesterClientId: z.string().min(1).isBackendOnly().nullish(),\n pendingDecisionRequestedAt: z.date().isBackendOnly().nullish(),\n /** When answering is refused. The expiry sweep selects on this column instead of parsing every blob. */\n pendingDecisionExpiresAt: z.date().isDBIndexed().isBackendOnly().nullish(),\n /** Incremented by every reassign, claim, unclaim and escalate; the answer's release CAS includes it, so an answer read under an older route loses. */\n pendingDecisionRouteVersion: z.number().int().nonnegative().isBackendOnly().nullish(),\n\n // === Pending decision deadlines (#1628) ===\n //\n // The two SERVICE-TARGET clocks (CLAIM, DECISION) beside the lapse above, armed at pause from the gate's\n // `humanApproval.deadlines`. Each stage's due instant is stored, so the sweep never depends on the gate\n // still resolving and a deployment never reshapes a running clock. Cleared with the rest of the pending\n // decision. Backend-only, like the route.\n //\n // DEVIATION from #1628's column list, deliberately: it named the two deadlines and the next-due instant.\n // The two WARNING instants and the two clock bases are stored too — a warning is `warnBefore` earlier on\n // its own basis, and a resume must count the paused time on that basis; recomputing either would read the\n // gate again, which is exactly the dependency storing the deadlines avoids.\n\n pendingDecisionClaimDeadlineAt: z.date().isBackendOnly().nullish(),\n /** Armed only when the gate's `claim.warnBefore` is declared. */\n pendingDecisionClaimWarningAt: z.date().isBackendOnly().nullish(),\n pendingDecisionClaimClockBasis: z.enum(ReviewClockBasis).systemEnum('ReviewClockBasis').isBackendOnly().nullish(),\n pendingDecisionDecisionDeadlineAt: z.date().isBackendOnly().nullish(),\n /** Armed only when the gate's `decision.warnBefore` is declared. */\n pendingDecisionDecisionWarningAt: z.date().isBackendOnly().nullish(),\n pendingDecisionDecisionClockBasis: z.enum(ReviewClockBasis).systemEnum('ReviewClockBasis').isBackendOnly().nullish(),\n /**\n * The earliest instant a stage may still fire at; `null` while the clocks are paused and once nothing is\n * left to fire. The deadline sweep selects on this indexed column. Every write that fires a stage, pauses,\n * resumes, claims or unclaims recomputes it in the same statement.\n */\n pendingDecisionNextDueAt: z.date().isDBIndexed().isBackendOnly().nullish(),\n /** Set while the CLAIM and DECISION clocks are paused. Never stops the lapse. */\n pendingDecisionClockPausedAt: z.date().isBackendOnly().nullish(),\n /** The gate-declared pause state the clocks are paused in. */\n pendingDecisionClockPauseStateRef: z.string().min(1).isBackendOnly().nullish(),\n /** Paused time accumulated over every completed pause, in milliseconds of wall time. */\n pendingDecisionClockPausedMs: z.number().int().nonnegative().isBackendOnly().nullish(),\n /*\n * One fired marker per stage. Each is written by a compare-and-swap on `(pendingDecisionRef, <marker> IS\n * NULL)`, so a stage fires once however many hosts run the sweep, and only the writer that won runs the\n * stage's actions. Four nullable timestamps rather than one \"fired stages\" array: an add-if-absent array\n * swap is expressed differently on MongoDB and PostgreSQL, a null check is the same predicate on both.\n */\n pendingDecisionClaimWarningFiredAt: z.date().isBackendOnly().nullish(),\n pendingDecisionClaimMissedFiredAt: z.date().isBackendOnly().nullish(),\n pendingDecisionDecisionWarningFiredAt: z.date().isBackendOnly().nullish(),\n pendingDecisionDecisionMissedFiredAt: z.date().isBackendOnly().nullish(),\n\n // === Last resolved decision (#1594) ===\n //\n // Written INSIDE the CAS that releases the pause, so a crash after it still leaves a complete record\n // of who decided what — the record #1599's corrections repair from.\n\n /** The decision these fields describe. Also what a failed release write is re-read against (D10). */\n lastResolvedDecisionRef: z.string().min(1).isDBIndexed().isBackendOnly().nullish(),\n /** Absent for a lapse and for a withdrawal nobody answered. */\n decidedByUserId: z.string().min(1).isBackendOnly().nullish(),\n decidedAt: z.date().isBackendOnly().nullish(),\n decisionOutcome: z.enum(HumanDecision_Outcome).systemEnum('HumanDecision_Outcome').isBackendOnly().nullish(),\n decisionToolName: z.string().min(1).isBackendOnly().nullish(),\n /** The argument NAMES a decider changed. Never their values. */\n decisionModifiedArgumentNames: z.array(z.string()).isBackendOnly().nullish(),\n\n // === Agent-work review record (#1599): the crash-repair marker ===\n /**\n * The decision whose agent-work record is still OWED. Set by the very write that settles a decision on an agent's\n * proposal (the release, a lapse, a withdrawal) — so a process that dies before the record is written leaves the\n * debt on the row — and cleared by a compare-and-swap once the record exists. The repair sweep selects on it.\n */\n pendingCorrectionRecordRef: z.string().min(1).isDBIndexed().isBackendOnly().nullish(),\n /** When the settled proposal was PUT BEFORE the decider (#1594's claim instant, else its request instant). */\n pendingCorrectionPresentedAt: z.date().isBackendOnly().nullish(),\n /**\n * The organization the owed decision was ROUTED in. The settling write clears the route columns\n * (`pendingDecisionOrganizationId`), so without this a repaired record of a user thread with no case would name no\n * tenant and fall out of that organization's override rate and export.\n */\n pendingCorrectionOrganizationId: z.string().min(1).isBackendOnly().nullish(),\n /** The route role that admitted the decider of the owed decision, cleared by the settle for the same reason. */\n pendingCorrectionAdmittedByRole: z.string().min(1).isBackendOnly().nullish(),\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 /*\n * `.unwrap()` takes each field's `.default([])` off, and it must stay off. Zod 4 applies an inner\n * default under `.optional()`, so `{ status: FAILED }` parsed to `{ status, statusChanges: [],\n * messages: [] }`, and every partial update of a row reset its transcript and status history.\n * Measured 2026-09-25 on Wonder Todos: a turn cut off by a companion restart was settled FAILED and\n * lost the creator's message, and the page read \"Nothing has been said yet\". The same held for the\n * resume claim, the pause and the lapsed-approval fail. A default belongs to CREATE; an absent\n * field on an update means \"unchanged\".\n */\n statusChanges: FlowActorExecutionBaseSchema.shape.statusChanges.unwrap().optional(),\n messages: FlowActorExecutionBaseSchema.shape.messages.unwrap().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 // #1594 — the pending decision and the last resolution. Allow-listed here for the reason above: a field\n // missing from this contract is a write that succeeds and persists nothing.\n initiationKind: FlowActorExecutionBaseSchema.shape.initiationKind,\n // #1611 — the slot is released by the autonomous entry point; `null` removes it (see the field).\n autonomousActiveSlotKey: FlowActorExecutionBaseSchema.shape.autonomousActiveSlotKey.nullable(),\n pendingDecisionRef: FlowActorExecutionBaseSchema.shape.pendingDecisionRef,\n pendingDecisionRouteKind: FlowActorExecutionBaseSchema.shape.pendingDecisionRouteKind,\n pendingDecisionEligibleRole: FlowActorExecutionBaseSchema.shape.pendingDecisionEligibleRole,\n pendingDecisionOrganizationId: FlowActorExecutionBaseSchema.shape.pendingDecisionOrganizationId,\n pendingDecisionOrganizationUnitId: FlowActorExecutionBaseSchema.shape.pendingDecisionOrganizationUnitId,\n pendingDecisionAssigneeUserId: FlowActorExecutionBaseSchema.shape.pendingDecisionAssigneeUserId,\n pendingDecisionClaimedAt: FlowActorExecutionBaseSchema.shape.pendingDecisionClaimedAt,\n pendingDecisionRequesterKind: FlowActorExecutionBaseSchema.shape.pendingDecisionRequesterKind,\n pendingDecisionRequesterRef: FlowActorExecutionBaseSchema.shape.pendingDecisionRequesterRef,\n pendingDecisionRequesterClientId: FlowActorExecutionBaseSchema.shape.pendingDecisionRequesterClientId,\n pendingDecisionRequestedAt: FlowActorExecutionBaseSchema.shape.pendingDecisionRequestedAt,\n pendingDecisionExpiresAt: FlowActorExecutionBaseSchema.shape.pendingDecisionExpiresAt,\n pendingDecisionRouteVersion: FlowActorExecutionBaseSchema.shape.pendingDecisionRouteVersion,\n // #1628 — the deadline clocks, allow-listed for the same reason.\n pendingDecisionClaimDeadlineAt: FlowActorExecutionBaseSchema.shape.pendingDecisionClaimDeadlineAt,\n pendingDecisionClaimWarningAt: FlowActorExecutionBaseSchema.shape.pendingDecisionClaimWarningAt,\n pendingDecisionClaimClockBasis: FlowActorExecutionBaseSchema.shape.pendingDecisionClaimClockBasis,\n pendingDecisionDecisionDeadlineAt: FlowActorExecutionBaseSchema.shape.pendingDecisionDecisionDeadlineAt,\n pendingDecisionDecisionWarningAt: FlowActorExecutionBaseSchema.shape.pendingDecisionDecisionWarningAt,\n pendingDecisionDecisionClockBasis: FlowActorExecutionBaseSchema.shape.pendingDecisionDecisionClockBasis,\n pendingDecisionNextDueAt: FlowActorExecutionBaseSchema.shape.pendingDecisionNextDueAt,\n pendingDecisionClockPausedAt: FlowActorExecutionBaseSchema.shape.pendingDecisionClockPausedAt,\n pendingDecisionClockPauseStateRef: FlowActorExecutionBaseSchema.shape.pendingDecisionClockPauseStateRef,\n pendingDecisionClockPausedMs: FlowActorExecutionBaseSchema.shape.pendingDecisionClockPausedMs,\n pendingDecisionClaimWarningFiredAt: FlowActorExecutionBaseSchema.shape.pendingDecisionClaimWarningFiredAt,\n pendingDecisionClaimMissedFiredAt: FlowActorExecutionBaseSchema.shape.pendingDecisionClaimMissedFiredAt,\n pendingDecisionDecisionWarningFiredAt: FlowActorExecutionBaseSchema.shape.pendingDecisionDecisionWarningFiredAt,\n pendingDecisionDecisionMissedFiredAt: FlowActorExecutionBaseSchema.shape.pendingDecisionDecisionMissedFiredAt,\n lastResolvedDecisionRef: FlowActorExecutionBaseSchema.shape.lastResolvedDecisionRef,\n decidedByUserId: FlowActorExecutionBaseSchema.shape.decidedByUserId,\n decidedAt: FlowActorExecutionBaseSchema.shape.decidedAt,\n decisionOutcome: FlowActorExecutionBaseSchema.shape.decisionOutcome,\n decisionToolName: FlowActorExecutionBaseSchema.shape.decisionToolName,\n decisionModifiedArgumentNames: FlowActorExecutionBaseSchema.shape.decisionModifiedArgumentNames,\n // #1599 — the agent-work record the settlement owes; allow-listed for the reason above.\n pendingCorrectionRecordRef: FlowActorExecutionBaseSchema.shape.pendingCorrectionRecordRef,\n pendingCorrectionPresentedAt: FlowActorExecutionBaseSchema.shape.pendingCorrectionPresentedAt,\n pendingCorrectionOrganizationId: FlowActorExecutionBaseSchema.shape.pendingCorrectionOrganizationId,\n pendingCorrectionAdmittedByRole: FlowActorExecutionBaseSchema.shape.pendingCorrectionAdmittedByRole,\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\n/**\n * One string for a set of context resource identifiers — `key=value` pairs sorted by key, joined\n * with `;`. Deterministic, so the transport that opens a conversation and the surface that lists\n * history compute the same value from the same identifiers; `''` for none.\n *\n * Keys and values carry no `=` or `;` in practice (they are resource types and ids); the function\n * does not escape, so a value that did would fold two contexts into one, never split one in two.\n */\nexport function canonicalizeFlowsActorsContextRef(identifiers: Readonly<Record<string, string>> | undefined): string {\n if (!identifiers) return '';\n return Object.keys(identifiers)\n .sort()\n .map((key) => `${key}=${identifiers[key]}`)\n .join(';');\n}\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,0BAA0B,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAC3M,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAChJ,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6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AC7F,+BAA+B,EAAE,4BAA4B,CAAC,KAAK,CAAC,+BAA+B;IACnG,+BAA+B,EAAE,4BAA4B,CAAC,KAAK,CAAC,+BAA+B;CACpG,CAAC,CAAC;AAaH;;;;;;;GAOG;AACH,MAAM,UAAU,iCAAiC,CAAC,WAAyD;IACzG,IAAI,CAAC,WAAW;QAAE,OAAO,EAAE,CAAC;IAC5B,OAAO,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;SAC5B,IAAI,EAAE;SACN,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;SAC1C,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,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_InitiationKind, FlowsActors_Status, describeFlowsActorsStatus } from './flows-actors.commons.shared.schemas';\nimport { HumanDecision_Outcome, HumanDecision_RequesterKind, HumanDecision_RouteKind, ReviewClockBasis } from './human-decision.shared.schemas';\nimport { AutonomousPrincipalSource, AutonomousTurnTrigger } from './autonomous-agents.shared.schemas';\nimport { WorkUnitRefSchema } from '../resources/work-unit.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().describe(\"The message's id (a UUID). For an agent reply it is the same `messageId` the live stream used, so a streamed reply can be matched to the stored one.\"),\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().describe('The text of the message, rendered as `contentType` says. An agent reply is the full text assembled from what was streamed.'),\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 * names for it. Nothing new was invented. Two producers write it and both read \"lapsed\" from\n * {@link isFlowActorPausedApprovalLapsed}: the refusal of a decision that arrives too late, and the\n * scheduled sweep that fails a pause nobody answered (#484), every minute since gates declare their own lapse (#1628).\n *\n * (That vocabulary's doc used to say a DENIAL was terminal too. It is not — a denial resumes the\n * turn so the model can answer the refusal — and the doc was corrected in the same change.)\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 * The DEFAULT, not a fixed rule: since #1628 a gate may declare its own lapse\n * (`humanApproval.deadlines.lapseAfter`, always elapsed time), and this is what a gate declaring none\n * gets. The gate is the right owner — how long \"do you approve deleting this customer?\" stays\n * meaningful depends on the action, not on the application.\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 * Whether a paused turn's approval window has CLOSED at `now` — the ONE definition of \"lapsed\".\n *\n * Two consumers act on it and neither may re-derive it (#484): the approval-response path, which\n * refuses a decision that arrives too late, and the scheduled sweep that fails a pause nobody ever\n * answered. Written twice, they would drift at exactly the boundary that matters — one inclusive,\n * one exclusive — and a decision arriving on the instant would be refused by one and resumed by the\n * other.\n *\n * - **Inclusive at the instant.** `expiresAt` is the moment after which the turn \"must not be\n * resumed\", so at `expiresAt` itself the window is already closed.\n * - **An absent expiry never lapses.** A suspension persisted before #465 carries none, and those\n * turns were paused under a contract with no timeout. Inventing one retroactively would fail them\n * on a rule they were never given.\n * - **An unparseable instant never lapses.** `new Date('garbage')` is `NaN`, every comparison with\n * which is false. Failing a turn on a value nobody can read would turn a corrupted field into a\n * destroyed conversation; leaving it paused keeps it recoverable, and the resume path already\n * refuses a blob it cannot parse.\n */\nexport function isFlowActorPausedApprovalLapsed(paused: Pick<FlowActorExecution_PausedApproval, 'expiresAt'>, now: Date): boolean {\n if (paused.expiresAt === undefined) return false;\n const expiresAtMs = new Date(paused.expiresAt).getTime();\n return Number.isFinite(expiresAtMs) && expiresAtMs <= now.getTime();\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`/`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 /**\n * WHICH context this conversation was opened in — the client's `contextResourceIdentifiers` on\n * `FLOWS_ACTORS_START`, folded into one indexed string by {@link canonicalizeFlowsActorsContextRef}\n * so history can list by it with plain equality on every adapter. Set on create, immutable.\n *\n * It is a PARTITION, not an access filter: the owner FK, the agent instance and the machine\n * credential above decide who may read a row; this decides which of a caller's own threads belong\n * to the surface asking. Without it every thread a user ever opened against a system lists\n * together, whatever it was about — measured 2026-09-22 on a tool that hosts one system for\n * several applications sharing one database, where the threads of one application appeared in\n * the next (#1454). `''` is \"no context\", never absent, so the equality filter can name it.\n */\n contextRef: z.string().isDBIndexed().excludeFromUpdate().default(''),\n\n status: z.enum(FlowsActors_Status).isDBIndexed().isSummaryField(),\n statusChanges: z.array(z.object({\n status: z.enum(FlowsActors_Status)\n .describe(describeFlowsActorsStatus(\"The state this run moved into at `timestamp`. The list is the run's history, oldest first.\")),\n timestamp: z.date().describe('When the run moved into `status`.'),\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 /** Which door opened the turn (#1594). Set on create by the backend; absent on rows older than the column. */\n initiationKind: z.enum(FlowsActors_InitiationKind).systemEnum('FlowsActors_InitiationKind').isBackendOnly().nullish(),\n\n // === Autonomous turn (#1611) ===\n //\n // Written on CREATE by the autonomous entry point (`startAutonomousAgentTurn`) and by nothing else,\n // and never updated: a turn keeps the agent, trigger and principal source it was opened with for its\n // whole life, including after a reviewer's decision resumes it.\n\n /**\n * The declared autonomous agent this turn runs as. The resume re-resolves the machine principal from\n * it (with the row's organization), so a binding removed while a decision waits stops the work.\n */\n autonomousAgentRef: z.string().min(1).isDBIndexed().excludeFromUpdate().optional(),\n /** What started the turn. An INBOUND_DELIVERY turn is offered only read or reviewer-gated tools, for its whole life. */\n autonomousTrigger: z.enum(AutonomousTurnTrigger).systemEnum('AutonomousTurnTrigger').excludeFromUpdate().optional(),\n /** Where the machine principal came from when the turn started: the tenant's own client, or a firm's admitted one. */\n autonomousPrincipalSource: z.enum(AutonomousPrincipalSource).systemEnum('AutonomousPrincipalSource').excludeFromUpdate().optional(),\n /**\n * The case the turn works on (#1598 attributes its model calls to it). Accepted at start only when the\n * turn's own principal can READ that row.\n */\n caseRef: WorkUnitRefSchema.excludeFromUpdate().optional(),\n /**\n * The concurrency slot of a `SKIP_IF_ACTIVE` agent: `<agentRef>|<organizationId>` while the turn is\n * active, absent otherwise. The unique index is what makes a second active turn's CREATE fail, which the\n * entry point turns into a skip — the check is the store's, so two occurrences arriving at once cannot\n * both see \"none active\".\n *\n * Released by the entry point, not by every terminal write: a terminal row still holding its key is\n * reclaimed with a compare-and-swap (on the key AND a terminal status) the next time the slot is\n * wanted. So a turn ended by a sweep, a lapse or an escalation lane needs no knowledge of the slot, and\n * a live turn's key can never be taken. `.optional()` (not nullish) so a clear REMOVES the field: a\n * stored null would be indexed by MongoDB's sparse index and collide with the next clear.\n */\n autonomousActiveSlotKey: z.string().min(1).isUnique({ scope: 'global', sparse: true }).isBackendOnly().optional(),\n\n // === Pending human decision (#1594) ===\n //\n // Real COLUMNS, on the row that holds the resume compare-and-swap, never in a second store: #1360\n // measured what a store beside the row costs (a second handle, drift, and a two-row write with no\n // transaction, which lets a reassignment and an answer both win). Present only while `status` is\n // AWAITING_APPROVAL; cleared by the CAS that releases the pause. All backend-only: the route says who\n // may answer, and listing it to a generic reader would reveal that a decision exists.\n //\n // DEVIATION from the issue's column list, deliberately: it named a `pendingDecisionRole` beside\n // `pendingDecisionEligibleRole`. For a ROLE route the route's role IS the eligible role, and a claimed\n // decision recovers its role from `pendingDecisionClaimedAt` plus the unchanged eligible role — so a\n // second column could only ever hold a copy that drifts.\n\n /** The one decision id, shared by both planes and every audit row (`HumanDecision_Request.decisionId`). Minted by the engine at pause. */\n pendingDecisionRef: z.string().min(1).isUnique({ scope: 'global', sparse: true }).isBackendOnly().nullish(),\n pendingDecisionRouteKind: z.enum(HumanDecision_RouteKind).systemEnum('HumanDecision_RouteKind').isDBIndexed().isBackendOnly().nullish(),\n /** The role every holder must meet (ROLE and ASSIGNEE). The listing's role filter. */\n pendingDecisionEligibleRole: z.string().min(1).isDBIndexed().isBackendOnly().nullish(),\n /** The organization the role is matched in. The listing's organization filter. */\n pendingDecisionOrganizationId: z.string().min(1).isDBIndexed().isBackendOnly().nullish(),\n /** Stamped from the requester's unit scope, so a unit-scoped holder can be matched (#1597). */\n pendingDecisionOrganizationUnitId: z.string().min(1).isBackendOnly().nullish(),\n /** ASSIGNEE only. The listing's \"assigned to me\" filter. */\n pendingDecisionAssigneeUserId: z.string().min(1).isDBIndexed().isBackendOnly().nullish(),\n /** Set when an ASSIGNEE route came from claiming a ROLE route; UNCLAIM restores ROLE. */\n pendingDecisionClaimedAt: z.date().isBackendOnly().nullish(),\n pendingDecisionRequesterKind: z.enum(HumanDecision_RequesterKind).systemEnum('HumanDecision_RequesterKind').isBackendOnly().nullish(),\n /** The user id for USER and DELEGATED_CLIENT; the credential id for MACHINE. What the resume rebuilds authority from. */\n pendingDecisionRequesterRef: z.string().min(1).isBackendOnly().nullish(),\n /** DELEGATED_CLIENT only: the client the person delegated to, re-checked at resume. */\n pendingDecisionRequesterClientId: z.string().min(1).isBackendOnly().nullish(),\n pendingDecisionRequestedAt: z.date().isBackendOnly().nullish(),\n /** When answering is refused. The expiry sweep selects on this column instead of parsing every blob. */\n pendingDecisionExpiresAt: z.date().isDBIndexed().isBackendOnly().nullish(),\n /** Incremented by every reassign, claim, unclaim and escalate; the answer's release CAS includes it, so an answer read under an older route loses. */\n pendingDecisionRouteVersion: z.number().int().nonnegative().isBackendOnly().nullish(),\n\n // === Pending decision deadlines (#1628) ===\n //\n // The two SERVICE-TARGET clocks (CLAIM, DECISION) beside the lapse above, armed at pause from the gate's\n // `humanApproval.deadlines`. Each stage's due instant is stored, so the sweep never depends on the gate\n // still resolving and a deployment never reshapes a running clock. Cleared with the rest of the pending\n // decision. Backend-only, like the route.\n //\n // DEVIATION from #1628's column list, deliberately: it named the two deadlines and the next-due instant.\n // The two WARNING instants and the two clock bases are stored too — a warning is `warnBefore` earlier on\n // its own basis, and a resume must count the paused time on that basis; recomputing either would read the\n // gate again, which is exactly the dependency storing the deadlines avoids.\n\n pendingDecisionClaimDeadlineAt: z.date().isBackendOnly().nullish(),\n /** Armed only when the gate's `claim.warnBefore` is declared. */\n pendingDecisionClaimWarningAt: z.date().isBackendOnly().nullish(),\n pendingDecisionClaimClockBasis: z.enum(ReviewClockBasis).systemEnum('ReviewClockBasis').isBackendOnly().nullish(),\n pendingDecisionDecisionDeadlineAt: z.date().isBackendOnly().nullish(),\n /** Armed only when the gate's `decision.warnBefore` is declared. */\n pendingDecisionDecisionWarningAt: z.date().isBackendOnly().nullish(),\n pendingDecisionDecisionClockBasis: z.enum(ReviewClockBasis).systemEnum('ReviewClockBasis').isBackendOnly().nullish(),\n /**\n * The earliest instant a stage may still fire at; `null` while the clocks are paused and once nothing is\n * left to fire. The deadline sweep selects on this indexed column. Every write that fires a stage, pauses,\n * resumes, claims or unclaims recomputes it in the same statement.\n */\n pendingDecisionNextDueAt: z.date().isDBIndexed().isBackendOnly().nullish(),\n /** Set while the CLAIM and DECISION clocks are paused. Never stops the lapse. */\n pendingDecisionClockPausedAt: z.date().isBackendOnly().nullish(),\n /** The gate-declared pause state the clocks are paused in. */\n pendingDecisionClockPauseStateRef: z.string().min(1).isBackendOnly().nullish(),\n /** Paused time accumulated over every completed pause, in milliseconds of wall time. */\n pendingDecisionClockPausedMs: z.number().int().nonnegative().isBackendOnly().nullish(),\n /*\n * One fired marker per stage. Each is written by a compare-and-swap on `(pendingDecisionRef, <marker> IS\n * NULL)`, so a stage fires once however many hosts run the sweep, and only the writer that won runs the\n * stage's actions. Four nullable timestamps rather than one \"fired stages\" array: an add-if-absent array\n * swap is expressed differently on MongoDB and PostgreSQL, a null check is the same predicate on both.\n */\n pendingDecisionClaimWarningFiredAt: z.date().isBackendOnly().nullish(),\n pendingDecisionClaimMissedFiredAt: z.date().isBackendOnly().nullish(),\n pendingDecisionDecisionWarningFiredAt: z.date().isBackendOnly().nullish(),\n pendingDecisionDecisionMissedFiredAt: z.date().isBackendOnly().nullish(),\n\n // === Last resolved decision (#1594) ===\n //\n // Written INSIDE the CAS that releases the pause, so a crash after it still leaves a complete record\n // of who decided what — the record #1599's corrections repair from.\n\n /** The decision these fields describe. Also what a failed release write is re-read against (D10). */\n lastResolvedDecisionRef: z.string().min(1).isDBIndexed().isBackendOnly().nullish(),\n /** Absent for a lapse and for a withdrawal nobody answered. */\n decidedByUserId: z.string().min(1).isBackendOnly().nullish(),\n decidedAt: z.date().isBackendOnly().nullish(),\n decisionOutcome: z.enum(HumanDecision_Outcome).systemEnum('HumanDecision_Outcome').isBackendOnly().nullish(),\n decisionToolName: z.string().min(1).isBackendOnly().nullish(),\n /** The argument NAMES a decider changed. Never their values. */\n decisionModifiedArgumentNames: z.array(z.string()).isBackendOnly().nullish(),\n\n // === Agent-work review record (#1599): the crash-repair marker ===\n /**\n * The decision whose agent-work record is still OWED. Set by the very write that settles a decision on an agent's\n * proposal (the release, a lapse, a withdrawal) — so a process that dies before the record is written leaves the\n * debt on the row — and cleared by a compare-and-swap once the record exists. The repair sweep selects on it.\n */\n pendingCorrectionRecordRef: z.string().min(1).isDBIndexed().isBackendOnly().nullish(),\n /** When the settled proposal was PUT BEFORE the decider (#1594's claim instant, else its request instant). */\n pendingCorrectionPresentedAt: z.date().isBackendOnly().nullish(),\n /**\n * The organization the owed decision was ROUTED in. The settling write clears the route columns\n * (`pendingDecisionOrganizationId`), so without this a repaired record of a user thread with no case would name no\n * tenant and fall out of that organization's override rate and export.\n */\n pendingCorrectionOrganizationId: z.string().min(1).isBackendOnly().nullish(),\n /** The route role that admitted the decider of the owed decision, cleared by the settle for the same reason. */\n pendingCorrectionAdmittedByRole: z.string().min(1).isBackendOnly().nullish(),\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 /*\n * `.unwrap()` takes each field's `.default([])` off, and it must stay off. Zod 4 applies an inner\n * default under `.optional()`, so `{ status: FAILED }` parsed to `{ status, statusChanges: [],\n * messages: [] }`, and every partial update of a row reset its transcript and status history.\n * Measured 2026-09-25 on Wonder Todos: a turn cut off by a companion restart was settled FAILED and\n * lost the creator's message, and the page read \"Nothing has been said yet\". The same held for the\n * resume claim, the pause and the lapsed-approval fail. A default belongs to CREATE; an absent\n * field on an update means \"unchanged\".\n */\n statusChanges: FlowActorExecutionBaseSchema.shape.statusChanges.unwrap().optional(),\n messages: FlowActorExecutionBaseSchema.shape.messages.unwrap().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 // #1594 — the pending decision and the last resolution. Allow-listed here for the reason above: a field\n // missing from this contract is a write that succeeds and persists nothing.\n initiationKind: FlowActorExecutionBaseSchema.shape.initiationKind,\n // #1611 — the slot is released by the autonomous entry point; `null` removes it (see the field).\n autonomousActiveSlotKey: FlowActorExecutionBaseSchema.shape.autonomousActiveSlotKey.nullable(),\n pendingDecisionRef: FlowActorExecutionBaseSchema.shape.pendingDecisionRef,\n pendingDecisionRouteKind: FlowActorExecutionBaseSchema.shape.pendingDecisionRouteKind,\n pendingDecisionEligibleRole: FlowActorExecutionBaseSchema.shape.pendingDecisionEligibleRole,\n pendingDecisionOrganizationId: FlowActorExecutionBaseSchema.shape.pendingDecisionOrganizationId,\n pendingDecisionOrganizationUnitId: FlowActorExecutionBaseSchema.shape.pendingDecisionOrganizationUnitId,\n pendingDecisionAssigneeUserId: FlowActorExecutionBaseSchema.shape.pendingDecisionAssigneeUserId,\n pendingDecisionClaimedAt: FlowActorExecutionBaseSchema.shape.pendingDecisionClaimedAt,\n pendingDecisionRequesterKind: FlowActorExecutionBaseSchema.shape.pendingDecisionRequesterKind,\n pendingDecisionRequesterRef: FlowActorExecutionBaseSchema.shape.pendingDecisionRequesterRef,\n pendingDecisionRequesterClientId: FlowActorExecutionBaseSchema.shape.pendingDecisionRequesterClientId,\n pendingDecisionRequestedAt: FlowActorExecutionBaseSchema.shape.pendingDecisionRequestedAt,\n pendingDecisionExpiresAt: FlowActorExecutionBaseSchema.shape.pendingDecisionExpiresAt,\n pendingDecisionRouteVersion: FlowActorExecutionBaseSchema.shape.pendingDecisionRouteVersion,\n // #1628 — the deadline clocks, allow-listed for the same reason.\n pendingDecisionClaimDeadlineAt: FlowActorExecutionBaseSchema.shape.pendingDecisionClaimDeadlineAt,\n pendingDecisionClaimWarningAt: FlowActorExecutionBaseSchema.shape.pendingDecisionClaimWarningAt,\n pendingDecisionClaimClockBasis: FlowActorExecutionBaseSchema.shape.pendingDecisionClaimClockBasis,\n pendingDecisionDecisionDeadlineAt: FlowActorExecutionBaseSchema.shape.pendingDecisionDecisionDeadlineAt,\n pendingDecisionDecisionWarningAt: FlowActorExecutionBaseSchema.shape.pendingDecisionDecisionWarningAt,\n pendingDecisionDecisionClockBasis: FlowActorExecutionBaseSchema.shape.pendingDecisionDecisionClockBasis,\n pendingDecisionNextDueAt: FlowActorExecutionBaseSchema.shape.pendingDecisionNextDueAt,\n pendingDecisionClockPausedAt: FlowActorExecutionBaseSchema.shape.pendingDecisionClockPausedAt,\n pendingDecisionClockPauseStateRef: FlowActorExecutionBaseSchema.shape.pendingDecisionClockPauseStateRef,\n pendingDecisionClockPausedMs: FlowActorExecutionBaseSchema.shape.pendingDecisionClockPausedMs,\n pendingDecisionClaimWarningFiredAt: FlowActorExecutionBaseSchema.shape.pendingDecisionClaimWarningFiredAt,\n pendingDecisionClaimMissedFiredAt: FlowActorExecutionBaseSchema.shape.pendingDecisionClaimMissedFiredAt,\n pendingDecisionDecisionWarningFiredAt: FlowActorExecutionBaseSchema.shape.pendingDecisionDecisionWarningFiredAt,\n pendingDecisionDecisionMissedFiredAt: FlowActorExecutionBaseSchema.shape.pendingDecisionDecisionMissedFiredAt,\n lastResolvedDecisionRef: FlowActorExecutionBaseSchema.shape.lastResolvedDecisionRef,\n decidedByUserId: FlowActorExecutionBaseSchema.shape.decidedByUserId,\n decidedAt: FlowActorExecutionBaseSchema.shape.decidedAt,\n decisionOutcome: FlowActorExecutionBaseSchema.shape.decisionOutcome,\n decisionToolName: FlowActorExecutionBaseSchema.shape.decisionToolName,\n decisionModifiedArgumentNames: FlowActorExecutionBaseSchema.shape.decisionModifiedArgumentNames,\n // #1599 — the agent-work record the settlement owes; allow-listed for the reason above.\n pendingCorrectionRecordRef: FlowActorExecutionBaseSchema.shape.pendingCorrectionRecordRef,\n pendingCorrectionPresentedAt: FlowActorExecutionBaseSchema.shape.pendingCorrectionPresentedAt,\n pendingCorrectionOrganizationId: FlowActorExecutionBaseSchema.shape.pendingCorrectionOrganizationId,\n pendingCorrectionAdmittedByRole: FlowActorExecutionBaseSchema.shape.pendingCorrectionAdmittedByRole,\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\n/**\n * One string for a set of context resource identifiers — `key=value` pairs sorted by key, joined\n * with `;`. Deterministic, so the transport that opens a conversation and the surface that lists\n * history compute the same value from the same identifiers; `''` for none.\n *\n * Keys and values carry no `=` or `;` in practice (they are resource types and ids); the function\n * does not escape, so a value that did would fold two contexts into one, never split one in two.\n */\nexport function canonicalizeFlowsActorsContextRef(identifiers: Readonly<Record<string, string>> | undefined): string {\n if (!identifiers) return '';\n return Object.keys(identifiers)\n .sort()\n .map((key) => `${key}=${identifiers[key]}`)\n .join(';');\n}\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.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/flows-actors/flows-actors-task.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AACzG,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAC3G,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACvH,OAAO,EACL,oCAAoC,EACpC,iCAAiC,GAClC,MAAM,oCAAoC,CAAC;AAE5C;;;;;GAKG;AACH,MA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AAiC;iBAC9C,CAAC;SACH;QAED,0EAA0E;QAC1E,2DAA2D;QAC3D,yEAAyE;QACzE,2CAA2C;QAC3C,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,eAAe,EAAE,kBAAkB;oBACnC,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C;aACF;SACF;KACF;CACF,CACF,CAAC","sourcesContent":["/**\n * Flows-Actors Task — Resource Configuration (POLYMORPHIC)\n * ========================================================\n *\n * The persisted WORK record behind the A2A `Task` object, stamped out as THREE\n * owner-scope variants from one polymorphic declaration (`userFlowActorTasks` /\n * `organizationFlowActorTasks` / `applicationFlowActorTasks`). Spread the produced\n * factories into the registry factory map:\n * ...flowActorTasksPolymorphicFactories\n *\n * This is a DIFFERENT PLANE from `flowActorExecutions`: executions own\n * conversational session history, tasks own an addressable/pollable/cancelable\n * work lifecycle. See the base schema for why merging them is wrong.\n *\n * Scope + access model (mirrors the execution family — same owner scopes, same\n * RBAC shape — so a task is always readable by exactly the principal that drove\n * the turn):\n * - Owner = the injected scope FK per variant. READ/LIST are `API_CALL`, roles\n * resolved PER VARIANT by `polymorphicRole`: a user reads its own (APP_USER +\n * USER_SELF filter), a machine reads its org/app variant with its granted\n * org/app role. NOTE these roles govern the HTTP surface only — the A2A\n * `tasks/get` path does NOT use them (it reads via the ACL-bypassing `readAsSystem`\n * and isolates by owner filter instead; see `A2ATaskBackendService`). Tightening\n * `polymorphicRole` therefore does not tighten `tasks/get`.\n * - CREATE/UPDATE are `INTERNAL_CALL` super-admin: only the runtime materialises\n * a task and advances its lifecycle, via `*AsSystem` (governed by\n * `systemAccessPolicy`, not the op RBAC). INTERNAL_CALL (not REPOSITORY_ONLY)\n * is mandatory — `*AsSystem` dispatches through the service tier and resolves\n * the op via `getServiceOperationPathDefault`, which only matches\n * INTERNAL_CALL / API_CALL variants.\n * - `tasks/cancel` is an UPDATE (status → `CANCELLED`), NOT a delete: the A2A\n * spec requires cancel to return the task's UPDATED STATE rather than remove it, so the record must\n * spec-cite: A2A v0.2.5 §7.4 (tasks/cancel returns a Task)\n * survive cancellation.\n * - DELETE exists as a single owner-facing `API_CALL` default. It is REQUIRED,\n * not optional: the polymorphic owner relationship is a COMPOSITION, and a\n * composition child with no core DELETE op makes the parent's cascade throw\n * `ErrorType.CONFIGURATION` inside the delete transaction and roll the parent\n * delete back (the exact latent bug the platform hit on\n * `wildoApplication*` children — see `resources-relationships.custom.shared.definitions.ts`).\n * Its role floor is DISTINCT from read: a user deletes only their own task;\n * org/app tasks are shared scope data and require org/app admin.\n *\n * @see flows-actors-task.shared.schemas.ts — the polymorphic declaration + base schema\n * @see flows-actors-execution.shared.resources-config.schemas.ts — the sibling plane\n */\n\nimport { z } from 'zod';\nimport { CoreResourceOperation, CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport {\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n} from '../resources/resources.shared.schemas';\nimport { FlowsActors_Status } from './flows-actors.commons.shared.schemas';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\nimport { createPolymorphicResourceConfigurations } from '../resources/utils/resource-polymorphism.factory';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\nimport {\n flowActorTasksPolymorphicDeclaration,\n FlowActorTaskUpdateInternalSchema,\n} from './flows-actors-task.shared.schemas';\n\n/**\n * Per-variant owner-read role map. Identical shape to the execution family so a\n * caller that can read its conversation can read the tasks that conversation\n * produced — no new role, no authorizer change. The scope authorizer + contextual\n * filter isolate rows to the owner; the role is the operation floor.\n */\nconst OWNER_READ_ROLES = {\n // USER variant: the scope FK IS the principal, so `APP_USER` plus the contextual filter yields\n // exactly \"my own rows\". Correct, and unchanged.\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n // ── MACHINE variants: ADMIN-only, and this is a CORRECTION (review finding F5-1) ──\n //\n // These previously granted `ORG_MEMBER` / `APP_USER`, inherited from the USER variant where that\n // is right. On the machine variants it is not: the scope FK does not identify the principal.\n // `applicationId` is a DEPLOYMENT SINGLETON, so every application-scope principal resolves to the\n // same contextual filter, and `organizationId` is shared by every machine client of one tenant.\n // The generic REST plane therefore let a PEER principal read another client's rows — the whole\n // `messages[]` log on an execution, and `title` (the opening 120 chars of the originating prompt)\n // on a task. That is exactly the cross-client disclosure the credential axis closed on the A2A\n // plane; the axis was applied there and not here, and both planes read the same rows.\n //\n // The resolution follows the reasoning the DELETE map below ALREADY documents: an org/app record\n // is SHARED SCOPE DATA, not owner data. Whoever administers the scope may inspect it; a peer\n // principal inside that scope may not. Roles are the framework's single authorization axis, so\n // this is expressed there rather than by inventing a second one.\n //\n // The A2A path is unaffected — it reads through `readAsSystem` and isolates by its own\n // owner + agent + credential filter, which is stricter than either role set.\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.APPLICATION]: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n};\n\n/**\n * Per-variant DELETE role map. Delete authority is DELIBERATELY DISTINCT from read\n * (destroying a work record ≠ reading it): a user deletes only their OWN task, but\n * an org/app task is SHARED scope data, so removing it requires ORG_ADMIN /\n * APP_ADMIN_SUPER_ADMIN — not any org member / app user who can merely read it.\n */\nconst OWNER_DELETE_ROLES = {\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.APPLICATION]: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n};\n\n/**\n * Polymorphic factory map for flows-actors tasks. Spread into\n * `coreShared_ResourcesConfigurations_FactoryMap`:\n * ...flowActorTasksPolymorphicFactories\n *\n * Produces entries for:\n * - userFlowActorTasks\n * - organizationFlowActorTasks\n * - applicationFlowActorTasks\n */\nexport const flowActorTasksPolymorphicFactories = createPolymorphicResourceConfigurations(\n flowActorTasksPolymorphicDeclaration,\n {\n isSystemResource: true,\n\n // Opt the runtime (system actor) into scoped writes/reads on the owner's\n // behalf. Absent this, every `*AsSystem` verb fails closed. No `delete` mode:\n // the runtime never system-deletes a task — cancellation is an UPDATE, and\n // removal is owner-driven or cascade-driven.\n systemAccessPolicy: {\n // Subject-export disclosure. The subject's own flow tasks. Secrets and backend-only values are withheld by the export's security floor regardless of this grant. On a polymorphic resource this grant applies to EVERY generated variant, which is the documented intent of the shared config.\n exportSubject: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n },\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.OBSERVED },\n\n /**\n * Subject erasure RETAINS this row and scrubs everything the person wrote or that was derived from it.\n *\n * A task carries `description`, `topic` and `input` — the person's own words — plus `output` and\n * `artifacts` derived from them, and a `title` that is the opening 120 characters of the originating\n * PROMPT. That is content this row HOLDS, so `RETAIN_ONLY` would be false and the factory refuses it.\n * The row survives because the execution record is what an operator must be able to account for; its\n * contents do not.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /**\n * Erasing one of these rows revokes NO session. The row is work performed for a person, not the person;\n * its owner FK names the scope the work ran in. The subject's session ends through the `USERS` row.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.CREATE,\n CoreResourceOperation.READ,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.LIST,\n CoreResourceOperation.DELETE,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n\n operationsConfiguration: {\n\n /*\n\n * Route-less retention plumbing — INTERNAL_CALL registers no route, so no API surface is added, and it\n\n * must not be REPOSITORY_ONLY: the retention primitives resolve through `getServiceOperationPathDefault`,\n\n * which matches only INTERNAL_CALL / API_CALL. LIST is LOW (a read-shaped op may not claim the\n\n * HIGH/CRITICAL band, which carries an audit-emission obligation); UPDATE_MANY is CRITICAL — it is the\n\n * verb the impersonalize writer uses to stamp the retention markers.\n\n */\n\n [CoreResourceOperation.UPDATE_MANY]: {\n\n variants: [{\n\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n\n isDefault: true,\n\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n\n }],\n\n },\n\n // === READ === backs A2A `tasks/get`. Owner reads their own task.\n [CoreResourceOperation.READ]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: OWNER_READ_ROLES,\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n\n // === LIST === owner enumerates their tasks (e.g. every task of one contextId).\n [CoreResourceOperation.LIST]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: OWNER_READ_ROLES,\n riskLevel: ResourceOperationRiskLevel.LOW,\n // DECLARED, because without it the promise is unservable (review finding M-2).\n //\n // The schema indexes `contextId` and both the schema and the spec say the index exists so\n // a client can \"enumerate every task of one conversation\". None of that was reachable: with\n // no `filterFields` the request schema falls back to the base filter (`searchRequest`,\n // `createdAt`, `updatedAt`), so the one query the index was built for could not be\n // expressed. An index serving no reachable query is cost without benefit, and a documented\n // capability nobody can call is worse than an absent one.\n //\n // `status` rides along for the obvious companion query (\"my unfinished work\"). The agent\n // and credential axes are deliberately NOT filterable — they are AUTHORIZATION inputs\n // derived from the caller's own principal, and accepting them from the query string would\n // invite the misreading that a caller may choose them.\n filterFields: {\n contextId: z.string(),\n status: z.enum(FlowsActors_Status),\n },\n }],\n },\n\n // === CREATE === runtime materialises a task when the turn becomes non-inline: either the\n // selected A2A dialect explicitly requests non-blocking work, or a blocking user-delegated\n // turn reaches an approval-gated tool and must return `input-required` with an addressable\n // task. No explicit request DTO: auto-derives per variant so the injected owner FK is\n // required on the correct variant.\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n // assurance-control: WILDO.ACCESS.AUTHORIZATION_DECISION_AUDIT — the write that first\n // persists requester-supplied content is recorded, so access to it is reconstructable.\n //\n // LOW is the honest risk of a runtime bookkeeping write, but the audit floor would then\n // drop it — and this is the write that FIRST PERSISTS the prompt excerpt in `title`\n // (review finding M-6). Recording the creation of a content-bearing row is exactly what\n // \"record access decisions\" asks for, so the event is emitted below the floor rather than\n // by inflating a risk level that would then misreport the operation's danger.\n auditableEvent: { auditBelowRiskFloor: true },\n }],\n },\n\n // === UPDATE === advances the lifecycle: status transitions, artifacts,\n // terminal outcome — and backs `tasks/cancel` (status → CANCELLED), which the\n // A2A spec requires to return the updated state rather than remove the record.\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n // assurance-control: WILDO.ACCESS.AUTHORIZATION_DECISION_AUDIT — a destructive protocol\n // verb leaves persistence-tier evidence, not only a transport-tier record.\n //\n // Same reasoning as CREATE: this is the write `tasks/cancel` lands on, so its absence\n // from the trail would leave a destructive protocol verb unrecorded at the persistence\n // tier even though the transport audits the call.\n auditableEvent: { auditBelowRiskFloor: true },\n requestDto: FlowActorTaskUpdateInternalSchema,\n }],\n },\n\n // === DELETE === owner-facing removal, and the op the composition cascade\n // selects on owner deletion (the repository tier picks the\n // `isOperationDefault === true` DELETE). Declaring it is MANDATORY for a\n // composition child — see the header note.\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: OWNER_DELETE_ROLES,\n riskLevel: ResourceOperationRiskLevel.HIGH,\n },\n ],\n },\n },\n },\n);\n"]}
|
|
1
|
+
{"version":3,"file":"flows-actors-task.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/flows-actors/flows-actors-task.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AACzG,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAC3G,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACvH,OAAO,EACL,oCAAoC,EACpC,iCAAiC,GAClC,MAAM,oCAAoC,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,gBAAgB,GAAG;IACvB,+FAA+F;IAC/F,iDAAiD;IACjD,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC;IACnD,qFAAqF;IACrF,EAAE;IACF,i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oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,eAAe,EAAE,kBAAkB;oBACnC,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C;aACF;SACF;KACF;CACF,CACF,CAAC","sourcesContent":["/**\n * Flows-Actors Task — Resource Configuration (POLYMORPHIC)\n * ========================================================\n *\n * The persisted WORK record behind the A2A `Task` object, stamped out as THREE\n * owner-scope variants from one polymorphic declaration (`userFlowActorTasks` /\n * `organizationFlowActorTasks` / `applicationFlowActorTasks`). Spread the produced\n * factories into the registry factory map:\n * ...flowActorTasksPolymorphicFactories\n *\n * This is a DIFFERENT PLANE from `flowActorExecutions`: executions own\n * conversational session history, tasks own an addressable/pollable/cancelable\n * work lifecycle. See the base schema for why merging them is wrong.\n *\n * Scope + access model (mirrors the execution family — same owner scopes, same\n * RBAC shape — so a task is always readable by exactly the principal that drove\n * the turn):\n * - Owner = the injected scope FK per variant. READ/LIST are `API_CALL`, roles\n * resolved PER VARIANT by `polymorphicRole`: a user reads its own (APP_USER +\n * USER_SELF filter), a machine reads its org/app variant with its granted\n * org/app role. NOTE these roles govern the HTTP surface only — the A2A\n * `tasks/get` path does NOT use them (it reads via the ACL-bypassing `readAsSystem`\n * and isolates by owner filter instead; see `A2ATaskBackendService`). Tightening\n * `polymorphicRole` therefore does not tighten `tasks/get`.\n * - CREATE/UPDATE are `INTERNAL_CALL` super-admin: only the runtime materialises\n * a task and advances its lifecycle, via `*AsSystem` (governed by\n * `systemAccessPolicy`, not the op RBAC). INTERNAL_CALL (not REPOSITORY_ONLY)\n * is mandatory — `*AsSystem` dispatches through the service tier and resolves\n * the op via `getServiceOperationPathDefault`, which only matches\n * INTERNAL_CALL / API_CALL variants.\n * - `tasks/cancel` is an UPDATE (status → `CANCELLED`), NOT a delete: the A2A\n * spec requires cancel to return the task's UPDATED STATE rather than remove it, so the record must\n * spec-cite: A2A v0.2.5 §7.4 (tasks/cancel returns a Task)\n * survive cancellation.\n * - DELETE exists as a single owner-facing `API_CALL` default. It is REQUIRED,\n * not optional: the polymorphic owner relationship is a COMPOSITION, and a\n * composition child with no core DELETE op makes the parent's cascade throw\n * `ErrorType.CONFIGURATION` inside the delete transaction and roll the parent\n * delete back (the exact latent bug the platform hit on\n * `wildoApplication*` children — see `resources-relationships.custom.shared.definitions.ts`).\n * Its role floor is DISTINCT from read: a user deletes only their own task;\n * org/app tasks are shared scope data and require org/app admin.\n *\n * @see flows-actors-task.shared.schemas.ts — the polymorphic declaration + base schema\n * @see flows-actors-execution.shared.resources-config.schemas.ts — the sibling plane\n */\n\nimport { z } from 'zod';\nimport { CoreResourceOperation, CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport {\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n} from '../resources/resources.shared.schemas';\nimport { FlowsActors_Status } from './flows-actors.commons.shared.schemas';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\nimport { createPolymorphicResourceConfigurations } from '../resources/utils/resource-polymorphism.factory';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\nimport {\n flowActorTasksPolymorphicDeclaration,\n FlowActorTaskUpdateInternalSchema,\n} from './flows-actors-task.shared.schemas';\n\n/**\n * Per-variant owner-read role map. Identical shape to the execution family so a\n * caller that can read its conversation can read the tasks that conversation\n * produced — no new role, no authorizer change. The scope authorizer + contextual\n * filter isolate rows to the owner; the role is the operation floor.\n */\nconst OWNER_READ_ROLES = {\n // USER variant: the scope FK IS the principal, so `APP_USER` plus the contextual filter yields\n // exactly \"my own rows\". Correct, and unchanged.\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n // ── MACHINE variants: ADMIN-only, and this is a CORRECTION (review finding F5-1) ──\n //\n // These previously granted `ORG_MEMBER` / `APP_USER`, inherited from the USER variant where that\n // is right. On the machine variants it is not: the scope FK does not identify the principal.\n // `applicationId` is a DEPLOYMENT SINGLETON, so every application-scope principal resolves to the\n // same contextual filter, and `organizationId` is shared by every machine client of one tenant.\n // The generic REST plane therefore let a PEER principal read another client's rows — the whole\n // `messages[]` log on an execution, and `title` (the opening 120 chars of the originating prompt)\n // on a task. That is exactly the cross-client disclosure the credential axis closed on the A2A\n // plane; the axis was applied there and not here, and both planes read the same rows.\n //\n // The resolution follows the reasoning the DELETE map below ALREADY documents: an org/app record\n // is SHARED SCOPE DATA, not owner data. Whoever administers the scope may inspect it; a peer\n // principal inside that scope may not. Roles are the framework's single authorization axis, so\n // this is expressed there rather than by inventing a second one.\n //\n // The A2A path is unaffected — it reads through `readAsSystem` and isolates by its own\n // owner + agent + credential filter, which is stricter than either role set.\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.APPLICATION]: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n};\n\n/**\n * Per-variant DELETE role map. Delete authority is DELIBERATELY DISTINCT from read\n * (destroying a work record ≠ reading it): a user deletes only their OWN task, but\n * an org/app task is SHARED scope data, so removing it requires ORG_ADMIN /\n * APP_ADMIN_SUPER_ADMIN — not any org member / app user who can merely read it.\n */\nconst OWNER_DELETE_ROLES = {\n [CoreResourceType.USERS]: [CORE_APP_ROLES.APP_USER],\n [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_ADMIN],\n [CoreResourceType.APPLICATION]: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n};\n\n/**\n * Polymorphic factory map for flows-actors tasks. Spread into\n * `coreShared_ResourcesConfigurations_FactoryMap`:\n * ...flowActorTasksPolymorphicFactories\n *\n * Produces entries for:\n * - userFlowActorTasks\n * - organizationFlowActorTasks\n * - applicationFlowActorTasks\n */\nexport const flowActorTasksPolymorphicFactories = createPolymorphicResourceConfigurations(\n flowActorTasksPolymorphicDeclaration,\n {\n isSystemResource: true,\n\n // Opt the runtime (system actor) into scoped writes/reads on the owner's\n // behalf. Absent this, every `*AsSystem` verb fails closed. No `delete` mode:\n // the runtime never system-deletes a task — cancellation is an UPDATE, and\n // removal is owner-driven or cascade-driven.\n systemAccessPolicy: {\n // Subject-export disclosure. The subject's own flow tasks. Secrets and backend-only values are withheld by the export's security floor regardless of this grant. On a polymorphic resource this grant applies to EVERY generated variant, which is the documented intent of the shared config.\n exportSubject: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n },\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.OBSERVED },\n\n /**\n * Subject erasure RETAINS this row and scrubs everything the person wrote or that was derived from it.\n *\n * A task carries `description`, `topic` and `input` — the person's own words — plus `output` and\n * `artifacts` derived from them, and a `title` that is the opening 120 characters of the originating\n * PROMPT. That is content this row HOLDS, so `RETAIN_ONLY` would be false and the factory refuses it.\n * The row survives because the execution record is what an operator must be able to account for; its\n * contents do not.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /**\n * Erasing one of these rows revokes NO session. The row is work performed for a person, not the person;\n * its owner FK names the scope the work ran in. The subject's session ends through the `USERS` row.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.CREATE,\n CoreResourceOperation.READ,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.LIST,\n CoreResourceOperation.DELETE,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n\n operationsConfiguration: {\n\n /*\n\n * Route-less retention plumbing — INTERNAL_CALL registers no route, so no API surface is added, and it\n\n * must not be REPOSITORY_ONLY: the retention primitives resolve through `getServiceOperationPathDefault`,\n\n * which matches only INTERNAL_CALL / API_CALL. LIST is LOW (a read-shaped op may not claim the\n\n * HIGH/CRITICAL band, which carries an audit-emission obligation); UPDATE_MANY is CRITICAL — it is the\n\n * verb the impersonalize writer uses to stamp the retention markers.\n\n */\n\n [CoreResourceOperation.UPDATE_MANY]: {\n\n variants: [{\n\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n\n isDefault: true,\n\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n\n }],\n\n },\n\n // === READ === backs A2A `tasks/get`. Owner reads their own task.\n [CoreResourceOperation.READ]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: OWNER_READ_ROLES,\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n\n // === LIST === owner enumerates their tasks (e.g. every task of one contextId).\n [CoreResourceOperation.LIST]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: OWNER_READ_ROLES,\n riskLevel: ResourceOperationRiskLevel.LOW,\n // DECLARED, because without it the promise is unservable (review finding M-2).\n //\n // The schema indexes `contextId` and both the schema and the spec say the index exists so\n // a client can \"enumerate every task of one conversation\". None of that was reachable: with\n // no `filterFields` the request schema falls back to the base filter (`searchRequest`,\n // `createdAt`, `updatedAt`), so the one query the index was built for could not be\n // expressed. An index serving no reachable query is cost without benefit, and a documented\n // capability nobody can call is worse than an absent one.\n //\n // `status` rides along for the obvious companion query (\"my unfinished work\"). The agent\n // and credential axes are deliberately NOT filterable — they are AUTHORIZATION inputs\n // derived from the caller's own principal, and accepting them from the query string would\n // invite the misreading that a caller may choose them.\n filterFields: {\n contextId: z.string(),\n status: z.enum(FlowsActors_Status),\n },\n }],\n },\n\n // === CREATE === runtime materialises a task when the turn becomes non-inline: either the\n // selected A2A dialect explicitly requests non-blocking work, or a blocking user-delegated\n // turn reaches an approval-gated tool and must return `input-required` with an addressable\n // task. No explicit request DTO: auto-derives per variant so the injected owner FK is\n // required on the correct variant.\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n // assurance-control: WILDO.ACCESS.AUTHORIZATION_DECISION_AUDIT — the write that first\n // persists requester-supplied content is recorded, so access to it is reconstructable.\n //\n // LOW is the honest risk of a runtime bookkeeping write, but the audit floor would then\n // drop it — and this is the write that FIRST PERSISTS the prompt excerpt in `title`\n // (review finding M-6). Recording the creation of a content-bearing row is exactly what\n // \"record access decisions\" asks for, so the event is emitted below the floor rather than\n // by inflating a risk level that would then misreport the operation's danger.\n auditableEvent: { auditBelowRiskFloor: true },\n }],\n },\n\n // === UPDATE === advances the lifecycle: status transitions, artifacts,\n // terminal outcome — and backs `tasks/cancel` (status → CANCELLED), which the\n // A2A spec requires to return the updated state rather than remove the record.\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n // assurance-control: WILDO.ACCESS.AUTHORIZATION_DECISION_AUDIT — a destructive protocol\n // verb leaves persistence-tier evidence, not only a transport-tier record.\n //\n // Same reasoning as CREATE: this is the write `tasks/cancel` lands on, so its absence\n // from the trail would leave a destructive protocol verb unrecorded at the persistence\n // tier even though the transport audits the call.\n auditableEvent: { auditBelowRiskFloor: true },\n requestDto: FlowActorTaskUpdateInternalSchema,\n }],\n },\n\n // === DELETE === owner-facing removal, and the op the composition cascade\n // selects on owner deletion (the repository tier picks the\n // `isOperationDefault === true` DELETE). Declaring it is MANDATORY for a\n // composition child — see the header note.\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n polymorphicRole: OWNER_DELETE_ROLES,\n riskLevel: ResourceOperationRiskLevel.HIGH,\n },\n ],\n },\n },\n },\n);\n"]}
|
|
@@ -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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows-actors-task.shared.schemas.js","sourceRoot":"","sources":["../../../src/flows-actors/flows-actors-task.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,EAAsC,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC/G,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,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,+DAA+D;AAC/D,iEAAiE;AAEjE;;;;;;GAMG;AACH,kFAAkF;AAClF,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAEpC,MAAM,CAAC,MAAM,uBAAuB,GAAG,kBAAkB,CAAC,IAAI,CAAC;IAC7D,wEAAwE;IACxE,EAAE;IACF,2EAA2E;IAC3E,sFAAsF;IACtF,mFAAmF;IACnF,mFAAmF;IACnF,wFAAwF;IACxF,mFAAmF;IACnF,wFAAwF;IACxF,uFAAuF;IACvF,yFAAyF;IACzF,EAAE;IACF,mF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IAClD,oFAAoF;IACpF,uFAAuF;IACvF,kDAAkD;IAClD,UAAU,EAAE,uBAAuB,CAAC,KAAK,CAAC,UAAU;IACpD;;;;;OAKG;IACH,uBAAuB,EAAE,uBAAuB,CAAC,KAAK,CAAC,uBAAuB;CAC/E,CAAC,CAAC","sourcesContent":["/**\n * Flows-actors TASK — the persisted, protocol-facing work record.\n *\n * ## Why this exists as its own family (and is NOT the conversation row)\n *\n * The engine keeps two DELIBERATELY SEPARATE physical planes:\n *\n * - `*FlowActorExecutions` owns **conversational** session history (the WS/A2A\n * message log, its status, its owner). Every turn has one.\n * - **This family** owns **work lifecycle** — an addressable, pollable,\n * cancelable handle with its own status, artifacts and terminal outcome.\n *\n * `.claude/context/flows-actors.md` states the rule the hard way: an A2A-backed\n * treatment \"links the continuum to both concrete records; it does not copy the\n * conversation into the task or recast the conversation row as a playbook run.\"\n * Merging them — e.g. treating `executionId` as the A2A task id — collapses two\n * planes the architecture keeps apart on purpose.\n *\n * ## Why it derives from `Actors_Task_Schema`\n *\n * `Actors_Task_Schema` is the CANONICAL task contract (status, artifacts,\n * relationships, memory, per-actor states, error states, journey/playbook\n * correlation). The platform already persists it the same way —\n * `Wildo_Application_Actor_Task_Schema = Actors_Task_Schema.extend({...})` with\n * scope FKs plus an OPTIONAL execution FK. This family mirrors that proven\n * pattern at engine level rather than inventing a third task model.\n *\n * ⚠️ NOTE on a constraint that DOES apply here — this paragraph previously claimed the\n * opposite and was wrong. The `FlowActorExecutionBaseSchema` warning about heavy nested\n * sub-structures not round-tripping Zod→Mongoose is NOT limited to embedding a task\n * inside an execution: Mongoose instantiates an empty subdocument for an optional nested\n * object and then fails its REQUIRED inner paths, whatever the nesting depth. A real-Mongo\n * service-tier test proved it — every create died on\n * `errorStates → customMessageReference is required`. That is why the heavy nested\n * orchestration state is OMITTED below rather than made optional.\n *\n * ## Ownership\n *\n * Polymorphic over the same three scopes as executions, so a user-delegated A2A\n * turn and an org/app MACHINE turn each own their tasks under the principal that\n * actually made the call. The owner FK is injected per variant by\n * `declarePolymorphicSchemas()`; do NOT add an `initiator` snapshot here (a\n * nested `initiator.organizationId` collides with the contextual scope filter —\n * see the same warning on the execution base schema).\n */\n\nimport { z } from 'zod';\nimport { initZodDecorators, addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\nimport { 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 { Actors_Task_Schema } from './tasks.actors.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// Base task record — NO owner scope FK (injected per variant)\n//===============================================================\n\n/**\n * The work record shared by every scope variant.\n *\n * Derived from the canonical `Actors_Task_Schema` and narrowed with persistence\n * concerns: a primary key, indexes on the fields the A2A surface queries, and the\n * OPTIONAL link back to the conversational execution that produced it.\n */\n/** Fixed replacement for task text that cannot be cleared (a `.min(1)` field). */\nconst ERASED_TASK_TEXT = '[erased]';\n\nexport const FlowActorTaskBaseSchema = Actors_Task_Schema.omit({\n // === HEAVY NESTED ORCHESTRATION STATE — OMITTED, NOT MADE OPTIONAL ===\n //\n // ⚠️ CORRECTION to an earlier claim in this file's history. The warning on\n // `FlowActorExecutionBaseSchema` — that heavy nested sub-structures do NOT round-trip\n // through the Zod→Mongoose embedded-subdocument conversion as optional slots — was\n // dismissed here on the grounds that it applied only to EMBEDDING a task inside an\n // execution, not to persisting tasks as their own collection. **That was wrong**, and a\n // service-tier test against real MongoDB proved it: Mongoose instantiates an empty\n // subdocument for an optional nested object and then fails its REQUIRED inner paths, so\n // every create died on `errorStates → customMessageReference is required`. The trap is\n // about optional nested objects with required inner paths — nesting DEPTH is irrelevant.\n //\n // Making them `.optional()` does not help (that was the first attempted fix and it\n // failed identically). They are therefore OMITTED: an A2A-materialised task genuinely\n // has no actor decomposition, no per-actor state, no memory and no error graph. When an\n // orchestration runtime actually produces that state, add it back WITH the\n // embedded-subdocument treatment the execution schema prescribes — not by relaxing a\n // required path.\n errorStates: true,\n memory: true,\n actorStates: true,\n relationships: true,\n actors: true,\n initiator: true,\n context: true,\n // G2-6: `startedAt` / `completedAt` are ISO `z.string()` on the canonical schema and would\n // sit beside this family's `z.date()` timestamps — the exact mixed-representation trap this\n // file warns about below. Nothing reads or writes them here (`finishedAt` carries the\n // terminal moment), so they are omitted rather than left as an unread inconsistency.\n startedAt: true,\n completedAt: true,\n}).extend({\n // Scalar orchestration fields — safe to keep, merely absent on an A2A task.\n // ── Provenance, per field, because the resource default cannot be right for all of them ──\n //\n // The config's `defaultProvenance: OBSERVED` fits the LIFECYCLE fields (status, timestamps, ids —\n // things the platform recorded about the work). It is wrong in BOTH directions for the content:\n //\n // • `title` / `input` / `description` / `topic` are SUBJECT_PROVIDED — they carry what the\n // requester actually said. ⚠️ This is a PRECISION change, not a behaviour change: an earlier\n // revision claimed OBSERVED \"under-scopes an Art. 20 bundle\", which is false against this\n // framework — `resolvePortabilityFieldScope` maps OBSERVED *and* SUBJECT_PROVIDED to\n // INCLUDED, and the enum's own documentation says OBSERVED is \"in scope for Art. 20, which is\n // the whole reason this member exists\". The reclassification is still right (these fields\n // genuinely came from the subject), but only the DERIVED half below changes what a bundle\n // contains.\n // • `output` / `artifacts` are DERIVED — model output about the subject rather than from them.\n // Classifying THOSE as observed over-delivers generated content into a portability bundle,\n // which the enum's own documentation excludes.\n //\n // All five also declare `USER_CONTENT` as their data CATEGORY — a separate axis, and the reason\n // both are needed here: provenance decides Art. 20 SCOPE (is it in the portability bundle),\n // category decides what a privacy notice ENUMERATES. `output` is excluded from a bundle and is\n // still content held about a person, so a notice must name it. Declared rather than left blank\n // because a field carrying a provenance and no category is reported as an OUTSTANDING gap, by\n // name, in every generated application's notice — the engine owes its own inventory.\n // REMOVE all five on erasure. `description`, `topic` and `input` are what the person WROTE; `output`\n // and `artifacts` are derived from it and carry it forward. This is the content a task holds, not a\n // link it carries, so erasure has to reach it. All five are `.optional()`, so REMOVE is clearable.\n description: addImpersonalizeWith(\n Actors_Task_Schema.shape.description.optional()\n .portabilityProvenance(DataPortabilityProvenance.SUBJECT_PROVIDED)\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n topic: addImpersonalizeWith(\n Actors_Task_Schema.shape.topic.optional()\n .portabilityProvenance(DataPortabilityProvenance.SUBJECT_PROVIDED)\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n input: addImpersonalizeWith(\n Actors_Task_Schema.shape.input.optional()\n .portabilityProvenance(DataPortabilityProvenance.SUBJECT_PROVIDED)\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n // ⚠️ RE-WRAP with `.optional()` FIRST — decorating these leaves in place mutates the CANONICAL\n // schema (finding G7-3). Wrapper decorators mirror onto the inner type copy-on-write, but only\n // ONE level: the three fields above are safe because `.optional()` mints a fresh wrapper before\n // the decorator runs, whereas `output`/`artifacts` are ALREADY optional wrappers on the base\n // schema, so nothing fresh was minted and the decoration landed on `Actors_Task_Schema` itself.\n //\n // Runtime-proven, and the FIRST fix was wrong: `.clone()` is a shallow copy that still shares the\n // inner type, so it isolated nothing — measured `CANON leaked: derived`. `.optional()` (or\n // `.nullish()`) mints the fresh wrapper the copy-on-write needs; measured `CANON leaked:\n // undefined` with the decoration intact on the family. Double-optional is harmless — the outer\n // wrapper exists to carry the decoration.\n //\n // Why it matters: `undefined` means \"nobody decided\", a DESIGNED refusal that\n // `resolvePortabilityFieldScope` surfaces as UNDECLARED. `DERIVED` means \"decided to EXCLUDE\". In\n // place, the leak silently converted an open question into an answer for every consumer of the\n // canonical schema — `standaloneTasks` and the platform's application-task resource — and did it\n // import-order-dependently.\n output: addImpersonalizeWith(\n Actors_Task_Schema.shape.output.optional()\n .portabilityProvenance(DataPortabilityProvenance.DERIVED)\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n artifacts: addImpersonalizeWith(\n Actors_Task_Schema.shape.artifacts.optional()\n .portabilityProvenance(DataPortabilityProvenance.DERIVED)\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n\n /** MongoDB document id — auto-generated / auto-managed (excluded from create). */\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /**\n * Stable business id, and the identity the A2A protocol addresses: this is the\n * value returned as `Task.id` and accepted by `tasks/get` / `tasks/cancel`.\n *\n * ⚠️ `scope: 'global'` is enforced PER VARIANT, not across the family: the three\n * variants are three separate stores, so the index cannot span them. Nothing depends on\n * family-wide uniqueness — `readTask` resolves the variant from the authenticated\n * owner BEFORE matching the id, so two identical ids in different scopes would never be\n * confused (and a v4 uuid collision is not a real risk anyway). Recorded because the\n * decorator name reads stronger than what it can deliver here.\n */\n taskId: z.uuid().isUnique({ scope: 'global', sparse: false }).excludeFromUpdate().isSummaryField(),\n\n /**\n * OPTIONAL link to the conversational execution this task was materialised from.\n *\n * A SOFT link, deliberately: it stores the execution's globally-unique\n * `executionId` business id and is NOT declared as a resource foreign key. Two\n * reasons, both load-bearing:\n *\n * 1. **Executions are polymorphic.** Their per-variant field identifiers are\n * `userFlowActorExecutionId` / `organizationFlowActorExecutionId` /\n * `applicationFlowActorExecutionId`, so one `flowActorExecutionId` FK matches\n * no variant. A real FK would mean declaring 3×3 (or 3 matched-pair)\n * relationships to express \"some execution\".\n * 2. **We do not want the graph semantics.** A declared relationship implies\n * population and a cascade path; a task must be able to OUTLIVE the execution\n * that produced it (that is the entire point of keeping the two planes\n * separate), so deleting a conversation must not delete its work records.\n *\n * Ownership and cascade already flow from the injected scope FK, which is the\n * only authority that should govern a task's lifetime. Indexed so \"the tasks of\n * this conversation\" stays a single-field query.\n */\n flowActorExecutionId: z.string().isDBIndexed().optional(),\n\n /**\n * WHICH A2A agent (resource-server instance) this task was created through.\n *\n * Part of the read/cancel filter, not merely descriptive metadata. A2A agents are declared as\n * SEPARATE resource servers — tokens are audience-bound per instance, and an agent must have\n * \"no side-door into another agent's actor system\". Without this field the task plane had no\n * per-agent dimension at all, so a token bound to agent B could read and cancel a task created\n * through agent A whenever both resolved to the same owner scope. Since `title` carries the\n * first 120 characters of the originating prompt, that also disclosed prompt text across the\n * boundary the audience binding exists to enforce.\n *\n * Always populated: the DEFAULT (unnamed) agent is a real identity too and is stored under a\n * sentinel that cannot collide with a declared ref (instance refs are constrained to\n * `^[a-z0-9][a-z0-9-]*$`). Storing a normalised value rather than leaving the default agent's\n * tasks null keeps the filter a plain equality on both persistence adapters, instead of\n * depending on how each one matches an absent field.\n */\n resourceServerInstanceRef: z.string().min(1).isDBIndexed(),\n\n /**\n * WHICH machine credential opened this record — part of the read filter, not metadata.\n *\n * The injected scope FK does not identify the principal on the machine variants:\n * `applicationId` is a deployment singleton and `organizationId` is shared by every machine\n * client of one tenant, so without this axis a separately-credentialed client could read and\n * cancel another's work — and `title` carries the opening characters of the originating prompt.\n *\n * User-delegated turns store {@link FLOWS_ACTORS_NO_MACHINE_CREDENTIAL}: there the human is the\n * principal and the `userId` owner FK already discriminates.\n */\n machineCredentialId: z.string().min(1).isDBIndexed(),\n\n /** Indexed: `tasks/get` and the abandoned-task sweep both filter on status. */\n status: z.enum(FlowsActors_Status).isDBIndexed().isSummaryField(),\n\n /**\n * Short human-readable name for the work.\n *\n * ⚠️ CONTENT-BEARING, and `.isSummaryField()` puts it on the `/summary` projection: the A2A\n * transport fills it with the opening 120 characters of the ORIGINATING PROMPT. Treat it as\n * subject-provided content, not a label — it is why the read filter carries the agent-instance\n * and machine-credential axes, and why the portability policy classifies it separately from the\n * observed lifecycle fields.\n */\n // MASK on erasure, not REMOVE: `.min(1)` makes the field non-clearable, so a null would be rejected by\n // the strict update-DTO parse the impersonalize writer runs. The mask is a fixed non-empty string,\n // which the schema accepts. It matters that this one is scrubbed at all — the title is the opening\n // 120 characters of the originating PROMPT.\n title: addImpersonalizeWith(\n z.string().min(1).isSummaryField()\n .portabilityProvenance(DataPortabilityProvenance.SUBJECT_PROVIDED)\n // The opening 120 characters of the originating PROMPT, per the note above — content, not a label.\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.MASK,\n { maskValue: ERASED_TASK_TEXT },\n ),\n\n /**\n * A2A `contextId` — threads related turns. Indexed so a client can enumerate\n * the tasks of one conversation without walking executions.\n */\n contextId: z.string().isDBIndexed().optional(),\n\n // === Timestamps are `z.date()` with defaults, NOT the canonical schema's ISO\n // strings: the persistence layer date-coerces, and a missing default\n // yields `Invalid Date` on create (same rationale as the execution base). ===\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n /**\n * Indexed because the abandoned-task SWEEP filters on it (`updatedAt < cutoff` AND a status set),\n * once per variant per run. Without an index that query is a sequential scan over a collection\n * that only ever grows — terminal tasks are never deleted — so the sweep gets slower forever\n * while doing the same work. The sibling `status` index was declared for this query from the\n * start; this axis was left off, which made the pair half-served (review finding L-1).\n */\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate().isDBIndexed(),\n /** Set when the task reaches a terminal state; never on create. */\n finishedAt: z.date().optional().excludeFromCreate(),\n /**\n * The task's A2A push-notification configurations, SERIALIZED as a JSON string.\n *\n * A scalar string for the same reason `pausedApproval` is one: heavy nested sub-structures do not\n * round-trip through the Zod→Mongoose embedded-subdocument conversion, and this is a LIST of\n * objects that themselves nest (`authentication.schemes[]`). Parse and serialize ONLY through the\n * helpers below, at the persistence boundary.\n *\n * ⚠️ The stored blob contains CREDENTIALS the client gave us to present to its own webhook\n * (`token`, `authentication.credentials`). It is therefore backend-only by intent: nothing\n * projects this field to a client, and the read path redacts before answering. See\n * `redactPushNotificationSecrets`.\n */\n pushNotificationConfigs: z.string().nullish().excludeFromCreate().isBackendOnly(),\n});\nexport type FlowActorTaskBase = z.infer<typeof FlowActorTaskBaseSchema>;\n\n//===============================================================\n// Polymorphic declaration — one owner-scope variant per scope\n//===============================================================\n\n/**\n * The three owner-scope variants a task is stamped out for — the SAME set as\n * executions, so ownership of a task always matches the principal that drove the\n * turn. Each opts OUT of the singleton auto-business-key: tasks are MULTI-ROW per\n * scope, so the injected owner FK must NOT be marked `.isUnique()` (the second\n * task per scope would otherwise fail with a duplicate-key error).\n */\nexport const FLOW_ACTOR_TASK_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 tasks. Produces 3 variants:\n * - users → `userFlowActorTasks` (`userId` injected)\n * - organizations → `organizationFlowActorTasks` (`organizationId` injected)\n * - applications → `applicationFlowActorTasks` (`applicationId` injected)\n */\nexport const flowActorTasksPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'flowActorTasks',\n baseFieldIdentifier: 'flowActorTaskId',\n baseEnumKey: 'FLOW_ACTOR_TASKS',\n baseSchema: FlowActorTaskBaseSchema,\n variants: FLOW_ACTOR_TASK_SCOPE_VARIANTS,\n});\n\n/**\n * Owner-agnostic UPDATE DTO — the mutations the task lifecycle actually performs.\n * Shared across variants because it references NO owner FK (owner is immutable).\n */\nexport const FlowActorTaskUpdateInternalSchema = z.object({\n status: FlowActorTaskBaseSchema.shape.status.optional(),\n output: FlowActorTaskBaseSchema.shape.output,\n artifacts: FlowActorTaskBaseSchema.shape.artifacts,\n // `actorStates` / `errorStates` are deliberately ABSENT — they are omitted from the\n // persisted family (see the omit block above), so an update DTO referencing them would\n // be a contract for a column that does not exist.\n finishedAt: FlowActorTaskBaseSchema.shape.finishedAt,\n /**\n * ⚠️ THIS SCHEMA IS AN ALLOW-LIST. A field absent here does not fail on write — the write\n * SUCCEEDS and persists nothing, which is how `pausedApproval` shipped unwritable and left every\n * paused turn unresumable. `.nullish()` because clearing a task's configurations is a real\n * transition (`pushNotificationConfig/delete` removing the last one).\n */\n pushNotificationConfigs: FlowActorTaskBaseSchema.shape.pushNotificationConfigs,\n});\n\n/**\n * Runtime shape of a persisted task (the base record). The owner FK is\n * variant-specific (`userId` | `organizationId` | `applicationId`) and read from\n * the concrete variant; the runtime supplies it explicitly on create.\n */\nexport type FlowActorTask = z.infer<typeof FlowActorTaskBaseSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"flows-actors-task.shared.schemas.js","sourceRoot":"","sources":["../../../../src/flows-actors/flows-actors-task.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,EAAsC,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC/G,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EACL,gBAAgB,EAChB,kCAAkC,GAC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C,CAAC,CAAC;AAExC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,yBAAyB,CAAC;IAC5E,gBAAgB,EAAE,gBAAgB;IAClC,mBAAmB,EAAE,iBAAiB;IACtC,WAAW,EAAE,kBAAkB;IAC/B,UAAU,EAAE,uBAAuB;IACnC,QAAQ,EAAE,8BAA8B;CACzC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxD,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;IACvD,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC,MAAM;IAC5C,SAAS,EAAE,uBAAuB,CAAC,KAAK,CAAC,SAAS;IAClD,oFAAoF;IACpF,uFAAuF;IACvF,kDAAkD;IAClD,UAAU,EAAE,uBAAuB,CAAC,KAAK,CAAC,UAAU;IACpD;;;;;OAKG;IACH,uBAAuB,EAAE,uBAAuB,CAAC,KAAK,CAAC,uBAAuB;CAC/E,CAAC,CAAC","sourcesContent":["/**\n * Flows-actors TASK — the persisted, protocol-facing work record.\n *\n * ## Why this exists as its own family (and is NOT the conversation row)\n *\n * The engine keeps two DELIBERATELY SEPARATE physical planes:\n *\n * - `*FlowActorExecutions` owns **conversational** session history (the WS/A2A\n * message log, its status, its owner). Every turn has one.\n * - **This family** owns **work lifecycle** — an addressable, pollable,\n * cancelable handle with its own status, artifacts and terminal outcome.\n *\n * `.claude/context/flows-actors.md` states the rule the hard way: an A2A-backed\n * treatment \"links the continuum to both concrete records; it does not copy the\n * conversation into the task or recast the conversation row as a playbook run.\"\n * Merging them — e.g. treating `executionId` as the A2A task id — collapses two\n * planes the architecture keeps apart on purpose.\n *\n * ## Why it derives from `Actors_Task_Schema`\n *\n * `Actors_Task_Schema` is the CANONICAL task contract (status, artifacts,\n * relationships, memory, per-actor states, error states, journey/playbook\n * correlation). The platform already persists it the same way —\n * `Wildo_Application_Actor_Task_Schema = Actors_Task_Schema.extend({...})` with\n * scope FKs plus an OPTIONAL execution FK. This family mirrors that proven\n * pattern at engine level rather than inventing a third task model.\n *\n * ⚠️ NOTE on a constraint that DOES apply here — this paragraph previously claimed the\n * opposite and was wrong. The `FlowActorExecutionBaseSchema` warning about heavy nested\n * sub-structures not round-tripping Zod→Mongoose is NOT limited to embedding a task\n * inside an execution: Mongoose instantiates an empty subdocument for an optional nested\n * object and then fails its REQUIRED inner paths, whatever the nesting depth. A real-Mongo\n * service-tier test proved it — every create died on\n * `errorStates → customMessageReference is required`. That is why the heavy nested\n * orchestration state is OMITTED below rather than made optional.\n *\n * ## Ownership\n *\n * Polymorphic over the same three scopes as executions, so a user-delegated A2A\n * turn and an org/app MACHINE turn each own their tasks under the principal that\n * actually made the call. The owner FK is injected per variant by\n * `declarePolymorphicSchemas()`; do NOT add an `initiator` snapshot here (a\n * nested `initiator.organizationId` collides with the contextual scope filter —\n * see the same warning on the execution base schema).\n */\n\nimport { z } from 'zod';\nimport { initZodDecorators, addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\nimport { 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 { Actors_Task_Schema } from './tasks.actors.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// Base task record — NO owner scope FK (injected per variant)\n//===============================================================\n\n/**\n * The work record shared by every scope variant.\n *\n * Derived from the canonical `Actors_Task_Schema` and narrowed with persistence\n * concerns: a primary key, indexes on the fields the A2A surface queries, and the\n * OPTIONAL link back to the conversational execution that produced it.\n */\n/** Fixed replacement for task text that cannot be cleared (a `.min(1)` field). */\nconst ERASED_TASK_TEXT = '[erased]';\n\nexport const FlowActorTaskBaseSchema = Actors_Task_Schema.omit({\n // === HEAVY NESTED ORCHESTRATION STATE — OMITTED, NOT MADE OPTIONAL ===\n //\n // ⚠️ CORRECTION to an earlier claim in this file's history. The warning on\n // `FlowActorExecutionBaseSchema` — that heavy nested sub-structures do NOT round-trip\n // through the Zod→Mongoose embedded-subdocument conversion as optional slots — was\n // dismissed here on the grounds that it applied only to EMBEDDING a task inside an\n // execution, not to persisting tasks as their own collection. **That was wrong**, and a\n // service-tier test against real MongoDB proved it: Mongoose instantiates an empty\n // subdocument for an optional nested object and then fails its REQUIRED inner paths, so\n // every create died on `errorStates → customMessageReference is required`. The trap is\n // about optional nested objects with required inner paths — nesting DEPTH is irrelevant.\n //\n // Making them `.optional()` does not help (that was the first attempted fix and it\n // failed identically). They are therefore OMITTED: an A2A-materialised task genuinely\n // has no actor decomposition, no per-actor state, no memory and no error graph. When an\n // orchestration runtime actually produces that state, add it back WITH the\n // embedded-subdocument treatment the execution schema prescribes — not by relaxing a\n // required path.\n errorStates: true,\n memory: true,\n actorStates: true,\n relationships: true,\n actors: true,\n initiator: true,\n context: true,\n // G2-6: `startedAt` / `completedAt` are ISO `z.string()` on the canonical schema and would\n // sit beside this family's `z.date()` timestamps — the exact mixed-representation trap this\n // file warns about below. Nothing reads or writes them here (`finishedAt` carries the\n // terminal moment), so they are omitted rather than left as an unread inconsistency.\n startedAt: true,\n completedAt: true,\n}).extend({\n // Scalar orchestration fields — safe to keep, merely absent on an A2A task.\n // ── Provenance, per field, because the resource default cannot be right for all of them ──\n //\n // The config's `defaultProvenance: OBSERVED` fits the LIFECYCLE fields (status, timestamps, ids —\n // things the platform recorded about the work). It is wrong in BOTH directions for the content:\n //\n // • `title` / `input` / `description` / `topic` are SUBJECT_PROVIDED — they carry what the\n // requester actually said. ⚠️ This is a PRECISION change, not a behaviour change: an earlier\n // revision claimed OBSERVED \"under-scopes an Art. 20 bundle\", which is false against this\n // framework — `resolvePortabilityFieldScope` maps OBSERVED *and* SUBJECT_PROVIDED to\n // INCLUDED, and the enum's own documentation says OBSERVED is \"in scope for Art. 20, which is\n // the whole reason this member exists\". The reclassification is still right (these fields\n // genuinely came from the subject), but only the DERIVED half below changes what a bundle\n // contains.\n // • `output` / `artifacts` are DERIVED — model output about the subject rather than from them.\n // Classifying THOSE as observed over-delivers generated content into a portability bundle,\n // which the enum's own documentation excludes.\n //\n // All five also declare `USER_CONTENT` as their data CATEGORY — a separate axis, and the reason\n // both are needed here: provenance decides Art. 20 SCOPE (is it in the portability bundle),\n // category decides what a privacy notice ENUMERATES. `output` is excluded from a bundle and is\n // still content held about a person, so a notice must name it. Declared rather than left blank\n // because a field carrying a provenance and no category is reported as an OUTSTANDING gap, by\n // name, in every generated application's notice — the engine owes its own inventory.\n // REMOVE all five on erasure. `description`, `topic` and `input` are what the person WROTE; `output`\n // and `artifacts` are derived from it and carry it forward. This is the content a task holds, not a\n // link it carries, so erasure has to reach it. All five are `.optional()`, so REMOVE is clearable.\n description: addImpersonalizeWith(\n Actors_Task_Schema.shape.description.optional()\n .portabilityProvenance(DataPortabilityProvenance.SUBJECT_PROVIDED)\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n topic: addImpersonalizeWith(\n Actors_Task_Schema.shape.topic.optional()\n .portabilityProvenance(DataPortabilityProvenance.SUBJECT_PROVIDED)\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n input: addImpersonalizeWith(\n Actors_Task_Schema.shape.input.optional()\n .portabilityProvenance(DataPortabilityProvenance.SUBJECT_PROVIDED)\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n // ⚠️ RE-WRAP with `.optional()` FIRST — decorating these leaves in place mutates the CANONICAL\n // schema (finding G7-3). Wrapper decorators mirror onto the inner type copy-on-write, but only\n // ONE level: the three fields above are safe because `.optional()` mints a fresh wrapper before\n // the decorator runs, whereas `output`/`artifacts` are ALREADY optional wrappers on the base\n // schema, so nothing fresh was minted and the decoration landed on `Actors_Task_Schema` itself.\n //\n // Runtime-proven, and the FIRST fix was wrong: `.clone()` is a shallow copy that still shares the\n // inner type, so it isolated nothing — measured `CANON leaked: derived`. `.optional()` (or\n // `.nullish()`) mints the fresh wrapper the copy-on-write needs; measured `CANON leaked:\n // undefined` with the decoration intact on the family. Double-optional is harmless — the outer\n // wrapper exists to carry the decoration.\n //\n // Why it matters: `undefined` means \"nobody decided\", a DESIGNED refusal that\n // `resolvePortabilityFieldScope` surfaces as UNDECLARED. `DERIVED` means \"decided to EXCLUDE\". In\n // place, the leak silently converted an open question into an answer for every consumer of the\n // canonical schema — `standaloneTasks` and the platform's application-task resource — and did it\n // import-order-dependently.\n output: addImpersonalizeWith(\n Actors_Task_Schema.shape.output.optional()\n .portabilityProvenance(DataPortabilityProvenance.DERIVED)\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n artifacts: addImpersonalizeWith(\n Actors_Task_Schema.shape.artifacts.optional()\n .portabilityProvenance(DataPortabilityProvenance.DERIVED)\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n\n /** MongoDB document id — auto-generated / auto-managed (excluded from create). */\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /**\n * Stable business id, and the identity the A2A protocol addresses: this is the\n * value returned as `Task.id` and accepted by `tasks/get` / `tasks/cancel`.\n *\n * ⚠️ `scope: 'global'` is enforced PER VARIANT, not across the family: the three\n * variants are three separate stores, so the index cannot span them. Nothing depends on\n * family-wide uniqueness — `readTask` resolves the variant from the authenticated\n * owner BEFORE matching the id, so two identical ids in different scopes would never be\n * confused (and a v4 uuid collision is not a real risk anyway). Recorded because the\n * decorator name reads stronger than what it can deliver here.\n */\n taskId: z.uuid().isUnique({ scope: 'global', sparse: false }).excludeFromUpdate().isSummaryField(),\n\n /**\n * OPTIONAL link to the conversational execution this task was materialised from.\n *\n * A SOFT link, deliberately: it stores the execution's globally-unique\n * `executionId` business id and is NOT declared as a resource foreign key. Two\n * reasons, both load-bearing:\n *\n * 1. **Executions are polymorphic.** Their per-variant field identifiers are\n * `userFlowActorExecutionId` / `organizationFlowActorExecutionId` /\n * `applicationFlowActorExecutionId`, so one `flowActorExecutionId` FK matches\n * no variant. A real FK would mean declaring 3×3 (or 3 matched-pair)\n * relationships to express \"some execution\".\n * 2. **We do not want the graph semantics.** A declared relationship implies\n * population and a cascade path; a task must be able to OUTLIVE the execution\n * that produced it (that is the entire point of keeping the two planes\n * separate), so deleting a conversation must not delete its work records.\n *\n * Ownership and cascade already flow from the injected scope FK, which is the\n * only authority that should govern a task's lifetime. Indexed so \"the tasks of\n * this conversation\" stays a single-field query.\n */\n flowActorExecutionId: z.string().isDBIndexed().optional(),\n\n /**\n * WHICH A2A agent (resource-server instance) this task was created through.\n *\n * Part of the read/cancel filter, not merely descriptive metadata. A2A agents are declared as\n * SEPARATE resource servers — tokens are audience-bound per instance, and an agent must have\n * \"no side-door into another agent's actor system\". Without this field the task plane had no\n * per-agent dimension at all, so a token bound to agent B could read and cancel a task created\n * through agent A whenever both resolved to the same owner scope. Since `title` carries the\n * first 120 characters of the originating prompt, that also disclosed prompt text across the\n * boundary the audience binding exists to enforce.\n *\n * Always populated: the DEFAULT (unnamed) agent is a real identity too and is stored under a\n * sentinel that cannot collide with a declared ref (instance refs are constrained to\n * `^[a-z0-9][a-z0-9-]*$`). Storing a normalised value rather than leaving the default agent's\n * tasks null keeps the filter a plain equality on both persistence adapters, instead of\n * depending on how each one matches an absent field.\n */\n resourceServerInstanceRef: z.string().min(1).isDBIndexed(),\n\n /**\n * WHICH machine credential opened this record — part of the read filter, not metadata.\n *\n * The injected scope FK does not identify the principal on the machine variants:\n * `applicationId` is a deployment singleton and `organizationId` is shared by every machine\n * client of one tenant, so without this axis a separately-credentialed client could read and\n * cancel another's work — and `title` carries the opening characters of the originating prompt.\n *\n * User-delegated turns store {@link FLOWS_ACTORS_NO_MACHINE_CREDENTIAL}: there the human is the\n * principal and the `userId` owner FK already discriminates.\n */\n machineCredentialId: z.string().min(1).isDBIndexed(),\n\n /** Indexed: `tasks/get` and the abandoned-task sweep both filter on status. */\n status: z.enum(FlowsActors_Status).isDBIndexed().isSummaryField(),\n\n /**\n * Short human-readable name for the work.\n *\n * ⚠️ CONTENT-BEARING, and `.isSummaryField()` puts it on the `/summary` projection: the A2A\n * transport fills it with the opening 120 characters of the ORIGINATING PROMPT. Treat it as\n * subject-provided content, not a label — it is why the read filter carries the agent-instance\n * and machine-credential axes, and why the portability policy classifies it separately from the\n * observed lifecycle fields.\n */\n // MASK on erasure, not REMOVE: `.min(1)` makes the field non-clearable, so a null would be rejected by\n // the strict update-DTO parse the impersonalize writer runs. The mask is a fixed non-empty string,\n // which the schema accepts. It matters that this one is scrubbed at all — the title is the opening\n // 120 characters of the originating PROMPT.\n title: addImpersonalizeWith(\n z.string().min(1).isSummaryField()\n .portabilityProvenance(DataPortabilityProvenance.SUBJECT_PROVIDED)\n // The opening 120 characters of the originating PROMPT, per the note above — content, not a label.\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.MASK,\n { maskValue: ERASED_TASK_TEXT },\n ),\n\n /**\n * A2A `contextId` — threads related turns. Indexed so a client can enumerate\n * the tasks of one conversation without walking executions.\n */\n contextId: z.string().isDBIndexed().optional(),\n\n // === Timestamps are `z.date()` with defaults, NOT the canonical schema's ISO\n // strings: the persistence layer date-coerces, and a missing default\n // yields `Invalid Date` on create (same rationale as the execution base). ===\n createdAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate(),\n /**\n * Indexed because the abandoned-task SWEEP filters on it (`updatedAt < cutoff` AND a status set),\n * once per variant per run. Without an index that query is a sequential scan over a collection\n * that only ever grows — terminal tasks are never deleted — so the sweep gets slower forever\n * while doing the same work. The sibling `status` index was declared for this query from the\n * start; this axis was left off, which made the pair half-served (review finding L-1).\n */\n updatedAt: z.date().default(() => new Date()).excludeFromCreate().excludeFromUpdate().isDBIndexed(),\n /** Set when the task reaches a terminal state; never on create. */\n finishedAt: z.date().optional().excludeFromCreate(),\n /**\n * The task's A2A push-notification configurations, SERIALIZED as a JSON string.\n *\n * A scalar string for the same reason `pausedApproval` is one: heavy nested sub-structures do not\n * round-trip through the Zod→Mongoose embedded-subdocument conversion, and this is a LIST of\n * objects that themselves nest (`authentication.schemes[]`). Parse and serialize ONLY through the\n * helpers below, at the persistence boundary.\n *\n * ⚠️ The stored blob contains CREDENTIALS the client gave us to present to its own webhook\n * (`token`, `authentication.credentials`). It is therefore backend-only by intent: nothing\n * projects this field to a client, and the read path redacts before answering. See\n * `redactPushNotificationSecrets`.\n */\n pushNotificationConfigs: z.string().nullish().excludeFromCreate().isBackendOnly(),\n});\nexport type FlowActorTaskBase = z.infer<typeof FlowActorTaskBaseSchema>;\n\n//===============================================================\n// Polymorphic declaration — one owner-scope variant per scope\n//===============================================================\n\n/**\n * The three owner-scope variants a task is stamped out for — the SAME set as\n * executions, so ownership of a task always matches the principal that drove the\n * turn. Each opts OUT of the singleton auto-business-key: tasks are MULTI-ROW per\n * scope, so the injected owner FK must NOT be marked `.isUnique()` (the second\n * task per scope would otherwise fail with a duplicate-key error).\n */\nexport const FLOW_ACTOR_TASK_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 tasks. Produces 3 variants:\n * - users → `userFlowActorTasks` (`userId` injected)\n * - organizations → `organizationFlowActorTasks` (`organizationId` injected)\n * - applications → `applicationFlowActorTasks` (`applicationId` injected)\n */\nexport const flowActorTasksPolymorphicDeclaration = declarePolymorphicSchemas({\n baseResourceType: 'flowActorTasks',\n baseFieldIdentifier: 'flowActorTaskId',\n baseEnumKey: 'FLOW_ACTOR_TASKS',\n baseSchema: FlowActorTaskBaseSchema,\n variants: FLOW_ACTOR_TASK_SCOPE_VARIANTS,\n});\n\n/**\n * Owner-agnostic UPDATE DTO — the mutations the task lifecycle actually performs.\n * Shared across variants because it references NO owner FK (owner is immutable).\n */\nexport const FlowActorTaskUpdateInternalSchema = z.object({\n status: FlowActorTaskBaseSchema.shape.status.optional(),\n output: FlowActorTaskBaseSchema.shape.output,\n artifacts: FlowActorTaskBaseSchema.shape.artifacts,\n // `actorStates` / `errorStates` are deliberately ABSENT — they are omitted from the\n // persisted family (see the omit block above), so an update DTO referencing them would\n // be a contract for a column that does not exist.\n finishedAt: FlowActorTaskBaseSchema.shape.finishedAt,\n /**\n * ⚠️ THIS SCHEMA IS AN ALLOW-LIST. A field absent here does not fail on write — the write\n * SUCCEEDS and persists nothing, which is how `pausedApproval` shipped unwritable and left every\n * paused turn unresumable. `.nullish()` because clearing a task's configurations is a real\n * transition (`pushNotificationConfig/delete` removing the last one).\n */\n pushNotificationConfigs: FlowActorTaskBaseSchema.shape.pushNotificationConfigs,\n});\n\n/**\n * Runtime shape of a persisted task (the base record). The owner FK is\n * variant-specific (`userId` | `organizationId` | `applicationId`) and read from\n * the concrete variant; the runtime supplies it explicitly on create.\n */\nexport type FlowActorTask = z.infer<typeof FlowActorTaskBaseSchema>;\n"]}
|
|
@@ -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;AASxB,oBAAY,uBAAuB;IACjC,IAAI,SAAS;IACb,KAAK,UAAU;IACf,YAAY,iBAAiB;IAC7B,SAAS,cAAc;IACvB,IAAI,eAAe;IACnB,IAAI,eAAe;IACnB,SAAS,oBAAoB;CAC9B;AAED;;;;GAIG;AACH,oBAAY,0BAA0B;IACpC,2DAA2D;IAC3D,iBAAiB,sBAAsB;IACvC,2FAA2F;IAC3F,WAAW,gBAAgB;IAC3B,mGAAmG;IACnG,UAAU,eAAe;CAC1B;AAED,oBAAY,kBAAkB;IAC5B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB;;;;;;OAMG;IACH,UAAU,eAAe;IACzB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,iBAAiB,sBAAsB;IACvC,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CASrF,CAAC;AAEF;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK9D;AAOD,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;2BAsBtD,CAAC;AACH,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,CAAC;AAGhH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAoC/C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAGlG,oBAAY,oBAAoB;IAC9B,UAAU,eAAe;IACzB,SAAS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