@bridge4dev/runner 0.11.0 → 0.22.1
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/adapters/claude.d.ts +15 -7
- package/dist/adapters/claude.js +1024 -70
- package/dist/adapters/codex.d.ts +18 -3
- package/dist/adapters/codex.js +224 -65
- package/dist/adapters/questions.d.ts +42 -0
- package/dist/adapters/questions.js +86 -0
- package/dist/adapters/types.d.ts +200 -4
- package/dist/attachments.d.ts +8 -1
- package/dist/attachments.js +22 -4
- package/dist/auto-resume.d.ts +18 -0
- package/dist/auto-resume.js +104 -0
- package/dist/commit-message.d.ts +51 -0
- package/dist/commit-message.js +224 -0
- package/dist/config.d.ts +29 -6
- package/dist/config.js +15 -0
- package/dist/crash-note.d.ts +54 -0
- package/dist/crash-note.js +105 -0
- package/dist/git.d.ts +71 -0
- package/dist/git.js +207 -10
- package/dist/gitops.d.ts +489 -12
- package/dist/gitops.js +1717 -96
- package/dist/index.js +435 -32
- package/dist/paths.d.ts +26 -0
- package/dist/paths.js +34 -0
- package/dist/policy.d.ts +63 -0
- package/dist/policy.js +412 -10
- package/dist/protocol.d.ts +382 -60
- package/dist/protocol.js +104 -1
- package/dist/recipe-schema.d.ts +310 -0
- package/dist/recipe-schema.js +103 -0
- package/dist/recipe.d.ts +94 -0
- package/dist/recipe.js +238 -0
- package/dist/self-update.d.ts +7 -0
- package/dist/self-update.js +171 -23
- package/dist/service-unit.d.ts +79 -0
- package/dist/service-unit.js +211 -0
- package/dist/supervisor.d.ts +108 -1
- package/dist/supervisor.js +1010 -56
- package/dist/verify-queue.d.ts +17 -0
- package/dist/verify-queue.js +100 -0
- package/dist/verify.d.ts +203 -0
- package/dist/verify.js +788 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/protocol.d.ts
CHANGED
|
@@ -19,22 +19,31 @@ export declare const SessionDescriptorSchema: z.ZodObject<{
|
|
|
19
19
|
path: z.ZodString;
|
|
20
20
|
projectId: z.ZodString;
|
|
21
21
|
trustMode: z.ZodEnum<["STRICT", "NORMAL", "AUTO"]>;
|
|
22
|
+
/**
|
|
23
|
+
* Session 15. Optional: an API older than this release does not send it,
|
|
24
|
+
* and «not said» must keep the behaviour every deployed runner has now —
|
|
25
|
+
* inventing a restriction from silence would stop agents committing on
|
|
26
|
+
* every project the moment a runner updated ahead of its API.
|
|
27
|
+
*/
|
|
28
|
+
agentAutoCommit: z.ZodOptional<z.ZodBoolean>;
|
|
22
29
|
budgetUsd: z.ZodNullable<z.ZodNumber>;
|
|
23
30
|
budgetMinutes: z.ZodNullable<z.ZodNumber>;
|
|
24
31
|
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
path: string;
|
|
26
32
|
id: string;
|
|
33
|
+
path: string;
|
|
27
34
|
projectId: string;
|
|
28
35
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
29
36
|
budgetUsd: number | null;
|
|
30
37
|
budgetMinutes: number | null;
|
|
38
|
+
agentAutoCommit?: boolean | undefined;
|
|
31
39
|
}, {
|
|
32
|
-
path: string;
|
|
33
40
|
id: string;
|
|
41
|
+
path: string;
|
|
34
42
|
projectId: string;
|
|
35
43
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
36
44
|
budgetUsd: number | null;
|
|
37
45
|
budgetMinutes: number | null;
|
|
46
|
+
agentAutoCommit?: boolean | undefined;
|
|
38
47
|
}>;
|
|
39
48
|
tickets: z.ZodArray<z.ZodObject<{
|
|
40
49
|
id: z.ZodString;
|
|
@@ -50,6 +59,54 @@ export declare const SessionDescriptorSchema: z.ZodObject<{
|
|
|
50
59
|
title: string;
|
|
51
60
|
}>, "many">;
|
|
52
61
|
branchHint: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
62
|
+
/**
|
|
63
|
+
* Session 13: the branch as a decision rather than a coincidence.
|
|
64
|
+
*
|
|
65
|
+
* `branchHint` said «call it this if you like»; the runner then guessed what
|
|
66
|
+
* to do about a name that already existed (silently reuse it) or did not
|
|
67
|
+
* (create it off whatever the folder was on). Both guesses lose work. The
|
|
68
|
+
* plan says which of the two the API meant, and the runner fails loudly when
|
|
69
|
+
* reality disagrees.
|
|
70
|
+
*
|
|
71
|
+
* `.catch(undefined)` for the same reason as `branchHint`: this field travels
|
|
72
|
+
* inside hello_ack, which carries EVERY session of the server, so one
|
|
73
|
+
* malformed plan must cost its own session at most — never the frame
|
|
74
|
+
* (QA-100 MAJOR-1). Falling back to `branchHint` restores exactly the old
|
|
75
|
+
* behaviour.
|
|
76
|
+
*/
|
|
77
|
+
branchPlan: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
78
|
+
branch: z.ZodString;
|
|
79
|
+
source: z.ZodEnum<["NEW", "CONTINUE"]>;
|
|
80
|
+
baseBranch: z.ZodOptional<z.ZodString>;
|
|
81
|
+
baseSha: z.ZodOptional<z.ZodString>;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
branch: string;
|
|
84
|
+
source: "NEW" | "CONTINUE";
|
|
85
|
+
baseBranch?: string | undefined;
|
|
86
|
+
baseSha?: string | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
branch: string;
|
|
89
|
+
source: "NEW" | "CONTINUE";
|
|
90
|
+
baseBranch?: string | undefined;
|
|
91
|
+
baseSha?: string | undefined;
|
|
92
|
+
}>>>;
|
|
93
|
+
/**
|
|
94
|
+
* Where this session works (session 16).
|
|
95
|
+
*
|
|
96
|
+
* `DIRECT` — in the project folder itself, on the branch it is already on.
|
|
97
|
+
* There is no worktree, no session branch and no «Apply»: the work is already
|
|
98
|
+
* where the person wanted it. This is the ordinary case, because the person
|
|
99
|
+
* runs their own terminal agents in that same folder anyway — we were paying
|
|
100
|
+
* the whole price of isolation and not getting any.
|
|
101
|
+
*
|
|
102
|
+
* `BRANCH` — the historical worktree-and-branch arrangement. The API hands it
|
|
103
|
+
* out when the folder is already taken by another live session, because two
|
|
104
|
+
* agents in one folder fight exactly the way a human and an agent do.
|
|
105
|
+
*
|
|
106
|
+
* Optional, and absent means `BRANCH`: an API older than this release says
|
|
107
|
+
* nothing, and silence must keep the behaviour every deployed runner has now.
|
|
108
|
+
*/
|
|
109
|
+
workMode: z.ZodCatch<z.ZodOptional<z.ZodEnum<["DIRECT", "BRANCH"]>>>;
|
|
53
110
|
mcp: z.ZodOptional<z.ZodObject<{
|
|
54
111
|
url: z.ZodString;
|
|
55
112
|
token: z.ZodString;
|
|
@@ -62,26 +119,27 @@ export declare const SessionDescriptorSchema: z.ZodObject<{
|
|
|
62
119
|
}>>;
|
|
63
120
|
}, "strip", z.ZodTypeAny, {
|
|
64
121
|
mode: "ask" | "plan" | "auto" | "full";
|
|
65
|
-
status: "
|
|
66
|
-
agent: "CLAUDE" | "CODEX";
|
|
122
|
+
status: "RUNNING" | "FAILED" | "STARTING" | "WAITING_INPUT" | "WAITING_PERMISSION" | "REVIEW" | "DONE" | "STOPPED";
|
|
67
123
|
id: string;
|
|
124
|
+
agent: "CLAUDE" | "CODEX";
|
|
68
125
|
kind: "TICKET" | "CHAT";
|
|
69
126
|
model: string | null;
|
|
70
127
|
effort: string | null;
|
|
71
|
-
epoch: number;
|
|
72
128
|
prompt: string;
|
|
129
|
+
epoch: number;
|
|
73
130
|
providerSessionId: string | null;
|
|
74
131
|
lastSeq: number;
|
|
75
132
|
costUsd: number;
|
|
76
133
|
activeMsBase: number;
|
|
77
134
|
extraBudgetMinutes: number | null;
|
|
78
135
|
workspace: {
|
|
79
|
-
path: string;
|
|
80
136
|
id: string;
|
|
137
|
+
path: string;
|
|
81
138
|
projectId: string;
|
|
82
139
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
83
140
|
budgetUsd: number | null;
|
|
84
141
|
budgetMinutes: number | null;
|
|
142
|
+
agentAutoCommit?: boolean | undefined;
|
|
85
143
|
};
|
|
86
144
|
tickets: {
|
|
87
145
|
number: number;
|
|
@@ -93,20 +151,28 @@ export declare const SessionDescriptorSchema: z.ZodObject<{
|
|
|
93
151
|
token: string;
|
|
94
152
|
} | undefined;
|
|
95
153
|
branchHint?: string | undefined;
|
|
154
|
+
branchPlan?: {
|
|
155
|
+
branch: string;
|
|
156
|
+
source: "NEW" | "CONTINUE";
|
|
157
|
+
baseBranch?: string | undefined;
|
|
158
|
+
baseSha?: string | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
workMode?: "DIRECT" | "BRANCH" | undefined;
|
|
96
161
|
}, {
|
|
97
|
-
status: "
|
|
98
|
-
agent: "CLAUDE" | "CODEX";
|
|
162
|
+
status: "RUNNING" | "FAILED" | "STARTING" | "WAITING_INPUT" | "WAITING_PERMISSION" | "REVIEW" | "DONE" | "STOPPED";
|
|
99
163
|
id: string;
|
|
164
|
+
agent: "CLAUDE" | "CODEX";
|
|
100
165
|
kind: "TICKET" | "CHAT";
|
|
101
166
|
prompt: string;
|
|
102
167
|
providerSessionId: string | null;
|
|
103
168
|
workspace: {
|
|
104
|
-
path: string;
|
|
105
169
|
id: string;
|
|
170
|
+
path: string;
|
|
106
171
|
projectId: string;
|
|
107
172
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
108
173
|
budgetUsd: number | null;
|
|
109
174
|
budgetMinutes: number | null;
|
|
175
|
+
agentAutoCommit?: boolean | undefined;
|
|
110
176
|
};
|
|
111
177
|
tickets: {
|
|
112
178
|
number: number;
|
|
@@ -126,6 +192,8 @@ export declare const SessionDescriptorSchema: z.ZodObject<{
|
|
|
126
192
|
activeMsBase?: number | undefined;
|
|
127
193
|
extraBudgetMinutes?: number | null | undefined;
|
|
128
194
|
branchHint?: unknown;
|
|
195
|
+
branchPlan?: unknown;
|
|
196
|
+
workMode?: unknown;
|
|
129
197
|
}>;
|
|
130
198
|
export type SessionDescriptor = z.infer<typeof SessionDescriptorSchema>;
|
|
131
199
|
export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
@@ -153,22 +221,31 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
153
221
|
path: z.ZodString;
|
|
154
222
|
projectId: z.ZodString;
|
|
155
223
|
trustMode: z.ZodEnum<["STRICT", "NORMAL", "AUTO"]>;
|
|
224
|
+
/**
|
|
225
|
+
* Session 15. Optional: an API older than this release does not send it,
|
|
226
|
+
* and «not said» must keep the behaviour every deployed runner has now —
|
|
227
|
+
* inventing a restriction from silence would stop agents committing on
|
|
228
|
+
* every project the moment a runner updated ahead of its API.
|
|
229
|
+
*/
|
|
230
|
+
agentAutoCommit: z.ZodOptional<z.ZodBoolean>;
|
|
156
231
|
budgetUsd: z.ZodNullable<z.ZodNumber>;
|
|
157
232
|
budgetMinutes: z.ZodNullable<z.ZodNumber>;
|
|
158
233
|
}, "strip", z.ZodTypeAny, {
|
|
159
|
-
path: string;
|
|
160
234
|
id: string;
|
|
235
|
+
path: string;
|
|
161
236
|
projectId: string;
|
|
162
237
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
163
238
|
budgetUsd: number | null;
|
|
164
239
|
budgetMinutes: number | null;
|
|
240
|
+
agentAutoCommit?: boolean | undefined;
|
|
165
241
|
}, {
|
|
166
|
-
path: string;
|
|
167
242
|
id: string;
|
|
243
|
+
path: string;
|
|
168
244
|
projectId: string;
|
|
169
245
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
170
246
|
budgetUsd: number | null;
|
|
171
247
|
budgetMinutes: number | null;
|
|
248
|
+
agentAutoCommit?: boolean | undefined;
|
|
172
249
|
}>;
|
|
173
250
|
tickets: z.ZodArray<z.ZodObject<{
|
|
174
251
|
id: z.ZodString;
|
|
@@ -184,6 +261,54 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
184
261
|
title: string;
|
|
185
262
|
}>, "many">;
|
|
186
263
|
branchHint: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
264
|
+
/**
|
|
265
|
+
* Session 13: the branch as a decision rather than a coincidence.
|
|
266
|
+
*
|
|
267
|
+
* `branchHint` said «call it this if you like»; the runner then guessed what
|
|
268
|
+
* to do about a name that already existed (silently reuse it) or did not
|
|
269
|
+
* (create it off whatever the folder was on). Both guesses lose work. The
|
|
270
|
+
* plan says which of the two the API meant, and the runner fails loudly when
|
|
271
|
+
* reality disagrees.
|
|
272
|
+
*
|
|
273
|
+
* `.catch(undefined)` for the same reason as `branchHint`: this field travels
|
|
274
|
+
* inside hello_ack, which carries EVERY session of the server, so one
|
|
275
|
+
* malformed plan must cost its own session at most — never the frame
|
|
276
|
+
* (QA-100 MAJOR-1). Falling back to `branchHint` restores exactly the old
|
|
277
|
+
* behaviour.
|
|
278
|
+
*/
|
|
279
|
+
branchPlan: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
280
|
+
branch: z.ZodString;
|
|
281
|
+
source: z.ZodEnum<["NEW", "CONTINUE"]>;
|
|
282
|
+
baseBranch: z.ZodOptional<z.ZodString>;
|
|
283
|
+
baseSha: z.ZodOptional<z.ZodString>;
|
|
284
|
+
}, "strip", z.ZodTypeAny, {
|
|
285
|
+
branch: string;
|
|
286
|
+
source: "NEW" | "CONTINUE";
|
|
287
|
+
baseBranch?: string | undefined;
|
|
288
|
+
baseSha?: string | undefined;
|
|
289
|
+
}, {
|
|
290
|
+
branch: string;
|
|
291
|
+
source: "NEW" | "CONTINUE";
|
|
292
|
+
baseBranch?: string | undefined;
|
|
293
|
+
baseSha?: string | undefined;
|
|
294
|
+
}>>>;
|
|
295
|
+
/**
|
|
296
|
+
* Where this session works (session 16).
|
|
297
|
+
*
|
|
298
|
+
* `DIRECT` — in the project folder itself, on the branch it is already on.
|
|
299
|
+
* There is no worktree, no session branch and no «Apply»: the work is already
|
|
300
|
+
* where the person wanted it. This is the ordinary case, because the person
|
|
301
|
+
* runs their own terminal agents in that same folder anyway — we were paying
|
|
302
|
+
* the whole price of isolation and not getting any.
|
|
303
|
+
*
|
|
304
|
+
* `BRANCH` — the historical worktree-and-branch arrangement. The API hands it
|
|
305
|
+
* out when the folder is already taken by another live session, because two
|
|
306
|
+
* agents in one folder fight exactly the way a human and an agent do.
|
|
307
|
+
*
|
|
308
|
+
* Optional, and absent means `BRANCH`: an API older than this release says
|
|
309
|
+
* nothing, and silence must keep the behaviour every deployed runner has now.
|
|
310
|
+
*/
|
|
311
|
+
workMode: z.ZodCatch<z.ZodOptional<z.ZodEnum<["DIRECT", "BRANCH"]>>>;
|
|
187
312
|
mcp: z.ZodOptional<z.ZodObject<{
|
|
188
313
|
url: z.ZodString;
|
|
189
314
|
token: z.ZodString;
|
|
@@ -196,26 +321,27 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
196
321
|
}>>;
|
|
197
322
|
}, "strip", z.ZodTypeAny, {
|
|
198
323
|
mode: "ask" | "plan" | "auto" | "full";
|
|
199
|
-
status: "
|
|
200
|
-
agent: "CLAUDE" | "CODEX";
|
|
324
|
+
status: "RUNNING" | "FAILED" | "STARTING" | "WAITING_INPUT" | "WAITING_PERMISSION" | "REVIEW" | "DONE" | "STOPPED";
|
|
201
325
|
id: string;
|
|
326
|
+
agent: "CLAUDE" | "CODEX";
|
|
202
327
|
kind: "TICKET" | "CHAT";
|
|
203
328
|
model: string | null;
|
|
204
329
|
effort: string | null;
|
|
205
|
-
epoch: number;
|
|
206
330
|
prompt: string;
|
|
331
|
+
epoch: number;
|
|
207
332
|
providerSessionId: string | null;
|
|
208
333
|
lastSeq: number;
|
|
209
334
|
costUsd: number;
|
|
210
335
|
activeMsBase: number;
|
|
211
336
|
extraBudgetMinutes: number | null;
|
|
212
337
|
workspace: {
|
|
213
|
-
path: string;
|
|
214
338
|
id: string;
|
|
339
|
+
path: string;
|
|
215
340
|
projectId: string;
|
|
216
341
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
217
342
|
budgetUsd: number | null;
|
|
218
343
|
budgetMinutes: number | null;
|
|
344
|
+
agentAutoCommit?: boolean | undefined;
|
|
219
345
|
};
|
|
220
346
|
tickets: {
|
|
221
347
|
number: number;
|
|
@@ -227,20 +353,28 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
227
353
|
token: string;
|
|
228
354
|
} | undefined;
|
|
229
355
|
branchHint?: string | undefined;
|
|
356
|
+
branchPlan?: {
|
|
357
|
+
branch: string;
|
|
358
|
+
source: "NEW" | "CONTINUE";
|
|
359
|
+
baseBranch?: string | undefined;
|
|
360
|
+
baseSha?: string | undefined;
|
|
361
|
+
} | undefined;
|
|
362
|
+
workMode?: "DIRECT" | "BRANCH" | undefined;
|
|
230
363
|
}, {
|
|
231
|
-
status: "
|
|
232
|
-
agent: "CLAUDE" | "CODEX";
|
|
364
|
+
status: "RUNNING" | "FAILED" | "STARTING" | "WAITING_INPUT" | "WAITING_PERMISSION" | "REVIEW" | "DONE" | "STOPPED";
|
|
233
365
|
id: string;
|
|
366
|
+
agent: "CLAUDE" | "CODEX";
|
|
234
367
|
kind: "TICKET" | "CHAT";
|
|
235
368
|
prompt: string;
|
|
236
369
|
providerSessionId: string | null;
|
|
237
370
|
workspace: {
|
|
238
|
-
path: string;
|
|
239
371
|
id: string;
|
|
372
|
+
path: string;
|
|
240
373
|
projectId: string;
|
|
241
374
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
242
375
|
budgetUsd: number | null;
|
|
243
376
|
budgetMinutes: number | null;
|
|
377
|
+
agentAutoCommit?: boolean | undefined;
|
|
244
378
|
};
|
|
245
379
|
tickets: {
|
|
246
380
|
number: number;
|
|
@@ -260,6 +394,8 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
260
394
|
activeMsBase?: number | undefined;
|
|
261
395
|
extraBudgetMinutes?: number | null | undefined;
|
|
262
396
|
branchHint?: unknown;
|
|
397
|
+
branchPlan?: unknown;
|
|
398
|
+
workMode?: unknown;
|
|
263
399
|
}>, "many">;
|
|
264
400
|
}, "strip", z.ZodTypeAny, {
|
|
265
401
|
type: "hello_ack";
|
|
@@ -267,26 +403,27 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
267
403
|
serverId: string;
|
|
268
404
|
sessions: {
|
|
269
405
|
mode: "ask" | "plan" | "auto" | "full";
|
|
270
|
-
status: "
|
|
271
|
-
agent: "CLAUDE" | "CODEX";
|
|
406
|
+
status: "RUNNING" | "FAILED" | "STARTING" | "WAITING_INPUT" | "WAITING_PERMISSION" | "REVIEW" | "DONE" | "STOPPED";
|
|
272
407
|
id: string;
|
|
408
|
+
agent: "CLAUDE" | "CODEX";
|
|
273
409
|
kind: "TICKET" | "CHAT";
|
|
274
410
|
model: string | null;
|
|
275
411
|
effort: string | null;
|
|
276
|
-
epoch: number;
|
|
277
412
|
prompt: string;
|
|
413
|
+
epoch: number;
|
|
278
414
|
providerSessionId: string | null;
|
|
279
415
|
lastSeq: number;
|
|
280
416
|
costUsd: number;
|
|
281
417
|
activeMsBase: number;
|
|
282
418
|
extraBudgetMinutes: number | null;
|
|
283
419
|
workspace: {
|
|
284
|
-
path: string;
|
|
285
420
|
id: string;
|
|
421
|
+
path: string;
|
|
286
422
|
projectId: string;
|
|
287
423
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
288
424
|
budgetUsd: number | null;
|
|
289
425
|
budgetMinutes: number | null;
|
|
426
|
+
agentAutoCommit?: boolean | undefined;
|
|
290
427
|
};
|
|
291
428
|
tickets: {
|
|
292
429
|
number: number;
|
|
@@ -298,6 +435,13 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
298
435
|
token: string;
|
|
299
436
|
} | undefined;
|
|
300
437
|
branchHint?: string | undefined;
|
|
438
|
+
branchPlan?: {
|
|
439
|
+
branch: string;
|
|
440
|
+
source: "NEW" | "CONTINUE";
|
|
441
|
+
baseBranch?: string | undefined;
|
|
442
|
+
baseSha?: string | undefined;
|
|
443
|
+
} | undefined;
|
|
444
|
+
workMode?: "DIRECT" | "BRANCH" | undefined;
|
|
301
445
|
}[];
|
|
302
446
|
maxSessions?: number | undefined;
|
|
303
447
|
}, {
|
|
@@ -305,19 +449,20 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
305
449
|
serverName: string;
|
|
306
450
|
serverId: string;
|
|
307
451
|
sessions: {
|
|
308
|
-
status: "
|
|
309
|
-
agent: "CLAUDE" | "CODEX";
|
|
452
|
+
status: "RUNNING" | "FAILED" | "STARTING" | "WAITING_INPUT" | "WAITING_PERMISSION" | "REVIEW" | "DONE" | "STOPPED";
|
|
310
453
|
id: string;
|
|
454
|
+
agent: "CLAUDE" | "CODEX";
|
|
311
455
|
kind: "TICKET" | "CHAT";
|
|
312
456
|
prompt: string;
|
|
313
457
|
providerSessionId: string | null;
|
|
314
458
|
workspace: {
|
|
315
|
-
path: string;
|
|
316
459
|
id: string;
|
|
460
|
+
path: string;
|
|
317
461
|
projectId: string;
|
|
318
462
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
319
463
|
budgetUsd: number | null;
|
|
320
464
|
budgetMinutes: number | null;
|
|
465
|
+
agentAutoCommit?: boolean | undefined;
|
|
321
466
|
};
|
|
322
467
|
tickets: {
|
|
323
468
|
number: number;
|
|
@@ -337,6 +482,8 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
337
482
|
activeMsBase?: number | undefined;
|
|
338
483
|
extraBudgetMinutes?: number | null | undefined;
|
|
339
484
|
branchHint?: unknown;
|
|
485
|
+
branchPlan?: unknown;
|
|
486
|
+
workMode?: unknown;
|
|
340
487
|
}[];
|
|
341
488
|
maxSessions?: unknown;
|
|
342
489
|
}>, z.ZodObject<{
|
|
@@ -344,12 +491,12 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
344
491
|
sessionId: z.ZodString;
|
|
345
492
|
seq: z.ZodNumber;
|
|
346
493
|
}, "strip", z.ZodTypeAny, {
|
|
347
|
-
type: "event_ack";
|
|
348
494
|
sessionId: string;
|
|
495
|
+
type: "event_ack";
|
|
349
496
|
seq: number;
|
|
350
497
|
}, {
|
|
351
|
-
type: "event_ack";
|
|
352
498
|
sessionId: string;
|
|
499
|
+
type: "event_ack";
|
|
353
500
|
seq: number;
|
|
354
501
|
}>, z.ZodObject<{
|
|
355
502
|
type: z.ZodLiteral<"event_nack">;
|
|
@@ -358,13 +505,13 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
358
505
|
reason: z.ZodString;
|
|
359
506
|
}, "strip", z.ZodTypeAny, {
|
|
360
507
|
reason: string;
|
|
361
|
-
type: "event_nack";
|
|
362
508
|
sessionId: string;
|
|
509
|
+
type: "event_nack";
|
|
363
510
|
seq: number;
|
|
364
511
|
}, {
|
|
365
512
|
reason: string;
|
|
366
|
-
type: "event_nack";
|
|
367
513
|
sessionId: string;
|
|
514
|
+
type: "event_nack";
|
|
368
515
|
seq: number;
|
|
369
516
|
}>, z.ZodObject<{
|
|
370
517
|
type: z.ZodLiteral<"session_start">;
|
|
@@ -388,22 +535,31 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
388
535
|
path: z.ZodString;
|
|
389
536
|
projectId: z.ZodString;
|
|
390
537
|
trustMode: z.ZodEnum<["STRICT", "NORMAL", "AUTO"]>;
|
|
538
|
+
/**
|
|
539
|
+
* Session 15. Optional: an API older than this release does not send it,
|
|
540
|
+
* and «not said» must keep the behaviour every deployed runner has now —
|
|
541
|
+
* inventing a restriction from silence would stop agents committing on
|
|
542
|
+
* every project the moment a runner updated ahead of its API.
|
|
543
|
+
*/
|
|
544
|
+
agentAutoCommit: z.ZodOptional<z.ZodBoolean>;
|
|
391
545
|
budgetUsd: z.ZodNullable<z.ZodNumber>;
|
|
392
546
|
budgetMinutes: z.ZodNullable<z.ZodNumber>;
|
|
393
547
|
}, "strip", z.ZodTypeAny, {
|
|
394
|
-
path: string;
|
|
395
548
|
id: string;
|
|
549
|
+
path: string;
|
|
396
550
|
projectId: string;
|
|
397
551
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
398
552
|
budgetUsd: number | null;
|
|
399
553
|
budgetMinutes: number | null;
|
|
554
|
+
agentAutoCommit?: boolean | undefined;
|
|
400
555
|
}, {
|
|
401
|
-
path: string;
|
|
402
556
|
id: string;
|
|
557
|
+
path: string;
|
|
403
558
|
projectId: string;
|
|
404
559
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
405
560
|
budgetUsd: number | null;
|
|
406
561
|
budgetMinutes: number | null;
|
|
562
|
+
agentAutoCommit?: boolean | undefined;
|
|
407
563
|
}>;
|
|
408
564
|
tickets: z.ZodArray<z.ZodObject<{
|
|
409
565
|
id: z.ZodString;
|
|
@@ -419,6 +575,54 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
419
575
|
title: string;
|
|
420
576
|
}>, "many">;
|
|
421
577
|
branchHint: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
578
|
+
/**
|
|
579
|
+
* Session 13: the branch as a decision rather than a coincidence.
|
|
580
|
+
*
|
|
581
|
+
* `branchHint` said «call it this if you like»; the runner then guessed what
|
|
582
|
+
* to do about a name that already existed (silently reuse it) or did not
|
|
583
|
+
* (create it off whatever the folder was on). Both guesses lose work. The
|
|
584
|
+
* plan says which of the two the API meant, and the runner fails loudly when
|
|
585
|
+
* reality disagrees.
|
|
586
|
+
*
|
|
587
|
+
* `.catch(undefined)` for the same reason as `branchHint`: this field travels
|
|
588
|
+
* inside hello_ack, which carries EVERY session of the server, so one
|
|
589
|
+
* malformed plan must cost its own session at most — never the frame
|
|
590
|
+
* (QA-100 MAJOR-1). Falling back to `branchHint` restores exactly the old
|
|
591
|
+
* behaviour.
|
|
592
|
+
*/
|
|
593
|
+
branchPlan: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
594
|
+
branch: z.ZodString;
|
|
595
|
+
source: z.ZodEnum<["NEW", "CONTINUE"]>;
|
|
596
|
+
baseBranch: z.ZodOptional<z.ZodString>;
|
|
597
|
+
baseSha: z.ZodOptional<z.ZodString>;
|
|
598
|
+
}, "strip", z.ZodTypeAny, {
|
|
599
|
+
branch: string;
|
|
600
|
+
source: "NEW" | "CONTINUE";
|
|
601
|
+
baseBranch?: string | undefined;
|
|
602
|
+
baseSha?: string | undefined;
|
|
603
|
+
}, {
|
|
604
|
+
branch: string;
|
|
605
|
+
source: "NEW" | "CONTINUE";
|
|
606
|
+
baseBranch?: string | undefined;
|
|
607
|
+
baseSha?: string | undefined;
|
|
608
|
+
}>>>;
|
|
609
|
+
/**
|
|
610
|
+
* Where this session works (session 16).
|
|
611
|
+
*
|
|
612
|
+
* `DIRECT` — in the project folder itself, on the branch it is already on.
|
|
613
|
+
* There is no worktree, no session branch and no «Apply»: the work is already
|
|
614
|
+
* where the person wanted it. This is the ordinary case, because the person
|
|
615
|
+
* runs their own terminal agents in that same folder anyway — we were paying
|
|
616
|
+
* the whole price of isolation and not getting any.
|
|
617
|
+
*
|
|
618
|
+
* `BRANCH` — the historical worktree-and-branch arrangement. The API hands it
|
|
619
|
+
* out when the folder is already taken by another live session, because two
|
|
620
|
+
* agents in one folder fight exactly the way a human and an agent do.
|
|
621
|
+
*
|
|
622
|
+
* Optional, and absent means `BRANCH`: an API older than this release says
|
|
623
|
+
* nothing, and silence must keep the behaviour every deployed runner has now.
|
|
624
|
+
*/
|
|
625
|
+
workMode: z.ZodCatch<z.ZodOptional<z.ZodEnum<["DIRECT", "BRANCH"]>>>;
|
|
422
626
|
mcp: z.ZodOptional<z.ZodObject<{
|
|
423
627
|
url: z.ZodString;
|
|
424
628
|
token: z.ZodString;
|
|
@@ -431,26 +635,27 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
431
635
|
}>>;
|
|
432
636
|
}, "strip", z.ZodTypeAny, {
|
|
433
637
|
mode: "ask" | "plan" | "auto" | "full";
|
|
434
|
-
status: "
|
|
435
|
-
agent: "CLAUDE" | "CODEX";
|
|
638
|
+
status: "RUNNING" | "FAILED" | "STARTING" | "WAITING_INPUT" | "WAITING_PERMISSION" | "REVIEW" | "DONE" | "STOPPED";
|
|
436
639
|
id: string;
|
|
640
|
+
agent: "CLAUDE" | "CODEX";
|
|
437
641
|
kind: "TICKET" | "CHAT";
|
|
438
642
|
model: string | null;
|
|
439
643
|
effort: string | null;
|
|
440
|
-
epoch: number;
|
|
441
644
|
prompt: string;
|
|
645
|
+
epoch: number;
|
|
442
646
|
providerSessionId: string | null;
|
|
443
647
|
lastSeq: number;
|
|
444
648
|
costUsd: number;
|
|
445
649
|
activeMsBase: number;
|
|
446
650
|
extraBudgetMinutes: number | null;
|
|
447
651
|
workspace: {
|
|
448
|
-
path: string;
|
|
449
652
|
id: string;
|
|
653
|
+
path: string;
|
|
450
654
|
projectId: string;
|
|
451
655
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
452
656
|
budgetUsd: number | null;
|
|
453
657
|
budgetMinutes: number | null;
|
|
658
|
+
agentAutoCommit?: boolean | undefined;
|
|
454
659
|
};
|
|
455
660
|
tickets: {
|
|
456
661
|
number: number;
|
|
@@ -462,20 +667,28 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
462
667
|
token: string;
|
|
463
668
|
} | undefined;
|
|
464
669
|
branchHint?: string | undefined;
|
|
670
|
+
branchPlan?: {
|
|
671
|
+
branch: string;
|
|
672
|
+
source: "NEW" | "CONTINUE";
|
|
673
|
+
baseBranch?: string | undefined;
|
|
674
|
+
baseSha?: string | undefined;
|
|
675
|
+
} | undefined;
|
|
676
|
+
workMode?: "DIRECT" | "BRANCH" | undefined;
|
|
465
677
|
}, {
|
|
466
|
-
status: "
|
|
467
|
-
agent: "CLAUDE" | "CODEX";
|
|
678
|
+
status: "RUNNING" | "FAILED" | "STARTING" | "WAITING_INPUT" | "WAITING_PERMISSION" | "REVIEW" | "DONE" | "STOPPED";
|
|
468
679
|
id: string;
|
|
680
|
+
agent: "CLAUDE" | "CODEX";
|
|
469
681
|
kind: "TICKET" | "CHAT";
|
|
470
682
|
prompt: string;
|
|
471
683
|
providerSessionId: string | null;
|
|
472
684
|
workspace: {
|
|
473
|
-
path: string;
|
|
474
685
|
id: string;
|
|
686
|
+
path: string;
|
|
475
687
|
projectId: string;
|
|
476
688
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
477
689
|
budgetUsd: number | null;
|
|
478
690
|
budgetMinutes: number | null;
|
|
691
|
+
agentAutoCommit?: boolean | undefined;
|
|
479
692
|
};
|
|
480
693
|
tickets: {
|
|
481
694
|
number: number;
|
|
@@ -495,31 +708,34 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
495
708
|
activeMsBase?: number | undefined;
|
|
496
709
|
extraBudgetMinutes?: number | null | undefined;
|
|
497
710
|
branchHint?: unknown;
|
|
711
|
+
branchPlan?: unknown;
|
|
712
|
+
workMode?: unknown;
|
|
498
713
|
}>;
|
|
499
714
|
}, "strip", z.ZodTypeAny, {
|
|
500
715
|
type: "session_start";
|
|
501
716
|
session: {
|
|
502
717
|
mode: "ask" | "plan" | "auto" | "full";
|
|
503
|
-
status: "
|
|
504
|
-
agent: "CLAUDE" | "CODEX";
|
|
718
|
+
status: "RUNNING" | "FAILED" | "STARTING" | "WAITING_INPUT" | "WAITING_PERMISSION" | "REVIEW" | "DONE" | "STOPPED";
|
|
505
719
|
id: string;
|
|
720
|
+
agent: "CLAUDE" | "CODEX";
|
|
506
721
|
kind: "TICKET" | "CHAT";
|
|
507
722
|
model: string | null;
|
|
508
723
|
effort: string | null;
|
|
509
|
-
epoch: number;
|
|
510
724
|
prompt: string;
|
|
725
|
+
epoch: number;
|
|
511
726
|
providerSessionId: string | null;
|
|
512
727
|
lastSeq: number;
|
|
513
728
|
costUsd: number;
|
|
514
729
|
activeMsBase: number;
|
|
515
730
|
extraBudgetMinutes: number | null;
|
|
516
731
|
workspace: {
|
|
517
|
-
path: string;
|
|
518
732
|
id: string;
|
|
733
|
+
path: string;
|
|
519
734
|
projectId: string;
|
|
520
735
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
521
736
|
budgetUsd: number | null;
|
|
522
737
|
budgetMinutes: number | null;
|
|
738
|
+
agentAutoCommit?: boolean | undefined;
|
|
523
739
|
};
|
|
524
740
|
tickets: {
|
|
525
741
|
number: number;
|
|
@@ -531,23 +747,31 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
531
747
|
token: string;
|
|
532
748
|
} | undefined;
|
|
533
749
|
branchHint?: string | undefined;
|
|
750
|
+
branchPlan?: {
|
|
751
|
+
branch: string;
|
|
752
|
+
source: "NEW" | "CONTINUE";
|
|
753
|
+
baseBranch?: string | undefined;
|
|
754
|
+
baseSha?: string | undefined;
|
|
755
|
+
} | undefined;
|
|
756
|
+
workMode?: "DIRECT" | "BRANCH" | undefined;
|
|
534
757
|
};
|
|
535
758
|
}, {
|
|
536
759
|
type: "session_start";
|
|
537
760
|
session: {
|
|
538
|
-
status: "
|
|
539
|
-
agent: "CLAUDE" | "CODEX";
|
|
761
|
+
status: "RUNNING" | "FAILED" | "STARTING" | "WAITING_INPUT" | "WAITING_PERMISSION" | "REVIEW" | "DONE" | "STOPPED";
|
|
540
762
|
id: string;
|
|
763
|
+
agent: "CLAUDE" | "CODEX";
|
|
541
764
|
kind: "TICKET" | "CHAT";
|
|
542
765
|
prompt: string;
|
|
543
766
|
providerSessionId: string | null;
|
|
544
767
|
workspace: {
|
|
545
|
-
path: string;
|
|
546
768
|
id: string;
|
|
769
|
+
path: string;
|
|
547
770
|
projectId: string;
|
|
548
771
|
trustMode: "STRICT" | "NORMAL" | "AUTO";
|
|
549
772
|
budgetUsd: number | null;
|
|
550
773
|
budgetMinutes: number | null;
|
|
774
|
+
agentAutoCommit?: boolean | undefined;
|
|
551
775
|
};
|
|
552
776
|
tickets: {
|
|
553
777
|
number: number;
|
|
@@ -567,6 +791,8 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
567
791
|
activeMsBase?: number | undefined;
|
|
568
792
|
extraBudgetMinutes?: number | null | undefined;
|
|
569
793
|
branchHint?: unknown;
|
|
794
|
+
branchPlan?: unknown;
|
|
795
|
+
workMode?: unknown;
|
|
570
796
|
};
|
|
571
797
|
}>, z.ZodObject<{
|
|
572
798
|
type: z.ZodLiteral<"session_message">;
|
|
@@ -589,9 +815,9 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
589
815
|
fileSize: number;
|
|
590
816
|
}>, "many">>>;
|
|
591
817
|
}, "strip", z.ZodTypeAny, {
|
|
818
|
+
sessionId: string;
|
|
592
819
|
type: "session_message";
|
|
593
820
|
text: string;
|
|
594
|
-
sessionId: string;
|
|
595
821
|
attachments?: {
|
|
596
822
|
id: string;
|
|
597
823
|
fileName: string;
|
|
@@ -599,9 +825,9 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
599
825
|
fileSize: number;
|
|
600
826
|
}[] | undefined;
|
|
601
827
|
}, {
|
|
828
|
+
sessionId: string;
|
|
602
829
|
type: "session_message";
|
|
603
830
|
text: string;
|
|
604
|
-
sessionId: string;
|
|
605
831
|
attachments?: unknown;
|
|
606
832
|
}>, z.ZodObject<{
|
|
607
833
|
type: z.ZodLiteral<"permission_answer">;
|
|
@@ -611,34 +837,80 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
611
837
|
note: z.ZodOptional<z.ZodString>;
|
|
612
838
|
}, "strip", z.ZodTypeAny, {
|
|
613
839
|
allow: boolean;
|
|
840
|
+
sessionId: string;
|
|
614
841
|
type: "permission_answer";
|
|
615
842
|
requestId: string;
|
|
616
|
-
sessionId: string;
|
|
617
843
|
note?: string | undefined;
|
|
618
844
|
}, {
|
|
619
845
|
allow: boolean;
|
|
846
|
+
sessionId: string;
|
|
620
847
|
type: "permission_answer";
|
|
621
848
|
requestId: string;
|
|
622
|
-
sessionId: string;
|
|
623
849
|
note?: string | undefined;
|
|
624
850
|
}>, z.ZodObject<{
|
|
625
|
-
type: z.ZodLiteral<"
|
|
851
|
+
type: z.ZodLiteral<"question_answer">;
|
|
626
852
|
sessionId: z.ZodString;
|
|
853
|
+
askId: z.ZodString;
|
|
854
|
+
action: z.ZodEnum<["answer", "discuss"]>;
|
|
855
|
+
answers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
856
|
+
questionId: z.ZodString;
|
|
857
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
858
|
+
custom: z.ZodOptional<z.ZodString>;
|
|
859
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
860
|
+
}, "strip", z.ZodTypeAny, {
|
|
861
|
+
values: string[];
|
|
862
|
+
questionId: string;
|
|
863
|
+
custom?: string | undefined;
|
|
864
|
+
notes?: string | undefined;
|
|
865
|
+
}, {
|
|
866
|
+
values: string[];
|
|
867
|
+
questionId: string;
|
|
868
|
+
custom?: string | undefined;
|
|
869
|
+
notes?: string | undefined;
|
|
870
|
+
}>, "many">>;
|
|
871
|
+
text: z.ZodOptional<z.ZodString>;
|
|
627
872
|
}, "strip", z.ZodTypeAny, {
|
|
628
|
-
type: "session_stop";
|
|
629
873
|
sessionId: string;
|
|
874
|
+
type: "question_answer";
|
|
875
|
+
askId: string;
|
|
876
|
+
action: "answer" | "discuss";
|
|
877
|
+
text?: string | undefined;
|
|
878
|
+
answers?: {
|
|
879
|
+
values: string[];
|
|
880
|
+
questionId: string;
|
|
881
|
+
custom?: string | undefined;
|
|
882
|
+
notes?: string | undefined;
|
|
883
|
+
}[] | undefined;
|
|
630
884
|
}, {
|
|
885
|
+
sessionId: string;
|
|
886
|
+
type: "question_answer";
|
|
887
|
+
askId: string;
|
|
888
|
+
action: "answer" | "discuss";
|
|
889
|
+
text?: string | undefined;
|
|
890
|
+
answers?: {
|
|
891
|
+
values: string[];
|
|
892
|
+
questionId: string;
|
|
893
|
+
custom?: string | undefined;
|
|
894
|
+
notes?: string | undefined;
|
|
895
|
+
}[] | undefined;
|
|
896
|
+
}>, z.ZodObject<{
|
|
897
|
+
type: z.ZodLiteral<"session_stop">;
|
|
898
|
+
sessionId: z.ZodString;
|
|
899
|
+
}, "strip", z.ZodTypeAny, {
|
|
900
|
+
sessionId: string;
|
|
631
901
|
type: "session_stop";
|
|
902
|
+
}, {
|
|
632
903
|
sessionId: string;
|
|
904
|
+
type: "session_stop";
|
|
633
905
|
}>, z.ZodObject<{
|
|
634
906
|
type: z.ZodLiteral<"session_interrupt">;
|
|
635
907
|
sessionId: z.ZodString;
|
|
636
908
|
}, "strip", z.ZodTypeAny, {
|
|
637
|
-
type: "session_interrupt";
|
|
638
909
|
sessionId: string;
|
|
639
|
-
}, {
|
|
640
910
|
type: "session_interrupt";
|
|
911
|
+
}, {
|
|
641
912
|
sessionId: string;
|
|
913
|
+
type: "session_interrupt";
|
|
642
914
|
}>, z.ZodObject<{
|
|
643
915
|
type: z.ZodLiteral<"server_settings">;
|
|
644
916
|
maxSessions: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -648,6 +920,21 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
648
920
|
}, {
|
|
649
921
|
type: "server_settings";
|
|
650
922
|
maxSessions?: unknown;
|
|
923
|
+
}>, z.ZodObject<{
|
|
924
|
+
type: z.ZodLiteral<"workspace_settings">;
|
|
925
|
+
workspaceId: z.ZodString;
|
|
926
|
+
trustMode: z.ZodOptional<z.ZodEnum<["STRICT", "NORMAL", "AUTO"]>>;
|
|
927
|
+
agentAutoCommit: z.ZodOptional<z.ZodBoolean>;
|
|
928
|
+
}, "strip", z.ZodTypeAny, {
|
|
929
|
+
type: "workspace_settings";
|
|
930
|
+
workspaceId: string;
|
|
931
|
+
agentAutoCommit?: boolean | undefined;
|
|
932
|
+
trustMode?: "STRICT" | "NORMAL" | "AUTO" | undefined;
|
|
933
|
+
}, {
|
|
934
|
+
type: "workspace_settings";
|
|
935
|
+
workspaceId: string;
|
|
936
|
+
agentAutoCommit?: boolean | undefined;
|
|
937
|
+
trustMode?: "STRICT" | "NORMAL" | "AUTO" | undefined;
|
|
651
938
|
}>, z.ZodObject<{
|
|
652
939
|
type: z.ZodLiteral<"session_settings">;
|
|
653
940
|
sessionId: z.ZodString;
|
|
@@ -655,14 +942,14 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
655
942
|
mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "auto", "full"]>>;
|
|
656
943
|
effort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
657
944
|
}, "strip", z.ZodTypeAny, {
|
|
658
|
-
type: "session_settings";
|
|
659
945
|
sessionId: string;
|
|
946
|
+
type: "session_settings";
|
|
660
947
|
mode?: "ask" | "plan" | "auto" | "full" | undefined;
|
|
661
948
|
model?: string | undefined;
|
|
662
949
|
effort?: string | null | undefined;
|
|
663
950
|
}, {
|
|
664
|
-
type: "session_settings";
|
|
665
951
|
sessionId: string;
|
|
952
|
+
type: "session_settings";
|
|
666
953
|
mode?: "ask" | "plan" | "auto" | "full" | undefined;
|
|
667
954
|
model?: string | undefined;
|
|
668
955
|
effort?: string | null | undefined;
|
|
@@ -675,18 +962,27 @@ export declare const GatewayFrameSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
675
962
|
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
676
963
|
}, "strip", z.ZodTypeAny, {
|
|
677
964
|
type: "command";
|
|
678
|
-
name: string;
|
|
679
965
|
requestId: string;
|
|
680
|
-
|
|
966
|
+
name: string;
|
|
681
967
|
sessionId?: string | undefined;
|
|
682
968
|
workspaceId?: string | undefined;
|
|
969
|
+
args?: Record<string, unknown> | undefined;
|
|
683
970
|
}, {
|
|
684
971
|
type: "command";
|
|
685
|
-
name: string;
|
|
686
972
|
requestId: string;
|
|
687
|
-
|
|
973
|
+
name: string;
|
|
688
974
|
sessionId?: string | undefined;
|
|
689
975
|
workspaceId?: string | undefined;
|
|
976
|
+
args?: Record<string, unknown> | undefined;
|
|
977
|
+
}>, z.ZodObject<{
|
|
978
|
+
type: z.ZodLiteral<"verify_report_ack">;
|
|
979
|
+
runId: z.ZodString;
|
|
980
|
+
}, "strip", z.ZodTypeAny, {
|
|
981
|
+
type: "verify_report_ack";
|
|
982
|
+
runId: string;
|
|
983
|
+
}, {
|
|
984
|
+
type: "verify_report_ack";
|
|
985
|
+
runId: string;
|
|
690
986
|
}>, z.ZodObject<{
|
|
691
987
|
type: z.ZodLiteral<"revoked">;
|
|
692
988
|
reason: z.ZodString;
|
|
@@ -722,11 +1018,25 @@ export type RunnerFrame = {
|
|
|
722
1018
|
} | {
|
|
723
1019
|
type: 'session_status';
|
|
724
1020
|
sessionId: string;
|
|
725
|
-
|
|
1021
|
+
/**
|
|
1022
|
+
* `DONE` left this union in session 13. It used to mean «applied», and
|
|
1023
|
+
* the runner never sent it — but the schema accepted it, and now that
|
|
1024
|
+
* `DONE` means «a human closed this session» a runner bug could close a
|
|
1025
|
+
* session on the user's behalf. The API rejects it too.
|
|
1026
|
+
*/
|
|
1027
|
+
status: Exclude<SessionStatusValue, 'STARTING' | 'DONE'>;
|
|
726
1028
|
costUsd?: number;
|
|
727
1029
|
providerSessionId?: string;
|
|
728
1030
|
branch?: string;
|
|
729
1031
|
worktreePath?: string;
|
|
1032
|
+
/**
|
|
1033
|
+
* The fork point, reported once when the runner creates the branch. The
|
|
1034
|
+
* API pins the FIRST value it hears and never recomputes it — «the base»
|
|
1035
|
+
* used to be re-derived on every call as whatever the project folder was
|
|
1036
|
+
* checked out on.
|
|
1037
|
+
*/
|
|
1038
|
+
baseBranch?: string;
|
|
1039
|
+
baseSha?: string;
|
|
730
1040
|
errorMessage?: string;
|
|
731
1041
|
/** Why it ended, when the reason is worth naming rather than an error. */
|
|
732
1042
|
endReason?: 'TIME_BUDGET' | 'COST_BUDGET';
|
|
@@ -748,6 +1058,18 @@ export type RunnerFrame = {
|
|
|
748
1058
|
ok: boolean;
|
|
749
1059
|
result?: unknown;
|
|
750
1060
|
error?: string;
|
|
1061
|
+
}
|
|
1062
|
+
/**
|
|
1063
|
+
* Session 14: the verdict of a verification run.
|
|
1064
|
+
*
|
|
1065
|
+
* Its own frame, not a command answer — `verify_start` returns as soon as the
|
|
1066
|
+
* process is up, and the build finishes minutes later, long after any relay
|
|
1067
|
+
* would have timed out and quite possibly after the browser tab was closed.
|
|
1068
|
+
* Redelivered from the on-disk queue on every reconnect until acked.
|
|
1069
|
+
*/
|
|
1070
|
+
| {
|
|
1071
|
+
type: 'verify_report';
|
|
1072
|
+
report: Record<string, unknown>;
|
|
751
1073
|
} | {
|
|
752
1074
|
type: 'pong';
|
|
753
1075
|
};
|