@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
package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ApplicationSchemaPlanObligationAssessment } from '../../core/config/application-schema-plan-obligation.companion.utils';
|
|
2
2
|
import type { AppConfigurationService, LoggerService } from '@wildo-ai/saas-backend-lib';
|
|
3
|
-
import type
|
|
3
|
+
import { type PlaybookSpend, type PropagateBrandAssetsOutcome } from '@wildo-ai/application-creation-runtime';
|
|
4
4
|
import type { TechnicalDocCompanionService } from '../../technical-doc/services/technical-doc.companion.service';
|
|
5
|
+
import { AvailableLanguage } from '@wildo-ai/presets-components-models';
|
|
5
6
|
import { type BuildPlanTask } from '@wildo-ai/saas-specifications/application-creation';
|
|
6
7
|
import type { CompanionContext } from '../../core/context/companion-context';
|
|
7
8
|
import { LabellingPlannerCompanionService } from '../../i18n-labelling/services/labelling-planner.companion.service';
|
|
@@ -11,6 +12,8 @@ import { EmailTemplateCompanionService, type GenerateEmailTemplatesResult, type
|
|
|
11
12
|
import { LogoDeliberationCompanionService, type LogoDeliberationResult } from '../../brand/services/logo-deliberation.companion.service';
|
|
12
13
|
import { BrandAcceptCompanionService, type BrandAcceptResult } from '../../brand/services/brand-accept.companion.service';
|
|
13
14
|
import type { CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';
|
|
15
|
+
import { type GenerationStepProgress } from '../models/generation-step-progress.models';
|
|
16
|
+
import { type PlaybookSpendMeterCompanionService } from './playbook-spend-meter.companion.service';
|
|
14
17
|
/**
|
|
15
18
|
* The companion generation steps this host can EXECUTE.
|
|
16
19
|
*
|
|
@@ -28,7 +31,35 @@ import type { CompanionExecutionSessionContext } from '../../core/traceability/c
|
|
|
28
31
|
* The executor is the integration point, not a new lane per step.
|
|
29
32
|
*/
|
|
30
33
|
export declare enum ApplicationBuildGenerationStep {
|
|
34
|
+
/**
|
|
35
|
+
* The application's labels in its PRIMARY locale — the `labellize` pipeline, and nothing else.
|
|
36
|
+
*
|
|
37
|
+
* It used to translate as well, into every other enabled locale, in the same step. That made "the
|
|
38
|
+
* labels exist" and "every translation is done" one graph node, and everything that needs only the
|
|
39
|
+
* first waited for the second. Measured on app-creation-test-004 (2026-10-01, #2204): the English
|
|
40
|
+
* labels existed within minutes, translation into four locales then ran for hours at about one
|
|
41
|
+
* file every two minutes per locale, and the documentation portal — which reads primary-locale
|
|
42
|
+
* labels only — stayed dark the whole time. A hand-run `wildo docs publish` succeeded at once.
|
|
43
|
+
*
|
|
44
|
+
* Translation is now {@link I18N_TRANSLATIONS}, its own node, which the dispatch host derives after
|
|
45
|
+
* this one. A step that needs labels to EXIST depends on this step; nothing depends on translation.
|
|
46
|
+
*/
|
|
31
47
|
I18N_LABELS = "i18n-labels",
|
|
48
|
+
/**
|
|
49
|
+
* The application's labels translated into every enabled locale other than the primary — the
|
|
50
|
+
* `translate` pipeline. Split out of {@link I18N_LABELS} (#2204) so translation stops gating the
|
|
51
|
+
* steps that need only the primary locale.
|
|
52
|
+
*
|
|
53
|
+
* DERIVED by the dispatch host rather than authored, for the reason {@link DATABASE_MIGRATIONS} is:
|
|
54
|
+
* the obligation follows from what the application declares (more than one enabled locale) and
|
|
55
|
+
* from the plan carrying a labels step, not from a decision the plan makes. A plan MAY author it,
|
|
56
|
+
* and then the host derives nothing. See `withHostDerivedTranslationStep`.
|
|
57
|
+
*
|
|
58
|
+
* Nothing downstream waits on it, by design: the documentation portal reads primary-locale labels
|
|
59
|
+
* only (#1993 is the issue for translating it), and the website and the application read their
|
|
60
|
+
* label files at run time, so a translation landing is picked up without any republish step.
|
|
61
|
+
*/
|
|
62
|
+
I18N_TRANSLATIONS = "i18n-translations",
|
|
32
63
|
EMAIL_TEMPLATES = "email-templates",
|
|
33
64
|
/**
|
|
34
65
|
* The brand mark: an expert panel derives creative directions, images are generated, a vision
|
|
@@ -82,6 +113,8 @@ export declare enum ApplicationBuildGenerationStep {
|
|
|
82
113
|
* resolves the application's organization-role documentation and refuses without the primary-locale
|
|
83
114
|
* label — *"requires primary-locale label 'roles.ORG_ADMIN.label'; generate the application's role
|
|
84
115
|
* labels before publishing documentation"*. Running it early fails on exactly that.
|
|
116
|
+
*
|
|
117
|
+
* It does NOT wait for {@link I18N_TRANSLATIONS}: the primary locale is all it reads (#2204).
|
|
85
118
|
*/
|
|
86
119
|
DOCUMENTATION_PUBLICATION = "documentation-publication"
|
|
87
120
|
}
|
|
@@ -107,7 +140,15 @@ export declare enum ApplicationBuildGenerationStepLandedKind {
|
|
|
107
140
|
/** Landed when every named path is committed. The shape every file-writing step uses. */
|
|
108
141
|
COMMITTED_PATHS = "committed_paths",
|
|
109
142
|
/** Landed when the resource model and the accepted schema plan agree. */
|
|
110
|
-
SCHEMA_PLAN_IN_SYNC = "schema_plan_in_sync"
|
|
143
|
+
SCHEMA_PLAN_IN_SYNC = "schema_plan_in_sync",
|
|
144
|
+
/**
|
|
145
|
+
* Landed by construction: the application owes this step nothing. Today that is an `i18n-translations`
|
|
146
|
+
* step on an application whose only enabled locale is the primary (#2204 review). The host never
|
|
147
|
+
* DERIVES that step there, but a plan may AUTHOR it, and its evidence list is empty — and an empty
|
|
148
|
+
* `COMMITTED_PATHS` list never lands, so the step would be ready forever and the plan never finish.
|
|
149
|
+
* An honest "nothing is owed" is a landing, not a missing proof.
|
|
150
|
+
*/
|
|
151
|
+
NOT_OWED = "not_owed"
|
|
111
152
|
}
|
|
112
153
|
/** What the dispatch host must evaluate to decide whether a generation-step task has landed. */
|
|
113
154
|
export type ApplicationBuildGenerationStepLandedCondition = {
|
|
@@ -115,6 +156,8 @@ export type ApplicationBuildGenerationStepLandedCondition = {
|
|
|
115
156
|
readonly paths: readonly string[];
|
|
116
157
|
} | {
|
|
117
158
|
readonly kind: ApplicationBuildGenerationStepLandedKind.SCHEMA_PLAN_IN_SYNC;
|
|
159
|
+
} | {
|
|
160
|
+
readonly kind: ApplicationBuildGenerationStepLandedKind.NOT_OWED;
|
|
118
161
|
};
|
|
119
162
|
/**
|
|
120
163
|
* What `wildo db diff --check` could tell the host about the resource model versus the accepted schema plan.
|
|
@@ -151,12 +194,20 @@ export declare function classifySchemaPlanCheckFailure(error: unknown): SchemaPl
|
|
|
151
194
|
export declare class ApplicationBuildUnknownGenerationStepError extends Error {
|
|
152
195
|
constructor(taskRef: string, generationStepRef: string);
|
|
153
196
|
}
|
|
154
|
-
/** What one executed i18n-labels step did — the
|
|
197
|
+
/** What one executed i18n-labels step did — the pipeline's result, verbatim. */
|
|
155
198
|
export interface ApplicationBuildI18nLabelsStepRunResult {
|
|
156
199
|
readonly generationStepRef: ApplicationBuildGenerationStep.I18N_LABELS;
|
|
157
200
|
/** Primary-locale label generation (incremental — fresh units are skipped by the freshness lock). */
|
|
158
201
|
readonly labellize: LabellizeRunResult;
|
|
159
|
-
/**
|
|
202
|
+
/** The app-root-relative files this step is responsible for — the same paths the landed check reads. */
|
|
203
|
+
readonly evidencePaths: readonly string[];
|
|
204
|
+
}
|
|
205
|
+
/** What one executed i18n-translations step did — the pipeline's result, verbatim. */
|
|
206
|
+
export interface ApplicationBuildI18nTranslationsStepRunResult {
|
|
207
|
+
readonly generationStepRef: ApplicationBuildGenerationStep.I18N_TRANSLATIONS;
|
|
208
|
+
/** The locales it translated into: every enabled locale but the primary. */
|
|
209
|
+
readonly targetLocales: readonly string[];
|
|
210
|
+
/** Translation into those locales; absent when there were none (an authored step on a one-locale app). */
|
|
160
211
|
readonly translate?: TranslateRunResult;
|
|
161
212
|
/** The app-root-relative files this step is responsible for — the same paths the landed check reads. */
|
|
162
213
|
readonly evidencePaths: readonly string[];
|
|
@@ -229,7 +280,11 @@ export interface ApplicationBuildDocumentationPublicationStepRunResult {
|
|
|
229
280
|
readonly evidencePaths: readonly string[];
|
|
230
281
|
}
|
|
231
282
|
/** One executed generation step's result, discriminated by the step it ran. */
|
|
232
|
-
export type ApplicationBuildGenerationStepRunResult = ApplicationBuildI18nLabelsStepRunResult | ApplicationBuildEmailTemplatesStepRunResult | ApplicationBuildLogoStepRunResult | ApplicationBuildDatabaseMigrationsStepRunResult | ApplicationBuildDocumentationPublicationStepRunResult;
|
|
283
|
+
export type ApplicationBuildGenerationStepRunResult = ApplicationBuildI18nLabelsStepRunResult | ApplicationBuildI18nTranslationsStepRunResult | ApplicationBuildEmailTemplatesStepRunResult | ApplicationBuildLogoStepRunResult | ApplicationBuildDatabaseMigrationsStepRunResult | ApplicationBuildDocumentationPublicationStepRunResult;
|
|
284
|
+
/** A step's result with what its model calls spent (#2232) — what the step's row records. */
|
|
285
|
+
export type MeasuredGenerationStepRunResult = ApplicationBuildGenerationStepRunResult & {
|
|
286
|
+
readonly spend: PlaybookSpend;
|
|
287
|
+
};
|
|
233
288
|
/**
|
|
234
289
|
* The files that decide the schema-plan sync answer: the compiled MODEL and the ACCEPTED PLAN.
|
|
235
290
|
*
|
|
@@ -258,8 +313,20 @@ export declare class ApplicationBuildGenerationStepCompanionService {
|
|
|
258
313
|
private readonly logoDeliberation;
|
|
259
314
|
private readonly brandAccept;
|
|
260
315
|
private readonly technicalDoc;
|
|
316
|
+
private readonly spendMeter?;
|
|
261
317
|
private readonly logDebug;
|
|
262
|
-
|
|
318
|
+
/** The running step of each task, by task ref — runtime state only, see {@link GenerationStepProgress}. */
|
|
319
|
+
private readonly progressByTaskRef;
|
|
320
|
+
constructor(logger: LoggerService, appConfigService: AppConfigurationService, companionContext: CompanionContext, planner: LabellingPlannerCompanionService, labellize: LabellizeOrchestratorCompanionService, translate: TranslateOrchestratorCompanionService, emailTemplates: EmailTemplateCompanionService, logoDeliberation: LogoDeliberationCompanionService, brandAccept: BrandAcceptCompanionService, technicalDoc: TechnicalDocCompanionService, spendMeter?: PlaybookSpendMeterCompanionService | undefined);
|
|
321
|
+
/** What each executed step spent, by the task object it ran — read by the step's row writer (`spentByGenerationStep`). */
|
|
322
|
+
private readonly stepSpendByTask;
|
|
323
|
+
/**
|
|
324
|
+
* What the generation step last executed for `task` spent (#2232), however it ended — for its row when the run
|
|
325
|
+
* ends FAILED. Keyed by the TASK the dispatcher handed in, not by the thrown error: the step can succeed and
|
|
326
|
+
* something after it still throw (the acceptance commit, a lost file lock), and the step's spend is real either
|
|
327
|
+
* way. `undefined` when no step ran for that task object.
|
|
328
|
+
*/
|
|
329
|
+
spentByGenerationStep(task: BuildPlanTask): PlaybookSpend | undefined;
|
|
263
330
|
/**
|
|
264
331
|
* The app-root-relative files this task's generation step is responsible
|
|
265
332
|
* for. The landed check treats the task as landed when EVERY one of them is
|
|
@@ -299,8 +366,17 @@ export declare class ApplicationBuildGenerationStepCompanionService {
|
|
|
299
366
|
* Run the task's generation step. Incremental by construction: both
|
|
300
367
|
* pipelines consult the freshness lock and skip fresh units, so re-running
|
|
301
368
|
* an already-satisfied step costs a plan read, not a model call.
|
|
369
|
+
*
|
|
370
|
+
* While it runs, its progress is readable through {@link readGenerationStepProgress} (#2215); it is
|
|
371
|
+
* dropped when the step settles, however it ends.
|
|
372
|
+
*/
|
|
373
|
+
executeGenerationStep(task: BuildPlanTask, session?: CompanionExecutionSessionContext): Promise<MeasuredGenerationStepRunResult>;
|
|
374
|
+
/**
|
|
375
|
+
* How far the task's generation step has got, while it runs (#2215). `undefined` when no step of that
|
|
376
|
+
* task is running in this companion — the step settled, never ran, or ran before a restart.
|
|
302
377
|
*/
|
|
303
|
-
|
|
378
|
+
readGenerationStepProgress(taskRef: string): GenerationStepProgress | undefined;
|
|
379
|
+
private runGenerationStep;
|
|
304
380
|
/**
|
|
305
381
|
* Does this application already carry an accepted brand mark?
|
|
306
382
|
*
|
|
@@ -319,6 +395,16 @@ export declare class ApplicationBuildGenerationStepCompanionService {
|
|
|
319
395
|
* locale gets no translate pass and no foreign-locale evidence.
|
|
320
396
|
*/
|
|
321
397
|
private resolveEnabledLocales;
|
|
398
|
+
/**
|
|
399
|
+
* The locales the `i18n-translations` step translates into: every enabled locale but the primary.
|
|
400
|
+
*
|
|
401
|
+
* Public because the dispatch host derives that step only when this is non-empty — on a one-locale
|
|
402
|
+
* application the step owes nothing and its evidence list would be empty, and an empty list never
|
|
403
|
+
* lands, so a derived step there would be ready forever.
|
|
404
|
+
*/
|
|
405
|
+
resolveTranslationTargetLocales(): readonly AvailableLanguage[];
|
|
406
|
+
/** Every labelling unit's file, in each of the given locales — exactly the files the pipelines write. */
|
|
407
|
+
private resolveLabelUnitPaths;
|
|
322
408
|
/** `<backend service path>/src/engine/i18n`, app-root relative — the same tree the orchestrators write into. */
|
|
323
409
|
private resolveI18nRelativeRoot;
|
|
324
410
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-build-generation-step.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/application-build-generation-step.companion.service.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,yCAAyC,EAC/C,MAAM,sEAAsE,CAAC;AAK9E,OAAO,KAAK,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEzF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"application-build-generation-step.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/application-build-generation-step.companion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OAAO,CAAC,EAAE,gCAAgC,GACzC,OAAO,CAAC,+BAA+B,CAAC;IAoB3C;;;OAGG;IACI,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,sBAAsB,GAAG,SAAS;YAIxE,iBAAiB;IAkM/B;;;;;;;;OAQG;YACW,oBAAoB;IAgBlC,OAAO,CAAC,wBAAwB;IAQhC;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;IAI7B;;;;;;OAMG;IACI,+BAA+B,IAAI,SAAS,iBAAiB,EAAE;IAKtE,yGAAyG;YAC3F,qBAAqB;IASnC,gHAAgH;IAChH,OAAO,CAAC,uBAAuB;CAOhC"}
|
package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js
CHANGED
|
@@ -14,10 +14,11 @@ import * as path from 'node:path';
|
|
|
14
14
|
import { ApplicationSchemaPlanObligation, SCHEMA_PLAN_LOCKFILE_RELATIVE_PATH, assessApplicationSchemaPlanObligation, } from '../../core/config/application-schema-plan-obligation.companion.utils.js';
|
|
15
15
|
import { stat } from 'node:fs/promises';
|
|
16
16
|
import { existsSync, readdirSync } from 'node:fs';
|
|
17
|
-
import { inject, injectable } from 'inversify';
|
|
17
|
+
import { inject, injectable, optional } from 'inversify';
|
|
18
18
|
import { SAAS_SERVICE_TYPES, executeBoundedSubprocess } from '@wildo-ai/saas-backend-lib';
|
|
19
|
+
import { NO_PLAYBOOK_SPEND_METER } from '@wildo-ai/application-creation-runtime';
|
|
19
20
|
import { propagateAcceptedBrand } from '../../brand/services/brand-propagation.companion.utils.js';
|
|
20
|
-
import { BuildPlanTaskTargetKind } from '@wildo-ai/saas-specifications/application-creation';
|
|
21
|
+
import { BRAND_RESOLVED_ASSETS_MODULE_FILE, BuildPlanTaskTargetKind } from '@wildo-ai/saas-specifications/application-creation';
|
|
21
22
|
import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types.js';
|
|
22
23
|
import { getCompanionConfiguredPrimaryLanguage, getCompanionServedLanguages } from '../../core/config/primary-language.companion.utils.js';
|
|
23
24
|
import { signDerivedInputs } from '../../core/utils/derived-input-signature.companion.utils.js';
|
|
@@ -27,6 +28,8 @@ import { TranslateOrchestratorCompanionService, } from '../../i18n-labelling/ser
|
|
|
27
28
|
import { EmailTemplateCompanionService, } from '../../email/services/email-template.companion.service.js';
|
|
28
29
|
import { LogoDeliberationCompanionService, } from '../../brand/services/logo-deliberation.companion.service.js';
|
|
29
30
|
import { BrandAcceptCompanionService, } from '../../brand/services/brand-accept.companion.service.js';
|
|
31
|
+
import { GenerationStepProgressTracker } from '../models/generation-step-progress.models.js';
|
|
32
|
+
import { PlaybookSpendMeasuredUnit } from './playbook-spend-meter.companion.service.js';
|
|
30
33
|
/**
|
|
31
34
|
* The companion generation steps this host can EXECUTE.
|
|
32
35
|
*
|
|
@@ -45,7 +48,35 @@ import { BrandAcceptCompanionService, } from '../../brand/services/brand-accept.
|
|
|
45
48
|
*/
|
|
46
49
|
export var ApplicationBuildGenerationStep;
|
|
47
50
|
(function (ApplicationBuildGenerationStep) {
|
|
51
|
+
/**
|
|
52
|
+
* The application's labels in its PRIMARY locale — the `labellize` pipeline, and nothing else.
|
|
53
|
+
*
|
|
54
|
+
* It used to translate as well, into every other enabled locale, in the same step. That made "the
|
|
55
|
+
* labels exist" and "every translation is done" one graph node, and everything that needs only the
|
|
56
|
+
* first waited for the second. Measured on app-creation-test-004 (2026-10-01, #2204): the English
|
|
57
|
+
* labels existed within minutes, translation into four locales then ran for hours at about one
|
|
58
|
+
* file every two minutes per locale, and the documentation portal — which reads primary-locale
|
|
59
|
+
* labels only — stayed dark the whole time. A hand-run `wildo docs publish` succeeded at once.
|
|
60
|
+
*
|
|
61
|
+
* Translation is now {@link I18N_TRANSLATIONS}, its own node, which the dispatch host derives after
|
|
62
|
+
* this one. A step that needs labels to EXIST depends on this step; nothing depends on translation.
|
|
63
|
+
*/
|
|
48
64
|
ApplicationBuildGenerationStep["I18N_LABELS"] = "i18n-labels";
|
|
65
|
+
/**
|
|
66
|
+
* The application's labels translated into every enabled locale other than the primary — the
|
|
67
|
+
* `translate` pipeline. Split out of {@link I18N_LABELS} (#2204) so translation stops gating the
|
|
68
|
+
* steps that need only the primary locale.
|
|
69
|
+
*
|
|
70
|
+
* DERIVED by the dispatch host rather than authored, for the reason {@link DATABASE_MIGRATIONS} is:
|
|
71
|
+
* the obligation follows from what the application declares (more than one enabled locale) and
|
|
72
|
+
* from the plan carrying a labels step, not from a decision the plan makes. A plan MAY author it,
|
|
73
|
+
* and then the host derives nothing. See `withHostDerivedTranslationStep`.
|
|
74
|
+
*
|
|
75
|
+
* Nothing downstream waits on it, by design: the documentation portal reads primary-locale labels
|
|
76
|
+
* only (#1993 is the issue for translating it), and the website and the application read their
|
|
77
|
+
* label files at run time, so a translation landing is picked up without any republish step.
|
|
78
|
+
*/
|
|
79
|
+
ApplicationBuildGenerationStep["I18N_TRANSLATIONS"] = "i18n-translations";
|
|
49
80
|
ApplicationBuildGenerationStep["EMAIL_TEMPLATES"] = "email-templates";
|
|
50
81
|
/**
|
|
51
82
|
* The brand mark: an expert panel derives creative directions, images are generated, a vision
|
|
@@ -99,6 +130,8 @@ export var ApplicationBuildGenerationStep;
|
|
|
99
130
|
* resolves the application's organization-role documentation and refuses without the primary-locale
|
|
100
131
|
* label — *"requires primary-locale label 'roles.ORG_ADMIN.label'; generate the application's role
|
|
101
132
|
* labels before publishing documentation"*. Running it early fails on exactly that.
|
|
133
|
+
*
|
|
134
|
+
* It does NOT wait for {@link I18N_TRANSLATIONS}: the primary locale is all it reads (#2204).
|
|
102
135
|
*/
|
|
103
136
|
ApplicationBuildGenerationStep["DOCUMENTATION_PUBLICATION"] = "documentation-publication";
|
|
104
137
|
})(ApplicationBuildGenerationStep || (ApplicationBuildGenerationStep = {}));
|
|
@@ -130,6 +163,14 @@ export var ApplicationBuildGenerationStepLandedKind;
|
|
|
130
163
|
ApplicationBuildGenerationStepLandedKind["COMMITTED_PATHS"] = "committed_paths";
|
|
131
164
|
/** Landed when the resource model and the accepted schema plan agree. */
|
|
132
165
|
ApplicationBuildGenerationStepLandedKind["SCHEMA_PLAN_IN_SYNC"] = "schema_plan_in_sync";
|
|
166
|
+
/**
|
|
167
|
+
* Landed by construction: the application owes this step nothing. Today that is an `i18n-translations`
|
|
168
|
+
* step on an application whose only enabled locale is the primary (#2204 review). The host never
|
|
169
|
+
* DERIVES that step there, but a plan may AUTHOR it, and its evidence list is empty — and an empty
|
|
170
|
+
* `COMMITTED_PATHS` list never lands, so the step would be ready forever and the plan never finish.
|
|
171
|
+
* An honest "nothing is owed" is a landing, not a missing proof.
|
|
172
|
+
*/
|
|
173
|
+
ApplicationBuildGenerationStepLandedKind["NOT_OWED"] = "not_owed";
|
|
133
174
|
})(ApplicationBuildGenerationStepLandedKind || (ApplicationBuildGenerationStepLandedKind = {}));
|
|
134
175
|
/**
|
|
135
176
|
* What `wildo db diff --check` could tell the host about the resource model versus the accepted schema plan.
|
|
@@ -168,12 +209,10 @@ export function classifySchemaPlanCheckFailure(error) {
|
|
|
168
209
|
return output.includes(SCHEMA_PLAN_DRIFT_OUTPUT_MARKER) ? SchemaPlanSyncState.DRIFTED : SchemaPlanSyncState.UNANSWERABLE;
|
|
169
210
|
}
|
|
170
211
|
/**
|
|
171
|
-
* The SSOT module `brand-accept`
|
|
172
|
-
*
|
|
173
|
-
* Restated here rather than imported because it is a module-private constant of the brand service;
|
|
174
|
-
* the two must agree, and the pin in this lane's tests is what says so.
|
|
212
|
+
* The SSOT module `brand-accept` writes when it promotes a winner — the shared definition the brief's landing and the
|
|
213
|
+
* accept step read too (#2237), so the three cannot disagree about the file.
|
|
175
214
|
*/
|
|
176
|
-
const BRAND_RESOLVED_ASSETS_MODULE =
|
|
215
|
+
const BRAND_RESOLVED_ASSETS_MODULE = BRAND_RESOLVED_ASSETS_MODULE_FILE;
|
|
177
216
|
/** A build plan referenced a generation step this companion cannot execute. Named, so the plan author sees the vocabulary. */
|
|
178
217
|
export class ApplicationBuildUnknownGenerationStepError extends Error {
|
|
179
218
|
constructor(taskRef, generationStepRef) {
|
|
@@ -225,8 +264,9 @@ function listMigrationFolders(saasRoot) {
|
|
|
225
264
|
* The build lane's landed answer is GIT: a task has landed when the files it
|
|
226
265
|
* produces are committed. A generation step's target carries only its
|
|
227
266
|
* `generationStepRef` — no paths — so the file set must be DERIVED. For
|
|
228
|
-
* `i18n-labels` it is the labelling planner's unit inventory
|
|
229
|
-
*
|
|
267
|
+
* `i18n-labels` it is the labelling planner's unit inventory in the primary
|
|
268
|
+
* locale, and for `i18n-translations` the same inventory crossed with every
|
|
269
|
+
* other enabled locale: exactly the files the pipelines write, re-derivable
|
|
230
270
|
* after a restart, a fresh clone, or a branch switch. Deliberately NOT the
|
|
231
271
|
* whole i18n directory: that is already committed on any app with history, and
|
|
232
272
|
* a directory-prefix check would report the step landed without it ever
|
|
@@ -379,8 +419,11 @@ let ApplicationBuildGenerationStepCompanionService = class ApplicationBuildGener
|
|
|
379
419
|
logoDeliberation;
|
|
380
420
|
brandAccept;
|
|
381
421
|
technicalDoc;
|
|
422
|
+
spendMeter;
|
|
382
423
|
logDebug;
|
|
383
|
-
|
|
424
|
+
/** The running step of each task, by task ref — runtime state only, see {@link GenerationStepProgress}. */
|
|
425
|
+
progressByTaskRef = new Map();
|
|
426
|
+
constructor(logger, appConfigService, companionContext, planner, labellize, translate, emailTemplates, logoDeliberation, brandAccept, technicalDoc, spendMeter) {
|
|
384
427
|
this.logger = logger;
|
|
385
428
|
this.appConfigService = appConfigService;
|
|
386
429
|
this.companionContext = companionContext;
|
|
@@ -391,8 +434,20 @@ let ApplicationBuildGenerationStepCompanionService = class ApplicationBuildGener
|
|
|
391
434
|
this.logoDeliberation = logoDeliberation;
|
|
392
435
|
this.brandAccept = brandAccept;
|
|
393
436
|
this.technicalDoc = technicalDoc;
|
|
437
|
+
this.spendMeter = spendMeter;
|
|
394
438
|
this.logDebug = this.logger.debugByType('ApplicationBuildGenerationStep');
|
|
395
439
|
}
|
|
440
|
+
/** What each executed step spent, by the task object it ran — read by the step's row writer (`spentByGenerationStep`). */
|
|
441
|
+
stepSpendByTask = new WeakMap();
|
|
442
|
+
/**
|
|
443
|
+
* What the generation step last executed for `task` spent (#2232), however it ended — for its row when the run
|
|
444
|
+
* ends FAILED. Keyed by the TASK the dispatcher handed in, not by the thrown error: the step can succeed and
|
|
445
|
+
* something after it still throw (the acceptance commit, a lost file lock), and the step's spend is real either
|
|
446
|
+
* way. `undefined` when no step ran for that task object.
|
|
447
|
+
*/
|
|
448
|
+
spentByGenerationStep(task) {
|
|
449
|
+
return this.stepSpendByTask.get(task);
|
|
450
|
+
}
|
|
396
451
|
/**
|
|
397
452
|
* The app-root-relative files this task's generation step is responsible
|
|
398
453
|
* for. The landed check treats the task as landed when EVERY one of them is
|
|
@@ -402,12 +457,12 @@ let ApplicationBuildGenerationStepCompanionService = class ApplicationBuildGener
|
|
|
402
457
|
async resolveGenerationStepEvidencePaths(task) {
|
|
403
458
|
const generationStepRef = this.requireGenerationStepRef(task);
|
|
404
459
|
switch (generationStepRef) {
|
|
405
|
-
case ApplicationBuildGenerationStep.I18N_LABELS:
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
460
|
+
case ApplicationBuildGenerationStep.I18N_LABELS:
|
|
461
|
+
return this.resolveLabelUnitPaths([getCompanionConfiguredPrimaryLanguage(this.appConfigService.config)]);
|
|
462
|
+
case ApplicationBuildGenerationStep.I18N_TRANSLATIONS:
|
|
463
|
+
// Every unit in every TARGET locale. Empty on a one-locale application, which is why the host
|
|
464
|
+
// derives this step only when there is a target (an empty list never lands).
|
|
465
|
+
return this.resolveLabelUnitPaths(this.resolveTranslationTargetLocales());
|
|
411
466
|
case ApplicationBuildGenerationStep.EMAIL_TEMPLATES:
|
|
412
467
|
// Placement is the email domain's authority; this lane only crosses it with the enabled locales.
|
|
413
468
|
return this.emailTemplates.resolveExpectedArtifactRelativePaths(this.resolveEnabledLocales());
|
|
@@ -471,6 +526,9 @@ let ApplicationBuildGenerationStepCompanionService = class ApplicationBuildGener
|
|
|
471
526
|
if (generationStepRef === ApplicationBuildGenerationStep.DATABASE_MIGRATIONS) {
|
|
472
527
|
return { kind: ApplicationBuildGenerationStepLandedKind.SCHEMA_PLAN_IN_SYNC };
|
|
473
528
|
}
|
|
529
|
+
if (generationStepRef === ApplicationBuildGenerationStep.I18N_TRANSLATIONS && this.resolveTranslationTargetLocales().length === 0) {
|
|
530
|
+
return { kind: ApplicationBuildGenerationStepLandedKind.NOT_OWED };
|
|
531
|
+
}
|
|
474
532
|
return {
|
|
475
533
|
kind: ApplicationBuildGenerationStepLandedKind.COMMITTED_PATHS,
|
|
476
534
|
paths: await this.resolveGenerationStepEvidencePaths(task),
|
|
@@ -504,25 +562,63 @@ let ApplicationBuildGenerationStepCompanionService = class ApplicationBuildGener
|
|
|
504
562
|
* Run the task's generation step. Incremental by construction: both
|
|
505
563
|
* pipelines consult the freshness lock and skip fresh units, so re-running
|
|
506
564
|
* an already-satisfied step costs a plan read, not a model call.
|
|
565
|
+
*
|
|
566
|
+
* While it runs, its progress is readable through {@link readGenerationStepProgress} (#2215); it is
|
|
567
|
+
* dropped when the step settles, however it ends.
|
|
507
568
|
*/
|
|
508
569
|
async executeGenerationStep(task, session) {
|
|
570
|
+
const tracker = new GenerationStepProgressTracker(this.requireGenerationStepRef(task));
|
|
571
|
+
this.progressByTaskRef.set(task.taskRef, tracker);
|
|
572
|
+
try {
|
|
573
|
+
/*
|
|
574
|
+
* Measured AS a generation step (#2232): its spend goes on its own row, and every enclosing measurement (a
|
|
575
|
+
* build-dispatch playbook run) tallies it in `generationSteps`, so a total over both counts it once.
|
|
576
|
+
*/
|
|
577
|
+
const measured = this.spendMeter
|
|
578
|
+
? await this.spendMeter.measure(() => this.runGenerationStep(task, tracker.reporter, session), { as: PlaybookSpendMeasuredUnit.GENERATION_STEP })
|
|
579
|
+
: await NO_PLAYBOOK_SPEND_METER.measure(() => this.runGenerationStep(task, tracker.reporter, session));
|
|
580
|
+
this.stepSpendByTask.set(task, measured.spend);
|
|
581
|
+
if (measured.settled.status === 'rejected')
|
|
582
|
+
throw measured.settled.reason;
|
|
583
|
+
return { ...measured.settled.value, spend: measured.spend };
|
|
584
|
+
}
|
|
585
|
+
finally {
|
|
586
|
+
// Only our own tracker: a second run of the same task that started meanwhile keeps its own.
|
|
587
|
+
if (this.progressByTaskRef.get(task.taskRef) === tracker)
|
|
588
|
+
this.progressByTaskRef.delete(task.taskRef);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* How far the task's generation step has got, while it runs (#2215). `undefined` when no step of that
|
|
593
|
+
* task is running in this companion — the step settled, never ran, or ran before a restart.
|
|
594
|
+
*/
|
|
595
|
+
readGenerationStepProgress(taskRef) {
|
|
596
|
+
return this.progressByTaskRef.get(taskRef)?.snapshot();
|
|
597
|
+
}
|
|
598
|
+
async runGenerationStep(task, progress, session) {
|
|
509
599
|
const generationStepRef = this.requireGenerationStepRef(task);
|
|
510
600
|
switch (generationStepRef) {
|
|
511
601
|
case ApplicationBuildGenerationStep.I18N_LABELS: {
|
|
512
|
-
const primaryLocale = getCompanionConfiguredPrimaryLanguage(this.appConfigService.config);
|
|
513
|
-
const targetLocales = this.resolveEnabledLocales().filter((locale) => locale !== primaryLocale);
|
|
514
602
|
this.logDebug('Running the i18n-labels generation step', {
|
|
515
603
|
taskRef: task.taskRef,
|
|
516
|
-
primaryLocale,
|
|
517
|
-
targetLocales,
|
|
604
|
+
primaryLocale: getCompanionConfiguredPrimaryLanguage(this.appConfigService.config),
|
|
518
605
|
});
|
|
519
|
-
const labellizeResult = await this.labellize.labellize({}, session);
|
|
606
|
+
const labellizeResult = await this.labellize.labellize({ progress }, session);
|
|
607
|
+
return {
|
|
608
|
+
generationStepRef,
|
|
609
|
+
labellize: labellizeResult,
|
|
610
|
+
evidencePaths: await this.resolveGenerationStepEvidencePaths(task),
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
case ApplicationBuildGenerationStep.I18N_TRANSLATIONS: {
|
|
614
|
+
const targetLocales = this.resolveTranslationTargetLocales();
|
|
615
|
+
this.logDebug('Running the i18n-translations generation step', { taskRef: task.taskRef, targetLocales });
|
|
520
616
|
const translateResult = targetLocales.length > 0
|
|
521
|
-
? await this.translate.translate({ targetLocales }, session)
|
|
617
|
+
? await this.translate.translate({ targetLocales: [...targetLocales], progress }, session)
|
|
522
618
|
: undefined;
|
|
523
619
|
return {
|
|
524
620
|
generationStepRef,
|
|
525
|
-
|
|
621
|
+
targetLocales,
|
|
526
622
|
...(translateResult ? { translate: translateResult } : {}),
|
|
527
623
|
evidencePaths: await this.resolveGenerationStepEvidencePaths(task),
|
|
528
624
|
};
|
|
@@ -537,7 +633,7 @@ let ApplicationBuildGenerationStepCompanionService = class ApplicationBuildGener
|
|
|
537
633
|
});
|
|
538
634
|
const emailGenerate = await this.emailTemplates.generateTemplates({}, session);
|
|
539
635
|
const emailTranslate = targetLocales.length > 0
|
|
540
|
-
? await this.emailTemplates.translateEmailTemplateLabels({ targetLocales: [...targetLocales] }, session)
|
|
636
|
+
? await this.emailTemplates.translateEmailTemplateLabels({ targetLocales: [...targetLocales] }, session, { progress })
|
|
541
637
|
: undefined;
|
|
542
638
|
return {
|
|
543
639
|
generationStepRef,
|
|
@@ -714,6 +810,25 @@ let ApplicationBuildGenerationStepCompanionService = class ApplicationBuildGener
|
|
|
714
810
|
resolveEnabledLocales() {
|
|
715
811
|
return getCompanionServedLanguages(this.appConfigService.config);
|
|
716
812
|
}
|
|
813
|
+
/**
|
|
814
|
+
* The locales the `i18n-translations` step translates into: every enabled locale but the primary.
|
|
815
|
+
*
|
|
816
|
+
* Public because the dispatch host derives that step only when this is non-empty — on a one-locale
|
|
817
|
+
* application the step owes nothing and its evidence list would be empty, and an empty list never
|
|
818
|
+
* lands, so a derived step there would be ready forever.
|
|
819
|
+
*/
|
|
820
|
+
resolveTranslationTargetLocales() {
|
|
821
|
+
const primaryLocale = getCompanionConfiguredPrimaryLanguage(this.appConfigService.config);
|
|
822
|
+
return this.resolveEnabledLocales().filter((locale) => locale !== primaryLocale);
|
|
823
|
+
}
|
|
824
|
+
/** Every labelling unit's file, in each of the given locales — exactly the files the pipelines write. */
|
|
825
|
+
async resolveLabelUnitPaths(locales) {
|
|
826
|
+
if (locales.length === 0)
|
|
827
|
+
return [];
|
|
828
|
+
const i18nRoot = this.resolveI18nRelativeRoot();
|
|
829
|
+
const units = await this.planner.planAllUnits();
|
|
830
|
+
return units.flatMap((unit) => locales.map((locale) => path.posix.join(i18nRoot, unit.filePathHint.bucket, `${unit.filePathHint.slug}.${locale}.ts`)));
|
|
831
|
+
}
|
|
717
832
|
/** `<backend service path>/src/engine/i18n`, app-root relative — the same tree the orchestrators write into. */
|
|
718
833
|
resolveI18nRelativeRoot() {
|
|
719
834
|
const backendService = Object.values(this.companionContext.backendServices)[0];
|
|
@@ -735,12 +850,14 @@ ApplicationBuildGenerationStepCompanionService = __decorate([
|
|
|
735
850
|
__param(7, inject(COMPANION_SERVICE_TYPES.LogoDeliberationService)),
|
|
736
851
|
__param(8, inject(COMPANION_SERVICE_TYPES.BrandAcceptService)),
|
|
737
852
|
__param(9, inject(COMPANION_SERVICE_TYPES.TechnicalDocService)),
|
|
853
|
+
__param(10, inject(COMPANION_SERVICE_TYPES.PlaybookSpendMeter)),
|
|
854
|
+
__param(10, optional()),
|
|
738
855
|
__metadata("design:paramtypes", [Function, Function, Object, LabellingPlannerCompanionService,
|
|
739
856
|
LabellizeOrchestratorCompanionService,
|
|
740
857
|
TranslateOrchestratorCompanionService,
|
|
741
858
|
EmailTemplateCompanionService,
|
|
742
859
|
LogoDeliberationCompanionService,
|
|
743
|
-
BrandAcceptCompanionService, Function])
|
|
860
|
+
BrandAcceptCompanionService, Function, Function])
|
|
744
861
|
], ApplicationBuildGenerationStepCompanionService);
|
|
745
862
|
export { ApplicationBuildGenerationStepCompanionService };
|
|
746
863
|
//# sourceMappingURL=application-build-generation-step.companion.service.js.map
|