@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creation-plane-dispatch.custom-impl.companion.service.js","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,0BAA0B,EAC1B,wBAAwB,EACxB,8BAA8B,GAE/B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,2BAA2B,EAC3B,SAAS,EACT,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,qCAAqC,EACrC,qCAAqC,EACrC,wCAAwC,EACxC,wCAAwC,EACxC,6CAA6C,EAC7C,yCAAyC,EACzC,6CAA6C,EAC7C,qCAAqC,EACrC,qCAAqC,EACrC,kCAAkC,EAClC,6BAA6B,EAC7B,8CAA8C,EAC9C,8CAA8C,EAC9C,uCAAuC,EACvC,uCAAuC,EACvC,4CAA4C,EAC5C,4CAA4C,EAC5C,yCAAyC,EACzC,sCAAsC,EACtC,4CAA4C,EAE5C,+CAA+C,EAC/C,2BAA2B,EAC3B,kCAAkC,EAClC,6BAA6B,EAC7B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B,CAAC,SAAS,CAAC;QAC9D,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,gCAAgC,CAAC,SAAS,CAAC;QACrE,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,gCAAgC,CAAC,SAAS,CAAC;QACrE,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,2BAA2B,CAAC,SAAS,CAAC;QAChE,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,mCAAmC,CAAC,SAAS,EAAE,sCAAsC,CAAC,GAAG,CAAC;QACpH,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,mCAAmC,CAAC,SAAS,EAAE,sCAAsC,CAAC,KAAK,CAAC;QACtH,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,kCAAkC,CAAC,SAAS,CAAC;KACxE,CAAC;AACJ,CAAC","sourcesContent":["import type { Container } from 'inversify';\nimport {\n BuildPlanTaskAppendError,\n GovernanceQuestionnaireError,\n PlaybookClarificationError,\n PlaybookElicitationError,\n landGovernanceFactDeclarations,\n type GovernanceFactDeclarationInput,\n} from '@wildo-ai/application-creation-runtime';\nimport {\n ErrorCustomMessageReference,\n ErrorType,\n ResourceOperationVariantType,\n} from '@wildo-ai/saas-models';\nimport {\n Workbench_AcceptChangesOutcome_Schema,\n Workbench_AcceptChangesRequest_Schema,\n Workbench_BuildPlanAddTaskOutcome_Schema,\n Workbench_BuildPlanAddTaskRequest_Schema,\n Workbench_BuildPlanDispatchNextRequest_Schema,\n Workbench_BuildPlanDispatchOutcome_Schema,\n Workbench_BuildPlanDispatchTaskRequest_Schema,\n Workbench_DossierAnswerOutcome_Schema,\n Workbench_DossierAnswerRequest_Schema,\n WorkbenchDossierEntries_Operations,\n Workbench_EmptyRequest_Schema,\n Workbench_GovernanceFactsLandingOutcome_Schema,\n Workbench_GovernanceFactsLandingRequest_Schema,\n WorkbenchGovernanceDocuments_Operations,\n Workbench_CodingRunCancelOutcome_Schema,\n Workbench_ParkedQuestionAnswerOutcome_Schema,\n Workbench_ParkedQuestionAnswerRequest_Schema,\n WorkbenchParkedCodingQuestions_Operations,\n WorkbenchApplicationSecrets_Operations,\n Workbench_ApplicationSecretSetRequest_Schema,\n type Workbench_ApplicationSecretChangeOutcome,\n Workbench_ApplicationSecretChangeOutcome_Schema,\n splitApplicationSecretRowId,\n Workbench_PlaybookInterview_Schema,\n Workbench_RunWriteDiff_Schema,\n Workbench_TraceArtifact_Schema,\n Workbench_TraceArtifactRequest_Schema,\n Workbench_TraceSessionRecord_Schema,\n Workbench_TraceSessionsForTask_Schema,\n Workbench_TraceSessionsForTaskRequest_Schema,\n Workbench_TraceSessionUsage_Schema,\n WorkbenchTraceSessions_Operations,\n Workbench_PlaybookResumeRequest_Schema,\n type Workbench_PlaybookResumeRequest,\n Workbench_PlaybookRunOutcome_Schema,\n Workbench_PlaybookRunRequest_Schema,\n Workbench_RunWriteRevertOutcome_Schema,\n Workbench_RunWriteRevertRequest_Schema,\n WorkbenchBuildPlanTasks_Operations,\n WorkbenchCreationPlaneBehavior,\n WorkbenchPlaybooks_Operations,\n WorkbenchRunWriteRecords_Operations,\n WorkbenchShared_ResourceType,\n} from '@wildo-ai/platform-core-shared';\nimport {\n createResourceCustomServiceImplementation,\n describeCaughtError,\n SAAS_SERVICE_TYPES,\n type ExternalProvidersRegistryBackendService,\n type LoggerService,\n type ResourceCustomServiceImplementationFactory,\n} from '@wildo-ai/saas-backend-lib';\n\nimport { COMPANION_SERVICE_TYPES } from '../../inject/models/service-types';\nimport {\n PlaybookRunAlreadyInFlightError,\n PlaybookNotReadyError,\n UnknownPlaybookError,\n type PlaybookRunCompanionService,\n} from '../../../meta-workflows/services/playbook-run.companion.service';\nimport { SupersededPlaybookRunQuestionError, SuspendedPlaybookRunNotFoundError } from '../../../meta-workflows/models/playbook-run-checkpoint.models';\nimport { CompanionErrorGuidanceKey } from '../../../companion-api/companion-error-guidance.models';\nimport { FoundationExecutionError } from '../../../meta-workflows/services/foundation-executor.companion.service';\nimport {\n ApplicationBuildPlanExhaustedError,\n ApplicationBuildTaskCompletedButUnlandedError,\n ApplicationBuildTaskNotReadyError,\n ApplicationBuildPlanUnavailableError,\n} from '../../../meta-workflows/services/application-build-dispatch.companion.service';\nimport type { BuildPlanAuthoringCompanionService } from '../../../meta-workflows/services/build-plan-authoring.companion.service';\nimport { CodingRunWritingTheTreeError, NothingToAcceptError, type AcceptedChangeCommitCompanionService } from '../../../claude-cli/services/accepted-change-commit.companion.service';\nimport { PlaybookRunWriteRecordNotFoundError } from '../../../meta-workflows/services/playbook-run-write-register.companion.service';\nimport { ExecutionTraceNotFoundError, type ExecutionTraceReadCompanionService } from '../../../meta-workflows/services/execution-trace-read.companion.service';\nimport type { CodingAgentDispatchCompanionService } from '../../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport type { CompanionContext } from '../../context/companion-context';\nimport type { ApplicationBuildDispatchCompanionService } from '../../../meta-workflows/services/application-build-dispatch.companion.service';\nimport type { PlaybookRunWriteRegisterCompanionService } from '../../../meta-workflows/services/playbook-run-write-register.companion.service';\nimport type { DossierCompanionService } from '../../../meta-workflows/services/dossier.companion.service';\nimport {\n CreationPlaneProjectionCompanionService,\n sanitizeCreationPlaneIdentity,\n} from './creation-plane-projection.companion.service';\nimport type { CompanionTraceabilityService } from '../../traceability/companion-traceability.service';\nimport { CompanionTraceabilityLevel } from '../../traceability/companion-traceability.models';\nimport { describeSecretsCliFailure, setApplicationSecret, unsetApplicationSecret } from './application-secrets.companion';\nimport { applyCompanionEnvVariable } from '../../runtime/companion-env-file';\nimport { MetaWorkflow_ClarificationAction } from '@wildo-ai/saas-models/meta-workflows';\n\n/**\n * The creation board's DISPATCHES as custom-operation implementations — Phase 3 of\n * `workbench-creation-board-resources.md` (plan D3).\n *\n * Every handler is `OVERRIDE_ALL`, deliberately and necessarily: the framework pipeline still runs\n * everything a dispatch WANTS from it — authentication, the role gate, request-DTO validation, the\n * `currentObject` preflight READ — and the override returns before everything a derived resource\n * CANNOT give it: the repository write the introspection adapter refuses, and the transaction\n * machinery there is nothing to transact against. The work itself is a delegation to the same\n * companion services the bespoke routes call; those routes survive for the CLI, and both doors now\n * converge on one service seam.\n *\n * ## Identity resolution is a LOOKUP, never a reverse-sanitization\n *\n * An instance-targeted dispatch arrives addressed by the row's SANITIZED id\n * (`top_down__phase-gate`). The sanitizer is not injective in general, so the handlers resolve the\n * business key by matching the sanitized form against the live rows (playbooks: the cached\n * eligibility derivation; write records: the register list) — exact, and refusing honestly when\n * nothing matches.\n *\n * ## Cache invalidation\n *\n * A run or resume that lands files already invalidates the eligibility cache through the write\n * register's mutation seam. The explicit `invalidateDerivedBoards()` after run/resume/dispatch covers\n * the outcomes that DON'T write (a refusal that consumed budget state, a clarification stop, a\n * dispatch that only started a coding run) — the board must not answer \"as of before your dispatch\"\n * to the person who just dispatched.\n */\n\n/**\n * Translate the companion services' NAMED refusals into the transport-honest errors the bespoke\n * routes answer — mirroring the controller's own mapping, so a refusal reads the same through both\n * doors. Anything unnamed propagates untouched and surfaces as the 500 it is.\n *\n * The controller maps almost all of these to VALIDATION (400) with the message carried verbatim —\n * a refusal from this plane is nearly always actionable (\"no ready build-plan task\", \"no suspended\n * run\") — and the one genuinely stateful collision (a loop already holding the lane) to CONFLICT.\n */\nexport function translateCreationPlaneDispatchError(\n error: unknown,\n executionContext: unknown,\n utils: { errorBuilder: { buildError: (...args: never[]) => unknown } },\n): unknown {\n /*\n * Called THROUGH the builder object, never extracted: `buildError` reads `this` internally\n * (`executeBackendActions`), and a detached reference throws `Cannot read properties of\n * undefined` from inside the error path — measured live, an error builder failing to build the\n * error it was translating.\n */\n const builder = utils.errorBuilder as unknown as {\n buildError: (\n type: ErrorType,\n ctx: unknown,\n params: { customMessageReference: ErrorCustomMessageReference; context: { message: string } },\n ) => unknown;\n buildErrorWithGuidanceKey: (\n type: ErrorType,\n ctx: unknown,\n guidanceKey: string,\n guidance: { explanation: string },\n params: { customMessageReference: ErrorCustomMessageReference; context: { message: string } },\n ) => unknown;\n };\n /*\n * No run is waiting under that id — answered, cancelled, or never held here: a missing resource, 404\n * (#1584). Its words travel as GUIDANCE: the client sanitizer strips a 404's context, so a sentence left\n * there would never reach the person (`CompanionErrorGuidanceKey`).\n */\n if (error instanceof SuspendedPlaybookRunNotFoundError) {\n return builder.buildErrorWithGuidanceKey(ErrorType.NOT_FOUND, executionContext,\n CompanionErrorGuidanceKey.SUSPENDED_PLAYBOOK_RUN_NOT_WAITING, { explanation: error.message },\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { message: error.message } });\n }\n /*\n * Caught on the BASE class, so a refused CHOREOGRAPHY answers 409 here exactly as a refused loop\n * does. The workbench dispatches composites through this door; catching only the loop subclass\n * would have sent a creator's second market analysis back as a validation-shaped 500.\n */\n if (\n error instanceof PlaybookRunAlreadyInFlightError\n /* A named task that is landed, blocked or unknown (#1454, Step 7): the STATE forbids the run, not the payload. */\n || error instanceof ApplicationBuildTaskNotReadyError\n /* The run is waiting, on a later round than the one answered (#1584). */\n || error instanceof SupersededPlaybookRunQuestionError\n /* A person's accept while a coding worker writes the same tree: the moment is wrong, not the request. */\n || error instanceof CodingRunWritingTheTreeError\n ) {\n return builder.buildError(ErrorType.CONFLICT, executionContext, {\n customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_VALIDATION_FAILED,\n context: { message: error.message },\n });\n }\n if (\n error instanceof UnknownPlaybookError\n || error instanceof PlaybookNotReadyError\n /* A declared interview missing an answer — found live: `run(domain-plan)` without `tenancy`. */\n || error instanceof PlaybookElicitationError\n || error instanceof PlaybookClarificationError\n || error instanceof FoundationExecutionError\n || error instanceof ApplicationBuildPlanUnavailableError\n || error instanceof ApplicationBuildPlanExhaustedError\n /*\n * Carries the agent's own question when a ready task is parked. Without it the board's dispatch\n * answered a sanitized 500 \"internal\" for a state the operator can actually resolve.\n */\n || error instanceof ApplicationBuildTaskCompletedButUnlandedError\n || error instanceof PlaybookRunWriteRecordNotFoundError\n /* A task that cannot join the plan, and a run with nothing acceptable — both name what to change (#1454, Step 7). */\n || error instanceof BuildPlanTaskAppendError\n || error instanceof NothingToAcceptError\n /* A missing trace is a bad request, not a broken host — the same reading the companion's trace routes make. */\n || error instanceof ExecutionTraceNotFoundError\n /*\n * A refusal on governance ANSWERS names what the person got wrong (an unanswered question, a review\n * with no reviewer, \"does not apply\" on a question that does not offer it); left untranslated it was\n * a 500 saying \"internal\" — measured 2026-09-03 on the route this verb replaced.\n */\n || error instanceof GovernanceQuestionnaireError\n ) {\n return builder.buildError(ErrorType.VALIDATION, executionContext, {\n customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_VALIDATION_FAILED,\n context: { message: error.message },\n });\n }\n return undefined;\n}\n\nconst CREATION_PLANE_DISPATCH_PATH_BASE = {\n variantType: ResourceOperationVariantType.API_CALL,\n isOperationDefault: true,\n} as const;\n\n/**\n * Open a trace session for one board dispatch — the parity the bespoke routes get from\n * `attachRequestTraceSession` middleware, which the resource lane bypasses (the engine's controller\n * mounts these operations, so no companion middleware runs). Without it a dispatched run has no\n * trace directory, a `run-` prefixed runId (the `session?.sessionId ?? 'run'` fallback), and a\n * null `workbenchTraceSessionId` join key on its write record — issue #238, measured live.\n *\n * Opening is unconditional and cheap: session factories do no disk I/O until the first event or\n * artifact that passes the level gate, so an untraced deployment pays nothing.\n */\nfunction openDispatchTraceSession(container: Container, routePath: string) {\n const traceability = container.get<CompanionTraceabilityService>(\n COMPANION_SERVICE_TYPES.TraceabilityService,\n );\n const session = traceability.createApiRequestSession({\n method: 'put',\n routePath,\n urlPath: routePath,\n // ip/userAgent are genuinely unavailable here: the resource lane's handlers never see the\n // Express request. Everything else matches the middleware's bookkeeping.\n });\n // Middleware parity (completion-review finding 11b): the bespoke routes bookend each request\n // with start/finish events; the dispatch lane emits the same pair so a session dir reads the\n // same either way. Fire-and-forget like the middleware's own emits.\n void traceability.traceEvent({\n session,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-start',\n summary: `Start PUT ${routePath}`,\n payload: { method: 'PUT', url: routePath },\n });\n return session;\n}\n\n/**\n * Run a dispatch handler's work UNDER its trace session, so everything it starts — a detached run,\n * a model call whose caller named no session — is attributed to it. The middleware does the same for\n * the bespoke routes; this lane bypasses the middleware, so it enters the session itself (#1264).\n */\nfunction inDispatchTraceSession<T>(\n container: Container,\n session: ReturnType<CompanionTraceabilityService['createApiRequestSession']>,\n work: () => Promise<T>,\n): Promise<T> {\n return container.get<CompanionTraceabilityService>(COMPANION_SERVICE_TYPES.TraceabilityService).runWithActiveSession(session, work);\n}\n\n/** The finish half of the bookend pair — called from each dispatch handler's `finally`. */\nfunction closeDispatchTraceSession(\n container: Container,\n session: ReturnType<CompanionTraceabilityService['createApiRequestSession']>,\n routePath: string,\n outcome: 'success' | 'error',\n): void {\n const traceability = container.get<CompanionTraceabilityService>(\n COMPANION_SERVICE_TYPES.TraceabilityService,\n );\n void traceability.traceEvent({\n session,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-finish',\n summary: `Finish PUT ${routePath} (${outcome})`,\n payload: { method: 'PUT', url: routePath, outcome },\n });\n}\n\nfunction buildPlaybookRunFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.PLAYBOOKS,\n operationIdentifier: WorkbenchPlaybooks_Operations.RUN,\n },\n requestDtoSchema: Workbench_PlaybookRunRequest_Schema,\n responseDtoSchema: Workbench_PlaybookRunOutcome_Schema,\n debugLabel: 'creation-plane.playbooks.run',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const playbookRunService = container.get<PlaybookRunCompanionService>(\n COMPANION_SERVICE_TYPES.PlaybookRunService,\n );\n const rowId = String(id ?? '');\n const rows = await projection.deriveRows(WorkbenchCreationPlaneBehavior.PLAYBOOK_ELIGIBILITY);\n const row = rows.find((candidate) => candidate.workbenchPlaybookId === rowId);\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No playbook row matches id \"${rowId}\".` },\n });\n }\n const request = (input ?? {}) as {\n creatorBrief?: string;\n elicitationAnswers?: readonly { questionRef: string; answer: string }[];\n dryRun?: boolean;\n instanceKey?: string;\n };\n /*\n * The Run gate's answers to questions the dossier still needed are FILED before the run\n * (#1454 review, LOW): until then they reached this one run and nowhere else, so the next run\n * asked again and the dossier said \"still needed\" about a step that had run. Filed first, so an\n * answer the dossier refuses (a choice outside its options) refuses the run before it spends,\n * with the same sentence the dossier's own Answer gives. Overrides of answered questions stay\n * overrides (`fileStillNeededAnswers`); a dry run files nothing; with no signed-in person there\n * is nobody to record an answer against, so the answers ride this run only, as before.\n */\n const answeredByRef = executionContext?.initiatorIds?.userId;\n if (request.elicitationAnswers?.length && !request.dryRun && answeredByRef) {\n const dossier = container.get<DossierCompanionService>(COMPANION_SERVICE_TYPES.DossierService);\n try {\n await dossier.fileStillNeededAnswers({\n playbookRef: String(row.playbookRef),\n ...(request.instanceKey ? { instanceKey: request.instanceKey } : {}),\n answers: request.elicitationAnswers,\n answeredByRef,\n });\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n }\n const runRoute = `/workbench-playbooks/${rowId}/run`;\n const session = openDispatchTraceSession(container, runRoute);\n let outcome: 'success' | 'error' = 'error';\n try {\n const result = await inDispatchTraceSession(container, session, () => playbookRunService.runPlaybook({\n playbookRef: String(row.playbookRef),\n session,\n // The signed-in person starting it (#1751): a question the run asks is routed to them.\n ...(answeredByRef ? { requestedByUserId: answeredByRef } : {}),\n ...(request.instanceKey ? { instanceKey: request.instanceKey } : {}),\n ...(request.creatorBrief ? { creatorBrief: request.creatorBrief } : {}),\n ...(request.elicitationAnswers?.length ? { elicitationAnswers: request.elicitationAnswers } : {}),\n ...(request.dryRun ? { dryRun: true } : {}),\n }));\n outcome = 'success';\n return result;\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n projection.invalidateDerivedBoards();\n closeDispatchTraceSession(container, session, runRoute, outcome);\n }\n },\n },\n });\n}\n\nfunction buildPlaybookResumeFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.PLAYBOOKS,\n operationIdentifier: WorkbenchPlaybooks_Operations.RESUME,\n },\n requestDtoSchema: Workbench_PlaybookResumeRequest_Schema,\n responseDtoSchema: Workbench_PlaybookRunOutcome_Schema,\n debugLabel: 'creation-plane.playbooks.resume',\n handlers: {\n overrideAll: async (_id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const playbookRunService = container.get<PlaybookRunCompanionService>(\n COMPANION_SERVICE_TYPES.PlaybookRunService,\n );\n // Typed by the request DTO (#1785): `action` is the one clarification vocabulary, re-checked below.\n const request = (input ?? {}) as Partial<Workbench_PlaybookResumeRequest>;\n const action = Object.values(MetaWorkflow_ClarificationAction)\n .find((candidate) => candidate === request.action);\n const round = request.round;\n if (!action || !request.runId || typeof round !== 'number' || !Number.isInteger(round) || round < 1) {\n throw utils.errorBuilder.buildError(ErrorType.VALIDATION, executionContext, {\n customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_VALIDATION_FAILED,\n context: {\n message: !request.runId\n ? '`runId` is required — it is the handle `run` returned when the derivation stopped to ask.'\n : !action\n ? `Unknown action \\`${request.action}\\`. Expected one of: ${Object.values(MetaWorkflow_ClarificationAction).join(', ')}.`\n : '`round` is required — the round of questions this answers, as the waiting run carries it.',\n },\n });\n }\n /*\n * \"I answered\" and \"you decide\" produce different artifacts, so an empty accept is refused\n * rather than treated as a decline — mirroring the companion route's own contract.\n */\n if (action === MetaWorkflow_ClarificationAction.ACCEPT && !(request.answers?.length)) {\n throw utils.errorBuilder.buildError(ErrorType.VALIDATION, executionContext, {\n customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_VALIDATION_FAILED,\n context: { message: '`accept` requires at least one answer.' },\n });\n }\n // Held as a const: the narrowing above does not survive into the closure the session runs.\n const runId = request.runId;\n const resumeRoute = '/workbench-playbooks/resume-run';\n const session = openDispatchTraceSession(container, resumeRoute);\n let outcome: 'success' | 'error' = 'error';\n try {\n /* The signed-in person, as the dossier records it — so DECISIONS.md says who answered from either door (#1658). */\n const answeredByRef = executionContext?.initiatorIds?.userId;\n const result = await inDispatchTraceSession(container, session, () => playbookRunService.resumePlaybookRun({\n runId,\n round,\n action,\n session,\n ...(request.answers?.length ? { answers: request.answers } : {}),\n // The same person, as the decision's actor (#1751): a question routed elsewhere refuses them.\n ...(answeredByRef ? { answeredByRef, actingUserId: answeredByRef } : {}),\n }));\n outcome = 'success';\n return result;\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n projection.invalidateDerivedBoards();\n closeDispatchTraceSession(container, session, resumeRoute, outcome);\n }\n },\n },\n });\n}\n\nfunction buildDispatchNextFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS,\n operationIdentifier: WorkbenchBuildPlanTasks_Operations.DISPATCH_NEXT,\n },\n requestDtoSchema: Workbench_BuildPlanDispatchNextRequest_Schema,\n responseDtoSchema: Workbench_BuildPlanDispatchOutcome_Schema,\n debugLabel: 'creation-plane.build-plan.dispatch-next',\n handlers: {\n overrideAll: async (_id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const buildDispatchService = container.get<ApplicationBuildDispatchCompanionService>(\n COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService,\n );\n const dispatchRoute = '/workbench-build-plan-tasks/dispatch-next';\n const session = openDispatchTraceSession(container, dispatchRoute);\n let outcome: 'success' | 'error' = 'error';\n try {\n const result = await inDispatchTraceSession(container, session, () => buildDispatchService.dispatchNextBuildTask(session));\n outcome = 'success';\n return result;\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n projection.invalidateDerivedBoards();\n closeDispatchTraceSession(container, session, dispatchRoute, outcome);\n }\n },\n },\n });\n}\n\nfunction buildRevertWritesFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.RUN_WRITE_RECORDS,\n operationIdentifier: WorkbenchRunWriteRecords_Operations.REVERT,\n },\n requestDtoSchema: Workbench_RunWriteRevertRequest_Schema,\n responseDtoSchema: Workbench_RunWriteRevertOutcome_Schema,\n debugLabel: 'creation-plane.run-writes.revert',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const runWriteRegister = container.get<PlaybookRunWriteRegisterCompanionService>(\n COMPANION_SERVICE_TYPES.PlaybookRunWriteRegisterService,\n );\n const rowId = String(id ?? '');\n const records = await runWriteRegister.list();\n const record = records.find(\n (candidate) => sanitizeCreationPlaneIdentity(candidate.runId) === rowId,\n );\n if (!record) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No write record matches id \"${rowId}\".` },\n });\n }\n const request = (input ?? {}) as { force?: boolean };\n try {\n // The register's own mutation seam invalidates the eligibility cache on a landed revert.\n return await runWriteRegister.revert(record.runId, { force: request.force === true });\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/**\n * `answer` on the DOSSIER (#1454, Step 5): record the creator's answer to the question this row IS.\n *\n * The row carries the playbook and question refs — resolved from the projection rather than\n * un-sanitized from the id, since sanitization is not injective — and the body carries only the\n * value. The provenance (`answeredByRef`) is the caller's own identity from the execution context,\n * never a field of the request: a person cannot file an answer as somebody else. A refused answer\n * (unknown question, a choice outside its options, an ambiguous yes/no) is a `PlaybookElicitationError`\n * and answers 400 with its sentence intact, through the same translation the run door uses.\n */\nfunction buildDossierAnswerFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.DOSSIER_ENTRIES,\n operationIdentifier: WorkbenchDossierEntries_Operations.ANSWER,\n },\n requestDtoSchema: Workbench_DossierAnswerRequest_Schema,\n responseDtoSchema: Workbench_DossierAnswerOutcome_Schema,\n debugLabel: 'creation-plane.dossier-entries.answer',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const dossier = container.get<DossierCompanionService>(\n COMPANION_SERVICE_TYPES.DossierService,\n );\n const rowId = String(id ?? '');\n const rows = await projection.deriveRows(WorkbenchCreationPlaneBehavior.DOSSIER_ENTRIES);\n const row = rows.find((candidate) => candidate.workbenchDossierEntryId === rowId);\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No dossier question matches id \"${rowId}\".` },\n });\n }\n const answeredByRef = executionContext?.initiatorIds?.userId;\n if (!answeredByRef) {\n // Fail closed on provenance: an answer nobody is recorded as giving is not an answer.\n throw utils.errorBuilder.buildError(ErrorType.AUTHENTICATION, executionContext, {\n customMessageReference: ErrorCustomMessageReference.AUTHENTICATION,\n context: { message: 'Answering a dossier question needs a signed-in person to record it against.' },\n });\n }\n const request = (input ?? {}) as { value?: string };\n try {\n const result = await dossier.recordAnswer({\n playbookRef: String(row.playbookRef),\n questionRef: String(row.questionRef),\n /* An instance's row files the instance's own answer (#1609); the step's row files the step's. */\n ...(typeof row.instanceKey === 'string' ? { instanceKey: row.instanceKey } : {}),\n value: String(request.value ?? ''),\n answeredByRef,\n });\n return {\n value: result.answer.value,\n answeredAt: result.answer.answeredAt,\n packageRelativePath: result.packageRelativePath,\n unansweredQuestionRefs: [...result.unansweredQuestionRefs],\n };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n /* The answer moves eligibility (a fully answered interview is runnable unattended) and the dossier itself. */\n projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/**\n * ADD a task to the build plan (#1454, Step 7). Collection-level, deterministic, no trace session:\n * nothing runs, a file is re-rendered. The task's shape is parsed against the real\n * `BuildPlanTaskSchema` inside the runtime append, which is why the request crosses as records.\n */\nfunction buildAddTaskFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS,\n operationIdentifier: WorkbenchBuildPlanTasks_Operations.ADD_TASK,\n },\n requestDtoSchema: Workbench_BuildPlanAddTaskRequest_Schema,\n responseDtoSchema: Workbench_BuildPlanAddTaskOutcome_Schema,\n debugLabel: 'creation-plane.build-plan.add-task',\n handlers: {\n overrideAll: async (_id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const authoring = container.get<BuildPlanAuthoringCompanionService>(\n COMPANION_SERVICE_TYPES.BuildPlanAuthoringService,\n );\n const request = (input ?? {}) as Parameters<BuildPlanAuthoringCompanionService['addTask']>[0]['task'];\n try {\n /*\n * The person who asked, as the dossier records an answerer (#1608). A request reaching this door without\n * a signed-in person is still a request, so it is recorded as the creator's rather than left unmarked,\n * which would let the next decomposition drop it.\n */\n const landed = await authoring.addTask({ task: request, requestedBy: executionContext?.initiatorIds?.userId ?? 'creator' });\n return {\n taskRef: landed.task.taskRef,\n createdPlan: landed.createdPlan,\n advisoryFindings: landed.advisoryFindings.map((finding) => ({ code: String(finding.code), taskRef: finding.taskRef, message: finding.message })),\n packageRelativePath: landed.packageRelativePath,\n taskCount: landed.graph.tasks.length,\n };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n /* The plan moved: the task list, the next-task projection and the outcomes all read it. */\n projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/**\n * RUN THIS task (#1454, Step 7): `dispatch_next`'s door, by row. The row is the build-plan task;\n * the body may name the conversation the dispatch came from, which the run's row then carries.\n */\nfunction buildDispatchTaskFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS,\n operationIdentifier: WorkbenchBuildPlanTasks_Operations.DISPATCH_TASK,\n },\n requestDtoSchema: Workbench_BuildPlanDispatchTaskRequest_Schema,\n responseDtoSchema: Workbench_BuildPlanDispatchOutcome_Schema,\n debugLabel: 'creation-plane.build-plan.dispatch-task',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const buildDispatchService = container.get<ApplicationBuildDispatchCompanionService>(\n COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService,\n );\n const rowId = String(id ?? '');\n const rows = await projection.deriveRows(WorkbenchCreationPlaneBehavior.BUILD_PLAN_TASKS);\n const row = rows.find((candidate) => candidate.workbenchBuildPlanTaskId === rowId);\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No build-plan task matches id \"${rowId}\".` },\n });\n }\n const request = (input ?? {}) as { conversationId?: string };\n const dispatchRoute = `/workbench-build-plan-tasks/${rowId}/dispatch-task`;\n const session = openDispatchTraceSession(container, dispatchRoute);\n let outcome: 'success' | 'error' = 'error';\n try {\n const result = await inDispatchTraceSession(container, session, () => buildDispatchService.dispatchBuildTask(\n String(row.taskRef),\n session,\n request.conversationId ? { conversationId: request.conversationId } : undefined,\n ));\n outcome = 'success';\n return result;\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n projection.invalidateDerivedBoards();\n closeDispatchTraceSession(container, session, dispatchRoute, outcome);\n }\n },\n },\n });\n}\n\n/** ACCEPT a task's latest coding run: commit exactly what its register names (#1454, Step 7). */\nfunction buildAcceptTaskFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS,\n operationIdentifier: WorkbenchBuildPlanTasks_Operations.ACCEPT,\n },\n requestDtoSchema: Workbench_AcceptChangesRequest_Schema,\n responseDtoSchema: Workbench_AcceptChangesOutcome_Schema,\n debugLabel: 'creation-plane.build-plan.accept',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const accept = container.get<AcceptedChangeCommitCompanionService>(\n COMPANION_SERVICE_TYPES.AcceptedChangeCommitService,\n );\n const rowId = String(id ?? '');\n const rows = await projection.deriveRows(WorkbenchCreationPlaneBehavior.BUILD_PLAN_TASKS);\n const row = rows.find((candidate) => candidate.workbenchBuildPlanTaskId === rowId);\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No build-plan task matches id \"${rowId}\".` },\n });\n }\n const request = (input ?? {}) as { force?: boolean };\n try {\n const outcome = await accept.acceptCodingRun({\n taskRef: String(row.taskRef),\n subject: String(row.objective),\n ...(request.force === true ? { force: true } : {}),\n });\n return { ...outcome, commitSha: outcome.commitSha ?? undefined };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n /* A commit LANDS the task: status, the next-task projection and the dispatch rows all move. */\n projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/** ACCEPT a playbook run's writes: commit exactly what its register names (#1454, Step 7). */\nfunction buildAcceptRunWritesFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.RUN_WRITE_RECORDS,\n operationIdentifier: WorkbenchRunWriteRecords_Operations.ACCEPT,\n },\n requestDtoSchema: Workbench_AcceptChangesRequest_Schema,\n responseDtoSchema: Workbench_AcceptChangesOutcome_Schema,\n debugLabel: 'creation-plane.run-write-records.accept',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const accept = container.get<AcceptedChangeCommitCompanionService>(\n COMPANION_SERVICE_TYPES.AcceptedChangeCommitService,\n );\n const rowId = String(id ?? '');\n const rows = await projection.deriveRows(WorkbenchCreationPlaneBehavior.RUN_WRITE_RECORDS);\n const row = rows.find((candidate) => candidate.workbenchRunWriteRecordId === rowId);\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No run write record matches id \"${rowId}\".` },\n });\n }\n const request = (input ?? {}) as { force?: boolean };\n try {\n const outcome = await accept.acceptPlaybookRun({ runId: String(row.runId), ...(request.force === true ? { force: true } : {}) });\n return { ...outcome, commitSha: outcome.commitSha ?? undefined };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/**\n * A row's TRACE SESSION, from its sanitized identity. Identities are sanitized business keys, so the\n * session is found by sanitizing the candidates, never by un-sanitizing the request — the same rule\n * the projection's addressed READ applies.\n */\nasync function resolveTraceSessionId(\n traces: ExecutionTraceReadCompanionService,\n rowId: string,\n executionContext: unknown,\n utils: { errorBuilder: { buildError: (...args: never[]) => unknown } },\n): Promise<string> {\n const sessionId = (await traces.listSessionIds()).find((candidate) => sanitizeCreationPlaneIdentity(candidate) === rowId);\n if (sessionId === undefined) {\n throw (utils.errorBuilder as unknown as { buildError: (type: ErrorType, ctx: unknown, params: unknown) => unknown }).buildError(\n ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No trace session matches id \"${rowId}\".` },\n },\n ) as Error;\n }\n return sessionId;\n}\n\n/**\n * `read_interview` on a PLAYBOOK: what it asks a person before it runs, as a decision payload —\n * `null` for a playbook with no interview, so a caller may ask unconditionally rather than first\n * deciding from `requiresElicitation` whether the question is worth asking.\n */\nfunction buildPlaybookReadInterviewFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.PLAYBOOKS,\n operationIdentifier: WorkbenchPlaybooks_Operations.READ_INTERVIEW,\n },\n requestDtoSchema: Workbench_EmptyRequest_Schema,\n responseDtoSchema: Workbench_PlaybookInterview_Schema,\n debugLabel: 'creation-plane.playbooks.read-interview',\n handlers: {\n overrideAll: async (id, _input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);\n const playbookRunService = container.get<PlaybookRunCompanionService>(COMPANION_SERVICE_TYPES.PlaybookRunService);\n const rowId = String(id ?? '');\n const row = (await projection.deriveRows(WorkbenchCreationPlaneBehavior.PLAYBOOK_ELIGIBILITY))\n .find((candidate) => candidate.workbenchPlaybookId === rowId);\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No playbook row matches id \"${rowId}\".` },\n });\n }\n try {\n const decision = await playbookRunService.readPlaybookElicitationDecision(String(row.playbookRef));\n return { decision: decision ?? null };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/** `read_diff` on a WRITE RECORD: what the run changed, per file, from the register's own pre/post content. */\nfunction buildRunWriteDiffFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.RUN_WRITE_RECORDS,\n operationIdentifier: WorkbenchRunWriteRecords_Operations.READ_DIFF,\n },\n requestDtoSchema: Workbench_EmptyRequest_Schema,\n responseDtoSchema: Workbench_RunWriteDiff_Schema,\n debugLabel: 'creation-plane.run-writes.read-diff',\n handlers: {\n overrideAll: async (id, _input, executionContext, _operationPath, utils) => {\n const runWriteRegister = container.get<PlaybookRunWriteRegisterCompanionService>(COMPANION_SERVICE_TYPES.PlaybookRunWriteRegisterService);\n const rowId = String(id ?? '');\n const record = (await runWriteRegister.list()).find((candidate) => sanitizeCreationPlaneIdentity(candidate.runId) === rowId);\n if (!record) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No write record matches id \"${rowId}\".` },\n });\n }\n try {\n return await runWriteRegister.describeRunDiff(record.runId);\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/** `read_record` on a TRACE SESSION: every event in order and the step artifacts by name (#1328). */\nfunction buildTraceSessionRecordFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.TRACE_SESSIONS,\n operationIdentifier: WorkbenchTraceSessions_Operations.READ_RECORD,\n },\n requestDtoSchema: Workbench_EmptyRequest_Schema,\n responseDtoSchema: Workbench_TraceSessionRecord_Schema,\n debugLabel: 'creation-plane.trace-sessions.read-record',\n handlers: {\n overrideAll: async (id, _input, executionContext, _operationPath, utils) => {\n const traces = container.get<ExecutionTraceReadCompanionService>(COMPANION_SERVICE_TYPES.ExecutionTraceReadService);\n const sessionId = await resolveTraceSessionId(traces, String(id ?? ''), executionContext, utils);\n try {\n return await traces.readSession(sessionId);\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/** `read_usage` on a TRACE SESSION: what it spent, in tokens — summed from the usage already in its events (#1274). */\nfunction buildTraceSessionUsageFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.TRACE_SESSIONS,\n operationIdentifier: WorkbenchTraceSessions_Operations.READ_USAGE,\n },\n requestDtoSchema: Workbench_EmptyRequest_Schema,\n responseDtoSchema: Workbench_TraceSessionUsage_Schema,\n debugLabel: 'creation-plane.trace-sessions.read-usage',\n handlers: {\n overrideAll: async (id, _input, executionContext, _operationPath, utils) => {\n const traces = container.get<ExecutionTraceReadCompanionService>(COMPANION_SERVICE_TYPES.ExecutionTraceReadService);\n const sessionId = await resolveTraceSessionId(traces, String(id ?? ''), executionContext, utils);\n try {\n return await traces.summarizeSessionUsage(sessionId);\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/** `read_artifact` on a TRACE SESSION: one step artifact's body, verbatim (#1329). */\nfunction buildTraceArtifactFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.TRACE_SESSIONS,\n operationIdentifier: WorkbenchTraceSessions_Operations.READ_ARTIFACT,\n },\n requestDtoSchema: Workbench_TraceArtifactRequest_Schema,\n responseDtoSchema: Workbench_TraceArtifact_Schema,\n debugLabel: 'creation-plane.trace-sessions.read-artifact',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const traces = container.get<ExecutionTraceReadCompanionService>(COMPANION_SERVICE_TYPES.ExecutionTraceReadService);\n const sessionId = await resolveTraceSessionId(traces, String(id ?? ''), executionContext, utils);\n const request = (input ?? {}) as { stepDirName?: string; fileName?: string };\n try {\n return { body: await traces.readArtifact(sessionId, String(request.stepDirName ?? ''), String(request.fileName ?? '')) };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/** `list_for_task` on TRACE SESSIONS: the sessions one actor task ran in, latest first — the coding lane's alias (#1328). */\nfunction buildTraceSessionsForTaskFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.TRACE_SESSIONS,\n operationIdentifier: WorkbenchTraceSessions_Operations.LIST_FOR_TASK,\n },\n requestDtoSchema: Workbench_TraceSessionsForTaskRequest_Schema,\n responseDtoSchema: Workbench_TraceSessionsForTask_Schema,\n debugLabel: 'creation-plane.trace-sessions.list-for-task',\n handlers: {\n overrideAll: async (_id, input, executionContext, _operationPath, utils) => {\n const traces = container.get<ExecutionTraceReadCompanionService>(COMPANION_SERVICE_TYPES.ExecutionTraceReadService);\n const request = (input ?? {}) as { taskId?: string };\n try {\n return { sessionIds: [...await traces.listActorTaskSessionIds(String(request.taskId ?? ''))] };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/**\n * `answer` on a PARKED CODING QUESTION: resume the same agent session with the operator's answer.\n * ONE door since #1359 — the parked run is an actor-system execution waiting on a decision, so\n * answering it is the same call whether this process parked it or a previous one did; the lane\n * refuses (409) when nothing answerable waits under the task.\n */\nfunction buildParkedQuestionAnswerFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.PARKED_CODING_QUESTIONS,\n operationIdentifier: WorkbenchParkedCodingQuestions_Operations.ANSWER,\n },\n requestDtoSchema: Workbench_ParkedQuestionAnswerRequest_Schema,\n responseDtoSchema: Workbench_ParkedQuestionAnswerOutcome_Schema,\n debugLabel: 'creation-plane.parked-questions.answer',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);\n const codingAgent = container.get<CodingAgentDispatchCompanionService>(COMPANION_SERVICE_TYPES.CodingAgentDispatchService);\n const rowId = String(id ?? '');\n const row = (await projection.deriveRows(WorkbenchCreationPlaneBehavior.PARKED_CODING_QUESTIONS))\n .find((candidate) => candidate.workbenchParkedCodingQuestionId === rowId);\n if (!row) {\n // Guidance, not context: a 404's context is stripped before the gate could show it (#1584 review R1).\n // Reached only when the row vanished between the engine's authorization and this read: a row already\n // gone is refused first, by the authorization step, as `authorizations_validation_failed` (#1585).\n throw utils.errorBuilder.buildErrorWithGuidanceKey(ErrorType.NOT_FOUND, executionContext,\n CompanionErrorGuidanceKey.PARKED_CODING_QUESTION_NOT_FOUND, { explanation: `No parked coding question matches id \"${rowId}\".` },\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { message: `No parked coding question matches id \"${rowId}\".` } });\n }\n const request = (input ?? {}) as { answer?: string; suspensionRef?: string };\n try {\n // The question the person read, not whichever the run waits on now (#1581, eighth review).\n // The request schema requires it; a missing or blank one names no question and is refused 400 at the answer door.\n const answeredByRef = executionContext?.initiatorIds?.userId;\n return await codingAgent.respondToApplicationCodingTaskQuestion(String(row.taskId), String(request.answer ?? ''), undefined,\n { suspensionRef: String(request.suspensionRef ?? ''), ...(answeredByRef ? { answeredByRef, actingUserId: answeredByRef } : {}) });\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n /* The queue and the dispatch rows move: a resumed run is no longer parked. */\n projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/** `cancel` on PARKED CODING QUESTIONS: end the run THIS row names (#1581, seventh review F2). */\nfunction buildCodingRunCancelFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.PARKED_CODING_QUESTIONS,\n operationIdentifier: WorkbenchParkedCodingQuestions_Operations.CANCEL,\n },\n requestDtoSchema: Workbench_EmptyRequest_Schema,\n responseDtoSchema: Workbench_CodingRunCancelOutcome_Schema,\n debugLabel: 'creation-plane.parked-questions.cancel',\n handlers: {\n overrideAll: async (id, _input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);\n const codingAgent = container.get<CodingAgentDispatchCompanionService>(COMPANION_SERVICE_TYPES.CodingAgentDispatchService);\n const rowId = String(id ?? '');\n const row = (await projection.deriveRows(WorkbenchCreationPlaneBehavior.PARKED_CODING_QUESTIONS))\n .find((candidate) => candidate.workbenchParkedCodingQuestionId === rowId);\n if (!row) {\n // Guidance, not context: a 404's context is stripped before the gate could show it (#1584 review R1).\n // Reached only when the row vanished between the engine's authorization and this read: a row already\n // gone is refused first, by the authorization step, as `authorizations_validation_failed` (#1585).\n throw utils.errorBuilder.buildErrorWithGuidanceKey(ErrorType.NOT_FOUND, executionContext,\n CompanionErrorGuidanceKey.PARKED_CODING_QUESTION_NOT_FOUND, { explanation: `No parked coding question matches id \"${rowId}\".` },\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { message: `No parked coding question matches id \"${rowId}\".` } });\n }\n try {\n // The signed-in person cancelling (#1751): the withdrawn question records them as its decider.\n const actingUserId = executionContext?.initiatorIds?.userId;\n const outcome = await codingAgent.cancelApplicationCodingTask(String(row.taskId), undefined, actingUserId ? { actingUserId } : undefined);\n /*\n * The row existed a moment ago, so \"nothing to cancel\" means the run moved on meanwhile — answered,\n * cancelled or finished. Said as a refusal the gate shows, not as a success it would report as done.\n */\n if (!outcome.cancelled) {\n throw utils.errorBuilder.buildError(ErrorType.CONFLICT, executionContext, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: 'This coding run is no longer waiting: it was answered, cancelled or finished meanwhile.' },\n });\n }\n return outcome;\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/**\n * `land_facts` on a GOVERNED DOCUMENT: land the facts a person established for it as the\n * `document-facts-authored` family (#1454, Step 6). The row is the door and the body names the\n * document too; the two must agree, or a request could land facts on a document it never opened.\n * `dryRun` runs the whole pipe and writes nothing, so the person sees the exact file their answers\n * produce before anything touches the tree. The authored facts are merged BY FACT into what is\n * already landed — a partial sitting keeps every other declaration.\n */\nfunction buildGovernanceFactsLandingFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.GOVERNANCE_DOCUMENTS,\n operationIdentifier: WorkbenchGovernanceDocuments_Operations.LAND_FACTS,\n },\n requestDtoSchema: Workbench_GovernanceFactsLandingRequest_Schema,\n responseDtoSchema: Workbench_GovernanceFactsLandingOutcome_Schema,\n debugLabel: 'creation-plane.governance-documents.land-facts',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);\n const dossier = container.get<DossierCompanionService>(COMPANION_SERVICE_TYPES.DossierService);\n const companionContext = container.get<CompanionContext>(COMPANION_SERVICE_TYPES.CompanionContext);\n const rowId = String(id ?? '');\n const row = (await projection.deriveRows(WorkbenchCreationPlaneBehavior.GOVERNANCE_DOCUMENTS))\n .find((candidate) => candidate.workbenchGovernanceDocumentId === rowId);\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No governed document matches id \"${rowId}\".` },\n });\n }\n const { dryRun, ...request } = (input ?? {}) as { dryRun?: boolean; definitionRef?: string } & Record<string, unknown>;\n if (request.definitionRef !== row.definitionRef) {\n throw utils.errorBuilder.buildError(ErrorType.VALIDATION, executionContext, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `The request names document \"${String(request.definitionRef)}\" but was sent to \"${String(row.definitionRef)}\".` },\n });\n }\n const specificationsPackageRoot = companionContext.resolvedSpecifications?.packageRoot;\n if (!specificationsPackageRoot) {\n throw utils.errorBuilder.buildError(ErrorType.VALIDATION, executionContext, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'This application has no resolved specifications package, so there is nowhere to land the facts.' },\n });\n }\n try {\n /* The authored facts as LANDED, for the merge — read through the same aggregate every reader uses. */\n const current = await dossier.readAuthoredDocumentFacts();\n return await landGovernanceFactDeclarations({\n specificationsPackageRoot,\n // NEUTRAL BY CONTRACT (issue #65), same as every other landed constant — app identity lives in VALUES.\n constantPrefix: 'application',\n answers: request as unknown as GovernanceFactDeclarationInput,\n ...(current === undefined ? {} : { current }),\n ...(dryRun === true ? { dryRun: true } : {}),\n });\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n /* A landing moves the dossier, the questions and eligibility; a dry run moves nothing. */\n if (dryRun !== true) projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/**\n * `set` and `unset` on THE SECRETS SECTION (#1637): run `wildo secrets set/unset`, the one writer of a\n * secret. The value goes to the CLI on stdin (`application-secrets.companion.ts`) and is never held,\n * logged or traced here. A refusal carries the CLI's own sentence as the guidance label's `reason`\n * param, because it names the remedy (a typo, a malformed key, `gh` to install) and a 4xx context is\n * stripped before the page sees it.\n */\nfunction buildApplicationSecretChangeFactory(container: Container, operation: WorkbenchApplicationSecrets_Operations) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.APPLICATION_SECRETS,\n operationIdentifier: operation,\n },\n requestDtoSchema: operation === WorkbenchApplicationSecrets_Operations.SET ? Workbench_ApplicationSecretSetRequest_Schema : Workbench_EmptyRequest_Schema,\n responseDtoSchema: Workbench_ApplicationSecretChangeOutcome_Schema,\n debugLabel: `creation-plane.application-secrets.${operation}`,\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);\n const context = container.get<CompanionContext>(COMPANION_SERVICE_TYPES.CompanionContext);\n const target = splitApplicationSecretRowId(String(id ?? ''));\n // The CLI's sentence is the useful part (a typo'd name, a malformed key, `gh` to install), so it\n // travels as the label's `reason` param: the translated label outranks the raw explanation.\n const refuse = (explanation: string) => utils.errorBuilder.buildErrorWithGuidanceKey(ErrorType.VALIDATION, executionContext,\n CompanionErrorGuidanceKey.APPLICATION_SECRET_CHANGE_REFUSED, { explanation, params: { reason: explanation } },\n { customMessageReference: ErrorCustomMessageReference.VALIDATION, context: { message: explanation } });\n if (!target) throw refuse(`\"${String(id ?? '')}\" names no secret row.`);\n let outcome: Workbench_ApplicationSecretChangeOutcome;\n try {\n const change = operation === WorkbenchApplicationSecrets_Operations.SET\n ? await setApplicationSecret(context.saasRoot, target.envName, target.kind, target.envVarName, String((input as { value?: unknown } | undefined)?.value ?? ''))\n : await unsetApplicationSecret(context.saasRoot, target.envName, target.kind, target.envVarName);\n outcome = change.outcome;\n // The rows after the change replace the environment's rows, so the next read answers at once (#1782).\n projection.applyApplicationSecretsChange(target.envName, change.environmentRows);\n } catch (error) {\n // A failed change may have written part of it; drop the listing rather than keep one that may be wrong.\n projection.forgetApplicationSecretsListing();\n throw refuse(describeSecretsCliFailure(error));\n } finally {\n projection.invalidateDerivedBoards();\n }\n /*\n * The companion reads this key and was not restarted (`--skip-companion-restart`): restarting would end\n * this request and any run in flight. Apply it in-process from the file a restart would load, then\n * rebuild the provider registry so the next call sees it. A failure here leaves the value saved and\n * the companion on the old one until its next start, which is said rather than hidden.\n */\n if (outcome.companionAppliesChange && outcome.envFilesRegenerated) {\n try {\n applyCompanionEnvVariable(outcome.envVarName);\n await container.get<ExternalProvidersRegistryBackendService>(SAAS_SERVICE_TYPES.ExternalProvidersRegistryService).refreshFromConfig();\n } catch (error) {\n const failure = `${outcome.envVarName} is saved, but the companion could not apply it now (${describeCaughtError(error)}); `\n + 'it takes effect at the next companion start.';\n container.get<LoggerService>(SAAS_SERVICE_TYPES.Logger).warn(`[CreationPlane] ${failure}`);\n return { ...outcome, companionApplyFailure: failure };\n }\n }\n return outcome;\n },\n },\n });\n}\n\n/**\n * The factories `customImplRegistry.initialize()` consumes — companion startup passes exactly this\n * list after the workbench resources register (registrations validate against configured operation\n * paths at init, so a drifting identifier fails the boot instead of becoming unreachable code).\n */\nexport function createCreationPlaneDispatchFactories(): ResourceCustomServiceImplementationFactory[] {\n return [\n (_registry, container) => buildPlaybookRunFactory(container),\n (_registry, container) => buildPlaybookResumeFactory(container),\n (_registry, container) => buildDispatchNextFactory(container),\n (_registry, container) => buildRevertWritesFactory(container),\n (_registry, container) => buildDossierAnswerFactory(container),\n (_registry, container) => buildAddTaskFactory(container),\n (_registry, container) => buildDispatchTaskFactory(container),\n (_registry, container) => buildAcceptTaskFactory(container),\n (_registry, container) => buildAcceptRunWritesFactory(container),\n /* The verbs the workbench's bespoke companion client carried until 2026-09-22 (#1454). */\n (_registry, container) => buildPlaybookReadInterviewFactory(container),\n (_registry, container) => buildRunWriteDiffFactory(container),\n (_registry, container) => buildTraceSessionRecordFactory(container),\n (_registry, container) => buildTraceSessionUsageFactory(container),\n (_registry, container) => buildTraceArtifactFactory(container),\n (_registry, container) => buildTraceSessionsForTaskFactory(container),\n (_registry, container) => buildParkedQuestionAnswerFactory(container),\n (_registry, container) => buildCodingRunCancelFactory(container),\n (_registry, container) => buildApplicationSecretChangeFactory(container, WorkbenchApplicationSecrets_Operations.SET),\n (_registry, container) => buildApplicationSecretChangeFactory(container, WorkbenchApplicationSecrets_Operations.UNSET),\n (_registry, container) => buildGovernanceFactsLandingFactory(container),\n ];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"creation-plane-dispatch.custom-impl.companion.service.js","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,0BAA0B,EAC1B,wBAAwB,EACxB,8BAA8B,GAE/B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,qCAAqC,EAAE,MAAM,oDAAoD,CAAC;AAC3G,OAAO,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAC/G,OAAO,EACL,2BAA2B,EAC3B,SAAS,EACT,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,qCAAqC,EACrC,qCAAqC,EACrC,wCAAwC,EACxC,wCAAwC,EACxC,6CAA6C,EAC7C,yCAAyC,EACzC,6CAA6C,EAC7C,qCAAqC,EACrC,qCAAqC,EACrC,6CAA6C,EAC7C,6CAA6C,EAC7C,sCAAsC,EACtC,sCAAsC,EACtC,kCAAkC,EAClC,6BAA6B,EAC7B,6BAA6B,EAC7B,8CAA8C,EAC9C,8CAA8C,EAC9C,uCAAuC,EACvC,uCAAuC,EACvC,4CAA4C,E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ACvE,CAAC;AACJ,CAAC","sourcesContent":["import type { Container } from 'inversify';\nimport {\n BuildPlanTaskAppendError,\n GovernanceQuestionnaireError,\n INTERVIEW_ANSWER_PROPOSER_REF,\n PlaybookClarificationError,\n PlaybookElicitationError,\n landGovernanceFactDeclarations,\n type GovernanceFactDeclarationInput,\n} from '@wildo-ai/application-creation-runtime';\nimport { ApplicationCreatorInputAnswerStanding } from '@wildo-ai/saas-specifications/application-creation';\nimport { proposeInterviewAnswers } from '../../../meta-workflows/services/interview-answer-proposal.companion';\nimport {\n ErrorCustomMessageReference,\n ErrorType,\n ResourceOperationVariantType,\n} from '@wildo-ai/saas-models';\nimport {\n Workbench_AcceptChangesOutcome_Schema,\n Workbench_AcceptChangesRequest_Schema,\n Workbench_BuildPlanAddTaskOutcome_Schema,\n Workbench_BuildPlanAddTaskRequest_Schema,\n Workbench_BuildPlanDispatchNextRequest_Schema,\n Workbench_BuildPlanDispatchOutcome_Schema,\n Workbench_BuildPlanDispatchTaskRequest_Schema,\n Workbench_DossierAnswerOutcome_Schema,\n Workbench_DossierAnswerRequest_Schema,\n Workbench_DossierInterviewDepthOutcome_Schema,\n Workbench_DossierInterviewDepthRequest_Schema,\n Workbench_DossierProposeOutcome_Schema,\n Workbench_DossierProposeRequest_Schema,\n WorkbenchDossierEntries_Operations,\n WorkbenchDossierProposalScope,\n Workbench_EmptyRequest_Schema,\n Workbench_GovernanceFactsLandingOutcome_Schema,\n Workbench_GovernanceFactsLandingRequest_Schema,\n WorkbenchGovernanceDocuments_Operations,\n Workbench_CodingRunCancelOutcome_Schema,\n Workbench_ParkedQuestionAnswerOutcome_Schema,\n Workbench_ParkedQuestionAnswerRequest_Schema,\n WorkbenchParkedCodingQuestions_Operations,\n WorkbenchApplicationSecrets_Operations,\n Workbench_ApplicationSecretSetRequest_Schema,\n type Workbench_ApplicationSecretChangeOutcome,\n Workbench_ApplicationSecretChangeOutcome_Schema,\n splitApplicationSecretRowId,\n Workbench_PlaybookInterview_Schema,\n Workbench_RunWriteDiff_Schema,\n Workbench_TraceArtifact_Schema,\n Workbench_TraceArtifactRequest_Schema,\n Workbench_TraceSessionRecord_Schema,\n Workbench_TraceSessionsForTask_Schema,\n Workbench_TraceSessionsForTaskRequest_Schema,\n Workbench_TraceSessionUsage_Schema,\n WorkbenchTraceSessions_Operations,\n Workbench_PlaybookResumeRequest_Schema,\n type Workbench_PlaybookResumeRequest,\n Workbench_PlaybookRunOutcome_Schema,\n Workbench_PlaybookRunRequest_Schema,\n Workbench_RunWriteRevertOutcome_Schema,\n Workbench_RunWriteRevertRequest_Schema,\n WorkbenchBuildPlanTasks_Operations,\n WorkbenchCreationPlaneBehavior,\n WorkbenchPlaybooks_Operations,\n WorkbenchRunWriteRecords_Operations,\n WorkbenchShared_ResourceType,\n} from '@wildo-ai/platform-core-shared';\nimport {\n createResourceCustomServiceImplementation,\n describeCaughtError,\n SAAS_SERVICE_TYPES,\n type ExternalProvidersRegistryBackendService,\n type LoggerService,\n type ResourceCustomServiceImplementationFactory,\n} from '@wildo-ai/saas-backend-lib';\n\nimport { COMPANION_SERVICE_TYPES } from '../../inject/models/service-types';\nimport {\n PlaybookRunAlreadyInFlightError,\n PlaybookNotReadyError,\n UnknownPlaybookError,\n type PlaybookRunCompanionService,\n} from '../../../meta-workflows/services/playbook-run.companion.service';\nimport { SupersededPlaybookRunQuestionError, SuspendedPlaybookRunNotFoundError } from '../../../meta-workflows/models/playbook-run-checkpoint.models';\nimport { CompanionErrorGuidanceKey } from '../../../companion-api/companion-error-guidance.models';\nimport { assertCreationLanePreflight, CreationLanePreflightRefusedError } from '../../../meta-workflows/services/creation-lane-preflight.companion.service';\nimport { FoundationExecutionError } from '../../../meta-workflows/services/foundation-executor.companion.service';\nimport {\n ApplicationBuildPlanExhaustedError,\n ApplicationBuildTaskCompletedButUnlandedError,\n ApplicationBuildTaskNotReadyError,\n ApplicationBuildPlanUnavailableError,\n ApplicationBuildWaveInFlightError,\n} from '../../../meta-workflows/services/application-build-dispatch.companion.service';\nimport type { BuildPlanAuthoringCompanionService } from '../../../meta-workflows/services/build-plan-authoring.companion.service';\nimport { CodingRunWritingTheTreeError, NothingToAcceptError, type AcceptedChangeCommitCompanionService } from '../../../claude-cli/services/accepted-change-commit.companion.service';\nimport { PlaybookRunWriteRecordNotFoundError } from '../../../meta-workflows/services/playbook-run-write-register.companion.service';\nimport { ExecutionTraceNotFoundError, type ExecutionTraceReadCompanionService } from '../../../meta-workflows/services/execution-trace-read.companion.service';\nimport type { CodingAgentDispatchCompanionService } from '../../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport type { CompanionContext } from '../../context/companion-context';\nimport type { ApplicationBuildDispatchCompanionService } from '../../../meta-workflows/services/application-build-dispatch.companion.service';\nimport type { PlaybookRunWriteRegisterCompanionService } from '../../../meta-workflows/services/playbook-run-write-register.companion.service';\nimport type { DossierCompanionService } from '../../../meta-workflows/services/dossier.companion.service';\nimport { serializeDossierWrite } from '../../../meta-workflows/services/dossier-write-queue.companion.utils';\nimport {\n CreationPlaneProjectionCompanionService,\n sanitizeCreationPlaneIdentity,\n} from './creation-plane-projection.companion.service';\nimport type { CompanionTraceabilityService } from '../../traceability/companion-traceability.service';\nimport { CompanionTraceabilityLevel } from '../../traceability/companion-traceability.models';\nimport { describeSecretsCliFailure, setApplicationSecret, unsetApplicationSecret } from './application-secrets.companion';\nimport { reloadCompanionEnvVariables } from '../../runtime/companion-env-file';\nimport { MetaWorkflow_ClarificationAction } from '@wildo-ai/saas-models/meta-workflows';\n\n/**\n * The creation board's DISPATCHES as custom-operation implementations — Phase 3 of\n * `workbench-creation-board-resources.md` (plan D3).\n *\n * Every handler is `OVERRIDE_ALL`, deliberately and necessarily: the framework pipeline still runs\n * everything a dispatch WANTS from it — authentication, the role gate, request-DTO validation, the\n * `currentObject` preflight READ — and the override returns before everything a derived resource\n * CANNOT give it: the repository write the introspection adapter refuses, and the transaction\n * machinery there is nothing to transact against. The work itself is a delegation to the same\n * companion services the bespoke routes call; those routes survive for the CLI, and both doors now\n * converge on one service seam.\n *\n * ## Identity resolution is a LOOKUP, never a reverse-sanitization\n *\n * An instance-targeted dispatch arrives addressed by the row's SANITIZED id\n * (`top_down__phase-gate`). The sanitizer is not injective in general, so the handlers resolve the\n * business key by matching the sanitized form against the live rows (playbooks: the cached\n * eligibility derivation; write records: the register list) — exact, and refusing honestly when\n * nothing matches.\n *\n * ## Cache invalidation\n *\n * A run or resume that lands files already invalidates the eligibility cache through the write\n * register's mutation seam. The explicit `invalidateDerivedBoards()` after run/resume/dispatch covers\n * the outcomes that DON'T write (a refusal that consumed budget state, a clarification stop, a\n * dispatch that only started a coding run) — the board must not answer \"as of before your dispatch\"\n * to the person who just dispatched.\n */\n\n/**\n * The creation preflight at a workbench door that STARTS a run (#2229), asked of this companion's own registry\n * before anything is filed, composed or called. The board offers no way past it: every refusal names configuration\n * the operator holds (a key, a scoped provider), and fixing it is the remedy; the console's `--skip-preflight` is\n * the explicit door for a person who decides to start anyway.\n */\nfunction assertCreationLaneReadyForRun(container: Container): void {\n assertCreationLanePreflight(container.get<ExternalProvidersRegistryBackendService>(SAAS_SERVICE_TYPES.ExternalProvidersRegistryService));\n}\n\n/**\n * Translate the companion services' NAMED refusals into the transport-honest errors the bespoke\n * routes answer — mirroring the controller's own mapping, so a refusal reads the same through both\n * doors. Anything unnamed propagates untouched and surfaces as the 500 it is.\n *\n * The controller maps almost all of these to VALIDATION (400) with the message carried verbatim —\n * a refusal from this plane is nearly always actionable (\"no ready build-plan task\", \"no suspended\n * run\") — and the one genuinely stateful collision (a loop already holding the lane) to CONFLICT.\n */\nexport function translateCreationPlaneDispatchError(\n error: unknown,\n executionContext: unknown,\n utils: { errorBuilder: { buildError: (...args: never[]) => unknown } },\n): unknown {\n /*\n * Called THROUGH the builder object, never extracted: `buildError` reads `this` internally\n * (`executeBackendActions`), and a detached reference throws `Cannot read properties of\n * undefined` from inside the error path — measured live, an error builder failing to build the\n * error it was translating.\n */\n const builder = utils.errorBuilder as unknown as {\n buildError: (\n type: ErrorType,\n ctx: unknown,\n params: { customMessageReference: ErrorCustomMessageReference; context: { message: string } },\n ) => unknown;\n buildErrorWithGuidanceKey: (\n type: ErrorType,\n ctx: unknown,\n guidanceKey: string,\n guidance: { explanation: string },\n params: { customMessageReference: ErrorCustomMessageReference; context: { message: string } },\n ) => unknown;\n };\n /*\n * No run is waiting under that id — answered, cancelled, or never held here: a missing resource, 404\n * (#1584). Its words travel as GUIDANCE: the client sanitizer strips a 404's context, so a sentence left\n * there would never reach the person (`CompanionErrorGuidanceKey`).\n */\n if (error instanceof SuspendedPlaybookRunNotFoundError) {\n return builder.buildErrorWithGuidanceKey(ErrorType.NOT_FOUND, executionContext,\n CompanionErrorGuidanceKey.SUSPENDED_PLAYBOOK_RUN_NOT_WAITING, { explanation: error.message },\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { message: error.message } });\n }\n /*\n * Caught on the BASE class, so a refused CHOREOGRAPHY answers 409 here exactly as a refused loop\n * does. The workbench dispatches composites through this door; catching only the loop subclass\n * would have sent a creator's second market analysis back as a validation-shaped 500.\n */\n if (\n error instanceof PlaybookRunAlreadyInFlightError\n /* A named task that is landed, blocked or unknown (#1454, Step 7): the STATE forbids the run, not the payload. */\n || error instanceof ApplicationBuildTaskNotReadyError\n /* The run is waiting, on a later round than the one answered (#1584). */\n || error instanceof SupersededPlaybookRunQuestionError\n /* A person's accept while a coding worker writes the same tree: the moment is wrong, not the request. */\n || error instanceof CodingRunWritingTheTreeError\n /* A build wave while one already runs (#2243): wait for it, then start the next. */\n || error instanceof ApplicationBuildWaveInFlightError\n /* The lane's providers would be refused (#2229): the configuration forbids the run, not the request. */\n || error instanceof CreationLanePreflightRefusedError\n ) {\n return builder.buildError(ErrorType.CONFLICT, executionContext, {\n customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_VALIDATION_FAILED,\n context: { message: error.message },\n });\n }\n if (\n error instanceof UnknownPlaybookError\n || error instanceof PlaybookNotReadyError\n /* A declared interview missing an answer — found live: `run(domain-plan)` without `tenancy`. */\n || error instanceof PlaybookElicitationError\n || error instanceof PlaybookClarificationError\n || error instanceof FoundationExecutionError\n || error instanceof ApplicationBuildPlanUnavailableError\n || error instanceof ApplicationBuildPlanExhaustedError\n /*\n * Carries the agent's own question when a ready task is parked. Without it the board's dispatch\n * answered a sanitized 500 \"internal\" for a state the operator can actually resolve.\n */\n || error instanceof ApplicationBuildTaskCompletedButUnlandedError\n || error instanceof PlaybookRunWriteRecordNotFoundError\n /* A task that cannot join the plan, and a run with nothing acceptable — both name what to change (#1454, Step 7). */\n || error instanceof BuildPlanTaskAppendError\n || error instanceof NothingToAcceptError\n /* A missing trace is a bad request, not a broken host — the same reading the companion's trace routes make. */\n || error instanceof ExecutionTraceNotFoundError\n /*\n * A refusal on governance ANSWERS names what the person got wrong (an unanswered question, a review\n * with no reviewer, \"does not apply\" on a question that does not offer it); left untranslated it was\n * a 500 saying \"internal\" — measured 2026-09-03 on the route this verb replaced.\n */\n || error instanceof GovernanceQuestionnaireError\n ) {\n return builder.buildError(ErrorType.VALIDATION, executionContext, {\n customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_VALIDATION_FAILED,\n context: { message: error.message },\n });\n }\n return undefined;\n}\n\nconst CREATION_PLANE_DISPATCH_PATH_BASE = {\n variantType: ResourceOperationVariantType.API_CALL,\n isOperationDefault: true,\n} as const;\n\n/**\n * Open a trace session for one board dispatch — the parity the bespoke routes get from\n * `attachRequestTraceSession` middleware, which the resource lane bypasses (the engine's controller\n * mounts these operations, so no companion middleware runs). Without it a dispatched run has no\n * trace directory, a `run-` prefixed runId (the `session?.sessionId ?? 'run'` fallback), and a\n * null `workbenchTraceSessionId` join key on its write record — issue #238, measured live.\n *\n * Opening is unconditional and cheap: session factories do no disk I/O until the first event or\n * artifact that passes the level gate, so an untraced deployment pays nothing.\n */\nfunction openDispatchTraceSession(container: Container, routePath: string) {\n const traceability = container.get<CompanionTraceabilityService>(\n COMPANION_SERVICE_TYPES.TraceabilityService,\n );\n const session = traceability.createApiRequestSession({\n method: 'put',\n routePath,\n urlPath: routePath,\n // ip/userAgent are genuinely unavailable here: the resource lane's handlers never see the\n // Express request. Everything else matches the middleware's bookkeeping.\n });\n // Middleware parity (completion-review finding 11b): the bespoke routes bookend each request\n // with start/finish events; the dispatch lane emits the same pair so a session dir reads the\n // same either way. Fire-and-forget like the middleware's own emits.\n void traceability.traceEvent({\n session,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-start',\n summary: `Start PUT ${routePath}`,\n payload: { method: 'PUT', url: routePath },\n });\n return session;\n}\n\n/**\n * Run a dispatch handler's work UNDER its trace session, so everything it starts — a detached run,\n * a model call whose caller named no session — is attributed to it. The middleware does the same for\n * the bespoke routes; this lane bypasses the middleware, so it enters the session itself (#1264).\n */\nfunction inDispatchTraceSession<T>(\n container: Container,\n session: ReturnType<CompanionTraceabilityService['createApiRequestSession']>,\n work: () => Promise<T>,\n): Promise<T> {\n return container.get<CompanionTraceabilityService>(COMPANION_SERVICE_TYPES.TraceabilityService).runWithActiveSession(session, work);\n}\n\n/** The finish half of the bookend pair — called from each dispatch handler's `finally`. */\nfunction closeDispatchTraceSession(\n container: Container,\n session: ReturnType<CompanionTraceabilityService['createApiRequestSession']>,\n routePath: string,\n outcome: 'success' | 'error',\n): void {\n const traceability = container.get<CompanionTraceabilityService>(\n COMPANION_SERVICE_TYPES.TraceabilityService,\n );\n void traceability.traceEvent({\n session,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-finish',\n summary: `Finish PUT ${routePath} (${outcome})`,\n payload: { method: 'PUT', url: routePath, outcome },\n });\n}\n\nfunction buildPlaybookRunFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.PLAYBOOKS,\n operationIdentifier: WorkbenchPlaybooks_Operations.RUN,\n },\n requestDtoSchema: Workbench_PlaybookRunRequest_Schema,\n responseDtoSchema: Workbench_PlaybookRunOutcome_Schema,\n debugLabel: 'creation-plane.playbooks.run',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const playbookRunService = container.get<PlaybookRunCompanionService>(\n COMPANION_SERVICE_TYPES.PlaybookRunService,\n );\n const rowId = String(id ?? '');\n const rows = await projection.deriveRows(WorkbenchCreationPlaneBehavior.PLAYBOOK_ELIGIBILITY);\n const row = rows.find((candidate) => candidate.workbenchPlaybookId === rowId);\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No playbook row matches id \"${rowId}\".` },\n });\n }\n const request = (input ?? {}) as {\n creatorBrief?: string;\n elicitationAnswers?: readonly { questionRef: string; answer: string }[];\n dryRun?: boolean;\n instanceKey?: string;\n };\n /*\n * The Run gate's answers to questions the dossier still needed are FILED before the run\n * (#1454 review, LOW): until then they reached this one run and nowhere else, so the next run\n * asked again and the dossier said \"still needed\" about a step that had run. Filed first, so an\n * answer the dossier refuses (a choice outside its options) refuses the run before it spends,\n * with the same sentence the dossier's own Answer gives. Overrides of answered questions stay\n * overrides (`fileStillNeededAnswers`); a dry run files nothing; with no signed-in person there\n * is nobody to record an answer against, so the answers ride this run only, as before.\n */\n // Before the answers are filed: a run that cannot start must not leave a dossier change behind (#2229).\n try {\n assertCreationLaneReadyForRun(container);\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n const answeredByRef = executionContext?.initiatorIds?.userId;\n if (request.elicitationAnswers?.length && !request.dryRun && answeredByRef) {\n const dossier = container.get<DossierCompanionService>(COMPANION_SERVICE_TYPES.DossierService);\n try {\n await dossier.fileStillNeededAnswers({\n playbookRef: String(row.playbookRef),\n ...(request.instanceKey ? { instanceKey: request.instanceKey } : {}),\n answers: request.elicitationAnswers,\n answeredByRef,\n });\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n }\n const runRoute = `/workbench-playbooks/${rowId}/run`;\n const session = openDispatchTraceSession(container, runRoute);\n let outcome: 'success' | 'error' = 'error';\n try {\n const result = await inDispatchTraceSession(container, session, () => playbookRunService.runPlaybook({\n playbookRef: String(row.playbookRef),\n session,\n // The signed-in person starting it (#1751): a question the run asks is routed to them.\n ...(answeredByRef ? { requestedByUserId: answeredByRef } : {}),\n ...(request.instanceKey ? { instanceKey: request.instanceKey } : {}),\n ...(request.creatorBrief ? { creatorBrief: request.creatorBrief } : {}),\n ...(request.elicitationAnswers?.length ? { elicitationAnswers: request.elicitationAnswers } : {}),\n ...(request.dryRun ? { dryRun: true } : {}),\n }));\n outcome = 'success';\n return result;\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n projection.invalidateDerivedBoards();\n closeDispatchTraceSession(container, session, runRoute, outcome);\n }\n },\n },\n });\n}\n\nfunction buildPlaybookResumeFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.PLAYBOOKS,\n operationIdentifier: WorkbenchPlaybooks_Operations.RESUME,\n },\n requestDtoSchema: Workbench_PlaybookResumeRequest_Schema,\n responseDtoSchema: Workbench_PlaybookRunOutcome_Schema,\n debugLabel: 'creation-plane.playbooks.resume',\n handlers: {\n overrideAll: async (_id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const playbookRunService = container.get<PlaybookRunCompanionService>(\n COMPANION_SERVICE_TYPES.PlaybookRunService,\n );\n // Typed by the request DTO (#1785): `action` is the one clarification vocabulary, re-checked below.\n const request = (input ?? {}) as Partial<Workbench_PlaybookResumeRequest>;\n const action = Object.values(MetaWorkflow_ClarificationAction)\n .find((candidate) => candidate === request.action);\n const round = request.round;\n if (!action || !request.runId || typeof round !== 'number' || !Number.isInteger(round) || round < 1) {\n throw utils.errorBuilder.buildError(ErrorType.VALIDATION, executionContext, {\n customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_VALIDATION_FAILED,\n context: {\n message: !request.runId\n ? '`runId` is required — it is the handle `run` returned when the derivation stopped to ask.'\n : !action\n ? `Unknown action \\`${request.action}\\`. Expected one of: ${Object.values(MetaWorkflow_ClarificationAction).join(', ')}.`\n : '`round` is required — the round of questions this answers, as the waiting run carries it.',\n },\n });\n }\n /*\n * \"I answered\" and \"you decide\" produce different artifacts, so an empty accept is refused\n * rather than treated as a decline — mirroring the companion route's own contract.\n */\n if (action === MetaWorkflow_ClarificationAction.ACCEPT && !(request.answers?.length)) {\n throw utils.errorBuilder.buildError(ErrorType.VALIDATION, executionContext, {\n customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_VALIDATION_FAILED,\n context: { message: '`accept` requires at least one answer.' },\n });\n }\n // Held as a const: the narrowing above does not survive into the closure the session runs.\n const runId = request.runId;\n const resumeRoute = '/workbench-playbooks/resume-run';\n const session = openDispatchTraceSession(container, resumeRoute);\n let outcome: 'success' | 'error' = 'error';\n try {\n /* The signed-in person, as the dossier records it — so DECISIONS.md says who answered from either door (#1658). */\n const answeredByRef = executionContext?.initiatorIds?.userId;\n const result = await inDispatchTraceSession(container, session, () => playbookRunService.resumePlaybookRun({\n runId,\n round,\n action,\n session,\n ...(request.answers?.length ? { answers: request.answers } : {}),\n // The same person, as the decision's actor (#1751): a question routed elsewhere refuses them.\n ...(answeredByRef ? { answeredByRef, actingUserId: answeredByRef } : {}),\n }));\n outcome = 'success';\n return result;\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n projection.invalidateDerivedBoards();\n closeDispatchTraceSession(container, session, resumeRoute, outcome);\n }\n },\n },\n });\n}\n\nfunction buildDispatchNextFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS,\n operationIdentifier: WorkbenchBuildPlanTasks_Operations.DISPATCH_NEXT,\n },\n requestDtoSchema: Workbench_BuildPlanDispatchNextRequest_Schema,\n responseDtoSchema: Workbench_BuildPlanDispatchOutcome_Schema,\n debugLabel: 'creation-plane.build-plan.dispatch-next',\n handlers: {\n overrideAll: async (_id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const buildDispatchService = container.get<ApplicationBuildDispatchCompanionService>(\n COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService,\n );\n const playbookRunService = container.get<PlaybookRunCompanionService>(COMPANION_SERVICE_TYPES.PlaybookRunService);\n try {\n assertCreationLaneReadyForRun(container);\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n const dispatchRoute = '/workbench-build-plan-tasks/dispatch-next';\n const session = openDispatchTraceSession(container, dispatchRoute);\n let outcome: 'success' | 'error' = 'error';\n try {\n /*\n * A PARALLEL BUILD by default (#2243), as the console's `wildo build run` (#2208): with a build\n * parallelism above one this starts a wave through the same door — refusing first exactly as the\n * one-task dispatch refuses, and refusing a second wave — and answers at submission with the wave.\n * `single: true`, or a parallelism of one, runs the next ready task alone, as before.\n */\n const wave = (input as { single?: boolean } | undefined)?.single === true\n ? undefined\n : await inDispatchTraceSession(container, session, () => playbookRunService.submitBuildWaveDetached(session));\n if (wave !== undefined) {\n outcome = 'success';\n return {\n wave,\n note: `Running a build wave of up to ${wave.degree} tasks at once. Each run appears on the board as it starts and settles.`,\n };\n }\n const result = await inDispatchTraceSession(container, session, () => buildDispatchService.dispatchNextBuildTask(session));\n outcome = 'success';\n return result;\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n projection.invalidateDerivedBoards();\n closeDispatchTraceSession(container, session, dispatchRoute, outcome);\n }\n },\n },\n });\n}\n\nfunction buildRevertWritesFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.RUN_WRITE_RECORDS,\n operationIdentifier: WorkbenchRunWriteRecords_Operations.REVERT,\n },\n requestDtoSchema: Workbench_RunWriteRevertRequest_Schema,\n responseDtoSchema: Workbench_RunWriteRevertOutcome_Schema,\n debugLabel: 'creation-plane.run-writes.revert',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const runWriteRegister = container.get<PlaybookRunWriteRegisterCompanionService>(\n COMPANION_SERVICE_TYPES.PlaybookRunWriteRegisterService,\n );\n const rowId = String(id ?? '');\n const records = await runWriteRegister.list();\n const record = records.find(\n (candidate) => sanitizeCreationPlaneIdentity(candidate.runId) === rowId,\n );\n if (!record) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No write record matches id \"${rowId}\".` },\n });\n }\n const request = (input ?? {}) as { force?: boolean };\n try {\n // The register's own mutation seam invalidates the eligibility cache on a landed revert.\n return await runWriteRegister.revert(record.runId, { force: request.force === true });\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/** The dossier row an operation is anchored on, or undefined — ONE lookup for the three dossier verbs, so they agree on which rows exist. */\nasync function findDossierRow(projection: CreationPlaneProjectionCompanionService, rowId: string): Promise<Record<string, unknown> | undefined> {\n const rows = await projection.deriveRows(WorkbenchCreationPlaneBehavior.DOSSIER_ENTRIES);\n return rows.find((candidate) => candidate.workbenchDossierEntryId === rowId);\n}\n\n/**\n * PROPOSE answers for the step a dossier row belongs to (#2129) — the workbench's door to the SAME proposer the\n * console uses (`proposeInterviewAnswers`), so a proposal reads the same in both. Writes nothing; each proposal\n * names the row it answers, so a kept one is sent through ANSWER with `assumed`.\n */\nfunction buildDossierProposeFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.DOSSIER_ENTRIES,\n operationIdentifier: WorkbenchDossierEntries_Operations.PROPOSE_ANSWERS,\n },\n requestDtoSchema: Workbench_DossierProposeRequest_Schema,\n responseDtoSchema: Workbench_DossierProposeOutcome_Schema,\n debugLabel: 'creation-plane.dossier-entries.propose-answers',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);\n const dossier = container.get<DossierCompanionService>(COMPANION_SERVICE_TYPES.DossierService);\n const runs = container.get<PlaybookRunCompanionService>(COMPANION_SERVICE_TYPES.PlaybookRunService);\n const row = await findDossierRow(projection, String(id ?? ''));\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No dossier question matches id \"${String(id ?? '')}\".` },\n });\n }\n const request = Workbench_DossierProposeRequest_Schema.parse(input ?? {});\n const instanceKey = typeof row.instanceKey === 'string' ? row.instanceKey : undefined;\n try {\n const result = await proposeInterviewAnswers(runs.interviewAnswerProposalPorts(), {\n playbookRef: String(row.playbookRef),\n ...(instanceKey !== undefined ? { instanceKey } : {}),\n ...(request.scope === WorkbenchDossierProposalScope.THIS_QUESTION ? { questionRefs: [String(row.questionRef)] } : {}),\n });\n /* Each proposal names the row it answers: the step's (or this instance's) row for that question. */\n const rows = await projection.deriveRows(WorkbenchCreationPlaneBehavior.DOSSIER_ENTRIES);\n const rowIdOf = (questionRef: string): string | undefined => rows.find((candidate) => candidate.playbookRef === row.playbookRef\n && candidate.questionRef === questionRef && candidate.instanceKey === (instanceKey ?? null))?.workbenchDossierEntryId as string | undefined;\n /*\n * A proposal whose row this interview cannot show (the question moved under a shared decision's owner,\n * or the dossier changed meanwhile) is handed back as UNPROPOSED, never dropped: a dropped one would\n * leave its question in the review step, proposed and dropped again on every attempt.\n */\n const mapped = result.proposals.map((proposal) => ({ proposal, workbenchDossierEntryId: rowIdOf(proposal.questionRef) }));\n return {\n proposals: mapped.flatMap(({ proposal, workbenchDossierEntryId }) => (workbenchDossierEntryId === undefined ? [] : [{ ...proposal, workbenchDossierEntryId }])),\n unproposed: [\n ...result.unproposed,\n ...mapped.filter(({ workbenchDossierEntryId }) => workbenchDossierEntryId === undefined)\n .map(({ proposal }) => ({ questionRef: proposal.questionRef, reason: 'This interview does not show that question; answer it where it is asked.' })),\n ],\n };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/** Choose how deep this application's interviews go (#2129): one dossier write, from the interview where it was asked. */\nfunction buildDossierInterviewDepthFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.DOSSIER_ENTRIES,\n operationIdentifier: WorkbenchDossierEntries_Operations.SET_INTERVIEW_DEPTH,\n },\n requestDtoSchema: Workbench_DossierInterviewDepthRequest_Schema,\n responseDtoSchema: Workbench_DossierInterviewDepthOutcome_Schema,\n debugLabel: 'creation-plane.dossier-entries.set-interview-depth',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);\n const dossier = container.get<DossierCompanionService>(COMPANION_SERVICE_TYPES.DossierService);\n const row = await findDossierRow(projection, String(id ?? ''));\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No dossier question matches id \"${String(id ?? '')}\".` },\n });\n }\n const request = Workbench_DossierInterviewDepthRequest_Schema.parse(input ?? {});\n try {\n return await dossier.recordInterviewDepth(request.interviewDepth);\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n /* Every row carries the depth, and a simple interview asks fewer of them: the boards move. */\n projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/**\n * `answer` on the DOSSIER (#1454, Step 5): record the creator's answer to the question this row IS.\n *\n * The row carries the playbook and question refs — resolved from the projection rather than\n * un-sanitized from the id, since sanitization is not injective — and the body carries only the\n * value. The provenance (`answeredByRef`) is the caller's own identity from the execution context,\n * never a field of the request: a person cannot file an answer as somebody else. A refused answer\n * (unknown question, a choice outside its options, an ambiguous yes/no) is a `PlaybookElicitationError`\n * and answers 400 with its sentence intact, through the same translation the run door uses.\n */\nfunction buildDossierAnswerFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.DOSSIER_ENTRIES,\n operationIdentifier: WorkbenchDossierEntries_Operations.ANSWER,\n },\n requestDtoSchema: Workbench_DossierAnswerRequest_Schema,\n responseDtoSchema: Workbench_DossierAnswerOutcome_Schema,\n debugLabel: 'creation-plane.dossier-entries.answer',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const dossier = container.get<DossierCompanionService>(\n COMPANION_SERVICE_TYPES.DossierService,\n );\n const rowId = String(id ?? '');\n const row = await findDossierRow(projection, rowId);\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No dossier question matches id \"${rowId}\".` },\n });\n }\n const answeredByRef = executionContext?.initiatorIds?.userId;\n if (!answeredByRef) {\n // Fail closed on provenance: an answer nobody is recorded as giving is not an answer.\n throw utils.errorBuilder.buildError(ErrorType.AUTHENTICATION, executionContext, {\n customMessageReference: ErrorCustomMessageReference.AUTHENTICATION,\n context: { message: 'Answering a dossier question needs a signed-in person to record it against.' },\n });\n }\n const request = (input ?? {}) as { value?: string; assumed?: boolean; assumptionRationale?: string };\n try {\n const result = await dossier.recordAnswer({\n playbookRef: String(row.playbookRef),\n questionRef: String(row.questionRef),\n /* An instance's row files the instance's own answer (#1609); the step's row files the step's. */\n ...(typeof row.instanceKey === 'string' ? { instanceKey: row.instanceKey } : {}),\n value: String(request.value ?? ''),\n /*\n * A kept proposal (#2129) is the PROPOSER's answer, assumed: the signed-in person let it stand, they\n * did not decide it. The person is still required above — someone must have been there to keep it.\n */\n answeredByRef: request.assumed === true ? INTERVIEW_ANSWER_PROPOSER_REF : answeredByRef,\n ...(request.assumed === true ? { standing: ApplicationCreatorInputAnswerStanding.ASSUMED } : {}),\n ...(request.assumptionRationale !== undefined ? { assumptionRationale: request.assumptionRationale } : {}),\n });\n return {\n value: result.answer.value,\n answeredAt: result.answer.answeredAt,\n packageRelativePath: result.packageRelativePath,\n unansweredQuestionRefs: [...result.unansweredQuestionRefs],\n };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n /* The answer moves eligibility (a fully answered interview is runnable unattended) and the dossier itself. */\n projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/**\n * ADD a task to the build plan (#1454, Step 7). Collection-level, deterministic, no trace session:\n * nothing runs, a file is re-rendered. The task's shape is parsed against the real\n * `BuildPlanTaskSchema` inside the runtime append, which is why the request crosses as records.\n */\nfunction buildAddTaskFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS,\n operationIdentifier: WorkbenchBuildPlanTasks_Operations.ADD_TASK,\n },\n requestDtoSchema: Workbench_BuildPlanAddTaskRequest_Schema,\n responseDtoSchema: Workbench_BuildPlanAddTaskOutcome_Schema,\n debugLabel: 'creation-plane.build-plan.add-task',\n handlers: {\n overrideAll: async (_id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const authoring = container.get<BuildPlanAuthoringCompanionService>(\n COMPANION_SERVICE_TYPES.BuildPlanAuthoringService,\n );\n const request = (input ?? {}) as Parameters<BuildPlanAuthoringCompanionService['addTask']>[0]['task'];\n try {\n /*\n * The person who asked, as the dossier records an answerer (#1608). A request reaching this door without\n * a signed-in person is still a request, so it is recorded as the creator's rather than left unmarked,\n * which would let the next decomposition drop it.\n */\n const landed = await authoring.addTask({ task: request, requestedBy: executionContext?.initiatorIds?.userId ?? 'creator' });\n return {\n taskRef: landed.task.taskRef,\n createdPlan: landed.createdPlan,\n advisoryFindings: landed.advisoryFindings.map((finding) => ({ code: String(finding.code), taskRef: finding.taskRef, message: finding.message })),\n packageRelativePath: landed.packageRelativePath,\n taskCount: landed.graph.tasks.length,\n };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n /* The plan moved: the task list, the next-task projection and the outcomes all read it. */\n projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/**\n * RUN THIS task (#1454, Step 7): `dispatch_next`'s door, by row. The row is the build-plan task;\n * the body may name the conversation the dispatch came from, which the run's row then carries.\n */\nfunction buildDispatchTaskFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS,\n operationIdentifier: WorkbenchBuildPlanTasks_Operations.DISPATCH_TASK,\n },\n requestDtoSchema: Workbench_BuildPlanDispatchTaskRequest_Schema,\n responseDtoSchema: Workbench_BuildPlanDispatchOutcome_Schema,\n debugLabel: 'creation-plane.build-plan.dispatch-task',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const buildDispatchService = container.get<ApplicationBuildDispatchCompanionService>(\n COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService,\n );\n const rowId = String(id ?? '');\n const rows = await projection.deriveRows(WorkbenchCreationPlaneBehavior.BUILD_PLAN_TASKS);\n const row = rows.find((candidate) => candidate.workbenchBuildPlanTaskId === rowId);\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No build-plan task matches id \"${rowId}\".` },\n });\n }\n try {\n assertCreationLaneReadyForRun(container);\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n const request = (input ?? {}) as { conversationId?: string };\n const dispatchRoute = `/workbench-build-plan-tasks/${rowId}/dispatch-task`;\n const session = openDispatchTraceSession(container, dispatchRoute);\n let outcome: 'success' | 'error' = 'error';\n try {\n const result = await inDispatchTraceSession(container, session, () => buildDispatchService.dispatchBuildTask(\n String(row.taskRef),\n session,\n request.conversationId ? { conversationId: request.conversationId } : undefined,\n ));\n outcome = 'success';\n return result;\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n projection.invalidateDerivedBoards();\n closeDispatchTraceSession(container, session, dispatchRoute, outcome);\n }\n },\n },\n });\n}\n\n/** ACCEPT a task's latest coding run: commit exactly what its register names (#1454, Step 7). */\nfunction buildAcceptTaskFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS,\n operationIdentifier: WorkbenchBuildPlanTasks_Operations.ACCEPT,\n },\n requestDtoSchema: Workbench_AcceptChangesRequest_Schema,\n responseDtoSchema: Workbench_AcceptChangesOutcome_Schema,\n debugLabel: 'creation-plane.build-plan.accept',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const accept = container.get<AcceptedChangeCommitCompanionService>(\n COMPANION_SERVICE_TYPES.AcceptedChangeCommitService,\n );\n const rowId = String(id ?? '');\n const rows = await projection.deriveRows(WorkbenchCreationPlaneBehavior.BUILD_PLAN_TASKS);\n const row = rows.find((candidate) => candidate.workbenchBuildPlanTaskId === rowId);\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No build-plan task matches id \"${rowId}\".` },\n });\n }\n const request = (input ?? {}) as { force?: boolean };\n try {\n const outcome = await accept.acceptCodingRun({\n taskRef: String(row.taskRef),\n subject: String(row.objective),\n ...(request.force === true ? { force: true } : {}),\n });\n return { ...outcome, commitSha: outcome.commitSha ?? undefined };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n /* A commit LANDS the task: status, the next-task projection and the dispatch rows all move. */\n projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/** ACCEPT a playbook run's writes: commit exactly what its register names (#1454, Step 7). */\nfunction buildAcceptRunWritesFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.RUN_WRITE_RECORDS,\n operationIdentifier: WorkbenchRunWriteRecords_Operations.ACCEPT,\n },\n requestDtoSchema: Workbench_AcceptChangesRequest_Schema,\n responseDtoSchema: Workbench_AcceptChangesOutcome_Schema,\n debugLabel: 'creation-plane.run-write-records.accept',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(\n COMPANION_SERVICE_TYPES.CreationPlaneProjectionService,\n );\n const accept = container.get<AcceptedChangeCommitCompanionService>(\n COMPANION_SERVICE_TYPES.AcceptedChangeCommitService,\n );\n const rowId = String(id ?? '');\n const rows = await projection.deriveRows(WorkbenchCreationPlaneBehavior.RUN_WRITE_RECORDS);\n const row = rows.find((candidate) => candidate.workbenchRunWriteRecordId === rowId);\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No run write record matches id \"${rowId}\".` },\n });\n }\n const request = (input ?? {}) as { force?: boolean };\n try {\n const outcome = await accept.acceptPlaybookRun({ runId: String(row.runId), ...(request.force === true ? { force: true } : {}) });\n return { ...outcome, commitSha: outcome.commitSha ?? undefined };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/**\n * A row's TRACE SESSION, from its sanitized identity. Identities are sanitized business keys, so the\n * session is found by sanitizing the candidates, never by un-sanitizing the request — the same rule\n * the projection's addressed READ applies.\n */\nasync function resolveTraceSessionId(\n traces: ExecutionTraceReadCompanionService,\n rowId: string,\n executionContext: unknown,\n utils: { errorBuilder: { buildError: (...args: never[]) => unknown } },\n): Promise<string> {\n const sessionId = (await traces.listSessionIds()).find((candidate) => sanitizeCreationPlaneIdentity(candidate) === rowId);\n if (sessionId === undefined) {\n throw (utils.errorBuilder as unknown as { buildError: (type: ErrorType, ctx: unknown, params: unknown) => unknown }).buildError(\n ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No trace session matches id \"${rowId}\".` },\n },\n ) as Error;\n }\n return sessionId;\n}\n\n/**\n * `read_interview` on a PLAYBOOK: what it asks a person before it runs, as a decision payload —\n * `null` for a playbook with no interview, so a caller may ask unconditionally rather than first\n * deciding from `requiresElicitation` whether the question is worth asking.\n */\nfunction buildPlaybookReadInterviewFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.PLAYBOOKS,\n operationIdentifier: WorkbenchPlaybooks_Operations.READ_INTERVIEW,\n },\n requestDtoSchema: Workbench_EmptyRequest_Schema,\n responseDtoSchema: Workbench_PlaybookInterview_Schema,\n debugLabel: 'creation-plane.playbooks.read-interview',\n handlers: {\n overrideAll: async (id, _input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);\n const playbookRunService = container.get<PlaybookRunCompanionService>(COMPANION_SERVICE_TYPES.PlaybookRunService);\n const rowId = String(id ?? '');\n const row = (await projection.deriveRows(WorkbenchCreationPlaneBehavior.PLAYBOOK_ELIGIBILITY))\n .find((candidate) => candidate.workbenchPlaybookId === rowId);\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No playbook row matches id \"${rowId}\".` },\n });\n }\n try {\n const decision = await playbookRunService.readPlaybookElicitationDecision(String(row.playbookRef));\n return { decision: decision ?? null };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/** `read_diff` on a WRITE RECORD: what the run changed, per file, from the register's own pre/post content. */\nfunction buildRunWriteDiffFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.RUN_WRITE_RECORDS,\n operationIdentifier: WorkbenchRunWriteRecords_Operations.READ_DIFF,\n },\n requestDtoSchema: Workbench_EmptyRequest_Schema,\n responseDtoSchema: Workbench_RunWriteDiff_Schema,\n debugLabel: 'creation-plane.run-writes.read-diff',\n handlers: {\n overrideAll: async (id, _input, executionContext, _operationPath, utils) => {\n const runWriteRegister = container.get<PlaybookRunWriteRegisterCompanionService>(COMPANION_SERVICE_TYPES.PlaybookRunWriteRegisterService);\n const rowId = String(id ?? '');\n const record = (await runWriteRegister.list()).find((candidate) => sanitizeCreationPlaneIdentity(candidate.runId) === rowId);\n if (!record) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No write record matches id \"${rowId}\".` },\n });\n }\n try {\n return await runWriteRegister.describeRunDiff(record.runId);\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/** `read_record` on a TRACE SESSION: every event in order and the step artifacts by name (#1328). */\nfunction buildTraceSessionRecordFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.TRACE_SESSIONS,\n operationIdentifier: WorkbenchTraceSessions_Operations.READ_RECORD,\n },\n requestDtoSchema: Workbench_EmptyRequest_Schema,\n responseDtoSchema: Workbench_TraceSessionRecord_Schema,\n debugLabel: 'creation-plane.trace-sessions.read-record',\n handlers: {\n overrideAll: async (id, _input, executionContext, _operationPath, utils) => {\n const traces = container.get<ExecutionTraceReadCompanionService>(COMPANION_SERVICE_TYPES.ExecutionTraceReadService);\n const sessionId = await resolveTraceSessionId(traces, String(id ?? ''), executionContext, utils);\n try {\n return await traces.readSession(sessionId);\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/** `read_usage` on a TRACE SESSION: what it spent, in tokens — summed from the usage already in its events (#1274). */\nfunction buildTraceSessionUsageFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.TRACE_SESSIONS,\n operationIdentifier: WorkbenchTraceSessions_Operations.READ_USAGE,\n },\n requestDtoSchema: Workbench_EmptyRequest_Schema,\n responseDtoSchema: Workbench_TraceSessionUsage_Schema,\n debugLabel: 'creation-plane.trace-sessions.read-usage',\n handlers: {\n overrideAll: async (id, _input, executionContext, _operationPath, utils) => {\n const traces = container.get<ExecutionTraceReadCompanionService>(COMPANION_SERVICE_TYPES.ExecutionTraceReadService);\n const sessionId = await resolveTraceSessionId(traces, String(id ?? ''), executionContext, utils);\n try {\n return await traces.summarizeSessionUsage(sessionId);\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/** `read_artifact` on a TRACE SESSION: one step artifact's body, verbatim (#1329). */\nfunction buildTraceArtifactFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.TRACE_SESSIONS,\n operationIdentifier: WorkbenchTraceSessions_Operations.READ_ARTIFACT,\n },\n requestDtoSchema: Workbench_TraceArtifactRequest_Schema,\n responseDtoSchema: Workbench_TraceArtifact_Schema,\n debugLabel: 'creation-plane.trace-sessions.read-artifact',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const traces = container.get<ExecutionTraceReadCompanionService>(COMPANION_SERVICE_TYPES.ExecutionTraceReadService);\n const sessionId = await resolveTraceSessionId(traces, String(id ?? ''), executionContext, utils);\n const request = (input ?? {}) as { stepDirName?: string; fileName?: string };\n try {\n return { body: await traces.readArtifact(sessionId, String(request.stepDirName ?? ''), String(request.fileName ?? '')) };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/** `list_for_task` on TRACE SESSIONS: the sessions one actor task ran in, latest first — the coding lane's alias (#1328). */\nfunction buildTraceSessionsForTaskFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.TRACE_SESSIONS,\n operationIdentifier: WorkbenchTraceSessions_Operations.LIST_FOR_TASK,\n },\n requestDtoSchema: Workbench_TraceSessionsForTaskRequest_Schema,\n responseDtoSchema: Workbench_TraceSessionsForTask_Schema,\n debugLabel: 'creation-plane.trace-sessions.list-for-task',\n handlers: {\n overrideAll: async (_id, input, executionContext, _operationPath, utils) => {\n const traces = container.get<ExecutionTraceReadCompanionService>(COMPANION_SERVICE_TYPES.ExecutionTraceReadService);\n const request = (input ?? {}) as { taskId?: string };\n try {\n return { sessionIds: [...await traces.listActorTaskSessionIds(String(request.taskId ?? ''))] };\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n }\n },\n },\n });\n}\n\n/**\n * `answer` on a PARKED CODING QUESTION: resume the same agent session with the operator's answer.\n * ONE door since #1359 — the parked run is an actor-system execution waiting on a decision, so\n * answering it is the same call whether this process parked it or a previous one did; the lane\n * refuses (409) when nothing answerable waits under the task.\n */\nfunction buildParkedQuestionAnswerFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.PARKED_CODING_QUESTIONS,\n operationIdentifier: WorkbenchParkedCodingQuestions_Operations.ANSWER,\n },\n requestDtoSchema: Workbench_ParkedQuestionAnswerRequest_Schema,\n responseDtoSchema: Workbench_ParkedQuestionAnswerOutcome_Schema,\n debugLabel: 'creation-plane.parked-questions.answer',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);\n const codingAgent = container.get<CodingAgentDispatchCompanionService>(COMPANION_SERVICE_TYPES.CodingAgentDispatchService);\n const rowId = String(id ?? '');\n const row = (await projection.deriveRows(WorkbenchCreationPlaneBehavior.PARKED_CODING_QUESTIONS))\n .find((candidate) => candidate.workbenchParkedCodingQuestionId === rowId);\n if (!row) {\n // Guidance, not context: a 404's context is stripped before the gate could show it (#1584 review R1).\n // Reached only when the row vanished between the engine's authorization and this read: a row already\n // gone is refused first, by the authorization step, as `authorizations_validation_failed` (#1585).\n throw utils.errorBuilder.buildErrorWithGuidanceKey(ErrorType.NOT_FOUND, executionContext,\n CompanionErrorGuidanceKey.PARKED_CODING_QUESTION_NOT_FOUND, { explanation: `No parked coding question matches id \"${rowId}\".` },\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { message: `No parked coding question matches id \"${rowId}\".` } });\n }\n const request = (input ?? {}) as { answer?: string; suspensionRef?: string };\n try {\n // The question the person read, not whichever the run waits on now (#1581, eighth review).\n // The request schema requires it; a missing or blank one names no question and is refused 400 at the answer door.\n const answeredByRef = executionContext?.initiatorIds?.userId;\n return await codingAgent.respondToApplicationCodingTaskQuestion(String(row.taskId), String(request.answer ?? ''), undefined,\n { suspensionRef: String(request.suspensionRef ?? ''), ...(answeredByRef ? { answeredByRef, actingUserId: answeredByRef } : {}) });\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n /* The queue and the dispatch rows move: a resumed run is no longer parked. */\n projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/** `cancel` on PARKED CODING QUESTIONS: end the run THIS row names (#1581, seventh review F2). */\nfunction buildCodingRunCancelFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.PARKED_CODING_QUESTIONS,\n operationIdentifier: WorkbenchParkedCodingQuestions_Operations.CANCEL,\n },\n requestDtoSchema: Workbench_EmptyRequest_Schema,\n responseDtoSchema: Workbench_CodingRunCancelOutcome_Schema,\n debugLabel: 'creation-plane.parked-questions.cancel',\n handlers: {\n overrideAll: async (id, _input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);\n const codingAgent = container.get<CodingAgentDispatchCompanionService>(COMPANION_SERVICE_TYPES.CodingAgentDispatchService);\n const rowId = String(id ?? '');\n const row = (await projection.deriveRows(WorkbenchCreationPlaneBehavior.PARKED_CODING_QUESTIONS))\n .find((candidate) => candidate.workbenchParkedCodingQuestionId === rowId);\n if (!row) {\n // Guidance, not context: a 404's context is stripped before the gate could show it (#1584 review R1).\n // Reached only when the row vanished between the engine's authorization and this read: a row already\n // gone is refused first, by the authorization step, as `authorizations_validation_failed` (#1585).\n throw utils.errorBuilder.buildErrorWithGuidanceKey(ErrorType.NOT_FOUND, executionContext,\n CompanionErrorGuidanceKey.PARKED_CODING_QUESTION_NOT_FOUND, { explanation: `No parked coding question matches id \"${rowId}\".` },\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { message: `No parked coding question matches id \"${rowId}\".` } });\n }\n try {\n // The signed-in person cancelling (#1751): the withdrawn question records them as its decider.\n const actingUserId = executionContext?.initiatorIds?.userId;\n const outcome = await codingAgent.cancelApplicationCodingTask(String(row.taskId), undefined, actingUserId ? { actingUserId } : undefined);\n /*\n * The row existed a moment ago, so \"nothing to cancel\" means the run moved on meanwhile — answered,\n * cancelled or finished. Said as a refusal the gate shows, not as a success it would report as done.\n */\n if (!outcome.cancelled) {\n throw utils.errorBuilder.buildError(ErrorType.CONFLICT, executionContext, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: 'This coding run is no longer waiting: it was answered, cancelled or finished meanwhile.' },\n });\n }\n return outcome;\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/**\n * `land_facts` on a GOVERNED DOCUMENT: land the facts a person established for it as the\n * `document-facts-authored` family (#1454, Step 6). The row is the door and the body names the\n * document too; the two must agree, or a request could land facts on a document it never opened.\n * `dryRun` runs the whole pipe and writes nothing, so the person sees the exact file their answers\n * produce before anything touches the tree. The authored facts are merged BY FACT into what is\n * already landed — a partial sitting keeps every other declaration.\n */\nfunction buildGovernanceFactsLandingFactory(container: Container) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.GOVERNANCE_DOCUMENTS,\n operationIdentifier: WorkbenchGovernanceDocuments_Operations.LAND_FACTS,\n },\n requestDtoSchema: Workbench_GovernanceFactsLandingRequest_Schema,\n responseDtoSchema: Workbench_GovernanceFactsLandingOutcome_Schema,\n debugLabel: 'creation-plane.governance-documents.land-facts',\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);\n const dossier = container.get<DossierCompanionService>(COMPANION_SERVICE_TYPES.DossierService);\n const companionContext = container.get<CompanionContext>(COMPANION_SERVICE_TYPES.CompanionContext);\n const rowId = String(id ?? '');\n const row = (await projection.deriveRows(WorkbenchCreationPlaneBehavior.GOVERNANCE_DOCUMENTS))\n .find((candidate) => candidate.workbenchGovernanceDocumentId === rowId);\n if (!row) {\n throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n context: { message: `No governed document matches id \"${rowId}\".` },\n });\n }\n const { dryRun, ...request } = (input ?? {}) as { dryRun?: boolean; definitionRef?: string } & Record<string, unknown>;\n if (request.definitionRef !== row.definitionRef) {\n throw utils.errorBuilder.buildError(ErrorType.VALIDATION, executionContext, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `The request names document \"${String(request.definitionRef)}\" but was sent to \"${String(row.definitionRef)}\".` },\n });\n }\n const specificationsPackageRoot = companionContext.resolvedSpecifications?.packageRoot;\n if (!specificationsPackageRoot) {\n throw utils.errorBuilder.buildError(ErrorType.VALIDATION, executionContext, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'This application has no resolved specifications package, so there is nowhere to land the facts.' },\n });\n }\n try {\n /*\n * The authored facts as LANDED, for the merge — read through the same aggregate every reader uses. The read\n * and the write are one dossier write, queued with every other (#2179): taken apart, a concurrent landing\n * would build on the same read and one of the two would lose its facts.\n *\n * NOT pinned here: the pin is on the controller door of the same shape\n * (`dossier-concurrent-doors.package-mode.test.ts`, \"two governance-fact landings at the same moment\").\n * Removing the queue from THIS door alone leaves every test green.\n */\n return await serializeDossierWrite(specificationsPackageRoot, async () => {\n const current = await dossier.readAuthoredDocumentFacts();\n return landGovernanceFactDeclarations({\n specificationsPackageRoot,\n // NEUTRAL BY CONTRACT (issue #65), same as every other landed constant — app identity lives in VALUES.\n constantPrefix: 'application',\n answers: request as unknown as GovernanceFactDeclarationInput,\n ...(current === undefined ? {} : { current }),\n ...(dryRun === true ? { dryRun: true } : {}),\n });\n });\n } catch (error) {\n throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;\n } finally {\n /* A landing moves the dossier, the questions and eligibility; a dry run moves nothing. */\n if (dryRun !== true) projection.invalidateDerivedBoards();\n }\n },\n },\n });\n}\n\n/**\n * `set` and `unset` on THE SECRETS SECTION (#1637): run `wildo secrets set/unset`, the one writer of a\n * secret. The value goes to the CLI on stdin (`application-secrets.companion.ts`) and is never held,\n * logged or traced here. A refusal carries the CLI's own sentence as the guidance label's `reason`\n * param, because it names the remedy (a typo, a malformed key, `gh` to install) and a 4xx context is\n * stripped before the page sees it.\n */\nfunction buildApplicationSecretChangeFactory(container: Container, operation: WorkbenchApplicationSecrets_Operations) {\n return createResourceCustomServiceImplementation({\n operationPath: {\n ...CREATION_PLANE_DISPATCH_PATH_BASE,\n resourceIdentifier: WorkbenchShared_ResourceType.APPLICATION_SECRETS,\n operationIdentifier: operation,\n },\n requestDtoSchema: operation === WorkbenchApplicationSecrets_Operations.SET ? Workbench_ApplicationSecretSetRequest_Schema : Workbench_EmptyRequest_Schema,\n responseDtoSchema: Workbench_ApplicationSecretChangeOutcome_Schema,\n debugLabel: `creation-plane.application-secrets.${operation}`,\n handlers: {\n overrideAll: async (id, input, executionContext, _operationPath, utils) => {\n const projection = container.get<CreationPlaneProjectionCompanionService>(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);\n const context = container.get<CompanionContext>(COMPANION_SERVICE_TYPES.CompanionContext);\n const target = splitApplicationSecretRowId(String(id ?? ''));\n // The CLI's sentence is the useful part (a typo'd name, a malformed key, `gh` to install), so it\n // travels as the label's `reason` param: the translated label outranks the raw explanation.\n const refuse = (explanation: string) => utils.errorBuilder.buildErrorWithGuidanceKey(ErrorType.VALIDATION, executionContext,\n CompanionErrorGuidanceKey.APPLICATION_SECRET_CHANGE_REFUSED, { explanation, params: { reason: explanation } },\n { customMessageReference: ErrorCustomMessageReference.VALIDATION, context: { message: explanation } });\n if (!target) throw refuse(`\"${String(id ?? '')}\" names no secret row.`);\n let outcome: Workbench_ApplicationSecretChangeOutcome;\n try {\n const change = operation === WorkbenchApplicationSecrets_Operations.SET\n ? await setApplicationSecret(context.saasRoot, target.envName, target.kind, target.envVarName, String((input as { value?: unknown } | undefined)?.value ?? ''))\n : await unsetApplicationSecret(context.saasRoot, target.envName, target.kind, target.envVarName);\n outcome = change.outcome;\n // The rows after the change replace the environment's rows, so the next read answers at once (#1782).\n projection.applyApplicationSecretsChange(target.envName, change.environmentRows);\n } catch (error) {\n // A failed change may have written part of it; drop the listing rather than keep one that may be wrong.\n projection.forgetApplicationSecretsListing();\n throw refuse(describeSecretsCliFailure(error));\n } finally {\n projection.invalidateDerivedBoards();\n }\n /*\n * The companion reads this key and was not restarted (`--skip-companion-restart`): restarting would end\n * this request and any run in flight. Apply it in-process from the file a restart would load, then\n * rebuild the provider registry so the next call sees it. A failure here leaves the value saved and\n * the companion on the old one until its next start, which is said rather than hidden.\n */\n if (outcome.companionAppliesChange && outcome.envFilesRegenerated) {\n try {\n await reloadCompanionEnvVariables(\n [outcome.envVarName],\n container.get<ExternalProvidersRegistryBackendService>(SAAS_SERVICE_TYPES.ExternalProvidersRegistryService),\n );\n } catch (error) {\n const failure = `${outcome.envVarName} is saved, but the companion could not apply it now (${describeCaughtError(error)}); `\n + 'it takes effect at the next companion start.';\n container.get<LoggerService>(SAAS_SERVICE_TYPES.Logger).warn(`[CreationPlane] ${failure}`);\n return { ...outcome, companionApplyFailure: failure };\n }\n }\n return outcome;\n },\n },\n });\n}\n\n/**\n * The factories `customImplRegistry.initialize()` consumes — companion startup passes exactly this\n * list after the workbench resources register (registrations validate against configured operation\n * paths at init, so a drifting identifier fails the boot instead of becoming unreachable code).\n */\nexport function createCreationPlaneDispatchFactories(): ResourceCustomServiceImplementationFactory[] {\n return [\n (_registry, container) => buildPlaybookRunFactory(container),\n (_registry, container) => buildPlaybookResumeFactory(container),\n (_registry, container) => buildDispatchNextFactory(container),\n (_registry, container) => buildRevertWritesFactory(container),\n (_registry, container) => buildDossierAnswerFactory(container),\n (_registry, container) => buildAddTaskFactory(container),\n (_registry, container) => buildDispatchTaskFactory(container),\n (_registry, container) => buildAcceptTaskFactory(container),\n (_registry, container) => buildAcceptRunWritesFactory(container),\n /* The verbs the workbench's bespoke companion client carried until 2026-09-22 (#1454). */\n (_registry, container) => buildPlaybookReadInterviewFactory(container),\n (_registry, container) => buildRunWriteDiffFactory(container),\n (_registry, container) => buildTraceSessionRecordFactory(container),\n (_registry, container) => buildTraceSessionUsageFactory(container),\n (_registry, container) => buildTraceArtifactFactory(container),\n (_registry, container) => buildTraceSessionsForTaskFactory(container),\n (_registry, container) => buildParkedQuestionAnswerFactory(container),\n (_registry, container) => buildCodingRunCancelFactory(container),\n (_registry, container) => buildApplicationSecretChangeFactory(container, WorkbenchApplicationSecrets_Operations.SET),\n (_registry, container) => buildApplicationSecretChangeFactory(container, WorkbenchApplicationSecrets_Operations.UNSET),\n (_registry, container) => buildGovernanceFactsLandingFactory(container),\n /* #2129 — appended LAST so every earlier factory keeps its position. */\n (_registry, container) => buildDossierProposeFactory(container),\n (_registry, container) => buildDossierInterviewDepthFactory(container),\n ];\n}\n"]}
|
package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creation-plane-projection.companion.service.d.ts","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-plane-projection.companion.service.ts"],"names":[],"mappings":"AAKA,OAAO,EAA2C,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEzG,OAAO,EAEL,8BAA8B,EAC9B,6BAA6B,EAG7B,sCAAsC,EAEvC,MAAM,gCAAgC,CAAC;AAKxC,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,sEAAsE,CAAC;AAChI,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,0EAA0E,CAAC;AAIvI,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iEAAiE,CAAC;AACnH,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,+EAA+E,CAAC;AAC9I,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,gFAAgF,CAAC;AAC/I,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,yEAAyE,CAAC;AAClI,OAAO,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,4DAA4D,CAAC;AACxH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAOxE,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,4DAA4D,CAAC;AAI7H;;;;;;;;;;;;GAYG;AACH;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,YAAY,GAAG,6BAA6B,
|
|
1
|
+
{"version":3,"file":"creation-plane-projection.companion.service.d.ts","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-plane-projection.companion.service.ts"],"names":[],"mappings":"AAKA,OAAO,EAA2C,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