@wildo-ai/dev-companion 1.1.8 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/companion-supervisor.d.mts +33 -0
- package/bin/companion-supervisor.mjs +174 -0
- package/bin/wildo-dev-companion-supervised.mjs +16 -0
- 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 +8 -2
- 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 +8 -2
- 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 +1 -1
- package/dist/esm/brand/services/brand-accept.companion.service.d.ts.map +1 -1
- package/dist/esm/brand/services/brand-accept.companion.service.js +9 -11
- package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.d.ts +21 -0
- package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.js +33 -1
- package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.js.map +1 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +41 -2
- 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 +43 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +57 -1
- 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 +75 -1
- 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 +90 -5
- 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 +242 -22
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/companion-api/companion-api.schemas.d.ts +23 -2
- package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
- package/dist/esm/companion-api/companion-api.schemas.js +13 -2
- package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.d.ts +63 -7
- package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +315 -39
- package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
- package/dist/esm/core/config/primary-language.companion.utils.d.ts +5 -4
- package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
- package/dist/esm/core/config/primary-language.companion.utils.js +5 -4
- package/dist/esm/core/config/primary-language.companion.utils.js.map +1 -1
- package/dist/esm/core/context/application-module-generations.companion.d.ts +103 -0
- package/dist/esm/core/context/application-module-generations.companion.d.ts.map +1 -0
- package/dist/esm/core/context/application-module-generations.companion.js +313 -0
- package/dist/esm/core/context/application-module-generations.companion.js.map +1 -0
- package/dist/esm/core/context/companion-package-loaders.companion.d.ts +19 -19
- package/dist/esm/core/context/companion-package-loaders.companion.d.ts.map +1 -1
- package/dist/esm/core/context/companion-package-loaders.companion.js +52 -40
- 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/resources/creation-console-answer.companion.d.ts +15 -1
- package/dist/esm/core/introspection/resources/creation-console-answer.companion.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-console-answer.companion.js +38 -3
- package/dist/esm/core/introspection/resources/creation-console-answer.companion.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-console-projection.companion.d.ts +21 -0
- package/dist/esm/core/introspection/resources/creation-console-projection.companion.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-console-projection.companion.js +64 -25
- package/dist/esm/core/introspection/resources/creation-console-projection.companion.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +2 -0
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts +0 -28
- 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 +192 -19
- 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.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +27 -5
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/resources/launch-blockers.companion.d.ts +47 -0
- package/dist/esm/core/introspection/resources/launch-blockers.companion.d.ts.map +1 -0
- package/dist/esm/core/introspection/resources/launch-blockers.companion.js +98 -0
- package/dist/esm/core/introspection/resources/launch-blockers.companion.js.map +1 -0
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts +6 -1
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.js +20 -1
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts +34 -8
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js +61 -12
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/introspection-input-closure.companion.d.ts +44 -0
- package/dist/esm/core/introspection/services/introspection-input-closure.companion.d.ts.map +1 -0
- package/dist/esm/core/introspection/services/introspection-input-closure.companion.js +104 -0
- package/dist/esm/core/introspection/services/introspection-input-closure.companion.js.map +1 -0
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts +41 -22
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js +64 -47
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.d.ts +7 -1
- package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.js +13 -4
- package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js +7 -0
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js.map +1 -1
- package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts +4 -4
- package/dist/esm/core/runtime/companion-env-file.d.ts +39 -9
- package/dist/esm/core/runtime/companion-env-file.d.ts.map +1 -1
- package/dist/esm/core/runtime/companion-env-file.js +75 -16
- package/dist/esm/core/runtime/companion-env-file.js.map +1 -1
- package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +7 -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 +29 -11
- package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
- package/dist/esm/core/utils/bounded-concurrency.utils.d.ts +17 -0
- package/dist/esm/core/utils/bounded-concurrency.utils.d.ts.map +1 -0
- package/dist/esm/core/utils/bounded-concurrency.utils.js +37 -0
- package/dist/esm/core/utils/bounded-concurrency.utils.js.map +1 -0
- package/dist/esm/core/utils/derived-input-signature.companion.utils.d.ts +10 -1
- package/dist/esm/core/utils/derived-input-signature.companion.utils.d.ts.map +1 -1
- package/dist/esm/core/utils/derived-input-signature.companion.utils.js +9 -2
- package/dist/esm/core/utils/derived-input-signature.companion.utils.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 +2 -0
- 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.map +1 -1
- package/dist/esm/creation-conversation/creation-conversation.function-tools.js +66 -6
- 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 +0 -17
- 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 +10 -4
- package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
- package/dist/esm/email/services/email-template.companion.service.d.ts +6 -1
- package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
- package/dist/esm/email/services/email-template.companion.service.js +4 -1
- package/dist/esm/email/services/email-template.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 +8 -2
- 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 +8 -2
- 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 +7 -7
- package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
- 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 +41 -1
- package/dist/esm/i18n/composite_views/app.creation-conversation.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchAspects.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchAspects.en.js +7 -0
- package/dist/esm/i18n/resources/workbenchAspects.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.d.ts +5 -0
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.js +5 -0
- package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts +1 -1
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js +2 -1
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts +46 -0
- package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchDossierEntries.en.js +12 -0
- package/dist/esm/i18n/resources/workbenchDossierEntries.en.js.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +266 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +91 -5
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
- package/dist/esm/i18n/system_enums/application-creation.en.d.ts +41 -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 +45 -1
- package/dist/esm/i18n/system_enums/application-creation.en.js.map +1 -1
- package/dist/esm/i18n/system_enums/localization.en.d.ts +82 -0
- package/dist/esm/i18n/system_enums/localization.en.d.ts.map +1 -0
- package/dist/esm/i18n/system_enums/localization.en.js +82 -0
- package/dist/esm/i18n/system_enums/localization.en.js.map +1 -0
- package/dist/esm/i18n/system_enums/risk-register.en.d.ts +1 -0
- package/dist/esm/i18n/system_enums/risk-register.en.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/risk-register.en.js +1 -0
- package/dist/esm/i18n/system_enums/risk-register.en.js.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts +10 -0
- package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/workbench-dossier.en.js +13 -0
- package/dist/esm/i18n/system_enums/workbench-dossier.en.js.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling-progress.models.d.ts +43 -0
- package/dist/esm/i18n-labelling/models/labelling-progress.models.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/models/labelling-progress.models.js +34 -0
- package/dist/esm/i18n-labelling/models/labelling-progress.models.js.map +1 -0
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +8 -0
- 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 +97 -56
- 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 +18 -0
- 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 +269 -153
- package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/labelling-concurrency.utils.d.ts +41 -0
- package/dist/esm/i18n-labelling/utils/labelling-concurrency.utils.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/utils/labelling-concurrency.utils.js +47 -0
- package/dist/esm/i18n-labelling/utils/labelling-concurrency.utils.js.map +1 -0
- package/dist/esm/i18n-labelling/utils/per-unit-file.utils.d.ts +12 -0
- package/dist/esm/i18n-labelling/utils/per-unit-file.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/per-unit-file.utils.js +10 -2
- package/dist/esm/i18n-labelling/utils/per-unit-file.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/staged-label-file-writer.utils.d.ts +89 -0
- package/dist/esm/i18n-labelling/utils/staged-label-file-writer.utils.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/utils/staged-label-file-writer.utils.js +229 -0
- package/dist/esm/i18n-labelling/utils/staged-label-file-writer.utils.js.map +1 -0
- package/dist/esm/meta-workflows/models/build-task-rearm.models.d.ts +67 -1
- package/dist/esm/meta-workflows/models/build-task-rearm.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/build-task-rearm.models.js +64 -0
- package/dist/esm/meta-workflows/models/build-task-rearm.models.js.map +1 -1
- package/dist/esm/meta-workflows/models/creation-intervention.models.d.ts +308 -0
- package/dist/esm/meta-workflows/models/creation-intervention.models.d.ts.map +1 -0
- package/dist/esm/meta-workflows/models/creation-intervention.models.js +365 -0
- package/dist/esm/meta-workflows/models/creation-intervention.models.js.map +1 -0
- package/dist/esm/meta-workflows/models/generation-step-progress.models.d.ts +61 -0
- package/dist/esm/meta-workflows/models/generation-step-progress.models.d.ts.map +1 -0
- package/dist/esm/meta-workflows/models/generation-step-progress.models.js +58 -0
- package/dist/esm/meta-workflows/models/generation-step-progress.models.js.map +1 -0
- package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts +10 -6
- 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 +11 -6
- package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js.map +1 -1
- package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts +3 -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 +8 -1
- 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 +26 -0
- 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 +66 -10
- package/dist/esm/meta-workflows/models/playbook-run-record.models.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts +13 -0
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js +33 -0
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js.map +1 -0
- package/dist/esm/meta-workflows/services/application-assembly-repair.companion.utils.d.ts +145 -0
- package/dist/esm/meta-workflows/services/application-assembly-repair.companion.utils.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/application-assembly-repair.companion.utils.js +179 -0
- package/dist/esm/meta-workflows/services/application-assembly-repair.companion.utils.js.map +1 -0
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +376 -17
- 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 +805 -39
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +93 -7
- 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 +142 -25
- 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 +120 -3
- 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 +325 -16
- 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.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js +15 -6
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.js +10 -11
- package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.js.map +1 -1
- 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 +10 -11
- package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.d.ts +82 -0
- package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js +291 -0
- package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js.map +1 -0
- package/dist/esm/meta-workflows/services/creation-lane-preflight.companion.service.d.ts +60 -0
- package/dist/esm/meta-workflows/services/creation-lane-preflight.companion.service.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/creation-lane-preflight.companion.service.js +66 -0
- package/dist/esm/meta-workflows/services/creation-lane-preflight.companion.service.js.map +1 -0
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts +53 -0
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +164 -0
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js.map +1 -0
- package/dist/esm/meta-workflows/services/dossier-write-queue.companion.utils.d.ts +37 -0
- package/dist/esm/meta-workflows/services/dossier-write-queue.companion.utils.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/dossier-write-queue.companion.utils.js +52 -0
- package/dist/esm/meta-workflows/services/dossier-write-queue.companion.utils.js.map +1 -0
- package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts +74 -14
- package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/dossier.companion.service.js +180 -28
- 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 +2 -3
- 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 +2 -8
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/interview-answer-proposal.companion.d.ts +67 -0
- package/dist/esm/meta-workflows/services/interview-answer-proposal.companion.d.ts.map +1 -0
- package/dist/esm/meta-workflows/services/interview-answer-proposal.companion.js +64 -0
- package/dist/esm/meta-workflows/services/interview-answer-proposal.companion.js.map +1 -0
- package/dist/esm/meta-workflows/services/playbook-instance.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-instance.companion.service.js +11 -3
- package/dist/esm/meta-workflows/services/playbook-instance.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts +92 -4
- 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 +328 -7
- 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 +105 -6
- 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 +309 -39
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.d.ts +62 -1
- package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.js +152 -2
- package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.js.map +1 -1
- package/package.json +22 -18
- package/dist/esm/.tsbuildinfo +0 -1
- package/dist/esm/__tests__/asset-noop.d.ts +0 -3
- package/dist/esm/__tests__/asset-noop.d.ts.map +0 -1
- package/dist/esm/__tests__/asset-noop.js +0 -2
- package/dist/esm/__tests__/asset-noop.js.map +0 -1
- package/dist/esm/__tests__/chdir-dogfood-app.setup.d.ts +0 -2
- package/dist/esm/__tests__/chdir-dogfood-app.setup.d.ts.map +0 -1
- package/dist/esm/__tests__/chdir-dogfood-app.setup.js +0 -44
- package/dist/esm/__tests__/chdir-dogfood-app.setup.js.map +0 -1
- package/dist/esm/__tests__/internal-test-view.d.ts +0 -39
- package/dist/esm/__tests__/internal-test-view.d.ts.map +0 -1
- package/dist/esm/__tests__/internal-test-view.js +0 -2
- package/dist/esm/__tests__/internal-test-view.js.map +0 -1
- package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts +0 -50
- package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts.map +0 -1
- package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js +0 -157
- package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js.map +0 -1
- package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.d.ts +0 -8
- package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.d.ts.map +0 -1
- package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.js +0 -43
- package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.js.map +0 -1
- package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts +0 -79
- package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts.map +0 -1
- package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js +0 -193
- package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js.map +0 -1
|
@@ -4,6 +4,7 @@ import type { CompanionContext } from '../../core/context/companion-context';
|
|
|
4
4
|
import { LabellingPlannerCompanionService } from './labelling-planner.companion.service';
|
|
5
5
|
import { EmailTemplateLabellingUnitsCompanionService } from './email-template-labelling-units.companion.service';
|
|
6
6
|
import { WildoSaasLockCompanionService } from '../../core/lock/wildo-saas-lock.companion.service';
|
|
7
|
+
import { type LabellingProgressReporter } from '../models/labelling-progress.models';
|
|
7
8
|
import { I18nUnitRunStatus } from '../models/labelling-unit.models';
|
|
8
9
|
import { CompanionTraceabilityService } from '../../core/traceability/companion-traceability.service';
|
|
9
10
|
import { type CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';
|
|
@@ -16,6 +17,8 @@ export interface TranslateOptions {
|
|
|
16
17
|
* planned at all, so a filtered run does not pay for introspecting the other lane.
|
|
17
18
|
*/
|
|
18
19
|
unitIdFilter?: string[];
|
|
20
|
+
/** Told how far the run is, per lane and locale (#2215). Absent for a run nobody is watching. */
|
|
21
|
+
progress?: LabellingProgressReporter;
|
|
19
22
|
}
|
|
20
23
|
export interface TranslateUnitResult {
|
|
21
24
|
unitId: string;
|
|
@@ -75,8 +78,18 @@ export declare class TranslateOrchestratorCompanionService {
|
|
|
75
78
|
targetLocales: AvailableLanguage[];
|
|
76
79
|
forceRetranslate?: boolean;
|
|
77
80
|
templateRefs?: readonly string[];
|
|
81
|
+
progress?: LabellingProgressReporter;
|
|
78
82
|
}, providedSession?: CompanionExecutionSessionContext): Promise<TranslateRunResult>;
|
|
79
83
|
private runTranslate;
|
|
84
|
+
/**
|
|
85
|
+
* Every target locale of one generated i18n unit, in locale order — the worker the i18n lane runs
|
|
86
|
+
* through the bounded pool. Returns one result per locale; a unit that cannot be translated at all
|
|
87
|
+
* (refused plan, unreadable source) yields one FAILED or SKIPPED row per locale, exactly as the
|
|
88
|
+
* sequential loop recorded it.
|
|
89
|
+
*/
|
|
90
|
+
private translateI18nUnitAcrossLocales;
|
|
91
|
+
/** Move in what a dead run left staged, and say so (#2213). */
|
|
92
|
+
private adoptAbandonedStaging;
|
|
80
93
|
private countResult;
|
|
81
94
|
/**
|
|
82
95
|
* Translate every planned email template into `targetLocales`, adding each roundtrip to `tally`.
|
|
@@ -87,6 +100,11 @@ export declare class TranslateOrchestratorCompanionService {
|
|
|
87
100
|
* the same run may already have written its files, and the caller must still be told both outcomes.
|
|
88
101
|
*/
|
|
89
102
|
private runEmailTemplateLane;
|
|
103
|
+
/**
|
|
104
|
+
* Every target locale of one email template, in locale order — the worker the email lane runs
|
|
105
|
+
* through the bounded pool. One result per locale, as the sequential loop recorded them.
|
|
106
|
+
*/
|
|
107
|
+
private translateEmailTemplateUnitAcrossLocales;
|
|
90
108
|
/**
|
|
91
109
|
* One email template × one locale.
|
|
92
110
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translate-orchestrator.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/i18n-labelling/services/translate-orchestrator.companion.service.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,0BAA0B,EAEhC,MAAM,4BAA4B,CAAC;AAapC,OAAO,EAAE,iBAAiB,EAAqB,MAAM,qCAAqC,CAAC;AAE3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,gCAAgC,EAAa,MAAM,uCAAuC,CAAC;AACpG,OAAO,EAAE,2CAA2C,EAAE,MAAM,oDAAoD,CAAC;AAEjH,OAAO,EAAE,6BAA6B,EAAE,MAAM,mDAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"translate-orchestrator.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/i18n-labelling/services/translate-orchestrator.companion.service.ts"],"names":[],"mappings":"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"}
|
|
@@ -23,9 +23,13 @@ import { EmailTemplateLabellingUnitsCompanionService } from './email-template-la
|
|
|
23
23
|
import { getCompanionConfiguredPrimaryLanguage } from '../../core/config/primary-language.companion.utils.js';
|
|
24
24
|
import { WildoSaasLockCompanionService } from '../../core/lock/wildo-saas-lock.companion.service.js';
|
|
25
25
|
import { writeFileAtomic } from '../../core/utils/atomic-write.utils.js';
|
|
26
|
-
import {
|
|
26
|
+
import { mapWithBoundedConcurrency } from '../../core/utils/bounded-concurrency.utils.js';
|
|
27
|
+
import { resolvePerUnitFilePath, readPerUnitLabels, renderPerUnitLabels, writePerUnitLabels, } from '../utils/per-unit-file.utils.js';
|
|
27
28
|
import { rejectPrimaryLocaleTarget } from '../utils/translate-locale-contract.utils.js';
|
|
28
29
|
import { incompletePlanRefusal } from '../utils/incomplete-plan-refusal.utils.js';
|
|
30
|
+
import { resolveLabellingConcurrency } from '../utils/labelling-concurrency.utils.js';
|
|
31
|
+
import { StagedLabelFileWriter, adoptAbandonedLabelStaging, withUnwrittenFilesFailed, } from '../utils/staged-label-file-writer.utils.js';
|
|
32
|
+
import { LabellingProgressPhase, reportLabellingProgress, } from '../models/labelling-progress.models.js';
|
|
29
33
|
import { assembleTranslatedChunkResult, extractLabelPlaceholderTokens, } from '../utils/label-placeholder-drift.utils.js';
|
|
30
34
|
import { I18nUnitRunStatus, LabellingUnitCategory, } from '../models/labelling-unit.models.js';
|
|
31
35
|
import { EMAIL_TEMPLATE_LABELLING_BUCKET, emailTemplateLabellingUnitId, isEmailTemplateLabellingUnitId, } from '../models/email-template-labelling-unit.models.js';
|
|
@@ -94,10 +98,11 @@ let TranslateOrchestratorCompanionService = class TranslateOrchestratorCompanion
|
|
|
94
98
|
* `wildo generate translate` runs, with its lock, rather than a second translator of the same files.
|
|
95
99
|
*/
|
|
96
100
|
async translateEmailTemplates(options, providedSession) {
|
|
97
|
-
const { targetLocales, forceRetranslate, templateRefs } = options;
|
|
101
|
+
const { targetLocales, forceRetranslate, templateRefs, progress } = options;
|
|
98
102
|
return await this.runTranslate({
|
|
99
103
|
targetLocales,
|
|
100
104
|
...(forceRetranslate !== undefined ? { forceRetranslate } : {}),
|
|
105
|
+
...(progress !== undefined ? { progress } : {}),
|
|
101
106
|
...(templateRefs && templateRefs.length > 0
|
|
102
107
|
? { unitIdFilter: templateRefs.map((templateRef) => emailTemplateLabellingUnitId(templateRef)) }
|
|
103
108
|
: {}),
|
|
@@ -134,100 +139,65 @@ let TranslateOrchestratorCompanionService = class TranslateOrchestratorCompanion
|
|
|
134
139
|
});
|
|
135
140
|
const tally = { details: [], updated: 0, fresh: 0, failed: 0, skipped: 0 };
|
|
136
141
|
let unitCount = 0;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
142
|
+
// Generated files are staged outside the application and moved into place in one burst when the run
|
|
143
|
+
// ends, so a run of hundreds of units restarts the backend once, not once per file (#2213). What a run
|
|
144
|
+
// that died left staged is moved in first, so the freshness checks below see it.
|
|
145
|
+
await this.adoptAbandonedStaging();
|
|
146
|
+
const writer = await StagedLabelFileWriter.open(this.companionContext.saasRoot);
|
|
147
|
+
let unwritten = new Map();
|
|
148
|
+
try {
|
|
149
|
+
if (lanes.i18nUnits) {
|
|
150
|
+
const i18nRoot = this.resolveI18nRoot();
|
|
151
|
+
const allUnits = await this.planner.planAllUnits();
|
|
152
|
+
const units = filter ? allUnits.filter((u) => filter.has(u.id)) : allUnits;
|
|
153
|
+
unitCount += units.length;
|
|
154
|
+
reportLabellingProgress(options.progress, (reporter) => reporter.planned(LabellingProgressPhase.TRANSLATE, units.length, targetLocales));
|
|
155
|
+
// Units run side by side, each unit's locales one after another — see `labelling-concurrency.utils.ts`
|
|
156
|
+
// for why the unit is the parallel axis (#2211). Results come back in plan order.
|
|
157
|
+
const perUnit = await mapWithBoundedConcurrency(units, resolveLabellingConcurrency(), async (unit) => {
|
|
158
|
+
const results = await this.translateI18nUnitAcrossLocales({
|
|
159
|
+
unit,
|
|
160
|
+
i18nRoot,
|
|
161
|
+
primaryLocale,
|
|
162
|
+
targetLocales,
|
|
163
|
+
forceRetranslate: options.forceRetranslate === true,
|
|
164
|
+
traceSession,
|
|
165
|
+
writer,
|
|
157
166
|
});
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
sourceFlat = await readPerUnitLabels(sourceFilePath);
|
|
164
|
-
}
|
|
165
|
-
catch (err) {
|
|
166
|
-
const message = describeCaughtError(err);
|
|
167
|
-
for (const targetLocale of targetLocales) {
|
|
168
|
-
tally.failed++;
|
|
169
|
-
tally.details.push({
|
|
170
|
-
unitId: unit.id,
|
|
171
|
-
targetLocale,
|
|
172
|
-
filePath: '',
|
|
173
|
-
status: I18nUnitRunStatus.FAILED,
|
|
174
|
-
error: `Failed to read source: ${message}`,
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
continue;
|
|
178
|
-
}
|
|
179
|
-
if (Object.keys(sourceFlat).length === 0) {
|
|
180
|
-
for (const targetLocale of targetLocales) {
|
|
181
|
-
tally.skipped++;
|
|
182
|
-
tally.details.push({
|
|
183
|
-
unitId: unit.id,
|
|
184
|
-
targetLocale,
|
|
185
|
-
filePath: resolvePerUnitFilePath({ i18nRoot, unit, localeCode: targetLocale }),
|
|
186
|
-
status: I18nUnitRunStatus.SKIPPED,
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
continue;
|
|
190
|
-
}
|
|
191
|
-
// Spec context is loaded ONCE per unit and reused across locales.
|
|
192
|
-
const specContext = await unit.loadSpecContext();
|
|
193
|
-
for (const targetLocale of targetLocales) {
|
|
194
|
-
try {
|
|
195
|
-
const result = await this.translateUnitForLocale({
|
|
196
|
-
unit,
|
|
197
|
-
sourceLocale: primaryLocale,
|
|
198
|
-
targetLocale,
|
|
199
|
-
sourceFlat,
|
|
200
|
-
specContext,
|
|
201
|
-
i18nRoot,
|
|
202
|
-
forceRetranslate: options.forceRetranslate === true,
|
|
203
|
-
traceSession,
|
|
204
|
-
});
|
|
167
|
+
reportLabellingProgress(options.progress, (reporter) => reporter.unitSettled(LabellingProgressPhase.TRANSLATE, toProgressOutcomes(results)));
|
|
168
|
+
return results;
|
|
169
|
+
});
|
|
170
|
+
for (const results of perUnit) {
|
|
171
|
+
for (const result of results) {
|
|
205
172
|
tally.details.push(result);
|
|
206
173
|
this.countResult(tally, result.status);
|
|
207
174
|
}
|
|
208
|
-
catch (err) {
|
|
209
|
-
tally.failed++;
|
|
210
|
-
const message = describeCaughtError(err);
|
|
211
|
-
tally.details.push({
|
|
212
|
-
unitId: unit.id,
|
|
213
|
-
targetLocale,
|
|
214
|
-
filePath: '',
|
|
215
|
-
status: I18nUnitRunStatus.FAILED,
|
|
216
|
-
error: message,
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
175
|
}
|
|
220
176
|
}
|
|
177
|
+
if (lanes.emailTemplates) {
|
|
178
|
+
unitCount += await this.runEmailTemplateLane({
|
|
179
|
+
filter,
|
|
180
|
+
primaryLocale,
|
|
181
|
+
targetLocales,
|
|
182
|
+
forceRetranslate: options.forceRetranslate === true,
|
|
183
|
+
traceSession,
|
|
184
|
+
tally,
|
|
185
|
+
progress: options.progress,
|
|
186
|
+
writer,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
221
189
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
190
|
+
finally {
|
|
191
|
+
unwritten = await writer.close();
|
|
192
|
+
}
|
|
193
|
+
if (unwritten.size > 0) {
|
|
194
|
+
// A unit whose file could not be written is FAILED, whatever its translation did.
|
|
195
|
+
const settled = withUnwrittenFilesFailed(tally.details, unwritten, I18nUnitRunStatus.FAILED);
|
|
196
|
+
Object.assign(tally, { details: [], updated: 0, fresh: 0, failed: 0, skipped: 0 });
|
|
197
|
+
for (const result of settled) {
|
|
198
|
+
tally.details.push(result);
|
|
199
|
+
this.countResult(tally, result.status);
|
|
200
|
+
}
|
|
231
201
|
}
|
|
232
202
|
const { details, updated, fresh, failed, skipped } = tally;
|
|
233
203
|
await this.traceability.traceEvent({
|
|
@@ -253,6 +223,97 @@ let TranslateOrchestratorCompanionService = class TranslateOrchestratorCompanion
|
|
|
253
223
|
details,
|
|
254
224
|
};
|
|
255
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* Every target locale of one generated i18n unit, in locale order — the worker the i18n lane runs
|
|
228
|
+
* through the bounded pool. Returns one result per locale; a unit that cannot be translated at all
|
|
229
|
+
* (refused plan, unreadable source) yields one FAILED or SKIPPED row per locale, exactly as the
|
|
230
|
+
* sequential loop recorded it.
|
|
231
|
+
*/
|
|
232
|
+
async translateI18nUnitAcrossLocales(args) {
|
|
233
|
+
const { unit, i18nRoot, primaryLocale, targetLocales, forceRetranslate, traceSession, writer } = args;
|
|
234
|
+
const results = [];
|
|
235
|
+
/*
|
|
236
|
+
* Translation prunes every target-locale key the plan does not hold and records the locale
|
|
237
|
+
* `fresh`, so a unit planned from incomplete inputs would lose its words in every locale and
|
|
238
|
+
* never be revisited. Refused here exactly as labellize refuses it — see `incompletePlanRefusal`.
|
|
239
|
+
*/
|
|
240
|
+
const refusal = incompletePlanRefusal(unit);
|
|
241
|
+
if (refusal) {
|
|
242
|
+
for (const targetLocale of targetLocales) {
|
|
243
|
+
results.push({ unitId: unit.id, targetLocale, filePath: '', status: I18nUnitRunStatus.FAILED, error: refusal });
|
|
244
|
+
}
|
|
245
|
+
this.logger.warn('Translate unit refused — planned from incomplete inputs', {
|
|
246
|
+
unitId: unit.id,
|
|
247
|
+
reasons: unit.plannedFromIncompleteInputs,
|
|
248
|
+
});
|
|
249
|
+
return results;
|
|
250
|
+
}
|
|
251
|
+
const sourceFilePath = resolvePerUnitFilePath({ i18nRoot, unit, localeCode: primaryLocale });
|
|
252
|
+
let sourceFlat;
|
|
253
|
+
try {
|
|
254
|
+
sourceFlat = await readPerUnitLabels(sourceFilePath);
|
|
255
|
+
}
|
|
256
|
+
catch (err) {
|
|
257
|
+
const message = describeCaughtError(err);
|
|
258
|
+
for (const targetLocale of targetLocales) {
|
|
259
|
+
results.push({
|
|
260
|
+
unitId: unit.id,
|
|
261
|
+
targetLocale,
|
|
262
|
+
filePath: '',
|
|
263
|
+
status: I18nUnitRunStatus.FAILED,
|
|
264
|
+
error: `Failed to read source: ${message}`,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
return results;
|
|
268
|
+
}
|
|
269
|
+
if (Object.keys(sourceFlat).length === 0) {
|
|
270
|
+
for (const targetLocale of targetLocales) {
|
|
271
|
+
results.push({
|
|
272
|
+
unitId: unit.id,
|
|
273
|
+
targetLocale,
|
|
274
|
+
filePath: resolvePerUnitFilePath({ i18nRoot, unit, localeCode: targetLocale }),
|
|
275
|
+
status: I18nUnitRunStatus.SKIPPED,
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
return results;
|
|
279
|
+
}
|
|
280
|
+
// Spec context is loaded ONCE per unit and reused across locales.
|
|
281
|
+
const specContext = await unit.loadSpecContext();
|
|
282
|
+
for (const targetLocale of targetLocales) {
|
|
283
|
+
try {
|
|
284
|
+
const result = await this.translateUnitForLocale({
|
|
285
|
+
unit,
|
|
286
|
+
sourceLocale: primaryLocale,
|
|
287
|
+
targetLocale,
|
|
288
|
+
sourceFlat,
|
|
289
|
+
specContext,
|
|
290
|
+
i18nRoot,
|
|
291
|
+
forceRetranslate,
|
|
292
|
+
traceSession,
|
|
293
|
+
writer,
|
|
294
|
+
});
|
|
295
|
+
results.push(result);
|
|
296
|
+
}
|
|
297
|
+
catch (err) {
|
|
298
|
+
const message = describeCaughtError(err);
|
|
299
|
+
results.push({
|
|
300
|
+
unitId: unit.id,
|
|
301
|
+
targetLocale,
|
|
302
|
+
filePath: '',
|
|
303
|
+
status: I18nUnitRunStatus.FAILED,
|
|
304
|
+
error: message,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return results;
|
|
309
|
+
}
|
|
310
|
+
/** Move in what a dead run left staged, and say so (#2213). */
|
|
311
|
+
async adoptAbandonedStaging() {
|
|
312
|
+
const { adopted, discarded } = await adoptAbandonedLabelStaging(this.companionContext.saasRoot);
|
|
313
|
+
if (adopted.length > 0 || discarded.length > 0) {
|
|
314
|
+
this.logger.info('Label files left staged by an earlier run were moved into place', { adopted: adopted.length, discardedAsOlderThanTheFileInPlace: discarded.length });
|
|
315
|
+
}
|
|
316
|
+
}
|
|
256
317
|
countResult(tally, status) {
|
|
257
318
|
if (status === I18nUnitRunStatus.FRESH)
|
|
258
319
|
tally.fresh++;
|
|
@@ -273,7 +334,7 @@ let TranslateOrchestratorCompanionService = class TranslateOrchestratorCompanion
|
|
|
273
334
|
* the same run may already have written its files, and the caller must still be told both outcomes.
|
|
274
335
|
*/
|
|
275
336
|
async runEmailTemplateLane(args) {
|
|
276
|
-
const { filter, primaryLocale, targetLocales, forceRetranslate, traceSession, tally } = args;
|
|
337
|
+
const { filter, primaryLocale, targetLocales, forceRetranslate, traceSession, tally, progress, writer } = args;
|
|
277
338
|
let units;
|
|
278
339
|
try {
|
|
279
340
|
units = (await this.emailTemplateUnits.planEmailTemplateUnits()).units;
|
|
@@ -295,64 +356,83 @@ let TranslateOrchestratorCompanionService = class TranslateOrchestratorCompanion
|
|
|
295
356
|
}
|
|
296
357
|
if (filter)
|
|
297
358
|
units = units.filter((unit) => filter.has(unit.id));
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
tally.failed++;
|
|
312
|
-
tally.details.push({ unitId: unit.id, targetLocale, filePath: '', status: I18nUnitRunStatus.FAILED, error: message });
|
|
313
|
-
}
|
|
314
|
-
continue;
|
|
359
|
+
const plannedUnits = units;
|
|
360
|
+
reportLabellingProgress(progress, (reporter) => reporter.planned(LabellingProgressPhase.TRANSLATE_EMAIL_TEMPLATES, plannedUnits.length, targetLocales));
|
|
361
|
+
// Templates run side by side, each template's locales in turn (#2211) — the same axis and the same
|
|
362
|
+
// reason as the i18n lane: a template's lock row holds all its locales and is written whole.
|
|
363
|
+
const perUnit = await mapWithBoundedConcurrency(units, resolveLabellingConcurrency(), async (unit) => {
|
|
364
|
+
const results = await this.translateEmailTemplateUnitAcrossLocales({ unit, primaryLocale, targetLocales, forceRetranslate, traceSession, writer });
|
|
365
|
+
reportLabellingProgress(progress, (reporter) => reporter.unitSettled(LabellingProgressPhase.TRANSLATE_EMAIL_TEMPLATES, toProgressOutcomes(results)));
|
|
366
|
+
return results;
|
|
367
|
+
});
|
|
368
|
+
for (const results of perUnit) {
|
|
369
|
+
for (const result of results) {
|
|
370
|
+
tally.details.push(result);
|
|
371
|
+
this.countResult(tally, result.status);
|
|
315
372
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
373
|
+
}
|
|
374
|
+
return units.length;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Every target locale of one email template, in locale order — the worker the email lane runs
|
|
378
|
+
* through the bounded pool. One result per locale, as the sequential loop recorded them.
|
|
379
|
+
*/
|
|
380
|
+
async translateEmailTemplateUnitAcrossLocales(args) {
|
|
381
|
+
const { unit, primaryLocale, targetLocales, forceRetranslate, traceSession, writer } = args;
|
|
382
|
+
const results = [];
|
|
383
|
+
const sourcePath = labelsFilePath(unit.templateDirectory, primaryLocale);
|
|
384
|
+
let source;
|
|
385
|
+
try {
|
|
386
|
+
const content = await fs.readFile(sourcePath, 'utf-8');
|
|
387
|
+
const parsed = parseEmailLabelsTreeSource(content);
|
|
388
|
+
source = { content, parsed, words: flattenEmailLabelsTree(parsed.tree) };
|
|
389
|
+
}
|
|
390
|
+
catch (err) {
|
|
391
|
+
const message = err?.code === 'ENOENT'
|
|
392
|
+
? `The template has no primary-locale words to translate: ${sourcePath} does not exist`
|
|
393
|
+
: `Failed to read ${sourcePath}: ${describeCaughtError(err)}`;
|
|
394
|
+
for (const targetLocale of targetLocales) {
|
|
395
|
+
results.push({ unitId: unit.id, targetLocale, filePath: '', status: I18nUnitRunStatus.FAILED, error: message });
|
|
327
396
|
}
|
|
328
|
-
|
|
397
|
+
return results;
|
|
398
|
+
}
|
|
399
|
+
if (Object.keys(source.words).length === 0) {
|
|
329
400
|
for (const targetLocale of targetLocales) {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
specContext,
|
|
337
|
-
forceRetranslate,
|
|
338
|
-
traceSession,
|
|
339
|
-
});
|
|
340
|
-
tally.details.push(result);
|
|
341
|
-
this.countResult(tally, result.status);
|
|
342
|
-
}
|
|
343
|
-
catch (err) {
|
|
344
|
-
tally.failed++;
|
|
345
|
-
tally.details.push({
|
|
346
|
-
unitId: unit.id,
|
|
347
|
-
targetLocale,
|
|
348
|
-
filePath: '',
|
|
349
|
-
status: I18nUnitRunStatus.FAILED,
|
|
350
|
-
error: describeCaughtError(err),
|
|
351
|
-
});
|
|
352
|
-
}
|
|
401
|
+
results.push({
|
|
402
|
+
unitId: unit.id,
|
|
403
|
+
targetLocale,
|
|
404
|
+
filePath: labelsFilePath(unit.templateDirectory, targetLocale),
|
|
405
|
+
status: I18nUnitRunStatus.SKIPPED,
|
|
406
|
+
});
|
|
353
407
|
}
|
|
408
|
+
return results;
|
|
354
409
|
}
|
|
355
|
-
|
|
410
|
+
const specContext = await unit.loadSpecContext();
|
|
411
|
+
for (const targetLocale of targetLocales) {
|
|
412
|
+
try {
|
|
413
|
+
const result = await this.translateEmailTemplateUnitForLocale({
|
|
414
|
+
unit,
|
|
415
|
+
source,
|
|
416
|
+
sourceLocale: primaryLocale,
|
|
417
|
+
targetLocale,
|
|
418
|
+
specContext,
|
|
419
|
+
forceRetranslate,
|
|
420
|
+
traceSession,
|
|
421
|
+
writer,
|
|
422
|
+
});
|
|
423
|
+
results.push(result);
|
|
424
|
+
}
|
|
425
|
+
catch (err) {
|
|
426
|
+
results.push({
|
|
427
|
+
unitId: unit.id,
|
|
428
|
+
targetLocale,
|
|
429
|
+
filePath: '',
|
|
430
|
+
status: I18nUnitRunStatus.FAILED,
|
|
431
|
+
error: describeCaughtError(err),
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
return results;
|
|
356
436
|
}
|
|
357
437
|
/**
|
|
358
438
|
* One email template × one locale.
|
|
@@ -385,7 +465,7 @@ let TranslateOrchestratorCompanionService = class TranslateOrchestratorCompanion
|
|
|
385
465
|
* counts as "this email covers the locale".
|
|
386
466
|
*/
|
|
387
467
|
async translateEmailTemplateUnitForLocale(args) {
|
|
388
|
-
const { unit, source, sourceLocale, targetLocale, specContext, forceRetranslate, traceSession } = args;
|
|
468
|
+
const { unit, source, sourceLocale, targetLocale, specContext, forceRetranslate, traceSession, writer } = args;
|
|
389
469
|
const targetPath = labelsFilePath(unit.templateDirectory, targetLocale);
|
|
390
470
|
const sourceSha = this.lockService.hashString(source.content);
|
|
391
471
|
const step = this.traceability.createStep(traceSession, {
|
|
@@ -479,7 +559,10 @@ let TranslateOrchestratorCompanionService = class TranslateOrchestratorCompanion
|
|
|
479
559
|
labelsTypeName: source.parsed.labelsTypeName,
|
|
480
560
|
usesAsConst: source.parsed.usesAsConst,
|
|
481
561
|
});
|
|
482
|
-
|
|
562
|
+
if (writer)
|
|
563
|
+
await writer.stage(targetPath, content);
|
|
564
|
+
else
|
|
565
|
+
await writeFileAtomic(targetPath, content);
|
|
483
566
|
const sourceChanged = existing?.primarySha !== undefined && existing.primarySha !== sourceSha;
|
|
484
567
|
const locales = {};
|
|
485
568
|
for (const [locale, entry] of Object.entries(existing?.locales ?? {})) {
|
|
@@ -504,7 +587,7 @@ let TranslateOrchestratorCompanionService = class TranslateOrchestratorCompanion
|
|
|
504
587
|
return { unitId: unit.id, targetLocale, filePath: targetPath, status: I18nUnitRunStatus.UPDATED };
|
|
505
588
|
}
|
|
506
589
|
async translateUnitForLocale(args) {
|
|
507
|
-
const { unit, sourceLocale, targetLocale, sourceFlat, specContext, i18nRoot, forceRetranslate, traceSession } = args;
|
|
590
|
+
const { unit, sourceLocale, targetLocale, sourceFlat, specContext, i18nRoot, forceRetranslate, traceSession, writer } = args;
|
|
508
591
|
const targetPath = resolvePerUnitFilePath({ i18nRoot, unit, localeCode: targetLocale });
|
|
509
592
|
const sourcePath = resolvePerUnitFilePath({ i18nRoot, unit, localeCode: sourceLocale });
|
|
510
593
|
// One trace step per unit×locale; the source strings + prompt + response
|
|
@@ -572,6 +655,33 @@ let TranslateOrchestratorCompanionService = class TranslateOrchestratorCompanion
|
|
|
572
655
|
error: 'Unit has no recorded labellize state; run labellize first',
|
|
573
656
|
};
|
|
574
657
|
}
|
|
658
|
+
/*
|
|
659
|
+
* The words being translated must be the ones labellize recorded. Since #2213 labellize records a unit
|
|
660
|
+
* BEFORE its file reaches disk (the file waits for a burst), so a translate run overlapping that window
|
|
661
|
+
* — a coding agent's `wildo generate labels`, an operator's CLI run — would read the OLD primary file,
|
|
662
|
+
* miss every key it lacks, and record the locale `fresh` against the NEW primarySha. Once the burst lands
|
|
663
|
+
* that reads as fresh forever and the new keys are never translated. The fresh branch above already
|
|
664
|
+
* compares the source on disk; this path must too. A primary file edited by hand lands here as well, and
|
|
665
|
+
* labellize is what reconciles it, so the answer is the same: skip, record nothing, say why.
|
|
666
|
+
*/
|
|
667
|
+
const onDiskSourceSha = await this.computeFileShaIfExists(sourcePath);
|
|
668
|
+
if (onDiskSourceSha !== existing.primarySha) {
|
|
669
|
+
await this.traceability.traceEvent({
|
|
670
|
+
session: traceSession,
|
|
671
|
+
step,
|
|
672
|
+
minimumLevel: CompanionTraceabilityLevel.DEBUG,
|
|
673
|
+
type: 'translate-unit-skipped',
|
|
674
|
+
summary: `Unit ${unit.id} → ${targetLocale} skipped — primary file does not match the labellize record`,
|
|
675
|
+
payload: { unitId: unit.id, targetLocale },
|
|
676
|
+
});
|
|
677
|
+
return {
|
|
678
|
+
unitId: unit.id,
|
|
679
|
+
targetLocale,
|
|
680
|
+
filePath: targetPath,
|
|
681
|
+
status: I18nUnitRunStatus.SKIPPED,
|
|
682
|
+
error: 'The primary-locale file does not match what labellize recorded (not written yet, or edited by hand); run labellize first',
|
|
683
|
+
};
|
|
684
|
+
}
|
|
575
685
|
const existingTargetFlat = await readPerUnitLabels(targetPath);
|
|
576
686
|
const targetFlat = { ...existingTargetFlat };
|
|
577
687
|
// The spec context replayed into the translation prompt (the same one the
|
|
@@ -637,13 +747,15 @@ let TranslateOrchestratorCompanionService = class TranslateOrchestratorCompanion
|
|
|
637
747
|
delete targetFlat[key];
|
|
638
748
|
}
|
|
639
749
|
const localeDisplayName = LANGUAGE_INFO_MAP[targetLocale]?.name ?? targetLocale;
|
|
640
|
-
const
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
750
|
+
const fileArgs = { filePath: targetPath, localeCode: targetLocale, localeDisplayName, isPrimaryLocale: false, flatEntries: targetFlat };
|
|
751
|
+
let writtenContent;
|
|
752
|
+
if (writer) {
|
|
753
|
+
writtenContent = renderPerUnitLabels(fileArgs);
|
|
754
|
+
await writer.stage(targetPath, writtenContent);
|
|
755
|
+
}
|
|
756
|
+
else {
|
|
757
|
+
writtenContent = await writePerUnitLabels(fileArgs);
|
|
758
|
+
}
|
|
647
759
|
const outputSha = this.lockService.hashString(writtenContent);
|
|
648
760
|
const updatedLocales = { ...(existing?.locales ?? {}) };
|
|
649
761
|
updatedLocales[targetLocale] = {
|
|
@@ -1008,4 +1120,8 @@ TranslateOrchestratorCompanionService = __decorate([
|
|
|
1008
1120
|
EmailTemplateLabellingUnitsCompanionService])
|
|
1009
1121
|
], TranslateOrchestratorCompanionService);
|
|
1010
1122
|
export { TranslateOrchestratorCompanionService };
|
|
1123
|
+
/** A unit's per-locale results as progress outcomes. SKIPPED is not a failure: a unit with no words owes none. */
|
|
1124
|
+
function toProgressOutcomes(results) {
|
|
1125
|
+
return results.map((result) => ({ locale: result.targetLocale, failed: result.status === I18nUnitRunStatus.FAILED }));
|
|
1126
|
+
}
|
|
1011
1127
|
//# sourceMappingURL=translate-orchestrator.companion.service.js.map
|