experimental-agent 0.2.3 → 0.3.0
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/README.md +55 -254
- package/dist/adapter-BigchkkI.d.mts +201 -0
- package/dist/adapter-BigchkkI.d.ts +201 -0
- package/dist/chunk-BFFNCESS.mjs +302 -0
- package/dist/chunk-C4VSUEY2.mjs +72 -0
- package/dist/chunk-DOD4MC5D.mjs +196 -0
- package/dist/chunk-ELWIUJUK.mjs +96 -0
- package/dist/chunk-GKASMIBR.mjs +50 -0
- package/dist/chunk-JO3JDCH5.mjs +107 -0
- package/dist/chunk-MSWINCCM.mjs +128 -0
- package/dist/chunk-RT72C52I.mjs +324 -0
- package/dist/chunk-ZUFJJYC4.mjs +150 -0
- package/dist/{handler-FRUPZ4LX.mjs → docker-QPCLWLYR.mjs} +3 -4
- package/dist/entry-BmQ8FO-5.d.ts +36 -0
- package/dist/entry-CZd9aAwn.d.mts +36 -0
- package/dist/index.d.mts +415 -18
- package/dist/index.d.ts +415 -18
- package/dist/index.js +3036 -5494
- package/dist/index.mjs +3264 -1142
- package/dist/lifecycle-workflow-steps.d.mts +5 -0
- package/dist/lifecycle-workflow-steps.d.ts +5 -0
- package/dist/lifecycle-workflow-steps.js +263 -0
- package/dist/lifecycle-workflow-steps.mjs +9 -0
- package/dist/lifecycle-workflow.d.mts +6 -6
- package/dist/lifecycle-workflow.d.ts +6 -6
- package/dist/lifecycle-workflow.js +192 -905
- package/dist/lifecycle-workflow.mjs +3 -1
- package/dist/local-KJ3BSIFJ.mjs +8 -0
- package/dist/next/loader.js +27 -6
- package/dist/next/loader.mjs +1 -1
- package/dist/next.js +27 -6
- package/dist/next.mjs +1 -1
- package/dist/{process-manager-JDUJDYGU.mjs → process-manager-WQHAIVRB.mjs} +1 -1
- package/dist/sandbox.d.mts +6 -0
- package/dist/sandbox.d.ts +6 -0
- package/dist/sandbox.js +1070 -0
- package/dist/sandbox.mjs +19 -0
- package/dist/steps-BnkRQKlc.d.ts +173 -0
- package/dist/steps-u-mGDbP_.d.mts +173 -0
- package/dist/storage.d.mts +11 -0
- package/dist/storage.d.ts +11 -0
- package/dist/storage.js +234 -0
- package/dist/storage.mjs +12 -0
- package/dist/vercel-QZ6INPMV.mjs +11 -0
- package/package.json +26 -5
- package/dist/agent-workflow.d.mts +0 -30
- package/dist/agent-workflow.d.ts +0 -30
- package/dist/agent-workflow.js +0 -5433
- package/dist/agent-workflow.mjs +0 -14
- package/dist/chunk-7M6UPURS.mjs +0 -75
- package/dist/chunk-AML2VCQS.mjs +0 -1287
- package/dist/chunk-FQ67QZOI.mjs +0 -75
- package/dist/chunk-NO7RHGTH.mjs +0 -2367
- package/dist/chunk-NXDVNJRS.mjs +0 -106
- package/dist/chunk-OZZVS6L5.mjs +0 -139
- package/dist/chunk-SJVFFE5D.mjs +0 -402
- package/dist/chunk-TAXLUVIC.mjs +0 -1
- package/dist/chunk-TGNVXSMX.mjs +0 -399
- package/dist/chunk-YRYXN7W4.mjs +0 -48
- package/dist/chunk-ZIAHPXOJ.mjs +0 -595
- package/dist/client-BKA7XBGW.mjs +0 -15
- package/dist/client-CEeSFGva.d.mts +0 -2376
- package/dist/client-CEeSFGva.d.ts +0 -2376
- package/dist/docker-FB2MJTHJ.mjs +0 -12
- package/dist/local-fs-handlers-SYOCKTPN.mjs +0 -447
- package/dist/sandbox-UENKQV3T.mjs +0 -21
- package/dist/storage-LSDMRW73.mjs +0 -20
- package/dist/vercel-SD3JTECG.mjs +0 -20
- package/dist/vercel-sdk-I6A4MVAN.mjs +0 -8
|
@@ -1,2376 +0,0 @@
|
|
|
1
|
-
import * as errore from 'errore';
|
|
2
|
-
import * as ai from 'ai';
|
|
3
|
-
import { UIMessage, JSONSchema7, ToolSet, InferToolInput, ModelMessage, GatewayModelId, UIMessageChunk, InferUITools } from 'ai';
|
|
4
|
-
import * as z from 'zod';
|
|
5
|
-
import { z as z$1 } from 'zod';
|
|
6
|
-
import { NetworkPolicy } from '@vercel/sandbox';
|
|
7
|
-
|
|
8
|
-
declare const SessionNotFoundError_base: errore.FactoryTaggedErrorClass<"SessionNotFoundError", "Session $id not found", Error>;
|
|
9
|
-
declare class SessionNotFoundError extends SessionNotFoundError_base {
|
|
10
|
-
}
|
|
11
|
-
declare const SessionError_base: errore.FactoryTaggedErrorClass<"SessionError", "Session $id failed: $reason", Error>;
|
|
12
|
-
declare class SessionError extends SessionError_base {
|
|
13
|
-
}
|
|
14
|
-
declare const SandboxNotFoundError_base: errore.FactoryTaggedErrorClass<"SandboxNotFoundError", "Sandbox $id not found", Error>;
|
|
15
|
-
declare class SandboxNotFoundError extends SandboxNotFoundError_base {
|
|
16
|
-
}
|
|
17
|
-
declare const StorageError_base: errore.FactoryTaggedErrorClass<"StorageError", "$reason", Error>;
|
|
18
|
-
declare class StorageError extends StorageError_base {
|
|
19
|
-
}
|
|
20
|
-
declare const StorageConflictError_base: errore.FactoryTaggedErrorClass<"StorageConflictError", "$reason", Error>;
|
|
21
|
-
declare class StorageConflictError extends StorageConflictError_base {
|
|
22
|
-
}
|
|
23
|
-
declare const SandboxError_base: errore.FactoryTaggedErrorClass<"SandboxError", "$reason", Error>;
|
|
24
|
-
declare class SandboxError extends SandboxError_base {
|
|
25
|
-
}
|
|
26
|
-
declare const MessageNotFoundError_base: errore.FactoryTaggedErrorClass<"MessageNotFoundError", "Message $id not found", Error>;
|
|
27
|
-
declare class MessageNotFoundError extends MessageNotFoundError_base {
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
declare const SandboxConfigSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
31
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
32
|
-
type: z$1.ZodLiteral<"vercel">;
|
|
33
|
-
resources: z$1.ZodOptional<z$1.ZodObject<{
|
|
34
|
-
vcpus: z$1.ZodNumber;
|
|
35
|
-
}, z$1.core.$strip>>;
|
|
36
|
-
ports: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
37
|
-
lifecycle: z$1.ZodOptional<z$1.ZodObject<{
|
|
38
|
-
pollIntervalMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
39
|
-
stopAfterInactiveMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
40
|
-
snapshotBeforeTimeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
41
|
-
snapshotId: z$1.ZodOptional<z$1.ZodString>;
|
|
42
|
-
autoStart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
43
|
-
}, z$1.core.$strip>>;
|
|
44
|
-
networkPolicy: z$1.ZodOptional<z$1.ZodCustom<NetworkPolicy, NetworkPolicy>>;
|
|
45
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
46
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
47
|
-
type: z$1.ZodLiteral<"local">;
|
|
48
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
49
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
50
|
-
type: z$1.ZodLiteral<"docker">;
|
|
51
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
52
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
53
|
-
type: z$1.ZodLiteral<"custom">;
|
|
54
|
-
url: z$1.ZodString;
|
|
55
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
56
|
-
}, z$1.core.$strip>], "type">;
|
|
57
|
-
type SandboxConfig = z$1.infer<typeof SandboxConfigSchema>;
|
|
58
|
-
declare const SessionSchema: z$1.ZodObject<{
|
|
59
|
-
id: z$1.ZodString;
|
|
60
|
-
createdAt: z$1.ZodNumber;
|
|
61
|
-
updatedAt: z$1.ZodNumber;
|
|
62
|
-
runId: z$1.ZodNullable<z$1.ZodString>;
|
|
63
|
-
lastMessageId: z$1.ZodNullable<z$1.ZodString>;
|
|
64
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
65
|
-
system: z$1.ZodNullable<z$1.ZodString>;
|
|
66
|
-
model: z$1.ZodNullable<z$1.ZodString>;
|
|
67
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
68
|
-
skillsDir: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
69
|
-
hookToken: z$1.ZodNullable<z$1.ZodString>;
|
|
70
|
-
activeTools: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
71
|
-
generation: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
|
|
72
|
-
maxSteps: z$1.ZodOptional<z$1.ZodNumber>;
|
|
73
|
-
temperature: z$1.ZodOptional<z$1.ZodNumber>;
|
|
74
|
-
topK: z$1.ZodOptional<z$1.ZodNumber>;
|
|
75
|
-
topP: z$1.ZodOptional<z$1.ZodNumber>;
|
|
76
|
-
frequencyPenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
77
|
-
presencePenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
78
|
-
maxOutputTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
79
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
80
|
-
}, z$1.core.$strip>>>;
|
|
81
|
-
}, z$1.core.$strip>;
|
|
82
|
-
declare const StepUsageSchema: z$1.ZodObject<{
|
|
83
|
-
stepIndex: z$1.ZodNumber;
|
|
84
|
-
model: z$1.ZodString;
|
|
85
|
-
inputTokens: z$1.ZodNumber;
|
|
86
|
-
outputTokens: z$1.ZodNumber;
|
|
87
|
-
totalTokens: z$1.ZodNumber;
|
|
88
|
-
cacheReadTokens: z$1.ZodNumber;
|
|
89
|
-
cacheWriteTokens: z$1.ZodNumber;
|
|
90
|
-
reasoningTokens: z$1.ZodNumber;
|
|
91
|
-
}, z$1.core.$strip>;
|
|
92
|
-
declare const UsageSummarySchema: z$1.ZodObject<{
|
|
93
|
-
model: z$1.ZodString;
|
|
94
|
-
inputTokens: z$1.ZodNumber;
|
|
95
|
-
outputTokens: z$1.ZodNumber;
|
|
96
|
-
totalTokens: z$1.ZodNumber;
|
|
97
|
-
cacheReadTokens: z$1.ZodNumber;
|
|
98
|
-
cacheWriteTokens: z$1.ZodNumber;
|
|
99
|
-
reasoningTokens: z$1.ZodNumber;
|
|
100
|
-
stepCount: z$1.ZodNumber;
|
|
101
|
-
}, z$1.core.$strip>;
|
|
102
|
-
declare const MessageUsageSchema: z$1.ZodObject<{
|
|
103
|
-
steps: z$1.ZodArray<z$1.ZodObject<{
|
|
104
|
-
stepIndex: z$1.ZodNumber;
|
|
105
|
-
model: z$1.ZodString;
|
|
106
|
-
inputTokens: z$1.ZodNumber;
|
|
107
|
-
outputTokens: z$1.ZodNumber;
|
|
108
|
-
totalTokens: z$1.ZodNumber;
|
|
109
|
-
cacheReadTokens: z$1.ZodNumber;
|
|
110
|
-
cacheWriteTokens: z$1.ZodNumber;
|
|
111
|
-
reasoningTokens: z$1.ZodNumber;
|
|
112
|
-
}, z$1.core.$strip>>;
|
|
113
|
-
summary: z$1.ZodObject<{
|
|
114
|
-
model: z$1.ZodString;
|
|
115
|
-
inputTokens: z$1.ZodNumber;
|
|
116
|
-
outputTokens: z$1.ZodNumber;
|
|
117
|
-
totalTokens: z$1.ZodNumber;
|
|
118
|
-
cacheReadTokens: z$1.ZodNumber;
|
|
119
|
-
cacheWriteTokens: z$1.ZodNumber;
|
|
120
|
-
reasoningTokens: z$1.ZodNumber;
|
|
121
|
-
stepCount: z$1.ZodNumber;
|
|
122
|
-
}, z$1.core.$strip>;
|
|
123
|
-
}, z$1.core.$strip>;
|
|
124
|
-
type MessageUsage = z$1.infer<typeof MessageUsageSchema>;
|
|
125
|
-
type UsageSummary = z$1.infer<typeof UsageSummarySchema>;
|
|
126
|
-
type StepUsage = z$1.infer<typeof StepUsageSchema>;
|
|
127
|
-
declare const MessageSchema: z$1.ZodObject<{
|
|
128
|
-
id: z$1.ZodString;
|
|
129
|
-
sessionId: z$1.ZodString;
|
|
130
|
-
role: z$1.ZodEnum<{
|
|
131
|
-
system: "system";
|
|
132
|
-
user: "user";
|
|
133
|
-
assistant: "assistant";
|
|
134
|
-
}>;
|
|
135
|
-
createdAt: z$1.ZodNumber;
|
|
136
|
-
startedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
137
|
-
completedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
138
|
-
interruptedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
139
|
-
interruptedLastPart: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
|
|
140
|
-
index: z$1.ZodNumber;
|
|
141
|
-
part: z$1.ZodUnknown;
|
|
142
|
-
}, z$1.core.$strip>>>;
|
|
143
|
-
usage: z$1.ZodNullable<z$1.ZodObject<{
|
|
144
|
-
steps: z$1.ZodArray<z$1.ZodObject<{
|
|
145
|
-
stepIndex: z$1.ZodNumber;
|
|
146
|
-
model: z$1.ZodString;
|
|
147
|
-
inputTokens: z$1.ZodNumber;
|
|
148
|
-
outputTokens: z$1.ZodNumber;
|
|
149
|
-
totalTokens: z$1.ZodNumber;
|
|
150
|
-
cacheReadTokens: z$1.ZodNumber;
|
|
151
|
-
cacheWriteTokens: z$1.ZodNumber;
|
|
152
|
-
reasoningTokens: z$1.ZodNumber;
|
|
153
|
-
}, z$1.core.$strip>>;
|
|
154
|
-
summary: z$1.ZodObject<{
|
|
155
|
-
model: z$1.ZodString;
|
|
156
|
-
inputTokens: z$1.ZodNumber;
|
|
157
|
-
outputTokens: z$1.ZodNumber;
|
|
158
|
-
totalTokens: z$1.ZodNumber;
|
|
159
|
-
cacheReadTokens: z$1.ZodNumber;
|
|
160
|
-
cacheWriteTokens: z$1.ZodNumber;
|
|
161
|
-
reasoningTokens: z$1.ZodNumber;
|
|
162
|
-
stepCount: z$1.ZodNumber;
|
|
163
|
-
}, z$1.core.$strip>;
|
|
164
|
-
}, z$1.core.$strip>>;
|
|
165
|
-
}, z$1.core.$strip>;
|
|
166
|
-
/**
|
|
167
|
-
* The `part` field corresponds to `UIMessage["parts"][number]` from the `ai` package.
|
|
168
|
-
* We use `z.unknown()` because the exact shape varies by part type (text, tool-call,
|
|
169
|
-
* tool-result, etc.) and may evolve with the AI SDK. The RPC layer just passes it through.
|
|
170
|
-
*/
|
|
171
|
-
declare const PartSchema: z$1.ZodObject<{
|
|
172
|
-
id: z$1.ZodString;
|
|
173
|
-
messageId: z$1.ZodString;
|
|
174
|
-
sessionId: z$1.ZodString;
|
|
175
|
-
index: z$1.ZodNumber;
|
|
176
|
-
part: z$1.ZodUnknown;
|
|
177
|
-
}, z$1.core.$strip>;
|
|
178
|
-
declare const SandboxRecordSchema: z$1.ZodObject<{
|
|
179
|
-
id: z$1.ZodString;
|
|
180
|
-
config: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
181
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
182
|
-
type: z$1.ZodLiteral<"vercel">;
|
|
183
|
-
resources: z$1.ZodOptional<z$1.ZodObject<{
|
|
184
|
-
vcpus: z$1.ZodNumber;
|
|
185
|
-
}, z$1.core.$strip>>;
|
|
186
|
-
ports: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
187
|
-
lifecycle: z$1.ZodOptional<z$1.ZodObject<{
|
|
188
|
-
pollIntervalMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
189
|
-
stopAfterInactiveMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
190
|
-
snapshotBeforeTimeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
191
|
-
snapshotId: z$1.ZodOptional<z$1.ZodString>;
|
|
192
|
-
autoStart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
193
|
-
}, z$1.core.$strip>>;
|
|
194
|
-
networkPolicy: z$1.ZodOptional<z$1.ZodCustom<NetworkPolicy, NetworkPolicy>>;
|
|
195
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
196
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
197
|
-
type: z$1.ZodLiteral<"local">;
|
|
198
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
199
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
200
|
-
type: z$1.ZodLiteral<"docker">;
|
|
201
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
202
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
203
|
-
type: z$1.ZodLiteral<"custom">;
|
|
204
|
-
url: z$1.ZodString;
|
|
205
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
206
|
-
}, z$1.core.$strip>], "type">;
|
|
207
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
208
|
-
createdAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
209
|
-
lastActivityAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
210
|
-
acquiringLockId: z$1.ZodNullable<z$1.ZodString>;
|
|
211
|
-
acquiringLockAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
212
|
-
setupKey: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
213
|
-
setupCompletedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
214
|
-
providerMetadata: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
215
|
-
provider: z$1.ZodLiteral<"vercel">;
|
|
216
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
217
|
-
snapshotId: z$1.ZodNullable<z$1.ZodString>;
|
|
218
|
-
}, z$1.core.$strip>], "provider">>;
|
|
219
|
-
}, z$1.core.$strip>;
|
|
220
|
-
declare const CommandSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
221
|
-
id: z$1.ZodString;
|
|
222
|
-
sessionId: z$1.ZodString;
|
|
223
|
-
command: z$1.ZodString;
|
|
224
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
225
|
-
startedAt: z$1.ZodNumber;
|
|
226
|
-
status: z$1.ZodLiteral<"running">;
|
|
227
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
228
|
-
id: z$1.ZodString;
|
|
229
|
-
sessionId: z$1.ZodString;
|
|
230
|
-
command: z$1.ZodString;
|
|
231
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
232
|
-
startedAt: z$1.ZodNumber;
|
|
233
|
-
status: z$1.ZodLiteral<"completed">;
|
|
234
|
-
result: z$1.ZodObject<{
|
|
235
|
-
stdout: z$1.ZodString;
|
|
236
|
-
stderr: z$1.ZodString;
|
|
237
|
-
exitCode: z$1.ZodNumber;
|
|
238
|
-
completedAt: z$1.ZodNumber;
|
|
239
|
-
}, z$1.core.$strip>;
|
|
240
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
241
|
-
id: z$1.ZodString;
|
|
242
|
-
sessionId: z$1.ZodString;
|
|
243
|
-
command: z$1.ZodString;
|
|
244
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
245
|
-
startedAt: z$1.ZodNumber;
|
|
246
|
-
status: z$1.ZodLiteral<"killed">;
|
|
247
|
-
result: z$1.ZodOptional<z$1.ZodObject<{
|
|
248
|
-
stdout: z$1.ZodString;
|
|
249
|
-
stderr: z$1.ZodString;
|
|
250
|
-
exitCode: z$1.ZodNumber;
|
|
251
|
-
completedAt: z$1.ZodNumber;
|
|
252
|
-
}, z$1.core.$strip>>;
|
|
253
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
254
|
-
id: z$1.ZodString;
|
|
255
|
-
sessionId: z$1.ZodString;
|
|
256
|
-
command: z$1.ZodString;
|
|
257
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
258
|
-
startedAt: z$1.ZodNumber;
|
|
259
|
-
status: z$1.ZodLiteral<"failed">;
|
|
260
|
-
result: z$1.ZodObject<{
|
|
261
|
-
stdout: z$1.ZodString;
|
|
262
|
-
stderr: z$1.ZodString;
|
|
263
|
-
exitCode: z$1.ZodNumber;
|
|
264
|
-
completedAt: z$1.ZodNumber;
|
|
265
|
-
}, z$1.core.$strip>;
|
|
266
|
-
}, z$1.core.$strip>], "status">;
|
|
267
|
-
declare const SetupSnapshotSchema: z$1.ZodObject<{
|
|
268
|
-
key: z$1.ZodString;
|
|
269
|
-
snapshotId: z$1.ZodNullable<z$1.ZodString>;
|
|
270
|
-
createdAt: z$1.ZodNumber;
|
|
271
|
-
lastUsedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
272
|
-
acquiringLockId: z$1.ZodNullable<z$1.ZodString>;
|
|
273
|
-
acquiringLockAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
274
|
-
}, z$1.core.$strip>;
|
|
275
|
-
declare const methods: {
|
|
276
|
-
readonly "session.get": {
|
|
277
|
-
readonly params: z$1.ZodObject<{
|
|
278
|
-
id: z$1.ZodString;
|
|
279
|
-
}, z$1.core.$strip>;
|
|
280
|
-
readonly result: z$1.ZodNullable<z$1.ZodObject<{
|
|
281
|
-
id: z$1.ZodString;
|
|
282
|
-
createdAt: z$1.ZodNumber;
|
|
283
|
-
updatedAt: z$1.ZodNumber;
|
|
284
|
-
runId: z$1.ZodNullable<z$1.ZodString>;
|
|
285
|
-
lastMessageId: z$1.ZodNullable<z$1.ZodString>;
|
|
286
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
287
|
-
system: z$1.ZodNullable<z$1.ZodString>;
|
|
288
|
-
model: z$1.ZodNullable<z$1.ZodString>;
|
|
289
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
290
|
-
skillsDir: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
291
|
-
hookToken: z$1.ZodNullable<z$1.ZodString>;
|
|
292
|
-
activeTools: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
293
|
-
generation: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
|
|
294
|
-
maxSteps: z$1.ZodOptional<z$1.ZodNumber>;
|
|
295
|
-
temperature: z$1.ZodOptional<z$1.ZodNumber>;
|
|
296
|
-
topK: z$1.ZodOptional<z$1.ZodNumber>;
|
|
297
|
-
topP: z$1.ZodOptional<z$1.ZodNumber>;
|
|
298
|
-
frequencyPenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
299
|
-
presencePenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
300
|
-
maxOutputTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
301
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
302
|
-
}, z$1.core.$strip>>>;
|
|
303
|
-
}, z$1.core.$strip>>;
|
|
304
|
-
};
|
|
305
|
-
readonly "session.set": {
|
|
306
|
-
readonly params: z$1.ZodObject<{
|
|
307
|
-
id: z$1.ZodString;
|
|
308
|
-
createdAt: z$1.ZodNumber;
|
|
309
|
-
updatedAt: z$1.ZodNumber;
|
|
310
|
-
runId: z$1.ZodNullable<z$1.ZodString>;
|
|
311
|
-
lastMessageId: z$1.ZodNullable<z$1.ZodString>;
|
|
312
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
313
|
-
system: z$1.ZodNullable<z$1.ZodString>;
|
|
314
|
-
model: z$1.ZodNullable<z$1.ZodString>;
|
|
315
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
316
|
-
skillsDir: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
317
|
-
hookToken: z$1.ZodNullable<z$1.ZodString>;
|
|
318
|
-
activeTools: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
319
|
-
generation: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
|
|
320
|
-
maxSteps: z$1.ZodOptional<z$1.ZodNumber>;
|
|
321
|
-
temperature: z$1.ZodOptional<z$1.ZodNumber>;
|
|
322
|
-
topK: z$1.ZodOptional<z$1.ZodNumber>;
|
|
323
|
-
topP: z$1.ZodOptional<z$1.ZodNumber>;
|
|
324
|
-
frequencyPenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
325
|
-
presencePenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
326
|
-
maxOutputTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
327
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
328
|
-
}, z$1.core.$strip>>>;
|
|
329
|
-
}, z$1.core.$strip>;
|
|
330
|
-
readonly result: z$1.ZodObject<{
|
|
331
|
-
id: z$1.ZodString;
|
|
332
|
-
createdAt: z$1.ZodNumber;
|
|
333
|
-
updatedAt: z$1.ZodNumber;
|
|
334
|
-
runId: z$1.ZodNullable<z$1.ZodString>;
|
|
335
|
-
lastMessageId: z$1.ZodNullable<z$1.ZodString>;
|
|
336
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
337
|
-
system: z$1.ZodNullable<z$1.ZodString>;
|
|
338
|
-
model: z$1.ZodNullable<z$1.ZodString>;
|
|
339
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
340
|
-
skillsDir: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
341
|
-
hookToken: z$1.ZodNullable<z$1.ZodString>;
|
|
342
|
-
activeTools: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
343
|
-
generation: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
|
|
344
|
-
maxSteps: z$1.ZodOptional<z$1.ZodNumber>;
|
|
345
|
-
temperature: z$1.ZodOptional<z$1.ZodNumber>;
|
|
346
|
-
topK: z$1.ZodOptional<z$1.ZodNumber>;
|
|
347
|
-
topP: z$1.ZodOptional<z$1.ZodNumber>;
|
|
348
|
-
frequencyPenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
349
|
-
presencePenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
350
|
-
maxOutputTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
351
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
352
|
-
}, z$1.core.$strip>>>;
|
|
353
|
-
}, z$1.core.$strip>;
|
|
354
|
-
};
|
|
355
|
-
readonly "session.update": {
|
|
356
|
-
readonly params: z$1.ZodObject<{
|
|
357
|
-
model: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
358
|
-
createdAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
359
|
-
updatedAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
360
|
-
runId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
361
|
-
lastMessageId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
362
|
-
tags: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>>;
|
|
363
|
-
system: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
364
|
-
sandboxId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
365
|
-
skillsDir: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
366
|
-
hookToken: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
367
|
-
activeTools: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
368
|
-
id: z$1.ZodString;
|
|
369
|
-
generation: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
|
|
370
|
-
maxSteps: z$1.ZodOptional<z$1.ZodNumber>;
|
|
371
|
-
temperature: z$1.ZodOptional<z$1.ZodNumber>;
|
|
372
|
-
topK: z$1.ZodOptional<z$1.ZodNumber>;
|
|
373
|
-
topP: z$1.ZodOptional<z$1.ZodNumber>;
|
|
374
|
-
frequencyPenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
375
|
-
presencePenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
376
|
-
maxOutputTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
377
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
378
|
-
}, z$1.core.$strip>>>;
|
|
379
|
-
}, z$1.core.$strict>;
|
|
380
|
-
readonly result: z$1.ZodObject<{
|
|
381
|
-
id: z$1.ZodString;
|
|
382
|
-
createdAt: z$1.ZodNumber;
|
|
383
|
-
updatedAt: z$1.ZodNumber;
|
|
384
|
-
runId: z$1.ZodNullable<z$1.ZodString>;
|
|
385
|
-
lastMessageId: z$1.ZodNullable<z$1.ZodString>;
|
|
386
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
387
|
-
system: z$1.ZodNullable<z$1.ZodString>;
|
|
388
|
-
model: z$1.ZodNullable<z$1.ZodString>;
|
|
389
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
390
|
-
skillsDir: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
391
|
-
hookToken: z$1.ZodNullable<z$1.ZodString>;
|
|
392
|
-
activeTools: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
393
|
-
generation: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
|
|
394
|
-
maxSteps: z$1.ZodOptional<z$1.ZodNumber>;
|
|
395
|
-
temperature: z$1.ZodOptional<z$1.ZodNumber>;
|
|
396
|
-
topK: z$1.ZodOptional<z$1.ZodNumber>;
|
|
397
|
-
topP: z$1.ZodOptional<z$1.ZodNumber>;
|
|
398
|
-
frequencyPenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
399
|
-
presencePenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
400
|
-
maxOutputTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
401
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
402
|
-
}, z$1.core.$strip>>>;
|
|
403
|
-
}, z$1.core.$strip>;
|
|
404
|
-
};
|
|
405
|
-
readonly "session.list": {
|
|
406
|
-
readonly params: z$1.ZodObject<{
|
|
407
|
-
tags: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
408
|
-
order: z$1.ZodOptional<z$1.ZodEnum<{
|
|
409
|
-
createdAt_asc: "createdAt_asc";
|
|
410
|
-
createdAt_desc: "createdAt_desc";
|
|
411
|
-
updatedAt_asc: "updatedAt_asc";
|
|
412
|
-
updatedAt_desc: "updatedAt_desc";
|
|
413
|
-
}>>;
|
|
414
|
-
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
415
|
-
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
416
|
-
}, z$1.core.$strip>;
|
|
417
|
-
readonly result: z$1.ZodObject<{
|
|
418
|
-
items: z$1.ZodArray<z$1.ZodObject<{
|
|
419
|
-
id: z$1.ZodString;
|
|
420
|
-
createdAt: z$1.ZodNumber;
|
|
421
|
-
updatedAt: z$1.ZodNumber;
|
|
422
|
-
runId: z$1.ZodNullable<z$1.ZodString>;
|
|
423
|
-
lastMessageId: z$1.ZodNullable<z$1.ZodString>;
|
|
424
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
425
|
-
system: z$1.ZodNullable<z$1.ZodString>;
|
|
426
|
-
model: z$1.ZodNullable<z$1.ZodString>;
|
|
427
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
428
|
-
skillsDir: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
429
|
-
hookToken: z$1.ZodNullable<z$1.ZodString>;
|
|
430
|
-
activeTools: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
431
|
-
generation: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
|
|
432
|
-
maxSteps: z$1.ZodOptional<z$1.ZodNumber>;
|
|
433
|
-
temperature: z$1.ZodOptional<z$1.ZodNumber>;
|
|
434
|
-
topK: z$1.ZodOptional<z$1.ZodNumber>;
|
|
435
|
-
topP: z$1.ZodOptional<z$1.ZodNumber>;
|
|
436
|
-
frequencyPenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
437
|
-
presencePenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
438
|
-
maxOutputTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
439
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
440
|
-
}, z$1.core.$strip>>>;
|
|
441
|
-
}, z$1.core.$strip>>;
|
|
442
|
-
nextCursor: z$1.ZodNullable<z$1.ZodString>;
|
|
443
|
-
}, z$1.core.$strip>;
|
|
444
|
-
};
|
|
445
|
-
readonly "session.listBySandbox": {
|
|
446
|
-
readonly params: z$1.ZodObject<{
|
|
447
|
-
sandboxId: z$1.ZodString;
|
|
448
|
-
tags: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
449
|
-
order: z$1.ZodOptional<z$1.ZodEnum<{
|
|
450
|
-
createdAt_asc: "createdAt_asc";
|
|
451
|
-
createdAt_desc: "createdAt_desc";
|
|
452
|
-
updatedAt_asc: "updatedAt_asc";
|
|
453
|
-
updatedAt_desc: "updatedAt_desc";
|
|
454
|
-
}>>;
|
|
455
|
-
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
456
|
-
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
457
|
-
}, z$1.core.$strip>;
|
|
458
|
-
readonly result: z$1.ZodObject<{
|
|
459
|
-
items: z$1.ZodArray<z$1.ZodObject<{
|
|
460
|
-
id: z$1.ZodString;
|
|
461
|
-
createdAt: z$1.ZodNumber;
|
|
462
|
-
updatedAt: z$1.ZodNumber;
|
|
463
|
-
runId: z$1.ZodNullable<z$1.ZodString>;
|
|
464
|
-
lastMessageId: z$1.ZodNullable<z$1.ZodString>;
|
|
465
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
466
|
-
system: z$1.ZodNullable<z$1.ZodString>;
|
|
467
|
-
model: z$1.ZodNullable<z$1.ZodString>;
|
|
468
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
469
|
-
skillsDir: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
470
|
-
hookToken: z$1.ZodNullable<z$1.ZodString>;
|
|
471
|
-
activeTools: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
472
|
-
generation: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
|
|
473
|
-
maxSteps: z$1.ZodOptional<z$1.ZodNumber>;
|
|
474
|
-
temperature: z$1.ZodOptional<z$1.ZodNumber>;
|
|
475
|
-
topK: z$1.ZodOptional<z$1.ZodNumber>;
|
|
476
|
-
topP: z$1.ZodOptional<z$1.ZodNumber>;
|
|
477
|
-
frequencyPenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
478
|
-
presencePenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
479
|
-
maxOutputTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
480
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
481
|
-
}, z$1.core.$strip>>>;
|
|
482
|
-
}, z$1.core.$strip>>;
|
|
483
|
-
nextCursor: z$1.ZodNullable<z$1.ZodString>;
|
|
484
|
-
}, z$1.core.$strip>;
|
|
485
|
-
};
|
|
486
|
-
readonly "session.delete": {
|
|
487
|
-
readonly params: z$1.ZodObject<{
|
|
488
|
-
id: z$1.ZodString;
|
|
489
|
-
}, z$1.core.$strip>;
|
|
490
|
-
readonly result: z$1.ZodVoid;
|
|
491
|
-
};
|
|
492
|
-
readonly "session.tag.set": {
|
|
493
|
-
readonly params: z$1.ZodObject<{
|
|
494
|
-
sessionId: z$1.ZodString;
|
|
495
|
-
tags: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
496
|
-
}, z$1.core.$strip>;
|
|
497
|
-
readonly result: z$1.ZodObject<{
|
|
498
|
-
id: z$1.ZodString;
|
|
499
|
-
createdAt: z$1.ZodNumber;
|
|
500
|
-
updatedAt: z$1.ZodNumber;
|
|
501
|
-
runId: z$1.ZodNullable<z$1.ZodString>;
|
|
502
|
-
lastMessageId: z$1.ZodNullable<z$1.ZodString>;
|
|
503
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
504
|
-
system: z$1.ZodNullable<z$1.ZodString>;
|
|
505
|
-
model: z$1.ZodNullable<z$1.ZodString>;
|
|
506
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
507
|
-
skillsDir: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
508
|
-
hookToken: z$1.ZodNullable<z$1.ZodString>;
|
|
509
|
-
activeTools: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
|
|
510
|
-
generation: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
|
|
511
|
-
maxSteps: z$1.ZodOptional<z$1.ZodNumber>;
|
|
512
|
-
temperature: z$1.ZodOptional<z$1.ZodNumber>;
|
|
513
|
-
topK: z$1.ZodOptional<z$1.ZodNumber>;
|
|
514
|
-
topP: z$1.ZodOptional<z$1.ZodNumber>;
|
|
515
|
-
frequencyPenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
516
|
-
presencePenalty: z$1.ZodOptional<z$1.ZodNumber>;
|
|
517
|
-
maxOutputTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
518
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
519
|
-
}, z$1.core.$strip>>>;
|
|
520
|
-
}, z$1.core.$strip>;
|
|
521
|
-
};
|
|
522
|
-
readonly "message.get": {
|
|
523
|
-
readonly params: z$1.ZodObject<{
|
|
524
|
-
id: z$1.ZodString;
|
|
525
|
-
}, z$1.core.$strip>;
|
|
526
|
-
readonly result: z$1.ZodNullable<z$1.ZodObject<{
|
|
527
|
-
id: z$1.ZodString;
|
|
528
|
-
sessionId: z$1.ZodString;
|
|
529
|
-
role: z$1.ZodEnum<{
|
|
530
|
-
system: "system";
|
|
531
|
-
user: "user";
|
|
532
|
-
assistant: "assistant";
|
|
533
|
-
}>;
|
|
534
|
-
createdAt: z$1.ZodNumber;
|
|
535
|
-
startedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
536
|
-
completedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
537
|
-
interruptedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
538
|
-
interruptedLastPart: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
|
|
539
|
-
index: z$1.ZodNumber;
|
|
540
|
-
part: z$1.ZodUnknown;
|
|
541
|
-
}, z$1.core.$strip>>>;
|
|
542
|
-
usage: z$1.ZodNullable<z$1.ZodObject<{
|
|
543
|
-
steps: z$1.ZodArray<z$1.ZodObject<{
|
|
544
|
-
stepIndex: z$1.ZodNumber;
|
|
545
|
-
model: z$1.ZodString;
|
|
546
|
-
inputTokens: z$1.ZodNumber;
|
|
547
|
-
outputTokens: z$1.ZodNumber;
|
|
548
|
-
totalTokens: z$1.ZodNumber;
|
|
549
|
-
cacheReadTokens: z$1.ZodNumber;
|
|
550
|
-
cacheWriteTokens: z$1.ZodNumber;
|
|
551
|
-
reasoningTokens: z$1.ZodNumber;
|
|
552
|
-
}, z$1.core.$strip>>;
|
|
553
|
-
summary: z$1.ZodObject<{
|
|
554
|
-
model: z$1.ZodString;
|
|
555
|
-
inputTokens: z$1.ZodNumber;
|
|
556
|
-
outputTokens: z$1.ZodNumber;
|
|
557
|
-
totalTokens: z$1.ZodNumber;
|
|
558
|
-
cacheReadTokens: z$1.ZodNumber;
|
|
559
|
-
cacheWriteTokens: z$1.ZodNumber;
|
|
560
|
-
reasoningTokens: z$1.ZodNumber;
|
|
561
|
-
stepCount: z$1.ZodNumber;
|
|
562
|
-
}, z$1.core.$strip>;
|
|
563
|
-
}, z$1.core.$strip>>;
|
|
564
|
-
}, z$1.core.$strip>>;
|
|
565
|
-
};
|
|
566
|
-
readonly "message.set": {
|
|
567
|
-
readonly params: z$1.ZodObject<{
|
|
568
|
-
id: z$1.ZodString;
|
|
569
|
-
sessionId: z$1.ZodString;
|
|
570
|
-
role: z$1.ZodEnum<{
|
|
571
|
-
system: "system";
|
|
572
|
-
user: "user";
|
|
573
|
-
assistant: "assistant";
|
|
574
|
-
}>;
|
|
575
|
-
createdAt: z$1.ZodNumber;
|
|
576
|
-
startedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
577
|
-
completedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
578
|
-
interruptedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
579
|
-
interruptedLastPart: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
|
|
580
|
-
index: z$1.ZodNumber;
|
|
581
|
-
part: z$1.ZodUnknown;
|
|
582
|
-
}, z$1.core.$strip>>>;
|
|
583
|
-
usage: z$1.ZodNullable<z$1.ZodObject<{
|
|
584
|
-
steps: z$1.ZodArray<z$1.ZodObject<{
|
|
585
|
-
stepIndex: z$1.ZodNumber;
|
|
586
|
-
model: z$1.ZodString;
|
|
587
|
-
inputTokens: z$1.ZodNumber;
|
|
588
|
-
outputTokens: z$1.ZodNumber;
|
|
589
|
-
totalTokens: z$1.ZodNumber;
|
|
590
|
-
cacheReadTokens: z$1.ZodNumber;
|
|
591
|
-
cacheWriteTokens: z$1.ZodNumber;
|
|
592
|
-
reasoningTokens: z$1.ZodNumber;
|
|
593
|
-
}, z$1.core.$strip>>;
|
|
594
|
-
summary: z$1.ZodObject<{
|
|
595
|
-
model: z$1.ZodString;
|
|
596
|
-
inputTokens: z$1.ZodNumber;
|
|
597
|
-
outputTokens: z$1.ZodNumber;
|
|
598
|
-
totalTokens: z$1.ZodNumber;
|
|
599
|
-
cacheReadTokens: z$1.ZodNumber;
|
|
600
|
-
cacheWriteTokens: z$1.ZodNumber;
|
|
601
|
-
reasoningTokens: z$1.ZodNumber;
|
|
602
|
-
stepCount: z$1.ZodNumber;
|
|
603
|
-
}, z$1.core.$strip>;
|
|
604
|
-
}, z$1.core.$strip>>;
|
|
605
|
-
}, z$1.core.$strip>;
|
|
606
|
-
readonly result: z$1.ZodObject<{
|
|
607
|
-
id: z$1.ZodString;
|
|
608
|
-
sessionId: z$1.ZodString;
|
|
609
|
-
role: z$1.ZodEnum<{
|
|
610
|
-
system: "system";
|
|
611
|
-
user: "user";
|
|
612
|
-
assistant: "assistant";
|
|
613
|
-
}>;
|
|
614
|
-
createdAt: z$1.ZodNumber;
|
|
615
|
-
startedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
616
|
-
completedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
617
|
-
interruptedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
618
|
-
interruptedLastPart: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
|
|
619
|
-
index: z$1.ZodNumber;
|
|
620
|
-
part: z$1.ZodUnknown;
|
|
621
|
-
}, z$1.core.$strip>>>;
|
|
622
|
-
usage: z$1.ZodNullable<z$1.ZodObject<{
|
|
623
|
-
steps: z$1.ZodArray<z$1.ZodObject<{
|
|
624
|
-
stepIndex: z$1.ZodNumber;
|
|
625
|
-
model: z$1.ZodString;
|
|
626
|
-
inputTokens: z$1.ZodNumber;
|
|
627
|
-
outputTokens: z$1.ZodNumber;
|
|
628
|
-
totalTokens: z$1.ZodNumber;
|
|
629
|
-
cacheReadTokens: z$1.ZodNumber;
|
|
630
|
-
cacheWriteTokens: z$1.ZodNumber;
|
|
631
|
-
reasoningTokens: z$1.ZodNumber;
|
|
632
|
-
}, z$1.core.$strip>>;
|
|
633
|
-
summary: z$1.ZodObject<{
|
|
634
|
-
model: z$1.ZodString;
|
|
635
|
-
inputTokens: z$1.ZodNumber;
|
|
636
|
-
outputTokens: z$1.ZodNumber;
|
|
637
|
-
totalTokens: z$1.ZodNumber;
|
|
638
|
-
cacheReadTokens: z$1.ZodNumber;
|
|
639
|
-
cacheWriteTokens: z$1.ZodNumber;
|
|
640
|
-
reasoningTokens: z$1.ZodNumber;
|
|
641
|
-
stepCount: z$1.ZodNumber;
|
|
642
|
-
}, z$1.core.$strip>;
|
|
643
|
-
}, z$1.core.$strip>>;
|
|
644
|
-
}, z$1.core.$strip>;
|
|
645
|
-
};
|
|
646
|
-
readonly "message.list": {
|
|
647
|
-
readonly params: z$1.ZodObject<{
|
|
648
|
-
sessionId: z$1.ZodString;
|
|
649
|
-
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
650
|
-
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
651
|
-
}, z$1.core.$strip>;
|
|
652
|
-
readonly result: z$1.ZodObject<{
|
|
653
|
-
items: z$1.ZodArray<z$1.ZodObject<{
|
|
654
|
-
id: z$1.ZodString;
|
|
655
|
-
sessionId: z$1.ZodString;
|
|
656
|
-
role: z$1.ZodEnum<{
|
|
657
|
-
system: "system";
|
|
658
|
-
user: "user";
|
|
659
|
-
assistant: "assistant";
|
|
660
|
-
}>;
|
|
661
|
-
createdAt: z$1.ZodNumber;
|
|
662
|
-
startedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
663
|
-
completedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
664
|
-
interruptedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
665
|
-
interruptedLastPart: z$1.ZodDefault<z$1.ZodNullable<z$1.ZodObject<{
|
|
666
|
-
index: z$1.ZodNumber;
|
|
667
|
-
part: z$1.ZodUnknown;
|
|
668
|
-
}, z$1.core.$strip>>>;
|
|
669
|
-
usage: z$1.ZodNullable<z$1.ZodObject<{
|
|
670
|
-
steps: z$1.ZodArray<z$1.ZodObject<{
|
|
671
|
-
stepIndex: z$1.ZodNumber;
|
|
672
|
-
model: z$1.ZodString;
|
|
673
|
-
inputTokens: z$1.ZodNumber;
|
|
674
|
-
outputTokens: z$1.ZodNumber;
|
|
675
|
-
totalTokens: z$1.ZodNumber;
|
|
676
|
-
cacheReadTokens: z$1.ZodNumber;
|
|
677
|
-
cacheWriteTokens: z$1.ZodNumber;
|
|
678
|
-
reasoningTokens: z$1.ZodNumber;
|
|
679
|
-
}, z$1.core.$strip>>;
|
|
680
|
-
summary: z$1.ZodObject<{
|
|
681
|
-
model: z$1.ZodString;
|
|
682
|
-
inputTokens: z$1.ZodNumber;
|
|
683
|
-
outputTokens: z$1.ZodNumber;
|
|
684
|
-
totalTokens: z$1.ZodNumber;
|
|
685
|
-
cacheReadTokens: z$1.ZodNumber;
|
|
686
|
-
cacheWriteTokens: z$1.ZodNumber;
|
|
687
|
-
reasoningTokens: z$1.ZodNumber;
|
|
688
|
-
stepCount: z$1.ZodNumber;
|
|
689
|
-
}, z$1.core.$strip>;
|
|
690
|
-
}, z$1.core.$strip>>;
|
|
691
|
-
}, z$1.core.$strip>>;
|
|
692
|
-
nextCursor: z$1.ZodNullable<z$1.ZodString>;
|
|
693
|
-
}, z$1.core.$strip>;
|
|
694
|
-
};
|
|
695
|
-
readonly "part.listByMessage": {
|
|
696
|
-
readonly params: z$1.ZodObject<{
|
|
697
|
-
messageId: z$1.ZodString;
|
|
698
|
-
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
699
|
-
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
700
|
-
}, z$1.core.$strip>;
|
|
701
|
-
readonly result: z$1.ZodObject<{
|
|
702
|
-
items: z$1.ZodArray<z$1.ZodObject<{
|
|
703
|
-
id: z$1.ZodString;
|
|
704
|
-
messageId: z$1.ZodString;
|
|
705
|
-
sessionId: z$1.ZodString;
|
|
706
|
-
index: z$1.ZodNumber;
|
|
707
|
-
part: z$1.ZodUnknown;
|
|
708
|
-
}, z$1.core.$strip>>;
|
|
709
|
-
nextCursor: z$1.ZodNullable<z$1.ZodString>;
|
|
710
|
-
}, z$1.core.$strip>;
|
|
711
|
-
};
|
|
712
|
-
readonly "part.listBySession": {
|
|
713
|
-
readonly params: z$1.ZodObject<{
|
|
714
|
-
sessionId: z$1.ZodString;
|
|
715
|
-
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
716
|
-
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
717
|
-
}, z$1.core.$strip>;
|
|
718
|
-
readonly result: z$1.ZodObject<{
|
|
719
|
-
items: z$1.ZodArray<z$1.ZodObject<{
|
|
720
|
-
id: z$1.ZodString;
|
|
721
|
-
messageId: z$1.ZodString;
|
|
722
|
-
sessionId: z$1.ZodString;
|
|
723
|
-
index: z$1.ZodNumber;
|
|
724
|
-
part: z$1.ZodUnknown;
|
|
725
|
-
}, z$1.core.$strip>>;
|
|
726
|
-
nextCursor: z$1.ZodNullable<z$1.ZodString>;
|
|
727
|
-
}, z$1.core.$strip>;
|
|
728
|
-
};
|
|
729
|
-
readonly "part.set": {
|
|
730
|
-
readonly params: z$1.ZodObject<{
|
|
731
|
-
id: z$1.ZodString;
|
|
732
|
-
messageId: z$1.ZodString;
|
|
733
|
-
sessionId: z$1.ZodString;
|
|
734
|
-
index: z$1.ZodNumber;
|
|
735
|
-
part: z$1.ZodUnknown;
|
|
736
|
-
}, z$1.core.$strip>;
|
|
737
|
-
readonly result: z$1.ZodObject<{
|
|
738
|
-
id: z$1.ZodString;
|
|
739
|
-
messageId: z$1.ZodString;
|
|
740
|
-
sessionId: z$1.ZodString;
|
|
741
|
-
index: z$1.ZodNumber;
|
|
742
|
-
part: z$1.ZodUnknown;
|
|
743
|
-
}, z$1.core.$strip>;
|
|
744
|
-
};
|
|
745
|
-
readonly "part.delete": {
|
|
746
|
-
readonly params: z$1.ZodObject<{
|
|
747
|
-
id: z$1.ZodString;
|
|
748
|
-
}, z$1.core.$strip>;
|
|
749
|
-
readonly result: z$1.ZodVoid;
|
|
750
|
-
};
|
|
751
|
-
readonly "sandbox.get": {
|
|
752
|
-
readonly params: z$1.ZodObject<{
|
|
753
|
-
key: z$1.ZodString;
|
|
754
|
-
}, z$1.core.$strip>;
|
|
755
|
-
readonly result: z$1.ZodNullable<z$1.ZodObject<{
|
|
756
|
-
id: z$1.ZodString;
|
|
757
|
-
config: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
758
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
759
|
-
type: z$1.ZodLiteral<"vercel">;
|
|
760
|
-
resources: z$1.ZodOptional<z$1.ZodObject<{
|
|
761
|
-
vcpus: z$1.ZodNumber;
|
|
762
|
-
}, z$1.core.$strip>>;
|
|
763
|
-
ports: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
764
|
-
lifecycle: z$1.ZodOptional<z$1.ZodObject<{
|
|
765
|
-
pollIntervalMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
766
|
-
stopAfterInactiveMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
767
|
-
snapshotBeforeTimeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
768
|
-
snapshotId: z$1.ZodOptional<z$1.ZodString>;
|
|
769
|
-
autoStart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
770
|
-
}, z$1.core.$strip>>;
|
|
771
|
-
networkPolicy: z$1.ZodOptional<z$1.ZodCustom<NetworkPolicy, NetworkPolicy>>;
|
|
772
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
773
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
774
|
-
type: z$1.ZodLiteral<"local">;
|
|
775
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
776
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
777
|
-
type: z$1.ZodLiteral<"docker">;
|
|
778
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
779
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
780
|
-
type: z$1.ZodLiteral<"custom">;
|
|
781
|
-
url: z$1.ZodString;
|
|
782
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
783
|
-
}, z$1.core.$strip>], "type">;
|
|
784
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
785
|
-
createdAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
786
|
-
lastActivityAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
787
|
-
acquiringLockId: z$1.ZodNullable<z$1.ZodString>;
|
|
788
|
-
acquiringLockAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
789
|
-
setupKey: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
790
|
-
setupCompletedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
791
|
-
providerMetadata: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
792
|
-
provider: z$1.ZodLiteral<"vercel">;
|
|
793
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
794
|
-
snapshotId: z$1.ZodNullable<z$1.ZodString>;
|
|
795
|
-
}, z$1.core.$strip>], "provider">>;
|
|
796
|
-
}, z$1.core.$strip>>;
|
|
797
|
-
};
|
|
798
|
-
readonly "sandbox.getBySession": {
|
|
799
|
-
readonly params: z$1.ZodObject<{
|
|
800
|
-
sessionId: z$1.ZodString;
|
|
801
|
-
}, z$1.core.$strip>;
|
|
802
|
-
readonly result: z$1.ZodNullable<z$1.ZodObject<{
|
|
803
|
-
id: z$1.ZodString;
|
|
804
|
-
config: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
805
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
806
|
-
type: z$1.ZodLiteral<"vercel">;
|
|
807
|
-
resources: z$1.ZodOptional<z$1.ZodObject<{
|
|
808
|
-
vcpus: z$1.ZodNumber;
|
|
809
|
-
}, z$1.core.$strip>>;
|
|
810
|
-
ports: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
811
|
-
lifecycle: z$1.ZodOptional<z$1.ZodObject<{
|
|
812
|
-
pollIntervalMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
813
|
-
stopAfterInactiveMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
814
|
-
snapshotBeforeTimeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
815
|
-
snapshotId: z$1.ZodOptional<z$1.ZodString>;
|
|
816
|
-
autoStart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
817
|
-
}, z$1.core.$strip>>;
|
|
818
|
-
networkPolicy: z$1.ZodOptional<z$1.ZodCustom<NetworkPolicy, NetworkPolicy>>;
|
|
819
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
820
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
821
|
-
type: z$1.ZodLiteral<"local">;
|
|
822
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
823
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
824
|
-
type: z$1.ZodLiteral<"docker">;
|
|
825
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
826
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
827
|
-
type: z$1.ZodLiteral<"custom">;
|
|
828
|
-
url: z$1.ZodString;
|
|
829
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
830
|
-
}, z$1.core.$strip>], "type">;
|
|
831
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
832
|
-
createdAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
833
|
-
lastActivityAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
834
|
-
acquiringLockId: z$1.ZodNullable<z$1.ZodString>;
|
|
835
|
-
acquiringLockAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
836
|
-
setupKey: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
837
|
-
setupCompletedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
838
|
-
providerMetadata: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
839
|
-
provider: z$1.ZodLiteral<"vercel">;
|
|
840
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
841
|
-
snapshotId: z$1.ZodNullable<z$1.ZodString>;
|
|
842
|
-
}, z$1.core.$strip>], "provider">>;
|
|
843
|
-
}, z$1.core.$strip>>;
|
|
844
|
-
};
|
|
845
|
-
readonly "sandbox.set": {
|
|
846
|
-
readonly params: z$1.ZodObject<{
|
|
847
|
-
id: z$1.ZodString;
|
|
848
|
-
config: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
849
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
850
|
-
type: z$1.ZodLiteral<"vercel">;
|
|
851
|
-
resources: z$1.ZodOptional<z$1.ZodObject<{
|
|
852
|
-
vcpus: z$1.ZodNumber;
|
|
853
|
-
}, z$1.core.$strip>>;
|
|
854
|
-
ports: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
855
|
-
lifecycle: z$1.ZodOptional<z$1.ZodObject<{
|
|
856
|
-
pollIntervalMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
857
|
-
stopAfterInactiveMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
858
|
-
snapshotBeforeTimeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
859
|
-
snapshotId: z$1.ZodOptional<z$1.ZodString>;
|
|
860
|
-
autoStart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
861
|
-
}, z$1.core.$strip>>;
|
|
862
|
-
networkPolicy: z$1.ZodOptional<z$1.ZodCustom<NetworkPolicy, NetworkPolicy>>;
|
|
863
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
864
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
865
|
-
type: z$1.ZodLiteral<"local">;
|
|
866
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
867
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
868
|
-
type: z$1.ZodLiteral<"docker">;
|
|
869
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
870
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
871
|
-
type: z$1.ZodLiteral<"custom">;
|
|
872
|
-
url: z$1.ZodString;
|
|
873
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
874
|
-
}, z$1.core.$strip>], "type">;
|
|
875
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
876
|
-
createdAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
877
|
-
lastActivityAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
878
|
-
acquiringLockId: z$1.ZodNullable<z$1.ZodString>;
|
|
879
|
-
acquiringLockAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
880
|
-
setupKey: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
881
|
-
setupCompletedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
882
|
-
providerMetadata: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
883
|
-
provider: z$1.ZodLiteral<"vercel">;
|
|
884
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
885
|
-
snapshotId: z$1.ZodNullable<z$1.ZodString>;
|
|
886
|
-
}, z$1.core.$strip>], "provider">>;
|
|
887
|
-
}, z$1.core.$strip>;
|
|
888
|
-
readonly result: z$1.ZodVoid;
|
|
889
|
-
};
|
|
890
|
-
readonly "sandbox.update": {
|
|
891
|
-
readonly params: z$1.ZodObject<{
|
|
892
|
-
createdAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
893
|
-
tags: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>>;
|
|
894
|
-
config: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
895
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
896
|
-
type: z$1.ZodLiteral<"vercel">;
|
|
897
|
-
resources: z$1.ZodOptional<z$1.ZodObject<{
|
|
898
|
-
vcpus: z$1.ZodNumber;
|
|
899
|
-
}, z$1.core.$strip>>;
|
|
900
|
-
ports: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
901
|
-
lifecycle: z$1.ZodOptional<z$1.ZodObject<{
|
|
902
|
-
pollIntervalMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
903
|
-
stopAfterInactiveMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
904
|
-
snapshotBeforeTimeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
905
|
-
snapshotId: z$1.ZodOptional<z$1.ZodString>;
|
|
906
|
-
autoStart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
907
|
-
}, z$1.core.$strip>>;
|
|
908
|
-
networkPolicy: z$1.ZodOptional<z$1.ZodCustom<NetworkPolicy, NetworkPolicy>>;
|
|
909
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
910
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
911
|
-
type: z$1.ZodLiteral<"local">;
|
|
912
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
913
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
914
|
-
type: z$1.ZodLiteral<"docker">;
|
|
915
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
916
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
917
|
-
type: z$1.ZodLiteral<"custom">;
|
|
918
|
-
url: z$1.ZodString;
|
|
919
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
920
|
-
}, z$1.core.$strip>], "type">>;
|
|
921
|
-
lastActivityAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
922
|
-
acquiringLockId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
923
|
-
acquiringLockAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
924
|
-
setupKey: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>>;
|
|
925
|
-
setupCompletedAt: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>>;
|
|
926
|
-
providerMetadata: z$1.ZodOptional<z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
927
|
-
provider: z$1.ZodLiteral<"vercel">;
|
|
928
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
929
|
-
snapshotId: z$1.ZodNullable<z$1.ZodString>;
|
|
930
|
-
}, z$1.core.$strip>], "provider">>>;
|
|
931
|
-
id: z$1.ZodString;
|
|
932
|
-
}, z$1.core.$strict>;
|
|
933
|
-
readonly result: z$1.ZodObject<{
|
|
934
|
-
id: z$1.ZodString;
|
|
935
|
-
config: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
936
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
937
|
-
type: z$1.ZodLiteral<"vercel">;
|
|
938
|
-
resources: z$1.ZodOptional<z$1.ZodObject<{
|
|
939
|
-
vcpus: z$1.ZodNumber;
|
|
940
|
-
}, z$1.core.$strip>>;
|
|
941
|
-
ports: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
942
|
-
lifecycle: z$1.ZodOptional<z$1.ZodObject<{
|
|
943
|
-
pollIntervalMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
944
|
-
stopAfterInactiveMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
945
|
-
snapshotBeforeTimeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
946
|
-
snapshotId: z$1.ZodOptional<z$1.ZodString>;
|
|
947
|
-
autoStart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
948
|
-
}, z$1.core.$strip>>;
|
|
949
|
-
networkPolicy: z$1.ZodOptional<z$1.ZodCustom<NetworkPolicy, NetworkPolicy>>;
|
|
950
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
951
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
952
|
-
type: z$1.ZodLiteral<"local">;
|
|
953
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
954
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
955
|
-
type: z$1.ZodLiteral<"docker">;
|
|
956
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
957
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
958
|
-
type: z$1.ZodLiteral<"custom">;
|
|
959
|
-
url: z$1.ZodString;
|
|
960
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
961
|
-
}, z$1.core.$strip>], "type">;
|
|
962
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
963
|
-
createdAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
964
|
-
lastActivityAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
965
|
-
acquiringLockId: z$1.ZodNullable<z$1.ZodString>;
|
|
966
|
-
acquiringLockAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
967
|
-
setupKey: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
968
|
-
setupCompletedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
969
|
-
providerMetadata: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
970
|
-
provider: z$1.ZodLiteral<"vercel">;
|
|
971
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
972
|
-
snapshotId: z$1.ZodNullable<z$1.ZodString>;
|
|
973
|
-
}, z$1.core.$strip>], "provider">>;
|
|
974
|
-
}, z$1.core.$strip>;
|
|
975
|
-
};
|
|
976
|
-
readonly "sandbox.list": {
|
|
977
|
-
readonly params: z$1.ZodObject<{
|
|
978
|
-
tags: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
979
|
-
order: z$1.ZodOptional<z$1.ZodEnum<{
|
|
980
|
-
createdAt_asc: "createdAt_asc";
|
|
981
|
-
createdAt_desc: "createdAt_desc";
|
|
982
|
-
lastActivityAt_asc: "lastActivityAt_asc";
|
|
983
|
-
lastActivityAt_desc: "lastActivityAt_desc";
|
|
984
|
-
}>>;
|
|
985
|
-
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
986
|
-
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
987
|
-
}, z$1.core.$strip>;
|
|
988
|
-
readonly result: z$1.ZodObject<{
|
|
989
|
-
items: z$1.ZodArray<z$1.ZodObject<{
|
|
990
|
-
id: z$1.ZodString;
|
|
991
|
-
config: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
992
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
993
|
-
type: z$1.ZodLiteral<"vercel">;
|
|
994
|
-
resources: z$1.ZodOptional<z$1.ZodObject<{
|
|
995
|
-
vcpus: z$1.ZodNumber;
|
|
996
|
-
}, z$1.core.$strip>>;
|
|
997
|
-
ports: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
998
|
-
lifecycle: z$1.ZodOptional<z$1.ZodObject<{
|
|
999
|
-
pollIntervalMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1000
|
-
stopAfterInactiveMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1001
|
-
snapshotBeforeTimeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1002
|
-
snapshotId: z$1.ZodOptional<z$1.ZodString>;
|
|
1003
|
-
autoStart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1004
|
-
}, z$1.core.$strip>>;
|
|
1005
|
-
networkPolicy: z$1.ZodOptional<z$1.ZodCustom<NetworkPolicy, NetworkPolicy>>;
|
|
1006
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1007
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1008
|
-
type: z$1.ZodLiteral<"local">;
|
|
1009
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1010
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1011
|
-
type: z$1.ZodLiteral<"docker">;
|
|
1012
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1013
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1014
|
-
type: z$1.ZodLiteral<"custom">;
|
|
1015
|
-
url: z$1.ZodString;
|
|
1016
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
1017
|
-
}, z$1.core.$strip>], "type">;
|
|
1018
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
1019
|
-
createdAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1020
|
-
lastActivityAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1021
|
-
acquiringLockId: z$1.ZodNullable<z$1.ZodString>;
|
|
1022
|
-
acquiringLockAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1023
|
-
setupKey: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1024
|
-
setupCompletedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
1025
|
-
providerMetadata: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
1026
|
-
provider: z$1.ZodLiteral<"vercel">;
|
|
1027
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
1028
|
-
snapshotId: z$1.ZodNullable<z$1.ZodString>;
|
|
1029
|
-
}, z$1.core.$strip>], "provider">>;
|
|
1030
|
-
}, z$1.core.$strip>>;
|
|
1031
|
-
nextCursor: z$1.ZodNullable<z$1.ZodString>;
|
|
1032
|
-
}, z$1.core.$strip>;
|
|
1033
|
-
};
|
|
1034
|
-
readonly "sandbox.tag.set": {
|
|
1035
|
-
readonly params: z$1.ZodObject<{
|
|
1036
|
-
sandboxId: z$1.ZodString;
|
|
1037
|
-
tags: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
1038
|
-
}, z$1.core.$strip>;
|
|
1039
|
-
readonly result: z$1.ZodObject<{
|
|
1040
|
-
id: z$1.ZodString;
|
|
1041
|
-
config: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
1042
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1043
|
-
type: z$1.ZodLiteral<"vercel">;
|
|
1044
|
-
resources: z$1.ZodOptional<z$1.ZodObject<{
|
|
1045
|
-
vcpus: z$1.ZodNumber;
|
|
1046
|
-
}, z$1.core.$strip>>;
|
|
1047
|
-
ports: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
1048
|
-
lifecycle: z$1.ZodOptional<z$1.ZodObject<{
|
|
1049
|
-
pollIntervalMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1050
|
-
stopAfterInactiveMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1051
|
-
snapshotBeforeTimeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1052
|
-
snapshotId: z$1.ZodOptional<z$1.ZodString>;
|
|
1053
|
-
autoStart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1054
|
-
}, z$1.core.$strip>>;
|
|
1055
|
-
networkPolicy: z$1.ZodOptional<z$1.ZodCustom<NetworkPolicy, NetworkPolicy>>;
|
|
1056
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1057
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1058
|
-
type: z$1.ZodLiteral<"local">;
|
|
1059
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1060
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1061
|
-
type: z$1.ZodLiteral<"docker">;
|
|
1062
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1063
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1064
|
-
type: z$1.ZodLiteral<"custom">;
|
|
1065
|
-
url: z$1.ZodString;
|
|
1066
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
1067
|
-
}, z$1.core.$strip>], "type">;
|
|
1068
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
1069
|
-
createdAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1070
|
-
lastActivityAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1071
|
-
acquiringLockId: z$1.ZodNullable<z$1.ZodString>;
|
|
1072
|
-
acquiringLockAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1073
|
-
setupKey: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1074
|
-
setupCompletedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
1075
|
-
providerMetadata: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
1076
|
-
provider: z$1.ZodLiteral<"vercel">;
|
|
1077
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
1078
|
-
snapshotId: z$1.ZodNullable<z$1.ZodString>;
|
|
1079
|
-
}, z$1.core.$strip>], "provider">>;
|
|
1080
|
-
}, z$1.core.$strip>;
|
|
1081
|
-
};
|
|
1082
|
-
readonly "command.get": {
|
|
1083
|
-
readonly params: z$1.ZodObject<{
|
|
1084
|
-
id: z$1.ZodString;
|
|
1085
|
-
}, z$1.core.$strip>;
|
|
1086
|
-
readonly result: z$1.ZodNullable<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
1087
|
-
id: z$1.ZodString;
|
|
1088
|
-
sessionId: z$1.ZodString;
|
|
1089
|
-
command: z$1.ZodString;
|
|
1090
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1091
|
-
startedAt: z$1.ZodNumber;
|
|
1092
|
-
status: z$1.ZodLiteral<"running">;
|
|
1093
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1094
|
-
id: z$1.ZodString;
|
|
1095
|
-
sessionId: z$1.ZodString;
|
|
1096
|
-
command: z$1.ZodString;
|
|
1097
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1098
|
-
startedAt: z$1.ZodNumber;
|
|
1099
|
-
status: z$1.ZodLiteral<"completed">;
|
|
1100
|
-
result: z$1.ZodObject<{
|
|
1101
|
-
stdout: z$1.ZodString;
|
|
1102
|
-
stderr: z$1.ZodString;
|
|
1103
|
-
exitCode: z$1.ZodNumber;
|
|
1104
|
-
completedAt: z$1.ZodNumber;
|
|
1105
|
-
}, z$1.core.$strip>;
|
|
1106
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1107
|
-
id: z$1.ZodString;
|
|
1108
|
-
sessionId: z$1.ZodString;
|
|
1109
|
-
command: z$1.ZodString;
|
|
1110
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1111
|
-
startedAt: z$1.ZodNumber;
|
|
1112
|
-
status: z$1.ZodLiteral<"killed">;
|
|
1113
|
-
result: z$1.ZodOptional<z$1.ZodObject<{
|
|
1114
|
-
stdout: z$1.ZodString;
|
|
1115
|
-
stderr: z$1.ZodString;
|
|
1116
|
-
exitCode: z$1.ZodNumber;
|
|
1117
|
-
completedAt: z$1.ZodNumber;
|
|
1118
|
-
}, z$1.core.$strip>>;
|
|
1119
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1120
|
-
id: z$1.ZodString;
|
|
1121
|
-
sessionId: z$1.ZodString;
|
|
1122
|
-
command: z$1.ZodString;
|
|
1123
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1124
|
-
startedAt: z$1.ZodNumber;
|
|
1125
|
-
status: z$1.ZodLiteral<"failed">;
|
|
1126
|
-
result: z$1.ZodObject<{
|
|
1127
|
-
stdout: z$1.ZodString;
|
|
1128
|
-
stderr: z$1.ZodString;
|
|
1129
|
-
exitCode: z$1.ZodNumber;
|
|
1130
|
-
completedAt: z$1.ZodNumber;
|
|
1131
|
-
}, z$1.core.$strip>;
|
|
1132
|
-
}, z$1.core.$strip>], "status">>;
|
|
1133
|
-
};
|
|
1134
|
-
readonly "command.set": {
|
|
1135
|
-
readonly params: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
1136
|
-
id: z$1.ZodString;
|
|
1137
|
-
sessionId: z$1.ZodString;
|
|
1138
|
-
command: z$1.ZodString;
|
|
1139
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1140
|
-
startedAt: z$1.ZodNumber;
|
|
1141
|
-
status: z$1.ZodLiteral<"running">;
|
|
1142
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1143
|
-
id: z$1.ZodString;
|
|
1144
|
-
sessionId: z$1.ZodString;
|
|
1145
|
-
command: z$1.ZodString;
|
|
1146
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1147
|
-
startedAt: z$1.ZodNumber;
|
|
1148
|
-
status: z$1.ZodLiteral<"completed">;
|
|
1149
|
-
result: z$1.ZodObject<{
|
|
1150
|
-
stdout: z$1.ZodString;
|
|
1151
|
-
stderr: z$1.ZodString;
|
|
1152
|
-
exitCode: z$1.ZodNumber;
|
|
1153
|
-
completedAt: z$1.ZodNumber;
|
|
1154
|
-
}, z$1.core.$strip>;
|
|
1155
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1156
|
-
id: z$1.ZodString;
|
|
1157
|
-
sessionId: z$1.ZodString;
|
|
1158
|
-
command: z$1.ZodString;
|
|
1159
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1160
|
-
startedAt: z$1.ZodNumber;
|
|
1161
|
-
status: z$1.ZodLiteral<"killed">;
|
|
1162
|
-
result: z$1.ZodOptional<z$1.ZodObject<{
|
|
1163
|
-
stdout: z$1.ZodString;
|
|
1164
|
-
stderr: z$1.ZodString;
|
|
1165
|
-
exitCode: z$1.ZodNumber;
|
|
1166
|
-
completedAt: z$1.ZodNumber;
|
|
1167
|
-
}, z$1.core.$strip>>;
|
|
1168
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1169
|
-
id: z$1.ZodString;
|
|
1170
|
-
sessionId: z$1.ZodString;
|
|
1171
|
-
command: z$1.ZodString;
|
|
1172
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1173
|
-
startedAt: z$1.ZodNumber;
|
|
1174
|
-
status: z$1.ZodLiteral<"failed">;
|
|
1175
|
-
result: z$1.ZodObject<{
|
|
1176
|
-
stdout: z$1.ZodString;
|
|
1177
|
-
stderr: z$1.ZodString;
|
|
1178
|
-
exitCode: z$1.ZodNumber;
|
|
1179
|
-
completedAt: z$1.ZodNumber;
|
|
1180
|
-
}, z$1.core.$strip>;
|
|
1181
|
-
}, z$1.core.$strip>], "status">;
|
|
1182
|
-
readonly result: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
1183
|
-
id: z$1.ZodString;
|
|
1184
|
-
sessionId: z$1.ZodString;
|
|
1185
|
-
command: z$1.ZodString;
|
|
1186
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1187
|
-
startedAt: z$1.ZodNumber;
|
|
1188
|
-
status: z$1.ZodLiteral<"running">;
|
|
1189
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1190
|
-
id: z$1.ZodString;
|
|
1191
|
-
sessionId: z$1.ZodString;
|
|
1192
|
-
command: z$1.ZodString;
|
|
1193
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1194
|
-
startedAt: z$1.ZodNumber;
|
|
1195
|
-
status: z$1.ZodLiteral<"completed">;
|
|
1196
|
-
result: z$1.ZodObject<{
|
|
1197
|
-
stdout: z$1.ZodString;
|
|
1198
|
-
stderr: z$1.ZodString;
|
|
1199
|
-
exitCode: z$1.ZodNumber;
|
|
1200
|
-
completedAt: z$1.ZodNumber;
|
|
1201
|
-
}, z$1.core.$strip>;
|
|
1202
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1203
|
-
id: z$1.ZodString;
|
|
1204
|
-
sessionId: z$1.ZodString;
|
|
1205
|
-
command: z$1.ZodString;
|
|
1206
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1207
|
-
startedAt: z$1.ZodNumber;
|
|
1208
|
-
status: z$1.ZodLiteral<"killed">;
|
|
1209
|
-
result: z$1.ZodOptional<z$1.ZodObject<{
|
|
1210
|
-
stdout: z$1.ZodString;
|
|
1211
|
-
stderr: z$1.ZodString;
|
|
1212
|
-
exitCode: z$1.ZodNumber;
|
|
1213
|
-
completedAt: z$1.ZodNumber;
|
|
1214
|
-
}, z$1.core.$strip>>;
|
|
1215
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1216
|
-
id: z$1.ZodString;
|
|
1217
|
-
sessionId: z$1.ZodString;
|
|
1218
|
-
command: z$1.ZodString;
|
|
1219
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1220
|
-
startedAt: z$1.ZodNumber;
|
|
1221
|
-
status: z$1.ZodLiteral<"failed">;
|
|
1222
|
-
result: z$1.ZodObject<{
|
|
1223
|
-
stdout: z$1.ZodString;
|
|
1224
|
-
stderr: z$1.ZodString;
|
|
1225
|
-
exitCode: z$1.ZodNumber;
|
|
1226
|
-
completedAt: z$1.ZodNumber;
|
|
1227
|
-
}, z$1.core.$strip>;
|
|
1228
|
-
}, z$1.core.$strip>], "status">;
|
|
1229
|
-
};
|
|
1230
|
-
readonly "command.list": {
|
|
1231
|
-
readonly params: z$1.ZodObject<{
|
|
1232
|
-
sessionId: z$1.ZodString;
|
|
1233
|
-
includeFinished: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1234
|
-
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
1235
|
-
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1236
|
-
}, z$1.core.$strip>;
|
|
1237
|
-
readonly result: z$1.ZodObject<{
|
|
1238
|
-
items: z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
1239
|
-
id: z$1.ZodString;
|
|
1240
|
-
sessionId: z$1.ZodString;
|
|
1241
|
-
command: z$1.ZodString;
|
|
1242
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1243
|
-
startedAt: z$1.ZodNumber;
|
|
1244
|
-
status: z$1.ZodLiteral<"running">;
|
|
1245
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1246
|
-
id: z$1.ZodString;
|
|
1247
|
-
sessionId: z$1.ZodString;
|
|
1248
|
-
command: z$1.ZodString;
|
|
1249
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1250
|
-
startedAt: z$1.ZodNumber;
|
|
1251
|
-
status: z$1.ZodLiteral<"completed">;
|
|
1252
|
-
result: z$1.ZodObject<{
|
|
1253
|
-
stdout: z$1.ZodString;
|
|
1254
|
-
stderr: z$1.ZodString;
|
|
1255
|
-
exitCode: z$1.ZodNumber;
|
|
1256
|
-
completedAt: z$1.ZodNumber;
|
|
1257
|
-
}, z$1.core.$strip>;
|
|
1258
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1259
|
-
id: z$1.ZodString;
|
|
1260
|
-
sessionId: z$1.ZodString;
|
|
1261
|
-
command: z$1.ZodString;
|
|
1262
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1263
|
-
startedAt: z$1.ZodNumber;
|
|
1264
|
-
status: z$1.ZodLiteral<"killed">;
|
|
1265
|
-
result: z$1.ZodOptional<z$1.ZodObject<{
|
|
1266
|
-
stdout: z$1.ZodString;
|
|
1267
|
-
stderr: z$1.ZodString;
|
|
1268
|
-
exitCode: z$1.ZodNumber;
|
|
1269
|
-
completedAt: z$1.ZodNumber;
|
|
1270
|
-
}, z$1.core.$strip>>;
|
|
1271
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1272
|
-
id: z$1.ZodString;
|
|
1273
|
-
sessionId: z$1.ZodString;
|
|
1274
|
-
command: z$1.ZodString;
|
|
1275
|
-
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
1276
|
-
startedAt: z$1.ZodNumber;
|
|
1277
|
-
status: z$1.ZodLiteral<"failed">;
|
|
1278
|
-
result: z$1.ZodObject<{
|
|
1279
|
-
stdout: z$1.ZodString;
|
|
1280
|
-
stderr: z$1.ZodString;
|
|
1281
|
-
exitCode: z$1.ZodNumber;
|
|
1282
|
-
completedAt: z$1.ZodNumber;
|
|
1283
|
-
}, z$1.core.$strip>;
|
|
1284
|
-
}, z$1.core.$strip>], "status">>;
|
|
1285
|
-
nextCursor: z$1.ZodNullable<z$1.ZodString>;
|
|
1286
|
-
}, z$1.core.$strip>;
|
|
1287
|
-
};
|
|
1288
|
-
readonly "setup.get": {
|
|
1289
|
-
readonly params: z$1.ZodObject<{
|
|
1290
|
-
key: z$1.ZodString;
|
|
1291
|
-
}, z$1.core.$strip>;
|
|
1292
|
-
readonly result: z$1.ZodNullable<z$1.ZodObject<{
|
|
1293
|
-
key: z$1.ZodString;
|
|
1294
|
-
snapshotId: z$1.ZodNullable<z$1.ZodString>;
|
|
1295
|
-
createdAt: z$1.ZodNumber;
|
|
1296
|
-
lastUsedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1297
|
-
acquiringLockId: z$1.ZodNullable<z$1.ZodString>;
|
|
1298
|
-
acquiringLockAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1299
|
-
}, z$1.core.$strip>>;
|
|
1300
|
-
};
|
|
1301
|
-
readonly "setup.set": {
|
|
1302
|
-
readonly params: z$1.ZodObject<{
|
|
1303
|
-
key: z$1.ZodString;
|
|
1304
|
-
snapshotId: z$1.ZodNullable<z$1.ZodString>;
|
|
1305
|
-
createdAt: z$1.ZodNumber;
|
|
1306
|
-
lastUsedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1307
|
-
acquiringLockId: z$1.ZodNullable<z$1.ZodString>;
|
|
1308
|
-
acquiringLockAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1309
|
-
}, z$1.core.$strip>;
|
|
1310
|
-
readonly result: z$1.ZodVoid;
|
|
1311
|
-
};
|
|
1312
|
-
readonly "setup.delete": {
|
|
1313
|
-
readonly params: z$1.ZodObject<{
|
|
1314
|
-
key: z$1.ZodString;
|
|
1315
|
-
}, z$1.core.$strip>;
|
|
1316
|
-
readonly result: z$1.ZodVoid;
|
|
1317
|
-
};
|
|
1318
|
-
readonly "setup.acquireLock": {
|
|
1319
|
-
readonly params: z$1.ZodObject<{
|
|
1320
|
-
key: z$1.ZodString;
|
|
1321
|
-
lockId: z$1.ZodString;
|
|
1322
|
-
lockTimeoutMs: z$1.ZodNumber;
|
|
1323
|
-
}, z$1.core.$strip>;
|
|
1324
|
-
readonly result: z$1.ZodNullable<z$1.ZodObject<{
|
|
1325
|
-
key: z$1.ZodString;
|
|
1326
|
-
snapshotId: z$1.ZodNullable<z$1.ZodString>;
|
|
1327
|
-
createdAt: z$1.ZodNumber;
|
|
1328
|
-
lastUsedAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1329
|
-
acquiringLockId: z$1.ZodNullable<z$1.ZodString>;
|
|
1330
|
-
acquiringLockAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1331
|
-
}, z$1.core.$strip>>;
|
|
1332
|
-
};
|
|
1333
|
-
readonly "sandbox.acquireLock": {
|
|
1334
|
-
readonly params: z$1.ZodObject<{
|
|
1335
|
-
record: z$1.ZodObject<{
|
|
1336
|
-
id: z$1.ZodString;
|
|
1337
|
-
config: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
1338
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1339
|
-
type: z$1.ZodLiteral<"vercel">;
|
|
1340
|
-
resources: z$1.ZodOptional<z$1.ZodObject<{
|
|
1341
|
-
vcpus: z$1.ZodNumber;
|
|
1342
|
-
}, z$1.core.$strip>>;
|
|
1343
|
-
ports: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
1344
|
-
lifecycle: z$1.ZodOptional<z$1.ZodObject<{
|
|
1345
|
-
pollIntervalMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1346
|
-
stopAfterInactiveMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1347
|
-
snapshotBeforeTimeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1348
|
-
snapshotId: z$1.ZodOptional<z$1.ZodString>;
|
|
1349
|
-
autoStart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1350
|
-
}, z$1.core.$strip>>;
|
|
1351
|
-
networkPolicy: z$1.ZodOptional<z$1.ZodCustom<NetworkPolicy, NetworkPolicy>>;
|
|
1352
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1353
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1354
|
-
type: z$1.ZodLiteral<"local">;
|
|
1355
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1356
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1357
|
-
type: z$1.ZodLiteral<"docker">;
|
|
1358
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1359
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1360
|
-
type: z$1.ZodLiteral<"custom">;
|
|
1361
|
-
url: z$1.ZodString;
|
|
1362
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
1363
|
-
}, z$1.core.$strip>], "type">;
|
|
1364
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
1365
|
-
createdAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1366
|
-
lastActivityAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1367
|
-
acquiringLockId: z$1.ZodNullable<z$1.ZodString>;
|
|
1368
|
-
acquiringLockAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1369
|
-
setupKey: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1370
|
-
setupCompletedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
1371
|
-
providerMetadata: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
1372
|
-
provider: z$1.ZodLiteral<"vercel">;
|
|
1373
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
1374
|
-
snapshotId: z$1.ZodNullable<z$1.ZodString>;
|
|
1375
|
-
}, z$1.core.$strip>], "provider">>;
|
|
1376
|
-
}, z$1.core.$strip>;
|
|
1377
|
-
lockTimeoutMs: z$1.ZodNumber;
|
|
1378
|
-
}, z$1.core.$strip>;
|
|
1379
|
-
readonly result: z$1.ZodNullable<z$1.ZodObject<{
|
|
1380
|
-
id: z$1.ZodString;
|
|
1381
|
-
config: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
1382
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1383
|
-
type: z$1.ZodLiteral<"vercel">;
|
|
1384
|
-
resources: z$1.ZodOptional<z$1.ZodObject<{
|
|
1385
|
-
vcpus: z$1.ZodNumber;
|
|
1386
|
-
}, z$1.core.$strip>>;
|
|
1387
|
-
ports: z$1.ZodOptional<z$1.ZodArray<z$1.ZodNumber>>;
|
|
1388
|
-
lifecycle: z$1.ZodOptional<z$1.ZodObject<{
|
|
1389
|
-
pollIntervalMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1390
|
-
stopAfterInactiveMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1391
|
-
snapshotBeforeTimeoutMs: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1392
|
-
snapshotId: z$1.ZodOptional<z$1.ZodString>;
|
|
1393
|
-
autoStart: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1394
|
-
}, z$1.core.$strip>>;
|
|
1395
|
-
networkPolicy: z$1.ZodOptional<z$1.ZodCustom<NetworkPolicy, NetworkPolicy>>;
|
|
1396
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1397
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1398
|
-
type: z$1.ZodLiteral<"local">;
|
|
1399
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1400
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1401
|
-
type: z$1.ZodLiteral<"docker">;
|
|
1402
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1403
|
-
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
1404
|
-
type: z$1.ZodLiteral<"custom">;
|
|
1405
|
-
url: z$1.ZodString;
|
|
1406
|
-
headers: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
1407
|
-
}, z$1.core.$strip>], "type">;
|
|
1408
|
-
tags: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
1409
|
-
createdAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1410
|
-
lastActivityAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1411
|
-
acquiringLockId: z$1.ZodNullable<z$1.ZodString>;
|
|
1412
|
-
acquiringLockAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
1413
|
-
setupKey: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1414
|
-
setupCompletedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
1415
|
-
providerMetadata: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
1416
|
-
provider: z$1.ZodLiteral<"vercel">;
|
|
1417
|
-
sandboxId: z$1.ZodNullable<z$1.ZodString>;
|
|
1418
|
-
snapshotId: z$1.ZodNullable<z$1.ZodString>;
|
|
1419
|
-
}, z$1.core.$strip>], "provider">>;
|
|
1420
|
-
}, z$1.core.$strip>>;
|
|
1421
|
-
};
|
|
1422
|
-
};
|
|
1423
|
-
|
|
1424
|
-
type StorageMethods = typeof methods;
|
|
1425
|
-
type MethodName = keyof StorageMethods;
|
|
1426
|
-
|
|
1427
|
-
type Session = z$1.infer<typeof SessionSchema>;
|
|
1428
|
-
type Message = z$1.infer<typeof MessageSchema>;
|
|
1429
|
-
type Command = z$1.infer<typeof CommandSchema>;
|
|
1430
|
-
type SandboxRecord = z$1.infer<typeof SandboxRecordSchema>;
|
|
1431
|
-
type SetupSnapshot = z$1.infer<typeof SetupSnapshotSchema>;
|
|
1432
|
-
type PartBase = z$1.infer<typeof PartSchema>;
|
|
1433
|
-
type Part = Omit<PartBase, "part"> & {
|
|
1434
|
-
part: UIMessage["parts"][number];
|
|
1435
|
-
};
|
|
1436
|
-
type ListResult<T> = {
|
|
1437
|
-
items: T[];
|
|
1438
|
-
nextCursor: string | null;
|
|
1439
|
-
};
|
|
1440
|
-
type SessionUpdateInput = {
|
|
1441
|
-
id: Session["id"];
|
|
1442
|
-
} & Partial<Omit<Session, "id">>;
|
|
1443
|
-
type SandboxUpdateInput = {
|
|
1444
|
-
id: SandboxRecord["id"];
|
|
1445
|
-
} & Partial<Omit<SandboxRecord, "id">>;
|
|
1446
|
-
/**
|
|
1447
|
-
* Session with tags narrowed to a specific schema.
|
|
1448
|
-
*/
|
|
1449
|
-
type TypedSession<TTags extends Record<string, unknown>> = Omit<Session, "tags"> & {
|
|
1450
|
-
tags: Partial<TTags> | null;
|
|
1451
|
-
};
|
|
1452
|
-
type TypedSessionUpdateInput<TTags extends Record<string, unknown>> = {
|
|
1453
|
-
id: TypedSession<TTags>["id"];
|
|
1454
|
-
} & Partial<Omit<TypedSession<TTags>, "id">>;
|
|
1455
|
-
/**
|
|
1456
|
-
* Storage interface with session tags narrowed to the agent's tagsSchema.
|
|
1457
|
-
* Used by the agent's `storage` getter so callers get typed tags on sessions.
|
|
1458
|
-
*/
|
|
1459
|
-
type TypedStorage<TTags extends Record<string, unknown>> = Omit<Storage, "session"> & {
|
|
1460
|
-
session: Omit<Storage["session"], "get" | "set" | "update" | "list" | "listBySandbox" | "tag"> & {
|
|
1461
|
-
get: (id: string) => Promise<SessionNotFoundError | StorageError | TypedSession<TTags>>;
|
|
1462
|
-
set: (session: TypedSession<TTags>) => Promise<StorageError | TypedSession<TTags>>;
|
|
1463
|
-
update: (opts: TypedSessionUpdateInput<TTags>) => Promise<StorageConflictError | StorageError | TypedSession<TTags>>;
|
|
1464
|
-
list: (opts?: {
|
|
1465
|
-
tags?: Partial<TTags>;
|
|
1466
|
-
order?: "createdAt_asc" | "createdAt_desc" | "updatedAt_asc" | "updatedAt_desc";
|
|
1467
|
-
cursor?: string;
|
|
1468
|
-
limit?: number;
|
|
1469
|
-
}) => Promise<StorageError | ListResult<TypedSession<TTags>>>;
|
|
1470
|
-
listBySandbox: (opts: {
|
|
1471
|
-
sandboxId: string;
|
|
1472
|
-
tags?: Partial<TTags>;
|
|
1473
|
-
order?: "createdAt_asc" | "createdAt_desc" | "updatedAt_asc" | "updatedAt_desc";
|
|
1474
|
-
cursor?: string;
|
|
1475
|
-
limit?: number;
|
|
1476
|
-
}) => Promise<StorageError | ListResult<TypedSession<TTags>>>;
|
|
1477
|
-
tag: {
|
|
1478
|
-
set: (opts: {
|
|
1479
|
-
sessionId: string;
|
|
1480
|
-
tags: Partial<TTags>;
|
|
1481
|
-
}) => Promise<StorageError | TypedSession<TTags>>;
|
|
1482
|
-
};
|
|
1483
|
-
};
|
|
1484
|
-
};
|
|
1485
|
-
interface Storage {
|
|
1486
|
-
session: {
|
|
1487
|
-
get: (id: string) => Promise<SessionNotFoundError | StorageError | Session>;
|
|
1488
|
-
set: (session: Session) => Promise<StorageError | Session>;
|
|
1489
|
-
update: (opts: SessionUpdateInput) => Promise<StorageConflictError | StorageError | Session>;
|
|
1490
|
-
delete: (id: string) => Promise<StorageError | undefined>;
|
|
1491
|
-
list: (opts?: {
|
|
1492
|
-
tags?: Record<string, unknown>;
|
|
1493
|
-
order?: "createdAt_asc" | "createdAt_desc" | "updatedAt_asc" | "updatedAt_desc";
|
|
1494
|
-
cursor?: string;
|
|
1495
|
-
limit?: number;
|
|
1496
|
-
}) => Promise<StorageError | ListResult<Session>>;
|
|
1497
|
-
listBySandbox: (opts: {
|
|
1498
|
-
sandboxId: string;
|
|
1499
|
-
tags?: Record<string, unknown>;
|
|
1500
|
-
order?: "createdAt_asc" | "createdAt_desc" | "updatedAt_asc" | "updatedAt_desc";
|
|
1501
|
-
cursor?: string;
|
|
1502
|
-
limit?: number;
|
|
1503
|
-
}) => Promise<StorageError | ListResult<Session>>;
|
|
1504
|
-
tag: {
|
|
1505
|
-
set: (opts: {
|
|
1506
|
-
sessionId: string;
|
|
1507
|
-
tags: Record<string, unknown>;
|
|
1508
|
-
}) => Promise<StorageError | Session>;
|
|
1509
|
-
};
|
|
1510
|
-
};
|
|
1511
|
-
message: {
|
|
1512
|
-
list: (sessionId: string, opts?: {
|
|
1513
|
-
cursor?: string;
|
|
1514
|
-
limit?: number;
|
|
1515
|
-
}) => Promise<StorageError | ListResult<Message>>;
|
|
1516
|
-
get: (id: string) => Promise<StorageError | MessageNotFoundError | Message>;
|
|
1517
|
-
set: (message: Message) => Promise<StorageError | Message>;
|
|
1518
|
-
};
|
|
1519
|
-
part: {
|
|
1520
|
-
listByMessage: (messageId: string, opts?: {
|
|
1521
|
-
cursor?: string;
|
|
1522
|
-
limit?: number;
|
|
1523
|
-
}) => Promise<StorageError | ListResult<Part>>;
|
|
1524
|
-
listBySession: (sessionId: string, opts?: {
|
|
1525
|
-
cursor?: string;
|
|
1526
|
-
limit?: number;
|
|
1527
|
-
}) => Promise<StorageError | ListResult<Part>>;
|
|
1528
|
-
set: (part: Part) => Promise<StorageError | Part>;
|
|
1529
|
-
delete: (id: string) => Promise<StorageError | undefined>;
|
|
1530
|
-
};
|
|
1531
|
-
sandbox: {
|
|
1532
|
-
get: (key: string) => Promise<StorageError | SandboxRecord | SandboxNotFoundError>;
|
|
1533
|
-
getBySession: (sessionId: string) => Promise<StorageError | SandboxRecord | SandboxNotFoundError>;
|
|
1534
|
-
set: (opts: SandboxRecord) => Promise<StorageError | SandboxRecord>;
|
|
1535
|
-
update: (opts: SandboxUpdateInput) => Promise<StorageError | SandboxRecord>;
|
|
1536
|
-
list: (opts?: {
|
|
1537
|
-
tags?: Record<string, unknown>;
|
|
1538
|
-
order?: "createdAt_asc" | "createdAt_desc" | "lastActivityAt_asc" | "lastActivityAt_desc";
|
|
1539
|
-
cursor?: string;
|
|
1540
|
-
limit?: number;
|
|
1541
|
-
}) => Promise<StorageError | ListResult<SandboxRecord>>;
|
|
1542
|
-
tag: {
|
|
1543
|
-
set: (opts: {
|
|
1544
|
-
sandboxId: string;
|
|
1545
|
-
tags: Record<string, unknown>;
|
|
1546
|
-
}) => Promise<StorageError | SandboxRecord>;
|
|
1547
|
-
};
|
|
1548
|
-
acquireLock: (record: SandboxRecord, lockTimeoutMs: number) => Promise<StorageError | SandboxRecord | null>;
|
|
1549
|
-
};
|
|
1550
|
-
command: {
|
|
1551
|
-
get: (id: string) => Promise<StorageError | Command | null>;
|
|
1552
|
-
set: (command: Command) => Promise<StorageError | Command>;
|
|
1553
|
-
list: (sessionId: string, opts?: {
|
|
1554
|
-
includeFinished?: boolean;
|
|
1555
|
-
cursor?: string;
|
|
1556
|
-
limit?: number;
|
|
1557
|
-
}) => Promise<StorageError | ListResult<Command>>;
|
|
1558
|
-
};
|
|
1559
|
-
setup: {
|
|
1560
|
-
get: (key: string) => Promise<StorageError | SetupSnapshot | null>;
|
|
1561
|
-
set: (snapshot: SetupSnapshot) => Promise<StorageError | SetupSnapshot>;
|
|
1562
|
-
delete: (key: string) => Promise<StorageError | undefined>;
|
|
1563
|
-
acquireLock: (key: string, lockId: string, lockTimeoutMs: number) => Promise<StorageError | SetupSnapshot | null>;
|
|
1564
|
-
};
|
|
1565
|
-
}
|
|
1566
|
-
type BaseStorageConfig = {
|
|
1567
|
-
name?: string;
|
|
1568
|
-
/**
|
|
1569
|
-
* Agent API endpoint URL. Storage RPC calls flow through this handler.
|
|
1570
|
-
* If not provided, resolved from environment (VERCEL_URL, PORT, etc).
|
|
1571
|
-
*/
|
|
1572
|
-
api?: string;
|
|
1573
|
-
};
|
|
1574
|
-
type StorageConfig = (BaseStorageConfig & {
|
|
1575
|
-
type: "local";
|
|
1576
|
-
path?: string;
|
|
1577
|
-
}) | (BaseStorageConfig & {
|
|
1578
|
-
type: "vercel";
|
|
1579
|
-
}) | (BaseStorageConfig & {
|
|
1580
|
-
type: "custom";
|
|
1581
|
-
url: string;
|
|
1582
|
-
headers?: Record<string, string>;
|
|
1583
|
-
});
|
|
1584
|
-
type ResolvedStorage = {
|
|
1585
|
-
url: string;
|
|
1586
|
-
headers?: Record<string, string>;
|
|
1587
|
-
};
|
|
1588
|
-
|
|
1589
|
-
type RpcResponse<T> = {
|
|
1590
|
-
result: T;
|
|
1591
|
-
} | {
|
|
1592
|
-
error: {
|
|
1593
|
-
code: string;
|
|
1594
|
-
message: string;
|
|
1595
|
-
};
|
|
1596
|
-
};
|
|
1597
|
-
type RpcFn = (params: {
|
|
1598
|
-
name?: string;
|
|
1599
|
-
method: string;
|
|
1600
|
-
params: unknown;
|
|
1601
|
-
_quiet?: boolean;
|
|
1602
|
-
}) => Promise<RpcResponse<unknown>>;
|
|
1603
|
-
|
|
1604
|
-
/**
|
|
1605
|
-
* Summary of a discovered skill, used in the system prompt
|
|
1606
|
-
* to inform the LLM about available skills.
|
|
1607
|
-
*/
|
|
1608
|
-
type SkillSummary = {
|
|
1609
|
-
name: string;
|
|
1610
|
-
description: string;
|
|
1611
|
-
/** Full path to the SKILL.md file inside the sandbox */
|
|
1612
|
-
skillMdPath: string;
|
|
1613
|
-
};
|
|
1614
|
-
/**
|
|
1615
|
-
* A file ready to be uploaded to the sandbox.
|
|
1616
|
-
* Content can be text (string) or binary (Buffer).
|
|
1617
|
-
*/
|
|
1618
|
-
type UploadableFile = {
|
|
1619
|
-
/** Relative path within the upload destination */
|
|
1620
|
-
path: string;
|
|
1621
|
-
content: string | Buffer;
|
|
1622
|
-
};
|
|
1623
|
-
/**
|
|
1624
|
-
* Path or paths to skills directories inside the sandbox.
|
|
1625
|
-
*/
|
|
1626
|
-
type SkillsDir = string | string[];
|
|
1627
|
-
|
|
1628
|
-
type SandboxSetup = {
|
|
1629
|
-
/** Explicit key the developer controls. Bump to invalidate and re-run setup. */
|
|
1630
|
-
key: string;
|
|
1631
|
-
/** Async function that receives a bare Sandbox and does setup work. */
|
|
1632
|
-
run: (sandbox: Sandbox) => Promise<void>;
|
|
1633
|
-
};
|
|
1634
|
-
type OnRestart = (sandbox: Sandbox) => Promise<void>;
|
|
1635
|
-
type OnConfigChange = (opts: {
|
|
1636
|
-
oldSandbox: Sandbox;
|
|
1637
|
-
newSandbox: Sandbox;
|
|
1638
|
-
oldConfig: SandboxConfig;
|
|
1639
|
-
newConfig: SandboxConfig;
|
|
1640
|
-
}) => Promise<void>;
|
|
1641
|
-
type SandboxLifecycleInput = {
|
|
1642
|
-
id: string;
|
|
1643
|
-
vercelSandboxId: string;
|
|
1644
|
-
storageConfig: StorageConfig;
|
|
1645
|
-
rpc: RpcFn;
|
|
1646
|
-
};
|
|
1647
|
-
type LogEntry = {
|
|
1648
|
-
stream: "stdout" | "stderr";
|
|
1649
|
-
data: string;
|
|
1650
|
-
};
|
|
1651
|
-
type ExecResult = {
|
|
1652
|
-
commandId: string;
|
|
1653
|
-
logs: () => AsyncIterable<LogEntry>;
|
|
1654
|
-
result: Promise<{
|
|
1655
|
-
stdout: string;
|
|
1656
|
-
stderr: string;
|
|
1657
|
-
exitCode: number;
|
|
1658
|
-
}>;
|
|
1659
|
-
};
|
|
1660
|
-
type SandboxStatus = "pending" | "running" | "stopping" | "stopped" | "failed";
|
|
1661
|
-
interface SandboxLifecycle {
|
|
1662
|
-
start: () => Promise<SandboxError | undefined>;
|
|
1663
|
-
snapshot: () => Promise<SandboxError | {
|
|
1664
|
-
snapshotId: string;
|
|
1665
|
-
}>;
|
|
1666
|
-
stop: () => Promise<SandboxError | undefined>;
|
|
1667
|
-
getStatus: () => Promise<SandboxError | SandboxStatus>;
|
|
1668
|
-
getCreatedAt: () => Promise<SandboxError | Date>;
|
|
1669
|
-
getRemainingTimeout: () => Promise<SandboxError | number>;
|
|
1670
|
-
}
|
|
1671
|
-
interface Sandbox<TTags extends TagsSchema = TagsSchema> {
|
|
1672
|
-
id: SandboxRecord["id"];
|
|
1673
|
-
config: SandboxRecord["config"];
|
|
1674
|
-
cwd: string;
|
|
1675
|
-
exec: (opts: {
|
|
1676
|
-
command: string;
|
|
1677
|
-
args?: string[];
|
|
1678
|
-
cwd?: string;
|
|
1679
|
-
env?: Record<string, string>;
|
|
1680
|
-
signal?: AbortSignal;
|
|
1681
|
-
sudo?: boolean;
|
|
1682
|
-
}) => Promise<SandboxError | ExecResult>;
|
|
1683
|
-
/**
|
|
1684
|
-
* Get the public domain URL for an exposed port.
|
|
1685
|
-
* Only available for Vercel sandboxes with exposed ports.
|
|
1686
|
-
*/
|
|
1687
|
-
getDomain: (port: number) => Promise<SandboxError | string>;
|
|
1688
|
-
kill: (opts: {
|
|
1689
|
-
commandId: string;
|
|
1690
|
-
storage: Storage;
|
|
1691
|
-
}) => Promise<SandboxError | undefined>;
|
|
1692
|
-
readFile: (opts: {
|
|
1693
|
-
path: string;
|
|
1694
|
-
}) => Promise<SandboxError | Buffer | null>;
|
|
1695
|
-
writeFiles: (opts: {
|
|
1696
|
-
files: UploadableFile[];
|
|
1697
|
-
destPath: string;
|
|
1698
|
-
}) => Promise<void>;
|
|
1699
|
-
lifecycle: SandboxLifecycle;
|
|
1700
|
-
/**
|
|
1701
|
-
* Dynamically update the network policy on a running sandbox.
|
|
1702
|
-
* Only available for Vercel sandboxes.
|
|
1703
|
-
*
|
|
1704
|
-
* @example
|
|
1705
|
-
* ```ts
|
|
1706
|
-
* // Lock down to specific domains
|
|
1707
|
-
* await sandbox.updateNetworkPolicy({ allow: ["github.com", "*.github.com"] });
|
|
1708
|
-
*
|
|
1709
|
-
* // Deny all network access
|
|
1710
|
-
* await sandbox.updateNetworkPolicy("deny-all");
|
|
1711
|
-
*
|
|
1712
|
-
* // Restore full access
|
|
1713
|
-
* await sandbox.updateNetworkPolicy("allow-all");
|
|
1714
|
-
* ```
|
|
1715
|
-
*/
|
|
1716
|
-
updateNetworkPolicy: (policy: NonNullable<NetworkPolicy>) => Promise<SandboxError | NonNullable<NetworkPolicy>>;
|
|
1717
|
-
tag: {
|
|
1718
|
-
list: () => Promise<SandboxNotFoundError | StorageError | TTags>;
|
|
1719
|
-
get: (key: string) => Promise<SandboxNotFoundError | StorageError | TTags[typeof key] | undefined>;
|
|
1720
|
-
set: (key: string, value: unknown) => Promise<StorageError | undefined>;
|
|
1721
|
-
setMany: (tags: Record<string, unknown>) => Promise<StorageError | undefined>;
|
|
1722
|
-
};
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
type GenerationOptions = {
|
|
1726
|
-
/** Max tool-use steps per assistant response. Default: unlimited. */
|
|
1727
|
-
maxSteps?: number;
|
|
1728
|
-
temperature?: number;
|
|
1729
|
-
topK?: number;
|
|
1730
|
-
topP?: number;
|
|
1731
|
-
frequencyPenalty?: number;
|
|
1732
|
-
presencePenalty?: number;
|
|
1733
|
-
maxOutputTokens?: number;
|
|
1734
|
-
/** Provider-specific HTTP headers. */
|
|
1735
|
-
headers?: Record<string, string>;
|
|
1736
|
-
};
|
|
1737
|
-
|
|
1738
|
-
type ToolContext<TContext = Record<string, unknown>> = {
|
|
1739
|
-
session: Session;
|
|
1740
|
-
sandbox: Sandbox;
|
|
1741
|
-
storage: Storage;
|
|
1742
|
-
context: TContext;
|
|
1743
|
-
};
|
|
1744
|
-
declare const builtInTools: {
|
|
1745
|
-
Read: ai.Tool<{
|
|
1746
|
-
label: string;
|
|
1747
|
-
path: string;
|
|
1748
|
-
startLine?: number | undefined;
|
|
1749
|
-
endLine?: number | undefined;
|
|
1750
|
-
}, {
|
|
1751
|
-
content: string;
|
|
1752
|
-
metadata: {
|
|
1753
|
-
totalLines: number;
|
|
1754
|
-
linesShown: number;
|
|
1755
|
-
startLine: number;
|
|
1756
|
-
endLine: number;
|
|
1757
|
-
isPaginated: boolean;
|
|
1758
|
-
fileSize: string;
|
|
1759
|
-
path: string;
|
|
1760
|
-
};
|
|
1761
|
-
}>;
|
|
1762
|
-
Grep: ai.Tool<{
|
|
1763
|
-
label: string;
|
|
1764
|
-
pattern: string;
|
|
1765
|
-
caseSensitive: boolean;
|
|
1766
|
-
filesWithMatches: boolean;
|
|
1767
|
-
path?: string | undefined;
|
|
1768
|
-
fileType?: string | undefined;
|
|
1769
|
-
glob?: string | undefined;
|
|
1770
|
-
contextLines?: number | undefined;
|
|
1771
|
-
maxCount?: number | undefined;
|
|
1772
|
-
}, {
|
|
1773
|
-
matches: string;
|
|
1774
|
-
summary: {
|
|
1775
|
-
matchCount: number;
|
|
1776
|
-
fileCount: number;
|
|
1777
|
-
searchPath: string;
|
|
1778
|
-
pattern: string;
|
|
1779
|
-
};
|
|
1780
|
-
}>;
|
|
1781
|
-
List: ai.Tool<{
|
|
1782
|
-
label: string;
|
|
1783
|
-
includeHidden: boolean;
|
|
1784
|
-
filesOnly: boolean;
|
|
1785
|
-
path?: string | undefined;
|
|
1786
|
-
depth?: number | undefined;
|
|
1787
|
-
pattern?: string | undefined;
|
|
1788
|
-
}, {
|
|
1789
|
-
listing: string;
|
|
1790
|
-
summary: {
|
|
1791
|
-
totalItems: number;
|
|
1792
|
-
totalFiles: number;
|
|
1793
|
-
totalDirs: number;
|
|
1794
|
-
searchPath: string;
|
|
1795
|
-
depth?: number | undefined;
|
|
1796
|
-
};
|
|
1797
|
-
}>;
|
|
1798
|
-
Write: ai.Tool<{
|
|
1799
|
-
label: string;
|
|
1800
|
-
path: string;
|
|
1801
|
-
content: string;
|
|
1802
|
-
}, {
|
|
1803
|
-
success: boolean;
|
|
1804
|
-
path: string;
|
|
1805
|
-
bytesWritten: number;
|
|
1806
|
-
error?: string | undefined;
|
|
1807
|
-
}>;
|
|
1808
|
-
Edit: ai.Tool<{
|
|
1809
|
-
label: string;
|
|
1810
|
-
path: string;
|
|
1811
|
-
old_string: string;
|
|
1812
|
-
new_string: string;
|
|
1813
|
-
}, {
|
|
1814
|
-
success: boolean;
|
|
1815
|
-
path: string;
|
|
1816
|
-
error?: string | undefined;
|
|
1817
|
-
}>;
|
|
1818
|
-
Bash: ai.Tool<{
|
|
1819
|
-
label: string;
|
|
1820
|
-
command: string;
|
|
1821
|
-
waitUntil?: number | undefined;
|
|
1822
|
-
}, {
|
|
1823
|
-
commandId: string;
|
|
1824
|
-
stdout: string;
|
|
1825
|
-
stderr: string;
|
|
1826
|
-
exitCode: number;
|
|
1827
|
-
status: "running" | "completed" | "failed";
|
|
1828
|
-
outputDir: string;
|
|
1829
|
-
}>;
|
|
1830
|
-
Skill: ai.Tool<{
|
|
1831
|
-
label: string;
|
|
1832
|
-
name: string;
|
|
1833
|
-
}, {
|
|
1834
|
-
name: string;
|
|
1835
|
-
description: string;
|
|
1836
|
-
content: string;
|
|
1837
|
-
path: string;
|
|
1838
|
-
}>;
|
|
1839
|
-
JavaScript: ai.Tool<{
|
|
1840
|
-
label: string;
|
|
1841
|
-
code: string;
|
|
1842
|
-
}, any>;
|
|
1843
|
-
};
|
|
1844
|
-
type BuiltInToolName = keyof typeof builtInTools;
|
|
1845
|
-
declare const builtinToolNames: { [K in BuiltInToolName]: K; };
|
|
1846
|
-
|
|
1847
|
-
type ToolMetadata = {
|
|
1848
|
-
name: string;
|
|
1849
|
-
description?: string;
|
|
1850
|
-
inputSchema?: JSONSchema7;
|
|
1851
|
-
};
|
|
1852
|
-
type ToolsExecuteParams = {
|
|
1853
|
-
name: string;
|
|
1854
|
-
input: unknown;
|
|
1855
|
-
session: Session;
|
|
1856
|
-
sandboxRecord: SandboxRecord;
|
|
1857
|
-
context: Record<string, unknown>;
|
|
1858
|
-
};
|
|
1859
|
-
type HookToolBeforeParams = {
|
|
1860
|
-
name: string;
|
|
1861
|
-
input: unknown;
|
|
1862
|
-
context: ToolContext;
|
|
1863
|
-
};
|
|
1864
|
-
type HookToolBeforeResult = {
|
|
1865
|
-
input?: unknown;
|
|
1866
|
-
stop?: boolean;
|
|
1867
|
-
};
|
|
1868
|
-
type HookToolAfterParams = {
|
|
1869
|
-
name: string;
|
|
1870
|
-
input: unknown;
|
|
1871
|
-
result: unknown;
|
|
1872
|
-
context: ToolContext;
|
|
1873
|
-
};
|
|
1874
|
-
type HookToolAfterResult = {
|
|
1875
|
-
result?: unknown;
|
|
1876
|
-
stop?: boolean;
|
|
1877
|
-
};
|
|
1878
|
-
type ToolsNeedsApprovalParams = {
|
|
1879
|
-
toolName: string;
|
|
1880
|
-
input: unknown;
|
|
1881
|
-
toolCallId: string;
|
|
1882
|
-
messages: unknown[];
|
|
1883
|
-
};
|
|
1884
|
-
type ToolsNeedsApprovalResult = boolean;
|
|
1885
|
-
type HookStatusParams = {
|
|
1886
|
-
status: AgentStatus;
|
|
1887
|
-
};
|
|
1888
|
-
type HookStatusResult = Record<string, never>;
|
|
1889
|
-
|
|
1890
|
-
type LogLevel = "info" | "warn" | "error" | "silent";
|
|
1891
|
-
type LoggingConfig = {
|
|
1892
|
-
level?: LogLevel;
|
|
1893
|
-
/**
|
|
1894
|
-
* Top-level label for all log lines.
|
|
1895
|
-
* @default "agent"
|
|
1896
|
-
* @example "my-app" → [my-app:default:workflow]
|
|
1897
|
-
*/
|
|
1898
|
-
prefix?: string;
|
|
1899
|
-
};
|
|
1900
|
-
|
|
1901
|
-
type SessionUsage = {
|
|
1902
|
-
total: UsageSummary & {
|
|
1903
|
-
messageCount: number;
|
|
1904
|
-
};
|
|
1905
|
-
byMessageId: Record<string, UsageSummary | null>;
|
|
1906
|
-
};
|
|
1907
|
-
|
|
1908
|
-
type SendInput = string | {
|
|
1909
|
-
role?: UIMessage["role"];
|
|
1910
|
-
parts: UIMessage["parts"];
|
|
1911
|
-
id?: string;
|
|
1912
|
-
};
|
|
1913
|
-
/**
|
|
1914
|
-
* Transient status indicators emitted over the stream during long-running phases.
|
|
1915
|
-
* Delivered to the client as `data-status` chunks with `transient: true` — not persisted.
|
|
1916
|
-
*/
|
|
1917
|
-
declare const AgentStatus: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1918
|
-
type: z.ZodLiteral<"sandbox-setup">;
|
|
1919
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1920
|
-
type: z.ZodLiteral<"sandbox-setup-cold">;
|
|
1921
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1922
|
-
type: z.ZodLiteral<"loading-skills">;
|
|
1923
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1924
|
-
type: z.ZodLiteral<"processing-approvals">;
|
|
1925
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1926
|
-
type: z.ZodLiteral<"needs-approval">;
|
|
1927
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1928
|
-
type: z.ZodLiteral<"thinking">;
|
|
1929
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1930
|
-
type: z.ZodLiteral<"custom">;
|
|
1931
|
-
status: z.ZodString;
|
|
1932
|
-
}, z.core.$strip>], "type">;
|
|
1933
|
-
type AgentStatus = z.infer<typeof AgentStatus>;
|
|
1934
|
-
/**
|
|
1935
|
-
* Augmented `ReadableStream` returned by `session.stream()`.
|
|
1936
|
-
* Passes `instanceof ReadableStream` and works with `createUIMessageStreamResponse({ stream })`.
|
|
1937
|
-
*/
|
|
1938
|
-
type AgentStream = ReadableStream<UIMessageChunk> & {
|
|
1939
|
-
/** Write a typed status update to the stream (transient, not persisted). */
|
|
1940
|
-
writeStatus: (status: AgentStatus) => void;
|
|
1941
|
-
};
|
|
1942
|
-
/**
|
|
1943
|
-
* Data part types emitted by every agent over the stream.
|
|
1944
|
-
* Used as the `DATA_PARTS` generic for `UIMessage`.
|
|
1945
|
-
*/
|
|
1946
|
-
type AgentDataTypes = {
|
|
1947
|
-
status: AgentStatus;
|
|
1948
|
-
};
|
|
1949
|
-
/**
|
|
1950
|
-
* Infer a typed UIMessage from an agent instance.
|
|
1951
|
-
* Tool parts are discriminated by `type: "tool-${name}"` with typed input/output.
|
|
1952
|
-
* Data parts include `data-status` with typed `AgentStatus`.
|
|
1953
|
-
*
|
|
1954
|
-
* @example
|
|
1955
|
-
* ```ts
|
|
1956
|
-
* const myAgent = agent({ tools: { myTool: tool({...}) } });
|
|
1957
|
-
* type MyMessage = typeof myAgent.$UIMessage;
|
|
1958
|
-
* // MyMessage.parts includes { type: "tool-myTool"; input: MyInput; output: MyOutput; ... }
|
|
1959
|
-
* // onData callback receives { type: "data-status"; data: AgentStatus }
|
|
1960
|
-
* ```
|
|
1961
|
-
*/
|
|
1962
|
-
type InferUIMessage<A> = A extends {
|
|
1963
|
-
tools: infer T extends ToolSet;
|
|
1964
|
-
} ? UIMessage<unknown, AgentDataTypes, InferUITools<T>> : UIMessage<unknown, AgentDataTypes>;
|
|
1965
|
-
type ToolName<Tools> = Extract<keyof Tools, string> | BuiltInToolName;
|
|
1966
|
-
type ToolInput<Tools, K> = K extends BuiltInToolName ? InferToolInput<(typeof builtInTools)[K]> : K extends keyof Tools ? Tools[K] extends ai.Tool ? InferToolInput<Tools[K]> : unknown : unknown;
|
|
1967
|
-
type NeedsApprovalMap<Tools> = {
|
|
1968
|
-
[K in ToolName<Tools>]?: boolean | ((input: ToolInput<Tools, K>, options: {
|
|
1969
|
-
toolCallId: string;
|
|
1970
|
-
messages: ModelMessage[];
|
|
1971
|
-
experimental_context: unknown;
|
|
1972
|
-
}) => boolean | Promise<boolean>);
|
|
1973
|
-
};
|
|
1974
|
-
/**
|
|
1975
|
-
* Options that can be set per-session, overriding agent-level defaults.
|
|
1976
|
-
*/
|
|
1977
|
-
type SessionOptions<Tools extends ToolSet, TTags extends Record<string, unknown> = Record<string, never>> = {
|
|
1978
|
-
/** The AI model to use. */
|
|
1979
|
-
model?: GatewayModelId;
|
|
1980
|
-
/** System prompt for the AI model. */
|
|
1981
|
-
system?: string;
|
|
1982
|
-
/** Sandbox configuration or ID. If string, uses as sandbox ID with its config. */
|
|
1983
|
-
sandbox?: (SandboxConfig & {
|
|
1984
|
-
setup?: SandboxSetup;
|
|
1985
|
-
onRestart?: OnRestart;
|
|
1986
|
-
onConfigChange?: OnConfigChange;
|
|
1987
|
-
}) | string;
|
|
1988
|
-
/** Key-value metadata tags for the session. */
|
|
1989
|
-
tags?: TTags;
|
|
1990
|
-
/** Directory containing skill definitions for the agent. */
|
|
1991
|
-
skillsDir?: SkillsDir;
|
|
1992
|
-
/**
|
|
1993
|
-
* Names of tools to activate for this session.
|
|
1994
|
-
* If not specified, all agent-level tools are active.
|
|
1995
|
-
* Use this to restrict which tools are available per-session.
|
|
1996
|
-
*/
|
|
1997
|
-
activeTools?: (Extract<keyof Tools, string> | BuiltInToolName)[];
|
|
1998
|
-
/** Generation options (temperature, maxSteps, etc.). Overrides agent-level defaults. */
|
|
1999
|
-
generation?: GenerationOptions;
|
|
2000
|
-
};
|
|
2001
|
-
type SessionUpdateOptions<Tools extends ToolSet> = Pick<SessionOptions<Tools>, "model" | "system" | "skillsDir" | "activeTools" | "generation">;
|
|
2002
|
-
/**
|
|
2003
|
-
* Configuration options for creating an agent instance.
|
|
2004
|
-
*
|
|
2005
|
-
* @example
|
|
2006
|
-
* ```ts
|
|
2007
|
-
* const myAgent = agent({
|
|
2008
|
-
* model: "anthropic/claude-opus-4.5",
|
|
2009
|
-
* system: "You are a helpful assistant...",
|
|
2010
|
-
* tagsSchema: z.object({ userId: z.string() }),
|
|
2011
|
-
* contextSchema: z.object({ authToken: z.string() }),
|
|
2012
|
-
* });
|
|
2013
|
-
* ```
|
|
2014
|
-
*/
|
|
2015
|
-
type AgentOptions<Tools extends ToolSet, TTags extends Record<string, unknown> = Record<string, never>, TContext extends Record<string, unknown> = Record<string, never>> = {
|
|
2016
|
-
/**
|
|
2017
|
-
* Agent name. Used to isolate storage data - different names have separate data.
|
|
2018
|
-
* @default "default"
|
|
2019
|
-
*/
|
|
2020
|
-
name?: string;
|
|
2021
|
-
/**
|
|
2022
|
-
* Storage backend configuration.
|
|
2023
|
-
* - `{ type: "local" }` - filesystem storage (dev)
|
|
2024
|
-
* - `{ type: "vercel" }` - Vercel managed storage (prod)
|
|
2025
|
-
* - `{ type: "custom", url: "..." }` - custom HTTP backend
|
|
2026
|
-
* @default Inferred from environment: `{ type: "vercel" }` when `VERCEL_OIDC_TOKEN` is set, `{ type: "local" }` otherwise.
|
|
2027
|
-
*/
|
|
2028
|
-
storage?: StorageConfig;
|
|
2029
|
-
/**
|
|
2030
|
-
* Custom tools available to the agent.
|
|
2031
|
-
* These are exposed via the RPC handler and called over HTTP.
|
|
2032
|
-
*/
|
|
2033
|
-
tools?: Tools;
|
|
2034
|
-
/**
|
|
2035
|
-
* Hooks for intercepting agent operations.
|
|
2036
|
-
*/
|
|
2037
|
-
hooks?: AgentHooks;
|
|
2038
|
-
/**
|
|
2039
|
-
* Schema for session tags. All sessions share this schema.
|
|
2040
|
-
* Tags are persisted in storage and survive across requests.
|
|
2041
|
-
*/
|
|
2042
|
-
tagsSchema?: z.ZodType<TTags>;
|
|
2043
|
-
/**
|
|
2044
|
-
* Schema for transient tool context. Passed per-request via send().
|
|
2045
|
-
* NOT persisted - use for secrets like auth tokens.
|
|
2046
|
-
*/
|
|
2047
|
-
contextSchema?: z.ZodType<TContext>;
|
|
2048
|
-
/**
|
|
2049
|
-
* Approval rules for tools you don't own (built-in or third-party).
|
|
2050
|
-
* Maps tool names to a boolean or a function that decides whether to ask.
|
|
2051
|
-
*
|
|
2052
|
-
* @example
|
|
2053
|
-
* ```ts
|
|
2054
|
-
* needsApproval: {
|
|
2055
|
-
* Bash: (input) => input.command.startsWith("rm"),
|
|
2056
|
-
* Write: true,
|
|
2057
|
-
* }
|
|
2058
|
-
* ```
|
|
2059
|
-
*/
|
|
2060
|
-
needsApproval?: NeedsApprovalMap<Tools>;
|
|
2061
|
-
/**
|
|
2062
|
-
* Sandbox configuration with optional setup and restart hooks.
|
|
2063
|
-
*
|
|
2064
|
-
* - `setup.key`: explicit string to control snapshot invalidation (bump to re-run)
|
|
2065
|
-
* - `setup.run`: async function that runs once to initialize the sandbox, then gets snapshotted
|
|
2066
|
-
* - `onRestart`: async function that runs every time a sandbox resumes from a snapshot
|
|
2067
|
-
*
|
|
2068
|
-
* @example
|
|
2069
|
-
* ```ts
|
|
2070
|
-
* sandbox: {
|
|
2071
|
-
* type: "vercel",
|
|
2072
|
-
* setup: {
|
|
2073
|
-
* key: "dev-env-v3",
|
|
2074
|
-
* run: async (sandbox) => {
|
|
2075
|
-
* await sandbox.exec({ command: "npm", args: ["i", "-g", "vercel"] })
|
|
2076
|
-
* },
|
|
2077
|
-
* },
|
|
2078
|
-
* onRestart: async (sandbox) => {
|
|
2079
|
-
* await sandbox.exec({ command: "bash", args: ["-c", "npm run dev &"] })
|
|
2080
|
-
* },
|
|
2081
|
-
* }
|
|
2082
|
-
* ```
|
|
2083
|
-
*/
|
|
2084
|
-
sandbox?: (SandboxConfig & {
|
|
2085
|
-
setup?: SandboxSetup;
|
|
2086
|
-
onRestart?: OnRestart;
|
|
2087
|
-
onConfigChange?: OnConfigChange;
|
|
2088
|
-
}) | string;
|
|
2089
|
-
/**
|
|
2090
|
-
* Logging configuration. The agent `name` is automatically used as the
|
|
2091
|
-
* middle segment of the log tag: `[prefix:name:subsystem]`.
|
|
2092
|
-
*
|
|
2093
|
-
* @example
|
|
2094
|
-
* ```ts
|
|
2095
|
-
* agent({
|
|
2096
|
-
* name: "my-bot",
|
|
2097
|
-
* logging: { level: "info", prefix: "my-app" }
|
|
2098
|
-
* })
|
|
2099
|
-
* // logs: [my-app:my-bot:workflow] ...
|
|
2100
|
-
* ```
|
|
2101
|
-
*/
|
|
2102
|
-
logging?: LoggingConfig;
|
|
2103
|
-
} & Omit<SessionOptions<Tools, TTags>, "tags" | "sandbox">;
|
|
2104
|
-
/**
|
|
2105
|
-
* Base type for session/sandbox tags. Used for generic constraints.
|
|
2106
|
-
* For agent-level tag validation, use `tagsSchema` option with a zod schema.
|
|
2107
|
-
*/
|
|
2108
|
-
type TagsSchema = Record<string, unknown>;
|
|
2109
|
-
/**
|
|
2110
|
-
* Hooks for intercepting agent operations.
|
|
2111
|
-
*/
|
|
2112
|
-
type AgentHooks = {
|
|
2113
|
-
/** Called before a tool is executed. Can modify input or throw to block. */
|
|
2114
|
-
"tool.before"?: (opts: {
|
|
2115
|
-
name: string;
|
|
2116
|
-
input: unknown;
|
|
2117
|
-
context: ToolContext;
|
|
2118
|
-
}) => Promise<undefined | {
|
|
2119
|
-
input: unknown;
|
|
2120
|
-
}>;
|
|
2121
|
-
/** Called after a tool is executed. Can modify result. */
|
|
2122
|
-
"tool.after"?: (opts: {
|
|
2123
|
-
name: string;
|
|
2124
|
-
input: unknown;
|
|
2125
|
-
result: unknown;
|
|
2126
|
-
context: ToolContext;
|
|
2127
|
-
}) => Promise<undefined | {
|
|
2128
|
-
result: unknown;
|
|
2129
|
-
}>;
|
|
2130
|
-
/** Called when the agent emits a transient status indicator. */
|
|
2131
|
-
status?: (status: AgentStatus) => void | Promise<void>;
|
|
2132
|
-
};
|
|
2133
|
-
/**
|
|
2134
|
-
* RPC response type for dispatch.
|
|
2135
|
-
*/
|
|
2136
|
-
type RpcResult<T = unknown> = {
|
|
2137
|
-
result: T;
|
|
2138
|
-
} | {
|
|
2139
|
-
error: {
|
|
2140
|
-
code: string;
|
|
2141
|
-
message: string;
|
|
2142
|
-
};
|
|
2143
|
-
status?: number;
|
|
2144
|
-
};
|
|
2145
|
-
/**
|
|
2146
|
-
* Direct RPC payload for step function calls (no HTTP).
|
|
2147
|
-
*/
|
|
2148
|
-
type RpcPayload = {
|
|
2149
|
-
name?: string;
|
|
2150
|
-
method: string;
|
|
2151
|
-
params: unknown;
|
|
2152
|
-
_quiet?: boolean;
|
|
2153
|
-
};
|
|
2154
|
-
/**
|
|
2155
|
-
* All RPC methods available on the agent handler.
|
|
2156
|
-
* Combines tools methods, hooks, and storage methods.
|
|
2157
|
-
*/
|
|
2158
|
-
type AgentRpcMethods = {
|
|
2159
|
-
"tools.list": {
|
|
2160
|
-
params: Record<string, never>;
|
|
2161
|
-
result: ToolMetadata[];
|
|
2162
|
-
};
|
|
2163
|
-
"tools.execute": {
|
|
2164
|
-
params: ToolsExecuteParams;
|
|
2165
|
-
result: unknown;
|
|
2166
|
-
};
|
|
2167
|
-
"tools.needsApproval": {
|
|
2168
|
-
params: ToolsNeedsApprovalParams;
|
|
2169
|
-
result: ToolsNeedsApprovalResult;
|
|
2170
|
-
};
|
|
2171
|
-
"hook.tool.before": {
|
|
2172
|
-
params: HookToolBeforeParams;
|
|
2173
|
-
result: HookToolBeforeResult;
|
|
2174
|
-
};
|
|
2175
|
-
"hook.tool.after": {
|
|
2176
|
-
params: HookToolAfterParams;
|
|
2177
|
-
result: HookToolAfterResult;
|
|
2178
|
-
};
|
|
2179
|
-
"hook.status": {
|
|
2180
|
-
params: HookStatusParams;
|
|
2181
|
-
result: HookStatusResult;
|
|
2182
|
-
};
|
|
2183
|
-
} & StorageMethods;
|
|
2184
|
-
type AgentRpcMethodName = keyof AgentRpcMethods;
|
|
2185
|
-
/**
|
|
2186
|
-
* Result type for RPC override handlers.
|
|
2187
|
-
* - `{ ok: true; result: T }` - return this result
|
|
2188
|
-
* - `{ ok: false; error: string }` - return this error
|
|
2189
|
-
* - `null` - use default handler
|
|
2190
|
-
*/
|
|
2191
|
-
type AgentRpcResult<T> = {
|
|
2192
|
-
ok: true;
|
|
2193
|
-
result: T;
|
|
2194
|
-
} | {
|
|
2195
|
-
ok: false;
|
|
2196
|
-
error: string;
|
|
2197
|
-
} | null;
|
|
2198
|
-
/**
|
|
2199
|
-
* Override handlers for agent RPC methods.
|
|
2200
|
-
* Each method can be individually overridden.
|
|
2201
|
-
* Return `null` to fall back to the default handler.
|
|
2202
|
-
*/
|
|
2203
|
-
type AgentRpcOverrides = {
|
|
2204
|
-
[K in AgentRpcMethodName]?: (params: AgentRpcMethods[K]["params"]) => Promise<AgentRpcResult<AgentRpcMethods[K]["result"]>>;
|
|
2205
|
-
};
|
|
2206
|
-
declare const agent: <Tools extends {}, TTags extends Record<string, unknown> = Record<string, never>, TContext extends Record<string, unknown> = Record<string, never>>(_options?: AgentOptions<Tools, TTags, TContext>) => {
|
|
2207
|
-
session: (sessionId: string, sessionOptions?: SessionOptions<Tools, TTags>) => Promise<{
|
|
2208
|
-
id: string;
|
|
2209
|
-
send: ({ input, interruptIfStreaming, context, }: {
|
|
2210
|
-
input: SendInput | SendInput[];
|
|
2211
|
-
interruptIfStreaming?: boolean | {
|
|
2212
|
-
lastPart: {
|
|
2213
|
-
index: number;
|
|
2214
|
-
part: unknown;
|
|
2215
|
-
};
|
|
2216
|
-
};
|
|
2217
|
-
context?: TContext;
|
|
2218
|
-
}) => Promise<void | SessionError | StorageError>;
|
|
2219
|
-
stream: (opts?: {
|
|
2220
|
-
messageId?: string;
|
|
2221
|
-
startIndex?: number;
|
|
2222
|
-
}) => Promise<AgentStream | Error>;
|
|
2223
|
-
ui: () => Promise<StorageError | {
|
|
2224
|
-
messages: UIMessage<unknown, AgentDataTypes, InferUITools<{
|
|
2225
|
-
Read: ai.Tool<{
|
|
2226
|
-
label: string;
|
|
2227
|
-
path: string;
|
|
2228
|
-
startLine?: number | undefined;
|
|
2229
|
-
endLine?: number | undefined;
|
|
2230
|
-
}, {
|
|
2231
|
-
content: string;
|
|
2232
|
-
metadata: {
|
|
2233
|
-
totalLines: number;
|
|
2234
|
-
linesShown: number;
|
|
2235
|
-
startLine: number;
|
|
2236
|
-
endLine: number;
|
|
2237
|
-
isPaginated: boolean;
|
|
2238
|
-
fileSize: string;
|
|
2239
|
-
path: string;
|
|
2240
|
-
};
|
|
2241
|
-
}>;
|
|
2242
|
-
Grep: ai.Tool<{
|
|
2243
|
-
label: string;
|
|
2244
|
-
pattern: string;
|
|
2245
|
-
caseSensitive: boolean;
|
|
2246
|
-
filesWithMatches: boolean;
|
|
2247
|
-
path?: string | undefined;
|
|
2248
|
-
fileType?: string | undefined;
|
|
2249
|
-
glob?: string | undefined;
|
|
2250
|
-
contextLines?: number | undefined;
|
|
2251
|
-
maxCount?: number | undefined;
|
|
2252
|
-
}, {
|
|
2253
|
-
matches: string;
|
|
2254
|
-
summary: {
|
|
2255
|
-
matchCount: number;
|
|
2256
|
-
fileCount: number;
|
|
2257
|
-
searchPath: string;
|
|
2258
|
-
pattern: string;
|
|
2259
|
-
};
|
|
2260
|
-
}>;
|
|
2261
|
-
List: ai.Tool<{
|
|
2262
|
-
label: string;
|
|
2263
|
-
includeHidden: boolean;
|
|
2264
|
-
filesOnly: boolean;
|
|
2265
|
-
path?: string | undefined;
|
|
2266
|
-
depth?: number | undefined;
|
|
2267
|
-
pattern?: string | undefined;
|
|
2268
|
-
}, {
|
|
2269
|
-
listing: string;
|
|
2270
|
-
summary: {
|
|
2271
|
-
totalItems: number;
|
|
2272
|
-
totalFiles: number;
|
|
2273
|
-
totalDirs: number;
|
|
2274
|
-
searchPath: string;
|
|
2275
|
-
depth?: number | undefined;
|
|
2276
|
-
};
|
|
2277
|
-
}>;
|
|
2278
|
-
Write: ai.Tool<{
|
|
2279
|
-
label: string;
|
|
2280
|
-
path: string;
|
|
2281
|
-
content: string;
|
|
2282
|
-
}, {
|
|
2283
|
-
success: boolean;
|
|
2284
|
-
path: string;
|
|
2285
|
-
bytesWritten: number;
|
|
2286
|
-
error?: string | undefined;
|
|
2287
|
-
}>;
|
|
2288
|
-
Edit: ai.Tool<{
|
|
2289
|
-
label: string;
|
|
2290
|
-
path: string;
|
|
2291
|
-
old_string: string;
|
|
2292
|
-
new_string: string;
|
|
2293
|
-
}, {
|
|
2294
|
-
success: boolean;
|
|
2295
|
-
path: string;
|
|
2296
|
-
error?: string | undefined;
|
|
2297
|
-
}>;
|
|
2298
|
-
Bash: ai.Tool<{
|
|
2299
|
-
label: string;
|
|
2300
|
-
command: string;
|
|
2301
|
-
waitUntil?: number | undefined;
|
|
2302
|
-
}, {
|
|
2303
|
-
commandId: string;
|
|
2304
|
-
stdout: string;
|
|
2305
|
-
stderr: string;
|
|
2306
|
-
exitCode: number;
|
|
2307
|
-
status: "running" | "completed" | "failed";
|
|
2308
|
-
outputDir: string;
|
|
2309
|
-
}>;
|
|
2310
|
-
Skill: ai.Tool<{
|
|
2311
|
-
label: string;
|
|
2312
|
-
name: string;
|
|
2313
|
-
}, {
|
|
2314
|
-
name: string;
|
|
2315
|
-
description: string;
|
|
2316
|
-
content: string;
|
|
2317
|
-
path: string;
|
|
2318
|
-
}>;
|
|
2319
|
-
JavaScript: ai.Tool<{
|
|
2320
|
-
label: string;
|
|
2321
|
-
code: string;
|
|
2322
|
-
}, any>;
|
|
2323
|
-
} & Tools>>[];
|
|
2324
|
-
streamingMessageId: string | null;
|
|
2325
|
-
usage: SessionUsage;
|
|
2326
|
-
}>;
|
|
2327
|
-
tag: {
|
|
2328
|
-
list: () => Promise<SessionNotFoundError | StorageError | TTags>;
|
|
2329
|
-
get: <K extends keyof TTags & string>(key: K) => Promise<TTags[K] | undefined | Error>;
|
|
2330
|
-
set: <K extends keyof TTags & string>(key: K, value: TTags[K]) => Promise<undefined | Error>;
|
|
2331
|
-
setMany: (tags: Partial<TTags>) => Promise<undefined | Error>;
|
|
2332
|
-
};
|
|
2333
|
-
sandbox: Sandbox<TTags> & {
|
|
2334
|
-
_onReady?: Promise<void>;
|
|
2335
|
-
};
|
|
2336
|
-
interrupt: (lastPart?: {
|
|
2337
|
-
index: number;
|
|
2338
|
-
part: unknown;
|
|
2339
|
-
}) => Promise<StorageError | undefined>;
|
|
2340
|
-
resolveApproval: ({ approvalId, approved, reason, }: {
|
|
2341
|
-
approvalId: string;
|
|
2342
|
-
approved: boolean;
|
|
2343
|
-
reason?: string;
|
|
2344
|
-
}) => Promise<undefined | Error>;
|
|
2345
|
-
usage: () => Promise<SessionUsage | Error>;
|
|
2346
|
-
update: (updateOptions: SessionUpdateOptions<Tools> & {
|
|
2347
|
-
tags?: TTags;
|
|
2348
|
-
}) => Promise<undefined | Error>;
|
|
2349
|
-
}>;
|
|
2350
|
-
sandbox: (sandboxId: string, opts?: {
|
|
2351
|
-
config?: SandboxConfig;
|
|
2352
|
-
tags?: TTags;
|
|
2353
|
-
setup?: SandboxSetup;
|
|
2354
|
-
onRestart?: OnRestart;
|
|
2355
|
-
onConfigChange?: OnConfigChange;
|
|
2356
|
-
}) => Promise<Sandbox<TTags> & {
|
|
2357
|
-
_onReady?: Promise<void>;
|
|
2358
|
-
}>;
|
|
2359
|
-
readonly storage: TypedStorage<TTags>;
|
|
2360
|
-
/**
|
|
2361
|
-
* RPC handler for agent operations.
|
|
2362
|
-
* Handles tools.list, tools.execute, storage RPC, and hooks.
|
|
2363
|
-
*
|
|
2364
|
-
* Called internally by the `rpc` step function during workflow execution.
|
|
2365
|
-
* Can also be exposed via HTTP for external access if needed.
|
|
2366
|
-
*/
|
|
2367
|
-
handler: (input: Request | RpcPayload, overrides?: AgentRpcOverrides) => Promise<Response | RpcResult>;
|
|
2368
|
-
tools: typeof builtInTools & Tools;
|
|
2369
|
-
/** Phantom property for type inference. Use `typeof myAgent.$UIMessage` to get the typed UIMessage. */
|
|
2370
|
-
$UIMessage: UIMessage<unknown, AgentDataTypes, InferUITools<typeof builtInTools & Tools>>;
|
|
2371
|
-
/** Agent name used as key for the RPC registry. Set by the loader init. */
|
|
2372
|
-
_agentName: string;
|
|
2373
|
-
rpc: (params: RpcPayload) => Promise<RpcResult>;
|
|
2374
|
-
};
|
|
2375
|
-
|
|
2376
|
-
export { type AgentDataTypes as A, type BuiltInToolName as B, type TypedStorage as C, type UsageSummary as D, type ExecResult as E, agent as F, type GenerationOptions as G, builtinToolNames as H, type InferUIMessage as I, type SandboxLifecycleInput as J, type ListResult as L, type MethodName as M, type OnConfigChange as O, type Part as P, type ResolvedStorage as R, type StorageMethods as S, type TagsSchema as T, type UploadableFile as U, type AgentOptions as a, AgentStatus as b, type AgentStream as c, type Message as d, MessageNotFoundError as e, type MessageUsage as f, type OnRestart as g, type RpcPayload as h, type RpcResult as i, type Sandbox as j, type SandboxConfig as k, SandboxError as l, SandboxNotFoundError as m, type SandboxRecord as n, type SandboxSetup as o, type SendInput as p, type Session as q, SessionNotFoundError as r, type SessionOptions as s, type SkillSummary as t, type StepUsage as u, type Storage as v, type StorageConfig as w, StorageConflictError as x, StorageError as y, type ToolContext as z };
|