eve 0.35.0 → 0.37.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/CHANGELOG.md +24 -0
- package/README.md +1 -0
- package/dist/src/cli/commands/agent-instructions.d.ts +4 -4
- package/dist/src/cli/commands/init-confirm.d.ts +12 -0
- package/dist/src/cli/commands/init-confirm.js +1 -0
- package/dist/src/cli/commands/init.d.ts +6 -5
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/run.d.ts +1 -0
- package/dist/src/cli/run.js +3 -3
- package/dist/src/compiled/.vendor-stamp.json +2 -1
- package/dist/src/compiled/@vercel/sandbox/api-client/api-client.d.ts +339 -0
- package/dist/src/compiled/@vercel/sandbox/api-client/index.d.ts +1 -1
- package/dist/src/compiled/@vercel/sandbox/api-client/validators.d.ts +25 -1
- package/dist/src/compiled/@vercel/sandbox/drive.d.ts +140 -0
- package/dist/src/compiled/@vercel/sandbox/index.d.ts +3 -2
- package/dist/src/compiled/@vercel/sandbox/index.js +13 -13
- package/dist/src/compiled/@vercel/sandbox/sandbox.d.ts +55 -18
- package/dist/src/compiled/@vercel/sandbox-stable/LICENSE +201 -0
- package/dist/src/compiled/@vercel/sandbox-stable/_async-retry.d.ts +8 -0
- package/dist/src/compiled/@vercel/sandbox-stable/_workflow-serde.d.ts +5 -0
- package/dist/src/compiled/@vercel/sandbox-stable/api-client/api-client.d.ts +1456 -0
- package/dist/src/compiled/@vercel/sandbox-stable/api-client/api-error.d.ts +29 -0
- package/dist/src/compiled/@vercel/sandbox-stable/api-client/base-client.d.ts +39 -0
- package/dist/src/compiled/@vercel/sandbox-stable/api-client/file-writer.d.ts +66 -0
- package/dist/src/compiled/@vercel/sandbox-stable/api-client/index.d.ts +2 -0
- package/dist/src/compiled/@vercel/sandbox-stable/api-client/validators.d.ts +899 -0
- package/dist/src/compiled/@vercel/sandbox-stable/api-client/with-retry.d.ts +10 -0
- package/dist/src/compiled/@vercel/sandbox-stable/auth/error.d.ts +15 -0
- package/dist/src/compiled/@vercel/sandbox-stable/auth/file.d.ts +18 -0
- package/dist/src/compiled/@vercel/sandbox-stable/auth/index.d.ts +6 -0
- package/dist/src/compiled/@vercel/sandbox-stable/auth/oauth.d.ts +111 -0
- package/dist/src/compiled/@vercel/sandbox-stable/auth/poll-for-token.d.ts +28 -0
- package/dist/src/compiled/@vercel/sandbox-stable/auth/project.d.ts +40 -0
- package/dist/src/compiled/@vercel/sandbox-stable/command.d.ts +292 -0
- package/dist/src/compiled/@vercel/sandbox-stable/constants.d.ts +5 -0
- package/dist/src/compiled/@vercel/sandbox-stable/execution-context.d.ts +116 -0
- package/dist/src/compiled/@vercel/sandbox-stable/filesystem.d.ts +258 -0
- package/dist/src/compiled/@vercel/sandbox-stable/index.d.ts +12 -0
- package/dist/src/compiled/@vercel/sandbox-stable/index.js +1 -0
- package/dist/src/compiled/@vercel/sandbox-stable/network-policy.d.ts +169 -0
- package/dist/src/compiled/@vercel/sandbox-stable/proxy.d.ts +55 -0
- package/dist/src/compiled/@vercel/sandbox-stable/sandbox-user.d.ts +212 -0
- package/dist/src/compiled/@vercel/sandbox-stable/sandbox.d.ts +1216 -0
- package/dist/src/compiled/@vercel/sandbox-stable/session.d.ts +433 -0
- package/dist/src/compiled/@vercel/sandbox-stable/snapshot.d.ts +229 -0
- package/dist/src/compiled/@vercel/sandbox-stable/utils/get-credentials.d.ts +21 -0
- package/dist/src/compiled/@vercel/sandbox-stable/utils/paginator.d.ts +16 -0
- package/dist/src/compiled/@vercel/sandbox-stable/utils/resolveSignal.d.ts +15 -0
- package/dist/src/compiled/@vercel/sandbox-stable/utils/sandbox-snapshot.d.ts +11 -0
- package/dist/src/compiled/@vercel/sandbox-stable/utils/types.d.ts +11 -0
- package/dist/src/compiled/_chunks/node/{auth-BS3UoyvT.js → auth-BaNbsImr.js} +1 -1
- package/dist/src/compiled/_chunks/node/version-BYHw-SDY.js +1 -0
- package/dist/src/evals/context.js +1 -1
- package/dist/src/evals/session.d.ts +1 -0
- package/dist/src/evals/session.js +1 -1
- package/dist/src/evals/types.d.ts +2 -0
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +2 -1
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
- package/dist/src/harness/approval-delivery-coordinator.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/packages/eve-catalog/src/index.js +1 -1
- package/dist/src/public/nuxt/module.js +1 -1
- package/dist/src/public/sandbox/backends/vercel.d.ts +5 -4
- package/dist/src/public/sandbox/backends/vercel.js +1 -1
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +25 -1
- package/dist/src/public/sandbox/vercel.d.ts +2 -1
- package/dist/src/public/sandbox/vercel.js +1 -1
- package/dist/src/public/sveltekit/index.d.ts +6 -20
- package/dist/src/public/sveltekit/index.js +1 -1
- package/dist/src/public/sveltekit/routing.d.ts +0 -24
- package/dist/src/public/sveltekit/routing.js +1 -1
- package/dist/src/setup/boxes/select-model.d.ts +6 -6
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/create/web-template.d.ts +1 -1
- package/dist/src/setup/scaffold/create/web-template.js +0 -1
- package/dist/src/shared/default-agent-model.d.ts +1 -1
- package/dist/src/shared/default-agent-model.js +1 -1
- package/dist/src/shared/sandbox-network-policy.d.ts +1 -1
- package/dist/src/{public/nuxt → shared}/vercel-services.d.ts +18 -19
- package/dist/src/shared/vercel-services.js +1 -0
- package/docs/agent-config.md +4 -1
- package/docs/channels/custom.mdx +1 -1
- package/docs/concepts/sessions-runs-and-streaming.md +1 -1
- package/docs/getting-started.mdx +1 -1
- package/docs/guides/client/messages.mdx +3 -1
- package/docs/guides/dynamic-capabilities.md +38 -0
- package/docs/guides/frontend/sveltekit.mdx +22 -1
- package/docs/reference/cli.md +15 -11
- package/docs/sandbox.mdx +8 -0
- package/package.json +2 -1
- package/dist/src/compiled/_chunks/node/version-Cztrk7z6.js +0 -1
- package/dist/src/public/nuxt/vercel-services.js +0 -1
- package/dist/src/public/sveltekit/vercel-json.d.ts +0 -17
- package/dist/src/public/sveltekit/vercel-json.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Command, CommandData, CommandFinishedData, CommandFinishedResponse, CommandResponse, CreateSnapshotResponse, InteractiveSessionResponse, LogError, LogLine, LogLineData, LogOutputLine, Sandbox, SandboxMetaData, SandboxRoute, SandboxRouteData, Session, SessionMetaData, SessionResponse, Snapshot, SnapshotMetadata, SnapshotResponse, SnapshotTreeNode, SnapshotTreeNodeData, StopSessionResponse } from "./validators.js";
|
|
1
|
+
import { Command, CommandData, CommandFinishedData, CommandFinishedResponse, CommandResponse, CreateSnapshotResponse, Drive, DriveMetadata, InteractiveSessionResponse, LogError, LogLine, LogLineData, LogOutputLine, Sandbox, SandboxMetaData, SandboxRoute, SandboxRouteData, Session, SessionMetaData, SessionResponse, Snapshot, SnapshotMetadata, SnapshotResponse, SnapshotTreeNode, SnapshotTreeNodeData, StopSessionResponse } from "./validators.js";
|
|
2
2
|
import { APIClient } from "./api-client.js";
|
|
@@ -517,6 +517,16 @@ declare const SnapshotResponse: z.ZodObject<{
|
|
|
517
517
|
parentId: z.ZodOptional<z.ZodString>;
|
|
518
518
|
}, z.core.$strip>;
|
|
519
519
|
}, z.core.$strip>;
|
|
520
|
+
declare const Drive: z.ZodObject<{
|
|
521
|
+
name: z.ZodString;
|
|
522
|
+
projectId: z.ZodString;
|
|
523
|
+
maxSizeBytes: z.ZodNumber;
|
|
524
|
+
currentSessionId: z.ZodOptional<z.ZodString>;
|
|
525
|
+
currentSandboxName: z.ZodOptional<z.ZodString>;
|
|
526
|
+
createdAt: z.ZodNumber;
|
|
527
|
+
updatedAt: z.ZodNumber;
|
|
528
|
+
}, z.core.$strip>;
|
|
529
|
+
type DriveMetadata = z.infer<typeof Drive>;
|
|
520
530
|
declare const Sandbox: z.ZodObject<{
|
|
521
531
|
name: z.ZodString;
|
|
522
532
|
persistent: z.ZodBoolean;
|
|
@@ -630,6 +640,13 @@ declare const Sandbox: z.ZodObject<{
|
|
|
630
640
|
statusUpdatedAt: z.ZodOptional<z.ZodNumber>;
|
|
631
641
|
cwd: z.ZodOptional<z.ZodString>;
|
|
632
642
|
tags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
643
|
+
mounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
644
|
+
drive: z.ZodString;
|
|
645
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
646
|
+
"read-only": "read-only";
|
|
647
|
+
"read-write": "read-write";
|
|
648
|
+
}>>;
|
|
649
|
+
}, z.core.$strip>>>;
|
|
633
650
|
snapshotExpiration: z.ZodOptional<z.ZodNumber>;
|
|
634
651
|
keepLastSnapshots: z.ZodOptional<z.ZodObject<{
|
|
635
652
|
count: z.ZodNumber;
|
|
@@ -869,6 +886,13 @@ declare const StopSessionResponse: z.ZodObject<{
|
|
|
869
886
|
statusUpdatedAt: z.ZodOptional<z.ZodNumber>;
|
|
870
887
|
cwd: z.ZodOptional<z.ZodString>;
|
|
871
888
|
tags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
889
|
+
mounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
890
|
+
drive: z.ZodString;
|
|
891
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
892
|
+
"read-only": "read-only";
|
|
893
|
+
"read-write": "read-write";
|
|
894
|
+
}>>;
|
|
895
|
+
}, z.core.$strip>>>;
|
|
872
896
|
snapshotExpiration: z.ZodOptional<z.ZodNumber>;
|
|
873
897
|
keepLastSnapshots: z.ZodOptional<z.ZodObject<{
|
|
874
898
|
count: z.ZodNumber;
|
|
@@ -895,5 +919,5 @@ declare const StopSessionResponse: z.ZodObject<{
|
|
|
895
919
|
}, z.core.$strip>>;
|
|
896
920
|
}, z.core.$strip>;
|
|
897
921
|
//#endregion
|
|
898
|
-
export { Command, CommandData, CommandFinishedData, CommandFinishedResponse, CommandResponse, CreateSnapshotResponse, InteractiveSessionResponse, LogError, LogLine, LogLineData, LogOutputLine, Sandbox, SandboxMetaData, SandboxRoute, SandboxRouteData, Session, SessionMetaData, SessionResponse, Snapshot, SnapshotMetadata, SnapshotResponse, SnapshotTreeNode, SnapshotTreeNodeData, StopSessionResponse };
|
|
922
|
+
export { Command, CommandData, CommandFinishedData, CommandFinishedResponse, CommandResponse, CreateSnapshotResponse, Drive, DriveMetadata, InteractiveSessionResponse, LogError, LogLine, LogLineData, LogOutputLine, Sandbox, SandboxMetaData, SandboxRoute, SandboxRouteData, Session, SessionMetaData, SessionResponse, Snapshot, SnapshotMetadata, SnapshotResponse, SnapshotTreeNode, SnapshotTreeNodeData, StopSessionResponse };
|
|
899
923
|
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { Paginator } from "./utils/paginator.js";
|
|
2
|
+
import { DriveMetadata } from "./api-client/validators.js";
|
|
3
|
+
import { APIClient, WithFetchOptions } from "./api-client/api-client.js";
|
|
4
|
+
import "./api-client/index.js";
|
|
5
|
+
import { Credentials } from "./utils/get-credentials.js";
|
|
6
|
+
import { WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE } from "./_workflow-serde.js";
|
|
7
|
+
|
|
8
|
+
//#region src/drive.d.ts
|
|
9
|
+
interface SerializedDrive {
|
|
10
|
+
drive: DriveMetadata;
|
|
11
|
+
projectId?: string;
|
|
12
|
+
}
|
|
13
|
+
/** @inline */
|
|
14
|
+
interface GetOrCreateDriveParams {
|
|
15
|
+
/**
|
|
16
|
+
* The name of the drive to get or create. Must be unique within the project.
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* Maximum drive size in bytes. If omitted, a default of 100 GiB is used.
|
|
21
|
+
*/
|
|
22
|
+
maxSize?: number;
|
|
23
|
+
/**
|
|
24
|
+
* An AbortSignal to cancel the operation.
|
|
25
|
+
*/
|
|
26
|
+
signal?: AbortSignal;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A Drive is a persistent, bottomless storage that can be attached and detached to Sandboxes.
|
|
30
|
+
* Drives can be mounted as read-write or read-only, at a configurable path with `Sandbox.create()`.
|
|
31
|
+
*
|
|
32
|
+
* Use {@link Drive.getOrCreate} to construct.
|
|
33
|
+
* @hideconstructor
|
|
34
|
+
*/
|
|
35
|
+
declare class Drive {
|
|
36
|
+
private _client;
|
|
37
|
+
private drive;
|
|
38
|
+
private readonly _projectId;
|
|
39
|
+
/**
|
|
40
|
+
* Lazily resolve credentials and construct an API client.
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
private ensureClient;
|
|
44
|
+
/**
|
|
45
|
+
* The name of the drive.
|
|
46
|
+
*/
|
|
47
|
+
get name(): string;
|
|
48
|
+
/**
|
|
49
|
+
* The project ID that owns the drive.
|
|
50
|
+
*/
|
|
51
|
+
get projectId(): string;
|
|
52
|
+
/**
|
|
53
|
+
* The maximum drive size in bytes.
|
|
54
|
+
*/
|
|
55
|
+
get maxSize(): number;
|
|
56
|
+
/**
|
|
57
|
+
* Current session ID the drive is attached to, if any.
|
|
58
|
+
*/
|
|
59
|
+
get currentSessionId(): string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Current sandbox name the drive is attached to, if any.
|
|
62
|
+
*/
|
|
63
|
+
get currentSandboxName(): string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Timestamp when the drive was created.
|
|
66
|
+
*/
|
|
67
|
+
get createdAt(): Date;
|
|
68
|
+
/**
|
|
69
|
+
* Timestamp when the drive was last updated.
|
|
70
|
+
*/
|
|
71
|
+
get updatedAt(): Date;
|
|
72
|
+
/**
|
|
73
|
+
* Serialize a Drive instance to plain data for @workflow/serde.
|
|
74
|
+
*
|
|
75
|
+
* @param instance - The Drive instance to serialize
|
|
76
|
+
* @returns A plain object containing drive metadata
|
|
77
|
+
*/
|
|
78
|
+
static [WORKFLOW_SERIALIZE](instance: Drive): SerializedDrive;
|
|
79
|
+
/**
|
|
80
|
+
* Deserialize a Drive from serialized data.
|
|
81
|
+
*
|
|
82
|
+
* The deserialized instance uses the serialized metadata synchronously and
|
|
83
|
+
* lazily creates an API client only when methods perform API requests.
|
|
84
|
+
*
|
|
85
|
+
* @param data - The serialized drive data
|
|
86
|
+
* @returns The reconstructed Drive instance
|
|
87
|
+
*/
|
|
88
|
+
static [WORKFLOW_DESERIALIZE](data: SerializedDrive): Drive;
|
|
89
|
+
constructor({
|
|
90
|
+
client,
|
|
91
|
+
drive,
|
|
92
|
+
projectId
|
|
93
|
+
}: {
|
|
94
|
+
client?: APIClient;
|
|
95
|
+
drive: DriveMetadata;
|
|
96
|
+
projectId?: string;
|
|
97
|
+
});
|
|
98
|
+
/**
|
|
99
|
+
* Allow to get a list of drives for a team narrowed to the given params.
|
|
100
|
+
* It returns both the drives and the pagination metadata to allow getting
|
|
101
|
+
* the next page of results.
|
|
102
|
+
*
|
|
103
|
+
* The returned object is async-iterable to auto-paginate through all pages:
|
|
104
|
+
*
|
|
105
|
+
* ```ts
|
|
106
|
+
* const result = await Drive.list({ limit: 10 });
|
|
107
|
+
* for await (const drive of result) { ... }
|
|
108
|
+
* // or: await result.toArray();
|
|
109
|
+
* // or: for await (const page of result.pages()) { ... }
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
static list(params?: Partial<Parameters<APIClient["listDrives"]>[0]> & Partial<Credentials> & WithFetchOptions): Promise<Paginator<{
|
|
113
|
+
drives: Drive[];
|
|
114
|
+
pagination: {
|
|
115
|
+
count: number;
|
|
116
|
+
next: string | null;
|
|
117
|
+
};
|
|
118
|
+
}, "drives">>;
|
|
119
|
+
/**
|
|
120
|
+
* Retrieve an existing drive, or create a new one if it doesn't exists.
|
|
121
|
+
*
|
|
122
|
+
* @param params - Get/create parameters and optional credentials.
|
|
123
|
+
* @returns A promise resolving to the {@link Drive}.
|
|
124
|
+
*/
|
|
125
|
+
static getOrCreate(params: (GetOrCreateDriveParams | (GetOrCreateDriveParams & Credentials)) & WithFetchOptions): Promise<Drive>;
|
|
126
|
+
/**
|
|
127
|
+
* Delete this drive. The drive must not be attached to any sandbox.
|
|
128
|
+
* This operation is irreversible and will delete all data stored in the drive.
|
|
129
|
+
*
|
|
130
|
+
* @param opts - Optional parameters.
|
|
131
|
+
* @param opts.signal - An AbortSignal to cancel the operation.
|
|
132
|
+
* @returns A promise that resolves once the drive has been deleted.
|
|
133
|
+
*/
|
|
134
|
+
delete(opts?: {
|
|
135
|
+
signal?: AbortSignal;
|
|
136
|
+
}): Promise<void>;
|
|
137
|
+
}
|
|
138
|
+
//#endregion
|
|
139
|
+
export { Drive, SerializedDrive };
|
|
140
|
+
//# sourceMappingURL=drive.d.ts.map
|
|
@@ -7,6 +7,7 @@ import { ExecutionContext } from "./execution-context.js";
|
|
|
7
7
|
import { Session } from "./session.js";
|
|
8
8
|
import { FileSystem } from "./filesystem.js";
|
|
9
9
|
import { SandboxUser, SandboxUserAlreadyExistsError } from "./sandbox-user.js";
|
|
10
|
-
import { Sandbox, SerializedSandbox } from "./sandbox.js";
|
|
10
|
+
import { Sandbox, SandboxMountMode, SandboxMounts, SerializedSandbox } from "./sandbox.js";
|
|
11
|
+
import { Drive, SerializedDrive } from "./drive.js";
|
|
11
12
|
import { InvalidRequestProxyHandler, ProxyHandler, ProxyMeta, defineSandboxProxy } from "./proxy.js";
|
|
12
|
-
export { APIError, Command, CommandFinished, type CommandOutput, type ExecutionContext, FileSystem, type InvalidRequestProxyHandler, type NetworkPolicy, type NetworkPolicyKeyValueMatcher, type NetworkPolicyMatch, type NetworkPolicyMatcher, type NetworkPolicyRule, type NetworkTransformer, type ProxyHandler, type ProxyMeta, Sandbox, SandboxUser, SandboxUserAlreadyExistsError, type SerializedCommand, type SerializedCommandFinished, type SerializedSandbox, type SerializedSnapshot, Session, Snapshot, type SnapshotTreeNodeData, StreamError, defineSandboxProxy };
|
|
13
|
+
export { APIError, Command, CommandFinished, type CommandOutput, Drive, type ExecutionContext, FileSystem, type InvalidRequestProxyHandler, type NetworkPolicy, type NetworkPolicyKeyValueMatcher, type NetworkPolicyMatch, type NetworkPolicyMatcher, type NetworkPolicyRule, type NetworkTransformer, type ProxyHandler, type ProxyMeta, Sandbox, type SandboxMountMode, type SandboxMounts, SandboxUser, SandboxUserAlreadyExistsError, type SerializedCommand, type SerializedCommandFinished, type SerializedDrive, type SerializedSandbox, type SerializedSnapshot, Session, Snapshot, type SnapshotTreeNodeData, StreamError, defineSandboxProxy };
|