@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,39 @@
|
|
|
1
|
+
// src/serial.ts
|
|
2
|
+
function serial() {
|
|
3
|
+
let tail = Promise.resolve();
|
|
4
|
+
let pending = 0;
|
|
5
|
+
const settle = () => {
|
|
6
|
+
pending -= 1;
|
|
7
|
+
};
|
|
8
|
+
return {
|
|
9
|
+
run(task) {
|
|
10
|
+
pending += 1;
|
|
11
|
+
const done = tail.then(task);
|
|
12
|
+
tail = done.then(settle, settle);
|
|
13
|
+
return done;
|
|
14
|
+
},
|
|
15
|
+
settled: () => tail,
|
|
16
|
+
get busy() {
|
|
17
|
+
return pending > 0;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function keyedSerial() {
|
|
22
|
+
const queues = new Map;
|
|
23
|
+
return {
|
|
24
|
+
run(key, task) {
|
|
25
|
+
const queue = queues.get(key) ?? serial();
|
|
26
|
+
queues.set(key, queue);
|
|
27
|
+
const done = queue.run(task);
|
|
28
|
+
queue.settled().then(() => {
|
|
29
|
+
if (!queue.busy && queues.get(key) === queue)
|
|
30
|
+
queues.delete(key);
|
|
31
|
+
});
|
|
32
|
+
return done;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
keyedSerial,
|
|
38
|
+
serial
|
|
39
|
+
};
|
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
import type { Decoded, Schema } from "./schema.ts";
|
|
3
|
+
export declare const HeadInfoType: Type.TObject<{
|
|
4
|
+
name: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
5
|
+
tip: Type.TUnion<[Type.TObject<{
|
|
6
|
+
kind: Type.TLiteral<"start">;
|
|
7
|
+
}>, Type.TObject<{
|
|
8
|
+
kind: Type.TLiteral<"commit">;
|
|
9
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
|
|
10
|
+
}>]>;
|
|
11
|
+
stack: Type.TUnion<[Type.TObject<{
|
|
12
|
+
parent: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
13
|
+
base: Type.TUnion<[Type.TObject<{
|
|
14
|
+
kind: Type.TLiteral<"start">;
|
|
15
|
+
}>, Type.TObject<{
|
|
16
|
+
kind: Type.TLiteral<"commit">;
|
|
17
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
|
|
18
|
+
}>]>;
|
|
19
|
+
stale: Type.TBoolean;
|
|
20
|
+
}>, Type.TNull]>;
|
|
21
|
+
execution: Type.TUnion<[Type.TObject<{
|
|
22
|
+
kind: Type.TLiteral<"idle">;
|
|
23
|
+
lastRun: Type.TUnion<[Type.TObject<{
|
|
24
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
25
|
+
end: Type.TUnion<[Type.TObject<{
|
|
26
|
+
kind: Type.TLiteral<"completed">;
|
|
27
|
+
usage: Type.TObject<{
|
|
28
|
+
input: Type.TNumber;
|
|
29
|
+
output: Type.TNumber;
|
|
30
|
+
cacheRead: Type.TNumber;
|
|
31
|
+
cacheWrite: Type.TNumber;
|
|
32
|
+
reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
|
|
33
|
+
total: Type.TNumber;
|
|
34
|
+
cost: Type.TObject<{
|
|
35
|
+
input: Type.TNumber;
|
|
36
|
+
output: Type.TNumber;
|
|
37
|
+
cacheRead: Type.TNumber;
|
|
38
|
+
cacheWrite: Type.TNumber;
|
|
39
|
+
total: Type.TNumber;
|
|
40
|
+
}>;
|
|
41
|
+
}>;
|
|
42
|
+
}>, Type.TObject<{
|
|
43
|
+
kind: Type.TLiteral<"stopped">;
|
|
44
|
+
}>, Type.TObject<{
|
|
45
|
+
kind: Type.TLiteral<"failed">;
|
|
46
|
+
failure: Type.TObject<{
|
|
47
|
+
class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
|
|
48
|
+
message: Type.TString;
|
|
49
|
+
retryAfterMs: Type.TOptional<Type.TNumber>;
|
|
50
|
+
}>;
|
|
51
|
+
}>]>;
|
|
52
|
+
endedAt: Type.TNumber;
|
|
53
|
+
}>, Type.TNull]>;
|
|
54
|
+
}>, Type.TObject<{
|
|
55
|
+
kind: Type.TLiteral<"live">;
|
|
56
|
+
run: Type.TObject<{
|
|
57
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
58
|
+
head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
59
|
+
startedAt: Type.TNumber;
|
|
60
|
+
attempt: Type.TNumber;
|
|
61
|
+
configuration: Type.TObject<{
|
|
62
|
+
kind: Type.TLiteral<"exact">;
|
|
63
|
+
model: Type.TObject<{
|
|
64
|
+
provider: Type.TString;
|
|
65
|
+
id: Type.TString;
|
|
66
|
+
}>;
|
|
67
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
68
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
69
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
70
|
+
settingsVersion: Type.TString;
|
|
71
|
+
}>;
|
|
72
|
+
origin: Type.TUnion<[Type.TObject<{
|
|
73
|
+
kind: Type.TLiteral<"input">;
|
|
74
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
75
|
+
}>, Type.TObject<{
|
|
76
|
+
kind: Type.TLiteral<"continuation">;
|
|
77
|
+
from: Type.TEnum<["child", "job", "wake"]>;
|
|
78
|
+
}>]>;
|
|
79
|
+
}>;
|
|
80
|
+
phase: Type.TEnum<["responding", "executing"]>;
|
|
81
|
+
stopping: Type.TBoolean;
|
|
82
|
+
}>, Type.TObject<{
|
|
83
|
+
kind: Type.TLiteral<"waiting">;
|
|
84
|
+
run: Type.TObject<{
|
|
85
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
86
|
+
head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
87
|
+
startedAt: Type.TNumber;
|
|
88
|
+
attempt: Type.TNumber;
|
|
89
|
+
configuration: Type.TObject<{
|
|
90
|
+
kind: Type.TLiteral<"exact">;
|
|
91
|
+
model: Type.TObject<{
|
|
92
|
+
provider: Type.TString;
|
|
93
|
+
id: Type.TString;
|
|
94
|
+
}>;
|
|
95
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
96
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
97
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
98
|
+
settingsVersion: Type.TString;
|
|
99
|
+
}>;
|
|
100
|
+
origin: Type.TUnion<[Type.TObject<{
|
|
101
|
+
kind: Type.TLiteral<"input">;
|
|
102
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
103
|
+
}>, Type.TObject<{
|
|
104
|
+
kind: Type.TLiteral<"continuation">;
|
|
105
|
+
from: Type.TEnum<["child", "job", "wake"]>;
|
|
106
|
+
}>]>;
|
|
107
|
+
}>;
|
|
108
|
+
on: Type.TUnion<[Type.TObject<{
|
|
109
|
+
kind: Type.TLiteral<"run">;
|
|
110
|
+
session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
|
|
111
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
112
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
113
|
+
}>, Type.TObject<{
|
|
114
|
+
kind: Type.TLiteral<"job">;
|
|
115
|
+
job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
|
|
116
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
117
|
+
}>, Type.TObject<{
|
|
118
|
+
kind: Type.TLiteral<"part">;
|
|
119
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
120
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
121
|
+
}>, Type.TObject<{
|
|
122
|
+
kind: Type.TLiteral<"timer">;
|
|
123
|
+
until: Type.TNumber;
|
|
124
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
125
|
+
}>]>;
|
|
126
|
+
}>, Type.TObject<{
|
|
127
|
+
kind: Type.TLiteral<"retrying">;
|
|
128
|
+
run: Type.TObject<{
|
|
129
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
130
|
+
head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
131
|
+
startedAt: Type.TNumber;
|
|
132
|
+
attempt: Type.TNumber;
|
|
133
|
+
configuration: Type.TObject<{
|
|
134
|
+
kind: Type.TLiteral<"exact">;
|
|
135
|
+
model: Type.TObject<{
|
|
136
|
+
provider: Type.TString;
|
|
137
|
+
id: Type.TString;
|
|
138
|
+
}>;
|
|
139
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
140
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
141
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
142
|
+
settingsVersion: Type.TString;
|
|
143
|
+
}>;
|
|
144
|
+
origin: Type.TUnion<[Type.TObject<{
|
|
145
|
+
kind: Type.TLiteral<"input">;
|
|
146
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
147
|
+
}>, Type.TObject<{
|
|
148
|
+
kind: Type.TLiteral<"continuation">;
|
|
149
|
+
from: Type.TEnum<["child", "job", "wake"]>;
|
|
150
|
+
}>]>;
|
|
151
|
+
}>;
|
|
152
|
+
until: Type.TNumber;
|
|
153
|
+
reason: Type.TString;
|
|
154
|
+
}>]>;
|
|
155
|
+
unread: Type.TBoolean;
|
|
156
|
+
}>;
|
|
157
|
+
export type HeadInfo = Decoded<typeof HeadInfoType>;
|
|
158
|
+
export declare const SessionInfoType: Type.TObject<{
|
|
159
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"session">>;
|
|
160
|
+
name: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
161
|
+
parent: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"session">>, Type.TNull]>;
|
|
162
|
+
call: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"call">>, Type.TNull]>;
|
|
163
|
+
workspace: Type.TUnsafe<import("./ids.ts").Id<"workspace">>;
|
|
164
|
+
pinned: Type.TBoolean;
|
|
165
|
+
archived: Type.TBoolean;
|
|
166
|
+
activation: Type.TUnion<[Type.TObject<{
|
|
167
|
+
kind: Type.TLiteral<"active">;
|
|
168
|
+
}>, Type.TObject<{
|
|
169
|
+
kind: Type.TLiteral<"inactive">;
|
|
170
|
+
}>, Type.TObject<{
|
|
171
|
+
kind: Type.TLiteral<"unavailable">;
|
|
172
|
+
reason: Type.TEnum<["unsupported", "unreachable"]>;
|
|
173
|
+
workspace: Type.TUnsafe<import("./ids.ts").Id<"workspace">>;
|
|
174
|
+
}>, Type.TObject<{
|
|
175
|
+
kind: Type.TLiteral<"failed">;
|
|
176
|
+
message: Type.TString;
|
|
177
|
+
}>]>;
|
|
178
|
+
heads: Type.TArray<Type.TObject<{
|
|
179
|
+
name: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
180
|
+
tip: Type.TUnion<[Type.TObject<{
|
|
181
|
+
kind: Type.TLiteral<"start">;
|
|
182
|
+
}>, Type.TObject<{
|
|
183
|
+
kind: Type.TLiteral<"commit">;
|
|
184
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
|
|
185
|
+
}>]>;
|
|
186
|
+
stack: Type.TUnion<[Type.TObject<{
|
|
187
|
+
parent: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
188
|
+
base: Type.TUnion<[Type.TObject<{
|
|
189
|
+
kind: Type.TLiteral<"start">;
|
|
190
|
+
}>, Type.TObject<{
|
|
191
|
+
kind: Type.TLiteral<"commit">;
|
|
192
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
|
|
193
|
+
}>]>;
|
|
194
|
+
stale: Type.TBoolean;
|
|
195
|
+
}>, Type.TNull]>;
|
|
196
|
+
execution: Type.TUnion<[Type.TObject<{
|
|
197
|
+
kind: Type.TLiteral<"idle">;
|
|
198
|
+
lastRun: Type.TUnion<[Type.TObject<{
|
|
199
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
200
|
+
end: Type.TUnion<[Type.TObject<{
|
|
201
|
+
kind: Type.TLiteral<"completed">;
|
|
202
|
+
usage: Type.TObject<{
|
|
203
|
+
input: Type.TNumber;
|
|
204
|
+
output: Type.TNumber;
|
|
205
|
+
cacheRead: Type.TNumber;
|
|
206
|
+
cacheWrite: Type.TNumber;
|
|
207
|
+
reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
|
|
208
|
+
total: Type.TNumber;
|
|
209
|
+
cost: Type.TObject<{
|
|
210
|
+
input: Type.TNumber;
|
|
211
|
+
output: Type.TNumber;
|
|
212
|
+
cacheRead: Type.TNumber;
|
|
213
|
+
cacheWrite: Type.TNumber;
|
|
214
|
+
total: Type.TNumber;
|
|
215
|
+
}>;
|
|
216
|
+
}>;
|
|
217
|
+
}>, Type.TObject<{
|
|
218
|
+
kind: Type.TLiteral<"stopped">;
|
|
219
|
+
}>, Type.TObject<{
|
|
220
|
+
kind: Type.TLiteral<"failed">;
|
|
221
|
+
failure: Type.TObject<{
|
|
222
|
+
class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
|
|
223
|
+
message: Type.TString;
|
|
224
|
+
retryAfterMs: Type.TOptional<Type.TNumber>;
|
|
225
|
+
}>;
|
|
226
|
+
}>]>;
|
|
227
|
+
endedAt: Type.TNumber;
|
|
228
|
+
}>, Type.TNull]>;
|
|
229
|
+
}>, Type.TObject<{
|
|
230
|
+
kind: Type.TLiteral<"live">;
|
|
231
|
+
run: Type.TObject<{
|
|
232
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
233
|
+
head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
234
|
+
startedAt: Type.TNumber;
|
|
235
|
+
attempt: Type.TNumber;
|
|
236
|
+
configuration: Type.TObject<{
|
|
237
|
+
kind: Type.TLiteral<"exact">;
|
|
238
|
+
model: Type.TObject<{
|
|
239
|
+
provider: Type.TString;
|
|
240
|
+
id: Type.TString;
|
|
241
|
+
}>;
|
|
242
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
243
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
244
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
245
|
+
settingsVersion: Type.TString;
|
|
246
|
+
}>;
|
|
247
|
+
origin: Type.TUnion<[Type.TObject<{
|
|
248
|
+
kind: Type.TLiteral<"input">;
|
|
249
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
250
|
+
}>, Type.TObject<{
|
|
251
|
+
kind: Type.TLiteral<"continuation">;
|
|
252
|
+
from: Type.TEnum<["child", "job", "wake"]>;
|
|
253
|
+
}>]>;
|
|
254
|
+
}>;
|
|
255
|
+
phase: Type.TEnum<["responding", "executing"]>;
|
|
256
|
+
stopping: Type.TBoolean;
|
|
257
|
+
}>, Type.TObject<{
|
|
258
|
+
kind: Type.TLiteral<"waiting">;
|
|
259
|
+
run: Type.TObject<{
|
|
260
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
261
|
+
head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
262
|
+
startedAt: Type.TNumber;
|
|
263
|
+
attempt: Type.TNumber;
|
|
264
|
+
configuration: Type.TObject<{
|
|
265
|
+
kind: Type.TLiteral<"exact">;
|
|
266
|
+
model: Type.TObject<{
|
|
267
|
+
provider: Type.TString;
|
|
268
|
+
id: Type.TString;
|
|
269
|
+
}>;
|
|
270
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
271
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
272
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
273
|
+
settingsVersion: Type.TString;
|
|
274
|
+
}>;
|
|
275
|
+
origin: Type.TUnion<[Type.TObject<{
|
|
276
|
+
kind: Type.TLiteral<"input">;
|
|
277
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
278
|
+
}>, Type.TObject<{
|
|
279
|
+
kind: Type.TLiteral<"continuation">;
|
|
280
|
+
from: Type.TEnum<["child", "job", "wake"]>;
|
|
281
|
+
}>]>;
|
|
282
|
+
}>;
|
|
283
|
+
on: Type.TUnion<[Type.TObject<{
|
|
284
|
+
kind: Type.TLiteral<"run">;
|
|
285
|
+
session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
|
|
286
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
287
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
288
|
+
}>, Type.TObject<{
|
|
289
|
+
kind: Type.TLiteral<"job">;
|
|
290
|
+
job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
|
|
291
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
292
|
+
}>, Type.TObject<{
|
|
293
|
+
kind: Type.TLiteral<"part">;
|
|
294
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
295
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
296
|
+
}>, Type.TObject<{
|
|
297
|
+
kind: Type.TLiteral<"timer">;
|
|
298
|
+
until: Type.TNumber;
|
|
299
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
300
|
+
}>]>;
|
|
301
|
+
}>, Type.TObject<{
|
|
302
|
+
kind: Type.TLiteral<"retrying">;
|
|
303
|
+
run: Type.TObject<{
|
|
304
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
305
|
+
head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
306
|
+
startedAt: Type.TNumber;
|
|
307
|
+
attempt: Type.TNumber;
|
|
308
|
+
configuration: Type.TObject<{
|
|
309
|
+
kind: Type.TLiteral<"exact">;
|
|
310
|
+
model: Type.TObject<{
|
|
311
|
+
provider: Type.TString;
|
|
312
|
+
id: Type.TString;
|
|
313
|
+
}>;
|
|
314
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
315
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
316
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
317
|
+
settingsVersion: Type.TString;
|
|
318
|
+
}>;
|
|
319
|
+
origin: Type.TUnion<[Type.TObject<{
|
|
320
|
+
kind: Type.TLiteral<"input">;
|
|
321
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
322
|
+
}>, Type.TObject<{
|
|
323
|
+
kind: Type.TLiteral<"continuation">;
|
|
324
|
+
from: Type.TEnum<["child", "job", "wake"]>;
|
|
325
|
+
}>]>;
|
|
326
|
+
}>;
|
|
327
|
+
until: Type.TNumber;
|
|
328
|
+
reason: Type.TString;
|
|
329
|
+
}>]>;
|
|
330
|
+
unread: Type.TBoolean;
|
|
331
|
+
}>>;
|
|
332
|
+
createdAt: Type.TNumber;
|
|
333
|
+
lastActivityAt: Type.TNumber;
|
|
334
|
+
}>;
|
|
335
|
+
export type SessionInfo = Decoded<typeof SessionInfoType>;
|
|
336
|
+
/**
|
|
337
|
+
* The slash names Nyte's own clients keep for their built-in commands and
|
|
338
|
+
* aliases. The host refuses a plugin command that takes one, so a client never
|
|
339
|
+
* hides it behind its own.
|
|
340
|
+
*/
|
|
341
|
+
export declare const CLIENT_COMMAND_NAMES: readonly ["accounts", "cd", "compact", "continue", "edit", "help", "login", "logout", "mcp", "new", "plugins", "pr", "quit", "reload", "resume", "sessions", "settings", "skills", "tasks", "tree", "trust", "update", "usage"];
|
|
342
|
+
export type ClientCommandName = (typeof CLIENT_COMMAND_NAMES)[number];
|
|
343
|
+
/** A name a user can type after `/` in every client: lowercase ASCII letters, digits and `-`, not starting with `-`. */
|
|
344
|
+
export declare const COMMAND_NAME: RegExp;
|
|
345
|
+
export declare const CommandInfoType: Type.TObject<{
|
|
346
|
+
name: Type.TString;
|
|
347
|
+
owner: Type.TString;
|
|
348
|
+
side: Type.TEnum<["core", "client"]>;
|
|
349
|
+
title: Type.TString;
|
|
350
|
+
description: Type.TString;
|
|
351
|
+
/** Picking the command waits for text after its name instead of running it at once. */
|
|
352
|
+
takesText: Type.TBoolean;
|
|
353
|
+
/** The command suggests that text: ask `completeCommand` as it is typed. */
|
|
354
|
+
completes: Type.TBoolean;
|
|
355
|
+
category: Type.TOptional<Type.TString>;
|
|
356
|
+
keywords: Type.TOptional<Type.TArray<Type.TString>>;
|
|
357
|
+
}>;
|
|
358
|
+
export type CommandInfo = Decoded<typeof CommandInfoType>;
|
|
359
|
+
/** One suggestion for the text after a command's name: picking it replaces that text with `value`. */
|
|
360
|
+
export declare const CommandCompletionType: Type.TObject<{
|
|
361
|
+
value: Type.TString;
|
|
362
|
+
label: Type.TString;
|
|
363
|
+
description: Type.TOptional<Type.TString>;
|
|
364
|
+
}>;
|
|
365
|
+
export type CommandCompletion = Decoded<typeof CommandCompletionType>;
|
|
366
|
+
export declare const SettingInfoType: Type.TObject<{
|
|
367
|
+
id: Type.TString;
|
|
368
|
+
owner: Type.TString;
|
|
369
|
+
scope: Type.TEnum<["host", "session"]>;
|
|
370
|
+
label: Type.TString;
|
|
371
|
+
schema: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
372
|
+
choices: Type.TUnion<[Type.TArray<Type.TObject<{
|
|
373
|
+
value: Type.TUnsafe<import("./json.ts").Json>;
|
|
374
|
+
label: Type.TString;
|
|
375
|
+
badge: Type.TOptional<Type.TString>;
|
|
376
|
+
}>>, Type.TNull]>;
|
|
377
|
+
value: Type.TUnsafe<import("./json.ts").Json>;
|
|
378
|
+
from: Type.TEnum<["default", "host", "session"]>;
|
|
379
|
+
}>;
|
|
380
|
+
export type SettingInfo = Decoded<typeof SettingInfoType>;
|
|
381
|
+
export declare const SkillInfoType: Type.TObject<{
|
|
382
|
+
name: Type.TString;
|
|
383
|
+
owner: Type.TString;
|
|
384
|
+
description: Type.TString;
|
|
385
|
+
location: Type.TString;
|
|
386
|
+
}>;
|
|
387
|
+
export type SkillInfo = Decoded<typeof SkillInfoType>;
|
|
388
|
+
export declare const AgentInfoType: Type.TObject<{
|
|
389
|
+
id: Type.TString;
|
|
390
|
+
owner: Type.TString;
|
|
391
|
+
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
392
|
+
model: Type.TUnion<[Type.TObject<{
|
|
393
|
+
provider: Type.TString;
|
|
394
|
+
id: Type.TString;
|
|
395
|
+
}>, Type.TNull]>;
|
|
396
|
+
mode: Type.TEnum<["primary", "subagent", "all"]>;
|
|
397
|
+
}>;
|
|
398
|
+
export type AgentInfo = Decoded<typeof AgentInfoType>;
|
|
399
|
+
export declare const ToolInfoType: Type.TObject<{
|
|
400
|
+
name: Type.TString;
|
|
401
|
+
owner: Type.TString;
|
|
402
|
+
namespace: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
403
|
+
description: Type.TString;
|
|
404
|
+
parameters: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
405
|
+
output: Type.TUnion<[Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>, Type.TNull]>;
|
|
406
|
+
exposure: Type.TEnum<["model", "deferred", "code", "hidden"]>;
|
|
407
|
+
}>;
|
|
408
|
+
export type ToolInfo = Decoded<typeof ToolInfoType>;
|
|
409
|
+
export declare const SessionCatalogViewType: Type.TObject<{
|
|
410
|
+
commands: Type.TArray<Type.TObject<{
|
|
411
|
+
name: Type.TString;
|
|
412
|
+
owner: Type.TString;
|
|
413
|
+
side: Type.TEnum<["core", "client"]>;
|
|
414
|
+
title: Type.TString;
|
|
415
|
+
description: Type.TString;
|
|
416
|
+
/** Picking the command waits for text after its name instead of running it at once. */
|
|
417
|
+
takesText: Type.TBoolean;
|
|
418
|
+
/** The command suggests that text: ask `completeCommand` as it is typed. */
|
|
419
|
+
completes: Type.TBoolean;
|
|
420
|
+
category: Type.TOptional<Type.TString>;
|
|
421
|
+
keywords: Type.TOptional<Type.TArray<Type.TString>>;
|
|
422
|
+
}>>;
|
|
423
|
+
settings: Type.TArray<Type.TObject<{
|
|
424
|
+
id: Type.TString;
|
|
425
|
+
owner: Type.TString;
|
|
426
|
+
scope: Type.TEnum<["host", "session"]>;
|
|
427
|
+
label: Type.TString;
|
|
428
|
+
schema: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
429
|
+
choices: Type.TUnion<[Type.TArray<Type.TObject<{
|
|
430
|
+
value: Type.TUnsafe<import("./json.ts").Json>;
|
|
431
|
+
label: Type.TString;
|
|
432
|
+
badge: Type.TOptional<Type.TString>;
|
|
433
|
+
}>>, Type.TNull]>;
|
|
434
|
+
value: Type.TUnsafe<import("./json.ts").Json>;
|
|
435
|
+
from: Type.TEnum<["default", "host", "session"]>;
|
|
436
|
+
}>>;
|
|
437
|
+
skills: Type.TArray<Type.TObject<{
|
|
438
|
+
name: Type.TString;
|
|
439
|
+
owner: Type.TString;
|
|
440
|
+
description: Type.TString;
|
|
441
|
+
location: Type.TString;
|
|
442
|
+
}>>;
|
|
443
|
+
agents: Type.TArray<Type.TObject<{
|
|
444
|
+
id: Type.TString;
|
|
445
|
+
owner: Type.TString;
|
|
446
|
+
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
447
|
+
model: Type.TUnion<[Type.TObject<{
|
|
448
|
+
provider: Type.TString;
|
|
449
|
+
id: Type.TString;
|
|
450
|
+
}>, Type.TNull]>;
|
|
451
|
+
mode: Type.TEnum<["primary", "subagent", "all"]>;
|
|
452
|
+
}>>;
|
|
453
|
+
tools: Type.TArray<Type.TObject<{
|
|
454
|
+
name: Type.TString;
|
|
455
|
+
owner: Type.TString;
|
|
456
|
+
namespace: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
457
|
+
description: Type.TString;
|
|
458
|
+
parameters: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
459
|
+
output: Type.TUnion<[Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>, Type.TNull]>;
|
|
460
|
+
exposure: Type.TEnum<["model", "deferred", "code", "hidden"]>;
|
|
461
|
+
}>>;
|
|
462
|
+
}>;
|
|
463
|
+
export type SessionCatalogView = Decoded<typeof SessionCatalogViewType>;
|
|
464
|
+
/** What a new chat in a workspace would offer before it exists: its plugin commands and skills. */
|
|
465
|
+
export declare const WorkspaceCatalogViewType: Type.TObject<{
|
|
466
|
+
commands: Type.TArray<Type.TObject<{
|
|
467
|
+
name: Type.TString;
|
|
468
|
+
owner: Type.TString;
|
|
469
|
+
side: Type.TEnum<["core", "client"]>;
|
|
470
|
+
title: Type.TString;
|
|
471
|
+
description: Type.TString;
|
|
472
|
+
/** Picking the command waits for text after its name instead of running it at once. */
|
|
473
|
+
takesText: Type.TBoolean;
|
|
474
|
+
/** The command suggests that text: ask `completeCommand` as it is typed. */
|
|
475
|
+
completes: Type.TBoolean;
|
|
476
|
+
category: Type.TOptional<Type.TString>;
|
|
477
|
+
keywords: Type.TOptional<Type.TArray<Type.TString>>;
|
|
478
|
+
}>>;
|
|
479
|
+
skills: Type.TArray<Type.TObject<{
|
|
480
|
+
name: Type.TString;
|
|
481
|
+
owner: Type.TString;
|
|
482
|
+
description: Type.TString;
|
|
483
|
+
location: Type.TString;
|
|
484
|
+
}>>;
|
|
485
|
+
}>;
|
|
486
|
+
export type WorkspaceCatalogView = Decoded<typeof WorkspaceCatalogViewType>;
|
|
487
|
+
export declare const CommandOutcomeType: Type.TUnion<[Type.TObject<{
|
|
488
|
+
kind: Type.TLiteral<"ran">;
|
|
489
|
+
output: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
490
|
+
}>, Type.TObject<{
|
|
491
|
+
kind: Type.TLiteral<"sent">;
|
|
492
|
+
receipt: Type.TUnsafe<import("./ids.ts").Id<"receipt">>;
|
|
493
|
+
}>, Type.TObject<{
|
|
494
|
+
kind: Type.TLiteral<"unknown">;
|
|
495
|
+
}>, Type.TObject<{
|
|
496
|
+
kind: Type.TLiteral<"failed">;
|
|
497
|
+
message: Type.TString;
|
|
498
|
+
}>]>;
|
|
499
|
+
export type CommandOutcome = Decoded<typeof CommandOutcomeType>;
|
|
500
|
+
/** What a command run outside any chat did: `prompt` is the first message of the chat it asks to start. */
|
|
501
|
+
export declare const WorkspaceCommandOutcomeType: Type.TUnion<[Type.TObject<{
|
|
502
|
+
kind: Type.TLiteral<"ran">;
|
|
503
|
+
output: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
504
|
+
}>, Type.TObject<{
|
|
505
|
+
kind: Type.TLiteral<"prompt">;
|
|
506
|
+
content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
|
|
507
|
+
kind: Type.TLiteral<"text">;
|
|
508
|
+
text: Type.TString;
|
|
509
|
+
}>, Type.TObject<{
|
|
510
|
+
kind: Type.TLiteral<"file">;
|
|
511
|
+
blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
|
|
512
|
+
mime: Type.TString;
|
|
513
|
+
name: Type.TString;
|
|
514
|
+
}>, Type.TObject<{
|
|
515
|
+
kind: Type.TLiteral<"reference">;
|
|
516
|
+
path: Type.TString;
|
|
517
|
+
blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
|
|
518
|
+
}>, Type.TObject<{
|
|
519
|
+
kind: Type.TLiteral<"skill">;
|
|
520
|
+
name: Type.TString;
|
|
521
|
+
location: Type.TString;
|
|
522
|
+
}>, Type.TObject<{
|
|
523
|
+
kind: Type.TLiteral<"excerpt">;
|
|
524
|
+
source: Type.TUnion<[Type.TObject<{
|
|
525
|
+
kind: Type.TLiteral<"diff">;
|
|
526
|
+
path: Type.TString;
|
|
527
|
+
side: Type.TEnum<["old", "new"]>;
|
|
528
|
+
start: Type.TNumber;
|
|
529
|
+
end: Type.TNumber;
|
|
530
|
+
}>, Type.TObject<{
|
|
531
|
+
kind: Type.TLiteral<"terminal">;
|
|
532
|
+
command: Type.TOptional<Type.TString>;
|
|
533
|
+
}>, Type.TObject<{
|
|
534
|
+
kind: Type.TLiteral<"browser">;
|
|
535
|
+
url: Type.TString;
|
|
536
|
+
selector: Type.TString;
|
|
537
|
+
}>]>;
|
|
538
|
+
text: Type.TString;
|
|
539
|
+
}>]>>]>;
|
|
540
|
+
}>, Type.TObject<{
|
|
541
|
+
kind: Type.TLiteral<"unknown">;
|
|
542
|
+
}>, Type.TObject<{
|
|
543
|
+
kind: Type.TLiteral<"failed">;
|
|
544
|
+
message: Type.TString;
|
|
545
|
+
}>]>;
|
|
546
|
+
export type WorkspaceCommandOutcome = Decoded<typeof WorkspaceCommandOutcomeType>;
|
|
547
|
+
export declare const UpdateOutcomeType: Type.TUnion<[Type.TObject<{
|
|
548
|
+
kind: Type.TLiteral<"updated">;
|
|
549
|
+
}>, Type.TObject<{
|
|
550
|
+
kind: Type.TLiteral<"busy">;
|
|
551
|
+
runs: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"run">>>;
|
|
552
|
+
}>, Type.TObject<{
|
|
553
|
+
kind: Type.TLiteral<"unknown-workspace">;
|
|
554
|
+
}>]>;
|
|
555
|
+
export type UpdateOutcome = Decoded<typeof UpdateOutcomeType>;
|
|
556
|
+
export declare const RemoveSessionOutcomeType: Type.TUnion<[Type.TObject<{
|
|
557
|
+
kind: Type.TLiteral<"removed">;
|
|
558
|
+
}>, Type.TObject<{
|
|
559
|
+
kind: Type.TLiteral<"busy">;
|
|
560
|
+
runs: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"run">>>;
|
|
561
|
+
}>, Type.TObject<{
|
|
562
|
+
kind: Type.TLiteral<"has-children">;
|
|
563
|
+
children: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"session">>>;
|
|
564
|
+
}>]>;
|
|
565
|
+
export type RemoveSessionOutcome = Decoded<typeof RemoveSessionOutcomeType>;
|
|
566
|
+
export declare const HeadInfoSchema: Schema<HeadInfo>;
|
|
567
|
+
export declare const SessionInfoSchema: Schema<SessionInfo>;
|
|
568
|
+
export declare const CommandInfoSchema: Schema<CommandInfo>;
|
|
569
|
+
export declare const SettingInfoSchema: Schema<SettingInfo>;
|
|
570
|
+
export declare const SkillInfoSchema: Schema<SkillInfo>;
|
|
571
|
+
export declare const AgentInfoSchema: Schema<AgentInfo>;
|
|
572
|
+
export declare const ToolInfoSchema: Schema<ToolInfo>;
|
|
573
|
+
export declare const SessionCatalogViewSchema: Schema<SessionCatalogView>;
|
|
574
|
+
export declare const CommandOutcomeSchema: Schema<CommandOutcome>;
|
|
575
|
+
export declare const CommandCompletionsSchema: Schema<readonly CommandCompletion[]>;
|
|
576
|
+
export declare const WorkspaceCommandOutcomeSchema: Schema<WorkspaceCommandOutcome>;
|
|
577
|
+
export declare const UpdateOutcomeSchema: Schema<UpdateOutcome>;
|
|
578
|
+
export declare const RemoveSessionOutcomeSchema: Schema<RemoveSessionOutcome>;
|