@wildo-ai/dev-companion 1.1.1 → 1.1.3
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 +408 -38
- 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 +70 -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 +110 -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 +62 -1
- package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +295 -19
- 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 +243 -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 +370 -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 +40 -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 +126 -0
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js.map +1 -0
- 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/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.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.js +13 -8
- 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 +31 -0
- 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 +91 -8
- 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 +4 -2
- 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 +10 -7
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +80 -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 +261 -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 +113 -1
- 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 +517 -54
- 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 +84 -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 +10 -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 +10 -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');
|
|
@@ -234,7 +246,17 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
234
246
|
this.router.get('/playbooks/coherence', this.asyncHandler(this.readCoherenceReport.bind(this)));
|
|
235
247
|
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
248
|
this.router.get('/playbooks', this.asyncHandler(this.listPlaybooks.bind(this)));
|
|
249
|
+
this.router.post('/playbooks/refresh-board', this.asyncHandler(this.refreshPlaybookBoard.bind(this)));
|
|
250
|
+
this.logRouteRegistration('post', '/playbooks/refresh-board', 'Drop the eligibility cache so the next read recomputes');
|
|
237
251
|
this.router.get('/playbooks/runs', this.asyncHandler(this.readPlaybookRunsInFlight.bind(this)));
|
|
252
|
+
/*
|
|
253
|
+
* Registered beside `/playbooks/runs` and BEFORE `/playbooks/:playbookRef/run`, which is the
|
|
254
|
+
* ordering discipline this router already keeps: a literal segment that a parameterised route
|
|
255
|
+
* could swallow goes first. `suspended` is one segment against that route's two, so nothing
|
|
256
|
+
* shadows it today — the placement is to keep the rule visible rather than to fix a collision.
|
|
257
|
+
*/
|
|
258
|
+
this.router.get('/playbooks/suspended', this.asyncHandler(this.readSuspendedPlaybookRuns.bind(this)));
|
|
259
|
+
this.logRouteRegistration('get', '/playbooks/suspended', 'Runs waiting for creator answers — the third state, in neither /playbooks/runs bucket');
|
|
238
260
|
this.router.post('/playbooks/loop', this.asyncHandler(this.runPlaybookLoop.bind(this)));
|
|
239
261
|
this.logRouteRegistration('post', '/playbooks/loop', 'Chain playbooks: deterministic gate, model choice, run, repeat');
|
|
240
262
|
this.logRouteRegistration('get', '/playbooks', 'Eligibility board: which playbooks can run now, and why not the rest');
|
|
@@ -244,6 +266,19 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
244
266
|
this.logRouteRegistration('post', '/playbooks/runs/:runId/resume', 'Answer a suspended run\'s questions and continue it (action: accept | decline | cancel)');
|
|
245
267
|
this.router.post('/playbooks/:playbookRef/judge', this.asyncHandler(this.judgePlaybookArtifacts.bind(this)));
|
|
246
268
|
this.logRouteRegistration('post', '/playbooks/:playbookRef/judge', 'Judge SUPPLIED artifacts against a playbook\'s evaluation treatment (the judge value-eval bench; nothing lands)');
|
|
269
|
+
/*
|
|
270
|
+
* The governed-document questions a HUMAN must answer (#192).
|
|
271
|
+
*
|
|
272
|
+
* Read-only and derived from the engine catalog, so it needs no application state and answers the
|
|
273
|
+
* same for every caller. It exists because the blueprint's question surface had no consumer at all:
|
|
274
|
+
* the questions were compiled into the reference docs shipped to application builders and rendered
|
|
275
|
+
* by nothing, so 25 of the 39 catalogued facts could not be established and every clause resting on
|
|
276
|
+
* them refused. This is the door a host renders; landing the answers is `buildGovernanceFactDeclarations`.
|
|
277
|
+
*/
|
|
278
|
+
this.router.get('/compliance/governance-questions', this.asyncHandler(this.readGovernanceQuestions.bind(this)));
|
|
279
|
+
this.logRouteRegistration('get', '/compliance/governance-questions', 'Governed-document facts only a human may establish, per document (?definitionRef= to narrow)');
|
|
280
|
+
this.router.post('/compliance/governance-facts', this.asyncHandler(this.landGovernanceFacts.bind(this)));
|
|
281
|
+
this.logRouteRegistration('post', '/compliance/governance-facts', 'Land one document\'s human-established facts as the document-facts-authored family');
|
|
247
282
|
this.router.get('/runs/writes', this.asyncHandler(this.listRunWrites.bind(this)));
|
|
248
283
|
this.logRouteRegistration('get', '/runs/writes', 'The write register: which files each playbook run wrote, revertible per run');
|
|
249
284
|
this.router.post('/runs/writes/:runId/revert', this.asyncHandler(this.revertRunWrites.bind(this)));
|
|
@@ -828,6 +863,81 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
828
863
|
next(error);
|
|
829
864
|
}
|
|
830
865
|
}
|
|
866
|
+
/**
|
|
867
|
+
* Answer a coding task that parked on a question, resuming the SAME agent
|
|
868
|
+
* session. A WRITE: it re-enters a workspace-mutating run behind the shared
|
|
869
|
+
* worktree lock, so it is serialized with every other coding run.
|
|
870
|
+
*/
|
|
871
|
+
async codingAgentRespond(req, res, next) {
|
|
872
|
+
try {
|
|
873
|
+
const { taskId, answer } = (req.body ?? {});
|
|
874
|
+
if (typeof taskId !== 'string' || typeof answer !== 'string') {
|
|
875
|
+
// A malformed body is a VALIDATION 400, not a critical INTERNAL 500 — a
|
|
876
|
+
// plain `new Error` here surfaced as the latter and logged at critical
|
|
877
|
+
// severity (found by the live surface probe, 2026-09-04).
|
|
878
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
879
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
880
|
+
context: { message: 'Both `taskId` and `answer` (strings) are required.' },
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
// In-process fast path — this process parked the task. Otherwise
|
|
884
|
+
// RE-SELECT the answerable state from the build plan (a companion restart
|
|
885
|
+
// drops the in-memory map but the durable row + build plan still describe
|
|
886
|
+
// the task and its bounds).
|
|
887
|
+
const parked = this.codingAgentDispatchService.getParkedCodingSessionState(taskId)
|
|
888
|
+
?? await this.buildDispatchService.reconstructParkedCodingTaskForResume(taskId);
|
|
889
|
+
if (!parked) {
|
|
890
|
+
throw this.errorBuilder.buildError(ErrorType.CONFLICT, undefined, {
|
|
891
|
+
customMessageReference: ErrorCustomMessageReference.CONFLICT,
|
|
892
|
+
context: {
|
|
893
|
+
message: `No coding task is awaiting an answer under id ${taskId}, or it cannot be resumed `
|
|
894
|
+
+ '(the agent does not support session resume, or its build task no longer exists).',
|
|
895
|
+
},
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
const admission = await this.codingAgentDispatchService.resumeParkedCodingTask(parked, answer);
|
|
899
|
+
this.jsonSuccess(res, admission);
|
|
900
|
+
}
|
|
901
|
+
catch (error) {
|
|
902
|
+
this.jsonError(res, error, next);
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* Stream one active coding session's live frames as Server-Sent Events.
|
|
907
|
+
*
|
|
908
|
+
* Frames flow only while the run is active, so the current pending question
|
|
909
|
+
* (if any) is sent first as a `snapshot` event — a subscriber that attaches
|
|
910
|
+
* after a park still learns what is being asked. Read-only.
|
|
911
|
+
*/
|
|
912
|
+
codingAgentSessionEvents(req, res) {
|
|
913
|
+
const taskId = typeof req.query.taskId === 'string' ? req.query.taskId : '';
|
|
914
|
+
if (!taskId) {
|
|
915
|
+
res.status(400).json({ error: 'A `taskId` query parameter is required.' });
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
res.setHeader('Content-Type', 'text/event-stream');
|
|
919
|
+
res.setHeader('Cache-Control', 'no-cache, no-transform');
|
|
920
|
+
res.setHeader('Connection', 'keep-alive');
|
|
921
|
+
res.flushHeaders?.();
|
|
922
|
+
const send = (event, data) => {
|
|
923
|
+
res.write(`event: ${event}\ndata: ${JSON.stringify(data)}\n\n`);
|
|
924
|
+
};
|
|
925
|
+
// The pending question up front, so a late subscriber is not blind to a park
|
|
926
|
+
// that already happened.
|
|
927
|
+
const pending = this.codingAgentDispatchService.listPendingCodingQuestions().find((q) => q.taskId === taskId);
|
|
928
|
+
send('snapshot', { pendingQuestion: pending ?? null });
|
|
929
|
+
const unsubscribe = this.codingAgentDispatchService.subscribeToCodingSession(taskId, (frame) => {
|
|
930
|
+
send(frame.channel, frame.payload);
|
|
931
|
+
});
|
|
932
|
+
// A heartbeat keeps intermediaries from closing an idle stream during a long
|
|
933
|
+
// quiet stretch of a run.
|
|
934
|
+
const heartbeat = setInterval(() => res.write(': keep-alive\n\n'), 15_000);
|
|
935
|
+
heartbeat.unref?.();
|
|
936
|
+
req.on('close', () => {
|
|
937
|
+
clearInterval(heartbeat);
|
|
938
|
+
unsubscribe();
|
|
939
|
+
});
|
|
940
|
+
}
|
|
831
941
|
/**
|
|
832
942
|
* What is running, and what died leaving something resumable.
|
|
833
943
|
*
|
|
@@ -855,6 +965,125 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
855
965
|
this.jsonError(res, e, next);
|
|
856
966
|
}
|
|
857
967
|
}
|
|
968
|
+
/**
|
|
969
|
+
* `GET /playbooks/suspended` — what is waiting for an answer, independent of who asked.
|
|
970
|
+
*
|
|
971
|
+
* The read that makes a suspension survivable. A run that stops at a clarification answers 200 with
|
|
972
|
+
* its `runId`, and until this existed that response was the ONLY place the id lived: reload the
|
|
973
|
+
* page and the run stayed suspended on disk with nobody able to name it. A resume affordance can
|
|
974
|
+
* now be rebuilt from server state rather than from the browser's memory of one response.
|
|
975
|
+
*/
|
|
976
|
+
async readSuspendedPlaybookRuns(_req, res, next) {
|
|
977
|
+
try {
|
|
978
|
+
this.jsonSuccess(res, await this.playbookRunService.readSuspendedRuns());
|
|
979
|
+
}
|
|
980
|
+
catch (e) {
|
|
981
|
+
this.jsonError(res, e, next);
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
/**
|
|
985
|
+
* `GET /compliance/governance-questions` — what a person still has to decide.
|
|
986
|
+
*
|
|
987
|
+
* `definitionRef` may repeat, and an unknown one yields nothing rather than 404: the composer treats
|
|
988
|
+
* an unknown document as "no such document", and a host loading several refs should not lose the
|
|
989
|
+
* ones that exist because one was mistyped.
|
|
990
|
+
*/
|
|
991
|
+
async readGovernanceQuestions(req, res, next) {
|
|
992
|
+
try {
|
|
993
|
+
const raw = req.query.definitionRef;
|
|
994
|
+
const definitionRefs = raw === undefined ? undefined : (Array.isArray(raw) ? raw : [raw]).map(String);
|
|
995
|
+
this.jsonSuccess(res, { questionnaires: composeGovernanceQuestionnaires(definitionRefs) });
|
|
996
|
+
}
|
|
997
|
+
catch (e) {
|
|
998
|
+
this.jsonError(res, e, next);
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* `POST /compliance/governance-facts` — the answers to the questions above, as a FILE.
|
|
1003
|
+
*
|
|
1004
|
+
* The write half of #192. It lands `document-facts-authored`, never `document-facts`: every question
|
|
1005
|
+
* the questionnaire asks carries a human authority, and the derived family refuses those by type.
|
|
1006
|
+
*
|
|
1007
|
+
* It does NOT commit. The landed file is a working edit until a human commits it
|
|
1008
|
+
* (`.claude/rules/one-source-of-truth.md`, rules 2 and 3) — this endpoint accepts nothing.
|
|
1009
|
+
*
|
|
1010
|
+
* `?dryRun=1` runs the whole pipe and writes nothing, which is how a host previews what an answer set
|
|
1011
|
+
* would produce before a person commits to it.
|
|
1012
|
+
*/
|
|
1013
|
+
async landGovernanceFacts(req, res, next) {
|
|
1014
|
+
try {
|
|
1015
|
+
const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;
|
|
1016
|
+
if (!specificationsPackageRoot) {
|
|
1017
|
+
/*
|
|
1018
|
+
* `next(...)`, never `throw`. Thrown here it lands in this method's OWN catch, goes through
|
|
1019
|
+
* `jsonError` → `buildFromStandardError`, and is reclassified INTERNAL with its message
|
|
1020
|
+
* sanitized to the literal "internal" — so a deliberate, well-worded refusal would answer 500
|
|
1021
|
+
* saying nothing. Found by making a test double reproduce the real sanitization rather than
|
|
1022
|
+
* passing errors through.
|
|
1023
|
+
*/
|
|
1024
|
+
next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
1025
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1026
|
+
context: { message: 'This application has no resolved specifications package, so there is nowhere to land the facts.' },
|
|
1027
|
+
}));
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
/*
|
|
1031
|
+
* The ENVELOPE only — see the schema's own note. The answer SEMANTICS stay with the service
|
|
1032
|
+
* that owns the question catalog; this refuses a body that is not a request at all, which
|
|
1033
|
+
* previously reached the service and threw a `TypeError` reported as a 500.
|
|
1034
|
+
*
|
|
1035
|
+
* `safeParse` and `next(...)`, never `.parse()`. A thrown `ZodError` lands in this method's own
|
|
1036
|
+
* catch and goes out through the generic path as INTERNAL with its message sanitized to
|
|
1037
|
+
* "internal" — the SAME 500-saying-nothing this guard exists to remove, so parsing strictly and
|
|
1038
|
+
* throwing would have moved the defect rather than fixed it. Caught by mutating the guard away
|
|
1039
|
+
* and watching the pin stay green.
|
|
1040
|
+
*/
|
|
1041
|
+
const parsed = CompanionLandGovernanceFactsRequestSchema.safeParse(req.body ?? {});
|
|
1042
|
+
if (!parsed.success) {
|
|
1043
|
+
next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
1044
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1045
|
+
context: {
|
|
1046
|
+
message: 'This is not a governance-fact landing request: '
|
|
1047
|
+
+ parsed.error.issues.map((issue) => `${issue.path.join('.') || '(root)'} ${issue.message}`).join('; '),
|
|
1048
|
+
},
|
|
1049
|
+
}));
|
|
1050
|
+
return;
|
|
1051
|
+
}
|
|
1052
|
+
const payload = parsed.data;
|
|
1053
|
+
const result = await landGovernanceFactDeclarations({
|
|
1054
|
+
specificationsPackageRoot,
|
|
1055
|
+
// NEUTRAL BY CONTRACT (issue #65), same as every other landed constant — app identity lives in
|
|
1056
|
+
// VALUES, never in the names of landed exports.
|
|
1057
|
+
constantPrefix: 'application',
|
|
1058
|
+
answers: payload,
|
|
1059
|
+
...(req.query.dryRun === undefined ? {} : { dryRun: true }),
|
|
1060
|
+
});
|
|
1061
|
+
this.jsonSuccess(res, result);
|
|
1062
|
+
}
|
|
1063
|
+
catch (e) {
|
|
1064
|
+
/*
|
|
1065
|
+
* A refusal on the ANSWERS is a BAD REQUEST, and it must arrive with its message intact.
|
|
1066
|
+
*
|
|
1067
|
+
* Every `GovernanceQuestionnaireError` names what the person got wrong — an unanswered
|
|
1068
|
+
* question, a review with no reviewer, "does not apply" on a question that does not offer it —
|
|
1069
|
+
* and those sentences are the whole product of that boundary. Left to `jsonError` they are
|
|
1070
|
+
* classified INTERNAL and SANITIZED to the literal string "internal", so the caller gets a 500
|
|
1071
|
+
* that says nothing. Measured against the live companion on 2026-09-03, minutes after the
|
|
1072
|
+
* route shipped: `POST` with an empty body answered `{"type":"INTERNAL","message":"internal"}`.
|
|
1073
|
+
*
|
|
1074
|
+
* Same treatment as `PlaybookElicitationError` below, and for the same reason: a malformed
|
|
1075
|
+
* interview is something the caller must change, never something that went wrong here.
|
|
1076
|
+
*/
|
|
1077
|
+
if (e instanceof GovernanceQuestionnaireError) {
|
|
1078
|
+
next(this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
1079
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
1080
|
+
context: { message: e.message },
|
|
1081
|
+
}));
|
|
1082
|
+
return;
|
|
1083
|
+
}
|
|
1084
|
+
this.jsonError(res, e, next);
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
858
1087
|
async codingAgentStatus(_req, res, next) {
|
|
859
1088
|
try {
|
|
860
1089
|
this.jsonSuccess(res, this.codingAgentDispatchService.getStatus());
|
|
@@ -1100,6 +1329,21 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
1100
1329
|
return result.error?.name === 'ZodError'
|
|
1101
1330
|
|| result.error?.name === SPECIFICATION_CONTEXT_VALIDATION_ERROR_NAME;
|
|
1102
1331
|
}
|
|
1332
|
+
/**
|
|
1333
|
+
* `GET /_meta/introspect/behaviors` — the live-context MENU (`wildo context list`, issue #252).
|
|
1334
|
+
*
|
|
1335
|
+
* Pure catalog read, no subprocess: what this running companion can answer, plus the service keys a
|
|
1336
|
+
* `POST /_meta/introspect` caller may target and the resolved default backend key so the caller never
|
|
1337
|
+
* re-derives the "first backend service" rule.
|
|
1338
|
+
*/
|
|
1339
|
+
listIntrospectionBehaviors(_req, res, next) {
|
|
1340
|
+
try {
|
|
1341
|
+
res.json(this.companionIntrospectionService.describeCatalog());
|
|
1342
|
+
}
|
|
1343
|
+
catch (error) {
|
|
1344
|
+
next(error);
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1103
1347
|
async requestIntrospection(req, res, next) {
|
|
1104
1348
|
const traceStep = this.createTraceStep(res, 'meta-introspection', 'request-introspection');
|
|
1105
1349
|
let mappedFailureAlreadyTraced = false;
|
|
@@ -1217,7 +1461,11 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
1217
1461
|
context: { message: '`objective` is required and must be a string.' },
|
|
1218
1462
|
});
|
|
1219
1463
|
}
|
|
1220
|
-
const
|
|
1464
|
+
const evidenceScope = (req.body ?? {}).evidenceScope;
|
|
1465
|
+
const result = await this.researchAgentDispatchService.runResearchTask({
|
|
1466
|
+
objective,
|
|
1467
|
+
...(typeof evidenceScope === 'string' && evidenceScope.length > 0 ? { evidenceScope } : {}),
|
|
1468
|
+
});
|
|
1221
1469
|
// The whole result, including the permission decisions: a thin answer has two very different
|
|
1222
1470
|
// causes — little was found, or a tool was refused — and the prose alone cannot tell them apart.
|
|
1223
1471
|
res.json(result);
|
|
@@ -1546,6 +1794,21 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
1546
1794
|
* Deterministic and side-effect-free: it reads the working tree and answers what can run now. This is
|
|
1547
1795
|
* the gate a model may choose WITHIN and can never widen.
|
|
1548
1796
|
*/
|
|
1797
|
+
/**
|
|
1798
|
+
* The creation board's explicit Refresh (bridge window, `workbench-creation-board-resources.md`
|
|
1799
|
+
* Phase 2): busts the eligibility cache the resource lane serves from, so the re-LIST that
|
|
1800
|
+
* follows recomputes. Answers `{invalidated: true}` rather than recomputing inline — the ~10s
|
|
1801
|
+
* cost belongs to the read that wants it.
|
|
1802
|
+
*/
|
|
1803
|
+
async refreshPlaybookBoard(_req, res, next) {
|
|
1804
|
+
try {
|
|
1805
|
+
this.creationPlaneProjection.invalidateEligibility();
|
|
1806
|
+
res.json({ invalidated: true });
|
|
1807
|
+
}
|
|
1808
|
+
catch (error) {
|
|
1809
|
+
next(error);
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1549
1812
|
async listPlaybooks(_req, res, next) {
|
|
1550
1813
|
try {
|
|
1551
1814
|
const board = await this.playbookRunService.listPlaybookEligibility();
|
|
@@ -1578,13 +1841,24 @@ let CompanionController = class CompanionController extends AbstractControllerBa
|
|
|
1578
1841
|
const creatorBrief = typeof body.creatorBrief === 'string' ? body.creatorBrief : undefined;
|
|
1579
1842
|
const elicitationAnswers = this.readElicitationAnswers(body.elicitationAnswers);
|
|
1580
1843
|
const dryRun = body.dryRun === true;
|
|
1581
|
-
const
|
|
1844
|
+
const runInput = {
|
|
1582
1845
|
playbookRef,
|
|
1583
1846
|
...(res.locals.companionTraceSession ? { session: res.locals.companionTraceSession } : {}),
|
|
1584
1847
|
...(creatorBrief ? { creatorBrief } : {}),
|
|
1585
1848
|
...(elicitationAnswers ? { elicitationAnswers } : {}),
|
|
1586
1849
|
...(dryRun ? { dryRun: true } : {}),
|
|
1587
|
-
}
|
|
1850
|
+
};
|
|
1851
|
+
/*
|
|
1852
|
+
* `async: true` returns at SUBMISSION (#265): the synchronous shape holds one request open for
|
|
1853
|
+
* the run's life, and the server's 30-minute ceiling is shorter than a choreography's own
|
|
1854
|
+
* bound — the connection died at exactly 1800s twice while the run completed server-side. The
|
|
1855
|
+
* outcome (success OR failure) lands in GET /playbooks/runs `lastCompleted`.
|
|
1856
|
+
*/
|
|
1857
|
+
if (body.async === true) {
|
|
1858
|
+
res.status(202).json(this.playbookRunService.submitPlaybookRunDetached(runInput));
|
|
1859
|
+
return;
|
|
1860
|
+
}
|
|
1861
|
+
const result = await this.playbookRunService.runPlaybook(runInput);
|
|
1588
1862
|
if ('status' in result) {
|
|
1589
1863
|
// 200, not an error status: the run is HEALTHY and waiting. The creator answers through
|
|
1590
1864
|
// POST /playbooks/runs/:runId/resume, which is the industry three-action model
|
|
@@ -2227,19 +2501,20 @@ CompanionController = __decorate([
|
|
|
2227
2501
|
__param(8, inject(COMPANION_SERVICE_TYPES.EmailTemplateService)),
|
|
2228
2502
|
__param(9, inject(COMPANION_SERVICE_TYPES.MarketGenerationService)),
|
|
2229
2503
|
__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.
|
|
2504
|
+
__param(11, inject(COMPANION_SERVICE_TYPES.CreationPlaneProjectionService)),
|
|
2505
|
+
__param(12, inject(COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService)),
|
|
2506
|
+
__param(13, inject(COMPANION_SERVICE_TYPES.ExecutionTraceReadService)),
|
|
2507
|
+
__param(14, inject(COMPANION_SERVICE_TYPES.LogoGenerationService)),
|
|
2508
|
+
__param(15, inject(COMPANION_SERVICE_TYPES.LogoDeliberationService)),
|
|
2509
|
+
__param(16, inject(COMPANION_SERVICE_TYPES.BrandAcceptService)),
|
|
2510
|
+
__param(17, inject(COMPANION_SERVICE_TYPES.ExpertPersonaService)),
|
|
2511
|
+
__param(18, inject(COMPANION_SERVICE_TYPES.DeliberationService)),
|
|
2512
|
+
__param(19, inject(COMPANION_SERVICE_TYPES.TechnicalDocService)),
|
|
2513
|
+
__param(20, inject(COMPANION_SERVICE_TYPES.IntrospectionService)),
|
|
2514
|
+
__param(21, inject(COMPANION_SERVICE_TYPES.ExecutionsService)),
|
|
2515
|
+
__param(22, inject(COMPANION_SERVICE_TYPES.TraceabilityService)),
|
|
2516
|
+
__param(23, inject(COMPANION_SERVICE_TYPES.CodingAgentDispatchService)),
|
|
2517
|
+
__param(24, inject(COMPANION_SERVICE_TYPES.ResearchAgentDispatchService)),
|
|
2243
2518
|
__metadata("design:paramtypes", [LoggerService,
|
|
2244
2519
|
ErrorBuilderBackendService,
|
|
2245
2520
|
ErrorHandlerService, Object, LabellingPlannerCompanionService,
|
|
@@ -2249,6 +2524,7 @@ CompanionController = __decorate([
|
|
|
2249
2524
|
EmailTemplateCompanionService,
|
|
2250
2525
|
MarketGenerationCompanionService,
|
|
2251
2526
|
PlaybookRunCompanionService,
|
|
2527
|
+
CreationPlaneProjectionCompanionService,
|
|
2252
2528
|
ApplicationBuildDispatchCompanionService,
|
|
2253
2529
|
ExecutionTraceReadCompanionService,
|
|
2254
2530
|
LogoGenerationCompanionService,
|