@intentic/sandbox-contract 1.230.3 → 1.231.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/contracts/agent.contract.d.ts +42 -6
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.d.ts +6 -1
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +293 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js +10 -1
- package/dist/contracts/capabilities.contract.js.map +1 -1
- package/dist/contracts/extensions.contract.d.ts +15 -0
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/git.contract.d.ts +12 -2
- package/dist/contracts/git.contract.d.ts.map +1 -1
- package/dist/contracts/history.contract.d.ts +6 -1
- package/dist/contracts/history.contract.d.ts.map +1 -1
- package/dist/contracts/panels.contract.d.ts +1 -0
- package/dist/contracts/panels.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.d.ts +811 -0
- package/dist/contracts/runner.contract.d.ts.map +1 -0
- package/dist/contracts/runner.contract.js +12 -0
- package/dist/contracts/runner.contract.js.map +1 -0
- package/dist/contracts/system.contract.d.ts +2 -3
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/documents.d.ts +7 -0
- package/dist/documents.d.ts.map +1 -0
- package/dist/documents.js +27 -0
- package/dist/documents.js.map +1 -0
- package/dist/events.d.ts +58 -6
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +12 -1
- package/dist/events.js.map +1 -1
- package/dist/history-state.d.ts.map +1 -1
- package/dist/history-state.js +3 -0
- package/dist/history-state.js.map +1 -1
- package/dist/index.d.ts +380 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/runner-protocol.d.ts +134 -0
- package/dist/runner-protocol.d.ts.map +1 -0
- package/dist/runner-protocol.js +95 -0
- package/dist/runner-protocol.js.map +1 -0
- package/dist/schemas.d.ts +62 -9
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +30 -11
- package/dist/schemas.js.map +1 -1
- package/package.json +4 -4
- package/src/contracts/capabilities.contract.ts +16 -0
- package/src/contracts/runner.contract.ts +33 -0
- package/src/documents.test.ts +66 -0
- package/src/documents.ts +71 -0
- package/src/events.ts +44 -2
- package/src/history-state.ts +7 -0
- package/src/index.ts +4 -0
- package/src/runner-protocol.ts +209 -0
- package/src/schemas.ts +106 -37
|
@@ -0,0 +1,811 @@
|
|
|
1
|
+
export declare const runnerContract: {
|
|
2
|
+
describe: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, import("zod").ZodObject<{
|
|
3
|
+
cpus: import("zod").ZodNumber;
|
|
4
|
+
memoryMb: import("zod").ZodNumber;
|
|
5
|
+
freeDiskMb: import("zod").ZodNumber;
|
|
6
|
+
load: import("zod").ZodNumber;
|
|
7
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
8
|
+
syncWorkspace: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
9
|
+
op: import("zod").ZodEnum<{
|
|
10
|
+
pull: "pull";
|
|
11
|
+
push: "push";
|
|
12
|
+
}>;
|
|
13
|
+
conversationId: import("zod").ZodString;
|
|
14
|
+
branch: import("zod").ZodString;
|
|
15
|
+
repos: import("zod").ZodArray<import("zod").ZodObject<{
|
|
16
|
+
repo: import("zod").ZodString;
|
|
17
|
+
dir: import("zod").ZodString;
|
|
18
|
+
mainBranch: import("zod").ZodString;
|
|
19
|
+
}, import("zod/v4/core").$strip>>;
|
|
20
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").Schema<AsyncIteratorObject<{
|
|
21
|
+
kind: "line";
|
|
22
|
+
text: string;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "done";
|
|
25
|
+
ok: boolean;
|
|
26
|
+
detail?: string | undefined;
|
|
27
|
+
}, unknown, void>, import("@orpc/contract").AsyncIteratorClass<{
|
|
28
|
+
kind: "line";
|
|
29
|
+
text: string;
|
|
30
|
+
} | {
|
|
31
|
+
kind: "done";
|
|
32
|
+
ok: boolean;
|
|
33
|
+
detail?: string | undefined;
|
|
34
|
+
}, unknown, void>>, Record<never, never>, Record<never, never>>;
|
|
35
|
+
runTurn: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
36
|
+
conversationId: import("zod").ZodString;
|
|
37
|
+
branch: import("zod").ZodString;
|
|
38
|
+
prompt: import("zod").ZodString;
|
|
39
|
+
provider: import("zod").ZodString;
|
|
40
|
+
harness: import("zod").ZodString;
|
|
41
|
+
model: import("zod").ZodOptional<import("zod").ZodString>;
|
|
42
|
+
effort: import("zod").ZodOptional<import("zod").ZodString>;
|
|
43
|
+
thinking: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
44
|
+
fast: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
45
|
+
account: import("zod").ZodOptional<import("zod").ZodString>;
|
|
46
|
+
sessionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
47
|
+
attachments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
48
|
+
path: import("zod").ZodString;
|
|
49
|
+
bytesBase64: import("zod").ZodString;
|
|
50
|
+
}, import("zod/v4/core").$strip>>>;
|
|
51
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").Schema<AsyncIteratorObject<{
|
|
52
|
+
kind: "session";
|
|
53
|
+
sessionId: string;
|
|
54
|
+
} | {
|
|
55
|
+
kind: "worktree";
|
|
56
|
+
branch: string;
|
|
57
|
+
base: string;
|
|
58
|
+
unenforced?: boolean | undefined;
|
|
59
|
+
sync?: {
|
|
60
|
+
commits: number;
|
|
61
|
+
blocked: string[];
|
|
62
|
+
} | undefined;
|
|
63
|
+
remote?: string | undefined;
|
|
64
|
+
} | {
|
|
65
|
+
kind: "landed";
|
|
66
|
+
landed: boolean;
|
|
67
|
+
conflicts?: {
|
|
68
|
+
repo: string;
|
|
69
|
+
paths: {
|
|
70
|
+
path: string;
|
|
71
|
+
reason: "binary" | "diverged" | "workspace";
|
|
72
|
+
}[];
|
|
73
|
+
clean: number;
|
|
74
|
+
mainBranch?: string | undefined;
|
|
75
|
+
}[] | undefined;
|
|
76
|
+
held?: boolean | undefined;
|
|
77
|
+
deps?: {
|
|
78
|
+
missing: number;
|
|
79
|
+
started: string[];
|
|
80
|
+
deferred: boolean;
|
|
81
|
+
} | undefined;
|
|
82
|
+
} | {
|
|
83
|
+
kind: "preamble";
|
|
84
|
+
notes: {
|
|
85
|
+
title: string;
|
|
86
|
+
text: string;
|
|
87
|
+
}[];
|
|
88
|
+
} | {
|
|
89
|
+
kind: "init";
|
|
90
|
+
model: string;
|
|
91
|
+
} | {
|
|
92
|
+
kind: "checkpoint";
|
|
93
|
+
id: string;
|
|
94
|
+
index?: number | undefined;
|
|
95
|
+
} | {
|
|
96
|
+
kind: "steer";
|
|
97
|
+
text: string;
|
|
98
|
+
sentAt: number;
|
|
99
|
+
attachments?: string[] | undefined;
|
|
100
|
+
} | {
|
|
101
|
+
kind: "delta";
|
|
102
|
+
text: string;
|
|
103
|
+
parentToolUseId?: string | undefined;
|
|
104
|
+
} | {
|
|
105
|
+
kind: "text_end";
|
|
106
|
+
parentToolUseId?: string | undefined;
|
|
107
|
+
} | {
|
|
108
|
+
kind: "thinking";
|
|
109
|
+
text: string;
|
|
110
|
+
parentToolUseId?: string | undefined;
|
|
111
|
+
} | {
|
|
112
|
+
kind: "tool_call";
|
|
113
|
+
id: string;
|
|
114
|
+
name: string;
|
|
115
|
+
category: "delete" | "edit" | "execute" | "fetch" | "move" | "other" | "read" | "search" | "think";
|
|
116
|
+
status: "completed" | "failed" | "in_progress" | "pending";
|
|
117
|
+
target?: string | undefined;
|
|
118
|
+
locations?: {
|
|
119
|
+
path: string;
|
|
120
|
+
line?: number | undefined;
|
|
121
|
+
}[] | undefined;
|
|
122
|
+
content?: ({
|
|
123
|
+
type: "text";
|
|
124
|
+
text: string;
|
|
125
|
+
} | {
|
|
126
|
+
type: "diff";
|
|
127
|
+
path: string;
|
|
128
|
+
oldText?: string | undefined;
|
|
129
|
+
newText: string;
|
|
130
|
+
truncated?: boolean | undefined;
|
|
131
|
+
} | {
|
|
132
|
+
type: "image";
|
|
133
|
+
path: string;
|
|
134
|
+
})[] | undefined;
|
|
135
|
+
parentToolUseId?: string | undefined;
|
|
136
|
+
} | {
|
|
137
|
+
kind: "tool_call_update";
|
|
138
|
+
id: string;
|
|
139
|
+
status?: "completed" | "failed" | "in_progress" | "pending" | undefined;
|
|
140
|
+
content?: ({
|
|
141
|
+
type: "text";
|
|
142
|
+
text: string;
|
|
143
|
+
} | {
|
|
144
|
+
type: "diff";
|
|
145
|
+
path: string;
|
|
146
|
+
oldText?: string | undefined;
|
|
147
|
+
newText: string;
|
|
148
|
+
truncated?: boolean | undefined;
|
|
149
|
+
} | {
|
|
150
|
+
type: "image";
|
|
151
|
+
path: string;
|
|
152
|
+
})[] | undefined;
|
|
153
|
+
locations?: {
|
|
154
|
+
path: string;
|
|
155
|
+
line?: number | undefined;
|
|
156
|
+
}[] | undefined;
|
|
157
|
+
} | {
|
|
158
|
+
kind: "terminal";
|
|
159
|
+
session: string;
|
|
160
|
+
} | {
|
|
161
|
+
kind: "browser";
|
|
162
|
+
session: string;
|
|
163
|
+
} | {
|
|
164
|
+
kind: "subagent";
|
|
165
|
+
id: string;
|
|
166
|
+
subagentKind: "spawned" | "subagent";
|
|
167
|
+
agentType?: string | undefined;
|
|
168
|
+
description?: string | undefined;
|
|
169
|
+
model?: string | undefined;
|
|
170
|
+
provider?: string | undefined;
|
|
171
|
+
background?: boolean | undefined;
|
|
172
|
+
} | {
|
|
173
|
+
kind: "subagent_update";
|
|
174
|
+
id: string;
|
|
175
|
+
status?: "blocked" | "completed" | "failed" | "killed" | "paused" | "pending" | "running" | undefined;
|
|
176
|
+
tokens?: number | undefined;
|
|
177
|
+
toolUses?: number | undefined;
|
|
178
|
+
lastTool?: string | undefined;
|
|
179
|
+
summary?: string | undefined;
|
|
180
|
+
error?: string | undefined;
|
|
181
|
+
} | {
|
|
182
|
+
kind: "todos";
|
|
183
|
+
items: {
|
|
184
|
+
content: string;
|
|
185
|
+
status: "completed" | "in_progress" | "pending";
|
|
186
|
+
activeForm?: string | undefined;
|
|
187
|
+
}[];
|
|
188
|
+
} | {
|
|
189
|
+
kind: "commands";
|
|
190
|
+
items: {
|
|
191
|
+
name: string;
|
|
192
|
+
description: string;
|
|
193
|
+
hint?: string | undefined;
|
|
194
|
+
}[];
|
|
195
|
+
} | {
|
|
196
|
+
kind: "usage";
|
|
197
|
+
account?: string | undefined;
|
|
198
|
+
costUsd?: number | undefined;
|
|
199
|
+
inputTokens?: number | undefined;
|
|
200
|
+
outputTokens?: number | undefined;
|
|
201
|
+
cacheReadTokens?: number | undefined;
|
|
202
|
+
cacheCreationTokens?: number | undefined;
|
|
203
|
+
durationMs?: number | undefined;
|
|
204
|
+
numTurns?: number | undefined;
|
|
205
|
+
} | {
|
|
206
|
+
status: "allowed" | "allowed_warning" | "rejected";
|
|
207
|
+
resetsAt?: number | undefined;
|
|
208
|
+
rateLimitType?: string | undefined;
|
|
209
|
+
utilization?: number | undefined;
|
|
210
|
+
kind: "rate_limit_info";
|
|
211
|
+
account?: string | undefined;
|
|
212
|
+
} | {
|
|
213
|
+
kind: "fast_mode";
|
|
214
|
+
state: "cooldown" | "off" | "on";
|
|
215
|
+
reason?: string | undefined;
|
|
216
|
+
} | {
|
|
217
|
+
kind: "tier";
|
|
218
|
+
tier: "fast" | "standard";
|
|
219
|
+
score: number;
|
|
220
|
+
rules: string[];
|
|
221
|
+
model?: string | undefined;
|
|
222
|
+
routed: boolean;
|
|
223
|
+
held?: boolean | undefined;
|
|
224
|
+
} | {
|
|
225
|
+
kind: "provider_retry";
|
|
226
|
+
attempt: number;
|
|
227
|
+
maxAttempts?: number | undefined;
|
|
228
|
+
nextAttemptAt?: number | undefined;
|
|
229
|
+
status?: number | undefined;
|
|
230
|
+
} | {
|
|
231
|
+
kind: "account_usage";
|
|
232
|
+
account?: string | undefined;
|
|
233
|
+
windows: {
|
|
234
|
+
kind: string;
|
|
235
|
+
label?: string | undefined;
|
|
236
|
+
utilization: number;
|
|
237
|
+
resetsAt?: number | undefined;
|
|
238
|
+
}[];
|
|
239
|
+
} | {
|
|
240
|
+
tokens: number;
|
|
241
|
+
contextWindow: number;
|
|
242
|
+
kind: "context_usage";
|
|
243
|
+
} | {
|
|
244
|
+
kind: "compact";
|
|
245
|
+
trigger: string;
|
|
246
|
+
preTokens?: number | undefined;
|
|
247
|
+
postTokens?: number | undefined;
|
|
248
|
+
} | {
|
|
249
|
+
kind: "plan";
|
|
250
|
+
requestId: string;
|
|
251
|
+
text: string;
|
|
252
|
+
document?: {
|
|
253
|
+
path: string;
|
|
254
|
+
title: string;
|
|
255
|
+
markdown: string;
|
|
256
|
+
truncated?: boolean | undefined;
|
|
257
|
+
plan?: boolean | undefined;
|
|
258
|
+
} | undefined;
|
|
259
|
+
} | {
|
|
260
|
+
kind: "question";
|
|
261
|
+
requestId: string;
|
|
262
|
+
questions: {
|
|
263
|
+
question: string;
|
|
264
|
+
header: string;
|
|
265
|
+
multiSelect: boolean;
|
|
266
|
+
options: {
|
|
267
|
+
label: string;
|
|
268
|
+
description: string;
|
|
269
|
+
preview?: string | undefined;
|
|
270
|
+
}[];
|
|
271
|
+
}[];
|
|
272
|
+
document?: {
|
|
273
|
+
path: string;
|
|
274
|
+
title: string;
|
|
275
|
+
markdown: string;
|
|
276
|
+
truncated?: boolean | undefined;
|
|
277
|
+
plan?: boolean | undefined;
|
|
278
|
+
} | undefined;
|
|
279
|
+
} | {
|
|
280
|
+
toolName: string;
|
|
281
|
+
title?: string | undefined;
|
|
282
|
+
displayName?: string | undefined;
|
|
283
|
+
description?: string | undefined;
|
|
284
|
+
reason?: string | undefined;
|
|
285
|
+
path?: string | undefined;
|
|
286
|
+
alwaysLabel?: string | undefined;
|
|
287
|
+
kind: "permission";
|
|
288
|
+
requestId: string;
|
|
289
|
+
} | {
|
|
290
|
+
kind: "browser_help";
|
|
291
|
+
requestId: string;
|
|
292
|
+
session: string;
|
|
293
|
+
account: string;
|
|
294
|
+
message: string;
|
|
295
|
+
} | {
|
|
296
|
+
kind: "terminal_help";
|
|
297
|
+
requestId: string;
|
|
298
|
+
session: string;
|
|
299
|
+
message: string;
|
|
300
|
+
} | {
|
|
301
|
+
kind: "service_offer";
|
|
302
|
+
requestId: string;
|
|
303
|
+
offer: {
|
|
304
|
+
slug: string;
|
|
305
|
+
name: string;
|
|
306
|
+
publisher: string;
|
|
307
|
+
description: string;
|
|
308
|
+
creditsPerRun: number;
|
|
309
|
+
probation?: boolean | undefined;
|
|
310
|
+
credits?: {
|
|
311
|
+
allowance: number;
|
|
312
|
+
remaining: number;
|
|
313
|
+
resetsAt: string;
|
|
314
|
+
} | undefined;
|
|
315
|
+
request: string;
|
|
316
|
+
why?: string | undefined;
|
|
317
|
+
};
|
|
318
|
+
} | {
|
|
319
|
+
kind: "service_event";
|
|
320
|
+
requestId: string;
|
|
321
|
+
event: {
|
|
322
|
+
event: "status";
|
|
323
|
+
text: string;
|
|
324
|
+
} | {
|
|
325
|
+
event: "result";
|
|
326
|
+
data: unknown;
|
|
327
|
+
};
|
|
328
|
+
} | {
|
|
329
|
+
kind: "service_receipt";
|
|
330
|
+
requestId: string;
|
|
331
|
+
outcome: "ok" | "refunded" | "refused";
|
|
332
|
+
credits: number;
|
|
333
|
+
remaining?: number | undefined;
|
|
334
|
+
} | {
|
|
335
|
+
kind: "capability_offer";
|
|
336
|
+
requestId: string;
|
|
337
|
+
offer: {
|
|
338
|
+
card: string;
|
|
339
|
+
name: string;
|
|
340
|
+
why?: string | undefined;
|
|
341
|
+
};
|
|
342
|
+
} | {
|
|
343
|
+
kind: "capability_outcome";
|
|
344
|
+
requestId: string;
|
|
345
|
+
outcome: "connected" | "unfinished";
|
|
346
|
+
id?: string | undefined;
|
|
347
|
+
} | {
|
|
348
|
+
kind: "payment_offer";
|
|
349
|
+
requestId: string;
|
|
350
|
+
offer: {
|
|
351
|
+
url: string;
|
|
352
|
+
description?: string | undefined;
|
|
353
|
+
payTo: string;
|
|
354
|
+
network: string;
|
|
355
|
+
asset: string;
|
|
356
|
+
assetName: string;
|
|
357
|
+
amountUsd: string;
|
|
358
|
+
spentTodayUsd: string;
|
|
359
|
+
dailyCapUsd: string;
|
|
360
|
+
why?: string | undefined;
|
|
361
|
+
};
|
|
362
|
+
} | {
|
|
363
|
+
kind: "payment_receipt";
|
|
364
|
+
requestId: string;
|
|
365
|
+
outcome: "failed" | "paid";
|
|
366
|
+
amountUsd: string;
|
|
367
|
+
transaction?: string | undefined;
|
|
368
|
+
network?: string | undefined;
|
|
369
|
+
} | {
|
|
370
|
+
kind: "resolved";
|
|
371
|
+
requestId: string;
|
|
372
|
+
reply?: {
|
|
373
|
+
kind: "plan";
|
|
374
|
+
requestId: string;
|
|
375
|
+
approve: boolean;
|
|
376
|
+
feedback?: string | undefined;
|
|
377
|
+
} | {
|
|
378
|
+
kind: "question";
|
|
379
|
+
requestId: string;
|
|
380
|
+
answers?: Record<string, string[]> | undefined;
|
|
381
|
+
cancelled?: boolean | undefined;
|
|
382
|
+
} | {
|
|
383
|
+
kind: "permission";
|
|
384
|
+
requestId: string;
|
|
385
|
+
decision: "always" | "deny" | "once";
|
|
386
|
+
feedback?: string | undefined;
|
|
387
|
+
} | {
|
|
388
|
+
kind: "browser_help";
|
|
389
|
+
requestId: string;
|
|
390
|
+
helped: boolean;
|
|
391
|
+
note?: string | undefined;
|
|
392
|
+
} | {
|
|
393
|
+
kind: "terminal_help";
|
|
394
|
+
requestId: string;
|
|
395
|
+
helped: boolean;
|
|
396
|
+
note?: string | undefined;
|
|
397
|
+
} | {
|
|
398
|
+
kind: "service_offer";
|
|
399
|
+
requestId: string;
|
|
400
|
+
approve: boolean;
|
|
401
|
+
} | {
|
|
402
|
+
kind: "capability_offer";
|
|
403
|
+
requestId: string;
|
|
404
|
+
connect: boolean;
|
|
405
|
+
} | {
|
|
406
|
+
kind: "payment_offer";
|
|
407
|
+
requestId: string;
|
|
408
|
+
approve: boolean;
|
|
409
|
+
} | undefined;
|
|
410
|
+
} | {
|
|
411
|
+
kind: "mode";
|
|
412
|
+
mode: "acceptEdits" | "bypassPermissions" | "default" | "plan";
|
|
413
|
+
} | {
|
|
414
|
+
kind: "error";
|
|
415
|
+
message: string;
|
|
416
|
+
code?: "agent-busy" | "claude-not-entitled" | "claude-reauth" | "claude-token-refused" | "codex-advisory" | "codex-model-invalid" | "codex-reauth" | "context-window-too-small" | "grok-model-invalid" | "provider-outage" | "rate_limit" | "sandbox-memory-low" | "session-not-found" | "subscription-required" | "trial-exhausted" | "trial-model-unavailable" | "trial-unavailable" | "unknown-command" | undefined;
|
|
417
|
+
resetsAt?: number | undefined;
|
|
418
|
+
autoResume?: "available" | "scheduled" | undefined;
|
|
419
|
+
outage?: {
|
|
420
|
+
retryAt: number;
|
|
421
|
+
attempt: number;
|
|
422
|
+
maxAttempts: number;
|
|
423
|
+
} | undefined;
|
|
424
|
+
} | {
|
|
425
|
+
kind: "done";
|
|
426
|
+
}, unknown, void>, import("@orpc/contract").AsyncIteratorClass<{
|
|
427
|
+
kind: "session";
|
|
428
|
+
sessionId: string;
|
|
429
|
+
} | {
|
|
430
|
+
kind: "worktree";
|
|
431
|
+
branch: string;
|
|
432
|
+
base: string;
|
|
433
|
+
unenforced?: boolean | undefined;
|
|
434
|
+
sync?: {
|
|
435
|
+
commits: number;
|
|
436
|
+
blocked: string[];
|
|
437
|
+
} | undefined;
|
|
438
|
+
remote?: string | undefined;
|
|
439
|
+
} | {
|
|
440
|
+
kind: "landed";
|
|
441
|
+
landed: boolean;
|
|
442
|
+
conflicts?: {
|
|
443
|
+
repo: string;
|
|
444
|
+
paths: {
|
|
445
|
+
path: string;
|
|
446
|
+
reason: "binary" | "diverged" | "workspace";
|
|
447
|
+
}[];
|
|
448
|
+
clean: number;
|
|
449
|
+
mainBranch?: string | undefined;
|
|
450
|
+
}[] | undefined;
|
|
451
|
+
held?: boolean | undefined;
|
|
452
|
+
deps?: {
|
|
453
|
+
missing: number;
|
|
454
|
+
started: string[];
|
|
455
|
+
deferred: boolean;
|
|
456
|
+
} | undefined;
|
|
457
|
+
} | {
|
|
458
|
+
kind: "preamble";
|
|
459
|
+
notes: {
|
|
460
|
+
title: string;
|
|
461
|
+
text: string;
|
|
462
|
+
}[];
|
|
463
|
+
} | {
|
|
464
|
+
kind: "init";
|
|
465
|
+
model: string;
|
|
466
|
+
} | {
|
|
467
|
+
kind: "checkpoint";
|
|
468
|
+
id: string;
|
|
469
|
+
index?: number | undefined;
|
|
470
|
+
} | {
|
|
471
|
+
kind: "steer";
|
|
472
|
+
text: string;
|
|
473
|
+
sentAt: number;
|
|
474
|
+
attachments?: string[] | undefined;
|
|
475
|
+
} | {
|
|
476
|
+
kind: "delta";
|
|
477
|
+
text: string;
|
|
478
|
+
parentToolUseId?: string | undefined;
|
|
479
|
+
} | {
|
|
480
|
+
kind: "text_end";
|
|
481
|
+
parentToolUseId?: string | undefined;
|
|
482
|
+
} | {
|
|
483
|
+
kind: "thinking";
|
|
484
|
+
text: string;
|
|
485
|
+
parentToolUseId?: string | undefined;
|
|
486
|
+
} | {
|
|
487
|
+
kind: "tool_call";
|
|
488
|
+
id: string;
|
|
489
|
+
name: string;
|
|
490
|
+
category: "delete" | "edit" | "execute" | "fetch" | "move" | "other" | "read" | "search" | "think";
|
|
491
|
+
status: "completed" | "failed" | "in_progress" | "pending";
|
|
492
|
+
target?: string | undefined;
|
|
493
|
+
locations?: {
|
|
494
|
+
path: string;
|
|
495
|
+
line?: number | undefined;
|
|
496
|
+
}[] | undefined;
|
|
497
|
+
content?: ({
|
|
498
|
+
type: "text";
|
|
499
|
+
text: string;
|
|
500
|
+
} | {
|
|
501
|
+
type: "diff";
|
|
502
|
+
path: string;
|
|
503
|
+
oldText?: string | undefined;
|
|
504
|
+
newText: string;
|
|
505
|
+
truncated?: boolean | undefined;
|
|
506
|
+
} | {
|
|
507
|
+
type: "image";
|
|
508
|
+
path: string;
|
|
509
|
+
})[] | undefined;
|
|
510
|
+
parentToolUseId?: string | undefined;
|
|
511
|
+
} | {
|
|
512
|
+
kind: "tool_call_update";
|
|
513
|
+
id: string;
|
|
514
|
+
status?: "completed" | "failed" | "in_progress" | "pending" | undefined;
|
|
515
|
+
content?: ({
|
|
516
|
+
type: "text";
|
|
517
|
+
text: string;
|
|
518
|
+
} | {
|
|
519
|
+
type: "diff";
|
|
520
|
+
path: string;
|
|
521
|
+
oldText?: string | undefined;
|
|
522
|
+
newText: string;
|
|
523
|
+
truncated?: boolean | undefined;
|
|
524
|
+
} | {
|
|
525
|
+
type: "image";
|
|
526
|
+
path: string;
|
|
527
|
+
})[] | undefined;
|
|
528
|
+
locations?: {
|
|
529
|
+
path: string;
|
|
530
|
+
line?: number | undefined;
|
|
531
|
+
}[] | undefined;
|
|
532
|
+
} | {
|
|
533
|
+
kind: "terminal";
|
|
534
|
+
session: string;
|
|
535
|
+
} | {
|
|
536
|
+
kind: "browser";
|
|
537
|
+
session: string;
|
|
538
|
+
} | {
|
|
539
|
+
kind: "subagent";
|
|
540
|
+
id: string;
|
|
541
|
+
subagentKind: "spawned" | "subagent";
|
|
542
|
+
agentType?: string | undefined;
|
|
543
|
+
description?: string | undefined;
|
|
544
|
+
model?: string | undefined;
|
|
545
|
+
provider?: string | undefined;
|
|
546
|
+
background?: boolean | undefined;
|
|
547
|
+
} | {
|
|
548
|
+
kind: "subagent_update";
|
|
549
|
+
id: string;
|
|
550
|
+
status?: "blocked" | "completed" | "failed" | "killed" | "paused" | "pending" | "running" | undefined;
|
|
551
|
+
tokens?: number | undefined;
|
|
552
|
+
toolUses?: number | undefined;
|
|
553
|
+
lastTool?: string | undefined;
|
|
554
|
+
summary?: string | undefined;
|
|
555
|
+
error?: string | undefined;
|
|
556
|
+
} | {
|
|
557
|
+
kind: "todos";
|
|
558
|
+
items: {
|
|
559
|
+
content: string;
|
|
560
|
+
status: "completed" | "in_progress" | "pending";
|
|
561
|
+
activeForm?: string | undefined;
|
|
562
|
+
}[];
|
|
563
|
+
} | {
|
|
564
|
+
kind: "commands";
|
|
565
|
+
items: {
|
|
566
|
+
name: string;
|
|
567
|
+
description: string;
|
|
568
|
+
hint?: string | undefined;
|
|
569
|
+
}[];
|
|
570
|
+
} | {
|
|
571
|
+
kind: "usage";
|
|
572
|
+
account?: string | undefined;
|
|
573
|
+
costUsd?: number | undefined;
|
|
574
|
+
inputTokens?: number | undefined;
|
|
575
|
+
outputTokens?: number | undefined;
|
|
576
|
+
cacheReadTokens?: number | undefined;
|
|
577
|
+
cacheCreationTokens?: number | undefined;
|
|
578
|
+
durationMs?: number | undefined;
|
|
579
|
+
numTurns?: number | undefined;
|
|
580
|
+
} | {
|
|
581
|
+
status: "allowed" | "allowed_warning" | "rejected";
|
|
582
|
+
resetsAt?: number | undefined;
|
|
583
|
+
rateLimitType?: string | undefined;
|
|
584
|
+
utilization?: number | undefined;
|
|
585
|
+
kind: "rate_limit_info";
|
|
586
|
+
account?: string | undefined;
|
|
587
|
+
} | {
|
|
588
|
+
kind: "fast_mode";
|
|
589
|
+
state: "cooldown" | "off" | "on";
|
|
590
|
+
reason?: string | undefined;
|
|
591
|
+
} | {
|
|
592
|
+
kind: "tier";
|
|
593
|
+
tier: "fast" | "standard";
|
|
594
|
+
score: number;
|
|
595
|
+
rules: string[];
|
|
596
|
+
model?: string | undefined;
|
|
597
|
+
routed: boolean;
|
|
598
|
+
held?: boolean | undefined;
|
|
599
|
+
} | {
|
|
600
|
+
kind: "provider_retry";
|
|
601
|
+
attempt: number;
|
|
602
|
+
maxAttempts?: number | undefined;
|
|
603
|
+
nextAttemptAt?: number | undefined;
|
|
604
|
+
status?: number | undefined;
|
|
605
|
+
} | {
|
|
606
|
+
kind: "account_usage";
|
|
607
|
+
account?: string | undefined;
|
|
608
|
+
windows: {
|
|
609
|
+
kind: string;
|
|
610
|
+
label?: string | undefined;
|
|
611
|
+
utilization: number;
|
|
612
|
+
resetsAt?: number | undefined;
|
|
613
|
+
}[];
|
|
614
|
+
} | {
|
|
615
|
+
tokens: number;
|
|
616
|
+
contextWindow: number;
|
|
617
|
+
kind: "context_usage";
|
|
618
|
+
} | {
|
|
619
|
+
kind: "compact";
|
|
620
|
+
trigger: string;
|
|
621
|
+
preTokens?: number | undefined;
|
|
622
|
+
postTokens?: number | undefined;
|
|
623
|
+
} | {
|
|
624
|
+
kind: "plan";
|
|
625
|
+
requestId: string;
|
|
626
|
+
text: string;
|
|
627
|
+
document?: {
|
|
628
|
+
path: string;
|
|
629
|
+
title: string;
|
|
630
|
+
markdown: string;
|
|
631
|
+
truncated?: boolean | undefined;
|
|
632
|
+
plan?: boolean | undefined;
|
|
633
|
+
} | undefined;
|
|
634
|
+
} | {
|
|
635
|
+
kind: "question";
|
|
636
|
+
requestId: string;
|
|
637
|
+
questions: {
|
|
638
|
+
question: string;
|
|
639
|
+
header: string;
|
|
640
|
+
multiSelect: boolean;
|
|
641
|
+
options: {
|
|
642
|
+
label: string;
|
|
643
|
+
description: string;
|
|
644
|
+
preview?: string | undefined;
|
|
645
|
+
}[];
|
|
646
|
+
}[];
|
|
647
|
+
document?: {
|
|
648
|
+
path: string;
|
|
649
|
+
title: string;
|
|
650
|
+
markdown: string;
|
|
651
|
+
truncated?: boolean | undefined;
|
|
652
|
+
plan?: boolean | undefined;
|
|
653
|
+
} | undefined;
|
|
654
|
+
} | {
|
|
655
|
+
toolName: string;
|
|
656
|
+
title?: string | undefined;
|
|
657
|
+
displayName?: string | undefined;
|
|
658
|
+
description?: string | undefined;
|
|
659
|
+
reason?: string | undefined;
|
|
660
|
+
path?: string | undefined;
|
|
661
|
+
alwaysLabel?: string | undefined;
|
|
662
|
+
kind: "permission";
|
|
663
|
+
requestId: string;
|
|
664
|
+
} | {
|
|
665
|
+
kind: "browser_help";
|
|
666
|
+
requestId: string;
|
|
667
|
+
session: string;
|
|
668
|
+
account: string;
|
|
669
|
+
message: string;
|
|
670
|
+
} | {
|
|
671
|
+
kind: "terminal_help";
|
|
672
|
+
requestId: string;
|
|
673
|
+
session: string;
|
|
674
|
+
message: string;
|
|
675
|
+
} | {
|
|
676
|
+
kind: "service_offer";
|
|
677
|
+
requestId: string;
|
|
678
|
+
offer: {
|
|
679
|
+
slug: string;
|
|
680
|
+
name: string;
|
|
681
|
+
publisher: string;
|
|
682
|
+
description: string;
|
|
683
|
+
creditsPerRun: number;
|
|
684
|
+
probation?: boolean | undefined;
|
|
685
|
+
credits?: {
|
|
686
|
+
allowance: number;
|
|
687
|
+
remaining: number;
|
|
688
|
+
resetsAt: string;
|
|
689
|
+
} | undefined;
|
|
690
|
+
request: string;
|
|
691
|
+
why?: string | undefined;
|
|
692
|
+
};
|
|
693
|
+
} | {
|
|
694
|
+
kind: "service_event";
|
|
695
|
+
requestId: string;
|
|
696
|
+
event: {
|
|
697
|
+
event: "status";
|
|
698
|
+
text: string;
|
|
699
|
+
} | {
|
|
700
|
+
event: "result";
|
|
701
|
+
data: unknown;
|
|
702
|
+
};
|
|
703
|
+
} | {
|
|
704
|
+
kind: "service_receipt";
|
|
705
|
+
requestId: string;
|
|
706
|
+
outcome: "ok" | "refunded" | "refused";
|
|
707
|
+
credits: number;
|
|
708
|
+
remaining?: number | undefined;
|
|
709
|
+
} | {
|
|
710
|
+
kind: "capability_offer";
|
|
711
|
+
requestId: string;
|
|
712
|
+
offer: {
|
|
713
|
+
card: string;
|
|
714
|
+
name: string;
|
|
715
|
+
why?: string | undefined;
|
|
716
|
+
};
|
|
717
|
+
} | {
|
|
718
|
+
kind: "capability_outcome";
|
|
719
|
+
requestId: string;
|
|
720
|
+
outcome: "connected" | "unfinished";
|
|
721
|
+
id?: string | undefined;
|
|
722
|
+
} | {
|
|
723
|
+
kind: "payment_offer";
|
|
724
|
+
requestId: string;
|
|
725
|
+
offer: {
|
|
726
|
+
url: string;
|
|
727
|
+
description?: string | undefined;
|
|
728
|
+
payTo: string;
|
|
729
|
+
network: string;
|
|
730
|
+
asset: string;
|
|
731
|
+
assetName: string;
|
|
732
|
+
amountUsd: string;
|
|
733
|
+
spentTodayUsd: string;
|
|
734
|
+
dailyCapUsd: string;
|
|
735
|
+
why?: string | undefined;
|
|
736
|
+
};
|
|
737
|
+
} | {
|
|
738
|
+
kind: "payment_receipt";
|
|
739
|
+
requestId: string;
|
|
740
|
+
outcome: "failed" | "paid";
|
|
741
|
+
amountUsd: string;
|
|
742
|
+
transaction?: string | undefined;
|
|
743
|
+
network?: string | undefined;
|
|
744
|
+
} | {
|
|
745
|
+
kind: "resolved";
|
|
746
|
+
requestId: string;
|
|
747
|
+
reply?: {
|
|
748
|
+
kind: "plan";
|
|
749
|
+
requestId: string;
|
|
750
|
+
approve: boolean;
|
|
751
|
+
feedback?: string | undefined;
|
|
752
|
+
} | {
|
|
753
|
+
kind: "question";
|
|
754
|
+
requestId: string;
|
|
755
|
+
answers?: Record<string, string[]> | undefined;
|
|
756
|
+
cancelled?: boolean | undefined;
|
|
757
|
+
} | {
|
|
758
|
+
kind: "permission";
|
|
759
|
+
requestId: string;
|
|
760
|
+
decision: "always" | "deny" | "once";
|
|
761
|
+
feedback?: string | undefined;
|
|
762
|
+
} | {
|
|
763
|
+
kind: "browser_help";
|
|
764
|
+
requestId: string;
|
|
765
|
+
helped: boolean;
|
|
766
|
+
note?: string | undefined;
|
|
767
|
+
} | {
|
|
768
|
+
kind: "terminal_help";
|
|
769
|
+
requestId: string;
|
|
770
|
+
helped: boolean;
|
|
771
|
+
note?: string | undefined;
|
|
772
|
+
} | {
|
|
773
|
+
kind: "service_offer";
|
|
774
|
+
requestId: string;
|
|
775
|
+
approve: boolean;
|
|
776
|
+
} | {
|
|
777
|
+
kind: "capability_offer";
|
|
778
|
+
requestId: string;
|
|
779
|
+
connect: boolean;
|
|
780
|
+
} | {
|
|
781
|
+
kind: "payment_offer";
|
|
782
|
+
requestId: string;
|
|
783
|
+
approve: boolean;
|
|
784
|
+
} | undefined;
|
|
785
|
+
} | {
|
|
786
|
+
kind: "mode";
|
|
787
|
+
mode: "acceptEdits" | "bypassPermissions" | "default" | "plan";
|
|
788
|
+
} | {
|
|
789
|
+
kind: "error";
|
|
790
|
+
message: string;
|
|
791
|
+
code?: "agent-busy" | "claude-not-entitled" | "claude-reauth" | "claude-token-refused" | "codex-advisory" | "codex-model-invalid" | "codex-reauth" | "context-window-too-small" | "grok-model-invalid" | "provider-outage" | "rate_limit" | "sandbox-memory-low" | "session-not-found" | "subscription-required" | "trial-exhausted" | "trial-model-unavailable" | "trial-unavailable" | "unknown-command" | undefined;
|
|
792
|
+
resetsAt?: number | undefined;
|
|
793
|
+
autoResume?: "available" | "scheduled" | undefined;
|
|
794
|
+
outage?: {
|
|
795
|
+
retryAt: number;
|
|
796
|
+
attempt: number;
|
|
797
|
+
maxAttempts: number;
|
|
798
|
+
} | undefined;
|
|
799
|
+
} | {
|
|
800
|
+
kind: "done";
|
|
801
|
+
}, unknown, void>>, Record<never, never>, Record<never, never>>;
|
|
802
|
+
interrupt: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
803
|
+
conversationId: import("zod").ZodString;
|
|
804
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
805
|
+
ok: import("zod").ZodLiteral<true>;
|
|
806
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
807
|
+
ping: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, import("zod").ZodObject<{
|
|
808
|
+
ok: import("zod").ZodLiteral<true>;
|
|
809
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
810
|
+
};
|
|
811
|
+
//# sourceMappingURL=runner.contract.d.ts.map
|