@exaudeus/workrail 3.45.0 → 3.46.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/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.js +3 -1
- package/dist/cli/commands/worktrain-pipeline.d.ts +17 -0
- package/dist/cli/commands/worktrain-pipeline.js +121 -0
- package/dist/console-ui/assets/{index-BpanIvmi.js → index-BQFhoMcY.js} +1 -1
- package/dist/console-ui/index.html +1 -1
- package/dist/coordinators/adaptive-pipeline.d.ts +57 -0
- package/dist/coordinators/adaptive-pipeline.js +104 -0
- package/dist/coordinators/modes/full-pipeline.d.ts +4 -0
- package/dist/coordinators/modes/full-pipeline.js +256 -0
- package/dist/coordinators/modes/implement-shared.d.ts +4 -0
- package/dist/coordinators/modes/implement-shared.js +201 -0
- package/dist/coordinators/modes/implement.d.ts +3 -0
- package/dist/coordinators/modes/implement.js +108 -0
- package/dist/coordinators/modes/quick-review.d.ts +3 -0
- package/dist/coordinators/modes/quick-review.js +37 -0
- package/dist/coordinators/modes/review-only.d.ts +2 -0
- package/dist/coordinators/modes/review-only.js +28 -0
- package/dist/coordinators/routing/route-task.d.ts +21 -0
- package/dist/coordinators/routing/route-task.js +55 -0
- package/dist/manifest.json +89 -17
- package/dist/mcp/output-schemas.d.ts +16 -16
- package/dist/trigger/trigger-router.d.ts +3 -0
- package/dist/trigger/trigger-router.js +9 -0
- package/dist/v2/durable-core/schemas/artifacts/discovery-handoff.d.ts +29 -0
- package/dist/v2/durable-core/schemas/artifacts/discovery-handoff.js +26 -0
- package/dist/v2/durable-core/schemas/artifacts/index.d.ts +2 -1
- package/dist/v2/durable-core/schemas/artifacts/index.js +7 -1
- package/dist/v2/durable-core/schemas/compiled-workflow/index.d.ts +8 -8
- package/docs/ideas/backlog.md +86 -0
- package/package.json +1 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.touchesUI = touchesUI;
|
|
4
|
+
exports.runImplementPipeline = runImplementPipeline;
|
|
5
|
+
const adaptive_pipeline_js_1 = require("../adaptive-pipeline.js");
|
|
6
|
+
const implement_shared_js_1 = require("./implement-shared.js");
|
|
7
|
+
const PR_POLL_TIMEOUT_MS = 5 * 60 * 1000;
|
|
8
|
+
const UI_KEYWORDS = [
|
|
9
|
+
'ui', 'screen', 'view', 'layout', 'component', 'design', 'ux', 'frontend',
|
|
10
|
+
];
|
|
11
|
+
function touchesUI(goal) {
|
|
12
|
+
const lower = goal.toLowerCase();
|
|
13
|
+
return UI_KEYWORDS.some((kw) => lower.includes(kw));
|
|
14
|
+
}
|
|
15
|
+
async function runImplementPipeline(deps, opts, pitchPath, coordinatorStartMs) {
|
|
16
|
+
deps.stderr(`[implement] Starting IMPLEMENT pipeline for workspace=${opts.workspace}`);
|
|
17
|
+
const archiveDir = opts.workspace + '/.workrail/used-pitches';
|
|
18
|
+
const archiveTimestamp = deps.nowIso().replace(/[:.]/g, '-');
|
|
19
|
+
const archivePath = archiveDir + '/pitch-' + archiveTimestamp + '.md';
|
|
20
|
+
let outcome;
|
|
21
|
+
try {
|
|
22
|
+
outcome = await runImplementCore(deps, opts, pitchPath, coordinatorStartMs);
|
|
23
|
+
}
|
|
24
|
+
finally {
|
|
25
|
+
try {
|
|
26
|
+
await deps.mkdir(archiveDir, { recursive: true });
|
|
27
|
+
await deps.archiveFile(pitchPath, archivePath);
|
|
28
|
+
deps.stderr(`[implement] Pitch archived to ${archivePath}`);
|
|
29
|
+
}
|
|
30
|
+
catch (e) {
|
|
31
|
+
deps.stderr(`[WARN implement] Failed to archive pitch.md: ${e instanceof Error ? e.message : String(e)}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return outcome;
|
|
35
|
+
}
|
|
36
|
+
async function runImplementCore(deps, opts, pitchPath, coordinatorStartMs) {
|
|
37
|
+
if (touchesUI(opts.goal)) {
|
|
38
|
+
deps.stderr(`[implement] UX signals detected in goal, dispatching ui-ux-design-workflow`);
|
|
39
|
+
const cutoffCheck = (0, adaptive_pipeline_js_1.checkSpawnCutoff)(coordinatorStartMs, deps.now(), 'ux-gate');
|
|
40
|
+
if (cutoffCheck)
|
|
41
|
+
return cutoffCheck;
|
|
42
|
+
const uxSpawnResult = await deps.spawnSession('ui-ux-design-workflow', opts.goal, opts.workspace, {
|
|
43
|
+
pitchPath,
|
|
44
|
+
});
|
|
45
|
+
if (uxSpawnResult.kind === 'err') {
|
|
46
|
+
deps.stderr(`[implement] UX gate spawn failed: ${uxSpawnResult.error}`);
|
|
47
|
+
return {
|
|
48
|
+
kind: 'escalated',
|
|
49
|
+
escalationReason: { phase: 'ux-gate', reason: `UX gate spawn failed: ${uxSpawnResult.error}` },
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
const uxHandle = uxSpawnResult.value;
|
|
53
|
+
const uxAwait = await deps.awaitSessions([uxHandle], adaptive_pipeline_js_1.REVIEW_TIMEOUT_MS);
|
|
54
|
+
const uxResult = uxAwait.results[0];
|
|
55
|
+
if (!uxResult || uxResult.outcome !== 'success') {
|
|
56
|
+
const outcome = uxResult?.outcome ?? 'not_found';
|
|
57
|
+
return {
|
|
58
|
+
kind: 'escalated',
|
|
59
|
+
escalationReason: { phase: 'ux-gate', reason: `UX design session ${outcome}` },
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
deps.stderr(`[implement] UX design session completed`);
|
|
63
|
+
}
|
|
64
|
+
const cutoffCheck = (0, adaptive_pipeline_js_1.checkSpawnCutoff)(coordinatorStartMs, deps.now(), 'coding');
|
|
65
|
+
if (cutoffCheck)
|
|
66
|
+
return cutoffCheck;
|
|
67
|
+
deps.stderr(`[implement] Spawning coding-task-workflow-agentic`);
|
|
68
|
+
const codingSpawnResult = await deps.spawnSession('coding-task-workflow-agentic', opts.goal, opts.workspace, {
|
|
69
|
+
pitchPath,
|
|
70
|
+
});
|
|
71
|
+
if (codingSpawnResult.kind === 'err') {
|
|
72
|
+
return {
|
|
73
|
+
kind: 'escalated',
|
|
74
|
+
escalationReason: { phase: 'coding', reason: `coding session spawn failed: ${codingSpawnResult.error}` },
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
const codingHandle = codingSpawnResult.value;
|
|
78
|
+
if (!codingHandle) {
|
|
79
|
+
return {
|
|
80
|
+
kind: 'escalated',
|
|
81
|
+
escalationReason: { phase: 'coding', reason: 'coding session returned empty handle (zombie detection)' },
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
const codingAwait = await deps.awaitSessions([codingHandle], adaptive_pipeline_js_1.CODING_TIMEOUT_MS);
|
|
85
|
+
const codingResult = codingAwait.results[0];
|
|
86
|
+
if (!codingResult || codingResult.outcome !== 'success') {
|
|
87
|
+
const outcome = codingResult?.outcome ?? 'not_found';
|
|
88
|
+
return {
|
|
89
|
+
kind: 'escalated',
|
|
90
|
+
escalationReason: { phase: 'coding', reason: `coding session ${outcome}` },
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
deps.stderr(`[implement] Coding session completed (${Math.round((codingResult.durationMs ?? 0) / 1000)}s)`);
|
|
94
|
+
const branchPattern = `worktrain/${codingHandle.slice(0, 16)}`;
|
|
95
|
+
deps.stderr(`[implement] Polling for PR on branch pattern: ${branchPattern}`);
|
|
96
|
+
const prUrl = await deps.pollForPR(branchPattern, PR_POLL_TIMEOUT_MS);
|
|
97
|
+
if (!prUrl) {
|
|
98
|
+
return {
|
|
99
|
+
kind: 'escalated',
|
|
100
|
+
escalationReason: {
|
|
101
|
+
phase: 'pr-detection',
|
|
102
|
+
reason: `no PR found matching ${branchPattern} within ${PR_POLL_TIMEOUT_MS / 60000} minutes`,
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
deps.stderr(`[implement] PR detected: ${prUrl}`);
|
|
107
|
+
return (0, implement_shared_js_1.runReviewAndVerdictCycle)(deps, opts, prUrl, coordinatorStartMs, 0);
|
|
108
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AdaptiveCoordinatorDeps, AdaptivePipelineOpts, PipelineOutcome } from '../adaptive-pipeline.js';
|
|
2
|
+
export declare function runQuickReviewPipeline(deps: AdaptiveCoordinatorDeps, opts: AdaptivePipelineOpts, prNumbers: readonly number[], _coordinatorStartMs: number): Promise<PipelineOutcome>;
|
|
3
|
+
export declare function buildDepBumpGoal(prNumbers: readonly number[], originalGoal: string): string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runQuickReviewPipeline = runQuickReviewPipeline;
|
|
4
|
+
exports.buildDepBumpGoal = buildDepBumpGoal;
|
|
5
|
+
const pr_review_js_1 = require("../pr-review.js");
|
|
6
|
+
async function runQuickReviewPipeline(deps, opts, prNumbers, _coordinatorStartMs) {
|
|
7
|
+
deps.stderr(`[quick-review] Dep-bump review for PR(s) [${prNumbers.join(', ')}]`);
|
|
8
|
+
const depBumpGoal = buildDepBumpGoal(prNumbers, opts.goal);
|
|
9
|
+
deps.stderr(`[quick-review] Goal: "${depBumpGoal.slice(0, 100)}"`);
|
|
10
|
+
const result = await (0, pr_review_js_1.runPrReviewCoordinator)(deps, {
|
|
11
|
+
workspace: opts.workspace,
|
|
12
|
+
prs: prNumbers.length > 0 ? [...prNumbers] : undefined,
|
|
13
|
+
dryRun: opts.dryRun ?? false,
|
|
14
|
+
port: opts.port,
|
|
15
|
+
});
|
|
16
|
+
if (result.hasErrors || result.escalated > 0) {
|
|
17
|
+
return {
|
|
18
|
+
kind: 'escalated',
|
|
19
|
+
escalationReason: {
|
|
20
|
+
phase: 'review',
|
|
21
|
+
reason: result.hasErrors
|
|
22
|
+
? `dep-bump review coordinator reported errors (escalated=${result.escalated})`
|
|
23
|
+
: `${result.escalated} dep-bump PR(s) escalated during review`,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
kind: 'merged',
|
|
29
|
+
prUrl: result.mergedPrs.length > 0 ? `PR #${result.mergedPrs[0]}` : null,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function buildDepBumpGoal(prNumbers, originalGoal) {
|
|
33
|
+
const firstPr = prNumbers[0];
|
|
34
|
+
const prRef = firstPr !== undefined ? `PR #${firstPr}` : 'dep-bump PR';
|
|
35
|
+
const prTitle = originalGoal.slice(0, 80);
|
|
36
|
+
return `[DEP BUMP] Review ${prRef}: ${prTitle} -- skip architecture audit, verify version compatibility and test coverage only`;
|
|
37
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { AdaptiveCoordinatorDeps, AdaptivePipelineOpts, PipelineOutcome } from '../adaptive-pipeline.js';
|
|
2
|
+
export declare function runReviewOnlyPipeline(deps: AdaptiveCoordinatorDeps, opts: AdaptivePipelineOpts, prNumbers: readonly number[], _coordinatorStartMs: number): Promise<PipelineOutcome>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runReviewOnlyPipeline = runReviewOnlyPipeline;
|
|
4
|
+
const pr_review_js_1 = require("../pr-review.js");
|
|
5
|
+
async function runReviewOnlyPipeline(deps, opts, prNumbers, _coordinatorStartMs) {
|
|
6
|
+
deps.stderr(`[review-only] Delegating to runPrReviewCoordinator() for ${prNumbers.length > 0 ? `PR(s) [${prNumbers.join(', ')}]` : 'all open PRs'}`);
|
|
7
|
+
const result = await (0, pr_review_js_1.runPrReviewCoordinator)(deps, {
|
|
8
|
+
workspace: opts.workspace,
|
|
9
|
+
prs: prNumbers.length > 0 ? [...prNumbers] : undefined,
|
|
10
|
+
dryRun: opts.dryRun ?? false,
|
|
11
|
+
port: opts.port,
|
|
12
|
+
});
|
|
13
|
+
if (result.hasErrors || result.escalated > 0) {
|
|
14
|
+
return {
|
|
15
|
+
kind: 'escalated',
|
|
16
|
+
escalationReason: {
|
|
17
|
+
phase: 'review',
|
|
18
|
+
reason: result.hasErrors
|
|
19
|
+
? `review coordinator reported errors (escalated=${result.escalated})`
|
|
20
|
+
: `${result.escalated} PR(s) escalated during review`,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
kind: 'merged',
|
|
26
|
+
prUrl: result.mergedPrs.length > 0 ? `PR #${result.mergedPrs[0]}` : null,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type PipelineMode = {
|
|
2
|
+
readonly kind: 'QUICK_REVIEW';
|
|
3
|
+
readonly prNumbers: readonly number[];
|
|
4
|
+
} | {
|
|
5
|
+
readonly kind: 'REVIEW_ONLY';
|
|
6
|
+
readonly prNumbers: readonly number[];
|
|
7
|
+
} | {
|
|
8
|
+
readonly kind: 'IMPLEMENT';
|
|
9
|
+
readonly pitchPath: string;
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: 'FULL';
|
|
12
|
+
readonly goal: string;
|
|
13
|
+
} | {
|
|
14
|
+
readonly kind: 'ESCALATE';
|
|
15
|
+
readonly reason: string;
|
|
16
|
+
};
|
|
17
|
+
export interface RoutingDeps {
|
|
18
|
+
readonly fileExists: (path: string) => boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare function extractPrNumbers(goal: string): number[];
|
|
21
|
+
export declare function routeTask(goal: string, workspace: string, deps: RoutingDeps, triggerProvider?: string): PipelineMode;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractPrNumbers = extractPrNumbers;
|
|
4
|
+
exports.routeTask = routeTask;
|
|
5
|
+
const DEP_BUMP_KEYWORDS = [
|
|
6
|
+
'bump',
|
|
7
|
+
'chore:',
|
|
8
|
+
'dependabot',
|
|
9
|
+
'dependency upgrade',
|
|
10
|
+
];
|
|
11
|
+
const PR_REGEX = /\bPR\s*#\d+\b/i;
|
|
12
|
+
const MR_REGEX = /\bMR\s*!?\d+\b/i;
|
|
13
|
+
const PITCH_FILE_PATH = '.workrail/current-pitch.md';
|
|
14
|
+
function extractPrNumbers(goal) {
|
|
15
|
+
const numbers = [];
|
|
16
|
+
const prMatches = goal.matchAll(/\bPR\s*#(\d+)\b/gi);
|
|
17
|
+
for (const match of prMatches) {
|
|
18
|
+
const n = parseInt(match[1], 10);
|
|
19
|
+
if (!isNaN(n))
|
|
20
|
+
numbers.push(n);
|
|
21
|
+
}
|
|
22
|
+
const mrMatches = goal.matchAll(/\bMR\s*!?#?(\d+)\b/gi);
|
|
23
|
+
for (const match of mrMatches) {
|
|
24
|
+
const n = parseInt(match[1], 10);
|
|
25
|
+
if (!isNaN(n))
|
|
26
|
+
numbers.push(n);
|
|
27
|
+
}
|
|
28
|
+
return numbers;
|
|
29
|
+
}
|
|
30
|
+
function hasDependencyBumpKeywords(goal) {
|
|
31
|
+
const lower = goal.toLowerCase();
|
|
32
|
+
return DEP_BUMP_KEYWORDS.some((kw) => lower.includes(kw));
|
|
33
|
+
}
|
|
34
|
+
function hasPrOrMrReference(goal) {
|
|
35
|
+
return PR_REGEX.test(goal) || MR_REGEX.test(goal);
|
|
36
|
+
}
|
|
37
|
+
function routeTask(goal, workspace, deps, triggerProvider) {
|
|
38
|
+
const prNumbers = extractPrNumbers(goal);
|
|
39
|
+
const hasDepBump = hasDependencyBumpKeywords(goal);
|
|
40
|
+
const hasPrRef = hasPrOrMrReference(goal);
|
|
41
|
+
const isGithubPrsPoll = triggerProvider === 'github_prs_poll';
|
|
42
|
+
if (hasDepBump && hasPrRef) {
|
|
43
|
+
return { kind: 'QUICK_REVIEW', prNumbers };
|
|
44
|
+
}
|
|
45
|
+
if (hasPrRef || isGithubPrsPoll) {
|
|
46
|
+
return { kind: 'REVIEW_ONLY', prNumbers };
|
|
47
|
+
}
|
|
48
|
+
const pitchPath = workspace.endsWith('/')
|
|
49
|
+
? workspace + PITCH_FILE_PATH
|
|
50
|
+
: workspace + '/' + PITCH_FILE_PATH;
|
|
51
|
+
if (deps.fileExists(pitchPath)) {
|
|
52
|
+
return { kind: 'IMPLEMENT', pitchPath };
|
|
53
|
+
}
|
|
54
|
+
return { kind: 'FULL', goal };
|
|
55
|
+
}
|
package/dist/manifest.json
CHANGED
|
@@ -258,12 +258,12 @@
|
|
|
258
258
|
"bytes": 745
|
|
259
259
|
},
|
|
260
260
|
"cli/commands/index.d.ts": {
|
|
261
|
-
"sha256": "
|
|
262
|
-
"bytes":
|
|
261
|
+
"sha256": "7284fb3ca25bdbe6079fee4ed7f5eee9a82fff5fbc4e056010b52f4261145880",
|
|
262
|
+
"bytes": 2251
|
|
263
263
|
},
|
|
264
264
|
"cli/commands/index.js": {
|
|
265
|
-
"sha256": "
|
|
266
|
-
"bytes":
|
|
265
|
+
"sha256": "8eef74385e22afc6313b4f7022c2e0a6be267ab55d7aa11c9a83b01a5e7c0e61",
|
|
266
|
+
"bytes": 5186
|
|
267
267
|
},
|
|
268
268
|
"cli/commands/init.d.ts": {
|
|
269
269
|
"sha256": "b5f8b88a072c68509dab3938ba1d6b4a949ad32f8fc55e91c5039b8c77301c1b",
|
|
@@ -369,6 +369,14 @@
|
|
|
369
369
|
"sha256": "0987dcb2518dfd44d103dd0958abae4c7e8323f314971ffdc3ead320c4c8eef9",
|
|
370
370
|
"bytes": 6764
|
|
371
371
|
},
|
|
372
|
+
"cli/commands/worktrain-pipeline.d.ts": {
|
|
373
|
+
"sha256": "ea0b36c853002352c7fad167c90dcf0234d2ec1a1fb042d4fd749531c7733fc0",
|
|
374
|
+
"bytes": 762
|
|
375
|
+
},
|
|
376
|
+
"cli/commands/worktrain-pipeline.js": {
|
|
377
|
+
"sha256": "d76c61ac291d1936769cc707406eb49dd6e4055855e64fb689ec1e626e71bc91",
|
|
378
|
+
"bytes": 5583
|
|
379
|
+
},
|
|
372
380
|
"cli/commands/worktrain-spawn.d.ts": {
|
|
373
381
|
"sha256": "c95c68c8f29957a19b2dab8ed6fac5f8fc85c711d34aceea740fee79aca3e2a7",
|
|
374
382
|
"bytes": 1060
|
|
@@ -449,8 +457,8 @@
|
|
|
449
457
|
"sha256": "5fe866e54f796975dec5d8ba9983aefd86074db212d3fccd64eed04bc9f0b3da",
|
|
450
458
|
"bytes": 8011
|
|
451
459
|
},
|
|
452
|
-
"console-ui/assets/index-
|
|
453
|
-
"sha256": "
|
|
460
|
+
"console-ui/assets/index-BQFhoMcY.js": {
|
|
461
|
+
"sha256": "722cfaf2b1b513c79b9f4d62cc79bd0f59c953c959480a8745efbdccf80df3d8",
|
|
454
462
|
"bytes": 760528
|
|
455
463
|
},
|
|
456
464
|
"console-ui/assets/index-DGj8EsFR.css": {
|
|
@@ -458,7 +466,7 @@
|
|
|
458
466
|
"bytes": 60631
|
|
459
467
|
},
|
|
460
468
|
"console-ui/index.html": {
|
|
461
|
-
"sha256": "
|
|
469
|
+
"sha256": "b4d9928edd90bb6778c3685eb511c9e7600937720b6212e018a017fbbbe7b8c5",
|
|
462
470
|
"bytes": 417
|
|
463
471
|
},
|
|
464
472
|
"console/standalone-console.d.ts": {
|
|
@@ -501,6 +509,54 @@
|
|
|
501
509
|
"sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
|
|
502
510
|
"bytes": 77
|
|
503
511
|
},
|
|
512
|
+
"coordinators/adaptive-pipeline.d.ts": {
|
|
513
|
+
"sha256": "8f1e9ee8e14fe847d57ab65d75dab48b08afd376af1fb70c65f760f4a26ff855",
|
|
514
|
+
"bytes": 2811
|
|
515
|
+
},
|
|
516
|
+
"coordinators/adaptive-pipeline.js": {
|
|
517
|
+
"sha256": "ddaa2dd10c41be64c6449d29f36bda9e00daa941157078793fea31b7a41462b5",
|
|
518
|
+
"bytes": 4659
|
|
519
|
+
},
|
|
520
|
+
"coordinators/modes/full-pipeline.d.ts": {
|
|
521
|
+
"sha256": "94735f14cbacab0c37f4474b636646b7bd6b9e3b2304181f14b3939157ebe3dd",
|
|
522
|
+
"bytes": 462
|
|
523
|
+
},
|
|
524
|
+
"coordinators/modes/full-pipeline.js": {
|
|
525
|
+
"sha256": "762f4d637389e77cc71a31fc54034061edbb8a30a0332c0b60ecf560b7d6743a",
|
|
526
|
+
"bytes": 11782
|
|
527
|
+
},
|
|
528
|
+
"coordinators/modes/implement-shared.d.ts": {
|
|
529
|
+
"sha256": "64e3ba7e31bf9965b74645d7157a85fb67d9df183696a4d792cec870b22047e0",
|
|
530
|
+
"bytes": 554
|
|
531
|
+
},
|
|
532
|
+
"coordinators/modes/implement-shared.js": {
|
|
533
|
+
"sha256": "c39e7b1c088663a75f86b2dd81326940537c53408c7182a55f2b1288796cd002",
|
|
534
|
+
"bytes": 11023
|
|
535
|
+
},
|
|
536
|
+
"coordinators/modes/implement.d.ts": {
|
|
537
|
+
"sha256": "23919c24d62a0bf15296a52fbc594cca8b1b34e6f8d98dcf7dede8d97ad4cabb",
|
|
538
|
+
"bytes": 347
|
|
539
|
+
},
|
|
540
|
+
"coordinators/modes/implement.js": {
|
|
541
|
+
"sha256": "fa668b93b643ad3448844754e7e27ba33ca7324f6948e7414f04b69a8e3c5fba",
|
|
542
|
+
"bytes": 4955
|
|
543
|
+
},
|
|
544
|
+
"coordinators/modes/quick-review.d.ts": {
|
|
545
|
+
"sha256": "03a4f29a07047b0bf788d84f8e0ebab63d64c8eb98aa57087943a8fb84563998",
|
|
546
|
+
"bytes": 405
|
|
547
|
+
},
|
|
548
|
+
"coordinators/modes/quick-review.js": {
|
|
549
|
+
"sha256": "720e0dbccc79e4e2acfdbb448dba8be4440f658ac6058383202332cef63d51e0",
|
|
550
|
+
"bytes": 1678
|
|
551
|
+
},
|
|
552
|
+
"coordinators/modes/review-only.d.ts": {
|
|
553
|
+
"sha256": "bc97de23de612ec03444bd3ac9d632aca7967c2153bc381e9e42519d721fb134",
|
|
554
|
+
"bytes": 302
|
|
555
|
+
},
|
|
556
|
+
"coordinators/modes/review-only.js": {
|
|
557
|
+
"sha256": "a7da0b06ea4b16ae71b3d08a559dade91b01ffe1270633eb8ac1c355d57126eb",
|
|
558
|
+
"bytes": 1198
|
|
559
|
+
},
|
|
504
560
|
"coordinators/pr-review.d.ts": {
|
|
505
561
|
"sha256": "8f6794d60ecabaf6898199120620fcd5aac932b64654636bc8d308103c987e57",
|
|
506
562
|
"bytes": 3832
|
|
@@ -509,6 +565,14 @@
|
|
|
509
565
|
"sha256": "84b51f931eb55d908de8c60f90b4d4b66540054791a28ce2f07426a841fed386",
|
|
510
566
|
"bytes": 32297
|
|
511
567
|
},
|
|
568
|
+
"coordinators/routing/route-task.d.ts": {
|
|
569
|
+
"sha256": "6661d21e5cfbc9dffbfd8c2f9aaaf0e30a3251997a2c69c6a1b09929343e30e3",
|
|
570
|
+
"bytes": 667
|
|
571
|
+
},
|
|
572
|
+
"coordinators/routing/route-task.js": {
|
|
573
|
+
"sha256": "195953d6c0e28d749407e5e3fb29b963cf14629c03508792a44bf0866f7c9d33",
|
|
574
|
+
"bytes": 1815
|
|
575
|
+
},
|
|
512
576
|
"core/error-handler.d.ts": {
|
|
513
577
|
"sha256": "80451f12ac8e185133ec3dc4c57285491a785f27525ed21e729db1da3f61010d",
|
|
514
578
|
"bytes": 1368
|
|
@@ -1158,7 +1222,7 @@
|
|
|
1158
1222
|
"bytes": 7991
|
|
1159
1223
|
},
|
|
1160
1224
|
"mcp/output-schemas.d.ts": {
|
|
1161
|
-
"sha256": "
|
|
1225
|
+
"sha256": "bdc67c2adadeeca632aae3a3f0df8aa521c952194300b0bd823bdd7abed805d2",
|
|
1162
1226
|
"bytes": 93176
|
|
1163
1227
|
},
|
|
1164
1228
|
"mcp/output-schemas.js": {
|
|
@@ -1638,12 +1702,12 @@
|
|
|
1638
1702
|
"bytes": 10668
|
|
1639
1703
|
},
|
|
1640
1704
|
"trigger/trigger-router.d.ts": {
|
|
1641
|
-
"sha256": "
|
|
1642
|
-
"bytes":
|
|
1705
|
+
"sha256": "b3154af4d32d6d71ae38fb6befc54850d137a12b2f602a34247b0c5f9b57a29d",
|
|
1706
|
+
"bytes": 2519
|
|
1643
1707
|
},
|
|
1644
1708
|
"trigger/trigger-router.js": {
|
|
1645
|
-
"sha256": "
|
|
1646
|
-
"bytes":
|
|
1709
|
+
"sha256": "682bf6e3a9d0fa5e25378c361813fdc52e5b828dff7267fd084d83f242585492",
|
|
1710
|
+
"bytes": 18144
|
|
1647
1711
|
},
|
|
1648
1712
|
"trigger/trigger-store.d.ts": {
|
|
1649
1713
|
"sha256": "7afb05127d55bc3757a550dd15d4b797766b3fff29d1bfe76b303764b93322e7",
|
|
@@ -2173,13 +2237,21 @@
|
|
|
2173
2237
|
"sha256": "b6453c5d57e4c3f05e11d4bc477821dba07e502ccd5ce98e850fb01fe3505a75",
|
|
2174
2238
|
"bytes": 1242
|
|
2175
2239
|
},
|
|
2240
|
+
"v2/durable-core/schemas/artifacts/discovery-handoff.d.ts": {
|
|
2241
|
+
"sha256": "ccf5b234bc4e1d98a688ecdf555cb8a0cc4e171209f31845d13ac89ef747bbe9",
|
|
2242
|
+
"bytes": 1174
|
|
2243
|
+
},
|
|
2244
|
+
"v2/durable-core/schemas/artifacts/discovery-handoff.js": {
|
|
2245
|
+
"sha256": "78b5ce8abef29a1f15d8e10f33a9174f8d027550ffdfc419ddad03db8d0fc7d6",
|
|
2246
|
+
"bytes": 1138
|
|
2247
|
+
},
|
|
2176
2248
|
"v2/durable-core/schemas/artifacts/index.d.ts": {
|
|
2177
|
-
"sha256": "
|
|
2178
|
-
"bytes":
|
|
2249
|
+
"sha256": "7821aa8564f8900b81396497e26ad3718805c64daf02147f1427d35dfe6c957d",
|
|
2250
|
+
"bytes": 1557
|
|
2179
2251
|
},
|
|
2180
2252
|
"v2/durable-core/schemas/artifacts/index.js": {
|
|
2181
|
-
"sha256": "
|
|
2182
|
-
"bytes":
|
|
2253
|
+
"sha256": "6755939280959c6a8ad70a5141a0a8803ad136eb1064f6238bb08e294c2330d0",
|
|
2254
|
+
"bytes": 5772
|
|
2183
2255
|
},
|
|
2184
2256
|
"v2/durable-core/schemas/artifacts/loop-control.d.ts": {
|
|
2185
2257
|
"sha256": "95dabfdcedb1a71c58c38a805dcf24c76254783bc0b2c7d429a3b8ffb94202ed",
|
|
@@ -2198,7 +2270,7 @@
|
|
|
2198
2270
|
"bytes": 1206
|
|
2199
2271
|
},
|
|
2200
2272
|
"v2/durable-core/schemas/compiled-workflow/index.d.ts": {
|
|
2201
|
-
"sha256": "
|
|
2273
|
+
"sha256": "66e5a5e8d87e1c4743acfad71fa81c22775d377b566701d71c17227a4f4c969c",
|
|
2202
2274
|
"bytes": 11821
|
|
2203
2275
|
},
|
|
2204
2276
|
"v2/durable-core/schemas/compiled-workflow/index.js": {
|
|
@@ -10,14 +10,14 @@ export declare const WorkflowSummarySchema: z.ZodObject<{
|
|
|
10
10
|
version: z.ZodString;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
12
|
name: string;
|
|
13
|
+
version: string;
|
|
13
14
|
id: string;
|
|
14
15
|
description: string;
|
|
15
|
-
version: string;
|
|
16
16
|
}, {
|
|
17
17
|
name: string;
|
|
18
|
+
version: string;
|
|
18
19
|
id: string;
|
|
19
20
|
description: string;
|
|
20
|
-
version: string;
|
|
21
21
|
}>;
|
|
22
22
|
export declare const WorkflowListOutputSchema: z.ZodObject<{
|
|
23
23
|
workflows: z.ZodArray<z.ZodObject<{
|
|
@@ -27,28 +27,28 @@ export declare const WorkflowListOutputSchema: z.ZodObject<{
|
|
|
27
27
|
version: z.ZodString;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
29
|
name: string;
|
|
30
|
+
version: string;
|
|
30
31
|
id: string;
|
|
31
32
|
description: string;
|
|
32
|
-
version: string;
|
|
33
33
|
}, {
|
|
34
34
|
name: string;
|
|
35
|
+
version: string;
|
|
35
36
|
id: string;
|
|
36
37
|
description: string;
|
|
37
|
-
version: string;
|
|
38
38
|
}>, "many">;
|
|
39
39
|
}, "strip", z.ZodTypeAny, {
|
|
40
40
|
workflows: {
|
|
41
41
|
name: string;
|
|
42
|
+
version: string;
|
|
42
43
|
id: string;
|
|
43
44
|
description: string;
|
|
44
|
-
version: string;
|
|
45
45
|
}[];
|
|
46
46
|
}, {
|
|
47
47
|
workflows: {
|
|
48
48
|
name: string;
|
|
49
|
+
version: string;
|
|
49
50
|
id: string;
|
|
50
51
|
description: string;
|
|
51
|
-
version: string;
|
|
52
52
|
}[];
|
|
53
53
|
}>;
|
|
54
54
|
export declare const WorkflowGetOutputSchema: z.ZodObject<{
|
|
@@ -92,13 +92,13 @@ export declare const WorkflowGetSchemaOutputSchema: z.ZodObject<{
|
|
|
92
92
|
usage: z.ZodString;
|
|
93
93
|
schemaPath: z.ZodString;
|
|
94
94
|
}, "strip", z.ZodTypeAny, {
|
|
95
|
-
description: string;
|
|
96
95
|
version: string;
|
|
96
|
+
description: string;
|
|
97
97
|
usage: string;
|
|
98
98
|
schemaPath: string;
|
|
99
99
|
}, {
|
|
100
|
-
description: string;
|
|
101
100
|
version: string;
|
|
101
|
+
description: string;
|
|
102
102
|
usage: string;
|
|
103
103
|
schemaPath: string;
|
|
104
104
|
}>;
|
|
@@ -115,8 +115,8 @@ export declare const WorkflowGetSchemaOutputSchema: z.ZodObject<{
|
|
|
115
115
|
}, "strip", z.ZodTypeAny, {
|
|
116
116
|
schema: JsonValue;
|
|
117
117
|
metadata: {
|
|
118
|
-
description: string;
|
|
119
118
|
version: string;
|
|
119
|
+
description: string;
|
|
120
120
|
usage: string;
|
|
121
121
|
schemaPath: string;
|
|
122
122
|
};
|
|
@@ -127,8 +127,8 @@ export declare const WorkflowGetSchemaOutputSchema: z.ZodObject<{
|
|
|
127
127
|
}, {
|
|
128
128
|
schema: JsonValue;
|
|
129
129
|
metadata: {
|
|
130
|
-
description: string;
|
|
131
130
|
version: string;
|
|
131
|
+
description: string;
|
|
132
132
|
usage: string;
|
|
133
133
|
schemaPath: string;
|
|
134
134
|
};
|
|
@@ -253,8 +253,8 @@ export declare const V2WorkflowListItemSchema: z.ZodObject<{
|
|
|
253
253
|
workflowHash: string | null;
|
|
254
254
|
workflowId: string;
|
|
255
255
|
name: string;
|
|
256
|
-
description: string;
|
|
257
256
|
version: string;
|
|
257
|
+
description: string;
|
|
258
258
|
examples?: string[] | undefined;
|
|
259
259
|
visibility?: {
|
|
260
260
|
category: "built_in" | "personal" | "legacy_project" | "rooted_sharing" | "external";
|
|
@@ -284,8 +284,8 @@ export declare const V2WorkflowListItemSchema: z.ZodObject<{
|
|
|
284
284
|
workflowHash: string | null;
|
|
285
285
|
workflowId: string;
|
|
286
286
|
name: string;
|
|
287
|
-
description: string;
|
|
288
287
|
version: string;
|
|
288
|
+
description: string;
|
|
289
289
|
examples?: string[] | undefined;
|
|
290
290
|
visibility?: {
|
|
291
291
|
category: "built_in" | "personal" | "legacy_project" | "rooted_sharing" | "external";
|
|
@@ -540,8 +540,8 @@ export declare const V2WorkflowListOutputSchema: z.ZodObject<{
|
|
|
540
540
|
workflowHash: string | null;
|
|
541
541
|
workflowId: string;
|
|
542
542
|
name: string;
|
|
543
|
-
description: string;
|
|
544
543
|
version: string;
|
|
544
|
+
description: string;
|
|
545
545
|
examples?: string[] | undefined;
|
|
546
546
|
visibility?: {
|
|
547
547
|
category: "built_in" | "personal" | "legacy_project" | "rooted_sharing" | "external";
|
|
@@ -571,8 +571,8 @@ export declare const V2WorkflowListOutputSchema: z.ZodObject<{
|
|
|
571
571
|
workflowHash: string | null;
|
|
572
572
|
workflowId: string;
|
|
573
573
|
name: string;
|
|
574
|
-
description: string;
|
|
575
574
|
version: string;
|
|
575
|
+
description: string;
|
|
576
576
|
examples?: string[] | undefined;
|
|
577
577
|
visibility?: {
|
|
578
578
|
category: "built_in" | "personal" | "legacy_project" | "rooted_sharing" | "external";
|
|
@@ -733,8 +733,8 @@ export declare const V2WorkflowListOutputSchema: z.ZodObject<{
|
|
|
733
733
|
workflowHash: string | null;
|
|
734
734
|
workflowId: string;
|
|
735
735
|
name: string;
|
|
736
|
-
description: string;
|
|
737
736
|
version: string;
|
|
737
|
+
description: string;
|
|
738
738
|
examples?: string[] | undefined;
|
|
739
739
|
visibility?: {
|
|
740
740
|
category: "built_in" | "personal" | "legacy_project" | "rooted_sharing" | "external";
|
|
@@ -803,8 +803,8 @@ export declare const V2WorkflowListOutputSchema: z.ZodObject<{
|
|
|
803
803
|
workflowHash: string | null;
|
|
804
804
|
workflowId: string;
|
|
805
805
|
name: string;
|
|
806
|
-
description: string;
|
|
807
806
|
version: string;
|
|
807
|
+
description: string;
|
|
808
808
|
examples?: string[] | undefined;
|
|
809
809
|
visibility?: {
|
|
810
810
|
category: "built_in" | "personal" | "legacy_project" | "rooted_sharing" | "external";
|
|
@@ -4,6 +4,8 @@ import type { TriggerDefinition, WebhookEvent } from './types.js';
|
|
|
4
4
|
import type { ExecFn } from './delivery-action.js';
|
|
5
5
|
import type { DaemonEventEmitter } from '../daemon/daemon-events.js';
|
|
6
6
|
import type { NotificationService } from './notification-service.js';
|
|
7
|
+
import type { AdaptiveCoordinatorDeps, ModeExecutors } from '../coordinators/adaptive-pipeline.js';
|
|
8
|
+
import { runAdaptivePipeline } from '../coordinators/adaptive-pipeline.js';
|
|
7
9
|
export type RouteError = {
|
|
8
10
|
readonly kind: 'not_found';
|
|
9
11
|
readonly triggerId: string;
|
|
@@ -40,4 +42,5 @@ export declare class TriggerRouter {
|
|
|
40
42
|
route(event: WebhookEvent): RouteResult;
|
|
41
43
|
dispatch(workflowTrigger: WorkflowTrigger): string;
|
|
42
44
|
listTriggers(): readonly TriggerDefinition[];
|
|
45
|
+
dispatchAdaptivePipeline(goal: string, workspace: string, coordinatorDeps: AdaptiveCoordinatorDeps, modeExecutors: ModeExecutors, context?: Readonly<Record<string, unknown>>): ReturnType<typeof runAdaptivePipeline>;
|
|
43
46
|
}
|
|
@@ -42,6 +42,7 @@ const assert_never_js_1 = require("../runtime/assert-never.js");
|
|
|
42
42
|
const index_js_1 = require("../v2/infra/in-memory/keyed-async-queue/index.js");
|
|
43
43
|
const delivery_client_js_1 = require("./delivery-client.js");
|
|
44
44
|
const delivery_action_js_1 = require("./delivery-action.js");
|
|
45
|
+
const adaptive_pipeline_js_1 = require("../coordinators/adaptive-pipeline.js");
|
|
45
46
|
const execFileAsync = (0, node_util_1.promisify)(node_child_process_1.execFile);
|
|
46
47
|
function interpolateGoalTemplate(template, staticGoal, payload, triggerId) {
|
|
47
48
|
const TOKEN_RE = /\{\{([^}]+)\}\}/g;
|
|
@@ -384,5 +385,13 @@ class TriggerRouter {
|
|
|
384
385
|
listTriggers() {
|
|
385
386
|
return [...this.index.values()];
|
|
386
387
|
}
|
|
388
|
+
async dispatchAdaptivePipeline(goal, workspace, coordinatorDeps, modeExecutors, context) {
|
|
389
|
+
const opts = {
|
|
390
|
+
goal,
|
|
391
|
+
workspace,
|
|
392
|
+
taskCandidate: context,
|
|
393
|
+
};
|
|
394
|
+
return (0, adaptive_pipeline_js_1.runAdaptivePipeline)(coordinatorDeps, opts, modeExecutors);
|
|
395
|
+
}
|
|
387
396
|
}
|
|
388
397
|
exports.TriggerRouter = TriggerRouter;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const DISCOVERY_HANDOFF_CONTRACT_REF: "wr.contracts.discovery_handoff";
|
|
3
|
+
export declare const DiscoveryHandoffArtifactV1Schema: z.ZodObject<{
|
|
4
|
+
kind: z.ZodLiteral<"wr.discovery_handoff">;
|
|
5
|
+
version: z.ZodLiteral<1>;
|
|
6
|
+
selectedDirection: z.ZodString;
|
|
7
|
+
designDocPath: z.ZodString;
|
|
8
|
+
confidenceBand: z.ZodEnum<["high", "medium", "low"]>;
|
|
9
|
+
keyInvariants: z.ZodArray<z.ZodString, "many">;
|
|
10
|
+
}, "strict", z.ZodTypeAny, {
|
|
11
|
+
kind: "wr.discovery_handoff";
|
|
12
|
+
version: 1;
|
|
13
|
+
selectedDirection: string;
|
|
14
|
+
designDocPath: string;
|
|
15
|
+
confidenceBand: "low" | "high" | "medium";
|
|
16
|
+
keyInvariants: string[];
|
|
17
|
+
}, {
|
|
18
|
+
kind: "wr.discovery_handoff";
|
|
19
|
+
version: 1;
|
|
20
|
+
selectedDirection: string;
|
|
21
|
+
designDocPath: string;
|
|
22
|
+
confidenceBand: "low" | "high" | "medium";
|
|
23
|
+
keyInvariants: string[];
|
|
24
|
+
}>;
|
|
25
|
+
export type DiscoveryHandoffArtifactV1 = z.infer<typeof DiscoveryHandoffArtifactV1Schema>;
|
|
26
|
+
export declare function isDiscoveryHandoffArtifact(artifact: unknown): artifact is {
|
|
27
|
+
readonly kind: 'wr.discovery_handoff';
|
|
28
|
+
};
|
|
29
|
+
export declare function parseDiscoveryHandoffArtifact(artifact: unknown): DiscoveryHandoffArtifactV1 | null;
|