agent-dealer 1.2.6 → 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-B6SVCzMR.js +64 -0
- package/bundle/server/static-ui/assets/index-K_YcYkQU.css +1 -0
- package/bundle/server/static-ui/index.html +2 -2
- package/bundle/shared/dist/action-presentation.d.ts +51 -0
- package/bundle/shared/dist/action-presentation.js +280 -0
- package/bundle/shared/dist/action-presentation.test.d.ts +1 -0
- package/bundle/shared/dist/action-presentation.test.js +180 -0
- package/bundle/shared/dist/attempt-waste.d.ts +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 +11 -11
- 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 +14 -14
- package/bundle/shared/dist/human-actions.js +9 -0
- package/bundle/shared/dist/index.d.ts +126 -124
- package/bundle/shared/dist/index.js +4 -0
- package/bundle/shared/dist/issues.d.ts +158 -28
- 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 +18 -18
- package/bundle/shared/dist/profile-snapshot.d.ts +2 -2
- package/bundle/shared/dist/usage-events.d.ts +2 -2
- package/bundle/shared/dist/worker-sessions.d.ts +16 -6
- 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 +6 -6
- 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
- package/bundle/server/static-ui/assets/index-BII-LgB8.css +0 -1
- package/bundle/server/static-ui/assets/index-CoDzZcsz.js +0 -60
|
@@ -19,10 +19,12 @@ export * from "./attempt-waste.js";
|
|
|
19
19
|
export * from "./profile-snapshot.js";
|
|
20
20
|
export * from "./workflow.js";
|
|
21
21
|
export * from "./human-actions.js";
|
|
22
|
+
export * from "./action-presentation.js";
|
|
22
23
|
export * from "./findings.js";
|
|
23
24
|
export * from "./usage-events.js";
|
|
24
25
|
export * from "./runtime-availability.js";
|
|
25
26
|
export * from "./runtime-capacity.js";
|
|
27
|
+
export * from "./execution-contract.js";
|
|
26
28
|
export * from "./queue-entries.js";
|
|
27
29
|
export * from "./execution-analysis.js";
|
|
28
30
|
export * from "./execution-report.js";
|
|
@@ -66,6 +68,8 @@ export const ArtifactKind = z.enum([
|
|
|
66
68
|
"deliverable",
|
|
67
69
|
"feedback",
|
|
68
70
|
"playbook_patch",
|
|
71
|
+
"playbook_use_receipt",
|
|
72
|
+
"deck_feedback_signal",
|
|
69
73
|
"reflect_status",
|
|
70
74
|
"linear_sync",
|
|
71
75
|
"send_receipt",
|
|
@@ -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 —
|
|
@@ -46,21 +89,21 @@ export declare const Issue: z.ZodObject<{
|
|
|
46
89
|
createdAt: z.ZodString;
|
|
47
90
|
updatedAt: z.ZodString;
|
|
48
91
|
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
|
|
92
|
+
branch: string | null;
|
|
93
|
+
status: "final_review" | "done" | "ready" | "developing" | "reviewing" | "repairing" | "needs_human" | "closed";
|
|
50
94
|
id: string;
|
|
51
95
|
createdAt: string;
|
|
52
96
|
updatedAt: string;
|
|
53
|
-
branch: string | null;
|
|
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
|
-
currentOwner: "
|
|
106
|
+
currentOwner: "reviewer" | "developer" | "human" | "system";
|
|
64
107
|
currentIntent: string | null;
|
|
65
108
|
developerAgentId: string | null;
|
|
66
109
|
reviewerAgentId: string | null;
|
|
@@ -73,22 +116,33 @@ 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;
|
|
132
|
+
status: "final_review" | "done" | "ready" | "developing" | "reviewing" | "repairing" | "needs_human" | "closed";
|
|
78
133
|
id: string;
|
|
79
134
|
createdAt: string;
|
|
80
135
|
updatedAt: string;
|
|
81
|
-
branch: string | null;
|
|
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
|
-
currentOwner: "
|
|
145
|
+
currentOwner: "reviewer" | "developer" | "human" | "system";
|
|
92
146
|
currentIntent: string | null;
|
|
93
147
|
developerAgentId: string | null;
|
|
94
148
|
reviewerAgentId: 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 —
|
|
@@ -280,21 +388,21 @@ export declare const CreateIssueResult: z.ZodObject<{
|
|
|
280
388
|
*/
|
|
281
389
|
priorPasses: z.ZodNumber;
|
|
282
390
|
}, "strip", z.ZodTypeAny, {
|
|
283
|
-
|
|
391
|
+
branch: string | null;
|
|
392
|
+
status: "final_review" | "done" | "ready" | "developing" | "reviewing" | "repairing" | "needs_human" | "closed";
|
|
284
393
|
id: string;
|
|
285
394
|
createdAt: string;
|
|
286
395
|
updatedAt: string;
|
|
287
|
-
branch: string | null;
|
|
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
|
-
currentOwner: "
|
|
405
|
+
currentOwner: "reviewer" | "developer" | "human" | "system";
|
|
298
406
|
currentIntent: string | null;
|
|
299
407
|
developerAgentId: string | null;
|
|
300
408
|
reviewerAgentId: string | null;
|
|
@@ -310,22 +418,33 @@ 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;
|
|
434
|
+
status: "final_review" | "done" | "ready" | "developing" | "reviewing" | "repairing" | "needs_human" | "closed";
|
|
315
435
|
id: string;
|
|
316
436
|
createdAt: string;
|
|
317
437
|
updatedAt: string;
|
|
318
|
-
branch: string | null;
|
|
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
|
-
currentOwner: "
|
|
447
|
+
currentOwner: "reviewer" | "developer" | "human" | "system";
|
|
329
448
|
currentIntent: string | null;
|
|
330
449
|
developerAgentId: string | null;
|
|
331
450
|
reviewerAgentId: 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;
|
|
@@ -53,22 +53,22 @@ export declare const OutboundDraftBlock: z.ZodObject<{
|
|
|
53
53
|
arguments: Record<string, unknown>;
|
|
54
54
|
}>;
|
|
55
55
|
}, "strip", z.ZodTypeAny, {
|
|
56
|
+
actionType: "slack_message" | "email" | "service_tool_call";
|
|
56
57
|
summary: {
|
|
57
|
-
target: string;
|
|
58
58
|
body: string;
|
|
59
|
+
target: string;
|
|
59
60
|
};
|
|
60
|
-
actionType: "slack_message" | "email" | "service_tool_call";
|
|
61
61
|
toolCall: {
|
|
62
62
|
serviceName: string;
|
|
63
63
|
toolName: string;
|
|
64
64
|
arguments: Record<string, unknown>;
|
|
65
65
|
};
|
|
66
66
|
}, {
|
|
67
|
+
actionType: "slack_message" | "email" | "service_tool_call";
|
|
67
68
|
summary: {
|
|
68
|
-
target: string;
|
|
69
69
|
body: string;
|
|
70
|
+
target: string;
|
|
70
71
|
};
|
|
71
|
-
actionType: "slack_message" | "email" | "service_tool_call";
|
|
72
72
|
toolCall: {
|
|
73
73
|
serviceName: string;
|
|
74
74
|
toolName: 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;
|
|
@@ -106,22 +106,22 @@ export declare const OutboundDraftContent: z.ZodObject<{
|
|
|
106
106
|
arguments: Record<string, unknown>;
|
|
107
107
|
}>;
|
|
108
108
|
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
actionType: "slack_message" | "email" | "service_tool_call";
|
|
109
110
|
summary: {
|
|
110
|
-
target: string;
|
|
111
111
|
body: string;
|
|
112
|
+
target: string;
|
|
112
113
|
};
|
|
113
|
-
actionType: "slack_message" | "email" | "service_tool_call";
|
|
114
114
|
toolCall: {
|
|
115
115
|
serviceName: string;
|
|
116
116
|
toolName: string;
|
|
117
117
|
arguments: Record<string, unknown>;
|
|
118
118
|
};
|
|
119
119
|
}, {
|
|
120
|
+
actionType: "slack_message" | "email" | "service_tool_call";
|
|
120
121
|
summary: {
|
|
121
|
-
target: string;
|
|
122
122
|
body: string;
|
|
123
|
+
target: string;
|
|
123
124
|
};
|
|
124
|
-
actionType: "slack_message" | "email" | "service_tool_call";
|
|
125
125
|
toolCall: {
|
|
126
126
|
serviceName: string;
|
|
127
127
|
toolName: string;
|
|
@@ -139,11 +139,11 @@ export declare const OutboundDraftContent: z.ZodObject<{
|
|
|
139
139
|
}, "strip", z.ZodTypeAny, {
|
|
140
140
|
status: "pending" | "sent" | "rejected";
|
|
141
141
|
draft: {
|
|
142
|
+
actionType: "slack_message" | "email" | "service_tool_call";
|
|
142
143
|
summary: {
|
|
143
|
-
target: string;
|
|
144
144
|
body: string;
|
|
145
|
+
target: string;
|
|
145
146
|
};
|
|
146
|
-
actionType: "slack_message" | "email" | "service_tool_call";
|
|
147
147
|
toolCall: {
|
|
148
148
|
serviceName: string;
|
|
149
149
|
toolName: string;
|
|
@@ -157,11 +157,11 @@ export declare const OutboundDraftContent: z.ZodObject<{
|
|
|
157
157
|
}, {
|
|
158
158
|
status: "pending" | "sent" | "rejected";
|
|
159
159
|
draft: {
|
|
160
|
+
actionType: "slack_message" | "email" | "service_tool_call";
|
|
160
161
|
summary: {
|
|
161
|
-
target: string;
|
|
162
162
|
body: string;
|
|
163
|
+
target: string;
|
|
163
164
|
};
|
|
164
|
-
actionType: "slack_message" | "email" | "service_tool_call";
|
|
165
165
|
toolCall: {
|
|
166
166
|
serviceName: string;
|
|
167
167
|
toolName: string;
|
|
@@ -109,7 +109,7 @@ export declare const ProfileSnapshot: z.ZodObject<{
|
|
|
109
109
|
purpose: z.ZodNullable<z.ZodString>;
|
|
110
110
|
capturedAt: z.ZodString;
|
|
111
111
|
}, "strip", z.ZodTypeAny, {
|
|
112
|
-
role: "
|
|
112
|
+
role: "reviewer" | "developer" | "legacy";
|
|
113
113
|
agentId: string | null;
|
|
114
114
|
runtime: "claude_code" | "cursor_local" | "codex_local" | "muse_code" | null;
|
|
115
115
|
model: string | null;
|
|
@@ -126,7 +126,7 @@ export declare const ProfileSnapshot: z.ZodObject<{
|
|
|
126
126
|
purpose: string | null;
|
|
127
127
|
capturedAt: string;
|
|
128
128
|
}, {
|
|
129
|
-
role: "
|
|
129
|
+
role: "reviewer" | "developer" | "legacy";
|
|
130
130
|
agentId: string | null;
|
|
131
131
|
runtime: "claude_code" | "cursor_local" | "codex_local" | "muse_code" | null;
|
|
132
132
|
model: string | null;
|
|
@@ -15,7 +15,7 @@ export declare const UsageEvent: z.ZodObject<{
|
|
|
15
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
16
|
id: string;
|
|
17
17
|
issueId: string;
|
|
18
|
-
role: "
|
|
18
|
+
role: "reviewer" | "developer" | "legacy";
|
|
19
19
|
runtime: string | null;
|
|
20
20
|
durationMs: number | null;
|
|
21
21
|
tokensIn: number | null;
|
|
@@ -27,7 +27,7 @@ export declare const UsageEvent: z.ZodObject<{
|
|
|
27
27
|
}, {
|
|
28
28
|
id: string;
|
|
29
29
|
issueId: string;
|
|
30
|
-
role: "
|
|
30
|
+
role: "reviewer" | "developer" | "legacy";
|
|
31
31
|
runtime: string | null;
|
|
32
32
|
durationMs: number | null;
|
|
33
33
|
tokensIn: number | null;
|
|
@@ -44,22 +44,30 @@ 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>;
|
|
50
58
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
51
59
|
updatedAt: z.ZodString;
|
|
52
60
|
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
worktreePath: string | null;
|
|
53
62
|
status: "queued" | "running" | "done" | "failed" | "timed_out" | "cancelled";
|
|
54
63
|
id: string;
|
|
55
64
|
issueId: string;
|
|
56
|
-
role: "
|
|
65
|
+
role: "reviewer" | "developer" | "legacy";
|
|
57
66
|
round: number;
|
|
58
67
|
agentId: string | null;
|
|
59
68
|
runtime: "claude_code" | "cursor_local" | "codex_local" | "muse_code" | null;
|
|
60
69
|
model: string | null;
|
|
61
70
|
budgetJson: string | null;
|
|
62
|
-
worktreePath: string | null;
|
|
63
71
|
inputSha: string | null;
|
|
64
72
|
sessionRef: string | null;
|
|
65
73
|
logPath: string | null;
|
|
@@ -70,22 +78,23 @@ 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;
|
|
76
85
|
completedAt: string | null;
|
|
77
86
|
updatedAt: string;
|
|
78
87
|
}, {
|
|
88
|
+
worktreePath: string | null;
|
|
79
89
|
status: "queued" | "running" | "done" | "failed" | "timed_out" | "cancelled";
|
|
80
90
|
id: string;
|
|
81
91
|
issueId: string;
|
|
82
|
-
role: "
|
|
92
|
+
role: "reviewer" | "developer" | "legacy";
|
|
83
93
|
round: number;
|
|
84
94
|
agentId: string | null;
|
|
85
95
|
runtime: "claude_code" | "cursor_local" | "codex_local" | "muse_code" | null;
|
|
86
96
|
model: string | null;
|
|
87
97
|
budgetJson: string | null;
|
|
88
|
-
worktreePath: string | null;
|
|
89
98
|
inputSha: string | null;
|
|
90
99
|
sessionRef: string | null;
|
|
91
100
|
logPath: 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;
|
|
@@ -116,7 +126,7 @@ export declare const CreateWorkerSessionInput: z.ZodObject<{
|
|
|
116
126
|
profileSnapshotJson: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
117
127
|
}, "strip", z.ZodTypeAny, {
|
|
118
128
|
issueId: string;
|
|
119
|
-
role: "
|
|
129
|
+
role: "reviewer" | "developer" | "legacy";
|
|
120
130
|
round: number;
|
|
121
131
|
agentId: string | null;
|
|
122
132
|
runtime: "claude_code" | "cursor_local" | "codex_local" | "muse_code" | null;
|
|
@@ -127,7 +137,7 @@ export declare const CreateWorkerSessionInput: z.ZodObject<{
|
|
|
127
137
|
profileSnapshotJson?: string | null | undefined;
|
|
128
138
|
}, {
|
|
129
139
|
issueId: string;
|
|
130
|
-
role: "
|
|
140
|
+
role: "reviewer" | "developer" | "legacy";
|
|
131
141
|
round: number;
|
|
132
142
|
agentId: string | null;
|
|
133
143
|
runtime: "claude_code" | "cursor_local" | "codex_local" | "muse_code" | 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(),
|