@nyte-ai/schema 0.0.0-stage → 0.0.19

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 (148) hide show
  1. package/LICENSE +21 -0
  2. package/THIRD-PARTY-NOTICES.md +866 -0
  3. package/dist/chunks/browser-0byq2fja.js +50 -0
  4. package/dist/chunks/browser-0chm3654.js +125 -0
  5. package/dist/chunks/browser-0g0z3617.js +47 -0
  6. package/dist/chunks/browser-0khex2b1.js +33 -0
  7. package/dist/chunks/browser-0sbkxgkx.js +115 -0
  8. package/dist/chunks/browser-0xr6c36r.js +106 -0
  9. package/dist/chunks/browser-1nqahr9q.js +239 -0
  10. package/dist/chunks/browser-1sfp0bcx.js +73 -0
  11. package/dist/chunks/browser-3exd93gm.js +50 -0
  12. package/dist/chunks/browser-40enyw9r.js +75 -0
  13. package/dist/chunks/browser-4et7qtz3.js +7 -0
  14. package/dist/chunks/browser-6e1madxa.js +83 -0
  15. package/dist/chunks/browser-6yby604e.js +96 -0
  16. package/dist/chunks/browser-7195qf3t.js +14 -0
  17. package/dist/chunks/browser-8ancsy4m.js +118 -0
  18. package/dist/chunks/browser-9ystjh78.js +0 -0
  19. package/dist/chunks/browser-b519jtez.js +102 -0
  20. package/dist/chunks/browser-bg1esaw0.js +82 -0
  21. package/dist/chunks/browser-ebr6k189.js +120 -0
  22. package/dist/chunks/browser-ekbecx9r.js +73 -0
  23. package/dist/chunks/browser-fd3accdr.js +159 -0
  24. package/dist/chunks/browser-g5khdcap.js +170 -0
  25. package/dist/chunks/browser-h5k4hqfq.js +244 -0
  26. package/dist/chunks/browser-h86zs54a.js +65 -0
  27. package/dist/chunks/browser-hp9ze9ga.js +185 -0
  28. package/dist/chunks/browser-hq5q56sf.js +79 -0
  29. package/dist/chunks/browser-j150etqf.js +101 -0
  30. package/dist/chunks/browser-j629a6wa.js +17 -0
  31. package/dist/chunks/browser-jgxe05s4.js +301 -0
  32. package/dist/chunks/browser-k20f6cvv.js +0 -0
  33. package/dist/chunks/browser-m0wzr0g8.js +5 -0
  34. package/dist/chunks/browser-mzfc0v5j.js +58 -0
  35. package/dist/chunks/browser-p691tcac.js +139 -0
  36. package/dist/chunks/browser-pdv675va.js +135 -0
  37. package/dist/chunks/browser-pvfshqyk.js +36 -0
  38. package/dist/chunks/browser-qkxe0fwp.js +6 -0
  39. package/dist/chunks/browser-qncc807c.js +66 -0
  40. package/dist/chunks/browser-r87w64mz.js +32 -0
  41. package/dist/chunks/browser-s2xe7c21.js +82 -0
  42. package/dist/chunks/browser-sgst60b0.js +293 -0
  43. package/dist/chunks/browser-sgwxbek9.js +37 -0
  44. package/dist/chunks/browser-v70eq512.js +215 -0
  45. package/dist/chunks/browser-vzc3r2r3.js +64 -0
  46. package/dist/chunks/browser-xensz05x.js +172 -0
  47. package/dist/chunks/browser-ynj8v9ad.js +35 -0
  48. package/dist/chunks/browser-ypez6s7v.js +52 -0
  49. package/dist/src/browser.d.ts +64 -0
  50. package/dist/src/browser.js +26 -0
  51. package/dist/src/configuration.d.ts +26 -0
  52. package/dist/src/configuration.js +17 -0
  53. package/dist/src/connection.d.ts +189 -0
  54. package/dist/src/connection.js +35 -0
  55. package/dist/src/declaration.d.ts +12 -0
  56. package/dist/src/declaration.js +1 -0
  57. package/dist/src/errors.d.ts +56 -0
  58. package/dist/src/errors.js +23 -0
  59. package/dist/src/events.d.ts +1752 -0
  60. package/dist/src/events.js +36 -0
  61. package/dist/src/files.d.ts +130 -0
  62. package/dist/src/files.js +49 -0
  63. package/dist/src/git.d.ts +280 -0
  64. package/dist/src/git.js +66 -0
  65. package/dist/src/github.d.ts +174 -0
  66. package/dist/src/github.js +31 -0
  67. package/dist/src/heads.d.ts +255 -0
  68. package/dist/src/heads.js +48 -0
  69. package/dist/src/hooks.d.ts +201 -0
  70. package/dist/src/hooks.js +28 -0
  71. package/dist/src/host.d.ts +137 -0
  72. package/dist/src/host.js +49 -0
  73. package/dist/src/ids.d.ts +66 -0
  74. package/dist/src/ids.js +67 -0
  75. package/dist/src/index.d.ts +30 -0
  76. package/dist/src/index.js +783 -0
  77. package/dist/src/jobs.d.ts +152 -0
  78. package/dist/src/jobs.js +34 -0
  79. package/dist/src/json.d.ts +24 -0
  80. package/dist/src/json.js +21 -0
  81. package/dist/src/mcp.d.ts +212 -0
  82. package/dist/src/mcp.js +34 -0
  83. package/dist/src/messages.d.ts +114 -0
  84. package/dist/src/messages.js +28 -0
  85. package/dist/src/model/index.d.ts +6 -0
  86. package/dist/src/model/index.js +61 -0
  87. package/dist/src/model/message.d.ts +178 -0
  88. package/dist/src/model/message.js +7 -0
  89. package/dist/src/model/model.d.ts +154 -0
  90. package/dist/src/model/model.js +11 -0
  91. package/dist/src/model/text.d.ts +6 -0
  92. package/dist/src/model/text.js +10 -0
  93. package/dist/src/model/tool.d.ts +36 -0
  94. package/dist/src/model/tool.js +1 -0
  95. package/dist/src/model/transcript.d.ts +34 -0
  96. package/dist/src/model/transcript.js +37 -0
  97. package/dist/src/model/typed.d.ts +6 -0
  98. package/dist/src/model/typed.js +8 -0
  99. package/dist/src/models.d.ts +198 -0
  100. package/dist/src/models.js +47 -0
  101. package/dist/src/parts.d.ts +364 -0
  102. package/dist/src/parts.js +35 -0
  103. package/dist/src/patch.d.ts +21 -0
  104. package/dist/src/patch.js +11 -0
  105. package/dist/src/plugins.d.ts +36 -0
  106. package/dist/src/plugins.js +9 -0
  107. package/dist/src/primitives.d.ts +83 -0
  108. package/dist/src/primitives.js +26 -0
  109. package/dist/src/runs.d.ts +433 -0
  110. package/dist/src/runs.js +39 -0
  111. package/dist/src/schema.d.ts +14 -0
  112. package/dist/src/schema.js +8 -0
  113. package/dist/src/serial.d.ts +18 -0
  114. package/dist/src/serial.js +39 -0
  115. package/dist/src/sessions.d.ts +578 -0
  116. package/dist/src/sessions.js +74 -0
  117. package/dist/src/store.d.ts +830 -0
  118. package/dist/src/store.js +33 -0
  119. package/dist/src/tools.d.ts +76 -0
  120. package/dist/src/tools.js +24 -0
  121. package/dist/src/views.d.ts +3105 -0
  122. package/dist/src/views.js +50 -0
  123. package/dist/src/wire/base64.d.ts +2 -0
  124. package/dist/src/wire/base64.js +6 -0
  125. package/dist/src/wire/nullable.d.ts +2 -0
  126. package/dist/src/wire/nullable.js +6 -0
  127. package/dist/src/wire/operations/browser.d.ts +535 -0
  128. package/dist/src/wire/operations/browser.js +12 -0
  129. package/dist/src/wire/operations/fields.d.ts +54 -0
  130. package/dist/src/wire/operations/fields.js +30 -0
  131. package/dist/src/wire/operations/files.d.ts +244 -0
  132. package/dist/src/wire/operations/files.js +13 -0
  133. package/dist/src/wire/operations/git.d.ts +513 -0
  134. package/dist/src/wire/operations/git.js +15 -0
  135. package/dist/src/wire/operations/github.d.ts +172 -0
  136. package/dist/src/wire/operations/github.js +12 -0
  137. package/dist/src/wire/operations/host.d.ts +1031 -0
  138. package/dist/src/wire/operations/host.js +27 -0
  139. package/dist/src/wire/operations/index.d.ts +7103 -0
  140. package/dist/src/wire/operations/index.js +40 -0
  141. package/dist/src/wire/operations/session.d.ts +3779 -0
  142. package/dist/src/wire/operations/session.js +25 -0
  143. package/dist/src/wire/operations/workspace.d.ts +842 -0
  144. package/dist/src/wire/operations/workspace.js +24 -0
  145. package/dist/src/workspaces.d.ts +119 -0
  146. package/dist/src/workspaces.js +38 -0
  147. package/package.json +51 -3
  148. package/README.md +0 -3
