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