@cat-factory/orchestration 0.291.0 → 0.293.0
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/container/dependencies.d.ts +18 -1
- package/dist/container/dependencies.d.ts.map +1 -1
- package/dist/container/engine-collaborators.d.ts +1 -0
- package/dist/container/engine-collaborators.d.ts.map +1 -1
- package/dist/container/engine-collaborators.js +5 -1
- package/dist/container/engine-collaborators.js.map +1 -1
- package/dist/container/environmentsModule.factory.d.ts.map +1 -1
- package/dist/container/environmentsModule.factory.js +22 -0
- package/dist/container/environmentsModule.factory.js.map +1 -1
- package/dist/container/execution-service.d.ts.map +1 -1
- package/dist/container/execution-service.js +2 -1
- package/dist/container/execution-service.js.map +1 -1
- package/dist/container/modules.d.ts +13 -1
- package/dist/container/modules.d.ts.map +1 -1
- package/dist/container/modules.js +40 -6
- package/dist/container/modules.js.map +1 -1
- package/dist/modules/environments/EnvironmentTestService.d.ts.map +1 -1
- package/dist/modules/environments/EnvironmentTestService.js +7 -4
- package/dist/modules/environments/EnvironmentTestService.js.map +1 -1
- package/dist/modules/execution/AgentContextBuilder.d.ts +5 -25
- package/dist/modules/execution/AgentContextBuilder.d.ts.map +1 -1
- package/dist/modules/execution/AgentContextBuilder.js +26 -58
- package/dist/modules/execution/AgentContextBuilder.js.map +1 -1
- package/dist/modules/execution/DeployerStepController.d.ts +25 -0
- package/dist/modules/execution/DeployerStepController.d.ts.map +1 -1
- package/dist/modules/execution/DeployerStepController.js +106 -7
- package/dist/modules/execution/DeployerStepController.js.map +1 -1
- package/dist/modules/execution/EnvironmentInvestigationController.d.ts +188 -0
- package/dist/modules/execution/EnvironmentInvestigationController.d.ts.map +1 -0
- package/dist/modules/execution/EnvironmentInvestigationController.js +404 -0
- package/dist/modules/execution/EnvironmentInvestigationController.js.map +1 -0
- package/dist/modules/execution/EnvironmentInvestigationService.d.ts +41 -0
- package/dist/modules/execution/EnvironmentInvestigationService.d.ts.map +1 -0
- package/dist/modules/execution/EnvironmentInvestigationService.js +84 -0
- package/dist/modules/execution/EnvironmentInvestigationService.js.map +1 -0
- package/dist/modules/execution/ExecutionServiceDependencies.d.ts +6 -1
- package/dist/modules/execution/ExecutionServiceDependencies.d.ts.map +1 -1
- package/dist/modules/execution/RunDispatcher.d.ts +10 -13
- package/dist/modules/execution/RunDispatcher.d.ts.map +1 -1
- package/dist/modules/execution/RunDispatcher.js +19 -45
- package/dist/modules/execution/RunDispatcher.js.map +1 -1
- package/dist/modules/execution/RunDispatcherDependencies.d.ts +7 -1
- package/dist/modules/execution/RunDispatcherDependencies.d.ts.map +1 -1
- package/dist/modules/execution/RunDispatcherDependencies.js.map +1 -1
- package/dist/modules/execution/builder-frontend-resolution.d.ts +56 -0
- package/dist/modules/execution/builder-frontend-resolution.d.ts.map +1 -0
- package/dist/modules/execution/builder-frontend-resolution.js +51 -0
- package/dist/modules/execution/builder-frontend-resolution.js.map +1 -0
- package/dist/modules/execution/deployer-family.d.ts +21 -0
- package/dist/modules/execution/deployer-family.d.ts.map +1 -0
- package/dist/modules/execution/deployer-family.js +47 -0
- package/dist/modules/execution/deployer-family.js.map +1 -0
- package/dist/modules/execution/frontend-infra.logic.d.ts +1 -1
- package/dist/modules/execution/frontend-infra.logic.d.ts.map +1 -1
- package/dist/modules/execution/frontend-infra.logic.js +1 -1
- package/dist/modules/execution/frontend-infra.logic.js.map +1 -1
- package/dist/modules/execution/runOutcome.boundary.d.ts.map +1 -1
- package/dist/modules/execution/runOutcome.boundary.js +4 -0
- package/dist/modules/execution/runOutcome.boundary.js.map +1 -1
- package/dist/modules/pipelines/pipelineShape.d.ts +4 -2
- package/dist/modules/pipelines/pipelineShape.d.ts.map +1 -1
- package/dist/modules/pipelines/pipelineShape.js +4 -2
- package/dist/modules/pipelines/pipelineShape.js.map +1 -1
- package/dist/modules/preview/PreviewService.d.ts.map +1 -1
- package/dist/modules/preview/PreviewService.js +6 -0
- package/dist/modules/preview/PreviewService.js.map +1 -1
- package/package.json +11 -11
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
import { describeError, getErrorMessage, noopLogger } from '@cat-factory/kernel';
|
|
2
|
+
import { coerceEnvironmentInvestigationVerdict, DEFAULT_ENVIRONMENT_INVESTIGATION_MAX_ATTEMPTS, describeRemediationAction, environmentRemediationActionSchema, MAX_ENVIRONMENT_WAIT_EXTENSIONS, remediationNeedsProviderSupport, } from '@cat-factory/contracts';
|
|
3
|
+
export class EnvironmentInvestigationController {
|
|
4
|
+
deps;
|
|
5
|
+
log;
|
|
6
|
+
constructor(deps) {
|
|
7
|
+
this.deps = deps;
|
|
8
|
+
this.log = (deps.logger ?? noopLogger).child({ scope: 'environmentInvestigation' });
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Investigate a failed PRIMARY-frame provision, and act on the verdict when there is something
|
|
12
|
+
* to act on.
|
|
13
|
+
*
|
|
14
|
+
* Returns `null` when this failure must NOT be investigated, which is what keeps the whole
|
|
15
|
+
* feature a pass-through wherever it cannot apply:
|
|
16
|
+
*
|
|
17
|
+
* - no investigator is wired (no model provider / no routing default), or no provisioning
|
|
18
|
+
* service to read the evidence with;
|
|
19
|
+
* - the step's author disabled the loop or set its budget to zero.
|
|
20
|
+
*
|
|
21
|
+
* A budget that is SPENT is not one of those: the loop ran, and its last verdict is reported
|
|
22
|
+
* rather than thrown away, so the terminal failure still names what was found.
|
|
23
|
+
*/
|
|
24
|
+
async investigate(args) {
|
|
25
|
+
const { workspaceId, instance, step, block, failure } = args;
|
|
26
|
+
const investigator = this.deps.investigator;
|
|
27
|
+
const provisioning = this.deps.environmentProvisioning;
|
|
28
|
+
if (!investigator?.enabled || !provisioning)
|
|
29
|
+
return null;
|
|
30
|
+
const budget = resolveEnvironmentInvestigationBudget(step);
|
|
31
|
+
if (budget <= 0)
|
|
32
|
+
return null;
|
|
33
|
+
const state = step.environmentInvestigation;
|
|
34
|
+
const attempts = state?.attempts ?? 0;
|
|
35
|
+
// The bar is the one FROZEN at the first round wherever there is one, never the freshly
|
|
36
|
+
// resolved budget: editing the pipeline mid-run must not move the bar the rounds already spent
|
|
37
|
+
// were counted against, the same rule the deploy fixer's budget and an approval's quorum follow.
|
|
38
|
+
const bar = state?.maxAttempts ?? budget;
|
|
39
|
+
if (attempts >= bar) {
|
|
40
|
+
// The loop ran and is out of rounds. The last verdict is still the best account anybody has
|
|
41
|
+
// of this failure, so it is reported rather than discarded: reporting is the point, and a
|
|
42
|
+
// spent budget removes only the ability to act on it.
|
|
43
|
+
const last = lastVerdict(step);
|
|
44
|
+
return last
|
|
45
|
+
? { kind: 'reported', message: describeFinding(failure, last, { kind: 'budget_spent' }) }
|
|
46
|
+
: null;
|
|
47
|
+
}
|
|
48
|
+
let verdict = null;
|
|
49
|
+
let investigationFailure;
|
|
50
|
+
let offered = [];
|
|
51
|
+
// GATHERING is inside the guard, not just the asking. The evidence walk is a chain of
|
|
52
|
+
// repository and provider reads, and one of them throwing here does not merely cost the
|
|
53
|
+
// diagnosis: it propagates out of the caller's own terminal-failure path, where the durable
|
|
54
|
+
// driver counts it as an unreadable poll and fast-fails the run as a `timeout`. The loop
|
|
55
|
+
// exists to EXPLAIN a failed provision, so it must never be able to replace one with a
|
|
56
|
+
// misattributed failure of its own.
|
|
57
|
+
try {
|
|
58
|
+
const evidence = await provisioning.collectEnvironmentEvidence({
|
|
59
|
+
workspaceId,
|
|
60
|
+
environmentId: failure.environmentId,
|
|
61
|
+
executionId: instance.id,
|
|
62
|
+
failure: {
|
|
63
|
+
error: failure.error,
|
|
64
|
+
...(failure.reason ? { reason: failure.reason } : {}),
|
|
65
|
+
...(failure.wait.kind === 'waited' ? { waitedMs: failure.wait.waitedMs } : {}),
|
|
66
|
+
readinessWait: failure.wait.kind,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
offered = offeredActions(step, failure, evidence.providerActions, !!this.deps.environmentTeardown);
|
|
70
|
+
const subject = {
|
|
71
|
+
workspaceId,
|
|
72
|
+
executionId: instance.id,
|
|
73
|
+
block,
|
|
74
|
+
evidence: evidence.bundle,
|
|
75
|
+
offeredActions: offered,
|
|
76
|
+
};
|
|
77
|
+
const answer = await investigator.investigate(subject);
|
|
78
|
+
verdict = coerceEnvironmentInvestigationVerdict(answer.verdict);
|
|
79
|
+
if (!verdict)
|
|
80
|
+
investigationFailure = 'The investigation returned no readable verdict.';
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
investigationFailure = getErrorMessage(error);
|
|
84
|
+
this.log.warn('environment investigation could not be completed', {
|
|
85
|
+
workspaceId,
|
|
86
|
+
executionId: instance.id,
|
|
87
|
+
frameId: failure.frameId,
|
|
88
|
+
environmentId: failure.environmentId,
|
|
89
|
+
...describeError(error),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
const round = { attempt: attempts + 1, at: this.deps.clock.now() };
|
|
93
|
+
if (!verdict) {
|
|
94
|
+
// An investigation that could not be READ is not a clean bill of health and is not a verdict
|
|
95
|
+
// of `stop` either. The round is recorded so the budget cannot be spun, and the caller takes
|
|
96
|
+
// its unchanged terminal path with the run's real error.
|
|
97
|
+
appendRound(step, failure, budget, {
|
|
98
|
+
...round,
|
|
99
|
+
outcome: 'failed',
|
|
100
|
+
reason: failure.reason ?? null,
|
|
101
|
+
error: failure.error,
|
|
102
|
+
failure: investigationFailure ?? 'The investigation could not be completed.',
|
|
103
|
+
});
|
|
104
|
+
await this.deps.runStateMachine.casPersist(workspaceId, instance);
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
const chosen = chooseAction(verdict, offered);
|
|
108
|
+
if (!chosen.action) {
|
|
109
|
+
appendRound(step, failure, budget, {
|
|
110
|
+
...round,
|
|
111
|
+
outcome: 'reported',
|
|
112
|
+
reason: failure.reason ?? null,
|
|
113
|
+
error: failure.error,
|
|
114
|
+
verdict,
|
|
115
|
+
...(chosen.withheld ? { withheld: chosen.withheld } : {}),
|
|
116
|
+
});
|
|
117
|
+
await this.deps.runStateMachine.casPersist(workspaceId, instance);
|
|
118
|
+
return {
|
|
119
|
+
kind: 'reported',
|
|
120
|
+
// The WITHHELD reason, never the verdict's own recommendation: the action was refused
|
|
121
|
+
// before it was taken, so printing `Recommended: restart` would tell the operator about a
|
|
122
|
+
// decision that never existed. That is the exact outcome `offeredActions` narrows to
|
|
123
|
+
// prevent, and it survives only if the message it produces says so too.
|
|
124
|
+
message: describeFinding(failure, verdict, chosen.withheld ? { kind: 'withheld', detail: chosen.withheld } : { kind: 'recommended' }),
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
const applied = await this.applyAction(provisioning, workspaceId, failure, chosen.action);
|
|
128
|
+
appendRound(step, failure, budget, {
|
|
129
|
+
...round,
|
|
130
|
+
outcome: applied.ok ? 'remediated' : 'reported',
|
|
131
|
+
reason: failure.reason ?? null,
|
|
132
|
+
error: failure.error,
|
|
133
|
+
verdict,
|
|
134
|
+
...(applied.ok ? { ranAction: chosen.action } : { withheld: applied.detail }),
|
|
135
|
+
});
|
|
136
|
+
if (!applied.ok) {
|
|
137
|
+
await this.deps.runStateMachine.casPersist(workspaceId, instance);
|
|
138
|
+
return {
|
|
139
|
+
kind: 'reported',
|
|
140
|
+
message: describeFinding(failure, verdict, {
|
|
141
|
+
kind: 'attempt_failed',
|
|
142
|
+
action: chosen.action,
|
|
143
|
+
detail: applied.detail,
|
|
144
|
+
}),
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
kind: 'retrying',
|
|
149
|
+
advance: await this.resume(workspaceId, instance, step, chosen.action, failure),
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Run the chosen action. Never throws: a failed remedy is a reported outcome, not a crashed run.
|
|
154
|
+
*
|
|
155
|
+
* The collaborators are PARAMETERS rather than reads off `this`, and the environment id is
|
|
156
|
+
* re-checked here rather than assumed from {@link offeredActions}: a `!` asserting a guard made
|
|
157
|
+
* in another method is exactly the assertion that silently stops being true when a second caller
|
|
158
|
+
* appears.
|
|
159
|
+
*/
|
|
160
|
+
async applyAction(provisioning, workspaceId, failure, action) {
|
|
161
|
+
const environmentId = failure.environmentId;
|
|
162
|
+
try {
|
|
163
|
+
if (action === 'restart') {
|
|
164
|
+
if (!environmentId) {
|
|
165
|
+
return { ok: false, detail: 'no environment was recorded for this frame to restart' };
|
|
166
|
+
}
|
|
167
|
+
const outcome = await provisioning.remediateEnvironment({
|
|
168
|
+
workspaceId,
|
|
169
|
+
environmentId,
|
|
170
|
+
action: 'restart',
|
|
171
|
+
});
|
|
172
|
+
// A provider that found nothing to restart reports `applied: false`, and treating that as
|
|
173
|
+
// success would have the engine re-probe an untouched environment and read the unchanged
|
|
174
|
+
// verdict as a remedy that did not work.
|
|
175
|
+
return { ok: outcome.applied, detail: outcome.detail };
|
|
176
|
+
}
|
|
177
|
+
if (action === 'recreate') {
|
|
178
|
+
const teardown = this.deps.environmentTeardown;
|
|
179
|
+
if (!environmentId || !teardown) {
|
|
180
|
+
return { ok: false, detail: 'there is no environment this deployment can tear down' };
|
|
181
|
+
}
|
|
182
|
+
const result = await teardown.teardown(workspaceId, environmentId);
|
|
183
|
+
// Only a CONFIRMED probe is a reclaim. A teardown that returns without throwing says the
|
|
184
|
+
// provider accepted the destroy call, which is a different fact from the environment being
|
|
185
|
+
// gone: a namespace wedged in `Terminating` behind a stuck finalizer answers exactly that
|
|
186
|
+
// way, and re-provisioning into it reproduces the fault and burns the remaining round.
|
|
187
|
+
if (result.confirmation !== 'confirmed') {
|
|
188
|
+
return {
|
|
189
|
+
ok: false,
|
|
190
|
+
detail: `the provider accepted the teardown but the environment could not be confirmed ` +
|
|
191
|
+
`gone (${result.confirmation}${result.reason ? `: ${result.reason}` : ''})`,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
return { ok: true, detail: 'the environment was torn down before being stood up again' };
|
|
195
|
+
}
|
|
196
|
+
// `wait` and `reprovision` are entirely engine-side: nothing is asked of the provider here,
|
|
197
|
+
// and what they do happens in `resume`.
|
|
198
|
+
return { ok: true, detail: '' };
|
|
199
|
+
}
|
|
200
|
+
catch (error) {
|
|
201
|
+
// Deliberately NOT swallowed as best-effort: `recreate` re-provisions over whatever the
|
|
202
|
+
// teardown left behind, so a teardown that threw (like one whose probe found the
|
|
203
|
+
// environment still standing, above) has to stop the retry rather than reproduce the fault
|
|
204
|
+
// against half-removed infrastructure.
|
|
205
|
+
this.log.warn('an environment remediation could not be applied', {
|
|
206
|
+
workspaceId,
|
|
207
|
+
environmentId,
|
|
208
|
+
action,
|
|
209
|
+
...describeError(error),
|
|
210
|
+
});
|
|
211
|
+
return { ok: false, detail: getErrorMessage(error) };
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Hand the frame back to the deployer so its own path decides what the remedy achieved.
|
|
216
|
+
*
|
|
217
|
+
* `wait` re-enters the readiness park on the SAME environment with a fresh anchor, which is what
|
|
218
|
+
* grants it another ceiling without the readiness judgement needing to know this loop exists.
|
|
219
|
+
* Everything else clears the frame's TERMINAL outcome, which is what makes the re-provision
|
|
220
|
+
* happen: the fan-out resumes at the first frame with none recorded, so the deployer needs no
|
|
221
|
+
* knowledge of this loop either.
|
|
222
|
+
*/
|
|
223
|
+
async resume(workspaceId, instance, step, action, failure) {
|
|
224
|
+
clearFrameOutcome(step, failure.frameId);
|
|
225
|
+
// `wait` and `restart` both leave the SAME environment in place and hand it back to the
|
|
226
|
+
// readiness park: one because our own deadline was the only thing that expired, the other
|
|
227
|
+
// because a restart is an in-place change the provider makes asynchronously, and standing the
|
|
228
|
+
// environment up again would discard the very thing the restart was meant to fix.
|
|
229
|
+
if ((action === 'wait' || action === 'restart') && failure.environmentId) {
|
|
230
|
+
step.deployWait = {
|
|
231
|
+
frameId: failure.frameId,
|
|
232
|
+
environmentId: failure.environmentId,
|
|
233
|
+
startedAt: this.deps.clock.now(),
|
|
234
|
+
polls: 0,
|
|
235
|
+
};
|
|
236
|
+
if (action === 'wait' && step.environmentInvestigation) {
|
|
237
|
+
step.environmentInvestigation = {
|
|
238
|
+
...step.environmentInvestigation,
|
|
239
|
+
waitExtensions: (step.environmentInvestigation.waitExtensions ?? 0) + 1,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
await this.deps.runStateMachine.persistAndEmit(workspaceId, instance, {
|
|
243
|
+
blockStatus: 'in_progress',
|
|
244
|
+
});
|
|
245
|
+
return { kind: 'awaiting_environment', stepIndex: instance.currentStep };
|
|
246
|
+
}
|
|
247
|
+
// The deployer pins the config its container was built from at dispatch; a retry must resolve
|
|
248
|
+
// the frame fresh. A readiness wait belongs to the environment this round supersedes, so
|
|
249
|
+
// carrying it over would park the re-provision on the OLD environment's id.
|
|
250
|
+
step.deployProvisioning = undefined;
|
|
251
|
+
step.deployFrameId = undefined;
|
|
252
|
+
step.deployWait = undefined;
|
|
253
|
+
await this.deps.runStateMachine.persistAndEmit(workspaceId, instance, {
|
|
254
|
+
blockStatus: 'in_progress',
|
|
255
|
+
});
|
|
256
|
+
return { kind: 'continue' };
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* The actions the engine will honour THIS round, narrowed before the model is asked.
|
|
261
|
+
*
|
|
262
|
+
* Narrowing here rather than filtering the verdict afterwards is what stops a report naming a
|
|
263
|
+
* remedy nobody tried: an operator reading "the platform should have restarted the workload"
|
|
264
|
+
* against a provider that cannot restart anything has been told about a decision that never
|
|
265
|
+
* existed. The filter runs over the vocabulary's OWN options, so a new action is unreachable
|
|
266
|
+
* until it is decided about here as well as in the contracts' support `Record`.
|
|
267
|
+
*
|
|
268
|
+
* `supported` comes from the SAME provider resolve the evidence was gathered through, so a round
|
|
269
|
+
* costs one registry read and one connection open rather than two of each.
|
|
270
|
+
*/
|
|
271
|
+
export function offeredActions(step, failure, supported, canTearDown) {
|
|
272
|
+
const config = step.stepOptions?.environmentInvestigation;
|
|
273
|
+
const extensions = step.environmentInvestigation?.waitExtensions ?? 0;
|
|
274
|
+
return environmentRemediationActionSchema.options.filter((action) => {
|
|
275
|
+
// Refusing is always available.
|
|
276
|
+
if (action === 'stop')
|
|
277
|
+
return true;
|
|
278
|
+
// A deployment may keep the whole diagnosis and forbid everything that touches infrastructure.
|
|
279
|
+
if (config?.allowRemediation === false)
|
|
280
|
+
return false;
|
|
281
|
+
// Only the provider's own in-place remedies need it to have implemented anything.
|
|
282
|
+
if (remediationNeedsProviderSupport(action) && !supported.includes(action))
|
|
283
|
+
return false;
|
|
284
|
+
// Waiting longer answers OUR deadline expiring on an environment the provider still said was
|
|
285
|
+
// coming. A provider that has DECLARED the environment failed answers identically forever,
|
|
286
|
+
// so a wait there is an offer to postpone the same verdict.
|
|
287
|
+
if (action === 'wait') {
|
|
288
|
+
return (!!failure.environmentId &&
|
|
289
|
+
failure.reason === 'timeout' &&
|
|
290
|
+
extensions < MAX_ENVIRONMENT_WAIT_EXTENSIONS);
|
|
291
|
+
}
|
|
292
|
+
// Tearing down needs both something to tear down and a teardown seam to do it with.
|
|
293
|
+
if (action === 'recreate')
|
|
294
|
+
return !!failure.environmentId && canTearDown;
|
|
295
|
+
// `restart` acts ON an environment; `reprovision` stands one up, and is therefore the one
|
|
296
|
+
// remedy still available when the provision died before recording an environment at all.
|
|
297
|
+
if (action === 'restart')
|
|
298
|
+
return !!failure.environmentId;
|
|
299
|
+
return true;
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Resolve the verdict's action against what was offered. An action outside the offered set is
|
|
304
|
+
* treated as `stop` with the divergence NAMED: the model was told the list, so picking outside
|
|
305
|
+
* it is a contract violation, and quietly substituting a neighbouring action would be the engine
|
|
306
|
+
* choosing a remedy nobody asked for.
|
|
307
|
+
*/
|
|
308
|
+
function chooseAction(verdict, offered) {
|
|
309
|
+
if (verdict.action === 'stop')
|
|
310
|
+
return {};
|
|
311
|
+
if (!offered.includes(verdict.action)) {
|
|
312
|
+
return {
|
|
313
|
+
withheld: `The investigation asked the platform to ${describeRemediationAction(verdict.action)}, ` +
|
|
314
|
+
'which was not offered this round.',
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
return { action: verdict.action };
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Append one round to the step's investigation state. A pure mutation: every exit path persists
|
|
321
|
+
* exactly once, so the acting path does not write the run twice for one decision.
|
|
322
|
+
*/
|
|
323
|
+
function appendRound(step, failure, budget, attempt) {
|
|
324
|
+
const state = step.environmentInvestigation;
|
|
325
|
+
step.environmentInvestigation = {
|
|
326
|
+
...state,
|
|
327
|
+
attempts: attempt.attempt,
|
|
328
|
+
maxAttempts: state?.maxAttempts ?? budget,
|
|
329
|
+
frameId: failure.frameId,
|
|
330
|
+
environmentId: failure.environmentId,
|
|
331
|
+
attemptLog: [...(state?.attemptLog ?? []), attempt],
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* The attempt budget for this step: the author's per-step override, else the shipped default.
|
|
336
|
+
* `enabled: false` is expressed as a zero budget so the disabled case and the deliberately
|
|
337
|
+
* zero-rounds case take one path, there being no difference between them.
|
|
338
|
+
*/
|
|
339
|
+
export function resolveEnvironmentInvestigationBudget(step) {
|
|
340
|
+
const config = step.stepOptions?.environmentInvestigation;
|
|
341
|
+
if (config?.enabled === false)
|
|
342
|
+
return 0;
|
|
343
|
+
return config?.maxAttempts ?? DEFAULT_ENVIRONMENT_INVESTIGATION_MAX_ATTEMPTS;
|
|
344
|
+
}
|
|
345
|
+
/** Drop one frame's recorded TERMINAL outcome, so the fan-out resumes at it on re-entry. */
|
|
346
|
+
function clearFrameOutcome(step, frameId) {
|
|
347
|
+
if (!step.deployEnvs)
|
|
348
|
+
return;
|
|
349
|
+
const { [frameId]: _cleared, ...rest } = step.deployEnvs;
|
|
350
|
+
step.deployEnvs = rest;
|
|
351
|
+
}
|
|
352
|
+
/** The most recent round that produced a verdict, or undefined when none did. */
|
|
353
|
+
function lastVerdict(step) {
|
|
354
|
+
const log = step.environmentInvestigation?.attemptLog ?? [];
|
|
355
|
+
for (let i = log.length - 1; i >= 0; i -= 1) {
|
|
356
|
+
const verdict = log[i]?.verdict;
|
|
357
|
+
if (verdict)
|
|
358
|
+
return verdict;
|
|
359
|
+
}
|
|
360
|
+
return undefined;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* The terminal failure message a reported verdict replaces the bare provider error with. The
|
|
364
|
+
* provider error is kept and LEADS, because it is still the primary fact; the finding is stated
|
|
365
|
+
* under it so a reader gets the cause without losing what was actually observed.
|
|
366
|
+
*/
|
|
367
|
+
export function describeFinding(failure, verdict, closing) {
|
|
368
|
+
const lines = [
|
|
369
|
+
failure.error,
|
|
370
|
+
'',
|
|
371
|
+
`Environment investigation of "${failure.frameTitle}" (fault: ${verdict.faultLayer}): ${verdict.summary || 'no summary was produced.'}`,
|
|
372
|
+
];
|
|
373
|
+
if (verdict.evidence.length > 0) {
|
|
374
|
+
lines.push('', 'Evidence:');
|
|
375
|
+
for (const item of verdict.evidence)
|
|
376
|
+
lines.push(`- [${item.source}] ${item.statement}`);
|
|
377
|
+
}
|
|
378
|
+
lines.push('', describeClosing(verdict, closing));
|
|
379
|
+
return lines.join('\n');
|
|
380
|
+
}
|
|
381
|
+
/** Compile-time totality guard for {@link describeClosing}. */
|
|
382
|
+
function unhandledClosing(closing) {
|
|
383
|
+
return `The investigation ended in an unrecognised state (${JSON.stringify(closing)}).`;
|
|
384
|
+
}
|
|
385
|
+
function describeClosing(verdict, closing) {
|
|
386
|
+
// The verdict's reasoning is kept in the two cases where the action did NOT happen, because it
|
|
387
|
+
// is what a person picking the action up by hand needs; it rides its own line so it can never
|
|
388
|
+
// read as part of the platform's account of what it did.
|
|
389
|
+
const because = verdict.actionRationale ? `\nIts reasoning was: ${verdict.actionRationale}` : '';
|
|
390
|
+
switch (closing.kind) {
|
|
391
|
+
case 'budget_spent':
|
|
392
|
+
return 'The investigation budget for this step is spent; nothing further was attempted.';
|
|
393
|
+
case 'withheld':
|
|
394
|
+
return `${closing.detail}${because}`;
|
|
395
|
+
case 'attempt_failed':
|
|
396
|
+
return (`The platform tried to ${describeRemediationAction(closing.action)} and could not: ` +
|
|
397
|
+
`${closing.detail}${because}`);
|
|
398
|
+
case 'recommended':
|
|
399
|
+
return `Recommended: ${describeRemediationAction(verdict.action)}${verdict.actionRationale ? `. ${verdict.actionRationale}` : ''}`;
|
|
400
|
+
default:
|
|
401
|
+
return unhandledClosing(closing);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
//# sourceMappingURL=EnvironmentInvestigationController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentInvestigationController.js","sourceRoot":"","sources":["../../../src/modules/execution/EnvironmentInvestigationController.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChF,OAAO,EACL,qCAAqC,EACrC,8CAA8C,EAC9C,yBAAyB,EAIzB,kCAAkC,EAClC,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,wBAAwB,CAAA;AA6G/B,MAAM,OAAO,kCAAkC;IAGhB,IAAI;IAFhB,GAAG,CAAQ;IAE5B,YAA6B,IAA4C;oBAA5C,IAAI;QAC/B,IAAI,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,UAAU,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,0BAA0B,EAAE,CAAC,CAAA;IACrF,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,WAAW,CAAC,IAMjB;QACC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;QAC5D,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,CAAA;QAC3C,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAA;QACtD,IAAI,CAAC,YAA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O,CAAC,MAAM,GAAG,OAAO,EAAE,CAC9B,CAAA;QACH,KAAK,aAAa;YAChB,OAAO,gBAAgB,yBAAyB,CAAC,OAAO,CAAC,MAAM,CAAC,GAC9D,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAC7D,EAAE,CAAA;QACJ;YACE,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACpC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { EnvironmentInvestigationSubject, EnvironmentInvestigator, ModelProvider, ModelProviderResolver } from '@cat-factory/kernel';
|
|
2
|
+
import { type ResolveBlockRunContext } from '../../inlineScope.js';
|
|
3
|
+
import { type InlineBlockModelDeps } from '../../inlineBlockModel.js';
|
|
4
|
+
/** What the inline investigator needs to resolve its model and reach the provider. */
|
|
5
|
+
export interface EnvironmentInvestigationServiceDeps extends InlineBlockModelDeps {
|
|
6
|
+
/** Resolve a ModelProvider for a workspace's credential scope (preferred). */
|
|
7
|
+
modelProviderResolver?: ModelProviderResolver;
|
|
8
|
+
/** Static provider (e.g. a fake in tests) used when no resolver is set. */
|
|
9
|
+
modelProvider?: ModelProvider;
|
|
10
|
+
/** Resolve the block's run/execution + initiator, folded into the inline model scope. */
|
|
11
|
+
resolveRunContext?: ResolveBlockRunContext;
|
|
12
|
+
/** The workspace's prompt override for this kind, when the prompt store is wired. */
|
|
13
|
+
resolveSystemPromptOverride?: (workspaceId: string, agentKind: string) => Promise<string | undefined>;
|
|
14
|
+
}
|
|
15
|
+
export declare class EnvironmentInvestigationService implements EnvironmentInvestigator {
|
|
16
|
+
private readonly deps;
|
|
17
|
+
constructor(deps: EnvironmentInvestigationServiceDeps);
|
|
18
|
+
/** Whether an investigation can run (a provider AND a routing default are wired). */
|
|
19
|
+
get enabled(): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Investigate one failed environment. Returns the raw extracted JSON value (the caller coerces
|
|
22
|
+
* it) plus the model that produced it.
|
|
23
|
+
*
|
|
24
|
+
* Throws {@link ValidationError} on an unresolved model, a failed generation, or a reply with no
|
|
25
|
+
* JSON object in it. The controller records the round as FAILED and falls through to the
|
|
26
|
+
* ordinary terminal failure: an investigation that could not be read must never be presented as
|
|
27
|
+
* a clean bill of health, and must never fail a run on its own either.
|
|
28
|
+
*/
|
|
29
|
+
investigate(subject: EnvironmentInvestigationSubject): Promise<{
|
|
30
|
+
verdict: unknown;
|
|
31
|
+
model: string;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* The model this investigation runs on, resolved under its OWN kind so it is its own row in the
|
|
35
|
+
* workspace's model defaults and its own line in the spend rollup: the same rule each
|
|
36
|
+
* registered judge follows, and for the same reason: an investigation lumped under a shared key
|
|
37
|
+
* attributes its spend to whatever else shares that key.
|
|
38
|
+
*/
|
|
39
|
+
private resolveModel;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=EnvironmentInvestigationService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentInvestigationService.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/EnvironmentInvestigationService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,+BAA+B,EAC/B,uBAAuB,EACvB,aAAa,EACb,qBAAqB,EAEtB,MAAM,qBAAqB,CAAA;AAc5B,OAAO,EAAE,KAAK,sBAAsB,EAAoB,MAAM,sBAAsB,CAAA;AACpF,OAAO,EAAE,KAAK,oBAAoB,EAA2B,MAAM,2BAA2B,CAAA;AAkB9F,sFAAsF;AACtF,MAAM,WAAW,mCAAoC,SAAQ,oBAAoB;IAC/E,8EAA8E;IAC9E,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C,2EAA2E;IAC3E,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,yFAAyF;IACzF,iBAAiB,CAAC,EAAE,sBAAsB,CAAA;IAC1C,qFAAqF;IACrF,2BAA2B,CAAC,EAAE,CAC5B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,KACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CACjC;AAUD,qBAAa,+BAAgC,YAAW,uBAAuB;IACjE,OAAO,CAAC,QAAQ,CAAC,IAAI;IAAjC,YAA6B,IAAI,EAAE,mCAAmC,EAAI;IAE1E,qFAAqF;IACrF,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;;;;;;OAQG;IACG,WAAW,CACf,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAyC9C;IAED;;;;;OAKG;YACW,YAAY;CAoB3B"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { generateText } from 'ai';
|
|
2
|
+
import { extractJson, getErrorMessage, resolveScopedModelProvider, ValidationError, } from '@cat-factory/kernel';
|
|
3
|
+
import { ENVIRONMENT_INVESTIGATOR_AGENT_KIND } from '@cat-factory/contracts';
|
|
4
|
+
import { catFactoryObservability, composeBespokePrompt, ENVIRONMENT_INVESTIGATION_PROMPT, renderEnvironmentInvestigationPrompt, } from '@cat-factory/agents';
|
|
5
|
+
import { scopeForBlockRun } from '../../inlineScope.js';
|
|
6
|
+
import { resolveInlineBlockModel } from '../../inlineBlockModel.js';
|
|
7
|
+
/**
|
|
8
|
+
* Output budget for one verdict. Generous next to a judge's 2000 because the deliverable is a
|
|
9
|
+
* paragraph plus a cited evidence list over a bundle that can carry a provider's whole fact set,
|
|
10
|
+
* and a verdict truncated mid-JSON is read as no verdict at all, which spends the round and
|
|
11
|
+
* reports nothing.
|
|
12
|
+
*/
|
|
13
|
+
const MAX_OUTPUT_TOKENS = 4000;
|
|
14
|
+
export class EnvironmentInvestigationService {
|
|
15
|
+
deps;
|
|
16
|
+
constructor(deps) {
|
|
17
|
+
this.deps = deps;
|
|
18
|
+
}
|
|
19
|
+
/** Whether an investigation can run (a provider AND a routing default are wired). */
|
|
20
|
+
get enabled() {
|
|
21
|
+
return (!!this.deps.modelProviderResolver || !!this.deps.modelProvider) && !!this.deps.modelRef;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Investigate one failed environment. Returns the raw extracted JSON value (the caller coerces
|
|
25
|
+
* it) plus the model that produced it.
|
|
26
|
+
*
|
|
27
|
+
* Throws {@link ValidationError} on an unresolved model, a failed generation, or a reply with no
|
|
28
|
+
* JSON object in it. The controller records the round as FAILED and falls through to the
|
|
29
|
+
* ordinary terminal failure: an investigation that could not be read must never be presented as
|
|
30
|
+
* a clean bill of health, and must never fail a run on its own either.
|
|
31
|
+
*/
|
|
32
|
+
async investigate(subject) {
|
|
33
|
+
const { modelProvider, ref } = await this.resolveModel(subject);
|
|
34
|
+
const override = await this.deps.resolveSystemPromptOverride?.(subject.workspaceId, ENVIRONMENT_INVESTIGATOR_AGENT_KIND);
|
|
35
|
+
let text;
|
|
36
|
+
try {
|
|
37
|
+
const result = await generateText({
|
|
38
|
+
model: modelProvider.resolve(ref),
|
|
39
|
+
system: composeBespokePrompt(ENVIRONMENT_INVESTIGATION_PROMPT, override),
|
|
40
|
+
prompt: renderEnvironmentInvestigationPrompt(subject),
|
|
41
|
+
// A diagnosis over fixed evidence should not move between identical rounds: two runs
|
|
42
|
+
// handed the same failure must reach the same conclusion, or the "cause" it names is
|
|
43
|
+
// noise a human cannot act on.
|
|
44
|
+
temperature: 0,
|
|
45
|
+
maxOutputTokens: MAX_OUTPUT_TOKENS,
|
|
46
|
+
providerOptions: catFactoryObservability({
|
|
47
|
+
agentKind: ENVIRONMENT_INVESTIGATOR_AGENT_KIND,
|
|
48
|
+
workspaceId: subject.workspaceId,
|
|
49
|
+
// The run is on the tag, not left to the credential scope's fallback: a round filed
|
|
50
|
+
// without it is absent from every run-scoped read of the telemetry.
|
|
51
|
+
executionId: subject.executionId,
|
|
52
|
+
}),
|
|
53
|
+
});
|
|
54
|
+
text = result.text;
|
|
55
|
+
}
|
|
56
|
+
catch (e) {
|
|
57
|
+
throw new ValidationError(`The environment investigation (${ref.provider}:${ref.model}) failed: ${getErrorMessage(e)}`);
|
|
58
|
+
}
|
|
59
|
+
const verdict = extractJson(text);
|
|
60
|
+
if (verdict === null || typeof verdict !== 'object') {
|
|
61
|
+
// An empty visible reply means the model answered only into its private reasoning channel
|
|
62
|
+
// (seen on some reasoning models); a non-JSON reply means it ignored the contract. Either
|
|
63
|
+
// way there is no verdict, which is not the same as a verdict of "stop".
|
|
64
|
+
throw new ValidationError(`The environment investigation (${ref.provider}:${ref.model}) returned no JSON verdict`);
|
|
65
|
+
}
|
|
66
|
+
return { verdict, model: `${ref.provider}:${ref.model}` };
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The model this investigation runs on, resolved under its OWN kind so it is its own row in the
|
|
70
|
+
* workspace's model defaults and its own line in the spend rollup: the same rule each
|
|
71
|
+
* registered judge follows, and for the same reason: an investigation lumped under a shared key
|
|
72
|
+
* attributes its spend to whatever else shares that key.
|
|
73
|
+
*/
|
|
74
|
+
async resolveModel(subject) {
|
|
75
|
+
const scope = await scopeForBlockRun(subject.workspaceId, subject.block, this.deps.resolveRunContext);
|
|
76
|
+
const modelProvider = await resolveScopedModelProvider(scope, this.deps);
|
|
77
|
+
const { ref } = await resolveInlineBlockModel(this.deps, subject.workspaceId, ENVIRONMENT_INVESTIGATOR_AGENT_KIND, subject.block);
|
|
78
|
+
if (!modelProvider || !ref) {
|
|
79
|
+
throw new ValidationError('No model is configured for the environment investigation');
|
|
80
|
+
}
|
|
81
|
+
return { modelProvider, ref };
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=EnvironmentInvestigationService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentInvestigationService.js","sourceRoot":"","sources":["../../../src/modules/execution/EnvironmentInvestigationService.ts"],"names":[],"mappings":"AAAA,OAAO,E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QACxE,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,uBAAuB,CAC3C,IAAI,CAAC,IAAI,EACT,OAAO,CAAC,WAAW,EACnB,mCAAmC,EACnC,OAAO,CAAC,KAAK,CACd,CAAA;QACD,IAAI,CAAC,aAAa,IAAI,CAAC,GAAG,EAAE,CAAC;YAC3B,MAAM,IAAI,eAAe,CAAC,0DAA0D,CAAC,CAAA;QACvF,CAAC;QACD,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,CAAA;IAC/B,CAAC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AccountRepository, AgentExecutor, AgentPromptRepository, BinaryGeneratorSource, BlockRepository, BlueprintService, BrainstormSessionRepository, BrainstormStage, BranchUpdater, ClarityReviewRepository, Clock, ConsensusGroupRepository, DocInterviewRepository, DocumentRepository, LinkedDocumentRefresher, ExecutionEventPublisher, ExecutionRepository, GateOutcomeRepository, GateRegistry, GroupCacheHandle, IdGenerator, InitiativePresetRegistry, InitiativeRepository, IssueWritebackProvider, JudgeAssessor, JudgeRegistry, LocalModelDeclarationsCacheValue, LocalModelEndpointRepository, Logger, ModelPresetCacheValue, ModelPresetRepository, ModelRef, OperationalMetrics, PipelineRegistry, PipelineRepository, PrVerificationReportPublisher, ProviderCapabilities, ProviderRegistry, ProvisioningLogRepository, PullRequestMerger, RequirementReviewRepository, ResolveBinaryArtifactStore, ResolveRunRepoContext, RiskPolicyCacheValue, WorkspaceRiskPolicyReader, RunInitiatorScope, RunLifecycleSink, StepResolverRegistry, SubscriptionActivationRepository, TaskRepository, TaskTypeRegistry, TestSecretRef, TicketTrackerProvider, WorkRunner, WorkspaceAgentSettingsRepository, WorkspaceRepository, WorkspaceSettingsRepository } from '@cat-factory/kernel';
|
|
1
|
+
import type { AccountRepository, AgentExecutor, AgentPromptRepository, BinaryGeneratorSource, BlockRepository, BlueprintService, BrainstormSessionRepository, BrainstormStage, BranchUpdater, ClarityReviewRepository, Clock, ConsensusGroupRepository, DocInterviewRepository, DocumentRepository, LinkedDocumentRefresher, ExecutionEventPublisher, ExecutionRepository, GateOutcomeRepository, GateRegistry, GroupCacheHandle, IdGenerator, InitiativePresetRegistry, InitiativeRepository, IssueWritebackProvider, EnvironmentInvestigator, JudgeAssessor, JudgeRegistry, LocalModelDeclarationsCacheValue, LocalModelEndpointRepository, Logger, ModelPresetCacheValue, ModelPresetRepository, ModelRef, OperationalMetrics, PipelineRegistry, PipelineRepository, PrVerificationReportPublisher, ProviderCapabilities, ProviderRegistry, ProvisioningLogRepository, PullRequestMerger, RequirementReviewRepository, ResolveBinaryArtifactStore, ResolveRunRepoContext, RiskPolicyCacheValue, WorkspaceRiskPolicyReader, RunInitiatorScope, RunLifecycleSink, StepResolverRegistry, SubscriptionActivationRepository, TaskRepository, TaskTypeRegistry, TestSecretRef, TicketTrackerProvider, WorkRunner, WorkspaceAgentSettingsRepository, WorkspaceRepository, WorkspaceSettingsRepository } from '@cat-factory/kernel';
|
|
2
2
|
import type { AgentKindRegistry, AgentKindSource } from '@cat-factory/agents';
|
|
3
3
|
import type { ResolvedValidationChecks } from '@cat-factory/contracts';
|
|
4
4
|
import type { BugIntakeService, EnvironmentProvisioningService, EnvironmentTeardownService } from '@cat-factory/integrations';
|
|
@@ -82,6 +82,11 @@ export interface ExecutionServiceDependencies {
|
|
|
82
82
|
*/
|
|
83
83
|
judgeRegistry: JudgeRegistry;
|
|
84
84
|
judgeAssessor?: JudgeAssessor;
|
|
85
|
+
/**
|
|
86
|
+
* The inline diagnosis behind the deployer's environment-investigation loop; see
|
|
87
|
+
* {@link RunDispatcherDependencies.environmentInvestigator}.
|
|
88
|
+
*/
|
|
89
|
+
environmentInvestigator?: EnvironmentInvestigator;
|
|
85
90
|
/**
|
|
86
91
|
* The app-owned step-completion-resolver registry (deployment-registered resolvers),
|
|
87
92
|
* threaded to the dispatcher. `createCore` defaults it to `defaultStepResolverRegistry()`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionServiceDependencies.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/ExecutionServiceDependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,2BAA2B,EAC3B,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,KAAK,EACL,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,gCAAgC,EAChC,4BAA4B,EAC5B,MAAM,EACN,qBAAqB,EACrB,qBAAqB,EACrB,QAAQ,EACR,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,6BAA6B,EAC7B,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,iBAAiB,EACjB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,gCAAgC,EAChC,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,UAAU,EACV,gCAAgC,EAChC,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,KAAK,EACV,gBAAgB,EAChB,8BAA8B,EAC9B,0BAA0B,EAC3B,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA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,2BAA2B,CAAA;IACzD;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
|
|
1
|
+
{"version":3,"file":"ExecutionServiceDependencies.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/ExecutionServiceDependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,2BAA2B,EAC3B,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,KAAK,EACL,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,gCAAgC,EAChC,4BAA4B,EAC5B,MAAM,EACN,qBAAqB,EACrB,qBAAqB,EACrB,QAAQ,EACR,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,6BAA6B,EAC7B,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,iBAAiB,EACjB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,gCAAgC,EAChC,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,UAAU,EACV,gCAAgC,EAChC,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,KAAK,E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