@wildo-ai/dev-companion 1.1.5 → 1.1.6
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/.tsbuildinfo +1 -1
- package/dist/esm/brand/models/logo-generation.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/brand/models/logo-generation.actors-system.definitions.js +0 -1
- package/dist/esm/brand/models/logo-generation.actors-system.definitions.js.map +1 -1
- package/dist/esm/brand/models/logo-judge.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/brand/models/logo-judge.actors-system.definitions.js +0 -1
- package/dist/esm/brand/models/logo-judge.actors-system.definitions.js.map +1 -1
- package/dist/esm/brand/services/brand-accept.companion.service.d.ts +8 -0
- package/dist/esm/brand/services/brand-accept.companion.service.d.ts.map +1 -1
- package/dist/esm/brand/services/brand-accept.companion.service.js +6 -0
- package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
- package/dist/esm/brand/services/brand-propagation.companion.utils.d.ts +21 -0
- package/dist/esm/brand/services/brand-propagation.companion.utils.d.ts.map +1 -0
- package/dist/esm/brand/services/brand-propagation.companion.utils.js +33 -0
- package/dist/esm/brand/services/brand-propagation.companion.utils.js.map +1 -0
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +69 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +84 -3
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +8 -4
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +9 -5
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -1
- package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.js +1 -1
- package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.js.map +1 -1
- package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts +4 -0
- package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js +25 -3
- package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js.map +1 -1
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +159 -11
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +424 -41
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +333 -60
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +1029 -185
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.d.ts +8 -2
- package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.js +8 -2
- package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.d.ts +20 -0
- package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.d.ts.map +1 -0
- package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.js +29 -0
- package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.js.map +1 -0
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts +11 -0
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js +60 -7
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +5 -4
- package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js +13 -4
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
- package/dist/esm/companion-api/companion-api.schemas.d.ts +193 -2
- package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
- package/dist/esm/companion-api/companion-api.schemas.js +20 -1
- package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
- package/dist/esm/companion-api/companion-error-guidance.models.d.ts +25 -0
- package/dist/esm/companion-api/companion-error-guidance.models.d.ts.map +1 -0
- package/dist/esm/companion-api/companion-error-guidance.models.js +26 -0
- package/dist/esm/companion-api/companion-error-guidance.models.js.map +1 -0
- package/dist/esm/companion-api/controllers/companion-file-route-confinement.d.ts +44 -0
- package/dist/esm/companion-api/controllers/companion-file-route-confinement.d.ts.map +1 -0
- package/dist/esm/companion-api/controllers/companion-file-route-confinement.js +111 -0
- package/dist/esm/companion-api/controllers/companion-file-route-confinement.js.map +1 -0
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts +6 -14
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.js +6 -14
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.js.map +1 -1
- package/dist/esm/companion-api/controllers/companion-trace-exemptions.d.ts +12 -0
- package/dist/esm/companion-api/controllers/companion-trace-exemptions.d.ts.map +1 -0
- package/dist/esm/companion-api/controllers/companion-trace-exemptions.js +20 -0
- package/dist/esm/companion-api/controllers/companion-trace-exemptions.js.map +1 -0
- package/dist/esm/companion-api/controllers/companion.controller.d.ts +104 -14
- package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +516 -122
- package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
- package/dist/esm/core/catalogs/structured-data-catalog-audit.service.d.ts.map +1 -1
- package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js +6 -38
- package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js.map +1 -1
- package/dist/esm/core/config/primary-language.companion.utils.d.ts +13 -0
- package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
- package/dist/esm/core/config/primary-language.companion.utils.js +19 -0
- package/dist/esm/core/config/primary-language.companion.utils.js.map +1 -1
- package/dist/esm/core/context/companion-package-loaders.companion.js +1 -39
- package/dist/esm/core/context/companion-package-loaders.companion.js.map +1 -1
- package/dist/esm/core/inject/models/container.d.ts.map +1 -1
- package/dist/esm/core/inject/models/container.js +4 -0
- package/dist/esm/core/inject/models/container.js.map +1 -1
- package/dist/esm/core/inject/models/service-types.d.ts +4 -0
- package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/core/inject/models/service-types.js +4 -0
- package/dist/esm/core/inject/models/service-types.js.map +1 -1
- package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.d.ts.map +1 -1
- package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js +16 -0
- package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js.map +1 -1
- package/dist/esm/core/introspection/models/companion-introspection.models.d.ts +1 -1
- package/dist/esm/core/introspection/models/companion-introspection.models.d.ts.map +1 -1
- package/dist/esm/core/introspection/models/companion-introspection.models.js +6 -0
- package/dist/esm/core/introspection/models/companion-introspection.models.js.map +1 -1
- package/dist/esm/core/introspection/resources/application-secrets.companion.d.ts +41 -0
- package/dist/esm/core/introspection/resources/application-secrets.companion.d.ts.map +1 -0
- package/dist/esm/core/introspection/resources/application-secrets.companion.js +155 -0
- package/dist/esm/core/introspection/resources/application-secrets.companion.js.map +1 -0
- package/dist/esm/core/introspection/resources/creation-console-answer.companion.d.ts +76 -0
- package/dist/esm/core/introspection/resources/creation-console-answer.companion.d.ts.map +1 -0
- package/dist/esm/core/introspection/resources/creation-console-answer.companion.js +197 -0
- package/dist/esm/core/introspection/resources/creation-console-answer.companion.js.map +1 -0
- package/dist/esm/core/introspection/resources/creation-console-projection.companion.d.ts +47 -0
- package/dist/esm/core/introspection/resources/creation-console-projection.companion.d.ts.map +1 -0
- package/dist/esm/core/introspection/resources/creation-console-projection.companion.js +199 -0
- package/dist/esm/core/introspection/resources/creation-console-projection.companion.js.map +1 -0
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts +42 -0
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +173 -22
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts +78 -90
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +288 -25
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts +22 -36
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js +49 -13
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js +10 -15
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts +2 -0
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/asset-noop-hooks.d.ts +4 -0
- package/dist/esm/core/introspection/subprocess/asset-noop-hooks.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/asset-noop-hooks.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +77 -9
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts +45 -3
- package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js +8 -1
- package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts +3 -2
- package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.js +8 -3
- package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +30 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js +128 -20
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts +13 -0
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js +21 -17
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js.map +1 -1
- package/dist/esm/core/runtime/companion-endpoint-record.d.ts +8 -0
- package/dist/esm/core/runtime/companion-endpoint-record.d.ts.map +1 -0
- package/dist/esm/core/runtime/companion-endpoint-record.js +23 -0
- package/dist/esm/core/runtime/companion-endpoint-record.js.map +1 -0
- package/dist/esm/core/runtime/companion-env-file.d.ts +30 -0
- package/dist/esm/core/runtime/companion-env-file.d.ts.map +1 -0
- package/dist/esm/core/runtime/companion-env-file.js +53 -0
- package/dist/esm/core/runtime/companion-env-file.js.map +1 -0
- package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts +5 -0
- package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
- package/dist/esm/core/runtime/dev-compile-quiet.companion.js +11 -0
- package/dist/esm/core/runtime/dev-compile-quiet.companion.js.map +1 -1
- package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.d.ts +56 -0
- package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.d.ts.map +1 -0
- package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.js +97 -0
- package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.js.map +1 -0
- package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +43 -3
- package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
- package/dist/esm/core/runtime/services/start-companion-application.service.js +127 -22
- package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts +11 -1
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +42 -19
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
- package/dist/esm/core/specifications/resource-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/resource-specification-context.factory.js +10 -1
- package/dist/esm/core/specifications/resource-specification-context.factory.js.map +1 -1
- package/dist/esm/core/traceability/companion-traceability.models.d.ts +1 -7
- package/dist/esm/core/traceability/companion-traceability.models.d.ts.map +1 -1
- package/dist/esm/core/traceability/companion-traceability.models.js +3 -5
- package/dist/esm/core/traceability/companion-traceability.models.js.map +1 -1
- package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js +15 -14
- package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js.map +1 -1
- package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts +0 -23
- package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts.map +1 -1
- package/dist/esm/creation-conversation/creation-conversation.function-tools.js +251 -50
- package/dist/esm/creation-conversation/creation-conversation.function-tools.js.map +1 -1
- package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js +0 -2
- package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
- package/dist/esm/deliberations/services/deliberation.companion.service.d.ts.map +1 -1
- package/dist/esm/deliberations/services/deliberation.companion.service.js +3 -2
- package/dist/esm/deliberations/services/deliberation.companion.service.js.map +1 -1
- package/dist/esm/email/models/email-template.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/email/models/email-template.actors-system.definitions.js +0 -1
- package/dist/esm/email/models/email-template.actors-system.definitions.js.map +1 -1
- package/dist/esm/email/services/email-template.companion.service.d.ts +5 -3
- package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
- package/dist/esm/email/services/email-template.companion.service.js +53 -255
- package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
- package/dist/esm/email/utils/email-labels-file-source.utils.d.ts +12 -0
- package/dist/esm/email/utils/email-labels-file-source.utils.d.ts.map +1 -1
- package/dist/esm/email/utils/email-labels-file-source.utils.js +62 -3
- package/dist/esm/email/utils/email-labels-file-source.utils.js.map +1 -1
- package/dist/esm/email/utils/email-labels-tree.utils.d.ts +52 -0
- package/dist/esm/email/utils/email-labels-tree.utils.d.ts.map +1 -0
- package/dist/esm/email/utils/email-labels-tree.utils.js +261 -0
- package/dist/esm/email/utils/email-labels-tree.utils.js.map +1 -0
- package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.d.ts +2 -0
- package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.d.ts.map +1 -1
- package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.js +21 -1
- package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.js.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.d.ts +18 -1
- package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.js +187 -46
- package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js +0 -1
- package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js +0 -1
- package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js.map +1 -1
- package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
- package/dist/esm/expert-personas/services/expert-persona.companion.service.js +10 -0
- package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts +1 -8
- package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.js +2 -9
- package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.js.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts +2 -0
- package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.js +3 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.d.ts +32 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.js +32 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.js.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts +0 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.js +0 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts +0 -7
- package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.js +0 -7
- package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.d.ts +30 -4
- package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.js +31 -5
- package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts +0 -2
- package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.js +0 -2
- package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts +4 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js +5 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts +1 -15
- package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.js +1 -15
- package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts +0 -3
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js +0 -3
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts +49 -16
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js +49 -16
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts +0 -5
- package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.js +0 -5
- package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts +3 -0
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js +4 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts +7 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.js +8 -2
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.d.ts +12 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.js +12 -0
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js +2 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.d.ts +10 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.js +11 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts +8 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.js +9 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.js.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts +3 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js +4 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts +2 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js +3 -2
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts +6 -0
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.js +7 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.js.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts +1 -0
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.js +2 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.js.map +1 -1
- package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts +0 -2
- package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/progression_milestone_tracker.en.js +0 -2
- package/dist/esm/i18n/components/progression_milestone_tracker.en.js.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts +1 -0
- package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-conversation.en.js +123 -19
- package/dist/esm/i18n/composite_views/app.creation-conversation.en.js.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-dossier.en.d.ts.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-dossier.en.js +12 -0
- package/dist/esm/i18n/composite_views/app.creation-dossier.en.js.map +1 -1
- package/dist/esm/i18n/errors_guidance/errors-guidance.en.d.ts +25 -0
- package/dist/esm/i18n/errors_guidance/errors-guidance.en.d.ts.map +1 -0
- package/dist/esm/i18n/errors_guidance/errors-guidance.en.js +26 -0
- package/dist/esm/i18n/errors_guidance/errors-guidance.en.js.map +1 -0
- package/dist/esm/i18n/errors_messages/errors-messages.en.d.ts +26 -3
- package/dist/esm/i18n/errors_messages/errors-messages.en.d.ts.map +1 -1
- package/dist/esm/i18n/errors_messages/errors-messages.en.js +25 -3
- package/dist/esm/i18n/errors_messages/errors-messages.en.js.map +1 -1
- package/dist/esm/i18n/index.d.ts +10 -8
- package/dist/esm/i18n/index.d.ts.map +1 -1
- package/dist/esm/i18n/index.js +10 -8
- package/dist/esm/i18n/index.js.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts +10 -0
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js +2 -0
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.d.ts +97 -0
- package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.js +60 -0
- package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchAspects.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchAspects.en.js +6 -0
- package/dist/esm/i18n/resources/workbenchAspects.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildDispatches.en.d.ts +5 -0
- package/dist/esm/i18n/resources/workbenchBuildDispatches.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildDispatches.en.js +1 -0
- package/dist/esm/i18n/resources/workbenchBuildDispatches.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.d.ts +24 -0
- package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.js +8 -0
- package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts +30 -0
- package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchDossierEntries.en.js +9 -0
- package/dist/esm/i18n/resources/workbenchDossierEntries.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.d.ts +17 -4
- package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.js +32 -4
- package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.d.ts +8 -2
- package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.js +6 -2
- package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.d.ts +18 -7
- package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.js +17 -7
- package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts +28 -3
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.js +13 -3
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts +3 -2
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js +8 -2
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +118 -8
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +42 -16
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.d.ts +12 -2
- package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.js +16 -2
- package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.js.map +1 -1
- package/dist/esm/i18n/system_enums/application-creation.en.d.ts +10 -0
- package/dist/esm/i18n/system_enums/application-creation.en.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/application-creation.en.js +11 -0
- package/dist/esm/i18n/system_enums/application-creation.en.js.map +1 -1
- package/dist/esm/i18n/system_enums/processor-register.en.d.ts +6 -0
- package/dist/esm/i18n/system_enums/processor-register.en.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/processor-register.en.js +6 -0
- package/dist/esm/i18n/system_enums/processor-register.en.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts +4 -1
- package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-dossier.en.js +5 -1
- package/dist/esm/i18n/system_enums/workbench-dossier.en.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-secrets.en.d.ts +46 -0
- package/dist/esm/i18n/system_enums/workbench-secrets.en.d.ts.map +1 -0
- package/dist/esm/i18n/system_enums/workbench-secrets.en.js +46 -0
- package/dist/esm/i18n/system_enums/workbench-secrets.en.js.map +1 -0
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.d.ts +8 -0
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.js +13 -0
- package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.js.map +1 -1
- package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.d.ts +61 -0
- package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.js +22 -0
- package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.js.map +1 -0
- package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts +105 -24
- package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling-unit.models.js +55 -24
- package/dist/esm/i18n-labelling/models/labelling-unit.models.js.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js +0 -2
- package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js.map +1 -1
- package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.d.ts +48 -0
- package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js +145 -0
- package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js.map +1 -0
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts +70 -18
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +330 -113
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts +45 -0
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js +208 -6
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +11 -2
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js +101 -18
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts +64 -1
- package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js +393 -70
- package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts +9 -5
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/email-template-translation.utils.d.ts +54 -0
- package/dist/esm/i18n-labelling/utils/email-template-translation.utils.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/utils/email-template-translation.utils.js +74 -0
- package/dist/esm/i18n-labelling/utils/email-template-translation.utils.js.map +1 -0
- package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts +3 -3
- package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.d.ts +24 -0
- package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.js +34 -0
- package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.js.map +1 -0
- package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js +5 -1
- package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.d.ts +76 -0
- package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.js +110 -0
- package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.js.map +1 -0
- package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.d.ts +17 -0
- package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.js +23 -0
- package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.js.map +1 -0
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts +36 -3
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js +77 -5
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.d.ts +38 -0
- package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.js +66 -0
- package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.js.map +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +9 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.js +0 -1
- package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +1 -3
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/application-line-catalog.models.d.ts +11 -0
- package/dist/esm/meta-workflows/models/application-line-catalog.models.d.ts.map +1 -0
- package/dist/esm/meta-workflows/models/application-line-catalog.models.js +17 -0
- package/dist/esm/meta-workflows/models/application-line-catalog.models.js.map +1 -0
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js +0 -1
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +1 -1
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/composite-round-relaunch.models.d.ts +14 -0
- package/dist/esm/meta-workflows/models/composite-round-relaunch.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/composite-round-relaunch.models.js +18 -0
- package/dist/esm/meta-workflows/models/composite-round-relaunch.models.js.map +1 -1
- package/dist/esm/meta-workflows/models/human-decision-settler.models.d.ts +14 -0
- package/dist/esm/meta-workflows/models/human-decision-settler.models.d.ts.map +1 -0
- package/dist/esm/meta-workflows/models/human-decision-settler.models.js +18 -0
- package/dist/esm/meta-workflows/models/human-decision-settler.models.js.map +1 -0
- package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts +31 -23
- package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js +36 -5
- package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js.map +1 -1
- package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js +1 -3
- package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts +19 -0
- package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js +38 -6
- package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js.map +1 -1
- package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts +48 -3
- package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/playbook-run-record.models.js +61 -8
- package/dist/esm/meta-workflows/models/playbook-run-record.models.js.map +1 -1
- package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts +15 -1
- package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js +50 -5
- package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +52 -9
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +131 -59
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.d.ts +19 -0
- package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.js +36 -0
- package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.js.map +1 -0
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +9 -0
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +41 -17
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +42 -2
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +121 -4
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts +32 -0
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js +161 -0
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js.map +1 -0
- package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.d.ts +2 -0
- package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.js +1 -0
- package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts +3 -2
- package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js +12 -3
- package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts +74 -1
- package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/dossier.companion.service.js +227 -30
- package/dist/esm/meta-workflows/services/dossier.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts +29 -2
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +68 -5
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/governed-document-texts.companion.d.ts +40 -0
- package/dist/esm/meta-workflows/services/governed-document-texts.companion.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/governed-document-texts.companion.js +91 -0
- package/dist/esm/meta-workflows/services/governed-document-texts.companion.js.map +1 -0
- package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.d.ts +25 -0
- package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.js +40 -0
- package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.js.map +1 -0
- package/dist/esm/meta-workflows/services/playbook-instance.companion.service.d.ts +90 -0
- package/dist/esm/meta-workflows/services/playbook-instance.companion.service.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/playbook-instance.companion.service.js +307 -0
- package/dist/esm/meta-workflows/services/playbook-instance.companion.service.js.map +1 -0
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts +29 -0
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js +44 -4
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +360 -47
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +1424 -246
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
- package/package.json +17 -17
- package/dist/esm/__time-gov.probe.d.mts +0 -0
- package/dist/esm/__time-gov.probe.d.mts.map +0 -0
- package/dist/esm/__time-gov.probe.mjs.map +0 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.d.ts +0 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.d.ts.map +0 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.js.map +0 -0
- package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts +0 -0
- package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts.map +0 -0
- package/dist/esm/i18n/composite_views/app.creation-board.en.js.map +0 -0
- package/dist/esm/meta-workflows/services/creator-inputs.companion.service.d.ts +0 -0
- package/dist/esm/meta-workflows/services/creator-inputs.companion.service.d.ts.map +0 -0
- package/dist/esm/meta-workflows/services/creator-inputs.companion.service.js.map +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { unwrapSchema, getZodType, getZodDefProperty, hasZodInternals, getZodDefArrayProperty, getZodObjectShape, getZodDefSchemaProperty, getEnumValues, getUnionObjectMembers, hasTooltipForDisplay, hasTooltipForEdit, hasDescriptionForDisplay, hasDescriptionForEdit, isEphemeralField, isHiddenForDisplay, isHiddenForEdit, } from '@wildo-ai/zod-decorators';
|
|
2
|
-
import { LabelKind, SYSTEM_ENUM_VALUES, resolveDeclaredSystemEnumName, resolveFieldEnumSchema, synthesizeUnionDiscriminatorEnums, } from '@wildo-ai/presets-components-models';
|
|
1
|
+
import { unwrapSchema, getZodType, getZodDefProperty, hasZodInternals, getZodDefArrayProperty, getZodObjectShape, getZodDefSchemaProperty, getEnumValues, getUnionObjectMembers, hasTooltipForDisplay, hasTooltipForEdit, hasDescriptionForDisplay, hasDescriptionForEdit, isEphemeralField, isHiddenForDisplay, isHiddenForEdit, isFieldContainerSchema, } from '@wildo-ai/zod-decorators';
|
|
2
|
+
import { LabelKind, SYSTEM_ENUM_VALUES, resolveDeclaredSystemEnumName, resolveFieldEnumSchema, synthesizeUnionDiscriminatorEnums, isSectionedVocabulary, } from '@wildo-ai/presets-components-models';
|
|
3
|
+
import { ApplicationConfigVocabulary, ENGINE_OPEN_VOCABULARY_VALUES } from '@wildo-ai/saas-models';
|
|
3
4
|
import { LabellingTypes } from '@wildo-ai/presets-components-models';
|
|
4
5
|
/*
|
|
5
6
|
* The framework's system-enum catalogue (`SYSTEM_ENUM_VALUES`) and the exact value-set match used to
|
|
@@ -158,6 +159,21 @@ export function collectSchemaFields(schema, basePath, acc, discriminatorEnums, i
|
|
|
158
159
|
return;
|
|
159
160
|
switch (typeName) {
|
|
160
161
|
case 'object': {
|
|
162
|
+
/*
|
|
163
|
+
* A structured VALUE is a Zod object whose parts are not fields (#1959). `z_money()` is
|
|
164
|
+
* `{ amount, currency, decimals }` and `z_address()` is `{ line1, …, coordinates }`, but the value's own
|
|
165
|
+
* component draws and names those parts; the resource has one word for the whole value, its field label,
|
|
166
|
+
* which the parent's `registerField` has already planned. The renderer's walk
|
|
167
|
+
* (`collectResourceLabelFieldEntries`) stops here through the same `isFieldContainerSchema`, so every word
|
|
168
|
+
* planned below this point was generated, translated and shipped with no reader — measured in Wonder CRM,
|
|
169
|
+
* `fields.amount.amount`, `fields.amount.currency` and `fields.amount.decimals` for `deal.amount`.
|
|
170
|
+
*
|
|
171
|
+
* Gated here, on the object about to be walked, rather than at each of the four recursions that reach it,
|
|
172
|
+
* so a structured value met as a field, an array item, a union member or an intersection side stops alike.
|
|
173
|
+
* Read off the classifier rather than a list of value types, so a structured type added tomorrow is covered.
|
|
174
|
+
*/
|
|
175
|
+
if (!isFieldContainerSchema(schema))
|
|
176
|
+
break;
|
|
161
177
|
const shape = getZodObjectShape(unwrapped);
|
|
162
178
|
for (const key of Object.keys(shape)) {
|
|
163
179
|
const nextPath = [...basePath, key];
|
|
@@ -388,7 +404,7 @@ export function collectSystemEnumVocabularies(resourceConfigs) {
|
|
|
388
404
|
/**
|
|
389
405
|
* Build the full `system_enums.<EnumName>.<value>` key list for the labelling plan.
|
|
390
406
|
*
|
|
391
|
-
* ##
|
|
407
|
+
* ## The sources, and why each is needed
|
|
392
408
|
*
|
|
393
409
|
* 1. **`SYSTEM_ENUM_VALUES`** — every member of the framework's declared `SystemEnumName`
|
|
394
410
|
* vocabulary, unconditionally. These are framework-owned and an application may reach one
|
|
@@ -401,6 +417,15 @@ export function collectSystemEnumVocabularies(resourceConfigs) {
|
|
|
401
417
|
* is the half no fixed list can have: `SubscriptionStatus` has no `SystemEnumName`
|
|
402
418
|
* member, and an application that decorates a new vocabulary tomorrow is planned with no
|
|
403
419
|
* edit anywhere.
|
|
420
|
+
* 3. **`applicationVocabularies`** — vocabularies whose NAME the framework owns and whose VALUES
|
|
421
|
+
* the application declares rather than a schema: in its configuration
|
|
422
|
+
* ({@link collectApplicationConfigSystemEnumVocabularies}), such as the reviewers' reason codes
|
|
423
|
+
* (#1921), or in its gates' `pauseStates`, which the planner adds from the backend introspection
|
|
424
|
+
* (#1864). No resource schema can carry those values, because they are the application's declarations.
|
|
425
|
+
* 4. **`ENGINE_OPEN_VOCABULARY_VALUES`** — the engine's OPEN vocabularies (#1791): a STRING field names one
|
|
426
|
+
* with `.systemEnum(EngineOpenVocabulary.X)` because the schema cannot enumerate its values (an audit
|
|
427
|
+
* event's `eventType`), so the values come from the one list the engine keeps of them. Planned for every
|
|
428
|
+
* application, like source 1.
|
|
404
429
|
*
|
|
405
430
|
* ## Why it lives HERE rather than in the planner
|
|
406
431
|
*
|
|
@@ -415,12 +440,33 @@ export function collectSystemEnumVocabularies(resourceConfigs) {
|
|
|
415
440
|
* alphabetically, so the key list is deterministic and the labelling lock's fingerprint is
|
|
416
441
|
* stable across runs. A name in both sources contributes one group — the union of its values.
|
|
417
442
|
*/
|
|
418
|
-
export function buildSystemEnumLabelKeys(resourceConfigs) {
|
|
443
|
+
export function buildSystemEnumLabelKeys(resourceConfigs, applicationVocabularies = new Map()) {
|
|
419
444
|
const vocabularies = new Map();
|
|
420
445
|
for (const [enumName, values] of Object.entries(SYSTEM_ENUM_VALUES)) {
|
|
421
446
|
vocabularies.set(enumName, new Set(values));
|
|
422
447
|
}
|
|
423
|
-
|
|
448
|
+
const discoveredVocabularies = collectSystemEnumVocabularies(resourceConfigs);
|
|
449
|
+
// Source 4: the engine's OPEN vocabularies, unconditionally — a string field names one with `.systemEnum()`, and
|
|
450
|
+
// its values are the engine's to list, not the field's (#1791).
|
|
451
|
+
for (const [enumName, values] of Object.entries(ENGINE_OPEN_VOCABULARY_VALUES)) {
|
|
452
|
+
const merged = discoveredVocabularies.get(enumName) ?? new Set();
|
|
453
|
+
for (const value of values)
|
|
454
|
+
merged.add(value);
|
|
455
|
+
discoveredVocabularies.set(enumName, merged);
|
|
456
|
+
}
|
|
457
|
+
for (const [enumName, values] of applicationVocabularies) {
|
|
458
|
+
const merged = discoveredVocabularies.get(enumName) ?? new Set();
|
|
459
|
+
for (const value of values)
|
|
460
|
+
merged.add(value);
|
|
461
|
+
discoveredVocabularies.set(enumName, merged);
|
|
462
|
+
}
|
|
463
|
+
// A vocabulary that keeps its words in a section of its own (a feature, a limit, #1851) is planned there — by the
|
|
464
|
+
// billing unit, total over the declared features and limits — and never a second time under `system_enums`.
|
|
465
|
+
for (const enumName of [...discoveredVocabularies.keys()]) {
|
|
466
|
+
if (isSectionedVocabulary(enumName))
|
|
467
|
+
discoveredVocabularies.delete(enumName);
|
|
468
|
+
}
|
|
469
|
+
for (const [enumName, values] of discoveredVocabularies) {
|
|
424
470
|
const existing = vocabularies.get(enumName);
|
|
425
471
|
if (existing) {
|
|
426
472
|
for (const value of values)
|
|
@@ -441,6 +487,32 @@ export function buildSystemEnumLabelKeys(resourceConfigs) {
|
|
|
441
487
|
}
|
|
442
488
|
return keys;
|
|
443
489
|
}
|
|
490
|
+
/**
|
|
491
|
+
* The named vocabularies whose VALUES the application declares in its configuration — source 3 of
|
|
492
|
+
* {@link buildSystemEnumLabelKeys}, one entry per configuration-declared `ApplicationConfigVocabulary` member (the
|
|
493
|
+
* gates' pause states, #1864, are declared in backend modules; the planner adds them from the backend introspection):
|
|
494
|
+
*
|
|
495
|
+
* - the reason codes an expert may give for correcting an agent's work (`agentWorkReview.reasonCodes`, #1921),
|
|
496
|
+
* worded under `system_enums.AgentWorkReasonCode.<code>` and read by the reviewer's approval card;
|
|
497
|
+
* - the organization types (`organizationTypes`, keyed by type, #1851), worded under
|
|
498
|
+
* `system_enums.OrganizationType.<type>` and read wherever an organization's `type` is shown.
|
|
499
|
+
*
|
|
500
|
+
* A value the application declares is planned the moment it is declared and one it removes stops being planned —
|
|
501
|
+
* no hand-kept list of the application's values exists anywhere.
|
|
502
|
+
*
|
|
503
|
+
* Rejected: wording the codes inside the approval component's own labels. A component label key is fixed at
|
|
504
|
+
* authoring time, and these values are the application's; the component would need one key per code it cannot know.
|
|
505
|
+
*/
|
|
506
|
+
export function collectApplicationConfigSystemEnumVocabularies(appConfig) {
|
|
507
|
+
const vocabularies = new Map();
|
|
508
|
+
const reasonCodes = appConfig?.agentWorkReview?.reasonCodes ?? [];
|
|
509
|
+
if (reasonCodes.length > 0)
|
|
510
|
+
vocabularies.set(ApplicationConfigVocabulary.AGENT_WORK_REASON_CODE, [...reasonCodes]);
|
|
511
|
+
const organizationTypes = Object.keys(appConfig?.organizationTypes ?? {});
|
|
512
|
+
if (organizationTypes.length > 0)
|
|
513
|
+
vocabularies.set(ApplicationConfigVocabulary.ORGANIZATION_TYPE, organizationTypes);
|
|
514
|
+
return vocabularies;
|
|
515
|
+
}
|
|
444
516
|
/**
|
|
445
517
|
* Framework-general purpose for an ephemeral field's user-facing LABEL. The
|
|
446
518
|
* runtime field name (`plainKey`) is developer-oriented; the LLM, given this
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-fields-extractor.utils.js","sourceRoot":"","sources":["../../../../../src/i18n-labelling/utils/schema-fields-extractor.utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,EACvB,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,SAAS,EACT,kBAAkB,EAClB,6BAA6B,EAC7B,sBAAsB,EACtB,iCAAiC,GAClC,MAAM,qCAAqC,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ZodDefArrayProperty,\n getZodObjectShape,\n getZodDefSchemaProperty,\n getEnumValues,\n getUnionObjectMembers,\n hasTooltipForDisplay,\n hasTooltipForEdit,\n hasDescriptionForDisplay,\n hasDescriptionForEdit,\n isEphemeralField,\n isHiddenForDisplay,\n isHiddenForEdit,\n} from '@wildo-ai/zod-decorators';\nimport {\n LabelKind,\n SYSTEM_ENUM_VALUES,\n resolveDeclaredSystemEnumName,\n resolveFieldEnumSchema,\n synthesizeUnionDiscriminatorEnums,\n} from '@wildo-ai/presets-components-models';\nimport type { AnyResourceConfiguration } from '@wildo-ai/saas-models';\nimport { LabellingTypes } from '@wildo-ai/presets-components-models';\nimport type { LabelKeyMeta } from '../models/labelling-unit.models';\n\n/**\n * Per-field metadata captured while walking a Zod schema. Used to\n * decide which translation keys (display/edit, tooltip, description,\n * enum values) need to be generated for a given field path.\n *\n * Two specific behaviors that consumers must NOT change without\n * carefully reviewing every planner caller:\n *\n * 1. **`data.…<path>` collapses onto `<path>`** when both exist —\n * legacy code at `collectResourcesFieldKeys` strips the `data.`\n * prefix and drops the duplicate. We replicate the same filter in\n * `extractResourceFieldKeys` below, collapsing EVERY leading\n * `data.` segment: a LIST response DTO nests the resource under a\n * multi-level `{ data: { data: [ … ] } }` envelope, so the same\n * field surfaces at `data.`, `data.data.`, `data.data.data.` … and\n * all of those depths are duplicates of the top-level field.\n *\n * 2. **System enums are excluded from per-field enum keys.** A field\n * whose values exactly match a known system enum (timezone,\n * currency, locale, …) is registered with `isSystemEnum: true` so\n * the resource unit doesn't re-emit the same translation under\n * `<resource>.fields.<path>.enum.<value>`. The system enums get\n * translated once in the dedicated `theme:system_enums` unit.\n */\nexport interface SchemaFieldInfo {\n isEnum: boolean;\n enumValues?: string[];\n isSystemEnum?: boolean;\n schema?: z.ZodTypeAny;\n /**\n * `true` when ANY occurrence of this field path carries the `.isEphemeral()`\n * marker (a one-time secret like an API key's `plainKey`, surfaced only in a\n * per-operation `customResponseDto`). Drives two ephemeral-specific outputs:\n * a forced `display.description` key (the \"copy it now, shown once\" caption)\n * and the framework-general label/description keyMeta built by\n * `buildEphemeralFieldKeyMeta`. OR-accumulated across schema occurrences.\n */\n isEphemeral?: boolean;\n /**\n * The system-enum NAME this field's values belong to, when it has one — either\n * declared by `.systemEnum('X')` on the schema, or recognised by an exact value-set\n * match against `SYSTEM_ENUM_VALUES`. Answered by `resolveDeclaredSystemEnumName`\n * (`@wildo-ai/presets-components-models`), the same function the frontend's\n * `tResourceFieldEnumValue` reads, so \"suppressed here\" and \"looked up there\" cannot\n * disagree about which enum a field declares (#966).\n *\n * Recorded rather than discarded because it is the OTHER half of `isSystemEnum`.\n * `isSystemEnum` says \"suppress the per-field `<resource>.fields.<path>.enum.<value>`\n * keys\"; the name says WHERE the label must be planned instead\n * (`system_enums.<name>.<value>`). Keeping only the boolean is what let a decorated\n * name be suppressed here and never planned there, leaving the value with no label\n * anywhere and rendering its RAW wire value in the UI — see\n * `collectSystemEnumVocabularies` below.\n */\n systemEnumName?: string;\n /**\n * Two occurrences of this field declared DIFFERENT vocabularies (#1108), so no `system_enums` group may\n * claim it even if a later occurrence agrees with one of them. Set once, never cleared.\n */\n systemEnumDisputed?: boolean;\n}\n\nexport type SchemaFieldInfoMap = Map<string, SchemaFieldInfo>;\n\n/*\n * The framework's system-enum catalogue (`SYSTEM_ENUM_VALUES`) and the exact value-set match used to\n * live here. They moved to `@wildo-ai/presets-components-models` (#966) so the frontend label cascade\n * reads the SAME answer to \"which enum does this field declare\" — see `resolveDeclaredSystemEnumName`.\n */\n\n/**\n * Register one field path.\n *\n * @param enumSourceSchema - the schema the field's VOCABULARY is read from, when it is not the field's own.\n * A union's discriminator passes the enum `synthesizeUnionDiscriminatorEnums` collected across every\n * member, so the path carries the whole vocabulary rather than one member's literal. The field's own\n * `schema` still supplies its tooltip/description/ephemeral metadata.\n * @param insideUnresolvableUnion - `true` inside a union `getUnionObjectMembers` does not recognise (see\n * `collectSchemaFields`): the field is registered, but never as an enum of ANY shape.\n */\nfunction registerField(\n pathParts: string[],\n schema: z.ZodTypeAny,\n acc: SchemaFieldInfoMap,\n enumSourceSchema?: z.ZodTypeAny,\n insideUnresolvableUnion = false,\n): void {\n const fieldPath = pathParts.join('.');\n const unwrapped = unwrapSchema(schema);\n if (!unwrapped) return;\n\n if (!acc.has(fieldPath)) acc.set(fieldPath, { isEnum: false });\n const entry = acc.get(fieldPath)!;\n if (!entry.schema) entry.schema = schema;\n\n // A field is ephemeral if ANY of its occurrences carries `.isEphemeral()`.\n // Ephemeral fields live only in a per-operation customResponseDto (e.g. an API\n // key's `plainKey`), so they never reach the resource spec — the marker on the\n // runtime schema is the only signal the labelling pipeline gets.\n if (isEphemeralField(schema)) entry.isEphemeral = true;\n\n /*\n * WHETHER the field carries a vocabulary is `resolveFieldEnumSchema`'s answer — the renderer's\n * (`resolveResourceLabelEnumSchema` delegates to it). This used to ask \"is the unwrapped type `enum`\",\n * so a discriminator `z.literal` (#1021) and an ARRAY's element (#1079) were invisible here while the\n * renderer looked both up: `privacy.consentedPurposes: z.array(z.enum(ConsentPurpose).systemEnum(…))`\n * was planned nowhere, and the consent gate rendered its purposes raw.\n */\n const resolvedEnumSchema = resolveFieldEnumSchema(enumSourceSchema ?? schema);\n const enumSchema = insideUnresolvableUnion ? undefined : resolvedEnumSchema;\n\n if (enumSchema) {\n const occurrenceValues = extractEnumValues(enumSchema);\n /*\n * A field's planned vocabulary is the UNION of every value any occurrence of it can hold (#1108).\n *\n * One path is walked several times — the main schema, then every operation's request and response\n * DTO — and a later occurrence used to REPLACE the values an earlier one had registered. For a\n * `createSchemaFamily` discriminator that is fatal: the main schema is the family's discriminated\n * union, whose synthesized discriminator carries every base value and every variant, while a\n * variant's request DTO carries that ONE variant's literal. Walked last, the DTO left\n * `consumableTokens.consumptionMode` planned with `BOUNDED_REUSE` alone, and a regeneration that\n * followed the plan deleted the words for `SINGLE_USE` and `EPHEMERAL_STATE` — values rows hold.\n */\n entry.isEnum = true;\n entry.enumValues = [...new Set([...(entry.enumValues ?? []), ...occurrenceValues])];\n // The DECORATOR wins over value matching: `.systemEnum('SubscriptionStatus')` names a\n // vocabulary that has no `SystemEnumName` member and could never be recognised by\n // values. Both answers feed one field so that suppression (`isSystemEnum`) and the\n // planned destination (`systemEnumName`) can never disagree about the same field — and\n // the function is shared with the frontend cascade, so neither can the renderer (#966).\n // Across occurrences the name survives only while every occurrence that declares one\n // declares the same; a narrowed DTO literal that declares nothing keeps the union's answer,\n // and two occurrences naming different vocabularies leave the field with per-field words,\n // as `synthesizeUnionDiscriminatorEnums` decides for disagreeing members.\n const declared = resolveDeclaredSystemEnumName(enumSchema, occurrenceValues);\n if (declared !== undefined) {\n if (entry.systemEnumName === undefined && !entry.systemEnumDisputed) entry.systemEnumName = declared;\n else if (entry.systemEnumName !== declared) {\n entry.systemEnumName = undefined;\n entry.systemEnumDisputed = true;\n }\n }\n entry.isSystemEnum = Boolean(entry.systemEnumName);\n }\n}\n\n/**\n * The values of an enum-bearing schema. A `z.enum` keeps the extraction this planner has always used\n * (with its fallbacks over Zod's enum def shapes); a literal or a union of enum-likes reads `getEnumValues`,\n * as the renderer does.\n */\nfunction extractEnumValues(enumSchema: z.ZodTypeAny): string[] {\n const unwrapped = unwrapSchema(enumSchema);\n if (getZodType(unwrapped) !== 'enum') return getEnumValues(enumSchema);\n\n const entriesFromDef = getZodDefProperty(unwrapped, 'entries');\n const valuesFromDef = getZodDefProperty(unwrapped, 'values');\n const schemaAny = unwrapped as { options?: unknown; enum?: unknown };\n const optionsFromSchema = schemaAny.options;\n const enumFromSchema = schemaAny.enum;\n\n let enumValues = getEnumValues(unwrapped);\n\n if (enumValues.length === 0) {\n if (Array.isArray(entriesFromDef)) {\n enumValues = entriesFromDef.filter((v): v is string => typeof v === 'string');\n } else if (Array.isArray(valuesFromDef)) {\n enumValues = valuesFromDef.filter((v): v is string => typeof v === 'string');\n } else if (Array.isArray(optionsFromSchema)) {\n enumValues = (optionsFromSchema as unknown[]).filter((v): v is string => typeof v === 'string');\n } else if (entriesFromDef && typeof entriesFromDef === 'object' && !Array.isArray(entriesFromDef)) {\n const enumObj = entriesFromDef as Record<string, unknown>;\n for (const key of Object.keys(enumObj)) {\n const value = enumObj[key];\n if (typeof value === 'string') {\n if (!Number.isNaN(Number(key))) continue;\n enumValues.push(value);\n } else if (typeof value === 'number') {\n enumValues.push(String(value));\n }\n }\n } else if (enumFromSchema && typeof enumFromSchema === 'object' && !Array.isArray(enumFromSchema)) {\n const enumObj = enumFromSchema as Record<string, unknown>;\n for (const key of Object.keys(enumObj)) {\n const value = enumObj[key];\n if (typeof value === 'string') {\n enumValues.push(value);\n } else if (typeof value === 'number') {\n const reverseKey = String(value);\n if ((enumObj as Record<string, unknown>)[reverseKey] !== key) {\n enumValues.push(String(value));\n }\n }\n }\n }\n }\n\n return enumValues;\n}\n\n/**\n * Recursively walk a Zod schema and populate the field info map.\n *\n * @param discriminatorEnums - set only when walking one member of a union: the union's discriminator enums\n * (`synthesizeUnionDiscriminatorEnums`), read in place of that member's own literal so the discriminator\n * path carries the vocabulary of EVERY member — and its declared `system_enums` name when they all agree —\n * exactly as the renderer's `collectResourceLabelFieldEntries` collects it (#1021).\n * @param insideUnresolvableUnion - `true` once the walk is inside a union `getUnionObjectMembers` does not\n * recognise (no key discriminates it). The renderer walks NOTHING below such a union, so no field in the\n * subtree is registered as an enum of any shape — literal, synthesized discriminator, array element, literal\n * union or plain `z.enum` — and none plans enum keys nothing reads. Fields are still registered, and still\n * plan their label keys (a pre-existing over-plan). Carried through object, array and intersection recursion.\n */\nexport function collectSchemaFields(\n schema: z.ZodTypeAny | undefined,\n basePath: string[],\n acc: SchemaFieldInfoMap,\n discriminatorEnums?: Readonly<Record<string, z.ZodTypeAny>>,\n insideUnresolvableUnion = false,\n): void {\n if (!schema) return;\n const unwrapped = unwrapSchema(schema);\n if (!unwrapped) return;\n\n const typeName = getZodType(unwrapped);\n if (!typeName) return;\n\n switch (typeName) {\n case 'object': {\n const shape = getZodObjectShape(unwrapped);\n for (const key of Object.keys(shape)) {\n const nextPath = [...basePath, key];\n const child = shape[key] as z.ZodTypeAny;\n registerField(nextPath, child, acc, discriminatorEnums?.[key], insideUnresolvableUnion);\n collectSchemaFields(child, nextPath, acc, undefined, insideUnresolvableUnion);\n }\n break;\n }\n case 'array': {\n const element = getZodDefSchemaProperty(unwrapped, 'element');\n if (element) collectSchemaFields(element, basePath, acc, undefined, insideUnresolvableUnion);\n break;\n }\n case 'union':\n case 'discriminatedUnion': {\n const unionMembers = getUnionObjectMembers(unwrapped);\n const unionDiscriminatorEnums = synthesizeUnionDiscriminatorEnums(unionMembers);\n const memberInsideUnresolvableUnion = insideUnresolvableUnion || unionMembers.length === 0;\n const options = getZodDefArrayProperty(unwrapped, 'options') || [];\n for (const opt of options) {\n if (opt && typeof opt === 'object' && hasZodInternals(opt)) {\n collectSchemaFields(opt as unknown as z.ZodTypeAny, basePath, acc, unionDiscriminatorEnums, memberInsideUnresolvableUnion);\n }\n }\n break;\n }\n case 'intersection': {\n const left = getZodDefSchemaProperty(unwrapped, 'left');\n const right = getZodDefSchemaProperty(unwrapped, 'right');\n if (left) collectSchemaFields(left, basePath, acc, undefined, insideUnresolvableUnion);\n if (right) collectSchemaFields(right, basePath, acc, undefined, insideUnresolvableUnion);\n break;\n }\n /*\n * No wrapper cases (`optional`/`nullable`/`default`/`effects`/`transform`/`refine`), deliberately: `unwrapSchema`\n * above peels optional, nullable, default, pipe, readonly and catch, and Zod 4 has no `effects`/`refine` type\n * (a refinement is a check on the same schema). The one survivor among the removed case labels is\n * `transform` (e.g. the `in` side of a `z.preprocess` pipe), whose def carries no inner schema — so the removed\n * case could only ever do nothing. `prefault`, `lazy` and `nonoptional` also survive `unwrapSchema`, but no case\n * here ever walked them. Measured 2026-09-14 over optional, nullable, nullish, default, transform, refine,\n * superRefine, preprocess, pipe, readonly, catch, prefault, lazy, brand and a chained wrapper.\n */\n default:\n break;\n }\n}\n\n/**\n * Drop `data.`-wrapped field paths that duplicate a top-level field.\n *\n * A LIST response DTO nests the resource under a multi-level\n * `{ data: { data: [ … ] } }` envelope, so the SAME field surfaces at\n * `data.title`, `data.data.title`, `data.data.data.title`, …. Every such depth\n * collapses onto the top-level field and is a duplicate of its label, so we\n * strip EVERY leading `data.` segment and drop the path when the collapsed form\n * matches a top-level (non-`data.`) field. The original implementation stripped\n * only ONE `data.` segment, leaving `data.data.*` and deeper as ~40 redundant\n * keys per list-DTO resource (e.g. `todos`).\n *\n * Non-resource wrapper sub-paths are intentionally PRESERVED because they\n * collapse to a non-top-level path: `data.pagination.*` → `pagination.*`, and a\n * populated relationship `data.data.organization.*` → `organization.*` (neither\n * is a top-level resource field). Pure; order-preserving (the caller sorts).\n */\nexport function dedupeDataWrappedFieldPaths(fieldPaths: Iterable<string>): string[] {\n const all = [...fieldPaths];\n const topLevelFields = new Set(all.filter((path) => !path.startsWith('data.')));\n return all.filter((path) => {\n if (!path.startsWith('data.')) return true;\n let collapsed = path;\n while (collapsed.startsWith('data.')) collapsed = collapsed.slice('data.'.length);\n return !topLevelFields.has(collapsed);\n });\n}\n\n/**\n * Walk a resource's full schema surface into a field-info map: `mainSchema`\n * plus every operation's request/response DTO. The response DTO IS the\n * `customResponseDto` for a custom-response op — the ONLY place ephemeral\n * fields (an API key's `plainKey`) live — so this is what surfaces them.\n * Shared by `extractResourceFieldKeys` and `buildEphemeralFieldKeyMeta` so the\n * two always see the identical field set (incl. ephemeral fields + their marker).\n */\nfunction buildResourceFieldInfoMap(resourceConfig: AnyResourceConfiguration): SchemaFieldInfoMap {\n const fieldInfoMap: SchemaFieldInfoMap = new Map();\n const mainSchema = resourceConfig.mainSchema as z.ZodTypeAny | undefined;\n collectSchemaFields(mainSchema, [], fieldInfoMap);\n\n for (const operation of resourceConfig.operations || []) {\n if (operation.requestDto) {\n collectSchemaFields(operation.requestDto as z.ZodTypeAny, [], fieldInfoMap);\n }\n if (operation.responseDto) {\n collectSchemaFields(operation.responseDto as z.ZodTypeAny, [], fieldInfoMap);\n }\n }\n\n return fieldInfoMap;\n}\n\n/**\n * Produce the full set of `RESOURCES.<type>.fields.<path>.<sub>` keys\n * for a single resource, given the per-field display/edit subkey\n * lists. Output is deterministic (paths sorted alphabetically) so the\n * lock fingerprint stays stable across runs.\n */\nexport function extractResourceFieldKeys(args: {\n resourceType: string;\n resourceConfig: AnyResourceConfiguration;\n displayDefs: string[];\n editDefs: string[];\n}): string[] {\n const { resourceType, resourceConfig, displayDefs, editDefs } = args;\n\n const fieldInfoMap = buildResourceFieldInfoMap(resourceConfig);\n const filteredFieldPaths = dedupeDataWrappedFieldPaths(fieldInfoMap.keys());\n\n const keys: string[] = [];\n for (const fieldPath of filteredFieldPaths.sort()) {\n const info = fieldInfoMap.get(fieldPath)!;\n const fieldPrefix = `${LabellingTypes.RESOURCES}.${resourceType}.fields.${fieldPath}`;\n\n /*\n * A field HIDDEN in a mode gets no words for that mode, because nothing can ever read them.\n *\n * `.isHidden()` is not a styling hint: `DisplayField` returns empty for `isHiddenForDisplay`\n * BEFORE any render, and says so — \"must never render in ANY display surface\" — covering the\n * authored `<DisplayField name=\"x\" />` path as well as the generated one. So a label planned for\n * such a field is text with no reachable reader, and an LLM is paid per unit to invent it.\n *\n * Measured 2026-09-18 (#1298), on the framework-injected retention pair alone: `impersonalizedAt`\n * is `.isHidden()` on every resource declaring a `retentionPolicy`, and across the two dogfood\n * applications it had collected ELEVEN different English labels — \"Impersonalized at\" 87 times,\n * \"Impersonalized\" 33, and, contradicting this repository's own `impersonaliz* ≠ anonymiz*`\n * distinction, \"Anonymized\" 5 more. Nobody had ever seen any of them.\n *\n * Gated PER MODE rather than per field, because the decorator is per mode: `.isHidden()` bare\n * hides both, while `.isHidden({ display: true })` hides one and leaves the other renderable and\n * therefore still owed its words. The enum VALUES need only one surface that can show them, so\n * they drop out only when the field is hidden in both.\n */\n const hiddenForDisplay = info.schema ? isHiddenForDisplay(info.schema) : false;\n const hiddenForEdit = info.schema ? isHiddenForEdit(info.schema) : false;\n\n if (!hiddenForDisplay) {\n for (const sub of displayDefs) {\n keys.push(`${fieldPrefix}.display.${sub}`);\n }\n }\n if (!hiddenForEdit) {\n for (const sub of editDefs) {\n keys.push(`${fieldPrefix}.edit.${sub}`);\n }\n }\n\n if (info.schema) {\n if (!hiddenForDisplay && hasTooltipForDisplay(info.schema)) keys.push(`${fieldPrefix}.display.tooltip`);\n if (!hiddenForEdit && hasTooltipForEdit(info.schema)) keys.push(`${fieldPrefix}.edit.tooltip`);\n // An ephemeral field always earns a display description — the \"copy it\n // now, shown once\" caption the reveal dialog renders — even without an\n // authored `.describe()`. (`info.schema` is always set for walked fields.)\n if (!hiddenForDisplay && (info.isEphemeral || hasDescriptionForDisplay(info.schema))) keys.push(`${fieldPrefix}.display.description`);\n if (!hiddenForEdit && hasDescriptionForEdit(info.schema)) keys.push(`${fieldPrefix}.edit.description`);\n }\n\n if (!(hiddenForDisplay && hiddenForEdit) && info.isEnum && info.enumValues && info.enumValues.length > 0 && !info.isSystemEnum) {\n for (const enumValue of info.enumValues) {\n keys.push(`${fieldPrefix}.enum.${enumValue}`);\n }\n }\n }\n\n return keys;\n}\n\n/**\n * Collect every system-enum vocabulary the application's own resources actually USE, as\n * `name → values`.\n *\n * ## Why this exists, and why it walks the resources rather than reading a registry\n *\n * `extractResourceFieldKeys` above SUPPRESSES the per-field\n * `<resource>.fields.<path>.enum.<value>` keys for any field whose `isSystemEnum` is true,\n * on the contract that the value is labelled once, centrally, under\n * `system_enums.<name>.<value>`. Nothing was enforcing the other half of that contract: the\n * planner emitted a hand-written list of nine names, so every OTHER decorated name was\n * suppressed here and planned nowhere — and `tResourceFieldEnumValue` then falls through to\n * step 3 of its cascade and renders the RAW WIRE VALUE. Measured on the Wonder Todos\n * generated tree on 2026-09-08: `organizationSubscriptions.status` had a field label and no\n * `enum` block, so a subscription badge read `past_due`, a product type read `one_time`, and\n * a pricing model read `per_unit`.\n *\n * Deriving from the SCHEMA WALK — rather than from the frontend's `registerCommonEnum`\n * registry — is what makes the invariant structural instead of hand-kept:\n *\n * - it reads the exact same `buildResourceFieldInfoMap` walk that decides suppression, so\n * \"suppressed here ⇒ planned there\" cannot come apart for any field;\n * - it is total over the application. A resource that decorates a new vocabulary tomorrow\n * is planned with no edit anywhere;\n * - the registry could not have answered it anyway. Registration happened at FRONTEND startup\n * (`registerBuiltinCommonEnums()`) in a React bundle the companion's Node process never loads,\n * carried no VALUES, and missed two decorated vocabularies (`PlatformAccessGrantStatus`,\n * `PlatformAccessGrantAutoApprovalReason`). Since #966 registration wires no words at all and\n * nothing reads the registered-name set: the DECLARATION is the only answer, read by\n * `resolveDeclaredSystemEnumName` here, in the frontend cascade, and in the frontend label\n * introspection.\n *\n * Vocabularies registered for RENDERING but never `.systemEnum()`-decorated (the\n * user-preference badges, the two role vocabularies) are correctly absent: nothing suppresses\n * their per-field keys, so they are already labelled — per field for the preferences, and in\n * the `roles.*` tree for the roles. Planning them here would duplicate an authored label, and\n * would flatten deliberate per-resource wording (`theme.AUTO` is \"Automatic\" on\n * `userPreferences` and \"System default\" on `userSelfPreferences`).\n *\n * Values are de-duplicated across resources and returned in first-seen order per name; the\n * caller sorts the names, so the emitted key list is deterministic and the lock fingerprint\n * stays stable across runs.\n */\nexport function collectSystemEnumVocabularies(\n resourceConfigs: Iterable<AnyResourceConfiguration>,\n): Map<string, Set<string>> {\n const vocabularies = new Map<string, Set<string>>();\n for (const resourceConfig of resourceConfigs) {\n for (const info of buildResourceFieldInfoMap(resourceConfig).values()) {\n if (!info.systemEnumName || !info.enumValues || info.enumValues.length === 0) continue;\n let values = vocabularies.get(info.systemEnumName);\n if (!values) {\n values = new Set<string>();\n vocabularies.set(info.systemEnumName, values);\n }\n for (const value of info.enumValues) values.add(value);\n }\n }\n return vocabularies;\n}\n\n/**\n * Build the full `system_enums.<EnumName>.<value>` key list for the labelling plan.\n *\n * ## Two total sources, and why both are needed\n *\n * 1. **`SYSTEM_ENUM_VALUES`** — every member of the framework's declared `SystemEnumName`\n * vocabulary, unconditionally. These are framework-owned and an application may reach one\n * through a shared schema the resource walk does not necessarily see (a `z_duration()`\n * field on a config object, say). Keyed as a `Record<SystemEnumName, …>` at its\n * declaration, so an eleventh member is a compile error there rather than an omission\n * here.\n * 2. **`collectSystemEnumVocabularies`** — every vocabulary the application's own resource\n * schemas declare with `.systemEnum()`, off the same walk that decides suppression. This\n * is the half no fixed list can have: `SubscriptionStatus` has no `SystemEnumName`\n * member, and an application that decorates a new vocabulary tomorrow is planned with no\n * edit anywhere.\n *\n * ## Why it lives HERE rather than in the planner\n *\n * Beside `extractResourceFieldKeys`, which is the function it has to agree with. The defect\n * this replaces was exactly a disagreement between the two: suppression lived here, the\n * central plan lived in the planner as nine hand-written `push(...)` calls, and nothing\n * connected them — so ten decorated vocabularies were suppressed here and planned nowhere,\n * and `tResourceFieldEnumValue` rendered their raw wire values. One module now owns both\n * halves, and one test can assert the invariant between them.\n *\n * Names are emitted in `SystemEnumName` declaration order first, then discovered ones sorted\n * alphabetically, so the key list is deterministic and the labelling lock's fingerprint is\n * stable across runs. A name in both sources contributes one group — the union of its values.\n */\nexport function buildSystemEnumLabelKeys(resourceConfigs: Iterable<AnyResourceConfiguration>): string[] {\n const vocabularies = new Map<string, Set<string>>();\n for (const [enumName, values] of Object.entries(SYSTEM_ENUM_VALUES)) {\n vocabularies.set(enumName, new Set(values));\n }\n for (const [enumName, values] of collectSystemEnumVocabularies(resourceConfigs)) {\n const existing = vocabularies.get(enumName);\n if (existing) {\n for (const value of values) existing.add(value);\n } else {\n vocabularies.set(enumName, values);\n }\n }\n\n const declaredOrder = Object.keys(SYSTEM_ENUM_VALUES);\n const declared = new Set(declaredOrder);\n const discovered = [...vocabularies.keys()].filter((name) => !declared.has(name)).sort();\n\n const keys: string[] = [];\n for (const enumName of [...declaredOrder, ...discovered]) {\n for (const value of vocabularies.get(enumName)!) {\n keys.push(`${LabellingTypes.SYSTEM_ENUMS}.${enumName}.${value}`);\n }\n }\n return keys;\n}\n\n/**\n * Framework-general purpose for an ephemeral field's user-facing LABEL. The\n * runtime field name (`plainKey`) is developer-oriented; the LLM, given this\n * purpose plus the resource context (e.g. `organizationApiKeys`), produces the\n * credential's end-user name (\"API key\"). Applies to ANY `.isEphemeral()` field.\n */\nconst EPHEMERAL_FIELD_LABEL_PURPOSE =\n 'Caption for a one-time secret credential this resource issues — for example an API key, access token, or recovery code — revealed once at creation for the user to copy. Name it as the end user knows the credential; never the raw field name, and never the word \"plain\".';\n\n/**\n * Framework-general purpose for an ephemeral field's DESCRIPTION — the per-field\n * \"copy it now, shown once\" caption the reveal dialog renders under the value.\n * Derived purely from the `.isEphemeral()` marker (closes the LABELLING-2 gap).\n */\nconst EPHEMERAL_FIELD_DESCRIPTION_PURPOSE =\n 'Tells the user to copy and store this secret value immediately because it is shown only this once and can never be retrieved or displayed again.';\n\n/**\n * Build framework-general `LabelKeyMeta` for a resource's ephemeral fields.\n *\n * Ephemeral fields (`.isEphemeral()`) live only in a per-operation\n * `customResponseDto`, so they never reach the resource spec and\n * `projectResourceKeyMeta` (which reads `spec.fields`) leaves them to heuristic\n * field-name humanization (\"Plain key\"). Straight from the marker, this projects\n * a user-facing label purpose (\"API key\") + a \"shown once\" description purpose —\n * so every ephemeral field is labelled well with zero per-field authoring. The\n * planner merges this OVER the spec keyMeta (ephemeral wins). `{}` when none.\n */\nexport function buildEphemeralFieldKeyMeta(args: {\n resourceType: string;\n resourceConfig: AnyResourceConfiguration;\n}): Record<string, LabelKeyMeta> {\n const { resourceType, resourceConfig } = args;\n const fieldInfoMap = buildResourceFieldInfoMap(resourceConfig);\n const ephemeralPaths = dedupeDataWrappedFieldPaths(\n [...fieldInfoMap.keys()].filter((path) => fieldInfoMap.get(path)!.isEphemeral),\n );\n\n const keyMeta: Record<string, LabelKeyMeta> = {};\n for (const fieldPath of ephemeralPaths) {\n const prefix = `${LabellingTypes.RESOURCES}.${resourceType}.fields.${fieldPath}`;\n // display + edit share the user-facing caption (the field is not editable,\n // but the edit.label key is still emitted, so keep the two consistent).\n const labelMeta: LabelKeyMeta = { kind: LabelKind.LABEL, purpose: EPHEMERAL_FIELD_LABEL_PURPOSE };\n keyMeta[`${prefix}.display.label`] = labelMeta;\n keyMeta[`${prefix}.edit.label`] = labelMeta;\n keyMeta[`${prefix}.display.description`] = { kind: LabelKind.DESCRIPTION, purpose: EPHEMERAL_FIELD_DESCRIPTION_PURPOSE };\n }\n return keyMeta;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"schema-fields-extractor.utils.js","sourceRoot":"","sources":["../../../../../src/i18n-labelling/utils/schema-fields-extractor.utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,EACvB,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,SAAS,EACT,kBAAkB,EAClB,6BAA6B,EAC7B,sBAAsB,EACtB,iCAAiC,EACjC,qBAAqB,GACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAiC,MAAM,uBAAuB,CAAC;AAClI,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAmErE;;;;GAIG;AAEH;;;;;;;;;GASG;AACH,SAAS,aAAa,CACpB,SAAmB,EACnB,MAAoB,EACpB,GAAuB,EACvB,gBAA+B,EAC/B,uBAAuB,GAAG,KAAK;IAE/B,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtC,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACvC,IAAI,CAAC,SAAS;QAAE,OAAO;IAEvB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC;QAA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';\nimport {\n unwrapSchema,\n getZodType,\n getZodDefProperty,\n hasZodInternals,\n getZodDefArrayProperty,\n getZodObjectShape,\n getZodDefSchemaProperty,\n getEnumValues,\n getUnionObjectMembers,\n hasTooltipForDisplay,\n hasTooltipForEdit,\n hasDescriptionForDisplay,\n hasDescriptionForEdit,\n isEphemeralField,\n isHiddenForDisplay,\n isHiddenForEdit,\n isFieldContainerSchema,\n} from '@wildo-ai/zod-decorators';\nimport {\n LabelKind,\n SYSTEM_ENUM_VALUES,\n resolveDeclaredSystemEnumName,\n resolveFieldEnumSchema,\n synthesizeUnionDiscriminatorEnums,\n isSectionedVocabulary,\n} from '@wildo-ai/presets-components-models';\nimport { ApplicationConfigVocabulary, ENGINE_OPEN_VOCABULARY_VALUES, type AnyResourceConfiguration } from '@wildo-ai/saas-models';\nimport { LabellingTypes } from '@wildo-ai/presets-components-models';\nimport type { LabelKeyMeta } from '../models/labelling-unit.models';\n\n/**\n * Per-field metadata captured while walking a Zod schema. Used to\n * decide which translation keys (display/edit, tooltip, description,\n * enum values) need to be generated for a given field path.\n *\n * Two specific behaviors that consumers must NOT change without\n * carefully reviewing every planner caller:\n *\n * 1. **`data.…<path>` collapses onto `<path>`** when both exist —\n * legacy code at `collectResourcesFieldKeys` strips the `data.`\n * prefix and drops the duplicate. We replicate the same filter in\n * `extractResourceFieldKeys` below, collapsing EVERY leading\n * `data.` segment: a LIST response DTO nests the resource under a\n * multi-level `{ data: { data: [ … ] } }` envelope, so the same\n * field surfaces at `data.`, `data.data.`, `data.data.data.` … and\n * all of those depths are duplicates of the top-level field.\n *\n * 2. **System enums are excluded from per-field enum keys.** A field\n * whose values exactly match a known system enum (timezone,\n * currency, locale, …) is registered with `isSystemEnum: true` so\n * the resource unit doesn't re-emit the same translation under\n * `<resource>.fields.<path>.enum.<value>`. The system enums get\n * translated once in the dedicated `theme:system_enums` unit.\n */\nexport interface SchemaFieldInfo {\n isEnum: boolean;\n enumValues?: string[];\n isSystemEnum?: boolean;\n schema?: z.ZodTypeAny;\n /**\n * `true` when ANY occurrence of this field path carries the `.isEphemeral()`\n * marker (a one-time secret like an API key's `plainKey`, surfaced only in a\n * per-operation `customResponseDto`). Drives two ephemeral-specific outputs:\n * a forced `display.description` key (the \"copy it now, shown once\" caption)\n * and the framework-general label/description keyMeta built by\n * `buildEphemeralFieldKeyMeta`. OR-accumulated across schema occurrences.\n */\n isEphemeral?: boolean;\n /**\n * The system-enum NAME this field's values belong to, when it has one — either\n * declared by `.systemEnum('X')` on the schema, or recognised by an exact value-set\n * match against `SYSTEM_ENUM_VALUES`. Answered by `resolveDeclaredSystemEnumName`\n * (`@wildo-ai/presets-components-models`), the same function the frontend's\n * `tResourceFieldEnumValue` reads, so \"suppressed here\" and \"looked up there\" cannot\n * disagree about which enum a field declares (#966).\n *\n * Recorded rather than discarded because it is the OTHER half of `isSystemEnum`.\n * `isSystemEnum` says \"suppress the per-field `<resource>.fields.<path>.enum.<value>`\n * keys\"; the name says WHERE the label must be planned instead\n * (`system_enums.<name>.<value>`). Keeping only the boolean is what let a decorated\n * name be suppressed here and never planned there, leaving the value with no label\n * anywhere and rendering its RAW wire value in the UI — see\n * `collectSystemEnumVocabularies` below.\n */\n systemEnumName?: string;\n /**\n * Two occurrences of this field declared DIFFERENT vocabularies (#1108), so no `system_enums` group may\n * claim it even if a later occurrence agrees with one of them. Set once, never cleared.\n */\n systemEnumDisputed?: boolean;\n}\n\nexport type SchemaFieldInfoMap = Map<string, SchemaFieldInfo>;\n\n/*\n * The framework's system-enum catalogue (`SYSTEM_ENUM_VALUES`) and the exact value-set match used to\n * live here. They moved to `@wildo-ai/presets-components-models` (#966) so the frontend label cascade\n * reads the SAME answer to \"which enum does this field declare\" — see `resolveDeclaredSystemEnumName`.\n */\n\n/**\n * Register one field path.\n *\n * @param enumSourceSchema - the schema the field's VOCABULARY is read from, when it is not the field's own.\n * A union's discriminator passes the enum `synthesizeUnionDiscriminatorEnums` collected across every\n * member, so the path carries the whole vocabulary rather than one member's literal. The field's own\n * `schema` still supplies its tooltip/description/ephemeral metadata.\n * @param insideUnresolvableUnion - `true` inside a union `getUnionObjectMembers` does not recognise (see\n * `collectSchemaFields`): the field is registered, but never as an enum of ANY shape.\n */\nfunction registerField(\n pathParts: string[],\n schema: z.ZodTypeAny,\n acc: SchemaFieldInfoMap,\n enumSourceSchema?: z.ZodTypeAny,\n insideUnresolvableUnion = false,\n): void {\n const fieldPath = pathParts.join('.');\n const unwrapped = unwrapSchema(schema);\n if (!unwrapped) return;\n\n if (!acc.has(fieldPath)) acc.set(fieldPath, { isEnum: false });\n const entry = acc.get(fieldPath)!;\n if (!entry.schema) entry.schema = schema;\n\n // A field is ephemeral if ANY of its occurrences carries `.isEphemeral()`.\n // Ephemeral fields live only in a per-operation customResponseDto (e.g. an API\n // key's `plainKey`), so they never reach the resource spec — the marker on the\n // runtime schema is the only signal the labelling pipeline gets.\n if (isEphemeralField(schema)) entry.isEphemeral = true;\n\n /*\n * WHETHER the field carries a vocabulary is `resolveFieldEnumSchema`'s answer — the renderer's\n * (`resolveResourceLabelEnumSchema` delegates to it). This used to ask \"is the unwrapped type `enum`\",\n * so a discriminator `z.literal` (#1021) and an ARRAY's element (#1079) were invisible here while the\n * renderer looked both up: `privacy.consentedPurposes: z.array(z.enum(ConsentPurpose).systemEnum(…))`\n * was planned nowhere, and the consent gate rendered its purposes raw.\n */\n const resolvedEnumSchema = resolveFieldEnumSchema(enumSourceSchema ?? schema);\n const enumSchema = insideUnresolvableUnion ? undefined : resolvedEnumSchema;\n\n if (enumSchema) {\n const occurrenceValues = extractEnumValues(enumSchema);\n /*\n * A field's planned vocabulary is the UNION of every value any occurrence of it can hold (#1108).\n *\n * One path is walked several times — the main schema, then every operation's request and response\n * DTO — and a later occurrence used to REPLACE the values an earlier one had registered. For a\n * `createSchemaFamily` discriminator that is fatal: the main schema is the family's discriminated\n * union, whose synthesized discriminator carries every base value and every variant, while a\n * variant's request DTO carries that ONE variant's literal. Walked last, the DTO left\n * `consumableTokens.consumptionMode` planned with `BOUNDED_REUSE` alone, and a regeneration that\n * followed the plan deleted the words for `SINGLE_USE` and `EPHEMERAL_STATE` — values rows hold.\n */\n entry.isEnum = true;\n entry.enumValues = [...new Set([...(entry.enumValues ?? []), ...occurrenceValues])];\n // The DECORATOR wins over value matching: `.systemEnum('SubscriptionStatus')` names a\n // vocabulary that has no `SystemEnumName` member and could never be recognised by\n // values. Both answers feed one field so that suppression (`isSystemEnum`) and the\n // planned destination (`systemEnumName`) can never disagree about the same field — and\n // the function is shared with the frontend cascade, so neither can the renderer (#966).\n // Across occurrences the name survives only while every occurrence that declares one\n // declares the same; a narrowed DTO literal that declares nothing keeps the union's answer,\n // and two occurrences naming different vocabularies leave the field with per-field words,\n // as `synthesizeUnionDiscriminatorEnums` decides for disagreeing members.\n const declared = resolveDeclaredSystemEnumName(enumSchema, occurrenceValues);\n if (declared !== undefined) {\n if (entry.systemEnumName === undefined && !entry.systemEnumDisputed) entry.systemEnumName = declared;\n else if (entry.systemEnumName !== declared) {\n entry.systemEnumName = undefined;\n entry.systemEnumDisputed = true;\n }\n }\n entry.isSystemEnum = Boolean(entry.systemEnumName);\n }\n}\n\n/**\n * The values of an enum-bearing schema. A `z.enum` keeps the extraction this planner has always used\n * (with its fallbacks over Zod's enum def shapes); a literal or a union of enum-likes reads `getEnumValues`,\n * as the renderer does.\n */\nfunction extractEnumValues(enumSchema: z.ZodTypeAny): string[] {\n const unwrapped = unwrapSchema(enumSchema);\n if (getZodType(unwrapped) !== 'enum') return getEnumValues(enumSchema);\n\n const entriesFromDef = getZodDefProperty(unwrapped, 'entries');\n const valuesFromDef = getZodDefProperty(unwrapped, 'values');\n const schemaAny = unwrapped as { options?: unknown; enum?: unknown };\n const optionsFromSchema = schemaAny.options;\n const enumFromSchema = schemaAny.enum;\n\n let enumValues = getEnumValues(unwrapped);\n\n if (enumValues.length === 0) {\n if (Array.isArray(entriesFromDef)) {\n enumValues = entriesFromDef.filter((v): v is string => typeof v === 'string');\n } else if (Array.isArray(valuesFromDef)) {\n enumValues = valuesFromDef.filter((v): v is string => typeof v === 'string');\n } else if (Array.isArray(optionsFromSchema)) {\n enumValues = (optionsFromSchema as unknown[]).filter((v): v is string => typeof v === 'string');\n } else if (entriesFromDef && typeof entriesFromDef === 'object' && !Array.isArray(entriesFromDef)) {\n const enumObj = entriesFromDef as Record<string, unknown>;\n for (const key of Object.keys(enumObj)) {\n const value = enumObj[key];\n if (typeof value === 'string') {\n if (!Number.isNaN(Number(key))) continue;\n enumValues.push(value);\n } else if (typeof value === 'number') {\n enumValues.push(String(value));\n }\n }\n } else if (enumFromSchema && typeof enumFromSchema === 'object' && !Array.isArray(enumFromSchema)) {\n const enumObj = enumFromSchema as Record<string, unknown>;\n for (const key of Object.keys(enumObj)) {\n const value = enumObj[key];\n if (typeof value === 'string') {\n enumValues.push(value);\n } else if (typeof value === 'number') {\n const reverseKey = String(value);\n if ((enumObj as Record<string, unknown>)[reverseKey] !== key) {\n enumValues.push(String(value));\n }\n }\n }\n }\n }\n\n return enumValues;\n}\n\n/**\n * Recursively walk a Zod schema and populate the field info map.\n *\n * @param discriminatorEnums - set only when walking one member of a union: the union's discriminator enums\n * (`synthesizeUnionDiscriminatorEnums`), read in place of that member's own literal so the discriminator\n * path carries the vocabulary of EVERY member — and its declared `system_enums` name when they all agree —\n * exactly as the renderer's `collectResourceLabelFieldEntries` collects it (#1021).\n * @param insideUnresolvableUnion - `true` once the walk is inside a union `getUnionObjectMembers` does not\n * recognise (no key discriminates it). The renderer walks NOTHING below such a union, so no field in the\n * subtree is registered as an enum of any shape — literal, synthesized discriminator, array element, literal\n * union or plain `z.enum` — and none plans enum keys nothing reads. Fields are still registered, and still\n * plan their label keys (a pre-existing over-plan). Carried through object, array and intersection recursion.\n */\nexport function collectSchemaFields(\n schema: z.ZodTypeAny | undefined,\n basePath: string[],\n acc: SchemaFieldInfoMap,\n discriminatorEnums?: Readonly<Record<string, z.ZodTypeAny>>,\n insideUnresolvableUnion = false,\n): void {\n if (!schema) return;\n const unwrapped = unwrapSchema(schema);\n if (!unwrapped) return;\n\n const typeName = getZodType(unwrapped);\n if (!typeName) return;\n\n switch (typeName) {\n case 'object': {\n /*\n * A structured VALUE is a Zod object whose parts are not fields (#1959). `z_money()` is\n * `{ amount, currency, decimals }` and `z_address()` is `{ line1, …, coordinates }`, but the value's own\n * component draws and names those parts; the resource has one word for the whole value, its field label,\n * which the parent's `registerField` has already planned. The renderer's walk\n * (`collectResourceLabelFieldEntries`) stops here through the same `isFieldContainerSchema`, so every word\n * planned below this point was generated, translated and shipped with no reader — measured in Wonder CRM,\n * `fields.amount.amount`, `fields.amount.currency` and `fields.amount.decimals` for `deal.amount`.\n *\n * Gated here, on the object about to be walked, rather than at each of the four recursions that reach it,\n * so a structured value met as a field, an array item, a union member or an intersection side stops alike.\n * Read off the classifier rather than a list of value types, so a structured type added tomorrow is covered.\n */\n if (!isFieldContainerSchema(schema)) break;\n const shape = getZodObjectShape(unwrapped);\n for (const key of Object.keys(shape)) {\n const nextPath = [...basePath, key];\n const child = shape[key] as z.ZodTypeAny;\n registerField(nextPath, child, acc, discriminatorEnums?.[key], insideUnresolvableUnion);\n collectSchemaFields(child, nextPath, acc, undefined, insideUnresolvableUnion);\n }\n break;\n }\n case 'array': {\n const element = getZodDefSchemaProperty(unwrapped, 'element');\n if (element) collectSchemaFields(element, basePath, acc, undefined, insideUnresolvableUnion);\n break;\n }\n case 'union':\n case 'discriminatedUnion': {\n const unionMembers = getUnionObjectMembers(unwrapped);\n const unionDiscriminatorEnums = synthesizeUnionDiscriminatorEnums(unionMembers);\n const memberInsideUnresolvableUnion = insideUnresolvableUnion || unionMembers.length === 0;\n const options = getZodDefArrayProperty(unwrapped, 'options') || [];\n for (const opt of options) {\n if (opt && typeof opt === 'object' && hasZodInternals(opt)) {\n collectSchemaFields(opt as unknown as z.ZodTypeAny, basePath, acc, unionDiscriminatorEnums, memberInsideUnresolvableUnion);\n }\n }\n break;\n }\n case 'intersection': {\n const left = getZodDefSchemaProperty(unwrapped, 'left');\n const right = getZodDefSchemaProperty(unwrapped, 'right');\n if (left) collectSchemaFields(left, basePath, acc, undefined, insideUnresolvableUnion);\n if (right) collectSchemaFields(right, basePath, acc, undefined, insideUnresolvableUnion);\n break;\n }\n /*\n * No wrapper cases (`optional`/`nullable`/`default`/`effects`/`transform`/`refine`), deliberately: `unwrapSchema`\n * above peels optional, nullable, default, pipe, readonly and catch, and Zod 4 has no `effects`/`refine` type\n * (a refinement is a check on the same schema). The one survivor among the removed case labels is\n * `transform` (e.g. the `in` side of a `z.preprocess` pipe), whose def carries no inner schema — so the removed\n * case could only ever do nothing. `prefault`, `lazy` and `nonoptional` also survive `unwrapSchema`, but no case\n * here ever walked them. Measured 2026-09-14 over optional, nullable, nullish, default, transform, refine,\n * superRefine, preprocess, pipe, readonly, catch, prefault, lazy, brand and a chained wrapper.\n */\n default:\n break;\n }\n}\n\n/**\n * Drop `data.`-wrapped field paths that duplicate a top-level field.\n *\n * A LIST response DTO nests the resource under a multi-level\n * `{ data: { data: [ … ] } }` envelope, so the SAME field surfaces at\n * `data.title`, `data.data.title`, `data.data.data.title`, …. Every such depth\n * collapses onto the top-level field and is a duplicate of its label, so we\n * strip EVERY leading `data.` segment and drop the path when the collapsed form\n * matches a top-level (non-`data.`) field. The original implementation stripped\n * only ONE `data.` segment, leaving `data.data.*` and deeper as ~40 redundant\n * keys per list-DTO resource (e.g. `todos`).\n *\n * Non-resource wrapper sub-paths are intentionally PRESERVED because they\n * collapse to a non-top-level path: `data.pagination.*` → `pagination.*`, and a\n * populated relationship `data.data.organization.*` → `organization.*` (neither\n * is a top-level resource field). Pure; order-preserving (the caller sorts).\n */\nexport function dedupeDataWrappedFieldPaths(fieldPaths: Iterable<string>): string[] {\n const all = [...fieldPaths];\n const topLevelFields = new Set(all.filter((path) => !path.startsWith('data.')));\n return all.filter((path) => {\n if (!path.startsWith('data.')) return true;\n let collapsed = path;\n while (collapsed.startsWith('data.')) collapsed = collapsed.slice('data.'.length);\n return !topLevelFields.has(collapsed);\n });\n}\n\n/**\n * Walk a resource's full schema surface into a field-info map: `mainSchema`\n * plus every operation's request/response DTO. The response DTO IS the\n * `customResponseDto` for a custom-response op — the ONLY place ephemeral\n * fields (an API key's `plainKey`) live — so this is what surfaces them.\n * Shared by `extractResourceFieldKeys` and `buildEphemeralFieldKeyMeta` so the\n * two always see the identical field set (incl. ephemeral fields + their marker).\n */\nfunction buildResourceFieldInfoMap(resourceConfig: AnyResourceConfiguration): SchemaFieldInfoMap {\n const fieldInfoMap: SchemaFieldInfoMap = new Map();\n const mainSchema = resourceConfig.mainSchema as z.ZodTypeAny | undefined;\n collectSchemaFields(mainSchema, [], fieldInfoMap);\n\n for (const operation of resourceConfig.operations || []) {\n if (operation.requestDto) {\n collectSchemaFields(operation.requestDto as z.ZodTypeAny, [], fieldInfoMap);\n }\n if (operation.responseDto) {\n collectSchemaFields(operation.responseDto as z.ZodTypeAny, [], fieldInfoMap);\n }\n }\n\n return fieldInfoMap;\n}\n\n/**\n * Produce the full set of `RESOURCES.<type>.fields.<path>.<sub>` keys\n * for a single resource, given the per-field display/edit subkey\n * lists. Output is deterministic (paths sorted alphabetically) so the\n * lock fingerprint stays stable across runs.\n */\nexport function extractResourceFieldKeys(args: {\n resourceType: string;\n resourceConfig: AnyResourceConfiguration;\n displayDefs: string[];\n editDefs: string[];\n}): string[] {\n const { resourceType, resourceConfig, displayDefs, editDefs } = args;\n\n const fieldInfoMap = buildResourceFieldInfoMap(resourceConfig);\n const filteredFieldPaths = dedupeDataWrappedFieldPaths(fieldInfoMap.keys());\n\n const keys: string[] = [];\n for (const fieldPath of filteredFieldPaths.sort()) {\n const info = fieldInfoMap.get(fieldPath)!;\n const fieldPrefix = `${LabellingTypes.RESOURCES}.${resourceType}.fields.${fieldPath}`;\n\n /*\n * A field HIDDEN in a mode gets no words for that mode, because nothing can ever read them.\n *\n * `.isHidden()` is not a styling hint: `DisplayField` returns empty for `isHiddenForDisplay`\n * BEFORE any render, and says so — \"must never render in ANY display surface\" — covering the\n * authored `<DisplayField name=\"x\" />` path as well as the generated one. So a label planned for\n * such a field is text with no reachable reader, and an LLM is paid per unit to invent it.\n *\n * Measured 2026-09-18 (#1298), on the framework-injected retention pair alone: `impersonalizedAt`\n * is `.isHidden()` on every resource declaring a `retentionPolicy`, and across the two dogfood\n * applications it had collected ELEVEN different English labels — \"Impersonalized at\" 87 times,\n * \"Impersonalized\" 33, and, contradicting this repository's own `impersonaliz* ≠ anonymiz*`\n * distinction, \"Anonymized\" 5 more. Nobody had ever seen any of them.\n *\n * Gated PER MODE rather than per field, because the decorator is per mode: `.isHidden()` bare\n * hides both, while `.isHidden({ display: true })` hides one and leaves the other renderable and\n * therefore still owed its words. The enum VALUES need only one surface that can show them, so\n * they drop out only when the field is hidden in both.\n */\n const hiddenForDisplay = info.schema ? isHiddenForDisplay(info.schema) : false;\n const hiddenForEdit = info.schema ? isHiddenForEdit(info.schema) : false;\n\n if (!hiddenForDisplay) {\n for (const sub of displayDefs) {\n keys.push(`${fieldPrefix}.display.${sub}`);\n }\n }\n if (!hiddenForEdit) {\n for (const sub of editDefs) {\n keys.push(`${fieldPrefix}.edit.${sub}`);\n }\n }\n\n if (info.schema) {\n if (!hiddenForDisplay && hasTooltipForDisplay(info.schema)) keys.push(`${fieldPrefix}.display.tooltip`);\n if (!hiddenForEdit && hasTooltipForEdit(info.schema)) keys.push(`${fieldPrefix}.edit.tooltip`);\n // An ephemeral field always earns a display description — the \"copy it\n // now, shown once\" caption the reveal dialog renders — even without an\n // authored `.describe()`. (`info.schema` is always set for walked fields.)\n if (!hiddenForDisplay && (info.isEphemeral || hasDescriptionForDisplay(info.schema))) keys.push(`${fieldPrefix}.display.description`);\n if (!hiddenForEdit && hasDescriptionForEdit(info.schema)) keys.push(`${fieldPrefix}.edit.description`);\n }\n\n if (!(hiddenForDisplay && hiddenForEdit) && info.isEnum && info.enumValues && info.enumValues.length > 0 && !info.isSystemEnum) {\n for (const enumValue of info.enumValues) {\n keys.push(`${fieldPrefix}.enum.${enumValue}`);\n }\n }\n }\n\n return keys;\n}\n\n/**\n * Collect every system-enum vocabulary the application's own resources actually USE, as\n * `name → values`.\n *\n * ## Why this exists, and why it walks the resources rather than reading a registry\n *\n * `extractResourceFieldKeys` above SUPPRESSES the per-field\n * `<resource>.fields.<path>.enum.<value>` keys for any field whose `isSystemEnum` is true,\n * on the contract that the value is labelled once, centrally, under\n * `system_enums.<name>.<value>`. Nothing was enforcing the other half of that contract: the\n * planner emitted a hand-written list of nine names, so every OTHER decorated name was\n * suppressed here and planned nowhere — and `tResourceFieldEnumValue` then falls through to\n * step 3 of its cascade and renders the RAW WIRE VALUE. Measured on the Wonder Todos\n * generated tree on 2026-09-08: `organizationSubscriptions.status` had a field label and no\n * `enum` block, so a subscription badge read `past_due`, a product type read `one_time`, and\n * a pricing model read `per_unit`.\n *\n * Deriving from the SCHEMA WALK — rather than from the frontend's `registerCommonEnum`\n * registry — is what makes the invariant structural instead of hand-kept:\n *\n * - it reads the exact same `buildResourceFieldInfoMap` walk that decides suppression, so\n * \"suppressed here ⇒ planned there\" cannot come apart for any field;\n * - it is total over the application. A resource that decorates a new vocabulary tomorrow\n * is planned with no edit anywhere;\n * - the registry could not have answered it anyway. Registration happened at FRONTEND startup\n * (`registerBuiltinCommonEnums()`) in a React bundle the companion's Node process never loads,\n * carried no VALUES, and missed two decorated vocabularies (`PlatformAccessGrantStatus`,\n * `PlatformAccessGrantAutoApprovalReason`). Since #966 registration wires no words at all and\n * nothing reads the registered-name set: the DECLARATION is the only answer, read by\n * `resolveDeclaredSystemEnumName` here, in the frontend cascade, and in the frontend label\n * introspection.\n *\n * Vocabularies registered for RENDERING but never `.systemEnum()`-decorated (the\n * user-preference badges, the two role vocabularies) are correctly absent: nothing suppresses\n * their per-field keys, so they are already labelled — per field for the preferences, and in\n * the `roles.*` tree for the roles. Planning them here would duplicate an authored label, and\n * would flatten deliberate per-resource wording (`theme.AUTO` is \"Automatic\" on\n * `userPreferences` and \"System default\" on `userSelfPreferences`).\n *\n * Values are de-duplicated across resources and returned in first-seen order per name; the\n * caller sorts the names, so the emitted key list is deterministic and the lock fingerprint\n * stays stable across runs.\n */\nexport function collectSystemEnumVocabularies(\n resourceConfigs: Iterable<AnyResourceConfiguration>,\n): Map<string, Set<string>> {\n const vocabularies = new Map<string, Set<string>>();\n for (const resourceConfig of resourceConfigs) {\n for (const info of buildResourceFieldInfoMap(resourceConfig).values()) {\n if (!info.systemEnumName || !info.enumValues || info.enumValues.length === 0) continue;\n let values = vocabularies.get(info.systemEnumName);\n if (!values) {\n values = new Set<string>();\n vocabularies.set(info.systemEnumName, values);\n }\n for (const value of info.enumValues) values.add(value);\n }\n }\n return vocabularies;\n}\n\n/**\n * Build the full `system_enums.<EnumName>.<value>` key list for the labelling plan.\n *\n * ## The sources, and why each is needed\n *\n * 1. **`SYSTEM_ENUM_VALUES`** — every member of the framework's declared `SystemEnumName`\n * vocabulary, unconditionally. These are framework-owned and an application may reach one\n * through a shared schema the resource walk does not necessarily see (a `z_duration()`\n * field on a config object, say). Keyed as a `Record<SystemEnumName, …>` at its\n * declaration, so an eleventh member is a compile error there rather than an omission\n * here.\n * 2. **`collectSystemEnumVocabularies`** — every vocabulary the application's own resource\n * schemas declare with `.systemEnum()`, off the same walk that decides suppression. This\n * is the half no fixed list can have: `SubscriptionStatus` has no `SystemEnumName`\n * member, and an application that decorates a new vocabulary tomorrow is planned with no\n * edit anywhere.\n * 3. **`applicationVocabularies`** — vocabularies whose NAME the framework owns and whose VALUES\n * the application declares rather than a schema: in its configuration\n * ({@link collectApplicationConfigSystemEnumVocabularies}), such as the reviewers' reason codes\n * (#1921), or in its gates' `pauseStates`, which the planner adds from the backend introspection\n * (#1864). No resource schema can carry those values, because they are the application's declarations.\n * 4. **`ENGINE_OPEN_VOCABULARY_VALUES`** — the engine's OPEN vocabularies (#1791): a STRING field names one\n * with `.systemEnum(EngineOpenVocabulary.X)` because the schema cannot enumerate its values (an audit\n * event's `eventType`), so the values come from the one list the engine keeps of them. Planned for every\n * application, like source 1.\n *\n * ## Why it lives HERE rather than in the planner\n *\n * Beside `extractResourceFieldKeys`, which is the function it has to agree with. The defect\n * this replaces was exactly a disagreement between the two: suppression lived here, the\n * central plan lived in the planner as nine hand-written `push(...)` calls, and nothing\n * connected them — so ten decorated vocabularies were suppressed here and planned nowhere,\n * and `tResourceFieldEnumValue` rendered their raw wire values. One module now owns both\n * halves, and one test can assert the invariant between them.\n *\n * Names are emitted in `SystemEnumName` declaration order first, then discovered ones sorted\n * alphabetically, so the key list is deterministic and the labelling lock's fingerprint is\n * stable across runs. A name in both sources contributes one group — the union of its values.\n */\nexport function buildSystemEnumLabelKeys(\n resourceConfigs: Iterable<AnyResourceConfiguration>,\n applicationVocabularies: ReadonlyMap<string, readonly string[]> = new Map(),\n): string[] {\n const vocabularies = new Map<string, Set<string>>();\n for (const [enumName, values] of Object.entries(SYSTEM_ENUM_VALUES)) {\n vocabularies.set(enumName, new Set(values));\n }\n const discoveredVocabularies = collectSystemEnumVocabularies(resourceConfigs);\n // Source 4: the engine's OPEN vocabularies, unconditionally — a string field names one with `.systemEnum()`, and\n // its values are the engine's to list, not the field's (#1791).\n for (const [enumName, values] of Object.entries(ENGINE_OPEN_VOCABULARY_VALUES)) {\n const merged = discoveredVocabularies.get(enumName) ?? new Set<string>();\n for (const value of values) merged.add(value);\n discoveredVocabularies.set(enumName, merged);\n }\n for (const [enumName, values] of applicationVocabularies) {\n const merged = discoveredVocabularies.get(enumName) ?? new Set<string>();\n for (const value of values) merged.add(value);\n discoveredVocabularies.set(enumName, merged);\n }\n // A vocabulary that keeps its words in a section of its own (a feature, a limit, #1851) is planned there — by the\n // billing unit, total over the declared features and limits — and never a second time under `system_enums`.\n for (const enumName of [...discoveredVocabularies.keys()]) {\n if (isSectionedVocabulary(enumName)) discoveredVocabularies.delete(enumName);\n }\n for (const [enumName, values] of discoveredVocabularies) {\n const existing = vocabularies.get(enumName);\n if (existing) {\n for (const value of values) existing.add(value);\n } else {\n vocabularies.set(enumName, values);\n }\n }\n\n const declaredOrder = Object.keys(SYSTEM_ENUM_VALUES);\n const declared = new Set(declaredOrder);\n const discovered = [...vocabularies.keys()].filter((name) => !declared.has(name)).sort();\n\n const keys: string[] = [];\n for (const enumName of [...declaredOrder, ...discovered]) {\n for (const value of vocabularies.get(enumName)!) {\n keys.push(`${LabellingTypes.SYSTEM_ENUMS}.${enumName}.${value}`);\n }\n }\n return keys;\n}\n\n/**\n * The named vocabularies whose VALUES the application declares in its configuration — source 3 of\n * {@link buildSystemEnumLabelKeys}, one entry per configuration-declared `ApplicationConfigVocabulary` member (the\n * gates' pause states, #1864, are declared in backend modules; the planner adds them from the backend introspection):\n *\n * - the reason codes an expert may give for correcting an agent's work (`agentWorkReview.reasonCodes`, #1921),\n * worded under `system_enums.AgentWorkReasonCode.<code>` and read by the reviewer's approval card;\n * - the organization types (`organizationTypes`, keyed by type, #1851), worded under\n * `system_enums.OrganizationType.<type>` and read wherever an organization's `type` is shown.\n *\n * A value the application declares is planned the moment it is declared and one it removes stops being planned —\n * no hand-kept list of the application's values exists anywhere.\n *\n * Rejected: wording the codes inside the approval component's own labels. A component label key is fixed at\n * authoring time, and these values are the application's; the component would need one key per code it cannot know.\n */\nexport function collectApplicationConfigSystemEnumVocabularies(\n appConfig: ApplicationConfigVocabularySources | undefined,\n): Map<string, readonly string[]> {\n const vocabularies = new Map<string, readonly string[]>();\n const reasonCodes = appConfig?.agentWorkReview?.reasonCodes ?? [];\n if (reasonCodes.length > 0) vocabularies.set(ApplicationConfigVocabulary.AGENT_WORK_REASON_CODE, [...reasonCodes]);\n const organizationTypes = Object.keys(appConfig?.organizationTypes ?? {});\n if (organizationTypes.length > 0) vocabularies.set(ApplicationConfigVocabulary.ORGANIZATION_TYPE, organizationTypes);\n return vocabularies;\n}\n\n/** The parts of an application's configuration that declare the values of an `ApplicationConfigVocabulary`. */\nexport interface ApplicationConfigVocabularySources {\n readonly agentWorkReview?: { readonly reasonCodes?: readonly string[] };\n readonly organizationTypes?: Readonly<Record<string, unknown>>;\n}\n\n/**\n * Framework-general purpose for an ephemeral field's user-facing LABEL. The\n * runtime field name (`plainKey`) is developer-oriented; the LLM, given this\n * purpose plus the resource context (e.g. `organizationApiKeys`), produces the\n * credential's end-user name (\"API key\"). Applies to ANY `.isEphemeral()` field.\n */\nconst EPHEMERAL_FIELD_LABEL_PURPOSE =\n 'Caption for a one-time secret credential this resource issues — for example an API key, access token, or recovery code — revealed once at creation for the user to copy. Name it as the end user knows the credential; never the raw field name, and never the word \"plain\".';\n\n/**\n * Framework-general purpose for an ephemeral field's DESCRIPTION — the per-field\n * \"copy it now, shown once\" caption the reveal dialog renders under the value.\n * Derived purely from the `.isEphemeral()` marker (closes the LABELLING-2 gap).\n */\nconst EPHEMERAL_FIELD_DESCRIPTION_PURPOSE =\n 'Tells the user to copy and store this secret value immediately because it is shown only this once and can never be retrieved or displayed again.';\n\n/**\n * Build framework-general `LabelKeyMeta` for a resource's ephemeral fields.\n *\n * Ephemeral fields (`.isEphemeral()`) live only in a per-operation\n * `customResponseDto`, so they never reach the resource spec and\n * `projectResourceKeyMeta` (which reads `spec.fields`) leaves them to heuristic\n * field-name humanization (\"Plain key\"). Straight from the marker, this projects\n * a user-facing label purpose (\"API key\") + a \"shown once\" description purpose —\n * so every ephemeral field is labelled well with zero per-field authoring. The\n * planner merges this OVER the spec keyMeta (ephemeral wins). `{}` when none.\n */\nexport function buildEphemeralFieldKeyMeta(args: {\n resourceType: string;\n resourceConfig: AnyResourceConfiguration;\n}): Record<string, LabelKeyMeta> {\n const { resourceType, resourceConfig } = args;\n const fieldInfoMap = buildResourceFieldInfoMap(resourceConfig);\n const ephemeralPaths = dedupeDataWrappedFieldPaths(\n [...fieldInfoMap.keys()].filter((path) => fieldInfoMap.get(path)!.isEphemeral),\n );\n\n const keyMeta: Record<string, LabelKeyMeta> = {};\n for (const fieldPath of ephemeralPaths) {\n const prefix = `${LabellingTypes.RESOURCES}.${resourceType}.fields.${fieldPath}`;\n // display + edit share the user-facing caption (the field is not editable,\n // but the edit.label key is still emitted, so keep the two consistent).\n const labelMeta: LabelKeyMeta = { kind: LabelKind.LABEL, purpose: EPHEMERAL_FIELD_LABEL_PURPOSE };\n keyMeta[`${prefix}.display.label`] = labelMeta;\n keyMeta[`${prefix}.edit.label`] = labelMeta;\n keyMeta[`${prefix}.display.description`] = { kind: LabelKind.DESCRIPTION, purpose: EPHEMERAL_FIELD_DESCRIPTION_PURPOSE };\n }\n return keyMeta;\n}\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { LabelKeyMeta } from '../models/labelling-unit.models';
|
|
2
|
+
/**
|
|
3
|
+
* System-of-record instance names — `systems_of_record.<name>.displayName` — planned TOTAL over the instances an
|
|
4
|
+
* application declares in `systemsOfRecord` (#1997).
|
|
5
|
+
*
|
|
6
|
+
* A surface that names an instance to a person — the provenance note beneath a field a pipeline wrote, "Synced from
|
|
7
|
+
* Odoo · as of 12 minutes ago" — resolves this key. An instance NAME is an environment-variable stem (`odoo`, `sap-fr`):
|
|
8
|
+
* it cannot be translated and the words a reader recognises are not derivable from it, so the words are authored here,
|
|
9
|
+
* by the generator, from the name and the vendor it is an instance of. There is deliberately no `displayName` on the
|
|
10
|
+
* declaration (display text comes from the i18n tree, never from configuration), and a key nobody generated renders the
|
|
11
|
+
* raw name.
|
|
12
|
+
*
|
|
13
|
+
* Derived rather than listed: the population is the application's own `systemsOfRecord` block, so an instance declared
|
|
14
|
+
* tomorrow is planned by construction and a withdrawn one stops being planned (`derive-before-you-ask.md`).
|
|
15
|
+
*/
|
|
16
|
+
/** The labelling bucket (and file-path bucket) the instance-name unit writes to — the first segment of every key. */
|
|
17
|
+
export declare const SYSTEMS_OF_RECORD_LABEL_BUCKET = "systems_of_record";
|
|
18
|
+
/** One declared instance, as the planner needs it: its name, and the vendor it is an instance of when declared. */
|
|
19
|
+
export interface DeclaredSystemOfRecordInstance {
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly vendor?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The declared instances of a saas configuration's `systemsOfRecord` block, sorted by name. Structural: an absent or
|
|
25
|
+
* malformed block declares nothing (the configuration loader validates the block; this reader only enumerates it).
|
|
26
|
+
*/
|
|
27
|
+
export declare function readDeclaredSystemOfRecordInstances(systemsOfRecord: unknown): DeclaredSystemOfRecordInstance[];
|
|
28
|
+
/** The planned keys of the instance-name family, with the per-key generation intent. */
|
|
29
|
+
export interface SystemOfRecordDisplayNameKeyPlan {
|
|
30
|
+
keys: string[];
|
|
31
|
+
keyMeta: Record<string, LabelKeyMeta>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* `systems_of_record.<name>.displayName` for every declared instance, each carrying the name and vendor as INTENT,
|
|
35
|
+
* never as the word.
|
|
36
|
+
*/
|
|
37
|
+
export declare function planSystemOfRecordDisplayNameKeys(instances: readonly DeclaredSystemOfRecordInstance[]): SystemOfRecordDisplayNameKeyPlan;
|
|
38
|
+
//# sourceMappingURL=system-of-record-display-name-keys.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-of-record-display-name-keys.utils.d.ts","sourceRoot":"","sources":["../../../../../src/i18n-labelling/utils/system-of-record-display-name-keys.utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE;;;;;;;;;;;;;GAaG;AAEH,qHAAqH;AACrH,eAAO,MAAM,8BAA8B,sBAAgC,CAAC;AAE5E,mHAAmH;AACnH,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,CAAC,eAAe,EAAE,OAAO,GAAG,8BAA8B,EAAE,CAQ9G;AAED,wFAAwF;AACxF,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CACvC;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,SAAS,EAAE,SAAS,8BAA8B,EAAE,GAAG,gCAAgC,CA4BxI"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { LabelAudience, LabelKind } from '@wildo-ai/presets-components-models';
|
|
2
|
+
import { buildSystemOfRecordDisplayNameLabelKey, SYSTEM_OF_RECORD_LABEL_BUCKET } from '@wildo-ai/saas-models';
|
|
3
|
+
/**
|
|
4
|
+
* System-of-record instance names — `systems_of_record.<name>.displayName` — planned TOTAL over the instances an
|
|
5
|
+
* application declares in `systemsOfRecord` (#1997).
|
|
6
|
+
*
|
|
7
|
+
* A surface that names an instance to a person — the provenance note beneath a field a pipeline wrote, "Synced from
|
|
8
|
+
* Odoo · as of 12 minutes ago" — resolves this key. An instance NAME is an environment-variable stem (`odoo`, `sap-fr`):
|
|
9
|
+
* it cannot be translated and the words a reader recognises are not derivable from it, so the words are authored here,
|
|
10
|
+
* by the generator, from the name and the vendor it is an instance of. There is deliberately no `displayName` on the
|
|
11
|
+
* declaration (display text comes from the i18n tree, never from configuration), and a key nobody generated renders the
|
|
12
|
+
* raw name.
|
|
13
|
+
*
|
|
14
|
+
* Derived rather than listed: the population is the application's own `systemsOfRecord` block, so an instance declared
|
|
15
|
+
* tomorrow is planned by construction and a withdrawn one stops being planned (`derive-before-you-ask.md`).
|
|
16
|
+
*/
|
|
17
|
+
/** The labelling bucket (and file-path bucket) the instance-name unit writes to — the first segment of every key. */
|
|
18
|
+
export const SYSTEMS_OF_RECORD_LABEL_BUCKET = SYSTEM_OF_RECORD_LABEL_BUCKET;
|
|
19
|
+
/**
|
|
20
|
+
* The declared instances of a saas configuration's `systemsOfRecord` block, sorted by name. Structural: an absent or
|
|
21
|
+
* malformed block declares nothing (the configuration loader validates the block; this reader only enumerates it).
|
|
22
|
+
*/
|
|
23
|
+
export function readDeclaredSystemOfRecordInstances(systemsOfRecord) {
|
|
24
|
+
if (!systemsOfRecord || typeof systemsOfRecord !== 'object' || Array.isArray(systemsOfRecord))
|
|
25
|
+
return [];
|
|
26
|
+
return Object.entries(systemsOfRecord)
|
|
27
|
+
.map(([name, declaration]) => {
|
|
28
|
+
const vendor = declaration && typeof declaration === 'object' ? declaration.vendor : undefined;
|
|
29
|
+
return typeof vendor === 'string' && vendor.length > 0 ? { name, vendor } : { name };
|
|
30
|
+
})
|
|
31
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* `systems_of_record.<name>.displayName` for every declared instance, each carrying the name and vendor as INTENT,
|
|
35
|
+
* never as the word.
|
|
36
|
+
*/
|
|
37
|
+
export function planSystemOfRecordDisplayNameKeys(instances) {
|
|
38
|
+
const keys = [];
|
|
39
|
+
const keyMeta = {};
|
|
40
|
+
const seen = new Set();
|
|
41
|
+
for (const instance of [...instances].sort((a, b) => a.name.localeCompare(b.name))) {
|
|
42
|
+
if (seen.has(instance.name))
|
|
43
|
+
continue;
|
|
44
|
+
seen.add(instance.name);
|
|
45
|
+
const key = buildSystemOfRecordDisplayNameLabelKey(instance.name);
|
|
46
|
+
keys.push(key);
|
|
47
|
+
const vendorClause = instance.vendor
|
|
48
|
+
? ` It is an instance of the "${instance.vendor}" product, so the name normally starts from that product's own name.`
|
|
49
|
+
: '';
|
|
50
|
+
keyMeta[key] = {
|
|
51
|
+
kind: LabelKind.LABEL,
|
|
52
|
+
audience: LabelAudience.END_USER,
|
|
53
|
+
purpose: `The name of the company business system (an ERP or similar system of record) this application copies data from, ` +
|
|
54
|
+
`declared under the identifier "${instance.name}".${vendorClause} Shown where a value says it was synced from that ` +
|
|
55
|
+
'system, so it must be the name the people using this application know the system by. The identifier is a ' +
|
|
56
|
+
'technical reference, not the name.',
|
|
57
|
+
notes: [
|
|
58
|
+
'The name only: no "system", "ERP", "instance" or "integration" suffix unless it is part of the product name.',
|
|
59
|
+
'Keep a vendor product name in its official spelling; do not translate it unless the vendor publishes a localized name.',
|
|
60
|
+
'When the identifier distinguishes several instances of one product (for example a country or a subsidiary), keep that distinction in the name.',
|
|
61
|
+
],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
return { keys, keyMeta };
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=system-of-record-display-name-keys.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-of-record-display-name-keys.utils.js","sourceRoot":"","sources":["../../../../../src/i18n-labelling/utils/system-of-record-display-name-keys.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,sCAAsC,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAG9G;;;;;;;;;;;;;GAaG;AAEH,qHAAqH;AACrH,MAAM,CAAC,MAAM,8BAA8B,GAAG,6BAA6B,CAAC;AAQ5E;;;GAGG;AACH,MAAM,UAAU,mCAAmC,CAAC,eAAwB;IAC1E,IAAI,CAAC,eAAe,IAAI,OAAO,eAAe,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC;QAAE,OAAO,EAAE,CAAC;IACzG,OAAO,MAAM,CAAC,OAAO,CAAC,eAA0C,CAAC;SAC9D,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,EAAE;QAC3B,MAAM,MAAM,GAAG,WAAW,IAAI,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAE,WAAoC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;QACzH,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,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F,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC3B,CAAC","sourcesContent":["import { LabelAudience, LabelKind } from '@wildo-ai/presets-components-models';\nimport { buildSystemOfRecordDisplayNameLabelKey, SYSTEM_OF_RECORD_LABEL_BUCKET } from '@wildo-ai/saas-models';\nimport type { LabelKeyMeta } from '../models/labelling-unit.models';\n\n/**\n * System-of-record instance names — `systems_of_record.<name>.displayName` — planned TOTAL over the instances an\n * application declares in `systemsOfRecord` (#1997).\n *\n * A surface that names an instance to a person — the provenance note beneath a field a pipeline wrote, \"Synced from\n * Odoo · as of 12 minutes ago\" — resolves this key. An instance NAME is an environment-variable stem (`odoo`, `sap-fr`):\n * it cannot be translated and the words a reader recognises are not derivable from it, so the words are authored here,\n * by the generator, from the name and the vendor it is an instance of. There is deliberately no `displayName` on the\n * declaration (display text comes from the i18n tree, never from configuration), and a key nobody generated renders the\n * raw name.\n *\n * Derived rather than listed: the population is the application's own `systemsOfRecord` block, so an instance declared\n * tomorrow is planned by construction and a withdrawn one stops being planned (`derive-before-you-ask.md`).\n */\n\n/** The labelling bucket (and file-path bucket) the instance-name unit writes to — the first segment of every key. */\nexport const SYSTEMS_OF_RECORD_LABEL_BUCKET = SYSTEM_OF_RECORD_LABEL_BUCKET;\n\n/** One declared instance, as the planner needs it: its name, and the vendor it is an instance of when declared. */\nexport interface DeclaredSystemOfRecordInstance {\n readonly name: string;\n readonly vendor?: string;\n}\n\n/**\n * The declared instances of a saas configuration's `systemsOfRecord` block, sorted by name. Structural: an absent or\n * malformed block declares nothing (the configuration loader validates the block; this reader only enumerates it).\n */\nexport function readDeclaredSystemOfRecordInstances(systemsOfRecord: unknown): DeclaredSystemOfRecordInstance[] {\n if (!systemsOfRecord || typeof systemsOfRecord !== 'object' || Array.isArray(systemsOfRecord)) return [];\n return Object.entries(systemsOfRecord as Record<string, unknown>)\n .map(([name, declaration]) => {\n const vendor = declaration && typeof declaration === 'object' ? (declaration as { vendor?: unknown }).vendor : undefined;\n return typeof vendor === 'string' && vendor.length > 0 ? { name, vendor } : { name };\n })\n .sort((a, b) => a.name.localeCompare(b.name));\n}\n\n/** The planned keys of the instance-name family, with the per-key generation intent. */\nexport interface SystemOfRecordDisplayNameKeyPlan {\n keys: string[];\n keyMeta: Record<string, LabelKeyMeta>;\n}\n\n/**\n * `systems_of_record.<name>.displayName` for every declared instance, each carrying the name and vendor as INTENT,\n * never as the word.\n */\nexport function planSystemOfRecordDisplayNameKeys(instances: readonly DeclaredSystemOfRecordInstance[]): SystemOfRecordDisplayNameKeyPlan {\n const keys: string[] = [];\n const keyMeta: Record<string, LabelKeyMeta> = {};\n const seen = new Set<string>();\n for (const instance of [...instances].sort((a, b) => a.name.localeCompare(b.name))) {\n if (seen.has(instance.name)) continue;\n seen.add(instance.name);\n const key = buildSystemOfRecordDisplayNameLabelKey(instance.name);\n keys.push(key);\n const vendorClause = instance.vendor\n ? ` It is an instance of the \"${instance.vendor}\" product, so the name normally starts from that product's own name.`\n : '';\n keyMeta[key] = {\n kind: LabelKind.LABEL,\n audience: LabelAudience.END_USER,\n purpose:\n `The name of the company business system (an ERP or similar system of record) this application copies data from, ` +\n `declared under the identifier \"${instance.name}\".${vendorClause} Shown where a value says it was synced from that ` +\n 'system, so it must be the name the people using this application know the system by. The identifier is a ' +\n 'technical reference, not the name.',\n notes: [\n 'The name only: no \"system\", \"ERP\", \"instance\" or \"integration\" suffix unless it is part of the product name.',\n 'Keep a vendor product name in its official spelling; do not translate it unless the vendor publishes a localized name.',\n 'When the identifier distinguishes several instances of one product (for example a country or a subsidiary), keep that distinction in the name.',\n ],\n };\n }\n return { keys, keyMeta };\n}\n"]}
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { fileURLToPath } from 'node:url';
|
|
3
1
|
import dotenv from 'dotenv';
|
|
4
2
|
import 'reflect-metadata';
|
|
5
3
|
// Initialize Zod decorators early (lazy init will also happen on first use)
|
|
@@ -9,8 +7,10 @@ import { StartCompanionApplicationService } from './core/inject/models/container
|
|
|
9
7
|
import { assembleCompanionStartup } from './core/runtime/companion-startup-assembly.js';
|
|
10
8
|
import { resolveCompanionContext } from './core/context/companion-context.js';
|
|
11
9
|
import { resolveCompanionRuntimeConfig } from './core/runtime/utils/companion-platform-config.companion.js';
|
|
10
|
+
import { COMPANION_ENV_FILE_PATH } from './core/runtime/companion-env-file.js';
|
|
11
|
+
import { recordCompanionEndpoint } from './core/runtime/companion-endpoint-record.js';
|
|
12
12
|
dotenv.config({
|
|
13
|
-
path:
|
|
13
|
+
path: COMPANION_ENV_FILE_PATH,
|
|
14
14
|
override: true,
|
|
15
15
|
quiet: true,
|
|
16
16
|
});
|
|
@@ -46,6 +46,12 @@ async function main() {
|
|
|
46
46
|
throw new Error('Application failed to initialize properly');
|
|
47
47
|
}
|
|
48
48
|
const serverInfo = startCompanionService.getServerInfo();
|
|
49
|
+
if (serverInfo) {
|
|
50
|
+
// The console's per-prompt hook and status line read this instead of resolving the address (#1657).
|
|
51
|
+
const recordFailure = recordCompanionEndpoint(companionContext.saasRoot, serverInfo);
|
|
52
|
+
if (recordFailure)
|
|
53
|
+
console.warn(`⚠️ Could not record the companion endpoint for the console: ${recordFailure}`);
|
|
54
|
+
}
|
|
49
55
|
console.log(`\u{1F389} Wildo Dev Companion is ready for "${companionContext.saasConfig.displayName}"` +
|
|
50
56
|
(serverInfo ? ` at ${serverInfo}` : ''));
|
|
51
57
|
}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,kBAAkB,CAAC;AAE1B,4EAA4E;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,iBAAiB,EAAE,CAAC;AAEpB,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAE,MAAM,0DAA0D,CAAC;AACzG,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAEnF,MAAM,CAAC,MAAM,CAAC;IACZ,IAAI,EAAE,uBAAuB;IAC7B,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;CACZ,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QACH,uCAAuC;QACvC,MAAM,gBAAgB,GAAG,MAAM,uBAAuB,EAAE,CAAC;QACzD,MAAM,aAAa,GAAG,6BAA6B,EAAE,CAAC;QAEtD,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,WAAW,gBAAgB,CAAC,UAAU,CAAC,WAAW,KAAK,gBAAgB,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,CAAC;QACxG,OAAO,CAAC,GAAG,CAAC,YAAY,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,gBAAgB,MAAM,CAAC,IAAI,C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AQ,EAAE,UAAU,CAAC,CAAC;YACrF,IAAI,aAAa;gBAAE,OAAO,CAAC,IAAI,CAAC,gEAAgE,aAAa,EAAE,CAAC,CAAC;QACnH,CAAC;QACD,OAAO,CAAC,GAAG,CACT,+CAA+C,gBAAgB,CAAC,UAAU,CAAC,WAAW,GAAG;YACvF,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAC1C,CAAC;IAEJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,gDAAgD,EAAE,KAAK,CAAC,CAAC;QACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;IAC5D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC","sourcesContent":["import dotenv from 'dotenv';\nimport 'reflect-metadata';\n\n// Initialize Zod decorators early (lazy init will also happen on first use)\nimport { initZodDecorators } from '@wildo-ai/zod-decorators';\ninitZodDecorators();\n\nimport { StartCompanionApplicationService } from './core/inject/models/container';\nimport { assembleCompanionStartup } from './core/runtime/companion-startup-assembly';\nimport { resolveCompanionContext } from './core/context/companion-context';\nimport { resolveCompanionRuntimeConfig } from './core/runtime/utils/companion-platform-config.companion';\nimport { COMPANION_ENV_FILE_PATH } from './core/runtime/companion-env-file';\nimport { recordCompanionEndpoint } from './core/runtime/companion-endpoint-record';\n\ndotenv.config({\n path: COMPANION_ENV_FILE_PATH,\n override: true,\n quiet: true,\n});\n\n/**\n * Start the Dev Companion with full application context awareness.\n *\n * 1. Resolve companion context (workspace scope + saas config)\n * 2. Assemble the ONE ordinary startup composition\n * (`assembleCompanionStartup` — shared with the explicit first-activation\n * maintenance operation so the captured composition cannot drift)\n * 3. Initialize the companion-owned management runtime\n */\nasync function main() {\n try {\n // --- Phase 1: Resolve app context ---\n const companionContext = await resolveCompanionContext();\n const runtimeConfig = resolveCompanionRuntimeConfig();\n\n console.log(`\\n\\u{1F4CD} Companion context resolved:`);\n console.log(` App: ${companionContext.saasConfig.displayName} (${companionContext.saasConfig.slug})`);\n console.log(` Root: ${companionContext.saasRoot}`);\n console.log(` Services: ${Object.keys(companionContext.saasConfig.services).join(', ')}`);\n console.log(` Frontends: ${Object.entries(companionContext.frontendServices).map(([k, s]) => `${k} (${s.frontendType})`).join(', ') || 'none'}`);\n console.log(` Backends: ${Object.keys(companionContext.backendServices).join(', ') || 'none'}`);\n console.log(` Traceability: ${runtimeConfig.traceabilityLevel}`);\n console.log('');\n\n // --- Phase 2+3: Assemble agent runtime + DI (single shared authority) ---\n console.log('\\u{1F9E0} Companion agent runtime: email + labelling + market generation + meta-workflows + logo generation + logo judge');\n const { container, startupConfig } = await assembleCompanionStartup(companionContext, runtimeConfig);\n\n // --- Phase 4: Initialize application ---\n const startCompanionService = container.get<StartCompanionApplicationService>(StartCompanionApplicationService);\n await startCompanionService.initialize(startupConfig);\n\n if (!startCompanionService.isHttpServerRunning()) {\n throw new Error('Application failed to initialize properly');\n }\n\n const serverInfo = startCompanionService.getServerInfo();\n if (serverInfo) {\n // The console's per-prompt hook and status line read this instead of resolving the address (#1657).\n const recordFailure = recordCompanionEndpoint(companionContext.saasRoot, serverInfo);\n if (recordFailure) console.warn(`⚠️ Could not record the companion endpoint for the console: ${recordFailure}`);\n }\n console.log(\n `\\u{1F389} Wildo Dev Companion is ready for \"${companionContext.saasConfig.displayName}\"` +\n (serverInfo ? ` at ${serverInfo}` : ''),\n );\n\n } catch (error) {\n console.error('\\u{1F4A5} Failed to start Wildo Dev Companion:', error);\n process.exit(1);\n }\n}\n\nmain().catch((error) => {\n console.error('\\u{1F4A5} Unexpected startup error:', error);\n process.exit(1);\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-build.actors-system.definitions.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/models/application-build.actors-system.definitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,4BAA4B,CAAC;AAa3F;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,4BAA4B,4BAAmD,CAAC;AAC7F,eAAO,MAAM,2CAA2C,EAAG,mCAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"application-build.actors-system.definitions.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/models/application-build.actors-system.definitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,4BAA4B,CAAC;AAa3F;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,4BAA4B,4BAAmD,CAAC;AAC7F,eAAO,MAAM,2CAA2C,EAAG,mCAA4C,CAAC;AA+BxG,6FAA6F;AAC7F,wBAAgB,2CAA2C,IAAI;IAAE,UAAU,EAAE,wCAAwC,CAAA;CAAE,CAGtH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-build.actors-system.definitions.js","sourceRoot":"","sources":["../../../../../src/meta-workflows/models/application-build.actors-system.definitions.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kCAAkC,EAAE,MAAM,oDAAoD,CAAC;AAExG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,kCAAkC,CAAC,aAAa,CAAC;AAC7F,MAAM,CAAC,MAAM,2CAA2C,GAAG,mCAA4C,CAAC;AAExG,SAAS,gCAAgC;IACvC,MAAM,mBAAmB,GAAU;QACjC,GAAG,EAAE,2CAA2C;QAChD,WAAW,EAAE,yCAAyC;QACtD,YAAY,EAAE,mBAAmB,CAAC,QAAQ;QAC1C,aAAa,EAAE,mBAAmB,CAAC,YAAY;KAChD,CAAC;IACF,OAAO;QACL,GAAG,EAAE,4BAA4B;QACjC,WAAW,EAAE,0BAA0B;QACvC,WAAW,EACT,gGAAgG;cAC9F,6FAA6F;cAC7F,uDAAuD;QAC3D,IAAI,EAAE,oBAAoB,CAAC,KAAK;QAChC,MAAM,EAAE,sBAAsB,CAAC,MAAM;QACrC,UAAU,EAAE,0BAA0B,CAAC,YAAY;QACnD,MAAM,EAAE,CAAC,mBAAmB,CAAC;QAC7B,MAAM,EAAE;YACN,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,CAAC;oBACd,YAAY,EAAE,oBAAoB,CAAC,WAAW;
|
|
1
|
+
{"version":3,"file":"application-build.actors-system.definitions.js","sourceRoot":"","sources":["../../../../../src/meta-workflows/models/application-build.actors-system.definitions.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kCAAkC,EAAE,MAAM,oDAAoD,CAAC;AAExG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,kCAAkC,CAAC,aAAa,CAAC;AAC7F,MAAM,CAAC,MAAM,2CAA2C,GAAG,mCAA4C,CAAC;AAExG,SAAS,gCAAgC;IACvC,MAAM,mBAAmB,GAAU;QACjC,GAAG,EAAE,2CAA2C;QAChD,WAAW,EAAE,yCAAyC;QACtD,YAAY,EAAE,mBAAmB,CAAC,QAAQ;QAC1C,aAAa,EAAE,mBAAmB,CAAC,YAAY;KAChD,CAAC;IACF,OAAO;QACL,GAAG,EAAE,4BAA4B;QACjC,WAAW,EAAE,0BAA0B;QACvC,WAAW,EACT,gGAAgG;cAC9F,6FAA6F;cAC7F,uDAAuD;QAC3D,IAAI,EAAE,oBAAoB,CAAC,KAAK;QAChC,MAAM,EAAE,sBAAsB,CAAC,MAAM;QACrC,UAAU,EAAE,0BAA0B,CAAC,YAAY;QACnD,MAAM,EAAE,CAAC,mBAAmB,CAAC;QAC7B,MAAM,EAAE;YACN,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,CAAC;oBACd,YAAY,EAAE,oBAAoB,CAAC,WAAW;iBAC/C,CAAC;YACF,SAAS,EAAE,0BAA0B,CAAC,GAAG;SAC1C;QACD,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACpC,CAAC;AACJ,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,2CAA2C;IACzD,MAAM,WAAW,GAAG,gCAAgC,EAAE,CAAC;IACvD,OAAO,EAAE,UAAU,EAAE,EAAE,CAAC,4BAA4B,CAAC,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC;AAC/E,CAAC","sourcesContent":["import type { FlowActorSystem_InitializationFactoryMap } from '@wildo-ai/saas-backend-lib';\nimport type { Actor, ActorSystem } from '@wildo-ai/saas-models';\nimport {\n Actor_ExecutionMode,\n Actor_Role_Category,\n FlowActorSystem_Kind,\n FlowActorSystem_Status,\n FlowActorSystem_Visibility,\n ResourceOperationRiskLevel,\n ResourcePrimaryScope,\n} from '@wildo-ai/saas-models';\nimport { BUILD_PLAN_EXECUTION_PLAN_IDENTITY } from '@wildo-ai/saas-specifications/application-creation';\n\n/**\n * The actor system that OWNS the build plan and runs the steps the companion runs itself (#1359).\n *\n * ## Why it exists\n *\n * A build-plan task reaches one of two executors. A CODING task goes to a coding agent and has been\n * an actor task since the lane was typed. A COMPANION GENERATION STEP — labels, email templates,\n * migrations; forty minutes for an i18n pass — ran with NO row on the actor plane at all. The only\n * trace of it was an in-memory list of the last five dispatches, which a companion restart emptied:\n * a generation step interrupted by a restart left nothing anywhere to say it had been running. One\n * execution plane for coding runs and a weaker private one for generation steps is the duplication.\n *\n * So a generation step is an execution of THIS system's one actor — `PROGRAMMATIC`, because its\n * behaviour is companion code and not an agent — opened and settled by the engine's driver exactly\n * as a playbook run is, and swept at startup like every other system's orphans.\n *\n * The ref is the build plan's own `actorSystemId` (`BUILD_PLAN_EXECUTION_PLAN_IDENTITY`), imported\n * rather than re-spelled: the edge a plan step carries and the system registered here are one name.\n * Coding runs stay executions of `application-coding.system`; this system owns the PLAN, and a build\n * dispatch is found on whichever of the two ran it.\n */\nexport const APPLICATION_BUILD_SYSTEM_REF = BUILD_PLAN_EXECUTION_PLAN_IDENTITY.actorSystemId;\nexport const APPLICATION_BUILD_GENERATION_STEP_ACTOR_REF = 'application-build.generation-step' as const;\n\nfunction buildApplicationBuildActorSystem(): ActorSystem {\n const generationStepActor: Actor = {\n ref: APPLICATION_BUILD_GENERATION_STEP_ACTOR_REF,\n displayName: 'Application build generation step actor',\n roleCategory: Actor_Role_Category.OPERATOR,\n executionMode: Actor_ExecutionMode.PROGRAMMATIC,\n };\n return {\n ref: APPLICATION_BUILD_SYSTEM_REF,\n displayName: 'Application Build System',\n description:\n 'Companion actor system that owns the application build plan and runs its companion generation '\n + 'steps: one execution and one task per generation step dispatched. Coding tasks of the same '\n + 'plan are executions of the application coding system.',\n kind: FlowActorSystem_Kind.ACTOR,\n status: FlowActorSystem_Status.ACTIVE,\n visibility: FlowActorSystem_Visibility.BACKEND_ONLY,\n actors: [generationStepActor],\n config: {\n timeout: 120000,\n accessControl: [{\n primaryScope: ResourcePrimaryScope.APPLICATION,\n }],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n createdAt: new Date().toISOString(),\n };\n}\n\n/** Spread into the one startup factory map, beside the coding and meta-workflows systems. */\nexport function buildApplicationBuildActorSystemDefinitions(): { factoryMap: FlowActorSystem_InitializationFactoryMap } {\n const actorSystem = buildApplicationBuildActorSystem();\n return { factoryMap: { [APPLICATION_BUILD_SYSTEM_REF]: () => actorSystem } };\n}\n"]}
|
package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-coding-agent.actors-system.definitions.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/models/application-coding-agent.actors-system.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,4BAA4B,CAAC;AAC3F,OAAO,KAAK,EAAsB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAanF,OAAO,EACL,mCAAmC,EAKnC,SAAS,EAOV,MAAM,sCAAsC,CAAC;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,EAAG,0BAAmC,CAAC;AAEhF;;;;;;;;;GASG;AACH,MAAM,WAAW,6BAA6B;IAC5C,+FAA+F;IAC/F,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,kGAAkG;IAClG,WAAW,EAAE,MAAM,CAAC;IACpB,2GAA2G;IAC3G,mBAAmB,EAAE,MAAM,CAAC;IAC5B,wHAAwH;IACxH,KAAK,EAAE,SAAS,CAAC;CAClB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAiFrG,CAAC;AAEF,yGAAyG;AACzG,eAAO,MAAM,6BAA6B,EAAE,SAAS,MAAM,EACqB,CAAC;AAEjF;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAE5E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,4CAA4C,CAC1D,WAAW,GAAE,MAAM,CAAC,UAAwB,GAC3C,6BAA6B,CAa/B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,8CAA8C,QACM,CAAC;AAElE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,6BAA6B,GAAG,iBAAiB,
|
|
1
|
+
{"version":3,"file":"application-coding-agent.actors-system.definitions.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/models/application-coding-agent.actors-system.definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,4BAA4B,CAAC;AAC3F,OAAO,KAAK,EAAsB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAanF,OAAO,EACL,mCAAmC,EAKnC,SAAS,EAOV,MAAM,sCAAsC,CAAC;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,EAAG,0BAAmC,CAAC;AAEhF;;;;;;;;;GASG;AACH,MAAM,WAAW,6BAA6B;IAC5C,+FAA+F;IAC/F,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,kGAAkG;IAClG,WAAW,EAAE,MAAM,CAAC;IACpB,2GAA2G;IAC3G,mBAAmB,EAAE,MAAM,CAAC;IAC5B,wHAAwH;IACxH,KAAK,EAAE,SAAS,CAAC;CAClB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAiFrG,CAAC;AAEF,yGAAyG;AACzG,eAAO,MAAM,6BAA6B,EAAE,SAAS,MAAM,EACqB,CAAC;AAEjF;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAE5E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,4CAA4C,CAC1D,WAAW,GAAE,MAAM,CAAC,UAA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