@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-home-projection.companion.js","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-home-projection.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,4BAA4B,EAC5B,wBAAwB,EACxB,8BAA8B,EAC9B,4BAA4B,EAC5B,mCAAmC,EACnC,oCAAoC,GAWrC,MAAM,gCAAgC,CAAC;AAyBxC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAEhD,0EAA0E;AAC1E,SAAS,kBAAkB,CAAC,IAAiB,EAAE,KAAkB;IAC/D,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC9C,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC5B,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC,CAAC;IAC9B,OAAO,KAAK,CA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;QACpK,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;QAC9J,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,oCAAoC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAE,CAAC,CAAC;AACnF,CAAC","sourcesContent":["import { ApplicationSpecificationFamily } from '@wildo-ai/saas-specifications/application-creation';\nimport {\n Workbench_BuildDispatchPhase,\n Workbench_PlaybookRunState,\n WorkbenchBuildPlanTaskStatus,\n WorkbenchCreationHomeLineKind,\n WorkbenchCreationHomeSection,\n WorkbenchCreationOutcome,\n WorkbenchCreationOutcomeStatus,\n WorkbenchShared_ResourceType,\n WorkbenchSpecificationArtifactState,\n WORKBENCH_CREATION_OUTCOMES_IN_ORDER,\n type Workbench_BuildDispatch,\n type Workbench_BuildDispatchPlan,\n type Workbench_BuildPlanTask,\n type Workbench_CreationHomeLine,\n type Workbench_CreationOutcome,\n type Workbench_GovernanceDocument,\n type Workbench_ParkedCodingQuestion,\n type Workbench_Playbook,\n type Workbench_PlaybookRun,\n type Workbench_WaitingPlaybookRun,\n} from '@wildo-ai/platform-core-shared';\n\n/**\n * HOME, derived (#1454): the lines the conversation page opens on, and where the application\n * stands — pure functions of the creation-plane rows the projection service already computes.\n *\n * ## Why here and not in the page\n *\n * Until 2026-09-22 the workbench read seven resources on their own cadences and derived every one\n * of these facts itself, on every poll, in three modules nothing but the page could reach. A line\n * is a FACT about the application (\"this run was refused\", \"this task's writes wait to be\n * committed\", \"this step can run and its output is missing\"); facts are derived where the rows are,\n * once, and served as rows (`derive-before-you-ask.md`). The page renders; the assistant's tools read\n * the same rows; and a test of the derivation is a test of what every reader sees.\n *\n * Both builders take the ROWS — the projected shapes the resources serve — rather than the companion\n * services' own records, so a fact is decided from exactly what a reader could see, never from a\n * field the projection dropped.\n */\n\n/** The row shape the home-lines projection emits, before the identity is stamped. */\nexport type CreationHomeLineRow = Omit<Workbench_CreationHomeLine, 'workbenchCreationHomeLineId'>;\n/** The row shape the outcomes projection emits, before the identity is stamped. */\nexport type CreationOutcomeRow = Omit<Workbench_CreationOutcome, 'workbenchCreationOutcomeId'>;\n\n/** How many playbook suggestions Home shows beside the plan's next step. */\nexport const HOME_PLAYBOOK_SUGGESTION_COUNT = 3;\n\n/** Newest first; a row with no instant sorts after every row with one. */\nfunction compareNewestFirst(left: Date | null, right: Date | null): number {\n if (left === null && right === null) return 0;\n if (left === null) return 1;\n if (right === null) return -1;\n return right.getTime() - left.getTime();\n}\n\n/**\n * The RANKING of what is asked of the creator: what stops a run that is otherwise executing comes\n * first (a clarification, a parked question); a document waiting on a fact does not block a run and\n * comes after. Within a rank, newest first.\n */\nconst ASKED_RANK: Readonly<Partial<Record<WorkbenchCreationHomeLineKind, number>>> = {\n [WorkbenchCreationHomeLineKind.CLARIFICATION]: 0,\n [WorkbenchCreationHomeLineKind.PARKED_QUESTION]: 0,\n [WorkbenchCreationHomeLineKind.GOVERNANCE_DOCUMENT]: 1,\n /*\n * Below a question (which holds a live agent session) and above a document: the plan is frozen\n * until it is unblocked, and the usual remedy is one commit.\n */\n [WorkbenchCreationHomeLineKind.UNBLOCK_THE_PLAN]: 1,\n};\n\nexport interface CreationHomeLineInputs {\n readonly runs: readonly Workbench_PlaybookRun[];\n readonly dispatches: readonly Workbench_BuildDispatch[];\n readonly waiting: readonly Workbench_WaitingPlaybookRun[];\n readonly parked: readonly Workbench_ParkedCodingQuestion[];\n readonly documents: readonly Workbench_GovernanceDocument[];\n readonly dispatchPlan: readonly Workbench_BuildDispatchPlan[];\n readonly playbooks: readonly Workbench_Playbook[];\n /** Every family the artifact projection reports, with its state. */\n readonly artifacts: readonly { readonly family: string; readonly state: WorkbenchSpecificationArtifactState }[];\n}\n\n/**\n * Every line of Home, all three sections. SINCE lines are NOT windowed here: \"since the creator was\n * last here\" is a per-viewer fact the page keeps in its own browser, so the page cuts the list; the\n * projection serves every settled run and dispatch it knows, newest first, and every interrupted\n * run whatever its date.\n */\nexport function buildCreationHomeLines(input: CreationHomeLineInputs): readonly CreationHomeLineRow[] {\n const line = (\n section: WorkbenchCreationHomeSection,\n kind: WorkbenchCreationHomeLineKind,\n target: { resourceType: WorkbenchShared_ResourceType; resourceId: string },\n facts: Partial<Pick<CreationHomeLineRow, 'at' | 'playbookRef' | 'taskRef' | 'subject' | 'failed' | 'acceptable' | 'needsAnswers' | 'stuckReason'>> = {},\n ): CreationHomeLineRow => ({\n section,\n kind,\n at: null,\n playbookRef: null,\n taskRef: null,\n subject: null,\n failed: false,\n acceptable: false,\n needsAnswers: false,\n stuckReason: null,\n targetResourceType: target.resourceType,\n targetResourceId: target.resourceId,\n ...facts,\n });\n\n /* SINCE — what happened. */\n const since: CreationHomeLineRow[] = [];\n for (const run of input.runs) {\n const target = { resourceType: WorkbenchShared_ResourceType.PLAYBOOK_RUNS, resourceId: run.workbenchPlaybookRunId };\n if (run.state === Workbench_PlaybookRunState.COMPLETED) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.RUN_COMPLETED, target, {\n at: run.finishedAt ?? null, playbookRef: run.playbookRef, failed: run.ok === false,\n }));\n } else if (run.state === Workbench_PlaybookRunState.INTERRUPTED) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.RUN_INTERRUPTED, target, {\n at: run.checkpointedAt ?? run.startedAt ?? null, playbookRef: run.playbookRef,\n }));\n }\n }\n for (const dispatch of input.dispatches) {\n if (dispatch.phase !== Workbench_BuildDispatchPhase.FINISHED && dispatch.phase !== Workbench_BuildDispatchPhase.FAILED) continue;\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.DISPATCH_SETTLED,\n { resourceType: WorkbenchShared_ResourceType.BUILD_DISPATCHES, resourceId: dispatch.workbenchBuildDispatchId }, {\n at: dispatch.settledAt ?? null,\n taskRef: dispatch.taskRef,\n failed: dispatch.phase === Workbench_BuildDispatchPhase.FAILED,\n /* The one state ACCEPT addresses: finished, its writes recorded, nothing committed yet. */\n acceptable: dispatch.phase === Workbench_BuildDispatchPhase.FINISHED && dispatch.accepted === false,\n }));\n }\n since.sort((left, right) => compareNewestFirst(left.at, right.at));\n\n /* ASKED — what blocks something NOW and waits on the creator. */\n const asked: CreationHomeLineRow[] = [];\n for (const waiting of input.waiting) {\n /* An unreadable checkpoint is a condition to show on its own row, not a question anyone can answer. */\n if (!waiting.readable) continue;\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.CLARIFICATION,\n { resourceType: WorkbenchShared_ResourceType.WAITING_PLAYBOOK_RUNS, resourceId: waiting.workbenchWaitingPlaybookRunId },\n { at: waiting.suspendedAt ?? null, playbookRef: waiting.playbookRef ?? null }));\n }\n for (const parked of input.parked) {\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.PARKED_QUESTION,\n { resourceType: WorkbenchShared_ResourceType.PARKED_CODING_QUESTIONS, resourceId: parked.workbenchParkedCodingQuestionId },\n { at: parked.parkedAt ?? null, taskRef: parked.taskRef }));\n }\n for (const document of input.documents) {\n /*\n * Only a document the creator ASKED FOR (a draft exists) and that still needs a fact (#1454,\n * Step 6). A permanent count of every open fact of every undrafted document would train the eye\n * to skip the number.\n */\n if (!document.drafted || document.openCount === 0) continue;\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.GOVERNANCE_DOCUMENT,\n { resourceType: WorkbenchShared_ResourceType.GOVERNANCE_DOCUMENTS, resourceId: document.workbenchGovernanceDocumentId },\n { subject: document.definitionRef }));\n }\n /*\n * The plan itself, when it can run NOTHING (#1451). The dispatch-plan row carries one entry per\n * ready task dispatch passed over, and a row with no `taskRef` that is not `exhausted` means every\n * one of them is stuck — so this is the state where the plan needs the creator rather than a\n * dispatch. One line per stuck task: each carries its own remedy.\n *\n * Beside a next task the row still lists what the selection skipped, and those are NOT shown here:\n * the plan is moving, and a line asking for something that is not blocking anything is how an\n * ASKED list stops being read.\n */\n for (const row of input.dispatchPlan) {\n if (row.taskRef !== null || row.exhausted) continue;\n for (const stuck of row.stuckTasks ?? []) {\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.UNBLOCK_THE_PLAN,\n { resourceType: WorkbenchShared_ResourceType.BUILD_DISPATCH_PLAN, resourceId: row.workbenchBuildDispatchPlanId },\n { taskRef: stuck.taskRef, stuckReason: stuck.reason }));\n }\n }\n asked.sort((left, right) => {\n const rank = (ASKED_RANK[left.kind] ?? 9) - (ASKED_RANK[right.kind] ?? 9);\n return rank !== 0 ? rank : compareNewestFirst(left.at, right.at);\n });\n\n /*\n * SUGGESTION — what the creator could do next, outcome-first: the plan's next READY task, then\n * eligible playbooks producing a MISSING family before those refreshing a STALE one (a gap is\n * worth more than a refresh), capped.\n */\n const suggestions: CreationHomeLineRow[] = [];\n const next = input.dispatchPlan.find((row) => row.taskRef !== null && row.objective !== null);\n if (next && next.taskRef && next.objective) {\n suggestions.push(line(WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.CONTINUE_THE_PLAN,\n { resourceType: WorkbenchShared_ResourceType.BUILD_DISPATCH_PLAN, resourceId: next.workbenchBuildDispatchPlanId },\n { taskRef: next.taskRef, subject: next.objective }));\n }\n const missingFamilies = new Set(\n input.artifacts.filter((artifact) => artifact.state === WorkbenchSpecificationArtifactState.NOT_LANDED).map((artifact) => artifact.family),\n );\n const producing: CreationHomeLineRow[] = [];\n const refreshing: CreationHomeLineRow[] = [];\n for (const playbook of input.playbooks) {\n if (!playbook.eligible) continue;\n const target = { resourceType: WorkbenchShared_ResourceType.PLAYBOOKS, resourceId: playbook.workbenchPlaybookId };\n const facts = { playbookRef: playbook.playbookRef, needsAnswers: playbook.unansweredQuestionRefs.length > 0 };\n if (playbook.outputOwners.some((owner) => missingFamilies.has(owner.family))) {\n producing.push(line(WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.PRODUCE_MISSING, target, facts));\n } else if (playbook.staleOutputs.length > 0) {\n refreshing.push(line(WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.REFRESH_STALE, target, facts));\n }\n }\n const playbookSuggestions = [...producing, ...refreshing].slice(0, HOME_PLAYBOOK_SUGGESTION_COUNT);\n\n return [...since, ...asked, ...suggestions, ...playbookSuggestions];\n}\n\n/**\n * Every specification family belongs to exactly ONE outcome, and the map is TOTAL by construction:\n * `Record<ApplicationSpecificationFamily, …>` makes a family added to the semantic authority a\n * compile error here until it is placed. That is the property the page's mock promised — \"derived\n * from what exists\" — and the reason this is a typed record rather than a lookup with a default.\n *\n * `RISK_REGISTER` is under the rules rather than under what-we-build: it says what the exposure\n * MEANS, which is an obligation, and its playbook is in the compliance analysis.\n *\n * `null` is a placement too, and the map stays total: `CREATOR_INPUTS` — the dossier — is INPUT the\n * creator gives, never a deliverable a step produces, so counting it toward an outcome would make\n * \"know what we build\" one answer closer to done for having been asked a question. A family placed\n * `null` is measured by nothing; the compiler still refuses a family placed nowhere.\n */\nexport const OUTCOME_BY_FAMILY: Readonly<Record<ApplicationSpecificationFamily, WorkbenchCreationOutcome | null>> = {\n [ApplicationSpecificationFamily.VISION_BRIEF]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.MARKET_SNAPSHOT]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.REQUIREMENTS]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.FEATURE_DRAFTS]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.BUSINESS_MODEL]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.ROADMAP]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.BRAND_BRIEF]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.COMPLIANCE_PROGRAM]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.COMPLIANCE_DOCUMENT_CANDIDATE]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.COMPLIANCE_DOCUMENT_CANDIDATE_SET]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOCUMENT_RELEASE_POLICY]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOCUMENT_FACTS]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOCUMENT_FACTS_AUTHORED]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.PROCESSOR_REGISTER]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.RISK_REGISTER]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOMAIN_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n [ApplicationSpecificationFamily.PLACEMENT_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n [ApplicationSpecificationFamily.BUILD_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n // Which optional packages the application is composed with — part of the application working, like its placement (#1491).\n [ApplicationSpecificationFamily.CAPABILITY_COMPOSITION]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n /*\n * READY_FOR_A_REAL_USER, not APPLICATION_WORKS: an application works without a marketing site, and\n * what the site says is what a stranger meets first (#1492). The same reading the governed\n * documents carry — the outcome is about facing the public, not about the product functioning.\n */\n [ApplicationSpecificationFamily.WEBSITE_PLAN]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n /* Same reading as the website: documentation is what a stranger meets, not what makes the product work. */\n [ApplicationSpecificationFamily.DOCUMENTATION_PLAN]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n /* APPLICATION_WORKS: without a composed shell there is no route to the generated screens (#1493). */\n [ApplicationSpecificationFamily.EXPERIENCE_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n /*\n * APPLICATION_WORKS: a worker the backend delegates to, and a minion that keeps the data true,\n * are part of the product functioning — not of it facing a stranger (#1495). An application whose\n * nightly sweep was never planned works wrongly in a way no screen shows.\n */\n [ApplicationSpecificationFamily.INTEGRATION_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n /*\n * `null`, and this one is the most important null in the map (#1496): the maturity reading is a\n * MEASUREMENT OF the outcomes, so counting it toward one would let an application advance for\n * having measured itself. It is also never \"done\" by construction — the next requirement lowers\n * it — so an outcome that waited for it could never complete.\n */\n [ApplicationSpecificationFamily.APPLICATION_MATURITY]: null,\n [ApplicationSpecificationFamily.DOCUMENT_PUBLICATION]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n [ApplicationSpecificationFamily.DOCUMENT_RELEASE_SET]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n [ApplicationSpecificationFamily.CREATOR_INPUTS]: null,\n /*\n * `null` for the same reason as the dossier: the expert-persona charters STAFF the panels that decide\n * placement and the logo; they say nothing about the product itself, so counting them toward an outcome\n * would move \"application works\" for having hired reviewers (#572).\n */\n [ApplicationSpecificationFamily.EXPERT_PERSONAS]: null,\n};\n\nexport interface CreationOutcomeInputs {\n /** The artifact projection's rows, one per family it knows. */\n readonly artifacts: readonly { readonly family: string; readonly state: WorkbenchSpecificationArtifactState }[];\n /** Every family some playbook reports as stale — the union of `staleOutputs[].family` over the playbook rows. */\n readonly staleFamilies: ReadonlySet<string>;\n /** The build-plan task rows. */\n readonly tasks: readonly { readonly status: WorkbenchBuildPlanTaskStatus }[];\n /**\n * The application's runtimes a live supervisor has paused (`readUnavailableApplicationRuntimes`), or\n * undefined when none could answer (#1537).\n */\n readonly unavailableRuntimes?: readonly string[];\n}\n\n/**\n * Where the application stands, outcome by outcome — always four rows, in reading order. \"Done\" is\n * strict: every family of the outcome landed, valid and not stale; for the application working,\n * every build task landed too; for readiness, every OTHER outcome done as well — an application is\n * not ready for a real user because its documents are published while its build plan is\n * half-landed.\n *\n * A family the projection does not report is not counted against an outcome: the population is the\n * reported rows, filtered through the total map, never the map alone.\n */\nexport function buildCreationOutcomes(input: CreationOutcomeInputs): readonly CreationOutcomeRow[] {\n const isFamily = (value: string): value is ApplicationSpecificationFamily => Object.prototype.hasOwnProperty.call(OUTCOME_BY_FAMILY, value);\n\n const counts = new Map<WorkbenchCreationOutcome, { total: number; landed: number; invalid: number; missing: number; stale: number }>();\n for (const outcome of WORKBENCH_CREATION_OUTCOMES_IN_ORDER) counts.set(outcome, { total: 0, landed: 0, invalid: 0, missing: 0, stale: 0 });\n for (const artifact of input.artifacts) {\n if (!isFamily(artifact.family)) continue;\n const outcome = OUTCOME_BY_FAMILY[artifact.family];\n if (outcome === null) continue;\n const count = counts.get(outcome)!;\n count.total += 1;\n if (artifact.state === WorkbenchSpecificationArtifactState.NOT_LANDED) count.missing += 1;\n else if (artifact.state === WorkbenchSpecificationArtifactState.LANDED_INVALID) count.invalid += 1;\n else if (input.staleFamilies.has(artifact.family)) count.stale += 1;\n else count.landed += 1;\n }\n\n const tasksTotal = input.tasks.length;\n const tasksLanded = input.tasks.filter((task) => task.status === WorkbenchBuildPlanTaskStatus.LANDED).length;\n\n const statusOf = (count: { total: number; landed: number; invalid: number; stale: number }, extraDone: boolean, extraStarted: boolean): WorkbenchCreationOutcomeStatus => {\n const familiesDone = count.total > 0 && count.landed === count.total;\n if (familiesDone && extraDone) return WorkbenchCreationOutcomeStatus.DONE;\n const started = count.landed + count.invalid + count.stale > 0 || extraStarted;\n return started ? WorkbenchCreationOutcomeStatus.IN_PROGRESS : WorkbenchCreationOutcomeStatus.NOT_STARTED;\n };\n\n const rows = new Map<WorkbenchCreationOutcome, CreationOutcomeRow>();\n WORKBENCH_CREATION_OUTCOMES_IN_ORDER.forEach((outcome, position) => {\n const count = counts.get(outcome)!;\n const families = {\n familiesTotal: count.total, familiesLanded: count.landed, familiesInvalid: count.invalid, familiesMissing: count.missing, familiesStale: count.stale,\n };\n if (outcome === WorkbenchCreationOutcome.APPLICATION_WORKS) {\n /*\n * An application that cannot start does not work, whatever has landed (#1537). Measured on the\n * first end-to-end run: the backend was paused by its supervisor for hours while this row read\n * as progress. Never DONE while a runtime is down; still IN_PROGRESS, because the work landed so\n * far is real — the row says what it is, and `unavailableRuntimes` says what stops it.\n */\n const unavailableRuntimes = input.unavailableRuntimes === undefined ? null : [...input.unavailableRuntimes];\n const runtimeDown = unavailableRuntimes !== null && unavailableRuntimes.length > 0;\n rows.set(outcome, {\n outcome, position, ...families, tasksTotal, tasksLanded, unavailableRuntimes,\n status: statusOf(count, tasksTotal > 0 && tasksLanded === tasksTotal && !runtimeDown, tasksLanded > 0 || runtimeDown),\n });\n } else if (outcome === WorkbenchCreationOutcome.READY_FOR_A_REAL_USER) {\n const othersDone = WORKBENCH_CREATION_OUTCOMES_IN_ORDER\n .filter((other) => other !== outcome)\n .every((other) => rows.get(other)?.status === WorkbenchCreationOutcomeStatus.DONE);\n rows.set(outcome, { outcome, position, ...families, tasksTotal: null, tasksLanded: null, unavailableRuntimes: null, status: statusOf(count, othersDone, false) });\n } else {\n rows.set(outcome, { outcome, position, ...families, tasksTotal: null, tasksLanded: null, unavailableRuntimes: null, status: statusOf(count, true, false) });\n }\n });\n return WORKBENCH_CREATION_OUTCOMES_IN_ORDER.map((outcome) => rows.get(outcome)!);\n}\n\n/** The build-plan task rows' status — the one field the outcomes read of them. */\nexport type CreationOutcomeTaskRow = Pick<Workbench_BuildPlanTask, 'status'>;\n"]}
|
|
1
|
+
{"version":3,"file":"creation-home-projection.companion.js","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-home-projection.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,4BAA4B,EAC5B,wBAAwB,EACxB,8BAA8B,EAC9B,4BAA4B,EAC5B,mCAAmC,EACnC,oCAAoC,GAWrC,MAAM,gCAAgC,CAAC;AAyBxC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAEhD,0EAA0E;AAC1E,SAAS,kBAAkB,CAAC,IAAiB,EAAE,KAAkB;IAC/D,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC9C,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC5B,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC,CAAC;IAC9B,OAAO,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;AAC1C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,GAAqE;IACnF,CAAC,6BAA6B,CAAC,aAAa,CAAC,EAAE,CAAC;IAChD,CAAC,6BAA6B,CAAC,eAAe,CAAC,EAAE,CAAC;IAClD,CAAC,6BAA6B,CAAC,mBAAmB,CAAC,EAAE,CAAC;IACtD;;;OAGG;IACH,CAAC,6BAA6B,CAAC,gBAAgB,CAAC,EAAE,CAAC;CACpD,CAAC;AAcF;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAA6B;IAClE,MAAM,IAAI,GAAG,CACX,OAAqC,EACrC,IAAmC,EACnC,MAA0E,EAC1E,QAAqJ,EAAE,EAClI,EAAE,C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,CAAE,CAAC,CAAC;AACnF,CAAC","sourcesContent":["import { ApplicationSpecificationFamily } from '@wildo-ai/saas-specifications/application-creation';\nimport {\n Workbench_BuildDispatchPhase,\n Workbench_PlaybookRunState,\n WorkbenchBuildPlanTaskStatus,\n WorkbenchCreationHomeLineKind,\n WorkbenchCreationHomeSection,\n WorkbenchCreationOutcome,\n WorkbenchCreationOutcomeStatus,\n WorkbenchShared_ResourceType,\n WorkbenchSpecificationArtifactState,\n WORKBENCH_CREATION_OUTCOMES_IN_ORDER,\n type Workbench_BuildDispatch,\n type Workbench_BuildDispatchPlan,\n type Workbench_BuildPlanTask,\n type Workbench_CreationHomeLine,\n type Workbench_CreationOutcome,\n type Workbench_GovernanceDocument,\n type Workbench_ParkedCodingQuestion,\n type Workbench_Playbook,\n type Workbench_PlaybookRun,\n type Workbench_WaitingPlaybookRun,\n} from '@wildo-ai/platform-core-shared';\n\n/**\n * HOME, derived (#1454): the lines the conversation page opens on, and where the application\n * stands — pure functions of the creation-plane rows the projection service already computes.\n *\n * ## Why here and not in the page\n *\n * Until 2026-09-22 the workbench read seven resources on their own cadences and derived every one\n * of these facts itself, on every poll, in three modules nothing but the page could reach. A line\n * is a FACT about the application (\"this run was refused\", \"this task's writes wait to be\n * committed\", \"this step can run and its output is missing\"); facts are derived where the rows are,\n * once, and served as rows (`derive-before-you-ask.md`). The page renders; the assistant's tools read\n * the same rows; and a test of the derivation is a test of what every reader sees.\n *\n * Both builders take the ROWS — the projected shapes the resources serve — rather than the companion\n * services' own records, so a fact is decided from exactly what a reader could see, never from a\n * field the projection dropped.\n */\n\n/** The row shape the home-lines projection emits, before the identity is stamped. */\nexport type CreationHomeLineRow = Omit<Workbench_CreationHomeLine, 'workbenchCreationHomeLineId'>;\n/** The row shape the outcomes projection emits, before the identity is stamped. */\nexport type CreationOutcomeRow = Omit<Workbench_CreationOutcome, 'workbenchCreationOutcomeId'>;\n\n/** How many playbook suggestions Home shows beside the plan's next step. */\nexport const HOME_PLAYBOOK_SUGGESTION_COUNT = 3;\n\n/** Newest first; a row with no instant sorts after every row with one. */\nfunction compareNewestFirst(left: Date | null, right: Date | null): number {\n if (left === null && right === null) return 0;\n if (left === null) return 1;\n if (right === null) return -1;\n return right.getTime() - left.getTime();\n}\n\n/**\n * The RANKING of what is asked of the creator: what stops a run that is otherwise executing comes\n * first (a clarification, a parked question); a document waiting on a fact does not block a run and\n * comes after. Within a rank, newest first.\n */\nconst ASKED_RANK: Readonly<Partial<Record<WorkbenchCreationHomeLineKind, number>>> = {\n [WorkbenchCreationHomeLineKind.CLARIFICATION]: 0,\n [WorkbenchCreationHomeLineKind.PARKED_QUESTION]: 0,\n [WorkbenchCreationHomeLineKind.GOVERNANCE_DOCUMENT]: 1,\n /*\n * Below a question (which holds a live agent session) and above a document: the plan is frozen\n * until it is unblocked, and the usual remedy is one commit.\n */\n [WorkbenchCreationHomeLineKind.UNBLOCK_THE_PLAN]: 1,\n};\n\nexport interface CreationHomeLineInputs {\n readonly runs: readonly Workbench_PlaybookRun[];\n readonly dispatches: readonly Workbench_BuildDispatch[];\n readonly waiting: readonly Workbench_WaitingPlaybookRun[];\n readonly parked: readonly Workbench_ParkedCodingQuestion[];\n readonly documents: readonly Workbench_GovernanceDocument[];\n readonly dispatchPlan: readonly Workbench_BuildDispatchPlan[];\n readonly playbooks: readonly Workbench_Playbook[];\n /** Every family the artifact projection reports, with its state. */\n readonly artifacts: readonly { readonly family: string; readonly state: WorkbenchSpecificationArtifactState }[];\n}\n\n/**\n * Every line of Home, all three sections. SINCE lines are NOT windowed here: \"since the creator was\n * last here\" is a per-viewer fact the page keeps in its own browser, so the page cuts the list; the\n * projection serves every settled run and dispatch it knows, newest first, and every interrupted\n * run whatever its date.\n */\nexport function buildCreationHomeLines(input: CreationHomeLineInputs): readonly CreationHomeLineRow[] {\n const line = (\n section: WorkbenchCreationHomeSection,\n kind: WorkbenchCreationHomeLineKind,\n target: { resourceType: WorkbenchShared_ResourceType; resourceId: string },\n facts: Partial<Pick<CreationHomeLineRow, 'at' | 'playbookRef' | 'taskRef' | 'subject' | 'failed' | 'acceptable' | 'needsAnswers' | 'stuckReason'>> = {},\n ): CreationHomeLineRow => ({\n section,\n kind,\n at: null,\n playbookRef: null,\n taskRef: null,\n subject: null,\n failed: false,\n acceptable: false,\n needsAnswers: false,\n stuckReason: null,\n targetResourceType: target.resourceType,\n targetResourceId: target.resourceId,\n ...facts,\n });\n\n /* SINCE — what happened. */\n const since: CreationHomeLineRow[] = [];\n for (const run of input.runs) {\n const target = { resourceType: WorkbenchShared_ResourceType.PLAYBOOK_RUNS, resourceId: run.workbenchPlaybookRunId };\n if (run.state === Workbench_PlaybookRunState.COMPLETED) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.RUN_COMPLETED, target, {\n at: run.finishedAt ?? null, playbookRef: run.playbookRef, failed: run.ok === false,\n }));\n } else if (run.state === Workbench_PlaybookRunState.INTERRUPTED) {\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.RUN_INTERRUPTED, target, {\n at: run.checkpointedAt ?? run.startedAt ?? null, playbookRef: run.playbookRef,\n }));\n }\n }\n for (const dispatch of input.dispatches) {\n if (dispatch.phase !== Workbench_BuildDispatchPhase.FINISHED && dispatch.phase !== Workbench_BuildDispatchPhase.FAILED) continue;\n since.push(line(WorkbenchCreationHomeSection.SINCE, WorkbenchCreationHomeLineKind.DISPATCH_SETTLED,\n { resourceType: WorkbenchShared_ResourceType.BUILD_DISPATCHES, resourceId: dispatch.workbenchBuildDispatchId }, {\n at: dispatch.settledAt ?? null,\n taskRef: dispatch.taskRef,\n failed: dispatch.phase === Workbench_BuildDispatchPhase.FAILED,\n /* The one state ACCEPT addresses: finished, its writes recorded, nothing committed yet. */\n acceptable: dispatch.phase === Workbench_BuildDispatchPhase.FINISHED && dispatch.accepted === false,\n }));\n }\n since.sort((left, right) => compareNewestFirst(left.at, right.at));\n\n /* ASKED — what blocks something NOW and waits on the creator. */\n const asked: CreationHomeLineRow[] = [];\n for (const waiting of input.waiting) {\n /* An unreadable checkpoint is a condition to show on its own row, not a question anyone can answer. */\n if (!waiting.readable) continue;\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.CLARIFICATION,\n { resourceType: WorkbenchShared_ResourceType.WAITING_PLAYBOOK_RUNS, resourceId: waiting.workbenchWaitingPlaybookRunId },\n { at: waiting.suspendedAt ?? null, playbookRef: waiting.playbookRef ?? null }));\n }\n for (const parked of input.parked) {\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.PARKED_QUESTION,\n { resourceType: WorkbenchShared_ResourceType.PARKED_CODING_QUESTIONS, resourceId: parked.workbenchParkedCodingQuestionId },\n { at: parked.parkedAt ?? null, taskRef: parked.taskRef }));\n }\n for (const document of input.documents) {\n /*\n * Only a document the creator ASKED FOR (a draft exists) and that still needs a fact (#1454,\n * Step 6). A permanent count of every open fact of every undrafted document would train the eye\n * to skip the number.\n */\n if (!document.drafted || document.openCount === 0) continue;\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.GOVERNANCE_DOCUMENT,\n { resourceType: WorkbenchShared_ResourceType.GOVERNANCE_DOCUMENTS, resourceId: document.workbenchGovernanceDocumentId },\n { subject: document.definitionRef }));\n }\n /*\n * The plan itself, when it can run NOTHING (#1451). The dispatch-plan row carries one entry per\n * ready task dispatch passed over, and a row with no `taskRef` that is not `exhausted` means every\n * one of them is stuck — so this is the state where the plan needs the creator rather than a\n * dispatch. One line per stuck task: each carries its own remedy.\n *\n * Beside a next task the row still lists what the selection skipped, and those are NOT shown here:\n * the plan is moving, and a line asking for something that is not blocking anything is how an\n * ASKED list stops being read.\n */\n for (const row of input.dispatchPlan) {\n if (row.taskRef !== null || row.exhausted) continue;\n for (const stuck of row.stuckTasks ?? []) {\n asked.push(line(WorkbenchCreationHomeSection.ASKED, WorkbenchCreationHomeLineKind.UNBLOCK_THE_PLAN,\n { resourceType: WorkbenchShared_ResourceType.BUILD_DISPATCH_PLAN, resourceId: row.workbenchBuildDispatchPlanId },\n { taskRef: stuck.taskRef, stuckReason: stuck.reason }));\n }\n }\n asked.sort((left, right) => {\n const rank = (ASKED_RANK[left.kind] ?? 9) - (ASKED_RANK[right.kind] ?? 9);\n return rank !== 0 ? rank : compareNewestFirst(left.at, right.at);\n });\n\n /*\n * SUGGESTION — what the creator could do next, outcome-first: the plan's next READY task, then\n * eligible playbooks producing a MISSING family before those refreshing a STALE one (a gap is\n * worth more than a refresh), capped.\n */\n const suggestions: CreationHomeLineRow[] = [];\n const next = input.dispatchPlan.find((row) => row.taskRef !== null && row.objective !== null);\n if (next && next.taskRef && next.objective) {\n suggestions.push(line(WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.CONTINUE_THE_PLAN,\n { resourceType: WorkbenchShared_ResourceType.BUILD_DISPATCH_PLAN, resourceId: next.workbenchBuildDispatchPlanId },\n { taskRef: next.taskRef, subject: next.objective }));\n }\n const missingFamilies = new Set(\n input.artifacts.filter((artifact) => artifact.state === WorkbenchSpecificationArtifactState.NOT_LANDED).map((artifact) => artifact.family),\n );\n const producing: CreationHomeLineRow[] = [];\n const refreshing: CreationHomeLineRow[] = [];\n for (const playbook of input.playbooks) {\n if (!playbook.eligible) continue;\n const target = { resourceType: WorkbenchShared_ResourceType.PLAYBOOKS, resourceId: playbook.workbenchPlaybookId };\n const facts = { playbookRef: playbook.playbookRef, needsAnswers: playbook.unansweredQuestionRefs.length > 0 };\n if (playbook.outputOwners.some((owner) => missingFamilies.has(owner.family))) {\n producing.push(line(WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.PRODUCE_MISSING, target, facts));\n } else if (playbook.staleOutputs.length > 0) {\n refreshing.push(line(WorkbenchCreationHomeSection.SUGGESTION, WorkbenchCreationHomeLineKind.REFRESH_STALE, target, facts));\n }\n }\n const playbookSuggestions = [...producing, ...refreshing].slice(0, HOME_PLAYBOOK_SUGGESTION_COUNT);\n\n return [...since, ...asked, ...suggestions, ...playbookSuggestions];\n}\n\n/**\n * Every specification family belongs to exactly ONE outcome, and the map is TOTAL by construction:\n * `Record<ApplicationSpecificationFamily, …>` makes a family added to the semantic authority a\n * compile error here until it is placed. That is the property the page's mock promised — \"derived\n * from what exists\" — and the reason this is a typed record rather than a lookup with a default.\n *\n * `RISK_REGISTER` is under the rules rather than under what-we-build: it says what the exposure\n * MEANS, which is an obligation, and its playbook is in the compliance analysis.\n *\n * `null` is a placement too, and the map stays total: `CREATOR_INPUTS` — the dossier — is INPUT the\n * creator gives, never a deliverable a step produces, so counting it toward an outcome would make\n * \"know what we build\" one answer closer to done for having been asked a question. A family placed\n * `null` is measured by nothing; the compiler still refuses a family placed nowhere.\n */\nexport const OUTCOME_BY_FAMILY: Readonly<Record<ApplicationSpecificationFamily, WorkbenchCreationOutcome | null>> = {\n [ApplicationSpecificationFamily.VISION_BRIEF]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.MARKET_SNAPSHOT]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.REQUIREMENTS]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.FEATURE_DRAFTS]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.BUSINESS_MODEL]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.ROADMAP]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.BRAND_BRIEF]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n /* KNOW_WHAT_WE_BUILD with the brand it names: the name is part of what the product IS. */\n [ApplicationSpecificationFamily.BRAND_NAME_SCREENING]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,\n [ApplicationSpecificationFamily.COMPLIANCE_PROGRAM]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.COMPLIANCE_DOCUMENT_CANDIDATE]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.COMPLIANCE_DOCUMENT_CANDIDATE_SET]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOCUMENT_RELEASE_POLICY]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOCUMENT_FACTS]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOCUMENT_FACTS_AUTHORED]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.PROCESSOR_REGISTER]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.RISK_REGISTER]: WorkbenchCreationOutcome.KNOW_THE_RULES,\n [ApplicationSpecificationFamily.DOMAIN_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n [ApplicationSpecificationFamily.PLACEMENT_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n [ApplicationSpecificationFamily.BUILD_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n // Which optional packages the application is composed with — part of the application working, like its placement (#1491).\n [ApplicationSpecificationFamily.CAPABILITY_COMPOSITION]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n /*\n * READY_FOR_A_REAL_USER, not APPLICATION_WORKS: an application works without a marketing site, and\n * what the site says is what a stranger meets first (#1492). The same reading the governed\n * documents carry — the outcome is about facing the public, not about the product functioning.\n */\n [ApplicationSpecificationFamily.WEBSITE_PLAN]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n /* Same reading as the website: documentation is what a stranger meets, not what makes the product work. */\n [ApplicationSpecificationFamily.DOCUMENTATION_PLAN]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n /* APPLICATION_WORKS: without a composed shell there is no route to the generated screens (#1493). */\n [ApplicationSpecificationFamily.EXPERIENCE_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n /*\n * APPLICATION_WORKS: a worker the backend delegates to, and a minion that keeps the data true,\n * are part of the product functioning — not of it facing a stranger (#1495). An application whose\n * nightly sweep was never planned works wrongly in a way no screen shows.\n */\n [ApplicationSpecificationFamily.INTEGRATION_PLAN]: WorkbenchCreationOutcome.APPLICATION_WORKS,\n /*\n * `null`, and this one is the most important null in the map (#1496): the maturity reading is a\n * MEASUREMENT OF the outcomes, so counting it toward one would let an application advance for\n * having measured itself. It is also never \"done\" by construction — the next requirement lowers\n * it — so an outcome that waited for it could never complete.\n */\n [ApplicationSpecificationFamily.APPLICATION_MATURITY]: null,\n [ApplicationSpecificationFamily.DOCUMENT_PUBLICATION]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n [ApplicationSpecificationFamily.DOCUMENT_RELEASE_SET]: WorkbenchCreationOutcome.READY_FOR_A_REAL_USER,\n [ApplicationSpecificationFamily.CREATOR_INPUTS]: null,\n /*\n * `null` for the same reason as the dossier: the expert-persona charters STAFF the panels that decide\n * placement and the logo; they say nothing about the product itself, so counting them toward an outcome\n * would move \"application works\" for having hired reviewers (#572).\n */\n [ApplicationSpecificationFamily.EXPERT_PERSONAS]: null,\n};\n\nexport interface CreationOutcomeInputs {\n /** The artifact projection's rows, one per family it knows. */\n readonly artifacts: readonly { readonly family: string; readonly state: WorkbenchSpecificationArtifactState }[];\n /** Every family some playbook reports as stale — the union of `staleOutputs[].family` over the playbook rows. */\n readonly staleFamilies: ReadonlySet<string>;\n /** The build-plan task rows. */\n readonly tasks: readonly { readonly status: WorkbenchBuildPlanTaskStatus }[];\n /**\n * The application's runtimes a live supervisor has paused (`readUnavailableApplicationRuntimes`), or\n * undefined when none could answer (#1537).\n */\n readonly unavailableRuntimes?: readonly string[];\n}\n\n/**\n * Where the application stands, outcome by outcome — always four rows, in reading order. \"Done\" is\n * strict: every family of the outcome landed, valid and not stale; for the application working,\n * every build task landed too; for readiness, every OTHER outcome done as well — an application is\n * not ready for a real user because its documents are published while its build plan is\n * half-landed.\n *\n * A family the projection does not report is not counted against an outcome: the population is the\n * reported rows, filtered through the total map, never the map alone.\n */\nexport function buildCreationOutcomes(input: CreationOutcomeInputs): readonly CreationOutcomeRow[] {\n const isFamily = (value: string): value is ApplicationSpecificationFamily => Object.prototype.hasOwnProperty.call(OUTCOME_BY_FAMILY, value);\n\n const counts = new Map<WorkbenchCreationOutcome, { total: number; landed: number; invalid: number; missing: number; stale: number }>();\n for (const outcome of WORKBENCH_CREATION_OUTCOMES_IN_ORDER) counts.set(outcome, { total: 0, landed: 0, invalid: 0, missing: 0, stale: 0 });\n for (const artifact of input.artifacts) {\n if (!isFamily(artifact.family)) continue;\n const outcome = OUTCOME_BY_FAMILY[artifact.family];\n if (outcome === null) continue;\n const count = counts.get(outcome)!;\n count.total += 1;\n if (artifact.state === WorkbenchSpecificationArtifactState.NOT_LANDED) count.missing += 1;\n else if (artifact.state === WorkbenchSpecificationArtifactState.LANDED_INVALID) count.invalid += 1;\n else if (input.staleFamilies.has(artifact.family)) count.stale += 1;\n else count.landed += 1;\n }\n\n const tasksTotal = input.tasks.length;\n const tasksLanded = input.tasks.filter((task) => task.status === WorkbenchBuildPlanTaskStatus.LANDED).length;\n\n const statusOf = (count: { total: number; landed: number; invalid: number; stale: number }, extraDone: boolean, extraStarted: boolean): WorkbenchCreationOutcomeStatus => {\n const familiesDone = count.total > 0 && count.landed === count.total;\n if (familiesDone && extraDone) return WorkbenchCreationOutcomeStatus.DONE;\n const started = count.landed + count.invalid + count.stale > 0 || extraStarted;\n return started ? WorkbenchCreationOutcomeStatus.IN_PROGRESS : WorkbenchCreationOutcomeStatus.NOT_STARTED;\n };\n\n const rows = new Map<WorkbenchCreationOutcome, CreationOutcomeRow>();\n WORKBENCH_CREATION_OUTCOMES_IN_ORDER.forEach((outcome, position) => {\n const count = counts.get(outcome)!;\n const families = {\n familiesTotal: count.total, familiesLanded: count.landed, familiesInvalid: count.invalid, familiesMissing: count.missing, familiesStale: count.stale,\n };\n if (outcome === WorkbenchCreationOutcome.APPLICATION_WORKS) {\n /*\n * An application that cannot start does not work, whatever has landed (#1537). Measured on the\n * first end-to-end run: the backend was paused by its supervisor for hours while this row read\n * as progress. Never DONE while a runtime is down; still IN_PROGRESS, because the work landed so\n * far is real — the row says what it is, and `unavailableRuntimes` says what stops it.\n */\n const unavailableRuntimes = input.unavailableRuntimes === undefined ? null : [...input.unavailableRuntimes];\n const runtimeDown = unavailableRuntimes !== null && unavailableRuntimes.length > 0;\n rows.set(outcome, {\n outcome, position, ...families, tasksTotal, tasksLanded, unavailableRuntimes,\n status: statusOf(count, tasksTotal > 0 && tasksLanded === tasksTotal && !runtimeDown, tasksLanded > 0 || runtimeDown),\n });\n } else if (outcome === WorkbenchCreationOutcome.READY_FOR_A_REAL_USER) {\n const othersDone = WORKBENCH_CREATION_OUTCOMES_IN_ORDER\n .filter((other) => other !== outcome)\n .every((other) => rows.get(other)?.status === WorkbenchCreationOutcomeStatus.DONE);\n rows.set(outcome, { outcome, position, ...families, tasksTotal: null, tasksLanded: null, unavailableRuntimes: null, status: statusOf(count, othersDone, false) });\n } else {\n rows.set(outcome, { outcome, position, ...families, tasksTotal: null, tasksLanded: null, unavailableRuntimes: null, status: statusOf(count, true, false) });\n }\n });\n return WORKBENCH_CREATION_OUTCOMES_IN_ORDER.map((outcome) => rows.get(outcome)!);\n}\n\n/** The build-plan task rows' status — the one field the outcomes read of them. */\nexport type CreationOutcomeTaskRow = Pick<Workbench_BuildPlanTask, 'status'>;\n"]}
|
|
@@ -1,32 +1,4 @@
|
|
|
1
1
|
import { type ResourceCustomServiceImplementationFactory } from '@wildo-ai/saas-backend-lib';
|
|
2
|
-
/**
|
|
3
|
-
* The creation board's DISPATCHES as custom-operation implementations — Phase 3 of
|
|
4
|
-
* `workbench-creation-board-resources.md` (plan D3).
|
|
5
|
-
*
|
|
6
|
-
* Every handler is `OVERRIDE_ALL`, deliberately and necessarily: the framework pipeline still runs
|
|
7
|
-
* everything a dispatch WANTS from it — authentication, the role gate, request-DTO validation, the
|
|
8
|
-
* `currentObject` preflight READ — and the override returns before everything a derived resource
|
|
9
|
-
* CANNOT give it: the repository write the introspection adapter refuses, and the transaction
|
|
10
|
-
* machinery there is nothing to transact against. The work itself is a delegation to the same
|
|
11
|
-
* companion services the bespoke routes call; those routes survive for the CLI, and both doors now
|
|
12
|
-
* converge on one service seam.
|
|
13
|
-
*
|
|
14
|
-
* ## Identity resolution is a LOOKUP, never a reverse-sanitization
|
|
15
|
-
*
|
|
16
|
-
* An instance-targeted dispatch arrives addressed by the row's SANITIZED id
|
|
17
|
-
* (`top_down__phase-gate`). The sanitizer is not injective in general, so the handlers resolve the
|
|
18
|
-
* business key by matching the sanitized form against the live rows (playbooks: the cached
|
|
19
|
-
* eligibility derivation; write records: the register list) — exact, and refusing honestly when
|
|
20
|
-
* nothing matches.
|
|
21
|
-
*
|
|
22
|
-
* ## Cache invalidation
|
|
23
|
-
*
|
|
24
|
-
* A run or resume that lands files already invalidates the eligibility cache through the write
|
|
25
|
-
* register's mutation seam. The explicit `invalidateDerivedBoards()` after run/resume/dispatch covers
|
|
26
|
-
* the outcomes that DON'T write (a refusal that consumed budget state, a clarification stop, a
|
|
27
|
-
* dispatch that only started a coding run) — the board must not answer "as of before your dispatch"
|
|
28
|
-
* to the person who just dispatched.
|
|
29
|
-
*/
|
|
30
2
|
/**
|
|
31
3
|
* Translate the companion services' NAMED refusals into the transport-honest errors the bespoke
|
|
32
4
|
* routes answer — mirroring the controller's own mapping, so a refusal reads the same through both
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creation-plane-dispatch.custom-impl.companion.service.d.ts","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"creation-plane-dispatch.custom-impl.companion.service.d.ts","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.ts"],"names":[],"mappings":"AAmEA,OAAO,EAML,KAAK,0CAA0C,EAChD,MAAM,4BAA4B,CAAC;AA+EpC;;;;;;;;GAQG;AACH,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,OAAO,EACd,gBAAgB,EAAE,OAAO,EACzB,KAAK,EAAE;IAAE,YAAY,EAAE;QAAE,UAAU,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,CAAA;KAAE,CAAA;CAAE,GACrE,OAAO,CAuFT;AA+nCD;;;;GAIG;AACH,wBAAgB,oCAAoC,IAAI,0CAA0C,EAAE,CA2BnG"}
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import { BuildPlanTaskAppendError, GovernanceQuestionnaireError, PlaybookClarificationError, PlaybookElicitationError, landGovernanceFactDeclarations, } from '@wildo-ai/application-creation-runtime';
|
|
1
|
+
import { BuildPlanTaskAppendError, GovernanceQuestionnaireError, INTERVIEW_ANSWER_PROPOSER_REF, PlaybookClarificationError, PlaybookElicitationError, landGovernanceFactDeclarations, } from '@wildo-ai/application-creation-runtime';
|
|
2
|
+
import { ApplicationCreatorInputAnswerStanding } from '@wildo-ai/saas-specifications/application-creation';
|
|
3
|
+
import { proposeInterviewAnswers } from '../../../meta-workflows/services/interview-answer-proposal.companion.js';
|
|
2
4
|
import { ErrorCustomMessageReference, ErrorType, ResourceOperationVariantType, } from '@wildo-ai/saas-models';
|
|
3
|
-
import { Workbench_AcceptChangesOutcome_Schema, Workbench_AcceptChangesRequest_Schema, Workbench_BuildPlanAddTaskOutcome_Schema, Workbench_BuildPlanAddTaskRequest_Schema, Workbench_BuildPlanDispatchNextRequest_Schema, Workbench_BuildPlanDispatchOutcome_Schema, Workbench_BuildPlanDispatchTaskRequest_Schema, Workbench_DossierAnswerOutcome_Schema, Workbench_DossierAnswerRequest_Schema, WorkbenchDossierEntries_Operations, Workbench_EmptyRequest_Schema, Workbench_GovernanceFactsLandingOutcome_Schema, Workbench_GovernanceFactsLandingRequest_Schema, WorkbenchGovernanceDocuments_Operations, Workbench_CodingRunCancelOutcome_Schema, Workbench_ParkedQuestionAnswerOutcome_Schema, Workbench_ParkedQuestionAnswerRequest_Schema, WorkbenchParkedCodingQuestions_Operations, WorkbenchApplicationSecrets_Operations, Workbench_ApplicationSecretSetRequest_Schema, Workbench_ApplicationSecretChangeOutcome_Schema, splitApplicationSecretRowId, Workbench_PlaybookInterview_Schema, Workbench_RunWriteDiff_Schema, Workbench_TraceArtifact_Schema, Workbench_TraceArtifactRequest_Schema, Workbench_TraceSessionRecord_Schema, Workbench_TraceSessionsForTask_Schema, Workbench_TraceSessionsForTaskRequest_Schema, Workbench_TraceSessionUsage_Schema, WorkbenchTraceSessions_Operations, Workbench_PlaybookResumeRequest_Schema, Workbench_PlaybookRunOutcome_Schema, Workbench_PlaybookRunRequest_Schema, Workbench_RunWriteRevertOutcome_Schema, Workbench_RunWriteRevertRequest_Schema, WorkbenchBuildPlanTasks_Operations, WorkbenchCreationPlaneBehavior, WorkbenchPlaybooks_Operations, WorkbenchRunWriteRecords_Operations, WorkbenchShared_ResourceType, } from '@wildo-ai/platform-core-shared';
|
|
5
|
+
import { Workbench_AcceptChangesOutcome_Schema, Workbench_AcceptChangesRequest_Schema, Workbench_BuildPlanAddTaskOutcome_Schema, Workbench_BuildPlanAddTaskRequest_Schema, Workbench_BuildPlanDispatchNextRequest_Schema, Workbench_BuildPlanDispatchOutcome_Schema, Workbench_BuildPlanDispatchTaskRequest_Schema, Workbench_DossierAnswerOutcome_Schema, Workbench_DossierAnswerRequest_Schema, Workbench_DossierInterviewDepthOutcome_Schema, Workbench_DossierInterviewDepthRequest_Schema, Workbench_DossierProposeOutcome_Schema, Workbench_DossierProposeRequest_Schema, WorkbenchDossierEntries_Operations, WorkbenchDossierProposalScope, Workbench_EmptyRequest_Schema, Workbench_GovernanceFactsLandingOutcome_Schema, Workbench_GovernanceFactsLandingRequest_Schema, WorkbenchGovernanceDocuments_Operations, Workbench_CodingRunCancelOutcome_Schema, Workbench_ParkedQuestionAnswerOutcome_Schema, Workbench_ParkedQuestionAnswerRequest_Schema, WorkbenchParkedCodingQuestions_Operations, WorkbenchApplicationSecrets_Operations, Workbench_ApplicationSecretSetRequest_Schema, Workbench_ApplicationSecretChangeOutcome_Schema, splitApplicationSecretRowId, Workbench_PlaybookInterview_Schema, Workbench_RunWriteDiff_Schema, Workbench_TraceArtifact_Schema, Workbench_TraceArtifactRequest_Schema, Workbench_TraceSessionRecord_Schema, Workbench_TraceSessionsForTask_Schema, Workbench_TraceSessionsForTaskRequest_Schema, Workbench_TraceSessionUsage_Schema, WorkbenchTraceSessions_Operations, Workbench_PlaybookResumeRequest_Schema, Workbench_PlaybookRunOutcome_Schema, Workbench_PlaybookRunRequest_Schema, Workbench_RunWriteRevertOutcome_Schema, Workbench_RunWriteRevertRequest_Schema, WorkbenchBuildPlanTasks_Operations, WorkbenchCreationPlaneBehavior, WorkbenchPlaybooks_Operations, WorkbenchRunWriteRecords_Operations, WorkbenchShared_ResourceType, } from '@wildo-ai/platform-core-shared';
|
|
4
6
|
import { createResourceCustomServiceImplementation, describeCaughtError, SAAS_SERVICE_TYPES, } from '@wildo-ai/saas-backend-lib';
|
|
5
7
|
import { COMPANION_SERVICE_TYPES } from '../../inject/models/service-types.js';
|
|
6
8
|
import { PlaybookRunAlreadyInFlightError, PlaybookNotReadyError, UnknownPlaybookError, } from '../../../meta-workflows/services/playbook-run.companion.service.js';
|
|
7
9
|
import { SupersededPlaybookRunQuestionError, SuspendedPlaybookRunNotFoundError } from '../../../meta-workflows/models/playbook-run-checkpoint.models.js';
|
|
8
10
|
import { CompanionErrorGuidanceKey } from '../../../companion-api/companion-error-guidance.models.js';
|
|
11
|
+
import { assertCreationLanePreflight, CreationLanePreflightRefusedError } from '../../../meta-workflows/services/creation-lane-preflight.companion.service.js';
|
|
9
12
|
import { FoundationExecutionError } from '../../../meta-workflows/services/foundation-executor.companion.service.js';
|
|
10
|
-
import { ApplicationBuildPlanExhaustedError, ApplicationBuildTaskCompletedButUnlandedError, ApplicationBuildTaskNotReadyError, ApplicationBuildPlanUnavailableError, } from '../../../meta-workflows/services/application-build-dispatch.companion.service.js';
|
|
13
|
+
import { ApplicationBuildPlanExhaustedError, ApplicationBuildTaskCompletedButUnlandedError, ApplicationBuildTaskNotReadyError, ApplicationBuildPlanUnavailableError, ApplicationBuildWaveInFlightError, } from '../../../meta-workflows/services/application-build-dispatch.companion.service.js';
|
|
11
14
|
import { CodingRunWritingTheTreeError, NothingToAcceptError } from '../../../claude-cli/services/accepted-change-commit.companion.service.js';
|
|
12
15
|
import { PlaybookRunWriteRecordNotFoundError } from '../../../meta-workflows/services/playbook-run-write-register.companion.service.js';
|
|
13
16
|
import { ExecutionTraceNotFoundError } from '../../../meta-workflows/services/execution-trace-read.companion.service.js';
|
|
17
|
+
import { serializeDossierWrite } from '../../../meta-workflows/services/dossier-write-queue.companion.utils.js';
|
|
14
18
|
import { sanitizeCreationPlaneIdentity, } from './creation-plane-projection.companion.service.js';
|
|
15
19
|
import { CompanionTraceabilityLevel } from '../../traceability/companion-traceability.models.js';
|
|
16
20
|
import { describeSecretsCliFailure, setApplicationSecret, unsetApplicationSecret } from './application-secrets.companion.js';
|
|
17
|
-
import {
|
|
21
|
+
import { reloadCompanionEnvVariables } from '../../runtime/companion-env-file.js';
|
|
18
22
|
import { MetaWorkflow_ClarificationAction } from '@wildo-ai/saas-models/meta-workflows';
|
|
19
23
|
/**
|
|
20
24
|
* The creation board's DISPATCHES as custom-operation implementations — Phase 3 of
|
|
@@ -44,6 +48,15 @@ import { MetaWorkflow_ClarificationAction } from '@wildo-ai/saas-models/meta-wor
|
|
|
44
48
|
* dispatch that only started a coding run) — the board must not answer "as of before your dispatch"
|
|
45
49
|
* to the person who just dispatched.
|
|
46
50
|
*/
|
|
51
|
+
/**
|
|
52
|
+
* The creation preflight at a workbench door that STARTS a run (#2229), asked of this companion's own registry
|
|
53
|
+
* before anything is filed, composed or called. The board offers no way past it: every refusal names configuration
|
|
54
|
+
* the operator holds (a key, a scoped provider), and fixing it is the remedy; the console's `--skip-preflight` is
|
|
55
|
+
* the explicit door for a person who decides to start anyway.
|
|
56
|
+
*/
|
|
57
|
+
function assertCreationLaneReadyForRun(container) {
|
|
58
|
+
assertCreationLanePreflight(container.get(SAAS_SERVICE_TYPES.ExternalProvidersRegistryService));
|
|
59
|
+
}
|
|
47
60
|
/**
|
|
48
61
|
* Translate the companion services' NAMED refusals into the transport-honest errors the bespoke
|
|
49
62
|
* routes answer — mirroring the controller's own mapping, so a refusal reads the same through both
|
|
@@ -80,7 +93,11 @@ export function translateCreationPlaneDispatchError(error, executionContext, uti
|
|
|
80
93
|
/* The run is waiting, on a later round than the one answered (#1584). */
|
|
81
94
|
|| error instanceof SupersededPlaybookRunQuestionError
|
|
82
95
|
/* A person's accept while a coding worker writes the same tree: the moment is wrong, not the request. */
|
|
83
|
-
|| error instanceof CodingRunWritingTheTreeError
|
|
96
|
+
|| error instanceof CodingRunWritingTheTreeError
|
|
97
|
+
/* A build wave while one already runs (#2243): wait for it, then start the next. */
|
|
98
|
+
|| error instanceof ApplicationBuildWaveInFlightError
|
|
99
|
+
/* The lane's providers would be refused (#2229): the configuration forbids the run, not the request. */
|
|
100
|
+
|| error instanceof CreationLanePreflightRefusedError) {
|
|
84
101
|
return builder.buildError(ErrorType.CONFLICT, executionContext, {
|
|
85
102
|
customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_VALIDATION_FAILED,
|
|
86
103
|
context: { message: error.message },
|
|
@@ -205,6 +222,13 @@ function buildPlaybookRunFactory(container) {
|
|
|
205
222
|
* overrides (`fileStillNeededAnswers`); a dry run files nothing; with no signed-in person there
|
|
206
223
|
* is nobody to record an answer against, so the answers ride this run only, as before.
|
|
207
224
|
*/
|
|
225
|
+
// Before the answers are filed: a run that cannot start must not leave a dossier change behind (#2229).
|
|
226
|
+
try {
|
|
227
|
+
assertCreationLaneReadyForRun(container);
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;
|
|
231
|
+
}
|
|
208
232
|
const answeredByRef = executionContext?.initiatorIds?.userId;
|
|
209
233
|
if (request.elicitationAnswers?.length && !request.dryRun && answeredByRef) {
|
|
210
234
|
const dossier = container.get(COMPANION_SERVICE_TYPES.DossierService);
|
|
@@ -334,10 +358,33 @@ function buildDispatchNextFactory(container) {
|
|
|
334
358
|
overrideAll: async (_id, input, executionContext, _operationPath, utils) => {
|
|
335
359
|
const projection = container.get(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);
|
|
336
360
|
const buildDispatchService = container.get(COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService);
|
|
361
|
+
const playbookRunService = container.get(COMPANION_SERVICE_TYPES.PlaybookRunService);
|
|
362
|
+
try {
|
|
363
|
+
assertCreationLaneReadyForRun(container);
|
|
364
|
+
}
|
|
365
|
+
catch (error) {
|
|
366
|
+
throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;
|
|
367
|
+
}
|
|
337
368
|
const dispatchRoute = '/workbench-build-plan-tasks/dispatch-next';
|
|
338
369
|
const session = openDispatchTraceSession(container, dispatchRoute);
|
|
339
370
|
let outcome = 'error';
|
|
340
371
|
try {
|
|
372
|
+
/*
|
|
373
|
+
* A PARALLEL BUILD by default (#2243), as the console's `wildo build run` (#2208): with a build
|
|
374
|
+
* parallelism above one this starts a wave through the same door — refusing first exactly as the
|
|
375
|
+
* one-task dispatch refuses, and refusing a second wave — and answers at submission with the wave.
|
|
376
|
+
* `single: true`, or a parallelism of one, runs the next ready task alone, as before.
|
|
377
|
+
*/
|
|
378
|
+
const wave = input?.single === true
|
|
379
|
+
? undefined
|
|
380
|
+
: await inDispatchTraceSession(container, session, () => playbookRunService.submitBuildWaveDetached(session));
|
|
381
|
+
if (wave !== undefined) {
|
|
382
|
+
outcome = 'success';
|
|
383
|
+
return {
|
|
384
|
+
wave,
|
|
385
|
+
note: `Running a build wave of up to ${wave.degree} tasks at once. Each run appears on the board as it starts and settles.`,
|
|
386
|
+
};
|
|
387
|
+
}
|
|
341
388
|
const result = await inDispatchTraceSession(container, session, () => buildDispatchService.dispatchNextBuildTask(session));
|
|
342
389
|
outcome = 'success';
|
|
343
390
|
return result;
|
|
@@ -387,6 +434,109 @@ function buildRevertWritesFactory(container) {
|
|
|
387
434
|
},
|
|
388
435
|
});
|
|
389
436
|
}
|
|
437
|
+
/** The dossier row an operation is anchored on, or undefined — ONE lookup for the three dossier verbs, so they agree on which rows exist. */
|
|
438
|
+
async function findDossierRow(projection, rowId) {
|
|
439
|
+
const rows = await projection.deriveRows(WorkbenchCreationPlaneBehavior.DOSSIER_ENTRIES);
|
|
440
|
+
return rows.find((candidate) => candidate.workbenchDossierEntryId === rowId);
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* PROPOSE answers for the step a dossier row belongs to (#2129) — the workbench's door to the SAME proposer the
|
|
444
|
+
* console uses (`proposeInterviewAnswers`), so a proposal reads the same in both. Writes nothing; each proposal
|
|
445
|
+
* names the row it answers, so a kept one is sent through ANSWER with `assumed`.
|
|
446
|
+
*/
|
|
447
|
+
function buildDossierProposeFactory(container) {
|
|
448
|
+
return createResourceCustomServiceImplementation({
|
|
449
|
+
operationPath: {
|
|
450
|
+
...CREATION_PLANE_DISPATCH_PATH_BASE,
|
|
451
|
+
resourceIdentifier: WorkbenchShared_ResourceType.DOSSIER_ENTRIES,
|
|
452
|
+
operationIdentifier: WorkbenchDossierEntries_Operations.PROPOSE_ANSWERS,
|
|
453
|
+
},
|
|
454
|
+
requestDtoSchema: Workbench_DossierProposeRequest_Schema,
|
|
455
|
+
responseDtoSchema: Workbench_DossierProposeOutcome_Schema,
|
|
456
|
+
debugLabel: 'creation-plane.dossier-entries.propose-answers',
|
|
457
|
+
handlers: {
|
|
458
|
+
overrideAll: async (id, input, executionContext, _operationPath, utils) => {
|
|
459
|
+
const projection = container.get(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);
|
|
460
|
+
const dossier = container.get(COMPANION_SERVICE_TYPES.DossierService);
|
|
461
|
+
const runs = container.get(COMPANION_SERVICE_TYPES.PlaybookRunService);
|
|
462
|
+
const row = await findDossierRow(projection, String(id ?? ''));
|
|
463
|
+
if (!row) {
|
|
464
|
+
throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {
|
|
465
|
+
customMessageReference: ErrorCustomMessageReference.NOT_FOUND,
|
|
466
|
+
context: { message: `No dossier question matches id "${String(id ?? '')}".` },
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
const request = Workbench_DossierProposeRequest_Schema.parse(input ?? {});
|
|
470
|
+
const instanceKey = typeof row.instanceKey === 'string' ? row.instanceKey : undefined;
|
|
471
|
+
try {
|
|
472
|
+
const result = await proposeInterviewAnswers(runs.interviewAnswerProposalPorts(), {
|
|
473
|
+
playbookRef: String(row.playbookRef),
|
|
474
|
+
...(instanceKey !== undefined ? { instanceKey } : {}),
|
|
475
|
+
...(request.scope === WorkbenchDossierProposalScope.THIS_QUESTION ? { questionRefs: [String(row.questionRef)] } : {}),
|
|
476
|
+
});
|
|
477
|
+
/* Each proposal names the row it answers: the step's (or this instance's) row for that question. */
|
|
478
|
+
const rows = await projection.deriveRows(WorkbenchCreationPlaneBehavior.DOSSIER_ENTRIES);
|
|
479
|
+
const rowIdOf = (questionRef) => rows.find((candidate) => candidate.playbookRef === row.playbookRef
|
|
480
|
+
&& candidate.questionRef === questionRef && candidate.instanceKey === (instanceKey ?? null))?.workbenchDossierEntryId;
|
|
481
|
+
/*
|
|
482
|
+
* A proposal whose row this interview cannot show (the question moved under a shared decision's owner,
|
|
483
|
+
* or the dossier changed meanwhile) is handed back as UNPROPOSED, never dropped: a dropped one would
|
|
484
|
+
* leave its question in the review step, proposed and dropped again on every attempt.
|
|
485
|
+
*/
|
|
486
|
+
const mapped = result.proposals.map((proposal) => ({ proposal, workbenchDossierEntryId: rowIdOf(proposal.questionRef) }));
|
|
487
|
+
return {
|
|
488
|
+
proposals: mapped.flatMap(({ proposal, workbenchDossierEntryId }) => (workbenchDossierEntryId === undefined ? [] : [{ ...proposal, workbenchDossierEntryId }])),
|
|
489
|
+
unproposed: [
|
|
490
|
+
...result.unproposed,
|
|
491
|
+
...mapped.filter(({ workbenchDossierEntryId }) => workbenchDossierEntryId === undefined)
|
|
492
|
+
.map(({ proposal }) => ({ questionRef: proposal.questionRef, reason: 'This interview does not show that question; answer it where it is asked.' })),
|
|
493
|
+
],
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
catch (error) {
|
|
497
|
+
throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
},
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
/** Choose how deep this application's interviews go (#2129): one dossier write, from the interview where it was asked. */
|
|
504
|
+
function buildDossierInterviewDepthFactory(container) {
|
|
505
|
+
return createResourceCustomServiceImplementation({
|
|
506
|
+
operationPath: {
|
|
507
|
+
...CREATION_PLANE_DISPATCH_PATH_BASE,
|
|
508
|
+
resourceIdentifier: WorkbenchShared_ResourceType.DOSSIER_ENTRIES,
|
|
509
|
+
operationIdentifier: WorkbenchDossierEntries_Operations.SET_INTERVIEW_DEPTH,
|
|
510
|
+
},
|
|
511
|
+
requestDtoSchema: Workbench_DossierInterviewDepthRequest_Schema,
|
|
512
|
+
responseDtoSchema: Workbench_DossierInterviewDepthOutcome_Schema,
|
|
513
|
+
debugLabel: 'creation-plane.dossier-entries.set-interview-depth',
|
|
514
|
+
handlers: {
|
|
515
|
+
overrideAll: async (id, input, executionContext, _operationPath, utils) => {
|
|
516
|
+
const projection = container.get(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);
|
|
517
|
+
const dossier = container.get(COMPANION_SERVICE_TYPES.DossierService);
|
|
518
|
+
const row = await findDossierRow(projection, String(id ?? ''));
|
|
519
|
+
if (!row) {
|
|
520
|
+
throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {
|
|
521
|
+
customMessageReference: ErrorCustomMessageReference.NOT_FOUND,
|
|
522
|
+
context: { message: `No dossier question matches id "${String(id ?? '')}".` },
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
const request = Workbench_DossierInterviewDepthRequest_Schema.parse(input ?? {});
|
|
526
|
+
try {
|
|
527
|
+
return await dossier.recordInterviewDepth(request.interviewDepth);
|
|
528
|
+
}
|
|
529
|
+
catch (error) {
|
|
530
|
+
throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;
|
|
531
|
+
}
|
|
532
|
+
finally {
|
|
533
|
+
/* Every row carries the depth, and a simple interview asks fewer of them: the boards move. */
|
|
534
|
+
projection.invalidateDerivedBoards();
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
},
|
|
538
|
+
});
|
|
539
|
+
}
|
|
390
540
|
/**
|
|
391
541
|
* `answer` on the DOSSIER (#1454, Step 5): record the creator's answer to the question this row IS.
|
|
392
542
|
*
|
|
@@ -412,8 +562,7 @@ function buildDossierAnswerFactory(container) {
|
|
|
412
562
|
const projection = container.get(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService);
|
|
413
563
|
const dossier = container.get(COMPANION_SERVICE_TYPES.DossierService);
|
|
414
564
|
const rowId = String(id ?? '');
|
|
415
|
-
const
|
|
416
|
-
const row = rows.find((candidate) => candidate.workbenchDossierEntryId === rowId);
|
|
565
|
+
const row = await findDossierRow(projection, rowId);
|
|
417
566
|
if (!row) {
|
|
418
567
|
throw utils.errorBuilder.buildError(ErrorType.NOT_FOUND, executionContext, {
|
|
419
568
|
customMessageReference: ErrorCustomMessageReference.NOT_FOUND,
|
|
@@ -436,7 +585,13 @@ function buildDossierAnswerFactory(container) {
|
|
|
436
585
|
/* An instance's row files the instance's own answer (#1609); the step's row files the step's. */
|
|
437
586
|
...(typeof row.instanceKey === 'string' ? { instanceKey: row.instanceKey } : {}),
|
|
438
587
|
value: String(request.value ?? ''),
|
|
439
|
-
|
|
588
|
+
/*
|
|
589
|
+
* A kept proposal (#2129) is the PROPOSER's answer, assumed: the signed-in person let it stand, they
|
|
590
|
+
* did not decide it. The person is still required above — someone must have been there to keep it.
|
|
591
|
+
*/
|
|
592
|
+
answeredByRef: request.assumed === true ? INTERVIEW_ANSWER_PROPOSER_REF : answeredByRef,
|
|
593
|
+
...(request.assumed === true ? { standing: ApplicationCreatorInputAnswerStanding.ASSUMED } : {}),
|
|
594
|
+
...(request.assumptionRationale !== undefined ? { assumptionRationale: request.assumptionRationale } : {}),
|
|
440
595
|
});
|
|
441
596
|
return {
|
|
442
597
|
value: result.answer.value,
|
|
@@ -529,6 +684,12 @@ function buildDispatchTaskFactory(container) {
|
|
|
529
684
|
context: { message: `No build-plan task matches id "${rowId}".` },
|
|
530
685
|
});
|
|
531
686
|
}
|
|
687
|
+
try {
|
|
688
|
+
assertCreationLaneReadyForRun(container);
|
|
689
|
+
}
|
|
690
|
+
catch (error) {
|
|
691
|
+
throw translateCreationPlaneDispatchError(error, executionContext, utils) ?? error;
|
|
692
|
+
}
|
|
532
693
|
const request = (input ?? {});
|
|
533
694
|
const dispatchRoute = `/workbench-build-plan-tasks/${rowId}/dispatch-task`;
|
|
534
695
|
const session = openDispatchTraceSession(container, dispatchRoute);
|
|
@@ -963,15 +1124,25 @@ function buildGovernanceFactsLandingFactory(container) {
|
|
|
963
1124
|
});
|
|
964
1125
|
}
|
|
965
1126
|
try {
|
|
966
|
-
/*
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1127
|
+
/*
|
|
1128
|
+
* The authored facts as LANDED, for the merge — read through the same aggregate every reader uses. The read
|
|
1129
|
+
* and the write are one dossier write, queued with every other (#2179): taken apart, a concurrent landing
|
|
1130
|
+
* would build on the same read and one of the two would lose its facts.
|
|
1131
|
+
*
|
|
1132
|
+
* NOT pinned here: the pin is on the controller door of the same shape
|
|
1133
|
+
* (`dossier-concurrent-doors.package-mode.test.ts`, "two governance-fact landings at the same moment").
|
|
1134
|
+
* Removing the queue from THIS door alone leaves every test green.
|
|
1135
|
+
*/
|
|
1136
|
+
return await serializeDossierWrite(specificationsPackageRoot, async () => {
|
|
1137
|
+
const current = await dossier.readAuthoredDocumentFacts();
|
|
1138
|
+
return landGovernanceFactDeclarations({
|
|
1139
|
+
specificationsPackageRoot,
|
|
1140
|
+
// NEUTRAL BY CONTRACT (issue #65), same as every other landed constant — app identity lives in VALUES.
|
|
1141
|
+
constantPrefix: 'application',
|
|
1142
|
+
answers: request,
|
|
1143
|
+
...(current === undefined ? {} : { current }),
|
|
1144
|
+
...(dryRun === true ? { dryRun: true } : {}),
|
|
1145
|
+
});
|
|
975
1146
|
});
|
|
976
1147
|
}
|
|
977
1148
|
catch (error) {
|
|
@@ -1038,8 +1209,7 @@ function buildApplicationSecretChangeFactory(container, operation) {
|
|
|
1038
1209
|
*/
|
|
1039
1210
|
if (outcome.companionAppliesChange && outcome.envFilesRegenerated) {
|
|
1040
1211
|
try {
|
|
1041
|
-
|
|
1042
|
-
await container.get(SAAS_SERVICE_TYPES.ExternalProvidersRegistryService).refreshFromConfig();
|
|
1212
|
+
await reloadCompanionEnvVariables([outcome.envVarName], container.get(SAAS_SERVICE_TYPES.ExternalProvidersRegistryService));
|
|
1043
1213
|
}
|
|
1044
1214
|
catch (error) {
|
|
1045
1215
|
const failure = `${outcome.envVarName} is saved, but the companion could not apply it now (${describeCaughtError(error)}); `
|
|
@@ -1081,6 +1251,9 @@ export function createCreationPlaneDispatchFactories() {
|
|
|
1081
1251
|
(_registry, container) => buildApplicationSecretChangeFactory(container, WorkbenchApplicationSecrets_Operations.SET),
|
|
1082
1252
|
(_registry, container) => buildApplicationSecretChangeFactory(container, WorkbenchApplicationSecrets_Operations.UNSET),
|
|
1083
1253
|
(_registry, container) => buildGovernanceFactsLandingFactory(container),
|
|
1254
|
+
/* #2129 — appended LAST so every earlier factory keeps its position. */
|
|
1255
|
+
(_registry, container) => buildDossierProposeFactory(container),
|
|
1256
|
+
(_registry, container) => buildDossierInterviewDepthFactory(container),
|
|
1084
1257
|
];
|
|
1085
1258
|
}
|
|
1086
1259
|
//# sourceMappingURL=creation-plane-dispatch.custom-impl.companion.service.js.map
|