@cat-factory/orchestration 0.136.0 → 0.136.1

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.
@@ -0,0 +1,209 @@
1
+ /**
2
+ * The human-gate window controllers the engine composes: the Tester / Ralph / human-test /
3
+ * visual-confirmation gates, the shared review gate, the implementation-fork decision gate and
4
+ * the PR-review gate.
5
+ *
6
+ * Extracted verbatim from the {@link ExecutionService} constructor (which had grown past the
7
+ * per-function line budget — docs/initiatives/lint-complexity-size-ratchet.md) following the
8
+ * established `RunDispatcher` controller pattern: the factory takes ONE deps object of already-
9
+ * built collaborators plus BOUND call-backs for the engine methods the controllers reach back
10
+ * into (`resolveRiskPolicy` / `dispatchIterationCap` / `clockNow`), so every closure still
11
+ * resolves through the live engine instance exactly as before. Behaviour-neutral.
12
+ */
13
+ import type { BlockRepository, Clock, ExecutionRepository, IdGenerator, WorkRunner } from '@cat-factory/kernel';
14
+ import type { AgentExecutor } from '@cat-factory/kernel';
15
+ import type { AgentContextBuilder } from './AgentContextBuilder.js';
16
+ import type { Block } from '@cat-factory/contracts';
17
+ import type { ExecutionServiceDependencies, ResolvedRunRiskPolicy } from './ExecutionService.js';
18
+ import type { RunStateMachine } from './RunStateMachine.js';
19
+ import type { StepGraph } from './StepGraph.js';
20
+ import { TesterController } from './TesterController.js';
21
+ import { RalphController } from './RalphController.js';
22
+ import { HumanTestController } from './HumanTestController.js';
23
+ import { VisualConfirmationController } from './VisualConfirmationController.js';
24
+ import { ReviewGateController, type ReviewGateControllerDeps } from './ReviewGateController.js';
25
+ import { ForkDecisionController } from './ForkDecisionController.js';
26
+ import { PrReviewController } from './PrReviewController.js';
27
+ import { InitiativeInterviewController } from './InitiativeInterviewController.js';
28
+ import { DocInterviewController } from './DocInterviewController.js';
29
+ /**
30
+ * The already-built collaborators + bound engine call-backs {@link buildGateWindowControllers}
31
+ * needs. Every field is the SAME value the constructor used inline; the three call-backs are
32
+ * bound to the live {@link ExecutionService}, so they resolve against its state at call time.
33
+ */
34
+ export interface GateWindowControllerDeps {
35
+ blockRepository: BlockRepository;
36
+ executionRepository: ExecutionRepository;
37
+ workRunner: WorkRunner;
38
+ agentExecutor: AgentExecutor;
39
+ contextBuilder: AgentContextBuilder;
40
+ stateMachine: RunStateMachine;
41
+ stepGraph: StepGraph;
42
+ idGenerator: IdGenerator;
43
+ clock: Clock;
44
+ /** The engine clock's `now()`, bound (gate verdicts are stamped with it). */
45
+ clockNow: () => number;
46
+ resolveRiskPolicy: (workspaceId: string, block: Block) => Promise<ResolvedRunRiskPolicy>;
47
+ dispatchIterationCap: ReviewGateControllerDeps['dispatchIterationCap'];
48
+ notificationService: ExecutionServiceDependencies['notificationService'];
49
+ testerQualityReviewer: ExecutionServiceDependencies['testerQualityReviewer'];
50
+ environmentProvisioning: ExecutionServiceDependencies['environmentProvisioning'];
51
+ environmentTeardown: ExecutionServiceDependencies['environmentTeardown'];
52
+ branchUpdater: ExecutionServiceDependencies['branchUpdater'];
53
+ resolveBinaryArtifactStore: ExecutionServiceDependencies['resolveBinaryArtifactStore'];
54
+ forkChatService: ExecutionServiceDependencies['forkChatService'];
55
+ }
56
+ /**
57
+ * Build the human-gate window controllers over one shared deps bundle (see the module doc).
58
+ */
59
+ export declare function buildGateWindowControllers(deps: GateWindowControllerDeps): {
60
+ testerController: TesterController;
61
+ ralphController: RalphController;
62
+ humanTestController: HumanTestController;
63
+ visualConfirmationController: VisualConfirmationController;
64
+ reviewGate: ReviewGateController;
65
+ forkDecisionController: ForkDecisionController;
66
+ prReviewController: PrReviewController;
67
+ };
68
+ /**
69
+ * The already-built collaborators {@link buildReviewSubjects} needs. Same values the
70
+ * constructor used inline.
71
+ */
72
+ export interface ReviewSubjectDeps {
73
+ blockRepository: BlockRepository;
74
+ executionRepository: ExecutionRepository;
75
+ workRunner: WorkRunner;
76
+ stateMachine: RunStateMachine;
77
+ stepGraph: StepGraph;
78
+ executionEventPublisher: ExecutionServiceDependencies['executionEventPublisher'];
79
+ requirementReviewService: ExecutionServiceDependencies['requirementReviewService'];
80
+ clarityReviewService: ExecutionServiceDependencies['clarityReviewService'];
81
+ brainstormServices: ExecutionServiceDependencies['brainstormServices'];
82
+ issueWriteback: ExecutionServiceDependencies['issueWriteback'];
83
+ initiativeService: ExecutionServiceDependencies['initiativeService'];
84
+ initiativeInterviewService: ExecutionServiceDependencies['initiativeInterviewService'];
85
+ docInterviewService: ExecutionServiceDependencies['docInterviewService'];
86
+ }
87
+ /**
88
+ * Build the review-gate SUBJECTS (requirements / clarity / the two brainstorm stages) plus the
89
+ * two interactive interview gates (initiative planning, document interview). Extracted verbatim
90
+ * from the {@link ExecutionService} constructor for the per-function line budget — each
91
+ * subject's differentiators still live in `review-kinds.ts`, not on the engine.
92
+ */
93
+ export declare function buildReviewSubjects(deps: ReviewSubjectDeps): {
94
+ requirementsKind: import("./ReviewGateController.js").ReviewKind<{
95
+ id: string;
96
+ blockId: string;
97
+ status: "exceeded" | "incorporated" | "incorporating" | "merged" | "ready" | "reviewing";
98
+ items: {
99
+ id: string;
100
+ category: "assumption" | "clarification" | "gap" | "question" | "risk";
101
+ severity: "high" | "low" | "medium";
102
+ title: string;
103
+ detail: string;
104
+ status: "answered" | "dismissed" | "open" | "recommend_requested" | "resolved";
105
+ reply: string | null;
106
+ autoAnswerable?: boolean | undefined;
107
+ createdAt: number;
108
+ updatedAt: number;
109
+ }[];
110
+ model: string | null;
111
+ incorporatedRequirements: string | null;
112
+ iteration: number;
113
+ maxIterations: number;
114
+ recommendations: {
115
+ id: string;
116
+ sourceFinding: {
117
+ title: string;
118
+ detail: string;
119
+ itemId?: string | undefined;
120
+ };
121
+ recommendedText: string;
122
+ auto?: boolean | undefined;
123
+ status: "accepted" | "pending" | "ready" | "rejected";
124
+ note: string | null;
125
+ groundedInFragment: {
126
+ id: string;
127
+ title: string;
128
+ } | null;
129
+ createdAt: number;
130
+ updatedAt: number;
131
+ }[];
132
+ createdAt: number;
133
+ updatedAt: number;
134
+ }>;
135
+ clarityKind: import("./ReviewGateController.js").ReviewKind<{
136
+ id: string;
137
+ blockId: string;
138
+ status: "exceeded" | "incorporated" | "incorporating" | "merged" | "ready" | "reviewing";
139
+ items: {
140
+ id: string;
141
+ category: "assumption" | "clarification" | "gap" | "question" | "risk";
142
+ severity: "high" | "low" | "medium";
143
+ title: string;
144
+ detail: string;
145
+ status: "answered" | "dismissed" | "open" | "recommend_requested" | "resolved";
146
+ reply: string | null;
147
+ autoAnswerable?: boolean | undefined;
148
+ createdAt: number;
149
+ updatedAt: number;
150
+ }[];
151
+ model: string | null;
152
+ clarifiedReport: string | null;
153
+ iteration: number;
154
+ maxIterations: number;
155
+ createdAt: number;
156
+ updatedAt: number;
157
+ }>;
158
+ requirementsBrainstormKind: import("./ReviewGateController.js").ReviewKind<{
159
+ id: string;
160
+ blockId: string;
161
+ stage: "architecture" | "requirements";
162
+ status: "exceeded" | "incorporated" | "incorporating" | "merged" | "ready" | "reviewing";
163
+ items: {
164
+ id: string;
165
+ category: "assumption" | "clarification" | "gap" | "question" | "risk";
166
+ severity: "high" | "low" | "medium";
167
+ title: string;
168
+ detail: string;
169
+ status: "answered" | "dismissed" | "open" | "recommend_requested" | "resolved";
170
+ reply: string | null;
171
+ autoAnswerable?: boolean | undefined;
172
+ createdAt: number;
173
+ updatedAt: number;
174
+ }[];
175
+ model: string | null;
176
+ convergedDirection: string | null;
177
+ iteration: number;
178
+ maxIterations: number;
179
+ createdAt: number;
180
+ updatedAt: number;
181
+ }>;
182
+ architectureBrainstormKind: import("./ReviewGateController.js").ReviewKind<{
183
+ id: string;
184
+ blockId: string;
185
+ stage: "architecture" | "requirements";
186
+ status: "exceeded" | "incorporated" | "incorporating" | "merged" | "ready" | "reviewing";
187
+ items: {
188
+ id: string;
189
+ category: "assumption" | "clarification" | "gap" | "question" | "risk";
190
+ severity: "high" | "low" | "medium";
191
+ title: string;
192
+ detail: string;
193
+ status: "answered" | "dismissed" | "open" | "recommend_requested" | "resolved";
194
+ reply: string | null;
195
+ autoAnswerable?: boolean | undefined;
196
+ createdAt: number;
197
+ updatedAt: number;
198
+ }[];
199
+ model: string | null;
200
+ convergedDirection: string | null;
201
+ iteration: number;
202
+ maxIterations: number;
203
+ createdAt: number;
204
+ updatedAt: number;
205
+ }>;
206
+ initiativeInterviewController: InitiativeInterviewController | undefined;
207
+ docInterviewController: DocInterviewController | undefined;
208
+ };
209
+ //# sourceMappingURL=gate-window-controllers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate-window-controllers.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/gate-window-controllers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,KAAK,EACL,mBAAmB,EACnB,WAAW,EACX,UAAU,EACX,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,KAAK,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAChG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAChF,OAAO,EAAE,oBAAoB,EAAE,KAAK,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAC/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EA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EAAE,mBAAmB,CAAA;IACxC,UAAU,EAAE,UAAU,CAAA;IACtB,YAAY,EAAE,eAAe,CAAA;IAC7B,SAAS,EAAE,SAAS,CAAA;IACpB,uBAAuB,EAAE,4BAA4B,CAAC,yBAAyB,CAAC,CAAA;IAChF,wBAAwB,EAAE,4BAA4B,CAAC,0BAA0B,CAAC,CAAA;IAClF,oBAAoB,EAAE,4BAA4B,CAAC,sBAAsB,CAAC,CAAA;IAC1E,kBAAkB,EAAE,4BAA4B,CAAC,oBAAoB,CAAC,CAAA;IACtE,cAAc,EAAE,4BAA4B,CAAC,gBAAgB,CAAC,CAAA;IAC9D,iBAAiB,EAAE,4BAA4B,CAAC,mBAAmB,CAAC,CAAA;IACpE,0BAA0B,EAAE,4BAA4B,CAAC,4BAA4B,CAAC,CAAA;IACtF,mBAAmB,EAAE,4BAA4B,CAAC,qBAAqB,CAAC,CAAA;CACzE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8E1D"}
@@ -0,0 +1,212 @@
1
+ /**
2
+ * The human-gate window controllers the engine composes: the Tester / Ralph / human-test /
3
+ * visual-confirmation gates, the shared review gate, the implementation-fork decision gate and
4
+ * the PR-review gate.
5
+ *
6
+ * Extracted verbatim from the {@link ExecutionService} constructor (which had grown past the
7
+ * per-function line budget — docs/initiatives/lint-complexity-size-ratchet.md) following the
8
+ * established `RunDispatcher` controller pattern: the factory takes ONE deps object of already-
9
+ * built collaborators plus BOUND call-backs for the engine methods the controllers reach back
10
+ * into (`resolveRiskPolicy` / `dispatchIterationCap` / `clockNow`), so every closure still
11
+ * resolves through the live engine instance exactly as before. Behaviour-neutral.
12
+ */
13
+ import { TesterController } from './TesterController.js';
14
+ import { RalphController } from './RalphController.js';
15
+ import { HumanTestController } from './HumanTestController.js';
16
+ import { VisualConfirmationController } from './VisualConfirmationController.js';
17
+ import { ReviewGateController } from './ReviewGateController.js';
18
+ import { ForkDecisionController } from './ForkDecisionController.js';
19
+ import { PrReviewController } from './PrReviewController.js';
20
+ import { InitiativeInterviewController } from './InitiativeInterviewController.js';
21
+ import { DocInterviewController } from './DocInterviewController.js';
22
+ import { buildBrainstormKind, buildClarityKind, buildRequirementsKind } from './review-kinds.js';
23
+ import { ARCHITECTURE_BRAINSTORM_AGENT_KIND, REQUIREMENTS_BRAINSTORM_AGENT_KIND, } from './ci.logic.js';
24
+ /**
25
+ * Build the human-gate window controllers over one shared deps bundle (see the module doc).
26
+ */
27
+ export function buildGateWindowControllers(deps) {
28
+ const { blockRepository, executionRepository, workRunner, agentExecutor, notificationService, contextBuilder, stateMachine, stepGraph, idGenerator, clock, clockNow, resolveRiskPolicy, dispatchIterationCap, testerQualityReviewer, environmentProvisioning, environmentTeardown, branchUpdater, resolveBinaryArtifactStore, forkChatService, } = deps;
29
+ const testerController = new TesterController({
30
+ blockRepository,
31
+ notificationService,
32
+ agentExecutor,
33
+ contextBuilder,
34
+ resolveRiskPolicy,
35
+ stateMachine,
36
+ // The test quality-control companion's inline reviewer (when wired); absent → QC
37
+ // pass-through. Stamps its verdicts with the engine clock.
38
+ ...(testerQualityReviewer ? { qualityReviewer: testerQualityReviewer } : {}),
39
+ clockNow,
40
+ });
41
+ const ralphController = new RalphController({
42
+ blockRepository,
43
+ notificationService,
44
+ agentExecutor,
45
+ contextBuilder,
46
+ stateMachine,
47
+ clockNow,
48
+ });
49
+ const humanTestController = new HumanTestController({
50
+ blockRepository,
51
+ executionRepository,
52
+ workRunner,
53
+ agentExecutor,
54
+ contextBuilder,
55
+ notificationService,
56
+ // The human-test gate READS the env the upstream `deployer` step provisioned (it no longer
57
+ // stands up its own) — resolved by the block's OWN service frame, exactly as the tester
58
+ // context resolves it, so the gate and the tester(s) share the one provisioned env. Left
59
+ // undefined when no provider is wired (the gate degrades to manual mode).
60
+ ...(environmentProvisioning
61
+ ? {
62
+ readEnvironment: async (ws, block) => {
63
+ const frame = await contextBuilder.resolveServiceFrame(ws, block.id);
64
+ const handle = await environmentProvisioning.getHandleForBlock(ws, block.id, frame?.id);
65
+ // Reconcile against the LIVE provider status when the stored record isn't yet
66
+ // `ready`: the deployer records an async provider's env as `provisioning`, and nothing
67
+ // re-polls that row once the deployer step completes, so a slow-but-now-ready env
68
+ // would otherwise read stale and wrongly degrade the gate to manual mode. One refresh
69
+ // reconciles it; an env still genuinely provisioning / failed degrades as before.
70
+ // Best-effort — keep the stored handle if the status read throws.
71
+ if (handle && handle.status !== 'ready') {
72
+ try {
73
+ return await environmentProvisioning.refreshStatus(ws, handle.id);
74
+ }
75
+ catch {
76
+ return handle;
77
+ }
78
+ }
79
+ return handle;
80
+ },
81
+ }
82
+ : {}),
83
+ ...(environmentTeardown
84
+ ? {
85
+ teardownEnvironment: async (ws, id) => {
86
+ await environmentTeardown.teardown(ws, id);
87
+ },
88
+ }
89
+ : {}),
90
+ ...(branchUpdater ? { branchUpdater } : {}),
91
+ resolveRiskPolicy,
92
+ stateMachine,
93
+ stepGraph,
94
+ clockNow,
95
+ });
96
+ const visualConfirmationController = new VisualConfirmationController({
97
+ blockRepository,
98
+ executionRepository,
99
+ workRunner,
100
+ agentExecutor,
101
+ contextBuilder,
102
+ notificationService,
103
+ ...(resolveBinaryArtifactStore ? { resolveBinaryArtifactStore } : {}),
104
+ resolveRiskPolicy,
105
+ stateMachine,
106
+ stepGraph,
107
+ clockNow,
108
+ });
109
+ const reviewGate = new ReviewGateController({
110
+ blockRepository,
111
+ executionRepository,
112
+ workRunner,
113
+ stateMachine,
114
+ stepGraph,
115
+ resolveRiskPolicy,
116
+ dispatchIterationCap,
117
+ });
118
+ const forkDecisionController = new ForkDecisionController({
119
+ blockRepository,
120
+ executionRepository,
121
+ workRunner,
122
+ stateMachine,
123
+ stepGraph,
124
+ idGenerator,
125
+ clock,
126
+ notificationService,
127
+ ...(forkChatService ? { forkChatService } : {}),
128
+ resolveEffectiveDescription: (ws, block) => contextBuilder.resolveEffectiveDescription(ws, block),
129
+ });
130
+ const prReviewController = new PrReviewController({
131
+ executionRepository,
132
+ workRunner,
133
+ stateMachine,
134
+ stepGraph,
135
+ idGenerator,
136
+ clock,
137
+ notificationService,
138
+ });
139
+ return {
140
+ testerController,
141
+ ralphController,
142
+ humanTestController,
143
+ visualConfirmationController,
144
+ reviewGate,
145
+ forkDecisionController,
146
+ prReviewController,
147
+ };
148
+ }
149
+ /**
150
+ * Build the review-gate SUBJECTS (requirements / clarity / the two brainstorm stages) plus the
151
+ * two interactive interview gates (initiative planning, document interview). Extracted verbatim
152
+ * from the {@link ExecutionService} constructor for the per-function line budget — each
153
+ * subject's differentiators still live in `review-kinds.ts`, not on the engine.
154
+ */
155
+ export function buildReviewSubjects(deps) {
156
+ const { blockRepository, executionRepository, workRunner, stateMachine, stepGraph, executionEventPublisher, requirementReviewService, clarityReviewService, brainstormServices, issueWriteback, initiativeService, initiativeInterviewService, docInterviewService, } = deps;
157
+ // The review-gate subjects (requirements / clarity / the two brainstorm stages), built by
158
+ // the factories in review-kinds.ts over one shared closure of collaborators — each subject's
159
+ // differentiators live there, not on the engine.
160
+ const reviewKindDeps = {
161
+ events: executionEventPublisher,
162
+ blockRepository,
163
+ executionRepository,
164
+ requirementReviewService,
165
+ clarityReviewService,
166
+ brainstormServices,
167
+ issueWriteback,
168
+ };
169
+ const requirementsKind = buildRequirementsKind(reviewKindDeps);
170
+ const clarityKind = buildClarityKind(reviewKindDeps);
171
+ const requirementsBrainstormKind = buildBrainstormKind('requirements', REQUIREMENTS_BRAINSTORM_AGENT_KIND, reviewKindDeps);
172
+ const architectureBrainstormKind = buildBrainstormKind('architecture', ARCHITECTURE_BRAINSTORM_AGENT_KIND, reviewKindDeps);
173
+ // The interactive-planning interviewer gate — wired whenever the initiative store is
174
+ // present (the entity is where its state lives). The interviewer LLM is optional: without
175
+ // it (or without a model) the gate passes through, so planning still runs off the raw
176
+ // block description. Absent initiative store → the `initiative-interviewer` step passes
177
+ // through in RunDispatcher (an initiative pipeline can't run without the store anyway).
178
+ const initiativeInterviewController = initiativeService
179
+ ? new InitiativeInterviewController({
180
+ blockRepository,
181
+ executionRepository,
182
+ workRunner,
183
+ stateMachine,
184
+ stepGraph,
185
+ interviewService: initiativeInterviewService,
186
+ initiativeService,
187
+ })
188
+ : undefined;
189
+ // The interactive document-interview gate (WS5) — wired whenever the interview service is
190
+ // present. Without it (or without a model) the gate passes through, so document pipelines
191
+ // still run off the raw outline. Self-contained persistence lives in the service.
192
+ const docInterviewController = docInterviewService
193
+ ? new DocInterviewController({
194
+ blockRepository,
195
+ executionRepository,
196
+ workRunner,
197
+ stateMachine,
198
+ stepGraph,
199
+ events: executionEventPublisher,
200
+ docInterviewService,
201
+ })
202
+ : undefined;
203
+ return {
204
+ requirementsKind,
205
+ clarityKind,
206
+ requirementsBrainstormKind,
207
+ architectureBrainstormKind,
208
+ initiativeInterviewController,
209
+ docInterviewController,
210
+ };
211
+ }
212
+ //# sourceMappingURL=gate-window-controllers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate-window-controllers.js","sourceRoot":"","sources":["../../../src/modules/execution/gate-window-controllers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAeH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAChF,OAAO,EAAE,oBAAoB,EAAiC,MAAM,2BAA2B,CAAA;AAC/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,6BAA6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MAAM,EAAE,uBAAuB;QAC/B,eAAe;QACf,mBAAmB;QACnB,wBAAwB;QACxB,oBAAoB;QACpB,kBAAkB;QAClB,cAAc;KACf,CAAA;IACD,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,cAAc,CAAC,CAAA;IAC9D,MAAM,WAAW,GAAG,gBAAgB,CAAC,cAAc,CAAC,CAAA;IACpD,MAAM,0BAA0B,GAAG,mBAAmB,CACpD,cAAc,EACd,kCAAkC,EAClC,cAAc,CACf,CAAA;IACD,MAAM,0BAA0B,GAAG,mBAAmB,CACpD,cAAc,EACd,kCAAkC,EAClC,cAAc,CACf,CAAA;IACD,qFAAqF;IACrF,0FAA0F;IAC1F,sFAAsF;IACtF,wFAAwF;IACxF,wFAAwF;IACxF,MAAM,6BAA6B,GAAG,iBAAiB;QACrD,CAAC,CAAC,IAAI,6BAA6B,CAAC;YAChC,eAAe;YACf,mBAAmB;YACnB,UAAU;YACV,YAAY;YACZ,SAAS;YACT,gBAAgB,EAAE,0BAA0B;YAC5C,iBAAiB;SAClB,CAAC;QACJ,CAAC,CAAC,SAAS,CAAA;IACb,0FAA0F;IAC1F,0FAA0F;IAC1F,kFAAkF;IAClF,MAAM,sBAAsB,GAAG,mBAAmB;QAChD,CAAC,CAAC,IAAI,sBAAsB,CAAC;YACzB,eAAe;YACf,mBAAmB;YACnB,UAAU;YACV,YAAY;YACZ,SAAS;YACT,MAAM,EAAE,uBAAuB;YAC/B,mBAAmB;SACpB,CAAC;QACJ,CAAC,CAAC,SAAS,CAAA;IACb,OAAO;QACL,gBAAgB;QAChB,WAAW;QACX,0BAA0B;QAC1B,0BAA0B;QAC1B,6BAA6B;QAC7B,sBAAsB;KACvB,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/orchestration",
3
- "version": "0.136.0",
3
+ "version": "0.136.1",
4
4
  "description": "Delivery-workflow engine for the Agent Architecture Board (execution, bootstrap, pipelines, board, boardScan, requirements, and composition root).",
5
5
  "repository": {
6
6
  "type": "git",