experimental-agent 0.2.3 → 0.4.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 +103 -241
- package/dist/adapter-zgOel4wW.d.mts +256 -0
- package/dist/adapter-zgOel4wW.d.ts +256 -0
- package/dist/chunk-BFFNCESS.mjs +302 -0
- package/dist/chunk-C4VSUEY2.mjs +72 -0
- package/dist/chunk-GKASMIBR.mjs +50 -0
- package/dist/chunk-IV75IMEW.mjs +328 -0
- package/dist/chunk-JO3JDCH5.mjs +107 -0
- package/dist/chunk-MSTM6W3Y.mjs +99 -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-6HYg5qqg.d.mts +36 -0
- package/dist/entry-BrWOmEK2.d.ts +36 -0
- package/dist/index.d.mts +401 -18
- package/dist/index.d.ts +401 -18
- package/dist/index.js +3396 -5500
- package/dist/index.mjs +3511 -1166
- 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 +31 -7
- package/dist/next/loader.mjs +1 -1
- package/dist/next.js +35 -8
- package/dist/next.mjs +6 -3
- 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-BIsP57pm.d.mts +173 -0
- package/dist/steps-DShnXBLf.d.ts +173 -0
- package/dist/storage.d.mts +17 -0
- package/dist/storage.d.ts +17 -0
- package/dist/storage.js +368 -0
- package/dist/storage.mjs +16 -0
- package/dist/vercel-QZ6INPMV.mjs +11 -0
- package/package.json +29 -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
package/dist/sandbox.mjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
vercelSandbox
|
|
3
|
+
} from "./chunk-RT72C52I.mjs";
|
|
4
|
+
import {
|
|
5
|
+
dockerSandbox
|
|
6
|
+
} from "./chunk-BFFNCESS.mjs";
|
|
7
|
+
import {
|
|
8
|
+
localSandbox
|
|
9
|
+
} from "./chunk-ZUFJJYC4.mjs";
|
|
10
|
+
import "./chunk-GKASMIBR.mjs";
|
|
11
|
+
import "./chunk-JO3JDCH5.mjs";
|
|
12
|
+
import "./chunk-MSWINCCM.mjs";
|
|
13
|
+
import "./chunk-BJTO5JO5.mjs";
|
|
14
|
+
export {
|
|
15
|
+
dockerSandbox,
|
|
16
|
+
localSandbox,
|
|
17
|
+
vercelSandbox
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFtdLAogICJzb3VyY2VzQ29udGVudCI6IFtdLAogICJtYXBwaW5ncyI6ICIiLAogICJuYW1lcyI6IFtdCn0K
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import * as _vercel_sandbox from '@vercel/sandbox';
|
|
2
|
+
import { f as Storage, b as Sandbox } from './adapter-zgOel4wW.mjs';
|
|
3
|
+
|
|
4
|
+
type LogLevel = "info" | "warn" | "error" | "silent";
|
|
5
|
+
type LogContext = {
|
|
6
|
+
sessionId?: string;
|
|
7
|
+
messageId?: string;
|
|
8
|
+
sandboxId?: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
type LoggingConfig = {
|
|
12
|
+
level?: LogLevel;
|
|
13
|
+
/**
|
|
14
|
+
* Top-level label for all log lines.
|
|
15
|
+
* @default "agent"
|
|
16
|
+
* @example "my-app" → [my-app:default:workflow]
|
|
17
|
+
*/
|
|
18
|
+
prefix?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
};
|
|
21
|
+
declare class Logger {
|
|
22
|
+
readonly subsystem: string;
|
|
23
|
+
private readonly config;
|
|
24
|
+
private readonly context;
|
|
25
|
+
constructor({ subsystem, config, context, }: {
|
|
26
|
+
subsystem: string;
|
|
27
|
+
config: LoggingConfig;
|
|
28
|
+
context?: LogContext;
|
|
29
|
+
});
|
|
30
|
+
child({ subsystem, context, }: {
|
|
31
|
+
subsystem?: string;
|
|
32
|
+
context?: LogContext;
|
|
33
|
+
}): Logger;
|
|
34
|
+
withContext(context: LogContext): Logger;
|
|
35
|
+
info(message: string, data?: Record<string, unknown>): void;
|
|
36
|
+
warn(message: string, data?: Record<string, unknown>): void;
|
|
37
|
+
error(message: string, data?: Record<string, unknown>): void;
|
|
38
|
+
/**
|
|
39
|
+
* Returns a function that, when called, logs the elapsed time at info level.
|
|
40
|
+
* Pass `logOnStart: true` to also log when the timer begins.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* const done = log.time("sandbox setup", { sandboxId }, { logOnStart: true });
|
|
44
|
+
* await setup();
|
|
45
|
+
* done(); // start: [agent:default:sandbox] sandbox setup { sandboxId: '...' }
|
|
46
|
+
* // end: [agent:default:sandbox] sandbox setup { sandboxId: '...', durationMs: 123 }
|
|
47
|
+
*/
|
|
48
|
+
time(message: string, data?: Record<string, unknown>, opts?: {
|
|
49
|
+
logOnStart?: boolean;
|
|
50
|
+
}): (endData?: Record<string, unknown>) => void;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
type ExecResult = {
|
|
54
|
+
commandId: string;
|
|
55
|
+
logs: () => AsyncIterable<{
|
|
56
|
+
stream: "stdout" | "stderr";
|
|
57
|
+
data: string;
|
|
58
|
+
}>;
|
|
59
|
+
result: Promise<{
|
|
60
|
+
stdout: string;
|
|
61
|
+
stderr: string;
|
|
62
|
+
exitCode: number;
|
|
63
|
+
}>;
|
|
64
|
+
};
|
|
65
|
+
type UploadableFile = {
|
|
66
|
+
path: string;
|
|
67
|
+
content: string | Buffer;
|
|
68
|
+
};
|
|
69
|
+
interface SandboxInstance {
|
|
70
|
+
readonly cwd: string;
|
|
71
|
+
exec(opts: {
|
|
72
|
+
command: string;
|
|
73
|
+
args?: string[];
|
|
74
|
+
cwd?: string;
|
|
75
|
+
env?: Record<string, string>;
|
|
76
|
+
sudo?: boolean;
|
|
77
|
+
signal?: AbortSignal;
|
|
78
|
+
}): Promise<ExecResult>;
|
|
79
|
+
readFile(opts: {
|
|
80
|
+
path: string;
|
|
81
|
+
signal?: AbortSignal;
|
|
82
|
+
}): Promise<Buffer | null>;
|
|
83
|
+
writeFiles(opts: {
|
|
84
|
+
files: UploadableFile[];
|
|
85
|
+
destPath: string;
|
|
86
|
+
signal?: AbortSignal;
|
|
87
|
+
}): Promise<void>;
|
|
88
|
+
getDomain(opts: {
|
|
89
|
+
port: number;
|
|
90
|
+
signal?: AbortSignal;
|
|
91
|
+
}): Promise<string>;
|
|
92
|
+
updateNetworkPolicy(opts: {
|
|
93
|
+
policy: _vercel_sandbox.NetworkPolicy;
|
|
94
|
+
signal?: AbortSignal;
|
|
95
|
+
}): Promise<_vercel_sandbox.NetworkPolicy>;
|
|
96
|
+
start(opts?: {
|
|
97
|
+
signal?: AbortSignal;
|
|
98
|
+
}): Promise<void>;
|
|
99
|
+
stop(opts?: {
|
|
100
|
+
signal?: AbortSignal;
|
|
101
|
+
}): Promise<void>;
|
|
102
|
+
snapshot(opts?: {
|
|
103
|
+
signal?: AbortSignal;
|
|
104
|
+
}): Promise<{
|
|
105
|
+
snapshotId: string;
|
|
106
|
+
}>;
|
|
107
|
+
kill(opts: {
|
|
108
|
+
commandId: string;
|
|
109
|
+
signal?: AbortSignal;
|
|
110
|
+
}): Promise<void>;
|
|
111
|
+
getStatus(opts?: {
|
|
112
|
+
signal?: AbortSignal;
|
|
113
|
+
}): Promise<"pending" | "running" | "stopping" | "stopped" | "failed">;
|
|
114
|
+
}
|
|
115
|
+
type SandboxAgentRef = {
|
|
116
|
+
name: string;
|
|
117
|
+
storage: Storage;
|
|
118
|
+
options: {
|
|
119
|
+
logging?: Omit<LoggingConfig, "name">;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
type WithConfig<TConfig> = unknown extends TConfig ? {
|
|
123
|
+
config?: Record<string, unknown>;
|
|
124
|
+
} : Partial<TConfig> extends TConfig ? {
|
|
125
|
+
config?: TConfig;
|
|
126
|
+
} : {
|
|
127
|
+
config: TConfig;
|
|
128
|
+
};
|
|
129
|
+
type SandboxSetupFields = Omit<Sandbox["setup"], "binding" | "completedAt">;
|
|
130
|
+
type SandboxBinding<TType extends string = string, TConfig = any, TMetadata = any> = {
|
|
131
|
+
type: TType;
|
|
132
|
+
create(opts: {
|
|
133
|
+
cwd: string;
|
|
134
|
+
agent: SandboxAgentRef;
|
|
135
|
+
setup: SandboxSetupFields & {
|
|
136
|
+
run?: (sandbox: SandboxInstance) => Promise<void>;
|
|
137
|
+
} & WithConfig<TConfig>;
|
|
138
|
+
record?: Sandbox;
|
|
139
|
+
signal?: AbortSignal;
|
|
140
|
+
log: Logger;
|
|
141
|
+
}): Promise<{
|
|
142
|
+
instance: SandboxInstance;
|
|
143
|
+
metadata: TMetadata;
|
|
144
|
+
}>;
|
|
145
|
+
connect(opts: {
|
|
146
|
+
agent: SandboxAgentRef;
|
|
147
|
+
metadata: TMetadata;
|
|
148
|
+
signal?: AbortSignal;
|
|
149
|
+
log: Logger;
|
|
150
|
+
}): Promise<SandboxInstance>;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
type LifecycleStepResult = {
|
|
154
|
+
action: "continue";
|
|
155
|
+
nextPollMs: number;
|
|
156
|
+
} | {
|
|
157
|
+
action: "exit";
|
|
158
|
+
reason: "sandboxId_changed" | "idle" | "timeout" | "not_found";
|
|
159
|
+
};
|
|
160
|
+
type LifecycleConfig = {
|
|
161
|
+
pollIntervalMs?: number;
|
|
162
|
+
stopAfterInactiveMs?: number;
|
|
163
|
+
snapshotBeforeTimeoutMs?: number;
|
|
164
|
+
};
|
|
165
|
+
type LifecycleInput = {
|
|
166
|
+
agent: SandboxAgentRef;
|
|
167
|
+
sandboxId: string;
|
|
168
|
+
vercelSandboxId: string;
|
|
169
|
+
config?: LifecycleConfig;
|
|
170
|
+
};
|
|
171
|
+
declare function checkAndSnapshotStep(input: LifecycleInput): Promise<Error | LifecycleStepResult>;
|
|
172
|
+
|
|
173
|
+
export { type ExecResult as E, type LifecycleInput as L, type SandboxBinding as S, type UploadableFile as U, type WithConfig as W, type SandboxSetupFields as a, type SandboxInstance as b, type LoggingConfig as c, type SandboxAgentRef as d, type LifecycleConfig as e, type LifecycleStepResult as f, checkAndSnapshotStep as g };
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import * as _vercel_sandbox from '@vercel/sandbox';
|
|
2
|
+
import { f as Storage, b as Sandbox } from './adapter-zgOel4wW.js';
|
|
3
|
+
|
|
4
|
+
type LogLevel = "info" | "warn" | "error" | "silent";
|
|
5
|
+
type LogContext = {
|
|
6
|
+
sessionId?: string;
|
|
7
|
+
messageId?: string;
|
|
8
|
+
sandboxId?: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
type LoggingConfig = {
|
|
12
|
+
level?: LogLevel;
|
|
13
|
+
/**
|
|
14
|
+
* Top-level label for all log lines.
|
|
15
|
+
* @default "agent"
|
|
16
|
+
* @example "my-app" → [my-app:default:workflow]
|
|
17
|
+
*/
|
|
18
|
+
prefix?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
};
|
|
21
|
+
declare class Logger {
|
|
22
|
+
readonly subsystem: string;
|
|
23
|
+
private readonly config;
|
|
24
|
+
private readonly context;
|
|
25
|
+
constructor({ subsystem, config, context, }: {
|
|
26
|
+
subsystem: string;
|
|
27
|
+
config: LoggingConfig;
|
|
28
|
+
context?: LogContext;
|
|
29
|
+
});
|
|
30
|
+
child({ subsystem, context, }: {
|
|
31
|
+
subsystem?: string;
|
|
32
|
+
context?: LogContext;
|
|
33
|
+
}): Logger;
|
|
34
|
+
withContext(context: LogContext): Logger;
|
|
35
|
+
info(message: string, data?: Record<string, unknown>): void;
|
|
36
|
+
warn(message: string, data?: Record<string, unknown>): void;
|
|
37
|
+
error(message: string, data?: Record<string, unknown>): void;
|
|
38
|
+
/**
|
|
39
|
+
* Returns a function that, when called, logs the elapsed time at info level.
|
|
40
|
+
* Pass `logOnStart: true` to also log when the timer begins.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* const done = log.time("sandbox setup", { sandboxId }, { logOnStart: true });
|
|
44
|
+
* await setup();
|
|
45
|
+
* done(); // start: [agent:default:sandbox] sandbox setup { sandboxId: '...' }
|
|
46
|
+
* // end: [agent:default:sandbox] sandbox setup { sandboxId: '...', durationMs: 123 }
|
|
47
|
+
*/
|
|
48
|
+
time(message: string, data?: Record<string, unknown>, opts?: {
|
|
49
|
+
logOnStart?: boolean;
|
|
50
|
+
}): (endData?: Record<string, unknown>) => void;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
type ExecResult = {
|
|
54
|
+
commandId: string;
|
|
55
|
+
logs: () => AsyncIterable<{
|
|
56
|
+
stream: "stdout" | "stderr";
|
|
57
|
+
data: string;
|
|
58
|
+
}>;
|
|
59
|
+
result: Promise<{
|
|
60
|
+
stdout: string;
|
|
61
|
+
stderr: string;
|
|
62
|
+
exitCode: number;
|
|
63
|
+
}>;
|
|
64
|
+
};
|
|
65
|
+
type UploadableFile = {
|
|
66
|
+
path: string;
|
|
67
|
+
content: string | Buffer;
|
|
68
|
+
};
|
|
69
|
+
interface SandboxInstance {
|
|
70
|
+
readonly cwd: string;
|
|
71
|
+
exec(opts: {
|
|
72
|
+
command: string;
|
|
73
|
+
args?: string[];
|
|
74
|
+
cwd?: string;
|
|
75
|
+
env?: Record<string, string>;
|
|
76
|
+
sudo?: boolean;
|
|
77
|
+
signal?: AbortSignal;
|
|
78
|
+
}): Promise<ExecResult>;
|
|
79
|
+
readFile(opts: {
|
|
80
|
+
path: string;
|
|
81
|
+
signal?: AbortSignal;
|
|
82
|
+
}): Promise<Buffer | null>;
|
|
83
|
+
writeFiles(opts: {
|
|
84
|
+
files: UploadableFile[];
|
|
85
|
+
destPath: string;
|
|
86
|
+
signal?: AbortSignal;
|
|
87
|
+
}): Promise<void>;
|
|
88
|
+
getDomain(opts: {
|
|
89
|
+
port: number;
|
|
90
|
+
signal?: AbortSignal;
|
|
91
|
+
}): Promise<string>;
|
|
92
|
+
updateNetworkPolicy(opts: {
|
|
93
|
+
policy: _vercel_sandbox.NetworkPolicy;
|
|
94
|
+
signal?: AbortSignal;
|
|
95
|
+
}): Promise<_vercel_sandbox.NetworkPolicy>;
|
|
96
|
+
start(opts?: {
|
|
97
|
+
signal?: AbortSignal;
|
|
98
|
+
}): Promise<void>;
|
|
99
|
+
stop(opts?: {
|
|
100
|
+
signal?: AbortSignal;
|
|
101
|
+
}): Promise<void>;
|
|
102
|
+
snapshot(opts?: {
|
|
103
|
+
signal?: AbortSignal;
|
|
104
|
+
}): Promise<{
|
|
105
|
+
snapshotId: string;
|
|
106
|
+
}>;
|
|
107
|
+
kill(opts: {
|
|
108
|
+
commandId: string;
|
|
109
|
+
signal?: AbortSignal;
|
|
110
|
+
}): Promise<void>;
|
|
111
|
+
getStatus(opts?: {
|
|
112
|
+
signal?: AbortSignal;
|
|
113
|
+
}): Promise<"pending" | "running" | "stopping" | "stopped" | "failed">;
|
|
114
|
+
}
|
|
115
|
+
type SandboxAgentRef = {
|
|
116
|
+
name: string;
|
|
117
|
+
storage: Storage;
|
|
118
|
+
options: {
|
|
119
|
+
logging?: Omit<LoggingConfig, "name">;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
type WithConfig<TConfig> = unknown extends TConfig ? {
|
|
123
|
+
config?: Record<string, unknown>;
|
|
124
|
+
} : Partial<TConfig> extends TConfig ? {
|
|
125
|
+
config?: TConfig;
|
|
126
|
+
} : {
|
|
127
|
+
config: TConfig;
|
|
128
|
+
};
|
|
129
|
+
type SandboxSetupFields = Omit<Sandbox["setup"], "binding" | "completedAt">;
|
|
130
|
+
type SandboxBinding<TType extends string = string, TConfig = any, TMetadata = any> = {
|
|
131
|
+
type: TType;
|
|
132
|
+
create(opts: {
|
|
133
|
+
cwd: string;
|
|
134
|
+
agent: SandboxAgentRef;
|
|
135
|
+
setup: SandboxSetupFields & {
|
|
136
|
+
run?: (sandbox: SandboxInstance) => Promise<void>;
|
|
137
|
+
} & WithConfig<TConfig>;
|
|
138
|
+
record?: Sandbox;
|
|
139
|
+
signal?: AbortSignal;
|
|
140
|
+
log: Logger;
|
|
141
|
+
}): Promise<{
|
|
142
|
+
instance: SandboxInstance;
|
|
143
|
+
metadata: TMetadata;
|
|
144
|
+
}>;
|
|
145
|
+
connect(opts: {
|
|
146
|
+
agent: SandboxAgentRef;
|
|
147
|
+
metadata: TMetadata;
|
|
148
|
+
signal?: AbortSignal;
|
|
149
|
+
log: Logger;
|
|
150
|
+
}): Promise<SandboxInstance>;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
type LifecycleStepResult = {
|
|
154
|
+
action: "continue";
|
|
155
|
+
nextPollMs: number;
|
|
156
|
+
} | {
|
|
157
|
+
action: "exit";
|
|
158
|
+
reason: "sandboxId_changed" | "idle" | "timeout" | "not_found";
|
|
159
|
+
};
|
|
160
|
+
type LifecycleConfig = {
|
|
161
|
+
pollIntervalMs?: number;
|
|
162
|
+
stopAfterInactiveMs?: number;
|
|
163
|
+
snapshotBeforeTimeoutMs?: number;
|
|
164
|
+
};
|
|
165
|
+
type LifecycleInput = {
|
|
166
|
+
agent: SandboxAgentRef;
|
|
167
|
+
sandboxId: string;
|
|
168
|
+
vercelSandboxId: string;
|
|
169
|
+
config?: LifecycleConfig;
|
|
170
|
+
};
|
|
171
|
+
declare function checkAndSnapshotStep(input: LifecycleInput): Promise<Error | LifecycleStepResult>;
|
|
172
|
+
|
|
173
|
+
export { type ExecResult as E, type LifecycleInput as L, type SandboxBinding as S, type UploadableFile as U, type WithConfig as W, type SandboxSetupFields as a, type SandboxInstance as b, type LoggingConfig as c, type SandboxAgentRef as d, type LifecycleConfig as e, type LifecycleStepResult as f, checkAndSnapshotStep as g };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { S as StorageHandlers } from './adapter-zgOel4wW.mjs';
|
|
2
|
+
export { G as GenerationOptions, M as Message, a as MessageUsage, P as Part, b as Sandbox, c as Session, d as Setup, e as SetupSnapshot, f as Storage, g as StorageCall, h as StorageStep, i as StorageStepFunction, t as toStorage } from './adapter-zgOel4wW.mjs';
|
|
3
|
+
import '@workflow/serde';
|
|
4
|
+
import '@vercel/sandbox';
|
|
5
|
+
import 'ai';
|
|
6
|
+
|
|
7
|
+
declare function kvStorageFallback(opts: {
|
|
8
|
+
prefix: string;
|
|
9
|
+
}): StorageHandlers;
|
|
10
|
+
|
|
11
|
+
declare function localStorage(opts?: {
|
|
12
|
+
dir?: string;
|
|
13
|
+
}): StorageHandlers;
|
|
14
|
+
|
|
15
|
+
declare function shouldFallbackToKV2(): boolean;
|
|
16
|
+
|
|
17
|
+
export { StorageHandlers, kvStorageFallback, localStorage, shouldFallbackToKV2 };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { S as StorageHandlers } from './adapter-zgOel4wW.js';
|
|
2
|
+
export { G as GenerationOptions, M as Message, a as MessageUsage, P as Part, b as Sandbox, c as Session, d as Setup, e as SetupSnapshot, f as Storage, g as StorageCall, h as StorageStep, i as StorageStepFunction, t as toStorage } from './adapter-zgOel4wW.js';
|
|
3
|
+
import '@workflow/serde';
|
|
4
|
+
import '@vercel/sandbox';
|
|
5
|
+
import 'ai';
|
|
6
|
+
|
|
7
|
+
declare function kvStorageFallback(opts: {
|
|
8
|
+
prefix: string;
|
|
9
|
+
}): StorageHandlers;
|
|
10
|
+
|
|
11
|
+
declare function localStorage(opts?: {
|
|
12
|
+
dir?: string;
|
|
13
|
+
}): StorageHandlers;
|
|
14
|
+
|
|
15
|
+
declare function shouldFallbackToKV2(): boolean;
|
|
16
|
+
|
|
17
|
+
export { StorageHandlers, kvStorageFallback, localStorage, shouldFallbackToKV2 };
|