@nyte-ai/schema 0.0.0-stage → 0.0.18

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