@wildo-ai/dev-companion 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +12 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +11 -0
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +153 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +419 -41
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts +25 -10
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js +65 -24
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +86 -0
- package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -0
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js +127 -0
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -0
- package/dist/esm/companion-api/companion-api.schemas.d.ts +59 -2
- package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
- package/dist/esm/companion-api/companion-api.schemas.js +60 -0
- package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.d.ts +63 -1
- package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +322 -21
- package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
- package/dist/esm/core/inject/models/container.d.ts.map +1 -1
- package/dist/esm/core/inject/models/container.js +11 -0
- package/dist/esm/core/inject/models/container.js.map +1 -1
- package/dist/esm/core/inject/models/service-types.d.ts +5 -0
- package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/core/inject/models/service-types.js +5 -0
- package/dist/esm/core/inject/models/service-types.js.map +1 -1
- package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.d.ts.map +1 -1
- package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js +81 -0
- package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js.map +1 -1
- package/dist/esm/core/introspection/models/companion-introspection.models.d.ts +11 -1
- package/dist/esm/core/introspection/models/companion-introspection.models.d.ts.map +1 -1
- package/dist/esm/core/introspection/models/companion-introspection.models.js +39 -0
- package/dist/esm/core/introspection/models/companion-introspection.models.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts +8 -0
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -0
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +317 -0
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -0
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts +45 -0
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -0
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +250 -0
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -0
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts +123 -0
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts.map +1 -0
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js +298 -0
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js.map +1 -0
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts +78 -1
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js +155 -6
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts +131 -2
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.js +259 -9
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts +243 -0
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts.map +1 -0
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js +417 -0
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js.map +1 -0
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts +186 -0
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -0
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js +368 -0
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js.map +1 -0
- package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts +101 -0
- package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts.map +1 -0
- package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.js +278 -0
- package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.js.map +1 -0
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts +365 -0
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -0
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js +167 -0
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -0
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +332 -3
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts +19 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts.map +1 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js +164 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js.map +1 -0
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +3 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js +36 -23
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts +51 -0
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -0
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js +391 -0
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js.map +1 -0
- package/dist/esm/core/runtime/companion-startup-assembly.d.ts.map +1 -1
- package/dist/esm/core/runtime/companion-startup-assembly.js +5 -0
- package/dist/esm/core/runtime/companion-startup-assembly.js.map +1 -1
- package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts +103 -0
- package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -0
- package/dist/esm/core/runtime/dev-compile-quiet.companion.js +124 -0
- package/dist/esm/core/runtime/dev-compile-quiet.companion.js.map +1 -0
- package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +39 -2
- package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
- package/dist/esm/core/runtime/services/start-companion-application.service.js +122 -11
- package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
- package/dist/esm/core/specifications/non-composite-view-specification-context.shared.d.ts +6 -0
- package/dist/esm/core/specifications/non-composite-view-specification-context.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/non-composite-view-specification-context.shared.js.map +1 -1
- package/dist/esm/core/specifications/specification-context-factory.shared.d.ts +23 -0
- package/dist/esm/core/specifications/specification-context-factory.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/specification-context-factory.shared.js +26 -4
- package/dist/esm/core/specifications/specification-context-factory.shared.js.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.d.ts +82 -3
- package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.js +126 -12
- package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts +12 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js +12 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js.map +1 -0
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts +13 -0
- package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts.map +1 -0
- package/dist/esm/i18n/composite_views/app.creation-board.en.js +91 -0
- package/dist/esm/i18n/composite_views/app.creation-board.en.js.map +1 -0
- package/dist/esm/i18n/composite_views/app.domain-model.en.d.ts +38 -0
- package/dist/esm/i18n/composite_views/app.domain-model.en.d.ts.map +1 -0
- package/dist/esm/i18n/composite_views/app.domain-model.en.js +41 -0
- package/dist/esm/i18n/composite_views/app.domain-model.en.js.map +1 -0
- package/dist/esm/i18n/index.d.ts +3 -3
- package/dist/esm/i18n/index.js +3 -3
- package/dist/esm/i18n/index.js.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts +24 -0
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js +20 -0
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js.map +1 -0
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts +31 -0
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.js +27 -0
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.js.map +1 -0
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts +24 -0
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.js +20 -0
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts +28 -0
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js +24 -0
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchDomainResources.en.d.ts +138 -0
- package/dist/esm/i18n/resources/workbenchDomainResources.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchDomainResources.en.js +100 -0
- package/dist/esm/i18n/resources/workbenchDomainResources.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts +29 -0
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.js +25 -0
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts +27 -0
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js +23 -0
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +806 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +326 -0
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -0
- package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts +26 -0
- package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts.map +1 -0
- package/dist/esm/i18n/resources/workbenchTraceSessions.en.js +22 -0
- package/dist/esm/i18n/resources/workbenchTraceSessions.en.js.map +1 -0
- package/dist/esm/i18n/system_enums/market.en.d.ts +202 -0
- package/dist/esm/i18n/system_enums/market.en.d.ts.map +1 -0
- package/dist/esm/i18n/system_enums/market.en.js +209 -0
- package/dist/esm/i18n/system_enums/market.en.js.map +1 -0
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts +112 -2
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +201 -34
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts +31 -3
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js +48 -12
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts +36 -0
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts.map +1 -0
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +75 -0
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +1 -0
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +105 -7
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +298 -24
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +46 -3
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +95 -2
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts +9 -0
- package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.js +13 -0
- package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts +12 -0
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js +23 -0
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +120 -3
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +636 -81
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.d.ts +40 -0
- package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.js +63 -1
- package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.js.map +1 -1
- package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts +21 -0
- package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-doc.companion.service.js +86 -2
- package/dist/esm/technical-doc/services/technical-doc.companion.service.js.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts +12 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js +47 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js.map +1 -1
- package/package.json +17 -17
- package/dist/esm/.builder.pid +0 -9
- package/dist/esm/i18n/resources/workbenchApplicationModules.en.d.ts +0 -36
- package/dist/esm/i18n/resources/workbenchApplicationModules.en.d.ts.map +0 -1
- package/dist/esm/i18n/resources/workbenchApplicationModules.en.js +0 -32
- package/dist/esm/i18n/resources/workbenchApplicationModules.en.js.map +0 -1
- package/dist/esm/i18n/resources/workbenchResourceRelationships.en.d.ts +0 -29
- package/dist/esm/i18n/resources/workbenchResourceRelationships.en.d.ts.map +0 -1
- package/dist/esm/i18n/resources/workbenchResourceRelationships.en.js +0 -25
- package/dist/esm/i18n/resources/workbenchResourceRelationships.en.js.map +0 -1
|
@@ -12,7 +12,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
12
|
};
|
|
13
13
|
import { injectable, inject } from 'inversify';
|
|
14
14
|
import { AbstractControllerBackendService, LoggerService, ErrorBuilderBackendService, ErrorHandlerService, SAAS_SERVICE_TYPES, mergeBackendDomainModules, describeCaughtError, } from '@wildo-ai/saas-backend-lib';
|
|
15
|
-
import { CompanionActorTasksListQuerySchema, CompanionCreateActorTaskRequestSchema, CompanionCreateActorExecutionRequestSchema, CompanionCreateFlowExecutionRequestSchema, CompanionExecutionsListQuerySchema, CompanionIntrospectionRequestSchema, CompanionUpdateActorTaskRequestSchema, } from '../companion-api.schemas.js';
|
|
15
|
+
import { CompanionActorTasksListQuerySchema, CompanionCreateActorTaskRequestSchema, CompanionCreateActorExecutionRequestSchema, CompanionLandGovernanceFactsRequestSchema, CompanionCreateFlowExecutionRequestSchema, CompanionExecutionsListQuerySchema, CompanionIntrospectionRequestSchema, CompanionUpdateActorTaskRequestSchema, } from '../companion-api.schemas.js';
|
|
16
16
|
import { ErrorType, ErrorCustomMessageReference, AppFrontendType, computeChartRegistrationAlignment, normalizeChartExecutionRef, } from '@wildo-ai/saas-models';
|
|
17
17
|
import { loadBackendCompanionExports } from '../../core/context/companion-package-loaders.companion.js';
|
|
18
18
|
import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types.js';
|
|
@@ -21,6 +21,7 @@ import { LabellizeOrchestratorCompanionService } from '../../i18n-labelling/serv
|
|
|
21
21
|
import { TranslateOrchestratorCompanionService } from '../../i18n-labelling/services/translate-orchestrator.companion.service.js';
|
|
22
22
|
import { EmailTemplateCompanionService } from '../../email/services/email-template.companion.service.js';
|
|
23
23
|
import { PlaybookLoopAlreadyRunningError, PlaybookNotReadyError, PlaybookRunCompanionService, UnknownPlaybookError } from '../../meta-workflows/services/playbook-run.companion.service.js';
|
|
24
|
+
import { CreationPlaneProjectionCompanionService } from '../../core/introspection/resources/creation-plane-projection.companion.service.js';
|
|
24
25
|
import { FoundationExecutionError } from '../../meta-workflows/services/foundation-executor.companion.service.js';
|
|
25
26
|
import { SuspendedPlaybookRunNotFoundError } from '../../meta-workflows/services/playbook-suspended-run.companion.service.js';
|
|
26
27
|
import { PlaybookClarificationAction } from '@wildo-ai/application-creation-runtime';
|
|
@@ -29,7 +30,7 @@ import { ApplicationBuildDispatchCompanionService, ApplicationBuildPlanExhausted
|
|
|
29
30
|
import { ApplicationBuildTaskNotACodingTaskError } from '../../meta-workflows/services/application-build-task-coding-policy.companion.service.js';
|
|
30
31
|
import { ApplicationBuildUnknownGenerationStepError } from '../../meta-workflows/services/application-build-generation-step.companion.service.js';
|
|
31
32
|
import { PlaybookRunWriteRegisterCompanionService, PlaybookRunWriteRecordNotFoundError } from '../../meta-workflows/services/playbook-run-write-register.companion.service.js';
|
|
32
|
-
import { PlaybookElicitationError } from '@wildo-ai/application-creation-runtime';
|
|
33
|
+
import { composeGovernanceQuestionnaires, GovernanceQuestionnaireError, landGovernanceFactDeclarations, PlaybookElicitationError, } from '@wildo-ai/application-creation-runtime';
|
|
33
34
|
import { MarketGenerationCompanionService } from '../../market/services/market-generation.companion.service.js';
|
|
34
35
|
import { LogoGenerationCompanionService } from '../../brand/services/logo-generation.companion.service.js';
|
|
35
36
|
import { LogoDeliberationCompanionService } from '../../brand/services/logo-deliberation.companion.service.js';
|
|
@@ -89,6 +90,7 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
89
90
|
emailTemplateService;
|
|
90
91
|
marketGenerationService;
|
|
91
92
|
playbookRunService;
|
|
93
|
+
creationPlaneProjection;
|
|
92
94
|
buildDispatchService;
|
|
93
95
|
executionTraceReadService;
|
|
94
96
|
logoGenerationService;
|
|
@@ -102,7 +104,7 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
102
104
|
traceabilityService;
|
|
103
105
|
codingAgentDispatchService;
|
|
104
106
|
researchAgentDispatchService;
|
|
105
|
-
constructor(logger, errorBuilder, errorHandler, companionContext, labellingPlannerService, labellizeOrchestratorService, runWriteRegister, translateOrchestratorService, emailTemplateService, marketGenerationService, playbookRunService, buildDispatchService, executionTraceReadService, logoGenerationService, logoDeliberationService, brandAcceptService, expertPersonaService, deliberationService, technicalDocService, companionIntrospectionService, executionsService, traceabilityService, codingAgentDispatchService, researchAgentDispatchService) {
|
|
107
|
+
constructor(logger, errorBuilder, errorHandler, companionContext, labellingPlannerService, labellizeOrchestratorService, runWriteRegister, translateOrchestratorService, emailTemplateService, marketGenerationService, playbookRunService, creationPlaneProjection, buildDispatchService, executionTraceReadService, logoGenerationService, logoDeliberationService, brandAcceptService, expertPersonaService, deliberationService, technicalDocService, companionIntrospectionService, executionsService, traceabilityService, codingAgentDispatchService, researchAgentDispatchService) {
|
|
106
108
|
super(logger, errorBuilder, errorHandler, 'CompanionController');
|
|
107
109
|
this.companionContext = companionContext;
|
|
108
110
|
this.labellingPlannerService = labellingPlannerService;
|
|
@@ -112,6 +114,7 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
112
114
|
this.emailTemplateService = emailTemplateService;
|
|
113
115
|
this.marketGenerationService = marketGenerationService;
|
|
114
116
|
this.playbookRunService = playbookRunService;
|
|
117
|
+
this.creationPlaneProjection = creationPlaneProjection;
|
|
115
118
|
this.buildDispatchService = buildDispatchService;
|
|
116
119
|
this.executionTraceReadService = executionTraceReadService;
|
|
117
120
|
this.logoGenerationService = logoGenerationService;
|
|
@@ -198,6 +201,8 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
198
201
|
this.logRouteRegistration('get', '/_meta/resources-registry/app/:appSlug', 'Get resources registry for specific app');
|
|
199
202
|
this.router.post('/_meta/introspect', this.asyncHandler(this.requestIntrospection.bind(this)));
|
|
200
203
|
this.logRouteRegistration('post', '/_meta/introspect', 'Execute companion introspection behavior');
|
|
204
|
+
this.router.get('/_meta/introspect/behaviors', this.asyncHandler(this.listIntrospectionBehaviors.bind(this)));
|
|
205
|
+
this.logRouteRegistration('get', '/_meta/introspect/behaviors', 'List companion introspection behaviors (the live-context menu)');
|
|
201
206
|
this.router.post('/charts/audit', this.asyncHandler(this.chartsAudit.bind(this)));
|
|
202
207
|
this.logRouteRegistration('post', '/charts/audit', 'Audit chart registration alignment (frontend chartViews vs backend registry)');
|
|
203
208
|
this.router.get('/_meta/website/structured-data-audit', this.asyncHandler(this.getWebsiteStructuredDataAudit.bind(this)));
|
|
@@ -210,7 +215,14 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
210
215
|
// keep the DD-6 posture).
|
|
211
216
|
this.router.get('/coding-agent/status', this.asyncHandler(this.codingAgentStatus.bind(this)));
|
|
212
217
|
this.router.post('/coding-agent/cancel', this.asyncHandler(this.codingAgentCancel.bind(this)));
|
|
218
|
+
// Interactive lane: answer a parked question (resume the same session), and
|
|
219
|
+
// stream a run's live frames. The respond door is a WRITE (it resumes a
|
|
220
|
+
// workspace-mutating run); the events stream is read-only.
|
|
221
|
+
this.router.post('/coding-agent/session/respond', this.asyncHandler(this.codingAgentRespond.bind(this)));
|
|
222
|
+
this.router.get('/coding-agent/session/events', this.codingAgentSessionEvents.bind(this));
|
|
213
223
|
this.logRouteRegistration('get', '/coding-agent/status', 'Coding-agent dispatch readiness (does NOT guarantee CLI binary presence or auth)');
|
|
224
|
+
this.logRouteRegistration('post', '/coding-agent/session/respond', 'Answer a parked coding task question and resume the same session');
|
|
225
|
+
this.logRouteRegistration('get', '/coding-agent/session/events', 'Server-sent live frames for an active coding session (taskId query)');
|
|
214
226
|
// ── Prompt (TODO) ──────────────────────────────────────────────
|
|
215
227
|
this.router.post('/prompt', this.asyncHandler(this.buildPrompt.bind(this)));
|
|
216
228
|
this.logRouteRegistration('post', '/prompt', 'Build prompt from template and context');
|
|
@@ -221,6 +233,8 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
221
233
|
this.router.get('/build/next', this.asyncHandler(this.describeNextBuildTask.bind(this)));
|
|
222
234
|
this.logRouteRegistration('get', '/build/next', 'What the next ready build-plan run would be (either executor) — read-only');
|
|
223
235
|
this.router.post('/build/dispatch-next', this.asyncHandler(this.dispatchNextBuildTask.bind(this)));
|
|
236
|
+
this.router.get('/build/dispatches', this.asyncHandler(this.readBuildDispatches.bind(this)));
|
|
237
|
+
this.logRouteRegistration('get', '/build/dispatches', 'Outcomes of detached build dispatches (newest first) — the observation channel for runs that outlive an HTTP request');
|
|
224
238
|
this.logRouteRegistration('post', '/build/dispatch-next', 'Run the next ready build-plan task (coding agent or companion generation step)');
|
|
225
239
|
// ── Execution traces (what actually happened) ────────────────────
|
|
226
240
|
this.router.get('/traces', this.asyncHandler(this.listExecutionTraces.bind(this)));
|
|
@@ -234,7 +248,17 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
234
248
|
this.router.get('/playbooks/coherence', this.asyncHandler(this.readCoherenceReport.bind(this)));
|
|
235
249
|
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');
|
|
236
250
|
this.router.get('/playbooks', this.asyncHandler(this.listPlaybooks.bind(this)));
|
|
251
|
+
this.router.post('/playbooks/refresh-board', this.asyncHandler(this.refreshPlaybookBoard.bind(this)));
|
|
252
|
+
this.logRouteRegistration('post', '/playbooks/refresh-board', 'Drop the eligibility cache so the next read recomputes');
|
|
237
253
|
this.router.get('/playbooks/runs', this.asyncHandler(this.readPlaybookRunsInFlight.bind(this)));
|
|
254
|
+
/*
|
|
255
|
+
* Registered beside `/playbooks/runs` and BEFORE `/playbooks/:playbookRef/run`, which is the
|
|
256
|
+
* ordering discipline this router already keeps: a literal segment that a parameterised route
|
|
257
|
+
* could swallow goes first. `suspended` is one segment against that route's two, so nothing
|
|
258
|
+
* shadows it today — the placement is to keep the rule visible rather than to fix a collision.
|
|
259
|
+
*/
|
|
260
|
+
this.router.get('/playbooks/suspended', this.asyncHandler(this.readSuspendedPlaybookRuns.bind(this)));
|
|
261
|
+
this.logRouteRegistration('get', '/playbooks/suspended', 'Runs waiting for creator answers — the third state, in neither /playbooks/runs bucket');
|
|
238
262
|
this.router.post('/playbooks/loop', this.asyncHandler(this.runPlaybookLoop.bind(this)));
|
|
239
263
|
this.logRouteRegistration('post', '/playbooks/loop', 'Chain playbooks: deterministic gate, model choice, run, repeat');
|
|
240
264
|
this.logRouteRegistration('get', '/playbooks', 'Eligibility board: which playbooks can run now, and why not the rest');
|
|
@@ -244,6 +268,19 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
244
268
|
this.logRouteRegistration('post', '/playbooks/runs/:runId/resume', 'Answer a suspended run\'s questions and continue it (action: accept | decline | cancel)');
|
|
245
269
|
this.router.post('/playbooks/:playbookRef/judge', this.asyncHandler(this.judgePlaybookArtifacts.bind(this)));
|
|
246
270
|
this.logRouteRegistration('post', '/playbooks/:playbookRef/judge', 'Judge SUPPLIED artifacts against a playbook\'s evaluation treatment (the judge value-eval bench; nothing lands)');
|
|
271
|
+
/*
|
|
272
|
+
* The governed-document questions a HUMAN must answer (#192).
|
|
273
|
+
*
|
|
274
|
+
* Read-only and derived from the engine catalog, so it needs no application state and answers the
|
|
275
|
+
* same for every caller. It exists because the blueprint's question surface had no consumer at all:
|
|
276
|
+
* the questions were compiled into the reference docs shipped to application builders and rendered
|
|
277
|
+
* by nothing, so 25 of the 39 catalogued facts could not be established and every clause resting on
|
|
278
|
+
* them refused. This is the door a host renders; landing the answers is `buildGovernanceFactDeclarations`.
|
|
279
|
+
*/
|
|
280
|
+
this.router.get('/compliance/governance-questions', this.asyncHandler(this.readGovernanceQuestions.bind(this)));
|
|
281
|
+
this.logRouteRegistration('get', '/compliance/governance-questions', 'Governed-document facts only a human may establish, per document (?definitionRef= to narrow)');
|
|
282
|
+
this.router.post('/compliance/governance-facts', this.asyncHandler(this.landGovernanceFacts.bind(this)));
|
|
283
|
+
this.logRouteRegistration('post', '/compliance/governance-facts', 'Land one document\'s human-established facts as the document-facts-authored family');
|
|
247
284
|
this.router.get('/runs/writes', this.asyncHandler(this.listRunWrites.bind(this)));
|
|
248
285
|
this.logRouteRegistration('get', '/runs/writes', 'The write register: which files each playbook run wrote, revertible per run');
|
|
249
286
|
this.router.post('/runs/writes/:runId/revert', this.asyncHandler(this.revertRunWrites.bind(this)));
|
|
@@ -828,6 +865,81 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
828
865
|
next(error);
|
|
829
866
|
}
|
|
830
867
|
}
|
|
868
|
+
/**
|
|
869
|
+
* Answer a coding task that parked on a question, resuming the SAME agent
|
|
870
|
+
* session. A WRITE: it re-enters a workspace-mutating run behind the shared
|
|
871
|
+
* worktree lock, so it is serialized with every other coding run.
|
|
872
|
+
*/
|
|
873
|
+
async codingAgentRespond(req, res, next) {
|
|
874
|
+
try {
|
|
875
|
+
const { taskId, answer } = (req.body ?? {});
|
|
876
|
+
if (typeof taskId !== 'string' || typeof answer !== 'string') {
|
|
877
|
+
// A malformed body is a VALIDATION 400, not a critical INTERNAL 500 — a
|
|
878
|
+
// plain `new Error` here surfaced as the latter and logged at critical
|
|
879
|
+
// severity (found by the live surface probe, 2026-09-04).
|
|
880
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
881
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
882
|
+
context: { message: 'Both `taskId` and `answer` (strings) are required.' },
|
|
883
|
+
});
|
|
884
|
+
}
|
|
885
|
+
// In-process fast path — this process parked the task. Otherwise
|
|
886
|
+
// RE-SELECT the answerable state from the build plan (a companion restart
|
|
887
|
+
// drops the in-memory map but the durable row + build plan still describe
|
|
888
|
+
// the task and its bounds).
|
|
889
|
+
const parked = this.codingAgentDispatchService.getParkedCodingSessionState(taskId)
|
|
890
|
+
?? await this.buildDispatchService.reconstructParkedCodingTaskForResume(taskId);
|
|
891
|
+
if (!parked) {
|
|
892
|
+
throw this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {
|
|
893
|
+
customMessageReference: ErrorCustomMessageReference.CONFLICT,
|
|
894
|
+
context: {
|
|
895
|
+
message: `No coding task is awaiting an answer under id ${taskId}, or it cannot be resumed `
|
|
896
|
+
+ '(the agent does not support session resume, or its build task no longer exists).',
|
|
897
|
+
},
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
const admission = await this.codingAgentDispatchService.resumeParkedCodingTask(parked, answer);
|
|
901
|
+
this.jsonSuccess(res, admission);
|
|
902
|
+
}
|
|
903
|
+
catch (error) {
|
|
904
|
+
this.jsonError(res, error, next);
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* Stream one active coding session's live frames as Server-Sent Events.
|
|
909
|
+
*
|
|
910
|
+
* Frames flow only while the run is active, so the current pending question
|
|
911
|
+
* (if any) is sent first as a `snapshot` event — a subscriber that attaches
|
|
912
|
+
* after a park still learns what is being asked. Read-only.
|
|
913
|
+
*/
|
|
914
|
+
codingAgentSessionEvents(req, res) {
|
|
915
|
+
const taskId = typeof req.query.taskId === 'string' ? req.query.taskId : '';
|
|
916
|
+
if (!taskId) {
|
|
917
|
+
res.status(400).json({ error: 'A `taskId` query parameter is required.' });
|
|
918
|
+
return;
|
|
919
|
+
}
|
|
920
|
+
res.setHeader('Content-Type', 'text/event-stream');
|
|
921
|
+
res.setHeader('Cache-Control', 'no-cache, no-transform');
|
|
922
|
+
res.setHeader('Connection', 'keep-alive');
|
|
923
|
+
res.flushHeaders?.();
|
|
924
|
+
const send = (event, data) => {
|
|
925
|
+
res.write(`event: ${event}\ndata: ${JSON.stringify(data)}\n\n`);
|
|
926
|
+
};
|
|
927
|
+
// The pending question up front, so a late subscriber is not blind to a park
|
|
928
|
+
// that already happened.
|
|
929
|
+
const pending = this.codingAgentDispatchService.listPendingCodingQuestions().find((q) => q.taskId === taskId);
|
|
930
|
+
send('snapshot', { pendingQuestion: pending ?? null });
|
|
931
|
+
const unsubscribe = this.codingAgentDispatchService.subscribeToCodingSession(taskId, (frame) => {
|
|
932
|
+
send(frame.channel, frame.payload);
|
|
933
|
+
});
|
|
934
|
+
// A heartbeat keeps intermediaries from closing an idle stream during a long
|
|
935
|
+
// quiet stretch of a run.
|
|
936
|
+
const heartbeat = setInterval(() => res.write(': keep-alive\n\n'), 15_000);
|
|
937
|
+
heartbeat.unref?.();
|
|
938
|
+
req.on('close', () => {
|
|
939
|
+
clearInterval(heartbeat);
|
|
940
|
+
unsubscribe();
|
|
941
|
+
});
|
|
942
|
+
}
|
|
831
943
|
/**
|
|
832
944
|
* What is running, and what died leaving something resumable.
|
|
833
945
|
*
|
|
@@ -855,6 +967,125 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
855
967
|
this.jsonError(res, e, next);
|
|
856
968
|
}
|
|
857
969
|
}
|
|
970
|
+
/**
|
|
971
|
+
* `GET /playbooks/suspended` — what is waiting for an answer, independent of who asked.
|
|
972
|
+
*
|
|
973
|
+
* The read that makes a suspension survivable. A run that stops at a clarification answers 200 with
|
|
974
|
+
* its `runId`, and until this existed that response was the ONLY place the id lived: reload the
|
|
975
|
+
* page and the run stayed suspended on disk with nobody able to name it. A resume affordance can
|
|
976
|
+
* now be rebuilt from server state rather than from the browser's memory of one response.
|
|
977
|
+
*/
|
|
978
|
+
async readSuspendedPlaybookRuns(_req, res, next) {
|
|
979
|
+
try {
|
|
980
|
+
this.jsonSuccess(res, await this.playbookRunService.readSuspendedRuns());
|
|
981
|
+
}
|
|
982
|
+
catch (e) {
|
|
983
|
+
this.jsonError(res, e, next);
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* `GET /compliance/governance-questions` — what a person still has to decide.
|
|
988
|
+
*
|
|
989
|
+
* `definitionRef` may repeat, and an unknown one yields nothing rather than 404: the composer treats
|
|
990
|
+
* an unknown document as "no such document", and a host loading several refs should not lose the
|
|
991
|
+
* ones that exist because one was mistyped.
|
|
992
|
+
*/
|
|
993
|
+
async readGovernanceQuestions(req, res, next) {
|
|
994
|
+
try {
|
|
995
|
+
const raw = req.query.definitionRef;
|
|
996
|
+
const definitionRefs = raw === undefined ? undefined : (Array.isArray(raw) ? raw : [raw]).map(String);
|
|
997
|
+
this.jsonSuccess(res, { questionnaires: composeGovernanceQuestionnaires(definitionRefs) });
|
|
998
|
+
}
|
|
999
|
+
catch (e) {
|
|
1000
|
+
this.jsonError(res, e, next);
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
* `POST /compliance/governance-facts` — the answers to the questions above, as a FILE.
|
|
1005
|
+
*
|
|
1006
|
+
* The write half of #192. It lands `document-facts-authored`, never `document-facts`: every question
|
|
1007
|
+
* the questionnaire asks carries a human authority, and the derived family refuses those by type.
|
|
1008
|
+
*
|
|
1009
|
+
* It does NOT commit. The landed file is a working edit until a human commits it
|
|
1010
|
+
* (`.claude/rules/one-source-of-truth.md`, rules 2 and 3) — this endpoint accepts nothing.
|
|
1011
|
+
*
|
|
1012
|
+
* `?dryRun=1` runs the whole pipe and writes nothing, which is how a host previews what an answer set
|
|
1013
|
+
* would produce before a person commits to it.
|
|
1014
|
+
*/
|
|
1015
|
+
async landGovernanceFacts(req, res, next) {
|
|
1016
|
+
try {
|
|
1017
|
+
const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;
|
|
1018
|
+
if (!specificationsPackageRoot) {
|
|
1019
|
+
/*
|
|
1020
|
+
* `next(...)`, never `throw`. Thrown here it lands in this method's OWN catch, goes through
|
|
1021
|
+
* `jsonError` → `buildFromStandardError`, and is reclassified INTERNAL with its message
|
|
1022
|
+
* sanitized to the literal "internal" — so a deliberate, well-worded refusal would answer 500
|
|
1023
|
+
* saying nothing. Found by making a test double reproduce the real sanitization rather than
|
|
1024
|
+
* passing errors through.
|
|
1025
|
+
*/
|
|
1026
|
+
next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
1027
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1028
|
+
context: { message: 'This application has no resolved specifications package, so there is nowhere to land the facts.' },
|
|
1029
|
+
}));
|
|
1030
|
+
return;
|
|
1031
|
+
}
|
|
1032
|
+
/*
|
|
1033
|
+
* The ENVELOPE only — see the schema's own note. The answer SEMANTICS stay with the service
|
|
1034
|
+
* that owns the question catalog; this refuses a body that is not a request at all, which
|
|
1035
|
+
* previously reached the service and threw a `TypeError` reported as a 500.
|
|
1036
|
+
*
|
|
1037
|
+
* `safeParse` and `next(...)`, never `.parse()`. A thrown `ZodError` lands in this method's own
|
|
1038
|
+
* catch and goes out through the generic path as INTERNAL with its message sanitized to
|
|
1039
|
+
* "internal" — the SAME 500-saying-nothing this guard exists to remove, so parsing strictly and
|
|
1040
|
+
* throwing would have moved the defect rather than fixed it. Caught by mutating the guard away
|
|
1041
|
+
* and watching the pin stay green.
|
|
1042
|
+
*/
|
|
1043
|
+
const parsed = CompanionLandGovernanceFactsRequestSchema.safeParse(req.body ?? {});
|
|
1044
|
+
if (!parsed.success) {
|
|
1045
|
+
next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
1046
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1047
|
+
context: {
|
|
1048
|
+
message: 'This is not a governance-fact landing request: '
|
|
1049
|
+
+ parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; '),
|
|
1050
|
+
},
|
|
1051
|
+
}));
|
|
1052
|
+
return;
|
|
1053
|
+
}
|
|
1054
|
+
const payload = parsed.data;
|
|
1055
|
+
const result = await landGovernanceFactDeclarations({
|
|
1056
|
+
specificationsPackageRoot,
|
|
1057
|
+
// NEUTRAL BY CONTRACT (issue #65), same as every other landed constant — app identity lives in
|
|
1058
|
+
// VALUES, never in the names of landed exports.
|
|
1059
|
+
constantPrefix: 'application',
|
|
1060
|
+
answers: payload,
|
|
1061
|
+
...(req.query.dryRun === undefined ? {} : { dryRun: true }),
|
|
1062
|
+
});
|
|
1063
|
+
this.jsonSuccess(res, result);
|
|
1064
|
+
}
|
|
1065
|
+
catch (e) {
|
|
1066
|
+
/*
|
|
1067
|
+
* A refusal on the ANSWERS is a BAD REQUEST, and it must arrive with its message intact.
|
|
1068
|
+
*
|
|
1069
|
+
* Every `GovernanceQuestionnaireError` names what the person got wrong — an unanswered
|
|
1070
|
+
* question, a review with no reviewer, "does not apply" on a question that does not offer it —
|
|
1071
|
+
* and those sentences are the whole product of that boundary. Left to `jsonError` they are
|
|
1072
|
+
* classified INTERNAL and SANITIZED to the literal string "internal", so the caller gets a 500
|
|
1073
|
+
* that says nothing. Measured against the live companion on 2026-09-03, minutes after the
|
|
1074
|
+
* route shipped: `POST` with an empty body answered `{"type":"INTERNAL","message":"internal"}`.
|
|
1075
|
+
*
|
|
1076
|
+
* Same treatment as `PlaybookElicitationError` below, and for the same reason: a malformed
|
|
1077
|
+
* interview is something the caller must change, never something that went wrong here.
|
|
1078
|
+
*/
|
|
1079
|
+
if (e instanceof GovernanceQuestionnaireError) {
|
|
1080
|
+
next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
1081
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1082
|
+
context: { message: e.message },
|
|
1083
|
+
}));
|
|
1084
|
+
return;
|
|
1085
|
+
}
|
|
1086
|
+
this.jsonError(res, e, next);
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
858
1089
|
async codingAgentStatus(_req, res, next) {
|
|
859
1090
|
try {
|
|
860
1091
|
this.jsonSuccess(res, this.codingAgentDispatchService.getStatus());
|
|
@@ -1100,6 +1331,21 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
1100
1331
|
return result.error?.name === 'ZodError'
|
|
1101
1332
|
|| result.error?.name === SPECIFICATION_CONTEXT_VALIDATION_ERROR_NAME;
|
|
1102
1333
|
}
|
|
1334
|
+
/**
|
|
1335
|
+
* `GET /_meta/introspect/behaviors` — the live-context MENU (`wildo context list`, issue #252).
|
|
1336
|
+
*
|
|
1337
|
+
* Pure catalog read, no subprocess: what this running companion can answer, plus the service keys a
|
|
1338
|
+
* `POST /_meta/introspect` caller may target and the resolved default backend key so the caller never
|
|
1339
|
+
* re-derives the "first backend service" rule.
|
|
1340
|
+
*/
|
|
1341
|
+
listIntrospectionBehaviors(_req, res, next) {
|
|
1342
|
+
try {
|
|
1343
|
+
res.json(this.companionIntrospectionService.describeCatalog());
|
|
1344
|
+
}
|
|
1345
|
+
catch (error) {
|
|
1346
|
+
next(error);
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1103
1349
|
async requestIntrospection(req, res, next) {
|
|
1104
1350
|
const traceStep = this.createTraceStep(res, 'meta-introspection', 'request-introspection');
|
|
1105
1351
|
let mappedFailureAlreadyTraced = false;
|
|
@@ -1217,7 +1463,11 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
1217
1463
|
context: { message: '`objective` is required and must be a string.' },
|
|
1218
1464
|
});
|
|
1219
1465
|
}
|
|
1220
|
-
const
|
|
1466
|
+
const evidenceScope = (req.body ?? {}).evidenceScope;
|
|
1467
|
+
const result = await this.researchAgentDispatchService.runResearchTask({
|
|
1468
|
+
objective,
|
|
1469
|
+
...(typeof evidenceScope === 'string' && evidenceScope.length > 0 ? { evidenceScope } : {}),
|
|
1470
|
+
});
|
|
1221
1471
|
// The whole result, including the permission decisions: a thin answer has two very different
|
|
1222
1472
|
// causes — little was found, or a tool was refused — and the prose alone cannot tell them apart.
|
|
1223
1473
|
res.json(result);
|
|
@@ -1370,10 +1620,28 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
1370
1620
|
* time, the change-set is captured around it, and the required checks gate the result — and none of that
|
|
1371
1621
|
* is accepted until a human commits.
|
|
1372
1622
|
*/
|
|
1623
|
+
async readBuildDispatches(_req, res, next) {
|
|
1624
|
+
try {
|
|
1625
|
+
res.json({ dispatches: this.buildDispatchService.readDetachedDispatches() });
|
|
1626
|
+
}
|
|
1627
|
+
catch (error) {
|
|
1628
|
+
next(error);
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1373
1631
|
async dispatchNextBuildTask(req, res, next) {
|
|
1374
1632
|
try {
|
|
1375
1633
|
const body = req.body || {};
|
|
1376
|
-
const
|
|
1634
|
+
const budget = Number.isSafeInteger(body.maximumTokenBudget) ? { maximumTokenBudget: body.maximumTokenBudget } : {};
|
|
1635
|
+
// DETACHED mode: a generation step can outlive any reasonable HTTP ceiling (an i18n run
|
|
1636
|
+
// measured 40+ minutes against the 30-minute server cap, 2026-09-04), and a response that
|
|
1637
|
+
// dies with the socket leaves the operator blind. 202 + the selected plan now; the outcome
|
|
1638
|
+
// is readable at GET /build/dispatches (and, for coding tasks, in the durable task row).
|
|
1639
|
+
if (body.async === true) {
|
|
1640
|
+
const plan = await this.buildDispatchService.submitBuildDispatchDetached(budget, this.getTraceSession(res));
|
|
1641
|
+
res.status(202).json({ plan, dispatched: true, async: true, note: 'Running detached. Poll GET /build/dispatches for the outcome.' });
|
|
1642
|
+
return;
|
|
1643
|
+
}
|
|
1644
|
+
const result = await this.buildDispatchService.dispatchNextBuildTask(budget, this.getTraceSession(res));
|
|
1377
1645
|
res.json({
|
|
1378
1646
|
plan: result.plan,
|
|
1379
1647
|
dispatched: true,
|
|
@@ -1546,11 +1814,31 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
1546
1814
|
* Deterministic and side-effect-free: it reads the working tree and answers what can run now. This is
|
|
1547
1815
|
* the gate a model may choose WITHIN and can never widen.
|
|
1548
1816
|
*/
|
|
1817
|
+
/**
|
|
1818
|
+
* The creation board's explicit Refresh (bridge window, `workbench-creation-board-resources.md`
|
|
1819
|
+
* Phase 2): busts the eligibility cache the resource lane serves from, so the re-LIST that
|
|
1820
|
+
* follows recomputes. Answers `{invalidated: true}` rather than recomputing inline — the ~10s
|
|
1821
|
+
* cost belongs to the read that wants it.
|
|
1822
|
+
*/
|
|
1823
|
+
async refreshPlaybookBoard(_req, res, next) {
|
|
1824
|
+
try {
|
|
1825
|
+
this.creationPlaneProjection.invalidateEligibility();
|
|
1826
|
+
res.json({ invalidated: true });
|
|
1827
|
+
}
|
|
1828
|
+
catch (error) {
|
|
1829
|
+
next(error);
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1549
1832
|
async listPlaybooks(_req, res, next) {
|
|
1550
1833
|
try {
|
|
1551
1834
|
const board = await this.playbookRunService.listPlaybookEligibility();
|
|
1835
|
+
/*
|
|
1836
|
+
* No board-level `phase`. It reported a derived APPLICATION phase that was deleted on
|
|
1837
|
+
* 2026-09-04 — an application is not in a mode of reasoning, it holds artifacts produced by
|
|
1838
|
+
* several. Each row still carries the PLAYBOOK's own phase label, which is the only one that
|
|
1839
|
+
* was ever true.
|
|
1840
|
+
*/
|
|
1552
1841
|
res.json({
|
|
1553
|
-
phase: board.phase,
|
|
1554
1842
|
eligibleCount: board.playbooks.filter((entry) => entry.eligible).length,
|
|
1555
1843
|
playbooks: board.playbooks,
|
|
1556
1844
|
});
|
|
@@ -1578,13 +1866,24 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
1578
1866
|
const creatorBrief = typeof body.creatorBrief === 'string' ? body.creatorBrief : undefined;
|
|
1579
1867
|
const elicitationAnswers = this.readElicitationAnswers(body.elicitationAnswers);
|
|
1580
1868
|
const dryRun = body.dryRun === true;
|
|
1581
|
-
const
|
|
1869
|
+
const runInput = {
|
|
1582
1870
|
playbookRef,
|
|
1583
1871
|
...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),
|
|
1584
1872
|
...(creatorBrief ? { creatorBrief } : {}),
|
|
1585
1873
|
...(elicitationAnswers ? { elicitationAnswers } : {}),
|
|
1586
1874
|
...(dryRun ? { dryRun: true } : {}),
|
|
1587
|
-
}
|
|
1875
|
+
};
|
|
1876
|
+
/*
|
|
1877
|
+
* `async: true` returns at SUBMISSION (#265): the synchronous shape holds one request open for
|
|
1878
|
+
* the run's life, and the server's 30-minute ceiling is shorter than a choreography's own
|
|
1879
|
+
* bound — the connection died at exactly 1800s twice while the run completed server-side. The
|
|
1880
|
+
* outcome (success OR failure) lands in GET /playbooks/runs `lastCompleted`.
|
|
1881
|
+
*/
|
|
1882
|
+
if (body.async === true) {
|
|
1883
|
+
res.status(202).json(this.playbookRunService.submitPlaybookRunDetached(runInput));
|
|
1884
|
+
return;
|
|
1885
|
+
}
|
|
1886
|
+
const result = await this.playbookRunService.runPlaybook(runInput);
|
|
1588
1887
|
if ('status' in result) {
|
|
1589
1888
|
// 200, not an error status: the run is HEALTHY and waiting. The creator answers through
|
|
1590
1889
|
// POST /playbooks/runs/:runId/resume, which is the industry three-action model
|
|
@@ -2227,19 +2526,20 @@ CompanionController = __decorate([
|
|
|
2227
2526
|
__param(8, inject(COMPANION_SERVICE_TYPES.EmailTemplateService)),
|
|
2228
2527
|
__param(9, inject(COMPANION_SERVICE_TYPES.MarketGenerationService)),
|
|
2229
2528
|
__param(10, inject(COMPANION_SERVICE_TYPES.PlaybookRunService)),
|
|
2230
|
-
__param(11, inject(COMPANION_SERVICE_TYPES.
|
|
2231
|
-
__param(12, inject(COMPANION_SERVICE_TYPES.
|
|
2232
|
-
__param(13, inject(COMPANION_SERVICE_TYPES.
|
|
2233
|
-
__param(14, inject(COMPANION_SERVICE_TYPES.
|
|
2234
|
-
__param(15, inject(COMPANION_SERVICE_TYPES.
|
|
2235
|
-
__param(16, inject(COMPANION_SERVICE_TYPES.
|
|
2236
|
-
__param(17, inject(COMPANION_SERVICE_TYPES.
|
|
2237
|
-
__param(18, inject(COMPANION_SERVICE_TYPES.
|
|
2238
|
-
__param(19, inject(COMPANION_SERVICE_TYPES.
|
|
2239
|
-
__param(20, inject(COMPANION_SERVICE_TYPES.
|
|
2240
|
-
__param(21, inject(COMPANION_SERVICE_TYPES.
|
|
2241
|
-
__param(22, inject(COMPANION_SERVICE_TYPES.
|
|
2242
|
-
__param(23, inject(COMPANION_SERVICE_TYPES.
|
|
2529
|
+
__param(11, inject(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService)),
|
|
2530
|
+
__param(12, inject(COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService)),
|
|
2531
|
+
__param(13, inject(COMPANION_SERVICE_TYPES.ExecutionTraceReadService)),
|
|
2532
|
+
__param(14, inject(COMPANION_SERVICE_TYPES.LogoGenerationService)),
|
|
2533
|
+
__param(15, inject(COMPANION_SERVICE_TYPES.LogoDeliberationService)),
|
|
2534
|
+
__param(16, inject(COMPANION_SERVICE_TYPES.BrandAcceptService)),
|
|
2535
|
+
__param(17, inject(COMPANION_SERVICE_TYPES.ExpertPersonaService)),
|
|
2536
|
+
__param(18, inject(COMPANION_SERVICE_TYPES.DeliberationService)),
|
|
2537
|
+
__param(19, inject(COMPANION_SERVICE_TYPES.TechnicalDocService)),
|
|
2538
|
+
__param(20, inject(COMPANION_SERVICE_TYPES.IntrospectionService)),
|
|
2539
|
+
__param(21, inject(COMPANION_SERVICE_TYPES.ExecutionsService)),
|
|
2540
|
+
__param(22, inject(COMPANION_SERVICE_TYPES.TraceabilityService)),
|
|
2541
|
+
__param(23, inject(COMPANION_SERVICE_TYPES.CodingAgentDispatchService)),
|
|
2542
|
+
__param(24, inject(COMPANION_SERVICE_TYPES.ResearchAgentDispatchService)),
|
|
2243
2543
|
__metadata("design:paramtypes", [LoggerService,
|
|
2244
2544
|
ErrorBuilderBackendService,
|
|
2245
2545
|
ErrorHandlerService, Object, LabellingPlannerCompanionService,
|
|
@@ -2249,6 +2549,7 @@ CompanionController = __decorate([
|
|
|
2249
2549
|
EmailTemplateCompanionService,
|
|
2250
2550
|
MarketGenerationCompanionService,
|
|
2251
2551
|
PlaybookRunCompanionService,
|
|
2552
|
+
CreationPlaneProjectionCompanionService,
|
|
2252
2553
|
ApplicationBuildDispatchCompanionService,
|
|
2253
2554
|
ExecutionTraceReadCompanionService,
|
|
2254
2555
|
LogoGenerationCompanionService,
|