@cat-factory/orchestration 0.16.0 → 0.18.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.d.ts +12 -1
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +16 -5
- package/dist/container.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/modules/execution/AgentContextBuilder.d.ts +18 -0
- package/dist/modules/execution/AgentContextBuilder.d.ts.map +1 -1
- package/dist/modules/execution/AgentContextBuilder.js +10 -6
- package/dist/modules/execution/AgentContextBuilder.js.map +1 -1
- package/dist/modules/execution/ExecutionService.d.ts +22 -4
- package/dist/modules/execution/ExecutionService.d.ts.map +1 -1
- package/dist/modules/execution/ExecutionService.js +44 -7
- package/dist/modules/execution/ExecutionService.js.map +1 -1
- package/dist/modules/notifications/NotificationService.d.ts +1 -10
- package/dist/modules/notifications/NotificationService.d.ts.map +1 -1
- package/dist/modules/notifications/NotificationService.js.map +1 -1
- package/package.json +8 -8
- package/dist/modules/execution/gates.d.ts +0 -115
- package/dist/modules/execution/gates.d.ts.map +0 -1
- package/dist/modules/execution/gates.js +0 -20
- package/dist/modules/execution/gates.js.map +0 -1
- package/dist/modules/execution/stepResolvers.d.ts +0 -41
- package/dist/modules/execution/stepResolvers.d.ts.map +0 -1
- package/dist/modules/execution/stepResolvers.js +0 -2
- package/dist/modules/execution/stepResolvers.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Clock, IdGenerator, Notification, NotificationChannel,
|
|
1
|
+
import type { Clock, IdGenerator, Notification, NotificationChannel, NotificationRepository, RaiseNotificationInput, ResolveNotificationAction } from '@cat-factory/kernel';
|
|
2
2
|
import type { WorkspaceRepository } from '@cat-factory/kernel';
|
|
3
3
|
export interface NotificationServiceDependencies {
|
|
4
4
|
notificationRepository: NotificationRepository;
|
|
@@ -13,15 +13,6 @@ export interface NotificationServiceDependencies {
|
|
|
13
13
|
*/
|
|
14
14
|
channel?: NotificationChannel;
|
|
15
15
|
}
|
|
16
|
-
/** What a caller (the execution engine) supplies to raise a notification. */
|
|
17
|
-
export interface RaiseNotificationInput {
|
|
18
|
-
type: NotificationType;
|
|
19
|
-
blockId: string | null;
|
|
20
|
-
executionId: string | null;
|
|
21
|
-
title: string;
|
|
22
|
-
body: string;
|
|
23
|
-
payload?: NotificationPayload | null;
|
|
24
|
-
}
|
|
25
16
|
/**
|
|
26
17
|
* Owns the lifecycle of human-actionable notifications: the canonical D1-backed
|
|
27
18
|
* store (so the inbox + snapshot can render them) plus delivery to the configured
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationService.d.ts","sourceRoot":"","sources":["../../../src/modules/notifications/NotificationService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,
|
|
1
|
+
{"version":3,"file":"NotificationService.d.ts","sourceRoot":"","sources":["../../../src/modules/notifications/NotificationService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,qBAAqB,CAAA;AAE5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAE9D,MAAM,WAAW,+BAA+B;IAC9C,sBAAsB,EAAE,sBAAsB,CAAA;IAC9C,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,EAAE,KAAK,CAAA;IACZ;;;;;OAKG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B;AAED;;;;;;GAMG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAwB;IACtD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAqB;IACzD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IACzC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAO;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAqB;IAE9C,YAAY,IAAI,EAAE,+BAA+B,EAMhD;IAED;;;;OAIG;IACG,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,YAAY,CAAC,CAuBrF;IAED,kFAAkF;IAC5E,OAAO,CACX,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,YAAY,CAAC,CAYvB;IAED,2EAA2E;IACrE,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAE3D;IAED;;;;;;;;OAQG;IACG,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAc9E;IAED;;;;;;;;OAQG;IACG,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAY1F;IAED,4CAA4C;IACtC,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAEvE;IAED,mFAAmF;YACrE,OAAO;CAQtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationService.js","sourceRoot":"","sources":["../../../src/modules/notifications/NotificationService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NotificationService.js","sourceRoot":"","sources":["../../../src/modules/notifications/NotificationService.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAiBnE;;;;;;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AAE,CAAC,CAAA;IAChD,CAAC;IAED,mFAAmF;IAC3E,KAAK,CAAC,OAAO,CAAC,WAAmB,EAAE,YAA0B;QACnE,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAM;QACzB,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,YAAY,CAAC,CAAA;QACvD,CAAC;QAAC,MAAM,CAAC;YACP,6EAA6E;QAC/E,CAAC;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/orchestration",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
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",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"ai": "^6.0.209",
|
|
28
|
-
"@cat-factory/agents": "0.
|
|
29
|
-
"@cat-factory/contracts": "0.
|
|
30
|
-
"@cat-factory/integrations": "0.
|
|
31
|
-
"@cat-factory/kernel": "0.
|
|
32
|
-
"@cat-factory/prompt-fragments": "0.7.
|
|
33
|
-
"@cat-factory/spend": "0.8.
|
|
34
|
-
"@cat-factory/workspaces": "0.7.
|
|
28
|
+
"@cat-factory/agents": "0.14.1",
|
|
29
|
+
"@cat-factory/contracts": "0.22.0",
|
|
30
|
+
"@cat-factory/integrations": "0.17.1",
|
|
31
|
+
"@cat-factory/kernel": "0.23.0",
|
|
32
|
+
"@cat-factory/prompt-fragments": "0.7.19",
|
|
33
|
+
"@cat-factory/spend": "0.8.22",
|
|
34
|
+
"@cat-factory/workspaces": "0.7.28"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"typescript": "7.0.1-rc",
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import type { Block, ExecutionInstance, GateAttempt, GateStepState, MergeThresholdPreset, PipelineStep } from '@cat-factory/kernel';
|
|
2
|
-
/** The outcome of a single gate precheck against its provider. */
|
|
3
|
-
export interface GateProbe {
|
|
4
|
-
/**
|
|
5
|
-
* - `pass` — the precheck is satisfied; the step finishes and the run advances
|
|
6
|
-
* (the "skip the agent" path — nothing was spun up).
|
|
7
|
-
* - `pending` — the provider is still computing; keep polling.
|
|
8
|
-
* - `fail` — the precheck failed; escalate to the helper agent (or give up once
|
|
9
|
-
* the attempt budget is spent).
|
|
10
|
-
*/
|
|
11
|
-
status: 'pass' | 'pending' | 'fail';
|
|
12
|
-
/** The PR head commit the precheck ran against, or null when there is no open PR. */
|
|
13
|
-
headSha: string | null;
|
|
14
|
-
/** Step output recorded on `pass` (a short human-readable reason). */
|
|
15
|
-
passOutput?: string;
|
|
16
|
-
/** A summary of what failed on `fail` — fed to the helper agent and the give-up error. */
|
|
17
|
-
failureSummary?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Structured failing checks behind {@link failureSummary} (the CI gate populates
|
|
20
|
-
* this from the red check runs; the conflicts gate leaves it undefined). Persisted
|
|
21
|
-
* onto `step.gate` so the run-detail UI can list each failing check.
|
|
22
|
-
*/
|
|
23
|
-
failingChecks?: {
|
|
24
|
-
name: string;
|
|
25
|
-
conclusion: string | null;
|
|
26
|
-
url?: string | null;
|
|
27
|
-
}[];
|
|
28
|
-
}
|
|
29
|
-
/** The relevant outcome of a finished gate-helper job, for recording an attempt. */
|
|
30
|
-
export type GateHelperOutcome = {
|
|
31
|
-
state: 'done';
|
|
32
|
-
output: string | null;
|
|
33
|
-
} | {
|
|
34
|
-
state: 'failed';
|
|
35
|
-
error: string | null;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Build the record of a just-finished gate-helper attempt (a ci-fixer / conflict-resolver
|
|
39
|
-
* run) for {@link GateStepState.attemptLog}. The summary is the helper's OWN account — its
|
|
40
|
-
* output on completion (which the conflict-resolver fills with the files it left
|
|
41
|
-
* conflicting), or the error on failure — tagged with the current attempt number + the
|
|
42
|
-
* gated head sha. The gate's next precheck remains the source of truth for pass/fail; this
|
|
43
|
-
* is purely the per-attempt history the UI shows so a looping gate isn't a black box.
|
|
44
|
-
*/
|
|
45
|
-
export declare function recordGateAttempt(gate: Pick<GateStepState, 'attempts' | 'headSha'>, outcome: GateHelperOutcome, at: number): GateAttempt;
|
|
46
|
-
/** Inputs to a gate's exhaustion handler (budget spent / no executor to escalate to). */
|
|
47
|
-
export interface GateExhaustedArgs {
|
|
48
|
-
workspaceId: string;
|
|
49
|
-
instance: ExecutionInstance;
|
|
50
|
-
block: Block;
|
|
51
|
-
step: PipelineStep;
|
|
52
|
-
summary?: string;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* The per-gate differentiators the engine's generic gate machine needs. Everything
|
|
56
|
-
* shared (the state machine, persistence, dispatch, budget) lives in ExecutionService.
|
|
57
|
-
*/
|
|
58
|
-
export interface GateDefinition {
|
|
59
|
-
/** Matches the step's `agentKind` (e.g. `ci`, `conflicts`). */
|
|
60
|
-
kind: string;
|
|
61
|
-
/** The container agent kind dispatched on a failed precheck (e.g. `ci-fixer`). */
|
|
62
|
-
helperKind: string;
|
|
63
|
-
/** Whether the gate's provider is wired. When false the gate is a pass-through. */
|
|
64
|
-
wired(): boolean;
|
|
65
|
-
/** Step output recorded when the gate passes through (no provider configured). */
|
|
66
|
-
unwiredOutput: string;
|
|
67
|
-
/**
|
|
68
|
-
* What to do when the durable driver's poll budget (ciMaxPolls × ciPollInterval) is
|
|
69
|
-
* spent while the gate is still `pending` — distinct from the attempt budget (helper
|
|
70
|
-
* dispatches) handled by {@link onExhausted}:
|
|
71
|
-
* - `fail` (default) — the precheck never settled, which is a failure for the CI /
|
|
72
|
-
* conflicts gates (CI never went green / the PR never became mergeable).
|
|
73
|
-
* - `pass` — for a time-windowed watch gate (post-release-health), running out of
|
|
74
|
-
* polls just means the watch window outlasted the budget with NO regression seen,
|
|
75
|
-
* which is a healthy pass — not a timeout failure.
|
|
76
|
-
* Resolved by {@link ExecutionService.resolveGatePollExhaustion}.
|
|
77
|
-
*/
|
|
78
|
-
pollExhaustion?: 'pass' | 'fail';
|
|
79
|
-
/**
|
|
80
|
-
* Run the precheck against the provider and classify it. Receives the live gate
|
|
81
|
-
* state so a time-windowed gate (post-release-health) can read its `watchSince`.
|
|
82
|
-
*/
|
|
83
|
-
probe(workspaceId: string, blockId: string, gateState: GateStepState): Promise<GateProbe>;
|
|
84
|
-
/**
|
|
85
|
-
* Optional: the attempt budget for this gate, resolved from the task's merge preset.
|
|
86
|
-
* Defaults to `ciMaxAttempts` when omitted (the CI/conflicts gates use that).
|
|
87
|
-
*/
|
|
88
|
-
attemptBudget?(preset: Pick<MergeThresholdPreset, 'ciMaxAttempts' | 'releaseMaxAttempts'>): number;
|
|
89
|
-
/**
|
|
90
|
-
* Optional extra context handed to the helper agent on escalation (the CI gate
|
|
91
|
-
* passes the failing-check summary; the conflicts gate passes nothing).
|
|
92
|
-
*/
|
|
93
|
-
helperPriorOutput?(summary: string): {
|
|
94
|
-
agentKind: string;
|
|
95
|
-
output: string;
|
|
96
|
-
} | undefined;
|
|
97
|
-
/**
|
|
98
|
-
* Optional async builder for richer helper context (gathered at dispatch time), used
|
|
99
|
-
* when a gate's helper needs more than the precheck summary — e.g. the on-call agent
|
|
100
|
-
* gets the full Datadog evidence bundle. Returns prior-output entries appended after
|
|
101
|
-
* the base context's. Takes precedence over {@link helperPriorOutput} when present.
|
|
102
|
-
*/
|
|
103
|
-
gatherHelperPriorOutputs?(workspaceId: string, blockId: string, gateState: GateStepState): Promise<{
|
|
104
|
-
agentKind: string;
|
|
105
|
-
output: string;
|
|
106
|
-
}[]>;
|
|
107
|
-
/**
|
|
108
|
-
* Called when the attempt budget is spent (or there is no async executor to escalate
|
|
109
|
-
* to). May raise a notification; returns the message used to fail the run.
|
|
110
|
-
*/
|
|
111
|
-
onExhausted(args: GateExhaustedArgs): Promise<{
|
|
112
|
-
error: string;
|
|
113
|
-
}>;
|
|
114
|
-
}
|
|
115
|
-
//# sourceMappingURL=gates.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gates.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/gates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,YAAY,EACb,MAAM,qBAAqB,CAAA;AAa5B,kEAAkE;AAClE,MAAM,WAAW,SAAS;IACxB;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAA;IACnC,qFAAqF;IACrF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0FAA0F;IAC1F,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;OAIG;IACH,aAAa,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,EAAE,CAAA;CACnF;AAED,oFAAoF;AACpF,MAAM,MAAM,iBAAiB,GACzB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACxC;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAE7C;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,SAAS,CAAC,EACjD,OAAO,EAAE,iBAAiB,EAC1B,EAAE,EAAE,MAAM,GACT,WAAW,CAWb;AAED,yFAAyF;AACzF,MAAM,WAAW,iBAAiB;IAChC,WAA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
-
* Build the record of a just-finished gate-helper attempt (a ci-fixer / conflict-resolver
|
|
3
|
-
* run) for {@link GateStepState.attemptLog}. The summary is the helper's OWN account — its
|
|
4
|
-
* output on completion (which the conflict-resolver fills with the files it left
|
|
5
|
-
* conflicting), or the error on failure — tagged with the current attempt number + the
|
|
6
|
-
* gated head sha. The gate's next precheck remains the source of truth for pass/fail; this
|
|
7
|
-
* is purely the per-attempt history the UI shows so a looping gate isn't a black box.
|
|
8
|
-
*/
|
|
9
|
-
export function recordGateAttempt(gate, outcome, at) {
|
|
10
|
-
return {
|
|
11
|
-
attempt: gate.attempts,
|
|
12
|
-
at,
|
|
13
|
-
outcome: outcome.state === 'done' ? 'completed' : 'failed',
|
|
14
|
-
headSha: gate.headSha ?? null,
|
|
15
|
-
summary: outcome.state === 'done'
|
|
16
|
-
? outcome.output
|
|
17
|
-
: (outcome.error ?? 'The helper agent failed without finishing.'),
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=gates.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gates.js","sourceRoot":"","sources":["../../../src/modules/execution/gates.ts"],"names":[],"mappings":"AAiDA;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAAiD,EACjD,OAA0B,EAC1B,EAAU;IAEV,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,QAAQ;QACtB,EAAE;QACF,OAAO,EAAE,OAAO,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ;QAC1D,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI;QAC7B,OAAO,EACL,OAAO,CAAC,KAAK,KAAK,MAAM;YACtB,CAAC,CAAC,OAAO,CAAC,MAAM;YAChB,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,IAAI,4CAA4C,CAAC;KACtE,CAAA;AACH,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { AgentRunResult, ExecutionInstance, PipelineStep } from '@cat-factory/kernel';
|
|
2
|
-
/** Context handed to a step-completion resolver after its step's agent finished. */
|
|
3
|
-
export interface StepResolverContext {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
instance: ExecutionInstance;
|
|
6
|
-
step: PipelineStep;
|
|
7
|
-
/** The finished agent's structured result (the resolver acts on it mechanically). */
|
|
8
|
-
result: AgentRunResult;
|
|
9
|
-
/** Whether this step is the pipeline's last (resolvers rarely need it). */
|
|
10
|
-
isFinalStep: boolean;
|
|
11
|
-
}
|
|
12
|
-
/** The outcome of a post-completion resolver. */
|
|
13
|
-
export interface StepResolution {
|
|
14
|
-
/** Replacement step output (e.g. a human-readable merge summary). */
|
|
15
|
-
output?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Set when the resolver has already decided the block's TERMINAL status itself (the
|
|
18
|
-
* merger flips the block to `done` on a real merge or `pr_ready` on a review). The
|
|
19
|
-
* engine's `finalizeBlock` then only backstops a block the resolver left untouched.
|
|
20
|
-
*/
|
|
21
|
-
ownsTerminalStatus?: boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Deterministic backend logic run after an agent step completes, keyed by `agentKind`.
|
|
25
|
-
* Registered in {@link ExecutionService} (see `buildStepResolverRegistry`); the engine
|
|
26
|
-
* runs the matching resolver in `recordStepResult` once the step's agent has finished,
|
|
27
|
-
* regardless of the step's position in the pipeline.
|
|
28
|
-
*/
|
|
29
|
-
export interface StepCompletionResolver {
|
|
30
|
-
/** Matches the step's `agentKind` (e.g. `merger`). */
|
|
31
|
-
kind: string;
|
|
32
|
-
/**
|
|
33
|
-
* Whether this resolver applies to the finished step's result — lets a resolver no-op
|
|
34
|
-
* when its agent produced nothing to act on (e.g. the merger returned no assessment).
|
|
35
|
-
* Defaults to always-applies when omitted.
|
|
36
|
-
*/
|
|
37
|
-
applies?(result: AgentRunResult): boolean;
|
|
38
|
-
/** Run the mechanical post-completion logic. */
|
|
39
|
-
resolve(ctx: StepResolverContext): Promise<StepResolution | void>;
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=stepResolvers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stepResolvers.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/stepResolvers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAqB1F,oFAAoF;AACpF,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,IAAI,EAAE,YAAY,CAAA;IAClB,qFAAqF;IACrF,MAAM,EAAE,cAAc,CAAA;IACtB,2EAA2E;IAC3E,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,iDAAiD;AACjD,MAAM,WAAW,cAAc;IAC7B,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,OAAO,CAAC,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAA;IACzC,gDAAgD;IAChD,OAAO,CAAC,GAAG,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;CAClE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stepResolvers.js","sourceRoot":"","sources":["../../../src/modules/execution/stepResolvers.ts"],"names":[],"mappings":""}
|