@nyte-ai/schema 0.0.0-stage → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/THIRD-PARTY-NOTICES.md +866 -0
- package/dist/chunks/browser-0byq2fja.js +50 -0
- package/dist/chunks/browser-0chm3654.js +125 -0
- package/dist/chunks/browser-0g0z3617.js +47 -0
- package/dist/chunks/browser-0khex2b1.js +33 -0
- package/dist/chunks/browser-0sbkxgkx.js +115 -0
- package/dist/chunks/browser-0xr6c36r.js +106 -0
- package/dist/chunks/browser-1nqahr9q.js +239 -0
- package/dist/chunks/browser-1sfp0bcx.js +73 -0
- package/dist/chunks/browser-3exd93gm.js +50 -0
- package/dist/chunks/browser-40enyw9r.js +75 -0
- package/dist/chunks/browser-4et7qtz3.js +7 -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-8ancsy4m.js +118 -0
- package/dist/chunks/browser-9ystjh78.js +0 -0
- package/dist/chunks/browser-b519jtez.js +102 -0
- package/dist/chunks/browser-bg1esaw0.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-g5khdcap.js +170 -0
- package/dist/chunks/browser-h5k4hqfq.js +244 -0
- package/dist/chunks/browser-h86zs54a.js +65 -0
- package/dist/chunks/browser-hp9ze9ga.js +185 -0
- package/dist/chunks/browser-hq5q56sf.js +79 -0
- package/dist/chunks/browser-j150etqf.js +101 -0
- package/dist/chunks/browser-j629a6wa.js +17 -0
- package/dist/chunks/browser-jgxe05s4.js +301 -0
- package/dist/chunks/browser-k20f6cvv.js +0 -0
- package/dist/chunks/browser-m0wzr0g8.js +5 -0
- package/dist/chunks/browser-mzfc0v5j.js +58 -0
- package/dist/chunks/browser-p691tcac.js +139 -0
- package/dist/chunks/browser-pdv675va.js +135 -0
- package/dist/chunks/browser-pvfshqyk.js +36 -0
- package/dist/chunks/browser-qkxe0fwp.js +6 -0
- package/dist/chunks/browser-qncc807c.js +66 -0
- package/dist/chunks/browser-r87w64mz.js +32 -0
- package/dist/chunks/browser-s2xe7c21.js +82 -0
- package/dist/chunks/browser-sgst60b0.js +293 -0
- package/dist/chunks/browser-sgwxbek9.js +37 -0
- package/dist/chunks/browser-v70eq512.js +215 -0
- package/dist/chunks/browser-vzc3r2r3.js +64 -0
- package/dist/chunks/browser-xensz05x.js +172 -0
- package/dist/chunks/browser-ynj8v9ad.js +35 -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 +1752 -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 +280 -0
- package/dist/src/git.js +66 -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 +783 -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 +198 -0
- package/dist/src/models.js +47 -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 +830 -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 +3105 -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 +1031 -0
- package/dist/src/wire/operations/host.js +27 -0
- package/dist/src/wire/operations/index.d.ts +7103 -0
- package/dist/src/wire/operations/index.js +40 -0
- package/dist/src/wire/operations/session.d.ts +3779 -0
- package/dist/src/wire/operations/session.js +25 -0
- package/dist/src/wire/operations/workspace.d.ts +842 -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,198 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
import type { Decoded, Schema } from "./schema.ts";
|
|
3
|
+
export declare const ModelRefType: Type.TObject<{
|
|
4
|
+
provider: Type.TString;
|
|
5
|
+
id: Type.TString;
|
|
6
|
+
}>;
|
|
7
|
+
export type ModelRef = Decoded<typeof ModelRefType>;
|
|
8
|
+
export declare const ThinkingType: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
9
|
+
export type Thinking = Decoded<typeof ThinkingType>;
|
|
10
|
+
export declare const UsageType: Type.TObject<{
|
|
11
|
+
input: Type.TNumber;
|
|
12
|
+
output: Type.TNumber;
|
|
13
|
+
cacheRead: Type.TNumber;
|
|
14
|
+
cacheWrite: Type.TNumber;
|
|
15
|
+
reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
|
|
16
|
+
total: Type.TNumber;
|
|
17
|
+
cost: Type.TObject<{
|
|
18
|
+
input: Type.TNumber;
|
|
19
|
+
output: Type.TNumber;
|
|
20
|
+
cacheRead: Type.TNumber;
|
|
21
|
+
cacheWrite: Type.TNumber;
|
|
22
|
+
total: Type.TNumber;
|
|
23
|
+
}>;
|
|
24
|
+
}>;
|
|
25
|
+
export type Usage = Decoded<typeof UsageType>;
|
|
26
|
+
export declare const ContextViewType: Type.TObject<{
|
|
27
|
+
tokens: Type.TNumber;
|
|
28
|
+
window: Type.TNumber;
|
|
29
|
+
lastRequest: Type.TUnion<[Type.TObject<{
|
|
30
|
+
input: Type.TNumber;
|
|
31
|
+
output: Type.TNumber;
|
|
32
|
+
cacheRead: Type.TNumber;
|
|
33
|
+
cacheWrite: Type.TNumber;
|
|
34
|
+
reasoning: Type.TUnion<[Type.TNumber, Type.TNull]>;
|
|
35
|
+
total: Type.TNumber;
|
|
36
|
+
cost: Type.TObject<{
|
|
37
|
+
input: Type.TNumber;
|
|
38
|
+
output: Type.TNumber;
|
|
39
|
+
cacheRead: Type.TNumber;
|
|
40
|
+
cacheWrite: Type.TNumber;
|
|
41
|
+
total: Type.TNumber;
|
|
42
|
+
}>;
|
|
43
|
+
}>, Type.TNull]>;
|
|
44
|
+
}>;
|
|
45
|
+
export type ContextView = Decoded<typeof ContextViewType>;
|
|
46
|
+
export declare const LoginMethodType: Type.TUnion<[Type.TObject<{
|
|
47
|
+
kind: Type.TLiteral<"oauth">;
|
|
48
|
+
}>, Type.TObject<{
|
|
49
|
+
kind: Type.TLiteral<"key">;
|
|
50
|
+
}>]>;
|
|
51
|
+
export type LoginMethod = Decoded<typeof LoginMethodType>;
|
|
52
|
+
export declare const ModelAccountType: Type.TObject<{
|
|
53
|
+
provider: Type.TString;
|
|
54
|
+
id: Type.TString;
|
|
55
|
+
label: Type.TString;
|
|
56
|
+
method: Type.TUnion<[Type.TObject<{
|
|
57
|
+
kind: Type.TLiteral<"oauth">;
|
|
58
|
+
}>, Type.TObject<{
|
|
59
|
+
kind: Type.TLiteral<"key">;
|
|
60
|
+
}>]>;
|
|
61
|
+
active: Type.TBoolean;
|
|
62
|
+
}>;
|
|
63
|
+
export type ModelAccount = Decoded<typeof ModelAccountType>;
|
|
64
|
+
export declare const ProviderUsageType: Type.TObject<{
|
|
65
|
+
provider: Type.TString;
|
|
66
|
+
name: Type.TString;
|
|
67
|
+
account: Type.TUnion<[Type.TObject<{
|
|
68
|
+
provider: Type.TString;
|
|
69
|
+
id: Type.TString;
|
|
70
|
+
label: Type.TString;
|
|
71
|
+
method: Type.TUnion<[Type.TObject<{
|
|
72
|
+
kind: Type.TLiteral<"oauth">;
|
|
73
|
+
}>, Type.TObject<{
|
|
74
|
+
kind: Type.TLiteral<"key">;
|
|
75
|
+
}>]>;
|
|
76
|
+
active: Type.TBoolean;
|
|
77
|
+
}>, Type.TNull]>;
|
|
78
|
+
state: Type.TUnion<[Type.TObject<{
|
|
79
|
+
kind: Type.TLiteral<"ready">;
|
|
80
|
+
limits: Type.TArray<Type.TObject<{
|
|
81
|
+
label: Type.TString;
|
|
82
|
+
used: Type.TNumber;
|
|
83
|
+
limit: Type.TNumber;
|
|
84
|
+
resetsAt: Type.TUnion<[Type.TNumber, Type.TNull]>;
|
|
85
|
+
}>>;
|
|
86
|
+
observedAt: Type.TNumber;
|
|
87
|
+
stale: Type.TBoolean;
|
|
88
|
+
error: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
89
|
+
}>, Type.TObject<{
|
|
90
|
+
kind: Type.TLiteral<"unavailable">;
|
|
91
|
+
reason: Type.TEnum<["unsupported", "unconfigured", "failed"]>;
|
|
92
|
+
message: Type.TString;
|
|
93
|
+
}>]>;
|
|
94
|
+
}>;
|
|
95
|
+
export type ProviderUsage = Decoded<typeof ProviderUsageType>;
|
|
96
|
+
/**
|
|
97
|
+
* What a model's runtime does around a turn, for clients to read instead of
|
|
98
|
+
* its provider id: `steer` when a message sent mid-turn reaches it before the
|
|
99
|
+
* turn ends (otherwise it waits for the turn). The inputs it reads are
|
|
100
|
+
* `ModelInfo.input`.
|
|
101
|
+
*/
|
|
102
|
+
export declare const ModelCapabilitiesType: Type.TObject<{
|
|
103
|
+
steer: Type.TBoolean;
|
|
104
|
+
}>;
|
|
105
|
+
export type ModelCapabilities = Decoded<typeof ModelCapabilitiesType>;
|
|
106
|
+
export declare const ModelInfoType: Type.TObject<{
|
|
107
|
+
ref: Type.TObject<{
|
|
108
|
+
provider: Type.TString;
|
|
109
|
+
id: Type.TString;
|
|
110
|
+
}>;
|
|
111
|
+
name: Type.TString;
|
|
112
|
+
reasoning: Type.TBoolean;
|
|
113
|
+
thinking: Type.TArray<Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>>;
|
|
114
|
+
/** The level a chat on this model thinks at when it names none: in the catalog, the level last chosen for this model while it still accepts it, else its lowest level above off. */
|
|
115
|
+
defaultThinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
116
|
+
fast: Type.TUnion<[Type.TObject<{
|
|
117
|
+
provider: Type.TString;
|
|
118
|
+
id: Type.TString;
|
|
119
|
+
}>, Type.TNull]>;
|
|
120
|
+
contextWindow: Type.TNumber;
|
|
121
|
+
compactAt: Type.TNumber;
|
|
122
|
+
maxOutput: Type.TNumber;
|
|
123
|
+
input: Type.TArray<Type.TEnum<["text", "image"]>>;
|
|
124
|
+
capabilities: Type.TObject<{
|
|
125
|
+
steer: Type.TBoolean;
|
|
126
|
+
}>;
|
|
127
|
+
cost: Type.TObject<{
|
|
128
|
+
input: Type.TNumber;
|
|
129
|
+
output: Type.TNumber;
|
|
130
|
+
cacheRead: Type.TNumber;
|
|
131
|
+
cacheWrite: Type.TNumber;
|
|
132
|
+
}>;
|
|
133
|
+
}>;
|
|
134
|
+
export type ModelInfo = Decoded<typeof ModelInfoType>;
|
|
135
|
+
export declare const ModelListingType: Type.TEnum<["shown", "hidden", "favorite"]>;
|
|
136
|
+
export type ModelListing = Decoded<typeof ModelListingType>;
|
|
137
|
+
export declare const ModelCatalogViewType: Type.TObject<{
|
|
138
|
+
generation: Type.TUnsafe<import("./ids.ts").Id<"catalog-generation">>;
|
|
139
|
+
default: Type.TUnion<[Type.TObject<{
|
|
140
|
+
provider: Type.TString;
|
|
141
|
+
id: Type.TString;
|
|
142
|
+
}>, Type.TNull]>;
|
|
143
|
+
providers: Type.TArray<Type.TObject<{
|
|
144
|
+
id: Type.TString;
|
|
145
|
+
name: Type.TString;
|
|
146
|
+
credential: Type.TEnum<["unknown", "missing", "configured", "verified", "failed"]>;
|
|
147
|
+
methods: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
148
|
+
kind: Type.TLiteral<"oauth">;
|
|
149
|
+
}>, Type.TObject<{
|
|
150
|
+
kind: Type.TLiteral<"key">;
|
|
151
|
+
}>]>>;
|
|
152
|
+
limits: Type.TArray<Type.TObject<{
|
|
153
|
+
label: Type.TString;
|
|
154
|
+
used: Type.TNumber;
|
|
155
|
+
limit: Type.TNumber;
|
|
156
|
+
resetsAt: Type.TUnion<[Type.TNumber, Type.TNull]>;
|
|
157
|
+
}>>;
|
|
158
|
+
models: Type.TArray<Type.TObject<{
|
|
159
|
+
ref: Type.TObject<{
|
|
160
|
+
provider: Type.TString;
|
|
161
|
+
id: Type.TString;
|
|
162
|
+
}>;
|
|
163
|
+
name: Type.TString;
|
|
164
|
+
reasoning: Type.TBoolean;
|
|
165
|
+
thinking: Type.TArray<Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>>;
|
|
166
|
+
/** The level a chat on this model thinks at when it names none: in the catalog, the level last chosen for this model while it still accepts it, else its lowest level above off. */
|
|
167
|
+
defaultThinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
168
|
+
fast: Type.TUnion<[Type.TObject<{
|
|
169
|
+
provider: Type.TString;
|
|
170
|
+
id: Type.TString;
|
|
171
|
+
}>, Type.TNull]>;
|
|
172
|
+
contextWindow: Type.TNumber;
|
|
173
|
+
compactAt: Type.TNumber;
|
|
174
|
+
maxOutput: Type.TNumber;
|
|
175
|
+
input: Type.TArray<Type.TEnum<["text", "image"]>>;
|
|
176
|
+
capabilities: Type.TObject<{
|
|
177
|
+
steer: Type.TBoolean;
|
|
178
|
+
}>;
|
|
179
|
+
cost: Type.TObject<{
|
|
180
|
+
input: Type.TNumber;
|
|
181
|
+
output: Type.TNumber;
|
|
182
|
+
cacheRead: Type.TNumber;
|
|
183
|
+
cacheWrite: Type.TNumber;
|
|
184
|
+
}>;
|
|
185
|
+
}>>;
|
|
186
|
+
listings: Type.TRecord<"^.*$", Type.TEnum<["hidden", "favorite"]>>;
|
|
187
|
+
}>>;
|
|
188
|
+
}>;
|
|
189
|
+
export type ModelCatalogView = Decoded<typeof ModelCatalogViewType>;
|
|
190
|
+
export declare const ModelRefSchema: Schema<ModelRef>;
|
|
191
|
+
export declare const ThinkingSchema: Schema<Thinking>;
|
|
192
|
+
export declare const UsageSchema: Schema<Usage>;
|
|
193
|
+
export declare const ContextViewSchema: Schema<ContextView>;
|
|
194
|
+
export declare const LoginMethodSchema: Schema<LoginMethod>;
|
|
195
|
+
export declare const ModelAccountSchema: Schema<ModelAccount>;
|
|
196
|
+
export declare const ProviderUsageSchema: Schema<ProviderUsage>;
|
|
197
|
+
export declare const ModelInfoSchema: Schema<ModelInfo>;
|
|
198
|
+
export declare const ModelCatalogViewSchema: Schema<ModelCatalogView>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ModelRefType2,
|
|
3
|
+
ThinkingType2,
|
|
4
|
+
UsageType2,
|
|
5
|
+
ContextViewType2,
|
|
6
|
+
LoginMethodType2,
|
|
7
|
+
ModelAccountType2,
|
|
8
|
+
ProviderUsageType2,
|
|
9
|
+
ModelCapabilitiesType2,
|
|
10
|
+
ModelInfoType2,
|
|
11
|
+
ModelListingType2,
|
|
12
|
+
ModelCatalogViewType2,
|
|
13
|
+
ModelRefSchema2,
|
|
14
|
+
ThinkingSchema2,
|
|
15
|
+
UsageSchema2,
|
|
16
|
+
ContextViewSchema2,
|
|
17
|
+
LoginMethodSchema2,
|
|
18
|
+
ModelAccountSchema2,
|
|
19
|
+
ProviderUsageSchema2,
|
|
20
|
+
ModelInfoSchema2,
|
|
21
|
+
ModelCatalogViewSchema2
|
|
22
|
+
} from "../chunks/browser-0sbkxgkx.js";
|
|
23
|
+
import"../chunks/browser-4et7qtz3.js";
|
|
24
|
+
import"../chunks/browser-ypez6s7v.js";
|
|
25
|
+
import"../chunks/browser-vzc3r2r3.js";
|
|
26
|
+
export {
|
|
27
|
+
ContextViewSchema2 as ContextViewSchema,
|
|
28
|
+
ContextViewType2 as ContextViewType,
|
|
29
|
+
LoginMethodSchema2 as LoginMethodSchema,
|
|
30
|
+
LoginMethodType2 as LoginMethodType,
|
|
31
|
+
ModelAccountSchema2 as ModelAccountSchema,
|
|
32
|
+
ModelAccountType2 as ModelAccountType,
|
|
33
|
+
ModelCapabilitiesType2 as ModelCapabilitiesType,
|
|
34
|
+
ModelCatalogViewSchema2 as ModelCatalogViewSchema,
|
|
35
|
+
ModelCatalogViewType2 as ModelCatalogViewType,
|
|
36
|
+
ModelInfoSchema2 as ModelInfoSchema,
|
|
37
|
+
ModelInfoType2 as ModelInfoType,
|
|
38
|
+
ModelListingType2 as ModelListingType,
|
|
39
|
+
ModelRefSchema2 as ModelRefSchema,
|
|
40
|
+
ModelRefType2 as ModelRefType,
|
|
41
|
+
ProviderUsageSchema2 as ProviderUsageSchema,
|
|
42
|
+
ProviderUsageType2 as ProviderUsageType,
|
|
43
|
+
ThinkingSchema2 as ThinkingSchema,
|
|
44
|
+
ThinkingType2 as ThinkingType,
|
|
45
|
+
UsageSchema2 as UsageSchema,
|
|
46
|
+
UsageType2 as UsageType
|
|
47
|
+
};
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
import type { TSchema } from "typebox";
|
|
3
|
+
import type { Decoded, Schema } from "./schema.ts";
|
|
4
|
+
export declare const SignatureType: Type.TUnion<[Type.TUnsafe<import("./json.ts").Json>, Type.TNull]>;
|
|
5
|
+
export declare const PlacementType: Type.TUnion<[Type.TObject<{
|
|
6
|
+
kind: Type.TLiteral<"transcript">;
|
|
7
|
+
role: Type.TEnum<["step", "answer", "note"]>;
|
|
8
|
+
}>, Type.TObject<{
|
|
9
|
+
kind: Type.TLiteral<"modal">;
|
|
10
|
+
}>, Type.TIntersect<[Type.TObject<{
|
|
11
|
+
kind: Type.TString;
|
|
12
|
+
}>, Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>]>]>;
|
|
13
|
+
export type Placement = Decoded<typeof PlacementType>;
|
|
14
|
+
export declare const PartStatusType: Type.TUnion<[Type.TObject<{
|
|
15
|
+
kind: Type.TLiteral<"live">;
|
|
16
|
+
run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
|
|
17
|
+
waiting: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"call">>>;
|
|
18
|
+
answer: Type.TOptional<Type.TObject<{
|
|
19
|
+
action: Type.TString;
|
|
20
|
+
input: Type.TUnsafe<import("./json.ts").Json>;
|
|
21
|
+
}>>;
|
|
22
|
+
}>, Type.TObject<{
|
|
23
|
+
kind: Type.TLiteral<"waiting">;
|
|
24
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
25
|
+
on: Type.TUnion<[Type.TObject<{
|
|
26
|
+
kind: Type.TLiteral<"run">;
|
|
27
|
+
session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
|
|
28
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
29
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
30
|
+
}>, Type.TObject<{
|
|
31
|
+
kind: Type.TLiteral<"job">;
|
|
32
|
+
job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
|
|
33
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
34
|
+
}>, Type.TObject<{
|
|
35
|
+
kind: Type.TLiteral<"part">;
|
|
36
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
37
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
38
|
+
}>, Type.TObject<{
|
|
39
|
+
kind: Type.TLiteral<"timer">;
|
|
40
|
+
until: Type.TNumber;
|
|
41
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
42
|
+
}>]>;
|
|
43
|
+
}>, Type.TObject<{
|
|
44
|
+
kind: Type.TLiteral<"settled">;
|
|
45
|
+
commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
|
|
46
|
+
endedAt: Type.TNumber;
|
|
47
|
+
}>, Type.TObject<{
|
|
48
|
+
kind: Type.TLiteral<"failed">;
|
|
49
|
+
run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
|
|
50
|
+
failure: Type.TObject<{
|
|
51
|
+
class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
|
|
52
|
+
message: Type.TString;
|
|
53
|
+
retryAfterMs: Type.TOptional<Type.TNumber>;
|
|
54
|
+
}>;
|
|
55
|
+
}>]>;
|
|
56
|
+
export type PartStatus = Decoded<typeof PartStatusType>;
|
|
57
|
+
export declare const PartViewType: Type.TObject<{
|
|
58
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
59
|
+
partKind: Type.TString;
|
|
60
|
+
placement: Type.TUnion<[Type.TObject<{
|
|
61
|
+
kind: Type.TLiteral<"transcript">;
|
|
62
|
+
role: Type.TEnum<["step", "answer", "note"]>;
|
|
63
|
+
}>, Type.TObject<{
|
|
64
|
+
kind: Type.TLiteral<"modal">;
|
|
65
|
+
}>, Type.TIntersect<[Type.TObject<{
|
|
66
|
+
kind: Type.TString;
|
|
67
|
+
}>, Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>]>]>;
|
|
68
|
+
state: Type.TUnsafe<import("./json.ts").Json>;
|
|
69
|
+
version: Type.TNumber;
|
|
70
|
+
status: Type.TUnion<[Type.TObject<{
|
|
71
|
+
kind: Type.TLiteral<"live">;
|
|
72
|
+
run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
|
|
73
|
+
waiting: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"call">>>;
|
|
74
|
+
answer: Type.TOptional<Type.TObject<{
|
|
75
|
+
action: Type.TString;
|
|
76
|
+
input: Type.TUnsafe<import("./json.ts").Json>;
|
|
77
|
+
}>>;
|
|
78
|
+
}>, Type.TObject<{
|
|
79
|
+
kind: Type.TLiteral<"waiting">;
|
|
80
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
81
|
+
on: Type.TUnion<[Type.TObject<{
|
|
82
|
+
kind: Type.TLiteral<"run">;
|
|
83
|
+
session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
|
|
84
|
+
run: Type.TUnsafe<import("./ids.ts").Id<"run">>;
|
|
85
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
86
|
+
}>, Type.TObject<{
|
|
87
|
+
kind: Type.TLiteral<"job">;
|
|
88
|
+
job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
|
|
89
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
90
|
+
}>, Type.TObject<{
|
|
91
|
+
kind: Type.TLiteral<"part">;
|
|
92
|
+
part: Type.TUnsafe<import("./ids.ts").Id<"part">>;
|
|
93
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
94
|
+
}>, Type.TObject<{
|
|
95
|
+
kind: Type.TLiteral<"timer">;
|
|
96
|
+
until: Type.TNumber;
|
|
97
|
+
deadline: Type.TOptional<Type.TNumber>;
|
|
98
|
+
}>]>;
|
|
99
|
+
}>, Type.TObject<{
|
|
100
|
+
kind: Type.TLiteral<"settled">;
|
|
101
|
+
commit: Type.TUnsafe<import("./ids.ts").Id<"commit">>;
|
|
102
|
+
endedAt: Type.TNumber;
|
|
103
|
+
}>, Type.TObject<{
|
|
104
|
+
kind: Type.TLiteral<"failed">;
|
|
105
|
+
run: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"run">>, Type.TNull]>;
|
|
106
|
+
failure: Type.TObject<{
|
|
107
|
+
class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
|
|
108
|
+
message: Type.TString;
|
|
109
|
+
retryAfterMs: Type.TOptional<Type.TNumber>;
|
|
110
|
+
}>;
|
|
111
|
+
}>]>;
|
|
112
|
+
owner: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
113
|
+
}>;
|
|
114
|
+
export type PartView = Decoded<typeof PartViewType>;
|
|
115
|
+
export declare const ToolPartStateType: Type.TUnion<[Type.TObject<{
|
|
116
|
+
phase: Type.TLiteral<"calling">;
|
|
117
|
+
call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
|
|
118
|
+
name: Type.TString;
|
|
119
|
+
args: Type.TUnsafe<import("./json.ts").Json>;
|
|
120
|
+
class: Type.TUnion<[Type.TObject<{
|
|
121
|
+
kind: Type.TLiteral<"read">;
|
|
122
|
+
path: Type.TString;
|
|
123
|
+
}>, Type.TObject<{
|
|
124
|
+
kind: Type.TLiteral<"list">;
|
|
125
|
+
path: Type.TString;
|
|
126
|
+
}>, Type.TObject<{
|
|
127
|
+
kind: Type.TLiteral<"edit">;
|
|
128
|
+
path: Type.TString;
|
|
129
|
+
}>, Type.TObject<{
|
|
130
|
+
kind: Type.TLiteral<"shell">;
|
|
131
|
+
command: Type.TString;
|
|
132
|
+
description: Type.TOptional<Type.TString>;
|
|
133
|
+
}>, Type.TObject<{
|
|
134
|
+
kind: Type.TLiteral<"delegate">;
|
|
135
|
+
child: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"session">>, Type.TNull]>;
|
|
136
|
+
role: Type.TEnum<["task", "create", "send", "await", "read", "stop"]>;
|
|
137
|
+
title: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
138
|
+
}>, Type.TObject<{
|
|
139
|
+
kind: Type.TLiteral<"custom">;
|
|
140
|
+
label: Type.TString;
|
|
141
|
+
}>]>;
|
|
142
|
+
}>, Type.TObject<{
|
|
143
|
+
phase: Type.TLiteral<"running">;
|
|
144
|
+
progress: Type.TUnion<[Type.TObject<{
|
|
145
|
+
text: Type.TOptional<Type.TString>;
|
|
146
|
+
fraction: Type.TOptional<Type.TNumber>;
|
|
147
|
+
detail: Type.TOptional<Type.TUnsafe<import("./json.ts").Json>>;
|
|
148
|
+
}>, Type.TNull]>;
|
|
149
|
+
call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
|
|
150
|
+
name: Type.TString;
|
|
151
|
+
args: Type.TUnsafe<import("./json.ts").Json>;
|
|
152
|
+
class: Type.TUnion<[Type.TObject<{
|
|
153
|
+
kind: Type.TLiteral<"read">;
|
|
154
|
+
path: Type.TString;
|
|
155
|
+
}>, Type.TObject<{
|
|
156
|
+
kind: Type.TLiteral<"list">;
|
|
157
|
+
path: Type.TString;
|
|
158
|
+
}>, Type.TObject<{
|
|
159
|
+
kind: Type.TLiteral<"edit">;
|
|
160
|
+
path: Type.TString;
|
|
161
|
+
}>, Type.TObject<{
|
|
162
|
+
kind: Type.TLiteral<"shell">;
|
|
163
|
+
command: Type.TString;
|
|
164
|
+
description: Type.TOptional<Type.TString>;
|
|
165
|
+
}>, Type.TObject<{
|
|
166
|
+
kind: Type.TLiteral<"delegate">;
|
|
167
|
+
child: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"session">>, Type.TNull]>;
|
|
168
|
+
role: Type.TEnum<["task", "create", "send", "await", "read", "stop"]>;
|
|
169
|
+
title: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
170
|
+
}>, Type.TObject<{
|
|
171
|
+
kind: Type.TLiteral<"custom">;
|
|
172
|
+
label: Type.TString;
|
|
173
|
+
}>]>;
|
|
174
|
+
}>, Type.TObject<{
|
|
175
|
+
phase: Type.TLiteral<"settled">;
|
|
176
|
+
outcome: Type.TUnion<[Type.TObject<{
|
|
177
|
+
kind: Type.TLiteral<"ok">;
|
|
178
|
+
content: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
179
|
+
kind: Type.TLiteral<"text">;
|
|
180
|
+
text: Type.TString;
|
|
181
|
+
}>, Type.TObject<{
|
|
182
|
+
kind: Type.TLiteral<"file">;
|
|
183
|
+
blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
|
|
184
|
+
mime: Type.TString;
|
|
185
|
+
name: Type.TOptional<Type.TString>;
|
|
186
|
+
}>]>>;
|
|
187
|
+
output: Type.TUnsafe<import("./json.ts").Json>;
|
|
188
|
+
parts: Type.TArray<Type.TUnsafe<import("./ids.ts").Id<"part">>>;
|
|
189
|
+
}>, Type.TObject<{
|
|
190
|
+
kind: Type.TLiteral<"failed">;
|
|
191
|
+
message: Type.TString;
|
|
192
|
+
}>, Type.TObject<{
|
|
193
|
+
kind: Type.TLiteral<"interrupted">;
|
|
194
|
+
}>, Type.TObject<{
|
|
195
|
+
kind: Type.TLiteral<"rejected">;
|
|
196
|
+
reason: Type.TString;
|
|
197
|
+
}>, Type.TObject<{
|
|
198
|
+
kind: Type.TLiteral<"stopped">;
|
|
199
|
+
}>]>;
|
|
200
|
+
changes: Type.TUnion<[Type.TObject<{
|
|
201
|
+
added: Type.TNumber;
|
|
202
|
+
removed: Type.TNumber;
|
|
203
|
+
paths: Type.TArray<Type.TString>;
|
|
204
|
+
}>, Type.TNull]>;
|
|
205
|
+
call: Type.TUnsafe<import("./ids.ts").Id<"call">>;
|
|
206
|
+
name: Type.TString;
|
|
207
|
+
args: Type.TUnsafe<import("./json.ts").Json>;
|
|
208
|
+
class: Type.TUnion<[Type.TObject<{
|
|
209
|
+
kind: Type.TLiteral<"read">;
|
|
210
|
+
path: Type.TString;
|
|
211
|
+
}>, Type.TObject<{
|
|
212
|
+
kind: Type.TLiteral<"list">;
|
|
213
|
+
path: Type.TString;
|
|
214
|
+
}>, Type.TObject<{
|
|
215
|
+
kind: Type.TLiteral<"edit">;
|
|
216
|
+
path: Type.TString;
|
|
217
|
+
}>, Type.TObject<{
|
|
218
|
+
kind: Type.TLiteral<"shell">;
|
|
219
|
+
command: Type.TString;
|
|
220
|
+
description: Type.TOptional<Type.TString>;
|
|
221
|
+
}>, Type.TObject<{
|
|
222
|
+
kind: Type.TLiteral<"delegate">;
|
|
223
|
+
child: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"session">>, Type.TNull]>;
|
|
224
|
+
role: Type.TEnum<["task", "create", "send", "await", "read", "stop"]>;
|
|
225
|
+
title: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
226
|
+
}>, Type.TObject<{
|
|
227
|
+
kind: Type.TLiteral<"custom">;
|
|
228
|
+
label: Type.TString;
|
|
229
|
+
}>]>;
|
|
230
|
+
}>]>;
|
|
231
|
+
export type ToolPartState = Decoded<typeof ToolPartStateType>;
|
|
232
|
+
export declare function actOutcomeSchema<T extends TSchema>(output: T): Schema<((Readonly<Partial<Pick<{
|
|
233
|
+
kind: "ok";
|
|
234
|
+
output: import("typebox").StaticType<["Root"], "Decode", {
|
|
235
|
+
Json: Type.TUnion<[Type.TNull, Type.TBoolean, Type.TNumber, Type.TString, Type.TArray<Type.TRef<"Json">>, Type.TRecord<"^.*$", Type.TRef<"Json">>]>;
|
|
236
|
+
} & {
|
|
237
|
+
Root: Type.TUnion<[Type.TObject<{
|
|
238
|
+
kind: Type.TLiteral<"ok">;
|
|
239
|
+
output: T;
|
|
240
|
+
}>, Type.TObject<{
|
|
241
|
+
kind: Type.TLiteral<"rejected">;
|
|
242
|
+
reason: Type.TString;
|
|
243
|
+
}>, Type.TObject<{
|
|
244
|
+
kind: Type.TLiteral<"unknown-action">;
|
|
245
|
+
}>, Type.TObject<{
|
|
246
|
+
kind: Type.TLiteral<"closed">;
|
|
247
|
+
}>, Type.TObject<{
|
|
248
|
+
kind: Type.TLiteral<"no-owner">;
|
|
249
|
+
}>, Type.TObject<{
|
|
250
|
+
kind: Type.TLiteral<"failed">;
|
|
251
|
+
message: Type.TString;
|
|
252
|
+
}>]>;
|
|
253
|
+
}, {
|
|
254
|
+
kind: Type.TLiteral<"ok">;
|
|
255
|
+
output: T;
|
|
256
|
+
}, T>;
|
|
257
|
+
}, T extends Type.TReadonly<Type.TSchema> ? T extends Type.TOptional<T> ? "output" : never : never>>> & Readonly<Pick<{
|
|
258
|
+
kind: "ok";
|
|
259
|
+
output: import("typebox").StaticType<["Root"], "Decode", {
|
|
260
|
+
Json: Type.TUnion<[Type.TNull, Type.TBoolean, Type.TNumber, Type.TString, Type.TArray<Type.TRef<"Json">>, Type.TRecord<"^.*$", Type.TRef<"Json">>]>;
|
|
261
|
+
} & {
|
|
262
|
+
Root: Type.TUnion<[Type.TObject<{
|
|
263
|
+
kind: Type.TLiteral<"ok">;
|
|
264
|
+
output: T;
|
|
265
|
+
}>, Type.TObject<{
|
|
266
|
+
kind: Type.TLiteral<"rejected">;
|
|
267
|
+
reason: Type.TString;
|
|
268
|
+
}>, Type.TObject<{
|
|
269
|
+
kind: Type.TLiteral<"unknown-action">;
|
|
270
|
+
}>, Type.TObject<{
|
|
271
|
+
kind: Type.TLiteral<"closed">;
|
|
272
|
+
}>, Type.TObject<{
|
|
273
|
+
kind: Type.TLiteral<"no-owner">;
|
|
274
|
+
}>, Type.TObject<{
|
|
275
|
+
kind: Type.TLiteral<"failed">;
|
|
276
|
+
message: Type.TString;
|
|
277
|
+
}>]>;
|
|
278
|
+
}, {
|
|
279
|
+
kind: Type.TLiteral<"ok">;
|
|
280
|
+
output: T;
|
|
281
|
+
}, T>;
|
|
282
|
+
}, T extends Type.TReadonly<Type.TSchema> ? T extends Type.TOptional<T> ? never : "output" : never>> & Partial<Pick<{
|
|
283
|
+
kind: "ok";
|
|
284
|
+
output: import("typebox").StaticType<["Root"], "Decode", {
|
|
285
|
+
Json: Type.TUnion<[Type.TNull, Type.TBoolean, Type.TNumber, Type.TString, Type.TArray<Type.TRef<"Json">>, Type.TRecord<"^.*$", Type.TRef<"Json">>]>;
|
|
286
|
+
} & {
|
|
287
|
+
Root: Type.TUnion<[Type.TObject<{
|
|
288
|
+
kind: Type.TLiteral<"ok">;
|
|
289
|
+
output: T;
|
|
290
|
+
}>, Type.TObject<{
|
|
291
|
+
kind: Type.TLiteral<"rejected">;
|
|
292
|
+
reason: Type.TString;
|
|
293
|
+
}>, Type.TObject<{
|
|
294
|
+
kind: Type.TLiteral<"unknown-action">;
|
|
295
|
+
}>, Type.TObject<{
|
|
296
|
+
kind: Type.TLiteral<"closed">;
|
|
297
|
+
}>, Type.TObject<{
|
|
298
|
+
kind: Type.TLiteral<"no-owner">;
|
|
299
|
+
}>, Type.TObject<{
|
|
300
|
+
kind: Type.TLiteral<"failed">;
|
|
301
|
+
message: Type.TString;
|
|
302
|
+
}>]>;
|
|
303
|
+
}, {
|
|
304
|
+
kind: Type.TLiteral<"ok">;
|
|
305
|
+
output: T;
|
|
306
|
+
}, T>;
|
|
307
|
+
}, T extends Type.TOptional<Type.TSchema> ? T extends Type.TReadonly<T> ? never : "output" : never>> & Required<Pick<{
|
|
308
|
+
kind: "ok";
|
|
309
|
+
output: import("typebox").StaticType<["Root"], "Decode", {
|
|
310
|
+
Json: Type.TUnion<[Type.TNull, Type.TBoolean, Type.TNumber, Type.TString, Type.TArray<Type.TRef<"Json">>, Type.TRecord<"^.*$", Type.TRef<"Json">>]>;
|
|
311
|
+
} & {
|
|
312
|
+
Root: Type.TUnion<[Type.TObject<{
|
|
313
|
+
kind: Type.TLiteral<"ok">;
|
|
314
|
+
output: T;
|
|
315
|
+
}>, Type.TObject<{
|
|
316
|
+
kind: Type.TLiteral<"rejected">;
|
|
317
|
+
reason: Type.TString;
|
|
318
|
+
}>, Type.TObject<{
|
|
319
|
+
kind: Type.TLiteral<"unknown-action">;
|
|
320
|
+
}>, Type.TObject<{
|
|
321
|
+
kind: Type.TLiteral<"closed">;
|
|
322
|
+
}>, Type.TObject<{
|
|
323
|
+
kind: Type.TLiteral<"no-owner">;
|
|
324
|
+
}>, Type.TObject<{
|
|
325
|
+
kind: Type.TLiteral<"failed">;
|
|
326
|
+
message: Type.TString;
|
|
327
|
+
}>]>;
|
|
328
|
+
}, {
|
|
329
|
+
kind: Type.TLiteral<"ok">;
|
|
330
|
+
output: T;
|
|
331
|
+
}, T>;
|
|
332
|
+
}, Exclude<"output", (T extends Type.TReadonly<Type.TSchema> ? T extends Type.TOptional<T> ? "output" : never : never) | (T extends Type.TReadonly<Type.TSchema> ? T extends Type.TOptional<T> ? never : "output" : never) | (T extends Type.TOptional<Type.TSchema> ? T extends Type.TReadonly<T> ? never : "output" : never)> | Exclude<"kind", (T extends Type.TReadonly<Type.TSchema> ? T extends Type.TOptional<T> ? "output" : never : never) | (T extends Type.TReadonly<Type.TSchema> ? T extends Type.TOptional<T> ? never : "output" : never) | (T extends Type.TOptional<Type.TSchema> ? T extends Type.TReadonly<T> ? never : "output" : never)>>> extends infer T_2 ? { [K in keyof T_2]: T_2[K]; } : never) extends infer T_1 extends Record<PropertyKey, unknown> ? { [Key in keyof T_1]: T_1[Key]; } : never) | {
|
|
333
|
+
kind: "rejected";
|
|
334
|
+
reason: string;
|
|
335
|
+
} | {
|
|
336
|
+
kind: "unknown-action";
|
|
337
|
+
} | {
|
|
338
|
+
kind: "closed";
|
|
339
|
+
} | {
|
|
340
|
+
kind: "no-owner";
|
|
341
|
+
} | {
|
|
342
|
+
message: string;
|
|
343
|
+
kind: "failed";
|
|
344
|
+
}>;
|
|
345
|
+
export declare const PlacementSchema: Schema<Placement>;
|
|
346
|
+
export declare const PartStatusSchema: Schema<PartStatus>;
|
|
347
|
+
export declare const PartViewSchema: Schema<PartView>;
|
|
348
|
+
export declare const ToolPartStateSchema: Schema<ToolPartState>;
|
|
349
|
+
export type ActOutcome<Output> = {
|
|
350
|
+
readonly kind: "ok";
|
|
351
|
+
readonly output: Output;
|
|
352
|
+
} | {
|
|
353
|
+
readonly kind: "rejected";
|
|
354
|
+
readonly reason: string;
|
|
355
|
+
} | {
|
|
356
|
+
readonly kind: "unknown-action";
|
|
357
|
+
} | {
|
|
358
|
+
readonly kind: "closed";
|
|
359
|
+
} | {
|
|
360
|
+
readonly kind: "no-owner";
|
|
361
|
+
} | {
|
|
362
|
+
readonly kind: "failed";
|
|
363
|
+
readonly message: string;
|
|
364
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SignatureType2,
|
|
3
|
+
PlacementType2,
|
|
4
|
+
PartStatusType2,
|
|
5
|
+
PartViewType2,
|
|
6
|
+
ToolPartStateType2,
|
|
7
|
+
actOutcomeSchema2,
|
|
8
|
+
PlacementSchema2,
|
|
9
|
+
PartStatusSchema2,
|
|
10
|
+
PartViewSchema2,
|
|
11
|
+
ToolPartStateSchema2
|
|
12
|
+
} from "../chunks/browser-j150etqf.js";
|
|
13
|
+
import"../chunks/browser-h86zs54a.js";
|
|
14
|
+
import"../chunks/browser-8ancsy4m.js";
|
|
15
|
+
import"../chunks/browser-40enyw9r.js";
|
|
16
|
+
import"../chunks/browser-m0wzr0g8.js";
|
|
17
|
+
import"../chunks/browser-ynj8v9ad.js";
|
|
18
|
+
import"../chunks/browser-0sbkxgkx.js";
|
|
19
|
+
import"../chunks/browser-sgwxbek9.js";
|
|
20
|
+
import"../chunks/browser-1sfp0bcx.js";
|
|
21
|
+
import"../chunks/browser-4et7qtz3.js";
|
|
22
|
+
import"../chunks/browser-ypez6s7v.js";
|
|
23
|
+
import"../chunks/browser-vzc3r2r3.js";
|
|
24
|
+
export {
|
|
25
|
+
PartStatusSchema2 as PartStatusSchema,
|
|
26
|
+
PartStatusType2 as PartStatusType,
|
|
27
|
+
PartViewSchema2 as PartViewSchema,
|
|
28
|
+
PartViewType2 as PartViewType,
|
|
29
|
+
PlacementSchema2 as PlacementSchema,
|
|
30
|
+
PlacementType2 as PlacementType,
|
|
31
|
+
SignatureType2 as SignatureType,
|
|
32
|
+
ToolPartStateSchema2 as ToolPartStateSchema,
|
|
33
|
+
ToolPartStateType2 as ToolPartStateType,
|
|
34
|
+
actOutcomeSchema2 as actOutcomeSchema
|
|
35
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
import type { FileStatus } from "./files.ts";
|
|
3
|
+
import type { Decoded } from "./schema.ts";
|
|
4
|
+
export declare const HunkType: Type.TObject<{
|
|
5
|
+
oldStart: Type.TNumber;
|
|
6
|
+
oldLines: Type.TNumber;
|
|
7
|
+
newStart: Type.TNumber;
|
|
8
|
+
newLines: Type.TNumber;
|
|
9
|
+
header: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
10
|
+
lines: Type.TArray<Type.TObject<{
|
|
11
|
+
kind: Type.TEnum<["context", "add", "remove"]>;
|
|
12
|
+
text: Type.TString;
|
|
13
|
+
noNewline: Type.TOptional<Type.TLiteral<true>>;
|
|
14
|
+
}>>;
|
|
15
|
+
}>;
|
|
16
|
+
/** One hunk of a unified diff: where it sits on each side, the text after its `@@` header, and its lines, `noNewline` on a line the file ends without a newline after. */
|
|
17
|
+
export type Hunk = Decoded<typeof HunkType>;
|
|
18
|
+
/** Writes one file's unified diff as `git diff` prints it: the `diff --git` header, the `---`/`+++` sides (`/dev/null` for an added, untracked or deleted file) and the hunks. */
|
|
19
|
+
export declare function writePatch(path: string, status: FileStatus, hunks: readonly Hunk[]): string;
|
|
20
|
+
/** Reads the hunks of one file's unified diff, the text a `PatchEntry` of kind `text` carries as `patch`. */
|
|
21
|
+
export declare function readHunks(patch: string): readonly Hunk[];
|