@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.
- package/LICENSE +21 -0
- package/THIRD-PARTY-NOTICES.md +800 -0
- package/dist/chunks/browser-0byq2fja.js +50 -0
- package/dist/chunks/browser-0ebnhqs2.js +36 -0
- package/dist/chunks/browser-0g0z3617.js +47 -0
- package/dist/chunks/browser-0khex2b1.js +33 -0
- package/dist/chunks/browser-1sfp0bcx.js +73 -0
- package/dist/chunks/browser-40enyw9r.js +75 -0
- package/dist/chunks/browser-48g24pes.js +106 -0
- package/dist/chunks/browser-4et7qtz3.js +7 -0
- package/dist/chunks/browser-5n1dh580.js +66 -0
- package/dist/chunks/browser-5pvw8svn.js +243 -0
- package/dist/chunks/browser-6e1madxa.js +83 -0
- package/dist/chunks/browser-6yby604e.js +96 -0
- package/dist/chunks/browser-7195qf3t.js +14 -0
- package/dist/chunks/browser-7gjnxy9m.js +172 -0
- package/dist/chunks/browser-8t9anqfc.js +113 -0
- package/dist/chunks/browser-9ystjh78.js +0 -0
- package/dist/chunks/browser-ad9yebg7.js +101 -0
- package/dist/chunks/browser-b519jtez.js +102 -0
- package/dist/chunks/browser-bg1esaw0.js +82 -0
- package/dist/chunks/browser-bxz3z1v6.js +181 -0
- package/dist/chunks/browser-e5xgzd28.js +82 -0
- package/dist/chunks/browser-ebr6k189.js +120 -0
- package/dist/chunks/browser-ekbecx9r.js +73 -0
- package/dist/chunks/browser-fd3accdr.js +159 -0
- package/dist/chunks/browser-fth801bw.js +50 -0
- package/dist/chunks/browser-g5khdcap.js +170 -0
- package/dist/chunks/browser-gchr2880.js +135 -0
- package/dist/chunks/browser-h86zs54a.js +65 -0
- package/dist/chunks/browser-hq5q56sf.js +79 -0
- package/dist/chunks/browser-j629a6wa.js +17 -0
- package/dist/chunks/browser-k20f6cvv.js +0 -0
- package/dist/chunks/browser-m0wzr0g8.js +5 -0
- package/dist/chunks/browser-mnejgne0.js +125 -0
- package/dist/chunks/browser-mzfc0v5j.js +58 -0
- package/dist/chunks/browser-pdv675va.js +135 -0
- package/dist/chunks/browser-pdx38ng3.js +301 -0
- package/dist/chunks/browser-qkxe0fwp.js +6 -0
- package/dist/chunks/browser-r00v3vwv.js +238 -0
- package/dist/chunks/browser-r87w64mz.js +32 -0
- package/dist/chunks/browser-s7907azt.js +118 -0
- package/dist/chunks/browser-sgwxbek9.js +37 -0
- package/dist/chunks/browser-v70eq512.js +215 -0
- package/dist/chunks/browser-vapnjwp3.js +35 -0
- package/dist/chunks/browser-vkh2tpmf.js +283 -0
- package/dist/chunks/browser-vzc3r2r3.js +64 -0
- package/dist/chunks/browser-ypez6s7v.js +52 -0
- package/dist/src/browser.d.ts +64 -0
- package/dist/src/browser.js +26 -0
- package/dist/src/configuration.d.ts +26 -0
- package/dist/src/configuration.js +17 -0
- package/dist/src/connection.d.ts +189 -0
- package/dist/src/connection.js +35 -0
- package/dist/src/declaration.d.ts +12 -0
- package/dist/src/declaration.js +1 -0
- package/dist/src/errors.d.ts +56 -0
- package/dist/src/errors.js +23 -0
- package/dist/src/events.d.ts +1750 -0
- package/dist/src/events.js +36 -0
- package/dist/src/files.d.ts +130 -0
- package/dist/src/files.js +49 -0
- package/dist/src/git.d.ts +271 -0
- package/dist/src/git.js +64 -0
- package/dist/src/github.d.ts +174 -0
- package/dist/src/github.js +31 -0
- package/dist/src/heads.d.ts +255 -0
- package/dist/src/heads.js +48 -0
- package/dist/src/hooks.d.ts +201 -0
- package/dist/src/hooks.js +28 -0
- package/dist/src/host.d.ts +137 -0
- package/dist/src/host.js +49 -0
- package/dist/src/ids.d.ts +66 -0
- package/dist/src/ids.js +67 -0
- package/dist/src/index.d.ts +30 -0
- package/dist/src/index.js +779 -0
- package/dist/src/jobs.d.ts +152 -0
- package/dist/src/jobs.js +34 -0
- package/dist/src/json.d.ts +24 -0
- package/dist/src/json.js +21 -0
- package/dist/src/mcp.d.ts +212 -0
- package/dist/src/mcp.js +34 -0
- package/dist/src/messages.d.ts +114 -0
- package/dist/src/messages.js +28 -0
- package/dist/src/model/index.d.ts +6 -0
- package/dist/src/model/index.js +61 -0
- package/dist/src/model/message.d.ts +178 -0
- package/dist/src/model/message.js +7 -0
- package/dist/src/model/model.d.ts +154 -0
- package/dist/src/model/model.js +11 -0
- package/dist/src/model/text.d.ts +6 -0
- package/dist/src/model/text.js +10 -0
- package/dist/src/model/tool.d.ts +36 -0
- package/dist/src/model/tool.js +1 -0
- package/dist/src/model/transcript.d.ts +34 -0
- package/dist/src/model/transcript.js +37 -0
- package/dist/src/model/typed.d.ts +6 -0
- package/dist/src/model/typed.js +8 -0
- package/dist/src/models.d.ts +195 -0
- package/dist/src/models.js +45 -0
- package/dist/src/parts.d.ts +364 -0
- package/dist/src/parts.js +35 -0
- package/dist/src/patch.d.ts +21 -0
- package/dist/src/patch.js +11 -0
- package/dist/src/plugins.d.ts +36 -0
- package/dist/src/plugins.js +9 -0
- package/dist/src/primitives.d.ts +83 -0
- package/dist/src/primitives.js +26 -0
- package/dist/src/runs.d.ts +433 -0
- package/dist/src/runs.js +39 -0
- package/dist/src/schema.d.ts +14 -0
- package/dist/src/schema.js +8 -0
- package/dist/src/serial.d.ts +18 -0
- package/dist/src/serial.js +39 -0
- package/dist/src/sessions.d.ts +578 -0
- package/dist/src/sessions.js +74 -0
- package/dist/src/store.d.ts +831 -0
- package/dist/src/store.js +33 -0
- package/dist/src/tools.d.ts +76 -0
- package/dist/src/tools.js +24 -0
- package/dist/src/views.d.ts +2737 -0
- package/dist/src/views.js +50 -0
- package/dist/src/wire/base64.d.ts +2 -0
- package/dist/src/wire/base64.js +6 -0
- package/dist/src/wire/nullable.d.ts +2 -0
- package/dist/src/wire/nullable.js +6 -0
- package/dist/src/wire/operations/browser.d.ts +535 -0
- package/dist/src/wire/operations/browser.js +12 -0
- package/dist/src/wire/operations/fields.d.ts +54 -0
- package/dist/src/wire/operations/fields.js +30 -0
- package/dist/src/wire/operations/files.d.ts +244 -0
- package/dist/src/wire/operations/files.js +13 -0
- package/dist/src/wire/operations/git.d.ts +513 -0
- package/dist/src/wire/operations/git.js +15 -0
- package/dist/src/wire/operations/github.d.ts +172 -0
- package/dist/src/wire/operations/github.js +12 -0
- package/dist/src/wire/operations/host.d.ts +1011 -0
- package/dist/src/wire/operations/host.js +27 -0
- package/dist/src/wire/operations/index.d.ts +6703 -0
- package/dist/src/wire/operations/index.js +40 -0
- package/dist/src/wire/operations/session.d.ts +3411 -0
- package/dist/src/wire/operations/session.js +25 -0
- package/dist/src/wire/operations/workspace.d.ts +830 -0
- package/dist/src/wire/operations/workspace.js +24 -0
- package/dist/src/workspaces.d.ts +119 -0
- package/dist/src/workspaces.js +38 -0
- package/package.json +51 -3
- package/README.md +0 -3
|
@@ -0,0 +1,831 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
import type { Decoded, Schema } from "./schema.ts";
|
|
3
|
+
export declare const RefType: Type.TObject<{
|
|
4
|
+
name: Type.TString;
|
|
5
|
+
target: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"object">>, Type.TNull]>;
|
|
6
|
+
revision: Type.TUnsafe<import("./ids.ts").Id<"revision">>;
|
|
7
|
+
}>;
|
|
8
|
+
export type Ref = Decoded<typeof RefType>;
|
|
9
|
+
export declare const RefUpdateType: Type.TObject<{
|
|
10
|
+
name: Type.TString;
|
|
11
|
+
target: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"object">>, Type.TNull]>;
|
|
12
|
+
expect: Type.TOptional<Type.TUnion<[Type.TLiteral<"absent">, Type.TUnsafe<import("./ids.ts").Id<"revision">>]>>;
|
|
13
|
+
events: Type.TOptional<Type.TArray<Type.TUnion<[Type.TObject<{
|
|
14
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
15
|
+
} & {
|
|
16
|
+
kind: Type.TLiteral<"commit">;
|
|
17
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
|
|
18
|
+
parent: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"commit">>, Type.TNull]>;
|
|
19
|
+
run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
|
|
20
|
+
body: Type.TUnion<[Type.TObject<{
|
|
21
|
+
kind: Type.TLiteral<"user">;
|
|
22
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
23
|
+
content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
|
|
24
|
+
kind: Type.TLiteral<"text">;
|
|
25
|
+
text: Type.TString;
|
|
26
|
+
}>, Type.TObject<{
|
|
27
|
+
kind: Type.TLiteral<"file">;
|
|
28
|
+
blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
|
|
29
|
+
mime: Type.TString;
|
|
30
|
+
name: Type.TString;
|
|
31
|
+
}>, Type.TObject<{
|
|
32
|
+
kind: Type.TLiteral<"reference">;
|
|
33
|
+
path: Type.TString;
|
|
34
|
+
blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
|
|
35
|
+
}>, Type.TObject<{
|
|
36
|
+
kind: Type.TLiteral<"skill">;
|
|
37
|
+
name: Type.TString;
|
|
38
|
+
location: Type.TString;
|
|
39
|
+
}>, Type.TObject<{
|
|
40
|
+
kind: Type.TLiteral<"excerpt">;
|
|
41
|
+
source: Type.TUnion<[Type.TObject<{
|
|
42
|
+
kind: Type.TLiteral<"diff">;
|
|
43
|
+
path: Type.TString;
|
|
44
|
+
side: Type.TEnum<["old", "new"]>;
|
|
45
|
+
start: Type.TNumber;
|
|
46
|
+
end: Type.TNumber;
|
|
47
|
+
}>, Type.TObject<{
|
|
48
|
+
kind: Type.TLiteral<"terminal">;
|
|
49
|
+
command: Type.TOptional<Type.TString>;
|
|
50
|
+
}>, Type.TObject<{
|
|
51
|
+
kind: Type.TLiteral<"browser">;
|
|
52
|
+
url: Type.TString;
|
|
53
|
+
selector: Type.TString;
|
|
54
|
+
}>]>;
|
|
55
|
+
text: Type.TString;
|
|
56
|
+
}>]>>]>;
|
|
57
|
+
source: Type.TUnion<[Type.TObject<{
|
|
58
|
+
kind: Type.TLiteral<"user">;
|
|
59
|
+
}>, Type.TObject<{
|
|
60
|
+
kind: Type.TLiteral<"child">;
|
|
61
|
+
session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
|
|
62
|
+
end: Type.TEnum<["completed", "stopped", "failed"]>;
|
|
63
|
+
}>, Type.TObject<{
|
|
64
|
+
kind: Type.TLiteral<"job">;
|
|
65
|
+
job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
|
|
66
|
+
}>, Type.TObject<{
|
|
67
|
+
kind: Type.TLiteral<"shell">;
|
|
68
|
+
}>, Type.TObject<{
|
|
69
|
+
kind: Type.TLiteral<"action">;
|
|
70
|
+
label: Type.TString;
|
|
71
|
+
command: Type.TOptional<Type.TString>;
|
|
72
|
+
}>]>;
|
|
73
|
+
delivery: Type.TEnum<["steer", "queue", "attach"]>;
|
|
74
|
+
siblings: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
|
|
75
|
+
}>, Type.TObject<{
|
|
76
|
+
kind: Type.TLiteral<"part">;
|
|
77
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
78
|
+
}>, Type.TObject<{
|
|
79
|
+
kind: Type.TLiteral<"compaction">;
|
|
80
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
81
|
+
replaces: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
|
|
82
|
+
}>, Type.TObject<{
|
|
83
|
+
kind: Type.TLiteral<"branchSummary">;
|
|
84
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
85
|
+
replaces: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"commit">>>;
|
|
86
|
+
}>]>;
|
|
87
|
+
}>, Type.TObject<{
|
|
88
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
89
|
+
} & {
|
|
90
|
+
kind: Type.TLiteral<"head">;
|
|
91
|
+
from: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"commit">>, Type.TNull]>;
|
|
92
|
+
to: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"commit">>, Type.TNull]>;
|
|
93
|
+
reason: Type.TEnum<["moved", "merged", "created", "removed"]>;
|
|
94
|
+
}>, Type.TObject<{
|
|
95
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
96
|
+
} & {
|
|
97
|
+
kind: Type.TLiteral<"seen">;
|
|
98
|
+
principal: Type.TUnsafe<import("./ids.ts").Id<"principal">>;
|
|
99
|
+
commit: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"commit">>, Type.TNull]>;
|
|
100
|
+
}>, Type.TObject<{
|
|
101
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
102
|
+
} & {
|
|
103
|
+
change: Type.TLiteral<"admitted">;
|
|
104
|
+
content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
|
|
105
|
+
kind: Type.TLiteral<"text">;
|
|
106
|
+
text: Type.TString;
|
|
107
|
+
}>, Type.TObject<{
|
|
108
|
+
kind: Type.TLiteral<"file">;
|
|
109
|
+
blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
|
|
110
|
+
mime: Type.TString;
|
|
111
|
+
name: Type.TString;
|
|
112
|
+
}>, Type.TObject<{
|
|
113
|
+
kind: Type.TLiteral<"reference">;
|
|
114
|
+
path: Type.TString;
|
|
115
|
+
blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
|
|
116
|
+
}>, Type.TObject<{
|
|
117
|
+
kind: Type.TLiteral<"skill">;
|
|
118
|
+
name: Type.TString;
|
|
119
|
+
location: Type.TString;
|
|
120
|
+
}>, Type.TObject<{
|
|
121
|
+
kind: Type.TLiteral<"excerpt">;
|
|
122
|
+
source: Type.TUnion<[Type.TObject<{
|
|
123
|
+
kind: Type.TLiteral<"diff">;
|
|
124
|
+
path: Type.TString;
|
|
125
|
+
side: Type.TEnum<["old", "new"]>;
|
|
126
|
+
start: Type.TNumber;
|
|
127
|
+
end: Type.TNumber;
|
|
128
|
+
}>, Type.TObject<{
|
|
129
|
+
kind: Type.TLiteral<"terminal">;
|
|
130
|
+
command: Type.TOptional<Type.TString>;
|
|
131
|
+
}>, Type.TObject<{
|
|
132
|
+
kind: Type.TLiteral<"browser">;
|
|
133
|
+
url: Type.TString;
|
|
134
|
+
selector: Type.TString;
|
|
135
|
+
}>]>;
|
|
136
|
+
text: Type.TString;
|
|
137
|
+
}>]>>]>;
|
|
138
|
+
source: Type.TUnion<[Type.TObject<{
|
|
139
|
+
kind: Type.TLiteral<"user">;
|
|
140
|
+
}>, Type.TObject<{
|
|
141
|
+
kind: Type.TLiteral<"child">;
|
|
142
|
+
session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
|
|
143
|
+
end: Type.TEnum<["completed", "stopped", "failed"]>;
|
|
144
|
+
}>, Type.TObject<{
|
|
145
|
+
kind: Type.TLiteral<"job">;
|
|
146
|
+
job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
|
|
147
|
+
}>, Type.TObject<{
|
|
148
|
+
kind: Type.TLiteral<"shell">;
|
|
149
|
+
}>, Type.TObject<{
|
|
150
|
+
kind: Type.TLiteral<"action">;
|
|
151
|
+
label: Type.TString;
|
|
152
|
+
command: Type.TOptional<Type.TString>;
|
|
153
|
+
}>]>;
|
|
154
|
+
delivery: Type.TEnum<["steer", "queue", "attach"]>;
|
|
155
|
+
schedule: Type.TUnion<[Type.TObject<{
|
|
156
|
+
kind: Type.TLiteral<"joined">;
|
|
157
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
158
|
+
}>, Type.TObject<{
|
|
159
|
+
kind: Type.TLiteral<"next-turn">;
|
|
160
|
+
reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
|
|
161
|
+
}>, Type.TObject<{
|
|
162
|
+
kind: Type.TLiteral<"attached">;
|
|
163
|
+
}>, Type.TObject<{
|
|
164
|
+
kind: Type.TLiteral<"deciding">;
|
|
165
|
+
}>]>;
|
|
166
|
+
covered: Type.TBoolean;
|
|
167
|
+
configuration: Type.TObject<{
|
|
168
|
+
kind: Type.TLiteral<"exact">;
|
|
169
|
+
model: Type.TObject<{
|
|
170
|
+
provider: Type.TString;
|
|
171
|
+
id: Type.TString;
|
|
172
|
+
}>;
|
|
173
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
174
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
175
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
176
|
+
settingsVersion: Type.TString;
|
|
177
|
+
}>;
|
|
178
|
+
replaced: Type.TUnion<[Type.TObject<{
|
|
179
|
+
previous: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
180
|
+
stopped: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
|
|
181
|
+
}>, Type.TNull]>;
|
|
182
|
+
kind: Type.TLiteral<"input">;
|
|
183
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
184
|
+
}>, Type.TObject<{
|
|
185
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
186
|
+
} & {
|
|
187
|
+
change: Type.TLiteral<"scheduled">;
|
|
188
|
+
schedule: Type.TUnion<[Type.TObject<{
|
|
189
|
+
kind: Type.TLiteral<"joined">;
|
|
190
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
191
|
+
}>, Type.TObject<{
|
|
192
|
+
kind: Type.TLiteral<"next-turn">;
|
|
193
|
+
reason: Type.TEnum<["requested", "idle", "run-ended", "configuration"]>;
|
|
194
|
+
}>, Type.TObject<{
|
|
195
|
+
kind: Type.TLiteral<"attached">;
|
|
196
|
+
}>, Type.TObject<{
|
|
197
|
+
kind: Type.TLiteral<"deciding">;
|
|
198
|
+
}>]>;
|
|
199
|
+
position: Type.TNumber;
|
|
200
|
+
kind: Type.TLiteral<"input">;
|
|
201
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
202
|
+
}>, Type.TObject<{
|
|
203
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
204
|
+
} & {
|
|
205
|
+
change: Type.TLiteral<"landed">;
|
|
206
|
+
commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
|
|
207
|
+
run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
|
|
208
|
+
kind: Type.TLiteral<"input">;
|
|
209
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
210
|
+
}>, Type.TObject<{
|
|
211
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
212
|
+
} & {
|
|
213
|
+
change: Type.TLiteral<"withdrawn">;
|
|
214
|
+
kind: Type.TLiteral<"input">;
|
|
215
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
216
|
+
}>, Type.TObject<{
|
|
217
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
218
|
+
} & {
|
|
219
|
+
change: Type.TLiteral<"superseded">;
|
|
220
|
+
by: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
221
|
+
kind: Type.TLiteral<"input">;
|
|
222
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
223
|
+
}>, Type.TObject<{
|
|
224
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
225
|
+
} & {
|
|
226
|
+
change: Type.TLiteral<"started">;
|
|
227
|
+
view: Type.TObject<{
|
|
228
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
229
|
+
head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
230
|
+
startedAt: Type.TNumber;
|
|
231
|
+
attempt: Type.TNumber;
|
|
232
|
+
configuration: Type.TObject<{
|
|
233
|
+
kind: Type.TLiteral<"exact">;
|
|
234
|
+
model: Type.TObject<{
|
|
235
|
+
provider: Type.TString;
|
|
236
|
+
id: Type.TString;
|
|
237
|
+
}>;
|
|
238
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
239
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
240
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
241
|
+
settingsVersion: Type.TString;
|
|
242
|
+
}>;
|
|
243
|
+
origin: Type.TUnion<[Type.TObject<{
|
|
244
|
+
kind: Type.TLiteral<"input">;
|
|
245
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
246
|
+
}>, Type.TObject<{
|
|
247
|
+
kind: Type.TLiteral<"continuation">;
|
|
248
|
+
from: Type.TEnum<["child", "job", "wake"]>;
|
|
249
|
+
}>]>;
|
|
250
|
+
}>;
|
|
251
|
+
kind: Type.TLiteral<"run">;
|
|
252
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
253
|
+
}>, Type.TObject<{
|
|
254
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
255
|
+
} & {
|
|
256
|
+
change: Type.TLiteral<"phase">;
|
|
257
|
+
phase: Type.TEnum<["responding", "executing"]>;
|
|
258
|
+
kind: Type.TLiteral<"run">;
|
|
259
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
260
|
+
}>, Type.TObject<{
|
|
261
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
262
|
+
} & {
|
|
263
|
+
change: Type.TLiteral<"waiting">;
|
|
264
|
+
on: Type.TUnion<[Type.TObject<{
|
|
265
|
+
kind: Type.TLiteral<"run">;
|
|
266
|
+
session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
|
|
267
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
268
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
269
|
+
}>, Type.TObject<{
|
|
270
|
+
kind: Type.TLiteral<"job">;
|
|
271
|
+
job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
|
|
272
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
273
|
+
}>, Type.TObject<{
|
|
274
|
+
kind: Type.TLiteral<"part">;
|
|
275
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
276
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
277
|
+
}>, Type.TObject<{
|
|
278
|
+
kind: Type.TLiteral<"timer">;
|
|
279
|
+
until: Type.TNumber;
|
|
280
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
281
|
+
}>]>;
|
|
282
|
+
kind: Type.TLiteral<"run">;
|
|
283
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
284
|
+
}>, Type.TObject<{
|
|
285
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
286
|
+
} & {
|
|
287
|
+
change: Type.TLiteral<"retrying">;
|
|
288
|
+
attempt: Type.TNumber;
|
|
289
|
+
until: Type.TNumber;
|
|
290
|
+
reason: Type.TString;
|
|
291
|
+
kind: Type.TLiteral<"run">;
|
|
292
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
293
|
+
}>, Type.TObject<{
|
|
294
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
295
|
+
} & {
|
|
296
|
+
change: Type.TLiteral<"stopping">;
|
|
297
|
+
kind: Type.TLiteral<"run">;
|
|
298
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
299
|
+
}>, Type.TObject<{
|
|
300
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
301
|
+
} & {
|
|
302
|
+
change: Type.TLiteral<"ended">;
|
|
303
|
+
end: Type.TUnion<[Type.TObject<{
|
|
304
|
+
kind: Type.TLiteral<"completed">;
|
|
305
|
+
usage: Type.TObject<{
|
|
306
|
+
input: Type.TNumber;
|
|
307
|
+
output: Type.TNumber;
|
|
308
|
+
cacheRead: Type.TNumber;
|
|
309
|
+
cacheWrite: Type.TNumber;
|
|
310
|
+
reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
|
|
311
|
+
total: Type.TNumber;
|
|
312
|
+
cost: Type.TObject<{
|
|
313
|
+
input: Type.TNumber;
|
|
314
|
+
output: Type.TNumber;
|
|
315
|
+
cacheRead: Type.TNumber;
|
|
316
|
+
cacheWrite: Type.TNumber;
|
|
317
|
+
total: Type.TNumber;
|
|
318
|
+
}>;
|
|
319
|
+
}>;
|
|
320
|
+
}>, Type.TObject<{
|
|
321
|
+
kind: Type.TLiteral<"stopped">;
|
|
322
|
+
}>, Type.TObject<{
|
|
323
|
+
kind: Type.TLiteral<"failed">;
|
|
324
|
+
failure: Type.TObject<{
|
|
325
|
+
class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
|
|
326
|
+
message: Type.TString;
|
|
327
|
+
retryAfterMs: Type.TOptional<Type.TNumber>;
|
|
328
|
+
}>;
|
|
329
|
+
}>]>;
|
|
330
|
+
kind: Type.TLiteral<"run">;
|
|
331
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
332
|
+
}>, Type.TObject<{
|
|
333
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
334
|
+
} & {
|
|
335
|
+
change: Type.TLiteral<"created">;
|
|
336
|
+
partKind: Type.TString;
|
|
337
|
+
placement: Type.TUnion<[Type.TObject<{
|
|
338
|
+
kind: Type.TLiteral<"transcript">;
|
|
339
|
+
role: Type.TEnum<["step", "answer", "note"]>;
|
|
340
|
+
}>, Type.TObject<{
|
|
341
|
+
kind: Type.TLiteral<"modal">;
|
|
342
|
+
}>, Type.TIntersect<[Type.TObject<{
|
|
343
|
+
kind: Type.TString;
|
|
344
|
+
}>, Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>]>]>;
|
|
345
|
+
state: Type.TUnsafe<import("./json.ts").Json>;
|
|
346
|
+
version: Type.TNumber;
|
|
347
|
+
run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
|
|
348
|
+
owner: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
349
|
+
kind: Type.TLiteral<"part">;
|
|
350
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
351
|
+
}>, Type.TObject<{
|
|
352
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
353
|
+
} & {
|
|
354
|
+
change: Type.TLiteral<"updated">;
|
|
355
|
+
state: Type.TUnsafe<import("./json.ts").Json>;
|
|
356
|
+
version: Type.TNumber;
|
|
357
|
+
kind: Type.TLiteral<"part">;
|
|
358
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
359
|
+
}>, Type.TObject<{
|
|
360
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
361
|
+
} & {
|
|
362
|
+
change: Type.TLiteral<"waiting">;
|
|
363
|
+
call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
|
|
364
|
+
kind: Type.TLiteral<"part">;
|
|
365
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
366
|
+
}>, Type.TObject<{
|
|
367
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
368
|
+
} & {
|
|
369
|
+
change: Type.TLiteral<"settled">;
|
|
370
|
+
commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
|
|
371
|
+
endedAt: Type.TNumber;
|
|
372
|
+
kind: Type.TLiteral<"part">;
|
|
373
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
374
|
+
}>, Type.TObject<{
|
|
375
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
376
|
+
} & {
|
|
377
|
+
change: Type.TLiteral<"failed">;
|
|
378
|
+
failure: Type.TObject<{
|
|
379
|
+
class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
|
|
380
|
+
message: Type.TString;
|
|
381
|
+
retryAfterMs: Type.TOptional<Type.TNumber>;
|
|
382
|
+
}>;
|
|
383
|
+
kind: Type.TLiteral<"part">;
|
|
384
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
385
|
+
}>, Type.TObject<{
|
|
386
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
387
|
+
} & {
|
|
388
|
+
change: Type.TLiteral<"answered">;
|
|
389
|
+
answer: Type.TObject<{
|
|
390
|
+
action: Type.TString;
|
|
391
|
+
input: Type.TUnsafe<import("./json.ts").Json>;
|
|
392
|
+
}>;
|
|
393
|
+
kind: Type.TLiteral<"part">;
|
|
394
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
395
|
+
}>, Type.TObject<{
|
|
396
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
397
|
+
} & {
|
|
398
|
+
change: Type.TLiteral<"closed">;
|
|
399
|
+
kind: Type.TLiteral<"part">;
|
|
400
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
401
|
+
}>, Type.TObject<{
|
|
402
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
403
|
+
} & {
|
|
404
|
+
change: Type.TLiteral<"intent">;
|
|
405
|
+
kind: Type.TLiteral<"call">;
|
|
406
|
+
call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
|
|
407
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
408
|
+
}>, Type.TObject<{
|
|
409
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
410
|
+
} & {
|
|
411
|
+
change: Type.TLiteral<"waiting">;
|
|
412
|
+
on: Type.TUnion<[Type.TObject<{
|
|
413
|
+
kind: Type.TLiteral<"run">;
|
|
414
|
+
session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
|
|
415
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
416
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
417
|
+
}>, Type.TObject<{
|
|
418
|
+
kind: Type.TLiteral<"job">;
|
|
419
|
+
job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
|
|
420
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
421
|
+
}>, Type.TObject<{
|
|
422
|
+
kind: Type.TLiteral<"part">;
|
|
423
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
424
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
425
|
+
}>, Type.TObject<{
|
|
426
|
+
kind: Type.TLiteral<"timer">;
|
|
427
|
+
until: Type.TNumber;
|
|
428
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
429
|
+
}>]>;
|
|
430
|
+
kind: Type.TLiteral<"call">;
|
|
431
|
+
call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
|
|
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<"settled">;
|
|
437
|
+
outcome: Type.TUnion<[Type.TObject<{
|
|
438
|
+
kind: Type.TLiteral<"ok">;
|
|
439
|
+
content: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
440
|
+
kind: Type.TLiteral<"text">;
|
|
441
|
+
text: Type.TString;
|
|
442
|
+
}>, Type.TObject<{
|
|
443
|
+
kind: Type.TLiteral<"file">;
|
|
444
|
+
blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
|
|
445
|
+
mime: Type.TString;
|
|
446
|
+
name: Type.TOptional<Type.TString>;
|
|
447
|
+
}>]>>;
|
|
448
|
+
output: Type.TUnsafe<import("./json.ts").Json>;
|
|
449
|
+
parts: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"part">>>;
|
|
450
|
+
}>, Type.TObject<{
|
|
451
|
+
kind: Type.TLiteral<"failed">;
|
|
452
|
+
message: Type.TString;
|
|
453
|
+
}>, Type.TObject<{
|
|
454
|
+
kind: Type.TLiteral<"interrupted">;
|
|
455
|
+
}>, Type.TObject<{
|
|
456
|
+
kind: Type.TLiteral<"rejected">;
|
|
457
|
+
reason: Type.TString;
|
|
458
|
+
}>, Type.TObject<{
|
|
459
|
+
kind: Type.TLiteral<"stopped">;
|
|
460
|
+
}>]>;
|
|
461
|
+
changes: Type.TUnion<[Type.TObject<{
|
|
462
|
+
added: Type.TNumber;
|
|
463
|
+
removed: Type.TNumber;
|
|
464
|
+
paths: Type.TArray<Type.TString>;
|
|
465
|
+
}>, Type.TNull]>;
|
|
466
|
+
kind: Type.TLiteral<"call">;
|
|
467
|
+
call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
|
|
468
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
469
|
+
}>, Type.TObject<{
|
|
470
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
471
|
+
} & {
|
|
472
|
+
kind: Type.TLiteral<"background">;
|
|
473
|
+
item: Type.TObject<{
|
|
474
|
+
kind: Type.TEnum<["child", "job", "page"]>;
|
|
475
|
+
id: Type.TString;
|
|
476
|
+
title: Type.TString;
|
|
477
|
+
state: Type.TEnum<["working", "waiting", "done", "failed"]>;
|
|
478
|
+
startedBy: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"call">>, Type.TNull]>;
|
|
479
|
+
}>;
|
|
480
|
+
}>, Type.TObject<{
|
|
481
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
482
|
+
} & {
|
|
483
|
+
kind: Type.TLiteral<"configured">;
|
|
484
|
+
selected: Type.TUnion<[Type.TObject<{
|
|
485
|
+
kind: Type.TLiteral<"exact">;
|
|
486
|
+
model: Type.TObject<{
|
|
487
|
+
provider: Type.TString;
|
|
488
|
+
id: Type.TString;
|
|
489
|
+
}>;
|
|
490
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
491
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
492
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
493
|
+
settingsVersion: Type.TString;
|
|
494
|
+
}>, Type.TNull]>;
|
|
495
|
+
effective: Type.TUnion<[Type.TObject<{
|
|
496
|
+
kind: Type.TLiteral<"exact">;
|
|
497
|
+
model: Type.TObject<{
|
|
498
|
+
provider: Type.TString;
|
|
499
|
+
id: Type.TString;
|
|
500
|
+
}>;
|
|
501
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
502
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
503
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
504
|
+
settingsVersion: Type.TString;
|
|
505
|
+
}>, Type.TNull]>;
|
|
506
|
+
}>, Type.TObject<{
|
|
507
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
508
|
+
} & {
|
|
509
|
+
kind: Type.TLiteral<"request">;
|
|
510
|
+
usage: Type.TObject<{
|
|
511
|
+
input: Type.TNumber;
|
|
512
|
+
output: Type.TNumber;
|
|
513
|
+
cacheRead: Type.TNumber;
|
|
514
|
+
cacheWrite: Type.TNumber;
|
|
515
|
+
reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
|
|
516
|
+
total: Type.TNumber;
|
|
517
|
+
cost: Type.TObject<{
|
|
518
|
+
input: Type.TNumber;
|
|
519
|
+
output: Type.TNumber;
|
|
520
|
+
cacheRead: Type.TNumber;
|
|
521
|
+
cacheWrite: Type.TNumber;
|
|
522
|
+
total: Type.TNumber;
|
|
523
|
+
}>;
|
|
524
|
+
}>;
|
|
525
|
+
context: Type.TObject<{
|
|
526
|
+
tokens: Type.TNumber;
|
|
527
|
+
window: Type.TNumber;
|
|
528
|
+
lastRequest: Type.TUnion<[Type.TObject<{
|
|
529
|
+
input: Type.TNumber;
|
|
530
|
+
output: Type.TNumber;
|
|
531
|
+
cacheRead: Type.TNumber;
|
|
532
|
+
cacheWrite: Type.TNumber;
|
|
533
|
+
reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
|
|
534
|
+
total: Type.TNumber;
|
|
535
|
+
cost: Type.TObject<{
|
|
536
|
+
input: Type.TNumber;
|
|
537
|
+
output: Type.TNumber;
|
|
538
|
+
cacheRead: Type.TNumber;
|
|
539
|
+
cacheWrite: Type.TNumber;
|
|
540
|
+
total: Type.TNumber;
|
|
541
|
+
}>;
|
|
542
|
+
}>, Type.TNull]>;
|
|
543
|
+
}>;
|
|
544
|
+
step: Type.TEnum<["assistant", "compaction", "summary", "plugin"]>;
|
|
545
|
+
}>, Type.TObject<{
|
|
546
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
547
|
+
} & {
|
|
548
|
+
kind: Type.TLiteral<"changes">;
|
|
549
|
+
files: Type.TArray<Type.TObject<{
|
|
550
|
+
path: Type.TString;
|
|
551
|
+
status: Type.TEnum<["added", "modified", "deleted", "renamed", "untracked", "conflicted"]>;
|
|
552
|
+
added: Type.TNumber;
|
|
553
|
+
removed: Type.TNumber;
|
|
554
|
+
from: Type.TOptional<Type.TString>;
|
|
555
|
+
}>>;
|
|
556
|
+
}>, Type.TObject<{
|
|
557
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
558
|
+
} & {
|
|
559
|
+
kind: Type.TLiteral<"session">;
|
|
560
|
+
info: Type.TObject<{
|
|
561
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"session">>;
|
|
562
|
+
name: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
563
|
+
parent: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"session">>, Type.TNull]>;
|
|
564
|
+
call: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"call">>, Type.TNull]>;
|
|
565
|
+
workspace: Type.TUnsafe<import("./ids.ts").Id<"workspace">>;
|
|
566
|
+
pinned: Type.TBoolean;
|
|
567
|
+
archived: Type.TBoolean;
|
|
568
|
+
activation: Type.TUnion<[Type.TObject<{
|
|
569
|
+
kind: Type.TLiteral<"active">;
|
|
570
|
+
}>, Type.TObject<{
|
|
571
|
+
kind: Type.TLiteral<"inactive">;
|
|
572
|
+
}>, Type.TObject<{
|
|
573
|
+
kind: Type.TLiteral<"unavailable">;
|
|
574
|
+
reason: Type.TEnum<["unsupported", "unreachable"]>;
|
|
575
|
+
workspace: Type.TUnsafe<import("./ids.ts").Id<"workspace">>;
|
|
576
|
+
}>, Type.TObject<{
|
|
577
|
+
kind: Type.TLiteral<"failed">;
|
|
578
|
+
message: Type.TString;
|
|
579
|
+
}>]>;
|
|
580
|
+
heads: Type.TArray<Type.TObject<{
|
|
581
|
+
name: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
582
|
+
tip: Type.TUnion<[Type.TObject<{
|
|
583
|
+
kind: Type.TLiteral<"start">;
|
|
584
|
+
}>, Type.TObject<{
|
|
585
|
+
kind: Type.TLiteral<"commit">;
|
|
586
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
|
|
587
|
+
}>]>;
|
|
588
|
+
stack: Type.TUnion<[Type.TObject<{
|
|
589
|
+
parent: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
590
|
+
base: Type.TUnion<[Type.TObject<{
|
|
591
|
+
kind: Type.TLiteral<"start">;
|
|
592
|
+
}>, Type.TObject<{
|
|
593
|
+
kind: Type.TLiteral<"commit">;
|
|
594
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
|
|
595
|
+
}>]>;
|
|
596
|
+
stale: Type.TBoolean;
|
|
597
|
+
}>, Type.TNull]>;
|
|
598
|
+
execution: Type.TUnion<[Type.TObject<{
|
|
599
|
+
kind: Type.TLiteral<"idle">;
|
|
600
|
+
lastRun: Type.TUnion<[Type.TObject<{
|
|
601
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
602
|
+
end: Type.TUnion<[Type.TObject<{
|
|
603
|
+
kind: Type.TLiteral<"completed">;
|
|
604
|
+
usage: Type.TObject<{
|
|
605
|
+
input: Type.TNumber;
|
|
606
|
+
output: Type.TNumber;
|
|
607
|
+
cacheRead: Type.TNumber;
|
|
608
|
+
cacheWrite: Type.TNumber;
|
|
609
|
+
reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
|
|
610
|
+
total: Type.TNumber;
|
|
611
|
+
cost: Type.TObject<{
|
|
612
|
+
input: Type.TNumber;
|
|
613
|
+
output: Type.TNumber;
|
|
614
|
+
cacheRead: Type.TNumber;
|
|
615
|
+
cacheWrite: Type.TNumber;
|
|
616
|
+
total: Type.TNumber;
|
|
617
|
+
}>;
|
|
618
|
+
}>;
|
|
619
|
+
}>, Type.TObject<{
|
|
620
|
+
kind: Type.TLiteral<"stopped">;
|
|
621
|
+
}>, Type.TObject<{
|
|
622
|
+
kind: Type.TLiteral<"failed">;
|
|
623
|
+
failure: Type.TObject<{
|
|
624
|
+
class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
|
|
625
|
+
message: Type.TString;
|
|
626
|
+
retryAfterMs: Type.TOptional<Type.TNumber>;
|
|
627
|
+
}>;
|
|
628
|
+
}>]>;
|
|
629
|
+
endedAt: Type.TNumber;
|
|
630
|
+
}>, Type.TNull]>;
|
|
631
|
+
}>, Type.TObject<{
|
|
632
|
+
kind: Type.TLiteral<"live">;
|
|
633
|
+
run: Type.TObject<{
|
|
634
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
635
|
+
head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
636
|
+
startedAt: Type.TNumber;
|
|
637
|
+
attempt: Type.TNumber;
|
|
638
|
+
configuration: Type.TObject<{
|
|
639
|
+
kind: Type.TLiteral<"exact">;
|
|
640
|
+
model: Type.TObject<{
|
|
641
|
+
provider: Type.TString;
|
|
642
|
+
id: Type.TString;
|
|
643
|
+
}>;
|
|
644
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
645
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
646
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
647
|
+
settingsVersion: Type.TString;
|
|
648
|
+
}>;
|
|
649
|
+
origin: Type.TUnion<[Type.TObject<{
|
|
650
|
+
kind: Type.TLiteral<"input">;
|
|
651
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
652
|
+
}>, Type.TObject<{
|
|
653
|
+
kind: Type.TLiteral<"continuation">;
|
|
654
|
+
from: Type.TEnum<["child", "job", "wake"]>;
|
|
655
|
+
}>]>;
|
|
656
|
+
}>;
|
|
657
|
+
phase: Type.TEnum<["responding", "executing"]>;
|
|
658
|
+
stopping: Type.TBoolean;
|
|
659
|
+
}>, Type.TObject<{
|
|
660
|
+
kind: Type.TLiteral<"waiting">;
|
|
661
|
+
run: Type.TObject<{
|
|
662
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
663
|
+
head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
664
|
+
startedAt: Type.TNumber;
|
|
665
|
+
attempt: Type.TNumber;
|
|
666
|
+
configuration: Type.TObject<{
|
|
667
|
+
kind: Type.TLiteral<"exact">;
|
|
668
|
+
model: Type.TObject<{
|
|
669
|
+
provider: Type.TString;
|
|
670
|
+
id: Type.TString;
|
|
671
|
+
}>;
|
|
672
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
673
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
674
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
675
|
+
settingsVersion: Type.TString;
|
|
676
|
+
}>;
|
|
677
|
+
origin: Type.TUnion<[Type.TObject<{
|
|
678
|
+
kind: Type.TLiteral<"input">;
|
|
679
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
680
|
+
}>, Type.TObject<{
|
|
681
|
+
kind: Type.TLiteral<"continuation">;
|
|
682
|
+
from: Type.TEnum<["child", "job", "wake"]>;
|
|
683
|
+
}>]>;
|
|
684
|
+
}>;
|
|
685
|
+
on: Type.TUnion<[Type.TObject<{
|
|
686
|
+
kind: Type.TLiteral<"run">;
|
|
687
|
+
session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
|
|
688
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
689
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
690
|
+
}>, Type.TObject<{
|
|
691
|
+
kind: Type.TLiteral<"job">;
|
|
692
|
+
job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
|
|
693
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
694
|
+
}>, Type.TObject<{
|
|
695
|
+
kind: Type.TLiteral<"part">;
|
|
696
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
697
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
698
|
+
}>, Type.TObject<{
|
|
699
|
+
kind: Type.TLiteral<"timer">;
|
|
700
|
+
until: Type.TNumber;
|
|
701
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
702
|
+
}>]>;
|
|
703
|
+
}>, Type.TObject<{
|
|
704
|
+
kind: Type.TLiteral<"retrying">;
|
|
705
|
+
run: Type.TObject<{
|
|
706
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
707
|
+
head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
708
|
+
startedAt: Type.TNumber;
|
|
709
|
+
attempt: Type.TNumber;
|
|
710
|
+
configuration: Type.TObject<{
|
|
711
|
+
kind: Type.TLiteral<"exact">;
|
|
712
|
+
model: Type.TObject<{
|
|
713
|
+
provider: Type.TString;
|
|
714
|
+
id: Type.TString;
|
|
715
|
+
}>;
|
|
716
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
717
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
718
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
719
|
+
settingsVersion: Type.TString;
|
|
720
|
+
}>;
|
|
721
|
+
origin: Type.TUnion<[Type.TObject<{
|
|
722
|
+
kind: Type.TLiteral<"input">;
|
|
723
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
724
|
+
}>, Type.TObject<{
|
|
725
|
+
kind: Type.TLiteral<"continuation">;
|
|
726
|
+
from: Type.TEnum<["child", "job", "wake"]>;
|
|
727
|
+
}>]>;
|
|
728
|
+
}>;
|
|
729
|
+
until: Type.TNumber;
|
|
730
|
+
reason: Type.TString;
|
|
731
|
+
}>]>;
|
|
732
|
+
unread: Type.TBoolean;
|
|
733
|
+
}>>;
|
|
734
|
+
createdAt: Type.TNumber;
|
|
735
|
+
lastActivityAt: Type.TNumber;
|
|
736
|
+
}>;
|
|
737
|
+
}>, Type.TObject<{
|
|
738
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
739
|
+
} & {
|
|
740
|
+
kind: Type.TLiteral<"activation">;
|
|
741
|
+
activation: Type.TUnion<[Type.TObject<{
|
|
742
|
+
kind: Type.TLiteral<"active">;
|
|
743
|
+
}>, Type.TObject<{
|
|
744
|
+
kind: Type.TLiteral<"inactive">;
|
|
745
|
+
}>, Type.TObject<{
|
|
746
|
+
kind: Type.TLiteral<"unavailable">;
|
|
747
|
+
reason: Type.TEnum<["unsupported", "unreachable"]>;
|
|
748
|
+
workspace: Type.TUnsafe<import("./ids.ts").Id<"workspace">>;
|
|
749
|
+
}>, Type.TObject<{
|
|
750
|
+
kind: Type.TLiteral<"failed">;
|
|
751
|
+
message: Type.TString;
|
|
752
|
+
}>]>;
|
|
753
|
+
}>, Type.TObject<{
|
|
754
|
+
head: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"head">>, Type.TNull]>;
|
|
755
|
+
} & {
|
|
756
|
+
kind: Type.TLiteral<"catalog">;
|
|
757
|
+
catalog: Type.TObject<{
|
|
758
|
+
commands: Type.TArray<Type.TObject<{
|
|
759
|
+
name: Type.TString;
|
|
760
|
+
owner: Type.TString;
|
|
761
|
+
side: Type.TEnum<["core", "client"]>;
|
|
762
|
+
title: Type.TString;
|
|
763
|
+
description: Type.TString;
|
|
764
|
+
takesText: Type.TBoolean;
|
|
765
|
+
completes: Type.TBoolean;
|
|
766
|
+
category: Type.TOptional<Type.TString>;
|
|
767
|
+
keywords: Type.TOptional<Type.TArray<Type.TString>>;
|
|
768
|
+
}>>;
|
|
769
|
+
settings: Type.TArray<Type.TObject<{
|
|
770
|
+
id: Type.TString;
|
|
771
|
+
owner: Type.TString;
|
|
772
|
+
scope: Type.TEnum<["host", "session"]>;
|
|
773
|
+
label: Type.TString;
|
|
774
|
+
schema: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
775
|
+
choices: Type.TUnion<[Type.TArray<Type.TObject<{
|
|
776
|
+
value: Type.TUnsafe<import("./json.ts").Json>;
|
|
777
|
+
label: Type.TString;
|
|
778
|
+
badge: Type.TOptional<Type.TString>;
|
|
779
|
+
}>>, Type.TNull]>;
|
|
780
|
+
value: Type.TUnsafe<import("./json.ts").Json>;
|
|
781
|
+
from: Type.TEnum<["default", "host", "session"]>;
|
|
782
|
+
}>>;
|
|
783
|
+
skills: Type.TArray<Type.TObject<{
|
|
784
|
+
name: Type.TString;
|
|
785
|
+
owner: Type.TString;
|
|
786
|
+
description: Type.TString;
|
|
787
|
+
location: Type.TString;
|
|
788
|
+
}>>;
|
|
789
|
+
agents: Type.TArray<Type.TObject<{
|
|
790
|
+
id: Type.TString;
|
|
791
|
+
owner: Type.TString;
|
|
792
|
+
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
793
|
+
model: Type.TUnion<[Type.TObject<{
|
|
794
|
+
provider: Type.TString;
|
|
795
|
+
id: Type.TString;
|
|
796
|
+
}>, Type.TNull]>;
|
|
797
|
+
mode: Type.TEnum<["primary", "subagent", "all"]>;
|
|
798
|
+
}>>;
|
|
799
|
+
tools: Type.TArray<Type.TObject<{
|
|
800
|
+
name: Type.TString;
|
|
801
|
+
owner: Type.TString;
|
|
802
|
+
namespace: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
803
|
+
description: Type.TString;
|
|
804
|
+
parameters: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
805
|
+
output: Type.TUnion<[Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>, Type.TNull]>;
|
|
806
|
+
exposure: Type.TEnum<["model", "deferred", "code", "hidden"]>;
|
|
807
|
+
}>>;
|
|
808
|
+
}>;
|
|
809
|
+
}>]>>>;
|
|
810
|
+
fence: Type.TOptional<Type.TString>;
|
|
811
|
+
}>;
|
|
812
|
+
/** One ref a `RefStore.set` writes: its new target (null deletes it), the revision it must be at (`absent`: it must not exist), the events it logs to its session in order, and `fence`, a ref that must exist for the set to land (a run's live ref, which its stop deletes). */
|
|
813
|
+
export type RefUpdate = Decoded<typeof RefUpdateType>;
|
|
814
|
+
export declare const SetOutcomeType: Type.TUnion<[Type.TObject<{
|
|
815
|
+
kind: Type.TLiteral<"set">;
|
|
816
|
+
logged: Type.TArray<Type.TUnsafe<import("./ids.ts").Seq>>;
|
|
817
|
+
at: Type.TNumber;
|
|
818
|
+
revisions: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"revision">>>;
|
|
819
|
+
}>, Type.TObject<{
|
|
820
|
+
kind: Type.TLiteral<"stale">;
|
|
821
|
+
name: Type.TString;
|
|
822
|
+
revision: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"revision">>, Type.TNull]>;
|
|
823
|
+
}>, Type.TObject<{
|
|
824
|
+
kind: Type.TLiteral<"fenced">;
|
|
825
|
+
name: Type.TString;
|
|
826
|
+
}>]>;
|
|
827
|
+
/** What `RefStore.set` did: `set` with the seq each event was logged at, in update order and each update's events in order, the time it logged them at, and each update's new revision; `fenced`, naming the first fence ref an update needed that does not exist, checked before any expectation; or `stale`, naming the first ref whose expectation failed. A set that is not `set` wrote nothing. */
|
|
828
|
+
export type SetOutcome = Decoded<typeof SetOutcomeType>;
|
|
829
|
+
export declare const RefSchema: Schema<Ref>;
|
|
830
|
+
export declare const RefUpdateSchema: Schema<RefUpdate>;
|
|
831
|
+
export declare const SetOutcomeSchema: Schema<SetOutcome>;
|