@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
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { WorkbenchBuildPlanTaskStatus } from '@wildo-ai/platform-core-shared';
|
|
1
2
|
import type { LoggerService } from '@wildo-ai/saas-backend-lib';
|
|
2
3
|
import type { CompanionContext } from '../../core/context/companion-context';
|
|
3
|
-
import {
|
|
4
|
-
import type
|
|
4
|
+
import { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';
|
|
5
|
+
import { CodingAgentDispatchCompanionService, type ParkedCodingSessionState } from '../../claude-cli/services/coding-agent-dispatch.companion.service';
|
|
6
|
+
import { type ApplicationCodingTaskRunAdmission } from '../../claude-cli/models/coding-agent-dispatch.models';
|
|
5
7
|
import { GitChangeSetCompanionService } from '../../claude-cli/services/git-change-set.companion.service';
|
|
6
8
|
import type { CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';
|
|
7
9
|
import { ApplicationBuildGenerationStepCompanionService, type ApplicationBuildGenerationStepRunResult } from './application-build-generation-step.companion.service';
|
|
@@ -77,8 +79,9 @@ export declare class ApplicationBuildDispatchCompanionService {
|
|
|
77
79
|
private readonly dispatch;
|
|
78
80
|
private readonly git;
|
|
79
81
|
private readonly generationSteps;
|
|
82
|
+
private readonly introspection;
|
|
80
83
|
private readonly logDebug;
|
|
81
|
-
constructor(logger: LoggerService, companionContext: CompanionContext, dispatch: CodingAgentDispatchCompanionService, git: GitChangeSetCompanionService, generationSteps: ApplicationBuildGenerationStepCompanionService);
|
|
84
|
+
constructor(logger: LoggerService, companionContext: CompanionContext, dispatch: CodingAgentDispatchCompanionService, git: GitChangeSetCompanionService, generationSteps: ApplicationBuildGenerationStepCompanionService, introspection: CompanionIntrospectionService);
|
|
82
85
|
/** What the next run would be, without running it. Pure read — nothing is locked, created or started. */
|
|
83
86
|
describeNextBuildTask(input?: {
|
|
84
87
|
readonly maximumTokenBudget?: number;
|
|
@@ -91,6 +94,23 @@ export declare class ApplicationBuildDispatchCompanionService {
|
|
|
91
94
|
dispatchNextBuildTask(input?: {
|
|
92
95
|
readonly maximumTokenBudget?: number;
|
|
93
96
|
}, session?: CompanionExecutionSessionContext): Promise<ApplicationBuildDispatchResult>;
|
|
97
|
+
/**
|
|
98
|
+
* Reconstruct the answerable state for a parked coding task whose IN-PROCESS
|
|
99
|
+
* state was lost to a companion restart, by RE-SELECTING it from the build plan.
|
|
100
|
+
*
|
|
101
|
+
* The durable row still names its build-plan `taskRef` and carries the persisted
|
|
102
|
+
* `suspension`; from those this re-composes the same bounded contract (mutation
|
|
103
|
+
* scope + verification plan come from the task and its coding policy, unchanged
|
|
104
|
+
* by a restart) against a DETERMINISTIC self-description context — the resume
|
|
105
|
+
* discards context anyway, since the agent's persisted session holds the real
|
|
106
|
+
* one. A fresh baseline is captured for the change-set the resume will produce.
|
|
107
|
+
*
|
|
108
|
+
* Returns `null` when the task cannot be answered this way: not a parked coding
|
|
109
|
+
* row, the agent does not support resume, the build task no longer exists, or it
|
|
110
|
+
* is not a coding target. The caller then refuses rather than starting an
|
|
111
|
+
* unrelated or unbounded run.
|
|
112
|
+
*/
|
|
113
|
+
reconstructParkedCodingTaskForResume(taskId: string, sessionContext?: CompanionExecutionSessionContext): Promise<ParkedCodingSessionState | null>;
|
|
94
114
|
private prepareNextBuildTask;
|
|
95
115
|
/**
|
|
96
116
|
* Which tasks have landed, read from GIT.
|
|
@@ -113,16 +133,69 @@ export declare class ApplicationBuildDispatchCompanionService {
|
|
|
113
133
|
readonly totalTasks: number;
|
|
114
134
|
readonly landedTasks: number;
|
|
115
135
|
} | undefined>;
|
|
136
|
+
/**
|
|
137
|
+
* Every build-plan task in the DISPATCH view — the creation board's `workbenchBuildPlanTasks`
|
|
138
|
+
* rows (`workbench-creation-board-resources.md`, Phase 2).
|
|
139
|
+
*
|
|
140
|
+
* `status` is computed per read, never stored: `landed` = the task's evidence paths are all
|
|
141
|
+
* committed (the same resolution the dispatcher itself selects by), `ready` = every prerequisite
|
|
142
|
+
* landed and it has not, `blocked` = otherwise. Exactly one holds.
|
|
143
|
+
*
|
|
144
|
+
* An application with NO authored build plan answers ZERO TASKS rather than throwing: the plan
|
|
145
|
+
* file legitimately does not exist until build-decompose runs, so "nothing there yet" is the
|
|
146
|
+
* true answer. Absence is tested DIRECTLY (the exports carry no `buildPlanSpecification`) rather
|
|
147
|
+
* than by catching `ApplicationBuildPlanUnavailableError`, because `readBuildPlan` throws that
|
|
148
|
+
* SAME class for a plan that exists and fails schema or semantic validation — and flattening an
|
|
149
|
+
* invalid plan into an empty board would be "could not look" wearing "nothing there".
|
|
150
|
+
*/
|
|
151
|
+
describeBuildPlanBoard(): Promise<readonly {
|
|
152
|
+
readonly taskRef: string;
|
|
153
|
+
readonly objective: string;
|
|
154
|
+
readonly targetKind: string;
|
|
155
|
+
readonly functionalTopic: string;
|
|
156
|
+
readonly status: WorkbenchBuildPlanTaskStatus;
|
|
157
|
+
readonly prerequisiteTaskRefs: readonly string[];
|
|
158
|
+
}[]>;
|
|
116
159
|
private resolveLandedTaskRefs;
|
|
117
160
|
/** The application's accepted build plan, validated before anything is selected from it. */
|
|
118
161
|
private readBuildPlan;
|
|
119
162
|
/**
|
|
120
|
-
* What the run is allowed to see.
|
|
163
|
+
* What the run is allowed to see — the PUSH floor of the dispatch lane's context (issue #253).
|
|
164
|
+
*
|
|
165
|
+
* Widened 2026-09-02 from "the task itself and nothing else yet" to the lean mandatory core the
|
|
166
|
+
* epic's re-analysis decided, and deliberately no further: everything an agent might need beyond
|
|
167
|
+
* its target's blast radius is the PULL door's job (`wildo context …`, issue #252), which the
|
|
168
|
+
* `live-queries` source below points at. Anticipating everything here would be the planner trap
|
|
169
|
+
* (#254) re-entering through the push door. Everything is model-safe by construction — the
|
|
170
|
+
* application's own accepted build plan, its own live registry, its own domain plan — and the
|
|
171
|
+
* contract's composer re-asserts `SAFE_FOR_MODEL` on every source regardless.
|
|
172
|
+
*
|
|
173
|
+
* ## Failure posture: best-effort on the derived sources, deliberately
|
|
174
|
+
*
|
|
175
|
+
* The playbook lane's workspace-truth section fails CLOSED, because a tool-less planner with no
|
|
176
|
+
* workspace truth invents module ids. A CODING agent is the opposite case on both counts: it has
|
|
177
|
+
* tools (it can read the tree, and the door), so a missing derived source degrades speed rather
|
|
178
|
+
* than truth — while refusing the dispatch because a subprocess hiccuped would block the build on
|
|
179
|
+
* context the run could recover for itself. So: the TASK is always present, the derived sources
|
|
180
|
+
* are added when their reads succeed, and a failed read is a WARN naming what was omitted.
|
|
181
|
+
*
|
|
182
|
+
* ## No new cache, verified rather than assumed
|
|
183
|
+
*
|
|
184
|
+
* The re-analysis asked for the introspection read to be cached across a 55-task plan. It already
|
|
185
|
+
* is: `CompanionIntrospectionService.requestInfo` carries its own source-state derivation cache,
|
|
186
|
+
* keyed on the observed workspace state — asking again after nothing changed is a cache hit, and
|
|
187
|
+
* a landed task invalidates it by changing the sources it hashes. Adding a second cache here would
|
|
188
|
+
* be a copy that can only ever disagree.
|
|
189
|
+
*/
|
|
190
|
+
/**
|
|
191
|
+
* The task's own DETERMINISTIC self-description — no introspection, no LLM.
|
|
121
192
|
*
|
|
122
|
-
* The
|
|
123
|
-
*
|
|
124
|
-
*
|
|
193
|
+
* The first (and mandatory) context source of every coding task, extracted so
|
|
194
|
+
* a RESUME can rebuild a schema-valid contract without re-running the expensive
|
|
195
|
+
* live-query / module-introspection assembly whose output a resume discards
|
|
196
|
+
* anyway (the agent's session already holds the real context).
|
|
125
197
|
*/
|
|
198
|
+
private buildTaskSelfDescriptionContextSource;
|
|
126
199
|
private buildContextSources;
|
|
127
200
|
}
|
|
128
201
|
//# sourceMappingURL=application-build-dispatch.companion.service.d.ts.map
|
package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-build-dispatch.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/application-build-dispatch.companion.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"application-build-dispatch.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/application-build-dispatch.companion.service.ts"],"names":[],"mappings":"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"}
|
|
@@ -11,13 +11,17 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
import { inject, injectable } from 'inversify';
|
|
14
|
-
import {
|
|
14
|
+
import { WorkbenchBuildPlanTaskStatus } from '@wildo-ai/platform-core-shared';
|
|
15
|
+
import { composeBuildTaskCodingContract, slugifyRegistryIdentifier, } from '@wildo-ai/application-creation-runtime';
|
|
15
16
|
import { SAAS_SERVICE_TYPES } from '@wildo-ai/saas-backend-lib';
|
|
16
17
|
import { MetaWorkflow_ContextSourceRole } from '@wildo-ai/saas-models/meta-workflows';
|
|
17
18
|
import { BuildPlanTaskGraphSchema, BuildPlanTaskTargetKind, selectReadyBuildPlanTasks, validateBuildPlanTaskGraph, } from '@wildo-ai/saas-specifications/application-creation';
|
|
18
19
|
import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types.js';
|
|
20
|
+
import { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service.js';
|
|
19
21
|
import { loadSpecificationsCompanionExports } from '../../core/context/companion-package-loaders.companion.js';
|
|
20
|
-
import {
|
|
22
|
+
import { waitForDevCompileQuiet } from '../../core/runtime/dev-compile-quiet.companion.js';
|
|
23
|
+
import { CodingAgentDispatchCompanionService, } from '../../claude-cli/services/coding-agent-dispatch.companion.service.js';
|
|
24
|
+
import { resolveApplicationCodingTaskVerificationPlans, } from '../../claude-cli/models/coding-agent-dispatch.models.js';
|
|
21
25
|
import { GitChangeSetCompanionService } from '../../claude-cli/services/git-change-set.companion.service.js';
|
|
22
26
|
import { ApplicationBuildGenerationStepCompanionService, } from './application-build-generation-step.companion.service.js';
|
|
23
27
|
import { resolveBuildPlanTaskCodingPolicy, resolveBuildTaskLandedEvidencePaths, } from './application-build-task-coding-policy.companion.service.js';
|
|
@@ -64,13 +68,15 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
|
|
|
64
68
|
dispatch;
|
|
65
69
|
git;
|
|
66
70
|
generationSteps;
|
|
71
|
+
introspection;
|
|
67
72
|
logDebug;
|
|
68
|
-
constructor(logger, companionContext, dispatch, git, generationSteps) {
|
|
73
|
+
constructor(logger, companionContext, dispatch, git, generationSteps, introspection) {
|
|
69
74
|
this.logger = logger;
|
|
70
75
|
this.companionContext = companionContext;
|
|
71
76
|
this.dispatch = dispatch;
|
|
72
77
|
this.git = git;
|
|
73
78
|
this.generationSteps = generationSteps;
|
|
79
|
+
this.introspection = introspection;
|
|
74
80
|
this.logDebug = this.logger.debugByType('ApplicationBuildDispatchCompanionService');
|
|
75
81
|
}
|
|
76
82
|
/** What the next run would be, without running it. Pure read — nothing is locked, created or started. */
|
|
@@ -96,9 +102,75 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
|
|
|
96
102
|
taskRef: prepared.plan.taskRef,
|
|
97
103
|
allowedPathPrefixes: prepared.plan.allowedPathPrefixes,
|
|
98
104
|
});
|
|
105
|
+
/*
|
|
106
|
+
* The churn gate, and deliberately NOT the retry (#265): a coding turn MUTATES the workspace, so
|
|
107
|
+
* a kill mid-turn leaves a change-set the attribution machinery must reconcile — re-dispatching
|
|
108
|
+
* blind on top of that is how two half-runs interleave. The gate raises the odds the turn never
|
|
109
|
+
* meets the respawn; a killed coding run stays what it is today, a visibly aborted task an
|
|
110
|
+
* operator re-dispatches deliberately.
|
|
111
|
+
*/
|
|
112
|
+
await waitForDevCompileQuiet({
|
|
113
|
+
frameworkRepositoryRoot: this.companionContext.resolvedHomes.framework.repositoryRoot,
|
|
114
|
+
log: (message, context) => this.logDebug(message, { taskRef: prepared.plan.taskRef, ...context }),
|
|
115
|
+
});
|
|
99
116
|
const admission = await this.dispatch.runApplicationCodingTask(prepared.contract);
|
|
100
117
|
return { plan: prepared.plan, admission };
|
|
101
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Reconstruct the answerable state for a parked coding task whose IN-PROCESS
|
|
121
|
+
* state was lost to a companion restart, by RE-SELECTING it from the build plan.
|
|
122
|
+
*
|
|
123
|
+
* The durable row still names its build-plan `taskRef` and carries the persisted
|
|
124
|
+
* `suspension`; from those this re-composes the same bounded contract (mutation
|
|
125
|
+
* scope + verification plan come from the task and its coding policy, unchanged
|
|
126
|
+
* by a restart) against a DETERMINISTIC self-description context — the resume
|
|
127
|
+
* discards context anyway, since the agent's persisted session holds the real
|
|
128
|
+
* one. A fresh baseline is captured for the change-set the resume will produce.
|
|
129
|
+
*
|
|
130
|
+
* Returns `null` when the task cannot be answered this way: not a parked coding
|
|
131
|
+
* row, the agent does not support resume, the build task no longer exists, or it
|
|
132
|
+
* is not a coding target. The caller then refuses rather than starting an
|
|
133
|
+
* unrelated or unbounded run.
|
|
134
|
+
*/
|
|
135
|
+
async reconstructParkedCodingTaskForResume(taskId, sessionContext) {
|
|
136
|
+
const meta = await this.dispatch.loadPersistedParkedCodingTask(taskId, sessionContext);
|
|
137
|
+
if (!meta || !meta.suspension.resumable)
|
|
138
|
+
return null;
|
|
139
|
+
const graph = await this.readBuildPlan();
|
|
140
|
+
const task = graph.tasks.find((entry) => entry.taskRef === meta.taskRef);
|
|
141
|
+
if (!task || task.target === undefined || task.target.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
let contract;
|
|
145
|
+
try {
|
|
146
|
+
const boundary = resolveBuildPlanTaskCodingPolicy(task);
|
|
147
|
+
contract = composeBuildTaskCodingContract({
|
|
148
|
+
task,
|
|
149
|
+
boundary,
|
|
150
|
+
// The deterministic self-description only: a resume does not re-send the
|
|
151
|
+
// task prompt, so re-running the full live-query/introspection assembly
|
|
152
|
+
// would spend a model call to build context nothing reads.
|
|
153
|
+
contextSources: [this.buildTaskSelfDescriptionContextSource(task, graph.tasks.length)],
|
|
154
|
+
objectiveRef: 'application-creation:objective/build-plan',
|
|
155
|
+
maximumTokenBudget: DEFAULT_CONTEXT_TOKEN_BUDGET,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
// A task that no longer composes to a bounded run (empty scope, no checks,
|
|
160
|
+
// wrong target) is not answerable — refuse rather than resume unbounded.
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
const verificationPlans = resolveApplicationCodingTaskVerificationPlans(contract.verificationIntent.requiredChecks);
|
|
164
|
+
const baseline = await this.git.captureWorktreeSnapshot();
|
|
165
|
+
return {
|
|
166
|
+
durableTask: meta.durableTask,
|
|
167
|
+
task: contract,
|
|
168
|
+
verificationPlans,
|
|
169
|
+
baseline,
|
|
170
|
+
suspension: meta.suspension,
|
|
171
|
+
parkedAt: new Date().toISOString(),
|
|
172
|
+
};
|
|
173
|
+
}
|
|
102
174
|
async prepareNextBuildTask(input) {
|
|
103
175
|
const graph = await this.readBuildPlan();
|
|
104
176
|
const landedTaskRefs = await this.resolveLandedTaskRefs(graph.tasks);
|
|
@@ -139,7 +211,7 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
|
|
|
139
211
|
const contract = composeBuildTaskCodingContract({
|
|
140
212
|
task,
|
|
141
213
|
boundary,
|
|
142
|
-
contextSources: this.buildContextSources(task, graph.tasks.length),
|
|
214
|
+
contextSources: await this.buildContextSources(task, graph.tasks.length),
|
|
143
215
|
objectiveRef: 'application-creation:objective/build-plan',
|
|
144
216
|
maximumTokenBudget: input.maximumTokenBudget ?? DEFAULT_CONTEXT_TOKEN_BUDGET,
|
|
145
217
|
});
|
|
@@ -184,6 +256,40 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
|
|
|
184
256
|
const landed = await this.resolveLandedTaskRefs(plan.tasks);
|
|
185
257
|
return { totalTasks: plan.tasks.length, landedTasks: landed.size };
|
|
186
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* Every build-plan task in the DISPATCH view — the creation board's `workbenchBuildPlanTasks`
|
|
261
|
+
* rows (`workbench-creation-board-resources.md`, Phase 2).
|
|
262
|
+
*
|
|
263
|
+
* `status` is computed per read, never stored: `landed` = the task's evidence paths are all
|
|
264
|
+
* committed (the same resolution the dispatcher itself selects by), `ready` = every prerequisite
|
|
265
|
+
* landed and it has not, `blocked` = otherwise. Exactly one holds.
|
|
266
|
+
*
|
|
267
|
+
* An application with NO authored build plan answers ZERO TASKS rather than throwing: the plan
|
|
268
|
+
* file legitimately does not exist until build-decompose runs, so "nothing there yet" is the
|
|
269
|
+
* true answer. Absence is tested DIRECTLY (the exports carry no `buildPlanSpecification`) rather
|
|
270
|
+
* than by catching `ApplicationBuildPlanUnavailableError`, because `readBuildPlan` throws that
|
|
271
|
+
* SAME class for a plan that exists and fails schema or semantic validation — and flattening an
|
|
272
|
+
* invalid plan into an empty board would be "could not look" wearing "nothing there".
|
|
273
|
+
*/
|
|
274
|
+
async describeBuildPlanBoard() {
|
|
275
|
+
const exports = await loadSpecificationsCompanionExports(this.companionContext);
|
|
276
|
+
const authored = exports.buildPlanSpecification;
|
|
277
|
+
if (authored === undefined || authored === null)
|
|
278
|
+
return [];
|
|
279
|
+
const plan = await this.readBuildPlan();
|
|
280
|
+
const landed = await this.resolveLandedTaskRefs(plan.tasks);
|
|
281
|
+
const ready = new Set(selectReadyBuildPlanTasks(plan, landed).map((task) => task.taskRef));
|
|
282
|
+
return plan.tasks.map((task) => ({
|
|
283
|
+
taskRef: task.taskRef,
|
|
284
|
+
objective: task.objective,
|
|
285
|
+
targetKind: String(task.target?.kind ?? ''),
|
|
286
|
+
functionalTopic: String(task.functionalTopic),
|
|
287
|
+
status: landed.has(task.taskRef) ? WorkbenchBuildPlanTaskStatus.LANDED
|
|
288
|
+
: ready.has(task.taskRef) ? WorkbenchBuildPlanTaskStatus.READY
|
|
289
|
+
: WorkbenchBuildPlanTaskStatus.BLOCKED,
|
|
290
|
+
prerequisiteTaskRefs: task.prerequisiteTaskRefs,
|
|
291
|
+
}));
|
|
292
|
+
}
|
|
187
293
|
async resolveLandedTaskRefs(tasks) {
|
|
188
294
|
const landed = new Set();
|
|
189
295
|
for (const task of tasks) {
|
|
@@ -220,27 +326,156 @@ let ApplicationBuildDispatchCompanionService = class ApplicationBuildDispatchCom
|
|
|
220
326
|
return parsed.data;
|
|
221
327
|
}
|
|
222
328
|
/**
|
|
223
|
-
* What the run is allowed to see.
|
|
329
|
+
* What the run is allowed to see — the PUSH floor of the dispatch lane's context (issue #253).
|
|
330
|
+
*
|
|
331
|
+
* Widened 2026-09-02 from "the task itself and nothing else yet" to the lean mandatory core the
|
|
332
|
+
* epic's re-analysis decided, and deliberately no further: everything an agent might need beyond
|
|
333
|
+
* its target's blast radius is the PULL door's job (`wildo context …`, issue #252), which the
|
|
334
|
+
* `live-queries` source below points at. Anticipating everything here would be the planner trap
|
|
335
|
+
* (#254) re-entering through the push door. Everything is model-safe by construction — the
|
|
336
|
+
* application's own accepted build plan, its own live registry, its own domain plan — and the
|
|
337
|
+
* contract's composer re-asserts `SAFE_FOR_MODEL` on every source regardless.
|
|
338
|
+
*
|
|
339
|
+
* ## Failure posture: best-effort on the derived sources, deliberately
|
|
340
|
+
*
|
|
341
|
+
* The playbook lane's workspace-truth section fails CLOSED, because a tool-less planner with no
|
|
342
|
+
* workspace truth invents module ids. A CODING agent is the opposite case on both counts: it has
|
|
343
|
+
* tools (it can read the tree, and the door), so a missing derived source degrades speed rather
|
|
344
|
+
* than truth — while refusing the dispatch because a subprocess hiccuped would block the build on
|
|
345
|
+
* context the run could recover for itself. So: the TASK is always present, the derived sources
|
|
346
|
+
* are added when their reads succeed, and a failed read is a WARN naming what was omitted.
|
|
347
|
+
*
|
|
348
|
+
* ## No new cache, verified rather than assumed
|
|
349
|
+
*
|
|
350
|
+
* The re-analysis asked for the introspection read to be cached across a 55-task plan. It already
|
|
351
|
+
* is: `CompanionIntrospectionService.requestInfo` carries its own source-state derivation cache,
|
|
352
|
+
* keyed on the observed workspace state — asking again after nothing changed is a cache hit, and
|
|
353
|
+
* a landed task invalidates it by changing the sources it hashes. Adding a second cache here would
|
|
354
|
+
* be a copy that can only ever disagree.
|
|
355
|
+
*/
|
|
356
|
+
/**
|
|
357
|
+
* The task's own DETERMINISTIC self-description — no introspection, no LLM.
|
|
224
358
|
*
|
|
225
|
-
* The
|
|
226
|
-
*
|
|
227
|
-
*
|
|
359
|
+
* The first (and mandatory) context source of every coding task, extracted so
|
|
360
|
+
* a RESUME can rebuild a schema-valid contract without re-running the expensive
|
|
361
|
+
* live-query / module-introspection assembly whose output a resume discards
|
|
362
|
+
* anyway (the agent's session already holds the real context).
|
|
228
363
|
*/
|
|
229
|
-
|
|
230
|
-
return
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
364
|
+
buildTaskSelfDescriptionContextSource(task, totalTasks) {
|
|
365
|
+
return {
|
|
366
|
+
sourceRef: 'application-creation:context/build-task',
|
|
367
|
+
originRef: 'application-creation:origin/build-plan',
|
|
368
|
+
role: MetaWorkflow_ContextSourceRole.MANDATORY,
|
|
369
|
+
content: {
|
|
370
|
+
taskRef: task.taskRef,
|
|
371
|
+
objective: task.objective,
|
|
372
|
+
target: task.target,
|
|
373
|
+
functionalTopic: task.functionalTopic,
|
|
374
|
+
skillRefs: task.skillRefs,
|
|
375
|
+
prerequisiteTaskRefs: task.prerequisiteTaskRefs,
|
|
376
|
+
positionInPlan: `one of ${totalTasks} tasks in the application's accepted build plan`,
|
|
377
|
+
},
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
async buildContextSources(task, totalTasks) {
|
|
381
|
+
const sources = [this.buildTaskSelfDescriptionContextSource(task, totalTasks)];
|
|
382
|
+
/*
|
|
383
|
+
* The DOOR MENU — tier-0 of the pull half: the live-query ids and the two commands that expand
|
|
384
|
+
* them. Ids only, not descriptions: `wildo context list` IS the descriptions, one command away,
|
|
385
|
+
* and rendering ~27 descriptions into every dispatch prompt would spend the budget this source
|
|
386
|
+
* exists to save. Read from the same catalog the CLI menu serves, so it cannot drift from what
|
|
387
|
+
* the companion actually answers.
|
|
388
|
+
*/
|
|
389
|
+
const catalog = this.introspection.describeCatalog();
|
|
390
|
+
sources.push({
|
|
391
|
+
sourceRef: 'application-creation:context/live-queries',
|
|
392
|
+
originRef: 'application-creation:origin/dev-companion',
|
|
393
|
+
role: MetaWorkflow_ContextSourceRole.MANDATORY,
|
|
394
|
+
content: {
|
|
395
|
+
guidance: 'Live application state is one shell command away — prefer asking over re-deriving from the tree. '
|
|
396
|
+
+ '`wildo context list` prints the menu with descriptions; `wildo context info <behaviorId>` runs one query; '
|
|
397
|
+
+ '`wildo context journey` shows the creation journey; `wildo context coherence` the cross-family coherence report.',
|
|
398
|
+
behaviorIds: catalog.behaviors.map((behavior) => behavior.behaviorId),
|
|
399
|
+
},
|
|
400
|
+
});
|
|
401
|
+
const moduleRef = task.target && 'moduleRef' in task.target ? task.target.moduleRef : undefined;
|
|
402
|
+
const resourceRef = task.target && 'resourceRef' in task.target ? task.target.resourceRef : undefined;
|
|
403
|
+
// WORKSPACE TRUTH, sliced to the target: the target module's real resources and present schema
|
|
404
|
+
// fields, plus the exact list of every module id (counts stay exact — a slice that hid the
|
|
405
|
+
// population would under-report, and an agent that invents a module id dispatches a no-op).
|
|
406
|
+
try {
|
|
407
|
+
const backendServiceKey = Object.entries(this.companionContext.servicesByKey)
|
|
408
|
+
.find(([, service]) => !service.frontendType)?.[0];
|
|
409
|
+
if (backendServiceKey) {
|
|
410
|
+
const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'resources-registry' });
|
|
411
|
+
if (result.success) {
|
|
412
|
+
const snapshot = result.data;
|
|
413
|
+
const modules = snapshot.modules ?? [];
|
|
414
|
+
const targetModule = moduleRef === undefined
|
|
415
|
+
? undefined
|
|
416
|
+
: modules.find((sharedModule) => slugifyRegistryIdentifier(sharedModule.moduleId) === moduleRef);
|
|
417
|
+
sources.push({
|
|
418
|
+
sourceRef: 'application-creation:context/workspace-truth',
|
|
419
|
+
originRef: 'application-creation:origin/resources-registry-introspection',
|
|
420
|
+
role: MetaWorkflow_ContextSourceRole.MANDATORY,
|
|
421
|
+
content: {
|
|
422
|
+
allModuleIds: modules.map((sharedModule) => sharedModule.moduleId),
|
|
423
|
+
...(targetModule
|
|
424
|
+
? {
|
|
425
|
+
targetModule: {
|
|
426
|
+
moduleId: targetModule.moduleId,
|
|
427
|
+
resources: targetModule.resourceTypes.map((resourceType) => ({
|
|
428
|
+
resourceType,
|
|
429
|
+
slugRef: slugifyRegistryIdentifier(resourceType),
|
|
430
|
+
presentSchemaFields: snapshot.resourceSchemaFields?.[resourceType] ?? [],
|
|
431
|
+
})),
|
|
432
|
+
},
|
|
433
|
+
}
|
|
434
|
+
: {}),
|
|
435
|
+
note: 'A resource listed here already EXISTS as a registered skeleton — its task is enrichment, not creation. '
|
|
436
|
+
+ 'A domain-plan resource NOT listed here does not exist yet. Full registry: `wildo context info resources-registry`.',
|
|
437
|
+
},
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
this.logDebug('Workspace-truth source omitted from the dispatch context (introspection failed)', { taskRef: task.taskRef });
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
catch (error) {
|
|
446
|
+
this.logger.warn('Workspace-truth source omitted from the dispatch context', { taskRef: task.taskRef, error: String(error) });
|
|
447
|
+
}
|
|
448
|
+
// THE DOMAIN-PLAN SLICE for the target: WHAT this task's objective enriches toward, in the
|
|
449
|
+
// application's own accepted words — the module semantics and, for a relationship task, the
|
|
450
|
+
// relationship drafts touching the target. Absent plan (older app, or foundation not run) is
|
|
451
|
+
// simply absent; nothing here invents a fallback.
|
|
452
|
+
try {
|
|
453
|
+
const exports = await loadSpecificationsCompanionExports(this.companionContext);
|
|
454
|
+
const domainPlan = exports.domainPlanSpecification;
|
|
455
|
+
const planModules = domainPlan?.modules ?? [];
|
|
456
|
+
const targetPlanModule = moduleRef === undefined
|
|
457
|
+
? undefined
|
|
458
|
+
: planModules.find((planModule) => slugifyRegistryIdentifier(planModule.relatedModuleId) === moduleRef);
|
|
459
|
+
if (targetPlanModule) {
|
|
460
|
+
const moduleResourceSlugs = new Set([...(targetPlanModule.mainResources ?? []), ...(targetPlanModule.supportingResources ?? [])]
|
|
461
|
+
.map((resourceType) => slugifyRegistryIdentifier(resourceType)));
|
|
462
|
+
sources.push({
|
|
463
|
+
sourceRef: 'application-creation:context/domain-plan-slice',
|
|
464
|
+
originRef: 'application-creation:origin/domain-plan',
|
|
465
|
+
role: MetaWorkflow_ContextSourceRole.MANDATORY,
|
|
466
|
+
content: {
|
|
467
|
+
targetModule: targetPlanModule,
|
|
468
|
+
...(resourceRef !== undefined ? { targetResourceRef: resourceRef } : {}),
|
|
469
|
+
relationshipsTouchingModule: (domainPlan?.relationships ?? []).filter((relationship) => moduleResourceSlugs.has(slugifyRegistryIdentifier(relationship.sourceResourceRef))
|
|
470
|
+
|| moduleResourceSlugs.has(slugifyRegistryIdentifier(relationship.targetResourceRef))),
|
|
471
|
+
},
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
catch (error) {
|
|
476
|
+
this.logger.warn('Domain-plan slice omitted from the dispatch context', { taskRef: task.taskRef, error: String(error) });
|
|
477
|
+
}
|
|
478
|
+
return sources;
|
|
244
479
|
}
|
|
245
480
|
};
|
|
246
481
|
ApplicationBuildDispatchCompanionService = __decorate([
|
|
@@ -250,9 +485,11 @@ ApplicationBuildDispatchCompanionService = __decorate([
|
|
|
250
485
|
__param(2, inject(COMPANION_SERVICE_TYPES.CodingAgentDispatchService)),
|
|
251
486
|
__param(3, inject(COMPANION_SERVICE_TYPES.GitChangeSetService)),
|
|
252
487
|
__param(4, inject(COMPANION_SERVICE_TYPES.BuildGenerationStepService)),
|
|
488
|
+
__param(5, inject(COMPANION_SERVICE_TYPES.IntrospectionService)),
|
|
253
489
|
__metadata("design:paramtypes", [Function, Object, CodingAgentDispatchCompanionService,
|
|
254
490
|
GitChangeSetCompanionService,
|
|
255
|
-
ApplicationBuildGenerationStepCompanionService
|
|
491
|
+
ApplicationBuildGenerationStepCompanionService,
|
|
492
|
+
CompanionIntrospectionService])
|
|
256
493
|
], ApplicationBuildDispatchCompanionService);
|
|
257
494
|
export { ApplicationBuildDispatchCompanionService };
|
|
258
495
|
/** Context ceiling for one dispatch. Stated here because only the host knows what the agent can accept. */
|