@exaudeus/workrail 3.41.0 → 3.43.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 +40 -11
- package/dist/console-ui/assets/{index-CQt4UhPB.js → index-Sb57DW4B.js} +1 -1
- package/dist/console-ui/index.html +1 -1
- package/dist/context-assembly/deps.d.ts +8 -0
- package/dist/context-assembly/deps.js +2 -0
- package/dist/context-assembly/index.d.ts +6 -0
- package/dist/context-assembly/index.js +50 -0
- package/dist/context-assembly/infra.d.ts +3 -0
- package/dist/context-assembly/infra.js +154 -0
- package/dist/context-assembly/types.d.ts +30 -0
- package/dist/context-assembly/types.js +2 -0
- package/dist/coordinators/pr-review.d.ts +3 -1
- package/dist/coordinators/pr-review.js +25 -4
- package/dist/daemon/workflow-runner.d.ts +11 -1
- package/dist/daemon/workflow-runner.js +82 -9
- package/dist/domain/execution/state.d.ts +6 -6
- package/dist/manifest.json +76 -44
- package/dist/mcp/handlers/v2-workflow.d.ts +2 -2
- package/dist/mcp/output-schemas.d.ts +234 -234
- package/dist/mcp/tools.d.ts +2 -2
- package/dist/mcp/v2/tools.d.ts +24 -24
- package/dist/trigger/delivery-action.d.ts +2 -0
- package/dist/trigger/delivery-action.js +24 -0
- package/dist/trigger/trigger-router.js +24 -1
- package/dist/trigger/trigger-store.js +42 -0
- package/dist/trigger/types.d.ts +3 -0
- package/dist/v2/durable-core/schemas/artifacts/assessment.d.ts +2 -2
- package/dist/v2/durable-core/schemas/artifacts/coordinator-signal.d.ts +2 -2
- package/dist/v2/durable-core/schemas/artifacts/loop-control.d.ts +6 -6
- package/dist/v2/durable-core/schemas/artifacts/review-verdict.d.ts +6 -6
- package/dist/v2/durable-core/schemas/compiled-workflow/index.d.ts +56 -56
- package/dist/v2/durable-core/schemas/execution-snapshot/blocked-snapshot.d.ts +83 -83
- package/dist/v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.d.ts +1024 -1024
- package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +2336 -2336
- package/dist/v2/durable-core/schemas/session/dag-topology.d.ts +6 -6
- package/dist/v2/durable-core/schemas/session/events.d.ts +339 -339
- package/dist/v2/durable-core/schemas/session/gaps.d.ts +30 -30
- package/dist/v2/durable-core/schemas/session/manifest.d.ts +6 -6
- package/dist/v2/durable-core/schemas/session/outputs.d.ts +8 -8
- package/dist/v2/durable-core/schemas/session/validation-event.d.ts +3 -3
- package/docs/design/adaptive-coordinator-context-candidates.md +265 -0
- package/docs/design/adaptive-coordinator-context-review.md +101 -0
- package/docs/design/adaptive-coordinator-context.md +504 -0
- package/docs/design/adaptive-coordinator-routing-candidates.md +340 -0
- package/docs/design/adaptive-coordinator-routing-design-review.md +135 -0
- package/docs/design/adaptive-coordinator-routing-review.md +156 -0
- package/docs/design/adaptive-coordinator-routing.md +660 -0
- package/docs/design/context-assembly-design-candidates.md +199 -0
- package/docs/design/context-assembly-implementation-plan.md +211 -0
- package/docs/design/context-assembly-layer-design-review.md +110 -0
- package/docs/design/context-assembly-layer.md +622 -0
- package/docs/design/context-assembly-review-findings.md +112 -0
- package/docs/design/stuck-escalation-candidates.md +176 -0
- package/docs/design/stuck-escalation-design-review.md +70 -0
- package/docs/design/stuck-escalation.md +326 -0
- package/docs/design/worktrain-task-queue-candidates.md +252 -0
- package/docs/design/worktrain-task-queue-design-review.md +109 -0
- package/docs/design/worktrain-task-queue.md +443 -0
- package/docs/design/worktree-review-findings-candidates.md +101 -0
- package/docs/design/worktree-review-findings-design-review.md +65 -0
- package/docs/design/worktree-review-findings-implementation-plan.md +153 -0
- package/docs/ideas/backlog.md +212 -0
- package/package.json +3 -3
package/dist/mcp/tools.d.ts
CHANGED
|
@@ -27,19 +27,19 @@ export declare const WorkflowNextInput: z.ZodObject<{
|
|
|
27
27
|
}, "strip", z.ZodTypeAny, {
|
|
28
28
|
workflowId: string;
|
|
29
29
|
state: import("../domain/execution/state.js").ExecutionState;
|
|
30
|
-
context?: Record<string, unknown> | undefined;
|
|
31
30
|
event?: {
|
|
32
31
|
readonly kind: "step_completed";
|
|
33
32
|
readonly stepInstanceId: import("../domain/execution/ids.js").StepInstanceId;
|
|
34
33
|
} | undefined;
|
|
34
|
+
context?: Record<string, unknown> | undefined;
|
|
35
35
|
}, {
|
|
36
36
|
workflowId: string;
|
|
37
37
|
state: import("../domain/execution/state.js").ExecutionState;
|
|
38
|
-
context?: Record<string, unknown> | undefined;
|
|
39
38
|
event?: {
|
|
40
39
|
readonly kind: "step_completed";
|
|
41
40
|
readonly stepInstanceId: import("../domain/execution/ids.js").StepInstanceId;
|
|
42
41
|
} | undefined;
|
|
42
|
+
context?: Record<string, unknown> | undefined;
|
|
43
43
|
}>;
|
|
44
44
|
export type WorkflowNextInput = z.infer<typeof WorkflowNextInput>;
|
|
45
45
|
export declare const WorkflowValidateJsonInput: z.ZodObject<{
|
package/dist/mcp/v2/tools.d.ts
CHANGED
|
@@ -34,12 +34,12 @@ export declare const V2StartWorkflowInput: z.ZodObject<{
|
|
|
34
34
|
goal: z.ZodString;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
36
|
workflowId: string;
|
|
37
|
-
workspacePath: string;
|
|
38
37
|
goal: string;
|
|
38
|
+
workspacePath: string;
|
|
39
39
|
}, {
|
|
40
40
|
workflowId: string;
|
|
41
|
-
workspacePath: string;
|
|
42
41
|
goal: string;
|
|
42
|
+
workspacePath: string;
|
|
43
43
|
}>;
|
|
44
44
|
export type V2StartWorkflowInput = z.infer<typeof V2StartWorkflowInput>;
|
|
45
45
|
export declare const V2ContinueWorkflowInputShape: z.ZodObject<{
|
|
@@ -59,22 +59,22 @@ export declare const V2ContinueWorkflowInputShape: z.ZodObject<{
|
|
|
59
59
|
}>>;
|
|
60
60
|
}, "strict", z.ZodTypeAny, {
|
|
61
61
|
continueToken: string;
|
|
62
|
-
context?: Record<string, unknown> | undefined;
|
|
63
|
-
workspacePath?: string | undefined;
|
|
64
62
|
output?: {
|
|
65
63
|
notesMarkdown?: string | undefined;
|
|
66
64
|
artifacts?: unknown[] | undefined;
|
|
67
65
|
} | undefined;
|
|
68
|
-
intent?: "
|
|
69
|
-
}, {
|
|
70
|
-
continueToken: string;
|
|
66
|
+
intent?: "rehydrate" | "advance" | undefined;
|
|
71
67
|
context?: Record<string, unknown> | undefined;
|
|
72
68
|
workspacePath?: string | undefined;
|
|
69
|
+
}, {
|
|
70
|
+
continueToken: string;
|
|
73
71
|
output?: {
|
|
74
72
|
notesMarkdown?: string | undefined;
|
|
75
73
|
artifacts?: unknown[] | undefined;
|
|
76
74
|
} | undefined;
|
|
77
|
-
intent?: "
|
|
75
|
+
intent?: "rehydrate" | "advance" | undefined;
|
|
76
|
+
context?: Record<string, unknown> | undefined;
|
|
77
|
+
workspacePath?: string | undefined;
|
|
78
78
|
}>;
|
|
79
79
|
export declare const V2ContinueWorkflowInput: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
80
80
|
workspacePath: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
@@ -95,43 +95,43 @@ export declare const V2ContinueWorkflowInput: z.ZodEffects<z.ZodEffects<z.ZodObj
|
|
|
95
95
|
contextVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
96
96
|
}, "strict", z.ZodTypeAny, {
|
|
97
97
|
continueToken: string;
|
|
98
|
-
context?: Record<string, unknown> | undefined;
|
|
99
|
-
workspacePath?: string | undefined;
|
|
100
98
|
output?: {
|
|
101
99
|
notesMarkdown?: string | undefined;
|
|
102
100
|
artifacts?: unknown[] | undefined;
|
|
103
101
|
} | undefined;
|
|
104
|
-
intent?: "
|
|
102
|
+
intent?: "rehydrate" | "advance" | undefined;
|
|
103
|
+
context?: Record<string, unknown> | undefined;
|
|
104
|
+
workspacePath?: string | undefined;
|
|
105
105
|
contextVariables?: Record<string, unknown> | undefined;
|
|
106
106
|
}, {
|
|
107
107
|
continueToken: string;
|
|
108
|
-
context?: Record<string, unknown> | undefined;
|
|
109
|
-
workspacePath?: string | undefined;
|
|
110
108
|
output?: {
|
|
111
109
|
notesMarkdown?: string | undefined;
|
|
112
110
|
artifacts?: unknown[] | undefined;
|
|
113
111
|
} | undefined;
|
|
114
|
-
intent?: "
|
|
112
|
+
intent?: "rehydrate" | "advance" | undefined;
|
|
113
|
+
context?: Record<string, unknown> | undefined;
|
|
114
|
+
workspacePath?: string | undefined;
|
|
115
115
|
contextVariables?: Record<string, unknown> | undefined;
|
|
116
116
|
}>, {
|
|
117
117
|
continueToken: string;
|
|
118
|
-
context?: Record<string, unknown> | undefined;
|
|
119
|
-
workspacePath?: string | undefined;
|
|
120
118
|
output?: {
|
|
121
119
|
notesMarkdown?: string | undefined;
|
|
122
120
|
artifacts?: unknown[] | undefined;
|
|
123
121
|
} | undefined;
|
|
124
|
-
intent?: "
|
|
122
|
+
intent?: "rehydrate" | "advance" | undefined;
|
|
123
|
+
context?: Record<string, unknown> | undefined;
|
|
124
|
+
workspacePath?: string | undefined;
|
|
125
125
|
contextVariables?: Record<string, unknown> | undefined;
|
|
126
126
|
}, {
|
|
127
127
|
continueToken: string;
|
|
128
|
-
context?: Record<string, unknown> | undefined;
|
|
129
|
-
workspacePath?: string | undefined;
|
|
130
128
|
output?: {
|
|
131
129
|
notesMarkdown?: string | undefined;
|
|
132
130
|
artifacts?: unknown[] | undefined;
|
|
133
131
|
} | undefined;
|
|
134
|
-
intent?: "
|
|
132
|
+
intent?: "rehydrate" | "advance" | undefined;
|
|
133
|
+
context?: Record<string, unknown> | undefined;
|
|
134
|
+
workspacePath?: string | undefined;
|
|
135
135
|
contextVariables?: Record<string, unknown> | undefined;
|
|
136
136
|
}>, {
|
|
137
137
|
workspacePath?: string | undefined;
|
|
@@ -140,17 +140,17 @@ export declare const V2ContinueWorkflowInput: z.ZodEffects<z.ZodEffects<z.ZodObj
|
|
|
140
140
|
artifacts?: unknown[] | undefined;
|
|
141
141
|
} | undefined;
|
|
142
142
|
context?: {} | undefined;
|
|
143
|
-
intent: "
|
|
143
|
+
intent: "rehydrate" | "advance";
|
|
144
144
|
continueToken: string;
|
|
145
145
|
}, {
|
|
146
146
|
continueToken: string;
|
|
147
|
-
context?: Record<string, unknown> | undefined;
|
|
148
|
-
workspacePath?: string | undefined;
|
|
149
147
|
output?: {
|
|
150
148
|
notesMarkdown?: string | undefined;
|
|
151
149
|
artifacts?: unknown[] | undefined;
|
|
152
150
|
} | undefined;
|
|
153
|
-
intent?: "
|
|
151
|
+
intent?: "rehydrate" | "advance" | undefined;
|
|
152
|
+
context?: Record<string, unknown> | undefined;
|
|
153
|
+
workspacePath?: string | undefined;
|
|
154
154
|
contextVariables?: Record<string, unknown> | undefined;
|
|
155
155
|
}>;
|
|
156
156
|
export type V2ContinueWorkflowInput = z.infer<typeof V2ContinueWorkflowInput>;
|
|
@@ -11,6 +11,8 @@ export interface HandoffArtifact {
|
|
|
11
11
|
export interface DeliveryFlags {
|
|
12
12
|
readonly autoCommit?: boolean;
|
|
13
13
|
readonly autoOpenPR?: boolean;
|
|
14
|
+
readonly sessionId?: string;
|
|
15
|
+
readonly branchPrefix?: string;
|
|
14
16
|
}
|
|
15
17
|
export type DeliveryResult = {
|
|
16
18
|
readonly _tag: 'committed';
|
|
@@ -146,6 +146,30 @@ async function runDelivery(artifact, workspacePath, flags, execFn) {
|
|
|
146
146
|
reason: 'filesChanged is empty -- cannot stage files safely (no git add -A fallback)',
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
+
if (flags.sessionId) {
|
|
150
|
+
const expectedBranch = `${flags.branchPrefix ?? 'worktrain/'}${flags.sessionId}`;
|
|
151
|
+
let headBranch;
|
|
152
|
+
try {
|
|
153
|
+
const result = await execFn('git', ['rev-parse', '--abbrev-ref', 'HEAD'], { cwd: workspacePath, timeout: DELIVERY_TIMEOUT_MS });
|
|
154
|
+
headBranch = result.stdout.trim();
|
|
155
|
+
}
|
|
156
|
+
catch (e) {
|
|
157
|
+
return {
|
|
158
|
+
_tag: 'error',
|
|
159
|
+
phase: 'commit',
|
|
160
|
+
details: `HEAD branch check failed (cannot stage): ${formatExecError(e)}`,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
if (headBranch !== expectedBranch) {
|
|
164
|
+
return {
|
|
165
|
+
_tag: 'error',
|
|
166
|
+
phase: 'commit',
|
|
167
|
+
details: `HEAD branch mismatch: expected "${expectedBranch}" but found "${headBranch}". ` +
|
|
168
|
+
`Refusing to stage or push -- the agent may have switched branches. ` +
|
|
169
|
+
`Worktree path: ${workspacePath}`,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
}
|
|
149
173
|
const commitMessage = artifact.commitSubject.startsWith(`${artifact.commitType}(`)
|
|
150
174
|
? artifact.commitSubject
|
|
151
175
|
: `${artifact.commitType}(${artifact.commitScope}): ${artifact.commitSubject}`;
|
|
@@ -136,7 +136,17 @@ async function maybeRunDelivery(triggerId, trigger, result, execFn) {
|
|
|
136
136
|
`Ensure the workflow's final step produces a JSON block with commitType, filesChanged, etc.`);
|
|
137
137
|
return;
|
|
138
138
|
}
|
|
139
|
-
const
|
|
139
|
+
const deliveryCwd = result.sessionWorkspacePath ?? trigger.workspacePath;
|
|
140
|
+
const deliveryResult = await (0, delivery_action_js_1.runDelivery)(parseResult.value, deliveryCwd, {
|
|
141
|
+
autoCommit: trigger.autoCommit,
|
|
142
|
+
autoOpenPR: trigger.autoOpenPR,
|
|
143
|
+
...(trigger.branchStrategy === 'worktree' && result.sessionWorkspacePath
|
|
144
|
+
? {
|
|
145
|
+
sessionId: result.sessionId ?? '',
|
|
146
|
+
branchPrefix: trigger.branchPrefix ?? 'worktrain/',
|
|
147
|
+
}
|
|
148
|
+
: {}),
|
|
149
|
+
}, execFn);
|
|
140
150
|
switch (deliveryResult._tag) {
|
|
141
151
|
case 'committed':
|
|
142
152
|
console.log(`[TriggerRouter] Delivery committed: triggerId=${triggerId} sha=${deliveryResult.sha}`);
|
|
@@ -152,6 +162,16 @@ async function maybeRunDelivery(triggerId, trigger, result, execFn) {
|
|
|
152
162
|
`details=${deliveryResult.details}`);
|
|
153
163
|
break;
|
|
154
164
|
}
|
|
165
|
+
if (trigger.branchStrategy === 'worktree' && result.sessionWorkspacePath) {
|
|
166
|
+
try {
|
|
167
|
+
await execFn('git', ['-C', trigger.workspacePath, 'worktree', 'remove', '--force', result.sessionWorkspacePath], { cwd: trigger.workspacePath, timeout: 60000 });
|
|
168
|
+
console.log(`[TriggerRouter] Worktree removed: triggerId=${triggerId} path=${result.sessionWorkspacePath}`);
|
|
169
|
+
}
|
|
170
|
+
catch (err) {
|
|
171
|
+
console.warn(`[TriggerRouter] Could not remove worktree: triggerId=${triggerId} ` +
|
|
172
|
+
`path=${result.sessionWorkspacePath}: ${err instanceof Error ? err.message : String(err)}`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
155
175
|
}
|
|
156
176
|
class Semaphore {
|
|
157
177
|
constructor(max) {
|
|
@@ -246,6 +266,9 @@ class TriggerRouter {
|
|
|
246
266
|
...(trigger.referenceUrls !== undefined ? { referenceUrls: trigger.referenceUrls } : {}),
|
|
247
267
|
...(trigger.agentConfig !== undefined ? { agentConfig: trigger.agentConfig } : {}),
|
|
248
268
|
...(trigger.soulFile !== undefined ? { soulFile: trigger.soulFile } : {}),
|
|
269
|
+
...(trigger.branchStrategy !== undefined ? { branchStrategy: trigger.branchStrategy } : {}),
|
|
270
|
+
...(trigger.baseBranch !== undefined ? { baseBranch: trigger.baseBranch } : {}),
|
|
271
|
+
...(trigger.branchPrefix !== undefined ? { branchPrefix: trigger.branchPrefix } : {}),
|
|
249
272
|
};
|
|
250
273
|
this.emitter?.emit({ kind: 'trigger_fired', triggerId: trigger.id, workflowId: trigger.workflowId });
|
|
251
274
|
const queueKey = trigger.concurrencyMode === 'parallel'
|
|
@@ -391,6 +391,15 @@ function setTriggerField(trigger, key, value) {
|
|
|
391
391
|
case 'soulFile':
|
|
392
392
|
trigger.soulFile = value;
|
|
393
393
|
break;
|
|
394
|
+
case 'branchStrategy':
|
|
395
|
+
trigger.branchStrategy = value;
|
|
396
|
+
break;
|
|
397
|
+
case 'baseBranch':
|
|
398
|
+
trigger.baseBranch = value;
|
|
399
|
+
break;
|
|
400
|
+
case 'branchPrefix':
|
|
401
|
+
trigger.branchPrefix = value;
|
|
402
|
+
break;
|
|
394
403
|
default:
|
|
395
404
|
break;
|
|
396
405
|
}
|
|
@@ -602,6 +611,36 @@ function validateAndResolveTrigger(raw, env, workspaces = {}) {
|
|
|
602
611
|
console.warn(`[TriggerStore] Warning: trigger "${rawId}" has autoOpenPR: true but autoCommit is not true. ` +
|
|
603
612
|
`A PR requires a commit -- delivery will be skipped unless autoCommit is also set to true.`);
|
|
604
613
|
}
|
|
614
|
+
const rawBranchStrategy = raw.branchStrategy?.trim();
|
|
615
|
+
if (rawBranchStrategy !== undefined && rawBranchStrategy !== 'worktree' && rawBranchStrategy !== 'none') {
|
|
616
|
+
return (0, result_js_1.err)({
|
|
617
|
+
kind: 'invalid_field_value',
|
|
618
|
+
field: `branchStrategy (must be "worktree" or "none", got: "${rawBranchStrategy}")`,
|
|
619
|
+
triggerId: rawId,
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
const branchStrategy = rawBranchStrategy === 'worktree' ? 'worktree' : rawBranchStrategy === 'none' ? 'none' : undefined;
|
|
623
|
+
const baseBranch = raw.baseBranch?.trim() || undefined;
|
|
624
|
+
const branchPrefix = raw.branchPrefix?.trim() || undefined;
|
|
625
|
+
const GIT_SAFE_RE = /^[a-zA-Z0-9._/-]+$/;
|
|
626
|
+
if (baseBranch !== undefined) {
|
|
627
|
+
if (!GIT_SAFE_RE.test(baseBranch) || baseBranch.startsWith('-')) {
|
|
628
|
+
return (0, result_js_1.err)({
|
|
629
|
+
kind: 'invalid_field_value',
|
|
630
|
+
field: `baseBranch (must match /^[a-zA-Z0-9._/-]+$/ and not start with "-", got: "${baseBranch}")`,
|
|
631
|
+
triggerId: rawId,
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
if (branchPrefix !== undefined) {
|
|
636
|
+
if (!GIT_SAFE_RE.test(branchPrefix) || branchPrefix.startsWith('-')) {
|
|
637
|
+
return (0, result_js_1.err)({
|
|
638
|
+
kind: 'invalid_field_value',
|
|
639
|
+
field: `branchPrefix (must match /^[a-zA-Z0-9._/-]+$/ and not start with "-", got: "${branchPrefix}")`,
|
|
640
|
+
triggerId: rawId,
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
}
|
|
605
644
|
function parsePollIntervalSeconds(raw2, triggerId2) {
|
|
606
645
|
const intervalRaw = raw2.pollIntervalSeconds?.trim();
|
|
607
646
|
if (!intervalRaw)
|
|
@@ -741,6 +780,9 @@ function validateAndResolveTrigger(raw, env, workspaces = {}) {
|
|
|
741
780
|
...(pollingSource !== undefined ? { pollingSource } : {}),
|
|
742
781
|
...(resolvedWorkspaceName !== undefined ? { workspaceName: resolvedWorkspaceName } : {}),
|
|
743
782
|
...(resolvedSoulFile ? { soulFile: resolvedSoulFile } : {}),
|
|
783
|
+
...(branchStrategy !== undefined ? { branchStrategy } : {}),
|
|
784
|
+
...(baseBranch !== undefined ? { baseBranch } : {}),
|
|
785
|
+
...(branchPrefix !== undefined ? { branchPrefix } : {}),
|
|
744
786
|
};
|
|
745
787
|
return (0, result_js_1.ok)(trigger);
|
|
746
788
|
}
|
package/dist/trigger/types.d.ts
CHANGED
|
@@ -68,6 +68,9 @@ export interface TriggerDefinition {
|
|
|
68
68
|
readonly pollingSource?: PollingSource;
|
|
69
69
|
readonly workspaceName?: WorkspaceName;
|
|
70
70
|
readonly soulFile?: string;
|
|
71
|
+
readonly branchStrategy?: 'worktree' | 'none';
|
|
72
|
+
readonly baseBranch?: string;
|
|
73
|
+
readonly branchPrefix?: string;
|
|
71
74
|
}
|
|
72
75
|
export interface TriggerConfig {
|
|
73
76
|
readonly triggers: readonly TriggerDefinition[];
|
|
@@ -37,16 +37,16 @@ export declare const AssessmentArtifactV1Schema: z.ZodObject<{
|
|
|
37
37
|
level: string;
|
|
38
38
|
rationale?: string | undefined;
|
|
39
39
|
}>;
|
|
40
|
-
assessmentId?: string | undefined;
|
|
41
40
|
summary?: string | undefined;
|
|
41
|
+
assessmentId?: string | undefined;
|
|
42
42
|
}, {
|
|
43
43
|
kind: "wr.assessment";
|
|
44
44
|
dimensions: Record<string, string | {
|
|
45
45
|
level: string;
|
|
46
46
|
rationale?: string | undefined;
|
|
47
47
|
}>;
|
|
48
|
-
assessmentId?: string | undefined;
|
|
49
48
|
summary?: string | undefined;
|
|
49
|
+
assessmentId?: string | undefined;
|
|
50
50
|
}>;
|
|
51
51
|
export type AssessmentArtifactV1 = z.infer<typeof AssessmentArtifactV1Schema>;
|
|
52
52
|
export declare function isAssessmentArtifact(artifact: unknown): artifact is {
|
|
@@ -9,13 +9,13 @@ export declare const CoordinatorSignalArtifactV1Schema: z.ZodObject<{
|
|
|
9
9
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
10
10
|
}, "strict", z.ZodTypeAny, {
|
|
11
11
|
kind: "wr.coordinator_signal";
|
|
12
|
-
signalKind: "blocked" | "progress" | "finding" | "data_needed" | "approval_needed";
|
|
13
12
|
payload: Record<string, unknown>;
|
|
13
|
+
signalKind: "blocked" | "progress" | "finding" | "data_needed" | "approval_needed";
|
|
14
14
|
sessionId?: string | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
kind: "wr.coordinator_signal";
|
|
17
|
-
signalKind: "blocked" | "progress" | "finding" | "data_needed" | "approval_needed";
|
|
18
17
|
payload: Record<string, unknown>;
|
|
18
|
+
signalKind: "blocked" | "progress" | "finding" | "data_needed" | "approval_needed";
|
|
19
19
|
sessionId?: string | undefined;
|
|
20
20
|
}>;
|
|
21
21
|
export type CoordinatorSignalArtifactV1 = z.infer<typeof CoordinatorSignalArtifactV1Schema>;
|
|
@@ -9,14 +9,14 @@ export declare const LoopControlMetadataV1Schema: z.ZodOptional<z.ZodObject<{
|
|
|
9
9
|
confidence: z.ZodOptional<z.ZodNumber>;
|
|
10
10
|
}, "strict", z.ZodTypeAny, {
|
|
11
11
|
reason?: string | undefined;
|
|
12
|
+
confidence?: number | undefined;
|
|
12
13
|
issuesFound?: number | undefined;
|
|
13
14
|
iterationIndex?: number | undefined;
|
|
14
|
-
confidence?: number | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
reason?: string | undefined;
|
|
17
|
+
confidence?: number | undefined;
|
|
17
18
|
issuesFound?: number | undefined;
|
|
18
19
|
iterationIndex?: number | undefined;
|
|
19
|
-
confidence?: number | undefined;
|
|
20
20
|
}>>;
|
|
21
21
|
export type LoopControlMetadataV1 = z.infer<typeof LoopControlMetadataV1Schema>;
|
|
22
22
|
export declare const LoopControlArtifactV1Schema: z.ZodObject<{
|
|
@@ -30,14 +30,14 @@ export declare const LoopControlArtifactV1Schema: z.ZodObject<{
|
|
|
30
30
|
confidence: z.ZodOptional<z.ZodNumber>;
|
|
31
31
|
}, "strict", z.ZodTypeAny, {
|
|
32
32
|
reason?: string | undefined;
|
|
33
|
+
confidence?: number | undefined;
|
|
33
34
|
issuesFound?: number | undefined;
|
|
34
35
|
iterationIndex?: number | undefined;
|
|
35
|
-
confidence?: number | undefined;
|
|
36
36
|
}, {
|
|
37
37
|
reason?: string | undefined;
|
|
38
|
+
confidence?: number | undefined;
|
|
38
39
|
issuesFound?: number | undefined;
|
|
39
40
|
iterationIndex?: number | undefined;
|
|
40
|
-
confidence?: number | undefined;
|
|
41
41
|
}>>;
|
|
42
42
|
}, "strict", z.ZodTypeAny, {
|
|
43
43
|
kind: "wr.loop_control";
|
|
@@ -45,9 +45,9 @@ export declare const LoopControlArtifactV1Schema: z.ZodObject<{
|
|
|
45
45
|
loopId?: string | undefined;
|
|
46
46
|
metadata?: {
|
|
47
47
|
reason?: string | undefined;
|
|
48
|
+
confidence?: number | undefined;
|
|
48
49
|
issuesFound?: number | undefined;
|
|
49
50
|
iterationIndex?: number | undefined;
|
|
50
|
-
confidence?: number | undefined;
|
|
51
51
|
} | undefined;
|
|
52
52
|
}, {
|
|
53
53
|
kind: "wr.loop_control";
|
|
@@ -55,9 +55,9 @@ export declare const LoopControlArtifactV1Schema: z.ZodObject<{
|
|
|
55
55
|
loopId?: string | undefined;
|
|
56
56
|
metadata?: {
|
|
57
57
|
reason?: string | undefined;
|
|
58
|
+
confidence?: number | undefined;
|
|
58
59
|
issuesFound?: number | undefined;
|
|
59
60
|
iterationIndex?: number | undefined;
|
|
60
|
-
confidence?: number | undefined;
|
|
61
61
|
} | undefined;
|
|
62
62
|
}>;
|
|
63
63
|
export type LoopControlArtifactV1 = z.infer<typeof LoopControlArtifactV1Schema>;
|
|
@@ -8,30 +8,30 @@ export declare const ReviewVerdictArtifactV1Schema: z.ZodObject<{
|
|
|
8
8
|
severity: z.ZodEnum<["critical", "major", "minor", "nit"]>;
|
|
9
9
|
summary: z.ZodString;
|
|
10
10
|
}, "strict", z.ZodTypeAny, {
|
|
11
|
+
severity: "critical" | "minor" | "major" | "nit";
|
|
11
12
|
summary: string;
|
|
12
|
-
severity: "minor" | "critical" | "major" | "nit";
|
|
13
13
|
}, {
|
|
14
|
+
severity: "critical" | "minor" | "major" | "nit";
|
|
14
15
|
summary: string;
|
|
15
|
-
severity: "minor" | "critical" | "major" | "nit";
|
|
16
16
|
}>, "many">;
|
|
17
17
|
summary: z.ZodString;
|
|
18
18
|
}, "strict", z.ZodTypeAny, {
|
|
19
19
|
kind: "wr.review_verdict";
|
|
20
20
|
summary: string;
|
|
21
|
-
confidence: "
|
|
21
|
+
confidence: "low" | "high" | "medium";
|
|
22
22
|
verdict: "clean" | "minor" | "blocking";
|
|
23
23
|
findings: {
|
|
24
|
+
severity: "critical" | "minor" | "major" | "nit";
|
|
24
25
|
summary: string;
|
|
25
|
-
severity: "minor" | "critical" | "major" | "nit";
|
|
26
26
|
}[];
|
|
27
27
|
}, {
|
|
28
28
|
kind: "wr.review_verdict";
|
|
29
29
|
summary: string;
|
|
30
|
-
confidence: "
|
|
30
|
+
confidence: "low" | "high" | "medium";
|
|
31
31
|
verdict: "clean" | "minor" | "blocking";
|
|
32
32
|
findings: {
|
|
33
|
+
severity: "critical" | "minor" | "major" | "nit";
|
|
33
34
|
summary: string;
|
|
34
|
-
severity: "minor" | "critical" | "major" | "nit";
|
|
35
35
|
}[];
|
|
36
36
|
}>;
|
|
37
37
|
export type ReviewVerdictArtifactV1 = z.infer<typeof ReviewVerdictArtifactV1Schema>;
|