@ai-sdk/sandbox-vercel 1.0.132 → 1.0.134

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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # @ai-sdk/sandbox-vercel
2
2
 
3
+ ## 1.0.134
4
+
5
+ ### Patch Changes
6
+
7
+ - ede5b89: chore: migrate package builds from tsup to tsdown
8
+ - Updated dependencies [ede5b89]
9
+ - @ai-sdk/harness@1.0.134
10
+ - @ai-sdk/provider-utils@5.0.52
11
+
12
+ ## 1.0.133
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [b2049fa]
17
+ - Updated dependencies [11f0e71]
18
+ - Updated dependencies [2b9195b]
19
+ - Updated dependencies [446725d]
20
+ - @ai-sdk/harness@1.0.133
21
+
3
22
  ## 1.0.132
4
23
 
5
24
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { HarnessV1SandboxProvider, HarnessV1NetworkSandboxSession, HarnessV1SandboxSessionCreateOptions, HarnessV1SandboxSessionResumeOptions } from '@ai-sdk/harness';
2
- import { Experimental_SandboxSession } from '@ai-sdk/provider-utils';
3
- import { Sandbox } from '@vercel/sandbox';
4
-
1
+ import { Sandbox } from "@vercel/sandbox";
2
+ import { HarnessV1NetworkSandboxSession, HarnessV1SandboxProvider, HarnessV1SandboxSessionCreateOptions, HarnessV1SandboxSessionResumeOptions } from "@ai-sdk/harness";
3
+ import { Experimental_SandboxSession } from "@ai-sdk/provider-utils";
4
+ //#region src/vercel-legacy-sandbox-provider.d.ts
5
5
  type VercelSandboxCreateParams$1 = NonNullable<Parameters<typeof Sandbox.create>[0]>;
6
6
  type DistributiveOmit$1<T, K extends keyof any> = T extends unknown ? Omit<T, K> : never;
7
7
  type VercelSandboxCreationSettings$1 = DistributiveOmit$1<VercelSandboxCreateParams$1, 'onResume'> & {
8
- sandbox?: never;
9
- name?: string;
8
+ sandbox?: never;
9
+ name?: string;
10
10
  };
11
11
  /**
12
12
  * Settings for `createVercelSandbox`. Two mutually-exclusive shapes:
@@ -23,10 +23,10 @@ type VercelSandboxCreationSettings$1 = DistributiveOmit$1<VercelSandboxCreatePar
23
23
  * @deprecated Use `VercelNetworkSandboxSessionCreateOptions` for new sessions.
24
24
  */
25
25
  type VercelSandboxSettings = {
26
- sandbox: Sandbox;
26
+ sandbox: Sandbox;
27
27
  } | VercelSandboxCreationSettings$1;
28
28
  /** @deprecated Use `createVercelNetworkSandboxSession` instead. */
29
- declare function createVercelSandbox(settings?: VercelSandboxSettings): HarnessV1SandboxProvider;
29
+ export declare function createVercelSandbox(settings?: VercelSandboxSettings): HarnessV1SandboxProvider;
30
30
  /**
31
31
  * `HarnessV1SandboxProvider` implementation backed by `@vercel/sandbox`.
32
32
  * Construct one via {@link createVercelSandbox} at module scope and pass it
@@ -34,33 +34,32 @@ declare function createVercelSandbox(settings?: VercelSandboxSettings): HarnessV
34
34
  * access to a network sandbox session).
35
35
  */
36
36
  /** @deprecated Use `createVercelNetworkSandboxSession` instead. */
