@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":"expert-persona-brief.renderer.js","sourceRoot":"","sources":["../../../../../../src/core/introspection/subprocess/expert-persona-brief.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,GAQvB,MAAM,+BAA+B,CAAC;AAoCvC,MAAM,IAAI,GAAG,UAAU,CAAC;AAExB,SAAS,KAAK,CAAC,GAAG,KAA+C;IAC/D,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxG,CAAC;AAED,SAAS,OAAO,CAAC,KAAe,EAAE,QAAgB,IAAI;IACpD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClF,CAAC;AAED,kEAAkE;AA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wB,CAAC,aAAa,CAAC,CAAC;IAC3G,MAAM,QAAQ,GAAG,OAAO,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;IACpE,IAAI,QAAQ;QAAE,MAAM,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,GAAG,4BAA4B,CAAC,QAAQ,CAAC,CAAC;IACzG,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import {\n ExpertShapingInputKind,\n type BrandAssetConfig,\n type BrandSnapshot,\n type BusinessModelLiteSnapshot,\n type MarketICPConfig,\n type MarketSnapshot,\n type RequirementsSnapshot,\n type VisionSnapshot,\n} from '@wildo-ai/saas-specifications';\n\n/**\n * Pure per-kind CURATORS that render each expert-persona shaping input as a\n * compact English **markdown brief** — the input-curation half of the\n * derivation-quality rework (Quality Track Lever 2).\n *\n * WHY THIS EXISTS: the first derivation protocol dumped each snapshot as RAW\n * JSON into the prompt. That buried the signal (a MarketSnapshot carries\n * Kano matrices, message templates, buying journeys — none of which shape a\n * persona), spent attention on keys instead of meaning, and made the prompt\n * unreadable for the human reviewing what the model was grounded on. Each\n * curator here selects the persona-relevant FACETS and renders them as\n * prose/bullets, mirroring the `buildMarketContextBlock` discipline:\n *\n * - **Pure function** — no I/O, no DI, deterministic output for equal input\n * (the derivation digest is computed OVER these briefs, so determinism is\n * load-bearing: \"a digest match always means derived from what the model\n * actually saw\").\n * - **Deliberate omissions are the point** — what a curator drops (e.g.\n * market channels, buying journeys, benefit Kano tables) is a curation\n * DECISION, recorded here, not an accident of serialization.\n * - **Empty sections render `_(none)_`** so the model sees absence instead\n * of silently inferring it.\n */\n\n/** Renderable value union the orchestrator dispatches on (kind-discriminated). */\nexport interface ExpertPersonaBriefSources {\n [ExpertShapingInputKind.VISION]?: VisionSnapshot;\n [ExpertShapingInputKind.MARKET]?: MarketSnapshot;\n [ExpertShapingInputKind.BRAND]?: BrandSnapshot;\n [ExpertShapingInputKind.REQUIREMENTS]?: RequirementsSnapshot;\n [ExpertShapingInputKind.BUSINESS_MODEL]?: BusinessModelLiteSnapshot;\n [ExpertShapingInputKind.ACCEPTED_DECISIONS]?: BrandAssetConfig[];\n}\n\nconst NONE = '_(none)_';\n\nfunction lines(...parts: Array<string | undefined | null | false>): string {\n return parts.filter((part): part is string => typeof part === 'string' && part.length > 0).join('\\n');\n}\n\nfunction bullets(items: string[], empty: string = NONE): string {\n return items.length === 0 ? empty : items.map((item) => `- ${item}`).join('\\n');\n}\n\n/** Render the VISION snapshot: the WHY the persona must serve. */\nexport function renderVisionBrief(vision: VisionSnapshot): string {\n const success = vision.successCriteria.map((criterion) =>\n `${criterion.statement}${criterion.metric ? ` (metric: ${criterion.metric}${criterion.target ? `, target: ${criterion.target}` : ''})` : ''}`);\n const constraints = vision.constraints.map((constraint) =>\n `[${constraint.kind}] ${constraint.statement}${constraint.rationale ? ` — ${constraint.rationale}` : ''}`);\n return lines(\n '### Vision',\n `**Idea:** ${vision.idea.oneLiner}`,\n vision.idea.description,\n vision.problem && `**Problem:** ${vision.problem.statement} (affects: ${vision.problem.affected})`,\n vision.problem?.whyNow && `**Why now:** ${vision.problem.whyNow}`,\n vision.mission && `**Mission:** ${vision.mission.mission}`,\n vision.mission?.longTermVision && `**Long-term:** ${vision.mission.longTermVision}`,\n vision.mission && vision.mission.principles.length > 0\n ? `**Principles:**\\n${bullets(vision.mission.principles)}` : undefined,\n `**Success criteria:**`,\n bullets(success),\n `**Constraints:**`,\n bullets(constraints),\n );\n}\n\n/**\n * Render the MARKET snapshot's persona-relevant facets: category,\n * positioning, ICPs (with their linked pains/gains/jobs STATEMENTS —\n * resolved through the snapshot's ref maps so the model reads meaning, not\n * refs), buyer personas, tones of voice, named alternatives, objections.\n *\n * DELIBERATELY DROPPED (curation decisions, not omissions): channels,\n * triggers, buying journeys, proofs, and the benefits' per-ICP Kano\n * matrices — distribution/funnel machinery that does not shape a creative\n * persona's judgment.\n */\nexport function renderMarketBrief(market: MarketSnapshot): string {\n const painByRef = new Map(market.pains.map((pain) => [pain.ref, pain]));\n const gainByRef = new Map(market.gains.map((gain) => [gain.ref, gain]));\n const jobByRef = new Map(market.jobs.map((job) => [job.ref, job]));\n\n const renderIcp = (icp: MarketICPConfig): string => {\n const pains = icp.pains\n .map((edge) => painByRef.get(edge.painRef)?.statement)\n .filter((statement): statement is string => statement !== undefined);\n const gains = icp.gains\n .map((edge) => gainByRef.get(edge.gainRef)?.statement)\n .filter((statement): statement is string => statement !== undefined);\n const jobs = icp.jobs\n .map((edge) => jobByRef.get(edge.jobRef)?.statement)\n .filter((statement): statement is string => statement !== undefined);\n return lines(\n `#### ICP: ${icp.name} (${icp.archetype}, priority: ${icp.priority})`,\n jobs.length > 0 ? `Jobs: ${jobs.join(' · ')}` : undefined,\n pains.length > 0 ? `Pains: ${pains.join(' · ')}` : undefined,\n gains.length > 0 ? `Gains: ${gains.join(' · ')}` : undefined,\n );\n };\n\n const positionings = market.positionings.map((positioning) =>\n `- ${positioning.oneSentence}\\n Pillars: ${positioning.valuePillars.map((pillar) => pillar.headline).join(' · ')}`);\n\n const voices = market.tonesOfVoice.map((voice) =>\n `- **${voice.name}** — ${voice.description}\\n Do: ${voice.doExamples.join(' | ')}\\n Don't: ${voice.dontExamples.join(' | ')}`);\n\n const alternatives = market.alternatives.map((alternative) =>\n `- **${alternative.name}** (${alternative.alternativeKind}) — chosen when: ${alternative.whenChosen}. Strengths: ${alternative.strengths.join(', ')}${alternative.weaknesses.length > 0 ? `. Weaknesses: ${alternative.weaknesses.join(', ')}` : ''}`);\n\n const objections = market.objections.map((objection) => {\n const record = objection as unknown as Record<string, unknown>;\n const text = record['statement'] ?? record['objection'] ?? record['description'];\n return typeof text === 'string' ? text : '';\n }).filter((text) => text.length > 0);\n\n return lines(\n '### Market',\n `**Category:** ${market.category.name}${'description' in market.category && typeof (market.category as Record<string, unknown>)['description'] === 'string' ? ` — ${(market.category as unknown as Record<string, string>)['description']}` : ''}`,\n '**Positioning:**',\n positionings.length > 0 ? positionings.join('\\n') : NONE,\n '**ICPs:**',\n market.icps.length > 0 ? market.icps.map(renderIcp).join('\\n') : NONE,\n '**Tones of voice:**',\n voices.length > 0 ? voices.join('\\n') : NONE,\n '**Named alternatives (the field to escape):**',\n alternatives.length > 0 ? alternatives.join('\\n') : NONE,\n objections.length > 0 ? `**Common objections:**\\n${bullets(objections)}` : undefined,\n );\n}\n\n/** Render the BRAND snapshot: authored direction + what already shipped. */\nexport function renderBrandBrief(brand: BrandSnapshot): string {\n const direction = brand.logoDirection;\n const tone = brand.visualTone;\n return lines(\n '### Brand',\n `**Name:** ${brand.name.brandName}${brand.name.tagline ? ` — \"${brand.name.tagline}\"` : ''}`,\n direction && `**Mark type:** ${direction.markType} · background: ${direction.backgroundTreatment}`,\n direction && direction.symbolism.length > 0 ? `**Symbolism:** ${direction.symbolism.join(', ')}` : undefined,\n direction && direction.motifs.length > 0 ? `**Motifs:** ${direction.motifs.join(', ')}` : undefined,\n direction && direction.avoid.length > 0 ? `**Avoid-list (hard bans):**\\n${bullets(direction.avoid)}` : undefined,\n tone && `**Visual tone:** ${tone.styleKeywords.join(', ')} · mood: ${tone.mood}`,\n tone && `**Color intent:** ${tone.colorIntent}${tone.colorSeeds.length > 0 ? ` (palette: ${tone.colorSeeds.join(', ')})` : ''}`,\n );\n}\n\n/** Render REQUIREMENTS: what the product actually does (the floor for honest claims). */\nexport function renderRequirementsBrief(requirements: RequirementsSnapshot): string {\n const functional = requirements.functional.map((requirement) => requirement.statement);\n const nonFunctional = requirements.nonFunctional.map((requirement) =>\n `[${requirement.kind}] ${requirement.statement}${requirement.metric ? ` (${requirement.metric})` : ''}`);\n return lines(\n '### Requirements (what the product actually does)',\n '**Functional:**',\n bullets(functional),\n '**Non-functional:**',\n bullets(nonFunctional),\n );\n}\n\n/** Render BUSINESS_MODEL: the offer posture (premium demands different codes than accessible). */\nexport function renderBusinessModelBrief(businessModel: BusinessModelLiteSnapshot): string {\n const plans = businessModel.plans.map((plan) =>\n `- **${plan.name}**${plan.pricePoint ? ` — ${plan.pricePoint}${plan.billingPeriod ? `/${plan.billingPeriod}` : ''}` : ''}${plan.targetSummary ? ` · for: ${plan.targetSummary}` : ''}${plan.includes ? ` · includes: ${plan.includes}` : ''}`);\n return lines(\n '### Business model',\n businessModel.revenueModel ? `**Revenue model:** ${businessModel.revenueModel}` : undefined,\n '**Plans:**',\n plans.length > 0 ? plans.join('\\n') : NONE,\n );\n}\n\n/** Render ACCEPTED_DECISIONS: the shipped brand assets new work must cohere with. */\nexport function renderAcceptedDecisionsBrief(assets: BrandAssetConfig[]): string {\n const rendered = assets.map((asset) =>\n `- ${asset.ref}: ${asset.composition}/${asset.theme}/${asset.purpose} ${asset.format}${asset.width && asset.height ? ` ${asset.width}×${asset.height}` : ''}${asset.derivedFrom ? ` (derived from ${asset.derivedFrom})` : ' (generated primary)'}`);\n return lines(\n '### Accepted decisions (already shipped — new work must cohere)',\n rendered.length > 0 ? rendered.join('\\n') : NONE,\n );\n}\n\n/**\n * Orchestrator: render every requested-and-present kind to its brief.\n * DESIGN_SYSTEM is absent by contract — it lives in the frontend service and\n * the PARENT composes+renders it (see the companion service's curator).\n */\nexport function renderShapingInputBriefs(\n sources: ExpertPersonaBriefSources,\n): Partial<Record<ExpertShapingInputKind, string>> {\n const briefs: Partial<Record<ExpertShapingInputKind, string>> = {};\n const vision = sources[ExpertShapingInputKind.VISION];\n if (vision) briefs[ExpertShapingInputKind.VISION] = renderVisionBrief(vision);\n const market = sources[ExpertShapingInputKind.MARKET];\n if (market) briefs[ExpertShapingInputKind.MARKET] = renderMarketBrief(market);\n const brand = sources[ExpertShapingInputKind.BRAND];\n if (brand) briefs[ExpertShapingInputKind.BRAND] = renderBrandBrief(brand);\n const requirements = sources[ExpertShapingInputKind.REQUIREMENTS];\n if (requirements) briefs[ExpertShapingInputKind.REQUIREMENTS] = renderRequirementsBrief(requirements);\n const businessModel = sources[ExpertShapingInputKind.BUSINESS_MODEL];\n if (businessModel) briefs[ExpertShapingInputKind.BUSINESS_MODEL] = renderBusinessModelBrief(businessModel);\n const accepted = sources[ExpertShapingInputKind.ACCEPTED_DECISIONS];\n if (accepted) briefs[ExpertShapingInputKind.ACCEPTED_DECISIONS] = renderAcceptedDecisionsBrief(accepted);\n return briefs;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"expert-persona-brief.renderer.js","sourceRoot":"","sources":["../../../../../../src/core/introspection/subprocess/expert-persona-brief.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,yBAAyB,GAQ1B,MAAM,+BAA+B,CAAC;AAoCvC,MAAM,IAAI,GAAG,UAAU,CAAC;AAExB,SAAS,KAAK,CAAC,GAAG,KAA+C;IAC/D,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxG,CAAC;AAED,SAAS,OAAO,CAAC,KAAe,EAAE,QAAgB,IAAI;IACpD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClF,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,iBAAiB,CAAC,MAAsB;IACtD,MAAM,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CACvD,GAAG,SAAS,CAAC,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EA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G,MAAM,QAAQ,GAAG,OAAO,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;IACpE,IAAI,QAAQ;QAAE,MAAM,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,GAAG,4BAA4B,CAAC,QAAQ,CAAC,CAAC;IACzG,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import {\n ExpertShapingInputKind,\n PricingTiersStatus,\n resolvePricingTiersStatus,\n type BrandAssetConfig,\n type BrandSnapshot,\n type BusinessModelLiteSnapshot,\n type MarketICPConfig,\n type MarketSnapshot,\n type RequirementsSnapshot,\n type VisionSnapshot,\n} from '@wildo-ai/saas-specifications';\n\n/**\n * Pure per-kind CURATORS that render each expert-persona shaping input as a\n * compact English **markdown brief** — the input-curation half of the\n * derivation-quality rework (Quality Track Lever 2).\n *\n * WHY THIS EXISTS: the first derivation protocol dumped each snapshot as RAW\n * JSON into the prompt. That buried the signal (a MarketSnapshot carries\n * Kano matrices, message templates, buying journeys — none of which shape a\n * persona), spent attention on keys instead of meaning, and made the prompt\n * unreadable for the human reviewing what the model was grounded on. Each\n * curator here selects the persona-relevant FACETS and renders them as\n * prose/bullets, mirroring the `buildMarketContextBlock` discipline:\n *\n * - **Pure function** — no I/O, no DI, deterministic output for equal input\n * (the derivation digest is computed OVER these briefs, so determinism is\n * load-bearing: \"a digest match always means derived from what the model\n * actually saw\").\n * - **Deliberate omissions are the point** — what a curator drops (e.g.\n * market channels, buying journeys, benefit Kano tables) is a curation\n * DECISION, recorded here, not an accident of serialization.\n * - **Empty sections render `_(none)_`** so the model sees absence instead\n * of silently inferring it.\n */\n\n/** Renderable value union the orchestrator dispatches on (kind-discriminated). */\nexport interface ExpertPersonaBriefSources {\n [ExpertShapingInputKind.VISION]?: VisionSnapshot;\n [ExpertShapingInputKind.MARKET]?: MarketSnapshot;\n [ExpertShapingInputKind.BRAND]?: BrandSnapshot;\n [ExpertShapingInputKind.REQUIREMENTS]?: RequirementsSnapshot;\n [ExpertShapingInputKind.BUSINESS_MODEL]?: BusinessModelLiteSnapshot;\n [ExpertShapingInputKind.ACCEPTED_DECISIONS]?: BrandAssetConfig[];\n}\n\nconst NONE = '_(none)_';\n\nfunction lines(...parts: Array<string | undefined | null | false>): string {\n return parts.filter((part): part is string => typeof part === 'string' && part.length > 0).join('\\n');\n}\n\nfunction bullets(items: string[], empty: string = NONE): string {\n return items.length === 0 ? empty : items.map((item) => `- ${item}`).join('\\n');\n}\n\n/** Render the VISION snapshot: the WHY the persona must serve. */\nexport function renderVisionBrief(vision: VisionSnapshot): string {\n const success = vision.successCriteria.map((criterion) =>\n `${criterion.statement}${criterion.metric ? ` (metric: ${criterion.metric}${criterion.target ? `, target: ${criterion.target}` : ''})` : ''}`);\n const constraints = vision.constraints.map((constraint) =>\n `[${constraint.kind}] ${constraint.statement}${constraint.rationale ? ` — ${constraint.rationale}` : ''}`);\n return lines(\n '### Vision',\n `**Idea:** ${vision.idea.oneLiner}`,\n vision.idea.description,\n vision.problem && `**Problem:** ${vision.problem.statement} (affects: ${vision.problem.affected})`,\n vision.problem?.whyNow && `**Why now:** ${vision.problem.whyNow}`,\n vision.mission && `**Mission:** ${vision.mission.mission}`,\n vision.mission?.longTermVision && `**Long-term:** ${vision.mission.longTermVision}`,\n vision.mission && vision.mission.principles.length > 0\n ? `**Principles:**\\n${bullets(vision.mission.principles)}` : undefined,\n `**Success criteria:**`,\n bullets(success),\n `**Constraints:**`,\n bullets(constraints),\n );\n}\n\n/**\n * Render the MARKET snapshot's persona-relevant facets: category,\n * positioning, ICPs (with their linked pains/gains/jobs STATEMENTS —\n * resolved through the snapshot's ref maps so the model reads meaning, not\n * refs), buyer personas, tones of voice, named alternatives, objections.\n *\n * DELIBERATELY DROPPED (curation decisions, not omissions): channels,\n * triggers, buying journeys, proofs, and the benefits' per-ICP Kano\n * matrices — distribution/funnel machinery that does not shape a creative\n * persona's judgment.\n */\nexport function renderMarketBrief(market: MarketSnapshot): string {\n const painByRef = new Map(market.pains.map((pain) => [pain.ref, pain]));\n const gainByRef = new Map(market.gains.map((gain) => [gain.ref, gain]));\n const jobByRef = new Map(market.jobs.map((job) => [job.ref, job]));\n\n const renderIcp = (icp: MarketICPConfig): string => {\n const pains = icp.pains\n .map((edge) => painByRef.get(edge.painRef)?.statement)\n .filter((statement): statement is string => statement !== undefined);\n const gains = icp.gains\n .map((edge) => gainByRef.get(edge.gainRef)?.statement)\n .filter((statement): statement is string => statement !== undefined);\n const jobs = icp.jobs\n .map((edge) => jobByRef.get(edge.jobRef)?.statement)\n .filter((statement): statement is string => statement !== undefined);\n return lines(\n `#### ICP: ${icp.name} (${icp.archetype}, priority: ${icp.priority})`,\n jobs.length > 0 ? `Jobs: ${jobs.join(' · ')}` : undefined,\n pains.length > 0 ? `Pains: ${pains.join(' · ')}` : undefined,\n gains.length > 0 ? `Gains: ${gains.join(' · ')}` : undefined,\n );\n };\n\n const positionings = market.positionings.map((positioning) =>\n `- ${positioning.oneSentence}\\n Pillars: ${positioning.valuePillars.map((pillar) => pillar.headline).join(' · ')}`);\n\n const voices = market.tonesOfVoice.map((voice) =>\n `- **${voice.name}** — ${voice.description}\\n Do: ${voice.doExamples.join(' | ')}\\n Don't: ${voice.dontExamples.join(' | ')}`);\n\n const alternatives = market.alternatives.map((alternative) =>\n `- **${alternative.name}** (${alternative.alternativeKind}) — chosen when: ${alternative.whenChosen}. Strengths: ${alternative.strengths.join(', ')}${alternative.weaknesses.length > 0 ? `. Weaknesses: ${alternative.weaknesses.join(', ')}` : ''}`);\n\n const objections = market.objections.map((objection) => {\n const record = objection as unknown as Record<string, unknown>;\n const text = record['statement'] ?? record['objection'] ?? record['description'];\n return typeof text === 'string' ? text : '';\n }).filter((text) => text.length > 0);\n\n return lines(\n '### Market',\n `**Category:** ${market.category.name}${'description' in market.category && typeof (market.category as Record<string, unknown>)['description'] === 'string' ? ` — ${(market.category as unknown as Record<string, string>)['description']}` : ''}`,\n '**Positioning:**',\n positionings.length > 0 ? positionings.join('\\n') : NONE,\n '**ICPs:**',\n market.icps.length > 0 ? market.icps.map(renderIcp).join('\\n') : NONE,\n '**Tones of voice:**',\n voices.length > 0 ? voices.join('\\n') : NONE,\n '**Named alternatives (the field to escape):**',\n alternatives.length > 0 ? alternatives.join('\\n') : NONE,\n objections.length > 0 ? `**Common objections:**\\n${bullets(objections)}` : undefined,\n );\n}\n\n/** Render the BRAND snapshot: authored direction + what already shipped. */\nexport function renderBrandBrief(brand: BrandSnapshot): string {\n const direction = brand.logoDirection;\n const tone = brand.visualTone;\n return lines(\n '### Brand',\n `**Name:** ${brand.name.brandName}${brand.name.tagline ? ` — \"${brand.name.tagline}\"` : ''}`,\n direction && `**Mark type:** ${direction.markType} · background: ${direction.backgroundTreatment}`,\n direction && direction.symbolism.length > 0 ? `**Symbolism:** ${direction.symbolism.join(', ')}` : undefined,\n direction && direction.motifs.length > 0 ? `**Motifs:** ${direction.motifs.join(', ')}` : undefined,\n direction && direction.avoid.length > 0 ? `**Avoid-list (hard bans):**\\n${bullets(direction.avoid)}` : undefined,\n tone && `**Visual tone:** ${tone.styleKeywords.join(', ')} · mood: ${tone.mood}`,\n tone && `**Color intent:** ${tone.colorIntent}${tone.colorSeeds.length > 0 ? ` (palette: ${tone.colorSeeds.join(', ')})` : ''}`,\n );\n}\n\n/** Render REQUIREMENTS: what the product actually does (the floor for honest claims). */\nexport function renderRequirementsBrief(requirements: RequirementsSnapshot): string {\n const functional = requirements.functional.map((requirement) => requirement.statement);\n const nonFunctional = requirements.nonFunctional.map((requirement) =>\n `[${requirement.kind}] ${requirement.statement}${requirement.metric ? ` (${requirement.metric})` : ''}`);\n return lines(\n '### Requirements (what the product actually does)',\n '**Functional:**',\n bullets(functional),\n '**Non-functional:**',\n bullets(nonFunctional),\n );\n}\n\n/**\n * Render BUSINESS_MODEL: the offer posture (premium demands different codes than accessible).\n *\n * Says WHERE the tiers came from (`resolvePricingTiersStatus`), because a reader grounded on the brief\n * otherwise treats a proposal as the creator's decision and an undecided sketch as \"no pricing\" — the\n * two readings the `pricingTiers` status exists to prevent. Model-facing prose, not display text.\n */\nexport function renderBusinessModelBrief(businessModel: BusinessModelLiteSnapshot): string {\n const plans = businessModel.plans.map((plan) =>\n `- **${plan.name}**${plan.pricePoint ? ` — ${plan.pricePoint}${plan.billingPeriod ? `/${plan.billingPeriod}` : ''}` : ''}${plan.targetSummary ? ` · for: ${plan.targetSummary}` : ''}${plan.includes ? ` · includes: ${plan.includes}` : ''}${plan.proposalBasis ? ` · proposed because: ${plan.proposalBasis}` : ''}`);\n const tiers = resolvePricingTiersStatus(businessModel);\n return lines(\n '### Business model',\n businessModel.revenueModel ? `**Revenue model:** ${businessModel.revenueModel}` : undefined,\n tiers === PricingTiersStatus.PROPOSED ? \"**Plans (proposed at the creator's request, not named by the creator):**\" : '**Plans:**',\n tiers === PricingTiersStatus.UNDECIDED\n ? '_Not decided yet — the creator has not chosen the tiers. Assume none; the revenue model above still applies._'\n : plans.length > 0 ? plans.join('\\n') : NONE,\n );\n}\n\n/** Render ACCEPTED_DECISIONS: the shipped brand assets new work must cohere with. */\nexport function renderAcceptedDecisionsBrief(assets: BrandAssetConfig[]): string {\n const rendered = assets.map((asset) =>\n `- ${asset.ref}: ${asset.composition}/${asset.theme}/${asset.purpose} ${asset.format}${asset.width && asset.height ? ` ${asset.width}×${asset.height}` : ''}${asset.derivedFrom ? ` (derived from ${asset.derivedFrom})` : ' (generated primary)'}`);\n return lines(\n '### Accepted decisions (already shipped — new work must cohere)',\n rendered.length > 0 ? rendered.join('\\n') : NONE,\n );\n}\n\n/**\n * Orchestrator: render every requested-and-present kind to its brief.\n * DESIGN_SYSTEM is absent by contract — it lives in the frontend service and\n * the PARENT composes+renders it (see the companion service's curator).\n */\nexport function renderShapingInputBriefs(\n sources: ExpertPersonaBriefSources,\n): Partial<Record<ExpertShapingInputKind, string>> {\n const briefs: Partial<Record<ExpertShapingInputKind, string>> = {};\n const vision = sources[ExpertShapingInputKind.VISION];\n if (vision) briefs[ExpertShapingInputKind.VISION] = renderVisionBrief(vision);\n const market = sources[ExpertShapingInputKind.MARKET];\n if (market) briefs[ExpertShapingInputKind.MARKET] = renderMarketBrief(market);\n const brand = sources[ExpertShapingInputKind.BRAND];\n if (brand) briefs[ExpertShapingInputKind.BRAND] = renderBrandBrief(brand);\n const requirements = sources[ExpertShapingInputKind.REQUIREMENTS];\n if (requirements) briefs[ExpertShapingInputKind.REQUIREMENTS] = renderRequirementsBrief(requirements);\n const businessModel = sources[ExpertShapingInputKind.BUSINESS_MODEL];\n if (businessModel) briefs[ExpertShapingInputKind.BUSINESS_MODEL] = renderBusinessModelBrief(businessModel);\n const accepted = sources[ExpertShapingInputKind.ACCEPTED_DECISIONS];\n if (accepted) briefs[ExpertShapingInputKind.ACCEPTED_DECISIONS] = renderAcceptedDecisionsBrief(accepted);\n return briefs;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specification-artifacts.behavior.d.ts","sourceRoot":"","sources":["../../../../../../src/core/introspection/subprocess/specification-artifacts.behavior.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,qCAAqC,EACrC,mCAAmC,EACpC,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"specification-artifacts.behavior.d.ts","sourceRoot":"","sources":["../../../../../../src/core/introspection/subprocess/specification-artifacts.behavior.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,qCAAqC,EACrC,mCAAmC,EACpC,MAAM,gCAAgC,CAAC;AAmYxC,+EAA+E;AAC/E;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,qCAAqC,CAEhG;AAKD,oFAAoF;AACpF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,wGAAwG;IACxG,QAAQ,CAAC,cAAc,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,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,GAAG,8BAA8B,CA+BjC"}
|
|
@@ -160,6 +160,13 @@ const FAMILY_EDITORIAL = {
|
|
|
160
160
|
return name ? (tagline ? `${name} — ${tagline}` : name) : null;
|
|
161
161
|
},
|
|
162
162
|
},
|
|
163
|
+
[ApplicationSpecificationFamily.BRAND_NAME_SCREENING]: {
|
|
164
|
+
title: 'Brand names',
|
|
165
|
+
description: 'The names proposed for the brand and what a minimal trademark screening of each found — a screening, not a legal clearance opinion.',
|
|
166
|
+
/* IDENTITY, beside the brand: it decides what the product is called. */
|
|
167
|
+
concern: WorkbenchSpecificationArtifactConcern.IDENTITY,
|
|
168
|
+
pulse: ({ count, parts }) => parts([[count('candidates'), 'candidate']]),
|
|
169
|
+
},
|
|
163
170
|
[ApplicationSpecificationFamily.COMPLIANCE_PROGRAM]: {
|
|
164
171
|
title: 'Assurance programme',
|
|
165
172
|
description: 'The controls this product commits to, and the authorities they answer.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specification-artifacts.behavior.js","sourceRoot":"","sources":["../../../../../../src/core/introspection/subprocess/specification-artifacts.behavior.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EACL,kDAAkD,EAClD,4BAA4B,EAC5B,uCAAuC,GAExC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAC/G,OAAO,EACL,qCAAqC,EACrC,mCAAmC,GACpC,MAAM,gCAAgC,CAAC;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CAAC,UAAU,CAAC,CAAC,MAAM;YAChH,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,KAAK,mCAAmC,CAAC,cAAc,CAAC,CAAC,MAAM;YACrH,WAAW,EAAE,KAAK,CAAC,WAAW;SAC/B;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { existsSync, readFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\n\nimport {\n APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS,\n getFamilyPackageRelativePath,\n renderSpecificationFamilyReviewDocument,\n type ApplicationSpecificationSemanticSchemaBinding,\n} from '@wildo-ai/application-creation-runtime';\nimport { getFrameworkKnowledgePlaybook, listFrameworkKnowledgePlaybooks } from '@wildo-ai/framework-knowledge';\nimport {\n WorkbenchSpecificationArtifactConcern,\n WorkbenchSpecificationArtifactState,\n} from '@wildo-ai/platform-core-shared';\nimport {\n ApplicationSpecificationFamily,\n JourneyArtifactValidationState,\n} from '@wildo-ai/saas-specifications/application-creation';\n\nimport { resolveSpecificationsCompanionExports } from './companion-introspection-module-exports.utils';\n\n/**\n * The operator-facing projection of the application's specification families (issue #162).\n *\n * ## What was missing, and what was already there\n *\n * Nine companion behaviors already READ this content — `market-context-for-icp`,\n * `market-render-prompt`, `brand-render-prompt`, `compliance-primary-facts`,\n * `definition-specifications`, `specification-context-parts` and their siblings — and every one of\n * them renders PROSE FOR A LANGUAGE MODEL. The loading and resolution paths were proven; what did\n * not exist was a projection whose consumer is a human. So a creator could not review, compare or\n * revise anything the journey had decided about their product without opening TypeScript files in an\n * editor.\n *\n * Reusing one of those renderers to fill a UI would ship an LLM context block into a human surface.\n * This behavior therefore renders through `renderSpecificationFamilyReviewDocument`, whose only\n * reader is a person.\n *\n * ## Why it REPORTS where `definition-specifications` REFUSES\n *\n * That behavior runs the same validators through the same authority and THROWS on any ERROR-severity\n * issue — correct for a durable load-time guard, and exactly wrong for a review surface: it would\n * make an invalid artifact the one thing a reviewer cannot look at, precisely when they most need to\n * see it. The two cannot disagree about what is VALID, because the validator is the same object; they\n * differ only in what to do about an invalid answer.\n *\n * ## Pure, deterministic, and read-only by construction\n *\n * Reads the authored snapshots off the specifications companion exports, the two committed markdown\n * records beside each family, and the compiled playbook catalog. No LLM, no network, no write, and no\n * state: acceptance of a specification is a human git commit (`.claude/rules/one-source-of-truth.md`\n * rule 2), so there is nowhere here for an acceptance state to accumulate.\n */\n\n/**\n * ONE AUTHORED DECLARATION PER FAMILY — the family's whole editorial identity, in one place.\n *\n * ## What this replaced, and why four places was three too many\n *\n * A family's row-facing decisions were spread over THREE hand-kept maps keyed by slug\n * (`FAMILY_TITLES`, `FAMILY_DESCRIPTIONS`, `FAMILY_CONCERNS`) and an eighteen-arm `switch` inside\n * `deriveContentPulse` — four independent lists over one population, none of them typed, each free\n * to gain a family the others did not. Adding a family meant four edits in four shapes, and\n * forgetting one produced a card titled by its own slug, or unclassified, or with no pulse at all,\n * every one of them silently.\n *\n * A RESOURCE does not work that way: `resourceUIBehavior` is ONE call carrying the icon, the layout,\n * the label rule and the surfaces together, because they are one set of decisions about one thing.\n * This is that shape for a family.\n *\n * ## TOTAL over the vocabulary, so the compiler is the checker\n *\n * `Record<ApplicationSpecificationFamily, …>` with no index signature: a family with no entry is a\n * COMPILE ERROR, and so is a key naming no family. The companion test that asserted the same thing\n * stays and now proves the half a type cannot — that the ENUM still matches the semantic authority's\n * bindings, which are declared in another package.\n *\n * ## Why these four belong together, and NOT beside the schema\n *\n * They are what a reader MEETS: a name, a sentence, the question the family answers, and a one-line\n * pulse of what landed. None of them is semantics — the schema, the validator and the generation\n * contract stay on the authority's binding, which is the resources-config half of this split.\n * Merging the two would put display words in the package that decides whether content is VALID.\n */\ninterface SpecificationFamilyEditorial {\n /**\n * The creator-facing NAME, authored rather than derived from the slug.\n *\n * The two diverge exactly where it matters: `vision-brief` names a product VISION,\n * `compliance-program` an assurance PROGRAMME. Humanizing the slug gives \"Vision brief\" and\n * \"Compliance program\" — accurate about the id, and a worse answer to \"what am I looking at\".\n */\n readonly title: string;\n /**\n * What the family IS, in one sentence a creator recognizes — the card's subtitle.\n *\n * Present whether or not anything landed: on a NOT_LANDED card it is the whole answer to \"why\n * would I care\", and on a landed one it frames the pulse beside it. Written in the creator's\n * vocabulary, never the framework's.\n */\n readonly description: string;\n /** Which question this family answers — the axis the workbench groups its list by. */\n readonly concern: WorkbenchSpecificationArtifactConcern;\n /**\n * This family's own one-line reading of what landed — the card's pulse.\n *\n * REQUIRED, which is the change worth noticing: as a `switch` it had a `default: return null`, so\n * two families (the two governed-document SETS) fell through it and rendered a landed card with\n * nothing on it — indistinguishable from a family whose rule nobody had written. Both have one\n * now, and a twenty-first family cannot be added without one.\n */\n readonly pulse: (read: FamilyPulseReader) => string | null;\n}\n\n/** What a family's pulse rule may ask of its landed snapshot. */\ninterface FamilyPulseReader {\n /** How many entries a top-level collection holds — 0 when absent or not an array. */\n readonly count: (key: string) => number;\n /** How many entries the landed value ITSELF holds when it is a collection (the persona charter set) — 0 otherwise. */\n readonly length: () => number;\n /** A non-empty trimmed string at a path, else null. */\n readonly text: (path: readonly string[]) => string | null;\n /**\n * Counted parts, joined — each entry names its SINGULAR, and the plural defaults to `+s` and is\n * spelled out where English disagrees. \"1 ICPs\" on a live card is what bought that parameter.\n */\n readonly parts: (entries: ReadonlyArray<readonly [number, string, string?]>) => string | null;\n}\n\nconst FAMILY_EDITORIAL: Readonly<Record<ApplicationSpecificationFamily, SpecificationFamilyEditorial>> = {\n [ApplicationSpecificationFamily.VISION_BRIEF]: {\n title: 'Vision',\n description: 'The founding intent — the idea, the problem it answers, and what success looks like.',\n concern: WorkbenchSpecificationArtifactConcern.INTENT,\n /* The one-liner IS the vision; a count of criteria would say nothing about what was decided. */\n pulse: ({ text }) => text(['idea', 'oneLiner']),\n },\n [ApplicationSpecificationFamily.MARKET_SNAPSHOT]: {\n title: 'Market',\n description: 'Who this product is for and how it is positioned — category, ICPs, personas, messaging.',\n concern: WorkbenchSpecificationArtifactConcern.INTENT,\n pulse: ({ count, parts }) => parts([\n [count('icps'), 'ICP'],\n [count('personas'), 'persona'],\n [count('positionings'), 'positioning'],\n [count('tonesOfVoice'), 'tone of voice', 'tones of voice'],\n ]),\n },\n [ApplicationSpecificationFamily.REQUIREMENTS]: {\n title: 'Requirements',\n description: 'What the product must do, functionally and non-functionally, with acceptance criteria.',\n concern: WorkbenchSpecificationArtifactConcern.SCOPE,\n /* Both singulars are their own plurals — \"3 functional\", never \"3 functionals\". */\n pulse: ({ count, parts }) => parts([\n [count('functional'), 'functional', 'functional'],\n [count('nonFunctional'), 'non-functional', 'non-functional'],\n ]),\n },\n [ApplicationSpecificationFamily.FEATURE_DRAFTS]: {\n title: 'Feature drafts',\n description: 'Accepted feature intent — spec-first drafts awaiting their runtime definitions.',\n concern: WorkbenchSpecificationArtifactConcern.SCOPE,\n pulse: ({ count, parts }) => parts([[count('drafts'), 'feature draft']]),\n },\n [ApplicationSpecificationFamily.BUSINESS_MODEL]: {\n title: 'Business model',\n description: 'How the product earns — the revenue model and its pricing plans.',\n concern: WorkbenchSpecificationArtifactConcern.SCOPE,\n /*\n * The revenue model leads because it is the DECISION; the plan count is its consequence. Either\n * half may be absent, so each is allowed to carry the line alone.\n *\n * ## The value is read RAW, and that is a correction\n *\n * This read `revenueModel.toLowerCase().replace(/_/g, ' ')` — inventing a word from a member of\n * `RevenueModelKind`, a real closed enum. That is the defect\n * `.claude/rules/display-text-comes-from-i18n.md` exists for, and it was carried in that check's\n * shrink-only baseline as `specification-artifacts.behavior.ts::separator-to-words`.\n *\n * A pulse is composed SERVER-SIDE into one string on the row; there is no label loop here to ask,\n * so the honest answer is the raw value, which looks unlabelled because it is. The remedy, if the\n * word matters, is to carry the member and let the workbench word it — not to humanize the token\n * where nobody can translate or reword it.\n */\n pulse: ({ count, parts, text }) => {\n const model = text(['revenueModel']);\n const plans = parts([[count('plans'), 'plan']]);\n return model && plans ? `${model} · ${plans}` : model ?? plans;\n },\n },\n [ApplicationSpecificationFamily.ROADMAP]: {\n title: 'Roadmap',\n description: 'The build order — phases, their objectives, and what each one delivers.',\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ count, parts }) => parts([[count('phases'), 'phase']]),\n },\n [ApplicationSpecificationFamily.DOMAIN_PLAN]: {\n title: 'Domain plan',\n description: 'The domain model as planned — modules, their purposes, and the relationships between resources.',\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ count, parts }) => parts([[count('modules'), 'module'], [count('relationships'), 'relationship']]),\n },\n [ApplicationSpecificationFamily.BUILD_PLAN]: {\n title: 'Build plan',\n description: 'The task graph the coding lane executes — objectives, targets and prerequisites.',\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ count, parts }) => parts([[count('tasks'), 'task']]),\n },\n [ApplicationSpecificationFamily.PLACEMENT_PLAN]: {\n title: 'Placement plan',\n description: 'Where every destination sits in the application shell, and why.',\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ count, parts }) => parts([[count('groups'), 'group'], [count('decisions'), 'decision']]),\n },\n [ApplicationSpecificationFamily.CAPABILITY_COMPOSITION]: {\n title: 'Composition',\n description: 'Which optional packages this application needs — website, documentation portal, workers — and the declaration each decision was read from.',\n /*\n * DELIVERY: the composition decides what the foundation composes, not what the product is — a\n * website follows from a market channel or a brand, never the other way round (#1491).\n */\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ count, parts }) => parts([[count('scenarioDecisions'), 'decision']]),\n },\n [ApplicationSpecificationFamily.EXPERIENCE_PLAN]: {\n title: 'Experience',\n description: 'The surfaces this application carries beyond its generated screens, how its shell, navigation and palette are composed, and the milestones and guidance that carry a new person through it.',\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ count, parts }) => parts([\n [count('views'), 'view'],\n [count('configurations'), 'configured surface'],\n [count('milestones'), 'milestone'],\n // \"guidance\" is uncountable; the entries are pieces of it.\n [count('guidance'), 'piece of guidance', 'pieces of guidance'],\n ]),\n },\n [ApplicationSpecificationFamily.APPLICATION_MATURITY]: {\n title: 'Where we stand',\n description: 'One row per requirement this application set itself, the evidence that exists for it, and the stage that follows. A measurement, never a verdict.',\n /*\n * DELIVERY: the reading is about what has been BUILT against what was asked, not about what the\n * product is. It is also the one artifact nobody authors — it is derived and re-derived.\n */\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n /* The STAGE first — it is the reading — with the population that produced it behind it. */\n pulse: ({ count, parts, text }) => {\n const stage = text(['stage']);\n const measured = parts([[count('requirements'), 'requirement']]);\n if (stage === null) return measured;\n return measured === null ? stage : `${stage} · ${measured}`;\n },\n },\n [ApplicationSpecificationFamily.INTEGRATION_PLAN]: {\n title: 'Background & integrations',\n description: 'What this application runs beside its backend — workers it delegates to, schedules that wake on their own — and the outside services it binds.',\n /* DELIVERY: a worker or a minion is part of what the product DOES, not of how it presents itself. */\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ count, parts }) => parts([[count('workers'), 'worker'], [count('minions'), 'minion'], [count('providerBindings'), 'binding']]),\n },\n [ApplicationSpecificationFamily.DOCUMENTATION_PLAN]: {\n title: 'Documentation',\n description: 'The chapters the documentation portal carries, what each documents in this product, and who it is written for.',\n concern: WorkbenchSpecificationArtifactConcern.IDENTITY,\n pulse: ({ count, parts }) => parts([[count('chapters'), 'chapter']]),\n },\n [ApplicationSpecificationFamily.WEBSITE_PLAN]: {\n title: 'Website',\n description: 'What the marketing site says — its pages, the sections that carry each argument, and the market entries they draw on.',\n /* IDENTITY: the site is how the product presents itself, the same axis as the brand beside it. */\n concern: WorkbenchSpecificationArtifactConcern.IDENTITY,\n pulse: ({ count, parts }) => parts([[count('pages'), 'page']]),\n },\n [ApplicationSpecificationFamily.BRAND_BRIEF]: {\n title: 'Brand',\n description: 'How the product presents itself — name, logo direction and visual tone.',\n concern: WorkbenchSpecificationArtifactConcern.IDENTITY,\n /* The name, and the tagline only if there is a name to attach it to. */\n pulse: ({ text }) => {\n const name = text(['name', 'brandName']);\n const tagline = text(['name', 'tagline']);\n return name ? (tagline ? `${name} — ${tagline}` : name) : null;\n },\n },\n [ApplicationSpecificationFamily.COMPLIANCE_PROGRAM]: {\n title: 'Assurance programme',\n description: 'The controls this product commits to, and the authorities they answer.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n pulse: ({ count, parts }) => parts([\n [count('roleAuthorities'), 'role authority', 'role authorities'],\n [count('capabilityAuthorities'), 'capability authority', 'capability authorities'],\n [count('implementationStatements'), 'implementation statement'],\n ]),\n },\n [ApplicationSpecificationFamily.COMPLIANCE_DOCUMENT_CANDIDATE]: {\n title: 'Governed-document drafts',\n description: 'Drafts of the public governed documents this product must publish.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n pulse: ({ count, parts, text }) => {\n const title = text(['title']);\n const sections = parts([[count('sections'), 'section']]);\n return title ? (sections ? `${title} · ${sections}` : title) : sections;\n },\n },\n [ApplicationSpecificationFamily.COMPLIANCE_DOCUMENT_CANDIDATE_SET]: {\n title: 'Draft document collection',\n description: 'All the governed documents your application has drafted, kept together as each document evolves.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n /*\n * AUTHORED 2026-09-19. This family had no arm in the switch and took its `default: return null`,\n * so a landed set rendered a card with nothing on it — the same card a family whose rule nobody\n * had written would render. How many documents are drafted is what a reader wants.\n */\n pulse: ({ count, parts }) => parts([[count('candidates'), 'drafted document']]),\n },\n [ApplicationSpecificationFamily.DOCUMENT_PUBLICATION]: {\n title: 'Document publication',\n description: 'Which locales and jurisdictions each governed document publishes in.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n pulse: ({ count, parts }) => parts([[count('variants'), 'publication variant']]),\n },\n [ApplicationSpecificationFamily.DOCUMENT_RELEASE_POLICY]: {\n title: 'Document release policy',\n description: 'How each required document may be released — draft, attested, or reviewed.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n pulse: ({ count, parts }) => parts([[count('selections'), 'selection']]),\n },\n [ApplicationSpecificationFamily.DOCUMENT_RELEASE_SET]: {\n title: 'Document releases',\n description: 'The document releases composed from your drafts, document definitions and release policies.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n /* AUTHORED 2026-09-19 — the second family that fell through the switch's default. */\n pulse: ({ count, parts }) => parts([[count('releases'), 'release']]),\n },\n [ApplicationSpecificationFamily.DOCUMENT_FACTS]: {\n title: 'Document facts',\n description: 'The accepted raw facts governed documents are built from.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n pulse: ({ count, parts }) => parts([[count('declarations'), 'declaration']]),\n },\n [ApplicationSpecificationFamily.DOCUMENT_FACTS_AUTHORED]: {\n title: 'Document facts you decide',\n description: 'The facts nobody can derive for you — the ones you decide or have reviewed.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n /*\n * The same shape as the derived half, and deliberately its OWN rule rather than a shared switch\n * arm: the two families are separate precisely so a regeneration cannot reach the human's half,\n * and a shared line would be the first place they quietly became one thing again.\n */\n pulse: ({ count, parts }) => parts([[count('declarations'), 'declaration']]),\n },\n [ApplicationSpecificationFamily.PROCESSOR_REGISTER]: {\n title: 'Who else processes your data',\n description: 'Every vendor that handles your users\\' personal data, who they legally are, and where.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n pulse: ({ count, parts }) => parts([[count('processors'), 'processor']]),\n },\n [ApplicationSpecificationFamily.RISK_REGISTER]: {\n title: 'What could go wrong',\n description: 'The risks this application carries, how bad each would be, and what you have decided to do about them.',\n /*\n * OBLIGATIONS, beside the programme rather than under it. A programme states which control\n * objectives the application CLAIMS; a register states which exposures it CARRIES. They inform\n * each other and answer different questions — the family schema argues the same split — so the\n * register belongs in the same concern and is not folded into the programme.\n */\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n pulse: ({ count, parts }) => parts([[count('entries'), 'risk']]),\n },\n [ApplicationSpecificationFamily.CREATOR_INPUTS]: {\n title: 'What you told us',\n description: 'Your answers to the questions the creation steps asked — kept, so nothing asks twice.',\n /*\n * INTENT: the dossier is the creator's own words about the product, the same axis as the vision\n * they feed. It is the only family here that nobody PRODUCES, and its pulse counts answers rather\n * than an artifact's parts.\n */\n concern: WorkbenchSpecificationArtifactConcern.INTENT,\n pulse: ({ count, parts }) => parts([[count('answers'), 'answer']]),\n },\n [ApplicationSpecificationFamily.EXPERT_PERSONAS]: {\n title: 'Who reviews the work',\n description: 'The expert reviewers derived for this application — the panels that decide placement and judge the logo.',\n /*\n * DELIVERY: a charter is part of HOW the application gets built — the panels convene at placement and at\n * the logo step — not a statement about the product's intent, scope, identity or obligations (#572).\n * The landed value is the charter ARRAY, so the pulse counts the array itself: the aggregator exports\n * `ExpertPersonaCharter[]`, and a reader keyed on a top-level collection name would count nothing.\n */\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ length, parts }) => parts([[length(), 'expert reviewer']]),\n },\n};\n\n/** The companion records a landing writes beside a family's own `index.ts`. */\n/**\n * The question a family answers — its CONCERN — for a family named by id, as the workbench groups\n * by it. A family this table does not know answers `UNCLASSIFIED`, the visible bucket, never a\n * plausible guess. Exported so the dossier groups its questions on the same axis the artifact list\n * groups its families (#1454, gap 4): one vocabulary for \"what is this about\".\n */\nexport function specificationFamilyConcern(family: string): WorkbenchSpecificationArtifactConcern {\n return (FAMILY_EDITORIAL as Readonly<Record<string, SpecificationFamilyEditorial | undefined>>)[family]?.concern ?? WorkbenchSpecificationArtifactConcern.UNCLASSIFIED;\n}\n\nconst DECISION_RECORD_FILE_NAME = 'DECISIONS.md';\nconst DIAGRAM_FILE_NAME = 'DIAGRAM.md';\n\n/** One family row, JSON-safe, matching `Workbench_SpecificationArtifact_Schema`. */\nexport interface SpecificationArtifactRow {\n readonly family: string;\n readonly title: string;\n /** Static per-family subtitle — see {@link FAMILY_DESCRIPTIONS}. */\n readonly description: string;\n /** One-line pulse of the landed content, `null` when nothing landed. See {@link deriveContentPulse}. */\n readonly contentSummary: string | null;\n readonly concern: WorkbenchSpecificationArtifactConcern;\n readonly state: WorkbenchSpecificationArtifactState;\n readonly schemaRef: string;\n readonly sourcePath: string | null;\n readonly errorCount: number;\n readonly warnCount: number;\n readonly producedByPlaybookRefs: string[];\n /**\n * The landed family value, RAW — exactly what the specifications package exports, never the\n * validator's parsed output (whose schema `.default()`s would inject content the author never\n * wrote). The workbench's per-family templates render from this; the markdown `document` beside\n * it is their structural fallback. `null` when the family has not landed.\n */\n readonly content: Record<string, unknown> | null;\n readonly document: string | null;\n readonly issues: string | null;\n /** The validator's warnings, structured — see `Workbench_SpecificationArtifact_Schema.warnings`. */\n readonly warnings: { readonly path: string; readonly message: string }[];\n readonly decisionRecord: string | null;\n readonly diagram: string | null;\n}\n\nexport interface SpecificationArtifactsResponse {\n readonly artifacts: SpecificationArtifactRow[];\n readonly trace: {\n readonly families: number;\n readonly landed: number;\n readonly invalid: number;\n readonly evaluatedAt: string;\n };\n}\n\n/**\n * Every playbook whose declared `outputs[].family` is `family`.\n *\n * The durable half of \"what produced this\": a fact about the compiled catalog, carried in git, true\n * whether or not any run's state still exists. A link to the RUN that produced a particular value was\n * deliberately not built — runs, traces and the write register are a per-run cache under\n * `one-source-of-truth.md` rule 5, so a durable artifact pointing into deletable state is dangling by\n * design. The link runs the other way: a run may name what it wrote.\n *\n * Built ONCE per derivation rather than per family: the catalog read is the same 21 files either way,\n * and looping it fifteen times would multiply the only file I/O in this behavior by fifteen.\n */\nfunction buildPlaybookRefsByFamily(): ReadonlyMap<string, string[]> {\n const byFamily = new Map<string, string[]>();\n for (const entry of listFrameworkKnowledgePlaybooks()) {\n const hydrated = getFrameworkKnowledgePlaybook(entry.ref);\n const outputs = (hydrated?.playbook as { outputs?: readonly { family?: unknown }[] } | undefined)?.outputs ?? [];\n for (const output of outputs) {\n if (typeof output?.family !== 'string' || output.family.length === 0) continue;\n const refs = byFamily.get(output.family) ?? [];\n if (!refs.includes(entry.ref)) refs.push(entry.ref);\n byFamily.set(output.family, refs);\n }\n }\n return byFamily;\n}\n\n/**\n * Read a markdown record committed beside a family, or `null`.\n *\n * `null` for an absent file is a FACT with a precise meaning, and the two files mean different things\n * by their absence: no `DIAGRAM.md` means this family has no diagram renderer, while no\n * `DECISIONS.md` means the run that produced it asked the creator nothing — never that no\n * clarification happened. The row's JSDoc carries that distinction to the reader; here both are just\n * a missing file.\n */\nfunction readCommittedRecord(packageRoot: string, familyRelativePath: string, fileName: string): string | null {\n const path = join(packageRoot, dirname(familyRelativePath), fileName);\n if (!existsSync(path)) return null;\n try {\n const content = readFileSync(path, 'utf8').trim();\n return content.length > 0 ? content : null;\n } catch {\n /*\n * A record that cannot be READ is reported as absent rather than failing the derivation. It is\n * supporting provenance beside the artifact, not the artifact — refusing the whole page because\n * one sibling file is unreadable would deny a reviewer the fifteen rows that are fine.\n */\n return null;\n }\n}\n\n/**\n * The validator's ERRORS, rendered for a reader, or `null` when there are none.\n *\n * An error says this artifact no longer satisfies its own contract, and a reviewer must meet it\n * before the prose — the page leads with this block. WARNINGS are not rendered here: they travel as\n * the structured `warnings` list, which the page shows in its own authored words at the foot.\n */\nfunction renderIssues(errorDetails: readonly string[]): string | null {\n if (errorDetails.length === 0) return null;\n const lines = [`**${errorDetails.length} error${errorDetails.length === 1 ? '' : 's'}** — the artifact does not satisfy its own contract.`, ''];\n for (const detail of errorDetails) lines.push(`- ${detail}`);\n return lines.join('\\n').trim();\n}\n\n/**\n * A one-line PULSE of what actually landed — the card's third line, beside the title and subtitle.\n *\n * Each family answers this for itself, in its own `pulse` rule beside its title and concern, because\n * what is worth saying about a landed value is a decision about THAT family: the vision's is its\n * one-liner, the market's is how many ICPs and personas, the brand's is the name and tagline. A\n * generic \"N keys\" would be true of all of them and useful for none.\n *\n * This used to be an eighteen-arm `switch` here, three declarations away from the titles and\n * concerns it belongs with. It is now one field of {@link SpecificationFamilyEditorial}; this\n * function is only the reader those rules are handed.\n *\n * It runs on the RAW landed value, never the validator's parsed output — a schema `.default()` would\n * otherwise inject content the author never wrote and the card would report it as landed. And it\n * runs for an INVALID family too, deliberately: a reader shown \"3 ICPs\" beside a red badge knows\n * more than one shown nothing.\n */\nfunction deriveContentPulse(family: ApplicationSpecificationFamily, snapshot: Record<string, unknown> | readonly unknown[]): string | null {\n const member = (key: string): unknown => (Array.isArray(snapshot) ? undefined : (snapshot as Record<string, unknown>)[key]);\n const read: FamilyPulseReader = {\n count: (key) => (Array.isArray(member(key)) ? (member(key) as unknown[]).length : 0),\n length: () => (Array.isArray(snapshot) ? snapshot.length : 0),\n text: (path) => {\n let value: unknown = snapshot;\n for (const key of path) {\n if (!value || typeof value !== 'object') return null;\n value = (value as Record<string, unknown>)[key];\n }\n return typeof value === 'string' && value.trim().length > 0 ? value.trim() : null;\n },\n parts: (entries) => {\n const present = entries\n .filter(([n]) => n > 0)\n .map(([n, singular, plural]) => `${n} ${n === 1 ? singular : plural ?? `${singular}s`}`);\n return present.length > 0 ? present.join(' · ') : null;\n },\n };\n return FAMILY_EDITORIAL[family].pulse(read);\n}\n\nfunction projectFamily(input: {\n readonly binding: ApplicationSpecificationSemanticSchemaBinding;\n readonly snapshot: unknown;\n readonly packageRoot: string;\n readonly appRelativePackagePrefix: string;\n readonly playbookRefsByFamily: ReadonlyMap<string, string[]>;\n}): SpecificationArtifactRow {\n const { binding, snapshot, packageRoot, appRelativePackagePrefix, playbookRefsByFamily } = input;\n const familyRelativePath = getFamilyPackageRelativePath(binding.family);\n /*\n * ONE lookup, and no fallback — `binding.family` is typed by the vocabulary and `FAMILY_EDITORIAL`\n * is total over it, so the three `?? binding.family` slug fallbacks this replaced are unreachable\n * by construction rather than guarded at runtime. A family with nothing authored cannot compile.\n */\n const editorial = FAMILY_EDITORIAL[binding.family];\n\n const base = {\n family: binding.family,\n title: editorial.title,\n description: editorial.description,\n concern: editorial.concern,\n schemaRef: binding.schemaRef,\n sourcePath: familyRelativePath ? `${appRelativePackagePrefix}/${familyRelativePath}` : null,\n producedByPlaybookRefs: [...(playbookRefsByFamily.get(binding.family) ?? [])],\n };\n\n if (snapshot === undefined || snapshot === null) {\n return {\n ...base,\n state: WorkbenchSpecificationArtifactState.NOT_LANDED,\n errorCount: 0,\n warnCount: 0,\n contentSummary: null,\n content: null,\n document: null,\n issues: null,\n warnings: [],\n decisionRecord: null,\n diagram: null,\n };\n }\n\n const validation = binding.validate(snapshot);\n return {\n ...base,\n state: validation.validation === JourneyArtifactValidationState.VALID\n ? WorkbenchSpecificationArtifactState.LANDED_VALID\n : WorkbenchSpecificationArtifactState.LANDED_INVALID,\n errorCount: validation.errorCount,\n warnCount: validation.warnCount,\n // An ARRAY landed value has a pulse too (the charter set: \"5 expert reviewers\"); only a non-object has none.\n contentSummary: typeof snapshot === 'object' && snapshot !== null\n ? deriveContentPulse(binding.family, snapshot as Record<string, unknown> | readonly unknown[])\n : null,\n /*\n * Both carried from the RAW snapshot, not from the validator's parsed output. The validator\n * parses with the family schema, whose `.default()` members would inject values the author never\n * wrote — a reviewer would then be shown, and could accept, content nobody authored. Mutation-\n * proven on the `document` half (parsed-value render reddens the raw-value pin); `content`\n * follows the same rule for the same reason.\n *\n * Every family binding's `snapshotSchema` is an object EXCEPT `expert-personas`, whose landed value\n * is the charter ARRAY (#572). The row schema types `content` as a record, so an array family carries\n * `content: null` deliberately and is read through its pulse and the review document; anything else\n * non-object is reported rather than smuggled through as a shape the row schema would refuse.\n */\n content: typeof snapshot === 'object' && !Array.isArray(snapshot) ? snapshot as Record<string, unknown> : null,\n document: renderSpecificationFamilyReviewDocument({ title: editorial.title, value: snapshot }),\n issues: renderIssues(validation.errorDetails),\n warnings: validation.warnings.map(({ path, message }) => ({ path, message })),\n decisionRecord: familyRelativePath\n ? readCommittedRecord(packageRoot, familyRelativePath, DECISION_RECORD_FILE_NAME)\n : null,\n diagram: familyRelativePath\n ? readCommittedRecord(packageRoot, familyRelativePath, DIAGRAM_FILE_NAME)\n : null,\n };\n}\n\n/**\n * Project every application-specification family for a human reviewer.\n *\n * `packageRoot` is the specifications package's absolute root, and `appRelativePackagePrefix` its\n * directory name relative to the application — so a row can name a path a reader recognizes\n * (`specifications/src/vision/index.ts`) rather than one that only makes sense inside the package.\n */\nexport function projectSpecificationArtifacts(input: {\n readonly moduleExports: Record<string, unknown>;\n readonly packageRoot: string;\n readonly appRelativePackagePrefix: string;\n readonly evaluatedAt: string;\n}): SpecificationArtifactsResponse {\n const companionExports = resolveSpecificationsCompanionExports(input.moduleExports) as unknown as Record<string, unknown>;\n const playbookRefsByFamily = buildPlaybookRefsByFamily();\n\n const artifacts = APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS.map((binding) =>\n projectFamily({\n binding,\n /*\n * A family with no `companionExportsField` is a DRAFT — it is not accepted application truth\n * and has no slot to read (`compliance-document-candidate`). It is reported as NOT_LANDED\n * rather than skipped, for the same reason absent families are rows at all: an omitted row and\n * a family that does not exist look identical to a reader.\n */\n snapshot: binding.companionExportsField === undefined\n ? undefined\n : companionExports[binding.companionExportsField],\n packageRoot: input.packageRoot,\n appRelativePackagePrefix: input.appRelativePackagePrefix,\n playbookRefsByFamily,\n }),\n );\n\n return {\n artifacts,\n trace: {\n families: artifacts.length,\n landed: artifacts.filter((artifact) => artifact.state !== WorkbenchSpecificationArtifactState.NOT_LANDED).length,\n invalid: artifacts.filter((artifact) => artifact.state === WorkbenchSpecificationArtifactState.LANDED_INVALID).length,\n evaluatedAt: input.evaluatedAt,\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"specification-artifacts.behavior.js","sourceRoot":"","sources":["../../../../../../src/core/introspection/subprocess/specification-artifacts.behavior.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EACL,kDAAkD,EAClD,4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O,EAAE,EAAE,CACnF,aAAa,CAAC;QACZ,OAAO;QACP;;;;;WAKG;QACH,QAAQ,EAAE,OAAO,CAAC,qBAAqB,KAAK,SAAS;YACnD,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,qBAAqB,CAAC;QACnD,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,wBAAwB,EAAE,KAAK,CAAC,wBAAwB;QACxD,oBAAoB;KACrB,CAAC,CACH,CAAC;IAEF,OAAO;QACL,SAAS;QACT,KAAK,EAAE;YACL,QAAQ,EAAE,SAAS,CAAC,MAAM;YAC1B,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,KAAK,mCAAmC,CAAC,UAAU,CAAC,CAAC,MAAM;YAChH,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,KAAK,mCAAmC,CAAC,cAAc,CAAC,CAAC,MAAM;YACrH,WAAW,EAAE,KAAK,CAAC,WAAW;SAC/B;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { existsSync, readFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\n\nimport {\n APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS,\n getFamilyPackageRelativePath,\n renderSpecificationFamilyReviewDocument,\n type ApplicationSpecificationSemanticSchemaBinding,\n} from '@wildo-ai/application-creation-runtime';\nimport { getFrameworkKnowledgePlaybook, listFrameworkKnowledgePlaybooks } from '@wildo-ai/framework-knowledge';\nimport {\n WorkbenchSpecificationArtifactConcern,\n WorkbenchSpecificationArtifactState,\n} from '@wildo-ai/platform-core-shared';\nimport {\n ApplicationSpecificationFamily,\n JourneyArtifactValidationState,\n} from '@wildo-ai/saas-specifications/application-creation';\n\nimport { resolveSpecificationsCompanionExports } from './companion-introspection-module-exports.utils';\n\n/**\n * The operator-facing projection of the application's specification families (issue #162).\n *\n * ## What was missing, and what was already there\n *\n * Nine companion behaviors already READ this content — `market-context-for-icp`,\n * `market-render-prompt`, `brand-render-prompt`, `compliance-primary-facts`,\n * `definition-specifications`, `specification-context-parts` and their siblings — and every one of\n * them renders PROSE FOR A LANGUAGE MODEL. The loading and resolution paths were proven; what did\n * not exist was a projection whose consumer is a human. So a creator could not review, compare or\n * revise anything the journey had decided about their product without opening TypeScript files in an\n * editor.\n *\n * Reusing one of those renderers to fill a UI would ship an LLM context block into a human surface.\n * This behavior therefore renders through `renderSpecificationFamilyReviewDocument`, whose only\n * reader is a person.\n *\n * ## Why it REPORTS where `definition-specifications` REFUSES\n *\n * That behavior runs the same validators through the same authority and THROWS on any ERROR-severity\n * issue — correct for a durable load-time guard, and exactly wrong for a review surface: it would\n * make an invalid artifact the one thing a reviewer cannot look at, precisely when they most need to\n * see it. The two cannot disagree about what is VALID, because the validator is the same object; they\n * differ only in what to do about an invalid answer.\n *\n * ## Pure, deterministic, and read-only by construction\n *\n * Reads the authored snapshots off the specifications companion exports, the two committed markdown\n * records beside each family, and the compiled playbook catalog. No LLM, no network, no write, and no\n * state: acceptance of a specification is a human git commit (`.claude/rules/one-source-of-truth.md`\n * rule 2), so there is nowhere here for an acceptance state to accumulate.\n */\n\n/**\n * ONE AUTHORED DECLARATION PER FAMILY — the family's whole editorial identity, in one place.\n *\n * ## What this replaced, and why four places was three too many\n *\n * A family's row-facing decisions were spread over THREE hand-kept maps keyed by slug\n * (`FAMILY_TITLES`, `FAMILY_DESCRIPTIONS`, `FAMILY_CONCERNS`) and an eighteen-arm `switch` inside\n * `deriveContentPulse` — four independent lists over one population, none of them typed, each free\n * to gain a family the others did not. Adding a family meant four edits in four shapes, and\n * forgetting one produced a card titled by its own slug, or unclassified, or with no pulse at all,\n * every one of them silently.\n *\n * A RESOURCE does not work that way: `resourceUIBehavior` is ONE call carrying the icon, the layout,\n * the label rule and the surfaces together, because they are one set of decisions about one thing.\n * This is that shape for a family.\n *\n * ## TOTAL over the vocabulary, so the compiler is the checker\n *\n * `Record<ApplicationSpecificationFamily, …>` with no index signature: a family with no entry is a\n * COMPILE ERROR, and so is a key naming no family. The companion test that asserted the same thing\n * stays and now proves the half a type cannot — that the ENUM still matches the semantic authority's\n * bindings, which are declared in another package.\n *\n * ## Why these four belong together, and NOT beside the schema\n *\n * They are what a reader MEETS: a name, a sentence, the question the family answers, and a one-line\n * pulse of what landed. None of them is semantics — the schema, the validator and the generation\n * contract stay on the authority's binding, which is the resources-config half of this split.\n * Merging the two would put display words in the package that decides whether content is VALID.\n */\ninterface SpecificationFamilyEditorial {\n /**\n * The creator-facing NAME, authored rather than derived from the slug.\n *\n * The two diverge exactly where it matters: `vision-brief` names a product VISION,\n * `compliance-program` an assurance PROGRAMME. Humanizing the slug gives \"Vision brief\" and\n * \"Compliance program\" — accurate about the id, and a worse answer to \"what am I looking at\".\n */\n readonly title: string;\n /**\n * What the family IS, in one sentence a creator recognizes — the card's subtitle.\n *\n * Present whether or not anything landed: on a NOT_LANDED card it is the whole answer to \"why\n * would I care\", and on a landed one it frames the pulse beside it. Written in the creator's\n * vocabulary, never the framework's.\n */\n readonly description: string;\n /** Which question this family answers — the axis the workbench groups its list by. */\n readonly concern: WorkbenchSpecificationArtifactConcern;\n /**\n * This family's own one-line reading of what landed — the card's pulse.\n *\n * REQUIRED, which is the change worth noticing: as a `switch` it had a `default: return null`, so\n * two families (the two governed-document SETS) fell through it and rendered a landed card with\n * nothing on it — indistinguishable from a family whose rule nobody had written. Both have one\n * now, and a twenty-first family cannot be added without one.\n */\n readonly pulse: (read: FamilyPulseReader) => string | null;\n}\n\n/** What a family's pulse rule may ask of its landed snapshot. */\ninterface FamilyPulseReader {\n /** How many entries a top-level collection holds — 0 when absent or not an array. */\n readonly count: (key: string) => number;\n /** How many entries the landed value ITSELF holds when it is a collection (the persona charter set) — 0 otherwise. */\n readonly length: () => number;\n /** A non-empty trimmed string at a path, else null. */\n readonly text: (path: readonly string[]) => string | null;\n /**\n * Counted parts, joined — each entry names its SINGULAR, and the plural defaults to `+s` and is\n * spelled out where English disagrees. \"1 ICPs\" on a live card is what bought that parameter.\n */\n readonly parts: (entries: ReadonlyArray<readonly [number, string, string?]>) => string | null;\n}\n\nconst FAMILY_EDITORIAL: Readonly<Record<ApplicationSpecificationFamily, SpecificationFamilyEditorial>> = {\n [ApplicationSpecificationFamily.VISION_BRIEF]: {\n title: 'Vision',\n description: 'The founding intent — the idea, the problem it answers, and what success looks like.',\n concern: WorkbenchSpecificationArtifactConcern.INTENT,\n /* The one-liner IS the vision; a count of criteria would say nothing about what was decided. */\n pulse: ({ text }) => text(['idea', 'oneLiner']),\n },\n [ApplicationSpecificationFamily.MARKET_SNAPSHOT]: {\n title: 'Market',\n description: 'Who this product is for and how it is positioned — category, ICPs, personas, messaging.',\n concern: WorkbenchSpecificationArtifactConcern.INTENT,\n pulse: ({ count, parts }) => parts([\n [count('icps'), 'ICP'],\n [count('personas'), 'persona'],\n [count('positionings'), 'positioning'],\n [count('tonesOfVoice'), 'tone of voice', 'tones of voice'],\n ]),\n },\n [ApplicationSpecificationFamily.REQUIREMENTS]: {\n title: 'Requirements',\n description: 'What the product must do, functionally and non-functionally, with acceptance criteria.',\n concern: WorkbenchSpecificationArtifactConcern.SCOPE,\n /* Both singulars are their own plurals — \"3 functional\", never \"3 functionals\". */\n pulse: ({ count, parts }) => parts([\n [count('functional'), 'functional', 'functional'],\n [count('nonFunctional'), 'non-functional', 'non-functional'],\n ]),\n },\n [ApplicationSpecificationFamily.FEATURE_DRAFTS]: {\n title: 'Feature drafts',\n description: 'Accepted feature intent — spec-first drafts awaiting their runtime definitions.',\n concern: WorkbenchSpecificationArtifactConcern.SCOPE,\n pulse: ({ count, parts }) => parts([[count('drafts'), 'feature draft']]),\n },\n [ApplicationSpecificationFamily.BUSINESS_MODEL]: {\n title: 'Business model',\n description: 'How the product earns — the revenue model and its pricing plans.',\n concern: WorkbenchSpecificationArtifactConcern.SCOPE,\n /*\n * The revenue model leads because it is the DECISION; the plan count is its consequence. Either\n * half may be absent, so each is allowed to carry the line alone.\n *\n * ## The value is read RAW, and that is a correction\n *\n * This read `revenueModel.toLowerCase().replace(/_/g, ' ')` — inventing a word from a member of\n * `RevenueModelKind`, a real closed enum. That is the defect\n * `.claude/rules/display-text-comes-from-i18n.md` exists for, and it was carried in that check's\n * shrink-only baseline as `specification-artifacts.behavior.ts::separator-to-words`.\n *\n * A pulse is composed SERVER-SIDE into one string on the row; there is no label loop here to ask,\n * so the honest answer is the raw value, which looks unlabelled because it is. The remedy, if the\n * word matters, is to carry the member and let the workbench word it — not to humanize the token\n * where nobody can translate or reword it.\n */\n pulse: ({ count, parts, text }) => {\n const model = text(['revenueModel']);\n const plans = parts([[count('plans'), 'plan']]);\n return model && plans ? `${model} · ${plans}` : model ?? plans;\n },\n },\n [ApplicationSpecificationFamily.ROADMAP]: {\n title: 'Roadmap',\n description: 'The build order — phases, their objectives, and what each one delivers.',\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ count, parts }) => parts([[count('phases'), 'phase']]),\n },\n [ApplicationSpecificationFamily.DOMAIN_PLAN]: {\n title: 'Domain plan',\n description: 'The domain model as planned — modules, their purposes, and the relationships between resources.',\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ count, parts }) => parts([[count('modules'), 'module'], [count('relationships'), 'relationship']]),\n },\n [ApplicationSpecificationFamily.BUILD_PLAN]: {\n title: 'Build plan',\n description: 'The task graph the coding lane executes — objectives, targets and prerequisites.',\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ count, parts }) => parts([[count('tasks'), 'task']]),\n },\n [ApplicationSpecificationFamily.PLACEMENT_PLAN]: {\n title: 'Placement plan',\n description: 'Where every destination sits in the application shell, and why.',\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ count, parts }) => parts([[count('groups'), 'group'], [count('decisions'), 'decision']]),\n },\n [ApplicationSpecificationFamily.CAPABILITY_COMPOSITION]: {\n title: 'Composition',\n description: 'Which optional packages this application needs — website, documentation portal, workers — and the declaration each decision was read from.',\n /*\n * DELIVERY: the composition decides what the foundation composes, not what the product is — a\n * website follows from a market channel or a brand, never the other way round (#1491).\n */\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ count, parts }) => parts([[count('scenarioDecisions'), 'decision']]),\n },\n [ApplicationSpecificationFamily.EXPERIENCE_PLAN]: {\n title: 'Experience',\n description: 'The surfaces this application carries beyond its generated screens, how its shell, navigation and palette are composed, and the milestones and guidance that carry a new person through it.',\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ count, parts }) => parts([\n [count('views'), 'view'],\n [count('configurations'), 'configured surface'],\n [count('milestones'), 'milestone'],\n // \"guidance\" is uncountable; the entries are pieces of it.\n [count('guidance'), 'piece of guidance', 'pieces of guidance'],\n ]),\n },\n [ApplicationSpecificationFamily.APPLICATION_MATURITY]: {\n title: 'Where we stand',\n description: 'One row per requirement this application set itself, the evidence that exists for it, and the stage that follows. A measurement, never a verdict.',\n /*\n * DELIVERY: the reading is about what has been BUILT against what was asked, not about what the\n * product is. It is also the one artifact nobody authors — it is derived and re-derived.\n */\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n /* The STAGE first — it is the reading — with the population that produced it behind it. */\n pulse: ({ count, parts, text }) => {\n const stage = text(['stage']);\n const measured = parts([[count('requirements'), 'requirement']]);\n if (stage === null) return measured;\n return measured === null ? stage : `${stage} · ${measured}`;\n },\n },\n [ApplicationSpecificationFamily.INTEGRATION_PLAN]: {\n title: 'Background & integrations',\n description: 'What this application runs beside its backend — workers it delegates to, schedules that wake on their own — and the outside services it binds.',\n /* DELIVERY: a worker or a minion is part of what the product DOES, not of how it presents itself. */\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ count, parts }) => parts([[count('workers'), 'worker'], [count('minions'), 'minion'], [count('providerBindings'), 'binding']]),\n },\n [ApplicationSpecificationFamily.DOCUMENTATION_PLAN]: {\n title: 'Documentation',\n description: 'The chapters the documentation portal carries, what each documents in this product, and who it is written for.',\n concern: WorkbenchSpecificationArtifactConcern.IDENTITY,\n pulse: ({ count, parts }) => parts([[count('chapters'), 'chapter']]),\n },\n [ApplicationSpecificationFamily.WEBSITE_PLAN]: {\n title: 'Website',\n description: 'What the marketing site says — its pages, the sections that carry each argument, and the market entries they draw on.',\n /* IDENTITY: the site is how the product presents itself, the same axis as the brand beside it. */\n concern: WorkbenchSpecificationArtifactConcern.IDENTITY,\n pulse: ({ count, parts }) => parts([[count('pages'), 'page']]),\n },\n [ApplicationSpecificationFamily.BRAND_BRIEF]: {\n title: 'Brand',\n description: 'How the product presents itself — name, logo direction and visual tone.',\n concern: WorkbenchSpecificationArtifactConcern.IDENTITY,\n /* The name, and the tagline only if there is a name to attach it to. */\n pulse: ({ text }) => {\n const name = text(['name', 'brandName']);\n const tagline = text(['name', 'tagline']);\n return name ? (tagline ? `${name} — ${tagline}` : name) : null;\n },\n },\n [ApplicationSpecificationFamily.BRAND_NAME_SCREENING]: {\n title: 'Brand names',\n description: 'The names proposed for the brand and what a minimal trademark screening of each found — a screening, not a legal clearance opinion.',\n /* IDENTITY, beside the brand: it decides what the product is called. */\n concern: WorkbenchSpecificationArtifactConcern.IDENTITY,\n pulse: ({ count, parts }) => parts([[count('candidates'), 'candidate']]),\n },\n [ApplicationSpecificationFamily.COMPLIANCE_PROGRAM]: {\n title: 'Assurance programme',\n description: 'The controls this product commits to, and the authorities they answer.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n pulse: ({ count, parts }) => parts([\n [count('roleAuthorities'), 'role authority', 'role authorities'],\n [count('capabilityAuthorities'), 'capability authority', 'capability authorities'],\n [count('implementationStatements'), 'implementation statement'],\n ]),\n },\n [ApplicationSpecificationFamily.COMPLIANCE_DOCUMENT_CANDIDATE]: {\n title: 'Governed-document drafts',\n description: 'Drafts of the public governed documents this product must publish.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n pulse: ({ count, parts, text }) => {\n const title = text(['title']);\n const sections = parts([[count('sections'), 'section']]);\n return title ? (sections ? `${title} · ${sections}` : title) : sections;\n },\n },\n [ApplicationSpecificationFamily.COMPLIANCE_DOCUMENT_CANDIDATE_SET]: {\n title: 'Draft document collection',\n description: 'All the governed documents your application has drafted, kept together as each document evolves.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n /*\n * AUTHORED 2026-09-19. This family had no arm in the switch and took its `default: return null`,\n * so a landed set rendered a card with nothing on it — the same card a family whose rule nobody\n * had written would render. How many documents are drafted is what a reader wants.\n */\n pulse: ({ count, parts }) => parts([[count('candidates'), 'drafted document']]),\n },\n [ApplicationSpecificationFamily.DOCUMENT_PUBLICATION]: {\n title: 'Document publication',\n description: 'Which locales and jurisdictions each governed document publishes in.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n pulse: ({ count, parts }) => parts([[count('variants'), 'publication variant']]),\n },\n [ApplicationSpecificationFamily.DOCUMENT_RELEASE_POLICY]: {\n title: 'Document release policy',\n description: 'How each required document may be released — draft, attested, or reviewed.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n pulse: ({ count, parts }) => parts([[count('selections'), 'selection']]),\n },\n [ApplicationSpecificationFamily.DOCUMENT_RELEASE_SET]: {\n title: 'Document releases',\n description: 'The document releases composed from your drafts, document definitions and release policies.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n /* AUTHORED 2026-09-19 — the second family that fell through the switch's default. */\n pulse: ({ count, parts }) => parts([[count('releases'), 'release']]),\n },\n [ApplicationSpecificationFamily.DOCUMENT_FACTS]: {\n title: 'Document facts',\n description: 'The accepted raw facts governed documents are built from.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n pulse: ({ count, parts }) => parts([[count('declarations'), 'declaration']]),\n },\n [ApplicationSpecificationFamily.DOCUMENT_FACTS_AUTHORED]: {\n title: 'Document facts you decide',\n description: 'The facts nobody can derive for you — the ones you decide or have reviewed.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n /*\n * The same shape as the derived half, and deliberately its OWN rule rather than a shared switch\n * arm: the two families are separate precisely so a regeneration cannot reach the human's half,\n * and a shared line would be the first place they quietly became one thing again.\n */\n pulse: ({ count, parts }) => parts([[count('declarations'), 'declaration']]),\n },\n [ApplicationSpecificationFamily.PROCESSOR_REGISTER]: {\n title: 'Who else processes your data',\n description: 'Every vendor that handles your users\\' personal data, who they legally are, and where.',\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n pulse: ({ count, parts }) => parts([[count('processors'), 'processor']]),\n },\n [ApplicationSpecificationFamily.RISK_REGISTER]: {\n title: 'What could go wrong',\n description: 'The risks this application carries, how bad each would be, and what you have decided to do about them.',\n /*\n * OBLIGATIONS, beside the programme rather than under it. A programme states which control\n * objectives the application CLAIMS; a register states which exposures it CARRIES. They inform\n * each other and answer different questions — the family schema argues the same split — so the\n * register belongs in the same concern and is not folded into the programme.\n */\n concern: WorkbenchSpecificationArtifactConcern.OBLIGATIONS,\n pulse: ({ count, parts }) => parts([[count('entries'), 'risk']]),\n },\n [ApplicationSpecificationFamily.CREATOR_INPUTS]: {\n title: 'What you told us',\n description: 'Your answers to the questions the creation steps asked — kept, so nothing asks twice.',\n /*\n * INTENT: the dossier is the creator's own words about the product, the same axis as the vision\n * they feed. It is the only family here that nobody PRODUCES, and its pulse counts answers rather\n * than an artifact's parts.\n */\n concern: WorkbenchSpecificationArtifactConcern.INTENT,\n pulse: ({ count, parts }) => parts([[count('answers'), 'answer']]),\n },\n [ApplicationSpecificationFamily.EXPERT_PERSONAS]: {\n title: 'Who reviews the work',\n description: 'The expert reviewers derived for this application — the panels that decide placement and judge the logo.',\n /*\n * DELIVERY: a charter is part of HOW the application gets built — the panels convene at placement and at\n * the logo step — not a statement about the product's intent, scope, identity or obligations (#572).\n * The landed value is the charter ARRAY, so the pulse counts the array itself: the aggregator exports\n * `ExpertPersonaCharter[]`, and a reader keyed on a top-level collection name would count nothing.\n */\n concern: WorkbenchSpecificationArtifactConcern.DELIVERY,\n pulse: ({ length, parts }) => parts([[length(), 'expert reviewer']]),\n },\n};\n\n/** The companion records a landing writes beside a family's own `index.ts`. */\n/**\n * The question a family answers — its CONCERN — for a family named by id, as the workbench groups\n * by it. A family this table does not know answers `UNCLASSIFIED`, the visible bucket, never a\n * plausible guess. Exported so the dossier groups its questions on the same axis the artifact list\n * groups its families (#1454, gap 4): one vocabulary for \"what is this about\".\n */\nexport function specificationFamilyConcern(family: string): WorkbenchSpecificationArtifactConcern {\n return (FAMILY_EDITORIAL as Readonly<Record<string, SpecificationFamilyEditorial | undefined>>)[family]?.concern ?? WorkbenchSpecificationArtifactConcern.UNCLASSIFIED;\n}\n\nconst DECISION_RECORD_FILE_NAME = 'DECISIONS.md';\nconst DIAGRAM_FILE_NAME = 'DIAGRAM.md';\n\n/** One family row, JSON-safe, matching `Workbench_SpecificationArtifact_Schema`. */\nexport interface SpecificationArtifactRow {\n readonly family: string;\n readonly title: string;\n /** Static per-family subtitle — see {@link FAMILY_DESCRIPTIONS}. */\n readonly description: string;\n /** One-line pulse of the landed content, `null` when nothing landed. See {@link deriveContentPulse}. */\n readonly contentSummary: string | null;\n readonly concern: WorkbenchSpecificationArtifactConcern;\n readonly state: WorkbenchSpecificationArtifactState;\n readonly schemaRef: string;\n readonly sourcePath: string | null;\n readonly errorCount: number;\n readonly warnCount: number;\n readonly producedByPlaybookRefs: string[];\n /**\n * The landed family value, RAW — exactly what the specifications package exports, never the\n * validator's parsed output (whose schema `.default()`s would inject content the author never\n * wrote). The workbench's per-family templates render from this; the markdown `document` beside\n * it is their structural fallback. `null` when the family has not landed.\n */\n readonly content: Record<string, unknown> | null;\n readonly document: string | null;\n readonly issues: string | null;\n /** The validator's warnings, structured — see `Workbench_SpecificationArtifact_Schema.warnings`. */\n readonly warnings: { readonly path: string; readonly message: string }[];\n readonly decisionRecord: string | null;\n readonly diagram: string | null;\n}\n\nexport interface SpecificationArtifactsResponse {\n readonly artifacts: SpecificationArtifactRow[];\n readonly trace: {\n readonly families: number;\n readonly landed: number;\n readonly invalid: number;\n readonly evaluatedAt: string;\n };\n}\n\n/**\n * Every playbook whose declared `outputs[].family` is `family`.\n *\n * The durable half of \"what produced this\": a fact about the compiled catalog, carried in git, true\n * whether or not any run's state still exists. A link to the RUN that produced a particular value was\n * deliberately not built — runs, traces and the write register are a per-run cache under\n * `one-source-of-truth.md` rule 5, so a durable artifact pointing into deletable state is dangling by\n * design. The link runs the other way: a run may name what it wrote.\n *\n * Built ONCE per derivation rather than per family: the catalog read is the same 21 files either way,\n * and looping it fifteen times would multiply the only file I/O in this behavior by fifteen.\n */\nfunction buildPlaybookRefsByFamily(): ReadonlyMap<string, string[]> {\n const byFamily = new Map<string, string[]>();\n for (const entry of listFrameworkKnowledgePlaybooks()) {\n const hydrated = getFrameworkKnowledgePlaybook(entry.ref);\n const outputs = (hydrated?.playbook as { outputs?: readonly { family?: unknown }[] } | undefined)?.outputs ?? [];\n for (const output of outputs) {\n if (typeof output?.family !== 'string' || output.family.length === 0) continue;\n const refs = byFamily.get(output.family) ?? [];\n if (!refs.includes(entry.ref)) refs.push(entry.ref);\n byFamily.set(output.family, refs);\n }\n }\n return byFamily;\n}\n\n/**\n * Read a markdown record committed beside a family, or `null`.\n *\n * `null` for an absent file is a FACT with a precise meaning, and the two files mean different things\n * by their absence: no `DIAGRAM.md` means this family has no diagram renderer, while no\n * `DECISIONS.md` means the run that produced it asked the creator nothing — never that no\n * clarification happened. The row's JSDoc carries that distinction to the reader; here both are just\n * a missing file.\n */\nfunction readCommittedRecord(packageRoot: string, familyRelativePath: string, fileName: string): string | null {\n const path = join(packageRoot, dirname(familyRelativePath), fileName);\n if (!existsSync(path)) return null;\n try {\n const content = readFileSync(path, 'utf8').trim();\n return content.length > 0 ? content : null;\n } catch {\n /*\n * A record that cannot be READ is reported as absent rather than failing the derivation. It is\n * supporting provenance beside the artifact, not the artifact — refusing the whole page because\n * one sibling file is unreadable would deny a reviewer the fifteen rows that are fine.\n */\n return null;\n }\n}\n\n/**\n * The validator's ERRORS, rendered for a reader, or `null` when there are none.\n *\n * An error says this artifact no longer satisfies its own contract, and a reviewer must meet it\n * before the prose — the page leads with this block. WARNINGS are not rendered here: they travel as\n * the structured `warnings` list, which the page shows in its own authored words at the foot.\n */\nfunction renderIssues(errorDetails: readonly string[]): string | null {\n if (errorDetails.length === 0) return null;\n const lines = [`**${errorDetails.length} error${errorDetails.length === 1 ? '' : 's'}** — the artifact does not satisfy its own contract.`, ''];\n for (const detail of errorDetails) lines.push(`- ${detail}`);\n return lines.join('\\n').trim();\n}\n\n/**\n * A one-line PULSE of what actually landed — the card's third line, beside the title and subtitle.\n *\n * Each family answers this for itself, in its own `pulse` rule beside its title and concern, because\n * what is worth saying about a landed value is a decision about THAT family: the vision's is its\n * one-liner, the market's is how many ICPs and personas, the brand's is the name and tagline. A\n * generic \"N keys\" would be true of all of them and useful for none.\n *\n * This used to be an eighteen-arm `switch` here, three declarations away from the titles and\n * concerns it belongs with. It is now one field of {@link SpecificationFamilyEditorial}; this\n * function is only the reader those rules are handed.\n *\n * It runs on the RAW landed value, never the validator's parsed output — a schema `.default()` would\n * otherwise inject content the author never wrote and the card would report it as landed. And it\n * runs for an INVALID family too, deliberately: a reader shown \"3 ICPs\" beside a red badge knows\n * more than one shown nothing.\n */\nfunction deriveContentPulse(family: ApplicationSpecificationFamily, snapshot: Record<string, unknown> | readonly unknown[]): string | null {\n const member = (key: string): unknown => (Array.isArray(snapshot) ? undefined : (snapshot as Record<string, unknown>)[key]);\n const read: FamilyPulseReader = {\n count: (key) => (Array.isArray(member(key)) ? (member(key) as unknown[]).length : 0),\n length: () => (Array.isArray(snapshot) ? snapshot.length : 0),\n text: (path) => {\n let value: unknown = snapshot;\n for (const key of path) {\n if (!value || typeof value !== 'object') return null;\n value = (value as Record<string, unknown>)[key];\n }\n return typeof value === 'string' && value.trim().length > 0 ? value.trim() : null;\n },\n parts: (entries) => {\n const present = entries\n .filter(([n]) => n > 0)\n .map(([n, singular, plural]) => `${n} ${n === 1 ? singular : plural ?? `${singular}s`}`);\n return present.length > 0 ? present.join(' · ') : null;\n },\n };\n return FAMILY_EDITORIAL[family].pulse(read);\n}\n\nfunction projectFamily(input: {\n readonly binding: ApplicationSpecificationSemanticSchemaBinding;\n readonly snapshot: unknown;\n readonly packageRoot: string;\n readonly appRelativePackagePrefix: string;\n readonly playbookRefsByFamily: ReadonlyMap<string, string[]>;\n}): SpecificationArtifactRow {\n const { binding, snapshot, packageRoot, appRelativePackagePrefix, playbookRefsByFamily } = input;\n const familyRelativePath = getFamilyPackageRelativePath(binding.family);\n /*\n * ONE lookup, and no fallback — `binding.family` is typed by the vocabulary and `FAMILY_EDITORIAL`\n * is total over it, so the three `?? binding.family` slug fallbacks this replaced are unreachable\n * by construction rather than guarded at runtime. A family with nothing authored cannot compile.\n */\n const editorial = FAMILY_EDITORIAL[binding.family];\n\n const base = {\n family: binding.family,\n title: editorial.title,\n description: editorial.description,\n concern: editorial.concern,\n schemaRef: binding.schemaRef,\n sourcePath: familyRelativePath ? `${appRelativePackagePrefix}/${familyRelativePath}` : null,\n producedByPlaybookRefs: [...(playbookRefsByFamily.get(binding.family) ?? [])],\n };\n\n if (snapshot === undefined || snapshot === null) {\n return {\n ...base,\n state: WorkbenchSpecificationArtifactState.NOT_LANDED,\n errorCount: 0,\n warnCount: 0,\n contentSummary: null,\n content: null,\n document: null,\n issues: null,\n warnings: [],\n decisionRecord: null,\n diagram: null,\n };\n }\n\n const validation = binding.validate(snapshot);\n return {\n ...base,\n state: validation.validation === JourneyArtifactValidationState.VALID\n ? WorkbenchSpecificationArtifactState.LANDED_VALID\n : WorkbenchSpecificationArtifactState.LANDED_INVALID,\n errorCount: validation.errorCount,\n warnCount: validation.warnCount,\n // An ARRAY landed value has a pulse too (the charter set: \"5 expert reviewers\"); only a non-object has none.\n contentSummary: typeof snapshot === 'object' && snapshot !== null\n ? deriveContentPulse(binding.family, snapshot as Record<string, unknown> | readonly unknown[])\n : null,\n /*\n * Both carried from the RAW snapshot, not from the validator's parsed output. The validator\n * parses with the family schema, whose `.default()` members would inject values the author never\n * wrote — a reviewer would then be shown, and could accept, content nobody authored. Mutation-\n * proven on the `document` half (parsed-value render reddens the raw-value pin); `content`\n * follows the same rule for the same reason.\n *\n * Every family binding's `snapshotSchema` is an object EXCEPT `expert-personas`, whose landed value\n * is the charter ARRAY (#572). The row schema types `content` as a record, so an array family carries\n * `content: null` deliberately and is read through its pulse and the review document; anything else\n * non-object is reported rather than smuggled through as a shape the row schema would refuse.\n */\n content: typeof snapshot === 'object' && !Array.isArray(snapshot) ? snapshot as Record<string, unknown> : null,\n document: renderSpecificationFamilyReviewDocument({ title: editorial.title, value: snapshot }),\n issues: renderIssues(validation.errorDetails),\n warnings: validation.warnings.map(({ path, message }) => ({ path, message })),\n decisionRecord: familyRelativePath\n ? readCommittedRecord(packageRoot, familyRelativePath, DECISION_RECORD_FILE_NAME)\n : null,\n diagram: familyRelativePath\n ? readCommittedRecord(packageRoot, familyRelativePath, DIAGRAM_FILE_NAME)\n : null,\n };\n}\n\n/**\n * Project every application-specification family for a human reviewer.\n *\n * `packageRoot` is the specifications package's absolute root, and `appRelativePackagePrefix` its\n * directory name relative to the application — so a row can name a path a reader recognizes\n * (`specifications/src/vision/index.ts`) rather than one that only makes sense inside the package.\n */\nexport function projectSpecificationArtifacts(input: {\n readonly moduleExports: Record<string, unknown>;\n readonly packageRoot: string;\n readonly appRelativePackagePrefix: string;\n readonly evaluatedAt: string;\n}): SpecificationArtifactsResponse {\n const companionExports = resolveSpecificationsCompanionExports(input.moduleExports) as unknown as Record<string, unknown>;\n const playbookRefsByFamily = buildPlaybookRefsByFamily();\n\n const artifacts = APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS.map((binding) =>\n projectFamily({\n binding,\n /*\n * A family with no `companionExportsField` is a DRAFT — it is not accepted application truth\n * and has no slot to read (`compliance-document-candidate`). It is reported as NOT_LANDED\n * rather than skipped, for the same reason absent families are rows at all: an omitted row and\n * a family that does not exist look identical to a reader.\n */\n snapshot: binding.companionExportsField === undefined\n ? undefined\n : companionExports[binding.companionExportsField],\n packageRoot: input.packageRoot,\n appRelativePackagePrefix: input.appRelativePackagePrefix,\n playbookRefsByFamily,\n }),\n );\n\n return {\n artifacts,\n trace: {\n families: artifacts.length,\n landed: artifacts.filter((artifact) => artifact.state !== WorkbenchSpecificationArtifactState.NOT_LANDED).length,\n invalid: artifacts.filter((artifact) => artifact.state === WorkbenchSpecificationArtifactState.LANDED_INVALID).length,\n evaluatedAt: input.evaluatedAt,\n },\n };\n}\n"]}
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import { z } from 'zod';
|
|
16
16
|
export declare const I18nLockLocaleStatusSchema: z.ZodEnum<{
|
|
17
|
-
fresh: "fresh";
|
|
18
17
|
failed: "failed";
|
|
18
|
+
fresh: "fresh";
|
|
19
19
|
stale: "stale";
|
|
20
20
|
never_run: "never_run";
|
|
21
21
|
}>;
|
|
22
22
|
export declare const I18nLockLocaleEntrySchema: z.ZodObject<{
|
|
23
23
|
status: z.ZodEnum<{
|
|
24
|
-
fresh: "fresh";
|
|
25
24
|
failed: "failed";
|
|
25
|
+
fresh: "fresh";
|
|
26
26
|
stale: "stale";
|
|
27
27
|
never_run: "never_run";
|
|
28
28
|
}>;
|
|
@@ -38,8 +38,8 @@ export declare const I18nLockUnitEntrySchema: z.ZodObject<{
|
|
|
38
38
|
primarySha: z.ZodOptional<z.ZodString>;
|
|
39
39
|
locales: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
40
40
|
status: z.ZodEnum<{
|
|
41
|
-
fresh: "fresh";
|
|
42
41
|
failed: "failed";
|
|
42
|
+
fresh: "fresh";
|
|
43
43
|
stale: "stale";
|
|
44
44
|
never_run: "never_run";
|
|
45
45
|
}>;
|
|
@@ -61,8 +61,8 @@ export declare const I18nLockSectionSchema: z.ZodObject<{
|
|
|
61
61
|
primarySha: z.ZodOptional<z.ZodString>;
|
|
62
62
|
locales: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
63
63
|
status: z.ZodEnum<{
|
|
64
|
-
fresh: "fresh";
|
|
65
64
|
failed: "failed";
|
|
65
|
+
fresh: "fresh";
|
|
66
66
|
stale: "stale";
|
|
67
67
|
never_run: "never_run";
|
|
68
68
|
}>;
|
|
@@ -14,17 +14,47 @@ export declare function resolveCompanionPackageRoot(fromDirectory?: string): str
|
|
|
14
14
|
* secret apply below, so the two cannot disagree about which file a restart would load.
|
|
15
15
|
*/
|
|
16
16
|
export declare const COMPANION_ENV_FILE_PATH: string;
|
|
17
|
+
/** A request to apply a name the companion's `.env` has never carried. A caller error, never applied. */
|
|
18
|
+
export declare class CompanionEnvVariableRefusal extends Error {
|
|
19
|
+
readonly envVarNames: readonly string[];
|
|
20
|
+
constructor(envVarNames: readonly string[]);
|
|
21
|
+
}
|
|
22
|
+
/** What applying one variable did: whether it is now present in this process. */
|
|
23
|
+
export interface CompanionEnvVariableApplication {
|
|
24
|
+
readonly envVarName: string;
|
|
25
|
+
readonly present: boolean;
|
|
26
|
+
}
|
|
17
27
|
/**
|
|
18
|
-
* Apply
|
|
28
|
+
* Apply variables of the companion's REGENERATED `.env` to this process, as a restart would (#1637).
|
|
19
29
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
30
|
+
* A secret changed while the companion runs would otherwise reach it only at its next start, because the
|
|
31
|
+
* `.env` is read once, at boot. Restarting is not the answer either: it ends every coding or playbook run
|
|
32
|
+
* in flight, and a created application's companion has no supervisor to restart it (it runs as plain
|
|
33
|
+
* `node --env-file-if-exists=.env` under `pnpm -r run dev`). Provider secrets are read from `process.env`
|
|
34
|
+
* at call time (`ExternalProvidersRegistryBackendService.getProviderSecret`), so setting the variable is
|
|
35
|
+
* enough for the next call to use it.
|
|
26
36
|
*
|
|
27
|
-
*
|
|
37
|
+
* Takes NAMES, never values. Each value is read back from the file `config sync` just wrote — the exact
|
|
38
|
+
* bytes a restart would load — so a key the companion's scope does not receive (the env builder confines
|
|
39
|
+
* it) is removed here too, never injected, and the route that calls this cannot be used to plant a value.
|
|
40
|
+
* All names are checked before any is applied, so a refused request changes nothing.
|
|
41
|
+
*
|
|
42
|
+
* Where this differs from a restart: a value the SHELL exported before `wildo local dev` wins at boot
|
|
43
|
+
* (neither `--env-file` nor `dotenv` overrides an existing variable), but this replaces it — or, on an
|
|
44
|
+
* unset, removes it. The change was made deliberately through `secrets.json`, so the file is what the
|
|
45
|
+
* person meant; a shell export of the same name is the stale one.
|
|
46
|
+
*/
|
|
47
|
+
export declare function applyCompanionEnvVariables(envVarNames: readonly string[], envFilePath?: string): CompanionEnvVariableApplication[];
|
|
48
|
+
/**
|
|
49
|
+
* Apply the variables, then rebuild the provider registry so the next provider call sees them. The ONE
|
|
50
|
+
* sequence both doors use: the workbench's secrets section, and `wildo secrets set` from a terminal
|
|
51
|
+
* (`POST /api/companion/runtime/env/apply`).
|
|
52
|
+
*
|
|
53
|
+
* If the refresh throws, the variables ARE already in `process.env` (provider secrets are read from it at
|
|
54
|
+
* call time), but a registry built from the old configuration may still refuse; the error propagates so the
|
|
55
|
+
* caller reports a failure and the person restarts, which is the safe reading.
|
|
28
56
|
*/
|
|
29
|
-
export declare function
|
|
57
|
+
export declare function reloadCompanionEnvVariables(envVarNames: readonly string[], providersRegistry: {
|
|
58
|
+
refreshFromConfig(): unknown;
|
|
59
|
+
}, envFilePath?: string): Promise<CompanionEnvVariableApplication[]>;
|
|
30
60
|
//# sourceMappingURL=companion-env-file.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion-env-file.d.ts","sourceRoot":"","sources":["../../../../../src/core/runtime/companion-env-file.ts"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,aAAa,GAAE,MAAqD,GAAG,MAAM,CAQxH;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,QAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"companion-env-file.d.ts","sourceRoot":"","sources":["../../../../../src/core/runtime/companion-env-file.ts"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,aAAa,GAAE,MAAqD,GAAG,MAAM,CAQxH;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,QAAmD,CAAC;AAoBxF,yGAAyG;AACzG,qBAAa,2BAA4B,SAAQ,KAAK;aACjB,WAAW,EAAE,SAAS,MAAM,EAAE;gBAA9B,WAAW,EAAE,SAAS,MAAM,EAAE;CAIlE;AAED,iFAAiF;AACjF,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,WAAW,GAAE,MAAgC,GAC5C,+BAA+B,EAAE,CAmBnC;AAED;;;;;;;;GAQG;AACH,wBAAsB,2BAA2B,CAC/C,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,iBAAiB,EAAE;IAAE,iBAAiB,IAAI,OAAO,CAAA;CAAE,EACnD,WAAW,GAAE,MAAgC,GAC5C,OAAO,CAAC,+BAA+B,EAAE,CAAC,CAI5C"}
|
|
@@ -28,26 +28,85 @@ export function resolveCompanionPackageRoot(fromDirectory = path.dirname(fileURL
|
|
|
28
28
|
* secret apply below, so the two cannot disagree about which file a restart would load.
|
|
29
29
|
*/
|
|
30
30
|
export const COMPANION_ENV_FILE_PATH = path.join(resolveCompanionPackageRoot(), '.env');
|
|
31
|
+
/** The variable names an env file carries; empty when it cannot be read. */
|
|
32
|
+
function readEnvFileKeys(envFilePath) {
|
|
33
|
+
try {
|
|
34
|
+
return Object.keys(dotenv.parse(readFileSync(envFilePath, 'utf8')));
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Every variable name the companion's `.env` has carried while this process ran: what it held when the
|
|
42
|
+
* process started (read when this module loads, which `index.ts` does before it loads the file), and every
|
|
43
|
+
* name applied since. A name outside it and outside the current file is not a companion env variable, so
|
|
44
|
+
* {@link applyCompanionEnvVariables} refuses it rather than deleting it — `PATH` must not be removable by
|
|
45
|
+
* naming it.
|
|
46
|
+
*/
|
|
47
|
+
const companionEnvFileKeys = new Set(readEnvFileKeys(COMPANION_ENV_FILE_PATH));
|
|
48
|
+
/** A request to apply a name the companion's `.env` has never carried. A caller error, never applied. */
|
|
49
|
+
export class CompanionEnvVariableRefusal extends Error {
|
|
50
|
+
envVarNames;
|
|
51
|
+
constructor(envVarNames) {
|
|
52
|
+
super(`Not a variable of the companion's .env: ${envVarNames.join(', ')}.`);
|
|
53
|
+
this.envVarNames = envVarNames;
|
|
54
|
+
this.name = 'CompanionEnvVariableRefusal';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
31
57
|
/**
|
|
32
|
-
* Apply
|
|
58
|
+
* Apply variables of the companion's REGENERATED `.env` to this process, as a restart would (#1637).
|
|
33
59
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
60
|
+
* A secret changed while the companion runs would otherwise reach it only at its next start, because the
|
|
61
|
+
* `.env` is read once, at boot. Restarting is not the answer either: it ends every coding or playbook run
|
|
62
|
+
* in flight, and a created application's companion has no supervisor to restart it (it runs as plain
|
|
63
|
+
* `node --env-file-if-exists=.env` under `pnpm -r run dev`). Provider secrets are read from `process.env`
|
|
64
|
+
* at call time (`ExternalProvidersRegistryBackendService.getProviderSecret`), so setting the variable is
|
|
65
|
+
* enough for the next call to use it.
|
|
40
66
|
*
|
|
41
|
-
*
|
|
67
|
+
* Takes NAMES, never values. Each value is read back from the file `config sync` just wrote — the exact
|
|
68
|
+
* bytes a restart would load — so a key the companion's scope does not receive (the env builder confines
|
|
69
|
+
* it) is removed here too, never injected, and the route that calls this cannot be used to plant a value.
|
|
70
|
+
* All names are checked before any is applied, so a refused request changes nothing.
|
|
71
|
+
*
|
|
72
|
+
* Where this differs from a restart: a value the SHELL exported before `wildo local dev` wins at boot
|
|
73
|
+
* (neither `--env-file` nor `dotenv` overrides an existing variable), but this replaces it — or, on an
|
|
74
|
+
* unset, removes it. The change was made deliberately through `secrets.json`, so the file is what the
|
|
75
|
+
* person meant; a shell export of the same name is the stale one.
|
|
42
76
|
*/
|
|
43
|
-
export function
|
|
77
|
+
export function applyCompanionEnvVariables(envVarNames, envFilePath = COMPANION_ENV_FILE_PATH) {
|
|
44
78
|
const parsed = dotenv.parse(readFileSync(envFilePath, 'utf8'));
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
79
|
+
/*
|
|
80
|
+
* OWN properties only. `dotenv.parse` returns a plain object, so `name in parsed` admitted every
|
|
81
|
+
* `Object.prototype` member (`hasOwnProperty`, `constructor`, …): applying one set a process variable to a
|
|
82
|
+
* function's source text and shadowed the method on `process.env` (found in review, reproduced).
|
|
83
|
+
*/
|
|
84
|
+
const unknown = envVarNames.filter((name) => !Object.hasOwn(parsed, name) && !companionEnvFileKeys.has(name));
|
|
85
|
+
if (unknown.length > 0)
|
|
86
|
+
throw new CompanionEnvVariableRefusal(unknown);
|
|
87
|
+
return envVarNames.map((envVarName) => {
|
|
88
|
+
companionEnvFileKeys.add(envVarName);
|
|
89
|
+
const value = Object.hasOwn(parsed, envVarName) ? parsed[envVarName] : undefined;
|
|
90
|
+
if (value === undefined || value.length === 0) {
|
|
91
|
+
delete process.env[envVarName];
|
|
92
|
+
return { envVarName, present: false };
|
|
93
|
+
}
|
|
94
|
+
process.env[envVarName] = value;
|
|
95
|
+
return { envVarName, present: true };
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Apply the variables, then rebuild the provider registry so the next provider call sees them. The ONE
|
|
100
|
+
* sequence both doors use: the workbench's secrets section, and `wildo secrets set` from a terminal
|
|
101
|
+
* (`POST /api/companion/runtime/env/apply`).
|
|
102
|
+
*
|
|
103
|
+
* If the refresh throws, the variables ARE already in `process.env` (provider secrets are read from it at
|
|
104
|
+
* call time), but a registry built from the old configuration may still refuse; the error propagates so the
|
|
105
|
+
* caller reports a failure and the person restarts, which is the safe reading.
|
|
106
|
+
*/
|
|
107
|
+
export async function reloadCompanionEnvVariables(envVarNames, providersRegistry, envFilePath = COMPANION_ENV_FILE_PATH) {
|
|
108
|
+
const applied = applyCompanionEnvVariables(envVarNames, envFilePath);
|
|
109
|
+
await providersRegistry.refreshFromConfig();
|
|
110
|
+
return applied;
|
|
52
111
|
}
|
|
53
112
|
//# sourceMappingURL=companion-env-file.js.map
|