@@ -0,0 +1,3105 @@
1
+ import { Type } from "typebox";
2
+ import type { Decoded, Schema } from "./schema.ts";
3
+ export declare const ViewOptionsType: Type.TObject<{
4
+ tail: Type.TOptional<Type.TNumber>;
5
+ }>;
6
+ export type ViewOptions = Decoded<typeof ViewOptionsType>;
7
+ export declare const UserStatusType: Type.TUnion<[Type.TObject<{
8
+ kind: Type.TLiteral<"unsent">;
9
+ attempts: Type.TNumber;
10
+ retrying: Type.TUnion<[Type.TObject<{
11
+ at: Type.TNumber;
12
+ reason: Type.TString;
13
+ }>, Type.TNull]>;
14
+ }>, Type.TObject<{
15
+ kind: Type.TLiteral<"pending">;
16
+ schedule: Type.TUnion<[Type.TObject<{
17
+ kind: Type.TLiteral<"joined">;
18
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
19
+ }>, Type.TObject<{
20
+ kind: Type.TLiteral<"next-turn">;
21
+ reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
22
+ }>, Type.TObject<{
23
+ kind: Type.TLiteral<"attached">;
24
+ }>, Type.TObject<{
25
+ kind: Type.TLiteral<"deciding">;
26
+ }>]>;
27
+ covered: Type.TBoolean;
28
+ }>, Type.TObject<{
29
+ kind: Type.TLiteral<"landed">;
30
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
31
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
32
+ replaced: Type.TUnion<[Type.TObject<{
33
+ previous: Type.TUnsafe<import("./ids.ts").Id<"message">>;
34
+ stopped: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
35
+ }>, Type.TNull]>;
36
+ }>]>;
37
+ export type UserStatus = Decoded<typeof UserStatusType>;
38
+ export declare const MessageType: Type.TUnion<[Type.TObject<{
39
+ kind: Type.TLiteral<"user">;
40
+ content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
41
+ kind: Type.TLiteral<"text">;
42
+ text: Type.TString;
43
+ }>, Type.TObject<{
44
+ kind: Type.TLiteral<"file">;
45
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
46
+ mime: Type.TString;
47
+ name: Type.TString;
48
+ }>, Type.TObject<{
49
+ kind: Type.TLiteral<"reference">;
50
+ path: Type.TString;
51
+ blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
52
+ }>, Type.TObject<{
53
+ kind: Type.TLiteral<"skill">;
54
+ name: Type.TString;
55
+ location: Type.TString;
56
+ }>, Type.TObject<{
57
+ kind: Type.TLiteral<"excerpt">;
58
+ source: Type.TUnion<[Type.TObject<{
59
+ kind: Type.TLiteral<"diff">;
60
+ path: Type.TString;
61
+ side: Type.TEnum<["old", "new"]>;
62
+ start: Type.TNumber;
63
+ end: Type.TNumber;
64
+ }>, Type.TObject<{
65
+ kind: Type.TLiteral<"terminal">;
66
+ command: Type.TOptional<Type.TString>;
67
+ }>, Type.TObject<{
68
+ kind: Type.TLiteral<"browser">;
69
+ url: Type.TString;
70
+ selector: Type.TString;
71
+ }>]>;
72
+ text: Type.TString;
73
+ }>]>>]>;
74
+ source: Type.TUnion<[Type.TObject<{
75
+ kind: Type.TLiteral<"user">;
76
+ }>, Type.TObject<{
77
+ kind: Type.TLiteral<"child">;
78
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
79
+ end: Type.TEnum<["completed", "stopped", "failed"]>;
80
+ }>, Type.TObject<{
81
+ kind: Type.TLiteral<"job">;
82
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
83
+ }>, Type.TObject<{
84
+ kind: Type.TLiteral<"shell">;
85
+ }>, Type.TObject<{
86
+ kind: Type.TLiteral<"action">;
87
+ label: Type.TString;
88
+ command: Type.TOptional<Type.TString>;
89
+ }>]>;
90
+ delivery: Type.TEnum<["steer", "queue", "attach"]>;
91
+ status: Type.TUnion<[Type.TObject<{
92
+ kind: Type.TLiteral<"unsent">;
93
+ attempts: Type.TNumber;
94
+ retrying: Type.TUnion<[Type.TObject<{
95
+ at: Type.TNumber;
96
+ reason: Type.TString;
97
+ }>, Type.TNull]>;
98
+ }>, Type.TObject<{
99
+ kind: Type.TLiteral<"pending">;
100
+ schedule: Type.TUnion<[Type.TObject<{
101
+ kind: Type.TLiteral<"joined">;
102
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
103
+ }>, Type.TObject<{
104
+ kind: Type.TLiteral<"next-turn">;
105
+ reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
106
+ }>, Type.TObject<{
107
+ kind: Type.TLiteral<"attached">;
108
+ }>, Type.TObject<{
109
+ kind: Type.TLiteral<"deciding">;
110
+ }>]>;
111
+ covered: Type.TBoolean;
112
+ }>, Type.TObject<{
113
+ kind: Type.TLiteral<"landed">;
114
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
115
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
116
+ replaced: Type.TUnion<[Type.TObject<{
117
+ previous: Type.TUnsafe<import("./ids.ts").Id<"message">>;
118
+ stopped: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
119
+ }>, Type.TNull]>;
120
+ }>]>;
121
+ siblings: Type.TObject<{
122
+ index: Type.TNumber;
123
+ count: Type.TNumber;
124
+ ids: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
125
+ }>;
126
+ id: Type.TUnsafe<import("./ids.ts").Id<"message">>;
127
+ turn: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
128
+ at: Type.TNumber;
129
+ }>, Type.TObject<{
130
+ kind: Type.TLiteral<"part">;
131
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
132
+ partKind: Type.TString;
133
+ role: Type.TEnum<["step", "answer", "note"]>;
134
+ state: Type.TUnknown;
135
+ version: Type.TNumber;
136
+ status: Type.TUnion<[Type.TObject<{
137
+ kind: Type.TLiteral<"live">;
138
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
139
+ waiting: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"call">>>;
140
+ answer: Type.TOptional<Type.TObject<{
141
+ action: Type.TString;
142
+ input: Type.TUnsafe<import("./json.ts").Json>;
143
+ }>>;
144
+ }>, Type.TObject<{
145
+ kind: Type.TLiteral<"waiting">;
146
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
147
+ on: Type.TUnion<[Type.TObject<{
148
+ kind: Type.TLiteral<"run">;
149
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
150
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
151
+ deadline: Type.TOptional<Type.TNumber>;
152
+ }>, Type.TObject<{
153
+ kind: Type.TLiteral<"job">;
154
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
155
+ deadline: Type.TOptional<Type.TNumber>;
156
+ }>, Type.TObject<{
157
+ kind: Type.TLiteral<"part">;
158
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
159
+ deadline: Type.TOptional<Type.TNumber>;
160
+ }>, Type.TObject<{
161
+ kind: Type.TLiteral<"timer">;
162
+ until: Type.TNumber;
163
+ deadline: Type.TOptional<Type.TNumber>;
164
+ }>]>;
165
+ }>, Type.TObject<{
166
+ kind: Type.TLiteral<"settled">;
167
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
168
+ endedAt: Type.TNumber;
169
+ }>, Type.TObject<{
170
+ kind: Type.TLiteral<"failed">;
171
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
172
+ failure: Type.TObject<{
173
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
174
+ message: Type.TString;
175
+ retryAfterMs: Type.TOptional<Type.TNumber>;
176
+ }>;
177
+ }>]>;
178
+ id: Type.TUnsafe<import("./ids.ts").Id<"message">>;
179
+ turn: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
180
+ at: Type.TNumber;
181
+ }>]>;
182
+ export type Message = Decoded<typeof MessageType>;
183
+ export declare const TurnInfoType: Type.TObject<{
184
+ id: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
185
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
186
+ prompt: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"message">>, Type.TNull]>;
187
+ state: Type.TUnion<[Type.TObject<{
188
+ kind: Type.TLiteral<"working">;
189
+ activity: Type.TUnion<[Type.TString, Type.TNull]>;
190
+ }>, Type.TObject<{
191
+ kind: Type.TLiteral<"waiting">;
192
+ on: Type.TUnion<[Type.TObject<{
193
+ kind: Type.TLiteral<"run">;
194
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
195
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
196
+ deadline: Type.TOptional<Type.TNumber>;
197
+ }>, Type.TObject<{
198
+ kind: Type.TLiteral<"job">;
199
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
200
+ deadline: Type.TOptional<Type.TNumber>;
201
+ }>, Type.TObject<{
202
+ kind: Type.TLiteral<"part">;
203
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
204
+ deadline: Type.TOptional<Type.TNumber>;
205
+ }>, Type.TObject<{
206
+ kind: Type.TLiteral<"timer">;
207
+ until: Type.TNumber;
208
+ deadline: Type.TOptional<Type.TNumber>;
209
+ }>]>;
210
+ }>, Type.TObject<{
211
+ kind: Type.TLiteral<"ended">;
212
+ end: Type.TUnion<[Type.TObject<{
213
+ kind: Type.TLiteral<"completed">;
214
+ usage: Type.TObject<{
215
+ input: Type.TNumber;
216
+ output: Type.TNumber;
217
+ cacheRead: Type.TNumber;
218
+ cacheWrite: Type.TNumber;
219
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
220
+ total: Type.TNumber;
221
+ cost: Type.TObject<{
222
+ input: Type.TNumber;
223
+ output: Type.TNumber;
224
+ cacheRead: Type.TNumber;
225
+ cacheWrite: Type.TNumber;
226
+ total: Type.TNumber;
227
+ }>;
228
+ }>;
229
+ }>, Type.TObject<{
230
+ kind: Type.TLiteral<"stopped">;
231
+ }>, Type.TObject<{
232
+ kind: Type.TLiteral<"failed">;
233
+ failure: Type.TObject<{
234
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
235
+ message: Type.TString;
236
+ retryAfterMs: Type.TOptional<Type.TNumber>;
237
+ }>;
238
+ }>]>;
239
+ }>]>;
240
+ startedAt: Type.TNumber;
241
+ endedAt: Type.TUnion<[Type.TNumber, Type.TNull]>;
242
+ steps: Type.TNumber;
243
+ thinkingOnly: Type.TBoolean;
244
+ summary: Type.TObject<{
245
+ byClass: Type.TObject<{
246
+ read: Type.TObject<{
247
+ count: Type.TNumber;
248
+ paths: Type.TArray<Type.TString>;
249
+ }>;
250
+ list: Type.TObject<{
251
+ count: Type.TNumber;
252
+ paths: Type.TArray<Type.TString>;
253
+ }>;
254
+ edit: Type.TObject<{
255
+ count: Type.TNumber;
256
+ paths: Type.TArray<Type.TString>;
257
+ }>;
258
+ shell: Type.TObject<{
259
+ count: Type.TNumber;
260
+ paths: Type.TArray<Type.TString>;
261
+ }>;
262
+ delegate: Type.TObject<{
263
+ count: Type.TNumber;
264
+ paths: Type.TArray<Type.TString>;
265
+ }>;
266
+ custom: Type.TObject<{
267
+ count: Type.TNumber;
268
+ paths: Type.TArray<Type.TString>;
269
+ }>;
270
+ }>;
271
+ failed: Type.TNumber;
272
+ stopped: Type.TNumber;
273
+ added: Type.TNumber;
274
+ removed: Type.TNumber;
275
+ }>;
276
+ }>;
277
+ export type TurnInfo = Decoded<typeof TurnInfoType>;
278
+ export declare const SessionViewType: Type.TObject<{
279
+ revision: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"revision">>, Type.TNull]>;
280
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
281
+ activation: Type.TUnion<[Type.TObject<{
282
+ kind: Type.TLiteral<"active">;
283
+ }>, Type.TObject<{
284
+ kind: Type.TLiteral<"inactive">;
285
+ }>, Type.TObject<{
286
+ kind: Type.TLiteral<"unavailable">;
287
+ reason: Type.TEnum<["unsupported", "unreachable"]>;
288
+ workspace: Type.TUnsafe<import("./ids.ts").Id<"workspace">>;
289
+ }>, Type.TObject<{
290
+ kind: Type.TLiteral<"failed">;
291
+ message: Type.TString;
292
+ }>]>;
293
+ messages: Type.TArray<Type.TUnion<[Type.TObject<{
294
+ kind: Type.TLiteral<"user">;
295
+ content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
296
+ kind: Type.TLiteral<"text">;
297
+ text: Type.TString;
298
+ }>, Type.TObject<{
299
+ kind: Type.TLiteral<"file">;
300
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
301
+ mime: Type.TString;
302
+ name: Type.TString;
303
+ }>, Type.TObject<{
304
+ kind: Type.TLiteral<"reference">;
305
+ path: Type.TString;
306
+ blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
307
+ }>, Type.TObject<{
308
+ kind: Type.TLiteral<"skill">;
309
+ name: Type.TString;
310
+ location: Type.TString;
311
+ }>, Type.TObject<{
312
+ kind: Type.TLiteral<"excerpt">;
313
+ source: Type.TUnion<[Type.TObject<{
314
+ kind: Type.TLiteral<"diff">;
315
+ path: Type.TString;
316
+ side: Type.TEnum<["old", "new"]>;
317
+ start: Type.TNumber;
318
+ end: Type.TNumber;
319
+ }>, Type.TObject<{
320
+ kind: Type.TLiteral<"terminal">;
321
+ command: Type.TOptional<Type.TString>;
322
+ }>, Type.TObject<{
323
+ kind: Type.TLiteral<"browser">;
324
+ url: Type.TString;
325
+ selector: Type.TString;
326
+ }>]>;
327
+ text: Type.TString;
328
+ }>]>>]>;
329
+ source: Type.TUnion<[Type.TObject<{
330
+ kind: Type.TLiteral<"user">;
331
+ }>, Type.TObject<{
332
+ kind: Type.TLiteral<"child">;
333
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
334
+ end: Type.TEnum<["completed", "stopped", "failed"]>;
335
+ }>, Type.TObject<{
336
+ kind: Type.TLiteral<"job">;
337
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
338
+ }>, Type.TObject<{
339
+ kind: Type.TLiteral<"shell">;
340
+ }>, Type.TObject<{
341
+ kind: Type.TLiteral<"action">;
342
+ label: Type.TString;
343
+ command: Type.TOptional<Type.TString>;
344
+ }>]>;
345
+ delivery: Type.TEnum<["steer", "queue", "attach"]>;
346
+ status: Type.TUnion<[Type.TObject<{
347
+ kind: Type.TLiteral<"unsent">;
348
+ attempts: Type.TNumber;
349
+ retrying: Type.TUnion<[Type.TObject<{
350
+ at: Type.TNumber;
351
+ reason: Type.TString;
352
+ }>, Type.TNull]>;
353
+ }>, Type.TObject<{
354
+ kind: Type.TLiteral<"pending">;
355
+ schedule: Type.TUnion<[Type.TObject<{
356
+ kind: Type.TLiteral<"joined">;
357
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
358
+ }>, Type.TObject<{
359
+ kind: Type.TLiteral<"next-turn">;
360
+ reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
361
+ }>, Type.TObject<{
362
+ kind: Type.TLiteral<"attached">;
363
+ }>, Type.TObject<{
364
+ kind: Type.TLiteral<"deciding">;
365
+ }>]>;
366
+ covered: Type.TBoolean;
367
+ }>, Type.TObject<{
368
+ kind: Type.TLiteral<"landed">;
369
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
370
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
371
+ replaced: Type.TUnion<[Type.TObject<{
372
+ previous: Type.TUnsafe<import("./ids.ts").Id<"message">>;
373
+ stopped: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
374
+ }>, Type.TNull]>;
375
+ }>]>;
376
+ siblings: Type.TObject<{
377
+ index: Type.TNumber;
378
+ count: Type.TNumber;
379
+ ids: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
380
+ }>;
381
+ id: Type.TUnsafe<import("./ids.ts").Id<"message">>;
382
+ turn: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
383
+ at: Type.TNumber;
384
+ }>, Type.TObject<{
385
+ kind: Type.TLiteral<"part">;
386
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
387
+ partKind: Type.TString;
388
+ role: Type.TEnum<["step", "answer", "note"]>;
389
+ state: Type.TUnknown;
390
+ version: Type.TNumber;
391
+ status: Type.TUnion<[Type.TObject<{
392
+ kind: Type.TLiteral<"live">;
393
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
394
+ waiting: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"call">>>;
395
+ answer: Type.TOptional<Type.TObject<{
396
+ action: Type.TString;
397
+ input: Type.TUnsafe<import("./json.ts").Json>;
398
+ }>>;
399
+ }>, Type.TObject<{
400
+ kind: Type.TLiteral<"waiting">;
401
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
402
+ on: Type.TUnion<[Type.TObject<{
403
+ kind: Type.TLiteral<"run">;
404
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
405
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
406
+ deadline: Type.TOptional<Type.TNumber>;
407
+ }>, Type.TObject<{
408
+ kind: Type.TLiteral<"job">;
409
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
410
+ deadline: Type.TOptional<Type.TNumber>;
411
+ }>, Type.TObject<{
412
+ kind: Type.TLiteral<"part">;
413
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
414
+ deadline: Type.TOptional<Type.TNumber>;
415
+ }>, Type.TObject<{
416
+ kind: Type.TLiteral<"timer">;
417
+ until: Type.TNumber;
418
+ deadline: Type.TOptional<Type.TNumber>;
419
+ }>]>;
420
+ }>, Type.TObject<{
421
+ kind: Type.TLiteral<"settled">;
422
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
423
+ endedAt: Type.TNumber;
424
+ }>, Type.TObject<{
425
+ kind: Type.TLiteral<"failed">;
426
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
427
+ failure: Type.TObject<{
428
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
429
+ message: Type.TString;
430
+ retryAfterMs: Type.TOptional<Type.TNumber>;
431
+ }>;
432
+ }>]>;
433
+ id: Type.TUnsafe<import("./ids.ts").Id<"message">>;
434
+ turn: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
435
+ at: Type.TNumber;
436
+ }>]>>;
437
+ leadingPrompt: Type.TUnion<[Type.TObject<{
438
+ kind: Type.TLiteral<"user">;
439
+ content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
440
+ kind: Type.TLiteral<"text">;
441
+ text: Type.TString;
442
+ }>, Type.TObject<{
443
+ kind: Type.TLiteral<"file">;
444
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
445
+ mime: Type.TString;
446
+ name: Type.TString;
447
+ }>, Type.TObject<{
448
+ kind: Type.TLiteral<"reference">;
449
+ path: Type.TString;
450
+ blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
451
+ }>, Type.TObject<{
452
+ kind: Type.TLiteral<"skill">;
453
+ name: Type.TString;
454
+ location: Type.TString;
455
+ }>, Type.TObject<{
456
+ kind: Type.TLiteral<"excerpt">;
457
+ source: Type.TUnion<[Type.TObject<{
458
+ kind: Type.TLiteral<"diff">;
459
+ path: Type.TString;
460
+ side: Type.TEnum<["old", "new"]>;
461
+ start: Type.TNumber;
462
+ end: Type.TNumber;
463
+ }>, Type.TObject<{
464
+ kind: Type.TLiteral<"terminal">;
465
+ command: Type.TOptional<Type.TString>;
466
+ }>, Type.TObject<{
467
+ kind: Type.TLiteral<"browser">;
468
+ url: Type.TString;
469
+ selector: Type.TString;
470
+ }>]>;
471
+ text: Type.TString;
472
+ }>]>>]>;
473
+ source: Type.TUnion<[Type.TObject<{
474
+ kind: Type.TLiteral<"user">;
475
+ }>, Type.TObject<{
476
+ kind: Type.TLiteral<"child">;
477
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
478
+ end: Type.TEnum<["completed", "stopped", "failed"]>;
479
+ }>, Type.TObject<{
480
+ kind: Type.TLiteral<"job">;
481
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
482
+ }>, Type.TObject<{
483
+ kind: Type.TLiteral<"shell">;
484
+ }>, Type.TObject<{
485
+ kind: Type.TLiteral<"action">;
486
+ label: Type.TString;
487
+ command: Type.TOptional<Type.TString>;
488
+ }>]>;
489
+ delivery: Type.TEnum<["steer", "queue", "attach"]>;
490
+ status: Type.TUnion<[Type.TObject<{
491
+ kind: Type.TLiteral<"unsent">;
492
+ attempts: Type.TNumber;
493
+ retrying: Type.TUnion<[Type.TObject<{
494
+ at: Type.TNumber;
495
+ reason: Type.TString;
496
+ }>, Type.TNull]>;
497
+ }>, Type.TObject<{
498
+ kind: Type.TLiteral<"pending">;
499
+ schedule: Type.TUnion<[Type.TObject<{
500
+ kind: Type.TLiteral<"joined">;
501
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
502
+ }>, Type.TObject<{
503
+ kind: Type.TLiteral<"next-turn">;
504
+ reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
505
+ }>, Type.TObject<{
506
+ kind: Type.TLiteral<"attached">;
507
+ }>, Type.TObject<{
508
+ kind: Type.TLiteral<"deciding">;
509
+ }>]>;
510
+ covered: Type.TBoolean;
511
+ }>, Type.TObject<{
512
+ kind: Type.TLiteral<"landed">;
513
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
514
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
515
+ replaced: Type.TUnion<[Type.TObject<{
516
+ previous: Type.TUnsafe<import("./ids.ts").Id<"message">>;
517
+ stopped: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
518
+ }>, Type.TNull]>;
519
+ }>]>;
520
+ siblings: Type.TObject<{
521
+ index: Type.TNumber;
522
+ count: Type.TNumber;
523
+ ids: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
524
+ }>;
525
+ id: Type.TUnsafe<import("./ids.ts").Id<"message">>;
526
+ turn: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
527
+ at: Type.TNumber;
528
+ }>, Type.TNull]>;
529
+ parts: Type.TArray<Type.TObject<{
530
+ id: Type.TUnsafe<import("./ids.ts").Id<"part">>;
531
+ partKind: Type.TString;
532
+ placement: Type.TUnion<[Type.TObject<{
533
+ kind: Type.TLiteral<"transcript">;
534
+ role: Type.TEnum<["step", "answer", "note"]>;
535
+ }>, Type.TObject<{
536
+ kind: Type.TLiteral<"modal">;
537
+ }>, Type.TIntersect<[Type.TObject<{
538
+ kind: Type.TString;
539
+ }>, Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>]>]>;
540
+ state: Type.TUnsafe<import("./json.ts").Json>;
541
+ version: Type.TNumber;
542
+ status: Type.TUnion<[Type.TObject<{
543
+ kind: Type.TLiteral<"live">;
544
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
545
+ waiting: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"call">>>;
546
+ answer: Type.TOptional<Type.TObject<{
547
+ action: Type.TString;
548
+ input: Type.TUnsafe<import("./json.ts").Json>;
549
+ }>>;
550
+ }>, Type.TObject<{
551
+ kind: Type.TLiteral<"waiting">;
552
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
553
+ on: Type.TUnion<[Type.TObject<{
554
+ kind: Type.TLiteral<"run">;
555
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
556
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
557
+ deadline: Type.TOptional<Type.TNumber>;
558
+ }>, Type.TObject<{
559
+ kind: Type.TLiteral<"job">;
560
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
561
+ deadline: Type.TOptional<Type.TNumber>;
562
+ }>, Type.TObject<{
563
+ kind: Type.TLiteral<"part">;
564
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
565
+ deadline: Type.TOptional<Type.TNumber>;
566
+ }>, Type.TObject<{
567
+ kind: Type.TLiteral<"timer">;
568
+ until: Type.TNumber;
569
+ deadline: Type.TOptional<Type.TNumber>;
570
+ }>]>;
571
+ }>, Type.TObject<{
572
+ kind: Type.TLiteral<"settled">;
573
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
574
+ endedAt: Type.TNumber;
575
+ }>, Type.TObject<{
576
+ kind: Type.TLiteral<"failed">;
577
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
578
+ failure: Type.TObject<{
579
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
580
+ message: Type.TString;
581
+ retryAfterMs: Type.TOptional<Type.TNumber>;
582
+ }>;
583
+ }>]>;
584
+ owner: Type.TUnion<[Type.TString, Type.TNull]>;
585
+ }>>;
586
+ turns: Type.TArray<Type.TObject<{
587
+ id: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
588
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
589
+ prompt: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"message">>, Type.TNull]>;
590
+ state: Type.TUnion<[Type.TObject<{
591
+ kind: Type.TLiteral<"working">;
592
+ activity: Type.TUnion<[Type.TString, Type.TNull]>;
593
+ }>, Type.TObject<{
594
+ kind: Type.TLiteral<"waiting">;
595
+ on: Type.TUnion<[Type.TObject<{
596
+ kind: Type.TLiteral<"run">;
597
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
598
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
599
+ deadline: Type.TOptional<Type.TNumber>;
600
+ }>, Type.TObject<{
601
+ kind: Type.TLiteral<"job">;
602
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
603
+ deadline: Type.TOptional<Type.TNumber>;
604
+ }>, Type.TObject<{
605
+ kind: Type.TLiteral<"part">;
606
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
607
+ deadline: Type.TOptional<Type.TNumber>;
608
+ }>, Type.TObject<{
609
+ kind: Type.TLiteral<"timer">;
610
+ until: Type.TNumber;
611
+ deadline: Type.TOptional<Type.TNumber>;
612
+ }>]>;
613
+ }>, Type.TObject<{
614
+ kind: Type.TLiteral<"ended">;
615
+ end: Type.TUnion<[Type.TObject<{
616
+ kind: Type.TLiteral<"completed">;
617
+ usage: Type.TObject<{
618
+ input: Type.TNumber;
619
+ output: Type.TNumber;
620
+ cacheRead: Type.TNumber;
621
+ cacheWrite: Type.TNumber;
622
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
623
+ total: Type.TNumber;
624
+ cost: Type.TObject<{
625
+ input: Type.TNumber;
626
+ output: Type.TNumber;
627
+ cacheRead: Type.TNumber;
628
+ cacheWrite: Type.TNumber;
629
+ total: Type.TNumber;
630
+ }>;
631
+ }>;
632
+ }>, Type.TObject<{
633
+ kind: Type.TLiteral<"stopped">;
634
+ }>, Type.TObject<{
635
+ kind: Type.TLiteral<"failed">;
636
+ failure: Type.TObject<{
637
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
638
+ message: Type.TString;
639
+ retryAfterMs: Type.TOptional<Type.TNumber>;
640
+ }>;
641
+ }>]>;
642
+ }>]>;
643
+ startedAt: Type.TNumber;
644
+ endedAt: Type.TUnion<[Type.TNumber, Type.TNull]>;
645
+ steps: Type.TNumber;
646
+ thinkingOnly: Type.TBoolean;
647
+ summary: Type.TObject<{
648
+ byClass: Type.TObject<{
649
+ read: Type.TObject<{
650
+ count: Type.TNumber;
651
+ paths: Type.TArray<Type.TString>;
652
+ }>;
653
+ list: Type.TObject<{
654
+ count: Type.TNumber;
655
+ paths: Type.TArray<Type.TString>;
656
+ }>;
657
+ edit: Type.TObject<{
658
+ count: Type.TNumber;
659
+ paths: Type.TArray<Type.TString>;
660
+ }>;
661
+ shell: Type.TObject<{
662
+ count: Type.TNumber;
663
+ paths: Type.TArray<Type.TString>;
664
+ }>;
665
+ delegate: Type.TObject<{
666
+ count: Type.TNumber;
667
+ paths: Type.TArray<Type.TString>;
668
+ }>;
669
+ custom: Type.TObject<{
670
+ count: Type.TNumber;
671
+ paths: Type.TArray<Type.TString>;
672
+ }>;
673
+ }>;
674
+ failed: Type.TNumber;
675
+ stopped: Type.TNumber;
676
+ added: Type.TNumber;
677
+ removed: Type.TNumber;
678
+ }>;
679
+ }>>;
680
+ usage: Type.TObject<{
681
+ input: Type.TNumber;
682
+ output: Type.TNumber;
683
+ cacheRead: Type.TNumber;
684
+ cacheWrite: Type.TNumber;
685
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
686
+ total: Type.TNumber;
687
+ cost: Type.TObject<{
688
+ input: Type.TNumber;
689
+ output: Type.TNumber;
690
+ cacheRead: Type.TNumber;
691
+ cacheWrite: Type.TNumber;
692
+ total: Type.TNumber;
693
+ }>;
694
+ }>;
695
+ execution: Type.TUnion<[Type.TObject<{
696
+ kind: Type.TLiteral<"idle">;
697
+ lastRun: Type.TUnion<[Type.TObject<{
698
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
699
+ end: Type.TUnion<[Type.TObject<{
700
+ kind: Type.TLiteral<"completed">;
701
+ usage: Type.TObject<{
702
+ input: Type.TNumber;
703
+ output: Type.TNumber;
704
+ cacheRead: Type.TNumber;
705
+ cacheWrite: Type.TNumber;
706
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
707
+ total: Type.TNumber;
708
+ cost: Type.TObject<{
709
+ input: Type.TNumber;
710
+ output: Type.TNumber;
711
+ cacheRead: Type.TNumber;
712
+ cacheWrite: Type.TNumber;
713
+ total: Type.TNumber;
714
+ }>;
715
+ }>;
716
+ }>, Type.TObject<{
717
+ kind: Type.TLiteral<"stopped">;
718
+ }>, Type.TObject<{
719
+ kind: Type.TLiteral<"failed">;
720
+ failure: Type.TObject<{
721
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
722
+ message: Type.TString;
723
+ retryAfterMs: Type.TOptional<Type.TNumber>;
724
+ }>;
725
+ }>]>;
726
+ endedAt: Type.TNumber;
727
+ }>, Type.TNull]>;
728
+ }>, Type.TObject<{
729
+ kind: Type.TLiteral<"live">;
730
+ run: Type.TObject<{
731
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
732
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
733
+ startedAt: Type.TNumber;
734
+ attempt: Type.TNumber;
735
+ configuration: Type.TObject<{
736
+ kind: Type.TLiteral<"exact">;
737
+ model: Type.TObject<{
738
+ provider: Type.TString;
739
+ id: Type.TString;
740
+ }>;
741
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
742
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
743
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
744
+ settingsVersion: Type.TString;
745
+ }>;
746
+ origin: Type.TUnion<[Type.TObject<{
747
+ kind: Type.TLiteral<"input">;
748
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
749
+ }>, Type.TObject<{
750
+ kind: Type.TLiteral<"continuation">;
751
+ from: Type.TEnum<["child", "job", "wake"]>;
752
+ }>]>;
753
+ }>;
754
+ phase: Type.TEnum<["responding", "executing"]>;
755
+ stopping: Type.TBoolean;
756
+ }>, Type.TObject<{
757
+ kind: Type.TLiteral<"waiting">;
758
+ run: Type.TObject<{
759
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
760
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
761
+ startedAt: Type.TNumber;
762
+ attempt: Type.TNumber;
763
+ configuration: Type.TObject<{
764
+ kind: Type.TLiteral<"exact">;
765
+ model: Type.TObject<{
766
+ provider: Type.TString;
767
+ id: Type.TString;
768
+ }>;
769
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
770
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
771
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
772
+ settingsVersion: Type.TString;
773
+ }>;
774
+ origin: Type.TUnion<[Type.TObject<{
775
+ kind: Type.TLiteral<"input">;
776
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
777
+ }>, Type.TObject<{
778
+ kind: Type.TLiteral<"continuation">;
779
+ from: Type.TEnum<["child", "job", "wake"]>;
780
+ }>]>;
781
+ }>;
782
+ on: Type.TUnion<[Type.TObject<{
783
+ kind: Type.TLiteral<"run">;
784
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
785
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
786
+ deadline: Type.TOptional<Type.TNumber>;
787
+ }>, Type.TObject<{
788
+ kind: Type.TLiteral<"job">;
789
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
790
+ deadline: Type.TOptional<Type.TNumber>;
791
+ }>, Type.TObject<{
792
+ kind: Type.TLiteral<"part">;
793
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
794
+ deadline: Type.TOptional<Type.TNumber>;
795
+ }>, Type.TObject<{
796
+ kind: Type.TLiteral<"timer">;
797
+ until: Type.TNumber;
798
+ deadline: Type.TOptional<Type.TNumber>;
799
+ }>]>;
800
+ }>, Type.TObject<{
801
+ kind: Type.TLiteral<"retrying">;
802
+ run: Type.TObject<{
803
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
804
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
805
+ startedAt: Type.TNumber;
806
+ attempt: Type.TNumber;
807
+ configuration: Type.TObject<{
808
+ kind: Type.TLiteral<"exact">;
809
+ model: Type.TObject<{
810
+ provider: Type.TString;
811
+ id: Type.TString;
812
+ }>;
813
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
814
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
815
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
816
+ settingsVersion: Type.TString;
817
+ }>;
818
+ origin: Type.TUnion<[Type.TObject<{
819
+ kind: Type.TLiteral<"input">;
820
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
821
+ }>, Type.TObject<{
822
+ kind: Type.TLiteral<"continuation">;
823
+ from: Type.TEnum<["child", "job", "wake"]>;
824
+ }>]>;
825
+ }>;
826
+ until: Type.TNumber;
827
+ reason: Type.TString;
828
+ }>]>;
829
+ background: Type.TArray<Type.TObject<{
830
+ kind: Type.TEnum<["child", "job", "page"]>;
831
+ id: Type.TString;
832
+ title: Type.TString;
833
+ state: Type.TEnum<["working", "waiting", "done", "failed"]>;
834
+ startedBy: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"call">>, Type.TNull]>;
835
+ }>>;
836
+ configuration: Type.TObject<{
837
+ selected: Type.TUnion<[Type.TObject<{
838
+ kind: Type.TLiteral<"exact">;
839
+ model: Type.TObject<{
840
+ provider: Type.TString;
841
+ id: Type.TString;
842
+ }>;
843
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
844
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
845
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
846
+ settingsVersion: Type.TString;
847
+ }>, Type.TNull]>;
848
+ effective: Type.TUnion<[Type.TObject<{
849
+ kind: Type.TLiteral<"exact">;
850
+ model: Type.TObject<{
851
+ provider: Type.TString;
852
+ id: Type.TString;
853
+ }>;
854
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
855
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
856
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
857
+ settingsVersion: Type.TString;
858
+ }>, Type.TNull]>;
859
+ }>;
860
+ context: Type.TObject<{
861
+ tokens: Type.TNumber;
862
+ window: Type.TNumber;
863
+ lastRequest: Type.TUnion<[Type.TObject<{
864
+ input: Type.TNumber;
865
+ output: Type.TNumber;
866
+ cacheRead: Type.TNumber;
867
+ cacheWrite: Type.TNumber;
868
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
869
+ total: Type.TNumber;
870
+ cost: Type.TObject<{
871
+ input: Type.TNumber;
872
+ output: Type.TNumber;
873
+ cacheRead: Type.TNumber;
874
+ cacheWrite: Type.TNumber;
875
+ total: Type.TNumber;
876
+ }>;
877
+ }>, Type.TNull]>;
878
+ }>;
879
+ heads: Type.TArray<Type.TObject<{
880
+ name: Type.TUnsafe<import("./ids.ts").Id<"head">>;
881
+ tip: Type.TUnion<[Type.TObject<{
882
+ kind: Type.TLiteral<"start">;
883
+ }>, Type.TObject<{
884
+ kind: Type.TLiteral<"commit">;
885
+ id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
886
+ }>]>;
887
+ stack: Type.TUnion<[Type.TObject<{
888
+ parent: Type.TUnsafe<import("./ids.ts").Id<"head">>;
889
+ base: Type.TUnion<[Type.TObject<{
890
+ kind: Type.TLiteral<"start">;
891
+ }>, Type.TObject<{
892
+ kind: Type.TLiteral<"commit">;
893
+ id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
894
+ }>]>;
895
+ stale: Type.TBoolean;
896
+ }>, Type.TNull]>;
897
+ execution: Type.TUnion<[Type.TObject<{
898
+ kind: Type.TLiteral<"idle">;
899
+ lastRun: Type.TUnion<[Type.TObject<{
900
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
901
+ end: Type.TUnion<[Type.TObject<{
902
+ kind: Type.TLiteral<"completed">;
903
+ usage: Type.TObject<{
904
+ input: Type.TNumber;
905
+ output: Type.TNumber;
906
+ cacheRead: Type.TNumber;
907
+ cacheWrite: Type.TNumber;
908
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
909
+ total: Type.TNumber;
910
+ cost: Type.TObject<{
911
+ input: Type.TNumber;
912
+ output: Type.TNumber;
913
+ cacheRead: Type.TNumber;
914
+ cacheWrite: Type.TNumber;
915
+ total: Type.TNumber;
916
+ }>;
917
+ }>;
918
+ }>, Type.TObject<{
919
+ kind: Type.TLiteral<"stopped">;
920
+ }>, Type.TObject<{
921
+ kind: Type.TLiteral<"failed">;
922
+ failure: Type.TObject<{
923
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
924
+ message: Type.TString;
925
+ retryAfterMs: Type.TOptional<Type.TNumber>;
926
+ }>;
927
+ }>]>;
928
+ endedAt: Type.TNumber;
929
+ }>, Type.TNull]>;
930
+ }>, Type.TObject<{
931
+ kind: Type.TLiteral<"live">;
932
+ run: Type.TObject<{
933
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
934
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
935
+ startedAt: Type.TNumber;
936
+ attempt: Type.TNumber;
937
+ configuration: Type.TObject<{
938
+ kind: Type.TLiteral<"exact">;
939
+ model: Type.TObject<{
940
+ provider: Type.TString;
941
+ id: Type.TString;
942
+ }>;
943
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
944
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
945
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
946
+ settingsVersion: Type.TString;
947
+ }>;
948
+ origin: Type.TUnion<[Type.TObject<{
949
+ kind: Type.TLiteral<"input">;
950
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
951
+ }>, Type.TObject<{
952
+ kind: Type.TLiteral<"continuation">;
953
+ from: Type.TEnum<["child", "job", "wake"]>;
954
+ }>]>;
955
+ }>;
956
+ phase: Type.TEnum<["responding", "executing"]>;
957
+ stopping: Type.TBoolean;
958
+ }>, Type.TObject<{
959
+ kind: Type.TLiteral<"waiting">;
960
+ run: Type.TObject<{
961
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
962
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
963
+ startedAt: Type.TNumber;
964
+ attempt: Type.TNumber;
965
+ configuration: Type.TObject<{
966
+ kind: Type.TLiteral<"exact">;
967
+ model: Type.TObject<{
968
+ provider: Type.TString;
969
+ id: Type.TString;
970
+ }>;
971
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
972
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
973
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
974
+ settingsVersion: Type.TString;
975
+ }>;
976
+ origin: Type.TUnion<[Type.TObject<{
977
+ kind: Type.TLiteral<"input">;
978
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
979
+ }>, Type.TObject<{
980
+ kind: Type.TLiteral<"continuation">;
981
+ from: Type.TEnum<["child", "job", "wake"]>;
982
+ }>]>;
983
+ }>;
984
+ on: Type.TUnion<[Type.TObject<{
985
+ kind: Type.TLiteral<"run">;
986
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
987
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
988
+ deadline: Type.TOptional<Type.TNumber>;
989
+ }>, Type.TObject<{
990
+ kind: Type.TLiteral<"job">;
991
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
992
+ deadline: Type.TOptional<Type.TNumber>;
993
+ }>, Type.TObject<{
994
+ kind: Type.TLiteral<"part">;
995
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
996
+ deadline: Type.TOptional<Type.TNumber>;
997
+ }>, Type.TObject<{
998
+ kind: Type.TLiteral<"timer">;
999
+ until: Type.TNumber;
1000
+ deadline: Type.TOptional<Type.TNumber>;
1001
+ }>]>;
1002
+ }>, Type.TObject<{
1003
+ kind: Type.TLiteral<"retrying">;
1004
+ run: Type.TObject<{
1005
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1006
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
1007
+ startedAt: Type.TNumber;
1008
+ attempt: Type.TNumber;
1009
+ configuration: Type.TObject<{
1010
+ kind: Type.TLiteral<"exact">;
1011
+ model: Type.TObject<{
1012
+ provider: Type.TString;
1013
+ id: Type.TString;
1014
+ }>;
1015
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
1016
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
1017
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1018
+ settingsVersion: Type.TString;
1019
+ }>;
1020
+ origin: Type.TUnion<[Type.TObject<{
1021
+ kind: Type.TLiteral<"input">;
1022
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1023
+ }>, Type.TObject<{
1024
+ kind: Type.TLiteral<"continuation">;
1025
+ from: Type.TEnum<["child", "job", "wake"]>;
1026
+ }>]>;
1027
+ }>;
1028
+ until: Type.TNumber;
1029
+ reason: Type.TString;
1030
+ }>]>;
1031
+ unread: Type.TBoolean;
1032
+ }>>;
1033
+ changes: Type.TArray<Type.TObject<{
1034
+ path: Type.TString;
1035
+ status: Type.TEnum<["added", "modified", "deleted", "renamed", "untracked", "conflicted"]>;
1036
+ added: Type.TNumber;
1037
+ removed: Type.TNumber;
1038
+ from: Type.TOptional<Type.TString>;
1039
+ }>>;
1040
+ catalog: Type.TObject<{
1041
+ commands: Type.TArray<Type.TObject<{
1042
+ name: Type.TString;
1043
+ owner: Type.TString;
1044
+ side: Type.TEnum<["core", "client"]>;
1045
+ title: Type.TString;
1046
+ description: Type.TString;
1047
+ takesText: Type.TBoolean;
1048
+ completes: Type.TBoolean;
1049
+ category: Type.TOptional<Type.TString>;
1050
+ keywords: Type.TOptional<Type.TArray<Type.TString>>;
1051
+ }>>;
1052
+ settings: Type.TArray<Type.TObject<{
1053
+ id: Type.TString;
1054
+ owner: Type.TString;
1055
+ scope: Type.TEnum<["host", "session"]>;
1056
+ label: Type.TString;
1057
+ schema: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1058
+ choices: Type.TUnion<[Type.TArray<Type.TObject<{
1059
+ value: Type.TUnsafe<import("./json.ts").Json>;
1060
+ label: Type.TString;
1061
+ badge: Type.TOptional<Type.TString>;
1062
+ }>>, Type.TNull]>;
1063
+ value: Type.TUnsafe<import("./json.ts").Json>;
1064
+ from: Type.TEnum<["default", "host", "session"]>;
1065
+ }>>;
1066
+ skills: Type.TArray<Type.TObject<{
1067
+ name: Type.TString;
1068
+ owner: Type.TString;
1069
+ description: Type.TString;
1070
+ location: Type.TString;
1071
+ }>>;
1072
+ agents: Type.TArray<Type.TObject<{
1073
+ id: Type.TString;
1074
+ owner: Type.TString;
1075
+ description: Type.TUnion<[Type.TString, Type.TNull]>;
1076
+ model: Type.TUnion<[Type.TObject<{
1077
+ provider: Type.TString;
1078
+ id: Type.TString;
1079
+ }>, Type.TNull]>;
1080
+ mode: Type.TEnum<["primary", "subagent", "all"]>;
1081
+ }>>;
1082
+ tools: Type.TArray<Type.TObject<{
1083
+ name: Type.TString;
1084
+ owner: Type.TString;
1085
+ namespace: Type.TUnion<[Type.TString, Type.TNull]>;
1086
+ description: Type.TString;
1087
+ parameters: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1088
+ output: Type.TUnion<[Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>, Type.TNull]>;
1089
+ exposure: Type.TEnum<["model", "deferred", "code", "hidden"]>;
1090
+ }>>;
1091
+ }>;
1092
+ }>;
1093
+ /** A head's view: its last `tail` messages, at most `tail` and contiguous; `leadingPrompt`, the prompt of the earliest turn among them when that prompt is before them, else null; the turns those messages belong to from the earliest one on (older turns and the messages between `leadingPrompt` and `messages` arrive through `head.history`); and `usage`, the sum of every completed run on the head's history. */
1094
+ export type SessionView = Decoded<typeof SessionViewType>;
1095
+ export declare const HistoryPageType: Type.TObject<{
1096
+ messages: Type.TArray<Type.TUnion<[Type.TObject<{
1097
+ kind: Type.TLiteral<"user">;
1098
+ content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
1099
+ kind: Type.TLiteral<"text">;
1100
+ text: Type.TString;
1101
+ }>, Type.TObject<{
1102
+ kind: Type.TLiteral<"file">;
1103
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
1104
+ mime: Type.TString;
1105
+ name: Type.TString;
1106
+ }>, Type.TObject<{
1107
+ kind: Type.TLiteral<"reference">;
1108
+ path: Type.TString;
1109
+ blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
1110
+ }>, Type.TObject<{
1111
+ kind: Type.TLiteral<"skill">;
1112
+ name: Type.TString;
1113
+ location: Type.TString;
1114
+ }>, Type.TObject<{
1115
+ kind: Type.TLiteral<"excerpt">;
1116
+ source: Type.TUnion<[Type.TObject<{
1117
+ kind: Type.TLiteral<"diff">;
1118
+ path: Type.TString;
1119
+ side: Type.TEnum<["old", "new"]>;
1120
+ start: Type.TNumber;
1121
+ end: Type.TNumber;
1122
+ }>, Type.TObject<{
1123
+ kind: Type.TLiteral<"terminal">;
1124
+ command: Type.TOptional<Type.TString>;
1125
+ }>, Type.TObject<{
1126
+ kind: Type.TLiteral<"browser">;
1127
+ url: Type.TString;
1128
+ selector: Type.TString;
1129
+ }>]>;
1130
+ text: Type.TString;
1131
+ }>]>>]>;
1132
+ source: Type.TUnion<[Type.TObject<{
1133
+ kind: Type.TLiteral<"user">;
1134
+ }>, Type.TObject<{
1135
+ kind: Type.TLiteral<"child">;
1136
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1137
+ end: Type.TEnum<["completed", "stopped", "failed"]>;
1138
+ }>, Type.TObject<{
1139
+ kind: Type.TLiteral<"job">;
1140
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
1141
+ }>, Type.TObject<{
1142
+ kind: Type.TLiteral<"shell">;
1143
+ }>, Type.TObject<{
1144
+ kind: Type.TLiteral<"action">;
1145
+ label: Type.TString;
1146
+ command: Type.TOptional<Type.TString>;
1147
+ }>]>;
1148
+ delivery: Type.TEnum<["steer", "queue", "attach"]>;
1149
+ status: Type.TUnion<[Type.TObject<{
1150
+ kind: Type.TLiteral<"unsent">;
1151
+ attempts: Type.TNumber;
1152
+ retrying: Type.TUnion<[Type.TObject<{
1153
+ at: Type.TNumber;
1154
+ reason: Type.TString;
1155
+ }>, Type.TNull]>;
1156
+ }>, Type.TObject<{
1157
+ kind: Type.TLiteral<"pending">;
1158
+ schedule: Type.TUnion<[Type.TObject<{
1159
+ kind: Type.TLiteral<"joined">;
1160
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1161
+ }>, Type.TObject<{
1162
+ kind: Type.TLiteral<"next-turn">;
1163
+ reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
1164
+ }>, Type.TObject<{
1165
+ kind: Type.TLiteral<"attached">;
1166
+ }>, Type.TObject<{
1167
+ kind: Type.TLiteral<"deciding">;
1168
+ }>]>;
1169
+ covered: Type.TBoolean;
1170
+ }>, Type.TObject<{
1171
+ kind: Type.TLiteral<"landed">;
1172
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
1173
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1174
+ replaced: Type.TUnion<[Type.TObject<{
1175
+ previous: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1176
+ stopped: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1177
+ }>, Type.TNull]>;
1178
+ }>]>;
1179
+ siblings: Type.TObject<{
1180
+ index: Type.TNumber;
1181
+ count: Type.TNumber;
1182
+ ids: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
1183
+ }>;
1184
+ id: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1185
+ turn: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
1186
+ at: Type.TNumber;
1187
+ }>, Type.TObject<{
1188
+ kind: Type.TLiteral<"part">;
1189
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1190
+ partKind: Type.TString;
1191
+ role: Type.TEnum<["step", "answer", "note"]>;
1192
+ state: Type.TUnknown;
1193
+ version: Type.TNumber;
1194
+ status: Type.TUnion<[Type.TObject<{
1195
+ kind: Type.TLiteral<"live">;
1196
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1197
+ waiting: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"call">>>;
1198
+ answer: Type.TOptional<Type.TObject<{
1199
+ action: Type.TString;
1200
+ input: Type.TUnsafe<import("./json.ts").Json>;
1201
+ }>>;
1202
+ }>, Type.TObject<{
1203
+ kind: Type.TLiteral<"waiting">;
1204
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1205
+ on: Type.TUnion<[Type.TObject<{
1206
+ kind: Type.TLiteral<"run">;
1207
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1208
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1209
+ deadline: Type.TOptional<Type.TNumber>;
1210
+ }>, Type.TObject<{
1211
+ kind: Type.TLiteral<"job">;
1212
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
1213
+ deadline: Type.TOptional<Type.TNumber>;
1214
+ }>, Type.TObject<{
1215
+ kind: Type.TLiteral<"part">;
1216
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1217
+ deadline: Type.TOptional<Type.TNumber>;
1218
+ }>, Type.TObject<{
1219
+ kind: Type.TLiteral<"timer">;
1220
+ until: Type.TNumber;
1221
+ deadline: Type.TOptional<Type.TNumber>;
1222
+ }>]>;
1223
+ }>, Type.TObject<{
1224
+ kind: Type.TLiteral<"settled">;
1225
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
1226
+ endedAt: Type.TNumber;
1227
+ }>, Type.TObject<{
1228
+ kind: Type.TLiteral<"failed">;
1229
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1230
+ failure: Type.TObject<{
1231
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
1232
+ message: Type.TString;
1233
+ retryAfterMs: Type.TOptional<Type.TNumber>;
1234
+ }>;
1235
+ }>]>;
1236
+ id: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1237
+ turn: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
1238
+ at: Type.TNumber;
1239
+ }>]>>;
1240
+ leadingPrompt: Type.TUnion<[Type.TObject<{
1241
+ kind: Type.TLiteral<"user">;
1242
+ content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
1243
+ kind: Type.TLiteral<"text">;
1244
+ text: Type.TString;
1245
+ }>, Type.TObject<{
1246
+ kind: Type.TLiteral<"file">;
1247
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
1248
+ mime: Type.TString;
1249
+ name: Type.TString;
1250
+ }>, Type.TObject<{
1251
+ kind: Type.TLiteral<"reference">;
1252
+ path: Type.TString;
1253
+ blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
1254
+ }>, Type.TObject<{
1255
+ kind: Type.TLiteral<"skill">;
1256
+ name: Type.TString;
1257
+ location: Type.TString;
1258
+ }>, Type.TObject<{
1259
+ kind: Type.TLiteral<"excerpt">;
1260
+ source: Type.TUnion<[Type.TObject<{
1261
+ kind: Type.TLiteral<"diff">;
1262
+ path: Type.TString;
1263
+ side: Type.TEnum<["old", "new"]>;
1264
+ start: Type.TNumber;
1265
+ end: Type.TNumber;
1266
+ }>, Type.TObject<{
1267
+ kind: Type.TLiteral<"terminal">;
1268
+ command: Type.TOptional<Type.TString>;
1269
+ }>, Type.TObject<{
1270
+ kind: Type.TLiteral<"browser">;
1271
+ url: Type.TString;
1272
+ selector: Type.TString;
1273
+ }>]>;
1274
+ text: Type.TString;
1275
+ }>]>>]>;
1276
+ source: Type.TUnion<[Type.TObject<{
1277
+ kind: Type.TLiteral<"user">;
1278
+ }>, Type.TObject<{
1279
+ kind: Type.TLiteral<"child">;
1280
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1281
+ end: Type.TEnum<["completed", "stopped", "failed"]>;
1282
+ }>, Type.TObject<{
1283
+ kind: Type.TLiteral<"job">;
1284
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
1285
+ }>, Type.TObject<{
1286
+ kind: Type.TLiteral<"shell">;
1287
+ }>, Type.TObject<{
1288
+ kind: Type.TLiteral<"action">;
1289
+ label: Type.TString;
1290
+ command: Type.TOptional<Type.TString>;
1291
+ }>]>;
1292
+ delivery: Type.TEnum<["steer", "queue", "attach"]>;
1293
+ status: Type.TUnion<[Type.TObject<{
1294
+ kind: Type.TLiteral<"unsent">;
1295
+ attempts: Type.TNumber;
1296
+ retrying: Type.TUnion<[Type.TObject<{
1297
+ at: Type.TNumber;
1298
+ reason: Type.TString;
1299
+ }>, Type.TNull]>;
1300
+ }>, Type.TObject<{
1301
+ kind: Type.TLiteral<"pending">;
1302
+ schedule: Type.TUnion<[Type.TObject<{
1303
+ kind: Type.TLiteral<"joined">;
1304
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1305
+ }>, Type.TObject<{
1306
+ kind: Type.TLiteral<"next-turn">;
1307
+ reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
1308
+ }>, Type.TObject<{
1309
+ kind: Type.TLiteral<"attached">;
1310
+ }>, Type.TObject<{
1311
+ kind: Type.TLiteral<"deciding">;
1312
+ }>]>;
1313
+ covered: Type.TBoolean;
1314
+ }>, Type.TObject<{
1315
+ kind: Type.TLiteral<"landed">;
1316
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
1317
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1318
+ replaced: Type.TUnion<[Type.TObject<{
1319
+ previous: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1320
+ stopped: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1321
+ }>, Type.TNull]>;
1322
+ }>]>;
1323
+ siblings: Type.TObject<{
1324
+ index: Type.TNumber;
1325
+ count: Type.TNumber;
1326
+ ids: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
1327
+ }>;
1328
+ id: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1329
+ turn: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
1330
+ at: Type.TNumber;
1331
+ }>, Type.TNull]>;
1332
+ turns: Type.TArray<Type.TObject<{
1333
+ id: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
1334
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1335
+ prompt: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"message">>, Type.TNull]>;
1336
+ state: Type.TUnion<[Type.TObject<{
1337
+ kind: Type.TLiteral<"working">;
1338
+ activity: Type.TUnion<[Type.TString, Type.TNull]>;
1339
+ }>, Type.TObject<{
1340
+ kind: Type.TLiteral<"waiting">;
1341
+ on: Type.TUnion<[Type.TObject<{
1342
+ kind: Type.TLiteral<"run">;
1343
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1344
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1345
+ deadline: Type.TOptional<Type.TNumber>;
1346
+ }>, Type.TObject<{
1347
+ kind: Type.TLiteral<"job">;
1348
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
1349
+ deadline: Type.TOptional<Type.TNumber>;
1350
+ }>, Type.TObject<{
1351
+ kind: Type.TLiteral<"part">;
1352
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1353
+ deadline: Type.TOptional<Type.TNumber>;
1354
+ }>, Type.TObject<{
1355
+ kind: Type.TLiteral<"timer">;
1356
+ until: Type.TNumber;
1357
+ deadline: Type.TOptional<Type.TNumber>;
1358
+ }>]>;
1359
+ }>, Type.TObject<{
1360
+ kind: Type.TLiteral<"ended">;
1361
+ end: Type.TUnion<[Type.TObject<{
1362
+ kind: Type.TLiteral<"completed">;
1363
+ usage: Type.TObject<{
1364
+ input: Type.TNumber;
1365
+ output: Type.TNumber;
1366
+ cacheRead: Type.TNumber;
1367
+ cacheWrite: Type.TNumber;
1368
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
1369
+ total: Type.TNumber;
1370
+ cost: Type.TObject<{
1371
+ input: Type.TNumber;
1372
+ output: Type.TNumber;
1373
+ cacheRead: Type.TNumber;
1374
+ cacheWrite: Type.TNumber;
1375
+ total: Type.TNumber;
1376
+ }>;
1377
+ }>;
1378
+ }>, Type.TObject<{
1379
+ kind: Type.TLiteral<"stopped">;
1380
+ }>, Type.TObject<{
1381
+ kind: Type.TLiteral<"failed">;
1382
+ failure: Type.TObject<{
1383
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
1384
+ message: Type.TString;
1385
+ retryAfterMs: Type.TOptional<Type.TNumber>;
1386
+ }>;
1387
+ }>]>;
1388
+ }>]>;
1389
+ startedAt: Type.TNumber;
1390
+ endedAt: Type.TUnion<[Type.TNumber, Type.TNull]>;
1391
+ steps: Type.TNumber;
1392
+ thinkingOnly: Type.TBoolean;
1393
+ summary: Type.TObject<{
1394
+ byClass: Type.TObject<{
1395
+ read: Type.TObject<{
1396
+ count: Type.TNumber;
1397
+ paths: Type.TArray<Type.TString>;
1398
+ }>;
1399
+ list: Type.TObject<{
1400
+ count: Type.TNumber;
1401
+ paths: Type.TArray<Type.TString>;
1402
+ }>;
1403
+ edit: Type.TObject<{
1404
+ count: Type.TNumber;
1405
+ paths: Type.TArray<Type.TString>;
1406
+ }>;
1407
+ shell: Type.TObject<{
1408
+ count: Type.TNumber;
1409
+ paths: Type.TArray<Type.TString>;
1410
+ }>;
1411
+ delegate: Type.TObject<{
1412
+ count: Type.TNumber;
1413
+ paths: Type.TArray<Type.TString>;
1414
+ }>;
1415
+ custom: Type.TObject<{
1416
+ count: Type.TNumber;
1417
+ paths: Type.TArray<Type.TString>;
1418
+ }>;
1419
+ }>;
1420
+ failed: Type.TNumber;
1421
+ stopped: Type.TNumber;
1422
+ added: Type.TNumber;
1423
+ removed: Type.TNumber;
1424
+ }>;
1425
+ }>>;
1426
+ }>;
1427
+ /** Messages before a view's window, with the turns they belong to and `leadingPrompt`, the prompt of the earliest of those turns when it is before `messages`, else null. */
1428
+ export type HistoryPage = Decoded<typeof HistoryPageType>;
1429
+ export declare const ViewAppendType: Type.TObject<{
1430
+ at: Type.TNumber;
1431
+ append: Type.TString;
1432
+ version: Type.TNumber;
1433
+ }>;
1434
+ /** Text a streaming part streamed since the previous frame: the message at `at` of the spliced messages, its `state.markdown` grown by `append`, now at `version`. */
1435
+ export type ViewAppend = Decoded<typeof ViewAppendType>;
1436
+ export declare const ViewFrameType: Type.TUnion<[Type.TObject<{
1437
+ kind: Type.TLiteral<"view">;
1438
+ view: Type.TObject<{
1439
+ revision: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"revision">>, Type.TNull]>;
1440
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1441
+ activation: Type.TUnion<[Type.TObject<{
1442
+ kind: Type.TLiteral<"active">;
1443
+ }>, Type.TObject<{
1444
+ kind: Type.TLiteral<"inactive">;
1445
+ }>, Type.TObject<{
1446
+ kind: Type.TLiteral<"unavailable">;
1447
+ reason: Type.TEnum<["unsupported", "unreachable"]>;
1448
+ workspace: Type.TUnsafe<import("./ids.ts").Id<"workspace">>;
1449
+ }>, Type.TObject<{
1450
+ kind: Type.TLiteral<"failed">;
1451
+ message: Type.TString;
1452
+ }>]>;
1453
+ messages: Type.TArray<Type.TUnion<[Type.TObject<{
1454
+ kind: Type.TLiteral<"user">;
1455
+ content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
1456
+ kind: Type.TLiteral<"text">;
1457
+ text: Type.TString;
1458
+ }>, Type.TObject<{
1459
+ kind: Type.TLiteral<"file">;
1460
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
1461
+ mime: Type.TString;
1462
+ name: Type.TString;
1463
+ }>, Type.TObject<{
1464
+ kind: Type.TLiteral<"reference">;
1465
+ path: Type.TString;
1466
+ blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
1467
+ }>, Type.TObject<{
1468
+ kind: Type.TLiteral<"skill">;
1469
+ name: Type.TString;
1470
+ location: Type.TString;
1471
+ }>, Type.TObject<{
1472
+ kind: Type.TLiteral<"excerpt">;
1473
+ source: Type.TUnion<[Type.TObject<{
1474
+ kind: Type.TLiteral<"diff">;
1475
+ path: Type.TString;
1476
+ side: Type.TEnum<["old", "new"]>;
1477
+ start: Type.TNumber;
1478
+ end: Type.TNumber;
1479
+ }>, Type.TObject<{
1480
+ kind: Type.TLiteral<"terminal">;
1481
+ command: Type.TOptional<Type.TString>;
1482
+ }>, Type.TObject<{
1483
+ kind: Type.TLiteral<"browser">;
1484
+ url: Type.TString;
1485
+ selector: Type.TString;
1486
+ }>]>;
1487
+ text: Type.TString;
1488
+ }>]>>]>;
1489
+ source: Type.TUnion<[Type.TObject<{
1490
+ kind: Type.TLiteral<"user">;
1491
+ }>, Type.TObject<{
1492
+ kind: Type.TLiteral<"child">;
1493
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1494
+ end: Type.TEnum<["completed", "stopped", "failed"]>;
1495
+ }>, Type.TObject<{
1496
+ kind: Type.TLiteral<"job">;
1497
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
1498
+ }>, Type.TObject<{
1499
+ kind: Type.TLiteral<"shell">;
1500
+ }>, Type.TObject<{
1501
+ kind: Type.TLiteral<"action">;
1502
+ label: Type.TString;
1503
+ command: Type.TOptional<Type.TString>;
1504
+ }>]>;
1505
+ delivery: Type.TEnum<["steer", "queue", "attach"]>;
1506
+ status: Type.TUnion<[Type.TObject<{
1507
+ kind: Type.TLiteral<"unsent">;
1508
+ attempts: Type.TNumber;
1509
+ retrying: Type.TUnion<[Type.TObject<{
1510
+ at: Type.TNumber;
1511
+ reason: Type.TString;
1512
+ }>, Type.TNull]>;
1513
+ }>, Type.TObject<{
1514
+ kind: Type.TLiteral<"pending">;
1515
+ schedule: Type.TUnion<[Type.TObject<{
1516
+ kind: Type.TLiteral<"joined">;
1517
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1518
+ }>, Type.TObject<{
1519
+ kind: Type.TLiteral<"next-turn">;
1520
+ reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
1521
+ }>, Type.TObject<{
1522
+ kind: Type.TLiteral<"attached">;
1523
+ }>, Type.TObject<{
1524
+ kind: Type.TLiteral<"deciding">;
1525
+ }>]>;
1526
+ covered: Type.TBoolean;
1527
+ }>, Type.TObject<{
1528
+ kind: Type.TLiteral<"landed">;
1529
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
1530
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1531
+ replaced: Type.TUnion<[Type.TObject<{
1532
+ previous: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1533
+ stopped: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1534
+ }>, Type.TNull]>;
1535
+ }>]>;
1536
+ siblings: Type.TObject<{
1537
+ index: Type.TNumber;
1538
+ count: Type.TNumber;
1539
+ ids: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
1540
+ }>;
1541
+ id: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1542
+ turn: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
1543
+ at: Type.TNumber;
1544
+ }>, Type.TObject<{
1545
+ kind: Type.TLiteral<"part">;
1546
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1547
+ partKind: Type.TString;
1548
+ role: Type.TEnum<["step", "answer", "note"]>;
1549
+ state: Type.TUnknown;
1550
+ version: Type.TNumber;
1551
+ status: Type.TUnion<[Type.TObject<{
1552
+ kind: Type.TLiteral<"live">;
1553
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1554
+ waiting: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"call">>>;
1555
+ answer: Type.TOptional<Type.TObject<{
1556
+ action: Type.TString;
1557
+ input: Type.TUnsafe<import("./json.ts").Json>;
1558
+ }>>;
1559
+ }>, Type.TObject<{
1560
+ kind: Type.TLiteral<"waiting">;
1561
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1562
+ on: Type.TUnion<[Type.TObject<{
1563
+ kind: Type.TLiteral<"run">;
1564
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1565
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1566
+ deadline: Type.TOptional<Type.TNumber>;
1567
+ }>, Type.TObject<{
1568
+ kind: Type.TLiteral<"job">;
1569
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
1570
+ deadline: Type.TOptional<Type.TNumber>;
1571
+ }>, Type.TObject<{
1572
+ kind: Type.TLiteral<"part">;
1573
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1574
+ deadline: Type.TOptional<Type.TNumber>;
1575
+ }>, Type.TObject<{
1576
+ kind: Type.TLiteral<"timer">;
1577
+ until: Type.TNumber;
1578
+ deadline: Type.TOptional<Type.TNumber>;
1579
+ }>]>;
1580
+ }>, Type.TObject<{
1581
+ kind: Type.TLiteral<"settled">;
1582
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
1583
+ endedAt: Type.TNumber;
1584
+ }>, Type.TObject<{
1585
+ kind: Type.TLiteral<"failed">;
1586
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1587
+ failure: Type.TObject<{
1588
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
1589
+ message: Type.TString;
1590
+ retryAfterMs: Type.TOptional<Type.TNumber>;
1591
+ }>;
1592
+ }>]>;
1593
+ id: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1594
+ turn: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
1595
+ at: Type.TNumber;
1596
+ }>]>>;
1597
+ leadingPrompt: Type.TUnion<[Type.TObject<{
1598
+ kind: Type.TLiteral<"user">;
1599
+ content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
1600
+ kind: Type.TLiteral<"text">;
1601
+ text: Type.TString;
1602
+ }>, Type.TObject<{
1603
+ kind: Type.TLiteral<"file">;
1604
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
1605
+ mime: Type.TString;
1606
+ name: Type.TString;
1607
+ }>, Type.TObject<{
1608
+ kind: Type.TLiteral<"reference">;
1609
+ path: Type.TString;
1610
+ blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
1611
+ }>, Type.TObject<{
1612
+ kind: Type.TLiteral<"skill">;
1613
+ name: Type.TString;
1614
+ location: Type.TString;
1615
+ }>, Type.TObject<{
1616
+ kind: Type.TLiteral<"excerpt">;
1617
+ source: Type.TUnion<[Type.TObject<{
1618
+ kind: Type.TLiteral<"diff">;
1619
+ path: Type.TString;
1620
+ side: Type.TEnum<["old", "new"]>;
1621
+ start: Type.TNumber;
1622
+ end: Type.TNumber;
1623
+ }>, Type.TObject<{
1624
+ kind: Type.TLiteral<"terminal">;
1625
+ command: Type.TOptional<Type.TString>;
1626
+ }>, Type.TObject<{
1627
+ kind: Type.TLiteral<"browser">;
1628
+ url: Type.TString;
1629
+ selector: Type.TString;
1630
+ }>]>;
1631
+ text: Type.TString;
1632
+ }>]>>]>;
1633
+ source: Type.TUnion<[Type.TObject<{
1634
+ kind: Type.TLiteral<"user">;
1635
+ }>, Type.TObject<{
1636
+ kind: Type.TLiteral<"child">;
1637
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1638
+ end: Type.TEnum<["completed", "stopped", "failed"]>;
1639
+ }>, Type.TObject<{
1640
+ kind: Type.TLiteral<"job">;
1641
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
1642
+ }>, Type.TObject<{
1643
+ kind: Type.TLiteral<"shell">;
1644
+ }>, Type.TObject<{
1645
+ kind: Type.TLiteral<"action">;
1646
+ label: Type.TString;
1647
+ command: Type.TOptional<Type.TString>;
1648
+ }>]>;
1649
+ delivery: Type.TEnum<["steer", "queue", "attach"]>;
1650
+ status: Type.TUnion<[Type.TObject<{
1651
+ kind: Type.TLiteral<"unsent">;
1652
+ attempts: Type.TNumber;
1653
+ retrying: Type.TUnion<[Type.TObject<{
1654
+ at: Type.TNumber;
1655
+ reason: Type.TString;
1656
+ }>, Type.TNull]>;
1657
+ }>, Type.TObject<{
1658
+ kind: Type.TLiteral<"pending">;
1659
+ schedule: Type.TUnion<[Type.TObject<{
1660
+ kind: Type.TLiteral<"joined">;
1661
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1662
+ }>, Type.TObject<{
1663
+ kind: Type.TLiteral<"next-turn">;
1664
+ reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
1665
+ }>, Type.TObject<{
1666
+ kind: Type.TLiteral<"attached">;
1667
+ }>, Type.TObject<{
1668
+ kind: Type.TLiteral<"deciding">;
1669
+ }>]>;
1670
+ covered: Type.TBoolean;
1671
+ }>, Type.TObject<{
1672
+ kind: Type.TLiteral<"landed">;
1673
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
1674
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1675
+ replaced: Type.TUnion<[Type.TObject<{
1676
+ previous: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1677
+ stopped: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1678
+ }>, Type.TNull]>;
1679
+ }>]>;
1680
+ siblings: Type.TObject<{
1681
+ index: Type.TNumber;
1682
+ count: Type.TNumber;
1683
+ ids: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
1684
+ }>;
1685
+ id: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1686
+ turn: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
1687
+ at: Type.TNumber;
1688
+ }>, Type.TNull]>;
1689
+ parts: Type.TArray<Type.TObject<{
1690
+ id: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1691
+ partKind: Type.TString;
1692
+ placement: Type.TUnion<[Type.TObject<{
1693
+ kind: Type.TLiteral<"transcript">;
1694
+ role: Type.TEnum<["step", "answer", "note"]>;
1695
+ }>, Type.TObject<{
1696
+ kind: Type.TLiteral<"modal">;
1697
+ }>, Type.TIntersect<[Type.TObject<{
1698
+ kind: Type.TString;
1699
+ }>, Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>]>]>;
1700
+ state: Type.TUnsafe<import("./json.ts").Json>;
1701
+ version: Type.TNumber;
1702
+ status: Type.TUnion<[Type.TObject<{
1703
+ kind: Type.TLiteral<"live">;
1704
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1705
+ waiting: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"call">>>;
1706
+ answer: Type.TOptional<Type.TObject<{
1707
+ action: Type.TString;
1708
+ input: Type.TUnsafe<import("./json.ts").Json>;
1709
+ }>>;
1710
+ }>, Type.TObject<{
1711
+ kind: Type.TLiteral<"waiting">;
1712
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1713
+ on: Type.TUnion<[Type.TObject<{
1714
+ kind: Type.TLiteral<"run">;
1715
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1716
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1717
+ deadline: Type.TOptional<Type.TNumber>;
1718
+ }>, Type.TObject<{
1719
+ kind: Type.TLiteral<"job">;
1720
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
1721
+ deadline: Type.TOptional<Type.TNumber>;
1722
+ }>, Type.TObject<{
1723
+ kind: Type.TLiteral<"part">;
1724
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1725
+ deadline: Type.TOptional<Type.TNumber>;
1726
+ }>, Type.TObject<{
1727
+ kind: Type.TLiteral<"timer">;
1728
+ until: Type.TNumber;
1729
+ deadline: Type.TOptional<Type.TNumber>;
1730
+ }>]>;
1731
+ }>, Type.TObject<{
1732
+ kind: Type.TLiteral<"settled">;
1733
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
1734
+ endedAt: Type.TNumber;
1735
+ }>, Type.TObject<{
1736
+ kind: Type.TLiteral<"failed">;
1737
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1738
+ failure: Type.TObject<{
1739
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
1740
+ message: Type.TString;
1741
+ retryAfterMs: Type.TOptional<Type.TNumber>;
1742
+ }>;
1743
+ }>]>;
1744
+ owner: Type.TUnion<[Type.TString, Type.TNull]>;
1745
+ }>>;
1746
+ turns: Type.TArray<Type.TObject<{
1747
+ id: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
1748
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1749
+ prompt: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"message">>, Type.TNull]>;
1750
+ state: Type.TUnion<[Type.TObject<{
1751
+ kind: Type.TLiteral<"working">;
1752
+ activity: Type.TUnion<[Type.TString, Type.TNull]>;
1753
+ }>, Type.TObject<{
1754
+ kind: Type.TLiteral<"waiting">;
1755
+ on: Type.TUnion<[Type.TObject<{
1756
+ kind: Type.TLiteral<"run">;
1757
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1758
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1759
+ deadline: Type.TOptional<Type.TNumber>;
1760
+ }>, Type.TObject<{
1761
+ kind: Type.TLiteral<"job">;
1762
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
1763
+ deadline: Type.TOptional<Type.TNumber>;
1764
+ }>, Type.TObject<{
1765
+ kind: Type.TLiteral<"part">;
1766
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1767
+ deadline: Type.TOptional<Type.TNumber>;
1768
+ }>, Type.TObject<{
1769
+ kind: Type.TLiteral<"timer">;
1770
+ until: Type.TNumber;
1771
+ deadline: Type.TOptional<Type.TNumber>;
1772
+ }>]>;
1773
+ }>, Type.TObject<{
1774
+ kind: Type.TLiteral<"ended">;
1775
+ end: Type.TUnion<[Type.TObject<{
1776
+ kind: Type.TLiteral<"completed">;
1777
+ usage: Type.TObject<{
1778
+ input: Type.TNumber;
1779
+ output: Type.TNumber;
1780
+ cacheRead: Type.TNumber;
1781
+ cacheWrite: Type.TNumber;
1782
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
1783
+ total: Type.TNumber;
1784
+ cost: Type.TObject<{
1785
+ input: Type.TNumber;
1786
+ output: Type.TNumber;
1787
+ cacheRead: Type.TNumber;
1788
+ cacheWrite: Type.TNumber;
1789
+ total: Type.TNumber;
1790
+ }>;
1791
+ }>;
1792
+ }>, Type.TObject<{
1793
+ kind: Type.TLiteral<"stopped">;
1794
+ }>, Type.TObject<{
1795
+ kind: Type.TLiteral<"failed">;
1796
+ failure: Type.TObject<{
1797
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
1798
+ message: Type.TString;
1799
+ retryAfterMs: Type.TOptional<Type.TNumber>;
1800
+ }>;
1801
+ }>]>;
1802
+ }>]>;
1803
+ startedAt: Type.TNumber;
1804
+ endedAt: Type.TUnion<[Type.TNumber, Type.TNull]>;
1805
+ steps: Type.TNumber;
1806
+ thinkingOnly: Type.TBoolean;
1807
+ summary: Type.TObject<{
1808
+ byClass: Type.TObject<{
1809
+ read: Type.TObject<{
1810
+ count: Type.TNumber;
1811
+ paths: Type.TArray<Type.TString>;
1812
+ }>;
1813
+ list: Type.TObject<{
1814
+ count: Type.TNumber;
1815
+ paths: Type.TArray<Type.TString>;
1816
+ }>;
1817
+ edit: Type.TObject<{
1818
+ count: Type.TNumber;
1819
+ paths: Type.TArray<Type.TString>;
1820
+ }>;
1821
+ shell: Type.TObject<{
1822
+ count: Type.TNumber;
1823
+ paths: Type.TArray<Type.TString>;
1824
+ }>;
1825
+ delegate: Type.TObject<{
1826
+ count: Type.TNumber;
1827
+ paths: Type.TArray<Type.TString>;
1828
+ }>;
1829
+ custom: Type.TObject<{
1830
+ count: Type.TNumber;
1831
+ paths: Type.TArray<Type.TString>;
1832
+ }>;
1833
+ }>;
1834
+ failed: Type.TNumber;
1835
+ stopped: Type.TNumber;
1836
+ added: Type.TNumber;
1837
+ removed: Type.TNumber;
1838
+ }>;
1839
+ }>>;
1840
+ usage: Type.TObject<{
1841
+ input: Type.TNumber;
1842
+ output: Type.TNumber;
1843
+ cacheRead: Type.TNumber;
1844
+ cacheWrite: Type.TNumber;
1845
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
1846
+ total: Type.TNumber;
1847
+ cost: Type.TObject<{
1848
+ input: Type.TNumber;
1849
+ output: Type.TNumber;
1850
+ cacheRead: Type.TNumber;
1851
+ cacheWrite: Type.TNumber;
1852
+ total: Type.TNumber;
1853
+ }>;
1854
+ }>;
1855
+ execution: Type.TUnion<[Type.TObject<{
1856
+ kind: Type.TLiteral<"idle">;
1857
+ lastRun: Type.TUnion<[Type.TObject<{
1858
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1859
+ end: Type.TUnion<[Type.TObject<{
1860
+ kind: Type.TLiteral<"completed">;
1861
+ usage: Type.TObject<{
1862
+ input: Type.TNumber;
1863
+ output: Type.TNumber;
1864
+ cacheRead: Type.TNumber;
1865
+ cacheWrite: Type.TNumber;
1866
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
1867
+ total: Type.TNumber;
1868
+ cost: Type.TObject<{
1869
+ input: Type.TNumber;
1870
+ output: Type.TNumber;
1871
+ cacheRead: Type.TNumber;
1872
+ cacheWrite: Type.TNumber;
1873
+ total: Type.TNumber;
1874
+ }>;
1875
+ }>;
1876
+ }>, Type.TObject<{
1877
+ kind: Type.TLiteral<"stopped">;
1878
+ }>, Type.TObject<{
1879
+ kind: Type.TLiteral<"failed">;
1880
+ failure: Type.TObject<{
1881
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
1882
+ message: Type.TString;
1883
+ retryAfterMs: Type.TOptional<Type.TNumber>;
1884
+ }>;
1885
+ }>]>;
1886
+ endedAt: Type.TNumber;
1887
+ }>, Type.TNull]>;
1888
+ }>, Type.TObject<{
1889
+ kind: Type.TLiteral<"live">;
1890
+ run: Type.TObject<{
1891
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1892
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
1893
+ startedAt: Type.TNumber;
1894
+ attempt: Type.TNumber;
1895
+ configuration: Type.TObject<{
1896
+ kind: Type.TLiteral<"exact">;
1897
+ model: Type.TObject<{
1898
+ provider: Type.TString;
1899
+ id: Type.TString;
1900
+ }>;
1901
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
1902
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
1903
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1904
+ settingsVersion: Type.TString;
1905
+ }>;
1906
+ origin: Type.TUnion<[Type.TObject<{
1907
+ kind: Type.TLiteral<"input">;
1908
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1909
+ }>, Type.TObject<{
1910
+ kind: Type.TLiteral<"continuation">;
1911
+ from: Type.TEnum<["child", "job", "wake"]>;
1912
+ }>]>;
1913
+ }>;
1914
+ phase: Type.TEnum<["responding", "executing"]>;
1915
+ stopping: Type.TBoolean;
1916
+ }>, Type.TObject<{
1917
+ kind: Type.TLiteral<"waiting">;
1918
+ run: Type.TObject<{
1919
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1920
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
1921
+ startedAt: Type.TNumber;
1922
+ attempt: Type.TNumber;
1923
+ configuration: Type.TObject<{
1924
+ kind: Type.TLiteral<"exact">;
1925
+ model: Type.TObject<{
1926
+ provider: Type.TString;
1927
+ id: Type.TString;
1928
+ }>;
1929
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
1930
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
1931
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1932
+ settingsVersion: Type.TString;
1933
+ }>;
1934
+ origin: Type.TUnion<[Type.TObject<{
1935
+ kind: Type.TLiteral<"input">;
1936
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1937
+ }>, Type.TObject<{
1938
+ kind: Type.TLiteral<"continuation">;
1939
+ from: Type.TEnum<["child", "job", "wake"]>;
1940
+ }>]>;
1941
+ }>;
1942
+ on: Type.TUnion<[Type.TObject<{
1943
+ kind: Type.TLiteral<"run">;
1944
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1945
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1946
+ deadline: Type.TOptional<Type.TNumber>;
1947
+ }>, Type.TObject<{
1948
+ kind: Type.TLiteral<"job">;
1949
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
1950
+ deadline: Type.TOptional<Type.TNumber>;
1951
+ }>, Type.TObject<{
1952
+ kind: Type.TLiteral<"part">;
1953
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1954
+ deadline: Type.TOptional<Type.TNumber>;
1955
+ }>, Type.TObject<{
1956
+ kind: Type.TLiteral<"timer">;
1957
+ until: Type.TNumber;
1958
+ deadline: Type.TOptional<Type.TNumber>;
1959
+ }>]>;
1960
+ }>, Type.TObject<{
1961
+ kind: Type.TLiteral<"retrying">;
1962
+ run: Type.TObject<{
1963
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1964
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
1965
+ startedAt: Type.TNumber;
1966
+ attempt: Type.TNumber;
1967
+ configuration: Type.TObject<{
1968
+ kind: Type.TLiteral<"exact">;
1969
+ model: Type.TObject<{
1970
+ provider: Type.TString;
1971
+ id: Type.TString;
1972
+ }>;
1973
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
1974
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
1975
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1976
+ settingsVersion: Type.TString;
1977
+ }>;
1978
+ origin: Type.TUnion<[Type.TObject<{
1979
+ kind: Type.TLiteral<"input">;
1980
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1981
+ }>, Type.TObject<{
1982
+ kind: Type.TLiteral<"continuation">;
1983
+ from: Type.TEnum<["child", "job", "wake"]>;
1984
+ }>]>;
1985
+ }>;
1986
+ until: Type.TNumber;
1987
+ reason: Type.TString;
1988
+ }>]>;
1989
+ background: Type.TArray<Type.TObject<{
1990
+ kind: Type.TEnum<["child", "job", "page"]>;
1991
+ id: Type.TString;
1992
+ title: Type.TString;
1993
+ state: Type.TEnum<["working", "waiting", "done", "failed"]>;
1994
+ startedBy: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"call">>, Type.TNull]>;
1995
+ }>>;
1996
+ configuration: Type.TObject<{
1997
+ selected: Type.TUnion<[Type.TObject<{
1998
+ kind: Type.TLiteral<"exact">;
1999
+ model: Type.TObject<{
2000
+ provider: Type.TString;
2001
+ id: Type.TString;
2002
+ }>;
2003
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
2004
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
2005
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
2006
+ settingsVersion: Type.TString;
2007
+ }>, Type.TNull]>;
2008
+ effective: Type.TUnion<[Type.TObject<{
2009
+ kind: Type.TLiteral<"exact">;
2010
+ model: Type.TObject<{
2011
+ provider: Type.TString;
2012
+ id: Type.TString;
2013
+ }>;
2014
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
2015
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
2016
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
2017
+ settingsVersion: Type.TString;
2018
+ }>, Type.TNull]>;
2019
+ }>;
2020
+ context: Type.TObject<{
2021
+ tokens: Type.TNumber;
2022
+ window: Type.TNumber;
2023
+ lastRequest: Type.TUnion<[Type.TObject<{
2024
+ input: Type.TNumber;
2025
+ output: Type.TNumber;
2026
+ cacheRead: Type.TNumber;
2027
+ cacheWrite: Type.TNumber;
2028
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
2029
+ total: Type.TNumber;
2030
+ cost: Type.TObject<{
2031
+ input: Type.TNumber;
2032
+ output: Type.TNumber;
2033
+ cacheRead: Type.TNumber;
2034
+ cacheWrite: Type.TNumber;
2035
+ total: Type.TNumber;
2036
+ }>;
2037
+ }>, Type.TNull]>;
2038
+ }>;
2039
+ heads: Type.TArray<Type.TObject<{
2040
+ name: Type.TUnsafe<import("./ids.ts").Id<"head">>;
2041
+ tip: Type.TUnion<[Type.TObject<{
2042
+ kind: Type.TLiteral<"start">;
2043
+ }>, Type.TObject<{
2044
+ kind: Type.TLiteral<"commit">;
2045
+ id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
2046
+ }>]>;
2047
+ stack: Type.TUnion<[Type.TObject<{
2048
+ parent: Type.TUnsafe<import("./ids.ts").Id<"head">>;
2049
+ base: Type.TUnion<[Type.TObject<{
2050
+ kind: Type.TLiteral<"start">;
2051
+ }>, Type.TObject<{
2052
+ kind: Type.TLiteral<"commit">;
2053
+ id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
2054
+ }>]>;
2055
+ stale: Type.TBoolean;
2056
+ }>, Type.TNull]>;
2057
+ execution: Type.TUnion<[Type.TObject<{
2058
+ kind: Type.TLiteral<"idle">;
2059
+ lastRun: Type.TUnion<[Type.TObject<{
2060
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2061
+ end: Type.TUnion<[Type.TObject<{
2062
+ kind: Type.TLiteral<"completed">;
2063
+ usage: Type.TObject<{
2064
+ input: Type.TNumber;
2065
+ output: Type.TNumber;
2066
+ cacheRead: Type.TNumber;
2067
+ cacheWrite: Type.TNumber;
2068
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
2069
+ total: Type.TNumber;
2070
+ cost: Type.TObject<{
2071
+ input: Type.TNumber;
2072
+ output: Type.TNumber;
2073
+ cacheRead: Type.TNumber;
2074
+ cacheWrite: Type.TNumber;
2075
+ total: Type.TNumber;
2076
+ }>;
2077
+ }>;
2078
+ }>, Type.TObject<{
2079
+ kind: Type.TLiteral<"stopped">;
2080
+ }>, Type.TObject<{
2081
+ kind: Type.TLiteral<"failed">;
2082
+ failure: Type.TObject<{
2083
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
2084
+ message: Type.TString;
2085
+ retryAfterMs: Type.TOptional<Type.TNumber>;
2086
+ }>;
2087
+ }>]>;
2088
+ endedAt: Type.TNumber;
2089
+ }>, Type.TNull]>;
2090
+ }>, Type.TObject<{
2091
+ kind: Type.TLiteral<"live">;
2092
+ run: Type.TObject<{
2093
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2094
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
2095
+ startedAt: Type.TNumber;
2096
+ attempt: Type.TNumber;
2097
+ configuration: Type.TObject<{
2098
+ kind: Type.TLiteral<"exact">;
2099
+ model: Type.TObject<{
2100
+ provider: Type.TString;
2101
+ id: Type.TString;
2102
+ }>;
2103
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
2104
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
2105
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
2106
+ settingsVersion: Type.TString;
2107
+ }>;
2108
+ origin: Type.TUnion<[Type.TObject<{
2109
+ kind: Type.TLiteral<"input">;
2110
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
2111
+ }>, Type.TObject<{
2112
+ kind: Type.TLiteral<"continuation">;
2113
+ from: Type.TEnum<["child", "job", "wake"]>;
2114
+ }>]>;
2115
+ }>;
2116
+ phase: Type.TEnum<["responding", "executing"]>;
2117
+ stopping: Type.TBoolean;
2118
+ }>, Type.TObject<{
2119
+ kind: Type.TLiteral<"waiting">;
2120
+ run: Type.TObject<{
2121
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2122
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
2123
+ startedAt: Type.TNumber;
2124
+ attempt: Type.TNumber;
2125
+ configuration: Type.TObject<{
2126
+ kind: Type.TLiteral<"exact">;
2127
+ model: Type.TObject<{
2128
+ provider: Type.TString;
2129
+ id: Type.TString;
2130
+ }>;
2131
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
2132
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
2133
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
2134
+ settingsVersion: Type.TString;
2135
+ }>;
2136
+ origin: Type.TUnion<[Type.TObject<{
2137
+ kind: Type.TLiteral<"input">;
2138
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
2139
+ }>, Type.TObject<{
2140
+ kind: Type.TLiteral<"continuation">;
2141
+ from: Type.TEnum<["child", "job", "wake"]>;
2142
+ }>]>;
2143
+ }>;
2144
+ on: Type.TUnion<[Type.TObject<{
2145
+ kind: Type.TLiteral<"run">;
2146
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
2147
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2148
+ deadline: Type.TOptional<Type.TNumber>;
2149
+ }>, Type.TObject<{
2150
+ kind: Type.TLiteral<"job">;
2151
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
2152
+ deadline: Type.TOptional<Type.TNumber>;
2153
+ }>, Type.TObject<{
2154
+ kind: Type.TLiteral<"part">;
2155
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
2156
+ deadline: Type.TOptional<Type.TNumber>;
2157
+ }>, Type.TObject<{
2158
+ kind: Type.TLiteral<"timer">;
2159
+ until: Type.TNumber;
2160
+ deadline: Type.TOptional<Type.TNumber>;
2161
+ }>]>;
2162
+ }>, Type.TObject<{
2163
+ kind: Type.TLiteral<"retrying">;
2164
+ run: Type.TObject<{
2165
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2166
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
2167
+ startedAt: Type.TNumber;
2168
+ attempt: Type.TNumber;
2169
+ configuration: Type.TObject<{
2170
+ kind: Type.TLiteral<"exact">;
2171
+ model: Type.TObject<{
2172
+ provider: Type.TString;
2173
+ id: Type.TString;
2174
+ }>;
2175
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
2176
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
2177
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
2178
+ settingsVersion: Type.TString;
2179
+ }>;
2180
+ origin: Type.TUnion<[Type.TObject<{
2181
+ kind: Type.TLiteral<"input">;
2182
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
2183
+ }>, Type.TObject<{
2184
+ kind: Type.TLiteral<"continuation">;
2185
+ from: Type.TEnum<["child", "job", "wake"]>;
2186
+ }>]>;
2187
+ }>;
2188
+ until: Type.TNumber;
2189
+ reason: Type.TString;
2190
+ }>]>;
2191
+ unread: Type.TBoolean;
2192
+ }>>;
2193
+ changes: Type.TArray<Type.TObject<{
2194
+ path: Type.TString;
2195
+ status: Type.TEnum<["added", "modified", "deleted", "renamed", "untracked", "conflicted"]>;
2196
+ added: Type.TNumber;
2197
+ removed: Type.TNumber;
2198
+ from: Type.TOptional<Type.TString>;
2199
+ }>>;
2200
+ catalog: Type.TObject<{
2201
+ commands: Type.TArray<Type.TObject<{
2202
+ name: Type.TString;
2203
+ owner: Type.TString;
2204
+ side: Type.TEnum<["core", "client"]>;
2205
+ title: Type.TString;
2206
+ description: Type.TString;
2207
+ takesText: Type.TBoolean;
2208
+ completes: Type.TBoolean;
2209
+ category: Type.TOptional<Type.TString>;
2210
+ keywords: Type.TOptional<Type.TArray<Type.TString>>;
2211
+ }>>;
2212
+ settings: Type.TArray<Type.TObject<{
2213
+ id: Type.TString;
2214
+ owner: Type.TString;
2215
+ scope: Type.TEnum<["host", "session"]>;
2216
+ label: Type.TString;
2217
+ schema: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
2218
+ choices: Type.TUnion<[Type.TArray<Type.TObject<{
2219
+ value: Type.TUnsafe<import("./json.ts").Json>;
2220
+ label: Type.TString;
2221
+ badge: Type.TOptional<Type.TString>;
2222
+ }>>, Type.TNull]>;
2223
+ value: Type.TUnsafe<import("./json.ts").Json>;
2224
+ from: Type.TEnum<["default", "host", "session"]>;
2225
+ }>>;
2226
+ skills: Type.TArray<Type.TObject<{
2227
+ name: Type.TString;
2228
+ owner: Type.TString;
2229
+ description: Type.TString;
2230
+ location: Type.TString;
2231
+ }>>;
2232
+ agents: Type.TArray<Type.TObject<{
2233
+ id: Type.TString;
2234
+ owner: Type.TString;
2235
+ description: Type.TUnion<[Type.TString, Type.TNull]>;
2236
+ model: Type.TUnion<[Type.TObject<{
2237
+ provider: Type.TString;
2238
+ id: Type.TString;
2239
+ }>, Type.TNull]>;
2240
+ mode: Type.TEnum<["primary", "subagent", "all"]>;
2241
+ }>>;
2242
+ tools: Type.TArray<Type.TObject<{
2243
+ name: Type.TString;
2244
+ owner: Type.TString;
2245
+ namespace: Type.TUnion<[Type.TString, Type.TNull]>;
2246
+ description: Type.TString;
2247
+ parameters: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
2248
+ output: Type.TUnion<[Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>, Type.TNull]>;
2249
+ exposure: Type.TEnum<["model", "deferred", "code", "hidden"]>;
2250
+ }>>;
2251
+ }>;
2252
+ }>;
2253
+ }>, Type.TObject<{
2254
+ kind: Type.TLiteral<"delta">;
2255
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
2256
+ revision: Type.TOptional<Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"revision">>, Type.TNull]>>;
2257
+ activation: Type.TOptional<Type.TUnion<[Type.TObject<{
2258
+ kind: Type.TLiteral<"active">;
2259
+ }>, Type.TObject<{
2260
+ kind: Type.TLiteral<"inactive">;
2261
+ }>, Type.TObject<{
2262
+ kind: Type.TLiteral<"unavailable">;
2263
+ reason: Type.TEnum<["unsupported", "unreachable"]>;
2264
+ workspace: Type.TUnsafe<import("./ids.ts").Id<"workspace">>;
2265
+ }>, Type.TObject<{
2266
+ kind: Type.TLiteral<"failed">;
2267
+ message: Type.TString;
2268
+ }>]>>;
2269
+ messages: Type.TOptional<Type.TObject<{
2270
+ runs: Type.TArray<Type.TNumber>;
2271
+ items: Type.TArray<Type.TUnion<[Type.TObject<{
2272
+ kind: Type.TLiteral<"user">;
2273
+ content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
2274
+ kind: Type.TLiteral<"text">;
2275
+ text: Type.TString;
2276
+ }>, Type.TObject<{
2277
+ kind: Type.TLiteral<"file">;
2278
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
2279
+ mime: Type.TString;
2280
+ name: Type.TString;
2281
+ }>, Type.TObject<{
2282
+ kind: Type.TLiteral<"reference">;
2283
+ path: Type.TString;
2284
+ blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
2285
+ }>, Type.TObject<{
2286
+ kind: Type.TLiteral<"skill">;
2287
+ name: Type.TString;
2288
+ location: Type.TString;
2289
+ }>, Type.TObject<{
2290
+ kind: Type.TLiteral<"excerpt">;
2291
+ source: Type.TUnion<[Type.TObject<{
2292
+ kind: Type.TLiteral<"diff">;
2293
+ path: Type.TString;
2294
+ side: Type.TEnum<["old", "new"]>;
2295
+ start: Type.TNumber;
2296
+ end: Type.TNumber;
2297
+ }>, Type.TObject<{
2298
+ kind: Type.TLiteral<"terminal">;
2299
+ command: Type.TOptional<Type.TString>;
2300
+ }>, Type.TObject<{
2301
+ kind: Type.TLiteral<"browser">;
2302
+ url: Type.TString;
2303
+ selector: Type.TString;
2304
+ }>]>;
2305
+ text: Type.TString;
2306
+ }>]>>]>;
2307
+ source: Type.TUnion<[Type.TObject<{
2308
+ kind: Type.TLiteral<"user">;
2309
+ }>, Type.TObject<{
2310
+ kind: Type.TLiteral<"child">;
2311
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
2312
+ end: Type.TEnum<["completed", "stopped", "failed"]>;
2313
+ }>, Type.TObject<{
2314
+ kind: Type.TLiteral<"job">;
2315
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
2316
+ }>, Type.TObject<{
2317
+ kind: Type.TLiteral<"shell">;
2318
+ }>, Type.TObject<{
2319
+ kind: Type.TLiteral<"action">;
2320
+ label: Type.TString;
2321
+ command: Type.TOptional<Type.TString>;
2322
+ }>]>;
2323
+ delivery: Type.TEnum<["steer", "queue", "attach"]>;
2324
+ status: Type.TUnion<[Type.TObject<{
2325
+ kind: Type.TLiteral<"unsent">;
2326
+ attempts: Type.TNumber;
2327
+ retrying: Type.TUnion<[Type.TObject<{
2328
+ at: Type.TNumber;
2329
+ reason: Type.TString;
2330
+ }>, Type.TNull]>;
2331
+ }>, Type.TObject<{
2332
+ kind: Type.TLiteral<"pending">;
2333
+ schedule: Type.TUnion<[Type.TObject<{
2334
+ kind: Type.TLiteral<"joined">;
2335
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2336
+ }>, Type.TObject<{
2337
+ kind: Type.TLiteral<"next-turn">;
2338
+ reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
2339
+ }>, Type.TObject<{
2340
+ kind: Type.TLiteral<"attached">;
2341
+ }>, Type.TObject<{
2342
+ kind: Type.TLiteral<"deciding">;
2343
+ }>]>;
2344
+ covered: Type.TBoolean;
2345
+ }>, Type.TObject<{
2346
+ kind: Type.TLiteral<"landed">;
2347
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
2348
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
2349
+ replaced: Type.TUnion<[Type.TObject<{
2350
+ previous: Type.TUnsafe<import("./ids.ts").Id<"message">>;
2351
+ stopped: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
2352
+ }>, Type.TNull]>;
2353
+ }>]>;
2354
+ siblings: Type.TObject<{
2355
+ index: Type.TNumber;
2356
+ count: Type.TNumber;
2357
+ ids: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
2358
+ }>;
2359
+ id: Type.TUnsafe<import("./ids.ts").Id<"message">>;
2360
+ turn: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
2361
+ at: Type.TNumber;
2362
+ }>, Type.TObject<{
2363
+ kind: Type.TLiteral<"part">;
2364
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
2365
+ partKind: Type.TString;
2366
+ role: Type.TEnum<["step", "answer", "note"]>;
2367
+ state: Type.TUnknown;
2368
+ version: Type.TNumber;
2369
+ status: Type.TUnion<[Type.TObject<{
2370
+ kind: Type.TLiteral<"live">;
2371
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
2372
+ waiting: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"call">>>;
2373
+ answer: Type.TOptional<Type.TObject<{
2374
+ action: Type.TString;
2375
+ input: Type.TUnsafe<import("./json.ts").Json>;
2376
+ }>>;
2377
+ }>, Type.TObject<{
2378
+ kind: Type.TLiteral<"waiting">;
2379
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2380
+ on: Type.TUnion<[Type.TObject<{
2381
+ kind: Type.TLiteral<"run">;
2382
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
2383
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2384
+ deadline: Type.TOptional<Type.TNumber>;
2385
+ }>, Type.TObject<{
2386
+ kind: Type.TLiteral<"job">;
2387
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
2388
+ deadline: Type.TOptional<Type.TNumber>;
2389
+ }>, Type.TObject<{
2390
+ kind: Type.TLiteral<"part">;
2391
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
2392
+ deadline: Type.TOptional<Type.TNumber>;
2393
+ }>, Type.TObject<{
2394
+ kind: Type.TLiteral<"timer">;
2395
+ until: Type.TNumber;
2396
+ deadline: Type.TOptional<Type.TNumber>;
2397
+ }>]>;
2398
+ }>, Type.TObject<{
2399
+ kind: Type.TLiteral<"settled">;
2400
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
2401
+ endedAt: Type.TNumber;
2402
+ }>, Type.TObject<{
2403
+ kind: Type.TLiteral<"failed">;
2404
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
2405
+ failure: Type.TObject<{
2406
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
2407
+ message: Type.TString;
2408
+ retryAfterMs: Type.TOptional<Type.TNumber>;
2409
+ }>;
2410
+ }>]>;
2411
+ id: Type.TUnsafe<import("./ids.ts").Id<"message">>;
2412
+ turn: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
2413
+ at: Type.TNumber;
2414
+ }>]>>;
2415
+ }>>;
2416
+ appends: Type.TOptional<Type.TArray<Type.TObject<{
2417
+ at: Type.TNumber;
2418
+ append: Type.TString;
2419
+ version: Type.TNumber;
2420
+ }>>>;
2421
+ leadingPrompt: Type.TOptional<Type.TUnion<[Type.TObject<{
2422
+ kind: Type.TLiteral<"user">;
2423
+ content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
2424
+ kind: Type.TLiteral<"text">;
2425
+ text: Type.TString;
2426
+ }>, Type.TObject<{
2427
+ kind: Type.TLiteral<"file">;
2428
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
2429
+ mime: Type.TString;
2430
+ name: Type.TString;
2431
+ }>, Type.TObject<{
2432
+ kind: Type.TLiteral<"reference">;
2433
+ path: Type.TString;
2434
+ blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
2435
+ }>, Type.TObject<{
2436
+ kind: Type.TLiteral<"skill">;
2437
+ name: Type.TString;
2438
+ location: Type.TString;
2439
+ }>, Type.TObject<{
2440
+ kind: Type.TLiteral<"excerpt">;
2441
+ source: Type.TUnion<[Type.TObject<{
2442
+ kind: Type.TLiteral<"diff">;
2443
+ path: Type.TString;
2444
+ side: Type.TEnum<["old", "new"]>;
2445
+ start: Type.TNumber;
2446
+ end: Type.TNumber;
2447
+ }>, Type.TObject<{
2448
+ kind: Type.TLiteral<"terminal">;
2449
+ command: Type.TOptional<Type.TString>;
2450
+ }>, Type.TObject<{
2451
+ kind: Type.TLiteral<"browser">;
2452
+ url: Type.TString;
2453
+ selector: Type.TString;
2454
+ }>]>;
2455
+ text: Type.TString;
2456
+ }>]>>]>;
2457
+ source: Type.TUnion<[Type.TObject<{
2458
+ kind: Type.TLiteral<"user">;
2459
+ }>, Type.TObject<{
2460
+ kind: Type.TLiteral<"child">;
2461
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
2462
+ end: Type.TEnum<["completed", "stopped", "failed"]>;
2463
+ }>, Type.TObject<{
2464
+ kind: Type.TLiteral<"job">;
2465
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
2466
+ }>, Type.TObject<{
2467
+ kind: Type.TLiteral<"shell">;
2468
+ }>, Type.TObject<{
2469
+ kind: Type.TLiteral<"action">;
2470
+ label: Type.TString;
2471
+ command: Type.TOptional<Type.TString>;
2472
+ }>]>;
2473
+ delivery: Type.TEnum<["steer", "queue", "attach"]>;
2474
+ status: Type.TUnion<[Type.TObject<{
2475
+ kind: Type.TLiteral<"unsent">;
2476
+ attempts: Type.TNumber;
2477
+ retrying: Type.TUnion<[Type.TObject<{
2478
+ at: Type.TNumber;
2479
+ reason: Type.TString;
2480
+ }>, Type.TNull]>;
2481
+ }>, Type.TObject<{
2482
+ kind: Type.TLiteral<"pending">;
2483
+ schedule: Type.TUnion<[Type.TObject<{
2484
+ kind: Type.TLiteral<"joined">;
2485
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2486
+ }>, Type.TObject<{
2487
+ kind: Type.TLiteral<"next-turn">;
2488
+ reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
2489
+ }>, Type.TObject<{
2490
+ kind: Type.TLiteral<"attached">;
2491
+ }>, Type.TObject<{
2492
+ kind: Type.TLiteral<"deciding">;
2493
+ }>]>;
2494
+ covered: Type.TBoolean;
2495
+ }>, Type.TObject<{
2496
+ kind: Type.TLiteral<"landed">;
2497
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
2498
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
2499
+ replaced: Type.TUnion<[Type.TObject<{
2500
+ previous: Type.TUnsafe<import("./ids.ts").Id<"message">>;
2501
+ stopped: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
2502
+ }>, Type.TNull]>;
2503
+ }>]>;
2504
+ siblings: Type.TObject<{
2505
+ index: Type.TNumber;
2506
+ count: Type.TNumber;
2507
+ ids: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
2508
+ }>;
2509
+ id: Type.TUnsafe<import("./ids.ts").Id<"message">>;
2510
+ turn: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
2511
+ at: Type.TNumber;
2512
+ }>, Type.TNull]>>;
2513
+ parts: Type.TOptional<Type.TObject<{
2514
+ runs: Type.TArray<Type.TNumber>;
2515
+ items: Type.TArray<Type.TObject<{
2516
+ id: Type.TUnsafe<import("./ids.ts").Id<"part">>;
2517
+ partKind: Type.TString;
2518
+ placement: Type.TUnion<[Type.TObject<{
2519
+ kind: Type.TLiteral<"transcript">;
2520
+ role: Type.TEnum<["step", "answer", "note"]>;
2521
+ }>, Type.TObject<{
2522
+ kind: Type.TLiteral<"modal">;
2523
+ }>, Type.TIntersect<[Type.TObject<{
2524
+ kind: Type.TString;
2525
+ }>, Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>]>]>;
2526
+ state: Type.TUnsafe<import("./json.ts").Json>;
2527
+ version: Type.TNumber;
2528
+ status: Type.TUnion<[Type.TObject<{
2529
+ kind: Type.TLiteral<"live">;
2530
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
2531
+ waiting: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"call">>>;
2532
+ answer: Type.TOptional<Type.TObject<{
2533
+ action: Type.TString;
2534
+ input: Type.TUnsafe<import("./json.ts").Json>;
2535
+ }>>;
2536
+ }>, Type.TObject<{
2537
+ kind: Type.TLiteral<"waiting">;
2538
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2539
+ on: Type.TUnion<[Type.TObject<{
2540
+ kind: Type.TLiteral<"run">;
2541
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
2542
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2543
+ deadline: Type.TOptional<Type.TNumber>;
2544
+ }>, Type.TObject<{
2545
+ kind: Type.TLiteral<"job">;
2546
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
2547
+ deadline: Type.TOptional<Type.TNumber>;
2548
+ }>, Type.TObject<{
2549
+ kind: Type.TLiteral<"part">;
2550
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
2551
+ deadline: Type.TOptional<Type.TNumber>;
2552
+ }>, Type.TObject<{
2553
+ kind: Type.TLiteral<"timer">;
2554
+ until: Type.TNumber;
2555
+ deadline: Type.TOptional<Type.TNumber>;
2556
+ }>]>;
2557
+ }>, Type.TObject<{
2558
+ kind: Type.TLiteral<"settled">;
2559
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
2560
+ endedAt: Type.TNumber;
2561
+ }>, Type.TObject<{
2562
+ kind: Type.TLiteral<"failed">;
2563
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
2564
+ failure: Type.TObject<{
2565
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
2566
+ message: Type.TString;
2567
+ retryAfterMs: Type.TOptional<Type.TNumber>;
2568
+ }>;
2569
+ }>]>;
2570
+ owner: Type.TUnion<[Type.TString, Type.TNull]>;
2571
+ }>>;
2572
+ }>>;
2573
+ turns: Type.TOptional<Type.TObject<{
2574
+ runs: Type.TArray<Type.TNumber>;
2575
+ items: Type.TArray<Type.TObject<{
2576
+ id: Type.TUnsafe<import("./ids.ts").Id<"turn">>;
2577
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
2578
+ prompt: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"message">>, Type.TNull]>;
2579
+ state: Type.TUnion<[Type.TObject<{
2580
+ kind: Type.TLiteral<"working">;
2581
+ activity: Type.TUnion<[Type.TString, Type.TNull]>;
2582
+ }>, Type.TObject<{
2583
+ kind: Type.TLiteral<"waiting">;
2584
+ on: Type.TUnion<[Type.TObject<{
2585
+ kind: Type.TLiteral<"run">;
2586
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
2587
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2588
+ deadline: Type.TOptional<Type.TNumber>;
2589
+ }>, Type.TObject<{
2590
+ kind: Type.TLiteral<"job">;
2591
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
2592
+ deadline: Type.TOptional<Type.TNumber>;
2593
+ }>, Type.TObject<{
2594
+ kind: Type.TLiteral<"part">;
2595
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
2596
+ deadline: Type.TOptional<Type.TNumber>;
2597
+ }>, Type.TObject<{
2598
+ kind: Type.TLiteral<"timer">;
2599
+ until: Type.TNumber;
2600
+ deadline: Type.TOptional<Type.TNumber>;
2601
+ }>]>;
2602
+ }>, Type.TObject<{
2603
+ kind: Type.TLiteral<"ended">;
2604
+ end: Type.TUnion<[Type.TObject<{
2605
+ kind: Type.TLiteral<"completed">;
2606
+ usage: Type.TObject<{
2607
+ input: Type.TNumber;
2608
+ output: Type.TNumber;
2609
+ cacheRead: Type.TNumber;
2610
+ cacheWrite: Type.TNumber;
2611
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
2612
+ total: Type.TNumber;
2613
+ cost: Type.TObject<{
2614
+ input: Type.TNumber;
2615
+ output: Type.TNumber;
2616
+ cacheRead: Type.TNumber;
2617
+ cacheWrite: Type.TNumber;
2618
+ total: Type.TNumber;
2619
+ }>;
2620
+ }>;
2621
+ }>, Type.TObject<{
2622
+ kind: Type.TLiteral<"stopped">;
2623
+ }>, Type.TObject<{
2624
+ kind: Type.TLiteral<"failed">;
2625
+ failure: Type.TObject<{
2626
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
2627
+ message: Type.TString;
2628
+ retryAfterMs: Type.TOptional<Type.TNumber>;
2629
+ }>;
2630
+ }>]>;
2631
+ }>]>;
2632
+ startedAt: Type.TNumber;
2633
+ endedAt: Type.TUnion<[Type.TNumber, Type.TNull]>;
2634
+ steps: Type.TNumber;
2635
+ thinkingOnly: Type.TBoolean;
2636
+ summary: Type.TObject<{
2637
+ byClass: Type.TObject<{
2638
+ read: Type.TObject<{
2639
+ count: Type.TNumber;
2640
+ paths: Type.TArray<Type.TString>;
2641
+ }>;
2642
+ list: Type.TObject<{
2643
+ count: Type.TNumber;
2644
+ paths: Type.TArray<Type.TString>;
2645
+ }>;
2646
+ edit: Type.TObject<{
2647
+ count: Type.TNumber;
2648
+ paths: Type.TArray<Type.TString>;
2649
+ }>;
2650
+ shell: Type.TObject<{
2651
+ count: Type.TNumber;
2652
+ paths: Type.TArray<Type.TString>;
2653
+ }>;
2654
+ delegate: Type.TObject<{
2655
+ count: Type.TNumber;
2656
+ paths: Type.TArray<Type.TString>;
2657
+ }>;
2658
+ custom: Type.TObject<{
2659
+ count: Type.TNumber;
2660
+ paths: Type.TArray<Type.TString>;
2661
+ }>;
2662
+ }>;
2663
+ failed: Type.TNumber;
2664
+ stopped: Type.TNumber;
2665
+ added: Type.TNumber;
2666
+ removed: Type.TNumber;
2667
+ }>;
2668
+ }>>;
2669
+ }>>;
2670
+ usage: Type.TOptional<Type.TObject<{
2671
+ input: Type.TNumber;
2672
+ output: Type.TNumber;
2673
+ cacheRead: Type.TNumber;
2674
+ cacheWrite: Type.TNumber;
2675
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
2676
+ total: Type.TNumber;
2677
+ cost: Type.TObject<{
2678
+ input: Type.TNumber;
2679
+ output: Type.TNumber;
2680
+ cacheRead: Type.TNumber;
2681
+ cacheWrite: Type.TNumber;
2682
+ total: Type.TNumber;
2683
+ }>;
2684
+ }>>;
2685
+ execution: Type.TOptional<Type.TUnion<[Type.TObject<{
2686
+ kind: Type.TLiteral<"idle">;
2687
+ lastRun: Type.TUnion<[Type.TObject<{
2688
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2689
+ end: Type.TUnion<[Type.TObject<{
2690
+ kind: Type.TLiteral<"completed">;
2691
+ usage: Type.TObject<{
2692
+ input: Type.TNumber;
2693
+ output: Type.TNumber;
2694
+ cacheRead: Type.TNumber;
2695
+ cacheWrite: Type.TNumber;
2696
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
2697
+ total: Type.TNumber;
2698
+ cost: Type.TObject<{
2699
+ input: Type.TNumber;
2700
+ output: Type.TNumber;
2701
+ cacheRead: Type.TNumber;
2702
+ cacheWrite: Type.TNumber;
2703
+ total: Type.TNumber;
2704
+ }>;
2705
+ }>;
2706
+ }>, Type.TObject<{
2707
+ kind: Type.TLiteral<"stopped">;
2708
+ }>, Type.TObject<{
2709
+ kind: Type.TLiteral<"failed">;
2710
+ failure: Type.TObject<{
2711
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
2712
+ message: Type.TString;
2713
+ retryAfterMs: Type.TOptional<Type.TNumber>;
2714
+ }>;
2715
+ }>]>;
2716
+ endedAt: Type.TNumber;
2717
+ }>, Type.TNull]>;
2718
+ }>, Type.TObject<{
2719
+ kind: Type.TLiteral<"live">;
2720
+ run: Type.TObject<{
2721
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2722
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
2723
+ startedAt: Type.TNumber;
2724
+ attempt: Type.TNumber;
2725
+ configuration: Type.TObject<{
2726
+ kind: Type.TLiteral<"exact">;
2727
+ model: Type.TObject<{
2728
+ provider: Type.TString;
2729
+ id: Type.TString;
2730
+ }>;
2731
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
2732
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
2733
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
2734
+ settingsVersion: Type.TString;
2735
+ }>;
2736
+ origin: Type.TUnion<[Type.TObject<{
2737
+ kind: Type.TLiteral<"input">;
2738
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
2739
+ }>, Type.TObject<{
2740
+ kind: Type.TLiteral<"continuation">;
2741
+ from: Type.TEnum<["child", "job", "wake"]>;
2742
+ }>]>;
2743
+ }>;
2744
+ phase: Type.TEnum<["responding", "executing"]>;
2745
+ stopping: Type.TBoolean;
2746
+ }>, Type.TObject<{
2747
+ kind: Type.TLiteral<"waiting">;
2748
+ run: Type.TObject<{
2749
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2750
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
2751
+ startedAt: Type.TNumber;
2752
+ attempt: Type.TNumber;
2753
+ configuration: Type.TObject<{
2754
+ kind: Type.TLiteral<"exact">;
2755
+ model: Type.TObject<{
2756
+ provider: Type.TString;
2757
+ id: Type.TString;
2758
+ }>;
2759
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
2760
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
2761
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
2762
+ settingsVersion: Type.TString;
2763
+ }>;
2764
+ origin: Type.TUnion<[Type.TObject<{
2765
+ kind: Type.TLiteral<"input">;
2766
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
2767
+ }>, Type.TObject<{
2768
+ kind: Type.TLiteral<"continuation">;
2769
+ from: Type.TEnum<["child", "job", "wake"]>;
2770
+ }>]>;
2771
+ }>;
2772
+ on: Type.TUnion<[Type.TObject<{
2773
+ kind: Type.TLiteral<"run">;
2774
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
2775
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2776
+ deadline: Type.TOptional<Type.TNumber>;
2777
+ }>, Type.TObject<{
2778
+ kind: Type.TLiteral<"job">;
2779
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
2780
+ deadline: Type.TOptional<Type.TNumber>;
2781
+ }>, Type.TObject<{
2782
+ kind: Type.TLiteral<"part">;
2783
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
2784
+ deadline: Type.TOptional<Type.TNumber>;
2785
+ }>, Type.TObject<{
2786
+ kind: Type.TLiteral<"timer">;
2787
+ until: Type.TNumber;
2788
+ deadline: Type.TOptional<Type.TNumber>;
2789
+ }>]>;
2790
+ }>, Type.TObject<{
2791
+ kind: Type.TLiteral<"retrying">;
2792
+ run: Type.TObject<{
2793
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2794
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
2795
+ startedAt: Type.TNumber;
2796
+ attempt: Type.TNumber;
2797
+ configuration: Type.TObject<{
2798
+ kind: Type.TLiteral<"exact">;
2799
+ model: Type.TObject<{
2800
+ provider: Type.TString;
2801
+ id: Type.TString;
2802
+ }>;
2803
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
2804
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
2805
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
2806
+ settingsVersion: Type.TString;
2807
+ }>;
2808
+ origin: Type.TUnion<[Type.TObject<{
2809
+ kind: Type.TLiteral<"input">;
2810
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
2811
+ }>, Type.TObject<{
2812
+ kind: Type.TLiteral<"continuation">;
2813
+ from: Type.TEnum<["child", "job", "wake"]>;
2814
+ }>]>;
2815
+ }>;
2816
+ until: Type.TNumber;
2817
+ reason: Type.TString;
2818
+ }>]>>;
2819
+ background: Type.TOptional<Type.TObject<{
2820
+ runs: Type.TArray<Type.TNumber>;
2821
+ items: Type.TArray<Type.TObject<{
2822
+ kind: Type.TEnum<["child", "job", "page"]>;
2823
+ id: Type.TString;
2824
+ title: Type.TString;
2825
+ state: Type.TEnum<["working", "waiting", "done", "failed"]>;
2826
+ startedBy: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"call">>, Type.TNull]>;
2827
+ }>>;
2828
+ }>>;
2829
+ configuration: Type.TOptional<Type.TObject<{
2830
+ selected: Type.TUnion<[Type.TObject<{
2831
+ kind: Type.TLiteral<"exact">;
2832
+ model: Type.TObject<{
2833
+ provider: Type.TString;
2834
+ id: Type.TString;
2835
+ }>;
2836
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
2837
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
2838
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
2839
+ settingsVersion: Type.TString;
2840
+ }>, Type.TNull]>;
2841
+ effective: Type.TUnion<[Type.TObject<{
2842
+ kind: Type.TLiteral<"exact">;
2843
+ model: Type.TObject<{
2844
+ provider: Type.TString;
2845
+ id: Type.TString;
2846
+ }>;
2847
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
2848
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
2849
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
2850
+ settingsVersion: Type.TString;
2851
+ }>, Type.TNull]>;
2852
+ }>>;
2853
+ context: Type.TOptional<Type.TObject<{
2854
+ tokens: Type.TNumber;
2855
+ window: Type.TNumber;
2856
+ lastRequest: Type.TUnion<[Type.TObject<{
2857
+ input: Type.TNumber;
2858
+ output: Type.TNumber;
2859
+ cacheRead: Type.TNumber;
2860
+ cacheWrite: Type.TNumber;
2861
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
2862
+ total: Type.TNumber;
2863
+ cost: Type.TObject<{
2864
+ input: Type.TNumber;
2865
+ output: Type.TNumber;
2866
+ cacheRead: Type.TNumber;
2867
+ cacheWrite: Type.TNumber;
2868
+ total: Type.TNumber;
2869
+ }>;
2870
+ }>, Type.TNull]>;
2871
+ }>>;
2872
+ heads: Type.TOptional<Type.TObject<{
2873
+ runs: Type.TArray<Type.TNumber>;
2874
+ items: Type.TArray<Type.TObject<{
2875
+ name: Type.TUnsafe<import("./ids.ts").Id<"head">>;
2876
+ tip: Type.TUnion<[Type.TObject<{
2877
+ kind: Type.TLiteral<"start">;
2878
+ }>, Type.TObject<{
2879
+ kind: Type.TLiteral<"commit">;
2880
+ id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
2881
+ }>]>;
2882
+ stack: Type.TUnion<[Type.TObject<{
2883
+ parent: Type.TUnsafe<import("./ids.ts").Id<"head">>;
2884
+ base: Type.TUnion<[Type.TObject<{
2885
+ kind: Type.TLiteral<"start">;
2886
+ }>, Type.TObject<{
2887
+ kind: Type.TLiteral<"commit">;
2888
+ id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
2889
+ }>]>;
2890
+ stale: Type.TBoolean;
2891
+ }>, Type.TNull]>;
2892
+ execution: Type.TUnion<[Type.TObject<{
2893
+ kind: Type.TLiteral<"idle">;
2894
+ lastRun: Type.TUnion<[Type.TObject<{
2895
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2896
+ end: Type.TUnion<[Type.TObject<{
2897
+ kind: Type.TLiteral<"completed">;
2898
+ usage: Type.TObject<{
2899
+ input: Type.TNumber;
2900
+ output: Type.TNumber;
2901
+ cacheRead: Type.TNumber;
2902
+ cacheWrite: Type.TNumber;
2903
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
2904
+ total: Type.TNumber;
2905
+ cost: Type.TObject<{
2906
+ input: Type.TNumber;
2907
+ output: Type.TNumber;
2908
+ cacheRead: Type.TNumber;
2909
+ cacheWrite: Type.TNumber;
2910
+ total: Type.TNumber;
2911
+ }>;
2912
+ }>;
2913
+ }>, Type.TObject<{
2914
+ kind: Type.TLiteral<"stopped">;
2915
+ }>, Type.TObject<{
2916
+ kind: Type.TLiteral<"failed">;
2917
+ failure: Type.TObject<{
2918
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
2919
+ message: Type.TString;
2920
+ retryAfterMs: Type.TOptional<Type.TNumber>;
2921
+ }>;
2922
+ }>]>;
2923
+ endedAt: Type.TNumber;
2924
+ }>, Type.TNull]>;
2925
+ }>, Type.TObject<{
2926
+ kind: Type.TLiteral<"live">;
2927
+ run: Type.TObject<{
2928
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2929
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
2930
+ startedAt: Type.TNumber;
2931
+ attempt: Type.TNumber;
2932
+ configuration: Type.TObject<{
2933
+ kind: Type.TLiteral<"exact">;
2934
+ model: Type.TObject<{
2935
+ provider: Type.TString;
2936
+ id: Type.TString;
2937
+ }>;
2938
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
2939
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
2940
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
2941
+ settingsVersion: Type.TString;
2942
+ }>;
2943
+ origin: Type.TUnion<[Type.TObject<{
2944
+ kind: Type.TLiteral<"input">;
2945
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
2946
+ }>, Type.TObject<{
2947
+ kind: Type.TLiteral<"continuation">;
2948
+ from: Type.TEnum<["child", "job", "wake"]>;
2949
+ }>]>;
2950
+ }>;
2951
+ phase: Type.TEnum<["responding", "executing"]>;
2952
+ stopping: Type.TBoolean;
2953
+ }>, Type.TObject<{
2954
+ kind: Type.TLiteral<"waiting">;
2955
+ run: Type.TObject<{
2956
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2957
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
2958
+ startedAt: Type.TNumber;
2959
+ attempt: Type.TNumber;
2960
+ configuration: Type.TObject<{
2961
+ kind: Type.TLiteral<"exact">;
2962
+ model: Type.TObject<{
2963
+ provider: Type.TString;
2964
+ id: Type.TString;
2965
+ }>;
2966
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
2967
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
2968
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
2969
+ settingsVersion: Type.TString;
2970
+ }>;
2971
+ origin: Type.TUnion<[Type.TObject<{
2972
+ kind: Type.TLiteral<"input">;
2973
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
2974
+ }>, Type.TObject<{
2975
+ kind: Type.TLiteral<"continuation">;
2976
+ from: Type.TEnum<["child", "job", "wake"]>;
2977
+ }>]>;
2978
+ }>;
2979
+ on: Type.TUnion<[Type.TObject<{
2980
+ kind: Type.TLiteral<"run">;
2981
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
2982
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
2983
+ deadline: Type.TOptional<Type.TNumber>;
2984
+ }>, Type.TObject<{
2985
+ kind: Type.TLiteral<"job">;
2986
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
2987
+ deadline: Type.TOptional<Type.TNumber>;
2988
+ }>, Type.TObject<{
2989
+ kind: Type.TLiteral<"part">;
2990
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
2991
+ deadline: Type.TOptional<Type.TNumber>;
2992
+ }>, Type.TObject<{
2993
+ kind: Type.TLiteral<"timer">;
2994
+ until: Type.TNumber;
2995
+ deadline: Type.TOptional<Type.TNumber>;
2996
+ }>]>;
2997
+ }>, Type.TObject<{
2998
+ kind: Type.TLiteral<"retrying">;
2999
+ run: Type.TObject<{
3000
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
3001
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
3002
+ startedAt: Type.TNumber;
3003
+ attempt: Type.TNumber;
3004
+ configuration: Type.TObject<{
3005
+ kind: Type.TLiteral<"exact">;
3006
+ model: Type.TObject<{
3007
+ provider: Type.TString;
3008
+ id: Type.TString;
3009
+ }>;
3010
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
3011
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
3012
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
3013
+ settingsVersion: Type.TString;
3014
+ }>;
3015
+ origin: Type.TUnion<[Type.TObject<{
3016
+ kind: Type.TLiteral<"input">;
3017
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
3018
+ }>, Type.TObject<{
3019
+ kind: Type.TLiteral<"continuation">;
3020
+ from: Type.TEnum<["child", "job", "wake"]>;
3021
+ }>]>;
3022
+ }>;
3023
+ until: Type.TNumber;
3024
+ reason: Type.TString;
3025
+ }>]>;
3026
+ unread: Type.TBoolean;
3027
+ }>>;
3028
+ }>>;
3029
+ changes: Type.TOptional<Type.TObject<{
3030
+ runs: Type.TArray<Type.TNumber>;
3031
+ items: Type.TArray<Type.TObject<{
3032
+ path: Type.TString;
3033
+ status: Type.TEnum<["added", "modified", "deleted", "renamed", "untracked", "conflicted"]>;
3034
+ added: Type.TNumber;
3035
+ removed: Type.TNumber;
3036
+ from: Type.TOptional<Type.TString>;
3037
+ }>>;
3038
+ }>>;
3039
+ catalog: Type.TOptional<Type.TObject<{
3040
+ commands: Type.TArray<Type.TObject<{
3041
+ name: Type.TString;
3042
+ owner: Type.TString;
3043
+ side: Type.TEnum<["core", "client"]>;
3044
+ title: Type.TString;
3045
+ description: Type.TString;
3046
+ takesText: Type.TBoolean;
3047
+ completes: Type.TBoolean;
3048
+ category: Type.TOptional<Type.TString>;
3049
+ keywords: Type.TOptional<Type.TArray<Type.TString>>;
3050
+ }>>;
3051
+ settings: Type.TArray<Type.TObject<{
3052
+ id: Type.TString;
3053
+ owner: Type.TString;
3054
+ scope: Type.TEnum<["host", "session"]>;
3055
+ label: Type.TString;
3056
+ schema: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
3057
+ choices: Type.TUnion<[Type.TArray<Type.TObject<{
3058
+ value: Type.TUnsafe<import("./json.ts").Json>;
3059
+ label: Type.TString;
3060
+ badge: Type.TOptional<Type.TString>;
3061
+ }>>, Type.TNull]>;
3062
+ value: Type.TUnsafe<import("./json.ts").Json>;
3063
+ from: Type.TEnum<["default", "host", "session"]>;
3064
+ }>>;
3065
+ skills: Type.TArray<Type.TObject<{
3066
+ name: Type.TString;
3067
+ owner: Type.TString;
3068
+ description: Type.TString;
3069
+ location: Type.TString;
3070
+ }>>;
3071
+ agents: Type.TArray<Type.TObject<{
3072
+ id: Type.TString;
3073
+ owner: Type.TString;
3074
+ description: Type.TUnion<[Type.TString, Type.TNull]>;
3075
+ model: Type.TUnion<[Type.TObject<{
3076
+ provider: Type.TString;
3077
+ id: Type.TString;
3078
+ }>, Type.TNull]>;
3079
+ mode: Type.TEnum<["primary", "subagent", "all"]>;
3080
+ }>>;
3081
+ tools: Type.TArray<Type.TObject<{
3082
+ name: Type.TString;
3083
+ owner: Type.TString;
3084
+ namespace: Type.TUnion<[Type.TString, Type.TNull]>;
3085
+ description: Type.TString;
3086
+ parameters: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
3087
+ output: Type.TUnion<[Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>, Type.TNull]>;
3088
+ exposure: Type.TEnum<["model", "deferred", "code", "hidden"]>;
3089
+ }>>;
3090
+ }>>;
3091
+ }>]>;
3092
+ /** One frame of a head's watch on the wire: the whole view first, then each later view as what changed since the frame before it, an absent field unchanged; a null `leadingPrompt` clears it. */
3093
+ export type ViewFrame = Decoded<typeof ViewFrameType>;
3094
+ export declare const ViewOptionsSchema: Schema<ViewOptions>;
3095
+ export declare const UserStatusSchema: Schema<UserStatus>;
3096
+ export declare const MessageSchema: Schema<Message>;
3097
+ export declare const TurnInfoSchema: Schema<TurnInfo>;
3098
+ export declare const SessionViewSchema: Schema<SessionView>;
3099
+ export declare const HistoryPageSchema: Schema<HistoryPage>;
3100
+ export declare const ViewFrameSchema: Schema<ViewFrame>;
3101
+ /** One array of a view as the previous frame's array spliced: `runs` holds `[from, count]` pairs, each copying `count` items of the previous array from `from`, or with `from` -1 taking the next `count` of `items`. */
3102
+ export type ViewSplice<T> = {
3103
+ readonly runs: readonly number[];
3104
+ readonly items: readonly T[];
3105
+ };