@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,1752 @@
1
+ import { Type } from "typebox";
2
+ import type { Decoded, Schema } from "./schema.ts";
3
+ export declare const CommitBodyType: Type.TUnion<[Type.TObject<{
4
+ kind: Type.TLiteral<"user">;
5
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
6
+ content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
7
+ kind: Type.TLiteral<"text">;
8
+ text: Type.TString;
9
+ }>, Type.TObject<{
10
+ kind: Type.TLiteral<"file">;
11
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
12
+ mime: Type.TString;
13
+ name: Type.TString;
14
+ }>, Type.TObject<{
15
+ kind: Type.TLiteral<"reference">;
16
+ path: Type.TString;
17
+ blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
18
+ }>, Type.TObject<{
19
+ kind: Type.TLiteral<"skill">;
20
+ name: Type.TString;
21
+ location: Type.TString;
22
+ }>, Type.TObject<{
23
+ kind: Type.TLiteral<"excerpt">;
24
+ source: Type.TUnion<[Type.TObject<{
25
+ kind: Type.TLiteral<"diff">;
26
+ path: Type.TString;
27
+ side: Type.TEnum<["old", "new"]>;
28
+ start: Type.TNumber;
29
+ end: Type.TNumber;
30
+ }>, Type.TObject<{
31
+ kind: Type.TLiteral<"terminal">;
32
+ command: Type.TOptional<Type.TString>;
33
+ }>, Type.TObject<{
34
+ kind: Type.TLiteral<"browser">;
35
+ url: Type.TString;
36
+ selector: Type.TString;
37
+ }>]>;
38
+ text: Type.TString;
39
+ }>]>>]>;
40
+ source: Type.TUnion<[Type.TObject<{
41
+ kind: Type.TLiteral<"user">;
42
+ }>, Type.TObject<{
43
+ kind: Type.TLiteral<"child">;
44
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
45
+ end: Type.TEnum<["completed", "stopped", "failed"]>;
46
+ }>, Type.TObject<{
47
+ kind: Type.TLiteral<"job">;
48
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
49
+ }>, Type.TObject<{
50
+ kind: Type.TLiteral<"shell">;
51
+ }>, Type.TObject<{
52
+ kind: Type.TLiteral<"action">;
53
+ label: Type.TString;
54
+ command: Type.TOptional<Type.TString>;
55
+ }>]>;
56
+ delivery: Type.TEnum<["steer", "queue", "attach"]>;
57
+ siblings: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
58
+ }>, Type.TObject<{
59
+ kind: Type.TLiteral<"part">;
60
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
61
+ }>, Type.TObject<{
62
+ kind: Type.TLiteral<"compaction">;
63
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
64
+ replaces: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
65
+ }>, Type.TObject<{
66
+ kind: Type.TLiteral<"branchSummary">;
67
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
68
+ replaces: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
69
+ }>]>;
70
+ export type CommitBody = Decoded<typeof CommitBodyType>;
71
+ export declare const DurableEventType: Type.TUnion<[Type.TObject<{
72
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
73
+ } & {
74
+ kind: Type.TLiteral<"commit">;
75
+ id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
76
+ parent: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"commit">>, Type.TNull]>;
77
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
78
+ body: Type.TUnion<[Type.TObject<{
79
+ kind: Type.TLiteral<"user">;
80
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
81
+ content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
82
+ kind: Type.TLiteral<"text">;
83
+ text: Type.TString;
84
+ }>, Type.TObject<{
85
+ kind: Type.TLiteral<"file">;
86
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
87
+ mime: Type.TString;
88
+ name: Type.TString;
89
+ }>, Type.TObject<{
90
+ kind: Type.TLiteral<"reference">;
91
+ path: Type.TString;
92
+ blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
93
+ }>, Type.TObject<{
94
+ kind: Type.TLiteral<"skill">;
95
+ name: Type.TString;
96
+ location: Type.TString;
97
+ }>, Type.TObject<{
98
+ kind: Type.TLiteral<"excerpt">;
99
+ source: Type.TUnion<[Type.TObject<{
100
+ kind: Type.TLiteral<"diff">;
101
+ path: Type.TString;
102
+ side: Type.TEnum<["old", "new"]>;
103
+ start: Type.TNumber;
104
+ end: Type.TNumber;
105
+ }>, Type.TObject<{
106
+ kind: Type.TLiteral<"terminal">;
107
+ command: Type.TOptional<Type.TString>;
108
+ }>, Type.TObject<{
109
+ kind: Type.TLiteral<"browser">;
110
+ url: Type.TString;
111
+ selector: Type.TString;
112
+ }>]>;
113
+ text: Type.TString;
114
+ }>]>>]>;
115
+ source: Type.TUnion<[Type.TObject<{
116
+ kind: Type.TLiteral<"user">;
117
+ }>, Type.TObject<{
118
+ kind: Type.TLiteral<"child">;
119
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
120
+ end: Type.TEnum<["completed", "stopped", "failed"]>;
121
+ }>, Type.TObject<{
122
+ kind: Type.TLiteral<"job">;
123
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
124
+ }>, Type.TObject<{
125
+ kind: Type.TLiteral<"shell">;
126
+ }>, Type.TObject<{
127
+ kind: Type.TLiteral<"action">;
128
+ label: Type.TString;
129
+ command: Type.TOptional<Type.TString>;
130
+ }>]>;
131
+ delivery: Type.TEnum<["steer", "queue", "attach"]>;
132
+ siblings: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
133
+ }>, Type.TObject<{
134
+ kind: Type.TLiteral<"part">;
135
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
136
+ }>, Type.TObject<{
137
+ kind: Type.TLiteral<"compaction">;
138
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
139
+ replaces: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
140
+ }>, Type.TObject<{
141
+ kind: Type.TLiteral<"branchSummary">;
142
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
143
+ replaces: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
144
+ }>]>;
145
+ }>, Type.TObject<{
146
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
147
+ } & {
148
+ kind: Type.TLiteral<"head">;
149
+ from: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"commit">>, Type.TNull]>;
150
+ to: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"commit">>, Type.TNull]>;
151
+ reason: Type.TEnum<["moved", "merged", "created", "removed"]>;
152
+ }>, Type.TObject<{
153
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
154
+ } & {
155
+ kind: Type.TLiteral<"seen">;
156
+ principal: Type.TUnsafe<import("./ids.ts").Id<"principal">>;
157
+ commit: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"commit">>, Type.TNull]>;
158
+ }>, Type.TObject<{
159
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
160
+ } & {
161
+ change: Type.TLiteral<"admitted">;
162
+ content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
163
+ kind: Type.TLiteral<"text">;
164
+ text: Type.TString;
165
+ }>, Type.TObject<{
166
+ kind: Type.TLiteral<"file">;
167
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
168
+ mime: Type.TString;
169
+ name: Type.TString;
170
+ }>, Type.TObject<{
171
+ kind: Type.TLiteral<"reference">;
172
+ path: Type.TString;
173
+ blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
174
+ }>, Type.TObject<{
175
+ kind: Type.TLiteral<"skill">;
176
+ name: Type.TString;
177
+ location: Type.TString;
178
+ }>, Type.TObject<{
179
+ kind: Type.TLiteral<"excerpt">;
180
+ source: Type.TUnion<[Type.TObject<{
181
+ kind: Type.TLiteral<"diff">;
182
+ path: Type.TString;
183
+ side: Type.TEnum<["old", "new"]>;
184
+ start: Type.TNumber;
185
+ end: Type.TNumber;
186
+ }>, Type.TObject<{
187
+ kind: Type.TLiteral<"terminal">;
188
+ command: Type.TOptional<Type.TString>;
189
+ }>, Type.TObject<{
190
+ kind: Type.TLiteral<"browser">;
191
+ url: Type.TString;
192
+ selector: Type.TString;
193
+ }>]>;
194
+ text: Type.TString;
195
+ }>]>>]>;
196
+ source: Type.TUnion<[Type.TObject<{
197
+ kind: Type.TLiteral<"user">;
198
+ }>, Type.TObject<{
199
+ kind: Type.TLiteral<"child">;
200
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
201
+ end: Type.TEnum<["completed", "stopped", "failed"]>;
202
+ }>, Type.TObject<{
203
+ kind: Type.TLiteral<"job">;
204
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
205
+ }>, Type.TObject<{
206
+ kind: Type.TLiteral<"shell">;
207
+ }>, Type.TObject<{
208
+ kind: Type.TLiteral<"action">;
209
+ label: Type.TString;
210
+ command: Type.TOptional<Type.TString>;
211
+ }>]>;
212
+ delivery: Type.TEnum<["steer", "queue", "attach"]>;
213
+ schedule: Type.TUnion<[Type.TObject<{
214
+ kind: Type.TLiteral<"joined">;
215
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
216
+ }>, Type.TObject<{
217
+ kind: Type.TLiteral<"next-turn">;
218
+ reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
219
+ }>, Type.TObject<{
220
+ kind: Type.TLiteral<"attached">;
221
+ }>, Type.TObject<{
222
+ kind: Type.TLiteral<"deciding">;
223
+ }>]>;
224
+ covered: Type.TBoolean;
225
+ configuration: Type.TObject<{
226
+ kind: Type.TLiteral<"exact">;
227
+ model: Type.TObject<{
228
+ provider: Type.TString;
229
+ id: Type.TString;
230
+ }>;
231
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
232
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
233
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
234
+ settingsVersion: Type.TString;
235
+ }>;
236
+ replaced: Type.TUnion<[Type.TObject<{
237
+ previous: Type.TUnsafe<import("./ids.ts").Id<"message">>;
238
+ stopped: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
239
+ }>, Type.TNull]>;
240
+ requires: Type.TOptional<Type.TArray<Type.TString>>;
241
+ kind: Type.TLiteral<"input">;
242
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
243
+ }>, Type.TObject<{
244
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
245
+ } & {
246
+ change: Type.TLiteral<"scheduled">;
247
+ schedule: Type.TUnion<[Type.TObject<{
248
+ kind: Type.TLiteral<"joined">;
249
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
250
+ }>, Type.TObject<{
251
+ kind: Type.TLiteral<"next-turn">;
252
+ reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
253
+ }>, Type.TObject<{
254
+ kind: Type.TLiteral<"attached">;
255
+ }>, Type.TObject<{
256
+ kind: Type.TLiteral<"deciding">;
257
+ }>]>;
258
+ position: Type.TNumber;
259
+ kind: Type.TLiteral<"input">;
260
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
261
+ }>, Type.TObject<{
262
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
263
+ } & {
264
+ change: Type.TLiteral<"landed">;
265
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
266
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
267
+ kind: Type.TLiteral<"input">;
268
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
269
+ }>, Type.TObject<{
270
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
271
+ } & {
272
+ change: Type.TLiteral<"withdrawn">;
273
+ kind: Type.TLiteral<"input">;
274
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
275
+ }>, Type.TObject<{
276
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
277
+ } & {
278
+ change: Type.TLiteral<"superseded">;
279
+ by: Type.TUnsafe<import("./ids.ts").Id<"message">>;
280
+ kind: Type.TLiteral<"input">;
281
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
282
+ }>, Type.TObject<{
283
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
284
+ } & {
285
+ change: Type.TLiteral<"started">;
286
+ view: Type.TObject<{
287
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
288
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
289
+ startedAt: Type.TNumber;
290
+ attempt: Type.TNumber;
291
+ configuration: Type.TObject<{
292
+ kind: Type.TLiteral<"exact">;
293
+ model: Type.TObject<{
294
+ provider: Type.TString;
295
+ id: Type.TString;
296
+ }>;
297
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
298
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
299
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
300
+ settingsVersion: Type.TString;
301
+ }>;
302
+ origin: Type.TUnion<[Type.TObject<{
303
+ kind: Type.TLiteral<"input">;
304
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
305
+ }>, Type.TObject<{
306
+ kind: Type.TLiteral<"continuation">;
307
+ from: Type.TEnum<["child", "job", "wake"]>;
308
+ }>]>;
309
+ }>;
310
+ kind: Type.TLiteral<"run">;
311
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
312
+ }>, Type.TObject<{
313
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
314
+ } & {
315
+ change: Type.TLiteral<"phase">;
316
+ phase: Type.TEnum<["responding", "executing"]>;
317
+ kind: Type.TLiteral<"run">;
318
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
319
+ }>, Type.TObject<{
320
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
321
+ } & {
322
+ change: Type.TLiteral<"waiting">;
323
+ on: Type.TUnion<[Type.TObject<{
324
+ kind: Type.TLiteral<"run">;
325
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
326
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
327
+ deadline: Type.TOptional<Type.TNumber>;
328
+ }>, Type.TObject<{
329
+ kind: Type.TLiteral<"job">;
330
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
331
+ deadline: Type.TOptional<Type.TNumber>;
332
+ }>, Type.TObject<{
333
+ kind: Type.TLiteral<"part">;
334
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
335
+ deadline: Type.TOptional<Type.TNumber>;
336
+ }>, Type.TObject<{
337
+ kind: Type.TLiteral<"timer">;
338
+ until: Type.TNumber;
339
+ deadline: Type.TOptional<Type.TNumber>;
340
+ }>]>;
341
+ kind: Type.TLiteral<"run">;
342
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
343
+ }>, Type.TObject<{
344
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
345
+ } & {
346
+ change: Type.TLiteral<"retrying">;
347
+ attempt: Type.TNumber;
348
+ until: Type.TNumber;
349
+ reason: Type.TString;
350
+ kind: Type.TLiteral<"run">;
351
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
352
+ }>, Type.TObject<{
353
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
354
+ } & {
355
+ change: Type.TLiteral<"stopping">;
356
+ kind: Type.TLiteral<"run">;
357
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
358
+ }>, Type.TObject<{
359
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
360
+ } & {
361
+ change: Type.TLiteral<"ended">;
362
+ end: Type.TUnion<[Type.TObject<{
363
+ kind: Type.TLiteral<"completed">;
364
+ usage: Type.TObject<{
365
+ input: Type.TNumber;
366
+ output: Type.TNumber;
367
+ cacheRead: Type.TNumber;
368
+ cacheWrite: Type.TNumber;
369
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
370
+ total: Type.TNumber;
371
+ cost: Type.TObject<{
372
+ input: Type.TNumber;
373
+ output: Type.TNumber;
374
+ cacheRead: Type.TNumber;
375
+ cacheWrite: Type.TNumber;
376
+ total: Type.TNumber;
377
+ }>;
378
+ }>;
379
+ }>, Type.TObject<{
380
+ kind: Type.TLiteral<"stopped">;
381
+ }>, Type.TObject<{
382
+ kind: Type.TLiteral<"failed">;
383
+ failure: Type.TObject<{
384
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
385
+ message: Type.TString;
386
+ retryAfterMs: Type.TOptional<Type.TNumber>;
387
+ }>;
388
+ }>]>;
389
+ kind: Type.TLiteral<"run">;
390
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
391
+ }>, Type.TObject<{
392
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
393
+ } & {
394
+ change: Type.TLiteral<"created">;
395
+ partKind: Type.TString;
396
+ placement: Type.TUnion<[Type.TObject<{
397
+ kind: Type.TLiteral<"transcript">;
398
+ role: Type.TEnum<["step", "answer", "note"]>;
399
+ }>, Type.TObject<{
400
+ kind: Type.TLiteral<"modal">;
401
+ }>, Type.TIntersect<[Type.TObject<{
402
+ kind: Type.TString;
403
+ }>, Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>]>]>;
404
+ state: Type.TUnsafe<import("./json.ts").Json>;
405
+ version: Type.TNumber;
406
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
407
+ owner: Type.TUnion<[Type.TString, Type.TNull]>;
408
+ kind: Type.TLiteral<"part">;
409
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
410
+ }>, Type.TObject<{
411
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
412
+ } & {
413
+ change: Type.TLiteral<"updated">;
414
+ state: Type.TUnsafe<import("./json.ts").Json>;
415
+ version: Type.TNumber;
416
+ kind: Type.TLiteral<"part">;
417
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
418
+ }>, Type.TObject<{
419
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
420
+ } & {
421
+ change: Type.TLiteral<"waiting">;
422
+ call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
423
+ kind: Type.TLiteral<"part">;
424
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
425
+ }>, Type.TObject<{
426
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
427
+ } & {
428
+ change: Type.TLiteral<"settled">;
429
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
430
+ endedAt: Type.TNumber;
431
+ kind: Type.TLiteral<"part">;
432
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
433
+ }>, Type.TObject<{
434
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
435
+ } & {
436
+ change: Type.TLiteral<"failed">;
437
+ failure: Type.TObject<{
438
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
439
+ message: Type.TString;
440
+ retryAfterMs: Type.TOptional<Type.TNumber>;
441
+ }>;
442
+ kind: Type.TLiteral<"part">;
443
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
444
+ }>, Type.TObject<{
445
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
446
+ } & {
447
+ change: Type.TLiteral<"answered">;
448
+ answer: Type.TObject<{
449
+ action: Type.TString;
450
+ input: Type.TUnsafe<import("./json.ts").Json>;
451
+ }>;
452
+ kind: Type.TLiteral<"part">;
453
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
454
+ }>, Type.TObject<{
455
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
456
+ } & {
457
+ change: Type.TLiteral<"closed">;
458
+ kind: Type.TLiteral<"part">;
459
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
460
+ }>, Type.TObject<{
461
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
462
+ } & {
463
+ change: Type.TLiteral<"intent">;
464
+ kind: Type.TLiteral<"call">;
465
+ call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
466
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
467
+ }>, Type.TObject<{
468
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
469
+ } & {
470
+ change: Type.TLiteral<"waiting">;
471
+ on: Type.TUnion<[Type.TObject<{
472
+ kind: Type.TLiteral<"run">;
473
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
474
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
475
+ deadline: Type.TOptional<Type.TNumber>;
476
+ }>, Type.TObject<{
477
+ kind: Type.TLiteral<"job">;
478
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
479
+ deadline: Type.TOptional<Type.TNumber>;
480
+ }>, Type.TObject<{
481
+ kind: Type.TLiteral<"part">;
482
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
483
+ deadline: Type.TOptional<Type.TNumber>;
484
+ }>, Type.TObject<{
485
+ kind: Type.TLiteral<"timer">;
486
+ until: Type.TNumber;
487
+ deadline: Type.TOptional<Type.TNumber>;
488
+ }>]>;
489
+ kind: Type.TLiteral<"call">;
490
+ call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
491
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
492
+ }>, Type.TObject<{
493
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
494
+ } & {
495
+ change: Type.TLiteral<"settled">;
496
+ outcome: Type.TUnion<[Type.TObject<{
497
+ kind: Type.TLiteral<"ok">;
498
+ content: Type.TArray<Type.TUnion<[Type.TObject<{
499
+ kind: Type.TLiteral<"text">;
500
+ text: Type.TString;
501
+ }>, Type.TObject<{
502
+ kind: Type.TLiteral<"file">;
503
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
504
+ mime: Type.TString;
505
+ name: Type.TOptional<Type.TString>;
506
+ }>]>>;
507
+ output: Type.TUnsafe<import("./json.ts").Json>;
508
+ parts: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"part">>>;
509
+ }>, Type.TObject<{
510
+ kind: Type.TLiteral<"failed">;
511
+ message: Type.TString;
512
+ }>, Type.TObject<{
513
+ kind: Type.TLiteral<"interrupted">;
514
+ }>, Type.TObject<{
515
+ kind: Type.TLiteral<"rejected">;
516
+ reason: Type.TString;
517
+ }>, Type.TObject<{
518
+ kind: Type.TLiteral<"stopped">;
519
+ }>]>;
520
+ changes: Type.TUnion<[Type.TObject<{
521
+ added: Type.TNumber;
522
+ removed: Type.TNumber;
523
+ paths: Type.TArray<Type.TString>;
524
+ }>, Type.TNull]>;
525
+ kind: Type.TLiteral<"call">;
526
+ call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
527
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
528
+ }>, Type.TObject<{
529
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
530
+ } & {
531
+ kind: Type.TLiteral<"background">;
532
+ item: Type.TObject<{
533
+ kind: Type.TEnum<["child", "job", "page"]>;
534
+ id: Type.TString;
535
+ title: Type.TString;
536
+ state: Type.TEnum<["working", "waiting", "done", "failed"]>;
537
+ startedBy: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"call">>, Type.TNull]>;
538
+ }>;
539
+ }>, Type.TObject<{
540
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
541
+ } & {
542
+ kind: Type.TLiteral<"configured">;
543
+ selected: Type.TUnion<[Type.TObject<{
544
+ kind: Type.TLiteral<"exact">;
545
+ model: Type.TObject<{
546
+ provider: Type.TString;
547
+ id: Type.TString;
548
+ }>;
549
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
550
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
551
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
552
+ settingsVersion: Type.TString;
553
+ }>, Type.TNull]>;
554
+ effective: Type.TUnion<[Type.TObject<{
555
+ kind: Type.TLiteral<"exact">;
556
+ model: Type.TObject<{
557
+ provider: Type.TString;
558
+ id: Type.TString;
559
+ }>;
560
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
561
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
562
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
563
+ settingsVersion: Type.TString;
564
+ }>, Type.TNull]>;
565
+ }>, Type.TObject<{
566
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
567
+ } & {
568
+ kind: Type.TLiteral<"request">;
569
+ usage: Type.TObject<{
570
+ input: Type.TNumber;
571
+ output: Type.TNumber;
572
+ cacheRead: Type.TNumber;
573
+ cacheWrite: Type.TNumber;
574
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
575
+ total: Type.TNumber;
576
+ cost: Type.TObject<{
577
+ input: Type.TNumber;
578
+ output: Type.TNumber;
579
+ cacheRead: Type.TNumber;
580
+ cacheWrite: Type.TNumber;
581
+ total: Type.TNumber;
582
+ }>;
583
+ }>;
584
+ context: Type.TObject<{
585
+ tokens: Type.TNumber;
586
+ window: Type.TNumber;
587
+ lastRequest: Type.TUnion<[Type.TObject<{
588
+ input: Type.TNumber;
589
+ output: Type.TNumber;
590
+ cacheRead: Type.TNumber;
591
+ cacheWrite: Type.TNumber;
592
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
593
+ total: Type.TNumber;
594
+ cost: Type.TObject<{
595
+ input: Type.TNumber;
596
+ output: Type.TNumber;
597
+ cacheRead: Type.TNumber;
598
+ cacheWrite: Type.TNumber;
599
+ total: Type.TNumber;
600
+ }>;
601
+ }>, Type.TNull]>;
602
+ }>;
603
+ step: Type.TEnum<["assistant", "compaction", "summary", "plugin"]>;
604
+ }>, Type.TObject<{
605
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
606
+ } & {
607
+ kind: Type.TLiteral<"changes">;
608
+ files: Type.TArray<Type.TObject<{
609
+ path: Type.TString;
610
+ status: Type.TEnum<["added", "modified", "deleted", "renamed", "untracked", "conflicted"]>;
611
+ added: Type.TNumber;
612
+ removed: Type.TNumber;
613
+ from: Type.TOptional<Type.TString>;
614
+ }>>;
615
+ }>, Type.TObject<{
616
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
617
+ } & {
618
+ kind: Type.TLiteral<"session">;
619
+ info: Type.TObject<{
620
+ id: Type.TUnsafe<import("./ids.ts").Id<"session">>;
621
+ name: Type.TUnion<[Type.TString, Type.TNull]>;
622
+ parent: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"session">>, Type.TNull]>;
623
+ call: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"call">>, Type.TNull]>;
624
+ workspace: Type.TUnsafe<import("./ids.ts").Id<"workspace">>;
625
+ pinned: Type.TBoolean;
626
+ archived: Type.TBoolean;
627
+ activation: Type.TUnion<[Type.TObject<{
628
+ kind: Type.TLiteral<"active">;
629
+ }>, Type.TObject<{
630
+ kind: Type.TLiteral<"inactive">;
631
+ }>, Type.TObject<{
632
+ kind: Type.TLiteral<"unavailable">;
633
+ reason: Type.TEnum<["unsupported", "unreachable"]>;
634
+ workspace: Type.TUnsafe<import("./ids.ts").Id<"workspace">>;
635
+ }>, Type.TObject<{
636
+ kind: Type.TLiteral<"failed">;
637
+ message: Type.TString;
638
+ }>]>;
639
+ heads: Type.TArray<Type.TObject<{
640
+ name: Type.TUnsafe<import("./ids.ts").Id<"head">>;
641
+ tip: Type.TUnion<[Type.TObject<{
642
+ kind: Type.TLiteral<"start">;
643
+ }>, Type.TObject<{
644
+ kind: Type.TLiteral<"commit">;
645
+ id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
646
+ }>]>;
647
+ stack: Type.TUnion<[Type.TObject<{
648
+ parent: Type.TUnsafe<import("./ids.ts").Id<"head">>;
649
+ base: Type.TUnion<[Type.TObject<{
650
+ kind: Type.TLiteral<"start">;
651
+ }>, Type.TObject<{
652
+ kind: Type.TLiteral<"commit">;
653
+ id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
654
+ }>]>;
655
+ stale: Type.TBoolean;
656
+ }>, Type.TNull]>;
657
+ execution: Type.TUnion<[Type.TObject<{
658
+ kind: Type.TLiteral<"idle">;
659
+ lastRun: Type.TUnion<[Type.TObject<{
660
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
661
+ end: Type.TUnion<[Type.TObject<{
662
+ kind: Type.TLiteral<"completed">;
663
+ usage: Type.TObject<{
664
+ input: Type.TNumber;
665
+ output: Type.TNumber;
666
+ cacheRead: Type.TNumber;
667
+ cacheWrite: Type.TNumber;
668
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
669
+ total: Type.TNumber;
670
+ cost: Type.TObject<{
671
+ input: Type.TNumber;
672
+ output: Type.TNumber;
673
+ cacheRead: Type.TNumber;
674
+ cacheWrite: Type.TNumber;
675
+ total: Type.TNumber;
676
+ }>;
677
+ }>;
678
+ }>, Type.TObject<{
679
+ kind: Type.TLiteral<"stopped">;
680
+ }>, Type.TObject<{
681
+ kind: Type.TLiteral<"failed">;
682
+ failure: Type.TObject<{
683
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
684
+ message: Type.TString;
685
+ retryAfterMs: Type.TOptional<Type.TNumber>;
686
+ }>;
687
+ }>]>;
688
+ endedAt: Type.TNumber;
689
+ }>, Type.TNull]>;
690
+ }>, Type.TObject<{
691
+ kind: Type.TLiteral<"live">;
692
+ run: Type.TObject<{
693
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
694
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
695
+ startedAt: Type.TNumber;
696
+ attempt: Type.TNumber;
697
+ configuration: Type.TObject<{
698
+ kind: Type.TLiteral<"exact">;
699
+ model: Type.TObject<{
700
+ provider: Type.TString;
701
+ id: Type.TString;
702
+ }>;
703
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
704
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
705
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
706
+ settingsVersion: Type.TString;
707
+ }>;
708
+ origin: Type.TUnion<[Type.TObject<{
709
+ kind: Type.TLiteral<"input">;
710
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
711
+ }>, Type.TObject<{
712
+ kind: Type.TLiteral<"continuation">;
713
+ from: Type.TEnum<["child", "job", "wake"]>;
714
+ }>]>;
715
+ }>;
716
+ phase: Type.TEnum<["responding", "executing"]>;
717
+ stopping: Type.TBoolean;
718
+ }>, Type.TObject<{
719
+ kind: Type.TLiteral<"waiting">;
720
+ run: Type.TObject<{
721
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
722
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
723
+ startedAt: Type.TNumber;
724
+ attempt: Type.TNumber;
725
+ configuration: Type.TObject<{
726
+ kind: Type.TLiteral<"exact">;
727
+ model: Type.TObject<{
728
+ provider: Type.TString;
729
+ id: Type.TString;
730
+ }>;
731
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
732
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
733
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
734
+ settingsVersion: Type.TString;
735
+ }>;
736
+ origin: Type.TUnion<[Type.TObject<{
737
+ kind: Type.TLiteral<"input">;
738
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
739
+ }>, Type.TObject<{
740
+ kind: Type.TLiteral<"continuation">;
741
+ from: Type.TEnum<["child", "job", "wake"]>;
742
+ }>]>;
743
+ }>;
744
+ on: Type.TUnion<[Type.TObject<{
745
+ kind: Type.TLiteral<"run">;
746
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
747
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
748
+ deadline: Type.TOptional<Type.TNumber>;
749
+ }>, Type.TObject<{
750
+ kind: Type.TLiteral<"job">;
751
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
752
+ deadline: Type.TOptional<Type.TNumber>;
753
+ }>, Type.TObject<{
754
+ kind: Type.TLiteral<"part">;
755
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
756
+ deadline: Type.TOptional<Type.TNumber>;
757
+ }>, Type.TObject<{
758
+ kind: Type.TLiteral<"timer">;
759
+ until: Type.TNumber;
760
+ deadline: Type.TOptional<Type.TNumber>;
761
+ }>]>;
762
+ }>, Type.TObject<{
763
+ kind: Type.TLiteral<"retrying">;
764
+ run: Type.TObject<{
765
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
766
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
767
+ startedAt: Type.TNumber;
768
+ attempt: Type.TNumber;
769
+ configuration: Type.TObject<{
770
+ kind: Type.TLiteral<"exact">;
771
+ model: Type.TObject<{
772
+ provider: Type.TString;
773
+ id: Type.TString;
774
+ }>;
775
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
776
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
777
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
778
+ settingsVersion: Type.TString;
779
+ }>;
780
+ origin: Type.TUnion<[Type.TObject<{
781
+ kind: Type.TLiteral<"input">;
782
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
783
+ }>, Type.TObject<{
784
+ kind: Type.TLiteral<"continuation">;
785
+ from: Type.TEnum<["child", "job", "wake"]>;
786
+ }>]>;
787
+ }>;
788
+ until: Type.TNumber;
789
+ reason: Type.TString;
790
+ }>]>;
791
+ unread: Type.TBoolean;
792
+ }>>;
793
+ createdAt: Type.TNumber;
794
+ lastActivityAt: Type.TNumber;
795
+ }>;
796
+ }>, Type.TObject<{
797
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
798
+ } & {
799
+ kind: Type.TLiteral<"activation">;
800
+ activation: Type.TUnion<[Type.TObject<{
801
+ kind: Type.TLiteral<"active">;
802
+ }>, Type.TObject<{
803
+ kind: Type.TLiteral<"inactive">;
804
+ }>, Type.TObject<{
805
+ kind: Type.TLiteral<"unavailable">;
806
+ reason: Type.TEnum<["unsupported", "unreachable"]>;
807
+ workspace: Type.TUnsafe<import("./ids.ts").Id<"workspace">>;
808
+ }>, Type.TObject<{
809
+ kind: Type.TLiteral<"failed">;
810
+ message: Type.TString;
811
+ }>]>;
812
+ }>, Type.TObject<{
813
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
814
+ } & {
815
+ kind: Type.TLiteral<"catalog">;
816
+ catalog: Type.TObject<{
817
+ commands: Type.TArray<Type.TObject<{
818
+ name: Type.TString;
819
+ owner: Type.TString;
820
+ side: Type.TEnum<["core", "client"]>;
821
+ title: Type.TString;
822
+ description: Type.TString;
823
+ takesText: Type.TBoolean;
824
+ completes: Type.TBoolean;
825
+ category: Type.TOptional<Type.TString>;
826
+ keywords: Type.TOptional<Type.TArray<Type.TString>>;
827
+ }>>;
828
+ settings: Type.TArray<Type.TObject<{
829
+ id: Type.TString;
830
+ owner: Type.TString;
831
+ scope: Type.TEnum<["host", "session"]>;
832
+ label: Type.TString;
833
+ schema: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
834
+ choices: Type.TUnion<[Type.TArray<Type.TObject<{
835
+ value: Type.TUnsafe<import("./json.ts").Json>;
836
+ label: Type.TString;
837
+ badge: Type.TOptional<Type.TString>;
838
+ }>>, Type.TNull]>;
839
+ value: Type.TUnsafe<import("./json.ts").Json>;
840
+ from: Type.TEnum<["default", "host", "session"]>;
841
+ }>>;
842
+ skills: Type.TArray<Type.TObject<{
843
+ name: Type.TString;
844
+ owner: Type.TString;
845
+ description: Type.TString;
846
+ location: Type.TString;
847
+ }>>;
848
+ agents: Type.TArray<Type.TObject<{
849
+ id: Type.TString;
850
+ owner: Type.TString;
851
+ description: Type.TUnion<[Type.TString, Type.TNull]>;
852
+ model: Type.TUnion<[Type.TObject<{
853
+ provider: Type.TString;
854
+ id: Type.TString;
855
+ }>, Type.TNull]>;
856
+ mode: Type.TEnum<["primary", "subagent", "all"]>;
857
+ }>>;
858
+ tools: Type.TArray<Type.TObject<{
859
+ name: Type.TString;
860
+ owner: Type.TString;
861
+ namespace: Type.TUnion<[Type.TString, Type.TNull]>;
862
+ description: Type.TString;
863
+ parameters: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
864
+ output: Type.TUnion<[Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>, Type.TNull]>;
865
+ exposure: Type.TEnum<["model", "deferred", "code", "hidden"]>;
866
+ }>>;
867
+ }>;
868
+ }>]>;
869
+ export type DurableEvent = Decoded<typeof DurableEventType>;
870
+ export declare const SessionEventType: Type.TUnion<[Type.TObject<{
871
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
872
+ at: Type.TNumber;
873
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
874
+ } & {
875
+ kind: Type.TLiteral<"commit">;
876
+ id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
877
+ parent: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"commit">>, Type.TNull]>;
878
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
879
+ body: Type.TUnion<[Type.TObject<{
880
+ kind: Type.TLiteral<"user">;
881
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
882
+ content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
883
+ kind: Type.TLiteral<"text">;
884
+ text: Type.TString;
885
+ }>, Type.TObject<{
886
+ kind: Type.TLiteral<"file">;
887
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
888
+ mime: Type.TString;
889
+ name: Type.TString;
890
+ }>, Type.TObject<{
891
+ kind: Type.TLiteral<"reference">;
892
+ path: Type.TString;
893
+ blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
894
+ }>, Type.TObject<{
895
+ kind: Type.TLiteral<"skill">;
896
+ name: Type.TString;
897
+ location: Type.TString;
898
+ }>, Type.TObject<{
899
+ kind: Type.TLiteral<"excerpt">;
900
+ source: Type.TUnion<[Type.TObject<{
901
+ kind: Type.TLiteral<"diff">;
902
+ path: Type.TString;
903
+ side: Type.TEnum<["old", "new"]>;
904
+ start: Type.TNumber;
905
+ end: Type.TNumber;
906
+ }>, Type.TObject<{
907
+ kind: Type.TLiteral<"terminal">;
908
+ command: Type.TOptional<Type.TString>;
909
+ }>, Type.TObject<{
910
+ kind: Type.TLiteral<"browser">;
911
+ url: Type.TString;
912
+ selector: Type.TString;
913
+ }>]>;
914
+ text: Type.TString;
915
+ }>]>>]>;
916
+ source: Type.TUnion<[Type.TObject<{
917
+ kind: Type.TLiteral<"user">;
918
+ }>, Type.TObject<{
919
+ kind: Type.TLiteral<"child">;
920
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
921
+ end: Type.TEnum<["completed", "stopped", "failed"]>;
922
+ }>, Type.TObject<{
923
+ kind: Type.TLiteral<"job">;
924
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
925
+ }>, Type.TObject<{
926
+ kind: Type.TLiteral<"shell">;
927
+ }>, Type.TObject<{
928
+ kind: Type.TLiteral<"action">;
929
+ label: Type.TString;
930
+ command: Type.TOptional<Type.TString>;
931
+ }>]>;
932
+ delivery: Type.TEnum<["steer", "queue", "attach"]>;
933
+ siblings: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
934
+ }>, Type.TObject<{
935
+ kind: Type.TLiteral<"part">;
936
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
937
+ }>, Type.TObject<{
938
+ kind: Type.TLiteral<"compaction">;
939
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
940
+ replaces: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
941
+ }>, Type.TObject<{
942
+ kind: Type.TLiteral<"branchSummary">;
943
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
944
+ replaces: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
945
+ }>]>;
946
+ }>, Type.TObject<{
947
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
948
+ at: Type.TNumber;
949
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
950
+ } & {
951
+ kind: Type.TLiteral<"head">;
952
+ from: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"commit">>, Type.TNull]>;
953
+ to: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"commit">>, Type.TNull]>;
954
+ reason: Type.TEnum<["moved", "merged", "created", "removed"]>;
955
+ }>, Type.TObject<{
956
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
957
+ at: Type.TNumber;
958
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
959
+ } & {
960
+ kind: Type.TLiteral<"seen">;
961
+ principal: Type.TUnsafe<import("./ids.ts").Id<"principal">>;
962
+ commit: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"commit">>, Type.TNull]>;
963
+ }>, Type.TObject<{
964
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
965
+ at: Type.TNumber;
966
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
967
+ } & {
968
+ change: Type.TLiteral<"admitted">;
969
+ content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
970
+ kind: Type.TLiteral<"text">;
971
+ text: Type.TString;
972
+ }>, Type.TObject<{
973
+ kind: Type.TLiteral<"file">;
974
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
975
+ mime: Type.TString;
976
+ name: Type.TString;
977
+ }>, Type.TObject<{
978
+ kind: Type.TLiteral<"reference">;
979
+ path: Type.TString;
980
+ blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
981
+ }>, Type.TObject<{
982
+ kind: Type.TLiteral<"skill">;
983
+ name: Type.TString;
984
+ location: Type.TString;
985
+ }>, Type.TObject<{
986
+ kind: Type.TLiteral<"excerpt">;
987
+ source: Type.TUnion<[Type.TObject<{
988
+ kind: Type.TLiteral<"diff">;
989
+ path: Type.TString;
990
+ side: Type.TEnum<["old", "new"]>;
991
+ start: Type.TNumber;
992
+ end: Type.TNumber;
993
+ }>, Type.TObject<{
994
+ kind: Type.TLiteral<"terminal">;
995
+ command: Type.TOptional<Type.TString>;
996
+ }>, Type.TObject<{
997
+ kind: Type.TLiteral<"browser">;
998
+ url: Type.TString;
999
+ selector: Type.TString;
1000
+ }>]>;
1001
+ text: Type.TString;
1002
+ }>]>>]>;
1003
+ source: Type.TUnion<[Type.TObject<{
1004
+ kind: Type.TLiteral<"user">;
1005
+ }>, Type.TObject<{
1006
+ kind: Type.TLiteral<"child">;
1007
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1008
+ end: Type.TEnum<["completed", "stopped", "failed"]>;
1009
+ }>, Type.TObject<{
1010
+ kind: Type.TLiteral<"job">;
1011
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
1012
+ }>, Type.TObject<{
1013
+ kind: Type.TLiteral<"shell">;
1014
+ }>, Type.TObject<{
1015
+ kind: Type.TLiteral<"action">;
1016
+ label: Type.TString;
1017
+ command: Type.TOptional<Type.TString>;
1018
+ }>]>;
1019
+ delivery: Type.TEnum<["steer", "queue", "attach"]>;
1020
+ schedule: Type.TUnion<[Type.TObject<{
1021
+ kind: Type.TLiteral<"joined">;
1022
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1023
+ }>, Type.TObject<{
1024
+ kind: Type.TLiteral<"next-turn">;
1025
+ reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
1026
+ }>, Type.TObject<{
1027
+ kind: Type.TLiteral<"attached">;
1028
+ }>, Type.TObject<{
1029
+ kind: Type.TLiteral<"deciding">;
1030
+ }>]>;
1031
+ covered: Type.TBoolean;
1032
+ configuration: Type.TObject<{
1033
+ kind: Type.TLiteral<"exact">;
1034
+ model: Type.TObject<{
1035
+ provider: Type.TString;
1036
+ id: Type.TString;
1037
+ }>;
1038
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
1039
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
1040
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1041
+ settingsVersion: Type.TString;
1042
+ }>;
1043
+ replaced: Type.TUnion<[Type.TObject<{
1044
+ previous: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1045
+ stopped: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1046
+ }>, Type.TNull]>;
1047
+ requires: Type.TOptional<Type.TArray<Type.TString>>;
1048
+ kind: Type.TLiteral<"input">;
1049
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1050
+ }>, Type.TObject<{
1051
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1052
+ at: Type.TNumber;
1053
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1054
+ } & {
1055
+ change: Type.TLiteral<"scheduled">;
1056
+ schedule: Type.TUnion<[Type.TObject<{
1057
+ kind: Type.TLiteral<"joined">;
1058
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1059
+ }>, Type.TObject<{
1060
+ kind: Type.TLiteral<"next-turn">;
1061
+ reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
1062
+ }>, Type.TObject<{
1063
+ kind: Type.TLiteral<"attached">;
1064
+ }>, Type.TObject<{
1065
+ kind: Type.TLiteral<"deciding">;
1066
+ }>]>;
1067
+ position: Type.TNumber;
1068
+ kind: Type.TLiteral<"input">;
1069
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1070
+ }>, Type.TObject<{
1071
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1072
+ at: Type.TNumber;
1073
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1074
+ } & {
1075
+ change: Type.TLiteral<"landed">;
1076
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
1077
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1078
+ kind: Type.TLiteral<"input">;
1079
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1080
+ }>, Type.TObject<{
1081
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1082
+ at: Type.TNumber;
1083
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1084
+ } & {
1085
+ change: Type.TLiteral<"withdrawn">;
1086
+ kind: Type.TLiteral<"input">;
1087
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1088
+ }>, Type.TObject<{
1089
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1090
+ at: Type.TNumber;
1091
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1092
+ } & {
1093
+ change: Type.TLiteral<"superseded">;
1094
+ by: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1095
+ kind: Type.TLiteral<"input">;
1096
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1097
+ }>, Type.TObject<{
1098
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1099
+ at: Type.TNumber;
1100
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1101
+ } & {
1102
+ change: Type.TLiteral<"started">;
1103
+ view: Type.TObject<{
1104
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1105
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
1106
+ startedAt: Type.TNumber;
1107
+ attempt: Type.TNumber;
1108
+ configuration: Type.TObject<{
1109
+ kind: Type.TLiteral<"exact">;
1110
+ model: Type.TObject<{
1111
+ provider: Type.TString;
1112
+ id: Type.TString;
1113
+ }>;
1114
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
1115
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
1116
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1117
+ settingsVersion: Type.TString;
1118
+ }>;
1119
+ origin: Type.TUnion<[Type.TObject<{
1120
+ kind: Type.TLiteral<"input">;
1121
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1122
+ }>, Type.TObject<{
1123
+ kind: Type.TLiteral<"continuation">;
1124
+ from: Type.TEnum<["child", "job", "wake"]>;
1125
+ }>]>;
1126
+ }>;
1127
+ kind: Type.TLiteral<"run">;
1128
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1129
+ }>, Type.TObject<{
1130
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1131
+ at: Type.TNumber;
1132
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1133
+ } & {
1134
+ change: Type.TLiteral<"phase">;
1135
+ phase: Type.TEnum<["responding", "executing"]>;
1136
+ kind: Type.TLiteral<"run">;
1137
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1138
+ }>, Type.TObject<{
1139
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1140
+ at: Type.TNumber;
1141
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1142
+ } & {
1143
+ change: Type.TLiteral<"waiting">;
1144
+ on: Type.TUnion<[Type.TObject<{
1145
+ kind: Type.TLiteral<"run">;
1146
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1147
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1148
+ deadline: Type.TOptional<Type.TNumber>;
1149
+ }>, Type.TObject<{
1150
+ kind: Type.TLiteral<"job">;
1151
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
1152
+ deadline: Type.TOptional<Type.TNumber>;
1153
+ }>, Type.TObject<{
1154
+ kind: Type.TLiteral<"part">;
1155
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1156
+ deadline: Type.TOptional<Type.TNumber>;
1157
+ }>, Type.TObject<{
1158
+ kind: Type.TLiteral<"timer">;
1159
+ until: Type.TNumber;
1160
+ deadline: Type.TOptional<Type.TNumber>;
1161
+ }>]>;
1162
+ kind: Type.TLiteral<"run">;
1163
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1164
+ }>, Type.TObject<{
1165
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1166
+ at: Type.TNumber;
1167
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1168
+ } & {
1169
+ change: Type.TLiteral<"retrying">;
1170
+ attempt: Type.TNumber;
1171
+ until: Type.TNumber;
1172
+ reason: Type.TString;
1173
+ kind: Type.TLiteral<"run">;
1174
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1175
+ }>, Type.TObject<{
1176
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1177
+ at: Type.TNumber;
1178
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1179
+ } & {
1180
+ change: Type.TLiteral<"stopping">;
1181
+ kind: Type.TLiteral<"run">;
1182
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1183
+ }>, Type.TObject<{
1184
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1185
+ at: Type.TNumber;
1186
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1187
+ } & {
1188
+ change: Type.TLiteral<"ended">;
1189
+ end: Type.TUnion<[Type.TObject<{
1190
+ kind: Type.TLiteral<"completed">;
1191
+ usage: Type.TObject<{
1192
+ input: Type.TNumber;
1193
+ output: Type.TNumber;
1194
+ cacheRead: Type.TNumber;
1195
+ cacheWrite: Type.TNumber;
1196
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
1197
+ total: Type.TNumber;
1198
+ cost: Type.TObject<{
1199
+ input: Type.TNumber;
1200
+ output: Type.TNumber;
1201
+ cacheRead: Type.TNumber;
1202
+ cacheWrite: Type.TNumber;
1203
+ total: Type.TNumber;
1204
+ }>;
1205
+ }>;
1206
+ }>, Type.TObject<{
1207
+ kind: Type.TLiteral<"stopped">;
1208
+ }>, Type.TObject<{
1209
+ kind: Type.TLiteral<"failed">;
1210
+ failure: Type.TObject<{
1211
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
1212
+ message: Type.TString;
1213
+ retryAfterMs: Type.TOptional<Type.TNumber>;
1214
+ }>;
1215
+ }>]>;
1216
+ kind: Type.TLiteral<"run">;
1217
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1218
+ }>, Type.TObject<{
1219
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1220
+ at: Type.TNumber;
1221
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1222
+ } & {
1223
+ change: Type.TLiteral<"created">;
1224
+ partKind: Type.TString;
1225
+ placement: Type.TUnion<[Type.TObject<{
1226
+ kind: Type.TLiteral<"transcript">;
1227
+ role: Type.TEnum<["step", "answer", "note"]>;
1228
+ }>, Type.TObject<{
1229
+ kind: Type.TLiteral<"modal">;
1230
+ }>, Type.TIntersect<[Type.TObject<{
1231
+ kind: Type.TString;
1232
+ }>, Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>]>]>;
1233
+ state: Type.TUnsafe<import("./json.ts").Json>;
1234
+ version: Type.TNumber;
1235
+ run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
1236
+ owner: Type.TUnion<[Type.TString, Type.TNull]>;
1237
+ kind: Type.TLiteral<"part">;
1238
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1239
+ }>, Type.TObject<{
1240
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1241
+ at: Type.TNumber;
1242
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1243
+ } & {
1244
+ change: Type.TLiteral<"updated">;
1245
+ state: Type.TUnsafe<import("./json.ts").Json>;
1246
+ version: Type.TNumber;
1247
+ kind: Type.TLiteral<"part">;
1248
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1249
+ }>, Type.TObject<{
1250
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1251
+ at: Type.TNumber;
1252
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1253
+ } & {
1254
+ change: Type.TLiteral<"waiting">;
1255
+ call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
1256
+ kind: Type.TLiteral<"part">;
1257
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1258
+ }>, Type.TObject<{
1259
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1260
+ at: Type.TNumber;
1261
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1262
+ } & {
1263
+ change: Type.TLiteral<"settled">;
1264
+ commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
1265
+ endedAt: Type.TNumber;
1266
+ kind: Type.TLiteral<"part">;
1267
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1268
+ }>, Type.TObject<{
1269
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1270
+ at: Type.TNumber;
1271
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1272
+ } & {
1273
+ change: Type.TLiteral<"failed">;
1274
+ failure: Type.TObject<{
1275
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
1276
+ message: Type.TString;
1277
+ retryAfterMs: Type.TOptional<Type.TNumber>;
1278
+ }>;
1279
+ kind: Type.TLiteral<"part">;
1280
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1281
+ }>, Type.TObject<{
1282
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1283
+ at: Type.TNumber;
1284
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1285
+ } & {
1286
+ change: Type.TLiteral<"answered">;
1287
+ answer: Type.TObject<{
1288
+ action: Type.TString;
1289
+ input: Type.TUnsafe<import("./json.ts").Json>;
1290
+ }>;
1291
+ kind: Type.TLiteral<"part">;
1292
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1293
+ }>, Type.TObject<{
1294
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1295
+ at: Type.TNumber;
1296
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1297
+ } & {
1298
+ change: Type.TLiteral<"closed">;
1299
+ kind: Type.TLiteral<"part">;
1300
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1301
+ }>, Type.TObject<{
1302
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1303
+ at: Type.TNumber;
1304
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1305
+ } & {
1306
+ change: Type.TLiteral<"intent">;
1307
+ kind: Type.TLiteral<"call">;
1308
+ call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
1309
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1310
+ }>, Type.TObject<{
1311
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1312
+ at: Type.TNumber;
1313
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1314
+ } & {
1315
+ change: Type.TLiteral<"waiting">;
1316
+ on: Type.TUnion<[Type.TObject<{
1317
+ kind: Type.TLiteral<"run">;
1318
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1319
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1320
+ deadline: Type.TOptional<Type.TNumber>;
1321
+ }>, Type.TObject<{
1322
+ kind: Type.TLiteral<"job">;
1323
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
1324
+ deadline: Type.TOptional<Type.TNumber>;
1325
+ }>, Type.TObject<{
1326
+ kind: Type.TLiteral<"part">;
1327
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1328
+ deadline: Type.TOptional<Type.TNumber>;
1329
+ }>, Type.TObject<{
1330
+ kind: Type.TLiteral<"timer">;
1331
+ until: Type.TNumber;
1332
+ deadline: Type.TOptional<Type.TNumber>;
1333
+ }>]>;
1334
+ kind: Type.TLiteral<"call">;
1335
+ call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
1336
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1337
+ }>, Type.TObject<{
1338
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1339
+ at: Type.TNumber;
1340
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1341
+ } & {
1342
+ change: Type.TLiteral<"settled">;
1343
+ outcome: Type.TUnion<[Type.TObject<{
1344
+ kind: Type.TLiteral<"ok">;
1345
+ content: Type.TArray<Type.TUnion<[Type.TObject<{
1346
+ kind: Type.TLiteral<"text">;
1347
+ text: Type.TString;
1348
+ }>, Type.TObject<{
1349
+ kind: Type.TLiteral<"file">;
1350
+ blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
1351
+ mime: Type.TString;
1352
+ name: Type.TOptional<Type.TString>;
1353
+ }>]>>;
1354
+ output: Type.TUnsafe<import("./json.ts").Json>;
1355
+ parts: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"part">>>;
1356
+ }>, Type.TObject<{
1357
+ kind: Type.TLiteral<"failed">;
1358
+ message: Type.TString;
1359
+ }>, Type.TObject<{
1360
+ kind: Type.TLiteral<"interrupted">;
1361
+ }>, Type.TObject<{
1362
+ kind: Type.TLiteral<"rejected">;
1363
+ reason: Type.TString;
1364
+ }>, Type.TObject<{
1365
+ kind: Type.TLiteral<"stopped">;
1366
+ }>]>;
1367
+ changes: Type.TUnion<[Type.TObject<{
1368
+ added: Type.TNumber;
1369
+ removed: Type.TNumber;
1370
+ paths: Type.TArray<Type.TString>;
1371
+ }>, Type.TNull]>;
1372
+ kind: Type.TLiteral<"call">;
1373
+ call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
1374
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1375
+ }>, Type.TObject<{
1376
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1377
+ at: Type.TNumber;
1378
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1379
+ } & {
1380
+ kind: Type.TLiteral<"background">;
1381
+ item: Type.TObject<{
1382
+ kind: Type.TEnum<["child", "job", "page"]>;
1383
+ id: Type.TString;
1384
+ title: Type.TString;
1385
+ state: Type.TEnum<["working", "waiting", "done", "failed"]>;
1386
+ startedBy: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"call">>, Type.TNull]>;
1387
+ }>;
1388
+ }>, Type.TObject<{
1389
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1390
+ at: Type.TNumber;
1391
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1392
+ } & {
1393
+ kind: Type.TLiteral<"configured">;
1394
+ selected: Type.TUnion<[Type.TObject<{
1395
+ kind: Type.TLiteral<"exact">;
1396
+ model: Type.TObject<{
1397
+ provider: Type.TString;
1398
+ id: Type.TString;
1399
+ }>;
1400
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
1401
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
1402
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1403
+ settingsVersion: Type.TString;
1404
+ }>, Type.TNull]>;
1405
+ effective: Type.TUnion<[Type.TObject<{
1406
+ kind: Type.TLiteral<"exact">;
1407
+ model: Type.TObject<{
1408
+ provider: Type.TString;
1409
+ id: Type.TString;
1410
+ }>;
1411
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
1412
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
1413
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1414
+ settingsVersion: Type.TString;
1415
+ }>, Type.TNull]>;
1416
+ }>, Type.TObject<{
1417
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1418
+ at: Type.TNumber;
1419
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1420
+ } & {
1421
+ kind: Type.TLiteral<"request">;
1422
+ usage: Type.TObject<{
1423
+ input: Type.TNumber;
1424
+ output: Type.TNumber;
1425
+ cacheRead: Type.TNumber;
1426
+ cacheWrite: Type.TNumber;
1427
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
1428
+ total: Type.TNumber;
1429
+ cost: Type.TObject<{
1430
+ input: Type.TNumber;
1431
+ output: Type.TNumber;
1432
+ cacheRead: Type.TNumber;
1433
+ cacheWrite: Type.TNumber;
1434
+ total: Type.TNumber;
1435
+ }>;
1436
+ }>;
1437
+ context: Type.TObject<{
1438
+ tokens: Type.TNumber;
1439
+ window: Type.TNumber;
1440
+ lastRequest: Type.TUnion<[Type.TObject<{
1441
+ input: Type.TNumber;
1442
+ output: Type.TNumber;
1443
+ cacheRead: Type.TNumber;
1444
+ cacheWrite: Type.TNumber;
1445
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
1446
+ total: Type.TNumber;
1447
+ cost: Type.TObject<{
1448
+ input: Type.TNumber;
1449
+ output: Type.TNumber;
1450
+ cacheRead: Type.TNumber;
1451
+ cacheWrite: Type.TNumber;
1452
+ total: Type.TNumber;
1453
+ }>;
1454
+ }>, Type.TNull]>;
1455
+ }>;
1456
+ step: Type.TEnum<["assistant", "compaction", "summary", "plugin"]>;
1457
+ }>, Type.TObject<{
1458
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1459
+ at: Type.TNumber;
1460
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1461
+ } & {
1462
+ kind: Type.TLiteral<"changes">;
1463
+ files: Type.TArray<Type.TObject<{
1464
+ path: Type.TString;
1465
+ status: Type.TEnum<["added", "modified", "deleted", "renamed", "untracked", "conflicted"]>;
1466
+ added: Type.TNumber;
1467
+ removed: Type.TNumber;
1468
+ from: Type.TOptional<Type.TString>;
1469
+ }>>;
1470
+ }>, Type.TObject<{
1471
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1472
+ at: Type.TNumber;
1473
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1474
+ } & {
1475
+ kind: Type.TLiteral<"session">;
1476
+ info: Type.TObject<{
1477
+ id: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1478
+ name: Type.TUnion<[Type.TString, Type.TNull]>;
1479
+ parent: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"session">>, Type.TNull]>;
1480
+ call: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"call">>, Type.TNull]>;
1481
+ workspace: Type.TUnsafe<import("./ids.ts").Id<"workspace">>;
1482
+ pinned: Type.TBoolean;
1483
+ archived: Type.TBoolean;
1484
+ activation: Type.TUnion<[Type.TObject<{
1485
+ kind: Type.TLiteral<"active">;
1486
+ }>, Type.TObject<{
1487
+ kind: Type.TLiteral<"inactive">;
1488
+ }>, Type.TObject<{
1489
+ kind: Type.TLiteral<"unavailable">;
1490
+ reason: Type.TEnum<["unsupported", "unreachable"]>;
1491
+ workspace: Type.TUnsafe<import("./ids.ts").Id<"workspace">>;
1492
+ }>, Type.TObject<{
1493
+ kind: Type.TLiteral<"failed">;
1494
+ message: Type.TString;
1495
+ }>]>;
1496
+ heads: Type.TArray<Type.TObject<{
1497
+ name: Type.TUnsafe<import("./ids.ts").Id<"head">>;
1498
+ tip: Type.TUnion<[Type.TObject<{
1499
+ kind: Type.TLiteral<"start">;
1500
+ }>, Type.TObject<{
1501
+ kind: Type.TLiteral<"commit">;
1502
+ id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
1503
+ }>]>;
1504
+ stack: Type.TUnion<[Type.TObject<{
1505
+ parent: Type.TUnsafe<import("./ids.ts").Id<"head">>;
1506
+ base: Type.TUnion<[Type.TObject<{
1507
+ kind: Type.TLiteral<"start">;
1508
+ }>, Type.TObject<{
1509
+ kind: Type.TLiteral<"commit">;
1510
+ id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
1511
+ }>]>;
1512
+ stale: Type.TBoolean;
1513
+ }>, Type.TNull]>;
1514
+ execution: Type.TUnion<[Type.TObject<{
1515
+ kind: Type.TLiteral<"idle">;
1516
+ lastRun: Type.TUnion<[Type.TObject<{
1517
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1518
+ end: Type.TUnion<[Type.TObject<{
1519
+ kind: Type.TLiteral<"completed">;
1520
+ usage: Type.TObject<{
1521
+ input: Type.TNumber;
1522
+ output: Type.TNumber;
1523
+ cacheRead: Type.TNumber;
1524
+ cacheWrite: Type.TNumber;
1525
+ reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
1526
+ total: Type.TNumber;
1527
+ cost: Type.TObject<{
1528
+ input: Type.TNumber;
1529
+ output: Type.TNumber;
1530
+ cacheRead: Type.TNumber;
1531
+ cacheWrite: Type.TNumber;
1532
+ total: Type.TNumber;
1533
+ }>;
1534
+ }>;
1535
+ }>, Type.TObject<{
1536
+ kind: Type.TLiteral<"stopped">;
1537
+ }>, Type.TObject<{
1538
+ kind: Type.TLiteral<"failed">;
1539
+ failure: Type.TObject<{
1540
+ class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
1541
+ message: Type.TString;
1542
+ retryAfterMs: Type.TOptional<Type.TNumber>;
1543
+ }>;
1544
+ }>]>;
1545
+ endedAt: Type.TNumber;
1546
+ }>, Type.TNull]>;
1547
+ }>, Type.TObject<{
1548
+ kind: Type.TLiteral<"live">;
1549
+ run: Type.TObject<{
1550
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1551
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
1552
+ startedAt: Type.TNumber;
1553
+ attempt: Type.TNumber;
1554
+ configuration: Type.TObject<{
1555
+ kind: Type.TLiteral<"exact">;
1556
+ model: Type.TObject<{
1557
+ provider: Type.TString;
1558
+ id: Type.TString;
1559
+ }>;
1560
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
1561
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
1562
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1563
+ settingsVersion: Type.TString;
1564
+ }>;
1565
+ origin: Type.TUnion<[Type.TObject<{
1566
+ kind: Type.TLiteral<"input">;
1567
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1568
+ }>, Type.TObject<{
1569
+ kind: Type.TLiteral<"continuation">;
1570
+ from: Type.TEnum<["child", "job", "wake"]>;
1571
+ }>]>;
1572
+ }>;
1573
+ phase: Type.TEnum<["responding", "executing"]>;
1574
+ stopping: Type.TBoolean;
1575
+ }>, Type.TObject<{
1576
+ kind: Type.TLiteral<"waiting">;
1577
+ run: Type.TObject<{
1578
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1579
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
1580
+ startedAt: Type.TNumber;
1581
+ attempt: Type.TNumber;
1582
+ configuration: Type.TObject<{
1583
+ kind: Type.TLiteral<"exact">;
1584
+ model: Type.TObject<{
1585
+ provider: Type.TString;
1586
+ id: Type.TString;
1587
+ }>;
1588
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
1589
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
1590
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1591
+ settingsVersion: Type.TString;
1592
+ }>;
1593
+ origin: Type.TUnion<[Type.TObject<{
1594
+ kind: Type.TLiteral<"input">;
1595
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1596
+ }>, Type.TObject<{
1597
+ kind: Type.TLiteral<"continuation">;
1598
+ from: Type.TEnum<["child", "job", "wake"]>;
1599
+ }>]>;
1600
+ }>;
1601
+ on: Type.TUnion<[Type.TObject<{
1602
+ kind: Type.TLiteral<"run">;
1603
+ session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
1604
+ run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1605
+ deadline: Type.TOptional<Type.TNumber>;
1606
+ }>, Type.TObject<{
1607
+ kind: Type.TLiteral<"job">;
1608
+ job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
1609
+ deadline: Type.TOptional<Type.TNumber>;
1610
+ }>, Type.TObject<{
1611
+ kind: Type.TLiteral<"part">;
1612
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1613
+ deadline: Type.TOptional<Type.TNumber>;
1614
+ }>, Type.TObject<{
1615
+ kind: Type.TLiteral<"timer">;
1616
+ until: Type.TNumber;
1617
+ deadline: Type.TOptional<Type.TNumber>;
1618
+ }>]>;
1619
+ }>, Type.TObject<{
1620
+ kind: Type.TLiteral<"retrying">;
1621
+ run: Type.TObject<{
1622
+ id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
1623
+ head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
1624
+ startedAt: Type.TNumber;
1625
+ attempt: Type.TNumber;
1626
+ configuration: Type.TObject<{
1627
+ kind: Type.TLiteral<"exact">;
1628
+ model: Type.TObject<{
1629
+ provider: Type.TString;
1630
+ id: Type.TString;
1631
+ }>;
1632
+ thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
1633
+ agent: Type.TUnion<[Type.TString, Type.TNull]>;
1634
+ settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1635
+ settingsVersion: Type.TString;
1636
+ }>;
1637
+ origin: Type.TUnion<[Type.TObject<{
1638
+ kind: Type.TLiteral<"input">;
1639
+ message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
1640
+ }>, Type.TObject<{
1641
+ kind: Type.TLiteral<"continuation">;
1642
+ from: Type.TEnum<["child", "job", "wake"]>;
1643
+ }>]>;
1644
+ }>;
1645
+ until: Type.TNumber;
1646
+ reason: Type.TString;
1647
+ }>]>;
1648
+ unread: Type.TBoolean;
1649
+ }>>;
1650
+ createdAt: Type.TNumber;
1651
+ lastActivityAt: Type.TNumber;
1652
+ }>;
1653
+ }>, Type.TObject<{
1654
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1655
+ at: Type.TNumber;
1656
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1657
+ } & {
1658
+ kind: Type.TLiteral<"activation">;
1659
+ activation: Type.TUnion<[Type.TObject<{
1660
+ kind: Type.TLiteral<"active">;
1661
+ }>, Type.TObject<{
1662
+ kind: Type.TLiteral<"inactive">;
1663
+ }>, Type.TObject<{
1664
+ kind: Type.TLiteral<"unavailable">;
1665
+ reason: Type.TEnum<["unsupported", "unreachable"]>;
1666
+ workspace: Type.TUnsafe<import("./ids.ts").Id<"workspace">>;
1667
+ }>, Type.TObject<{
1668
+ kind: Type.TLiteral<"failed">;
1669
+ message: Type.TString;
1670
+ }>]>;
1671
+ }>, Type.TObject<{
1672
+ seq: Type.TUnsafe<import("./ids.ts").Seq>;
1673
+ at: Type.TNumber;
1674
+ head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
1675
+ } & {
1676
+ kind: Type.TLiteral<"catalog">;
1677
+ catalog: Type.TObject<{
1678
+ commands: Type.TArray<Type.TObject<{
1679
+ name: Type.TString;
1680
+ owner: Type.TString;
1681
+ side: Type.TEnum<["core", "client"]>;
1682
+ title: Type.TString;
1683
+ description: Type.TString;
1684
+ takesText: Type.TBoolean;
1685
+ completes: Type.TBoolean;
1686
+ category: Type.TOptional<Type.TString>;
1687
+ keywords: Type.TOptional<Type.TArray<Type.TString>>;
1688
+ }>>;
1689
+ settings: Type.TArray<Type.TObject<{
1690
+ id: Type.TString;
1691
+ owner: Type.TString;
1692
+ scope: Type.TEnum<["host", "session"]>;
1693
+ label: Type.TString;
1694
+ schema: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1695
+ choices: Type.TUnion<[Type.TArray<Type.TObject<{
1696
+ value: Type.TUnsafe<import("./json.ts").Json>;
1697
+ label: Type.TString;
1698
+ badge: Type.TOptional<Type.TString>;
1699
+ }>>, Type.TNull]>;
1700
+ value: Type.TUnsafe<import("./json.ts").Json>;
1701
+ from: Type.TEnum<["default", "host", "session"]>;
1702
+ }>>;
1703
+ skills: Type.TArray<Type.TObject<{
1704
+ name: Type.TString;
1705
+ owner: Type.TString;
1706
+ description: Type.TString;
1707
+ location: Type.TString;
1708
+ }>>;
1709
+ agents: Type.TArray<Type.TObject<{
1710
+ id: Type.TString;
1711
+ owner: Type.TString;
1712
+ description: Type.TUnion<[Type.TString, Type.TNull]>;
1713
+ model: Type.TUnion<[Type.TObject<{
1714
+ provider: Type.TString;
1715
+ id: Type.TString;
1716
+ }>, Type.TNull]>;
1717
+ mode: Type.TEnum<["primary", "subagent", "all"]>;
1718
+ }>>;
1719
+ tools: Type.TArray<Type.TObject<{
1720
+ name: Type.TString;
1721
+ owner: Type.TString;
1722
+ namespace: Type.TUnion<[Type.TString, Type.TNull]>;
1723
+ description: Type.TString;
1724
+ parameters: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
1725
+ output: Type.TUnion<[Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>, Type.TNull]>;
1726
+ exposure: Type.TEnum<["model", "deferred", "code", "hidden"]>;
1727
+ }>>;
1728
+ }>;
1729
+ }>]>;
1730
+ export type SessionEvent = Decoded<typeof SessionEventType>;
1731
+ export declare const PatchEventType: Type.TUnion<[Type.TObject<{
1732
+ append: Type.TString;
1733
+ kind: Type.TLiteral<"patch">;
1734
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1735
+ }>, Type.TObject<{
1736
+ markdown: Type.TString;
1737
+ kind: Type.TLiteral<"patch">;
1738
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1739
+ }>, Type.TObject<{
1740
+ progress: Type.TObject<{
1741
+ text: Type.TOptional<Type.TString>;
1742
+ fraction: Type.TOptional<Type.TNumber>;
1743
+ detail: Type.TOptional<Type.TUnsafe<import("./json.ts").Json>>;
1744
+ }>;
1745
+ kind: Type.TLiteral<"patch">;
1746
+ part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
1747
+ }>]>;
1748
+ export type PatchEvent = Decoded<typeof PatchEventType>;
1749
+ export declare const CommitBodySchema: Schema<CommitBody>;
1750
+ export declare const DurableEventSchema: Schema<DurableEvent>;
1751
+ export declare const SessionEventSchema: Schema<SessionEvent>;
1752
+ export declare const PatchEventSchema: Schema<PatchEvent>;