agent-dealer 1.2.7 → 1.2.8
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/bundle/server/dist/adapters/agent-deck-bind.js +16 -6
- package/bundle/server/dist/adapters/agent-deck-bind.test.js +74 -0
- package/bundle/server/dist/adapters/agent-health.js +14 -3
- package/bundle/server/dist/adapters/github.js +4 -1
- package/bundle/server/dist/adapters/muse-capability.js +443 -24
- package/bundle/server/dist/adapters/muse-capability.test.js +469 -25
- package/bundle/server/dist/adapters/muse-visual-qa.js +114 -0
- package/bundle/server/dist/adapters/muse-visual-qa.test.js +68 -0
- package/bundle/server/dist/capacity/muse-probe.js +56 -9
- package/bundle/server/dist/capacity/muse-probe.test.js +188 -1
- package/bundle/server/dist/coordinator/admission.js +14 -1
- package/bundle/server/dist/coordinator/admission.test.js +197 -4
- package/bundle/server/dist/coordinator/auto-merge.integration.test.js +276 -0
- package/bundle/server/dist/coordinator/auto-merge.js +39 -3
- package/bundle/server/dist/coordinator/commands.js +90 -5
- package/bundle/server/dist/coordinator/deck-outage.integration.test.js +4 -2
- package/bundle/server/dist/coordinator/developer-effect.js +79 -1
- package/bundle/server/dist/coordinator/execution-report.js +6 -0
- package/bundle/server/dist/coordinator/execution-report.test.js +7 -0
- package/bundle/server/dist/coordinator/failure-cause.js +64 -1
- package/bundle/server/dist/coordinator/failure-cause.test.js +92 -1
- package/bundle/server/dist/coordinator/failure-reason.js +7 -0
- package/bundle/server/dist/coordinator/failure-reason.test.js +14 -0
- package/bundle/server/dist/coordinator/human-resolution.js +17 -1
- package/bundle/server/dist/coordinator/merge-conflict-sync.js +647 -0
- package/bundle/server/dist/coordinator/merge-conflict-sync.test.js +121 -0
- package/bundle/server/dist/coordinator/muse-developer.integration.test.js +9 -4
- package/bundle/server/dist/coordinator/muse-spawn.js +122 -29
- package/bundle/server/dist/coordinator/muse-spawn.test.js +210 -0
- package/bundle/server/dist/coordinator/playbook-feedback.js +690 -0
- package/bundle/server/dist/coordinator/playbook-feedback.test.js +702 -0
- package/bundle/server/dist/coordinator/prompts-execution-contract.test.js +107 -0
- package/bundle/server/dist/coordinator/prompts.js +78 -2
- package/bundle/server/dist/coordinator/prompts.test.js +83 -0
- package/bundle/server/dist/coordinator/reflect-trigger.js +33 -169
- package/bundle/server/dist/coordinator/reflect-trigger.test.js +149 -200
- package/bundle/server/dist/coordinator/reviewer-effect.js +10 -1
- package/bundle/server/dist/coordinator/reviewer-result.js +6 -0
- package/bundle/server/dist/coordinator/routing.test.js +14 -0
- package/bundle/server/dist/coordinator/session-timeouts.js +30 -0
- package/bundle/server/dist/coordinator/usage-cap.integration.test.js +1 -1
- package/bundle/server/dist/coordinator/worker-loop.js +18 -4
- package/bundle/server/dist/db/index.js +5 -0
- package/bundle/server/dist/db/schema.sql +3 -0
- package/bundle/server/dist/docs-execution-analysis.test.js +1 -0
- package/bundle/server/dist/repository/artifacts-for-issue.js +3 -3
- package/bundle/server/dist/repository/human-actions.js +14 -0
- package/bundle/server/dist/repository/issues.js +29 -4
- package/bundle/server/dist/repository/worker-sessions.js +51 -2
- package/bundle/server/dist/routes/human-actions.js +10 -8
- package/bundle/server/dist/routes/issues-execution-contract.test.js +321 -0
- package/bundle/server/dist/routes/issues.js +19 -2
- package/bundle/server/dist/runners/muse-code-jsonl.js +106 -11
- package/bundle/server/dist/runners/muse-config-core.js +18 -1
- package/bundle/server/dist/runners/muse-config.test.js +37 -0
- package/bundle/server/dist/runners/muse-serve-session.js +5 -0
- package/bundle/server/dist/runners/spawn-cli.js +116 -0
- package/bundle/server/dist/runners/spawn-cli.test.js +124 -0
- package/bundle/server/package.json +2 -2
- package/bundle/server/static-ui/assets/{index-yLyxRd-7.js → index-B6SVCzMR.js} +14 -14
- package/bundle/server/static-ui/assets/{index-DyAJNyfV.css → index-K_YcYkQU.css} +1 -1
- package/bundle/server/static-ui/index.html +2 -2
- package/bundle/shared/dist/execution-analysis.d.ts +22 -22
- package/bundle/shared/dist/execution-contract.d.ts +117 -0
- package/bundle/shared/dist/execution-contract.js +307 -0
- package/bundle/shared/dist/execution-contract.test.d.ts +2 -0
- package/bundle/shared/dist/execution-contract.test.js +499 -0
- package/bundle/shared/dist/execution-report.d.ts +9 -9
- package/bundle/shared/dist/execution-report.js +2 -0
- package/bundle/shared/dist/failure-cause.d.ts +4 -4
- package/bundle/shared/dist/failure-cause.js +2 -0
- package/bundle/shared/dist/human-actions.d.ts +4 -4
- package/bundle/shared/dist/human-actions.js +9 -0
- package/bundle/shared/dist/index.d.ts +85 -84
- package/bundle/shared/dist/index.js +3 -0
- package/bundle/shared/dist/issues.d.ts +146 -16
- package/bundle/shared/dist/issues.js +8 -0
- package/bundle/shared/dist/issues.test.js +1 -0
- package/bundle/shared/dist/outbound-draft.d.ts +12 -12
- package/bundle/shared/dist/worker-sessions.d.ts +10 -0
- package/bundle/shared/dist/worker-sessions.js +8 -0
- package/bundle/shared/dist/worker-sessions.test.js +1 -0
- package/bundle/shared/dist/workflow.d.ts +4 -4
- package/bundle/shared/dist/workflow.js +10 -0
- package/bundle/shared/dist/workflow.test.js +2 -0
- package/bundle/shared/package.json +1 -1
- package/package.json +1 -1
|
@@ -15,6 +15,49 @@ export declare const Issue: z.ZodObject<{
|
|
|
15
15
|
title: z.ZodString;
|
|
16
16
|
description: z.ZodNullable<z.ZodString>;
|
|
17
17
|
acceptanceCriteria: z.ZodNullable<z.ZodString>;
|
|
18
|
+
/**
|
|
19
|
+
* NOT-306: compiled execution contract derived from the ticket description
|
|
20
|
+
* (canonical `##` headings). Derived data — the description stays the source
|
|
21
|
+
* of truth — null for legacy/contract-free issues. Optional so previously
|
|
22
|
+
* stored rows and existing fixtures parse unchanged.
|
|
23
|
+
*/
|
|
24
|
+
executionContract: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
25
|
+
version: z.ZodLiteral<"v1">;
|
|
26
|
+
executionMode: z.ZodEnum<["feature", "bug fix", "refactor", "investigation", "split child"]>;
|
|
27
|
+
nonGoals: z.ZodArray<z.ZodString, "many">;
|
|
28
|
+
exitPredicate: z.ZodString;
|
|
29
|
+
onePrStoppingPoint: z.ZodString;
|
|
30
|
+
acceptanceCriteria: z.ZodArray<z.ZodObject<{
|
|
31
|
+
text: z.ZodString;
|
|
32
|
+
evidence: z.ZodNullable<z.ZodString>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
text: string;
|
|
35
|
+
evidence: string | null;
|
|
36
|
+
}, {
|
|
37
|
+
text: string;
|
|
38
|
+
evidence: string | null;
|
|
39
|
+
}>, "many">;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
version: "v1";
|
|
42
|
+
executionMode: "feature" | "bug fix" | "refactor" | "investigation" | "split child";
|
|
43
|
+
nonGoals: string[];
|
|
44
|
+
exitPredicate: string;
|
|
45
|
+
onePrStoppingPoint: string;
|
|
46
|
+
acceptanceCriteria: {
|
|
47
|
+
text: string;
|
|
48
|
+
evidence: string | null;
|
|
49
|
+
}[];
|
|
50
|
+
}, {
|
|
51
|
+
version: "v1";
|
|
52
|
+
executionMode: "feature" | "bug fix" | "refactor" | "investigation" | "split child";
|
|
53
|
+
nonGoals: string[];
|
|
54
|
+
exitPredicate: string;
|
|
55
|
+
onePrStoppingPoint: string;
|
|
56
|
+
acceptanceCriteria: {
|
|
57
|
+
text: string;
|
|
58
|
+
evidence: string | null;
|
|
59
|
+
}[];
|
|
60
|
+
}>>>;
|
|
18
61
|
/**
|
|
19
62
|
* Portable GitHub identity (`github.com/owner/repo`) for new issues (NOT-149).
|
|
20
63
|
* Legacy rows may still hold a local filesystem path until explicitly migrated —
|
|
@@ -52,13 +95,13 @@ export declare const Issue: z.ZodObject<{
|
|
|
52
95
|
createdAt: string;
|
|
53
96
|
updatedAt: string;
|
|
54
97
|
repo: string;
|
|
98
|
+
acceptanceCriteria: string | null;
|
|
99
|
+
description: string | null;
|
|
55
100
|
title: string;
|
|
56
101
|
source: "manual" | "linear" | "agent";
|
|
57
102
|
externalId: string | null;
|
|
58
103
|
externalLabel: string | null;
|
|
59
104
|
externalUrl: string | null;
|
|
60
|
-
description: string | null;
|
|
61
|
-
acceptanceCriteria: string | null;
|
|
62
105
|
baseBranch: string;
|
|
63
106
|
currentOwner: "reviewer" | "developer" | "human" | "system";
|
|
64
107
|
currentIntent: string | null;
|
|
@@ -73,6 +116,17 @@ export declare const Issue: z.ZodObject<{
|
|
|
73
116
|
prNumber: number | null;
|
|
74
117
|
prUrl: string | null;
|
|
75
118
|
autoMerge: boolean;
|
|
119
|
+
executionContract?: {
|
|
120
|
+
version: "v1";
|
|
121
|
+
executionMode: "feature" | "bug fix" | "refactor" | "investigation" | "split child";
|
|
122
|
+
nonGoals: string[];
|
|
123
|
+
exitPredicate: string;
|
|
124
|
+
onePrStoppingPoint: string;
|
|
125
|
+
acceptanceCriteria: {
|
|
126
|
+
text: string;
|
|
127
|
+
evidence: string | null;
|
|
128
|
+
}[];
|
|
129
|
+
} | null | undefined;
|
|
76
130
|
}, {
|
|
77
131
|
branch: string | null;
|
|
78
132
|
status: "final_review" | "done" | "ready" | "developing" | "reviewing" | "repairing" | "needs_human" | "closed";
|
|
@@ -80,13 +134,13 @@ export declare const Issue: z.ZodObject<{
|
|
|
80
134
|
createdAt: string;
|
|
81
135
|
updatedAt: string;
|
|
82
136
|
repo: string;
|
|
137
|
+
acceptanceCriteria: string | null;
|
|
138
|
+
description: string | null;
|
|
83
139
|
title: string;
|
|
84
140
|
source: "manual" | "linear" | "agent";
|
|
85
141
|
externalId: string | null;
|
|
86
142
|
externalLabel: string | null;
|
|
87
143
|
externalUrl: string | null;
|
|
88
|
-
description: string | null;
|
|
89
|
-
acceptanceCriteria: string | null;
|
|
90
144
|
baseBranch: string;
|
|
91
145
|
currentOwner: "reviewer" | "developer" | "human" | "system";
|
|
92
146
|
currentIntent: string | null;
|
|
@@ -101,6 +155,17 @@ export declare const Issue: z.ZodObject<{
|
|
|
101
155
|
prNumber: number | null;
|
|
102
156
|
prUrl: string | null;
|
|
103
157
|
autoMerge: boolean;
|
|
158
|
+
executionContract?: {
|
|
159
|
+
version: "v1";
|
|
160
|
+
executionMode: "feature" | "bug fix" | "refactor" | "investigation" | "split child";
|
|
161
|
+
nonGoals: string[];
|
|
162
|
+
exitPredicate: string;
|
|
163
|
+
onePrStoppingPoint: string;
|
|
164
|
+
acceptanceCriteria: {
|
|
165
|
+
text: string;
|
|
166
|
+
evidence: string | null;
|
|
167
|
+
}[];
|
|
168
|
+
} | null | undefined;
|
|
104
169
|
}>;
|
|
105
170
|
export type Issue = z.infer<typeof Issue>;
|
|
106
171
|
export declare const CreateIssueInput: z.ZodObject<{
|
|
@@ -137,22 +202,22 @@ export declare const CreateIssueInput: z.ZodObject<{
|
|
|
137
202
|
maxInfraAttempts: number;
|
|
138
203
|
autoMerge: boolean;
|
|
139
204
|
enqueue: boolean;
|
|
205
|
+
acceptanceCriteria?: string | undefined;
|
|
206
|
+
description?: string | undefined;
|
|
140
207
|
externalId?: string | undefined;
|
|
141
208
|
externalLabel?: string | undefined;
|
|
142
209
|
externalUrl?: string | undefined;
|
|
143
|
-
description?: string | undefined;
|
|
144
|
-
acceptanceCriteria?: string | undefined;
|
|
145
210
|
}, {
|
|
146
211
|
repo: string;
|
|
147
212
|
title: string;
|
|
148
213
|
developerAgentId: string;
|
|
149
214
|
reviewerAgentId: string;
|
|
215
|
+
acceptanceCriteria?: string | undefined;
|
|
216
|
+
description?: string | undefined;
|
|
150
217
|
source?: "manual" | "linear" | "agent" | undefined;
|
|
151
218
|
externalId?: string | undefined;
|
|
152
219
|
externalLabel?: string | undefined;
|
|
153
220
|
externalUrl?: string | undefined;
|
|
154
|
-
description?: string | undefined;
|
|
155
|
-
acceptanceCriteria?: string | undefined;
|
|
156
221
|
baseBranch?: string | undefined;
|
|
157
222
|
maxReviewRounds?: number | undefined;
|
|
158
223
|
maxInfraAttempts?: number | undefined;
|
|
@@ -176,9 +241,9 @@ export declare const UpdateIssueInput: z.ZodObject<{
|
|
|
176
241
|
autoMerge: z.ZodOptional<z.ZodBoolean>;
|
|
177
242
|
}, "strip", z.ZodTypeAny, {
|
|
178
243
|
repo?: string | undefined;
|
|
179
|
-
title?: string | undefined;
|
|
180
|
-
description?: string | null | undefined;
|
|
181
244
|
acceptanceCriteria?: string | null | undefined;
|
|
245
|
+
description?: string | null | undefined;
|
|
246
|
+
title?: string | undefined;
|
|
182
247
|
baseBranch?: string | undefined;
|
|
183
248
|
developerAgentId?: string | undefined;
|
|
184
249
|
reviewerAgentId?: string | undefined;
|
|
@@ -187,9 +252,9 @@ export declare const UpdateIssueInput: z.ZodObject<{
|
|
|
187
252
|
autoMerge?: boolean | undefined;
|
|
188
253
|
}, {
|
|
189
254
|
repo?: string | undefined;
|
|
190
|
-
title?: string | undefined;
|
|
191
|
-
description?: string | null | undefined;
|
|
192
255
|
acceptanceCriteria?: string | null | undefined;
|
|
256
|
+
description?: string | null | undefined;
|
|
257
|
+
title?: string | undefined;
|
|
193
258
|
baseBranch?: string | undefined;
|
|
194
259
|
developerAgentId?: string | undefined;
|
|
195
260
|
reviewerAgentId?: string | undefined;
|
|
@@ -239,6 +304,49 @@ export declare const CreateIssueResult: z.ZodObject<{
|
|
|
239
304
|
title: z.ZodString;
|
|
240
305
|
description: z.ZodNullable<z.ZodString>;
|
|
241
306
|
acceptanceCriteria: z.ZodNullable<z.ZodString>;
|
|
307
|
+
/**
|
|
308
|
+
* NOT-306: compiled execution contract derived from the ticket description
|
|
309
|
+
* (canonical `##` headings). Derived data — the description stays the source
|
|
310
|
+
* of truth — null for legacy/contract-free issues. Optional so previously
|
|
311
|
+
* stored rows and existing fixtures parse unchanged.
|
|
312
|
+
*/
|
|
313
|
+
executionContract: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
314
|
+
version: z.ZodLiteral<"v1">;
|
|
315
|
+
executionMode: z.ZodEnum<["feature", "bug fix", "refactor", "investigation", "split child"]>;
|
|
316
|
+
nonGoals: z.ZodArray<z.ZodString, "many">;
|
|
317
|
+
exitPredicate: z.ZodString;
|
|
318
|
+
onePrStoppingPoint: z.ZodString;
|
|
319
|
+
acceptanceCriteria: z.ZodArray<z.ZodObject<{
|
|
320
|
+
text: z.ZodString;
|
|
321
|
+
evidence: z.ZodNullable<z.ZodString>;
|
|
322
|
+
}, "strip", z.ZodTypeAny, {
|
|
323
|
+
text: string;
|
|
324
|
+
evidence: string | null;
|
|
325
|
+
}, {
|
|
326
|
+
text: string;
|
|
327
|
+
evidence: string | null;
|
|
328
|
+
}>, "many">;
|
|
329
|
+
}, "strip", z.ZodTypeAny, {
|
|
330
|
+
version: "v1";
|
|
331
|
+
executionMode: "feature" | "bug fix" | "refactor" | "investigation" | "split child";
|
|
332
|
+
nonGoals: string[];
|
|
333
|
+
exitPredicate: string;
|
|
334
|
+
onePrStoppingPoint: string;
|
|
335
|
+
acceptanceCriteria: {
|
|
336
|
+
text: string;
|
|
337
|
+
evidence: string | null;
|
|
338
|
+
}[];
|
|
339
|
+
}, {
|
|
340
|
+
version: "v1";
|
|
341
|
+
executionMode: "feature" | "bug fix" | "refactor" | "investigation" | "split child";
|
|
342
|
+
nonGoals: string[];
|
|
343
|
+
exitPredicate: string;
|
|
344
|
+
onePrStoppingPoint: string;
|
|
345
|
+
acceptanceCriteria: {
|
|
346
|
+
text: string;
|
|
347
|
+
evidence: string | null;
|
|
348
|
+
}[];
|
|
349
|
+
}>>>;
|
|
242
350
|
/**
|
|
243
351
|
* Portable GitHub identity (`github.com/owner/repo`) for new issues (NOT-149).
|
|
244
352
|
* Legacy rows may still hold a local filesystem path until explicitly migrated —
|
|
@@ -286,13 +394,13 @@ export declare const CreateIssueResult: z.ZodObject<{
|
|
|
286
394
|
createdAt: string;
|
|
287
395
|
updatedAt: string;
|
|
288
396
|
repo: string;
|
|
397
|
+
acceptanceCriteria: string | null;
|
|
398
|
+
description: string | null;
|
|
289
399
|
title: string;
|
|
290
400
|
source: "manual" | "linear" | "agent";
|
|
291
401
|
externalId: string | null;
|
|
292
402
|
externalLabel: string | null;
|
|
293
403
|
externalUrl: string | null;
|
|
294
|
-
description: string | null;
|
|
295
|
-
acceptanceCriteria: string | null;
|
|
296
404
|
baseBranch: string;
|
|
297
405
|
currentOwner: "reviewer" | "developer" | "human" | "system";
|
|
298
406
|
currentIntent: string | null;
|
|
@@ -310,6 +418,17 @@ export declare const CreateIssueResult: z.ZodObject<{
|
|
|
310
418
|
created: boolean;
|
|
311
419
|
queue: "enqueued" | "already_queued" | "not_queued";
|
|
312
420
|
priorPasses: number;
|
|
421
|
+
executionContract?: {
|
|
422
|
+
version: "v1";
|
|
423
|
+
executionMode: "feature" | "bug fix" | "refactor" | "investigation" | "split child";
|
|
424
|
+
nonGoals: string[];
|
|
425
|
+
exitPredicate: string;
|
|
426
|
+
onePrStoppingPoint: string;
|
|
427
|
+
acceptanceCriteria: {
|
|
428
|
+
text: string;
|
|
429
|
+
evidence: string | null;
|
|
430
|
+
}[];
|
|
431
|
+
} | null | undefined;
|
|
313
432
|
}, {
|
|
314
433
|
branch: string | null;
|
|
315
434
|
status: "final_review" | "done" | "ready" | "developing" | "reviewing" | "repairing" | "needs_human" | "closed";
|
|
@@ -317,13 +436,13 @@ export declare const CreateIssueResult: z.ZodObject<{
|
|
|
317
436
|
createdAt: string;
|
|
318
437
|
updatedAt: string;
|
|
319
438
|
repo: string;
|
|
439
|
+
acceptanceCriteria: string | null;
|
|
440
|
+
description: string | null;
|
|
320
441
|
title: string;
|
|
321
442
|
source: "manual" | "linear" | "agent";
|
|
322
443
|
externalId: string | null;
|
|
323
444
|
externalLabel: string | null;
|
|
324
445
|
externalUrl: string | null;
|
|
325
|
-
description: string | null;
|
|
326
|
-
acceptanceCriteria: string | null;
|
|
327
446
|
baseBranch: string;
|
|
328
447
|
currentOwner: "reviewer" | "developer" | "human" | "system";
|
|
329
448
|
currentIntent: string | null;
|
|
@@ -341,6 +460,17 @@ export declare const CreateIssueResult: z.ZodObject<{
|
|
|
341
460
|
created: boolean;
|
|
342
461
|
queue: "enqueued" | "already_queued" | "not_queued";
|
|
343
462
|
priorPasses: number;
|
|
463
|
+
executionContract?: {
|
|
464
|
+
version: "v1";
|
|
465
|
+
executionMode: "feature" | "bug fix" | "refactor" | "investigation" | "split child";
|
|
466
|
+
nonGoals: string[];
|
|
467
|
+
exitPredicate: string;
|
|
468
|
+
onePrStoppingPoint: string;
|
|
469
|
+
acceptanceCriteria: {
|
|
470
|
+
text: string;
|
|
471
|
+
evidence: string | null;
|
|
472
|
+
}[];
|
|
473
|
+
} | null | undefined;
|
|
344
474
|
}>;
|
|
345
475
|
export type CreateIssueResult = z.infer<typeof CreateIssueResult>;
|
|
346
476
|
/** 409 body when a re-import collides with a live issue — mirrors the runs promote path. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { GitHubRepoInput } from "./github-repo.js";
|
|
3
|
+
import { ExecutionContractV1 } from "./execution-contract.js";
|
|
3
4
|
export const IssueStatus = z.enum([
|
|
4
5
|
"ready",
|
|
5
6
|
"developing",
|
|
@@ -22,6 +23,13 @@ export const Issue = z.object({
|
|
|
22
23
|
title: z.string(),
|
|
23
24
|
description: z.string().nullable(),
|
|
24
25
|
acceptanceCriteria: z.string().nullable(),
|
|
26
|
+
/**
|
|
27
|
+
* NOT-306: compiled execution contract derived from the ticket description
|
|
28
|
+
* (canonical `##` headings). Derived data — the description stays the source
|
|
29
|
+
* of truth — null for legacy/contract-free issues. Optional so previously
|
|
30
|
+
* stored rows and existing fixtures parse unchanged.
|
|
31
|
+
*/
|
|
32
|
+
executionContract: ExecutionContractV1.nullable().optional(),
|
|
25
33
|
/**
|
|
26
34
|
* Portable GitHub identity (`github.com/owner/repo`) for new issues (NOT-149).
|
|
27
35
|
* Legacy rows may still hold a local filesystem path until explicitly migrated —
|
|
@@ -5,11 +5,11 @@ export declare const OutboundDraftSummary: z.ZodObject<{
|
|
|
5
5
|
target: z.ZodString;
|
|
6
6
|
body: z.ZodString;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
target: string;
|
|
9
8
|
body: string;
|
|
10
|
-
}, {
|
|
11
9
|
target: string;
|
|
10
|
+
}, {
|
|
12
11
|
body: string;
|
|
12
|
+
target: string;
|
|
13
13
|
}>;
|
|
14
14
|
export type OutboundDraftSummary = z.infer<typeof OutboundDraftSummary>;
|
|
15
15
|
export declare const OutboundToolCall: z.ZodObject<{
|
|
@@ -33,11 +33,11 @@ export declare const OutboundDraftBlock: z.ZodObject<{
|
|
|
33
33
|
target: z.ZodString;
|
|
34
34
|
body: z.ZodString;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
target: string;
|
|
37
36
|
body: string;
|
|
38
|
-
}, {
|
|
39
37
|
target: string;
|
|
38
|
+
}, {
|
|
40
39
|
body: string;
|
|
40
|
+
target: string;
|
|
41
41
|
}>;
|
|
42
42
|
toolCall: z.ZodObject<{
|
|
43
43
|
serviceName: z.ZodString;
|
|
@@ -55,8 +55,8 @@ export declare const OutboundDraftBlock: z.ZodObject<{
|
|
|
55
55
|
}, "strip", z.ZodTypeAny, {
|
|
56
56
|
actionType: "slack_message" | "email" | "service_tool_call";
|
|
57
57
|
summary: {
|
|
58
|
-
target: string;
|
|
59
58
|
body: string;
|
|
59
|
+
target: string;
|
|
60
60
|
};
|
|
61
61
|
toolCall: {
|
|
62
62
|
serviceName: string;
|
|
@@ -66,8 +66,8 @@ export declare const OutboundDraftBlock: z.ZodObject<{
|
|
|
66
66
|
}, {
|
|
67
67
|
actionType: "slack_message" | "email" | "service_tool_call";
|
|
68
68
|
summary: {
|
|
69
|
-
target: string;
|
|
70
69
|
body: string;
|
|
70
|
+
target: string;
|
|
71
71
|
};
|
|
72
72
|
toolCall: {
|
|
73
73
|
serviceName: string;
|
|
@@ -86,11 +86,11 @@ export declare const OutboundDraftContent: z.ZodObject<{
|
|
|
86
86
|
target: z.ZodString;
|
|
87
87
|
body: z.ZodString;
|
|
88
88
|
}, "strip", z.ZodTypeAny, {
|
|
89
|
-
target: string;
|
|
90
89
|
body: string;
|
|
91
|
-
}, {
|
|
92
90
|
target: string;
|
|
91
|
+
}, {
|
|
93
92
|
body: string;
|
|
93
|
+
target: string;
|
|
94
94
|
}>;
|
|
95
95
|
toolCall: z.ZodObject<{
|
|
96
96
|
serviceName: z.ZodString;
|
|
@@ -108,8 +108,8 @@ export declare const OutboundDraftContent: z.ZodObject<{
|
|
|
108
108
|
}, "strip", z.ZodTypeAny, {
|
|
109
109
|
actionType: "slack_message" | "email" | "service_tool_call";
|
|
110
110
|
summary: {
|
|
111
|
-
target: string;
|
|
112
111
|
body: string;
|
|
112
|
+
target: string;
|
|
113
113
|
};
|
|
114
114
|
toolCall: {
|
|
115
115
|
serviceName: string;
|
|
@@ -119,8 +119,8 @@ export declare const OutboundDraftContent: z.ZodObject<{
|
|
|
119
119
|
}, {
|
|
120
120
|
actionType: "slack_message" | "email" | "service_tool_call";
|
|
121
121
|
summary: {
|
|
122
|
-
target: string;
|
|
123
122
|
body: string;
|
|
123
|
+
target: string;
|
|
124
124
|
};
|
|
125
125
|
toolCall: {
|
|
126
126
|
serviceName: string;
|
|
@@ -141,8 +141,8 @@ export declare const OutboundDraftContent: z.ZodObject<{
|
|
|
141
141
|
draft: {
|
|
142
142
|
actionType: "slack_message" | "email" | "service_tool_call";
|
|
143
143
|
summary: {
|
|
144
|
-
target: string;
|
|
145
144
|
body: string;
|
|
145
|
+
target: string;
|
|
146
146
|
};
|
|
147
147
|
toolCall: {
|
|
148
148
|
serviceName: string;
|
|
@@ -159,8 +159,8 @@ export declare const OutboundDraftContent: z.ZodObject<{
|
|
|
159
159
|
draft: {
|
|
160
160
|
actionType: "slack_message" | "email" | "service_tool_call";
|
|
161
161
|
summary: {
|
|
162
|
-
target: string;
|
|
163
162
|
body: string;
|
|
163
|
+
target: string;
|
|
164
164
|
};
|
|
165
165
|
toolCall: {
|
|
166
166
|
serviceName: string;
|
|
@@ -44,6 +44,14 @@ export declare const WorkerSession: z.ZodObject<{
|
|
|
44
44
|
processPid: z.ZodNullable<z.ZodNumber>;
|
|
45
45
|
processOwner: z.ZodNullable<z.ZodString>;
|
|
46
46
|
processStartedAt: z.ZodNullable<z.ZodString>;
|
|
47
|
+
/**
|
|
48
|
+
* Opaque Agent Deck correlation UUID for this session (NOT-305). Generated once at
|
|
49
|
+
* session creation, before spawn, and passed as observability metadata in every
|
|
50
|
+
* runtime's Agent Deck launch configuration. Lets Deck correlate its normalized
|
|
51
|
+
* playbook-fetch stream back to this durable Dealer session without granting any
|
|
52
|
+
* authority. Null only for rows written before NOT-305.
|
|
53
|
+
*/
|
|
54
|
+
deckCorrelationId: z.ZodNullable<z.ZodString>;
|
|
47
55
|
createdAt: z.ZodString;
|
|
48
56
|
startedAt: z.ZodNullable<z.ZodString>;
|
|
49
57
|
heartbeatAt: z.ZodNullable<z.ZodString>;
|
|
@@ -70,6 +78,7 @@ export declare const WorkerSession: z.ZodObject<{
|
|
|
70
78
|
processPid: number | null;
|
|
71
79
|
processOwner: string | null;
|
|
72
80
|
processStartedAt: string | null;
|
|
81
|
+
deckCorrelationId: string | null;
|
|
73
82
|
createdAt: string;
|
|
74
83
|
startedAt: string | null;
|
|
75
84
|
heartbeatAt: string | null;
|
|
@@ -96,6 +105,7 @@ export declare const WorkerSession: z.ZodObject<{
|
|
|
96
105
|
processPid: number | null;
|
|
97
106
|
processOwner: string | null;
|
|
98
107
|
processStartedAt: string | null;
|
|
108
|
+
deckCorrelationId: string | null;
|
|
99
109
|
createdAt: string;
|
|
100
110
|
startedAt: string | null;
|
|
101
111
|
heartbeatAt: string | null;
|
|
@@ -50,6 +50,14 @@ export const WorkerSession = z.object({
|
|
|
50
50
|
processPid: z.number().int().nullable(),
|
|
51
51
|
processOwner: z.string().nullable(),
|
|
52
52
|
processStartedAt: z.string().nullable(),
|
|
53
|
+
/**
|
|
54
|
+
* Opaque Agent Deck correlation UUID for this session (NOT-305). Generated once at
|
|
55
|
+
* session creation, before spawn, and passed as observability metadata in every
|
|
56
|
+
* runtime's Agent Deck launch configuration. Lets Deck correlate its normalized
|
|
57
|
+
* playbook-fetch stream back to this durable Dealer session without granting any
|
|
58
|
+
* authority. Null only for rows written before NOT-305.
|
|
59
|
+
*/
|
|
60
|
+
deckCorrelationId: z.string().uuid().nullable(),
|
|
53
61
|
createdAt: z.string(),
|
|
54
62
|
startedAt: z.string().nullable(),
|
|
55
63
|
heartbeatAt: z.string().nullable(),
|
|
@@ -24,7 +24,7 @@ export declare const WorkflowInstance: z.ZodObject<{
|
|
|
24
24
|
outcome: "done" | "closed" | "migrated" | null;
|
|
25
25
|
}>;
|
|
26
26
|
export type WorkflowInstance = z.infer<typeof WorkflowInstance>;
|
|
27
|
-
export declare const WorkflowEventType: z.ZodEnum<["issue.created", "issue.reassigned", "workflow.started", "worker.started", "worker.completed", "worker.failed", "worker.deferred", "worktree.ready", "deck.connected", "brief.resolved", "branch.pushed", "checks.started", "pull_request.opened", "pull_request.updated", "checks.completed", "review.submitted", "repair.started", "guidance.added", "task_snapshot.refreshed", "human_action.requested", "human_action.resolved", "final_review.requested", "issue.completed", "issue.closed", "queue.enqueued", "queue.wait_reason_changed", "queue.admitted", "queue.removed", "agent.started", "agent.completed", "host.suspended", "checkpoint.observed", "retry.reused", "legacy.imported"]>;
|
|
27
|
+
export declare const WorkflowEventType: z.ZodEnum<["issue.created", "issue.reassigned", "workflow.started", "worker.started", "worker.completed", "worker.failed", "worker.deferred", "worktree.ready", "deck.connected", "brief.resolved", "branch.pushed", "checks.started", "pull_request.opened", "pull_request.updated", "checks.completed", "review.submitted", "repair.started", "guidance.added", "task_snapshot.refreshed", "human_action.requested", "human_action.resolved", "final_review.requested", "issue.completed", "issue.closed", "queue.enqueued", "queue.wait_reason_changed", "queue.admitted", "queue.removed", "agent.started", "agent.completed", "host.suspended", "checkpoint.observed", "retry.reused", "auto_merge.conflict_sync", "auto_merge.conflict_repair_queued", "legacy.imported"]>;
|
|
28
28
|
export type WorkflowEventType = z.infer<typeof WorkflowEventType>;
|
|
29
29
|
export declare const WorkflowEvent: z.ZodObject<{
|
|
30
30
|
id: z.ZodString;
|
|
@@ -32,7 +32,7 @@ export declare const WorkflowEvent: z.ZodObject<{
|
|
|
32
32
|
/** Nullable only for issue creation/guidance emitted before any workflow starts. */
|
|
33
33
|
workflowInstanceId: z.ZodNullable<z.ZodString>;
|
|
34
34
|
workerSessionId: z.ZodNullable<z.ZodString>;
|
|
35
|
-
type: z.ZodEnum<["issue.created", "issue.reassigned", "workflow.started", "worker.started", "worker.completed", "worker.failed", "worker.deferred", "worktree.ready", "deck.connected", "brief.resolved", "branch.pushed", "checks.started", "pull_request.opened", "pull_request.updated", "checks.completed", "review.submitted", "repair.started", "guidance.added", "task_snapshot.refreshed", "human_action.requested", "human_action.resolved", "final_review.requested", "issue.completed", "issue.closed", "queue.enqueued", "queue.wait_reason_changed", "queue.admitted", "queue.removed", "agent.started", "agent.completed", "host.suspended", "checkpoint.observed", "retry.reused", "legacy.imported"]>;
|
|
35
|
+
type: z.ZodEnum<["issue.created", "issue.reassigned", "workflow.started", "worker.started", "worker.completed", "worker.failed", "worker.deferred", "worktree.ready", "deck.connected", "brief.resolved", "branch.pushed", "checks.started", "pull_request.opened", "pull_request.updated", "checks.completed", "review.submitted", "repair.started", "guidance.added", "task_snapshot.refreshed", "human_action.requested", "human_action.resolved", "final_review.requested", "issue.completed", "issue.closed", "queue.enqueued", "queue.wait_reason_changed", "queue.admitted", "queue.removed", "agent.started", "agent.completed", "host.suspended", "checkpoint.observed", "retry.reused", "auto_merge.conflict_sync", "auto_merge.conflict_repair_queued", "legacy.imported"]>;
|
|
36
36
|
actorType: z.ZodEnum<["human", "developer", "reviewer", "system"]>;
|
|
37
37
|
actorRef: z.ZodNullable<z.ZodString>;
|
|
38
38
|
/** Issue status at emit time — lets the timeline render without re-deriving state. */
|
|
@@ -45,7 +45,7 @@ export declare const WorkflowEvent: z.ZodObject<{
|
|
|
45
45
|
causationEventId: z.ZodNullable<z.ZodString>;
|
|
46
46
|
ts: z.ZodString;
|
|
47
47
|
}, "strip", z.ZodTypeAny, {
|
|
48
|
-
type: "issue.created" | "issue.reassigned" | "workflow.started" | "worker.started" | "worker.completed" | "worker.failed" | "worker.deferred" | "worktree.ready" | "deck.connected" | "brief.resolved" | "branch.pushed" | "checks.started" | "pull_request.opened" | "pull_request.updated" | "checks.completed" | "review.submitted" | "repair.started" | "guidance.added" | "task_snapshot.refreshed" | "human_action.requested" | "human_action.resolved" | "final_review.requested" | "issue.completed" | "issue.closed" | "queue.enqueued" | "queue.wait_reason_changed" | "queue.admitted" | "queue.removed" | "agent.started" | "agent.completed" | "host.suspended" | "checkpoint.observed" | "retry.reused" | "legacy.imported";
|
|
48
|
+
type: "issue.created" | "issue.reassigned" | "workflow.started" | "worker.started" | "worker.completed" | "worker.failed" | "worker.deferred" | "worktree.ready" | "deck.connected" | "brief.resolved" | "branch.pushed" | "checks.started" | "pull_request.opened" | "pull_request.updated" | "checks.completed" | "review.submitted" | "repair.started" | "guidance.added" | "task_snapshot.refreshed" | "human_action.requested" | "human_action.resolved" | "final_review.requested" | "issue.completed" | "issue.closed" | "queue.enqueued" | "queue.wait_reason_changed" | "queue.admitted" | "queue.removed" | "agent.started" | "agent.completed" | "host.suspended" | "checkpoint.observed" | "retry.reused" | "auto_merge.conflict_sync" | "auto_merge.conflict_repair_queued" | "legacy.imported";
|
|
49
49
|
id: string;
|
|
50
50
|
issueId: string;
|
|
51
51
|
round: number | null;
|
|
@@ -60,7 +60,7 @@ export declare const WorkflowEvent: z.ZodObject<{
|
|
|
60
60
|
causationEventId: string | null;
|
|
61
61
|
ts: string;
|
|
62
62
|
}, {
|
|
63
|
-
type: "issue.created" | "issue.reassigned" | "workflow.started" | "worker.started" | "worker.completed" | "worker.failed" | "worker.deferred" | "worktree.ready" | "deck.connected" | "brief.resolved" | "branch.pushed" | "checks.started" | "pull_request.opened" | "pull_request.updated" | "checks.completed" | "review.submitted" | "repair.started" | "guidance.added" | "task_snapshot.refreshed" | "human_action.requested" | "human_action.resolved" | "final_review.requested" | "issue.completed" | "issue.closed" | "queue.enqueued" | "queue.wait_reason_changed" | "queue.admitted" | "queue.removed" | "agent.started" | "agent.completed" | "host.suspended" | "checkpoint.observed" | "retry.reused" | "legacy.imported";
|
|
63
|
+
type: "issue.created" | "issue.reassigned" | "workflow.started" | "worker.started" | "worker.completed" | "worker.failed" | "worker.deferred" | "worktree.ready" | "deck.connected" | "brief.resolved" | "branch.pushed" | "checks.started" | "pull_request.opened" | "pull_request.updated" | "checks.completed" | "review.submitted" | "repair.started" | "guidance.added" | "task_snapshot.refreshed" | "human_action.requested" | "human_action.resolved" | "final_review.requested" | "issue.completed" | "issue.closed" | "queue.enqueued" | "queue.wait_reason_changed" | "queue.admitted" | "queue.removed" | "agent.started" | "agent.completed" | "host.suspended" | "checkpoint.observed" | "retry.reused" | "auto_merge.conflict_sync" | "auto_merge.conflict_repair_queued" | "legacy.imported";
|
|
64
64
|
id: string;
|
|
65
65
|
issueId: string;
|
|
66
66
|
round: number | null;
|
|
@@ -59,6 +59,16 @@ export const WorkflowEventType = z.enum([
|
|
|
59
59
|
* per session via idempotency keys and never drive retry/routing decisions. */
|
|
60
60
|
"checkpoint.observed",
|
|
61
61
|
"retry.reused",
|
|
62
|
+
/** NOT-310: merge-time base-sync attempt after a not-mergeable failure. Payload
|
|
63
|
+
* carries `outcome` (skipped | merged | repair_queued | conflict_spent |
|
|
64
|
+
* failed) plus the branch, base, and (for conflicts) the conflicting files.
|
|
65
|
+
* Audit only — never re-read. */
|
|
66
|
+
"auto_merge.conflict_sync",
|
|
67
|
+
/** NOT-310: conflict-repair developer round queued after the sync hit a textual
|
|
68
|
+
* conflict (payload: baseBranch, branch, files, round, workItemId). Append-only
|
|
69
|
+
* bound key: a later not-mergeable failure with no `human_action.resolved` after
|
|
70
|
+
* this event escalates with the file list instead of syncing again. */
|
|
71
|
+
"auto_merge.conflict_repair_queued",
|
|
62
72
|
/** Migration-only — the NOT-66 cutover repoints a legacy `events` row under this type,
|
|
63
73
|
* preserving the original type/payload inside `payloadJson` (see `role: "legacy"` on
|
|
64
74
|
* `WorkerSessionRole` and `outcome: "migrated"` on `WorkflowInstanceOutcome` for the same
|
|
@@ -41,6 +41,8 @@ test("WorkflowEventType accepts every PRD §9.2 event type", () => {
|
|
|
41
41
|
"queue.removed",
|
|
42
42
|
"checkpoint.observed",
|
|
43
43
|
"retry.reused",
|
|
44
|
+
"auto_merge.conflict_sync",
|
|
45
|
+
"auto_merge.conflict_repair_queued",
|
|
44
46
|
];
|
|
45
47
|
for (const t of types) {
|
|
46
48
|
assert.equal(WorkflowEventType.parse(t), t);
|