37
- declare class VercelSandboxProvider implements HarnessV1SandboxProvider {
38
- private readonly settings;
39
- readonly specificationVersion: "harness-sandbox-v1";
40
- readonly providerId = "vercel-sandbox";
41
- constructor(settings: VercelSandboxSettings);
42
- createSession: (options?: {
43
- sessionId?: string;
44
- abortSignal?: AbortSignal;
45
- identity?: string;
46
- onFirstCreate?: (session: Experimental_SandboxSession, opts: {
47
- abortSignal?: AbortSignal;
48
- }) => Promise<void>;
49
- }) => Promise<HarnessV1NetworkSandboxSession>;
50
- resumeSession: (options: {
51
- sessionId: string;
52
- abortSignal?: AbortSignal;
53
- }) => Promise<HarnessV1NetworkSandboxSession>;
37
+ export declare class VercelSandboxProvider implements HarnessV1SandboxProvider {
38
+ private readonly settings;
39
+ readonly specificationVersion: "harness-sandbox-v1";
40
+ readonly providerId = "vercel-sandbox";
41
+ constructor(settings: VercelSandboxSettings);
42
+ createSession: (options?: {
43
+ sessionId?: string;
44
+ abortSignal?: AbortSignal;
45
+ identity?: string;
46
+ onFirstCreate?: (session: Experimental_SandboxSession, opts: {
47
+ abortSignal?: AbortSignal;
48
+ }) => Promise<void>;
49
+ }) => Promise<HarnessV1NetworkSandboxSession>;
50
+ resumeSession: (options: {
51
+ sessionId: string;
52
+ abortSignal?: AbortSignal;
53
+ }) => Promise<HarnessV1NetworkSandboxSession>;
54
54
  }
55
-
55
+ //#endregion
56
+ //#region src/utils.d.ts
56
57
  /**
57
58
  * Flattens an intersection of object types into a single object type so the
58
59
  * resolved shape displays as its named properties rather than a chain of
59
60
  * `A & B & C`.
60
61
  */
61
- type Prettify<T> = {
62
- [K in keyof T]: T[K];
63
- } & {};
62
+ type Prettify<T> = { [K in keyof T]: T[K]; } & {};
64
63
  /**
65
64
  * Distributes `Omit` across each member of a union instead of collapsing the
66
65
  * union to its common keys. `Sandbox.create`'s parameter is a union (a
@@ -78,25 +77,26 @@ type DistributiveOmit<T, K extends keyof any> = T extends unknown ? Prettify<Omi
78
77
  * `NetworkPolicy` — is available without us re-declaring it.
79
78
  */
80
79
  type VercelSandboxCreateParams = DistributiveOmit<NonNullable<Parameters<typeof Sandbox.create>[0]>, 'onResume'>;
81
-
80
+ //#endregion
81
+ //#region src/vercel-sandbox.d.ts
82
82
  type VercelNativeSandboxSession = Sandbox;
83
83
  type VercelSandboxCreationSettings = VercelSandboxCreateParams & {
84
- sandbox?: never;
85
- name?: string;
84
+ sandbox?: never;
85
+ name?: string;
86
86
  };
87
87
  type VercelCreationSettings = DistributiveOmit<VercelSandboxCreationSettings, 'sandbox'>;
88
88
  type VercelNetworkSandboxSessionCreateOptions = Prettify<HarnessV1SandboxSessionCreateOptions<VercelCreationSettings> & {
89
- sandbox?: never;
89
+ sandbox?: never;
90
90
  }>;
91
91
  type VercelLookupSettings = DistributiveOmit<NonNullable<Parameters<typeof Sandbox.get>[0]>, 'name' | 'resume'> & {
92
- name?: never;
93
- resume?: never;
92
+ name?: never;
93
+ resume?: never;
94
94
  };
95
95
  type VercelNetworkSandboxSessionResumeOptions = Prettify<HarnessV1SandboxSessionResumeOptions<VercelLookupSettings>>;
96
-
97
- declare function createVercelNetworkSandboxSession(options?: VercelNetworkSandboxSessionCreateOptions): Promise<HarnessV1NetworkSandboxSession>;
98
- declare function resumeVercelNetworkSandboxSession(options: VercelNetworkSandboxSessionResumeOptions): Promise<HarnessV1NetworkSandboxSession>;
99
- declare function createVercelSandboxSessionFromNativeSandbox(nativeSandbox: VercelNativeSandboxSession): Experimental_SandboxSession;
100
- declare function createVercelNetworkSandboxSessionFromNativeSandbox(nativeSandbox: VercelNativeSandboxSession): HarnessV1NetworkSandboxSession;
101
-
102
- export { type VercelNativeSandboxSession, type VercelNetworkSandboxSessionCreateOptions, type VercelNetworkSandboxSessionResumeOptions, VercelSandboxProvider, type VercelSandboxSettings, createVercelNetworkSandboxSession, createVercelNetworkSandboxSessionFromNativeSandbox, createVercelSandbox, createVercelSandboxSessionFromNativeSandbox, resumeVercelNetworkSandboxSession };
96
+ export declare function createVercelNetworkSandboxSession(options?: VercelNetworkSandboxSessionCreateOptions): Promise<HarnessV1NetworkSandboxSession>;
97
+ export declare function resumeVercelNetworkSandboxSession(options: VercelNetworkSandboxSessionResumeOptions): Promise<HarnessV1NetworkSandboxSession>;
98
+ export declare function createVercelSandboxSessionFromNativeSandbox(nativeSandbox: VercelNativeSandboxSession): Experimental_SandboxSession;
99
+ export declare function createVercelNetworkSandboxSessionFromNativeSandbox(nativeSandbox: VercelNativeSandboxSession): HarnessV1NetworkSandboxSession;
100
+ //#endregion
101
+ export type { VercelNativeSandboxSession, VercelNetworkSandboxSessionCreateOptions, VercelNetworkSandboxSessionResumeOptions, VercelSandboxSettings };
102
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":["VercelSandboxCreateParams","DistributiveOmit","VercelSandboxCreationSettings","SandboxSession","SandboxSession"],"sources":["../src/vercel-legacy-sandbox-provider.ts","../src/utils.ts","../src/vercel-sandbox.ts"],"mappings":";;;;KAkBKA,8BAA4B,YAC/B,kBAAkB,QAAQ;KAGvBC,mBAAiB,GAAG,uBAAuB,oBAC5C,KAAK,GAAG;KAGPC,kCAAgCD,mBACnCD;EAGA;EACA;;;;;;;;;;;;;;;;KAiBU;EACN,SAAS;IACXE;;wBASY,oBACd,WAAU,wBACT;;;;;;;;qBAcU,iCAAiC;mBAIf;WAHpB;WACA;EAEoB,YAAA,UAAU;EAMvC,gBAAuB;IACrB;IACA,cAAc;IACd;IACA,iBACE,SAASC,6BACT;MAAQ,cAAc;UACnB;QACH,QAAQ;EAqFZ,gBAAuB;IACrB;IACA,cAAc;QACZ,QAAQ;;;;;;;;;KC7KF,SAAS,QAAQ,WAAW,IAAI,EAAE;;;;;;;;;;KAWlC,iBAAiB,GAAG,uBAAuB,oBACnD,SAAS,KAAK,GAAG;;;;;;;KAST,4BAA4B,iBACtC,YAAY,kBAAkB,QAAQ;;;KCT5B,6BAA6B;KAEpC,gCAAgC;EACnC;EACA;;KAGG,yBAAyB,iBAC5B;KAGU,2CAA2C,SACrD,qCAAqC;EACnC;;KAIC,uBAAuB,iBAC1B,YAAY,kBAAkB,QAAQ;EAGtC;EACA;;KAGU,2CAA2C,SACrD,qCAAqC;wBAcjB,kCACpB,UAAS,2CACR,QAAQ;wBA8EW,kCACpB,SAAS,2CACR,QAAQ;wBAwBK,4CACd,eAAe,6BACdC;wBAIa,mDACd,eAAe,6BACd"}