@exaudeus/workrail 3.39.0 → 3.40.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/cli-worktrain.js +50 -26
- package/dist/console-ui/assets/{index-3oXZ_A9m.js → index-CXWCAonr.js} +1 -1
- package/dist/console-ui/index.html +1 -1
- package/dist/coordinators/pr-review.d.ts +6 -1
- package/dist/coordinators/pr-review.js +60 -5
- package/dist/daemon/workflow-runner.d.ts +3 -2
- package/dist/daemon/workflow-runner.js +6 -3
- package/dist/manifest.json +56 -40
- package/dist/mcp/output-schemas.d.ts +10 -10
- package/dist/mcp/tools.d.ts +12 -12
- package/dist/trigger/trigger-router.js +9 -2
- package/dist/types/workflow-source.d.ts +0 -1
- package/dist/types/workflow-source.js +3 -6
- package/dist/types/workflow.d.ts +1 -1
- package/dist/types/workflow.js +1 -2
- package/dist/v2/durable-core/domain/artifact-contract-validator.js +66 -0
- package/dist/v2/durable-core/schemas/artifacts/coordinator-signal.d.ts +25 -0
- package/dist/v2/durable-core/schemas/artifacts/coordinator-signal.js +31 -0
- package/dist/v2/durable-core/schemas/artifacts/index.d.ts +3 -1
- package/dist/v2/durable-core/schemas/artifacts/index.js +14 -1
- package/dist/v2/durable-core/schemas/artifacts/review-verdict.d.ts +41 -0
- package/dist/v2/durable-core/schemas/artifacts/review-verdict.js +30 -0
- package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +236 -236
- package/dist/v2/durable-core/schemas/session/events.d.ts +50 -50
- package/dist/v2/durable-core/schemas/session/gaps.d.ts +2 -2
- package/dist/v2/durable-core/schemas/session/manifest.d.ts +4 -4
- package/dist/v2/durable-core/schemas/session/outputs.d.ts +8 -8
- package/dist/v2/usecases/console-routes.js +178 -0
- package/docs/design/coordinator-artifact-protocol-design-candidates.md +155 -0
- package/docs/design/coordinator-artifact-protocol-design-review.md +103 -0
- package/docs/design/coordinator-artifact-protocol-implementation-plan.md +259 -0
- package/docs/ideas/backlog.md +158 -100
- package/package.json +1 -1
- package/workflows/mr-review-workflow.agentic.v2.json +5 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>WorkRail Console</title>
|
|
7
|
-
<script type="module" crossorigin src="/console/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/console/assets/index-CXWCAonr.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/console/assets/index-8dh0Psu-.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
@@ -5,6 +5,7 @@ export interface ReviewFindings {
|
|
|
5
5
|
readonly severity: ReviewSeverity;
|
|
6
6
|
readonly findingSummaries: readonly string[];
|
|
7
7
|
readonly raw: string;
|
|
8
|
+
readonly source?: 'artifact' | 'keyword_scan';
|
|
8
9
|
}
|
|
9
10
|
export interface PrSummary {
|
|
10
11
|
readonly number: number;
|
|
@@ -37,7 +38,10 @@ export interface PrReviewOpts {
|
|
|
37
38
|
export interface CoordinatorDeps {
|
|
38
39
|
readonly spawnSession: (workflowId: string, goal: string, workspace: string) => Promise<Result<string, string>>;
|
|
39
40
|
readonly awaitSessions: (handles: readonly string[], timeoutMs: number) => Promise<AwaitResult>;
|
|
40
|
-
readonly getAgentResult: (sessionHandle: string) => Promise<
|
|
41
|
+
readonly getAgentResult: (sessionHandle: string) => Promise<{
|
|
42
|
+
recapMarkdown: string | null;
|
|
43
|
+
artifacts: readonly unknown[];
|
|
44
|
+
}>;
|
|
41
45
|
readonly listOpenPRs: (workspace: string) => Promise<PrSummary[]>;
|
|
42
46
|
readonly mergePR: (prNumber: number, workspace: string) => Promise<Result<void, string>>;
|
|
43
47
|
readonly writeFile: (path: string, content: string) => Promise<void>;
|
|
@@ -46,6 +50,7 @@ export interface CoordinatorDeps {
|
|
|
46
50
|
readonly port: number;
|
|
47
51
|
}
|
|
48
52
|
export declare function parseFindingsFromNotes(notes: string | null): Result<ReviewFindings, string>;
|
|
53
|
+
export declare function readVerdictArtifact(artifacts: readonly unknown[], sessionHandle?: string): ReviewFindings | null;
|
|
49
54
|
export declare function buildFixGoal(prNumber: number, findings: ReviewFindings): string;
|
|
50
55
|
export declare function formatElapsed(ms: number): string;
|
|
51
56
|
export declare function discoverConsolePort(deps: Pick<CoordinatorPortDiscoveryDeps, 'readFile' | 'homedir' | 'joinPath'>, portOverride?: number): Promise<number>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parseFindingsFromNotes = parseFindingsFromNotes;
|
|
4
|
+
exports.readVerdictArtifact = readVerdictArtifact;
|
|
4
5
|
exports.buildFixGoal = buildFixGoal;
|
|
5
6
|
exports.formatElapsed = formatElapsed;
|
|
6
7
|
exports.discoverConsolePort = discoverConsolePort;
|
|
7
8
|
exports.runPrReviewCoordinator = runPrReviewCoordinator;
|
|
8
9
|
const result_js_1 = require("../runtime/result.js");
|
|
10
|
+
const review_verdict_js_1 = require("../v2/durable-core/schemas/artifacts/review-verdict.js");
|
|
9
11
|
const MAX_FIX_PASSES = 3;
|
|
10
12
|
const CHILD_SESSION_TIMEOUT_MS = 15 * 60 * 1000;
|
|
11
13
|
const COORDINATOR_MAX_MS = 90 * 60 * 1000;
|
|
@@ -48,6 +50,7 @@ function parseFindingsFromNotes(notes) {
|
|
|
48
50
|
severity: 'blocking',
|
|
49
51
|
findingSummaries: extractFindingSummaries(notes),
|
|
50
52
|
raw: notes,
|
|
53
|
+
source: 'keyword_scan',
|
|
51
54
|
});
|
|
52
55
|
}
|
|
53
56
|
const hasCleanKeyword = upperNotes.includes('APPROVE') ||
|
|
@@ -64,6 +67,7 @@ function parseFindingsFromNotes(notes) {
|
|
|
64
67
|
severity: 'clean',
|
|
65
68
|
findingSummaries: [],
|
|
66
69
|
raw: notes,
|
|
70
|
+
source: 'keyword_scan',
|
|
67
71
|
});
|
|
68
72
|
}
|
|
69
73
|
if (hasMinorKeyword) {
|
|
@@ -71,14 +75,39 @@ function parseFindingsFromNotes(notes) {
|
|
|
71
75
|
severity: 'minor',
|
|
72
76
|
findingSummaries: extractFindingSummaries(notes),
|
|
73
77
|
raw: notes,
|
|
78
|
+
source: 'keyword_scan',
|
|
74
79
|
});
|
|
75
80
|
}
|
|
76
81
|
return (0, result_js_1.ok)({
|
|
77
82
|
severity: 'unknown',
|
|
78
83
|
findingSummaries: [],
|
|
79
84
|
raw: notes,
|
|
85
|
+
source: 'keyword_scan',
|
|
80
86
|
});
|
|
81
87
|
}
|
|
88
|
+
function readVerdictArtifact(artifacts, sessionHandle) {
|
|
89
|
+
const handlePrefix = sessionHandle ? sessionHandle.slice(0, 16) : 'unknown';
|
|
90
|
+
for (const raw of artifacts) {
|
|
91
|
+
if (!(0, review_verdict_js_1.isReviewVerdictArtifact)(raw))
|
|
92
|
+
continue;
|
|
93
|
+
const result = review_verdict_js_1.ReviewVerdictArtifactV1Schema.safeParse(raw);
|
|
94
|
+
if (!result.success) {
|
|
95
|
+
const issues = result.error.issues
|
|
96
|
+
.map((i) => `${i.path.join('.')}: ${i.message}`)
|
|
97
|
+
.join('; ');
|
|
98
|
+
process.stderr.write(`[WARN coord:reason=artifact_parse_failed handle=${handlePrefix}] readVerdictArtifact: wr.review_verdict schema validation failed: ${issues}\n`);
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const v = result.data;
|
|
102
|
+
return {
|
|
103
|
+
severity: v.verdict,
|
|
104
|
+
findingSummaries: v.findings.map((f) => f.summary),
|
|
105
|
+
raw: JSON.stringify(v),
|
|
106
|
+
source: 'artifact',
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
82
111
|
function extractFindingSummaries(notes) {
|
|
83
112
|
const summaries = [];
|
|
84
113
|
const lines = notes.split('\n');
|
|
@@ -220,10 +249,26 @@ async function runPrReviewCoordinator(deps, opts) {
|
|
|
220
249
|
const elapsedMs = sessionResult.durationMs;
|
|
221
250
|
const handle = sessionResult.handle;
|
|
222
251
|
let notes = null;
|
|
252
|
+
let artifacts = [];
|
|
223
253
|
if (sessionResult.outcome === 'success') {
|
|
224
|
-
|
|
254
|
+
const agentResult = await deps.getAgentResult(handle);
|
|
255
|
+
notes = agentResult.recapMarkdown;
|
|
256
|
+
artifacts = agentResult.artifacts;
|
|
225
257
|
}
|
|
226
|
-
const
|
|
258
|
+
const verdictFromArtifact = readVerdictArtifact(artifacts, handle);
|
|
259
|
+
const findingsResult = verdictFromArtifact !== null
|
|
260
|
+
? (() => {
|
|
261
|
+
deps.stderr(`[INFO coord:source=artifact handle=${handle.slice(0, 16)}] readVerdictArtifact succeeded`);
|
|
262
|
+
return (0, result_js_1.ok)(verdictFromArtifact);
|
|
263
|
+
})()
|
|
264
|
+
: (() => {
|
|
265
|
+
const keywordResult = parseFindingsFromNotes(notes);
|
|
266
|
+
if (keywordResult.kind === 'ok') {
|
|
267
|
+
const reason = artifacts.length > 0 ? 'no_valid_artifact' : 'no_artifacts';
|
|
268
|
+
deps.stderr(`[INFO coord:source=keyword_scan reason=${reason} artifactCount=${artifacts.length} handle=${handle.slice(0, 16)}]`);
|
|
269
|
+
}
|
|
270
|
+
return keywordResult;
|
|
271
|
+
})();
|
|
227
272
|
const severity = findingsResult.kind === 'ok'
|
|
228
273
|
? findingsResult.value.severity
|
|
229
274
|
: 'unknown';
|
|
@@ -440,8 +485,18 @@ async function runFixAgentLoop(deps, opts, pr, initialFindings, initialOutcome,
|
|
|
440
485
|
escalationReason: `re-review ${outcome} (pass ${passCount})`,
|
|
441
486
|
};
|
|
442
487
|
}
|
|
443
|
-
const
|
|
444
|
-
const
|
|
488
|
+
const reAgentResult = await deps.getAgentResult(reReviewHandle);
|
|
489
|
+
const reVerdictFromArtifact = readVerdictArtifact(reAgentResult.artifacts, reReviewHandle);
|
|
490
|
+
const reFindingsResult = reVerdictFromArtifact !== null
|
|
491
|
+
? (() => {
|
|
492
|
+
deps.stderr(`[INFO coord:source=artifact handle=${reReviewHandle.slice(0, 16)}] readVerdictArtifact succeeded (re-review pass ${passCount})`);
|
|
493
|
+
return (0, result_js_1.ok)(reVerdictFromArtifact);
|
|
494
|
+
})()
|
|
495
|
+
: (() => {
|
|
496
|
+
const reason = reAgentResult.artifacts.length > 0 ? 'no_valid_artifact' : 'no_artifacts';
|
|
497
|
+
deps.stderr(`[INFO coord:source=keyword_scan reason=${reason} artifactCount=${reAgentResult.artifacts.length} handle=${reReviewHandle.slice(0, 16)}]`);
|
|
498
|
+
return parseFindingsFromNotes(reAgentResult.recapMarkdown);
|
|
499
|
+
})();
|
|
445
500
|
const reSeverity = reFindingsResult.kind === 'ok'
|
|
446
501
|
? reFindingsResult.value.severity
|
|
447
502
|
: 'unknown';
|
|
@@ -477,7 +532,7 @@ async function runFixAgentLoop(deps, opts, pr, initialFindings, initialOutcome,
|
|
|
477
532
|
}
|
|
478
533
|
currentFindings = reFindingsResult.kind === 'ok'
|
|
479
534
|
? reFindingsResult.value
|
|
480
|
-
: { severity: 'minor', findingSummaries: [], raw:
|
|
535
|
+
: { severity: 'minor', findingSummaries: [], raw: reAgentResult.recapMarkdown ?? '' };
|
|
481
536
|
}
|
|
482
537
|
log(` PR #${pr.number} -> ${MAX_FIX_PASSES} fix passes exhausted, escalating`);
|
|
483
538
|
return {
|
|
@@ -29,6 +29,7 @@ export interface WorkflowRunSuccess {
|
|
|
29
29
|
readonly workflowId: string;
|
|
30
30
|
readonly stopReason: string;
|
|
31
31
|
readonly lastStepNotes?: string;
|
|
32
|
+
readonly lastStepArtifacts?: readonly unknown[];
|
|
32
33
|
}
|
|
33
34
|
export interface WorkflowRunError {
|
|
34
35
|
readonly _tag: 'error';
|
|
@@ -64,8 +65,8 @@ export declare function readDaemonSessionState(sessionId: string): Promise<{
|
|
|
64
65
|
} | null>;
|
|
65
66
|
export declare function readAllDaemonSessions(sessionsDir?: string): Promise<OrphanedSession[]>;
|
|
66
67
|
export declare function runStartupRecovery(sessionsDir?: string): Promise<void>;
|
|
67
|
-
export declare function makeContinueWorkflowTool(sessionId: string, ctx: V2ToolContext, onAdvance: (nextStepText: string, continueToken: string) => void, onComplete: (notes: string | undefined) => void, schemas: Record<string, any>, _executeContinueWorkflowFn?: typeof executeContinueWorkflow, emitter?: DaemonEventEmitter, workrailSessionId?: string | null): AgentTool;
|
|
68
|
-
export declare function makeCompleteStepTool(sessionId: string, ctx: V2ToolContext, getCurrentToken: () => string, onAdvance: (nextStepText: string, continueToken: string) => void, onComplete: (notes: string | undefined) => void, onTokenUpdate: (t: string) => void, schemas: Record<string, any>, _executeContinueWorkflowFn?: typeof executeContinueWorkflow, emitter?: DaemonEventEmitter, workrailSessionId?: string | null): AgentTool;
|
|
68
|
+
export declare function makeContinueWorkflowTool(sessionId: string, ctx: V2ToolContext, onAdvance: (nextStepText: string, continueToken: string) => void, onComplete: (notes: string | undefined, artifacts?: readonly unknown[]) => void, schemas: Record<string, any>, _executeContinueWorkflowFn?: typeof executeContinueWorkflow, emitter?: DaemonEventEmitter, workrailSessionId?: string | null): AgentTool;
|
|
69
|
+
export declare function makeCompleteStepTool(sessionId: string, ctx: V2ToolContext, getCurrentToken: () => string, onAdvance: (nextStepText: string, continueToken: string) => void, onComplete: (notes: string | undefined, artifacts?: readonly unknown[]) => void, onTokenUpdate: (t: string) => void, schemas: Record<string, any>, _executeContinueWorkflowFn?: typeof executeContinueWorkflow, emitter?: DaemonEventEmitter, workrailSessionId?: string | null): AgentTool;
|
|
69
70
|
export declare function makeBashTool(workspacePath: string, schemas: Record<string, any>, sessionId?: string, emitter?: DaemonEventEmitter, workrailSessionId?: string | null): AgentTool;
|
|
70
71
|
export declare function makeSpawnAgentTool(sessionId: string, ctx: V2ToolContext, apiKey: string, thisWorkrailSessionId: string, currentDepth: number, maxDepth: number, runWorkflowFn: typeof runWorkflow, schemas: Record<string, any>, emitter?: DaemonEventEmitter): AgentTool;
|
|
71
72
|
export declare function makeReportIssueTool(sessionId: string, emitter?: DaemonEventEmitter, workrailSessionId?: string | null, issuesDirOverride?: string, onIssueSummary?: (summary: string) => void): AgentTool;
|
|
@@ -479,7 +479,7 @@ function makeContinueWorkflowTool(sessionId, ctx, onAdvance, onComplete, schemas
|
|
|
479
479
|
};
|
|
480
480
|
}
|
|
481
481
|
if (out.isComplete) {
|
|
482
|
-
onComplete(params.notesMarkdown);
|
|
482
|
+
onComplete(params.notesMarkdown, Array.isArray(params.artifacts) ? params.artifacts : undefined);
|
|
483
483
|
return {
|
|
484
484
|
content: [{ type: 'text', text: 'Workflow complete. All steps have been executed.' }],
|
|
485
485
|
details: out,
|
|
@@ -581,7 +581,7 @@ function makeCompleteStepTool(sessionId, ctx, getCurrentToken, onAdvance, onComp
|
|
|
581
581
|
};
|
|
582
582
|
}
|
|
583
583
|
if (out.isComplete) {
|
|
584
|
-
onComplete(notes);
|
|
584
|
+
onComplete(notes, Array.isArray(params.artifacts) ? params.artifacts : undefined);
|
|
585
585
|
return {
|
|
586
586
|
content: [{ type: 'text', text: JSON.stringify({ status: 'complete' }) }],
|
|
587
587
|
details: out,
|
|
@@ -1004,6 +1004,7 @@ async function runWorkflow(trigger, ctx, apiKey, daemonRegistry, emitter) {
|
|
|
1004
1004
|
let isComplete = false;
|
|
1005
1005
|
let pendingSteerText = null;
|
|
1006
1006
|
let lastStepNotes;
|
|
1007
|
+
let lastStepArtifacts;
|
|
1007
1008
|
let stepAdvanceCount = 0;
|
|
1008
1009
|
const lastNToolCalls = [];
|
|
1009
1010
|
const STUCK_REPEAT_THRESHOLD = 3;
|
|
@@ -1017,9 +1018,10 @@ async function runWorkflow(trigger, ctx, apiKey, daemonRegistry, emitter) {
|
|
|
1017
1018
|
daemonRegistry?.heartbeat(workrailSessionId);
|
|
1018
1019
|
emitter?.emit({ kind: 'step_advanced', sessionId, ...withWorkrailSession(workrailSessionId) });
|
|
1019
1020
|
};
|
|
1020
|
-
const onComplete = (notes) => {
|
|
1021
|
+
const onComplete = (notes, artifacts) => {
|
|
1021
1022
|
isComplete = true;
|
|
1022
1023
|
lastStepNotes = notes;
|
|
1024
|
+
lastStepArtifacts = artifacts;
|
|
1023
1025
|
};
|
|
1024
1026
|
let firstStep;
|
|
1025
1027
|
if (trigger._preAllocatedStartResponse !== undefined) {
|
|
@@ -1286,5 +1288,6 @@ async function runWorkflow(trigger, ctx, apiKey, daemonRegistry, emitter) {
|
|
|
1286
1288
|
workflowId: trigger.workflowId,
|
|
1287
1289
|
stopReason,
|
|
1288
1290
|
...(lastStepNotes !== undefined ? { lastStepNotes } : {}),
|
|
1291
|
+
...(lastStepArtifacts !== undefined ? { lastStepArtifacts } : {}),
|
|
1289
1292
|
};
|
|
1290
1293
|
}
|
package/dist/manifest.json
CHANGED
|
@@ -238,8 +238,8 @@
|
|
|
238
238
|
"bytes": 31
|
|
239
239
|
},
|
|
240
240
|
"cli-worktrain.js": {
|
|
241
|
-
"sha256": "
|
|
242
|
-
"bytes":
|
|
241
|
+
"sha256": "b5f05c66e89a4d837f42ba1710e6daa49f32a68e43821ab2453f8993ba1d8ced",
|
|
242
|
+
"bytes": 44941
|
|
243
243
|
},
|
|
244
244
|
"cli.d.ts": {
|
|
245
245
|
"sha256": "43e818adf60173644896298637f47b01d5819b17eda46eaa32d0c7d64724d012",
|
|
@@ -449,16 +449,16 @@
|
|
|
449
449
|
"sha256": "5fe866e54f796975dec5d8ba9983aefd86074db212d3fccd64eed04bc9f0b3da",
|
|
450
450
|
"bytes": 8011
|
|
451
451
|
},
|
|
452
|
-
"console-ui/assets/index-3oXZ_A9m.js": {
|
|
453
|
-
"sha256": "b4d27f6107d5100ca44bb257e724beaf88df2ab235a21bdc88d5c9bfb89009ff",
|
|
454
|
-
"bytes": 754955
|
|
455
|
-
},
|
|
456
452
|
"console-ui/assets/index-8dh0Psu-.css": {
|
|
457
453
|
"sha256": "cf9d09641f1c31fffe6c7835b30bbbad52572befec1acab7fb9a0c188431af36",
|
|
458
454
|
"bytes": 60355
|
|
459
455
|
},
|
|
456
|
+
"console-ui/assets/index-CXWCAonr.js": {
|
|
457
|
+
"sha256": "c158530b825c05ca94f709c20579976d94af944c5777958993c1146ecf912c43",
|
|
458
|
+
"bytes": 754955
|
|
459
|
+
},
|
|
460
460
|
"console-ui/index.html": {
|
|
461
|
-
"sha256": "
|
|
461
|
+
"sha256": "638d7716dfecb261d018c33aa45210c15415df5d0c036d3d6e1eb7fa8f1667fa",
|
|
462
462
|
"bytes": 417
|
|
463
463
|
},
|
|
464
464
|
"console/standalone-console.d.ts": {
|
|
@@ -470,12 +470,12 @@
|
|
|
470
470
|
"bytes": 6325
|
|
471
471
|
},
|
|
472
472
|
"coordinators/pr-review.d.ts": {
|
|
473
|
-
"sha256": "
|
|
474
|
-
"bytes":
|
|
473
|
+
"sha256": "8d2d5155b30c6d54da0ef38e3bd3c855266d57848ac60d9cf29a3325698fde28",
|
|
474
|
+
"bytes": 2815
|
|
475
475
|
},
|
|
476
476
|
"coordinators/pr-review.js": {
|
|
477
|
-
"sha256": "
|
|
478
|
-
"bytes":
|
|
477
|
+
"sha256": "70f3288df0d243312a0301ea527bfdfe1b3284f19b57a2aeb2af3792e78f65ef",
|
|
478
|
+
"bytes": 24166
|
|
479
479
|
},
|
|
480
480
|
"core/error-handler.d.ts": {
|
|
481
481
|
"sha256": "80451f12ac8e185133ec3dc4c57285491a785f27525ed21e729db1da3f61010d",
|
|
@@ -518,12 +518,12 @@
|
|
|
518
518
|
"bytes": 1009
|
|
519
519
|
},
|
|
520
520
|
"daemon/workflow-runner.d.ts": {
|
|
521
|
-
"sha256": "
|
|
522
|
-
"bytes":
|
|
521
|
+
"sha256": "6870cd7444074c43eae9451f97c9e4c0ea65462ca71ce51d9fae539defcacefc",
|
|
522
|
+
"bytes": 4710
|
|
523
523
|
},
|
|
524
524
|
"daemon/workflow-runner.js": {
|
|
525
|
-
"sha256": "
|
|
526
|
-
"bytes":
|
|
525
|
+
"sha256": "f48238053a14dc07d032cc99502507fbb2e2937284efcfab91404715fcef7e47",
|
|
526
|
+
"bytes": 63877
|
|
527
527
|
},
|
|
528
528
|
"di/container.d.ts": {
|
|
529
529
|
"sha256": "003bb7fb7478d627524b9b1e76bd0a963a243794a687ff233b96dc0e33a06d9f",
|
|
@@ -1142,7 +1142,7 @@
|
|
|
1142
1142
|
"bytes": 7991
|
|
1143
1143
|
},
|
|
1144
1144
|
"mcp/output-schemas.d.ts": {
|
|
1145
|
-
"sha256": "
|
|
1145
|
+
"sha256": "7256e28820efc7093db818fffbeca547efbdd5aca4e9d42341c47805403479d3",
|
|
1146
1146
|
"bytes": 93176
|
|
1147
1147
|
},
|
|
1148
1148
|
"mcp/output-schemas.js": {
|
|
@@ -1214,7 +1214,7 @@
|
|
|
1214
1214
|
"bytes": 479
|
|
1215
1215
|
},
|
|
1216
1216
|
"mcp/tools.d.ts": {
|
|
1217
|
-
"sha256": "
|
|
1217
|
+
"sha256": "d29bd8bfb33e9e0457deb55fc79929bd25252d0d6ec28f4768fbacc9fb2c79e9",
|
|
1218
1218
|
"bytes": 5976
|
|
1219
1219
|
},
|
|
1220
1220
|
"mcp/tools.js": {
|
|
@@ -1610,8 +1610,8 @@
|
|
|
1610
1610
|
"bytes": 2010
|
|
1611
1611
|
},
|
|
1612
1612
|
"trigger/trigger-router.js": {
|
|
1613
|
-
"sha256": "
|
|
1614
|
-
"bytes":
|
|
1613
|
+
"sha256": "46b4a49b980810e85889f3645e6160cee038e391b808ac9aea4609d8c8086455",
|
|
1614
|
+
"bytes": 15874
|
|
1615
1615
|
},
|
|
1616
1616
|
"trigger/trigger-store.d.ts": {
|
|
1617
1617
|
"sha256": "7afb05127d55bc3757a550dd15d4b797766b3fff29d1bfe76b303764b93322e7",
|
|
@@ -1662,20 +1662,20 @@
|
|
|
1662
1662
|
"bytes": 2845
|
|
1663
1663
|
},
|
|
1664
1664
|
"types/workflow-source.d.ts": {
|
|
1665
|
-
"sha256": "
|
|
1666
|
-
"bytes":
|
|
1665
|
+
"sha256": "5a5e4647827d898b4c953dfe4b2228ad06ca026ff1354fe7266c5703715a3304",
|
|
1666
|
+
"bytes": 2692
|
|
1667
1667
|
},
|
|
1668
1668
|
"types/workflow-source.js": {
|
|
1669
|
-
"sha256": "
|
|
1670
|
-
"bytes":
|
|
1669
|
+
"sha256": "2e3292177d799f3cfdaacf675d2e947931c69b1117b7e6ee3dbfb6ff24a87846",
|
|
1670
|
+
"bytes": 4004
|
|
1671
1671
|
},
|
|
1672
1672
|
"types/workflow.d.ts": {
|
|
1673
|
-
"sha256": "
|
|
1674
|
-
"bytes":
|
|
1673
|
+
"sha256": "3d4d125548f3c674859e22d9b2f68a7bcdccadbae7f15cf4bb5ee8054f8bce1c",
|
|
1674
|
+
"bytes": 2235
|
|
1675
1675
|
},
|
|
1676
1676
|
"types/workflow.js": {
|
|
1677
|
-
"sha256": "
|
|
1678
|
-
"bytes":
|
|
1677
|
+
"sha256": "2a0b176826e27d8785cd7b7104f58ee37496217211344c3dc7466ca5b7bf30e1",
|
|
1678
|
+
"bytes": 5574
|
|
1679
1679
|
},
|
|
1680
1680
|
"utils/DashboardWriter.d.ts": {
|
|
1681
1681
|
"sha256": "b56e29e0f4122642f50009bac222a990622663d22a49e4616c57ae222bc4cd4a",
|
|
@@ -1786,8 +1786,8 @@
|
|
|
1786
1786
|
"bytes": 1343
|
|
1787
1787
|
},
|
|
1788
1788
|
"v2/durable-core/domain/artifact-contract-validator.js": {
|
|
1789
|
-
"sha256": "
|
|
1790
|
-
"bytes":
|
|
1789
|
+
"sha256": "d7ad3b9c3c3bbb54616682640be23bb04b6256bb96f8fad5daf56cc0df43ec36",
|
|
1790
|
+
"bytes": 6500
|
|
1791
1791
|
},
|
|
1792
1792
|
"v2/durable-core/domain/assessment-consequence-event-builder.d.ts": {
|
|
1793
1793
|
"sha256": "9f35e91667653fe2228ccf199d1620c233a3291e7e7705931b116b250e94cef3",
|
|
@@ -2133,13 +2133,21 @@
|
|
|
2133
2133
|
"sha256": "82b2cd8a2cc618e3bce3b1e79cb9c4edc3bbd1cd801eceda95dabea90fafbb10",
|
|
2134
2134
|
"bytes": 1492
|
|
2135
2135
|
},
|
|
2136
|
+
"v2/durable-core/schemas/artifacts/coordinator-signal.d.ts": {
|
|
2137
|
+
"sha256": "9bf3d18568555f2da5a21a54e1e83934ab6f6a94df10ab4d39016a5e1561962a",
|
|
2138
|
+
"bytes": 1407
|
|
2139
|
+
},
|
|
2140
|
+
"v2/durable-core/schemas/artifacts/coordinator-signal.js": {
|
|
2141
|
+
"sha256": "b6453c5d57e4c3f05e11d4bc477821dba07e502ccd5ce98e850fb01fe3505a75",
|
|
2142
|
+
"bytes": 1242
|
|
2143
|
+
},
|
|
2136
2144
|
"v2/durable-core/schemas/artifacts/index.d.ts": {
|
|
2137
|
-
"sha256": "
|
|
2138
|
-
"bytes":
|
|
2145
|
+
"sha256": "424f87839cbb39dc0edb970c2ab2866bf69e746df713b51e84656c13c81772c5",
|
|
2146
|
+
"bytes": 1323
|
|
2139
2147
|
},
|
|
2140
2148
|
"v2/durable-core/schemas/artifacts/index.js": {
|
|
2141
|
-
"sha256": "
|
|
2142
|
-
"bytes":
|
|
2149
|
+
"sha256": "0cbd4659adcaf8ba1e5a4c176d3868fc9794764eb6f6d5061b9e4134c50f1e31",
|
|
2150
|
+
"bytes": 4827
|
|
2143
2151
|
},
|
|
2144
2152
|
"v2/durable-core/schemas/artifacts/loop-control.d.ts": {
|
|
2145
2153
|
"sha256": "714e2980400da0aaf814c691d8915653393316e70bc9af9da72130bb07e959be",
|
|
@@ -2149,6 +2157,14 @@
|
|
|
2149
2157
|
"sha256": "c4b2ed38f9fdda3fbe3e4b68b0a228890fd9a7c73117a6d202928acabe6fc0f9",
|
|
2150
2158
|
"bytes": 2115
|
|
2151
2159
|
},
|
|
2160
|
+
"v2/durable-core/schemas/artifacts/review-verdict.d.ts": {
|
|
2161
|
+
"sha256": "9f62b447edc4dfb042e1316c4cc3f005dd0afef2e6e30e6d9fff5c89e048c68c",
|
|
2162
|
+
"bytes": 1562
|
|
2163
|
+
},
|
|
2164
|
+
"v2/durable-core/schemas/artifacts/review-verdict.js": {
|
|
2165
|
+
"sha256": "72915617cb08834e37a65c45b3eb84ff04c84d6e4a12c9e87be5a90a3d80cee5",
|
|
2166
|
+
"bytes": 1206
|
|
2167
|
+
},
|
|
2152
2168
|
"v2/durable-core/schemas/compiled-workflow/index.d.ts": {
|
|
2153
2169
|
"sha256": "451822411a8c1ca5236939b6dc7a58e0a00aa4cf82bcec67ce7cc38e942fa820",
|
|
2154
2170
|
"bytes": 11821
|
|
@@ -2190,7 +2206,7 @@
|
|
|
2190
2206
|
"bytes": 3397
|
|
2191
2207
|
},
|
|
2192
2208
|
"v2/durable-core/schemas/export-bundle/index.d.ts": {
|
|
2193
|
-
"sha256": "
|
|
2209
|
+
"sha256": "521e9667b1a5167f44b8d67eec35b7b237733f41d568a150f84e31796f0ba546",
|
|
2194
2210
|
"bytes": 535324
|
|
2195
2211
|
},
|
|
2196
2212
|
"v2/durable-core/schemas/export-bundle/index.js": {
|
|
@@ -2246,7 +2262,7 @@
|
|
|
2246
2262
|
"bytes": 2138
|
|
2247
2263
|
},
|
|
2248
2264
|
"v2/durable-core/schemas/session/events.d.ts": {
|
|
2249
|
-
"sha256": "
|
|
2265
|
+
"sha256": "e49769b06e5ce888cf94c935c1f204b8def5fecc33ce526fc9c00655439d88d7",
|
|
2250
2266
|
"bytes": 80635
|
|
2251
2267
|
},
|
|
2252
2268
|
"v2/durable-core/schemas/session/events.js": {
|
|
@@ -2254,7 +2270,7 @@
|
|
|
2254
2270
|
"bytes": 12950
|
|
2255
2271
|
},
|
|
2256
2272
|
"v2/durable-core/schemas/session/gaps.d.ts": {
|
|
2257
|
-
"sha256": "
|
|
2273
|
+
"sha256": "64580ca179127c75c8b0ec8b8c5df3cb87ec315605220a2cb42eb9da48407bdc",
|
|
2258
2274
|
"bytes": 8983
|
|
2259
2275
|
},
|
|
2260
2276
|
"v2/durable-core/schemas/session/gaps.js": {
|
|
@@ -2270,7 +2286,7 @@
|
|
|
2270
2286
|
"bytes": 715
|
|
2271
2287
|
},
|
|
2272
2288
|
"v2/durable-core/schemas/session/manifest.d.ts": {
|
|
2273
|
-
"sha256": "
|
|
2289
|
+
"sha256": "ac903651f9cb59faedae49642ff9d9b52ddaa0a8c25cb3f6129b2d69572b914e",
|
|
2274
2290
|
"bytes": 1594
|
|
2275
2291
|
},
|
|
2276
2292
|
"v2/durable-core/schemas/session/manifest.js": {
|
|
@@ -2278,7 +2294,7 @@
|
|
|
2278
2294
|
"bytes": 1526
|
|
2279
2295
|
},
|
|
2280
2296
|
"v2/durable-core/schemas/session/outputs.d.ts": {
|
|
2281
|
-
"sha256": "
|
|
2297
|
+
"sha256": "bee0f72882c6eea71273b9ff6a695264e6a425408685dde6ced74d783274df66",
|
|
2282
2298
|
"bytes": 4285
|
|
2283
2299
|
},
|
|
2284
2300
|
"v2/durable-core/schemas/session/outputs.js": {
|
|
@@ -2922,8 +2938,8 @@
|
|
|
2922
2938
|
"bytes": 697
|
|
2923
2939
|
},
|
|
2924
2940
|
"v2/usecases/console-routes.js": {
|
|
2925
|
-
"sha256": "
|
|
2926
|
-
"bytes":
|
|
2941
|
+
"sha256": "ebc39fb04a1bfdfd2f9159ef7728f5a0cafd3384d6191c5a0bc6862b8918d298",
|
|
2942
|
+
"bytes": 28445
|
|
2927
2943
|
},
|
|
2928
2944
|
"v2/usecases/console-service.d.ts": {
|
|
2929
2945
|
"sha256": "fc8fe65427fa9f4f3535344b385b36f66ca06b7e3bfaea708931817a3edcad2b",
|
|
@@ -2257,9 +2257,9 @@ export declare const V2ResumeSessionOutputSchema: z.ZodObject<{
|
|
|
2257
2257
|
tool: "continue_workflow";
|
|
2258
2258
|
}>;
|
|
2259
2259
|
}, "strip", z.ZodTypeAny, {
|
|
2260
|
-
confidence: "
|
|
2261
|
-
workflowId: string;
|
|
2260
|
+
confidence: "medium" | "strong" | "weak";
|
|
2262
2261
|
sessionId: string;
|
|
2262
|
+
workflowId: string;
|
|
2263
2263
|
runId: string;
|
|
2264
2264
|
isComplete: boolean;
|
|
2265
2265
|
sessionTitle: string | null;
|
|
@@ -2278,9 +2278,9 @@ export declare const V2ResumeSessionOutputSchema: z.ZodObject<{
|
|
|
2278
2278
|
pendingStepId: string | null;
|
|
2279
2279
|
whyMatched: ("matched_exact_id" | "matched_notes" | "matched_notes_partial" | "matched_workflow_id" | "matched_head_sha" | "matched_branch" | "matched_repo_root" | "recency_fallback")[];
|
|
2280
2280
|
}, {
|
|
2281
|
-
confidence: "
|
|
2282
|
-
workflowId: string;
|
|
2281
|
+
confidence: "medium" | "strong" | "weak";
|
|
2283
2282
|
sessionId: string;
|
|
2283
|
+
workflowId: string;
|
|
2284
2284
|
runId: string;
|
|
2285
2285
|
isComplete: boolean;
|
|
2286
2286
|
sessionTitle: string | null;
|
|
@@ -2302,9 +2302,9 @@ export declare const V2ResumeSessionOutputSchema: z.ZodObject<{
|
|
|
2302
2302
|
totalEligible: z.ZodNumber;
|
|
2303
2303
|
}, "strip", z.ZodTypeAny, {
|
|
2304
2304
|
candidates: {
|
|
2305
|
-
confidence: "
|
|
2306
|
-
workflowId: string;
|
|
2305
|
+
confidence: "medium" | "strong" | "weak";
|
|
2307
2306
|
sessionId: string;
|
|
2307
|
+
workflowId: string;
|
|
2308
2308
|
runId: string;
|
|
2309
2309
|
isComplete: boolean;
|
|
2310
2310
|
sessionTitle: string | null;
|
|
@@ -2326,9 +2326,9 @@ export declare const V2ResumeSessionOutputSchema: z.ZodObject<{
|
|
|
2326
2326
|
totalEligible: number;
|
|
2327
2327
|
}, {
|
|
2328
2328
|
candidates: {
|
|
2329
|
-
confidence: "
|
|
2330
|
-
workflowId: string;
|
|
2329
|
+
confidence: "medium" | "strong" | "weak";
|
|
2331
2330
|
sessionId: string;
|
|
2331
|
+
workflowId: string;
|
|
2332
2332
|
runId: string;
|
|
2333
2333
|
isComplete: boolean;
|
|
2334
2334
|
sessionTitle: string | null;
|
|
@@ -2545,14 +2545,14 @@ export declare const CreateSessionOutputSchema: z.ZodObject<{
|
|
|
2545
2545
|
createdAt: z.ZodString;
|
|
2546
2546
|
}, "strip", z.ZodTypeAny, {
|
|
2547
2547
|
path: string;
|
|
2548
|
-
workflowId: string;
|
|
2549
2548
|
sessionId: string;
|
|
2549
|
+
workflowId: string;
|
|
2550
2550
|
dashboardUrl: string | null;
|
|
2551
2551
|
createdAt: string;
|
|
2552
2552
|
}, {
|
|
2553
2553
|
path: string;
|
|
2554
|
-
workflowId: string;
|
|
2555
2554
|
sessionId: string;
|
|
2555
|
+
workflowId: string;
|
|
2556
2556
|
dashboardUrl: string | null;
|
|
2557
2557
|
createdAt: string;
|
|
2558
2558
|
}>;
|
package/dist/mcp/tools.d.ts
CHANGED
|
@@ -61,12 +61,12 @@ export declare const CreateSessionInput: z.ZodObject<{
|
|
|
61
61
|
sessionId: z.ZodString;
|
|
62
62
|
initialData: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
63
63
|
}, "strip", z.ZodTypeAny, {
|
|
64
|
-
workflowId: string;
|
|
65
64
|
sessionId: string;
|
|
65
|
+
workflowId: string;
|
|
66
66
|
initialData: Record<string, unknown>;
|
|
67
67
|
}, {
|
|
68
|
-
workflowId: string;
|
|
69
68
|
sessionId: string;
|
|
69
|
+
workflowId: string;
|
|
70
70
|
initialData?: Record<string, unknown> | undefined;
|
|
71
71
|
}>;
|
|
72
72
|
export type CreateSessionInput = z.infer<typeof CreateSessionInput>;
|
|
@@ -75,12 +75,12 @@ export declare const UpdateSessionInput: z.ZodObject<{
|
|
|
75
75
|
sessionId: z.ZodString;
|
|
76
76
|
updates: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
77
77
|
}, "strip", z.ZodTypeAny, {
|
|
78
|
-
workflowId: string;
|
|
79
78
|
sessionId: string;
|
|
79
|
+
workflowId: string;
|
|
80
80
|
updates: Record<string, unknown>;
|
|
81
81
|
}, {
|
|
82
|
-
workflowId: string;
|
|
83
82
|
sessionId: string;
|
|
83
|
+
workflowId: string;
|
|
84
84
|
updates: Record<string, unknown>;
|
|
85
85
|
}>;
|
|
86
86
|
export type UpdateSessionInput = z.infer<typeof UpdateSessionInput>;
|
|
@@ -89,12 +89,12 @@ export declare const ReadSessionInput: z.ZodObject<{
|
|
|
89
89
|
sessionId: z.ZodString;
|
|
90
90
|
path: z.ZodOptional<z.ZodString>;
|
|
91
91
|
}, "strip", z.ZodTypeAny, {
|
|
92
|
-
workflowId: string;
|
|
93
92
|
sessionId: string;
|
|
93
|
+
workflowId: string;
|
|
94
94
|
path?: string | undefined;
|
|
95
95
|
}, {
|
|
96
|
-
workflowId: string;
|
|
97
96
|
sessionId: string;
|
|
97
|
+
workflowId: string;
|
|
98
98
|
path?: string | undefined;
|
|
99
99
|
}>;
|
|
100
100
|
export type ReadSessionInput = z.infer<typeof ReadSessionInput>;
|
|
@@ -116,36 +116,36 @@ export declare const sessionTools: readonly [ToolDefinition<z.ZodObject<{
|
|
|
116
116
|
sessionId: z.ZodString;
|
|
117
117
|
initialData: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
118
118
|
}, "strip", z.ZodTypeAny, {
|
|
119
|
-
workflowId: string;
|
|
120
119
|
sessionId: string;
|
|
120
|
+
workflowId: string;
|
|
121
121
|
initialData: Record<string, unknown>;
|
|
122
122
|
}, {
|
|
123
|
-
workflowId: string;
|
|
124
123
|
sessionId: string;
|
|
124
|
+
workflowId: string;
|
|
125
125
|
initialData?: Record<string, unknown> | undefined;
|
|
126
126
|
}>>, ToolDefinition<z.ZodObject<{
|
|
127
127
|
workflowId: z.ZodString;
|
|
128
128
|
sessionId: z.ZodString;
|
|
129
129
|
updates: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
130
130
|
}, "strip", z.ZodTypeAny, {
|
|
131
|
-
workflowId: string;
|
|
132
131
|
sessionId: string;
|
|
132
|
+
workflowId: string;
|
|
133
133
|
updates: Record<string, unknown>;
|
|
134
134
|
}, {
|
|
135
|
-
workflowId: string;
|
|
136
135
|
sessionId: string;
|
|
136
|
+
workflowId: string;
|
|
137
137
|
updates: Record<string, unknown>;
|
|
138
138
|
}>>, ToolDefinition<z.ZodObject<{
|
|
139
139
|
workflowId: z.ZodString;
|
|
140
140
|
sessionId: z.ZodString;
|
|
141
141
|
path: z.ZodOptional<z.ZodString>;
|
|
142
142
|
}, "strip", z.ZodTypeAny, {
|
|
143
|
-
workflowId: string;
|
|
144
143
|
sessionId: string;
|
|
144
|
+
workflowId: string;
|
|
145
145
|
path?: string | undefined;
|
|
146
146
|
}, {
|
|
147
|
-
workflowId: string;
|
|
148
147
|
sessionId: string;
|
|
148
|
+
workflowId: string;
|
|
149
149
|
path?: string | undefined;
|
|
150
150
|
}>>, ToolDefinition<z.ZodObject<{
|
|
151
151
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
@@ -38,6 +38,7 @@ exports.interpolateGoalTemplate = interpolateGoalTemplate;
|
|
|
38
38
|
const crypto = __importStar(require("node:crypto"));
|
|
39
39
|
const node_child_process_1 = require("node:child_process");
|
|
40
40
|
const node_util_1 = require("node:util");
|
|
41
|
+
const assert_never_js_1 = require("../runtime/assert-never.js");
|
|
41
42
|
const index_js_1 = require("../v2/infra/in-memory/keyed-async-queue/index.js");
|
|
42
43
|
const delivery_client_js_1 = require("./delivery-client.js");
|
|
43
44
|
const delivery_action_js_1 = require("./delivery-action.js");
|
|
@@ -298,10 +299,13 @@ class TriggerRouter {
|
|
|
298
299
|
console.log(`[TriggerRouter] Workflow timed out: triggerId=${trigger.id} ` +
|
|
299
300
|
`workflowId=${trigger.workflowId} reason=${result.reason} message=${result.message}`);
|
|
300
301
|
}
|
|
301
|
-
else {
|
|
302
|
+
else if (result._tag === 'error') {
|
|
302
303
|
console.log(`[TriggerRouter] Workflow failed: triggerId=${trigger.id} ` +
|
|
303
304
|
`workflowId=${trigger.workflowId} error=${result.message} stopReason=${result.stopReason}`);
|
|
304
305
|
}
|
|
306
|
+
else {
|
|
307
|
+
(0, assert_never_js_1.assertNever)(result);
|
|
308
|
+
}
|
|
305
309
|
this.notificationService?.notify(result, workflowTrigger.goal);
|
|
306
310
|
await maybeRunDelivery(trigger.id, trigger, originalResult, this.execFn);
|
|
307
311
|
});
|
|
@@ -334,10 +338,13 @@ class TriggerRouter {
|
|
|
334
338
|
console.log(`[TriggerRouter] Dispatch timed out: workflowId=${workflowTrigger.workflowId} ` +
|
|
335
339
|
`reason=${result.reason} message=${result.message}`);
|
|
336
340
|
}
|
|
337
|
-
else {
|
|
341
|
+
else if (result._tag === 'error') {
|
|
338
342
|
console.log(`[TriggerRouter] Dispatch failed: workflowId=${workflowTrigger.workflowId} ` +
|
|
339
343
|
`error=${result.message} stopReason=${result.stopReason}`);
|
|
340
344
|
}
|
|
345
|
+
else {
|
|
346
|
+
(0, assert_never_js_1.assertNever)(result);
|
|
347
|
+
}
|
|
341
348
|
this.notificationService?.notify(result, workflowTrigger.goal);
|
|
342
349
|
});
|
|
343
350
|
return workflowTrigger.workflowId;
|
|
@@ -46,6 +46,5 @@ export declare function createCustomDirectorySource(directoryPath: string, label
|
|
|
46
46
|
export declare function createGitRepositorySource(repositoryUrl: string, branch: string, localCachePath: string): GitRepositorySource;
|
|
47
47
|
export declare function createRemoteRegistrySource(registryUrl: string): RemoteRegistrySource;
|
|
48
48
|
export declare function createPluginSource(pluginName: string, pluginVersion: string): PluginSource;
|
|
49
|
-
export declare function assertNever(x: never): never;
|
|
50
49
|
export declare function getSourceDisplayName(source: WorkflowSource): string;
|
|
51
50
|
export declare function getSourcePath(source: WorkflowSource): string | undefined;
|