@wildo-ai/dev-companion 1.1.15 → 1.1.16

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.
Files changed (96) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +165 -5
  3. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  4. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +239 -8
  5. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  6. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +2 -1
  7. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -1
  8. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +2 -1
  9. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -1
  10. package/dist/esm/claude-cli/models/isolated-recheck-interference.models.d.ts +68 -0
  11. package/dist/esm/claude-cli/models/isolated-recheck-interference.models.d.ts.map +1 -0
  12. package/dist/esm/claude-cli/models/isolated-recheck-interference.models.js +198 -0
  13. package/dist/esm/claude-cli/models/isolated-recheck-interference.models.js.map +1 -0
  14. package/dist/esm/claude-cli/models/workspace-path-claims.models.d.ts +138 -0
  15. package/dist/esm/claude-cli/models/workspace-path-claims.models.d.ts.map +1 -0
  16. package/dist/esm/claude-cli/models/workspace-path-claims.models.js +204 -0
  17. package/dist/esm/claude-cli/models/workspace-path-claims.models.js.map +1 -0
  18. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +20 -0
  19. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
  20. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +27 -12
  21. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
  22. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +155 -3
  23. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  24. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +791 -151
  25. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  26. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  27. package/dist/esm/companion-api/controllers/companion.controller.js +7 -1
  28. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  29. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +1 -1
  30. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -1
  31. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts +13 -0
  32. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts.map +1 -1
  33. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js +98 -16
  34. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js.map +1 -1
  35. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts +21 -1
  36. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
  37. package/dist/esm/expert-personas/services/expert-persona.companion.service.js +35 -3
  38. package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
  39. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.d.ts +62 -0
  40. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.d.ts.map +1 -0
  41. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.js +62 -0
  42. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.js.map +1 -0
  43. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.d.ts +62 -0
  44. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.d.ts.map +1 -0
  45. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.js +62 -0
  46. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.js.map +1 -0
  47. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +1 -1
  48. package/dist/esm/i18n/system_enums/workbench-build.en.js +1 -1
  49. package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -1
  50. package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts +23 -0
  51. package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts.map +1 -1
  52. package/dist/esm/meta-workflows/models/carried-verification-failure.models.js +14 -0
  53. package/dist/esm/meta-workflows/models/carried-verification-failure.models.js.map +1 -1
  54. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts +12 -1
  55. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts.map +1 -1
  56. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js +99 -1
  57. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js.map +1 -1
  58. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts +5 -0
  59. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts.map +1 -1
  60. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js +22 -1
  61. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js.map +1 -1
  62. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +67 -20
  63. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  64. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +344 -76
  65. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  66. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts.map +1 -1
  67. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js +9 -0
  68. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js.map +1 -1
  69. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +47 -1
  70. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  71. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +98 -9
  72. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  73. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +38 -2
  74. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  75. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +176 -22
  76. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
  77. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts +45 -0
  78. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts.map +1 -1
  79. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js +74 -0
  80. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js.map +1 -1
  81. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts.map +1 -1
  82. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +9 -1
  83. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js.map +1 -1
  84. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +64 -5
  85. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  86. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +139 -14
  87. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  88. package/dist/esm/meta-workflows/services/website-demo-facts.models.d.ts +19 -1
  89. package/dist/esm/meta-workflows/services/website-demo-facts.models.d.ts.map +1 -1
  90. package/dist/esm/meta-workflows/services/website-demo-facts.models.js +7 -5
  91. package/dist/esm/meta-workflows/services/website-demo-facts.models.js.map +1 -1
  92. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts +2 -0
  93. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts.map +1 -1
  94. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js +3 -1
  95. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js.map +1 -1
  96. package/package.json +17 -17
@@ -1 +1 @@
1
- {"version":3,"file":"companion.controller.js","sourceRoot":"","sources":["../../../../src/companion-api/controllers/companion.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEzD,OAAO,EACL,gCAAgC,EAChC,aAAa,EACb,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GAGpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,2EAA2E,CAAC;AAC1H,OAAO,EAAE,yBAAyB,EAAE,MAAM,oFAAoF,CAAC;AAC/H,OAAO,EAAE,qCAAqC,EAAE,MAAM,oEAAoE,CAAC;AAC3H,OAAO,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACjH,OAAO,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;AACxG,OAAO,EACL,kCAAkC,EAClC,qCAAqC,EACrC,0CAA0C,EAC1C,yCAAyC,EACzC,yCAAyC,EACzC,kCAAkC,EAClC,mCAAmC,EACnC,4CAA4C,EAC5C,oCAAoC,EACpC,yCAAyC,EACzC,oCAAoC,EACpC,qCAAqC,GAEtC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,SAAS,EACT,kBAAkB,EAClB,2BAA2B,EAC3B,aAAa,EACb,eAAe,EACf,iCAAiC,EACjC,sCAAsC,EACtC,0BAA0B,GAE3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,wBAAwB,EAAE,oCAAoC,EAAE,MAAM,wDAAwD,CAAC;AACxI,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,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AAK,SAAS,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrG,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,sFAAsF;cACxF,mHAAmH;cACnH,sDAAsD;KAC3D,CAAC;AACJ,CAAC","sourcesContent":["import { injectable, inject, optional } from 'inversify';\nimport type { Request, Response, NextFunction } from 'express';\nimport {\n AbstractControllerBackendService,\n LoggerService,\n ErrorBuilderBackendService,\n ErrorHandlerService,\n SAAS_SERVICE_TYPES,\n describeCaughtError,\n type ContentSafetyBackendService,\n type ExternalProvidersRegistryBackendService,\n} from '@wildo-ai/saas-backend-lib';\nimport { researchFamilyScreeningHostOf } from '../../meta-workflows/services/build-brief-third-party-screening.companion';\nimport { screenIntrospectionAnswer } from '../../meta-workflows/services/introspection-answer-third-party-screening.companion';\nimport { readCompanionResearchInformedFamilies } from '../../meta-workflows/services/research-informed-families.companion';\nimport { CompanionEnvVariableRefusal, reloadCompanionEnvVariables } from '../../core/runtime/companion-env-file';\nimport { isApplicationStartupFailure } from '../../core/runtime/application-runtime-liveness.companion';\nimport {\n CompanionActorTasksListQuerySchema,\n CompanionCreateActorTaskRequestSchema,\n CompanionCreateActorExecutionRequestSchema,\n CompanionLandGovernanceFactsRequestSchema,\n CompanionCreateFlowExecutionRequestSchema,\n CompanionExecutionsListQuerySchema,\n CompanionIntrospectionRequestSchema,\n CompanionDispatchNamedBuildTaskRequestSchema,\n CompanionCloseBuildTaskRequestSchema,\n CompanionApproveFollowUpTaskRequestSchema,\n CompanionRearmBuildTaskRequestSchema,\n CompanionUpdateActorTaskRequestSchema,\n type FileUpdateRequest,\n} from '../companion-api.schemas';\nimport {\n ErrorType,\n ErrorActionBackend,\n ErrorCustomMessageReference,\n ErrorSeverity,\n AppFrontendType,\n computeChartRegistrationAlignment,\n ChartRegistrationBackendRefsProvenance,\n normalizeChartExecutionRef,\n type FrontendChartRegistrationRef,\n} from '@wildo-ai/saas-models';\nimport { loadBackendCompanionData, readSpecificationsEvaluationFindings } from '../../core/context/companion-package-loaders.companion';\nimport { companionLaunchBlockerPorts, readLaunchBlockers } from '../../core/introspection/resources/launch-blockers.companion';\nimport { AvailableLanguage } from '@wildo-ai/presets-components-models';\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport { ReadVerbRefusalType, ReadVerbSnapshotKey, ReadVerbSnapshots, UnheldHandlerResponse, captureHandlerResponse, isStatusChangingRequest } from './read-verb-snapshots';\nimport type { DossierCompanionService } from '../../meta-workflows/services/dossier.companion.service';\nimport { serializeDossierWrite } from '../../meta-workflows/services/dossier-write-queue.companion.utils';\nimport { LabellingPlannerCompanionService } from '../../i18n-labelling/services/labelling-planner.companion.service';\nimport { LabellizeOrchestratorCompanionService } from '../../i18n-labelling/services/labellize-orchestrator.companion.service';\nimport { TranslateOrchestratorCompanionService } from '../../i18n-labelling/services/translate-orchestrator.companion.service';\nimport { EmailTemplateLabellingUnitsCompanionService } from '../../i18n-labelling/services/email-template-labelling-units.companion.service';\nimport { EMAIL_TEMPLATE_LABELLING_BUCKET } from '../../i18n-labelling/models/email-template-labelling-unit.models';\nimport { isCompanionOwnLabelUnitId } from '../../i18n-labelling/models/companion-own-label-unit.models';\nimport { EmailTemplateCompanionService } from '../../email/services/email-template.companion.service';\nimport { PlaybookRunAlreadyInFlightError, PlaybookNotReadyError, PlaybookRunCompanionService, PlaybookRunLandingConflictError, UnknownPlaybookError } from '../../meta-workflows/services/playbook-run.companion.service';\nimport { PlaybookInstanceCompanionService, PlaybookInstanceRefusedError, PlaybookInstanceTreeBusyError } from '../../meta-workflows/services/playbook-instance.companion.service';\nimport { CREATION_PLANE_IDENTITY_FIELDS, CreationPlaneProjectionCompanionService } from '../../core/introspection/resources/creation-plane-projection.companion.service';\nimport { buildCreationConsoleFeed, creationPlaneBehaviorForResourceType } from '../../core/introspection/resources/creation-console-projection.companion';\nimport {\n CreationConsoleRefusal,\n CreationConsoleRefusalKind,\n answerCreationConsoleQuestion,\n readCreationConsoleAssumptions,\n readCreationConsoleWithoutAnswer,\n readCreationConsoleQuestions,\n type CreationConsolePorts,\n} from '../../core/introspection/resources/creation-console-answer.companion';\nimport { translateCreationPlaneDispatchError } from '../../core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service';\nimport {\n CreationConsoleQuestionKind,\n CreationConsole_AnswerRequest_Schema,\n CreationConsole_InterviewDepthRequest_Schema,\n CreationConsole_ProposalRequest_Schema,\n type CreationConsole_ProposalResponse,\n WorkbenchCreationPlaneBehavior,\n Workbench_PlaybookRunOutcomeStatus,\n type CreationConsole_Feed,\n type CreationConsole_Pulse,\n type CreationDrive_AcceptOutcome,\n type CreationDrive_Status,\n type CreationDrive_RequirementsStanding,\n type CreationConsole_PulseSummary,\n type CreationConsole_QuestionQueue,\n summarizeCreationConsoleFeed,\n type Workbench_CreationHomeLine,\n} from '@wildo-ai/platform-core-shared';\nimport { FoundationExecutionError } from '../../meta-workflows/services/foundation-executor.companion.service';\nimport { proposeInterviewAnswers } from '../../meta-workflows/services/interview-answer-proposal.companion';\nimport { ApplicationInterviewDepth } from '@wildo-ai/saas-models/meta-workflows';\nimport { SupersededPlaybookRunQuestionError, SuspendedPlaybookRunNotFoundError } from '../../meta-workflows/models/playbook-run-checkpoint.models';\nimport { CompanionErrorGuidanceKey } from '../companion-error-guidance.models';\nimport { CompanionFileRouteRefusal, confineCompanionFilePath } from './companion-file-route-confinement';\nimport {\n ExecutionTraceNotFoundError,\n ExecutionTraceReadCompanionService,\n} from '../../meta-workflows/services/execution-trace-read.companion.service';\nimport {\n ApplicationBuildDispatchCompanionService,\n isBuildPlanHeldByFailedModule,\n ApplicationBuildPlanExhaustedError,\n ApplicationBuildTaskCompletedButUnlandedError,\n ApplicationBuildPlanUnavailableError,\n ApplicationBuildWaveInFlightError,\n ApplicationBuildStoppedByPersonError,\n BuildStopReleaseDoor,\n ApplicationDoesNotBootError,\n type ApplicationBuildWaveResult,\n} from '../../meta-workflows/services/application-build-dispatch.companion.service';\nimport { ApplicationBuildTaskNotACodingTaskError } from '../../meta-workflows/services/application-build-task-coding-policy.companion.service';\nimport { NothingToRearmError } from '../../meta-workflows/models/build-task-rearm.models';\nimport { BuildTaskDecisionRefusedError } from '../../meta-workflows/services/application-build-task-closure.companion';\nimport { ApplicationBuildUnknownGenerationStepError } from '../../meta-workflows/services/application-build-generation-step.companion.service';\nimport {\n describeFailedLandingRemedies,\n isBinaryWrittenFile,\n PlaybookRunWriteRegisterCompanionService,\n PlaybookRunWriteRecordNotFoundError,\n} from '../../meta-workflows/services/playbook-run-write-register.companion.service';\nimport { CreationRunReportCompanionService } from '../../meta-workflows/services/creation-run-report.companion.service';\nimport { CreationInterventionNotFoundError } from '../../meta-workflows/services/creation-intervention-ledger.companion.service';\nimport {\n composeGovernanceQuestionnaires,\n GovernanceQuestionnaireError,\n landGovernanceFactDeclarations,\n PlaybookOutputLandingHeldError,\n SpecificationWriteRefusedError,\n PlaybookElicitationError,\n PlaybookGenerationError,\n PlaybookClarificationError,\n type GovernanceFactDeclarationInput,\n type PlaybookElicitationAnswer,\n type PlaybookLoopResult,\n} from '@wildo-ai/application-creation-runtime';\nimport { MarketGenerationCompanionService } from '../../market/services/market-generation.companion.service';\nimport { holdOpenWithoutInactivityTimeout } from './long-held-request.companion';\nimport { LogoGenerationCompanionService } from '../../brand/services/logo-generation.companion.service';\nimport { assertCreationLanePreflight, CreationLanePreflightRefusedError } from '../../meta-workflows/services/creation-lane-preflight.companion.service';\nimport { LogoDeliberationCompanionService } from '../../brand/services/logo-deliberation.companion.service';\nimport { BrandAcceptCompanionService } from '../../brand/services/brand-accept.companion.service';\nimport { hasAcceptedBrandMarkInWorkingTree } from '../../brand/models/accepted-brand-mark.models';\nimport { ExpertPersonaCompanionService } from '../../expert-personas/services/expert-persona.companion.service';\nimport { DeliberationCompanionService } from '../../deliberations/services/deliberation.companion.service';\nimport { ExpertWorkDomain, FlowsActors_Status, describeModelProviderAccountRefusal } from '@wildo-ai/saas-models';\nimport { AcceptOrigin, ApplicationPlaybookInstanceClosureKind, ApplicationSpecificationFamily, BuildPlanTaskTargetKind } from '@wildo-ai/saas-specifications/application-creation';\nimport { SpecificationUnavailableError } from '@wildo-ai/saas-specifications';\nimport { describeDocumentationLaneRefusal, TechnicalDocCompanionService } from '../../technical-doc/services/technical-doc.companion.service';\nimport { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';\nimport {\n WorkspaceElementKind,\n WorkspaceElementOperation,\n getWorkspaceResource,\n mapWorkspaceElements,\n relatedWorkspaceResources,\n} from '../../core/introspection/workspace-element-index.companion';\nimport { describeWorkspaceFreshness, readWorkspaceElements } from '../../core/introspection/workspace-elements.companion';\nimport { CompanionExecutionsCompanionService } from '../../executions/services/companion-executions.companion.service';\nimport {\n ResearchAgentDispatchCompanionService,\n ResearchAgentUnavailableError,\n} from '../../claude-cli/services/research-agent-dispatch.companion.service';\nimport { CodingAgentDispatchCompanionService } from '../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport { AcceptedChangeCommitCompanionService, DecisionRecordActor } from '../../claude-cli/services/accepted-change-commit.companion.service';\nimport {\n COMPANION_TOKEN_HEADER,\n CompanionAuthFloorCompanionService,\n} from '../../core/auth/companion-auth-floor.companion.service';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport type { CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';\nimport { CompanionTraceabilityLevel, isTraceExemptProbe } from '../../core/traceability/companion-traceability.models';\nimport { CompanionTraceabilityService } from '../../core/traceability/companion-traceability.service';\nimport { companionRequestIsAdmittedByTokenFloor } from './companion-token-floor.policy';\nimport { COMPANION_TRACE_EXEMPT_GET_PATHS } from './companion-trace-exemptions';\nimport { SPECIFICATION_CONTEXT_VALIDATION_ERROR_NAME } from '../../core/specifications/specification-context-factory.models';\nimport {\n INTROSPECTION_INPUT_VALIDATION_ERROR_NAME,\n INTROSPECTION_PARENT_TERMINATED_ERROR_NAME,\n} from '../../core/introspection/models/companion-introspection.models';\nimport { StructuredDataCatalogAuditService } from '../../core/catalogs/structured-data-catalog-audit.service';\nimport {\n assertCompanionAvailableLanguage,\n assertEmailTemplateTestSendSucceeded,\n parseCompanionTargetLocales,\n} from './companion-i18n-api-contract.utils';\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { MetaWorkflow_ClarificationAction } from '@wildo-ai/saas-models/meta-workflows';\n\n/**\n * Dev-companion HTTP surface mounted under {@link getCustomMountBasePath}\n * (`/api/companion`). Hosts labelling, email-template authoring, file\n * operations, persisted executions, meta/introspection, and market generation\n * routes.\n *\n * ── OD-4.a ─ `/api/companion/email-templates/*` routing contract ─────────────\n *\n * The `email-templates/*` route group (`generate`, `preview`, `test-send`,\n * `status`, `translate`) targets the **filesystem-based** template registry\n * exposed via {@link EmailTemplateCompanionService}, which delegates every\n * read through the in-memory `EmailTemplateRegistryBackendService`\n * (file: `engine/saas-backend-lib/src/notifications/email/services/email-template-registry.backend.service.ts`).\n *\n * It does NOT — and must never — reach for the deleted DB-backed\n * `EMAIL_TEMPLATES` core resource. That `CoreResourceType` member, its\n * resource-config, repository, registry wiring, presets, schemas, header /\n * footer sibling, and all event-triggered batch coupling were removed\n * with the email-templates deprecation.\n *\n * The `/email-templates/*` path segment therefore reflects the **conceptual\n * surface** the operator interacts with — the developer-facing template\n * authoring flow — not a persistence layer. Renaming the routes would break\n * existing companion-frontend wiring and provides no semantic gain. The\n * filesystem-only contract is pinned by\n * `src/email/services/__tests__/email-template-preview.companion.service.test.ts`,\n * which fails fast if the preview path ever drifts back toward a DB-backed\n * lookup.\n */\n/**\n * When this companion process started, computed ONCE (review of 6fe527ed3): derived per request from `process.uptime()`\n * it moves by a millisecond between calls, and the creation driver would read every move as a restart.\n */\nconst COMPANION_PROCESS_STARTED_AT = new Date(Date.now() - process.uptime() * 1000).toISOString();\n\n@injectable()\nexport class CompanionController extends AbstractControllerBackendService {\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService) errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.ErrorHandlerService) errorHandler: ErrorHandlerService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext)\n private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.LabellingPlannerService) private readonly labellingPlannerService: LabellingPlannerCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LabellizeOrchestratorService) private readonly labellizeOrchestratorService: LabellizeOrchestratorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunWriteRegisterService) private readonly runWriteRegister: PlaybookRunWriteRegisterCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TranslateOrchestratorService) private readonly translateOrchestratorService: TranslateOrchestratorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.EmailTemplateLabellingUnitsService)\n private readonly emailTemplateLabellingUnitsService: EmailTemplateLabellingUnitsCompanionService,\n @inject(COMPANION_SERVICE_TYPES.EmailTemplateService) private readonly emailTemplateService: EmailTemplateCompanionService,\n @inject(COMPANION_SERVICE_TYPES.MarketGenerationService) private readonly marketGenerationService: MarketGenerationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunService) private readonly playbookRunService: PlaybookRunCompanionService,\n @inject(COMPANION_SERVICE_TYPES.DossierService) private readonly dossierService: DossierCompanionService,\n @inject(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService) private readonly creationPlaneProjection: CreationPlaneProjectionCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService) private readonly buildDispatchService: ApplicationBuildDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.CreationRunReportService) private readonly creationRunReport: CreationRunReportCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ExecutionTraceReadService) private readonly executionTraceReadService: ExecutionTraceReadCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LogoGenerationService) private readonly logoGenerationService: LogoGenerationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LogoDeliberationService) private readonly logoDeliberationService: LogoDeliberationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.BrandAcceptService) private readonly brandAcceptService: BrandAcceptCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ExpertPersonaService) private readonly expertPersonaService: ExpertPersonaCompanionService,\n @inject(COMPANION_SERVICE_TYPES.DeliberationService) private readonly deliberationService: DeliberationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TechnicalDocService) private readonly technicalDocService: TechnicalDocCompanionService,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService) private readonly companionIntrospectionService: CompanionIntrospectionService,\n @inject(COMPANION_SERVICE_TYPES.ExecutionsService) private readonly executionsService: CompanionExecutionsCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TraceabilityService) private readonly traceabilityService: CompanionTraceabilityService,\n @inject(COMPANION_SERVICE_TYPES.CodingAgentDispatchService) private readonly codingAgentDispatchService: CodingAgentDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ResearchAgentDispatchService) private readonly researchAgentDispatchService: ResearchAgentDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.AuthFloorService) private readonly authFloorService: CompanionAuthFloorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.AcceptedChangeCommitService) private readonly acceptedChangeCommitService: AcceptedChangeCommitCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookInstanceService) private readonly playbookInstanceService: PlaybookInstanceCompanionService,\n @inject(SAAS_SERVICE_TYPES.ExternalProvidersRegistryService) private readonly externalProvidersRegistry: ExternalProvidersRegistryBackendService,\n /**\n * The classifier the `wildo context elements` door screens research-informed elements through (#2938), as the coding\n * brief does. Optional: an absent service is \"no classifier bound\", which marks rather than refuses.\n */\n @inject(SAAS_SERVICE_TYPES.ContentSafetyService) @optional() private readonly contentSafety?: ContentSafetyBackendService,\n ) {\n super(logger, errorBuilder, errorHandler, 'CompanionController');\n }\n\n protected setupRoutes(): void {\n /*\n * The P-29b token floor, and it is registered FIRST on purpose — ahead of the trace middleware.\n *\n * An unauthorized caller must not be able to open a trace session: `attachRequestTraceSession`\n * allocates a session directory per non-exempt request, so gating after it would let anyone who\n * can reach the port spend disk and evict live sessions without ever passing a single handler.\n * Refuse first, then trace what was admitted.\n */\n this.router.use(this.enforceLocalTokenFloor.bind(this));\n\n this.router.use(this.attachRequestTraceSession.bind(this));\n\n /*\n * A write may change what any status read would answer, so it drops the held ones (#3207, see\n * ReadVerbSnapshots) — when it ARRIVES, and again when it FINISHES, so a read derived while the write ran\n * cannot be held as current afterwards. Every non-GET counts as a write unless it is one of the declared\n * read-only POSTs: an unknown route errs toward a fresh answer, and the declared ones include the read\n * coding agents make constantly during a wave (`wildo context info` → `POST /_meta/introspect`).\n */\n this.router.use((req: Request, res: Response, next: NextFunction) => {\n if (isStatusChangingRequest(req.method, req.path)) {\n this.readVerbSnapshotsHolder?.invalidate();\n res.once('finish', () => this.readVerbSnapshotsHolder?.invalidate());\n }\n next();\n });\n\n // Health\n this.router.get('/', this.asyncHandler(this.health.bind(this)));\n this.logRouteRegistration('get', '/', 'Companion health');\n\n // ── Labelling (per-unit, lock-file-tracked) ────────────────────\n // The decentralized labelling pipeline:\n // 1. /labelling/plan → list units (components, resources, themes, …)\n // 2. /labelling/labellize → primary-language labels per unit\n // 3. /labelling/translate → per-unit per-locale translations\n //\n // There is intentionally no aggregate step. Per-unit files are the\n // runtime source of truth — apps load them via\n // `scanCustomLabelsDirectory` from `@wildo-ai/saas-backend-lib`,\n // which walks the per-unit tree at module load. Keeping things\n // separated is the contract.\n this.router.get('/labelling/plan', this.asyncHandler(this.labellingPlan.bind(this)));\n this.logRouteRegistration('get', '/labelling/plan', 'List planned labelling units');\n\n // The translate pipeline's email lane (#1908): translate-only units, one per email template. A\n // separate listing from `/labelling/plan` because that plan is what LABELLIZE iterates, and an\n // email's primary words are authored, never labellized.\n this.router.get('/labelling/email-template-units', this.asyncHandler(this.labellingEmailTemplateUnits.bind(this)));\n this.logRouteRegistration('get', '/labelling/email-template-units', 'List translate-only email template units');\n\n this.router.post('/labelling/labellize', this.asyncHandler(this.labellingLabellize.bind(this)));\n this.logRouteRegistration('post', '/labelling/labellize', 'Run per-unit labellize for primary locale');\n\n this.router.post('/labelling/translate', this.asyncHandler(this.labellingTranslate.bind(this)));\n this.logRouteRegistration('post', '/labelling/translate', 'Run per-unit per-locale translation');\n\n // ── Email templates ────────────────────────────────────────────\n // OD-4.a: every route in this block resolves through the\n // **filesystem-based** `EmailTemplateRegistryBackendService` via\n // `EmailTemplateCompanionService` — never through a DB repository for the\n // (deleted) `EMAIL_TEMPLATES` core resource. See the class JSDoc above.\n this.router.post('/email-templates/generate', this.asyncHandler(this.emailTemplatesGenerate.bind(this)));\n this.logRouteRegistration('post', '/email-templates/generate', 'Generate email templates');\n\n this.router.post('/email-templates/preview', this.asyncHandler(this.emailTemplatesPreview.bind(this)));\n this.logRouteRegistration('post', '/email-templates/preview', 'Preview email template');\n\n this.router.post('/email-templates/test-send', this.asyncHandler(this.emailTemplatesTestSend.bind(this)));\n this.logRouteRegistration('post', '/email-templates/test-send', 'Send test email from template');\n\n this.router.get('/email-templates/status', this.asyncHandler(this.emailTemplatesStatus.bind(this)));\n this.logRouteRegistration('get', '/email-templates/status', 'Get email template filesystem status');\n\n this.router.post('/email-templates/translate', this.asyncHandler(this.emailTemplatesTranslate.bind(this)));\n this.logRouteRegistration('post', '/email-templates/translate', 'Translate email templates');\n\n // ── File operations ────────────────────────────────────────────\n this.router.post('/files/update', this.asyncHandler(this.updateFiles.bind(this)));\n this.logRouteRegistration('post', '/files/update', 'Update files');\n\n this.router.get('/file', this.asyncHandler(this.getFile.bind(this)));\n this.logRouteRegistration('get', '/file', 'Get single file');\n\n this.router.get('/files/list', this.asyncHandler(this.listFiles.bind(this)));\n this.logRouteRegistration('get', '/files/list', 'List files in directory');\n\n // ── Persisted executions ────────────────────────────────────────\n this.router.post('/executions/actors', this.asyncHandler(this.createActorExecution.bind(this)));\n this.logRouteRegistration('post', '/executions/actors', 'Persist actor execution');\n\n this.router.get('/executions/actors', this.asyncHandler(this.listActorExecutions.bind(this)));\n this.logRouteRegistration('get', '/executions/actors', 'List persisted actor executions');\n\n this.router.get('/executions/actors/:executionId', this.asyncHandler(this.getActorExecution.bind(this)));\n this.logRouteRegistration('get', '/executions/actors/:executionId', 'Read persisted actor execution');\n\n this.router.post('/executions/flows', this.asyncHandler(this.createFlowExecution.bind(this)));\n this.logRouteRegistration('post', '/executions/flows', 'Persist flow execution');\n\n this.router.get('/executions/flows', this.asyncHandler(this.listFlowExecutions.bind(this)));\n this.logRouteRegistration('get', '/executions/flows', 'List persisted flow executions');\n\n this.router.get('/executions/flows/:executionId', this.asyncHandler(this.getFlowExecution.bind(this)));\n this.logRouteRegistration('get', '/executions/flows/:executionId', 'Read persisted flow execution');\n\n this.router.post('/tasks/actors', this.asyncHandler(this.createActorTask.bind(this)));\n this.logRouteRegistration('post', '/tasks/actors', 'Persist actor task');\n\n this.router.get('/tasks/actors', this.asyncHandler(this.listActorTasks.bind(this)));\n this.logRouteRegistration('get', '/tasks/actors', 'List persisted actor tasks');\n\n this.router.get('/tasks/actors/:taskId', this.asyncHandler(this.getActorTask.bind(this)));\n this.logRouteRegistration('get', '/tasks/actors/:taskId', 'Read persisted actor task');\n\n this.router.patch('/tasks/actors/:taskId', this.asyncHandler(this.updateActorTask.bind(this)));\n this.logRouteRegistration('patch', '/tasks/actors/:taskId', 'Update persisted actor task');\n\n // ── Meta / introspection ───────────────────────────────────────\n this.router.get('/_meta/resources-registry', this.asyncHandler(this.getResourcesRegistry.bind(this)));\n this.logRouteRegistration('get', '/_meta/resources-registry', 'Get resources registry');\n\n this.router.get('/_meta/resources-registry/app/:appSlug', this.asyncHandler(this.getResourcesRegistry.bind(this)));\n this.logRouteRegistration('get', '/_meta/resources-registry/app/:appSlug', 'Get resources registry for specific app');\n\n this.router.post('/_meta/introspect', this.asyncHandler(this.requestIntrospection.bind(this)));\n this.logRouteRegistration('post', '/_meta/introspect', 'Execute companion introspection behavior');\n\n this.router.get('/_meta/introspect/behaviors', this.asyncHandler(this.listIntrospectionBehaviors.bind(this)));\n this.logRouteRegistration('get', '/_meta/introspect/behaviors', 'List companion introspection behaviors (the live-context menu)');\n\n this.router.post('/charts/audit', this.asyncHandler(this.chartsAudit.bind(this)));\n this.logRouteRegistration('post', '/charts/audit', 'Audit chart registration alignment (frontend chartViews vs backend registry)');\n\n this.router.get('/_meta/website/structured-data-audit', this.asyncHandler(this.getWebsiteStructuredDataAudit.bind(this)));\n this.logRouteRegistration(\n 'get',\n '/_meta/website/structured-data-audit',\n 'Audit website structured-data emissions against the merged Schema.org catalog',\n );\n\n // ── Runtime environment ─────────────────────────────────────────\n // `wildo secrets set` from a terminal asks the running companion to load a changed key (#1637).\n this.router.post('/runtime/env/apply', this.asyncHandler(this.applyRuntimeEnvVariables.bind(this)));\n this.logRouteRegistration('post', '/runtime/env/apply', 'Load named variables from the regenerated .env into this process (names only; values come from the file)');\n\n // ── Coding-agent status (typed Flows/Actors coding path) ───────\n // The raw POST /coding-agent/dispatch endpoint (caller-composed prompt)\n // was deleted at the first-activation hard cut: every coding run now\n // enters through the typed `runApplicationCodingTask` wrapper on the\n // episode runtime. The GET status probe stays open (read-only routes\n // keep the DD-6 posture).\n this.router.get('/coding-agent/status', this.asyncHandler(this.codingAgentStatus.bind(this)));\n this.router.post('/coding-agent/cancel', this.asyncHandler(this.codingAgentCancel.bind(this)));\n // Interactive lane: answer a parked question (resume the same session), and\n // stream a run's live frames. The respond door is a WRITE (it resumes a\n // workspace-mutating run); the events stream is read-only.\n this.router.post('/coding-agent/session/respond', this.asyncHandler(this.codingAgentRespond.bind(this)));\n this.router.get('/coding-agent/session/events', this.codingAgentSessionEvents.bind(this));\n this.logRouteRegistration(\n 'get',\n '/coding-agent/status',\n 'Coding-agent dispatch readiness (does NOT guarantee CLI binary presence or auth)',\n );\n this.logRouteRegistration('post', '/coding-agent/session/respond', 'Answer a parked coding task question and resume the same session');\n this.logRouteRegistration('get', '/coding-agent/session/events', 'Server-sent live frames for an active coding session (taskId query)');\n\n // ── Prompt (TODO) ──────────────────────────────────────────────\n this.router.post('/prompt', this.asyncHandler(this.buildPrompt.bind(this)));\n this.logRouteRegistration('post', '/prompt', 'Build prompt from template and context');\n\n // ── Playbooks (application-creation, P2) ─────────────────────────\n // One compiled Framework Knowledge playbook, run end to end: brief the model against each declared\n // family's own schema, then write the answers as specification FILES. It writes and stops. Acceptance\n // is a commit (`.claude/rules/one-source-of-truth.md`, rules 2 and 3), made by a person or — under the\n // autonomy posture — by the companion before the next build baseline, authored as itself (#1534).\n this.router.get('/build/next', this.asyncHandler(this.serveFromLatestAnswer(ReadVerbSnapshotKey.BUILD_NEXT, this.describeNextBuildTask.bind(this))));\n this.logRouteRegistration('get', '/build/next', 'What the next ready build-plan run would be (either executor) — read-only');\n this.router.post('/build/dispatch-next', this.asyncHandler(this.dispatchNextBuildTask.bind(this)));\n this.router.get('/build/dispatches', this.asyncHandler(this.readBuildDispatches.bind(this)));\n this.router.post('/build/stop', this.asyncHandler(this.stopBuildWave.bind(this)));\n this.logRouteRegistration('post', '/build/stop', 'Ask the running build wave to start no new task and end once its live runs settle (#3206)');\n this.logRouteRegistration('get', '/build/dispatches', 'How far each recent detached build dispatch got (newest first) — a generation step finishes here; a coding run is admitted here and finishes in its actor-task row');\n this.logRouteRegistration('post', '/build/dispatch-next', 'Run the build: a parallel wave when the build parallelism is above one (async), else the next ready task (coding agent or companion generation step)');\n this.router.get('/build/tasks', this.asyncHandler(this.serveFromLatestAnswer(ReadVerbSnapshotKey.BUILD_TASKS, this.readBuildTaskRecords.bind(this))));\n this.logRouteRegistration('get', '/build/tasks', 'Every build-plan task in one read: its attempts, why it has not landed, and what its unmet probes searched for (#1521)');\n this.router.post('/build/tasks/:taskRef/rearm', this.asyncHandler(this.rearmBuildTask.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/rearm', 'Put a build task back in the queue after the reason it did not land was fixed, recording why on its completed runs (#1535)');\n this.router.post('/build/tasks/:taskRef/close', this.asyncHandler(this.closeBuildTask.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/close', 'Close a build task a commit or another task already built, or decline a derived follow-up, as a committed decision (#3224, #3227)');\n this.router.post('/build/tasks/:taskRef/settle-window', this.asyncHandler(this.settleBuildTaskRunWindows.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/settle-window', 'Bound the open window of a settled run that left no record of where HEAD was, so later build-task decisions count (#3224)');\n this.router.post('/build/tasks/:taskRef/approve', this.asyncHandler(this.approveFollowUpTask.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/approve', 'Let a derived follow-up run after the creator reviewed it, under a posture that reviews results (#3227)');\n /*\n * The console's build verbs (#1652): dispatch a NAMED task, and accept (commit) what a finished\n * coding or playbook run wrote. Both existed only as workbench operations, which need a signed-in\n * person; these call the same services, so the two doors cannot diverge.\n */\n this.router.post('/build/tasks/:taskRef/dispatch', this.asyncHandler(this.dispatchNamedBuildTask.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/dispatch', 'Run one named build-plan task (coding agent or generation step), whether or not it is next');\n this.router.post('/build/tasks/:taskRef/accept', this.asyncHandler(this.acceptBuildTaskRun.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/accept', 'Commit what the latest coding run of a task wrote (body force:true includes files edited since; leftovers:true commits what earlier runs left that no automatic door will, #3267)');\n this.router.post('/build/checkpoint', this.asyncHandler(this.commitOperatorBuildCheckpoint.bind(this)));\n this.logRouteRegistration('post', '/build/checkpoint', 'A person commits the working tree the build\\'s runs share, naming every settled run no commit named yet (#1885)');\n // ── Execution traces (what actually happened) ────────────────────\n this.router.get('/traces', this.asyncHandler(this.listExecutionTraces.bind(this)));\n this.logRouteRegistration('get', '/traces', 'Recent execution sessions');\n this.router.get('/traces/:sessionId', this.asyncHandler(this.readExecutionTrace.bind(this)));\n this.logRouteRegistration('get', '/traces/:sessionId', 'One session: every event in order, and its step artifacts');\n this.router.get('/traces/:sessionId/usage', this.asyncHandler(this.readExecutionTraceUsage.bind(this)));\n this.logRouteRegistration('get', '/traces/:sessionId/usage', 'What one session SPENT, in tokens — summed from the agent-call usage already in its events');\n this.router.get('/traces/:sessionId/steps/:stepDirName/artifacts/:fileName', this.asyncHandler(this.readExecutionTraceArtifact.bind(this)));\n // The trace sessions one actor task ran in — the alias the coding lane already writes, read (#1328).\n this.router.get('/trace-aliases/actor-task/:taskId', this.asyncHandler(this.listActorTaskTraceSessions.bind(this)));\n this.logRouteRegistration('get', '/traces/:sessionId/steps/:stepDirName/artifacts/:fileName', 'One artifact body — the brief the model saw, or the answer it gave');\n\n this.router.post('/research', this.asyncHandler(this.runResearchTask.bind(this)));\n this.logRouteRegistration('post', '/research', 'Run one READ-ONLY research objective and return the evidence it found (no writes, no lock)');\n this.router.get('/workspace/elements', this.asyncHandler(this.readWorkspaceElements.bind(this)));\n this.logRouteRegistration('get', '/workspace/elements', \"The application's OWN CODE truth by resource — map | get | related, instead of a 43KB registry read\");\n this.router.get('/playbooks/coherence', this.asyncHandler(this.readCoherenceReport.bind(this)));\n this.logRouteRegistration('get', '/playbooks/coherence', 'Cross-family coherence of the CURRENT working tree — what is stated with nothing behind it, and what references something absent');\n this.router.get('/playbooks', this.asyncHandler(this.serveFromLatestAnswer(ReadVerbSnapshotKey.PLAYBOOKS, this.listPlaybooks.bind(this))));\n this.router.post('/playbooks/refresh-board', this.asyncHandler(this.refreshPlaybookBoard.bind(this)));\n this.logRouteRegistration('post', '/playbooks/refresh-board', 'Drop the eligibility cache so the next read recomputes');\n this.router.get('/playbooks/runs', this.asyncHandler(this.readPlaybookRunsInFlight.bind(this)));\n /*\n * Registered beside `/playbooks/runs` and BEFORE `/playbooks/:playbookRef/run`, which is the\n * ordering discipline this router already keeps: a literal segment that a parameterised route\n * could swallow goes first. `suspended` is one segment against that route's two, so nothing\n * shadows it today — the placement is to keep the rule visible rather than to fix a collision.\n */\n this.router.get('/playbooks/suspended', this.asyncHandler(this.readSuspendedPlaybookRuns.bind(this)));\n this.logRouteRegistration('get', '/playbooks/suspended', 'Runs waiting for creator answers — the third state, in neither /playbooks/runs bucket');\n this.router.post('/playbooks/loop', this.asyncHandler(this.runPlaybookLoop.bind(this)));\n this.logRouteRegistration('post', '/playbooks/loop', 'Chain playbooks: deterministic gate, model choice, run, repeat');\n this.logRouteRegistration('get', '/playbooks', 'Eligibility board: which playbooks can run now, and why not the rest');\n this.router.get('/playbooks/:playbookRef/decision', this.asyncHandler(this.readPlaybookElicitationDecision.bind(this)));\n this.logRouteRegistration('get', '/playbooks/:playbookRef/decision', \"The interview this playbook declares, as a decision payload — null when it asks nothing\");\n this.router.post('/playbooks/:playbookRef/instances', this.asyncHandler(this.openPlaybookInstance.bind(this)));\n this.logRouteRegistration('post', '/playbooks/:playbookRef/instances', 'Open a playbook instance for a purpose (body instanceKey, purpose): recorded in the dossier and committed at once (#1609)');\n this.router.post('/playbooks/:playbookRef/instances/:instanceKey/close', this.asyncHandler(this.closePlaybookInstance.bind(this)));\n this.logRouteRegistration('post', '/playbooks/:playbookRef/instances/:instanceKey/close', 'Close a playbook instance (body kind: completed|abandoned, reason): recorded and committed; abandoning cancels its waiting runs (#1608)');\n this.router.post('/playbooks/:playbookRef/run', this.asyncHandler(this.runPlaybook.bind(this)));\n this.logRouteRegistration('post', '/playbooks/:playbookRef/run', 'Run one playbook and land its outputs as specification files (body dryRun:true tests the pipe, writes nothing)');\n this.router.post('/playbooks/runs/:runId/resume', this.asyncHandler(this.resumePlaybookRun.bind(this)));\n this.logRouteRegistration('post', '/playbooks/runs/:runId/resume', 'Answer a suspended run\\'s questions and continue it (action: accept | decline | cancel)');\n /*\n * The CREATION CONSOLE (2026-09-25): a coding-agent session drives creation and the workbench is\n * its dashboard, so the console needs the two things the workbench gets over the resource plane —\n * what the companion did, and every question it waits on — on the plane `wildo` speaks. Same rows,\n * same services; see `workbench-creation-console.custom.shared.schemas.ts`.\n */\n this.router.get('/creation/pulse', this.asyncHandler(this.readCreationConsolePulse.bind(this)));\n this.logRouteRegistration('get', '/creation/pulse', 'A cheap poll: a change cursor, the runs in flight, and what the last feed read counted — read the feed only when it moved');\n this.router.get('/specifications/findings', this.asyncHandler(this.readSpecificationFindings.bind(this)));\n this.logRouteRegistration('get', '/specifications/findings', 'The specifications the companion refused to serve, or why it could not evaluate the package (#3211)');\n this.router.get('/creation/feed', this.asyncHandler(this.serveFromLatestAnswer(ReadVerbSnapshotKey.CREATION_FEED, this.readCreationConsoleFeed.bind(this))));\n this.logRouteRegistration('get', '/creation/feed', 'What happened, what is asked of you, what could come next — Home\\'s lines with the row each points at');\n this.router.get('/creation/questions', this.asyncHandler(this.serveFromLatestAnswer(ReadVerbSnapshotKey.CREATION_QUESTIONS, this.readCreationConsoleQuestionQueue.bind(this))));\n this.logRouteRegistration('get', '/creation/questions', 'Every question waiting on the person, as one queue (clarifications, parked coding runs, interview, governance facts)');\n this.router.get('/creation/report', this.asyncHandler(this.readCreationRunReport.bind(this)));\n this.logRouteRegistration('get', '/creation/report', 'The run report: every intervention a person made and what it unblocked, spend per run (coding runs included), the independence score (#2231). Read-only');\n /*\n * The UNATTENDED DRIVER's two doors (#2233): what still runs (the pulse counts detached runs only, and a loop is not\n * one), and the accept the autonomy posture makes for pending playbook runs. The driver itself lives in the CLI.\n */\n this.router.get('/creation/drive/status', this.asyncHandler(this.readCreationDriveStatus.bind(this)));\n this.logRouteRegistration('get', '/creation/drive/status', 'What still runs (loops, detached runs) and the pending usage-limit resume, for the unattended creation driver (#2233). Read-only');\n this.router.get('/creation/requirements/standing', this.asyncHandler(this.readCreationRequirementsStanding.bind(this)));\n this.logRouteRegistration('get', '/creation/requirements/standing', 'Where the application stands against its own requirements now: the maturity reading derived live and every item still open, which the unattended driver reads before it calls the goal reached (#3701). Read-only');\n this.router.post('/creation/drive/accept', this.asyncHandler(this.acceptForCreationDrive.bind(this)));\n this.logRouteRegistration('post', '/creation/drive/accept', 'Commit pending playbook runs when the autonomy posture accepts them, never inside a live coding run (#2233)');\n this.router.get('/creation/timeline', this.asyncHandler(this.readCreationJourneyTimeline.bind(this)));\n this.logRouteRegistration('get', '/creation/timeline', 'How long each phase of the journey took, the wall clock, and the slowest build tasks with their dispatch wait and run time (#3206). Read-only');\n this.router.post('/creation/interventions/:interventionId/reason', this.asyncHandler(this.stateCreationInterventionReason.bind(this)));\n this.logRouteRegistration('post', '/creation/interventions/:interventionId/reason', 'Say why a person intervened (body reason): the one thing the intervention ledger asks; refused for an id the report does not hold (#2231)');\n this.router.get('/creation/launch-blockers', this.asyncHandler(this.readCreationLaunchBlockers.bind(this)));\n this.logRouteRegistration('get', '/creation/launch-blockers', 'What still stands between the application and a real user — each open compliance decision, where it is decided and what settles it (#2238). Marks, never blocks');\n this.router.post('/creation/questions/answer', this.asyncHandler(this.answerCreationConsoleQuestion.bind(this)));\n this.logRouteRegistration('post', '/creation/questions/answer', 'Answer, decline or cancel one queued question — routed to the service the workbench operation calls');\n this.router.post('/creation/interview/depth', this.asyncHandler(this.setCreationInterviewDepth.bind(this)));\n this.logRouteRegistration('post', '/creation/interview/depth', 'Record how deep this application\\'s interviews go (simple | detailed), in its dossier (#2129)');\n this.router.post('/creation/interview/proposals', this.asyncHandler(this.proposeCreationInterviewAnswers.bind(this)));\n this.logRouteRegistration('post', '/creation/interview/proposals', 'Propose answers to interview questions the person does not know; writes nothing (#2129)');\n this.router.post('/playbooks/:playbookRef/judge', this.asyncHandler(this.judgePlaybookArtifacts.bind(this)));\n this.logRouteRegistration('post', '/playbooks/:playbookRef/judge', 'Judge SUPPLIED artifacts against a playbook\\'s evaluation treatment (the judge value-eval bench; nothing lands)');\n /*\n * The governed-document questions a HUMAN must answer (#192).\n *\n * Read-only and derived from the engine catalog, so it needs no application state and answers the\n * same for every caller. It exists because the blueprint's question surface had no consumer at all:\n * the questions were compiled into the reference docs shipped to application builders and rendered\n * by nothing, so 25 of the 39 catalogued facts could not be established and every clause resting on\n * them refused. This is the door a host renders; landing the answers is `buildGovernanceFactDeclarations`.\n */\n this.router.get('/compliance/governance-questions', this.asyncHandler(this.readGovernanceQuestions.bind(this)));\n this.logRouteRegistration('get', '/compliance/governance-questions', 'Governed-document facts only a human may establish, per document (?definitionRef= to narrow)');\n this.router.post('/compliance/governance-facts', this.asyncHandler(this.landGovernanceFacts.bind(this)));\n this.logRouteRegistration('post', '/compliance/governance-facts', 'Land one document\\'s human-established facts as the document-facts-authored family');\n this.router.get('/runs/writes', this.asyncHandler(this.listRunWrites.bind(this)));\n this.logRouteRegistration('get', '/runs/writes', 'The write register: which files each playbook run wrote, revertible per run');\n this.router.post('/runs/writes/:runId/accept', this.asyncHandler(this.acceptPlaybookRunWrites.bind(this)));\n this.logRouteRegistration('post', '/runs/writes/:runId/accept', 'Commit what one playbook run wrote (body force:true includes files edited since)');\n this.router.post('/creation/dossier/accept', this.asyncHandler(this.acceptDossier.bind(this)));\n this.logRouteRegistration('post', '/creation/dossier/accept', 'Commit the creator\\'s recorded answers (the dossier) on their own (#2332)');\n this.router.post('/runs/writes/:runId/revert', this.asyncHandler(this.revertRunWrites.bind(this)));\n this.logRouteRegistration('post', '/runs/writes/:runId/revert', 'Restore the pre-images of one run (refuses files a human edited since, unless body force:true; always refuses files a later run landed on)');\n this.router.get('/runs/writes/:runId/diff', this.asyncHandler(this.readRunWritesDiff.bind(this)));\n this.logRouteRegistration('get', '/runs/writes/:runId/diff', 'What one run CHANGED, per file — a unified diff from the register, so it is the run\\'s own change rather than everything uncommitted');\n\n // ── Market (Market generation, Phase 4.2) ───────────────────────\n this.router.post('/market/generate', this.asyncHandler(this.marketGenerate.bind(this)));\n this.router.post('/brand/generate-logo', this.asyncHandler(this.brandGenerateLogo.bind(this)));\n this.router.post('/brand/deliberate-logo', this.asyncHandler(this.brandDeliberateLogo.bind(this)));\n this.router.post('/brand/accept-logo', this.asyncHandler(this.brandAcceptLogo.bind(this)));\n this.router.post('/brand/logo', this.asyncHandler(this.brandLogo.bind(this)));\n this.logRouteRegistration('post', '/brand/logo', 'Draw and accept the logo in one call (deliberate-logo then accept-logo); refuses over an accepted mark unless body redraw:true');\n this.logRouteRegistration(\n 'post',\n '/market/generate',\n 'Render a market generation message template + invoke generation agent',\n );\n this.logRouteRegistration(\n 'post',\n '/brand/deliberate-logo',\n 'Art-director brief → per-direction generation → expert-panel deliberation → stage the winner',\n );\n this.logRouteRegistration(\n 'post',\n '/brand/accept-logo',\n 'Judge + promote a staged logo candidate into the specification SSOT (accept review point)',\n );\n\n // ── Expert personas (agentic deliberation system) ────────────────\n this.router.post('/expert-personas/derive', this.asyncHandler(this.expertPersonaDerive.bind(this)));\n this.router.post('/expert-personas/accept', this.asyncHandler(this.expertPersonaAccept.bind(this)));\n this.logRouteRegistration(\n 'post',\n '/expert-personas/derive',\n 'Derive an app-specific expert-persona charter proposal from a framework role template + the spec artifacts',\n );\n this.logRouteRegistration(\n 'post',\n '/expert-personas/accept',\n 'Promote a staged expert-persona charter proposal into specifications/src/personas/ (committed SSOT)',\n );\n\n // ── Deliberations (agentic deliberation system, Step 3) ──────────\n this.router.post('/deliberations/run', this.asyncHandler(this.deliberationRun.bind(this)));\n this.logRouteRegistration(\n 'post',\n '/deliberations/run',\n 'Run a charter-built expert-panel deliberation over TEXT candidates (rubric → rounds → synthesis)',\n );\n\n // ── Technical documentation ─────\n this.router.post(\n '/technical-doc/generate-openapi',\n this.asyncHandler(this.technicalDocGenerateOpenApi.bind(this)),\n );\n this.logRouteRegistration(\n 'post',\n '/technical-doc/generate-openapi',\n 'Generate consumer API OpenAPI documents on demand',\n );\n this.router.post('/technical-doc/publish-openapi', this.asyncHandler(this.technicalDocPublishOpenApi.bind(this)));\n this.logRouteRegistration('post', '/technical-doc/publish-openapi', 'Publish generated OpenAPI files into the stable API-reference tree');\n\n // ── Technical documentation source-based derivation (decision D14) ──\n this.router.post(\n '/technical-doc/derive-bundles',\n this.asyncHandler(this.technicalDocDeriveBundles.bind(this)),\n );\n this.logRouteRegistration(\n 'post',\n '/technical-doc/derive-bundles',\n 'Derive the source-based documentation evidence snapshot + authorized bundles (read-only)',\n );\n\n // ── Technical documentation generation (synchronizes src/generated/consumer-documentation/) ──\n this.router.post(\n '/technical-doc/publish-managed',\n this.asyncHandler(this.technicalDocPublishManaged.bind(this)),\n );\n this.logRouteRegistration(\n 'post',\n '/technical-doc/publish-managed',\n 'Derive, render, measure, validate and publish the complete managed documentation tree',\n );\n this.router.get(\n '/technical-doc/api-reference-categories',\n this.asyncHandler(this.technicalDocCheckApiReferenceCategories.bind(this)),\n );\n this.logRouteRegistration(\n 'get',\n '/technical-doc/api-reference-categories',\n 'Check the API-reference categories against the resources a publish would document (read-only)',\n );\n\n }\n\n public getCustomMountBasePath(): string { return '/api/companion'; }\n\n /**\n * The P-29b local-token floor, finally applied (issue: the gate that was minted and never mounted).\n *\n * `CompanionAuthFloorCompanionService` has minted a 0600 machine-local token on every companion boot\n * since P-29 landed, and `isValidToken` / `buildUnauthorizedError` were written for a middleware that\n * was deleted along with the one endpoint it guarded. Nothing replaced it, so from that day the\n * loopback bind was the ENTIRE protection for every mutating route on this controller — coding\n * dispatch, playbook runs, run-write revert, every LLM call that spends money.\n *\n * What the token adds over the loopback bind is narrow and worth stating, because the floor's own\n * JSDoc is careful about what it does NOT prove: it is not evidence of human presence, and it does\n * not stop a same-uid process that can read the file. What it stops is a caller that can reach the\n * port but cannot read the filesystem — the shape of a page in the operator's browser, or any other\n * process on the machine sending a request it did not earn the right to send.\n *\n * Fails CLOSED in every direction: a missing header, an unparsable header, a token from a previous\n * boot, and an uninitialized floor (`expectedTokenDigest === null`) all refuse.\n *\n * `req.path` is mount-relative here (`/playbooks/loop`, not `/api/companion/playbooks/loop`) and\n * excludes the query string — the same coordinate `attachRequestTraceSession` already compares\n * against. A path variant that the exemption list does not match exactly (a trailing slash, say)\n * refuses, which is the safe direction: it also matches no route.\n *\n * ## Where the access DECISION is recorded, and why not in a store\n *\n * assurance-control: WILDO.ACCESS.AUTHORIZATION_DECISION_AUDIT — every REFUSAL on the local control\n * plane leaves a record unconditionally; admissions leave one at the configured traceability level.\n *\n * The asymmetry is stated rather than smoothed over, because the two halves have different\n * guarantees and a marker a sweep will trust must not claim the weaker one is the stronger:\n *\n * - **Refusals — unconditional.** Recorded by the error pipeline, not by this method.\n * `ErrorType.AUTHENTICATION` declares `backendActions: [LOG, RECORD_METRICS]`\n * (`errors.shared.definitions.ts`), so `buildUnauthorizedError` emits a `warn` carrying the\n * method, the path, the correlation id and the trace id. Measured on a live companion,\n * 2026-09-10: one refusal, one log line, full context — which is also the ONLY place that context\n * survives, since `sanitizeErrorForClient` strips it from the response.\n * - **Admissions — level-dependent.** `attachRequestTraceSession` runs one middleware later and\n * opens a session for every admitted request (its exemptions, `/`, `/health` and\n * `/coding-agent/status`, are GET-only), but `createApiRequestSession` builds an IN-MEMORY\n * context: nothing reaches disk until the first event passes the level gate, and\n * `CompanionTraceabilityLevel.NONE` exists. At `NONE` an admitted mutating request persists\n * nothing here. That is a defensible default for a development daemon and it is not a claim that\n * admissions are always recorded.\n * - **The ORDER is deliberate**: refuse first, then trace what was admitted, so an unauthorized\n * caller cannot spend a session directory. It is pinned — see the mounting suite.\n *\n * A separate durable audit STORE was considered and refused. One existed until the digest\n * demolition: `.wildo-saas/state/audit/companion-security-events/` still holds 212\n * `LOCAL_CONTROL_PLANE_ACCESS_DECIDED` records, each with an `eventDigest`, and the type is gone\n * from the source tree. Rebuilding it would reintroduce exactly what\n * `.claude/rules/one-source-of-truth.md` Rule 0 puts out at this stage, for a loopback development\n * daemon with no deployed counterpart — and\n * `.claude/rules/application-creation-directive.md` is explicit that a record nobody reads is a\n * record we do not write. If a companion ever faces something other than this machine, that is the\n * decision to revisit, and the marker above is what a sweep will find.\n */\n private enforceLocalTokenFloor(req: Request, _res: Response, next: NextFunction): void {\n const admitted = companionRequestIsAdmittedByTokenFloor(\n { method: req.method, path: req.path, presentedToken: req.headers[COMPANION_TOKEN_HEADER] },\n (presented) => this.authFloorService.isValidToken(presented),\n );\n if (admitted) {\n next();\n return;\n }\n next(this.authFloorService.buildUnauthorizedError(`${req.method} ${req.path}`));\n }\n\n private attachRequestTraceSession(req: Request, res: Response, next: NextFunction): void {\n // Polled probes are infrastructure noise, not build-time work — see\n // `isTraceExemptProbe` for the full rationale (session-dir spam + live-\n // session eviction under the always-on traceability default).\n if (isTraceExemptProbe(req.method, req.path, COMPANION_TRACE_EXEMPT_GET_PATHS)) {\n next();\n return;\n }\n const sessionContext = this.traceabilityService.createApiRequestSession({\n method: req.method,\n routePath: req.path,\n urlPath: req.originalUrl || req.url,\n ip: req.ip,\n userAgent: req.get('user-agent') ?? undefined,\n });\n\n res.locals.companionTraceSession = sessionContext;\n // Held until the response closes, so trace retention never removes a session that is still being\n // written — an event stream can stay open for days.\n this.traceabilityService.holdOpenRequestSession(sessionContext);\n let didFinish = false;\n void this.traceabilityService.traceEvent({\n session: sessionContext,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-start',\n summary: `Start ${req.method.toUpperCase()} ${req.path}`,\n payload: {\n method: req.method.toUpperCase(),\n url: req.originalUrl || req.url,\n query: req.query,\n },\n });\n\n res.on('finish', () => {\n didFinish = true;\n void this.traceabilityService.traceEvent({\n session: sessionContext,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-finish',\n summary: `Finish ${req.method.toUpperCase()} ${req.path} with ${res.statusCode}`,\n payload: {\n method: req.method.toUpperCase(),\n url: req.originalUrl || req.url,\n statusCode: res.statusCode,\n },\n });\n });\n res.on('close', () => {\n // `close` follows `finish` as well, so this is the one place every response passes on its way out.\n this.traceabilityService.releaseOpenRequestSession(sessionContext);\n if (didFinish) {\n return;\n }\n\n void this.traceabilityService.traceEvent({\n session: sessionContext,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-close',\n summary: `Connection closed before finish for ${req.method.toUpperCase()} ${req.path}`,\n payload: {\n method: req.method.toUpperCase(),\n url: req.originalUrl || req.url,\n statusCode: res.statusCode,\n },\n });\n });\n\n // Everything this request starts runs under its session — including a detached run that\n // outlives the response, and model calls whose caller named no session (#1264).\n this.traceabilityService.runWithActiveSession(sessionContext, () => next());\n }\n\n private getTraceSession(res: Response): CompanionExecutionSessionContext | undefined {\n return res.locals.companionTraceSession as CompanionExecutionSessionContext | undefined;\n }\n\n private createTraceStep(\n res: Response,\n kind: string,\n label: string,\n ) {\n const session = this.getTraceSession(res);\n return session\n ? this.traceabilityService.createStep(session, { kind, label })\n : undefined;\n }\n\n private async traceSessionEvent(\n res: Response,\n minimumLevel: CompanionTraceabilityLevel,\n type: string,\n summary: string,\n payload?: unknown,\n step?: ReturnType<CompanionTraceabilityService['createStep']>,\n ): Promise<void> {\n const session = this.getTraceSession(res);\n if (!session) {\n return;\n }\n\n await this.traceabilityService.traceEvent({\n session,\n minimumLevel,\n type,\n summary,\n ...(payload !== undefined ? { payload } : {}),\n ...(step ? { step } : {}),\n });\n }\n\n private async traceSessionArtifact(\n res: Response,\n minimumLevel: CompanionTraceabilityLevel,\n fileName: string,\n content: unknown,\n step?: ReturnType<CompanionTraceabilityService['createStep']>,\n ): Promise<void> {\n const session = this.getTraceSession(res);\n if (!session) {\n return;\n }\n\n await this.traceabilityService.writeArtifact({\n session,\n minimumLevel,\n fileName,\n content,\n ...(step ? { step } : {}),\n });\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // HEALTH\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async health(_req: Request, res: Response, _next: NextFunction) {\n this.jsonSuccess(res, { status: 'ok', service: 'dev-companion' });\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // LABELLING (per-unit, lock-file-tracked)\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async labellingPlan(_req: Request, res: Response, next: NextFunction) {\n try {\n /*\n * WITH completeness. This used to call `planAllUnits()`, which returns `.units` and DROPS the\n * planner's own incompleteness report — so a plan that silently suppressed whole families\n * answered exactly like a complete one.\n *\n * That is not hypothetical: milestone labels were never planned for ANY application (#1405).\n * The planner read `MilestoneDefinitionRegistry`, which IS bound here — its only production\n * writer is `startApplication()`, which the companion never runs, so it answered `[]` forever\n * while a bound-but-empty read was treated as an authoritative \"no milestones\". The family is\n * now planned from the introspection snapshot. The consequence reached a user — a celebration\n * with no milestone words falls back\n * to the notification centre's generic `defaultSuccess`, and the progression tracker renders\n * `milestones.<ref>.title` as a raw key — and the one mechanism that knew why was reporting it\n * into a value nobody read.\n */\n const plan = await this.labellingPlannerService.planAllUnitsWithCompleteness();\n const summary = plan.units.map((u) => ({\n id: u.id,\n category: u.category,\n displayLabel: u.displayLabel,\n bucket: u.filePathHint.bucket,\n slug: u.filePathHint.slug,\n chunkCount: u.chunks.length,\n keyCount: u.chunks.reduce((sum, c) => sum + c.keys.length, 0),\n }));\n this.jsonSuccess(res, {\n totalUnits: plan.units.length,\n units: summary,\n incompleteness: plan.incompleteness,\n });\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * Audit chart-registration alignment: compares every frontend\n * `chartViews[].chartDefinition.ref` (materialized in the FRONTEND subprocess)\n * against the backend-registered chart refs (from the merged backend modules).\n * Returns the two-channel report — `unregisteredFrontendCharts` (each a\n * guaranteed runtime `chart_not_found` 404) + `orphanBackendCharts` (backend-only\n * charts, valid for API/programmatic use). The CLI renders + gates on it.\n */\n private async chartsAudit(_req: Request, res: Response, next: NextFunction) {\n try {\n // Frontend side — the chart authoring surface, readable only in the frontend subprocess.\n const appFrontendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => service.frontendType === AppFrontendType.SAAS_APP)?.[0];\n if (!appFrontendServiceKey) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { message: 'chart-registration audit: no SAAS_APP frontend service found.' },\n });\n }\n const result = await this.companionIntrospectionService.requestInfo({\n serviceKey: appFrontendServiceKey,\n behavior: 'chart-registration-refs',\n });\n if (!result.success) {\n const message = 'error' in result ? result.error.message : 'unknown error';\n throw this.buildIntrospectionFailureError(result, undefined, `chart-registration-refs introspection failed: ${message}`);\n }\n const frontendChartRefs =\n (result.data as { frontendChartRegistrationRefs?: FrontendChartRegistrationRef[] })\n .frontendChartRegistrationRefs ?? [];\n\n // Backend side — the EFFECTIVE set the backend registers, not the module declarations.\n //\n // `buildApplicationInitializationConfig()` is the same pure builder backend startup uses; it\n // assembles configuration and starts nothing, and its `chartDefinitions` is the array\n // `StartApplicationBackendService` hands to `ChartRegistry.registerChart`. That matters\n // because the assembly does `overrides.chartDefinitions ?? backendRegistry.chartDefinitions`\n // — a REPLACE — so `mergeBackendDomainModules(...)`, which this route used until 2026-09-09,\n // is a different population the moment an application supplies that override: a dropped chart\n // read as ALIGNED and 404'd at runtime.\n //\n // It is also what the contract asks for in as many words (\"tooling must not reconstruct\n // selected runtime capabilities from lower-level registries or naming conventions\"), so the\n // previous composition was violating the surface it was calling.\n //\n // Read from the backend data door (#3268): the builder runs in an introspection worker, which hands back the refs,\n // so this audit no longer re-imports the backend's companion graph into the companion process.\n const { effectiveChartRefs, effectiveChartRefsFailure } = await loadBackendCompanionData(this.companionContext);\n // The builder threw in the worker: the same failure the in-process call raised, with its reason.\n if (effectiveChartRefsFailure !== undefined) throw new Error(`chart-registration audit: buildApplicationInitializationConfig() failed: ${effectiveChartRefsFailure}`);\n if (effectiveChartRefs === null) {\n // REFUSE rather than fall back to the declarations. A fallback here would answer about a\n // population this route cannot vouch for, under a route whose whole output is a verdict —\n // and it would do so silently, which is the defect this change removes.\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n 'chart-registration audit: the application\\'s backend companion-exports declare no '\n + '`buildApplicationInitializationConfig`, so the effective registered chart set cannot be '\n + 'read. Add it to `backendCompanionExports` (it is a REQUIRED member of '\n + '`BackendCompanionExports`) and re-run.',\n },\n });\n }\n const backendRegisteredRefs = effectiveChartRefs.map((ref) => normalizeChartExecutionRef(ref));\n\n this.jsonSuccess(\n res,\n computeChartRegistrationAlignment({\n frontendChartRefs,\n backendRegisteredRefs,\n backendRefsProvenance: ChartRegistrationBackendRefsProvenance.EFFECTIVE_INITIALIZATION_CONFIG,\n }),\n );\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * The email lane's units, in the same summary shape `/labelling/plan` answers, so the CLI can split a\n * translate run into buckets without a second code path. `bucket` is the lane's named bucket;\n * `keyCount` is absent because an email's keys come from its source file at translate time.\n */\n private async labellingEmailTemplateUnits(_req: Request, res: Response, next: NextFunction) {\n try {\n const plan = await this.emailTemplateLabellingUnitsService.planEmailTemplateUnits();\n this.jsonSuccess(res, {\n totalUnits: plan.units.length,\n units: plan.units.map((unit) => ({\n id: unit.id,\n category: unit.category,\n displayLabel: unit.displayLabel,\n bucket: EMAIL_TEMPLATE_LABELLING_BUCKET,\n slug: unit.templateRef,\n })),\n warnings: plan.warnings,\n });\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async labellingLabellize(req: Request, res: Response, next: NextFunction) {\n try {\n const { forceRegenerate, unitIds, keys } = req.body || {};\n if (forceRegenerate !== undefined && typeof forceRegenerate !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'forceRegenerate must be a boolean when provided' },\n });\n }\n if (unitIds !== undefined && (!Array.isArray(unitIds) || unitIds.some((v) => typeof v !== 'string'))) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'unitIds must be an array of strings when provided' },\n });\n }\n\n this.assertLabellingKeyFilter(keys);\n\n const result = await this.labellizeOrchestratorService.labellize({\n forceRegenerate: forceRegenerate === true,\n ...(Array.isArray(unitIds) ? { unitIdFilter: unitIds as string[] } : {}),\n ...(Array.isArray(keys) ? { keyFilter: keys as string[] } : {}),\n }, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n }\n\n private async labellingTranslate(req: Request, res: Response, next: NextFunction) {\n try {\n const { targetLocales, forceRetranslate, unitIds, keys, companionOwnLabels } = req.body || {};\n const validatedTargets = parseCompanionTargetLocales(targetLocales, this.errorBuilder);\n if (forceRetranslate !== undefined && typeof forceRetranslate !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'forceRetranslate must be a boolean when provided' },\n });\n }\n if (unitIds !== undefined && (!Array.isArray(unitIds) || unitIds.some((v) => typeof v !== 'string'))) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'unitIds must be an array of strings when provided' },\n });\n }\n\n this.assertLabellingKeyFilter(keys);\n if (companionOwnLabels !== undefined && typeof companionOwnLabels !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'companionOwnLabels must be a boolean when provided' },\n });\n }\n\n // The companion's OWN words (#2656): asked for by name, never as part of an application run, because it writes\n // into the framework checkout rather than the application.\n const companionUnitIds = Array.isArray(unitIds) ? (unitIds as string[]).filter(isCompanionOwnLabelUnitId) : [];\n if (companionOwnLabels === true || companionUnitIds.length > 0) {\n if (Array.isArray(unitIds) && companionUnitIds.length !== unitIds.length) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'A run translates the dev companion\\'s own words or the application\\'s, never both: name only companion_label: units, or none' },\n });\n }\n if (Array.isArray(keys)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'keys names words of the application\\'s units; the companion lane already translates only the words whose English changed' },\n });\n }\n const companionResult = await this.translateOrchestratorService.translateCompanionOwnLabels({\n targetLocales: validatedTargets,\n forceRetranslate: forceRetranslate === true,\n ...(companionUnitIds.length > 0 ? { unitIdFilter: companionUnitIds } : {}),\n }, this.getTraceSession(res));\n this.jsonSuccess(res, companionResult);\n return;\n }\n\n const result = await this.translateOrchestratorService.translate({\n targetLocales: validatedTargets,\n forceRetranslate: forceRetranslate === true,\n ...(Array.isArray(unitIds) ? { unitIdFilter: unitIds as string[] } : {}),\n ...(Array.isArray(keys) ? { keyFilter: keys as string[] } : {}),\n }, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n }\n\n /**\n * `keys` (#2439): the label keys a labellize or translate run regenerates on their own. Optional; when\n * present it must be a NON-empty array of strings — an empty list would read as \"no key filter\" and\n * silently regenerate whole units, the opposite of what was asked.\n */\n private assertLabellingKeyFilter(keys: unknown): void {\n if (keys !== undefined && (!Array.isArray(keys) || keys.length === 0 || keys.some((v) => typeof v !== 'string' || v.trim() === ''))) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'keys must be a non-empty array of non-empty strings when provided' },\n });\n }\n }\n\n /**\n * Validate a locale string against `AvailableLanguage`. Without this,\n * the orchestrators would happily write `<bucket>/<slug>.xx.ts`\n * files for arbitrary input and create unbounded locale entries in\n * the lock file.\n */\n private assertAvailableLanguage(value: string, fieldName: string): AvailableLanguage {\n return assertCompanionAvailableLanguage(value, fieldName, this.errorBuilder);\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // EMAIL TEMPLATES\n //\n // OD-4.a: All handlers in this block delegate to\n // `EmailTemplateCompanionService`, which exclusively reads from the in-memory\n // `EmailTemplateRegistryBackendService` (file-based template + per-locale\n // labels, refreshed via dynamic `import()` of the compiled `dist/`\n // artifacts). The deleted DB-backed `EMAIL_TEMPLATES` core resource is NOT\n // a fallback. See the `CompanionController` class JSDoc for the full\n // contract and the deprecation plan reference.\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async emailTemplatesGenerate(req: Request, res: Response, next: NextFunction) {\n try {\n this.logDebug('emailTemplatesGenerate');\n const { forceRegenerate, templateRefs, locales } = req.body || {};\n\n if (templateRefs !== undefined && (!Array.isArray(templateRefs) || templateRefs.some((value) => typeof value !== 'string'))) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRefs must be an array of template ref strings when provided' },\n },\n );\n }\n\n if (locales !== undefined && (!Array.isArray(locales) || locales.some((value) => typeof value !== 'string'))) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'locales must be an array of locale strings when provided' },\n },\n );\n }\n\n if (forceRegenerate !== undefined && typeof forceRegenerate !== 'boolean') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'forceRegenerate must be a boolean when provided' },\n },\n );\n }\n\n const result = await this.emailTemplateService.generateTemplates({\n forceRegenerate,\n templateRefs,\n locales,\n }, this.getTraceSession(res));\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n }\n\n private async emailTemplatesPreview(req: Request, res: Response, next: NextFunction) {\n try {\n const { templateRef, locale, mockContext } = req.body || {};\n\n if (!templateRef || typeof templateRef !== 'string' || !locale || typeof locale !== 'string') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRef and locale are required' },\n },\n );\n }\n\n const validatedLocale = this.assertAvailableLanguage(locale, 'locale');\n\n const result = await this.emailTemplateService.previewTemplate({\n templateRef,\n locale: validatedLocale,\n mockContext,\n }, this.getTraceSession(res));\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async emailTemplatesTestSend(req: Request, res: Response, next: NextFunction) {\n try {\n const { templateRef, locale, recipientEmail, mockContext } = req.body || {};\n\n if (\n !templateRef || typeof templateRef !== 'string'\n || !locale || typeof locale !== 'string'\n || !recipientEmail || typeof recipientEmail !== 'string'\n ) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRef, locale, and recipientEmail are required' },\n },\n );\n }\n\n const validatedLocale = this.assertAvailableLanguage(locale, 'locale');\n\n const result = await this.emailTemplateService.testSend({\n templateRef,\n locale: validatedLocale,\n recipientEmail,\n mockContext,\n }, this.getTraceSession(res));\n\n assertEmailTemplateTestSendSucceeded(result, {\n templateRef,\n locale: validatedLocale,\n recipientEmail,\n }, this.errorBuilder);\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async emailTemplatesStatus(req: Request, res: Response, next: NextFunction) {\n try {\n const templateRefs = typeof req.query.templateRefs === 'string'\n ? req.query.templateRefs.split(',').map((value) => value.trim()).filter(Boolean)\n : undefined;\n\n const result = await this.emailTemplateService.getTemplateStatus(\n templateRefs,\n this.getTraceSession(res),\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async emailTemplatesTranslate(req: Request, res: Response, next: NextFunction) {\n try {\n const { targetLocales, templateRefs, dryRun } = req.body || {};\n this.logDebug('emailTemplatesTranslate', { targetLocales, templateRefs, dryRun });\n\n const validatedTargets = parseCompanionTargetLocales(targetLocales, this.errorBuilder);\n\n if (templateRefs !== undefined && (!Array.isArray(templateRefs) || templateRefs.some((value) => typeof value !== 'string'))) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRefs must be an array of template ref strings when provided' },\n },\n );\n }\n\n if (dryRun !== undefined && typeof dryRun !== 'boolean') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'dryRun must be a boolean when provided' },\n },\n );\n }\n\n const result = await this.emailTemplateService.translateEmailTemplateLabels({\n targetLocales: validatedTargets,\n templateRefs,\n dryRun: !!dryRun,\n }, this.getTraceSession(res));\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // FILE OPERATIONS\n // ─────────────────────────────────────────────────────────────────────────────\n\n /**\n * Single source of truth for the SaaS app root consumed by file operations.\n *\n * Always returns `this.companionContext.saasRoot`. Earlier revisions used\n * `process.env.COMPANION_WORKSPACE_ROOT || this.companionContext.saasRoot`,\n * which let a stale env var (from a parent shell, prior session, or leaked\n * Vitest worker) silently override the trusted CompanionContext snapshot.\n * `COMPANION_WORKSPACE_ROOT` is now only used as a BOOTSTRAP seed for\n * subprocess consumers that have no CompanionContext (see\n * `applyTrustedHomesToChildProcess` and the code-compliance scripts) —\n * never as a runtime override inside services that already hold a resolved\n * context.\n */\n private getWorkspaceRoot(): string {\n return this.companionContext.saasRoot;\n }\n\n /**\n * The one resolver behind the generic file routes (read, list, write), and therefore the one place\n * they are confined: inside the application root, and never a secret-bearing path. See\n * `companion-file-route-confinement.ts` for why reads needed it even though the token floor leaves\n * them open. A refusal is AUTHORIZATION (403): the path is well-formed, the caller may not have it.\n */\n private resolveRequestedPath(filePath: string): string {\n const decision = confineCompanionFilePath(this.getWorkspaceRoot(), filePath);\n if (decision.admitted) return decision.absolutePath;\n throw this.errorBuilder.buildError(ErrorType.AUTHORIZATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.AUTHORIZATION,\n context: {\n refusal: decision.refusal,\n path: decision.relativePath,\n message:\n decision.refusal === CompanionFileRouteRefusal.SECRET_BEARING_PATH\n ? 'Secrets are not served by the file routes; use `wildo secrets` or the workbench secrets section.'\n : 'The file routes only reach files inside the application root.',\n },\n });\n }\n\n private async updateFiles(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'file-operation', 'update-files');\n try {\n this.logDebug('updateFiles');\n const { files } = req.body;\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-update-start',\n 'Start file update request',\n {\n fileCount: Array.isArray(files) ? files.length : 0,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'update-files-request.json',\n req.body ?? {},\n traceStep,\n );\n \n if (!files || !Array.isArray(files)) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Request body must contain a \"files\" array' }\n }\n );\n }\n\n const results: { success: boolean; updatedFiles: string[]; errors: { path: string; message: string }[] } = {\n success: true,\n updatedFiles: [],\n errors: [],\n };\n\n for (const file of files as FileUpdateRequest[]) {\n try {\n const absolutePath = this.resolveRequestedPath(file.path);\n \n if (file.createDirectories !== false) {\n await fs.mkdir(path.dirname(absolutePath), { recursive: true });\n }\n \n const encoding = (file.encoding || 'utf-8') as BufferEncoding;\n await fs.writeFile(absolutePath, file.content, { encoding });\n \n results.updatedFiles.push(file.path);\n } catch (error) {\n results.success = false;\n results.errors.push({\n path: file.path,\n message: describeCaughtError(error),\n });\n }\n }\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n results.success ? 'file-update-success' : 'file-update-mixed-result',\n results.success\n ? `Updated ${results.updatedFiles.length} files`\n : `Updated ${results.updatedFiles.length} files with ${results.errors.length} failures`,\n {\n updatedCount: results.updatedFiles.length,\n errorCount: results.errors.length,\n success: results.success,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'update-files-result.json',\n results,\n traceStep,\n );\n this.jsonSuccess(res, results);\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-update-failure',\n 'Workspace file update failed',\n {\n error: describeCaughtError(e),\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getFile(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'file-operation', 'get-file');\n try {\n this.logDebug('getFile');\n const filePath = req.query.path as string;\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-read-start',\n 'Start file read request',\n { filePath },\n traceStep,\n );\n \n if (!filePath) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Query parameter \"path\" is required' }\n }\n );\n }\n\n const absolutePath = this.resolveRequestedPath(filePath);\n const content = await fs.readFile(absolutePath, 'utf-8');\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-read-success',\n `Read file ${filePath}`,\n {\n filePath,\n contentLength: content.length,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'file-read-result.json',\n {\n filePath,\n content,\n encoding: 'utf-8',\n },\n traceStep,\n );\n this.jsonSuccess(res, { content, encoding: 'utf-8' });\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-read-failure',\n 'Workspace file read failed',\n {\n error: describeCaughtError(e),\n filePath: req.query.path,\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listFiles(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'file-operation', 'list-files');\n try {\n this.logDebug('listFiles');\n const directory = req.query.directory as string;\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-list-start',\n 'Start workspace directory listing request',\n { directory },\n traceStep,\n );\n \n if (!directory) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Query parameter \"directory\" is required' }\n }\n );\n }\n\n const absolutePath = this.resolveRequestedPath(directory);\n const entries = await fs.readdir(absolutePath, { withFileTypes: true });\n \n const files = entries.map(entry => ({\n name: entry.name,\n isDirectory: entry.isDirectory(),\n path: path.join(directory, entry.name),\n }));\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-list-success',\n `Listed workspace directory ${directory}`,\n {\n directory,\n entryCount: files.length,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'file-list-result.json',\n {\n directory,\n files,\n },\n traceStep,\n );\n this.jsonSuccess(res, files);\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-list-failure',\n 'Workspace directory listing failed',\n {\n error: describeCaughtError(e),\n directory: req.query.directory,\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // CODING-AGENT STATUS (typed Flows/Actors coding path)\n // ─────────────────────────────────────────────────────────────────────────────\n // The P-29 token middleware that used to live HERE guarded only the raw\n // POST /coding-agent/dispatch endpoint; it was deleted with that endpoint\n // at the first-activation hard cut, and for as long as it stayed deleted\n // `CompanionAuthFloorCompanionService`'s token half had no consumer at all.\n // It is back, and deliberately not here: `enforceLocalTokenFloor` is a\n // router-level middleware registered first in `setupRoutes`, so it covers\n // every mutating route on the mount rather than the one endpoint whose\n // author happened to remember it. Per-route gating is what let the floor\n // die with a single deletion.\n // The OTHER half of the same auth floor is unchanged and enforced at\n // startup before the server listens: the fail-closed loopback assertion,\n // with no override, which is why the companion must never bind beyond this\n // machine.\n\n /**\n * `POST /runtime/env/apply` `{ envVarNames: string[] }` — load those variables of the companion's\n * regenerated `.env` into this process and rebuild the provider registry, as a restart would (#1637).\n *\n * The door `wildo secrets set` uses from a terminal. Without it a key changed while the companion ran\n * reached it only at its next start, and a created application's companion has no supervisor to\n * restart it: the CLI said the key was set, and the next playbook run was refused for its absence.\n * Applying in place also spares every run in flight, which a restart would end.\n *\n * Takes names only. Values are read from the file `config sync` just wrote, so this cannot plant a\n * value, and a name the `.env` has never carried is refused (400) rather than deleted from the process.\n * A mutating verb, so the P-29b token floor gates it like every other write.\n */\n private async applyRuntimeEnvVariables(req: Request, res: Response, next: NextFunction) {\n try {\n const { envVarNames } = (req.body ?? {}) as { envVarNames?: unknown };\n if (!Array.isArray(envVarNames) || envVarNames.length === 0 || !envVarNames.every((name) => typeof name === 'string' && /^[A-Za-z_][A-Za-z0-9_]*$/.test(name))) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`envVarNames` must be a non-empty array of environment variable names.' },\n });\n }\n let applied;\n try {\n applied = await reloadCompanionEnvVariables(envVarNames as string[], this.externalProvidersRegistry);\n } catch (error) {\n if (!(error instanceof CompanionEnvVariableRefusal)) throw error;\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n });\n }\n this.jsonSuccess(res, { applied });\n } catch (error) {\n this.jsonError(res, error as any, next);\n }\n }\n\n /**\n * Stop the in-flight coding run.\n *\n * Answers 200 with the task that was signalled, or 200 with\n * `cancelled: false` when nothing is running — an operator asking to stop a\n * run that already finished has not made an error, and a 404 would read like\n * a broken route rather than an empty queue.\n *\n * The run terminalises normally with stop reason `cancelled` and its captured\n * change set, so what the agent had already written stays visible.\n */\n private async codingAgentCancel(_req: Request, res: Response, next: NextFunction) {\n try {\n const cancelled = this.codingAgentDispatchService.cancelActiveApplicationCodingTask();\n this.jsonSuccess(res, cancelled ? { cancelled: true, ...cancelled } : { cancelled: false });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * Answer a coding task that parked on a question, resuming the SAME agent\n * session. A WRITE: it re-enters a workspace-mutating run behind the shared\n * worktree lock, so it is serialized with every other coding run.\n */\n private async codingAgentRespond(req: Request, res: Response, next: NextFunction) {\n try {\n const { taskId, answer, suspensionRef, answeredByRef } = (req.body ?? {}) as { taskId?: unknown; answer?: unknown; suspensionRef?: unknown; answeredByRef?: unknown };\n // An empty reference names no question: a malformed request (400), not a state conflict (#1581, R10-5).\n if (typeof taskId !== 'string' || typeof answer !== 'string' || typeof suspensionRef !== 'string' || suspensionRef.trim().length === 0) {\n // A malformed body is a VALIDATION 400, not a critical INTERNAL 500 — a\n // plain `new Error` here surfaced as the latter and logged at critical\n // severity (found by the live surface probe, 2026-09-04).\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`taskId`, `answer` and `suspensionRef` (strings) are required — `suspensionRef` names the question answered, as `pendingQuestions` carries it.' },\n });\n }\n // ONE door since #1359: the parked run is an actor-system execution waiting on a decision,\n // with its contract and baseline on the checkpoint, so answering it is the same call whether\n // this process parked it or a previous one did. The service refuses (409) when nothing\n // answerable waits under the id.\n // `suspensionRef` (from `pendingQuestions`) holds the answer to the question the caller read (#1581).\n // WHO answered, when the caller says (#1658) — recorded in CODING-ANSWERS.md; absent records nothing rather than a guess.\n // (dead-plan-citation: CODING-ANSWERS.md is a file the companion writes.)\n const admission = await this.codingAgentDispatchService.respondToApplicationCodingTaskQuestion(taskId, answer, undefined, {\n suspensionRef,\n ...(typeof answeredByRef === 'string' && answeredByRef.trim().length > 0 ? { answeredByRef: answeredByRef.trim() } : {}),\n });\n this.jsonSuccess(res, admission);\n } catch (error) {\n this.jsonError(res, error as any, next);\n }\n }\n\n /**\n * Stream one active coding session's live frames as Server-Sent Events.\n *\n * Frames flow only while the run is active, so the current pending question\n * (if any) is sent first as a `snapshot` event — a subscriber that attaches\n * after a park still learns what is being asked. Read-only.\n */\n private codingAgentSessionEvents(req: Request, res: Response): void {\n const taskId = typeof req.query.taskId === 'string' ? req.query.taskId : '';\n if (!taskId) {\n res.status(400).json({ error: 'A `taskId` query parameter is required.' });\n return;\n }\n res.setHeader('Content-Type', 'text/event-stream');\n res.setHeader('Cache-Control', 'no-cache, no-transform');\n res.setHeader('Connection', 'keep-alive');\n res.flushHeaders?.();\n\n const send = (event: string, data: unknown): void => {\n res.write(`event: ${event}\\ndata: ${JSON.stringify(data)}\\n\\n`);\n };\n\n // The pending question up front, so a late subscriber is not blind to a park\n // that already happened.\n // Read from the actor plane, so it is asynchronous; a failed read costs the late subscriber its\n // snapshot and nothing else — the live frames below do not depend on it.\n void this.codingAgentDispatchService.listPendingCodingQuestions()\n .then((questions) => send('snapshot', { pendingQuestion: questions.find((q) => q.taskId === taskId) ?? null }))\n .catch(() => send('snapshot', { pendingQuestion: null }));\n\n const unsubscribe = this.codingAgentDispatchService.subscribeToCodingSession(taskId, (frame) => {\n send(frame.channel, frame.payload);\n });\n // A heartbeat keeps intermediaries from closing an idle stream during a long\n // quiet stretch of a run.\n const heartbeat = setInterval(() => res.write(': keep-alive\\n\\n'), 15_000);\n heartbeat.unref?.();\n req.on('close', () => {\n clearInterval(heartbeat);\n unsubscribe();\n });\n }\n\n /**\n * What is running, and what died leaving something resumable.\n *\n * A composite is a minutes-long operation — 780s for a five-iteration run — and until now nothing\n * could report that one was in progress. On 2026-08-29 a parallel session published a single file\n * 32 seconds after a research turn had succeeded; the companion restarted correctly and the run\n * died. That session had no way to know, and no way to find out (#125).\n *\n * Two fields because they answer two different questions:\n *\n * - `running` comes from MEMORY, and is the only evidence of a run still inside its first\n * iteration — the most expensive moment to interrupt, and one no checkpoint has reached yet.\n * - `interrupted` comes from DISK, and lists runs whose process is gone. A checkpoint outlives its\n * run only when the process was taken away, because a run that concludes consumes its own.\n *\n * Deliberately NOT a lock. `CLAUDE.md` is explicit that sessions are independent and shared-file\n * collisions are accepted; a run that refused to let someone save a file would be worse than one\n * that loses an iteration.\n */\n private async readPlaybookRunsInFlight(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.playbookRunService.readRunsInFlight());\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `GET /playbooks/suspended` — what is waiting for an answer, independent of who asked.\n *\n * The read that makes a suspension survivable. A run that stops at a clarification answers 200 with\n * its `runId`, and until this existed that response was the ONLY place the id lived: reload the\n * page and the run stayed suspended on disk with nobody able to name it. A resume affordance can\n * now be rebuilt from server state rather than from the browser's memory of one response.\n */\n private async readSuspendedPlaybookRuns(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.playbookRunService.readSuspendedRuns());\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `GET /compliance/governance-questions` — what a person still has to decide.\n *\n * `definitionRef` may repeat, and an unknown one yields nothing rather than 404: the composer treats\n * an unknown document as \"no such document\", and a host loading several refs should not lose the\n * ones that exist because one was mistyped.\n */\n private async readGovernanceQuestions(req: Request, res: Response, next: NextFunction) {\n try {\n const raw = req.query.definitionRef;\n const definitionRefs = raw === undefined ? undefined : (Array.isArray(raw) ? raw : [raw]).map(String);\n this.jsonSuccess(res, { questionnaires: composeGovernanceQuestionnaires(definitionRefs) });\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /compliance/governance-facts` — the answers to the questions above, as a FILE.\n *\n * The write half of #192. It lands `document-facts-authored`, never `document-facts`: every question\n * the questionnaire asks carries a human authority, and the derived family refuses those by type.\n *\n * It does NOT commit. The landed file is a working edit until a human commits it\n * (`.claude/rules/one-source-of-truth.md`, rules 2 and 3) — this endpoint accepts nothing.\n *\n * `?dryRun=1` runs the whole pipe and writes nothing, which is how a host previews what an answer set\n * would produce before a person commits to it.\n */\n private async landGovernanceFacts(req: Request, res: Response, next: NextFunction) {\n try {\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n if (!specificationsPackageRoot) {\n /*\n * `next(...)`, never `throw`. Thrown here it lands in this method's OWN catch, goes through\n * `jsonError` → `buildFromStandardError`, and is reclassified INTERNAL with its message\n * sanitized to the literal \"internal\" — so a deliberate, well-worded refusal would answer 500\n * saying nothing. Found by making a test double reproduce the real sanitization rather than\n * passing errors through.\n */\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'This application has no resolved specifications package, so there is nowhere to land the facts.' },\n }));\n return;\n }\n /*\n * The ENVELOPE only — see the schema's own note. The answer SEMANTICS stay with the service\n * that owns the question catalog; this refuses a body that is not a request at all, which\n * previously reached the service and threw a `TypeError` reported as a 500.\n *\n * `safeParse` and `next(...)`, never `.parse()`. A thrown `ZodError` lands in this method's own\n * catch and goes out through the generic path as INTERNAL with its message sanitized to\n * \"internal\" — the SAME 500-saying-nothing this guard exists to remove, so parsing strictly and\n * throwing would have moved the defect rather than fixed it. Caught by mutating the guard away\n * and watching the pin stay green.\n */\n const parsed = CompanionLandGovernanceFactsRequestSchema.safeParse(req.body ?? {});\n if (!parsed.success) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: {\n message:\n 'This is not a governance-fact landing request: '\n + parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; '),\n },\n }));\n return;\n }\n const payload = parsed.data;\n /*\n * The authored facts as LANDED, for the merge (#1454, Step 6): the new answers replace their own\n * facts and every other declaration is kept. Read through the same aggregate every reader uses,\n * so what this landing merges into is what the dossier showed the person.\n */\n // The read and the write are one dossier write, queued with every other (#2179).\n const result = await serializeDossierWrite(specificationsPackageRoot, async () => {\n return landGovernanceFactDeclarations({\n read: await this.dossierService.readAuthoredDocumentFactsForRewrite(),\n specificationsPackageRoot,\n // NEUTRAL BY CONTRACT (issue #65), same as every other landed constant — app identity lives in\n // VALUES, never in the names of landed exports.\n constantPrefix: 'application',\n answers: payload as unknown as GovernanceFactDeclarationInput,\n ...(req.query.dryRun === undefined ? {} : { dryRun: true }),\n });\n });\n this.jsonSuccess(res, result);\n } catch (e) {\n /*\n * A refusal on the ANSWERS is a BAD REQUEST, and it must arrive with its message intact.\n *\n * Every `GovernanceQuestionnaireError` names what the person got wrong — an unanswered\n * question, a review with no reviewer, \"does not apply\" on a question that does not offer it —\n * and those sentences are the whole product of that boundary. Left to `jsonError` they are\n * classified INTERNAL and SANITIZED to the literal string \"internal\", so the caller gets a 500\n * that says nothing. Measured against the live companion on 2026-09-03, minutes after the\n * route shipped: `POST` with an empty body answered `{\"type\":\"INTERNAL\",\"message\":\"internal\"}`.\n *\n * Same treatment as `PlaybookElicitationError` below, and for the same reason: a malformed\n * interview is something the caller must change, never something that went wrong here.\n */\n if (e instanceof GovernanceQuestionnaireError || e instanceof SpecificationUnavailableError || e instanceof SpecificationWriteRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: e.message },\n }));\n return;\n }\n this.jsonError(res, e as any, next);\n }\n }\n\n private async codingAgentStatus(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.codingAgentDispatchService.getStatus());\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // PERSISTED EXECUTIONS\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async createActorExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const payload = CompanionCreateActorExecutionRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.createActorExecution(payload, this.getTraceSession(res));\n this.invalidateCreationBoardsAfterActorPlaneWrite();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listActorExecutions(req: Request, res: Response, next: NextFunction) {\n try {\n const query = CompanionExecutionsListQuerySchema.parse(req.query ?? {});\n // The HTTP listing answers whole rows: an outside reader may want what the internal listings leave out (#3204).\n const result = await this.executionsService.listActorExecutions(query, this.getTraceSession(res), { omitStoredFields: [] });\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getActorExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const executionId = req.params.executionId;\n\n if (!executionId || Array.isArray(executionId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'executionId route param is required' },\n });\n }\n\n const result = await this.executionsService.getActorExecution(executionId, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async createFlowExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const payload = CompanionCreateFlowExecutionRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.createFlowExecution(payload, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listFlowExecutions(req: Request, res: Response, next: NextFunction) {\n try {\n const query = CompanionExecutionsListQuerySchema.parse(req.query ?? {});\n const result = await this.executionsService.listFlowExecutions(query, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getFlowExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const executionId = req.params.executionId;\n\n if (!executionId || Array.isArray(executionId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'executionId route param is required' },\n });\n }\n\n const result = await this.executionsService.getFlowExecution(executionId, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async createActorTask(req: Request, res: Response, next: NextFunction) {\n try {\n const payload = CompanionCreateActorTaskRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.createActorTask(payload, this.getTraceSession(res));\n this.invalidateCreationBoardsAfterActorPlaneWrite();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listActorTasks(req: Request, res: Response, next: NextFunction) {\n try {\n const query = CompanionActorTasksListQuerySchema.parse(req.query ?? {});\n const result = await this.executionsService.listActorTasks(query, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getActorTask(req: Request, res: Response, next: NextFunction) {\n try {\n const taskId = req.params.taskId;\n\n if (!taskId || Array.isArray(taskId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'taskId route param is required' },\n });\n }\n\n const result = await this.executionsService.getActorTask(taskId, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async updateActorTask(req: Request, res: Response, next: NextFunction) {\n try {\n const taskId = req.params.taskId;\n\n if (!taskId || Array.isArray(taskId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'taskId route param is required' },\n });\n }\n\n const payload = CompanionUpdateActorTaskRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.updateActorTask(taskId, payload, this.getTraceSession(res));\n this.invalidateCreationBoardsAfterActorPlaneWrite();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * The generic actor-plane WRITE doors (`POST /executions/actors`, `POST /tasks/actors`,\n * `PATCH /tasks/actors/:taskId`) drop the creation boards, because the boards read actor-plane rows\n * no file signature can see (#1310, sixth review F2): a coding task's status or memory moves the\n * loop guard, the attempt budget and the in-flight set. The build lane announces its own writes\n * through `announceRunStateChanged`; these doors write the same rows on anyone's behalf, so they\n * cannot know which writes matter and drop the boards after every one. The cost is a recompute a\n * watching tab would pay on its next read anyway.\n */\n private invalidateCreationBoardsAfterActorPlaneWrite(): void {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // META / INTROSPECTION\n // ─────────────────────────────────────────────────────────────────────────────\n\n /**\n * Get resources registry, optionally scoped to a specific app.\n */\n private async getResourcesRegistry(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'meta-introspection', 'resources-registry');\n let mappedFailureAlreadyTraced = false;\n try {\n const appSlug = req.params.appSlug;\n this.logDebug('getResourcesRegistry', { appSlug: appSlug ?? 'all' });\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-start',\n 'Resolve companion resources registry',\n { appSlug: appSlug ?? null },\n traceStep,\n );\n\n const result = await this.companionIntrospectionService.requestInfo({\n serviceKey: this.pickResourcesRegistryCarrierServiceKey(),\n behavior: 'resources-registry',\n });\n\n if (!result.success) {\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'resources-registry-failure-result.json',\n result,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-upstream-failure',\n 'Companion resources registry introspection returned a failure result',\n {\n appSlug: appSlug ?? null,\n serviceKey: result.serviceKey,\n behavior: result.behavior,\n targetId: result.targetId,\n durationMs: result.durationMs,\n stdout: result.stdout,\n stderr: result.stderr,\n error: 'error' in result ? result.error : undefined,\n },\n traceStep,\n );\n mappedFailureAlreadyTraced = true;\n const failureMessage = 'error' in result\n ? result.error.message\n : 'Companion resources-registry introspection failed.';\n\n throw this.buildIntrospectionFailureError(result, undefined, failureMessage);\n }\n\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'resources-registry-result.json',\n result.data ?? null,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-success',\n 'Resolved companion resources registry',\n { appSlug: appSlug ?? null },\n traceStep,\n );\n this.jsonSuccess(res, result.data ?? null);\n } catch (e) {\n if (!mappedFailureAlreadyTraced) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-failure',\n 'Failed to resolve companion resources registry',\n {\n appSlug: req.params.appSlug ?? null,\n error: describeCaughtError(e),\n },\n traceStep,\n );\n }\n this.jsonError(res, e as any, next);\n }\n }\n\n private pickResourcesRegistryCarrierServiceKey(): string {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n\n if (!backendServiceKey) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: 'No backend service is available to resolve the companion resources-registry behavior.',\n },\n });\n }\n\n return backendServiceKey;\n }\n\n private async getWebsiteStructuredDataAudit(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(\n res,\n 'meta-introspection',\n 'website-structured-data-audit',\n );\n try {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'website-structured-data-audit-start',\n 'Run website structured-data reconciliation against the merged Schema.org catalog',\n {},\n traceStep,\n );\n\n const report = await StructuredDataCatalogAuditService.audit(this.companionContext);\n const warningCount = report.result.findings.length;\n const responseBody = {\n status: warningCount === 0 ? 'passed-with-zero-findings' : 'completed-with-warnings',\n warningCount,\n warnings: report.result.findings,\n // Optional-field recommendations: information beside the warnings, never counted as one.\n // `?? []`: a result from an injected saas-website that predates the channel carries no key.\n recommendations: report.result.recommendations ?? [],\n report,\n };\n\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'website-structured-data-audit-result.json',\n responseBody,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n warningCount === 0\n ? 'website-structured-data-audit-success'\n : 'website-structured-data-audit-warnings',\n warningCount === 0\n ? 'Website structured-data audit completed with zero findings'\n : 'Website structured-data audit completed with warning findings',\n {\n pageCount: report.pageCount,\n sectionCount: report.sectionCount,\n warningCount,\n },\n traceStep,\n );\n\n this.jsonSuccess(res, responseBody);\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'website-structured-data-audit-failure',\n 'Failed to run website structured-data audit',\n {\n error: describeCaughtError(e),\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * Is this failure the CALLER's fault (400) rather than the companion's (500)?\n *\n * Decided by the ERROR NAME, for any behavior. It used to be gated on one behavior id\n * (`specification-context-parts`), which is the hand-kept-list shape: the next parameterised behavior\n * inherited 500 INTERNAL for a malformed input, sanitized to \"internal\", and its own refusal message —\n * written to name the fix — reached nobody. Measured on the first live `wildo context elements` run\n * (#1459), where `get` with both `refs` and `aspectKeys` answered 500 and the CLI suggested the\n * companion might be down.\n *\n * `ZodError` stays gated on that behavior deliberately: elsewhere a Zod failure is usually the\n * APPLICATION's own data failing its schema, which is not the caller's input and must not read as a\n * bad request. A handler that wants the 400 says so by throwing\n * {@link IntrospectionInputValidationError}.\n */\n private isValidationIntrospectionFailure(result: {\n success: boolean;\n behavior: string;\n error?: { name?: string };\n }, requestedBehavior?: string): boolean {\n if (result.success) return false;\n if (result.error?.name === INTROSPECTION_INPUT_VALIDATION_ERROR_NAME) return true;\n\n const effectiveBehavior = requestedBehavior ?? result.behavior;\n if (effectiveBehavior !== 'specification-context-parts') return false;\n return result.error?.name === 'ZodError'\n || result.error?.name === SPECIFICATION_CONTEXT_VALIDATION_ERROR_NAME;\n }\n\n /**\n * How a failure RESULT is answered: the caller's fault (400), a transient the caller should retry (503), or\n * the companion's own fault (500).\n *\n * The transient is the companion stopping under a request (#3140): the derivation did not fail, the process\n * running it was restarted by the dev supervisor, and the same request succeeds once the restarted companion\n * is ready. It used to answer 500 INTERNAL, severity critical, so the caller got a non-retryable answer and\n * every restart during a request wrote a `\"severity\":\"critical\"` line, the shape the backend log FATAL gate\n * of a verification run matches. It answers `INFRASTRUCTURE` now (503 with the RETRY strategy, which the CLI\n * reads as \"re-run in a moment\"), at severity MEDIUM (see {@link buildIntrospectionFailureError}), and\n * without the ALERT and CIRCUIT_BREAK actions that type carries: a planned stop of this process is neither\n * something to page about nor a dependency to trip a breaker on. LOG and RECORD_METRICS stay, so the\n * restarts remain countable; the HTTP boundary still logs it at `error` level, as it does every 5xx.\n */\n private classifyIntrospectionFailure(result: {\n success: boolean;\n behavior: string;\n error?: { name?: string };\n }, requestedBehavior?: string): {\n errorType: ErrorType;\n customMessageReference: ErrorCustomMessageReference;\n skipBackendActionTypes?: readonly ErrorActionBackend[];\n severity?: ErrorSeverity;\n } {\n // Only a route that forwards a CALLER's input can blame the caller; the routes that pass no requested\n // behavior (`resources-registry`, `charts/audit`) take none, so a validation failure there is the companion's.\n if (requestedBehavior !== undefined && this.isValidationIntrospectionFailure(result, requestedBehavior)) {\n return { errorType: ErrorType.VALIDATION, customMessageReference: ErrorCustomMessageReference.VALIDATION };\n }\n if (!result.success && result.error?.name === INTROSPECTION_PARENT_TERMINATED_ERROR_NAME) {\n return {\n errorType: ErrorType.INFRASTRUCTURE,\n customMessageReference: ErrorCustomMessageReference.INFRASTRUCTURE,\n skipBackendActionTypes: [ErrorActionBackend.ALERT, ErrorActionBackend.CIRCUIT_BREAK],\n severity: ErrorSeverity.MEDIUM,\n };\n }\n return { errorType: ErrorType.INTERNAL, customMessageReference: ErrorCustomMessageReference.INTERNAL };\n }\n\n /**\n * The error EVERY route answers when an introspection returns a failure result — one builder, so a route\n * that calls `requestInfo` cannot answer a companion restart as a critical 500 while its sibling answers 503\n * (#3140: three routes did, `_meta/introspect`, `_meta/resources-registry` and `charts/audit`).\n *\n * The severity override is local on purpose. `ERROR_DEFINITIONS` gives `INFRASTRUCTURE` CRITICAL because a\n * broken dependency usually is; the builder has no per-call severity, and the one site that knows the cause\n * is a planned stop of THIS process is here. MEDIUM keeps it visible without reading as a fault.\n */\n private buildIntrospectionFailureError(\n result: { success: boolean; behavior: string; serviceKey?: string; targetId?: string; error?: { name?: string; message?: string } },\n requestedBehavior: string | undefined,\n message: string,\n ) {\n const { errorType, customMessageReference, skipBackendActionTypes, severity } = this.classifyIntrospectionFailure(result, requestedBehavior);\n const built = this.errorBuilder.buildError(\n errorType,\n undefined,\n {\n customMessageReference,\n ...(skipBackendActionTypes === undefined ? {} : { skipBackendActionTypes }),\n context: {\n message,\n serviceKey: result.serviceKey,\n behavior: result.behavior,\n targetId: result.targetId,\n },\n },\n );\n return severity === undefined ? built : { ...built, severity };\n }\n\n /**\n * `GET /_meta/introspect/behaviors` — the live-context MENU (`wildo context list`, issue #252).\n *\n * Pure catalog read, no subprocess: what this running companion can answer, plus the service keys a\n * `POST /_meta/introspect` caller may target and the resolved default backend key so the caller never\n * re-derives the \"first backend service\" rule.\n */\n private listIntrospectionBehaviors(_req: Request, res: Response, next: NextFunction) {\n try {\n res.json(this.companionIntrospectionService.describeCatalog());\n } catch (error) {\n next(error);\n }\n }\n\n private async requestIntrospection(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'meta-introspection', 'request-introspection');\n let mappedFailureAlreadyTraced = false;\n try {\n const { serviceKey, behavior, input } = CompanionIntrospectionRequestSchema.parse(req.body ?? {});\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-start',\n `Resolve companion introspection behavior ${behavior}`,\n {\n serviceKey,\n behavior,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'introspection-request.json',\n { serviceKey, behavior, input },\n traceStep,\n );\n\n const result = await this.companionIntrospectionService.requestInfo({\n serviceKey,\n behavior,\n input,\n });\n\n if (!result.success && 'error' in result) {\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'introspection-failure-result.json',\n result,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-upstream-failure',\n `Companion introspection behavior ${behavior} returned a failure result`,\n {\n serviceKey: result.serviceKey,\n behavior: result.behavior,\n targetId: result.targetId,\n durationMs: result.durationMs,\n stdout: result.stdout,\n stderr: result.stderr,\n error: result.error,\n },\n traceStep,\n );\n mappedFailureAlreadyTraced = true;\n const failureMessage = result.error.message;\n throw this.buildIntrospectionFailureError(result, behavior, failureMessage);\n }\n\n /*\n * What this door answers reaches a coding or research agent (`wildo context info`, `wildo context elements`), so\n * the research-written parts of EVERY behavior's answer are screened in THIS process before they leave (#2938),\n * through the table that is total over the behaviors (`INTROSPECTION_ANSWER_SCREENING`): a behavior that carries\n * none is served as it came, by a recorded decision. The subprocess holds no classifier, and the derivation cache\n * may hold its answer, so screening a served answer every time is what keeps a held derivation from ever holding a\n * screening.\n */\n const served = result.success && 'data' in result\n ? {\n ...result,\n data: await screenIntrospectionAnswer(behavior, result.data, {\n input,\n host: researchFamilyScreeningHostOf(this.contentSafety, this.logger, `introspection:${behavior}`),\n researchInformedFamilies: () => readCompanionResearchInformedFamilies(this.companionContext),\n }),\n }\n : result;\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'introspection-result.json',\n served,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-success',\n `Resolved companion introspection behavior ${behavior}`,\n {\n serviceKey,\n behavior,\n targetId: result.targetId,\n durationMs: result.durationMs,\n },\n traceStep,\n );\n this.jsonSuccess(res, served);\n } catch (e) {\n if (!mappedFailureAlreadyTraced) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-failure',\n 'Companion introspection request failed',\n {\n error: describeCaughtError(e),\n },\n traceStep,\n );\n }\n /*\n * The caller-input contract holds for a PARENT-side throw too, and it did not until now.\n *\n * `isValidationIntrospectionFailure` above reads a failure RESULT — the shape a subprocess\n * error comes back in, with its name carried across the boundary as a string. But resolution\n * runs in this process, BEFORE any subprocess: an unknown service key, an unknown behavior, a\n * behavior asked of the wrong service kind all throw here and reached `jsonError` unclassified,\n * so a perfectly actionable message (\"Unknown SaaS service key ... This application declares:\n * ...\") was sanitized to a bodyless 500 INTERNAL. The CLI's health hint is gated on a 4xx, so\n * it then fired on a companion that is demonstrably up and sent the reader to check a process\n * instead of their own argument — the exact failure #1459 fixed on the result path, arriving\n * through the door nobody had enumerated.\n *\n * Matched by NAME rather than `instanceof` for the same reason the name exists: it is the one\n * property that survives every boundary this error can cross.\n */\n if ((e as { name?: string })?.name === INTROSPECTION_INPUT_VALIDATION_ERROR_NAME) {\n this.jsonError(\n res,\n this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: (e as Error).message },\n },\n ) as any,\n next,\n );\n return;\n }\n this.jsonError(res, e as any, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // PROMPT (TODO)\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async buildPrompt(_req: Request, res: Response, _next: NextFunction) {\n try {\n this.jsonSuccess(res, { prompt: 'Not implemented yet', message: 'Prompt building service is not yet available' });\n } catch (e) {\n this.jsonError(res, e as any, _next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // MARKET (Market generation, Phase 4.2)\n // ─────────────────────────────────────────────────────────────────────────────\n\n /**\n * POST /api/companion/market/generate\n *\n * Body: `MarketGenerationRequest`\n * - `templateRef` (required) — `MarketMessageTemplate.ref`\n * - `icpRef`, `featureRef`, `benefitRef`, `channelRef`, `objectionRef` —\n * resolved against the snapshot; their inclusion must match the\n * template's `requiredInputs`.\n * - `outputLanguage` — defaults to \"English\" inside the renderer when\n * omitted; honored verbatim when provided.\n *\n * The handler is intentionally thin — `MarketGenerationCompanionService`\n * owns the introspection + LLM orchestration. We only do\n * minimal-shape validation here so the operator gets a clean\n * 400 instead of a confusing 500 when `templateRef` is missing.\n */\n /**\n * `GET /playbooks/coherence` — the questions no single family answers about itself.\n *\n * Returns both the structured findings and the rendered markdown: the first for a workbench, the\n * second because the intended reader is a human deciding whether to commit, and prose is what they\n * read. It REPORTS — a coverage gap is frequently a deliberate decision — so there is no verdict\n * field and nothing here refuses.\n */\n /**\n * `POST /research` — one read-only research turn.\n *\n * Deliberately NOT under `/playbooks`: research is a capability, and binding it to the playbook\n * lane before a playbook consumes it would make the first consumer's shape the contract. It is\n * reachable on its own so the lane can be exercised and measured before anything is choreographed\n * around it.\n */\n private async runResearchTask(req: Request, res: Response, next: NextFunction) {\n try {\n const objective = (req.body ?? {}).objective;\n if (typeof objective !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`objective` is required and must be a string.' },\n });\n }\n const evidenceScope = (req.body ?? {}).evidenceScope;\n const result = await this.researchAgentDispatchService.runResearchTask({\n objective,\n ...(typeof evidenceScope === 'string' && evidenceScope.length > 0 ? { evidenceScope } : {}),\n });\n // The whole result, including the permission decisions: a thin answer has two very different\n // causes — little was found, or a tool was refused — and the prose alone cannot tell them apart.\n res.json(result);\n } catch (error) {\n if (error instanceof ResearchAgentUnavailableError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * `GET /workspace/elements` — the application's own code truth, by resource (#1437).\n *\n * It could only be read WHOLE: `resources-registry` answers 43 KB, `resource-specifications`\n * 227 KB, and no filter on the pull door reached a module, a resource, a field, a relationship or\n * an operation. A build task targets ONE resource.\n *\n * The narrowing is HERE rather than in the derivation, and that is the design: the projection\n * behind it costs ~35 s and the introspection cache keys on a behavior's input, so a filter pushed\n * down would make every distinct question a fresh subprocess. One derivation, cached, sliced many\n * times — and two slices of one projection cannot disagree about an application being edited.\n *\n * Every answer carries its FRESHNESS, which is the third thing #1437 asks for and the one a\n * caller cannot reconstruct: the registry once reported 15 resources as a held derivation while\n * the specification set and the compiled dist both had 16.\n */\n private async readWorkspaceElements(req: Request, res: Response, next: NextFunction) {\n try {\n const operation = String(req.query.op ?? WorkspaceElementOperation.MAP);\n const serviceKey = typeof req.query.serviceKey === 'string' && req.query.serviceKey.length > 0\n ? req.query.serviceKey\n : this.companionIntrospectionService.describeCatalog().defaultBackendServiceKey;\n if (serviceKey === null) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'This application declares no backend service to introspect.' },\n });\n }\n const { index, freshness } = await readWorkspaceElements(this.companionIntrospectionService, serviceKey);\n const answeredWith = { freshness: describeWorkspaceFreshness(freshness), held: freshness.held, ageMs: freshness.ageMs };\n const readList = (value: unknown): string[] | undefined => {\n if (typeof value === 'string') return value.split(',').map((entry) => entry.trim()).filter((entry) => entry.length > 0);\n return Array.isArray(value) ? value.map(String) : undefined;\n };\n\n if (operation === WorkspaceElementOperation.MAP) {\n const kinds = readList(req.query.kinds) as WorkspaceElementKind[] | undefined;\n res.json({\n ...answeredWith,\n op: WorkspaceElementOperation.MAP,\n lines: mapWorkspaceElements(index, {\n ...(kinds ? { kinds } : {}),\n ...(readList(req.query.resources) ? { resourceTypes: readList(req.query.resources)! } : {}),\n }),\n });\n return;\n }\n\n const resourceType = typeof req.query.resource === 'string' ? req.query.resource : '';\n if (resourceType.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`resource\\` is required for op=${operation}. Ask op=map first for the refs this application has.` },\n });\n }\n\n if (operation === WorkspaceElementOperation.GET) {\n const resource = getWorkspaceResource(index, resourceType);\n if (resource === undefined) {\n // NOT an empty resource: \"does not exist\" and \"exists and holds nothing\" are different\n // answers, and a creation task depends on which one it got. The hint travels as GUIDANCE: a 404's\n // context is stripped before it leaves the companion (#1588).\n // In the words of the CLI verb that reaches this route, since that is the reader (#1588 review F5).\n const hint = `No resource \\`${resourceType}\\` is registered in this application. \\`wildo context workspace map\\` (op=map) lists the resources it has.`;\n throw this.errorBuilder.buildErrorWithGuidanceKey(ErrorType.NOT_FOUND, undefined,\n CompanionErrorGuidanceKey.WORKSPACE_RESOURCE_NOT_REGISTERED, { explanation: hint },\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { message: hint } });\n }\n res.json({ ...answeredWith, op: WorkspaceElementOperation.GET, resource });\n return;\n }\n\n if (operation === WorkspaceElementOperation.RELATED) {\n const hops = Number(req.query.hops ?? 1);\n res.json({\n ...answeredWith,\n op: WorkspaceElementOperation.RELATED,\n ...relatedWorkspaceResources(index, resourceType, { hops: Number.isFinite(hops) ? hops : 1 }),\n });\n return;\n }\n\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `Unknown op \\`${operation}\\`. One of: ${Object.values(WorkspaceElementOperation).join(', ')}.` },\n });\n } catch (error) {\n next(error);\n }\n }\n\n private async readCoherenceReport(_req: Request, res: Response, next: NextFunction) {\n try {\n const { report, markdown } = await this.playbookRunService.buildCoherenceReport();\n res.json({ ...report, markdown });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `POST /playbooks/loop` — chain playbooks unattended.\n *\n * `maximumIterations` is required and bounded: an unattended loop over a developer's source tree must\n * have a ceiling the CALLER chose, not one this handler picked on their behalf.\n */\n private async runPlaybookLoop(req: Request, res: Response, next: NextFunction) {\n // A loop is held for as long as it runs, often past the server's 30-minute inactivity limit (#3888).\n holdOpenWithoutInactivityTimeout(req, res);\n try {\n const body = req.body || {};\n const goal = typeof body.goal === 'string' && body.goal.trim().length > 0 ? body.goal.trim() : null;\n if (!goal) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`goal` is required and must be a non-empty string.' },\n });\n }\n const maximumIterations = Number(body.maximumIterations);\n if (!Number.isSafeInteger(maximumIterations) || maximumIterations < 1 || maximumIterations > 20) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`maximumIterations` is required and must be an integer between 1 and 20.' },\n });\n }\n const fanOut = body.fanOut === undefined ? undefined : Number(body.fanOut);\n if (fanOut !== undefined && (!Number.isSafeInteger(fanOut) || fanOut < 1 || fanOut > 5)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`fanOut` (lanes per iteration) must be an integer between 1 and 5 when provided.' },\n });\n }\n this.assertCreationLanePreflight(body);\n const result = await this.playbookRunService.runPlaybookLoop({\n goal,\n maximumIterations,\n ...(fanOut !== undefined ? { maximumLanesPerIteration: fanOut } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n });\n res.json(describePlaybookLoopResponse(result));\n } catch (error) {\n if (error instanceof PlaybookRunAlreadyInFlightError) {\n // 409: the caller is authorized and the payload is valid; the current STATE forbids a second run.\n // Caught on the BASE: a loop iteration can select a composite, so this route can be refused by\n // the choreography's single-flight guard as well as by the loop's own.\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * Read `elicitationAnswers` off an untrusted body without inventing anything.\n *\n * Shape only — whether the answers MATCH the playbook's declared questions is the runtime's contract to\n * enforce, and duplicating that check here would create a second description of the interview.\n */\n\n /**\n * The operator-facing sentence for a DISPATCH run.\n *\n * Extracted because the two call sites had drifted into two half-true copies, and a LIVE dry run\n * caught both: the note claimed \"Application CODE was written in the workspace\" on a run that\n * wrote nothing, and said \"to the coding agent\" for a task whose targetKind was\n * COMPANION_GENERATION_STEP -- which the COMPANION executes, not a coding agent. The dispatch\n * service routes by the task's own target kind and serves BOTH executors, so the message must read\n * it rather than assume one.\n *\n * No unit test caught either: they assert the service RESULT, and this is the controller's prose.\n */\n /**\n * What a `top_down.expert-personas` run did (#572), as a sentence — derived/waiting/refused counts and where\n * the charters went. Since #2419 a run that landed a charter records its writes like any landing and returns its\n * `runId`, so the sentence names the console verbs that review, accept and undo it; a run that landed nothing has\n * no record and names none.\n */\n private describeStaffingOutcome(result: {\n readonly dryRun?: true;\n readonly runId?: string;\n readonly roster: readonly unknown[];\n readonly alreadyCommitted: readonly string[];\n readonly rederived?: ReadonlyArray<{ readonly roleRef: string; readonly changedInputs: readonly string[] }>;\n readonly driftedEdited?: ReadonlyArray<{ readonly roleRef: string; readonly changedInputs: readonly string[] }>;\n readonly derived: ReadonlyArray<{ readonly roleRef: string }>;\n readonly waiting: ReadonlyArray<{ readonly roleRef: string; readonly missingFamilies: readonly string[] }>;\n readonly refused: ReadonlyArray<{ readonly roleRef: string; readonly reason: string }>;\n }): string {\n if (result.dryRun === true) {\n return `Dry run: the roster of ${result.roster.length} convened role(s) was computed and NOTHING was derived or written.`;\n }\n const parts = [\n `${result.derived.length} charter(s) derived and accepted into specifications/src/personas/ (${result.derived.map((entry) => entry.roleRef).join(', ') || 'none'})`,\n `${result.alreadyCommitted.length} already committed and left alone`,\n ];\n const drift = (entries: NonNullable<typeof result.rederived>): string =>\n entries.map((entry) => `${entry.roleRef}: ${entry.changedInputs.join('+')}`).join('; ');\n if (result.rederived !== undefined && result.rederived.length > 0) {\n parts.push(`${result.rederived.length} derived again because an input changed after its charter (${drift(result.rederived)})`);\n }\n if (result.driftedEdited !== undefined && result.driftedEdited.length > 0) {\n parts.push(`${result.driftedEdited.length} hand-edited and older than an input, left alone for you to update (${drift(result.driftedEdited)})`);\n }\n if (result.waiting.length > 0) {\n parts.push(`${result.waiting.length} waiting on families not yet landed (${result.waiting.map((entry) => `${entry.roleRef}: ${entry.missingFamilies.join('+')}`).join('; ')}) — re-run once they land`);\n }\n if (result.refused.length > 0) {\n parts.push(`${result.refused.length} refused (${result.refused.map((entry) => `${entry.roleRef}: ${entry.reason}`).join('; ')})`);\n }\n const handle = result.runId === undefined\n ? (result.derived.length === 0\n ? 'Nothing was written, so there is nothing to accept.'\n : 'Its write record could not be kept: review `git status` and commit the charters by hand.')\n : `Review them with \\`wildo creation diff ${result.runId}\\`, then accept with \\`wildo creation accept ${result.runId}\\` or undo with \\`wildo creation revert ${result.runId}\\`.`;\n return `Staffed the expert panels: ${parts.join('; ')}. ${handle}`;\n }\n\n private describeDispatchOutcome(result: {\n readonly taskRef: string;\n readonly targetKind: string;\n readonly remainingReadyTaskRefs: readonly string[];\n readonly dryRun?: true;\n } | { readonly wave: ApplicationBuildWaveResult }): string {\n if ('wave' in result) {\n // A parallel wave (#1528): what ran, how it settled, and what the end-of-wave repair committed.\n const { wave } = result;\n const settled = wave.outcomes.filter((outcome) => outcome !== null);\n const completed = settled.filter((outcome) => outcome!.status === FlowsActors_Status.COMPLETED).length;\n const reconciled = wave.reconciliation.filter((entry) => entry.committedPaths > 0).length;\n // A completed run whose product a sibling overwrote, and whether the wave re-ran its task alone (#2210).\n // Three endings, kept apart: re-run, could not be re-armed or re-run (an error), and the bound already spent.\n const rerun = wave.interferenceRepairs.filter((repair) => repair.rerun !== undefined && repair.rerun.error === undefined).map((repair) => repair.taskRef);\n const failed = wave.interferenceRepairs.filter((repair) => repair.rerun?.error !== undefined).map((repair) => `${repair.taskRef} (${repair.rerun!.error})`);\n const spent = wave.interferenceRepairs.filter((repair) => repair.rerun === undefined).map((repair) => repair.taskRef);\n const repaired = wave.interferenceRepairs.length === 0 ? ''\n : ` ${wave.interferenceRepairs.length} completed run(s) lost their product to a sibling (suspected)`\n + (rerun.length > 0 ? `; re-run alone: ${rerun.join(', ')}` : '')\n + (failed.length > 0 ? `; could not be re-run, waiting for a person: ${failed.join(', ')}` : '')\n + (spent.length > 0 ? `; interference re-runs spent, waiting for a person: ${spent.join(', ')}` : '')\n + '.';\n // #2222: a wave that finished the plan says whether the application assembles — never just \"every task landed\".\n const assembly = wave.assembly === undefined ? ''\n : wave.assembly.specificationFault !== undefined\n ? ` Nothing can run and the plan is not finished: specifications module ${wave.assembly.specificationFault.failingModules.map((modulePath) => `\"${modulePath}\"`).join(', ')} could not be evaluated.`\n : wave.assembly.passed ? ` Every task has landed and the application assembles (${wave.assembly.checkRefs.length} check(s) passed).`\n : wave.assembly.failed.length > 0\n ? ` Every task has landed, but the application does NOT assemble: ${wave.assembly.failed.map((entry) => entry.checkRef).join(', ')} failed.`\n : ` Every task has landed; whether the application assembles could not be checked: ${wave.assembly.couldNotRun}.`;\n // #2405: a wave that stopped because the backend does not start says so first, with the refusal and the candidates.\n /*\n * Each failure's own remedy (#3214, #3217): a startup the application's code refused names the task repair and the\n * runs this wave landed; a dev-stack cause (a held port, an orphan or stale backend, a backend nothing restarted,\n * unreachable infrastructure) names the stack's repair and no candidate task, since no task broke it.\n */\n const notBooting = (wave.bootFailures ?? []).map((failure) => ` THE BACKEND DOES NOT START (${failure.serviceIdentifier}): `\n + `${failure.message ?? 'no reason recorded'}`\n + (!isApplicationStartupFailure(failure) ? ''\n : failure.landedThisWave.length > 0 ? ` Landed in this wave before it stopped: ${failure.landedThisWave.join(', ')}.` : ' It was already failing when the wave began.')\n + ` Nothing more is dispatched until it starts. ${failure.remedy}`).join('');\n // #2388: a wave held by the coding agent's usage limit says when the build resumes, and that it resumes on its own.\n const usageLimited = wave.usageLimit === undefined ? ''\n // #3204: a refused provider ACCOUNT is no limit that resets; a person adds credits or raises it.\n : wave.usageLimit.accountRefusal !== undefined\n ? ` The coding agent's provider account refused its turn (met by ${wave.usageLimit.taskRef}): ${describeModelProviderAccountRefusal(wave.usageLimit.accountRefusal)} `\n + `No build task runs until it answers again; the companion asks again at ${wave.usageLimit.resumesAt}. Refused runs count against no attempt budget.`\n : ` The coding agent's account hit its usage limit (met by ${wave.usageLimit.taskRef}): no build task runs before ${wave.usageLimit.resumesAt}, `\n + 'and the companion submits the next build wave on its own then. Runs refused by the limit count against no attempt budget.';\n return `${notBooting}Ran a parallel build wave at degree ${wave.degree}: ${wave.dispatched.length} task(s) dispatched, `\n + `${completed} of ${settled.length} coding run(s) completed, ${reconciled} reconciled at the end of the wave.${repaired} `\n + `It stopped taking tasks because: ${wave.stoppedFillingBecause}.${usageLimited}${assembly} Each run's row carries \\`concurrency\\`, \\`interferenceSuspected\\` and \\`interference\\`.`;\n }\n const executor = result.targetKind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n ? \"the companion's own generation pipeline\"\n : 'the coding agent';\n const remainder = `${result.remainingReadyTaskRefs.length} further task(s) were ready and were NOT run: dispatch is single-flight, one task per run.`;\n if (result.dryRun === true) {\n return `Dry run: the next ready build task is \\`${result.taskRef}\\`, which would run on ${executor}. NOTHING was dispatched and nothing was written. ${remainder}`;\n }\n return `Dispatched build task \\`${result.taskRef}\\` to ${executor}. Work landed in the application WORKSPACE -- not the specifications package -- so review \\`git status\\` there and commit to accept it. ${remainder}`;\n }\n\n private readElicitationAnswers(value: unknown): readonly PlaybookElicitationAnswer[] | undefined {\n if (value === undefined || value === null) return undefined;\n if (!Array.isArray(value)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`elicitationAnswers` must be an array of { questionRef, answer }.' },\n });\n }\n return value.map((entry: unknown, index: number) => {\n const shaped = entry as { questionRef?: unknown; answer?: unknown } | null;\n if (typeof shaped?.questionRef !== 'string' || typeof shaped.answer !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `elicitationAnswers[${index}] must be { questionRef: string, answer: string }.` },\n });\n }\n return { questionRef: shaped.questionRef, answer: shaped.answer };\n });\n }\n\n /**\n * The held answers of the status reads (#3207, #3208). Built lazily: routes are registered from the base\n * class constructor, before this class's field initializers run.\n */\n private readVerbSnapshotsHolder: ReadVerbSnapshots | undefined;\n\n /**\n * Serve a status read from its latest answer when a derivation of it is still running, marked with its\n * age in `readFreshness` (see {@link ReadVerbSnapshots}).\n *\n * The handler runs unchanged against a stand-in for the response that records what it would have sent,\n * so the handlers keep their own logic and only the serving moves. Only a 2xx answer is held; any other\n * response is replayed to the readers that waited on it and is not served to later ones. A derivation\n * joined by several readers runs once, with the first reader's request.\n */\n private serveFromLatestAnswer(\n key: ReadVerbSnapshotKey,\n handler: (req: Request, res: Response, next: NextFunction) => Promise<void>,\n ): (req: Request, res: Response, next: NextFunction) => Promise<void> {\n return async (req, res, next) => {\n this.readVerbSnapshotsHolder ??= new ReadVerbSnapshots();\n try {\n const outcome = await this.readVerbSnapshotsHolder.read(key, () => captureHandlerResponse(handler, req, res));\n if (outcome.kind === 'in-progress') {\n res.setHeader('Retry-After', String(outcome.retryAfterSeconds));\n res.status(503).json({\n error: {\n type: ReadVerbRefusalType.DERIVATION_IN_PROGRESS,\n details: {\n message: `The companion is still deriving this answer (started ${outcome.since}) and has no earlier one to show yet. `\n + `Ask again in ${outcome.retryAfterSeconds} s.`,\n },\n },\n derivationInProgress: { since: outcome.since, retryAfterSeconds: outcome.retryAfterSeconds },\n });\n return;\n }\n const { body } = outcome.value;\n res.status(outcome.value.status).json(\n body !== null && typeof body === 'object' && !Array.isArray(body) ? { ...body, readFreshness: outcome.freshness } : body,\n );\n } catch (error) {\n if (error instanceof UnheldHandlerResponse) {\n res.status(error.status).json(error.body);\n return;\n }\n next(error);\n }\n };\n }\n\n /**\n * `GET /build/next` — what the next coding run would be.\n *\n * A read, deliberately separate from the action rather than a flag on it. Seeing the scope before\n * starting a run is genuinely useful; making the run itself demand a second \"yes\" is a ceremony that\n * enforces nothing the mutation scope, the lock and the change-set capture do not already enforce.\n */\n private async describeNextBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n /*\n * SPREAD, so `plan` stays exactly where every existing reader already looks. There are THREE\n * answers, all 200: a `plan`; `plan: null` with `exhausted` (every task landed); and `plan: null`\n * with `stuckQueue` and a non-empty `stuckTasks` (every ready task is stuck, #1451 — this was a\n * 400 before). So `plan: null` alone does NOT mean finished; read `exhausted`. `stuckTasks` is\n * present beside a plan too, naming what the selection passed over.\n */\n const description = await this.buildDispatchService.describeNextBuildTaskOrExhaustion();\n res.json({ ...description, dispatched: false });\n } catch (error) {\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `GET /build/dispatches` — how far each recent dispatch got (`Workbench_BuildDispatchPhase`).\n *\n * EVERY dispatch, since #1274: the workbench fires through the `dispatch_next` resource operation\n * rather than through this route's `async` door, and the record used to be kept only by the latter.\n *\n * Not an outcome for a coding task: that dispatch settles at ADMITTED, and the run's result is the durable\n * actor-task row the record names (`codingTaskId`).\n */\n private async readBuildDispatches(_req: Request, res: Response, next: NextFunction) {\n try {\n // Read from the actor plane since #1359, so the narrative survives a companion restart. The running wave's\n // preparation rides beside it (#3206): \"selected X, preparing dispatch since T (step)\" is the gap the rows cannot show.\n res.json({\n dispatches: await this.buildDispatchService.readDetachedDispatches(this.getTraceSession(res)),\n ...this.buildDispatchService.readBuildDispatchPreparation(),\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `POST /build/stop` — `wildo build stop` (#3206): the running wave starts no new task and ends once its live runs\n * settle; nothing is cancelled. Answers `{ stopping: false }` when no wave runs here, which is a true answer, not an error.\n * The stop is a HOLD, set whether or not a wave runs: until a person's door ADMITS a start — `wildo build run`,\n * `wildo build run <taskRef>` or the workbench's dispatch-next, an authenticated console or workbench caller — every\n * other start is refused 409: the build lane's selector, the loop, the usage-limit resume, and the workbench's per-task\n * dispatch (it also fires on its own). A person's start that is itself refused leaves the hold. The hold lives in this\n * process and does not survive a companion restart, which ends any wave anyway.\n */\n private async stopBuildWave(_req: Request, res: Response, next: NextFunction) {\n try {\n res.json(this.buildDispatchService.requestBuildWaveStop());\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /build/tasks` — every build-plan task in ONE read (#1521): its attempts newest first, the typed\n * reason dispatch passes over it, and for a task that ran without landing, exactly what each unmet\n * probe searched for and whether the working tree holds it. Composed from rows that already exist and\n * stored nowhere. `{ records: null }` when the application has no build plan — absence, not an empty\n * build.\n */\n private async readBuildTaskRecords(_req: Request, res: Response, next: NextFunction) {\n try {\n /*\n * The specifications the companion refused to serve sit beside the records (#3210): a refused resource spec is\n * absent from every board, and the task list is where a builder looks first. So do the modules it could not\n * evaluate (#3258): each serves nothing until fixed.\n */\n const { faults: specificationFaults, moduleFaults: specificationModuleFaults } = await readSpecificationsEvaluationFindings(this.companionContext);\n /*\n * Files the tasks' runs left uncommitted that no automatic door will commit (#3267; a stuck task's declared product aside, #3204), with the door for each. Best\n * effort: a read that fails costs this list, never the task records, and says so.\n */\n const leftovers = await Promise.resolve().then(() => this.acceptedChangeCommitService.listUncommittedRunLeftovers()).catch((error: unknown) => {\n this.logger.warn('Could not list the files build-task runs left uncommitted; the task list names none', { error: describeCaughtError(error) });\n return [];\n });\n /* A plan a failed module holds is not \"no plan\": the list says why it cannot be read, beside the fault naming the module. */\n const held = await this.buildDispatchService.describeBuildTaskRecords(this.getTraceSession(res)).then(\n (records) => ({ records: records ?? null }),\n (error: unknown) => {\n if (!isBuildPlanHeldByFailedModule(error)) throw error;\n return { records: null, buildPlanUnavailable: error.message };\n },\n );\n res.json({ ...held, specificationFaults, specificationModuleFaults, leftovers });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `POST /build/tasks/:taskRef/rearm` — the door the \"completed but not landed\" guard was missing\n * (#1535). Records a re-arm on every completed run that still holds the task, so the next dispatch\n * offers it again. Refuses with 409, naming why, when there is nothing to re-arm.\n */\n private async rearmBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n const parsed = CompanionRearmBuildTaskRequestSchema.safeParse(req.body ?? {});\n if (!parsed.success) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: {\n message: 'This is not a re-arm request: '\n + parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; '),\n },\n }));\n return;\n }\n const taskRef = String(req.params.taskRef);\n res.json(await this.buildDispatchService.rearmBuildTask(taskRef, parsed.data, this.getTraceSession(res)));\n } catch (error) {\n if (error instanceof NothingToRearmError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `POST /build/tasks/:taskRef/close` (#3224, #3225, #3227) — record that a task is done another way, or decline a\n * derived follow-up, as a committed decision record. Refuses with 409, naming why, when the closure does not hold.\n */\n private async closeBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n const parsed = CompanionCloseBuildTaskRequestSchema.safeParse(req.body ?? {});\n if (!parsed.success) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'This is not a close request: ' + parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; ') },\n }));\n return;\n }\n res.json(await this.buildDispatchService.closeBuildTask(String(req.params.taskRef), parsed.data, DecisionRecordActor.CREATOR));\n } catch (error) {\n if (error instanceof BuildTaskDecisionRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `POST /build/tasks/:taskRef/settle-window` (#3224 review F2) — a person bounds the open window of the task's settled runs\n * that recorded no HEAD, at the current HEAD. Refuses with 409, naming why, while runs are live or parked, or when there is\n * nothing to bound.\n */\n private async settleBuildTaskRunWindows(req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.buildDispatchService.settleRunWindows(String(req.params.taskRef)));\n } catch (error) {\n if (error instanceof BuildTaskDecisionRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `POST /build/tasks/:taskRef/approve` (#3227) — the creator lets a derived follow-up run, under a posture where follow-ups\n * wait for review. Committed as a decision record; refuses with 409, naming why, when there is nothing to approve. A\n * person's door: it starts nothing, so the next wave (or `wildo build run`) runs the follow-up, and a stop hold stays.\n */\n private async approveFollowUpTask(req: Request, res: Response, next: NextFunction) {\n try {\n const parsed = CompanionApproveFollowUpTaskRequestSchema.safeParse(req.body ?? {});\n if (!parsed.success) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'This is not an approve request: ' + parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; ') },\n }));\n return;\n }\n res.json(await this.buildDispatchService.approveFollowUpTask(String(req.params.taskRef), parsed.data, DecisionRecordActor.CREATOR));\n } catch (error) {\n if (error instanceof BuildTaskDecisionRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `POST /build/dispatch-next` — run the build: a parallel wave, or the next ready task alone.\n *\n * DETACHED (`async: true`, the console's `wildo build run`): with a build parallelism above one it\n * starts a WAVE (#2208) — up to that many coding runs at once in the one worktree, refilled as each\n * settles, reconciled and repaired at the end (`dispatchBuildWave`). `single: true`, or a degree of\n * one, runs the next ready task alone. SYNCHRONOUS (no `async`): always the next task alone.\n *\n * Each run is bounded by its task's own `target.kind`, its change-set is captured around it, and the\n * required checks gate the result. Under the autonomy posture a working result is then committed by\n * the loop, authored as the companion; under GUIDED nothing is accepted until a person commits (#1534).\n */\n private async dispatchNextBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n // Before the wave or the single task: the build reaches the logo step and the coding agents (#2229).\n this.assertCreationLanePreflight(body);\n /*\n * A person's door (#3206): `wildo build run` may start while a `wildo build stop` holds the build, and ends the hold\n * once its start is ADMITTED — a refused start (a wave still draining, nothing ready) leaves the stop in force.\n */\n const personDoor = BuildStopReleaseDoor.BUILD_RUN;\n // DETACHED mode: a generation step can outlive any reasonable HTTP ceiling (an i18n run\n // measured 40+ minutes against the 30-minute server cap, 2026-09-04), and a response that\n // dies with the socket leaves the operator blind. 202 + the selected plan now. A generation step's\n // outcome is readable at GET /build/dispatches; a coding task settles there at ADMITTED, and its\n // outcome is the durable actor-task row the record names.\n if (body.async === true) {\n /*\n * A PARALLEL BUILD by default (#2208): with a build parallelism above one, the next ready task is\n * not run alone — a wave is started that keeps that many coding runs going until nothing more is\n * ready. Before this, `wildo build run` dispatched one task while the lane's normal mode is five,\n * and an agent following the console built a whole plan one task at a time. `single: true` keeps\n * the one-task dispatch; a degree of one gets it anyway.\n */\n if (body.single !== true) {\n const wave = await this.playbookRunService.submitBuildWaveDetached(this.getTraceSession(res), personDoor);\n if (wave !== undefined) {\n res.status(202).json({\n dispatched: true,\n async: true,\n wave,\n note: `Running a build wave of up to ${wave.degree} tasks at once (run ${wave.runId}). \\`wildo creation feed --follow\\` reports each run and the wave's end; `\n + '`wildo build tasks` shows where every task stands. Set the width with `wildo workbench parallelism <n>`.',\n });\n return;\n }\n }\n const plan = await this.buildDispatchService.submitBuildDispatchDetached(this.getTraceSession(res), undefined, personDoor);\n res.status(202).json({ plan, dispatched: true, async: true, note: 'Running detached. `wildo build dispatches` shows how far it got: a companion generation step reaches FINISHED there; a coding task reaches ADMITTED, and `wildo creation feed --follow` reports how it settles.' });\n return;\n }\n const result = await this.buildDispatchService.dispatchNextBuildTask(\n this.getTraceSession(res),\n personDoor,\n );\n res.json({\n plan: result.plan,\n dispatched: true,\n ...(result.admission ? { admission: result.admission } : {}),\n ...(result.generationStep ? { generationStep: result.generationStep } : {}),\n note: result.generationStep\n ? 'The companion ran this generation step itself. Review `git status` and commit what you accept.'\n : 'A coding agent is running. Its change-set is captured; review `git status` and commit what you accept.',\n });\n } catch (error) {\n /*\n * The wave is a playbook run (#2208), so opening it can refuse the way a playbook run's open does:\n * another run holding the subject (409, the message names it), never a sanitized 500. Readiness is\n * not checked at submission — the detached run checks it and the feed reports it. A wave refused\n * because another runs is a build refusal, answered by `forwardBuildDispatchError` for every build door.\n */\n if (error instanceof PlaybookRunAlreadyInFlightError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /** `POST /playbooks/:playbookRef/judge` — judges SUPPLIED artifacts against a playbook's evaluation treatment; nothing lands. */\n private async judgePlaybookArtifacts(req: Request, res: Response, next: NextFunction) {\n try {\n const { playbookRef } = req.params;\n const body = req.body || {};\n if (!playbookRef || typeof playbookRef !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`playbookRef` path parameter is required.' },\n });\n }\n if (!Array.isArray(body.artifacts) || body.artifacts.length === 0\n || body.artifacts.some((entry: unknown) => typeof (entry as { family?: unknown })?.family !== 'string')) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`artifacts` must be a non-empty array of { family, value }.' },\n });\n }\n const creatorBrief = typeof body.creatorBrief === 'string' ? (body.creatorBrief as string) : undefined;\n const elicitationAnswers = this.readElicitationAnswers(body.elicitationAnswers);\n const result = await this.playbookRunService.judgeArtifacts({\n playbookRef,\n artifacts: body.artifacts,\n ...(creatorBrief ? { creatorBrief } : {}),\n ...(elicitationAnswers ? { elicitationAnswers } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n });\n res.json(result);\n } catch (error) {\n if (error instanceof UnknownPlaybookError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * `GET /runs/writes` — the write register, newest first. Pre-images stay in the records; the listing is a summary.\n *\n * A FAILED landing (#3265) is marked as one and carries the two doors it waits on, so `wildo creation writes` never lists\n * a half-applied composition like a completed landing. A binary file (#3264) says so: its record holds a hash, not text.\n */\n private async listRunWrites(_req: Request, res: Response, next: NextFunction) {\n try {\n const records = await this.runWriteRegister.list();\n res.json({\n runs: records.map((record) => ({\n runId: record.runId,\n playbookRef: record.playbookRef,\n at: record.at,\n files: record.files.map((file) => ({ path: file.path, existedBefore: file.existedBefore, ...(isBinaryWrittenFile(file) ? { binary: true } : {}) })),\n ...(record.acceptedCommitSha !== undefined ? { acceptedCommitSha: record.acceptedCommitSha } : {}),\n // The doors only while nobody settled it: an accepted failed landing is history, still marked failed (#3265 review).\n ...(record.landingFailed === true\n ? { landingFailed: true, ...(record.acceptedCommitSha === undefined ? { remedies: describeFailedLandingRemedies(record.runId) } : {}) }\n : {}),\n })),\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /runs/writes/:runId/diff` — what one run changed, per file (#1274).\n *\n * A pure read — nothing is locked, written or reverted. The workbench does not call it: it reads the\n * same diff through the `read_diff` operation on the run-write-records resource, on the engine's\n * authenticated `/api/v1` plane. This route serves the token-holding callers.\n *\n * It sits beside the revert door on purpose. A run that can be UNDONE must also be SHOWN: acceptance\n * is your own git commit, and a commit decision with nothing to inspect is not one.\n */\n private async readRunWritesDiff(req: Request, res: Response, next: NextFunction) {\n try {\n const runId = req.params.runId;\n if (!runId || typeof runId !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runId` path parameter is required.' },\n });\n }\n this.jsonSuccess(res, await this.runWriteRegister.describeRunDiff(runId));\n } catch (error) {\n /*\n * An unknown run is the caller's mistake and must say so. Passed through raw, it answered a\n * sanitized 500 with an empty body — what `wildo creation diff <typo>` then printed (#1652).\n * The shared translator is what revert and accept already answer with.\n */\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n }\n }\n\n /**\n * `POST /runs/writes/:runId/revert` — restore one run's pre-images. Refuses human-edited files unless\n * `force`, and ALWAYS refuses a file a later run landed on (#1614): revert the newest run first.\n */\n private async revertRunWrites(req: Request, res: Response, next: NextFunction) {\n try {\n const runId = req.params.runId;\n if (!runId || typeof runId !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runId` path parameter is required.' },\n });\n }\n const force = (req.body || {}).force === true;\n const outcome = await this.runWriteRegister.revert(runId, { force });\n res.json({\n ...outcome,\n note: outcome.refusedLaterRun.length > 0\n // #1614: never forced, because it would destroy another run's work nobody asked to undo.\n ? `Some files hold a later run's landing and were NOT reverted, even with force: revert ${[...new Set(outcome.refusedLaterRun.map((entry) => entry.runId))].join(', ')} first.`\n : outcome.refusedWithoutPreImage.length > 0\n // #3264: a binary file that replaced an uncommitted one has no stored pre-image; force cannot give it back.\n ? `Some binary files were NOT reverted, even with force: the run replaced versions that were never committed, and only their hashes are recorded (${outcome.refusedWithoutPreImage.join(', ')}). Restore them from where they came from.`\n : outcome.refusedDiverged.length > 0\n ? 'Some files were edited after the run and were NOT reverted; pass force:true to revert them anyway.'\n : 'All of this run\\'s writes were reverted.',\n });\n } catch (error) {\n if (error instanceof PlaybookRunWriteRecordNotFoundError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * The creation preflight at a door that STARTS a run (#2229): refuse, as a 409, a run the lane's provider calls\n * would be refused in — asked of this companion's own registry, before a brief is composed or a model called.\n * `skipPreflight: true` is the caller's explicit way past it; the step that lacks its provider is refused anyway.\n */\n private assertCreationLanePreflight(body: { readonly skipPreflight?: unknown }): void {\n try {\n assertCreationLanePreflight(this.externalProvidersRegistry, { skip: body.skipPreflight === true });\n } catch (error) {\n if (!(error instanceof CreationLanePreflightRefusedError)) throw error;\n // 409: the caller is authorized and the request is valid; the companion's configuration forbids the run.\n throw this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n });\n }\n }\n\n /**\n * A missing or exhausted build plan is a bad request, not a broken host.\n *\n * Shared by the two BUILD routes and by the playbook run route, which reaches the same dispatch\n * through a playbook declaring `executor: CODING_AGENT` (#119). Falls through to `next(error)` for\n * anything else, so it is safe to call as the last arm of a catch.\n */\n private forwardBuildDispatchError(error: unknown, next: NextFunction): void {\n /*\n * A second wave while one runs (#2208 review M1): a CONFLICT, not a bad request — what was sent is valid,\n * the companion's state forbids it now, and the message says to wait for the running wave. Reached from\n * `wildo build run` and from a build-execution playbook run alike.\n */\n if (error instanceof ApplicationBuildWaveInFlightError || error instanceof ApplicationDoesNotBootError\n // A person's stop holds the build (#3206): refused until a person runs `wildo build run`.\n || error instanceof ApplicationBuildStoppedByPersonError\n // A generation step refused at its gate: the selection passes it over, so this is a module that failed after that read (#3258).\n || error instanceof SpecificationWriteRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n if (error instanceof ApplicationBuildPlanUnavailableError\n || error instanceof ApplicationBuildPlanExhaustedError\n || error instanceof ApplicationBuildTaskNotACodingTaskError\n /*\n * The one that carries the AGENT'S QUESTION. Absent from this list, every ready task being\n * parked answered a sanitized 500 \"internal\" — the operator was told nothing, about a state\n * whose entire remedy is reading what was asked and answering it.\n */\n || error instanceof ApplicationBuildTaskCompletedButUnlandedError\n || error instanceof ApplicationBuildUnknownGenerationStepError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n /*\n * The DOCUMENTATION_PUBLICATION generation step publishes the reference, and a synchronous dispatch (a playbook run\n * at a build parallelism of 1 included; a wave records it on the step's execution row) rethrows its refusal unchanged: a category refusal (#1891) or an untrue authored example (#1838). Both are the application's\n * own declarations, answered exactly as every documentation route answers them, through the one predicate every\n * door shares (#3462). Before that this door knew only the category refusal, and an untrue example reached\n * `wildo build run` as a bare 500 with the list only in the companion's log.\n */\n const documentationRefusal = this.documentationLaneRefusal(error);\n if (documentationRefusal !== undefined) {\n next(documentationRefusal);\n return;\n }\n next(error);\n }\n\n /**\n * `POST /build/tasks/:taskRef/dispatch` — run ONE named build-plan task, the console's\n * `wildo build run <taskRef>`. DETACHED, like `POST /build/dispatch-next`: a coding run takes minutes,\n * and a console that held a socket over it would report nothing while it ran and a failure if the\n * socket broke. It answers 202 with the selected plan; the feed and `wildo build dispatches` say how\n * it went. Readiness is the service's to refuse — a task that is not ready is refused BEFORE the 202 —\n * and its refusals are translated as the workbench's `dispatch_task` operation translates them.\n *\n * One answer is NOT immediate (#2222): when the plan has run out of tasks, the refusal says whether the\n * application assembles, so every package's typecheck runs before it answers — minutes, inside the console's\n * write deadline. That is the moment \"the build is finished\" is claimed, so it is where the claim is checked.\n */\n private async dispatchNamedBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n const parsed = CompanionDispatchNamedBuildTaskRequestSchema.safeParse(req.body ?? {});\n if (!parsed.success) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: {\n message: 'This is not a build-task dispatch request: '\n + parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; '),\n },\n }));\n return;\n }\n this.assertCreationLanePreflight(parsed.data);\n // A person's door (#3206): naming a task ends a `wildo build stop` hold too, once the task's start is admitted.\n const plan = await this.buildDispatchService.submitBuildDispatchDetached(this.getTraceSession(res), {\n taskRef: String(req.params.taskRef),\n ...(parsed.data.despiteLanded ? { despiteLanded: parsed.data.despiteLanded } : {}),\n }, BuildStopReleaseDoor.BUILD_RUN_NAMED_TASK);\n res.status(202).json({ plan, dispatched: true, async: true });\n } catch (error) {\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n } finally {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n }\n\n /**\n * `POST /build/tasks/:taskRef/accept` — commit the latest coding run's writes for a task\n * (`wildo build accept`). The subject line is the task's own objective, read from the build plan,\n * exactly as the workbench's `accept` operation composes it.\n */\n private async acceptBuildTaskRun(req: Request, res: Response, next: NextFunction) {\n try {\n const taskRef = String(req.params.taskRef);\n const task = (await this.creationPlaneProjection.deriveRows(WorkbenchCreationPlaneBehavior.BUILD_PLAN_TASKS))\n .find((row) => row.taskRef === taskRef);\n const objective = typeof task?.objective === 'string' ? task.objective : undefined;\n // What earlier runs left that no automatic door will commit (#3267; a stuck task's declared product aside, #3204), instead of the latest run's writes.\n if ((req.body ?? {}).leftovers === true) {\n res.json(await this.acceptedChangeCommitService.acceptCodingRunLeftovers({ taskRef, ...((req.body ?? {}).force === true ? { force: true } : {}) }));\n return;\n }\n res.json(await this.acceptedChangeCommitService.acceptCodingRun({\n taskRef,\n ...(objective ? { subject: objective } : {}),\n ...((req.body ?? {}).force === true ? { force: true } : {}),\n }));\n } catch (error) {\n // Translated exactly as the workbench's `accept` operations translate it, so a refusal reads the same through both doors.\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n } finally {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n }\n\n /**\n * `POST /build/checkpoint` (#1885) — a PERSON's build checkpoint (`wildo build checkpoint`): the shared working tree\n * committed as it stands, naming every coding run settled since the last commit that named one, through the same\n * `commitBuildCheckpoint` the automatic lane uses, with the OPERATOR origin. The door under a reviewing posture, where\n * no automatic checkpoint is made and each other door names one task's runs. Refused (409) while a run writes; with no\n * settled run left to name, nothing is committed and the answer says so.\n */\n private async commitOperatorBuildCheckpoint(_req: Request, res: Response, next: NextFunction) {\n try {\n const outcome = await this.acceptedChangeCommitService.commitBuildCheckpoint({ origin: AcceptOrigin.OPERATOR, liveTaskIds: new Set() });\n res.json(outcome ?? { committed: false, reason: 'No settled coding run is waiting to be committed: every run is already named by a commit.' });\n } catch (error) {\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n } finally {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n }\n\n /** `POST /runs/writes/:runId/accept` — commit what one playbook run wrote (`wildo creation accept`). */\n private async acceptPlaybookRunWrites(req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.acceptedChangeCommitService.acceptPlaybookRun({\n runId: String(req.params.runId),\n ...((req.body ?? {}).force === true ? { force: true } : {}),\n }));\n } catch (error) {\n // Translated exactly as the workbench's `accept` operations translate it, so a refusal reads the same through both doors.\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n } finally {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n }\n\n /**\n * `POST /creation/dossier/accept` — commit the creator's recorded answers on their own (`wildo creation accept\n * --dossier`, #2332). A run's accept already carries the dossier it reads; this is for answers no accepted run has\n * read yet.\n */\n private async acceptDossier(_req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.acceptedChangeCommitService.acceptDossier());\n } catch (error) {\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n } finally {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n }\n\n /** `GET /traces` — recent execution sessions, newest first. */\n private async listExecutionTraces(req: Request, res: Response, next: NextFunction) {\n try {\n const limit = Number(req.query.limit);\n const sessions = await this.executionTraceReadService.listSessions(\n Number.isSafeInteger(limit) && limit > 0 && limit <= 200 ? limit : undefined,\n );\n res.json({ sessions });\n } catch (error) { next(error); }\n }\n\n /**\n * `GET /traces/:sessionId` — one run, in order.\n *\n * Events carry what happened and why; artifacts are LISTED rather than inlined, because one model answer\n * can be tens of kilobytes and a session can hold several. Fetch a body when you want it.\n */\n private async readExecutionTrace(req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.executionTraceReadService.readSession(String(req.params.sessionId)));\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /**\n * `GET /traces/:sessionId/usage` — what one session spent, in tokens (#1274).\n *\n * Derived, not stored: the agent-call trace sink already writes each call's usage into this\n * session's events, so nothing new is recorded to answer this. Tokens only — a currency figure\n * would need a per-model rate card this repository does not have, and a fabricated number where an\n * operator expects a measured one is the failure this board exists to avoid.\n */\n private async readExecutionTraceUsage(req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.executionTraceReadService.summarizeSessionUsage(String(req.params.sessionId)));\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /** `GET /traces/:sessionId/steps/:stepDirName/artifacts/:fileName` — one artifact body, verbatim. */\n private async readExecutionTraceArtifact(req: Request, res: Response, next: NextFunction) {\n try {\n const body = await this.executionTraceReadService.readArtifact(\n String(req.params.sessionId), String(req.params.stepDirName), String(req.params.fileName),\n );\n res.type('text/plain').send(body);\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /**\n * `GET /trace-aliases/actor-task/:taskId` — the trace sessions a coding run recorded into, latest first.\n *\n * Empty for a task the coding lane never ran: that is the ordinary case, not a failure, so it\n * answers `200 { sessionIds: [] }` rather than refusing.\n */\n private async listActorTaskTraceSessions(req: Request, res: Response, next: NextFunction) {\n try {\n res.json({ sessionIds: await this.executionTraceReadService.listActorTaskSessionIds(String(req.params.taskId)) });\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /** A missing trace is a bad request, not a broken host. */\n private forwardExecutionTraceError(error: unknown, next: NextFunction): void {\n if (error instanceof ExecutionTraceNotFoundError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n\n /**\n * The creation board's explicit Refresh (bridge window): drops EVERY derived board the projection caches, not only eligibility. Answers\n * `{invalidated: true}` at once rather than recomputing inline. For boards a workbench tab is\n * watching, the projection's publication pass re-derives them about 250 ms later in the background\n * and publishes whichever moved; an unwatched board is recomputed by the next read that wants it.\n */\n private async refreshPlaybookBoard(_req: Request, res: Response, next: NextFunction) {\n try {\n this.creationPlaneProjection.invalidateDerivedBoards();\n res.json({ invalidated: true });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /playbooks/:playbookRef/decision` — what this playbook asks a person, before it runs.\n *\n * Answers `{ decision: null }` for a playbook with no interview, so a caller may ask\n * unconditionally rather than first deciding from `requiresElicitation` whether the question is\n * worth asking.\n */\n private async readPlaybookElicitationDecision(req: Request, res: Response, next: NextFunction) {\n try {\n const decision = await this.playbookRunService.readPlaybookElicitationDecision(String(req.params['playbookRef']));\n res.json({ decision });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /playbooks` — the eligibility board.\n *\n * Deterministic: it reads the working tree and answers what can run now. This is the gate a model\n * may choose WITHIN and can never widen. It writes nothing, but it is not free of effects — a read\n * that finds the projection's inputs moved drops its caches, which schedules a publication pass to\n * the workbench (see below).\n *\n * Served from the creation-plane projection's CACHED board (#1310 item 5), the same derivation the\n * workbench's playbook list reads. It used to call the playbook service directly — no cache, no\n * single-flight — and measured 22–134 s per call, so a script polling it stacked full derivations\n * behind each other.\n *\n * The resource lane may lag an out-of-process edit by up to one 15 s sweep; this door does not. It\n * re-checks the input signature before reading (one ~60-110 ms walk), and a moved input drops both\n * the cached board and any derivation still in flight from before the move — so an edit an agent\n * made a moment ago is what this read computes against.\n */\n private async listPlaybooks(_req: Request, res: Response, next: NextFunction) {\n try {\n const board = await this.creationPlaneProjection.readFreshPlaybookEligibilityBoard();\n /*\n * No board-level `phase`. It reported a derived APPLICATION phase that was deleted on\n * 2026-09-04 — an application is not in a mode of reasoning, it holds artifacts produced by\n * several. Each row still carries the PLAYBOOK's own phase label, which is the only one that\n * was ever true.\n */\n res.json({\n eligibleCount: board.playbooks.filter((entry) => entry.eligible).length,\n // The application's main line (#1603): what decides which of these rows it may run at all.\n applicationLine: board.applicationLine,\n // What that line no longer uses but the workspace still holds: reported, never removed (#1604).\n applicationLineOrphans: board.applicationLineOrphans,\n // The derived active set (#1607): the line's root, each playbook's place in it, and the tree.\n ...(board.activeSet ? { activeSet: board.activeSet } : {}),\n playbooks: board.playbooks,\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `POST /playbooks/:playbookRef/instances` — open a playbook INSTANCE for a purpose (#1609).\n *\n * Recorded in the dossier's activation record and committed at once under the automatic posture, with the\n * purpose and the actor as commit trailers. This door is a person's (the workbench, the CLI), so its actor\n * is the creator; the conversation's tool records its own acts as the agent's.\n */\n private async openPlaybookInstance(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n /* `neededFamilies` (#1608): what a secondary line needs back from the main line, each a family value. */\n /* ...and `refinedFamilies`: what a refinement line re-derives. Both are lists of family values. */\n const families = new Set<string>(Object.values(ApplicationSpecificationFamily));\n const isFamilyList = (value: unknown): boolean => Array.isArray(value) && value.every((family: unknown) => typeof family === 'string' && families.has(family));\n const malformed = (['neededFamilies', 'refinedFamilies'] as const).find((field) => body[field] !== undefined && !isFamilyList(body[field]));\n if (malformed !== undefined) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\"${malformed}\" must be a list of specification family values.` },\n }));\n return;\n }\n const result = await this.playbookInstanceService.openInstance({\n playbookRef: String(req.params.playbookRef ?? ''),\n instanceKey: typeof body.instanceKey === 'string' ? body.instanceKey : '',\n purpose: typeof body.purpose === 'string' ? body.purpose : '',\n ...(body.neededFamilies !== undefined ? { neededFamilies: body.neededFamilies as ApplicationSpecificationFamily[] } : {}),\n ...(body.refinedFamilies !== undefined ? { refinedFamilies: body.refinedFamilies as ApplicationSpecificationFamily[] } : {}),\n actor: DecisionRecordActor.CREATOR,\n ...(body.dryRun === true ? { dryRun: true } : {}),\n });\n res.status(result.commitSha ? 201 : 200).json(result);\n } catch (error) {\n if (error instanceof PlaybookInstanceRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n if (error instanceof PlaybookInstanceTreeBusyError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * `POST /playbooks/:playbookRef/instances/:instanceKey/close` — close an instance (#1608): `completed` or\n * `abandoned`, with an optional reason. Recorded and committed; abandoning cancels its runs waiting on a person\n * and consumes its interrupted progress. 400 for an instance nobody opened or one already closed, 409 while a\n * coding run holds the tree.\n */\n private async closePlaybookInstance(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const kind = Object.values(ApplicationPlaybookInstanceClosureKind).find((candidate) => candidate === body.kind);\n if (kind === undefined) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\"kind\" must be one of ${Object.values(ApplicationPlaybookInstanceClosureKind).join(', ')}.` },\n }));\n return;\n }\n const result = await this.playbookInstanceService.closeInstance({\n playbookRef: String(req.params.playbookRef ?? ''),\n instanceKey: String(req.params.instanceKey ?? ''),\n kind,\n ...(typeof body.reason === 'string' ? { reason: body.reason } : {}),\n actor: DecisionRecordActor.CREATOR,\n });\n res.status(200).json(result);\n } catch (error) {\n if (error instanceof PlaybookInstanceRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n if (error instanceof PlaybookInstanceTreeBusyError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * `POST /playbooks/:playbookRef/run` — run one compiled playbook and land its outputs.\n *\n * The response reports the FILES that appeared and how many attempts each family took. It reports no\n * acceptance, because none happened in the run: under the autonomy posture the companion commits these\n * writes before the next build baseline (authored as itself), and under GUIDED a person does (#1534).\n */\n private async runPlaybook(req: Request, res: Response, next: NextFunction) {\n try {\n const playbookRef = req.params.playbookRef;\n if (!playbookRef || typeof playbookRef !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`playbookRef` path parameter is required.' },\n });\n }\n const body = req.body || {};\n const creatorBrief = typeof body.creatorBrief === 'string' ? (body.creatorBrief as string) : undefined;\n /*\n * Per-run answers ONLY: this route files nothing in the dossier. The workbench's Run gate files the\n * answers the dossier still needed before it runs (`fileStillNeededAnswers`, #1454 review), and it\n * can because a signed-in person is there to record them against; this is the CLI/script door,\n * with no person to attribute an answer to, so its answers stay overrides of this run.\n */\n const elicitationAnswers = this.readElicitationAnswers(body.elicitationAnswers);\n const dryRun = body.dryRun === true;\n // The playbook INSTANCE to run (#1609); the run refuses one that was never opened.\n const instanceKey = typeof body.instanceKey === 'string' && body.instanceKey.trim().length > 0 ? body.instanceKey.trim() : undefined;\n this.assertCreationLanePreflight(body);\n const runInput = {\n playbookRef,\n ...(instanceKey ? { instanceKey } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n ...(creatorBrief ? { creatorBrief } : {}),\n ...(elicitationAnswers ? { elicitationAnswers } : {}),\n ...(dryRun ? { dryRun: true } : {}),\n };\n /*\n * `async: true` returns at SUBMISSION (#265): the synchronous shape holds one request open for\n * the run's life, and the server's 30-minute ceiling is shorter than a choreography's own\n * bound — the connection died at exactly 1800s twice while the run completed server-side. The\n * outcome (success OR failure) lands in GET /playbooks/runs `lastCompleted`.\n */\n if (body.async === true) {\n res.status(202).json(await this.playbookRunService.submitPlaybookRunDetached(runInput));\n return;\n }\n const result = await this.playbookRunService.runPlaybook(runInput);\n if ('status' in result && result.status === Workbench_PlaybookRunOutcomeStatus.AWAITING_CREATOR_INPUT) {\n // 200, not an error status: the run is HEALTHY and waiting. The creator answers through\n // POST /playbooks/runs/:runId/resume, which is the industry three-action model\n // (accept / decline / cancel) at the transport.\n res.json({\n ...result,\n accepted: false,\n note: 'The derivation stopped at a decision only you can make. Answer it with `wildo creation questions`, then '\n + '`wildo creation answer <questionId>` (or `/wildo:answer` in a Claude Code session). An HTTP client answers with '\n + `POST /api/companion/playbooks/runs/${result.runId}/resume — `\n + `{ \"round\": ${result.round}, \"action\": \"accept\", \"answers\": [{ \"ref\": \"...\", \"answer\": \"...\" }] }, `\n + 'or \"decline\" to have it choose and state its assumption, or \"cancel\" to abandon the run. '\n + `Carry the '${COMPANION_TOKEN_HEADER}' header from .wildo-saas/state/companion.token — `\n + 'resume is a mutating route and the token floor refuses it without one. '\n + 'Nothing has been generated or written.',\n });\n return;\n }\n if ('scenarios' in result) {\n // The composite foundation executor: no landed families — the deliverable is the composed\n // application itself (config mutation + module/resource slices in the working tree).\n res.json({\n ...result,\n accepted: false,\n ...(dryRun ? { dryRun: true } : {}),\n note: dryRun\n ? 'Dry run: the foundation plan was derived and NOTHING was written.'\n : 'The application was composed from the domain plan. Review `git status` and commit to accept it.',\n });\n return;\n }\n /*\n * The WHOLE result, not a hand-picked list of it.\n *\n * This branch used to name five fields — `playbookRef`, `landed`, `generation`, `judge`,\n * `runId` — while the service returned ten, so `diagrams`, `decisions`, `reviewGuide`, `wired`\n * and `wiringSkipped` were computed on every run and dropped at the last hop. A creator never\n * saw which pictures were written, which decisions were recorded, what the playbook says a good\n * result is, or which families were deliberately not wired. Found by the first live run\n * (2026-08-28), not by any test: the service tests assert the service's return value, and\n * nothing asserted what the HTTP layer forwards.\n *\n * The service already returns the SLIM shape — pre-images and rendered bytes stay in the write\n * register — so spreading it is safe, and it is what both sibling branches above already do. A\n * hand-picked list is a second description of the response that silently drifts from the first\n * every time the service grows a field.\n */\n res.json({\n ...result,\n accepted: false,\n ...(dryRun ? { dryRun: true } : {}),\n note: 'assessed' in result\n ? 'Assessed — this playbook produces no artifact. Nothing was generated or written; the verdict and the review guide are above.'\n /*\n * A DISPATCH run wrote application CODE in the workspace, not a specification. The generic\n * note below would be false twice over: it names the wrong tree, and it offers a write-register\n * revert (`wildo creation revert <runId>`) that has no record for this run — a remedy an\n * operator would try and find missing at the moment they need it.\n */\n : 'dispatched' in result\n ? this.describeDispatchOutcome(result)\n /*\n * A STAFFING run (#572) has its own sentence: role counts, waiting families, and (since #2419) the\n * accept/revert verbs only when it landed a charter and so recorded its writes.\n */\n : 'staffed' in result\n ? this.describeStaffingOutcome(result)\n : dryRun\n ? 'Dry run: the full pipe ran (generation, validation, rendering, judge) and NOTHING was written.'\n /*\n * Names the console VERBS, never the route (#1659 principle 2): this note is read by a\n * person or a Claude Code session, and the verbs are the surface both are given.\n */\n : 'runId' in result && typeof result.runId === 'string'\n ? `Files were written to the specifications package. Review them with \\`wildo creation diff ${result.runId}\\`, then accept with \\`wildo creation accept ${result.runId}\\` or undo with \\`wildo creation revert ${result.runId}\\`.`\n : 'Files were written to the specifications package. Review `git status` and commit to accept them.',\n });\n } catch (error) {\n /*\n * A SECOND composite, refused. 409 and not 500: the caller is authorized, the payload is valid,\n * and it is the companion's current STATE that forbids the run — the same answer the loop route\n * has always given, which this route needed the day `runChoreography` started refusing. Without\n * it a creator launching a second market analysis would get \"internal\" and no way to learn that\n * their own earlier run is what is in the way; the message names its ref and start time.\n */\n if (error instanceof PlaybookRunAlreadyInFlightError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n // Refusals a creator must be able to READ, rather than a sanitized 500.\n if (error instanceof UnknownPlaybookError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n if (error instanceof PlaybookNotReadyError || error instanceof PlaybookElicitationError || error instanceof FoundationExecutionError) {\n // Readiness and a malformed interview are both bad requests: the caller must change what they sent\n // (supply the answers, or produce the missing input first). Neither has a \"proceed anyway\".\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n /*\n * A run whose model could not produce a valid family within its attempts. Its message names the family,\n * the attempt count and the LAST REJECTION — everything a creator needs to decide what to change.\n * It fell to `next(error)` and reached the caller as the bare token `validation`, measured 2026-09-13\n * on Wonder CRM's first compliance-conception run: the reason existed only in the trace.\n */\n if (error instanceof PlaybookGenerationError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n /*\n * The run's output file moved after the run read it, so it landed nothing rather than replace that\n * change (#1614). A CONFLICT, not a bad request: what was sent was valid, the working tree moved under\n * it, and the message names who moved it and that running the playbook again is the repair.\n */\n if (error instanceof PlaybookRunLandingConflictError || error instanceof PlaybookOutputLandingHeldError || error instanceof SpecificationWriteRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n /*\n * A DISPATCH refusal reaches here now, and it did not before.\n *\n * Wiring `executor: CODING_AGENT` to the build dispatch (#119) made this route a third caller\n * of `dispatchNextBuildTask`, whose refusals — an exhausted plan, a missing plan, an unknown\n * generation step — are bad requests carrying an actionable message. They were translated for\n * the two BUILD routes only, so through this one they fell to `next(error)` and reached the\n * creator as a sanitized 500 saying \"internal\".\n *\n * That is reachable today rather than hypothetically: a build plan whose tasks have all landed\n * throws `ApplicationBuildPlanExhaustedError`, and \"the build is finished\" is precisely the\n * state a creator running the playbook is most likely to be in.\n */\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `POST /playbooks/runs/:runId/resume` — the creator's half of a mid-run clarification.\n *\n * Body: `{ round: number, action: 'accept' | 'decline' | 'cancel', answers?: [{ ref, answer }] }` —\n * `round` required: the round of questions this acts on, refused 409 once the run has moved past it\n * (#1584). The vocabulary\n * is MCP elicitation's, because a creator answering a derivation's question is the same interaction\n * an MCP client mediates, and inventing a fourth verb for it would only make the two harder to\n * bridge later.\n */\n private async resumePlaybookRun(req: Request, res: Response, next: NextFunction) {\n try {\n const runId = req.params.runId;\n if (!runId || typeof runId !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runId` path parameter is required.' },\n });\n }\n const body = req.body || {};\n // The round this answers — required, so an answer acts only on the round its caller read (#1584).\n if (typeof body.round !== 'number' || !Number.isInteger(body.round) || body.round < 1) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`round` (a positive integer) is required: the round of questions this answers, as the waiting run carries it.' },\n });\n }\n const round: number = body.round;\n /*\n * REQUIRED, as on the workbench's resume operation (#1785): a missing action used to mean ACCEPT, a\n * guess about which of three different answers the caller gave.\n */\n const rawAction: unknown = body.action;\n const action = Object.values(MetaWorkflow_ClarificationAction).find((candidate) => candidate === rawAction);\n if (!action) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: {\n message: `${rawAction === undefined ? 'An `action` is required.' : `Unknown action \\`${String(rawAction)}\\`.`} Expected one of: ${Object.values(MetaWorkflow_ClarificationAction).join(', ')}.`,\n },\n });\n }\n if (body.answers !== undefined && (!Array.isArray(body.answers) || body.answers.some((entry: unknown) =>\n typeof entry !== 'object' || entry === null || typeof (entry as { ref?: unknown }).ref !== 'string'\n || typeof (entry as { answer?: unknown }).answer !== 'string'\n || !['undefined', 'string'].includes(typeof (entry as { answeredByRef?: unknown }).answeredByRef)))) {\n throw new PlaybookClarificationError('Every clarification answer must contain string ref and answer fields (and, optionally, a string answeredByRef).');\n }\n const answers: { ref: string; answer: string; answeredByRef?: string }[] = body.answers ?? [];\n // WHO answered (#1658): per answer, or for the whole request; absent records nothing rather than a guess.\n const answeredByRef = typeof body.answeredByRef === 'string' && body.answeredByRef.trim().length > 0 ? body.answeredByRef.trim() : undefined;\n if (action === MetaWorkflow_ClarificationAction.ACCEPT && answers.length === 0) {\n // Refused rather than silently treated as a decline: \"I answered\" and \"you decide\" lead to\n // different artifacts, and a dropped answer would be invisible in both.\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Action `accept` requires at least one `{ ref, answer }` in `answers`. Use `decline` to have the derivation choose and state its assumption.' },\n });\n }\n const result = await this.playbookRunService.resumePlaybookRun({\n runId,\n round,\n action,\n ...(answers.length > 0 ? { answers } : {}),\n ...(answeredByRef ? { answeredByRef } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n ...(body.dryRun === true ? { dryRun: true } : {}),\n });\n if ('status' in result && result.status === Workbench_PlaybookRunOutcomeStatus.CANCELLED) {\n res.json({ ...result, note: 'The run was abandoned. Nothing was generated and nothing was written.' });\n return;\n }\n if ('status' in result && result.status === Workbench_PlaybookRunOutcomeStatus.AWAITING_CREATOR_INPUT) {\n res.json({\n ...result,\n accepted: false,\n note: `Still waiting: the derivation has further questions (round ${result.round}). Answer them with `\n + '`wildo creation answer <questionId>` (`wildo creation questions` names it), or, from an HTTP client, at '\n + `POST /api/companion/playbooks/runs/${result.runId}/resume with \"round\": ${result.round} and an \"action\" `\n + '(accept, decline or cancel), '\n + `carrying the '${COMPANION_TOKEN_HEADER}' header from .wildo-saas/state/companion.token.`,\n });\n return;\n }\n if ('scenarios' in result) {\n res.json({ ...result, accepted: false, note: 'The application was composed. Review `git status` and commit to accept it.' });\n return;\n }\n // The whole result, for the same reason the run handler forwards it whole: a hand-picked\n // list is a second description of the response that drifts every time the service grows a\n // field. This branch had the same five-of-ten omission and nobody had noticed it either.\n res.json({\n ...result,\n accepted: false,\n note: 'assessed' in result\n ? 'Assessed — nothing was generated or written; the verdict and the review guide are above.'\n // Same correction as the run handler: a dispatch wrote CODE in the workspace, not a specification.\n : 'dispatched' in result\n ? this.describeDispatchOutcome(result)\n : 'staffed' in result\n ? this.describeStaffingOutcome(result)\n /*\n * A dry run stays a dry run after its answer: the checkpoint carries `dryRun`, and the\n * resumed result reports it. The run handler above says so; this branch did not, so an\n * answered dry run told the operator files were written when none were (2026-09-24).\n */\n : 'dryRun' in result && result.dryRun === true\n ? 'Dry run: the full pipe ran (generation, validation, rendering, judge) and NOTHING was written.'\n : 'Files were written to the specifications package. Review `git status` and commit to accept them.',\n });\n } catch (error) {\n if (error instanceof SupersededPlaybookRunQuestionError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n // No run is waiting under that id — a missing resource, 404, as the error class promises (#1584). Its\n // words travel as guidance: a 404's context is stripped before it reaches the client.\n if (error instanceof SuspendedPlaybookRunNotFoundError) {\n next(this.errorBuilder.buildErrorWithGuidanceKey(ErrorType.NOT_FOUND, undefined,\n CompanionErrorGuidanceKey.SUSPENDED_PLAYBOOK_RUN_NOT_WAITING, { explanation: error.message },\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { message: error.message } }));\n return;\n }\n if (error instanceof PlaybookClarificationError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * The creation console's PORTS, bound to the same services the workbench's creation-plane operations\n * call — one binding, so the console's answer and the workbench's cannot reach different code. The\n * request's trace session travels with every call, as it does on the bespoke routes.\n */\n private creationConsolePorts(res: Response): CreationConsolePorts {\n const session = res.locals.companionTraceSession as CompanionExecutionSessionContext | undefined;\n return {\n deriveRows: (behavior) => this.creationPlaneProjection.deriveRows(behavior),\n resumePlaybookRun: (input) => this.playbookRunService.resumePlaybookRun({ ...input, ...(session ? { session } : {}) }),\n respondToParkedQuestion: (taskId, answer, suspensionRef, answeredByRef) =>\n this.codingAgentDispatchService.respondToApplicationCodingTaskQuestion(taskId, answer, session, { suspensionRef, ...(answeredByRef ? { answeredByRef } : {}) }),\n cancelCodingRun: (taskId) => this.codingAgentDispatchService.cancelApplicationCodingTask(taskId, session),\n recordInterviewAnswer: (input) => this.dossierService.recordAnswer(input),\n deferDocumentFact: (input) => this.dossierService.recordDocumentFactDeferral(input),\n readInterviewDispositions: () => this.dossierService.readInterviewQuestionDispositions(),\n invalidate: () => this.creationPlaneProjection.invalidateDerivedBoards(),\n };\n }\n\n /**\n * `POST /creation/interview/depth` (#2129) — record how deep this application's interviews go. A dossier\n * write like an answer; the boards move, so they are invalidated.\n */\n private async setCreationInterviewDepth(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const parsed = CreationConsole_InterviewDepthRequest_Schema.safeParse(req.body ?? {});\n const depth = Object.values(ApplicationInterviewDepth).find((candidate) => candidate === parsed.data?.interviewDepth);\n if (!parsed.success || depth === undefined) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `interviewDepth: send one of ${Object.values(ApplicationInterviewDepth).join(', ')}.` },\n });\n }\n const recorded = await this.dossierService.recordInterviewDepth(depth);\n this.creationPlaneProjection.invalidateDerivedBoards();\n res.json(recorded);\n } catch (error) {\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n }\n }\n\n /**\n * `POST /creation/interview/proposals` (#2129) — propose answers to interview questions the person does not\n * know. WRITES NOTHING: the proposals come back with the queue item each one answers, for the person to\n * review; what they keep is sent through `/creation/questions/answer` with `standing: assumed`.\n */\n private async proposeCreationInterviewAnswers(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const parsed = CreationConsole_ProposalRequest_Schema.safeParse(req.body ?? {});\n if (!parsed.success) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: parsed.error.issues.map((issue) => `${issue.path.join('.') || 'body'}: ${issue.message}`).join('; ') },\n });\n }\n const result = await proposeInterviewAnswers(this.playbookRunService.interviewAnswerProposalPorts(), parsed.data);\n /* Each proposal names the queue item it answers, so a surface answers it without a second lookup. */\n const interview = await readCreationConsoleQuestions(this.creationConsolePorts(res), [CreationConsoleQuestionKind.INTERVIEW]);\n const questionIdOf = (questionRef: string) => interview.find((question) => question.playbookRef === result.playbookRef\n && question.instanceKey === (parsed.data.instanceKey ?? null)\n && question.fields[0]?.ref === questionRef)?.questionId ?? null;\n const response: CreationConsole_ProposalResponse = {\n playbookRef: result.playbookRef,\n proposals: result.proposals.map((proposal) => ({ ...proposal, questionId: questionIdOf(proposal.questionRef) })),\n unproposed: [...result.unproposed],\n };\n res.json(response);\n } catch (error) {\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n }\n }\n\n /**\n * `GET /specifications/findings` (#3211) — what `wildo local doctor` reports: each specification the companion refused\n * to serve (`faults`), the modules it could not evaluate (`moduleFaults`), or why the package could not be evaluated at\n * all (`loadError`). Cheap while the tree is unchanged and no fault may be a stale build: it reads the loader's cached\n * evaluation. Never fails on the application's specifications — that is the answer it carries.\n */\n private async readSpecificationFindings(_req: Request, res: Response): Promise<void> {\n res.json(await readSpecificationsEvaluationFindings(this.companionContext));\n }\n\n /**\n * `GET /creation/feed` — Home's lines for a console: what happened (a run completed or was refused, a\n * dispatch settled), what is asked of the person, what could come next. Each line carries the row it\n * points at, so a run's verdict and error or a dispatch's outcome arrive in the same read, and the id\n * of the queued question it is about.\n *\n * Every board is read through the projection the workbench reads. That is NOT free on every poll: the\n * cached boards (eligibility, the build plan) answer from cache until an input moves, but Home also\n * re-derives the actor-plane boards it folds (runs, dispatches, waiting runs, parked questions) on each\n * read, and a read adopts the served rows as the publication baseline. Polled, it is therefore\n * trace-exempt (`COMPANION_TRACE_EXEMPT_GET_PATHS`), and the CLI's default interval is seconds, not less.\n */\n private async readCreationConsoleFeed(_req: Request, res: Response): Promise<void> {\n /*\n * The specifications package's findings first, because they decide how a failure below is read (#3210, #3211). A\n * specification its factory refuses no longer fails the board (the evaluation drops it), so it is reported here or\n * nowhere. A package that cannot be evaluated at all still fails every board derived from it; the feed then\n * answers with the lines it could derive (none) and the reason, rather than a 500 a console cannot read. Any other\n * failure of the boards is not about the specifications and still propagates.\n */\n const specifications = await readSpecificationsEvaluationFindings(this.companionContext);\n let lines: readonly Workbench_CreationHomeLine[];\n try {\n lines = await this.creationPlaneProjection.deriveRows(WorkbenchCreationPlaneBehavior.HOME_LINES) as unknown as readonly Workbench_CreationHomeLine[];\n } catch (error) {\n /*\n * Only the failure the findings already name is degraded: the boards fail because the package cannot be\n * evaluated, and `specifications.loadError` says why, or because a board read what a failed module left unavailable,\n * and `specifications.moduleFaults` names it. Any other failure of the boards is not about the\n * specifications and propagates as before, so an unrelated defect is never hidden behind an empty feed.\n */\n if (!(error instanceof SpecificationUnavailableError) && (specifications.loadError === null || !isSameFailure(describeCaughtError(error), specifications.loadError))) throw error;\n lines = [];\n }\n const behaviors = [...new Set(lines\n .map((line) => creationPlaneBehaviorForResourceType(line.targetResourceType))\n .filter((behavior): behavior is WorkbenchCreationPlaneBehavior => behavior !== null))];\n const rowsByBehavior = new Map(await Promise.all(\n behaviors.map(async (behavior) => [behavior, await this.creationPlaneProjection.deriveRows(behavior)] as const),\n ));\n const feed: CreationConsole_Feed = {\n computedAt: new Date().toISOString(),\n lines: buildCreationConsoleFeed(lines, (resourceType, resourceId) => {\n const behavior = creationPlaneBehaviorForResourceType(resourceType);\n if (!behavior) return null;\n const identityField = CREATION_PLANE_IDENTITY_FIELDS[behavior];\n return rowsByBehavior.get(behavior)?.find((row) => row[identityField] === resourceId) ?? null;\n }),\n specifications: { faults: [...specifications.faults], moduleFaults: specifications.moduleFaults.map((fault) => ({ ...fault, causedBy: [...fault.causedBy], withheldSpecifications: [...fault.withheldSpecifications] })), loadError: specifications.loadError },\n // What the running wave's oldest slot is waiting on (#3206), and how many it prepares at once (#3883).\n buildPreparation: (() => {\n const { waveStartedAt, stopRequestedAt, heldByStopSince, preparing, preparingCount } = this.buildDispatchService.readBuildDispatchPreparation();\n return { waveStartedAt, stopRequestedAt, heldByStopSince, preparing: preparing === null ? null : preparing.summary, preparingCount };\n })(),\n // Why dispatch is held, if it is (#3215): the read the wave makes before each slot, so the two cannot disagree.\n buildHold: await (async () => {\n const failures = await this.buildDispatchService.readBuildDispatchHold();\n return {\n bootFailures: failures.map((failure) => ({\n serviceIdentifier: failure.serviceIdentifier,\n cause: String(failure.cause),\n message: failure.message,\n remedy: failure.remedy,\n failedAt: failure.failedAt,\n })),\n // The lane repairs a start its own code refused (#3204): a drive waits for that rather than stop on the hold.\n ...(failures.length > 0 ? { startupRepairOwed: await this.buildDispatchService.isStartupRepairOwed(failures) } : {}),\n };\n })(),\n };\n // The question count comes from the QUEUE `GET /creation/questions` serves, so the hook's \"N questions waiting\"\n // always equals what `wildo creation questions` lists (#2412). The boards it reads are the ones this read derived.\n const questions = await readCreationConsoleQuestions(this.creationConsolePorts(res));\n this.lastCreationFeedSummary = summarizeCreationConsoleFeed(feed, questions.length);\n res.json(feed);\n }\n\n /** `GET /creation/drive/status` (#2233): what still runs in this process, for `wildo creation drive`. Derives nothing. */\n private async readCreationDriveStatus(_req: Request, res: Response): Promise<void> {\n const status: CreationDrive_Status = {\n // When this process started, so a driver sees a restart even when it lost no request across it.\n companionStartedAt: COMPANION_PROCESS_STARTED_AT,\n ...this.playbookRunService.readCreationDriveStatus(),\n };\n res.json(status);\n }\n\n /**\n * `GET /creation/requirements/standing` (#3701): the maturity reading, derived live, and every item still open on the\n * application's requirements. Read by `wildo creation drive` only when the loop chose to stop or found nothing to run,\n * because it derives the reading (the landing probe, the follow-up derivation): never on a poll.\n */\n private async readCreationRequirementsStanding(_req: Request, res: Response): Promise<void> {\n const standing: CreationDrive_RequirementsStanding = await this.playbookRunService.readRequirementsStanding();\n res.json(standing);\n }\n\n /** `POST /creation/drive/accept` (#2233): the posture's accept of pending playbook runs, for `wildo creation drive`. */\n private async acceptForCreationDrive(_req: Request, res: Response): Promise<void> {\n const outcome: CreationDrive_AcceptOutcome = await this.codingAgentDispatchService.acceptPendingPlaybookRunsForUnattendedDrive();\n res.json(outcome);\n }\n\n /** What the most recent feed read counted — the pulse's `summary`, `null` until someone reads the feed. */\n private lastCreationFeedSummary: CreationConsole_PulseSummary | null = null;\n\n /**\n * `GET /creation/pulse` — the console's poll (#1657): a hook runs it on every prompt and a status line\n * every few seconds, so it derives NOTHING. The change cursor and the run count are in memory; the\n * summary is the last feed read's, carried with its instant. A poller compares two pulses and reads\n * the feed only when one moved — which also refreshes the summary. Trace-exempt, like the feed.\n */\n private async readCreationConsolePulse(_req: Request, res: Response): Promise<void> {\n const cursor = this.creationPlaneProjection.readChangeCursor();\n const pulse: CreationConsole_Pulse = {\n sequence: cursor.sequence,\n changedAt: cursor.changedAt,\n runsInFlight: this.playbookRunService.countRunsInFlightInProcess(),\n summary: this.lastCreationFeedSummary,\n };\n res.json(pulse);\n }\n\n /** `GET /creation/questions` — every question waiting on the person, as one queue. */\n private async readCreationConsoleQuestionQueue(_req: Request, res: Response): Promise<void> {\n const queue: CreationConsole_QuestionQueue = {\n computedAt: new Date().toISOString(),\n questions: await readCreationConsoleQuestions(this.creationConsolePorts(res)),\n assumptions: await readCreationConsoleAssumptions(this.creationConsolePorts(res)),\n withoutAnswer: await readCreationConsoleWithoutAnswer(this.creationConsolePorts(res)),\n interviewDepth: (await this.dossierService.readCreatorInputs())?.interviewDepth ?? null,\n };\n res.json(queue);\n }\n\n /**\n * `GET /creation/report` (#2231) — the creation run report, derived on every read from the run rows, the\n * write registers and git. Nothing in the lane reads it: it is the record a person reads to see whether the\n * next run needed them less.\n */\n private async readCreationRunReport(_req: Request, res: Response): Promise<void> {\n res.json(await this.creationRunReport.describe());\n }\n\n /**\n * `GET /creation/timeline` (#3206, epic #3204) — the journey's per-phase durations and the slowest build tasks, each\n * with its dispatch wait and run time, derived on every read from the run rows. What `wildo context journey` prints.\n */\n private async readCreationJourneyTimeline(_req: Request, res: Response): Promise<void> {\n res.json(await this.creationRunReport.describeTimeline());\n }\n\n /** `POST /creation/interventions/:interventionId/reason` (#2231) — record why a person stepped in. */\n private async stateCreationInterventionReason(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const interventionId = req.params.interventionId;\n const reason = (req.body || {}).reason;\n if (typeof interventionId !== 'string' || interventionId.length === 0 || typeof reason !== 'string' || reason.trim().length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`interventionId` path parameter and a non-empty `reason` are required.' },\n });\n }\n res.json(await this.creationRunReport.stateReason(interventionId, reason));\n } catch (error) {\n if (error instanceof CreationInterventionNotFoundError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * `GET /creation/launch-blockers` (#2238) — the \"before you can launch\" list: `deriveLaunchBlockers` over inputs\n * read FRESH here, so settling an item removes it on the next read. Read-only, and it gates nothing: a run report\n * renders it and Gate 3 will read it, but nothing in the creation lane waits on it.\n */\n private async readCreationLaunchBlockers(_req: Request, res: Response): Promise<void> {\n res.json(await readLaunchBlockers(companionLaunchBlockerPorts(\n this.companionContext,\n () => readCreationConsoleQuestions(this.creationConsolePorts(res), [CreationConsoleQuestionKind.GOVERNANCE_FACT]),\n )));\n }\n\n /**\n * `POST /creation/questions/answer` — answer, decline or cancel ONE queued question.\n *\n * The console's own refusals (an id that names nothing, a question that moved on, an action the item\n * does not admit) answer 400 or 409 with their sentence; a service's refusal is translated exactly as\n * the workbench's operation translates it, so a refusal reads the same through both doors.\n */\n private async answerCreationConsoleQuestion(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const parsed = CreationConsole_AnswerRequest_Schema.safeParse(req.body ?? {});\n if (!parsed.success) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: parsed.error.issues.map((issue) => `${issue.path.join('.') || 'body'}: ${issue.message}`).join('; ') },\n });\n }\n res.json(await answerCreationConsoleQuestion(this.creationConsolePorts(res), parsed.data));\n } catch (error) {\n if (error instanceof CreationConsoleRefusal) {\n const malformed = error.refusal === CreationConsoleRefusalKind.MALFORMED;\n next(this.errorBuilder.buildError(malformed ? ErrorType.VALIDATION : ErrorType.CONFLICT, undefined, {\n customMessageReference: malformed ? ErrorCustomMessageReference.VALIDATION : ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n }\n }\n\n private async marketGenerate(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const {\n templateRef,\n icpRef,\n featureRef,\n benefitRef,\n channelRef,\n objectionRef,\n outputLanguage,\n } = body;\n\n if (!templateRef || typeof templateRef !== 'string') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`templateRef` is required and must be a non-empty string.' },\n },\n );\n }\n\n const optionalString = (key: string, value: unknown): string | undefined => {\n if (value === undefined || value === null) return undefined;\n if (typeof value !== 'string') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`${key}\\` must be a string when provided.` },\n },\n );\n }\n return value.length > 0 ? value : undefined;\n };\n\n // Thread the request session + a dedicated agent step into the LLM call so\n // the engine AgentCallTraceSink records the prompt/output/usage for this\n // market generation — the same observability every companion LLM\n // call gets. Best-effort: undefined when tracing is off (sink no-ops).\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', `market-generation-${templateRef}`);\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'market-generation-generate',\n attributes: { templateRef },\n }\n : undefined;\n\n const result = await this.marketGenerationService.generate({\n templateRef,\n icpRef: optionalString('icpRef', icpRef),\n featureRef: optionalString('featureRef', featureRef),\n benefitRef: optionalString('benefitRef', benefitRef),\n channelRef: optionalString('channelRef', channelRef),\n objectionRef: optionalString('objectionRef', objectionRef),\n outputLanguage: optionalString('outputLanguage', outputLanguage),\n }, traceContext);\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/brand/generate-logo` — generate the application logo\n * from the authored `BrandSnapshot`. Thin: `LogoGenerationCompanionService`\n * owns the flow (introspect `brand-render-prompt` → invoke the image agent →\n * persist the master + manifest). Body: optional `{ forceRegenerate }`.\n */\n private async brandGenerateLogo(req: Request, res: Response, next: NextFunction) {\n try {\n const forceRegenerate = (req.body || {}).forceRegenerate === true;\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'logo-generation');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'logo-generation-generate',\n attributes: {},\n }\n : undefined;\n\n const result = await this.logoGenerationService.generate({ forceRegenerate }, traceContext);\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/brand/deliberate-logo` — full logo DELIBERATION\n * (agentic deliberation system, Step 4): the art-director expert authors the\n * creative brief (N app-derived concept directions), one candidate generates\n * per direction, the expert panel (art-director + design-system-guardian +\n * brand-strategist) deliberates with regeneration-as-revision, and the winner\n * is staged as the single-candidate manifest the EXISTING\n * `POST /brand/accept-logo` review point promotes. Thin:\n * `LogoDeliberationCompanionService` owns the flow.\n *\n * Body (all optional): `{ directionCount?: number, roundBudget?: number,\n * shortlistSize?: number }` — positive integers; service defaults 4 / 2 / 1.\n */\n private async brandDeliberateLogo(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { directionCount, roundBudget, shortlistSize } = body;\n\n for (const [name, value] of Object.entries({ directionCount, roundBudget, shortlistSize })) {\n if (value !== undefined && (typeof value !== 'number' || !Number.isInteger(value) || value < 1)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`${name}\\` must be a positive integer when provided.` },\n });\n }\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'logo-deliberation');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'logo-deliberation',\n attributes: {},\n }\n : undefined;\n\n const result = await this.logoDeliberationService.run(\n {\n ...(typeof directionCount === 'number' ? { directionCount } : {}),\n ...(typeof roundBudget === 'number' ? { roundBudget } : {}),\n ...(typeof shortlistSize === 'number' ? { shortlistSize } : {}),\n },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/expert-personas/derive` — derive an app-specific\n * expert-persona charter PROPOSAL (agentic deliberation system). Thin:\n * `ExpertPersonaCompanionService.derive` owns the flow (resolve shaping\n * inputs via introspection → invoke the derivation agent → stage the\n * proposal). Body: `{ roleRef: string }`. Every call derives; there is no\n * freshness cache to bypass.\n */\n private async expertPersonaDerive(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { roleRef } = body;\n if (typeof roleRef !== 'string' || roleRef.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`roleRef` must be a non-empty string.' },\n });\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'expert-persona-derive');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'expert-persona-derive',\n attributes: {},\n }\n : undefined;\n\n const result = await this.expertPersonaService.derive(\n { roleRef },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/expert-personas/accept` — promote a STAGED charter\n * proposal into the committed SSOT (`specifications/src/personas/`), and\n * commit it (#2419). Thin: `ExpertPersonaCompanionService.accept` owns the\n * flow (human-edit overwrite guard → fail-closed set validation → write\n * generated charter module + regenerate the aggregator + wire it), and\n * `AcceptedChangeCommitCompanionService.acceptExpertCharter` commits exactly\n * what it changed. Body: `{ roleRef: string }`.\n */\n private async expertPersonaAccept(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { roleRef } = body;\n if (typeof roleRef !== 'string' || roleRef.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`roleRef` must be a non-empty string.' },\n });\n }\n const result = await this.expertPersonaService.accept({ roleRef });\n /*\n * A person's accept is a commit (#2419). The charter is promoted either way; a commit that cannot be made (a\n * live coding run holds the tree, a conflicting HEAD, an import no commit holds) is reported beside it rather\n * than failing an accept that already happened, and names what to do instead.\n */\n let commit: Awaited<ReturnType<AcceptedChangeCommitCompanionService['acceptExpertCharter']>> | undefined;\n let commitRefused: string | undefined;\n if (result.writes.length > 0) {\n try {\n commit = await this.acceptedChangeCommitService.acceptExpertCharter({ roleRef, writes: result.writes });\n } catch (error) {\n commitRefused = `The charter is accepted on disk but was not committed: ${describeCaughtError(error)} Commit ${result.writes.map((write) => write.path).join(', ')} by hand.`;\n }\n }\n // The paths, not the bytes: the console prints this answer, and the wiring files' contents are noise there.\n this.jsonSuccess(res, {\n ...result,\n writes: result.writes.map((write) => write.path),\n ...(commit ? { commit } : {}),\n ...(commitRefused ? { commitRefused } : {}),\n });\n } catch (e) {\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n }\n\n /**\n * `POST /api/companion/deliberations/run` — run a charter-built expert-panel\n * deliberation over TEXT candidates (agentic deliberation system, Step 3).\n * Thin: `DeliberationCompanionService.run` composes the plan (narrowness\n * fail-closed, committed charters only) and the engine\n * `ActorsSystemBackendService.executeDeliberation` orchestrates\n * (rubric -> review rounds -> shortlist revisions -> synthesis). Body:\n * `{ workDomain, briefContext, candidates: [{ref, text}], reviewerRoleRefs,\n * coordinatorRoleRef, rubricDeriverRoleRef?, roundBudget?, shortlistSize? }`.\n */\n private async deliberationRun(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { workDomain, briefContext, candidates, reviewerRoleRefs, coordinatorRoleRef } = body;\n const knownDomains = new Set<string>(Object.values(ExpertWorkDomain));\n if (typeof workDomain !== 'string' || !knownDomains.has(workDomain)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`workDomain\\` must be one of [${[...knownDomains].join(', ')}].` },\n });\n }\n if (typeof briefContext !== 'string' || briefContext.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`briefContext` must be a non-empty string.' },\n });\n }\n if (!Array.isArray(candidates) || candidates.some((candidate: unknown) => {\n const entry = candidate as { ref?: unknown; text?: unknown };\n return typeof entry?.ref !== 'string' || entry.ref.length === 0\n || typeof entry?.text !== 'string' || entry.text.length === 0;\n })) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`candidates` must be an array of `{ ref, text }` with non-empty strings.' },\n });\n }\n if (!Array.isArray(reviewerRoleRefs) || reviewerRoleRefs.some((role: unknown) => typeof role !== 'string')\n || typeof coordinatorRoleRef !== 'string' || coordinatorRoleRef.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`reviewerRoleRefs` must be a string array and `coordinatorRoleRef` a non-empty string.' },\n });\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'deliberation-run');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'deliberation-run',\n attributes: {},\n }\n : undefined;\n\n const result = await this.deliberationService.run(\n {\n workDomain: workDomain as ExpertWorkDomain,\n briefContext,\n candidates,\n reviewerRoleRefs,\n coordinatorRoleRef,\n ...(typeof body.rubricDeriverRoleRef === 'string' ? { rubricDeriverRoleRef: body.rubricDeriverRoleRef } : {}),\n ...(typeof body.roundBudget === 'number' ? { roundBudget: body.roundBudget } : {}),\n ...(typeof body.shortlistSize === 'number' ? { shortlistSize: body.shortlistSize } : {}),\n },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/brand/logo` (#2411) — the console's door to the logo: deliberate-logo then accept-logo, the\n * same composition the build's logo step runs. `wildo creation brand logo` calls it.\n *\n * Body: `{ redraw?: boolean }`. Without `redraw`, an application that already carries an accepted mark (the\n * predicate the logo step skips on, asked of the working tree) is REFUSED with 409: replacing an application's\n * identity is a deliberate act, so a re-run must never redraw it quietly. Before this door, a person whose logo\n * step would not run had to call both routes by hand with the companion token (`app-creation-test-005`).\n */\n private async brandLogo(req: Request, res: Response, next: NextFunction) {\n try {\n const { redraw } = req.body || {};\n if (redraw !== undefined && typeof redraw !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`redraw` must be a boolean when provided.' },\n });\n }\n if (redraw !== true && await hasAcceptedBrandMarkInWorkingTree(this.companionContext.saasRoot)) {\n throw this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: 'This application already carries an accepted logo. Drawing a new one replaces its identity: run `wildo creation brand logo --redraw` to do it deliberately.' },\n });\n }\n /*\n * Not while a coding run holds the worktree (#2411 review F5): the accept writes `specifications/src/brand/`, and\n * a live run's change set would claim those files as its own. The build's logo step runs inside the coding lane's\n * worktree window for the same reason; this door asks the person to wait instead.\n */\n const liveRuns = await this.codingAgentDispatchService.listInFlightCodingRuns();\n if (liveRuns.length > 0) {\n throw this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: `A coding run is writing the application (${liveRuns.map((run) => run.taskRef ?? run.executionId).join(', ')}); draw the logo once it settles, so its change set does not claim the brand files.` },\n });\n }\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'logo-deliberation');\n const traceContext = traceSession && traceStep\n ? { sessionRef: traceSession.sessionId, stepRef: traceStep.stepId, label: 'logo-console', attributes: {} }\n : undefined;\n // `run` stages its winner as the single-candidate manifest `accept` promotes, exactly as the logo step composes them.\n const deliberation = await this.logoDeliberationService.run({}, traceContext);\n // Asked again before the WRITE (#2411 re-review R3): the deliberation takes minutes, and a coding run started\n // meanwhile would claim the files the accept writes. The staged winner survives a refusal; accept it later.\n const startedMeanwhile = await this.codingAgentDispatchService.listInFlightCodingRuns();\n if (startedMeanwhile.length > 0) {\n throw this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: `The logo was drawn, but a coding run started while it was (${startedMeanwhile.map((run) => run.taskRef ?? run.executionId).join(', ')}); its winner is staged. Accept it once the run settles: POST /api/companion/brand/accept-logo.` },\n });\n }\n const accept = await this.brandAcceptService.accept({}, traceContext);\n this.jsonSuccess(res, { redrawn: redraw === true, deliberation, accept });\n } catch (e) {\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n }\n\n /**\n * `POST /api/companion/brand/accept-logo` — the ACCEPT review point of the\n * brand/logo workflow. Thin: `BrandAcceptCompanionService` owns the flow\n * (read staged candidate → optionally run the `brand.logo.judge.agent`\n * review → promote the accepted candidate into the specification SSOT:\n * copy files into `specifications/src/brand/assets/` + rewrite\n * `resolved-assets.generated.ts`).\n *\n * Body (all optional): `{ runJudge?, requireJudgeAcceptance? }`. The staged\n * single-candidate manifest is what gets accepted; the judge\n * runs by default and its verdict is advisory (the human accept POST is the\n * authority) unless `requireJudgeAcceptance` gates on it.\n */\n private async brandAcceptLogo(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { runJudge, requireJudgeAcceptance } = body;\n\n if (runJudge !== undefined && typeof runJudge !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runJudge` must be a boolean when provided.' },\n });\n }\n if (requireJudgeAcceptance !== undefined && typeof requireJudgeAcceptance !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`requireJudgeAcceptance` must be a boolean when provided.' },\n });\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'logo-accept');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'logo-accept-judge',\n attributes: {},\n }\n : undefined;\n\n const result = await this.brandAcceptService.accept(\n {\n ...(typeof runJudge === 'boolean' ? { runJudge } : {}),\n ...(typeof requireJudgeAcceptance === 'boolean' ? { requireJudgeAcceptance } : {}),\n },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n }\n\n /**\n * `POST /api/companion/technical-doc/generate-openapi` — on-demand\n * OpenAPI generation for the SaaS app. Returns the\n * `{ documents, stats, metadata }` shape produced by\n * {@link TechnicalDocCompanionService.generateOpenApiDocuments}\n * verbatim. The route deliberately accepts no request body\n * today: every input (`appSlug`, `appDisplayName`,\n * `publicMarketingTitle`, operations) is derived from the\n * loaded `WildoSaasConfig` + the `'openapi-generation-input'`\n * subprocess introspection. A future CLI flag (per-section\n * filter, custom version override) will plug in here as\n * optional body fields without breaking this no-body contract.\n */\n private async technicalDocGenerateOpenApi(req: Request, res: Response, next: NextFunction) {\n try {\n const result = await this.technicalDocService.generateOpenApiDocuments();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerTechnicalDocFailure(res, e, next);\n }\n }\n\n private async technicalDocPublishOpenApi(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.technicalDocService.publishOpenApiReference());\n } catch (e) {\n this.answerTechnicalDocFailure(res, e, next);\n }\n }\n\n /**\n * `POST /api/companion/technical-doc/derive-bundles` — the trigger for the\n * source-based derivation introduced by decision **D14**.\n *\n * Until this route existed, `deriveApplicationDocumentationBundles` had NO\n * caller outside its own tests, so the whole D14 evidence path — the\n * environment evidence snapshot, the applicability gates and the two\n * authorized bundles — could only ever be verified behaviourally. That is why\n * the route earns its place despite duplicating no logic: it is the seam that\n * makes the decision observable on a running companion.\n *\n * **Read-only by construction.** It derives and returns; it writes nothing and\n * publishes nothing. The Phase 2A publication path\n * `backendServiceKey` is resolved the same way every other companion behavior\n * resolves it ({@link pickResourcesRegistryCarrierServiceKey}) rather than\n * accepted from the caller, so a request cannot name a service the application\n * does not declare. The derivation publishes framework-owned topics only; it\n * does not interpret application resource, workflow, or editorial declarations.\n */\n private async technicalDocDeriveBundles(_req: Request, res: Response, next: NextFunction) {\n try {\n const result = await this.technicalDocService.deriveApplicationDocumentationBundles({\n backendServiceKey: this.pickResourcesRegistryCarrierServiceKey(),\n });\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerTechnicalDocFailure(res, e, next);\n }\n }\n\n /**\n * `POST /api/companion/technical-doc/publish-managed` — the operation that emits\n * `src/generated/consumer-documentation`, the generator-owned framework\n * documentation tree served by this application. Git owns history and rollback;\n * publication owns only validation and synchronization of the current bytes.\n *\n * Unlike `derive-bundles` this WRITES: it synchronizes a complete verified render into\n * one stable generated tree. It is exposed as its own route rather than folded into the\n * derivation for exactly that reason — a caller should never reach a publication by\n * asking for a read.\n *\n * `refuseProvisionalAssets` is the environment's call, so it is accepted per request\n * rather than defaulted here: a production run passes `true` and fails if any screenshot\n * is still a placeholder; development omits it and ships documentation ahead of its\n * pictures.\n */\n private async technicalDocPublishManaged(req: Request, res: Response, next: NextFunction) {\n try {\n const { refuseProvisionalAssets } = req.body || {};\n const result = await this.technicalDocService.publishManagedDocumentation({\n backendServiceKey: this.pickResourcesRegistryCarrierServiceKey(),\n ...(refuseProvisionalAssets === undefined ? {} : { refuseProvisionalAssets: refuseProvisionalAssets === true }),\n });\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerTechnicalDocFailure(res, e, next);\n }\n }\n /**\n * `GET /api/companion/technical-doc/api-reference-categories` — whether the application's API-reference categories\n * fit the resources a publish would document, answered without publishing (#1891). What `wildo docs check` prints.\n *\n * A problem is the ANSWER here, not a failure: the route reports it with 200 so the caller reads every finding, and\n * refuses only when it cannot ask (an unreadable documentation config, a projector that failed). An application with\n * no documentation service is answered too (`documentationService: false`), since it has nothing to check.\n */\n private async technicalDocCheckApiReferenceCategories(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.technicalDocService.checkApiReferenceResourceCategories());\n } catch (e) {\n this.answerTechnicalDocFailure(res, e, next);\n }\n }\n\n /**\n * A documentation route's failure, with a documentation-lane refusal answered as the caller's error: the application's\n * category configuration (#1891) or an authored operation example untrue of its schema (#1838). Each names what the\n * person must change. Left to `jsonError` it was classified INTERNAL and sanitized, so `wildo docs publish` printed a\n * bare 500 and the names were only in the companion log. Recognised by {@link describeDocumentationLaneRefusal}, the\n * predicate the build doors share (#3462).\n */\n private answerTechnicalDocFailure(res: Response, e: unknown, next: NextFunction): void {\n const documentationRefusal = this.documentationLaneRefusal(e);\n if (documentationRefusal !== undefined) {\n next(documentationRefusal);\n return;\n }\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n\n /**\n * A write refused on a failing module is a CONFLICT with the tree (#3258): what was sent was valid, and the sentence naming\n * the module is the whole answer. Left to `jsonError` it is classified INTERNAL and sanitized to the word \"internal\".\n */\n private answerSpecificationWriteRefusal(res: Response, e: unknown, next: NextFunction): void {\n if (e instanceof SpecificationWriteRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: e.message },\n }));\n return;\n }\n this.jsonError(res, e as any, next);\n }\n\n /** A documentation-lane refusal as the caller's VALIDATION error carrying its sentence, or `undefined` for anything else. */\n private documentationLaneRefusal(error: unknown): unknown {\n const message = describeDocumentationLaneRefusal(error);\n if (message === undefined) return undefined;\n return this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message },\n });\n }\n\n}\n\nexport default CompanionController;\n\n/**\n * Whether a board's failure is the specifications package's load failure the findings already report (#3211). Compared\n * on the first line, because a board may re-wrap the loader's error with context after it.\n */\nfunction isSameFailure(boardFailure: string, loadError: string): boolean {\n const firstLine = loadError.split('\\n')[0]!.trim();\n return firstLine.length > 0 && boardFailure.includes(firstLine);\n}\n\n/**\n * What `POST /playbooks/loop` answers (#3848). Built from the loop's result field by field, so a field the CLI reads must\n * be named here: `stoppedAtIteration` was added to the result and dropped by this response, and the drive fell back to the\n * LAST step, which under rolling admission may not be the one that stopped the loop.\n */\nexport function describePlaybookLoopResponse(result: PlaybookLoopResult): Record<string, unknown> {\n return {\n stoppedBecause: result.stoppedBecause,\n // Where and on what the environment stopped it, when it did (#3235): `wildo creation loop` says so.\n ...(result.interruption ? { interruption: result.interruption } : {}),\n // The step that stopped it, when one did (#3848): steps settle out of order, so the last one may be another.\n ...(result.stoppedAtIteration !== undefined ? { stoppedAtIteration: result.stoppedAtIteration } : {}),\n steps: result.steps,\n accepted: false,\n note: 'Any files written are working edits. Review `git status` and commit to accept them. '\n + 'Each iteration may run several output-disjoint lanes concurrently, and a free slot is refilled as soon as a lane '\n + 'finishes; every lane records its own revertible run.',\n };\n}\n"]}
1
+ {"version":3,"file":"companion.controller.js","sourceRoot":"","sources":["../../../../src/companion-api/controllers/companion.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEzD,OAAO,EACL,gCAAgC,EAChC,aAAa,EACb,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GAGpB,MAAM,4B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esContent":["import { injectable, inject, optional } from 'inversify';\nimport type { Request, Response, NextFunction } from 'express';\nimport {\n AbstractControllerBackendService,\n LoggerService,\n ErrorBuilderBackendService,\n ErrorHandlerService,\n SAAS_SERVICE_TYPES,\n describeCaughtError,\n type ContentSafetyBackendService,\n type ExternalProvidersRegistryBackendService,\n} from '@wildo-ai/saas-backend-lib';\nimport { researchFamilyScreeningHostOf } from '../../meta-workflows/services/build-brief-third-party-screening.companion';\nimport { screenIntrospectionAnswer } from '../../meta-workflows/services/introspection-answer-third-party-screening.companion';\nimport { readCompanionResearchInformedFamilies } from '../../meta-workflows/services/research-informed-families.companion';\nimport { CompanionEnvVariableRefusal, reloadCompanionEnvVariables } from '../../core/runtime/companion-env-file';\nimport { isApplicationStartupFailure } from '../../core/runtime/application-runtime-liveness.companion';\nimport {\n CompanionActorTasksListQuerySchema,\n CompanionCreateActorTaskRequestSchema,\n CompanionCreateActorExecutionRequestSchema,\n CompanionLandGovernanceFactsRequestSchema,\n CompanionCreateFlowExecutionRequestSchema,\n CompanionExecutionsListQuerySchema,\n CompanionIntrospectionRequestSchema,\n CompanionDispatchNamedBuildTaskRequestSchema,\n CompanionCloseBuildTaskRequestSchema,\n CompanionApproveFollowUpTaskRequestSchema,\n CompanionRearmBuildTaskRequestSchema,\n CompanionUpdateActorTaskRequestSchema,\n type FileUpdateRequest,\n} from '../companion-api.schemas';\nimport {\n ErrorType,\n ErrorActionBackend,\n ErrorCustomMessageReference,\n ErrorSeverity,\n AppFrontendType,\n computeChartRegistrationAlignment,\n ChartRegistrationBackendRefsProvenance,\n normalizeChartExecutionRef,\n type FrontendChartRegistrationRef,\n} from '@wildo-ai/saas-models';\nimport { loadBackendCompanionData, readSpecificationsEvaluationFindings } from '../../core/context/companion-package-loaders.companion';\nimport { companionLaunchBlockerPorts, readLaunchBlockers } from '../../core/introspection/resources/launch-blockers.companion';\nimport { AvailableLanguage } from '@wildo-ai/presets-components-models';\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport { ReadVerbRefusalType, ReadVerbSnapshotKey, ReadVerbSnapshots, UnheldHandlerResponse, captureHandlerResponse, isStatusChangingRequest } from './read-verb-snapshots';\nimport type { DossierCompanionService } from '../../meta-workflows/services/dossier.companion.service';\nimport { serializeDossierWrite } from '../../meta-workflows/services/dossier-write-queue.companion.utils';\nimport { LabellingPlannerCompanionService } from '../../i18n-labelling/services/labelling-planner.companion.service';\nimport { LabellizeOrchestratorCompanionService } from '../../i18n-labelling/services/labellize-orchestrator.companion.service';\nimport { TranslateOrchestratorCompanionService } from '../../i18n-labelling/services/translate-orchestrator.companion.service';\nimport { EmailTemplateLabellingUnitsCompanionService } from '../../i18n-labelling/services/email-template-labelling-units.companion.service';\nimport { EMAIL_TEMPLATE_LABELLING_BUCKET } from '../../i18n-labelling/models/email-template-labelling-unit.models';\nimport { isCompanionOwnLabelUnitId } from '../../i18n-labelling/models/companion-own-label-unit.models';\nimport { EmailTemplateCompanionService } from '../../email/services/email-template.companion.service';\nimport { PlaybookRunAlreadyInFlightError, PlaybookNotReadyError, PlaybookRunCompanionService, PlaybookRunLandingConflictError, UnknownPlaybookError } from '../../meta-workflows/services/playbook-run.companion.service';\nimport { PlaybookInstanceCompanionService, PlaybookInstanceRefusedError, PlaybookInstanceTreeBusyError } from '../../meta-workflows/services/playbook-instance.companion.service';\nimport { CREATION_PLANE_IDENTITY_FIELDS, CreationPlaneProjectionCompanionService } from '../../core/introspection/resources/creation-plane-projection.companion.service';\nimport { buildCreationConsoleFeed, creationPlaneBehaviorForResourceType } from '../../core/introspection/resources/creation-console-projection.companion';\nimport {\n CreationConsoleRefusal,\n CreationConsoleRefusalKind,\n answerCreationConsoleQuestion,\n readCreationConsoleAssumptions,\n readCreationConsoleWithoutAnswer,\n readCreationConsoleQuestions,\n type CreationConsolePorts,\n} from '../../core/introspection/resources/creation-console-answer.companion';\nimport { translateCreationPlaneDispatchError } from '../../core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service';\nimport {\n CreationConsoleQuestionKind,\n CreationConsole_AnswerRequest_Schema,\n CreationConsole_InterviewDepthRequest_Schema,\n CreationConsole_ProposalRequest_Schema,\n type CreationConsole_ProposalResponse,\n WorkbenchCreationPlaneBehavior,\n Workbench_PlaybookRunOutcomeStatus,\n type CreationConsole_Feed,\n type CreationConsole_Pulse,\n type CreationDrive_AcceptOutcome,\n type CreationDrive_Status,\n type CreationDrive_RequirementsStanding,\n type CreationConsole_PulseSummary,\n type CreationConsole_QuestionQueue,\n summarizeCreationConsoleFeed,\n type Workbench_CreationHomeLine,\n} from '@wildo-ai/platform-core-shared';\nimport { FoundationExecutionError } from '../../meta-workflows/services/foundation-executor.companion.service';\nimport { proposeInterviewAnswers } from '../../meta-workflows/services/interview-answer-proposal.companion';\nimport { ApplicationInterviewDepth } from '@wildo-ai/saas-models/meta-workflows';\nimport { SupersededPlaybookRunQuestionError, SuspendedPlaybookRunNotFoundError } from '../../meta-workflows/models/playbook-run-checkpoint.models';\nimport { CompanionErrorGuidanceKey } from '../companion-error-guidance.models';\nimport { CompanionFileRouteRefusal, confineCompanionFilePath } from './companion-file-route-confinement';\nimport {\n ExecutionTraceNotFoundError,\n ExecutionTraceReadCompanionService,\n} from '../../meta-workflows/services/execution-trace-read.companion.service';\nimport {\n ApplicationBuildDispatchCompanionService,\n isBuildPlanHeldByFailedModule,\n ApplicationBuildPlanExhaustedError,\n ApplicationBuildTaskCompletedButUnlandedError,\n ApplicationBuildPlanUnavailableError,\n ApplicationBuildWaveInFlightError,\n ApplicationBuildStoppedByPersonError,\n BuildStopReleaseDoor,\n ApplicationDoesNotBootError,\n type ApplicationBuildWaveResult,\n} from '../../meta-workflows/services/application-build-dispatch.companion.service';\nimport { ApplicationBuildTaskNotACodingTaskError } from '../../meta-workflows/services/application-build-task-coding-policy.companion.service';\nimport { NothingToRearmError } from '../../meta-workflows/models/build-task-rearm.models';\nimport { BuildTaskDecisionRefusedError } from '../../meta-workflows/services/application-build-task-closure.companion';\nimport { ApplicationBuildUnknownGenerationStepError } from '../../meta-workflows/services/application-build-generation-step.companion.service';\nimport {\n describeFailedLandingRemedies,\n isBinaryWrittenFile,\n PlaybookRunWriteRegisterCompanionService,\n PlaybookRunWriteRecordNotFoundError,\n} from '../../meta-workflows/services/playbook-run-write-register.companion.service';\nimport { CreationRunReportCompanionService } from '../../meta-workflows/services/creation-run-report.companion.service';\nimport { CreationInterventionNotFoundError } from '../../meta-workflows/services/creation-intervention-ledger.companion.service';\nimport {\n composeGovernanceQuestionnaires,\n GovernanceQuestionnaireError,\n landGovernanceFactDeclarations,\n PlaybookOutputLandingHeldError,\n SpecificationWriteRefusedError,\n PlaybookElicitationError,\n PlaybookGenerationError,\n PlaybookClarificationError,\n type GovernanceFactDeclarationInput,\n type PlaybookElicitationAnswer,\n type PlaybookLoopResult,\n} from '@wildo-ai/application-creation-runtime';\nimport { MarketGenerationCompanionService } from '../../market/services/market-generation.companion.service';\nimport { holdOpenWithoutInactivityTimeout } from './long-held-request.companion';\nimport { LogoGenerationCompanionService } from '../../brand/services/logo-generation.companion.service';\nimport { assertCreationLanePreflight, CreationLanePreflightRefusedError } from '../../meta-workflows/services/creation-lane-preflight.companion.service';\nimport { LogoDeliberationCompanionService } from '../../brand/services/logo-deliberation.companion.service';\nimport { BrandAcceptCompanionService } from '../../brand/services/brand-accept.companion.service';\nimport { hasAcceptedBrandMarkInWorkingTree } from '../../brand/models/accepted-brand-mark.models';\nimport { ExpertPersonaCompanionService } from '../../expert-personas/services/expert-persona.companion.service';\nimport { DeliberationCompanionService } from '../../deliberations/services/deliberation.companion.service';\nimport { ExpertWorkDomain, FlowsActors_Status, describeModelProviderAccountRefusal } from '@wildo-ai/saas-models';\nimport { AcceptOrigin, ApplicationPlaybookInstanceClosureKind, ApplicationSpecificationFamily, BuildPlanTaskTargetKind } from '@wildo-ai/saas-specifications/application-creation';\nimport { SpecificationUnavailableError } from '@wildo-ai/saas-specifications';\nimport { describeDocumentationLaneRefusal, TechnicalDocCompanionService } from '../../technical-doc/services/technical-doc.companion.service';\nimport { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';\nimport {\n WorkspaceElementKind,\n WorkspaceElementOperation,\n getWorkspaceResource,\n mapWorkspaceElements,\n relatedWorkspaceResources,\n} from '../../core/introspection/workspace-element-index.companion';\nimport { describeWorkspaceFreshness, readWorkspaceElements } from '../../core/introspection/workspace-elements.companion';\nimport { CompanionExecutionsCompanionService } from '../../executions/services/companion-executions.companion.service';\nimport {\n ResearchAgentDispatchCompanionService,\n ResearchAgentUnavailableError,\n} from '../../claude-cli/services/research-agent-dispatch.companion.service';\nimport { CodingAgentDispatchCompanionService } from '../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport { AcceptedChangeCommitCompanionService, DecisionRecordActor } from '../../claude-cli/services/accepted-change-commit.companion.service';\nimport {\n COMPANION_TOKEN_HEADER,\n CompanionAuthFloorCompanionService,\n} from '../../core/auth/companion-auth-floor.companion.service';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport type { CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';\nimport { CompanionTraceabilityLevel, isTraceExemptProbe } from '../../core/traceability/companion-traceability.models';\nimport { CompanionTraceabilityService } from '../../core/traceability/companion-traceability.service';\nimport { companionRequestIsAdmittedByTokenFloor } from './companion-token-floor.policy';\nimport { COMPANION_TRACE_EXEMPT_GET_PATHS } from './companion-trace-exemptions';\nimport { SPECIFICATION_CONTEXT_VALIDATION_ERROR_NAME } from '../../core/specifications/specification-context-factory.models';\nimport {\n INTROSPECTION_INPUT_VALIDATION_ERROR_NAME,\n INTROSPECTION_PARENT_TERMINATED_ERROR_NAME,\n} from '../../core/introspection/models/companion-introspection.models';\nimport { StructuredDataCatalogAuditService } from '../../core/catalogs/structured-data-catalog-audit.service';\nimport {\n assertCompanionAvailableLanguage,\n assertEmailTemplateTestSendSucceeded,\n parseCompanionTargetLocales,\n} from './companion-i18n-api-contract.utils';\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { MetaWorkflow_ClarificationAction } from '@wildo-ai/saas-models/meta-workflows';\n\n/**\n * Dev-companion HTTP surface mounted under {@link getCustomMountBasePath}\n * (`/api/companion`). Hosts labelling, email-template authoring, file\n * operations, persisted executions, meta/introspection, and market generation\n * routes.\n *\n * ── OD-4.a ─ `/api/companion/email-templates/*` routing contract ─────────────\n *\n * The `email-templates/*` route group (`generate`, `preview`, `test-send`,\n * `status`, `translate`) targets the **filesystem-based** template registry\n * exposed via {@link EmailTemplateCompanionService}, which delegates every\n * read through the in-memory `EmailTemplateRegistryBackendService`\n * (file: `engine/saas-backend-lib/src/notifications/email/services/email-template-registry.backend.service.ts`).\n *\n * It does NOT — and must never — reach for the deleted DB-backed\n * `EMAIL_TEMPLATES` core resource. That `CoreResourceType` member, its\n * resource-config, repository, registry wiring, presets, schemas, header /\n * footer sibling, and all event-triggered batch coupling were removed\n * with the email-templates deprecation.\n *\n * The `/email-templates/*` path segment therefore reflects the **conceptual\n * surface** the operator interacts with — the developer-facing template\n * authoring flow — not a persistence layer. Renaming the routes would break\n * existing companion-frontend wiring and provides no semantic gain. The\n * filesystem-only contract is pinned by\n * `src/email/services/__tests__/email-template-preview.companion.service.test.ts`,\n * which fails fast if the preview path ever drifts back toward a DB-backed\n * lookup.\n */\n/**\n * When this companion process started, computed ONCE (review of 6fe527ed3): derived per request from `process.uptime()`\n * it moves by a millisecond between calls, and the creation driver would read every move as a restart.\n */\nconst COMPANION_PROCESS_STARTED_AT = new Date(Date.now() - process.uptime() * 1000).toISOString();\n\n@injectable()\nexport class CompanionController extends AbstractControllerBackendService {\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService) errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.ErrorHandlerService) errorHandler: ErrorHandlerService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext)\n private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.LabellingPlannerService) private readonly labellingPlannerService: LabellingPlannerCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LabellizeOrchestratorService) private readonly labellizeOrchestratorService: LabellizeOrchestratorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunWriteRegisterService) private readonly runWriteRegister: PlaybookRunWriteRegisterCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TranslateOrchestratorService) private readonly translateOrchestratorService: TranslateOrchestratorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.EmailTemplateLabellingUnitsService)\n private readonly emailTemplateLabellingUnitsService: EmailTemplateLabellingUnitsCompanionService,\n @inject(COMPANION_SERVICE_TYPES.EmailTemplateService) private readonly emailTemplateService: EmailTemplateCompanionService,\n @inject(COMPANION_SERVICE_TYPES.MarketGenerationService) private readonly marketGenerationService: MarketGenerationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunService) private readonly playbookRunService: PlaybookRunCompanionService,\n @inject(COMPANION_SERVICE_TYPES.DossierService) private readonly dossierService: DossierCompanionService,\n @inject(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService) private readonly creationPlaneProjection: CreationPlaneProjectionCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService) private readonly buildDispatchService: ApplicationBuildDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.CreationRunReportService) private readonly creationRunReport: CreationRunReportCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ExecutionTraceReadService) private readonly executionTraceReadService: ExecutionTraceReadCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LogoGenerationService) private readonly logoGenerationService: LogoGenerationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.LogoDeliberationService) private readonly logoDeliberationService: LogoDeliberationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.BrandAcceptService) private readonly brandAcceptService: BrandAcceptCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ExpertPersonaService) private readonly expertPersonaService: ExpertPersonaCompanionService,\n @inject(COMPANION_SERVICE_TYPES.DeliberationService) private readonly deliberationService: DeliberationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TechnicalDocService) private readonly technicalDocService: TechnicalDocCompanionService,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService) private readonly companionIntrospectionService: CompanionIntrospectionService,\n @inject(COMPANION_SERVICE_TYPES.ExecutionsService) private readonly executionsService: CompanionExecutionsCompanionService,\n @inject(COMPANION_SERVICE_TYPES.TraceabilityService) private readonly traceabilityService: CompanionTraceabilityService,\n @inject(COMPANION_SERVICE_TYPES.CodingAgentDispatchService) private readonly codingAgentDispatchService: CodingAgentDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ResearchAgentDispatchService) private readonly researchAgentDispatchService: ResearchAgentDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.AuthFloorService) private readonly authFloorService: CompanionAuthFloorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.AcceptedChangeCommitService) private readonly acceptedChangeCommitService: AcceptedChangeCommitCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookInstanceService) private readonly playbookInstanceService: PlaybookInstanceCompanionService,\n @inject(SAAS_SERVICE_TYPES.ExternalProvidersRegistryService) private readonly externalProvidersRegistry: ExternalProvidersRegistryBackendService,\n /**\n * The classifier the `wildo context elements` door screens research-informed elements through (#2938), as the coding\n * brief does. Optional: an absent service is \"no classifier bound\", which marks rather than refuses.\n */\n @inject(SAAS_SERVICE_TYPES.ContentSafetyService) @optional() private readonly contentSafety?: ContentSafetyBackendService,\n ) {\n super(logger, errorBuilder, errorHandler, 'CompanionController');\n }\n\n protected setupRoutes(): void {\n /*\n * The P-29b token floor, and it is registered FIRST on purpose — ahead of the trace middleware.\n *\n * An unauthorized caller must not be able to open a trace session: `attachRequestTraceSession`\n * allocates a session directory per non-exempt request, so gating after it would let anyone who\n * can reach the port spend disk and evict live sessions without ever passing a single handler.\n * Refuse first, then trace what was admitted.\n */\n this.router.use(this.enforceLocalTokenFloor.bind(this));\n\n this.router.use(this.attachRequestTraceSession.bind(this));\n\n /*\n * A write may change what any status read would answer, so it drops the held ones (#3207, see\n * ReadVerbSnapshots) — when it ARRIVES, and again when it FINISHES, so a read derived while the write ran\n * cannot be held as current afterwards. Every non-GET counts as a write unless it is one of the declared\n * read-only POSTs: an unknown route errs toward a fresh answer, and the declared ones include the read\n * coding agents make constantly during a wave (`wildo context info` → `POST /_meta/introspect`).\n */\n this.router.use((req: Request, res: Response, next: NextFunction) => {\n if (isStatusChangingRequest(req.method, req.path)) {\n this.readVerbSnapshotsHolder?.invalidate();\n res.once('finish', () => this.readVerbSnapshotsHolder?.invalidate());\n }\n next();\n });\n\n // Health\n this.router.get('/', this.asyncHandler(this.health.bind(this)));\n this.logRouteRegistration('get', '/', 'Companion health');\n\n // ── Labelling (per-unit, lock-file-tracked) ────────────────────\n // The decentralized labelling pipeline:\n // 1. /labelling/plan → list units (components, resources, themes, …)\n // 2. /labelling/labellize → primary-language labels per unit\n // 3. /labelling/translate → per-unit per-locale translations\n //\n // There is intentionally no aggregate step. Per-unit files are the\n // runtime source of truth — apps load them via\n // `scanCustomLabelsDirectory` from `@wildo-ai/saas-backend-lib`,\n // which walks the per-unit tree at module load. Keeping things\n // separated is the contract.\n this.router.get('/labelling/plan', this.asyncHandler(this.labellingPlan.bind(this)));\n this.logRouteRegistration('get', '/labelling/plan', 'List planned labelling units');\n\n // The translate pipeline's email lane (#1908): translate-only units, one per email template. A\n // separate listing from `/labelling/plan` because that plan is what LABELLIZE iterates, and an\n // email's primary words are authored, never labellized.\n this.router.get('/labelling/email-template-units', this.asyncHandler(this.labellingEmailTemplateUnits.bind(this)));\n this.logRouteRegistration('get', '/labelling/email-template-units', 'List translate-only email template units');\n\n this.router.post('/labelling/labellize', this.asyncHandler(this.labellingLabellize.bind(this)));\n this.logRouteRegistration('post', '/labelling/labellize', 'Run per-unit labellize for primary locale');\n\n this.router.post('/labelling/translate', this.asyncHandler(this.labellingTranslate.bind(this)));\n this.logRouteRegistration('post', '/labelling/translate', 'Run per-unit per-locale translation');\n\n // ── Email templates ────────────────────────────────────────────\n // OD-4.a: every route in this block resolves through the\n // **filesystem-based** `EmailTemplateRegistryBackendService` via\n // `EmailTemplateCompanionService` — never through a DB repository for the\n // (deleted) `EMAIL_TEMPLATES` core resource. See the class JSDoc above.\n this.router.post('/email-templates/generate', this.asyncHandler(this.emailTemplatesGenerate.bind(this)));\n this.logRouteRegistration('post', '/email-templates/generate', 'Generate email templates');\n\n this.router.post('/email-templates/preview', this.asyncHandler(this.emailTemplatesPreview.bind(this)));\n this.logRouteRegistration('post', '/email-templates/preview', 'Preview email template');\n\n this.router.post('/email-templates/test-send', this.asyncHandler(this.emailTemplatesTestSend.bind(this)));\n this.logRouteRegistration('post', '/email-templates/test-send', 'Send test email from template');\n\n this.router.get('/email-templates/status', this.asyncHandler(this.emailTemplatesStatus.bind(this)));\n this.logRouteRegistration('get', '/email-templates/status', 'Get email template filesystem status');\n\n this.router.post('/email-templates/translate', this.asyncHandler(this.emailTemplatesTranslate.bind(this)));\n this.logRouteRegistration('post', '/email-templates/translate', 'Translate email templates');\n\n // ── File operations ────────────────────────────────────────────\n this.router.post('/files/update', this.asyncHandler(this.updateFiles.bind(this)));\n this.logRouteRegistration('post', '/files/update', 'Update files');\n\n this.router.get('/file', this.asyncHandler(this.getFile.bind(this)));\n this.logRouteRegistration('get', '/file', 'Get single file');\n\n this.router.get('/files/list', this.asyncHandler(this.listFiles.bind(this)));\n this.logRouteRegistration('get', '/files/list', 'List files in directory');\n\n // ── Persisted executions ────────────────────────────────────────\n this.router.post('/executions/actors', this.asyncHandler(this.createActorExecution.bind(this)));\n this.logRouteRegistration('post', '/executions/actors', 'Persist actor execution');\n\n this.router.get('/executions/actors', this.asyncHandler(this.listActorExecutions.bind(this)));\n this.logRouteRegistration('get', '/executions/actors', 'List persisted actor executions');\n\n this.router.get('/executions/actors/:executionId', this.asyncHandler(this.getActorExecution.bind(this)));\n this.logRouteRegistration('get', '/executions/actors/:executionId', 'Read persisted actor execution');\n\n this.router.post('/executions/flows', this.asyncHandler(this.createFlowExecution.bind(this)));\n this.logRouteRegistration('post', '/executions/flows', 'Persist flow execution');\n\n this.router.get('/executions/flows', this.asyncHandler(this.listFlowExecutions.bind(this)));\n this.logRouteRegistration('get', '/executions/flows', 'List persisted flow executions');\n\n this.router.get('/executions/flows/:executionId', this.asyncHandler(this.getFlowExecution.bind(this)));\n this.logRouteRegistration('get', '/executions/flows/:executionId', 'Read persisted flow execution');\n\n this.router.post('/tasks/actors', this.asyncHandler(this.createActorTask.bind(this)));\n this.logRouteRegistration('post', '/tasks/actors', 'Persist actor task');\n\n this.router.get('/tasks/actors', this.asyncHandler(this.listActorTasks.bind(this)));\n this.logRouteRegistration('get', '/tasks/actors', 'List persisted actor tasks');\n\n this.router.get('/tasks/actors/:taskId', this.asyncHandler(this.getActorTask.bind(this)));\n this.logRouteRegistration('get', '/tasks/actors/:taskId', 'Read persisted actor task');\n\n this.router.patch('/tasks/actors/:taskId', this.asyncHandler(this.updateActorTask.bind(this)));\n this.logRouteRegistration('patch', '/tasks/actors/:taskId', 'Update persisted actor task');\n\n // ── Meta / introspection ───────────────────────────────────────\n this.router.get('/_meta/resources-registry', this.asyncHandler(this.getResourcesRegistry.bind(this)));\n this.logRouteRegistration('get', '/_meta/resources-registry', 'Get resources registry');\n\n this.router.get('/_meta/resources-registry/app/:appSlug', this.asyncHandler(this.getResourcesRegistry.bind(this)));\n this.logRouteRegistration('get', '/_meta/resources-registry/app/:appSlug', 'Get resources registry for specific app');\n\n this.router.post('/_meta/introspect', this.asyncHandler(this.requestIntrospection.bind(this)));\n this.logRouteRegistration('post', '/_meta/introspect', 'Execute companion introspection behavior');\n\n this.router.get('/_meta/introspect/behaviors', this.asyncHandler(this.listIntrospectionBehaviors.bind(this)));\n this.logRouteRegistration('get', '/_meta/introspect/behaviors', 'List companion introspection behaviors (the live-context menu)');\n\n this.router.post('/charts/audit', this.asyncHandler(this.chartsAudit.bind(this)));\n this.logRouteRegistration('post', '/charts/audit', 'Audit chart registration alignment (frontend chartViews vs backend registry)');\n\n this.router.get('/_meta/website/structured-data-audit', this.asyncHandler(this.getWebsiteStructuredDataAudit.bind(this)));\n this.logRouteRegistration(\n 'get',\n '/_meta/website/structured-data-audit',\n 'Audit website structured-data emissions against the merged Schema.org catalog',\n );\n\n // ── Runtime environment ─────────────────────────────────────────\n // `wildo secrets set` from a terminal asks the running companion to load a changed key (#1637).\n this.router.post('/runtime/env/apply', this.asyncHandler(this.applyRuntimeEnvVariables.bind(this)));\n this.logRouteRegistration('post', '/runtime/env/apply', 'Load named variables from the regenerated .env into this process (names only; values come from the file)');\n\n // ── Coding-agent status (typed Flows/Actors coding path) ───────\n // The raw POST /coding-agent/dispatch endpoint (caller-composed prompt)\n // was deleted at the first-activation hard cut: every coding run now\n // enters through the typed `runApplicationCodingTask` wrapper on the\n // episode runtime. The GET status probe stays open (read-only routes\n // keep the DD-6 posture).\n this.router.get('/coding-agent/status', this.asyncHandler(this.codingAgentStatus.bind(this)));\n this.router.post('/coding-agent/cancel', this.asyncHandler(this.codingAgentCancel.bind(this)));\n // Interactive lane: answer a parked question (resume the same session), and\n // stream a run's live frames. The respond door is a WRITE (it resumes a\n // workspace-mutating run); the events stream is read-only.\n this.router.post('/coding-agent/session/respond', this.asyncHandler(this.codingAgentRespond.bind(this)));\n this.router.get('/coding-agent/session/events', this.codingAgentSessionEvents.bind(this));\n this.logRouteRegistration(\n 'get',\n '/coding-agent/status',\n 'Coding-agent dispatch readiness (does NOT guarantee CLI binary presence or auth)',\n );\n this.logRouteRegistration('post', '/coding-agent/session/respond', 'Answer a parked coding task question and resume the same session');\n this.logRouteRegistration('get', '/coding-agent/session/events', 'Server-sent live frames for an active coding session (taskId query)');\n\n // ── Prompt (TODO) ──────────────────────────────────────────────\n this.router.post('/prompt', this.asyncHandler(this.buildPrompt.bind(this)));\n this.logRouteRegistration('post', '/prompt', 'Build prompt from template and context');\n\n // ── Playbooks (application-creation, P2) ─────────────────────────\n // One compiled Framework Knowledge playbook, run end to end: brief the model against each declared\n // family's own schema, then write the answers as specification FILES. It writes and stops. Acceptance\n // is a commit (`.claude/rules/one-source-of-truth.md`, rules 2 and 3), made by a person or — under the\n // autonomy posture — by the companion before the next build baseline, authored as itself (#1534).\n this.router.get('/build/next', this.asyncHandler(this.serveFromLatestAnswer(ReadVerbSnapshotKey.BUILD_NEXT, this.describeNextBuildTask.bind(this))));\n this.logRouteRegistration('get', '/build/next', 'What the next ready build-plan run would be (either executor) — read-only');\n this.router.post('/build/dispatch-next', this.asyncHandler(this.dispatchNextBuildTask.bind(this)));\n this.router.get('/build/dispatches', this.asyncHandler(this.readBuildDispatches.bind(this)));\n this.router.post('/build/stop', this.asyncHandler(this.stopBuildWave.bind(this)));\n this.logRouteRegistration('post', '/build/stop', 'Ask the running build wave to start no new task and end once its live runs settle (#3206)');\n this.logRouteRegistration('get', '/build/dispatches', 'How far each recent detached build dispatch got (newest first) — a generation step finishes here; a coding run is admitted here and finishes in its actor-task row');\n this.logRouteRegistration('post', '/build/dispatch-next', 'Run the build: a parallel wave when the build parallelism is above one (async), else the next ready task (coding agent or companion generation step)');\n this.router.get('/build/tasks', this.asyncHandler(this.serveFromLatestAnswer(ReadVerbSnapshotKey.BUILD_TASKS, this.readBuildTaskRecords.bind(this))));\n this.logRouteRegistration('get', '/build/tasks', 'Every build-plan task in one read: its attempts, why it has not landed, and what its unmet probes searched for (#1521)');\n this.router.post('/build/tasks/:taskRef/rearm', this.asyncHandler(this.rearmBuildTask.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/rearm', 'Put a build task back in the queue after the reason it did not land was fixed, recording why on its completed runs (#1535)');\n this.router.post('/build/tasks/:taskRef/close', this.asyncHandler(this.closeBuildTask.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/close', 'Close a build task a commit or another task already built, or decline a derived follow-up, as a committed decision (#3224, #3227)');\n this.router.post('/build/tasks/:taskRef/settle-window', this.asyncHandler(this.settleBuildTaskRunWindows.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/settle-window', 'Bound the open window of a settled run that left no record of where HEAD was, so later build-task decisions count (#3224)');\n this.router.post('/build/tasks/:taskRef/approve', this.asyncHandler(this.approveFollowUpTask.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/approve', 'Let a derived follow-up run after the creator reviewed it, under a posture that reviews results (#3227)');\n /*\n * The console's build verbs (#1652): dispatch a NAMED task, and accept (commit) what a finished\n * coding or playbook run wrote. Both existed only as workbench operations, which need a signed-in\n * person; these call the same services, so the two doors cannot diverge.\n */\n this.router.post('/build/tasks/:taskRef/dispatch', this.asyncHandler(this.dispatchNamedBuildTask.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/dispatch', 'Run one named build-plan task (coding agent or generation step), whether or not it is next');\n this.router.post('/build/tasks/:taskRef/accept', this.asyncHandler(this.acceptBuildTaskRun.bind(this)));\n this.logRouteRegistration('post', '/build/tasks/:taskRef/accept', 'Commit what the latest coding run of a task wrote (body force:true includes files edited since; leftovers:true commits what earlier runs left that no automatic door will, #3267)');\n this.router.post('/build/checkpoint', this.asyncHandler(this.commitOperatorBuildCheckpoint.bind(this)));\n this.logRouteRegistration('post', '/build/checkpoint', 'A person commits the working tree the build\\'s runs share, naming every settled run no commit named yet (#1885)');\n // ── Execution traces (what actually happened) ────────────────────\n this.router.get('/traces', this.asyncHandler(this.listExecutionTraces.bind(this)));\n this.logRouteRegistration('get', '/traces', 'Recent execution sessions');\n this.router.get('/traces/:sessionId', this.asyncHandler(this.readExecutionTrace.bind(this)));\n this.logRouteRegistration('get', '/traces/:sessionId', 'One session: every event in order, and its step artifacts');\n this.router.get('/traces/:sessionId/usage', this.asyncHandler(this.readExecutionTraceUsage.bind(this)));\n this.logRouteRegistration('get', '/traces/:sessionId/usage', 'What one session SPENT, in tokens — summed from the agent-call usage already in its events');\n this.router.get('/traces/:sessionId/steps/:stepDirName/artifacts/:fileName', this.asyncHandler(this.readExecutionTraceArtifact.bind(this)));\n // The trace sessions one actor task ran in — the alias the coding lane already writes, read (#1328).\n this.router.get('/trace-aliases/actor-task/:taskId', this.asyncHandler(this.listActorTaskTraceSessions.bind(this)));\n this.logRouteRegistration('get', '/traces/:sessionId/steps/:stepDirName/artifacts/:fileName', 'One artifact body — the brief the model saw, or the answer it gave');\n\n this.router.post('/research', this.asyncHandler(this.runResearchTask.bind(this)));\n this.logRouteRegistration('post', '/research', 'Run one READ-ONLY research objective and return the evidence it found (no writes, no lock)');\n this.router.get('/workspace/elements', this.asyncHandler(this.readWorkspaceElements.bind(this)));\n this.logRouteRegistration('get', '/workspace/elements', \"The application's OWN CODE truth by resource — map | get | related, instead of a 43KB registry read\");\n this.router.get('/playbooks/coherence', this.asyncHandler(this.readCoherenceReport.bind(this)));\n this.logRouteRegistration('get', '/playbooks/coherence', 'Cross-family coherence of the CURRENT working tree — what is stated with nothing behind it, and what references something absent');\n this.router.get('/playbooks', this.asyncHandler(this.serveFromLatestAnswer(ReadVerbSnapshotKey.PLAYBOOKS, this.listPlaybooks.bind(this))));\n this.router.post('/playbooks/refresh-board', this.asyncHandler(this.refreshPlaybookBoard.bind(this)));\n this.logRouteRegistration('post', '/playbooks/refresh-board', 'Drop the eligibility cache so the next read recomputes');\n this.router.get('/playbooks/runs', this.asyncHandler(this.readPlaybookRunsInFlight.bind(this)));\n /*\n * Registered beside `/playbooks/runs` and BEFORE `/playbooks/:playbookRef/run`, which is the\n * ordering discipline this router already keeps: a literal segment that a parameterised route\n * could swallow goes first. `suspended` is one segment against that route's two, so nothing\n * shadows it today — the placement is to keep the rule visible rather than to fix a collision.\n */\n this.router.get('/playbooks/suspended', this.asyncHandler(this.readSuspendedPlaybookRuns.bind(this)));\n this.logRouteRegistration('get', '/playbooks/suspended', 'Runs waiting for creator answers — the third state, in neither /playbooks/runs bucket');\n this.router.post('/playbooks/loop', this.asyncHandler(this.runPlaybookLoop.bind(this)));\n this.logRouteRegistration('post', '/playbooks/loop', 'Chain playbooks: deterministic gate, model choice, run, repeat');\n this.logRouteRegistration('get', '/playbooks', 'Eligibility board: which playbooks can run now, and why not the rest');\n this.router.get('/playbooks/:playbookRef/decision', this.asyncHandler(this.readPlaybookElicitationDecision.bind(this)));\n this.logRouteRegistration('get', '/playbooks/:playbookRef/decision', \"The interview this playbook declares, as a decision payload — null when it asks nothing\");\n this.router.post('/playbooks/:playbookRef/instances', this.asyncHandler(this.openPlaybookInstance.bind(this)));\n this.logRouteRegistration('post', '/playbooks/:playbookRef/instances', 'Open a playbook instance for a purpose (body instanceKey, purpose): recorded in the dossier and committed at once (#1609)');\n this.router.post('/playbooks/:playbookRef/instances/:instanceKey/close', this.asyncHandler(this.closePlaybookInstance.bind(this)));\n this.logRouteRegistration('post', '/playbooks/:playbookRef/instances/:instanceKey/close', 'Close a playbook instance (body kind: completed|abandoned, reason): recorded and committed; abandoning cancels its waiting runs (#1608)');\n this.router.post('/playbooks/:playbookRef/run', this.asyncHandler(this.runPlaybook.bind(this)));\n this.logRouteRegistration('post', '/playbooks/:playbookRef/run', 'Run one playbook and land its outputs as specification files (body dryRun:true tests the pipe, writes nothing)');\n this.router.post('/playbooks/runs/:runId/resume', this.asyncHandler(this.resumePlaybookRun.bind(this)));\n this.logRouteRegistration('post', '/playbooks/runs/:runId/resume', 'Answer a suspended run\\'s questions and continue it (action: accept | decline | cancel)');\n /*\n * The CREATION CONSOLE (2026-09-25): a coding-agent session drives creation and the workbench is\n * its dashboard, so the console needs the two things the workbench gets over the resource plane —\n * what the companion did, and every question it waits on — on the plane `wildo` speaks. Same rows,\n * same services; see `workbench-creation-console.custom.shared.schemas.ts`.\n */\n this.router.get('/creation/pulse', this.asyncHandler(this.readCreationConsolePulse.bind(this)));\n this.logRouteRegistration('get', '/creation/pulse', 'A cheap poll: a change cursor, the runs in flight, and what the last feed read counted — read the feed only when it moved');\n this.router.get('/specifications/findings', this.asyncHandler(this.readSpecificationFindings.bind(this)));\n this.logRouteRegistration('get', '/specifications/findings', 'The specifications the companion refused to serve, or why it could not evaluate the package (#3211)');\n this.router.get('/creation/feed', this.asyncHandler(this.serveFromLatestAnswer(ReadVerbSnapshotKey.CREATION_FEED, this.readCreationConsoleFeed.bind(this))));\n this.logRouteRegistration('get', '/creation/feed', 'What happened, what is asked of you, what could come next — Home\\'s lines with the row each points at');\n this.router.get('/creation/questions', this.asyncHandler(this.serveFromLatestAnswer(ReadVerbSnapshotKey.CREATION_QUESTIONS, this.readCreationConsoleQuestionQueue.bind(this))));\n this.logRouteRegistration('get', '/creation/questions', 'Every question waiting on the person, as one queue (clarifications, parked coding runs, interview, governance facts)');\n this.router.get('/creation/report', this.asyncHandler(this.readCreationRunReport.bind(this)));\n this.logRouteRegistration('get', '/creation/report', 'The run report: every intervention a person made and what it unblocked, spend per run (coding runs included), the independence score (#2231). Read-only');\n /*\n * The UNATTENDED DRIVER's two doors (#2233): what still runs (the pulse counts detached runs only, and a loop is not\n * one), and the accept the autonomy posture makes for pending playbook runs. The driver itself lives in the CLI.\n */\n this.router.get('/creation/drive/status', this.asyncHandler(this.readCreationDriveStatus.bind(this)));\n this.logRouteRegistration('get', '/creation/drive/status', 'What still runs (loops, detached runs) and the pending usage-limit resume, for the unattended creation driver (#2233). Read-only');\n this.router.get('/creation/requirements/standing', this.asyncHandler(this.readCreationRequirementsStanding.bind(this)));\n this.logRouteRegistration('get', '/creation/requirements/standing', 'Where the application stands against its own requirements now: the maturity reading derived live and every item still open, which the unattended driver reads before it calls the goal reached (#3701). Read-only');\n this.router.post('/creation/drive/accept', this.asyncHandler(this.acceptForCreationDrive.bind(this)));\n this.logRouteRegistration('post', '/creation/drive/accept', 'Commit pending playbook runs when the autonomy posture accepts them, never inside a live coding run (#2233)');\n this.router.get('/creation/timeline', this.asyncHandler(this.readCreationJourneyTimeline.bind(this)));\n this.logRouteRegistration('get', '/creation/timeline', 'How long each phase of the journey took, the wall clock, and the slowest build tasks with their dispatch wait and run time (#3206). Read-only');\n this.router.post('/creation/interventions/:interventionId/reason', this.asyncHandler(this.stateCreationInterventionReason.bind(this)));\n this.logRouteRegistration('post', '/creation/interventions/:interventionId/reason', 'Say why a person intervened (body reason): the one thing the intervention ledger asks; refused for an id the report does not hold (#2231)');\n this.router.get('/creation/launch-blockers', this.asyncHandler(this.readCreationLaunchBlockers.bind(this)));\n this.logRouteRegistration('get', '/creation/launch-blockers', 'What still stands between the application and a real user — each open compliance decision, where it is decided and what settles it (#2238). Marks, never blocks');\n this.router.post('/creation/questions/answer', this.asyncHandler(this.answerCreationConsoleQuestion.bind(this)));\n this.logRouteRegistration('post', '/creation/questions/answer', 'Answer, decline or cancel one queued question — routed to the service the workbench operation calls');\n this.router.post('/creation/interview/depth', this.asyncHandler(this.setCreationInterviewDepth.bind(this)));\n this.logRouteRegistration('post', '/creation/interview/depth', 'Record how deep this application\\'s interviews go (simple | detailed), in its dossier (#2129)');\n this.router.post('/creation/interview/proposals', this.asyncHandler(this.proposeCreationInterviewAnswers.bind(this)));\n this.logRouteRegistration('post', '/creation/interview/proposals', 'Propose answers to interview questions the person does not know; writes nothing (#2129)');\n this.router.post('/playbooks/:playbookRef/judge', this.asyncHandler(this.judgePlaybookArtifacts.bind(this)));\n this.logRouteRegistration('post', '/playbooks/:playbookRef/judge', 'Judge SUPPLIED artifacts against a playbook\\'s evaluation treatment (the judge value-eval bench; nothing lands)');\n /*\n * The governed-document questions a HUMAN must answer (#192).\n *\n * Read-only and derived from the engine catalog, so it needs no application state and answers the\n * same for every caller. It exists because the blueprint's question surface had no consumer at all:\n * the questions were compiled into the reference docs shipped to application builders and rendered\n * by nothing, so 25 of the 39 catalogued facts could not be established and every clause resting on\n * them refused. This is the door a host renders; landing the answers is `buildGovernanceFactDeclarations`.\n */\n this.router.get('/compliance/governance-questions', this.asyncHandler(this.readGovernanceQuestions.bind(this)));\n this.logRouteRegistration('get', '/compliance/governance-questions', 'Governed-document facts only a human may establish, per document (?definitionRef= to narrow)');\n this.router.post('/compliance/governance-facts', this.asyncHandler(this.landGovernanceFacts.bind(this)));\n this.logRouteRegistration('post', '/compliance/governance-facts', 'Land one document\\'s human-established facts as the document-facts-authored family');\n this.router.get('/runs/writes', this.asyncHandler(this.listRunWrites.bind(this)));\n this.logRouteRegistration('get', '/runs/writes', 'The write register: which files each playbook run wrote, revertible per run');\n this.router.post('/runs/writes/:runId/accept', this.asyncHandler(this.acceptPlaybookRunWrites.bind(this)));\n this.logRouteRegistration('post', '/runs/writes/:runId/accept', 'Commit what one playbook run wrote (body force:true includes files edited since)');\n this.router.post('/creation/dossier/accept', this.asyncHandler(this.acceptDossier.bind(this)));\n this.logRouteRegistration('post', '/creation/dossier/accept', 'Commit the creator\\'s recorded answers (the dossier) on their own (#2332)');\n this.router.post('/runs/writes/:runId/revert', this.asyncHandler(this.revertRunWrites.bind(this)));\n this.logRouteRegistration('post', '/runs/writes/:runId/revert', 'Restore the pre-images of one run (refuses files a human edited since, unless body force:true; always refuses files a later run landed on)');\n this.router.get('/runs/writes/:runId/diff', this.asyncHandler(this.readRunWritesDiff.bind(this)));\n this.logRouteRegistration('get', '/runs/writes/:runId/diff', 'What one run CHANGED, per file — a unified diff from the register, so it is the run\\'s own change rather than everything uncommitted');\n\n // ── Market (Market generation, Phase 4.2) ───────────────────────\n this.router.post('/market/generate', this.asyncHandler(this.marketGenerate.bind(this)));\n this.router.post('/brand/generate-logo', this.asyncHandler(this.brandGenerateLogo.bind(this)));\n this.router.post('/brand/deliberate-logo', this.asyncHandler(this.brandDeliberateLogo.bind(this)));\n this.router.post('/brand/accept-logo', this.asyncHandler(this.brandAcceptLogo.bind(this)));\n this.router.post('/brand/logo', this.asyncHandler(this.brandLogo.bind(this)));\n this.logRouteRegistration('post', '/brand/logo', 'Draw and accept the logo in one call (deliberate-logo then accept-logo); refuses over an accepted mark unless body redraw:true');\n this.logRouteRegistration(\n 'post',\n '/market/generate',\n 'Render a market generation message template + invoke generation agent',\n );\n this.logRouteRegistration(\n 'post',\n '/brand/deliberate-logo',\n 'Art-director brief → per-direction generation → expert-panel deliberation → stage the winner',\n );\n this.logRouteRegistration(\n 'post',\n '/brand/accept-logo',\n 'Judge + promote a staged logo candidate into the specification SSOT (accept review point)',\n );\n\n // ── Expert personas (agentic deliberation system) ────────────────\n this.router.post('/expert-personas/derive', this.asyncHandler(this.expertPersonaDerive.bind(this)));\n this.router.post('/expert-personas/accept', this.asyncHandler(this.expertPersonaAccept.bind(this)));\n this.logRouteRegistration(\n 'post',\n '/expert-personas/derive',\n 'Derive an app-specific expert-persona charter proposal from a framework role template + the spec artifacts',\n );\n this.logRouteRegistration(\n 'post',\n '/expert-personas/accept',\n 'Promote a staged expert-persona charter proposal into specifications/src/personas/ (committed SSOT)',\n );\n\n // ── Deliberations (agentic deliberation system, Step 3) ──────────\n this.router.post('/deliberations/run', this.asyncHandler(this.deliberationRun.bind(this)));\n this.logRouteRegistration(\n 'post',\n '/deliberations/run',\n 'Run a charter-built expert-panel deliberation over TEXT candidates (rubric → rounds → synthesis)',\n );\n\n // ── Technical documentation ─────\n this.router.post(\n '/technical-doc/generate-openapi',\n this.asyncHandler(this.technicalDocGenerateOpenApi.bind(this)),\n );\n this.logRouteRegistration(\n 'post',\n '/technical-doc/generate-openapi',\n 'Generate consumer API OpenAPI documents on demand',\n );\n this.router.post('/technical-doc/publish-openapi', this.asyncHandler(this.technicalDocPublishOpenApi.bind(this)));\n this.logRouteRegistration('post', '/technical-doc/publish-openapi', 'Publish generated OpenAPI files into the stable API-reference tree');\n\n // ── Technical documentation source-based derivation (decision D14) ──\n this.router.post(\n '/technical-doc/derive-bundles',\n this.asyncHandler(this.technicalDocDeriveBundles.bind(this)),\n );\n this.logRouteRegistration(\n 'post',\n '/technical-doc/derive-bundles',\n 'Derive the source-based documentation evidence snapshot + authorized bundles (read-only)',\n );\n\n // ── Technical documentation generation (synchronizes src/generated/consumer-documentation/) ──\n this.router.post(\n '/technical-doc/publish-managed',\n this.asyncHandler(this.technicalDocPublishManaged.bind(this)),\n );\n this.logRouteRegistration(\n 'post',\n '/technical-doc/publish-managed',\n 'Derive, render, measure, validate and publish the complete managed documentation tree',\n );\n this.router.get(\n '/technical-doc/api-reference-categories',\n this.asyncHandler(this.technicalDocCheckApiReferenceCategories.bind(this)),\n );\n this.logRouteRegistration(\n 'get',\n '/technical-doc/api-reference-categories',\n 'Check the API-reference categories against the resources a publish would document (read-only)',\n );\n\n }\n\n public getCustomMountBasePath(): string { return '/api/companion'; }\n\n /**\n * The P-29b local-token floor, finally applied (issue: the gate that was minted and never mounted).\n *\n * `CompanionAuthFloorCompanionService` has minted a 0600 machine-local token on every companion boot\n * since P-29 landed, and `isValidToken` / `buildUnauthorizedError` were written for a middleware that\n * was deleted along with the one endpoint it guarded. Nothing replaced it, so from that day the\n * loopback bind was the ENTIRE protection for every mutating route on this controller — coding\n * dispatch, playbook runs, run-write revert, every LLM call that spends money.\n *\n * What the token adds over the loopback bind is narrow and worth stating, because the floor's own\n * JSDoc is careful about what it does NOT prove: it is not evidence of human presence, and it does\n * not stop a same-uid process that can read the file. What it stops is a caller that can reach the\n * port but cannot read the filesystem — the shape of a page in the operator's browser, or any other\n * process on the machine sending a request it did not earn the right to send.\n *\n * Fails CLOSED in every direction: a missing header, an unparsable header, a token from a previous\n * boot, and an uninitialized floor (`expectedTokenDigest === null`) all refuse.\n *\n * `req.path` is mount-relative here (`/playbooks/loop`, not `/api/companion/playbooks/loop`) and\n * excludes the query string — the same coordinate `attachRequestTraceSession` already compares\n * against. A path variant that the exemption list does not match exactly (a trailing slash, say)\n * refuses, which is the safe direction: it also matches no route.\n *\n * ## Where the access DECISION is recorded, and why not in a store\n *\n * assurance-control: WILDO.ACCESS.AUTHORIZATION_DECISION_AUDIT — every REFUSAL on the local control\n * plane leaves a record unconditionally; admissions leave one at the configured traceability level.\n *\n * The asymmetry is stated rather than smoothed over, because the two halves have different\n * guarantees and a marker a sweep will trust must not claim the weaker one is the stronger:\n *\n * - **Refusals — unconditional.** Recorded by the error pipeline, not by this method.\n * `ErrorType.AUTHENTICATION` declares `backendActions: [LOG, RECORD_METRICS]`\n * (`errors.shared.definitions.ts`), so `buildUnauthorizedError` emits a `warn` carrying the\n * method, the path, the correlation id and the trace id. Measured on a live companion,\n * 2026-09-10: one refusal, one log line, full context — which is also the ONLY place that context\n * survives, since `sanitizeErrorForClient` strips it from the response.\n * - **Admissions — level-dependent.** `attachRequestTraceSession` runs one middleware later and\n * opens a session for every admitted request (its exemptions, `/`, `/health` and\n * `/coding-agent/status`, are GET-only), but `createApiRequestSession` builds an IN-MEMORY\n * context: nothing reaches disk until the first event passes the level gate, and\n * `CompanionTraceabilityLevel.NONE` exists. At `NONE` an admitted mutating request persists\n * nothing here. That is a defensible default for a development daemon and it is not a claim that\n * admissions are always recorded.\n * - **The ORDER is deliberate**: refuse first, then trace what was admitted, so an unauthorized\n * caller cannot spend a session directory. It is pinned — see the mounting suite.\n *\n * A separate durable audit STORE was considered and refused. One existed until the digest\n * demolition: `.wildo-saas/state/audit/companion-security-events/` still holds 212\n * `LOCAL_CONTROL_PLANE_ACCESS_DECIDED` records, each with an `eventDigest`, and the type is gone\n * from the source tree. Rebuilding it would reintroduce exactly what\n * `.claude/rules/one-source-of-truth.md` Rule 0 puts out at this stage, for a loopback development\n * daemon with no deployed counterpart — and\n * `.claude/rules/application-creation-directive.md` is explicit that a record nobody reads is a\n * record we do not write. If a companion ever faces something other than this machine, that is the\n * decision to revisit, and the marker above is what a sweep will find.\n */\n private enforceLocalTokenFloor(req: Request, _res: Response, next: NextFunction): void {\n const admitted = companionRequestIsAdmittedByTokenFloor(\n { method: req.method, path: req.path, presentedToken: req.headers[COMPANION_TOKEN_HEADER] },\n (presented) => this.authFloorService.isValidToken(presented),\n );\n if (admitted) {\n next();\n return;\n }\n next(this.authFloorService.buildUnauthorizedError(`${req.method} ${req.path}`));\n }\n\n private attachRequestTraceSession(req: Request, res: Response, next: NextFunction): void {\n // Polled probes are infrastructure noise, not build-time work — see\n // `isTraceExemptProbe` for the full rationale (session-dir spam + live-\n // session eviction under the always-on traceability default).\n if (isTraceExemptProbe(req.method, req.path, COMPANION_TRACE_EXEMPT_GET_PATHS)) {\n next();\n return;\n }\n const sessionContext = this.traceabilityService.createApiRequestSession({\n method: req.method,\n routePath: req.path,\n urlPath: req.originalUrl || req.url,\n ip: req.ip,\n userAgent: req.get('user-agent') ?? undefined,\n });\n\n res.locals.companionTraceSession = sessionContext;\n // Held until the response closes, so trace retention never removes a session that is still being\n // written — an event stream can stay open for days.\n this.traceabilityService.holdOpenRequestSession(sessionContext);\n let didFinish = false;\n void this.traceabilityService.traceEvent({\n session: sessionContext,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-start',\n summary: `Start ${req.method.toUpperCase()} ${req.path}`,\n payload: {\n method: req.method.toUpperCase(),\n url: req.originalUrl || req.url,\n query: req.query,\n },\n });\n\n res.on('finish', () => {\n didFinish = true;\n void this.traceabilityService.traceEvent({\n session: sessionContext,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-finish',\n summary: `Finish ${req.method.toUpperCase()} ${req.path} with ${res.statusCode}`,\n payload: {\n method: req.method.toUpperCase(),\n url: req.originalUrl || req.url,\n statusCode: res.statusCode,\n },\n });\n });\n res.on('close', () => {\n // `close` follows `finish` as well, so this is the one place every response passes on its way out.\n this.traceabilityService.releaseOpenRequestSession(sessionContext);\n if (didFinish) {\n return;\n }\n\n void this.traceabilityService.traceEvent({\n session: sessionContext,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'api-request-close',\n summary: `Connection closed before finish for ${req.method.toUpperCase()} ${req.path}`,\n payload: {\n method: req.method.toUpperCase(),\n url: req.originalUrl || req.url,\n statusCode: res.statusCode,\n },\n });\n });\n\n // Everything this request starts runs under its session — including a detached run that\n // outlives the response, and model calls whose caller named no session (#1264).\n this.traceabilityService.runWithActiveSession(sessionContext, () => next());\n }\n\n private getTraceSession(res: Response): CompanionExecutionSessionContext | undefined {\n return res.locals.companionTraceSession as CompanionExecutionSessionContext | undefined;\n }\n\n private createTraceStep(\n res: Response,\n kind: string,\n label: string,\n ) {\n const session = this.getTraceSession(res);\n return session\n ? this.traceabilityService.createStep(session, { kind, label })\n : undefined;\n }\n\n private async traceSessionEvent(\n res: Response,\n minimumLevel: CompanionTraceabilityLevel,\n type: string,\n summary: string,\n payload?: unknown,\n step?: ReturnType<CompanionTraceabilityService['createStep']>,\n ): Promise<void> {\n const session = this.getTraceSession(res);\n if (!session) {\n return;\n }\n\n await this.traceabilityService.traceEvent({\n session,\n minimumLevel,\n type,\n summary,\n ...(payload !== undefined ? { payload } : {}),\n ...(step ? { step } : {}),\n });\n }\n\n private async traceSessionArtifact(\n res: Response,\n minimumLevel: CompanionTraceabilityLevel,\n fileName: string,\n content: unknown,\n step?: ReturnType<CompanionTraceabilityService['createStep']>,\n ): Promise<void> {\n const session = this.getTraceSession(res);\n if (!session) {\n return;\n }\n\n await this.traceabilityService.writeArtifact({\n session,\n minimumLevel,\n fileName,\n content,\n ...(step ? { step } : {}),\n });\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // HEALTH\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async health(_req: Request, res: Response, _next: NextFunction) {\n this.jsonSuccess(res, { status: 'ok', service: 'dev-companion' });\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // LABELLING (per-unit, lock-file-tracked)\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async labellingPlan(_req: Request, res: Response, next: NextFunction) {\n try {\n /*\n * WITH completeness. This used to call `planAllUnits()`, which returns `.units` and DROPS the\n * planner's own incompleteness report — so a plan that silently suppressed whole families\n * answered exactly like a complete one.\n *\n * That is not hypothetical: milestone labels were never planned for ANY application (#1405).\n * The planner read `MilestoneDefinitionRegistry`, which IS bound here — its only production\n * writer is `startApplication()`, which the companion never runs, so it answered `[]` forever\n * while a bound-but-empty read was treated as an authoritative \"no milestones\". The family is\n * now planned from the introspection snapshot. The consequence reached a user — a celebration\n * with no milestone words falls back\n * to the notification centre's generic `defaultSuccess`, and the progression tracker renders\n * `milestones.<ref>.title` as a raw key — and the one mechanism that knew why was reporting it\n * into a value nobody read.\n */\n const plan = await this.labellingPlannerService.planAllUnitsWithCompleteness();\n const summary = plan.units.map((u) => ({\n id: u.id,\n category: u.category,\n displayLabel: u.displayLabel,\n bucket: u.filePathHint.bucket,\n slug: u.filePathHint.slug,\n chunkCount: u.chunks.length,\n keyCount: u.chunks.reduce((sum, c) => sum + c.keys.length, 0),\n }));\n this.jsonSuccess(res, {\n totalUnits: plan.units.length,\n units: summary,\n incompleteness: plan.incompleteness,\n });\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * Audit chart-registration alignment: compares every frontend\n * `chartViews[].chartDefinition.ref` (materialized in the FRONTEND subprocess)\n * against the backend-registered chart refs (from the merged backend modules).\n * Returns the two-channel report — `unregisteredFrontendCharts` (each a\n * guaranteed runtime `chart_not_found` 404) + `orphanBackendCharts` (backend-only\n * charts, valid for API/programmatic use). The CLI renders + gates on it.\n */\n private async chartsAudit(_req: Request, res: Response, next: NextFunction) {\n try {\n // Frontend side — the chart authoring surface, readable only in the frontend subprocess.\n const appFrontendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => service.frontendType === AppFrontendType.SAAS_APP)?.[0];\n if (!appFrontendServiceKey) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: { message: 'chart-registration audit: no SAAS_APP frontend service found.' },\n });\n }\n const result = await this.companionIntrospectionService.requestInfo({\n serviceKey: appFrontendServiceKey,\n behavior: 'chart-registration-refs',\n });\n if (!result.success) {\n const message = 'error' in result ? result.error.message : 'unknown error';\n throw this.buildIntrospectionFailureError(result, undefined, `chart-registration-refs introspection failed: ${message}`);\n }\n const frontendChartRefs =\n (result.data as { frontendChartRegistrationRefs?: FrontendChartRegistrationRef[] })\n .frontendChartRegistrationRefs ?? [];\n\n // Backend side — the EFFECTIVE set the backend registers, not the module declarations.\n //\n // `buildApplicationInitializationConfig()` is the same pure builder backend startup uses; it\n // assembles configuration and starts nothing, and its `chartDefinitions` is the array\n // `StartApplicationBackendService` hands to `ChartRegistry.registerChart`. That matters\n // because the assembly does `overrides.chartDefinitions ?? backendRegistry.chartDefinitions`\n // — a REPLACE — so `mergeBackendDomainModules(...)`, which this route used until 2026-09-09,\n // is a different population the moment an application supplies that override: a dropped chart\n // read as ALIGNED and 404'd at runtime.\n //\n // It is also what the contract asks for in as many words (\"tooling must not reconstruct\n // selected runtime capabilities from lower-level registries or naming conventions\"), so the\n // previous composition was violating the surface it was calling.\n //\n // Read from the backend data door (#3268): the builder runs in an introspection worker, which hands back the refs,\n // so this audit no longer re-imports the backend's companion graph into the companion process.\n const { effectiveChartRefs, effectiveChartRefsFailure } = await loadBackendCompanionData(this.companionContext);\n // The builder threw in the worker: the same failure the in-process call raised, with its reason.\n if (effectiveChartRefsFailure !== undefined) throw new Error(`chart-registration audit: buildApplicationInitializationConfig() failed: ${effectiveChartRefsFailure}`);\n if (effectiveChartRefs === null) {\n // REFUSE rather than fall back to the declarations. A fallback here would answer about a\n // population this route cannot vouch for, under a route whose whole output is a verdict —\n // and it would do so silently, which is the defect this change removes.\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message:\n 'chart-registration audit: the application\\'s backend companion-exports declare no '\n + '`buildApplicationInitializationConfig`, so the effective registered chart set cannot be '\n + 'read. Add it to `backendCompanionExports` (it is a REQUIRED member of '\n + '`BackendCompanionExports`) and re-run.',\n },\n });\n }\n const backendRegisteredRefs = effectiveChartRefs.map((ref) => normalizeChartExecutionRef(ref));\n\n this.jsonSuccess(\n res,\n computeChartRegistrationAlignment({\n frontendChartRefs,\n backendRegisteredRefs,\n backendRefsProvenance: ChartRegistrationBackendRefsProvenance.EFFECTIVE_INITIALIZATION_CONFIG,\n }),\n );\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * The email lane's units, in the same summary shape `/labelling/plan` answers, so the CLI can split a\n * translate run into buckets without a second code path. `bucket` is the lane's named bucket;\n * `keyCount` is absent because an email's keys come from its source file at translate time.\n */\n private async labellingEmailTemplateUnits(_req: Request, res: Response, next: NextFunction) {\n try {\n const plan = await this.emailTemplateLabellingUnitsService.planEmailTemplateUnits();\n this.jsonSuccess(res, {\n totalUnits: plan.units.length,\n units: plan.units.map((unit) => ({\n id: unit.id,\n category: unit.category,\n displayLabel: unit.displayLabel,\n bucket: EMAIL_TEMPLATE_LABELLING_BUCKET,\n slug: unit.templateRef,\n })),\n warnings: plan.warnings,\n });\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async labellingLabellize(req: Request, res: Response, next: NextFunction) {\n try {\n const { forceRegenerate, unitIds, keys } = req.body || {};\n if (forceRegenerate !== undefined && typeof forceRegenerate !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'forceRegenerate must be a boolean when provided' },\n });\n }\n if (unitIds !== undefined && (!Array.isArray(unitIds) || unitIds.some((v) => typeof v !== 'string'))) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'unitIds must be an array of strings when provided' },\n });\n }\n\n this.assertLabellingKeyFilter(keys);\n\n const result = await this.labellizeOrchestratorService.labellize({\n forceRegenerate: forceRegenerate === true,\n ...(Array.isArray(unitIds) ? { unitIdFilter: unitIds as string[] } : {}),\n ...(Array.isArray(keys) ? { keyFilter: keys as string[] } : {}),\n }, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n }\n\n private async labellingTranslate(req: Request, res: Response, next: NextFunction) {\n try {\n const { targetLocales, forceRetranslate, unitIds, keys, companionOwnLabels } = req.body || {};\n const validatedTargets = parseCompanionTargetLocales(targetLocales, this.errorBuilder);\n if (forceRetranslate !== undefined && typeof forceRetranslate !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'forceRetranslate must be a boolean when provided' },\n });\n }\n if (unitIds !== undefined && (!Array.isArray(unitIds) || unitIds.some((v) => typeof v !== 'string'))) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'unitIds must be an array of strings when provided' },\n });\n }\n\n this.assertLabellingKeyFilter(keys);\n if (companionOwnLabels !== undefined && typeof companionOwnLabels !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'companionOwnLabels must be a boolean when provided' },\n });\n }\n\n // The companion's OWN words (#2656): asked for by name, never as part of an application run, because it writes\n // into the framework checkout rather than the application.\n const companionUnitIds = Array.isArray(unitIds) ? (unitIds as string[]).filter(isCompanionOwnLabelUnitId) : [];\n if (companionOwnLabels === true || companionUnitIds.length > 0) {\n if (Array.isArray(unitIds) && companionUnitIds.length !== unitIds.length) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'A run translates the dev companion\\'s own words or the application\\'s, never both: name only companion_label: units, or none' },\n });\n }\n if (Array.isArray(keys)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'keys names words of the application\\'s units; the companion lane already translates only the words whose English changed' },\n });\n }\n const companionResult = await this.translateOrchestratorService.translateCompanionOwnLabels({\n targetLocales: validatedTargets,\n forceRetranslate: forceRetranslate === true,\n ...(companionUnitIds.length > 0 ? { unitIdFilter: companionUnitIds } : {}),\n }, this.getTraceSession(res));\n this.jsonSuccess(res, companionResult);\n return;\n }\n\n const result = await this.translateOrchestratorService.translate({\n targetLocales: validatedTargets,\n forceRetranslate: forceRetranslate === true,\n ...(Array.isArray(unitIds) ? { unitIdFilter: unitIds as string[] } : {}),\n ...(Array.isArray(keys) ? { keyFilter: keys as string[] } : {}),\n }, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n }\n\n /**\n * `keys` (#2439): the label keys a labellize or translate run regenerates on their own. Optional; when\n * present it must be a NON-empty array of strings — an empty list would read as \"no key filter\" and\n * silently regenerate whole units, the opposite of what was asked.\n */\n private assertLabellingKeyFilter(keys: unknown): void {\n if (keys !== undefined && (!Array.isArray(keys) || keys.length === 0 || keys.some((v) => typeof v !== 'string' || v.trim() === ''))) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'keys must be a non-empty array of non-empty strings when provided' },\n });\n }\n }\n\n /**\n * Validate a locale string against `AvailableLanguage`. Without this,\n * the orchestrators would happily write `<bucket>/<slug>.xx.ts`\n * files for arbitrary input and create unbounded locale entries in\n * the lock file.\n */\n private assertAvailableLanguage(value: string, fieldName: string): AvailableLanguage {\n return assertCompanionAvailableLanguage(value, fieldName, this.errorBuilder);\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // EMAIL TEMPLATES\n //\n // OD-4.a: All handlers in this block delegate to\n // `EmailTemplateCompanionService`, which exclusively reads from the in-memory\n // `EmailTemplateRegistryBackendService` (file-based template + per-locale\n // labels, refreshed via dynamic `import()` of the compiled `dist/`\n // artifacts). The deleted DB-backed `EMAIL_TEMPLATES` core resource is NOT\n // a fallback. See the `CompanionController` class JSDoc for the full\n // contract and the deprecation plan reference.\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async emailTemplatesGenerate(req: Request, res: Response, next: NextFunction) {\n try {\n this.logDebug('emailTemplatesGenerate');\n const { forceRegenerate, templateRefs, locales } = req.body || {};\n\n if (templateRefs !== undefined && (!Array.isArray(templateRefs) || templateRefs.some((value) => typeof value !== 'string'))) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRefs must be an array of template ref strings when provided' },\n },\n );\n }\n\n if (locales !== undefined && (!Array.isArray(locales) || locales.some((value) => typeof value !== 'string'))) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'locales must be an array of locale strings when provided' },\n },\n );\n }\n\n if (forceRegenerate !== undefined && typeof forceRegenerate !== 'boolean') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'forceRegenerate must be a boolean when provided' },\n },\n );\n }\n\n const result = await this.emailTemplateService.generateTemplates({\n forceRegenerate,\n templateRefs,\n locales,\n }, this.getTraceSession(res));\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n }\n\n private async emailTemplatesPreview(req: Request, res: Response, next: NextFunction) {\n try {\n const { templateRef, locale, mockContext } = req.body || {};\n\n if (!templateRef || typeof templateRef !== 'string' || !locale || typeof locale !== 'string') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRef and locale are required' },\n },\n );\n }\n\n const validatedLocale = this.assertAvailableLanguage(locale, 'locale');\n\n const result = await this.emailTemplateService.previewTemplate({\n templateRef,\n locale: validatedLocale,\n mockContext,\n }, this.getTraceSession(res));\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async emailTemplatesTestSend(req: Request, res: Response, next: NextFunction) {\n try {\n const { templateRef, locale, recipientEmail, mockContext } = req.body || {};\n\n if (\n !templateRef || typeof templateRef !== 'string'\n || !locale || typeof locale !== 'string'\n || !recipientEmail || typeof recipientEmail !== 'string'\n ) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRef, locale, and recipientEmail are required' },\n },\n );\n }\n\n const validatedLocale = this.assertAvailableLanguage(locale, 'locale');\n\n const result = await this.emailTemplateService.testSend({\n templateRef,\n locale: validatedLocale,\n recipientEmail,\n mockContext,\n }, this.getTraceSession(res));\n\n assertEmailTemplateTestSendSucceeded(result, {\n templateRef,\n locale: validatedLocale,\n recipientEmail,\n }, this.errorBuilder);\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async emailTemplatesStatus(req: Request, res: Response, next: NextFunction) {\n try {\n const templateRefs = typeof req.query.templateRefs === 'string'\n ? req.query.templateRefs.split(',').map((value) => value.trim()).filter(Boolean)\n : undefined;\n\n const result = await this.emailTemplateService.getTemplateStatus(\n templateRefs,\n this.getTraceSession(res),\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async emailTemplatesTranslate(req: Request, res: Response, next: NextFunction) {\n try {\n const { targetLocales, templateRefs, dryRun } = req.body || {};\n this.logDebug('emailTemplatesTranslate', { targetLocales, templateRefs, dryRun });\n\n const validatedTargets = parseCompanionTargetLocales(targetLocales, this.errorBuilder);\n\n if (templateRefs !== undefined && (!Array.isArray(templateRefs) || templateRefs.some((value) => typeof value !== 'string'))) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'templateRefs must be an array of template ref strings when provided' },\n },\n );\n }\n\n if (dryRun !== undefined && typeof dryRun !== 'boolean') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'dryRun must be a boolean when provided' },\n },\n );\n }\n\n const result = await this.emailTemplateService.translateEmailTemplateLabels({\n targetLocales: validatedTargets,\n templateRefs,\n dryRun: !!dryRun,\n }, this.getTraceSession(res));\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // FILE OPERATIONS\n // ─────────────────────────────────────────────────────────────────────────────\n\n /**\n * Single source of truth for the SaaS app root consumed by file operations.\n *\n * Always returns `this.companionContext.saasRoot`. Earlier revisions used\n * `process.env.COMPANION_WORKSPACE_ROOT || this.companionContext.saasRoot`,\n * which let a stale env var (from a parent shell, prior session, or leaked\n * Vitest worker) silently override the trusted CompanionContext snapshot.\n * `COMPANION_WORKSPACE_ROOT` is now only used as a BOOTSTRAP seed for\n * subprocess consumers that have no CompanionContext (see\n * `applyTrustedHomesToChildProcess` and the code-compliance scripts) —\n * never as a runtime override inside services that already hold a resolved\n * context.\n */\n private getWorkspaceRoot(): string {\n return this.companionContext.saasRoot;\n }\n\n /**\n * The one resolver behind the generic file routes (read, list, write), and therefore the one place\n * they are confined: inside the application root, and never a secret-bearing path. See\n * `companion-file-route-confinement.ts` for why reads needed it even though the token floor leaves\n * them open. A refusal is AUTHORIZATION (403): the path is well-formed, the caller may not have it.\n */\n private resolveRequestedPath(filePath: string): string {\n const decision = confineCompanionFilePath(this.getWorkspaceRoot(), filePath);\n if (decision.admitted) return decision.absolutePath;\n throw this.errorBuilder.buildError(ErrorType.AUTHORIZATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.AUTHORIZATION,\n context: {\n refusal: decision.refusal,\n path: decision.relativePath,\n message:\n decision.refusal === CompanionFileRouteRefusal.SECRET_BEARING_PATH\n ? 'Secrets are not served by the file routes; use `wildo secrets` or the workbench secrets section.'\n : 'The file routes only reach files inside the application root.',\n },\n });\n }\n\n private async updateFiles(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'file-operation', 'update-files');\n try {\n this.logDebug('updateFiles');\n const { files } = req.body;\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-update-start',\n 'Start file update request',\n {\n fileCount: Array.isArray(files) ? files.length : 0,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'update-files-request.json',\n req.body ?? {},\n traceStep,\n );\n \n if (!files || !Array.isArray(files)) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Request body must contain a \"files\" array' }\n }\n );\n }\n\n const results: { success: boolean; updatedFiles: string[]; errors: { path: string; message: string }[] } = {\n success: true,\n updatedFiles: [],\n errors: [],\n };\n\n for (const file of files as FileUpdateRequest[]) {\n try {\n const absolutePath = this.resolveRequestedPath(file.path);\n \n if (file.createDirectories !== false) {\n await fs.mkdir(path.dirname(absolutePath), { recursive: true });\n }\n \n const encoding = (file.encoding || 'utf-8') as BufferEncoding;\n await fs.writeFile(absolutePath, file.content, { encoding });\n \n results.updatedFiles.push(file.path);\n } catch (error) {\n results.success = false;\n results.errors.push({\n path: file.path,\n message: describeCaughtError(error),\n });\n }\n }\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n results.success ? 'file-update-success' : 'file-update-mixed-result',\n results.success\n ? `Updated ${results.updatedFiles.length} files`\n : `Updated ${results.updatedFiles.length} files with ${results.errors.length} failures`,\n {\n updatedCount: results.updatedFiles.length,\n errorCount: results.errors.length,\n success: results.success,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'update-files-result.json',\n results,\n traceStep,\n );\n this.jsonSuccess(res, results);\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-update-failure',\n 'Workspace file update failed',\n {\n error: describeCaughtError(e),\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getFile(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'file-operation', 'get-file');\n try {\n this.logDebug('getFile');\n const filePath = req.query.path as string;\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-read-start',\n 'Start file read request',\n { filePath },\n traceStep,\n );\n \n if (!filePath) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Query parameter \"path\" is required' }\n }\n );\n }\n\n const absolutePath = this.resolveRequestedPath(filePath);\n const content = await fs.readFile(absolutePath, 'utf-8');\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-read-success',\n `Read file ${filePath}`,\n {\n filePath,\n contentLength: content.length,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'file-read-result.json',\n {\n filePath,\n content,\n encoding: 'utf-8',\n },\n traceStep,\n );\n this.jsonSuccess(res, { content, encoding: 'utf-8' });\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-read-failure',\n 'Workspace file read failed',\n {\n error: describeCaughtError(e),\n filePath: req.query.path,\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listFiles(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'file-operation', 'list-files');\n try {\n this.logDebug('listFiles');\n const directory = req.query.directory as string;\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-list-start',\n 'Start workspace directory listing request',\n { directory },\n traceStep,\n );\n \n if (!directory) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Query parameter \"directory\" is required' }\n }\n );\n }\n\n const absolutePath = this.resolveRequestedPath(directory);\n const entries = await fs.readdir(absolutePath, { withFileTypes: true });\n \n const files = entries.map(entry => ({\n name: entry.name,\n isDirectory: entry.isDirectory(),\n path: path.join(directory, entry.name),\n }));\n\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-list-success',\n `Listed workspace directory ${directory}`,\n {\n directory,\n entryCount: files.length,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'file-list-result.json',\n {\n directory,\n files,\n },\n traceStep,\n );\n this.jsonSuccess(res, files);\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'file-list-failure',\n 'Workspace directory listing failed',\n {\n error: describeCaughtError(e),\n directory: req.query.directory,\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // CODING-AGENT STATUS (typed Flows/Actors coding path)\n // ─────────────────────────────────────────────────────────────────────────────\n // The P-29 token middleware that used to live HERE guarded only the raw\n // POST /coding-agent/dispatch endpoint; it was deleted with that endpoint\n // at the first-activation hard cut, and for as long as it stayed deleted\n // `CompanionAuthFloorCompanionService`'s token half had no consumer at all.\n // It is back, and deliberately not here: `enforceLocalTokenFloor` is a\n // router-level middleware registered first in `setupRoutes`, so it covers\n // every mutating route on the mount rather than the one endpoint whose\n // author happened to remember it. Per-route gating is what let the floor\n // die with a single deletion.\n // The OTHER half of the same auth floor is unchanged and enforced at\n // startup before the server listens: the fail-closed loopback assertion,\n // with no override, which is why the companion must never bind beyond this\n // machine.\n\n /**\n * `POST /runtime/env/apply` `{ envVarNames: string[] }` — load those variables of the companion's\n * regenerated `.env` into this process and rebuild the provider registry, as a restart would (#1637).\n *\n * The door `wildo secrets set` uses from a terminal. Without it a key changed while the companion ran\n * reached it only at its next start, and a created application's companion has no supervisor to\n * restart it: the CLI said the key was set, and the next playbook run was refused for its absence.\n * Applying in place also spares every run in flight, which a restart would end.\n *\n * Takes names only. Values are read from the file `config sync` just wrote, so this cannot plant a\n * value, and a name the `.env` has never carried is refused (400) rather than deleted from the process.\n * A mutating verb, so the P-29b token floor gates it like every other write.\n */\n private async applyRuntimeEnvVariables(req: Request, res: Response, next: NextFunction) {\n try {\n const { envVarNames } = (req.body ?? {}) as { envVarNames?: unknown };\n if (!Array.isArray(envVarNames) || envVarNames.length === 0 || !envVarNames.every((name) => typeof name === 'string' && /^[A-Za-z_][A-Za-z0-9_]*$/.test(name))) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`envVarNames` must be a non-empty array of environment variable names.' },\n });\n }\n let applied;\n try {\n applied = await reloadCompanionEnvVariables(envVarNames as string[], this.externalProvidersRegistry);\n } catch (error) {\n if (!(error instanceof CompanionEnvVariableRefusal)) throw error;\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n });\n }\n this.jsonSuccess(res, { applied });\n } catch (error) {\n this.jsonError(res, error as any, next);\n }\n }\n\n /**\n * Stop the in-flight coding run.\n *\n * Answers 200 with the task that was signalled, or 200 with\n * `cancelled: false` when nothing is running — an operator asking to stop a\n * run that already finished has not made an error, and a 404 would read like\n * a broken route rather than an empty queue.\n *\n * The run terminalises normally with stop reason `cancelled` and its captured\n * change set, so what the agent had already written stays visible.\n */\n private async codingAgentCancel(_req: Request, res: Response, next: NextFunction) {\n try {\n const cancelled = this.codingAgentDispatchService.cancelActiveApplicationCodingTask();\n this.jsonSuccess(res, cancelled ? { cancelled: true, ...cancelled } : { cancelled: false });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * Answer a coding task that parked on a question, resuming the SAME agent\n * session. A WRITE: it re-enters a workspace-mutating run behind the shared\n * worktree lock, so it is serialized with every other coding run.\n */\n private async codingAgentRespond(req: Request, res: Response, next: NextFunction) {\n try {\n const { taskId, answer, suspensionRef, answeredByRef } = (req.body ?? {}) as { taskId?: unknown; answer?: unknown; suspensionRef?: unknown; answeredByRef?: unknown };\n // An empty reference names no question: a malformed request (400), not a state conflict (#1581, R10-5).\n if (typeof taskId !== 'string' || typeof answer !== 'string' || typeof suspensionRef !== 'string' || suspensionRef.trim().length === 0) {\n // A malformed body is a VALIDATION 400, not a critical INTERNAL 500 — a\n // plain `new Error` here surfaced as the latter and logged at critical\n // severity (found by the live surface probe, 2026-09-04).\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`taskId`, `answer` and `suspensionRef` (strings) are required — `suspensionRef` names the question answered, as `pendingQuestions` carries it.' },\n });\n }\n // ONE door since #1359: the parked run is an actor-system execution waiting on a decision,\n // with its contract and baseline on the checkpoint, so answering it is the same call whether\n // this process parked it or a previous one did. The service refuses (409) when nothing\n // answerable waits under the id.\n // `suspensionRef` (from `pendingQuestions`) holds the answer to the question the caller read (#1581).\n // WHO answered, when the caller says (#1658) — recorded in CODING-ANSWERS.md; absent records nothing rather than a guess.\n // (dead-plan-citation: CODING-ANSWERS.md is a file the companion writes.)\n const admission = await this.codingAgentDispatchService.respondToApplicationCodingTaskQuestion(taskId, answer, undefined, {\n suspensionRef,\n ...(typeof answeredByRef === 'string' && answeredByRef.trim().length > 0 ? { answeredByRef: answeredByRef.trim() } : {}),\n });\n this.jsonSuccess(res, admission);\n } catch (error) {\n this.jsonError(res, error as any, next);\n }\n }\n\n /**\n * Stream one active coding session's live frames as Server-Sent Events.\n *\n * Frames flow only while the run is active, so the current pending question\n * (if any) is sent first as a `snapshot` event — a subscriber that attaches\n * after a park still learns what is being asked. Read-only.\n */\n private codingAgentSessionEvents(req: Request, res: Response): void {\n const taskId = typeof req.query.taskId === 'string' ? req.query.taskId : '';\n if (!taskId) {\n res.status(400).json({ error: 'A `taskId` query parameter is required.' });\n return;\n }\n res.setHeader('Content-Type', 'text/event-stream');\n res.setHeader('Cache-Control', 'no-cache, no-transform');\n res.setHeader('Connection', 'keep-alive');\n res.flushHeaders?.();\n\n const send = (event: string, data: unknown): void => {\n res.write(`event: ${event}\\ndata: ${JSON.stringify(data)}\\n\\n`);\n };\n\n // The pending question up front, so a late subscriber is not blind to a park\n // that already happened.\n // Read from the actor plane, so it is asynchronous; a failed read costs the late subscriber its\n // snapshot and nothing else — the live frames below do not depend on it.\n void this.codingAgentDispatchService.listPendingCodingQuestions()\n .then((questions) => send('snapshot', { pendingQuestion: questions.find((q) => q.taskId === taskId) ?? null }))\n .catch(() => send('snapshot', { pendingQuestion: null }));\n\n const unsubscribe = this.codingAgentDispatchService.subscribeToCodingSession(taskId, (frame) => {\n send(frame.channel, frame.payload);\n });\n // A heartbeat keeps intermediaries from closing an idle stream during a long\n // quiet stretch of a run.\n const heartbeat = setInterval(() => res.write(': keep-alive\\n\\n'), 15_000);\n heartbeat.unref?.();\n req.on('close', () => {\n clearInterval(heartbeat);\n unsubscribe();\n });\n }\n\n /**\n * What is running, and what died leaving something resumable.\n *\n * A composite is a minutes-long operation — 780s for a five-iteration run — and until now nothing\n * could report that one was in progress. On 2026-08-29 a parallel session published a single file\n * 32 seconds after a research turn had succeeded; the companion restarted correctly and the run\n * died. That session had no way to know, and no way to find out (#125).\n *\n * Two fields because they answer two different questions:\n *\n * - `running` comes from MEMORY, and is the only evidence of a run still inside its first\n * iteration — the most expensive moment to interrupt, and one no checkpoint has reached yet.\n * - `interrupted` comes from DISK, and lists runs whose process is gone. A checkpoint outlives its\n * run only when the process was taken away, because a run that concludes consumes its own.\n *\n * Deliberately NOT a lock. `CLAUDE.md` is explicit that sessions are independent and shared-file\n * collisions are accepted; a run that refused to let someone save a file would be worse than one\n * that loses an iteration.\n */\n private async readPlaybookRunsInFlight(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.playbookRunService.readRunsInFlight());\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `GET /playbooks/suspended` — what is waiting for an answer, independent of who asked.\n *\n * The read that makes a suspension survivable. A run that stops at a clarification answers 200 with\n * its `runId`, and until this existed that response was the ONLY place the id lived: reload the\n * page and the run stayed suspended on disk with nobody able to name it. A resume affordance can\n * now be rebuilt from server state rather than from the browser's memory of one response.\n */\n private async readSuspendedPlaybookRuns(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.playbookRunService.readSuspendedRuns());\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `GET /compliance/governance-questions` — what a person still has to decide.\n *\n * `definitionRef` may repeat, and an unknown one yields nothing rather than 404: the composer treats\n * an unknown document as \"no such document\", and a host loading several refs should not lose the\n * ones that exist because one was mistyped.\n */\n private async readGovernanceQuestions(req: Request, res: Response, next: NextFunction) {\n try {\n const raw = req.query.definitionRef;\n const definitionRefs = raw === undefined ? undefined : (Array.isArray(raw) ? raw : [raw]).map(String);\n this.jsonSuccess(res, { questionnaires: composeGovernanceQuestionnaires(definitionRefs) });\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /compliance/governance-facts` — the answers to the questions above, as a FILE.\n *\n * The write half of #192. It lands `document-facts-authored`, never `document-facts`: every question\n * the questionnaire asks carries a human authority, and the derived family refuses those by type.\n *\n * It does NOT commit. The landed file is a working edit until a human commits it\n * (`.claude/rules/one-source-of-truth.md`, rules 2 and 3) — this endpoint accepts nothing.\n *\n * `?dryRun=1` runs the whole pipe and writes nothing, which is how a host previews what an answer set\n * would produce before a person commits to it.\n */\n private async landGovernanceFacts(req: Request, res: Response, next: NextFunction) {\n try {\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n if (!specificationsPackageRoot) {\n /*\n * `next(...)`, never `throw`. Thrown here it lands in this method's OWN catch, goes through\n * `jsonError` → `buildFromStandardError`, and is reclassified INTERNAL with its message\n * sanitized to the literal \"internal\" — so a deliberate, well-worded refusal would answer 500\n * saying nothing. Found by making a test double reproduce the real sanitization rather than\n * passing errors through.\n */\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'This application has no resolved specifications package, so there is nowhere to land the facts.' },\n }));\n return;\n }\n /*\n * The ENVELOPE only — see the schema's own note. The answer SEMANTICS stay with the service\n * that owns the question catalog; this refuses a body that is not a request at all, which\n * previously reached the service and threw a `TypeError` reported as a 500.\n *\n * `safeParse` and `next(...)`, never `.parse()`. A thrown `ZodError` lands in this method's own\n * catch and goes out through the generic path as INTERNAL with its message sanitized to\n * \"internal\" — the SAME 500-saying-nothing this guard exists to remove, so parsing strictly and\n * throwing would have moved the defect rather than fixed it. Caught by mutating the guard away\n * and watching the pin stay green.\n */\n const parsed = CompanionLandGovernanceFactsRequestSchema.safeParse(req.body ?? {});\n if (!parsed.success) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: {\n message:\n 'This is not a governance-fact landing request: '\n + parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; '),\n },\n }));\n return;\n }\n const payload = parsed.data;\n /*\n * The authored facts as LANDED, for the merge (#1454, Step 6): the new answers replace their own\n * facts and every other declaration is kept. Read through the same aggregate every reader uses,\n * so what this landing merges into is what the dossier showed the person.\n */\n // The read and the write are one dossier write, queued with every other (#2179).\n const result = await serializeDossierWrite(specificationsPackageRoot, async () => {\n return landGovernanceFactDeclarations({\n read: await this.dossierService.readAuthoredDocumentFactsForRewrite(),\n specificationsPackageRoot,\n // NEUTRAL BY CONTRACT (issue #65), same as every other landed constant — app identity lives in\n // VALUES, never in the names of landed exports.\n constantPrefix: 'application',\n answers: payload as unknown as GovernanceFactDeclarationInput,\n ...(req.query.dryRun === undefined ? {} : { dryRun: true }),\n });\n });\n this.jsonSuccess(res, result);\n } catch (e) {\n /*\n * A refusal on the ANSWERS is a BAD REQUEST, and it must arrive with its message intact.\n *\n * Every `GovernanceQuestionnaireError` names what the person got wrong — an unanswered\n * question, a review with no reviewer, \"does not apply\" on a question that does not offer it —\n * and those sentences are the whole product of that boundary. Left to `jsonError` they are\n * classified INTERNAL and SANITIZED to the literal string \"internal\", so the caller gets a 500\n * that says nothing. Measured against the live companion on 2026-09-03, minutes after the\n * route shipped: `POST` with an empty body answered `{\"type\":\"INTERNAL\",\"message\":\"internal\"}`.\n *\n * Same treatment as `PlaybookElicitationError` below, and for the same reason: a malformed\n * interview is something the caller must change, never something that went wrong here.\n */\n if (e instanceof GovernanceQuestionnaireError || e instanceof SpecificationUnavailableError || e instanceof SpecificationWriteRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: e.message },\n }));\n return;\n }\n this.jsonError(res, e as any, next);\n }\n }\n\n private async codingAgentStatus(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.codingAgentDispatchService.getStatus());\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // PERSISTED EXECUTIONS\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async createActorExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const payload = CompanionCreateActorExecutionRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.createActorExecution(payload, this.getTraceSession(res));\n this.invalidateCreationBoardsAfterActorPlaneWrite();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listActorExecutions(req: Request, res: Response, next: NextFunction) {\n try {\n const query = CompanionExecutionsListQuerySchema.parse(req.query ?? {});\n // The HTTP listing answers whole rows: an outside reader may want what the internal listings leave out (#3204).\n const result = await this.executionsService.listActorExecutions(query, this.getTraceSession(res), { omitStoredFields: [] });\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getActorExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const executionId = req.params.executionId;\n\n if (!executionId || Array.isArray(executionId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'executionId route param is required' },\n });\n }\n\n const result = await this.executionsService.getActorExecution(executionId, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async createFlowExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const payload = CompanionCreateFlowExecutionRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.createFlowExecution(payload, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listFlowExecutions(req: Request, res: Response, next: NextFunction) {\n try {\n const query = CompanionExecutionsListQuerySchema.parse(req.query ?? {});\n const result = await this.executionsService.listFlowExecutions(query, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getFlowExecution(req: Request, res: Response, next: NextFunction) {\n try {\n const executionId = req.params.executionId;\n\n if (!executionId || Array.isArray(executionId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'executionId route param is required' },\n });\n }\n\n const result = await this.executionsService.getFlowExecution(executionId, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async createActorTask(req: Request, res: Response, next: NextFunction) {\n try {\n const payload = CompanionCreateActorTaskRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.createActorTask(payload, this.getTraceSession(res));\n this.invalidateCreationBoardsAfterActorPlaneWrite();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async listActorTasks(req: Request, res: Response, next: NextFunction) {\n try {\n const query = CompanionActorTasksListQuerySchema.parse(req.query ?? {});\n const result = await this.executionsService.listActorTasks(query, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async getActorTask(req: Request, res: Response, next: NextFunction) {\n try {\n const taskId = req.params.taskId;\n\n if (!taskId || Array.isArray(taskId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'taskId route param is required' },\n });\n }\n\n const result = await this.executionsService.getActorTask(taskId, this.getTraceSession(res));\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n private async updateActorTask(req: Request, res: Response, next: NextFunction) {\n try {\n const taskId = req.params.taskId;\n\n if (!taskId || Array.isArray(taskId)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'taskId route param is required' },\n });\n }\n\n const payload = CompanionUpdateActorTaskRequestSchema.parse(req.body ?? {});\n const result = await this.executionsService.updateActorTask(taskId, payload, this.getTraceSession(res));\n this.invalidateCreationBoardsAfterActorPlaneWrite();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * The generic actor-plane WRITE doors (`POST /executions/actors`, `POST /tasks/actors`,\n * `PATCH /tasks/actors/:taskId`) drop the creation boards, because the boards read actor-plane rows\n * no file signature can see (#1310, sixth review F2): a coding task's status or memory moves the\n * loop guard, the attempt budget and the in-flight set. The build lane announces its own writes\n * through `announceRunStateChanged`; these doors write the same rows on anyone's behalf, so they\n * cannot know which writes matter and drop the boards after every one. The cost is a recompute a\n * watching tab would pay on its next read anyway.\n */\n private invalidateCreationBoardsAfterActorPlaneWrite(): void {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // META / INTROSPECTION\n // ─────────────────────────────────────────────────────────────────────────────\n\n /**\n * Get resources registry, optionally scoped to a specific app.\n */\n private async getResourcesRegistry(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'meta-introspection', 'resources-registry');\n let mappedFailureAlreadyTraced = false;\n try {\n const appSlug = req.params.appSlug;\n this.logDebug('getResourcesRegistry', { appSlug: appSlug ?? 'all' });\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-start',\n 'Resolve companion resources registry',\n { appSlug: appSlug ?? null },\n traceStep,\n );\n\n const result = await this.companionIntrospectionService.requestInfo({\n serviceKey: this.pickResourcesRegistryCarrierServiceKey(),\n behavior: 'resources-registry',\n });\n\n if (!result.success) {\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'resources-registry-failure-result.json',\n result,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-upstream-failure',\n 'Companion resources registry introspection returned a failure result',\n {\n appSlug: appSlug ?? null,\n serviceKey: result.serviceKey,\n behavior: result.behavior,\n targetId: result.targetId,\n durationMs: result.durationMs,\n stdout: result.stdout,\n stderr: result.stderr,\n error: 'error' in result ? result.error : undefined,\n },\n traceStep,\n );\n mappedFailureAlreadyTraced = true;\n const failureMessage = 'error' in result\n ? result.error.message\n : 'Companion resources-registry introspection failed.';\n\n throw this.buildIntrospectionFailureError(result, undefined, failureMessage);\n }\n\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'resources-registry-result.json',\n result.data ?? null,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-success',\n 'Resolved companion resources registry',\n { appSlug: appSlug ?? null },\n traceStep,\n );\n this.jsonSuccess(res, result.data ?? null);\n } catch (e) {\n if (!mappedFailureAlreadyTraced) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'resources-registry-failure',\n 'Failed to resolve companion resources registry',\n {\n appSlug: req.params.appSlug ?? null,\n error: describeCaughtError(e),\n },\n traceStep,\n );\n }\n this.jsonError(res, e as any, next);\n }\n }\n\n private pickResourcesRegistryCarrierServiceKey(): string {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n\n if (!backendServiceKey) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: 'No backend service is available to resolve the companion resources-registry behavior.',\n },\n });\n }\n\n return backendServiceKey;\n }\n\n private async getWebsiteStructuredDataAudit(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(\n res,\n 'meta-introspection',\n 'website-structured-data-audit',\n );\n try {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'website-structured-data-audit-start',\n 'Run website structured-data reconciliation against the merged Schema.org catalog',\n {},\n traceStep,\n );\n\n const report = await StructuredDataCatalogAuditService.audit(this.companionContext);\n const warningCount = report.result.findings.length;\n const responseBody = {\n status: warningCount === 0 ? 'passed-with-zero-findings' : 'completed-with-warnings',\n warningCount,\n warnings: report.result.findings,\n // Optional-field recommendations: information beside the warnings, never counted as one.\n // `?? []`: a result from an injected saas-website that predates the channel carries no key.\n recommendations: report.result.recommendations ?? [],\n report,\n };\n\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'website-structured-data-audit-result.json',\n responseBody,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n warningCount === 0\n ? 'website-structured-data-audit-success'\n : 'website-structured-data-audit-warnings',\n warningCount === 0\n ? 'Website structured-data audit completed with zero findings'\n : 'Website structured-data audit completed with warning findings',\n {\n pageCount: report.pageCount,\n sectionCount: report.sectionCount,\n warningCount,\n },\n traceStep,\n );\n\n this.jsonSuccess(res, responseBody);\n } catch (e) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'website-structured-data-audit-failure',\n 'Failed to run website structured-data audit',\n {\n error: describeCaughtError(e),\n },\n traceStep,\n );\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * Is this failure the CALLER's fault (400) rather than the companion's (500)?\n *\n * Decided by the ERROR NAME, for any behavior. It used to be gated on one behavior id\n * (`specification-context-parts`), which is the hand-kept-list shape: the next parameterised behavior\n * inherited 500 INTERNAL for a malformed input, sanitized to \"internal\", and its own refusal message —\n * written to name the fix — reached nobody. Measured on the first live `wildo context elements` run\n * (#1459), where `get` with both `refs` and `aspectKeys` answered 500 and the CLI suggested the\n * companion might be down.\n *\n * `ZodError` stays gated on that behavior deliberately: elsewhere a Zod failure is usually the\n * APPLICATION's own data failing its schema, which is not the caller's input and must not read as a\n * bad request. A handler that wants the 400 says so by throwing\n * {@link IntrospectionInputValidationError}.\n */\n private isValidationIntrospectionFailure(result: {\n success: boolean;\n behavior: string;\n error?: { name?: string };\n }, requestedBehavior?: string): boolean {\n if (result.success) return false;\n if (result.error?.name === INTROSPECTION_INPUT_VALIDATION_ERROR_NAME) return true;\n\n const effectiveBehavior = requestedBehavior ?? result.behavior;\n if (effectiveBehavior !== 'specification-context-parts') return false;\n return result.error?.name === 'ZodError'\n || result.error?.name === SPECIFICATION_CONTEXT_VALIDATION_ERROR_NAME;\n }\n\n /**\n * How a failure RESULT is answered: the caller's fault (400), a transient the caller should retry (503), or\n * the companion's own fault (500).\n *\n * The transient is the companion stopping under a request (#3140): the derivation did not fail, the process\n * running it was restarted by the dev supervisor, and the same request succeeds once the restarted companion\n * is ready. It used to answer 500 INTERNAL, severity critical, so the caller got a non-retryable answer and\n * every restart during a request wrote a `\"severity\":\"critical\"` line, the shape the backend log FATAL gate\n * of a verification run matches. It answers `INFRASTRUCTURE` now (503 with the RETRY strategy, which the CLI\n * reads as \"re-run in a moment\"), at severity MEDIUM (see {@link buildIntrospectionFailureError}), and\n * without the ALERT and CIRCUIT_BREAK actions that type carries: a planned stop of this process is neither\n * something to page about nor a dependency to trip a breaker on. LOG and RECORD_METRICS stay, so the\n * restarts remain countable; the HTTP boundary still logs it at `error` level, as it does every 5xx.\n */\n private classifyIntrospectionFailure(result: {\n success: boolean;\n behavior: string;\n error?: { name?: string };\n }, requestedBehavior?: string): {\n errorType: ErrorType;\n customMessageReference: ErrorCustomMessageReference;\n skipBackendActionTypes?: readonly ErrorActionBackend[];\n severity?: ErrorSeverity;\n } {\n // Only a route that forwards a CALLER's input can blame the caller; the routes that pass no requested\n // behavior (`resources-registry`, `charts/audit`) take none, so a validation failure there is the companion's.\n if (requestedBehavior !== undefined && this.isValidationIntrospectionFailure(result, requestedBehavior)) {\n return { errorType: ErrorType.VALIDATION, customMessageReference: ErrorCustomMessageReference.VALIDATION };\n }\n if (!result.success && result.error?.name === INTROSPECTION_PARENT_TERMINATED_ERROR_NAME) {\n return {\n errorType: ErrorType.INFRASTRUCTURE,\n customMessageReference: ErrorCustomMessageReference.INFRASTRUCTURE,\n skipBackendActionTypes: [ErrorActionBackend.ALERT, ErrorActionBackend.CIRCUIT_BREAK],\n severity: ErrorSeverity.MEDIUM,\n };\n }\n return { errorType: ErrorType.INTERNAL, customMessageReference: ErrorCustomMessageReference.INTERNAL };\n }\n\n /**\n * The error EVERY route answers when an introspection returns a failure result — one builder, so a route\n * that calls `requestInfo` cannot answer a companion restart as a critical 500 while its sibling answers 503\n * (#3140: three routes did, `_meta/introspect`, `_meta/resources-registry` and `charts/audit`).\n *\n * The severity override is local on purpose. `ERROR_DEFINITIONS` gives `INFRASTRUCTURE` CRITICAL because a\n * broken dependency usually is; the builder has no per-call severity, and the one site that knows the cause\n * is a planned stop of THIS process is here. MEDIUM keeps it visible without reading as a fault.\n */\n private buildIntrospectionFailureError(\n result: { success: boolean; behavior: string; serviceKey?: string; targetId?: string; error?: { name?: string; message?: string } },\n requestedBehavior: string | undefined,\n message: string,\n ) {\n const { errorType, customMessageReference, skipBackendActionTypes, severity } = this.classifyIntrospectionFailure(result, requestedBehavior);\n const built = this.errorBuilder.buildError(\n errorType,\n undefined,\n {\n customMessageReference,\n ...(skipBackendActionTypes === undefined ? {} : { skipBackendActionTypes }),\n context: {\n message,\n serviceKey: result.serviceKey,\n behavior: result.behavior,\n targetId: result.targetId,\n },\n },\n );\n return severity === undefined ? built : { ...built, severity };\n }\n\n /**\n * `GET /_meta/introspect/behaviors` — the live-context MENU (`wildo context list`, issue #252).\n *\n * Pure catalog read, no subprocess: what this running companion can answer, plus the service keys a\n * `POST /_meta/introspect` caller may target and the resolved default backend key so the caller never\n * re-derives the \"first backend service\" rule.\n */\n private listIntrospectionBehaviors(_req: Request, res: Response, next: NextFunction) {\n try {\n res.json(this.companionIntrospectionService.describeCatalog());\n } catch (error) {\n next(error);\n }\n }\n\n private async requestIntrospection(req: Request, res: Response, next: NextFunction) {\n const traceStep = this.createTraceStep(res, 'meta-introspection', 'request-introspection');\n let mappedFailureAlreadyTraced = false;\n try {\n const { serviceKey, behavior, input } = CompanionIntrospectionRequestSchema.parse(req.body ?? {});\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-start',\n `Resolve companion introspection behavior ${behavior}`,\n {\n serviceKey,\n behavior,\n },\n traceStep,\n );\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'introspection-request.json',\n { serviceKey, behavior, input },\n traceStep,\n );\n\n const result = await this.companionIntrospectionService.requestInfo({\n serviceKey,\n behavior,\n input,\n });\n\n if (!result.success && 'error' in result) {\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'introspection-failure-result.json',\n result,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-upstream-failure',\n `Companion introspection behavior ${behavior} returned a failure result`,\n {\n serviceKey: result.serviceKey,\n behavior: result.behavior,\n targetId: result.targetId,\n durationMs: result.durationMs,\n stdout: result.stdout,\n stderr: result.stderr,\n error: result.error,\n },\n traceStep,\n );\n mappedFailureAlreadyTraced = true;\n const failureMessage = result.error.message;\n throw this.buildIntrospectionFailureError(result, behavior, failureMessage);\n }\n\n /*\n * What this door answers reaches a coding or research agent (`wildo context info`, `wildo context elements`), so\n * the research-written parts of EVERY behavior's answer are screened in THIS process before they leave (#2938),\n * through the table that is total over the behaviors (`INTROSPECTION_ANSWER_SCREENING`): a behavior that carries\n * none is served as it came, by a recorded decision. The subprocess holds no classifier, and the derivation cache\n * may hold its answer, so screening a served answer every time is what keeps a held derivation from ever holding a\n * screening.\n */\n const served = result.success && 'data' in result\n ? {\n ...result,\n data: await screenIntrospectionAnswer(behavior, result.data, {\n input,\n host: researchFamilyScreeningHostOf(this.contentSafety, this.logger, `introspection:${behavior}`),\n researchInformedFamilies: () => readCompanionResearchInformedFamilies(this.companionContext),\n }),\n }\n : result;\n await this.traceSessionArtifact(\n res,\n CompanionTraceabilityLevel.DEBUG_VERBOSE,\n 'introspection-result.json',\n served,\n traceStep,\n );\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-success',\n `Resolved companion introspection behavior ${behavior}`,\n {\n serviceKey,\n behavior,\n targetId: result.targetId,\n durationMs: result.durationMs,\n },\n traceStep,\n );\n this.jsonSuccess(res, served);\n } catch (e) {\n if (!mappedFailureAlreadyTraced) {\n await this.traceSessionEvent(\n res,\n CompanionTraceabilityLevel.DEBUG,\n 'introspection-request-failure',\n 'Companion introspection request failed',\n {\n error: describeCaughtError(e),\n },\n traceStep,\n );\n }\n /*\n * The caller-input contract holds for a PARENT-side throw too, and it did not until now.\n *\n * `isValidationIntrospectionFailure` above reads a failure RESULT — the shape a subprocess\n * error comes back in, with its name carried across the boundary as a string. But resolution\n * runs in this process, BEFORE any subprocess: an unknown service key, an unknown behavior, a\n * behavior asked of the wrong service kind all throw here and reached `jsonError` unclassified,\n * so a perfectly actionable message (\"Unknown SaaS service key ... This application declares:\n * ...\") was sanitized to a bodyless 500 INTERNAL. The CLI's health hint is gated on a 4xx, so\n * it then fired on a companion that is demonstrably up and sent the reader to check a process\n * instead of their own argument — the exact failure #1459 fixed on the result path, arriving\n * through the door nobody had enumerated.\n *\n * Matched by NAME rather than `instanceof` for the same reason the name exists: it is the one\n * property that survives every boundary this error can cross.\n */\n if ((e as { name?: string })?.name === INTROSPECTION_INPUT_VALIDATION_ERROR_NAME) {\n this.jsonError(\n res,\n this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: (e as Error).message },\n },\n ) as any,\n next,\n );\n return;\n }\n this.jsonError(res, e as any, next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // PROMPT (TODO)\n // ─────────────────────────────────────────────────────────────────────────────\n\n private async buildPrompt(_req: Request, res: Response, _next: NextFunction) {\n try {\n this.jsonSuccess(res, { prompt: 'Not implemented yet', message: 'Prompt building service is not yet available' });\n } catch (e) {\n this.jsonError(res, e as any, _next);\n }\n }\n\n // ─────────────────────────────────────────────────────────────────────────────\n // MARKET (Market generation, Phase 4.2)\n // ─────────────────────────────────────────────────────────────────────────────\n\n /**\n * POST /api/companion/market/generate\n *\n * Body: `MarketGenerationRequest`\n * - `templateRef` (required) — `MarketMessageTemplate.ref`\n * - `icpRef`, `featureRef`, `benefitRef`, `channelRef`, `objectionRef` —\n * resolved against the snapshot; their inclusion must match the\n * template's `requiredInputs`.\n * - `outputLanguage` — defaults to \"English\" inside the renderer when\n * omitted; honored verbatim when provided.\n *\n * The handler is intentionally thin — `MarketGenerationCompanionService`\n * owns the introspection + LLM orchestration. We only do\n * minimal-shape validation here so the operator gets a clean\n * 400 instead of a confusing 500 when `templateRef` is missing.\n */\n /**\n * `GET /playbooks/coherence` — the questions no single family answers about itself.\n *\n * Returns both the structured findings and the rendered markdown: the first for a workbench, the\n * second because the intended reader is a human deciding whether to commit, and prose is what they\n * read. It REPORTS — a coverage gap is frequently a deliberate decision — so there is no verdict\n * field and nothing here refuses.\n */\n /**\n * `POST /research` — one read-only research turn.\n *\n * Deliberately NOT under `/playbooks`: research is a capability, and binding it to the playbook\n * lane before a playbook consumes it would make the first consumer's shape the contract. It is\n * reachable on its own so the lane can be exercised and measured before anything is choreographed\n * around it.\n */\n private async runResearchTask(req: Request, res: Response, next: NextFunction) {\n try {\n const objective = (req.body ?? {}).objective;\n if (typeof objective !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`objective` is required and must be a string.' },\n });\n }\n const evidenceScope = (req.body ?? {}).evidenceScope;\n const result = await this.researchAgentDispatchService.runResearchTask({\n objective,\n ...(typeof evidenceScope === 'string' && evidenceScope.length > 0 ? { evidenceScope } : {}),\n });\n // The whole result, including the permission decisions: a thin answer has two very different\n // causes — little was found, or a tool was refused — and the prose alone cannot tell them apart.\n res.json(result);\n } catch (error) {\n if (error instanceof ResearchAgentUnavailableError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * `GET /workspace/elements` — the application's own code truth, by resource (#1437).\n *\n * It could only be read WHOLE: `resources-registry` answers 43 KB, `resource-specifications`\n * 227 KB, and no filter on the pull door reached a module, a resource, a field, a relationship or\n * an operation. A build task targets ONE resource.\n *\n * The narrowing is HERE rather than in the derivation, and that is the design: the projection\n * behind it costs ~35 s and the introspection cache keys on a behavior's input, so a filter pushed\n * down would make every distinct question a fresh subprocess. One derivation, cached, sliced many\n * times — and two slices of one projection cannot disagree about an application being edited.\n *\n * Every answer carries its FRESHNESS, which is the third thing #1437 asks for and the one a\n * caller cannot reconstruct: the registry once reported 15 resources as a held derivation while\n * the specification set and the compiled dist both had 16.\n */\n private async readWorkspaceElements(req: Request, res: Response, next: NextFunction) {\n try {\n const operation = String(req.query.op ?? WorkspaceElementOperation.MAP);\n const serviceKey = typeof req.query.serviceKey === 'string' && req.query.serviceKey.length > 0\n ? req.query.serviceKey\n : this.companionIntrospectionService.describeCatalog().defaultBackendServiceKey;\n if (serviceKey === null) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'This application declares no backend service to introspect.' },\n });\n }\n const { index, freshness } = await readWorkspaceElements(this.companionIntrospectionService, serviceKey);\n const answeredWith = { freshness: describeWorkspaceFreshness(freshness), held: freshness.held, ageMs: freshness.ageMs };\n const readList = (value: unknown): string[] | undefined => {\n if (typeof value === 'string') return value.split(',').map((entry) => entry.trim()).filter((entry) => entry.length > 0);\n return Array.isArray(value) ? value.map(String) : undefined;\n };\n\n if (operation === WorkspaceElementOperation.MAP) {\n const kinds = readList(req.query.kinds) as WorkspaceElementKind[] | undefined;\n res.json({\n ...answeredWith,\n op: WorkspaceElementOperation.MAP,\n lines: mapWorkspaceElements(index, {\n ...(kinds ? { kinds } : {}),\n ...(readList(req.query.resources) ? { resourceTypes: readList(req.query.resources)! } : {}),\n }),\n });\n return;\n }\n\n const resourceType = typeof req.query.resource === 'string' ? req.query.resource : '';\n if (resourceType.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`resource\\` is required for op=${operation}. Ask op=map first for the refs this application has.` },\n });\n }\n\n if (operation === WorkspaceElementOperation.GET) {\n const resource = getWorkspaceResource(index, resourceType);\n if (resource === undefined) {\n // NOT an empty resource: \"does not exist\" and \"exists and holds nothing\" are different\n // answers, and a creation task depends on which one it got. The hint travels as GUIDANCE: a 404's\n // context is stripped before it leaves the companion (#1588).\n // In the words of the CLI verb that reaches this route, since that is the reader (#1588 review F5).\n const hint = `No resource \\`${resourceType}\\` is registered in this application. \\`wildo context workspace map\\` (op=map) lists the resources it has.`;\n throw this.errorBuilder.buildErrorWithGuidanceKey(ErrorType.NOT_FOUND, undefined,\n CompanionErrorGuidanceKey.WORKSPACE_RESOURCE_NOT_REGISTERED, { explanation: hint },\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { message: hint } });\n }\n res.json({ ...answeredWith, op: WorkspaceElementOperation.GET, resource });\n return;\n }\n\n if (operation === WorkspaceElementOperation.RELATED) {\n const hops = Number(req.query.hops ?? 1);\n res.json({\n ...answeredWith,\n op: WorkspaceElementOperation.RELATED,\n ...relatedWorkspaceResources(index, resourceType, { hops: Number.isFinite(hops) ? hops : 1 }),\n });\n return;\n }\n\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `Unknown op \\`${operation}\\`. One of: ${Object.values(WorkspaceElementOperation).join(', ')}.` },\n });\n } catch (error) {\n next(error);\n }\n }\n\n private async readCoherenceReport(_req: Request, res: Response, next: NextFunction) {\n try {\n const { report, markdown } = await this.playbookRunService.buildCoherenceReport();\n res.json({ ...report, markdown });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `POST /playbooks/loop` — chain playbooks unattended.\n *\n * `maximumIterations` is required and bounded: an unattended loop over a developer's source tree must\n * have a ceiling the CALLER chose, not one this handler picked on their behalf.\n */\n private async runPlaybookLoop(req: Request, res: Response, next: NextFunction) {\n // A loop is held for as long as it runs, often past the server's 30-minute inactivity limit (#3888).\n holdOpenWithoutInactivityTimeout(req, res);\n try {\n const body = req.body || {};\n const goal = typeof body.goal === 'string' && body.goal.trim().length > 0 ? body.goal.trim() : null;\n if (!goal) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`goal` is required and must be a non-empty string.' },\n });\n }\n const maximumIterations = Number(body.maximumIterations);\n if (!Number.isSafeInteger(maximumIterations) || maximumIterations < 1 || maximumIterations > 20) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`maximumIterations` is required and must be an integer between 1 and 20.' },\n });\n }\n const fanOut = body.fanOut === undefined ? undefined : Number(body.fanOut);\n if (fanOut !== undefined && (!Number.isSafeInteger(fanOut) || fanOut < 1 || fanOut > 5)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`fanOut` (lanes per iteration) must be an integer between 1 and 5 when provided.' },\n });\n }\n this.assertCreationLanePreflight(body);\n const result = await this.playbookRunService.runPlaybookLoop({\n goal,\n maximumIterations,\n ...(fanOut !== undefined ? { maximumLanesPerIteration: fanOut } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n });\n res.json(describePlaybookLoopResponse(result));\n } catch (error) {\n if (error instanceof PlaybookRunAlreadyInFlightError) {\n // 409: the caller is authorized and the payload is valid; the current STATE forbids a second run.\n // Caught on the BASE: a loop iteration can select a composite, so this route can be refused by\n // the choreography's single-flight guard as well as by the loop's own.\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * Read `elicitationAnswers` off an untrusted body without inventing anything.\n *\n * Shape only — whether the answers MATCH the playbook's declared questions is the runtime's contract to\n * enforce, and duplicating that check here would create a second description of the interview.\n */\n\n /**\n * The operator-facing sentence for a DISPATCH run.\n *\n * Extracted because the two call sites had drifted into two half-true copies, and a LIVE dry run\n * caught both: the note claimed \"Application CODE was written in the workspace\" on a run that\n * wrote nothing, and said \"to the coding agent\" for a task whose targetKind was\n * COMPANION_GENERATION_STEP -- which the COMPANION executes, not a coding agent. The dispatch\n * service routes by the task's own target kind and serves BOTH executors, so the message must read\n * it rather than assume one.\n *\n * No unit test caught either: they assert the service RESULT, and this is the controller's prose.\n */\n /**\n * What a `top_down.expert-personas` run did (#572), as a sentence — derived/waiting/refused counts and where\n * the charters went. Since #2419 a run that landed a charter records its writes like any landing and returns its\n * `runId`, so the sentence names the console verbs that review, accept and undo it; a run that landed nothing has\n * no record and names none.\n */\n private describeStaffingOutcome(result: {\n readonly dryRun?: true;\n readonly runId?: string;\n readonly roster: readonly unknown[];\n readonly alreadyCommitted: readonly string[];\n readonly rederived?: ReadonlyArray<{ readonly roleRef: string; readonly changedInputs: readonly string[] }>;\n readonly driftedEdited?: ReadonlyArray<{ readonly roleRef: string; readonly changedInputs: readonly string[] }>;\n readonly derived: ReadonlyArray<{ readonly roleRef: string }>;\n readonly waiting: ReadonlyArray<{ readonly roleRef: string; readonly missingFamilies: readonly string[] }>;\n readonly refused: ReadonlyArray<{ readonly roleRef: string; readonly reason: string }>;\n }): string {\n if (result.dryRun === true) {\n return `Dry run: the roster of ${result.roster.length} convened role(s) was computed and NOTHING was derived or written.`;\n }\n const parts = [\n `${result.derived.length} charter(s) derived and accepted into specifications/src/personas/ (${result.derived.map((entry) => entry.roleRef).join(', ') || 'none'})`,\n `${result.alreadyCommitted.length} already committed and left alone`,\n ];\n const drift = (entries: NonNullable<typeof result.rederived>): string =>\n entries.map((entry) => `${entry.roleRef}: ${entry.changedInputs.join('+')}`).join('; ');\n if (result.rederived !== undefined && result.rederived.length > 0) {\n parts.push(`${result.rederived.length} derived again because an input changed after its charter (${drift(result.rederived)})`);\n }\n if (result.driftedEdited !== undefined && result.driftedEdited.length > 0) {\n parts.push(`${result.driftedEdited.length} hand-edited and older than an input, left alone for you to update (${drift(result.driftedEdited)})`);\n }\n if (result.waiting.length > 0) {\n parts.push(`${result.waiting.length} waiting on families not yet landed (${result.waiting.map((entry) => `${entry.roleRef}: ${entry.missingFamilies.join('+')}`).join('; ')}) — re-run once they land`);\n }\n if (result.refused.length > 0) {\n parts.push(`${result.refused.length} refused (${result.refused.map((entry) => `${entry.roleRef}: ${entry.reason}`).join('; ')})`);\n }\n const handle = result.runId === undefined\n ? (result.derived.length === 0\n ? 'Nothing was written, so there is nothing to accept.'\n : 'Its write record could not be kept: review `git status` and commit the charters by hand.')\n : `Review them with \\`wildo creation diff ${result.runId}\\`, then accept with \\`wildo creation accept ${result.runId}\\` or undo with \\`wildo creation revert ${result.runId}\\`.`;\n return `Staffed the expert panels: ${parts.join('; ')}. ${handle}`;\n }\n\n private describeDispatchOutcome(result: {\n readonly taskRef: string;\n readonly targetKind: string;\n readonly remainingReadyTaskRefs: readonly string[];\n readonly dryRun?: true;\n } | { readonly wave: ApplicationBuildWaveResult }): string {\n if ('wave' in result) {\n // A parallel wave (#1528): what ran, how it settled, and what the end-of-wave repair committed.\n const { wave } = result;\n const settled = wave.outcomes.filter((outcome) => outcome !== null);\n const completed = settled.filter((outcome) => outcome!.status === FlowsActors_Status.COMPLETED).length;\n const reconciled = wave.reconciliation.filter((entry) => entry.committedPaths > 0).length;\n // A completed run whose product a sibling overwrote, and whether the wave re-ran its task alone (#2210).\n // Three endings, kept apart: re-run, could not be re-armed or re-run (an error), and the bound already spent.\n const rerun = wave.interferenceRepairs.filter((repair) => repair.rerun !== undefined && repair.rerun.error === undefined).map((repair) => repair.taskRef);\n const failed = wave.interferenceRepairs.filter((repair) => repair.rerun?.error !== undefined).map((repair) => `${repair.taskRef} (${repair.rerun!.error})`);\n const spent = wave.interferenceRepairs.filter((repair) => repair.rerun === undefined).map((repair) => repair.taskRef);\n const repaired = wave.interferenceRepairs.length === 0 ? ''\n : ` ${wave.interferenceRepairs.length} completed run(s) lost their product to a sibling (suspected)`\n + (rerun.length > 0 ? `; re-run alone: ${rerun.join(', ')}` : '')\n + (failed.length > 0 ? `; could not be re-run, waiting for a person: ${failed.join(', ')}` : '')\n + (spent.length > 0 ? `; interference re-runs spent, waiting for a person: ${spent.join(', ')}` : '')\n + '.';\n // #2222: a wave that finished the plan says whether the application assembles — never just \"every task landed\".\n const assembly = wave.assembly === undefined ? ''\n : wave.assembly.specificationFault !== undefined\n ? ` Nothing can run and the plan is not finished: specifications module ${wave.assembly.specificationFault.failingModules.map((modulePath) => `\"${modulePath}\"`).join(', ')} could not be evaluated.`\n : wave.assembly.passed ? ` Every task has landed and the application assembles (${wave.assembly.checkRefs.length} check(s) passed).`\n : wave.assembly.failed.length > 0\n ? ` Every task has landed, but the application does NOT assemble: ${wave.assembly.failed.map((entry) => entry.checkRef).join(', ')} failed.`\n : ` Every task has landed; whether the application assembles could not be checked: ${wave.assembly.couldNotRun}.`;\n // #2405: a wave that stopped because the backend does not start says so first, with the refusal and the candidates.\n /*\n * Each failure's own remedy (#3214, #3217): a startup the application's code refused names the task repair and the\n * runs this wave landed; a dev-stack cause (a held port, an orphan or stale backend, a backend nothing restarted,\n * unreachable infrastructure) names the stack's repair and no candidate task, since no task broke it.\n */\n const notBooting = (wave.bootFailures ?? []).map((failure) => ` THE BACKEND DOES NOT START (${failure.serviceIdentifier}): `\n + `${failure.message ?? 'no reason recorded'}`\n + (!isApplicationStartupFailure(failure) ? ''\n : failure.landedThisWave.length > 0 ? ` Landed in this wave before it stopped: ${failure.landedThisWave.join(', ')}.` : ' It was already failing when the wave began.')\n + ` Nothing more is dispatched until it starts. ${failure.remedy}`).join('');\n // #2388: a wave held by the coding agent's usage limit says when the build resumes, and that it resumes on its own.\n const usageLimited = wave.usageLimit === undefined ? ''\n // #3204: a refused provider ACCOUNT is no limit that resets; a person adds credits or raises it.\n : wave.usageLimit.accountRefusal !== undefined\n ? ` The coding agent's provider account refused its turn (met by ${wave.usageLimit.taskRef}): ${describeModelProviderAccountRefusal(wave.usageLimit.accountRefusal)} `\n + `No build task runs until it answers again; the companion asks again at ${wave.usageLimit.resumesAt}. Refused runs count against no attempt budget.`\n : ` The coding agent's account hit its usage limit (met by ${wave.usageLimit.taskRef}): no build task runs before ${wave.usageLimit.resumesAt}, `\n + 'and the companion submits the next build wave on its own then. Runs refused by the limit count against no attempt budget.';\n return `${notBooting}Ran a parallel build wave at degree ${wave.degree}: ${wave.dispatched.length} task(s) dispatched, `\n + `${completed} of ${settled.length} coding run(s) completed, ${reconciled} reconciled at the end of the wave.${repaired} `\n + `It stopped taking tasks because: ${wave.stoppedFillingBecause}.${usageLimited}${assembly} Each run's row carries \\`concurrency\\`, \\`interferenceSuspected\\` and \\`interference\\`.`;\n }\n const executor = result.targetKind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n ? \"the companion's own generation pipeline\"\n : 'the coding agent';\n const remainder = `${result.remainingReadyTaskRefs.length} further task(s) were ready and were NOT run: dispatch is single-flight, one task per run.`;\n if (result.dryRun === true) {\n return `Dry run: the next ready build task is \\`${result.taskRef}\\`, which would run on ${executor}. NOTHING was dispatched and nothing was written. ${remainder}`;\n }\n return `Dispatched build task \\`${result.taskRef}\\` to ${executor}. Work landed in the application WORKSPACE -- not the specifications package -- so review \\`git status\\` there and commit to accept it. ${remainder}`;\n }\n\n private readElicitationAnswers(value: unknown): readonly PlaybookElicitationAnswer[] | undefined {\n if (value === undefined || value === null) return undefined;\n if (!Array.isArray(value)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`elicitationAnswers` must be an array of { questionRef, answer }.' },\n });\n }\n return value.map((entry: unknown, index: number) => {\n const shaped = entry as { questionRef?: unknown; answer?: unknown } | null;\n if (typeof shaped?.questionRef !== 'string' || typeof shaped.answer !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `elicitationAnswers[${index}] must be { questionRef: string, answer: string }.` },\n });\n }\n return { questionRef: shaped.questionRef, answer: shaped.answer };\n });\n }\n\n /**\n * The held answers of the status reads (#3207, #3208). Built lazily: routes are registered from the base\n * class constructor, before this class's field initializers run.\n */\n private readVerbSnapshotsHolder: ReadVerbSnapshots | undefined;\n\n /**\n * Serve a status read from its latest answer when a derivation of it is still running, marked with its\n * age in `readFreshness` (see {@link ReadVerbSnapshots}).\n *\n * The handler runs unchanged against a stand-in for the response that records what it would have sent,\n * so the handlers keep their own logic and only the serving moves. Only a 2xx answer is held; any other\n * response is replayed to the readers that waited on it and is not served to later ones. A derivation\n * joined by several readers runs once, with the first reader's request.\n */\n private serveFromLatestAnswer(\n key: ReadVerbSnapshotKey,\n handler: (req: Request, res: Response, next: NextFunction) => Promise<void>,\n ): (req: Request, res: Response, next: NextFunction) => Promise<void> {\n return async (req, res, next) => {\n this.readVerbSnapshotsHolder ??= new ReadVerbSnapshots();\n try {\n const outcome = await this.readVerbSnapshotsHolder.read(key, () => captureHandlerResponse(handler, req, res));\n if (outcome.kind === 'in-progress') {\n res.setHeader('Retry-After', String(outcome.retryAfterSeconds));\n res.status(503).json({\n error: {\n type: ReadVerbRefusalType.DERIVATION_IN_PROGRESS,\n details: {\n message: `The companion is still deriving this answer (started ${outcome.since}) and has no earlier one to show yet. `\n + `Ask again in ${outcome.retryAfterSeconds} s.`,\n },\n },\n derivationInProgress: { since: outcome.since, retryAfterSeconds: outcome.retryAfterSeconds },\n });\n return;\n }\n const { body } = outcome.value;\n res.status(outcome.value.status).json(\n body !== null && typeof body === 'object' && !Array.isArray(body) ? { ...body, readFreshness: outcome.freshness } : body,\n );\n } catch (error) {\n if (error instanceof UnheldHandlerResponse) {\n res.status(error.status).json(error.body);\n return;\n }\n next(error);\n }\n };\n }\n\n /**\n * `GET /build/next` — what the next coding run would be.\n *\n * A read, deliberately separate from the action rather than a flag on it. Seeing the scope before\n * starting a run is genuinely useful; making the run itself demand a second \"yes\" is a ceremony that\n * enforces nothing the mutation scope, the lock and the change-set capture do not already enforce.\n */\n private async describeNextBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n /*\n * SPREAD, so `plan` stays exactly where every existing reader already looks. There are THREE\n * answers, all 200: a `plan`; `plan: null` with `exhausted` (every task landed); and `plan: null`\n * with `stuckQueue` and a non-empty `stuckTasks` (every ready task is stuck, #1451 — this was a\n * 400 before). So `plan: null` alone does NOT mean finished; read `exhausted`. `stuckTasks` is\n * present beside a plan too, naming what the selection passed over.\n */\n const description = await this.buildDispatchService.describeNextBuildTaskOrExhaustion();\n res.json({ ...description, dispatched: false });\n } catch (error) {\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `GET /build/dispatches` — how far each recent dispatch got (`Workbench_BuildDispatchPhase`).\n *\n * EVERY dispatch, since #1274: the workbench fires through the `dispatch_next` resource operation\n * rather than through this route's `async` door, and the record used to be kept only by the latter.\n *\n * Not an outcome for a coding task: that dispatch settles at ADMITTED, and the run's result is the durable\n * actor-task row the record names (`codingTaskId`).\n */\n private async readBuildDispatches(_req: Request, res: Response, next: NextFunction) {\n try {\n // Read from the actor plane since #1359, so the narrative survives a companion restart. The running wave's\n // preparation rides beside it (#3206): \"selected X, preparing dispatch since T (step)\" is the gap the rows cannot show.\n res.json({\n dispatches: await this.buildDispatchService.readDetachedDispatches(this.getTraceSession(res)),\n ...this.buildDispatchService.readBuildDispatchPreparation(),\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `POST /build/stop` — `wildo build stop` (#3206): the running wave starts no new task and ends once its live runs\n * settle; nothing is cancelled. Answers `{ stopping: false }` when no wave runs here, which is a true answer, not an error.\n * The stop is a HOLD, set whether or not a wave runs: until a person's door ADMITS a start — `wildo build run`,\n * `wildo build run <taskRef>` or the workbench's dispatch-next, an authenticated console or workbench caller — every\n * other start is refused 409: the build lane's selector, the loop, the usage-limit resume, and the workbench's per-task\n * dispatch (it also fires on its own). A person's start that is itself refused leaves the hold. The hold lives in this\n * process and does not survive a companion restart, which ends any wave anyway.\n */\n private async stopBuildWave(_req: Request, res: Response, next: NextFunction) {\n try {\n res.json(this.buildDispatchService.requestBuildWaveStop());\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /build/tasks` — every build-plan task in ONE read (#1521): its attempts newest first, the typed\n * reason dispatch passes over it, and for a task that ran without landing, exactly what each unmet\n * probe searched for and whether the working tree holds it. Composed from rows that already exist and\n * stored nowhere. `{ records: null }` when the application has no build plan — absence, not an empty\n * build.\n */\n private async readBuildTaskRecords(_req: Request, res: Response, next: NextFunction) {\n try {\n /*\n * The specifications the companion refused to serve sit beside the records (#3210): a refused resource spec is\n * absent from every board, and the task list is where a builder looks first. So do the modules it could not\n * evaluate (#3258): each serves nothing until fixed.\n */\n const { faults: specificationFaults, moduleFaults: specificationModuleFaults } = await readSpecificationsEvaluationFindings(this.companionContext);\n /*\n * Files the tasks' runs left uncommitted that no automatic door will commit (#3267; a stuck task's declared product aside, #3204), with the door for each. Best\n * effort: a read that fails costs this list, never the task records, and says so.\n */\n const leftovers = await Promise.resolve().then(() => this.acceptedChangeCommitService.listUncommittedRunLeftovers()).catch((error: unknown) => {\n this.logger.warn('Could not list the files build-task runs left uncommitted; the task list names none', { error: describeCaughtError(error) });\n return [];\n });\n /* A plan a failed module holds is not \"no plan\": the list says why it cannot be read, beside the fault naming the module. */\n const held = await this.buildDispatchService.describeBuildTaskRecords(this.getTraceSession(res)).then(\n (records) => ({ records: records ?? null }),\n (error: unknown) => {\n if (!isBuildPlanHeldByFailedModule(error)) throw error;\n return { records: null, buildPlanUnavailable: error.message };\n },\n );\n res.json({ ...held, specificationFaults, specificationModuleFaults, leftovers });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `POST /build/tasks/:taskRef/rearm` — the door the \"completed but not landed\" guard was missing\n * (#1535). Records a re-arm on every completed run that still holds the task, so the next dispatch\n * offers it again. Refuses with 409, naming why, when there is nothing to re-arm.\n */\n private async rearmBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n const parsed = CompanionRearmBuildTaskRequestSchema.safeParse(req.body ?? {});\n if (!parsed.success) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: {\n message: 'This is not a re-arm request: '\n + parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; '),\n },\n }));\n return;\n }\n const taskRef = String(req.params.taskRef);\n res.json(await this.buildDispatchService.rearmBuildTask(taskRef, parsed.data, this.getTraceSession(res)));\n } catch (error) {\n if (error instanceof NothingToRearmError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `POST /build/tasks/:taskRef/close` (#3224, #3225, #3227) — record that a task is done another way, or decline a\n * derived follow-up, as a committed decision record. Refuses with 409, naming why, when the closure does not hold.\n */\n private async closeBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n const parsed = CompanionCloseBuildTaskRequestSchema.safeParse(req.body ?? {});\n if (!parsed.success) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'This is not a close request: ' + parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; ') },\n }));\n return;\n }\n res.json(await this.buildDispatchService.closeBuildTask(String(req.params.taskRef), parsed.data, DecisionRecordActor.CREATOR));\n } catch (error) {\n if (error instanceof BuildTaskDecisionRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `POST /build/tasks/:taskRef/settle-window` (#3224 review F2) — a person bounds the open window of the task's settled runs\n * that recorded no HEAD, at the current HEAD. Refuses with 409, naming why, while runs are live or parked, or when there is\n * nothing to bound.\n */\n private async settleBuildTaskRunWindows(req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.buildDispatchService.settleRunWindows(String(req.params.taskRef)));\n } catch (error) {\n if (error instanceof BuildTaskDecisionRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `POST /build/tasks/:taskRef/approve` (#3227) — the creator lets a derived follow-up run, under a posture where follow-ups\n * wait for review. Committed as a decision record; refuses with 409, naming why, when there is nothing to approve. A\n * person's door: it starts nothing, so the next wave (or `wildo build run`) runs the follow-up, and a stop hold stays.\n */\n private async approveFollowUpTask(req: Request, res: Response, next: NextFunction) {\n try {\n const parsed = CompanionApproveFollowUpTaskRequestSchema.safeParse(req.body ?? {});\n if (!parsed.success) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'This is not an approve request: ' + parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; ') },\n }));\n return;\n }\n res.json(await this.buildDispatchService.approveFollowUpTask(String(req.params.taskRef), parsed.data, DecisionRecordActor.CREATOR));\n } catch (error) {\n if (error instanceof BuildTaskDecisionRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `POST /build/dispatch-next` — run the build: a parallel wave, or the next ready task alone.\n *\n * DETACHED (`async: true`, the console's `wildo build run`): with a build parallelism above one it\n * starts a WAVE (#2208) — up to that many coding runs at once in the one worktree, refilled as each\n * settles, reconciled and repaired at the end (`dispatchBuildWave`). `single: true`, or a degree of\n * one, runs the next ready task alone. SYNCHRONOUS (no `async`): always the next task alone.\n *\n * Each run is bounded by its task's own `target.kind`, its change-set is captured around it, and the\n * required checks gate the result. Under the autonomy posture a working result is then committed by\n * the loop, authored as the companion; under GUIDED nothing is accepted until a person commits (#1534).\n */\n private async dispatchNextBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n // Before the wave or the single task: the build reaches the logo step and the coding agents (#2229).\n this.assertCreationLanePreflight(body);\n /*\n * A person's door (#3206): `wildo build run` may start while a `wildo build stop` holds the build, and ends the hold\n * once its start is ADMITTED — a refused start (a wave still draining, nothing ready) leaves the stop in force.\n */\n const personDoor = BuildStopReleaseDoor.BUILD_RUN;\n // DETACHED mode: a generation step can outlive any reasonable HTTP ceiling (an i18n run\n // measured 40+ minutes against the 30-minute server cap, 2026-09-04), and a response that\n // dies with the socket leaves the operator blind. 202 + the selected plan now. A generation step's\n // outcome is readable at GET /build/dispatches; a coding task settles there at ADMITTED, and its\n // outcome is the durable actor-task row the record names.\n if (body.async === true) {\n /*\n * A PARALLEL BUILD by default (#2208): with a build parallelism above one, the next ready task is\n * not run alone — a wave is started that keeps that many coding runs going until nothing more is\n * ready. Before this, `wildo build run` dispatched one task while the lane's normal mode is five,\n * and an agent following the console built a whole plan one task at a time. `single: true` keeps\n * the one-task dispatch; a degree of one gets it anyway.\n */\n if (body.single !== true) {\n const wave = await this.playbookRunService.submitBuildWaveDetached(this.getTraceSession(res), personDoor);\n if (wave !== undefined) {\n res.status(202).json({\n dispatched: true,\n async: true,\n wave,\n note: `Running a build wave of up to ${wave.degree} tasks at once (run ${wave.runId}). \\`wildo creation feed --follow\\` reports each run and the wave's end; `\n + '`wildo build tasks` shows where every task stands. Set the width with `wildo workbench parallelism <n>`.',\n });\n return;\n }\n }\n const plan = await this.buildDispatchService.submitBuildDispatchDetached(this.getTraceSession(res), undefined, personDoor);\n res.status(202).json({ plan, dispatched: true, async: true, note: 'Running detached. `wildo build dispatches` shows how far it got: a companion generation step reaches FINISHED there; a coding task reaches ADMITTED, and `wildo creation feed --follow` reports how it settles.' });\n return;\n }\n const result = await this.buildDispatchService.dispatchNextBuildTask(\n this.getTraceSession(res),\n personDoor,\n );\n res.json({\n plan: result.plan,\n dispatched: true,\n ...(result.admission ? { admission: result.admission } : {}),\n ...(result.generationStep ? { generationStep: result.generationStep } : {}),\n note: result.generationStep\n ? 'The companion ran this generation step itself. Review `git status` and commit what you accept.'\n : 'A coding agent is running. Its change-set is captured; review `git status` and commit what you accept.',\n });\n } catch (error) {\n /*\n * The wave is a playbook run (#2208), so opening it can refuse the way a playbook run's open does:\n * another run holding the subject (409, the message names it), never a sanitized 500. Readiness is\n * not checked at submission — the detached run checks it and the feed reports it. A wave refused\n * because another runs is a build refusal, answered by `forwardBuildDispatchError` for every build door.\n */\n if (error instanceof PlaybookRunAlreadyInFlightError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /** `POST /playbooks/:playbookRef/judge` — judges SUPPLIED artifacts against a playbook's evaluation treatment; nothing lands. */\n private async judgePlaybookArtifacts(req: Request, res: Response, next: NextFunction) {\n try {\n const { playbookRef } = req.params;\n const body = req.body || {};\n if (!playbookRef || typeof playbookRef !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`playbookRef` path parameter is required.' },\n });\n }\n if (!Array.isArray(body.artifacts) || body.artifacts.length === 0\n || body.artifacts.some((entry: unknown) => typeof (entry as { family?: unknown })?.family !== 'string')) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`artifacts` must be a non-empty array of { family, value }.' },\n });\n }\n const creatorBrief = typeof body.creatorBrief === 'string' ? (body.creatorBrief as string) : undefined;\n const elicitationAnswers = this.readElicitationAnswers(body.elicitationAnswers);\n const result = await this.playbookRunService.judgeArtifacts({\n playbookRef,\n artifacts: body.artifacts,\n ...(creatorBrief ? { creatorBrief } : {}),\n ...(elicitationAnswers ? { elicitationAnswers } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n });\n res.json(result);\n } catch (error) {\n if (error instanceof UnknownPlaybookError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * `GET /runs/writes` — the write register, newest first. Pre-images stay in the records; the listing is a summary.\n *\n * A FAILED landing (#3265) is marked as one and carries the two doors it waits on, so `wildo creation writes` never lists\n * a half-applied composition like a completed landing. A binary file (#3264) says so: its record holds a hash, not text.\n */\n private async listRunWrites(_req: Request, res: Response, next: NextFunction) {\n try {\n const records = await this.runWriteRegister.list();\n res.json({\n runs: records.map((record) => ({\n runId: record.runId,\n playbookRef: record.playbookRef,\n at: record.at,\n files: record.files.map((file) => ({ path: file.path, existedBefore: file.existedBefore, ...(isBinaryWrittenFile(file) ? { binary: true } : {}) })),\n ...(record.acceptedCommitSha !== undefined ? { acceptedCommitSha: record.acceptedCommitSha } : {}),\n // The doors only while nobody settled it: an accepted failed landing is history, still marked failed (#3265 review).\n ...(record.landingFailed === true\n ? { landingFailed: true, ...(record.acceptedCommitSha === undefined ? { remedies: describeFailedLandingRemedies(record.runId) } : {}) }\n : {}),\n })),\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /runs/writes/:runId/diff` — what one run changed, per file (#1274).\n *\n * A pure read — nothing is locked, written or reverted. The workbench does not call it: it reads the\n * same diff through the `read_diff` operation on the run-write-records resource, on the engine's\n * authenticated `/api/v1` plane. This route serves the token-holding callers.\n *\n * It sits beside the revert door on purpose. A run that can be UNDONE must also be SHOWN: acceptance\n * is your own git commit, and a commit decision with nothing to inspect is not one.\n */\n private async readRunWritesDiff(req: Request, res: Response, next: NextFunction) {\n try {\n const runId = req.params.runId;\n if (!runId || typeof runId !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runId` path parameter is required.' },\n });\n }\n this.jsonSuccess(res, await this.runWriteRegister.describeRunDiff(runId));\n } catch (error) {\n /*\n * An unknown run is the caller's mistake and must say so. Passed through raw, it answered a\n * sanitized 500 with an empty body — what `wildo creation diff <typo>` then printed (#1652).\n * The shared translator is what revert and accept already answer with.\n */\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n }\n }\n\n /**\n * `POST /runs/writes/:runId/revert` — restore one run's pre-images. Refuses human-edited files unless\n * `force`, and ALWAYS refuses a file a later run landed on (#1614): revert the newest run first.\n */\n private async revertRunWrites(req: Request, res: Response, next: NextFunction) {\n try {\n const runId = req.params.runId;\n if (!runId || typeof runId !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runId` path parameter is required.' },\n });\n }\n const force = (req.body || {}).force === true;\n const outcome = await this.runWriteRegister.revert(runId, { force });\n res.json({\n ...outcome,\n note: outcome.refusedLaterRun.length > 0\n // #1614: never forced, because it would destroy another run's work nobody asked to undo.\n ? `Some files hold a later run's landing and were NOT reverted, even with force: revert ${[...new Set(outcome.refusedLaterRun.map((entry) => entry.runId))].join(', ')} first.`\n : outcome.refusedWithoutPreImage.length > 0\n // #3264: a binary file that replaced an uncommitted one has no stored pre-image; force cannot give it back.\n ? `Some binary files were NOT reverted, even with force: the run replaced versions that were never committed, and only their hashes are recorded (${outcome.refusedWithoutPreImage.join(', ')}). Restore them from where they came from.`\n : outcome.refusedDiverged.length > 0\n ? 'Some files were edited after the run and were NOT reverted; pass force:true to revert them anyway.'\n : 'All of this run\\'s writes were reverted.',\n });\n } catch (error) {\n if (error instanceof PlaybookRunWriteRecordNotFoundError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * The creation preflight at a door that STARTS a run (#2229): refuse, as a 409, a run the lane's provider calls\n * would be refused in — asked of this companion's own registry, before a brief is composed or a model called.\n * `skipPreflight: true` is the caller's explicit way past it; the step that lacks its provider is refused anyway.\n */\n private assertCreationLanePreflight(body: { readonly skipPreflight?: unknown }): void {\n try {\n assertCreationLanePreflight(this.externalProvidersRegistry, { skip: body.skipPreflight === true });\n } catch (error) {\n if (!(error instanceof CreationLanePreflightRefusedError)) throw error;\n // 409: the caller is authorized and the request is valid; the companion's configuration forbids the run.\n throw this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n });\n }\n }\n\n /**\n * A missing or exhausted build plan is a bad request, not a broken host.\n *\n * Shared by the two BUILD routes and by the playbook run route, which reaches the same dispatch\n * through a playbook declaring `executor: CODING_AGENT` (#119). Falls through to `next(error)` for\n * anything else, so it is safe to call as the last arm of a catch.\n */\n private forwardBuildDispatchError(error: unknown, next: NextFunction): void {\n /*\n * A second wave while one runs (#2208 review M1): a CONFLICT, not a bad request — what was sent is valid,\n * the companion's state forbids it now, and the message says to wait for the running wave. Reached from\n * `wildo build run` and from a build-execution playbook run alike.\n */\n if (error instanceof ApplicationBuildWaveInFlightError || error instanceof ApplicationDoesNotBootError\n // A person's stop holds the build (#3206): refused until a person runs `wildo build run`.\n || error instanceof ApplicationBuildStoppedByPersonError\n // A generation step refused at its gate: the selection passes it over, so this is a module that failed after that read (#3258).\n || error instanceof SpecificationWriteRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n if (error instanceof ApplicationBuildPlanUnavailableError\n || error instanceof ApplicationBuildPlanExhaustedError\n || error instanceof ApplicationBuildTaskNotACodingTaskError\n /*\n * The one that carries the AGENT'S QUESTION. Absent from this list, every ready task being\n * parked answered a sanitized 500 \"internal\" — the operator was told nothing, about a state\n * whose entire remedy is reading what was asked and answering it.\n */\n || error instanceof ApplicationBuildTaskCompletedButUnlandedError\n || error instanceof ApplicationBuildUnknownGenerationStepError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n /*\n * The DOCUMENTATION_PUBLICATION generation step publishes the reference, and a synchronous dispatch (a playbook run\n * at a build parallelism of 1 included; a wave records it on the step's execution row) rethrows its refusal unchanged: a category refusal (#1891) or an untrue authored example (#1838). Both are the application's\n * own declarations, answered exactly as every documentation route answers them, through the one predicate every\n * door shares (#3462). Before that this door knew only the category refusal, and an untrue example reached\n * `wildo build run` as a bare 500 with the list only in the companion's log.\n */\n const documentationRefusal = this.documentationLaneRefusal(error);\n if (documentationRefusal !== undefined) {\n next(documentationRefusal);\n return;\n }\n next(error);\n }\n\n /**\n * `POST /build/tasks/:taskRef/dispatch` — run ONE named build-plan task, the console's\n * `wildo build run <taskRef>`. DETACHED, like `POST /build/dispatch-next`: a coding run takes minutes,\n * and a console that held a socket over it would report nothing while it ran and a failure if the\n * socket broke. It answers 202 with the selected plan; the feed and `wildo build dispatches` say how\n * it went. Readiness is the service's to refuse — a task that is not ready is refused BEFORE the 202 —\n * and its refusals are translated as the workbench's `dispatch_task` operation translates them.\n *\n * One answer is NOT immediate (#2222): when the plan has run out of tasks, the refusal says whether the\n * application assembles, so every package's typecheck runs before it answers — minutes, inside the console's\n * write deadline. That is the moment \"the build is finished\" is claimed, so it is where the claim is checked.\n */\n private async dispatchNamedBuildTask(req: Request, res: Response, next: NextFunction) {\n try {\n const parsed = CompanionDispatchNamedBuildTaskRequestSchema.safeParse(req.body ?? {});\n if (!parsed.success) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: {\n message: 'This is not a build-task dispatch request: '\n + parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; '),\n },\n }));\n return;\n }\n this.assertCreationLanePreflight(parsed.data);\n // A person's door (#3206): naming a task ends a `wildo build stop` hold too, once the task's start is admitted.\n const plan = await this.buildDispatchService.submitBuildDispatchDetached(this.getTraceSession(res), {\n taskRef: String(req.params.taskRef),\n ...(parsed.data.despiteLanded ? { despiteLanded: parsed.data.despiteLanded } : {}),\n }, BuildStopReleaseDoor.BUILD_RUN_NAMED_TASK);\n res.status(202).json({ plan, dispatched: true, async: true });\n } catch (error) {\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n } finally {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n }\n\n /**\n * `POST /build/tasks/:taskRef/accept` — commit the latest coding run's writes for a task\n * (`wildo build accept`). The subject line is the task's own objective, read from the build plan,\n * exactly as the workbench's `accept` operation composes it.\n */\n private async acceptBuildTaskRun(req: Request, res: Response, next: NextFunction) {\n try {\n const taskRef = String(req.params.taskRef);\n const task = (await this.creationPlaneProjection.deriveRows(WorkbenchCreationPlaneBehavior.BUILD_PLAN_TASKS))\n .find((row) => row.taskRef === taskRef);\n const objective = typeof task?.objective === 'string' ? task.objective : undefined;\n // What earlier runs left that no automatic door will commit (#3267; a stuck task's declared product aside, #3204), instead of the latest run's writes.\n if ((req.body ?? {}).leftovers === true) {\n res.json(await this.acceptedChangeCommitService.acceptCodingRunLeftovers({ taskRef, ...((req.body ?? {}).force === true ? { force: true } : {}) }));\n return;\n }\n res.json(await this.acceptedChangeCommitService.acceptCodingRun({\n taskRef,\n ...(objective ? { subject: objective } : {}),\n ...((req.body ?? {}).force === true ? { force: true } : {}),\n }));\n } catch (error) {\n // Translated exactly as the workbench's `accept` operations translate it, so a refusal reads the same through both doors.\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n } finally {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n }\n\n /**\n * `POST /build/checkpoint` (#1885) — a PERSON's build checkpoint (`wildo build checkpoint`): the shared working tree\n * committed as it stands, naming every coding run settled since the last commit that named one, through the same\n * `commitBuildCheckpoint` the automatic lane uses, with the OPERATOR origin. The door under a reviewing posture, where\n * no automatic checkpoint is made and each other door names one task's runs. Refused (409) while a run writes; with no\n * settled run left to name, nothing is committed and the answer says so.\n */\n private async commitOperatorBuildCheckpoint(_req: Request, res: Response, next: NextFunction) {\n try {\n // Not what a generation step is still writing (#4020): the same directories the automatic checkpoint leaves out.\n const excludedPathPrefixes = this.codingAgentDispatchService.generationStepRootsBeingWritten();\n const outcome = await this.acceptedChangeCommitService.commitBuildCheckpoint({\n origin: AcceptOrigin.OPERATOR,\n liveTaskIds: new Set(),\n ...(excludedPathPrefixes.length > 0 ? { excludedPathPrefixes } : {}),\n });\n res.json(outcome ?? { committed: false, reason: 'No settled coding run is waiting to be committed: every run is already named by a commit.' });\n } catch (error) {\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n } finally {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n }\n\n /** `POST /runs/writes/:runId/accept` — commit what one playbook run wrote (`wildo creation accept`). */\n private async acceptPlaybookRunWrites(req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.acceptedChangeCommitService.acceptPlaybookRun({\n runId: String(req.params.runId),\n ...((req.body ?? {}).force === true ? { force: true } : {}),\n }));\n } catch (error) {\n // Translated exactly as the workbench's `accept` operations translate it, so a refusal reads the same through both doors.\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n } finally {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n }\n\n /**\n * `POST /creation/dossier/accept` — commit the creator's recorded answers on their own (`wildo creation accept\n * --dossier`, #2332). A run's accept already carries the dossier it reads; this is for answers no accepted run has\n * read yet.\n */\n private async acceptDossier(_req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.acceptedChangeCommitService.acceptDossier());\n } catch (error) {\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n } finally {\n this.creationPlaneProjection.invalidateDerivedBoards();\n }\n }\n\n /** `GET /traces` — recent execution sessions, newest first. */\n private async listExecutionTraces(req: Request, res: Response, next: NextFunction) {\n try {\n const limit = Number(req.query.limit);\n const sessions = await this.executionTraceReadService.listSessions(\n Number.isSafeInteger(limit) && limit > 0 && limit <= 200 ? limit : undefined,\n );\n res.json({ sessions });\n } catch (error) { next(error); }\n }\n\n /**\n * `GET /traces/:sessionId` — one run, in order.\n *\n * Events carry what happened and why; artifacts are LISTED rather than inlined, because one model answer\n * can be tens of kilobytes and a session can hold several. Fetch a body when you want it.\n */\n private async readExecutionTrace(req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.executionTraceReadService.readSession(String(req.params.sessionId)));\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /**\n * `GET /traces/:sessionId/usage` — what one session spent, in tokens (#1274).\n *\n * Derived, not stored: the agent-call trace sink already writes each call's usage into this\n * session's events, so nothing new is recorded to answer this. Tokens only — a currency figure\n * would need a per-model rate card this repository does not have, and a fabricated number where an\n * operator expects a measured one is the failure this board exists to avoid.\n */\n private async readExecutionTraceUsage(req: Request, res: Response, next: NextFunction) {\n try {\n res.json(await this.executionTraceReadService.summarizeSessionUsage(String(req.params.sessionId)));\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /** `GET /traces/:sessionId/steps/:stepDirName/artifacts/:fileName` — one artifact body, verbatim. */\n private async readExecutionTraceArtifact(req: Request, res: Response, next: NextFunction) {\n try {\n const body = await this.executionTraceReadService.readArtifact(\n String(req.params.sessionId), String(req.params.stepDirName), String(req.params.fileName),\n );\n res.type('text/plain').send(body);\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /**\n * `GET /trace-aliases/actor-task/:taskId` — the trace sessions a coding run recorded into, latest first.\n *\n * Empty for a task the coding lane never ran: that is the ordinary case, not a failure, so it\n * answers `200 { sessionIds: [] }` rather than refusing.\n */\n private async listActorTaskTraceSessions(req: Request, res: Response, next: NextFunction) {\n try {\n res.json({ sessionIds: await this.executionTraceReadService.listActorTaskSessionIds(String(req.params.taskId)) });\n } catch (error) { this.forwardExecutionTraceError(error, next); }\n }\n\n /** A missing trace is a bad request, not a broken host. */\n private forwardExecutionTraceError(error: unknown, next: NextFunction): void {\n if (error instanceof ExecutionTraceNotFoundError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n\n /**\n * The creation board's explicit Refresh (bridge window): drops EVERY derived board the projection caches, not only eligibility. Answers\n * `{invalidated: true}` at once rather than recomputing inline. For boards a workbench tab is\n * watching, the projection's publication pass re-derives them about 250 ms later in the background\n * and publishes whichever moved; an unwatched board is recomputed by the next read that wants it.\n */\n private async refreshPlaybookBoard(_req: Request, res: Response, next: NextFunction) {\n try {\n this.creationPlaneProjection.invalidateDerivedBoards();\n res.json({ invalidated: true });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /playbooks/:playbookRef/decision` — what this playbook asks a person, before it runs.\n *\n * Answers `{ decision: null }` for a playbook with no interview, so a caller may ask\n * unconditionally rather than first deciding from `requiresElicitation` whether the question is\n * worth asking.\n */\n private async readPlaybookElicitationDecision(req: Request, res: Response, next: NextFunction) {\n try {\n const decision = await this.playbookRunService.readPlaybookElicitationDecision(String(req.params['playbookRef']));\n res.json({ decision });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `GET /playbooks` — the eligibility board.\n *\n * Deterministic: it reads the working tree and answers what can run now. This is the gate a model\n * may choose WITHIN and can never widen. It writes nothing, but it is not free of effects — a read\n * that finds the projection's inputs moved drops its caches, which schedules a publication pass to\n * the workbench (see below).\n *\n * Served from the creation-plane projection's CACHED board (#1310 item 5), the same derivation the\n * workbench's playbook list reads. It used to call the playbook service directly — no cache, no\n * single-flight — and measured 22–134 s per call, so a script polling it stacked full derivations\n * behind each other.\n *\n * The resource lane may lag an out-of-process edit by up to one 15 s sweep; this door does not. It\n * re-checks the input signature before reading (one ~60-110 ms walk), and a moved input drops both\n * the cached board and any derivation still in flight from before the move — so an edit an agent\n * made a moment ago is what this read computes against.\n */\n private async listPlaybooks(_req: Request, res: Response, next: NextFunction) {\n try {\n const board = await this.creationPlaneProjection.readFreshPlaybookEligibilityBoard();\n /*\n * No board-level `phase`. It reported a derived APPLICATION phase that was deleted on\n * 2026-09-04 — an application is not in a mode of reasoning, it holds artifacts produced by\n * several. Each row still carries the PLAYBOOK's own phase label, which is the only one that\n * was ever true.\n */\n res.json({\n eligibleCount: board.playbooks.filter((entry) => entry.eligible).length,\n // The application's main line (#1603): what decides which of these rows it may run at all.\n applicationLine: board.applicationLine,\n // What that line no longer uses but the workspace still holds: reported, never removed (#1604).\n applicationLineOrphans: board.applicationLineOrphans,\n // The derived active set (#1607): the line's root, each playbook's place in it, and the tree.\n ...(board.activeSet ? { activeSet: board.activeSet } : {}),\n playbooks: board.playbooks,\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * `POST /playbooks/:playbookRef/instances` — open a playbook INSTANCE for a purpose (#1609).\n *\n * Recorded in the dossier's activation record and committed at once under the automatic posture, with the\n * purpose and the actor as commit trailers. This door is a person's (the workbench, the CLI), so its actor\n * is the creator; the conversation's tool records its own acts as the agent's.\n */\n private async openPlaybookInstance(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n /* `neededFamilies` (#1608): what a secondary line needs back from the main line, each a family value. */\n /* ...and `refinedFamilies`: what a refinement line re-derives. Both are lists of family values. */\n const families = new Set<string>(Object.values(ApplicationSpecificationFamily));\n const isFamilyList = (value: unknown): boolean => Array.isArray(value) && value.every((family: unknown) => typeof family === 'string' && families.has(family));\n const malformed = (['neededFamilies', 'refinedFamilies'] as const).find((field) => body[field] !== undefined && !isFamilyList(body[field]));\n if (malformed !== undefined) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\"${malformed}\" must be a list of specification family values.` },\n }));\n return;\n }\n const result = await this.playbookInstanceService.openInstance({\n playbookRef: String(req.params.playbookRef ?? ''),\n instanceKey: typeof body.instanceKey === 'string' ? body.instanceKey : '',\n purpose: typeof body.purpose === 'string' ? body.purpose : '',\n ...(body.neededFamilies !== undefined ? { neededFamilies: body.neededFamilies as ApplicationSpecificationFamily[] } : {}),\n ...(body.refinedFamilies !== undefined ? { refinedFamilies: body.refinedFamilies as ApplicationSpecificationFamily[] } : {}),\n actor: DecisionRecordActor.CREATOR,\n ...(body.dryRun === true ? { dryRun: true } : {}),\n });\n res.status(result.commitSha ? 201 : 200).json(result);\n } catch (error) {\n if (error instanceof PlaybookInstanceRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n if (error instanceof PlaybookInstanceTreeBusyError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * `POST /playbooks/:playbookRef/instances/:instanceKey/close` — close an instance (#1608): `completed` or\n * `abandoned`, with an optional reason. Recorded and committed; abandoning cancels its runs waiting on a person\n * and consumes its interrupted progress. 400 for an instance nobody opened or one already closed, 409 while a\n * coding run holds the tree.\n */\n private async closePlaybookInstance(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const kind = Object.values(ApplicationPlaybookInstanceClosureKind).find((candidate) => candidate === body.kind);\n if (kind === undefined) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\"kind\" must be one of ${Object.values(ApplicationPlaybookInstanceClosureKind).join(', ')}.` },\n }));\n return;\n }\n const result = await this.playbookInstanceService.closeInstance({\n playbookRef: String(req.params.playbookRef ?? ''),\n instanceKey: String(req.params.instanceKey ?? ''),\n kind,\n ...(typeof body.reason === 'string' ? { reason: body.reason } : {}),\n actor: DecisionRecordActor.CREATOR,\n });\n res.status(200).json(result);\n } catch (error) {\n if (error instanceof PlaybookInstanceRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n if (error instanceof PlaybookInstanceTreeBusyError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * `POST /playbooks/:playbookRef/run` — run one compiled playbook and land its outputs.\n *\n * The response reports the FILES that appeared and how many attempts each family took. It reports no\n * acceptance, because none happened in the run: under the autonomy posture the companion commits these\n * writes before the next build baseline (authored as itself), and under GUIDED a person does (#1534).\n */\n private async runPlaybook(req: Request, res: Response, next: NextFunction) {\n try {\n const playbookRef = req.params.playbookRef;\n if (!playbookRef || typeof playbookRef !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`playbookRef` path parameter is required.' },\n });\n }\n const body = req.body || {};\n const creatorBrief = typeof body.creatorBrief === 'string' ? (body.creatorBrief as string) : undefined;\n /*\n * Per-run answers ONLY: this route files nothing in the dossier. The workbench's Run gate files the\n * answers the dossier still needed before it runs (`fileStillNeededAnswers`, #1454 review), and it\n * can because a signed-in person is there to record them against; this is the CLI/script door,\n * with no person to attribute an answer to, so its answers stay overrides of this run.\n */\n const elicitationAnswers = this.readElicitationAnswers(body.elicitationAnswers);\n const dryRun = body.dryRun === true;\n // The playbook INSTANCE to run (#1609); the run refuses one that was never opened.\n const instanceKey = typeof body.instanceKey === 'string' && body.instanceKey.trim().length > 0 ? body.instanceKey.trim() : undefined;\n this.assertCreationLanePreflight(body);\n const runInput = {\n playbookRef,\n ...(instanceKey ? { instanceKey } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n ...(creatorBrief ? { creatorBrief } : {}),\n ...(elicitationAnswers ? { elicitationAnswers } : {}),\n ...(dryRun ? { dryRun: true } : {}),\n };\n /*\n * `async: true` returns at SUBMISSION (#265): the synchronous shape holds one request open for\n * the run's life, and the server's 30-minute ceiling is shorter than a choreography's own\n * bound — the connection died at exactly 1800s twice while the run completed server-side. The\n * outcome (success OR failure) lands in GET /playbooks/runs `lastCompleted`.\n */\n if (body.async === true) {\n res.status(202).json(await this.playbookRunService.submitPlaybookRunDetached(runInput));\n return;\n }\n const result = await this.playbookRunService.runPlaybook(runInput);\n if ('status' in result && result.status === Workbench_PlaybookRunOutcomeStatus.AWAITING_CREATOR_INPUT) {\n // 200, not an error status: the run is HEALTHY and waiting. The creator answers through\n // POST /playbooks/runs/:runId/resume, which is the industry three-action model\n // (accept / decline / cancel) at the transport.\n res.json({\n ...result,\n accepted: false,\n note: 'The derivation stopped at a decision only you can make. Answer it with `wildo creation questions`, then '\n + '`wildo creation answer <questionId>` (or `/wildo:answer` in a Claude Code session). An HTTP client answers with '\n + `POST /api/companion/playbooks/runs/${result.runId}/resume — `\n + `{ \"round\": ${result.round}, \"action\": \"accept\", \"answers\": [{ \"ref\": \"...\", \"answer\": \"...\" }] }, `\n + 'or \"decline\" to have it choose and state its assumption, or \"cancel\" to abandon the run. '\n + `Carry the '${COMPANION_TOKEN_HEADER}' header from .wildo-saas/state/companion.token — `\n + 'resume is a mutating route and the token floor refuses it without one. '\n + 'Nothing has been generated or written.',\n });\n return;\n }\n if ('scenarios' in result) {\n // The composite foundation executor: no landed families — the deliverable is the composed\n // application itself (config mutation + module/resource slices in the working tree).\n res.json({\n ...result,\n accepted: false,\n ...(dryRun ? { dryRun: true } : {}),\n note: dryRun\n ? 'Dry run: the foundation plan was derived and NOTHING was written.'\n : 'The application was composed from the domain plan. Review `git status` and commit to accept it.',\n });\n return;\n }\n /*\n * The WHOLE result, not a hand-picked list of it.\n *\n * This branch used to name five fields — `playbookRef`, `landed`, `generation`, `judge`,\n * `runId` — while the service returned ten, so `diagrams`, `decisions`, `reviewGuide`, `wired`\n * and `wiringSkipped` were computed on every run and dropped at the last hop. A creator never\n * saw which pictures were written, which decisions were recorded, what the playbook says a good\n * result is, or which families were deliberately not wired. Found by the first live run\n * (2026-08-28), not by any test: the service tests assert the service's return value, and\n * nothing asserted what the HTTP layer forwards.\n *\n * The service already returns the SLIM shape — pre-images and rendered bytes stay in the write\n * register — so spreading it is safe, and it is what both sibling branches above already do. A\n * hand-picked list is a second description of the response that silently drifts from the first\n * every time the service grows a field.\n */\n res.json({\n ...result,\n accepted: false,\n ...(dryRun ? { dryRun: true } : {}),\n note: 'assessed' in result\n ? 'Assessed — this playbook produces no artifact. Nothing was generated or written; the verdict and the review guide are above.'\n /*\n * A DISPATCH run wrote application CODE in the workspace, not a specification. The generic\n * note below would be false twice over: it names the wrong tree, and it offers a write-register\n * revert (`wildo creation revert <runId>`) that has no record for this run — a remedy an\n * operator would try and find missing at the moment they need it.\n */\n : 'dispatched' in result\n ? this.describeDispatchOutcome(result)\n /*\n * A STAFFING run (#572) has its own sentence: role counts, waiting families, and (since #2419) the\n * accept/revert verbs only when it landed a charter and so recorded its writes.\n */\n : 'staffed' in result\n ? this.describeStaffingOutcome(result)\n : dryRun\n ? 'Dry run: the full pipe ran (generation, validation, rendering, judge) and NOTHING was written.'\n /*\n * Names the console VERBS, never the route (#1659 principle 2): this note is read by a\n * person or a Claude Code session, and the verbs are the surface both are given.\n */\n : 'runId' in result && typeof result.runId === 'string'\n ? `Files were written to the specifications package. Review them with \\`wildo creation diff ${result.runId}\\`, then accept with \\`wildo creation accept ${result.runId}\\` or undo with \\`wildo creation revert ${result.runId}\\`.`\n : 'Files were written to the specifications package. Review `git status` and commit to accept them.',\n });\n } catch (error) {\n /*\n * A SECOND composite, refused. 409 and not 500: the caller is authorized, the payload is valid,\n * and it is the companion's current STATE that forbids the run — the same answer the loop route\n * has always given, which this route needed the day `runChoreography` started refusing. Without\n * it a creator launching a second market analysis would get \"internal\" and no way to learn that\n * their own earlier run is what is in the way; the message names its ref and start time.\n */\n if (error instanceof PlaybookRunAlreadyInFlightError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n // Refusals a creator must be able to READ, rather than a sanitized 500.\n if (error instanceof UnknownPlaybookError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n if (error instanceof PlaybookNotReadyError || error instanceof PlaybookElicitationError || error instanceof FoundationExecutionError) {\n // Readiness and a malformed interview are both bad requests: the caller must change what they sent\n // (supply the answers, or produce the missing input first). Neither has a \"proceed anyway\".\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n /*\n * A run whose model could not produce a valid family within its attempts. Its message names the family,\n * the attempt count and the LAST REJECTION — everything a creator needs to decide what to change.\n * It fell to `next(error)` and reached the caller as the bare token `validation`, measured 2026-09-13\n * on Wonder CRM's first compliance-conception run: the reason existed only in the trace.\n */\n if (error instanceof PlaybookGenerationError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n /*\n * The run's output file moved after the run read it, so it landed nothing rather than replace that\n * change (#1614). A CONFLICT, not a bad request: what was sent was valid, the working tree moved under\n * it, and the message names who moved it and that running the playbook again is the repair.\n */\n if (error instanceof PlaybookRunLandingConflictError || error instanceof PlaybookOutputLandingHeldError || error instanceof SpecificationWriteRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n /*\n * A DISPATCH refusal reaches here now, and it did not before.\n *\n * Wiring `executor: CODING_AGENT` to the build dispatch (#119) made this route a third caller\n * of `dispatchNextBuildTask`, whose refusals — an exhausted plan, a missing plan, an unknown\n * generation step — are bad requests carrying an actionable message. They were translated for\n * the two BUILD routes only, so through this one they fell to `next(error)` and reached the\n * creator as a sanitized 500 saying \"internal\".\n *\n * That is reachable today rather than hypothetically: a build plan whose tasks have all landed\n * throws `ApplicationBuildPlanExhaustedError`, and \"the build is finished\" is precisely the\n * state a creator running the playbook is most likely to be in.\n */\n this.forwardBuildDispatchError(error, next);\n }\n }\n\n /**\n * `POST /playbooks/runs/:runId/resume` — the creator's half of a mid-run clarification.\n *\n * Body: `{ round: number, action: 'accept' | 'decline' | 'cancel', answers?: [{ ref, answer }] }` —\n * `round` required: the round of questions this acts on, refused 409 once the run has moved past it\n * (#1584). The vocabulary\n * is MCP elicitation's, because a creator answering a derivation's question is the same interaction\n * an MCP client mediates, and inventing a fourth verb for it would only make the two harder to\n * bridge later.\n */\n private async resumePlaybookRun(req: Request, res: Response, next: NextFunction) {\n try {\n const runId = req.params.runId;\n if (!runId || typeof runId !== 'string') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runId` path parameter is required.' },\n });\n }\n const body = req.body || {};\n // The round this answers — required, so an answer acts only on the round its caller read (#1584).\n if (typeof body.round !== 'number' || !Number.isInteger(body.round) || body.round < 1) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`round` (a positive integer) is required: the round of questions this answers, as the waiting run carries it.' },\n });\n }\n const round: number = body.round;\n /*\n * REQUIRED, as on the workbench's resume operation (#1785): a missing action used to mean ACCEPT, a\n * guess about which of three different answers the caller gave.\n */\n const rawAction: unknown = body.action;\n const action = Object.values(MetaWorkflow_ClarificationAction).find((candidate) => candidate === rawAction);\n if (!action) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: {\n message: `${rawAction === undefined ? 'An `action` is required.' : `Unknown action \\`${String(rawAction)}\\`.`} Expected one of: ${Object.values(MetaWorkflow_ClarificationAction).join(', ')}.`,\n },\n });\n }\n if (body.answers !== undefined && (!Array.isArray(body.answers) || body.answers.some((entry: unknown) =>\n typeof entry !== 'object' || entry === null || typeof (entry as { ref?: unknown }).ref !== 'string'\n || typeof (entry as { answer?: unknown }).answer !== 'string'\n || !['undefined', 'string'].includes(typeof (entry as { answeredByRef?: unknown }).answeredByRef)))) {\n throw new PlaybookClarificationError('Every clarification answer must contain string ref and answer fields (and, optionally, a string answeredByRef).');\n }\n const answers: { ref: string; answer: string; answeredByRef?: string }[] = body.answers ?? [];\n // WHO answered (#1658): per answer, or for the whole request; absent records nothing rather than a guess.\n const answeredByRef = typeof body.answeredByRef === 'string' && body.answeredByRef.trim().length > 0 ? body.answeredByRef.trim() : undefined;\n if (action === MetaWorkflow_ClarificationAction.ACCEPT && answers.length === 0) {\n // Refused rather than silently treated as a decline: \"I answered\" and \"you decide\" lead to\n // different artifacts, and a dropped answer would be invisible in both.\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: 'Action `accept` requires at least one `{ ref, answer }` in `answers`. Use `decline` to have the derivation choose and state its assumption.' },\n });\n }\n const result = await this.playbookRunService.resumePlaybookRun({\n runId,\n round,\n action,\n ...(answers.length > 0 ? { answers } : {}),\n ...(answeredByRef ? { answeredByRef } : {}),\n ...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),\n ...(body.dryRun === true ? { dryRun: true } : {}),\n });\n if ('status' in result && result.status === Workbench_PlaybookRunOutcomeStatus.CANCELLED) {\n res.json({ ...result, note: 'The run was abandoned. Nothing was generated and nothing was written.' });\n return;\n }\n if ('status' in result && result.status === Workbench_PlaybookRunOutcomeStatus.AWAITING_CREATOR_INPUT) {\n res.json({\n ...result,\n accepted: false,\n note: `Still waiting: the derivation has further questions (round ${result.round}). Answer them with `\n + '`wildo creation answer <questionId>` (`wildo creation questions` names it), or, from an HTTP client, at '\n + `POST /api/companion/playbooks/runs/${result.runId}/resume with \"round\": ${result.round} and an \"action\" `\n + '(accept, decline or cancel), '\n + `carrying the '${COMPANION_TOKEN_HEADER}' header from .wildo-saas/state/companion.token.`,\n });\n return;\n }\n if ('scenarios' in result) {\n res.json({ ...result, accepted: false, note: 'The application was composed. Review `git status` and commit to accept it.' });\n return;\n }\n // The whole result, for the same reason the run handler forwards it whole: a hand-picked\n // list is a second description of the response that drifts every time the service grows a\n // field. This branch had the same five-of-ten omission and nobody had noticed it either.\n res.json({\n ...result,\n accepted: false,\n note: 'assessed' in result\n ? 'Assessed — nothing was generated or written; the verdict and the review guide are above.'\n // Same correction as the run handler: a dispatch wrote CODE in the workspace, not a specification.\n : 'dispatched' in result\n ? this.describeDispatchOutcome(result)\n : 'staffed' in result\n ? this.describeStaffingOutcome(result)\n /*\n * A dry run stays a dry run after its answer: the checkpoint carries `dryRun`, and the\n * resumed result reports it. The run handler above says so; this branch did not, so an\n * answered dry run told the operator files were written when none were (2026-09-24).\n */\n : 'dryRun' in result && result.dryRun === true\n ? 'Dry run: the full pipe ran (generation, validation, rendering, judge) and NOTHING was written.'\n : 'Files were written to the specifications package. Review `git status` and commit to accept them.',\n });\n } catch (error) {\n if (error instanceof SupersededPlaybookRunQuestionError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n // No run is waiting under that id — a missing resource, 404, as the error class promises (#1584). Its\n // words travel as guidance: a 404's context is stripped before it reaches the client.\n if (error instanceof SuspendedPlaybookRunNotFoundError) {\n next(this.errorBuilder.buildErrorWithGuidanceKey(ErrorType.NOT_FOUND, undefined,\n CompanionErrorGuidanceKey.SUSPENDED_PLAYBOOK_RUN_NOT_WAITING, { explanation: error.message },\n { customMessageReference: ErrorCustomMessageReference.NOT_FOUND, context: { message: error.message } }));\n return;\n }\n if (error instanceof PlaybookClarificationError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * The creation console's PORTS, bound to the same services the workbench's creation-plane operations\n * call — one binding, so the console's answer and the workbench's cannot reach different code. The\n * request's trace session travels with every call, as it does on the bespoke routes.\n */\n private creationConsolePorts(res: Response): CreationConsolePorts {\n const session = res.locals.companionTraceSession as CompanionExecutionSessionContext | undefined;\n return {\n deriveRows: (behavior) => this.creationPlaneProjection.deriveRows(behavior),\n resumePlaybookRun: (input) => this.playbookRunService.resumePlaybookRun({ ...input, ...(session ? { session } : {}) }),\n respondToParkedQuestion: (taskId, answer, suspensionRef, answeredByRef) =>\n this.codingAgentDispatchService.respondToApplicationCodingTaskQuestion(taskId, answer, session, { suspensionRef, ...(answeredByRef ? { answeredByRef } : {}) }),\n cancelCodingRun: (taskId) => this.codingAgentDispatchService.cancelApplicationCodingTask(taskId, session),\n recordInterviewAnswer: (input) => this.dossierService.recordAnswer(input),\n deferDocumentFact: (input) => this.dossierService.recordDocumentFactDeferral(input),\n readInterviewDispositions: () => this.dossierService.readInterviewQuestionDispositions(),\n invalidate: () => this.creationPlaneProjection.invalidateDerivedBoards(),\n };\n }\n\n /**\n * `POST /creation/interview/depth` (#2129) — record how deep this application's interviews go. A dossier\n * write like an answer; the boards move, so they are invalidated.\n */\n private async setCreationInterviewDepth(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const parsed = CreationConsole_InterviewDepthRequest_Schema.safeParse(req.body ?? {});\n const depth = Object.values(ApplicationInterviewDepth).find((candidate) => candidate === parsed.data?.interviewDepth);\n if (!parsed.success || depth === undefined) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `interviewDepth: send one of ${Object.values(ApplicationInterviewDepth).join(', ')}.` },\n });\n }\n const recorded = await this.dossierService.recordInterviewDepth(depth);\n this.creationPlaneProjection.invalidateDerivedBoards();\n res.json(recorded);\n } catch (error) {\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n }\n }\n\n /**\n * `POST /creation/interview/proposals` (#2129) — propose answers to interview questions the person does not\n * know. WRITES NOTHING: the proposals come back with the queue item each one answers, for the person to\n * review; what they keep is sent through `/creation/questions/answer` with `standing: assumed`.\n */\n private async proposeCreationInterviewAnswers(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const parsed = CreationConsole_ProposalRequest_Schema.safeParse(req.body ?? {});\n if (!parsed.success) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: parsed.error.issues.map((issue) => `${issue.path.join('.') || 'body'}: ${issue.message}`).join('; ') },\n });\n }\n const result = await proposeInterviewAnswers(this.playbookRunService.interviewAnswerProposalPorts(), parsed.data);\n /* Each proposal names the queue item it answers, so a surface answers it without a second lookup. */\n const interview = await readCreationConsoleQuestions(this.creationConsolePorts(res), [CreationConsoleQuestionKind.INTERVIEW]);\n const questionIdOf = (questionRef: string) => interview.find((question) => question.playbookRef === result.playbookRef\n && question.instanceKey === (parsed.data.instanceKey ?? null)\n && question.fields[0]?.ref === questionRef)?.questionId ?? null;\n const response: CreationConsole_ProposalResponse = {\n playbookRef: result.playbookRef,\n proposals: result.proposals.map((proposal) => ({ ...proposal, questionId: questionIdOf(proposal.questionRef) })),\n unproposed: [...result.unproposed],\n };\n res.json(response);\n } catch (error) {\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n }\n }\n\n /**\n * `GET /specifications/findings` (#3211) — what `wildo local doctor` reports: each specification the companion refused\n * to serve (`faults`), the modules it could not evaluate (`moduleFaults`), or why the package could not be evaluated at\n * all (`loadError`). Cheap while the tree is unchanged and no fault may be a stale build: it reads the loader's cached\n * evaluation. Never fails on the application's specifications — that is the answer it carries.\n */\n private async readSpecificationFindings(_req: Request, res: Response): Promise<void> {\n res.json(await readSpecificationsEvaluationFindings(this.companionContext));\n }\n\n /**\n * `GET /creation/feed` — Home's lines for a console: what happened (a run completed or was refused, a\n * dispatch settled), what is asked of the person, what could come next. Each line carries the row it\n * points at, so a run's verdict and error or a dispatch's outcome arrive in the same read, and the id\n * of the queued question it is about.\n *\n * Every board is read through the projection the workbench reads. That is NOT free on every poll: the\n * cached boards (eligibility, the build plan) answer from cache until an input moves, but Home also\n * re-derives the actor-plane boards it folds (runs, dispatches, waiting runs, parked questions) on each\n * read, and a read adopts the served rows as the publication baseline. Polled, it is therefore\n * trace-exempt (`COMPANION_TRACE_EXEMPT_GET_PATHS`), and the CLI's default interval is seconds, not less.\n */\n private async readCreationConsoleFeed(_req: Request, res: Response): Promise<void> {\n /*\n * The specifications package's findings first, because they decide how a failure below is read (#3210, #3211). A\n * specification its factory refuses no longer fails the board (the evaluation drops it), so it is reported here or\n * nowhere. A package that cannot be evaluated at all still fails every board derived from it; the feed then\n * answers with the lines it could derive (none) and the reason, rather than a 500 a console cannot read. Any other\n * failure of the boards is not about the specifications and still propagates.\n */\n const specifications = await readSpecificationsEvaluationFindings(this.companionContext);\n let lines: readonly Workbench_CreationHomeLine[];\n try {\n lines = await this.creationPlaneProjection.deriveRows(WorkbenchCreationPlaneBehavior.HOME_LINES) as unknown as readonly Workbench_CreationHomeLine[];\n } catch (error) {\n /*\n * Only the failure the findings already name is degraded: the boards fail because the package cannot be\n * evaluated, and `specifications.loadError` says why, or because a board read what a failed module left unavailable,\n * and `specifications.moduleFaults` names it. Any other failure of the boards is not about the\n * specifications and propagates as before, so an unrelated defect is never hidden behind an empty feed.\n */\n if (!(error instanceof SpecificationUnavailableError) && (specifications.loadError === null || !isSameFailure(describeCaughtError(error), specifications.loadError))) throw error;\n lines = [];\n }\n const behaviors = [...new Set(lines\n .map((line) => creationPlaneBehaviorForResourceType(line.targetResourceType))\n .filter((behavior): behavior is WorkbenchCreationPlaneBehavior => behavior !== null))];\n const rowsByBehavior = new Map(await Promise.all(\n behaviors.map(async (behavior) => [behavior, await this.creationPlaneProjection.deriveRows(behavior)] as const),\n ));\n const feed: CreationConsole_Feed = {\n computedAt: new Date().toISOString(),\n lines: buildCreationConsoleFeed(lines, (resourceType, resourceId) => {\n const behavior = creationPlaneBehaviorForResourceType(resourceType);\n if (!behavior) return null;\n const identityField = CREATION_PLANE_IDENTITY_FIELDS[behavior];\n return rowsByBehavior.get(behavior)?.find((row) => row[identityField] === resourceId) ?? null;\n }),\n specifications: { faults: [...specifications.faults], moduleFaults: specifications.moduleFaults.map((fault) => ({ ...fault, causedBy: [...fault.causedBy], withheldSpecifications: [...fault.withheldSpecifications] })), loadError: specifications.loadError },\n // What the running wave's oldest slot is waiting on (#3206), and how many it prepares at once (#3883).\n buildPreparation: (() => {\n const { waveStartedAt, stopRequestedAt, heldByStopSince, preparing, preparingCount } = this.buildDispatchService.readBuildDispatchPreparation();\n return { waveStartedAt, stopRequestedAt, heldByStopSince, preparing: preparing === null ? null : preparing.summary, preparingCount };\n })(),\n // Why dispatch is held, if it is (#3215): the read the wave makes before each slot, so the two cannot disagree.\n buildHold: await (async () => {\n const failures = await this.buildDispatchService.readBuildDispatchHold();\n return {\n bootFailures: failures.map((failure) => ({\n serviceIdentifier: failure.serviceIdentifier,\n cause: String(failure.cause),\n message: failure.message,\n remedy: failure.remedy,\n failedAt: failure.failedAt,\n })),\n // The lane repairs a start its own code refused (#3204): a drive waits for that rather than stop on the hold.\n ...(failures.length > 0 ? { startupRepairOwed: await this.buildDispatchService.isStartupRepairOwed(failures) } : {}),\n };\n })(),\n };\n // The question count comes from the QUEUE `GET /creation/questions` serves, so the hook's \"N questions waiting\"\n // always equals what `wildo creation questions` lists (#2412). The boards it reads are the ones this read derived.\n const questions = await readCreationConsoleQuestions(this.creationConsolePorts(res));\n this.lastCreationFeedSummary = summarizeCreationConsoleFeed(feed, questions.length);\n res.json(feed);\n }\n\n /** `GET /creation/drive/status` (#2233): what still runs in this process, for `wildo creation drive`. Derives nothing. */\n private async readCreationDriveStatus(_req: Request, res: Response): Promise<void> {\n const status: CreationDrive_Status = {\n // When this process started, so a driver sees a restart even when it lost no request across it.\n companionStartedAt: COMPANION_PROCESS_STARTED_AT,\n ...this.playbookRunService.readCreationDriveStatus(),\n };\n res.json(status);\n }\n\n /**\n * `GET /creation/requirements/standing` (#3701): the maturity reading, derived live, and every item still open on the\n * application's requirements. Read by `wildo creation drive` only when the loop chose to stop or found nothing to run,\n * because it derives the reading (the landing probe, the follow-up derivation): never on a poll.\n */\n private async readCreationRequirementsStanding(_req: Request, res: Response): Promise<void> {\n const standing: CreationDrive_RequirementsStanding = await this.playbookRunService.readRequirementsStanding();\n res.json(standing);\n }\n\n /** `POST /creation/drive/accept` (#2233): the posture's accept of pending playbook runs, for `wildo creation drive`. */\n private async acceptForCreationDrive(_req: Request, res: Response): Promise<void> {\n const outcome: CreationDrive_AcceptOutcome = await this.codingAgentDispatchService.acceptPendingPlaybookRunsForUnattendedDrive();\n res.json(outcome);\n }\n\n /** What the most recent feed read counted — the pulse's `summary`, `null` until someone reads the feed. */\n private lastCreationFeedSummary: CreationConsole_PulseSummary | null = null;\n\n /**\n * `GET /creation/pulse` — the console's poll (#1657): a hook runs it on every prompt and a status line\n * every few seconds, so it derives NOTHING. The change cursor and the run count are in memory; the\n * summary is the last feed read's, carried with its instant. A poller compares two pulses and reads\n * the feed only when one moved — which also refreshes the summary. Trace-exempt, like the feed.\n */\n private async readCreationConsolePulse(_req: Request, res: Response): Promise<void> {\n const cursor = this.creationPlaneProjection.readChangeCursor();\n const pulse: CreationConsole_Pulse = {\n sequence: cursor.sequence,\n changedAt: cursor.changedAt,\n runsInFlight: this.playbookRunService.countRunsInFlightInProcess(),\n summary: this.lastCreationFeedSummary,\n };\n res.json(pulse);\n }\n\n /** `GET /creation/questions` — every question waiting on the person, as one queue. */\n private async readCreationConsoleQuestionQueue(_req: Request, res: Response): Promise<void> {\n const queue: CreationConsole_QuestionQueue = {\n computedAt: new Date().toISOString(),\n questions: await readCreationConsoleQuestions(this.creationConsolePorts(res)),\n assumptions: await readCreationConsoleAssumptions(this.creationConsolePorts(res)),\n withoutAnswer: await readCreationConsoleWithoutAnswer(this.creationConsolePorts(res)),\n interviewDepth: (await this.dossierService.readCreatorInputs())?.interviewDepth ?? null,\n };\n res.json(queue);\n }\n\n /**\n * `GET /creation/report` (#2231) — the creation run report, derived on every read from the run rows, the\n * write registers and git. Nothing in the lane reads it: it is the record a person reads to see whether the\n * next run needed them less.\n */\n private async readCreationRunReport(_req: Request, res: Response): Promise<void> {\n res.json(await this.creationRunReport.describe());\n }\n\n /**\n * `GET /creation/timeline` (#3206, epic #3204) — the journey's per-phase durations and the slowest build tasks, each\n * with its dispatch wait and run time, derived on every read from the run rows. What `wildo context journey` prints.\n */\n private async readCreationJourneyTimeline(_req: Request, res: Response): Promise<void> {\n res.json(await this.creationRunReport.describeTimeline());\n }\n\n /** `POST /creation/interventions/:interventionId/reason` (#2231) — record why a person stepped in. */\n private async stateCreationInterventionReason(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const interventionId = req.params.interventionId;\n const reason = (req.body || {}).reason;\n if (typeof interventionId !== 'string' || interventionId.length === 0 || typeof reason !== 'string' || reason.trim().length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`interventionId` path parameter and a non-empty `reason` are required.' },\n });\n }\n res.json(await this.creationRunReport.stateReason(interventionId, reason));\n } catch (error) {\n if (error instanceof CreationInterventionNotFoundError) {\n next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: error.message },\n }));\n return;\n }\n next(error);\n }\n }\n\n /**\n * `GET /creation/launch-blockers` (#2238) — the \"before you can launch\" list: `deriveLaunchBlockers` over inputs\n * read FRESH here, so settling an item removes it on the next read. Read-only, and it gates nothing: a run report\n * renders it and Gate 3 will read it, but nothing in the creation lane waits on it.\n */\n private async readCreationLaunchBlockers(_req: Request, res: Response): Promise<void> {\n res.json(await readLaunchBlockers(companionLaunchBlockerPorts(\n this.companionContext,\n () => readCreationConsoleQuestions(this.creationConsolePorts(res), [CreationConsoleQuestionKind.GOVERNANCE_FACT]),\n )));\n }\n\n /**\n * `POST /creation/questions/answer` — answer, decline or cancel ONE queued question.\n *\n * The console's own refusals (an id that names nothing, a question that moved on, an action the item\n * does not admit) answer 400 or 409 with their sentence; a service's refusal is translated exactly as\n * the workbench's operation translates it, so a refusal reads the same through both doors.\n */\n private async answerCreationConsoleQuestion(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const parsed = CreationConsole_AnswerRequest_Schema.safeParse(req.body ?? {});\n if (!parsed.success) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: parsed.error.issues.map((issue) => `${issue.path.join('.') || 'body'}: ${issue.message}`).join('; ') },\n });\n }\n res.json(await answerCreationConsoleQuestion(this.creationConsolePorts(res), parsed.data));\n } catch (error) {\n if (error instanceof CreationConsoleRefusal) {\n const malformed = error.refusal === CreationConsoleRefusalKind.MALFORMED;\n next(this.errorBuilder.buildError(malformed ? ErrorType.VALIDATION : ErrorType.CONFLICT, undefined, {\n customMessageReference: malformed ? ErrorCustomMessageReference.VALIDATION : ErrorCustomMessageReference.CONFLICT,\n context: { message: error.message },\n }));\n return;\n }\n next(translateCreationPlaneDispatchError(error, undefined, { errorBuilder: this.errorBuilder }) ?? error);\n }\n }\n\n private async marketGenerate(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const {\n templateRef,\n icpRef,\n featureRef,\n benefitRef,\n channelRef,\n objectionRef,\n outputLanguage,\n } = body;\n\n if (!templateRef || typeof templateRef !== 'string') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`templateRef` is required and must be a non-empty string.' },\n },\n );\n }\n\n const optionalString = (key: string, value: unknown): string | undefined => {\n if (value === undefined || value === null) return undefined;\n if (typeof value !== 'string') {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`${key}\\` must be a string when provided.` },\n },\n );\n }\n return value.length > 0 ? value : undefined;\n };\n\n // Thread the request session + a dedicated agent step into the LLM call so\n // the engine AgentCallTraceSink records the prompt/output/usage for this\n // market generation — the same observability every companion LLM\n // call gets. Best-effort: undefined when tracing is off (sink no-ops).\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', `market-generation-${templateRef}`);\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'market-generation-generate',\n attributes: { templateRef },\n }\n : undefined;\n\n const result = await this.marketGenerationService.generate({\n templateRef,\n icpRef: optionalString('icpRef', icpRef),\n featureRef: optionalString('featureRef', featureRef),\n benefitRef: optionalString('benefitRef', benefitRef),\n channelRef: optionalString('channelRef', channelRef),\n objectionRef: optionalString('objectionRef', objectionRef),\n outputLanguage: optionalString('outputLanguage', outputLanguage),\n }, traceContext);\n\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/brand/generate-logo` — generate the application logo\n * from the authored `BrandSnapshot`. Thin: `LogoGenerationCompanionService`\n * owns the flow (introspect `brand-render-prompt` → invoke the image agent →\n * persist the master + manifest). Body: optional `{ forceRegenerate }`.\n */\n private async brandGenerateLogo(req: Request, res: Response, next: NextFunction) {\n try {\n const forceRegenerate = (req.body || {}).forceRegenerate === true;\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'logo-generation');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'logo-generation-generate',\n attributes: {},\n }\n : undefined;\n\n const result = await this.logoGenerationService.generate({ forceRegenerate }, traceContext);\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/brand/deliberate-logo` — full logo DELIBERATION\n * (agentic deliberation system, Step 4): the art-director expert authors the\n * creative brief (N app-derived concept directions), one candidate generates\n * per direction, the expert panel (art-director + design-system-guardian +\n * brand-strategist) deliberates with regeneration-as-revision, and the winner\n * is staged as the single-candidate manifest the EXISTING\n * `POST /brand/accept-logo` review point promotes. Thin:\n * `LogoDeliberationCompanionService` owns the flow.\n *\n * Body (all optional): `{ directionCount?: number, roundBudget?: number,\n * shortlistSize?: number }` — positive integers; service defaults 4 / 2 / 1.\n */\n private async brandDeliberateLogo(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { directionCount, roundBudget, shortlistSize } = body;\n\n for (const [name, value] of Object.entries({ directionCount, roundBudget, shortlistSize })) {\n if (value !== undefined && (typeof value !== 'number' || !Number.isInteger(value) || value < 1)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`${name}\\` must be a positive integer when provided.` },\n });\n }\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'logo-deliberation');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'logo-deliberation',\n attributes: {},\n }\n : undefined;\n\n const result = await this.logoDeliberationService.run(\n {\n ...(typeof directionCount === 'number' ? { directionCount } : {}),\n ...(typeof roundBudget === 'number' ? { roundBudget } : {}),\n ...(typeof shortlistSize === 'number' ? { shortlistSize } : {}),\n },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/expert-personas/derive` — derive an app-specific\n * expert-persona charter PROPOSAL (agentic deliberation system). Thin:\n * `ExpertPersonaCompanionService.derive` owns the flow (resolve shaping\n * inputs via introspection → invoke the derivation agent → stage the\n * proposal). Body: `{ roleRef: string }`. Every call derives; there is no\n * freshness cache to bypass.\n */\n private async expertPersonaDerive(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { roleRef } = body;\n if (typeof roleRef !== 'string' || roleRef.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`roleRef` must be a non-empty string.' },\n });\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'expert-persona-derive');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'expert-persona-derive',\n attributes: {},\n }\n : undefined;\n\n const result = await this.expertPersonaService.derive(\n { roleRef },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/expert-personas/accept` — promote a STAGED charter\n * proposal into the committed SSOT (`specifications/src/personas/`), and\n * commit it (#2419). Thin: `ExpertPersonaCompanionService.accept` owns the\n * flow (human-edit overwrite guard → fail-closed set validation → write\n * generated charter module + regenerate the aggregator + wire it), and\n * `AcceptedChangeCommitCompanionService.acceptExpertCharter` commits exactly\n * what it changed. Body: `{ roleRef: string }`.\n */\n private async expertPersonaAccept(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { roleRef } = body;\n if (typeof roleRef !== 'string' || roleRef.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`roleRef` must be a non-empty string.' },\n });\n }\n const result = await this.expertPersonaService.accept({ roleRef });\n /*\n * A person's accept is a commit (#2419). The charter is promoted either way; a commit that cannot be made (a\n * live coding run holds the tree, a conflicting HEAD, an import no commit holds) is reported beside it rather\n * than failing an accept that already happened, and names what to do instead.\n */\n let commit: Awaited<ReturnType<AcceptedChangeCommitCompanionService['acceptExpertCharter']>> | undefined;\n let commitRefused: string | undefined;\n if (result.writes.length > 0) {\n try {\n commit = await this.acceptedChangeCommitService.acceptExpertCharter({ roleRef, writes: result.writes });\n } catch (error) {\n commitRefused = `The charter is accepted on disk but was not committed: ${describeCaughtError(error)} Commit ${result.writes.map((write) => write.path).join(', ')} by hand.`;\n }\n }\n // The paths, not the bytes: the console prints this answer, and the wiring files' contents are noise there.\n this.jsonSuccess(res, {\n ...result,\n writes: result.writes.map((write) => write.path),\n ...(commit ? { commit } : {}),\n ...(commitRefused ? { commitRefused } : {}),\n });\n } catch (e) {\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n }\n\n /**\n * `POST /api/companion/deliberations/run` — run a charter-built expert-panel\n * deliberation over TEXT candidates (agentic deliberation system, Step 3).\n * Thin: `DeliberationCompanionService.run` composes the plan (narrowness\n * fail-closed, committed charters only) and the engine\n * `ActorsSystemBackendService.executeDeliberation` orchestrates\n * (rubric -> review rounds -> shortlist revisions -> synthesis). Body:\n * `{ workDomain, briefContext, candidates: [{ref, text}], reviewerRoleRefs,\n * coordinatorRoleRef, rubricDeriverRoleRef?, roundBudget?, shortlistSize? }`.\n */\n private async deliberationRun(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { workDomain, briefContext, candidates, reviewerRoleRefs, coordinatorRoleRef } = body;\n const knownDomains = new Set<string>(Object.values(ExpertWorkDomain));\n if (typeof workDomain !== 'string' || !knownDomains.has(workDomain)) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: `\\`workDomain\\` must be one of [${[...knownDomains].join(', ')}].` },\n });\n }\n if (typeof briefContext !== 'string' || briefContext.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`briefContext` must be a non-empty string.' },\n });\n }\n if (!Array.isArray(candidates) || candidates.some((candidate: unknown) => {\n const entry = candidate as { ref?: unknown; text?: unknown };\n return typeof entry?.ref !== 'string' || entry.ref.length === 0\n || typeof entry?.text !== 'string' || entry.text.length === 0;\n })) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`candidates` must be an array of `{ ref, text }` with non-empty strings.' },\n });\n }\n if (!Array.isArray(reviewerRoleRefs) || reviewerRoleRefs.some((role: unknown) => typeof role !== 'string')\n || typeof coordinatorRoleRef !== 'string' || coordinatorRoleRef.length === 0) {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`reviewerRoleRefs` must be a string array and `coordinatorRoleRef` a non-empty string.' },\n });\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'deliberation-run');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'deliberation-run',\n attributes: {},\n }\n : undefined;\n\n const result = await this.deliberationService.run(\n {\n workDomain: workDomain as ExpertWorkDomain,\n briefContext,\n candidates,\n reviewerRoleRefs,\n coordinatorRoleRef,\n ...(typeof body.rubricDeriverRoleRef === 'string' ? { rubricDeriverRoleRef: body.rubricDeriverRoleRef } : {}),\n ...(typeof body.roundBudget === 'number' ? { roundBudget: body.roundBudget } : {}),\n ...(typeof body.shortlistSize === 'number' ? { shortlistSize: body.shortlistSize } : {}),\n },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.jsonError(res, e as any, next);\n }\n }\n\n /**\n * `POST /api/companion/brand/logo` (#2411) — the console's door to the logo: deliberate-logo then accept-logo, the\n * same composition the build's logo step runs. `wildo creation brand logo` calls it.\n *\n * Body: `{ redraw?: boolean }`. Without `redraw`, an application that already carries an accepted mark (the\n * predicate the logo step skips on, asked of the working tree) is REFUSED with 409: replacing an application's\n * identity is a deliberate act, so a re-run must never redraw it quietly. Before this door, a person whose logo\n * step would not run had to call both routes by hand with the companion token (`app-creation-test-005`).\n */\n private async brandLogo(req: Request, res: Response, next: NextFunction) {\n try {\n const { redraw } = req.body || {};\n if (redraw !== undefined && typeof redraw !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`redraw` must be a boolean when provided.' },\n });\n }\n if (redraw !== true && await hasAcceptedBrandMarkInWorkingTree(this.companionContext.saasRoot)) {\n throw this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: 'This application already carries an accepted logo. Drawing a new one replaces its identity: run `wildo creation brand logo --redraw` to do it deliberately.' },\n });\n }\n /*\n * Not while a coding run holds the worktree (#2411 review F5): the accept writes `specifications/src/brand/`, and\n * a live run's change set would claim those files as its own. The build's logo step runs inside the coding lane's\n * worktree window for the same reason; this door asks the person to wait instead.\n */\n const liveRuns = await this.codingAgentDispatchService.listInFlightCodingRuns();\n if (liveRuns.length > 0) {\n throw this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: `A coding run is writing the application (${liveRuns.map((run) => run.taskRef ?? run.executionId).join(', ')}); draw the logo once it settles, so its change set does not claim the brand files.` },\n });\n }\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'logo-deliberation');\n const traceContext = traceSession && traceStep\n ? { sessionRef: traceSession.sessionId, stepRef: traceStep.stepId, label: 'logo-console', attributes: {} }\n : undefined;\n // `run` stages its winner as the single-candidate manifest `accept` promotes, exactly as the logo step composes them.\n const deliberation = await this.logoDeliberationService.run({}, traceContext);\n // Asked again before the WRITE (#2411 re-review R3): the deliberation takes minutes, and a coding run started\n // meanwhile would claim the files the accept writes. The staged winner survives a refusal; accept it later.\n const startedMeanwhile = await this.codingAgentDispatchService.listInFlightCodingRuns();\n if (startedMeanwhile.length > 0) {\n throw this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: `The logo was drawn, but a coding run started while it was (${startedMeanwhile.map((run) => run.taskRef ?? run.executionId).join(', ')}); its winner is staged. Accept it once the run settles: POST /api/companion/brand/accept-logo.` },\n });\n }\n const accept = await this.brandAcceptService.accept({}, traceContext);\n this.jsonSuccess(res, { redrawn: redraw === true, deliberation, accept });\n } catch (e) {\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n }\n\n /**\n * `POST /api/companion/brand/accept-logo` — the ACCEPT review point of the\n * brand/logo workflow. Thin: `BrandAcceptCompanionService` owns the flow\n * (read staged candidate → optionally run the `brand.logo.judge.agent`\n * review → promote the accepted candidate into the specification SSOT:\n * copy files into `specifications/src/brand/assets/` + rewrite\n * `resolved-assets.generated.ts`).\n *\n * Body (all optional): `{ runJudge?, requireJudgeAcceptance? }`. The staged\n * single-candidate manifest is what gets accepted; the judge\n * runs by default and its verdict is advisory (the human accept POST is the\n * authority) unless `requireJudgeAcceptance` gates on it.\n */\n private async brandAcceptLogo(req: Request, res: Response, next: NextFunction) {\n try {\n const body = req.body || {};\n const { runJudge, requireJudgeAcceptance } = body;\n\n if (runJudge !== undefined && typeof runJudge !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`runJudge` must be a boolean when provided.' },\n });\n }\n if (requireJudgeAcceptance !== undefined && typeof requireJudgeAcceptance !== 'boolean') {\n throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message: '`requireJudgeAcceptance` must be a boolean when provided.' },\n });\n }\n\n const traceSession = this.getTraceSession(res);\n const traceStep = this.createTraceStep(res, 'agent-invocation', 'logo-accept');\n const traceContext = traceSession && traceStep\n ? {\n sessionRef: traceSession.sessionId,\n stepRef: traceStep.stepId,\n label: 'logo-accept-judge',\n attributes: {},\n }\n : undefined;\n\n const result = await this.brandAcceptService.accept(\n {\n ...(typeof runJudge === 'boolean' ? { runJudge } : {}),\n ...(typeof requireJudgeAcceptance === 'boolean' ? { requireJudgeAcceptance } : {}),\n },\n traceContext,\n );\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n }\n\n /**\n * `POST /api/companion/technical-doc/generate-openapi` — on-demand\n * OpenAPI generation for the SaaS app. Returns the\n * `{ documents, stats, metadata }` shape produced by\n * {@link TechnicalDocCompanionService.generateOpenApiDocuments}\n * verbatim. The route deliberately accepts no request body\n * today: every input (`appSlug`, `appDisplayName`,\n * `publicMarketingTitle`, operations) is derived from the\n * loaded `WildoSaasConfig` + the `'openapi-generation-input'`\n * subprocess introspection. A future CLI flag (per-section\n * filter, custom version override) will plug in here as\n * optional body fields without breaking this no-body contract.\n */\n private async technicalDocGenerateOpenApi(req: Request, res: Response, next: NextFunction) {\n try {\n const result = await this.technicalDocService.generateOpenApiDocuments();\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerTechnicalDocFailure(res, e, next);\n }\n }\n\n private async technicalDocPublishOpenApi(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.technicalDocService.publishOpenApiReference());\n } catch (e) {\n this.answerTechnicalDocFailure(res, e, next);\n }\n }\n\n /**\n * `POST /api/companion/technical-doc/derive-bundles` — the trigger for the\n * source-based derivation introduced by decision **D14**.\n *\n * Until this route existed, `deriveApplicationDocumentationBundles` had NO\n * caller outside its own tests, so the whole D14 evidence path — the\n * environment evidence snapshot, the applicability gates and the two\n * authorized bundles — could only ever be verified behaviourally. That is why\n * the route earns its place despite duplicating no logic: it is the seam that\n * makes the decision observable on a running companion.\n *\n * **Read-only by construction.** It derives and returns; it writes nothing and\n * publishes nothing. The Phase 2A publication path\n * `backendServiceKey` is resolved the same way every other companion behavior\n * resolves it ({@link pickResourcesRegistryCarrierServiceKey}) rather than\n * accepted from the caller, so a request cannot name a service the application\n * does not declare. The derivation publishes framework-owned topics only; it\n * does not interpret application resource, workflow, or editorial declarations.\n */\n private async technicalDocDeriveBundles(_req: Request, res: Response, next: NextFunction) {\n try {\n const result = await this.technicalDocService.deriveApplicationDocumentationBundles({\n backendServiceKey: this.pickResourcesRegistryCarrierServiceKey(),\n });\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerTechnicalDocFailure(res, e, next);\n }\n }\n\n /**\n * `POST /api/companion/technical-doc/publish-managed` — the operation that emits\n * `src/generated/consumer-documentation`, the generator-owned framework\n * documentation tree served by this application. Git owns history and rollback;\n * publication owns only validation and synchronization of the current bytes.\n *\n * Unlike `derive-bundles` this WRITES: it synchronizes a complete verified render into\n * one stable generated tree. It is exposed as its own route rather than folded into the\n * derivation for exactly that reason — a caller should never reach a publication by\n * asking for a read.\n *\n * `refuseProvisionalAssets` is the environment's call, so it is accepted per request\n * rather than defaulted here: a production run passes `true` and fails if any screenshot\n * is still a placeholder; development omits it and ships documentation ahead of its\n * pictures.\n */\n private async technicalDocPublishManaged(req: Request, res: Response, next: NextFunction) {\n try {\n const { refuseProvisionalAssets } = req.body || {};\n const result = await this.technicalDocService.publishManagedDocumentation({\n backendServiceKey: this.pickResourcesRegistryCarrierServiceKey(),\n ...(refuseProvisionalAssets === undefined ? {} : { refuseProvisionalAssets: refuseProvisionalAssets === true }),\n });\n this.jsonSuccess(res, result);\n } catch (e) {\n this.answerTechnicalDocFailure(res, e, next);\n }\n }\n /**\n * `GET /api/companion/technical-doc/api-reference-categories` — whether the application's API-reference categories\n * fit the resources a publish would document, answered without publishing (#1891). What `wildo docs check` prints.\n *\n * A problem is the ANSWER here, not a failure: the route reports it with 200 so the caller reads every finding, and\n * refuses only when it cannot ask (an unreadable documentation config, a projector that failed). An application with\n * no documentation service is answered too (`documentationService: false`), since it has nothing to check.\n */\n private async technicalDocCheckApiReferenceCategories(_req: Request, res: Response, next: NextFunction) {\n try {\n this.jsonSuccess(res, await this.technicalDocService.checkApiReferenceResourceCategories());\n } catch (e) {\n this.answerTechnicalDocFailure(res, e, next);\n }\n }\n\n /**\n * A documentation route's failure, with a documentation-lane refusal answered as the caller's error: the application's\n * category configuration (#1891) or an authored operation example untrue of its schema (#1838). Each names what the\n * person must change. Left to `jsonError` it was classified INTERNAL and sanitized, so `wildo docs publish` printed a\n * bare 500 and the names were only in the companion log. Recognised by {@link describeDocumentationLaneRefusal}, the\n * predicate the build doors share (#3462).\n */\n private answerTechnicalDocFailure(res: Response, e: unknown, next: NextFunction): void {\n const documentationRefusal = this.documentationLaneRefusal(e);\n if (documentationRefusal !== undefined) {\n next(documentationRefusal);\n return;\n }\n this.answerSpecificationWriteRefusal(res, e, next);\n }\n\n /**\n * A write refused on a failing module is a CONFLICT with the tree (#3258): what was sent was valid, and the sentence naming\n * the module is the whole answer. Left to `jsonError` it is classified INTERNAL and sanitized to the word \"internal\".\n */\n private answerSpecificationWriteRefusal(res: Response, e: unknown, next: NextFunction): void {\n if (e instanceof SpecificationWriteRefusedError) {\n next(this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFLICT,\n context: { message: e.message },\n }));\n return;\n }\n this.jsonError(res, e as any, next);\n }\n\n /** A documentation-lane refusal as the caller's VALIDATION error carrying its sentence, or `undefined` for anything else. */\n private documentationLaneRefusal(error: unknown): unknown {\n const message = describeDocumentationLaneRefusal(error);\n if (message === undefined) return undefined;\n return this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.VALIDATION,\n context: { message },\n });\n }\n\n}\n\nexport default CompanionController;\n\n/**\n * Whether a board's failure is the specifications package's load failure the findings already report (#3211). Compared\n * on the first line, because a board may re-wrap the loader's error with context after it.\n */\nfunction isSameFailure(boardFailure: string, loadError: string): boolean {\n const firstLine = loadError.split('\\n')[0]!.trim();\n return firstLine.length > 0 && boardFailure.includes(firstLine);\n}\n\n/**\n * What `POST /playbooks/loop` answers (#3848). Built from the loop's result field by field, so a field the CLI reads must\n * be named here: `stoppedAtIteration` was added to the result and dropped by this response, and the drive fell back to the\n * LAST step, which under rolling admission may not be the one that stopped the loop.\n */\nexport function describePlaybookLoopResponse(result: PlaybookLoopResult): Record<string, unknown> {\n return {\n stoppedBecause: result.stoppedBecause,\n // Where and on what the environment stopped it, when it did (#3235): `wildo creation loop` says so.\n ...(result.interruption ? { interruption: result.interruption } : {}),\n // The step that stopped it, when one did (#3848): steps settle out of order, so the last one may be another.\n ...(result.stoppedAtIteration !== undefined ? { stoppedAtIteration: result.stoppedAtIteration } : {}),\n steps: result.steps,\n accepted: false,\n note: 'Any files written are working edits. Review `git status` and commit to accept them. '\n + 'Each iteration may run several output-disjoint lanes concurrently, and a free slot is refilled as soon as a lane '\n + 'finishes; every lane records its own revertible run.',\n };\n}\n"]}