@blaxel/core 0.2.86-preview.165 → 0.2.87-dev.173

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.
Files changed (108) hide show
  1. package/README.md +37 -2
  2. package/dist/cjs/.tsbuildinfo +1 -1
  3. package/dist/cjs/authentication/credentials.js +11 -1
  4. package/dist/cjs/authentication/index.js +3 -1
  5. package/dist/cjs/client/sdk.gen.js +63 -12
  6. package/dist/cjs/common/credentials.test.js +71 -0
  7. package/dist/cjs/common/errors.js +15 -0
  8. package/dist/cjs/common/h2fetch.js +101 -50
  9. package/dist/cjs/common/h2pool.js +9 -0
  10. package/dist/cjs/common/pagination.js +87 -0
  11. package/dist/cjs/common/pagination.test.js +62 -0
  12. package/dist/cjs/common/settings.js +41 -3
  13. package/dist/cjs/common/settings.test.js +12 -3
  14. package/dist/cjs/drive/index.js +39 -3
  15. package/dist/cjs/index.js +1 -0
  16. package/dist/cjs/jobs/jobs.js +42 -9
  17. package/dist/cjs/sandbox/client/sdk.gen.js +1 -1
  18. package/dist/cjs/sandbox/preview.js +8 -3
  19. package/dist/cjs/sandbox/sandbox.js +41 -4
  20. package/dist/cjs/types/authentication/credentials.d.ts +9 -0
  21. package/dist/cjs/types/client/sdk.gen.d.ts +34 -19
  22. package/dist/cjs/types/client/types.gen.d.ts +704 -22
  23. package/dist/cjs/types/common/credentials.test.d.ts +1 -0
  24. package/dist/cjs/types/common/errors.d.ts +10 -0
  25. package/dist/cjs/types/common/h2fetch.d.ts +9 -4
  26. package/dist/cjs/types/common/pagination.d.ts +35 -0
  27. package/dist/cjs/types/common/pagination.test.d.ts +1 -0
  28. package/dist/cjs/types/common/settings.d.ts +9 -0
  29. package/dist/cjs/types/drive/index.d.ts +35 -4
  30. package/dist/cjs/types/index.d.ts +1 -0
  31. package/dist/cjs/types/jobs/jobs.d.ts +33 -3
  32. package/dist/cjs/types/sandbox/client/sdk.gen.d.ts +1 -1
  33. package/dist/cjs/types/sandbox/client/types.gen.d.ts +24 -0
  34. package/dist/cjs/types/sandbox/preview.d.ts +2 -2
  35. package/dist/cjs/types/sandbox/sandbox.d.ts +36 -2
  36. package/dist/cjs/types/volume/index.d.ts +37 -4
  37. package/dist/cjs/volume/index.js +41 -3
  38. package/dist/cjs-browser/.tsbuildinfo +1 -1
  39. package/dist/cjs-browser/authentication/credentials.js +11 -1
  40. package/dist/cjs-browser/authentication/index.js +3 -1
  41. package/dist/cjs-browser/client/sdk.gen.js +63 -12
  42. package/dist/cjs-browser/common/credentials.test.js +71 -0
  43. package/dist/cjs-browser/common/errors.js +15 -0
  44. package/dist/cjs-browser/common/pagination.js +87 -0
  45. package/dist/cjs-browser/common/pagination.test.js +62 -0
  46. package/dist/cjs-browser/common/settings.js +41 -3
  47. package/dist/cjs-browser/common/settings.test.js +12 -3
  48. package/dist/cjs-browser/drive/index.js +39 -3
  49. package/dist/cjs-browser/index.js +1 -0
  50. package/dist/cjs-browser/jobs/jobs.js +42 -9
  51. package/dist/cjs-browser/sandbox/client/sdk.gen.js +1 -1
  52. package/dist/cjs-browser/sandbox/preview.js +8 -3
  53. package/dist/cjs-browser/sandbox/sandbox.js +41 -4
  54. package/dist/cjs-browser/types/authentication/credentials.d.ts +9 -0
  55. package/dist/cjs-browser/types/client/sdk.gen.d.ts +34 -19
  56. package/dist/cjs-browser/types/client/types.gen.d.ts +704 -22
  57. package/dist/cjs-browser/types/common/credentials.test.d.ts +1 -0
  58. package/dist/cjs-browser/types/common/errors.d.ts +10 -0
  59. package/dist/cjs-browser/types/common/h2fetch.d.ts +9 -4
  60. package/dist/cjs-browser/types/common/pagination.d.ts +35 -0
  61. package/dist/cjs-browser/types/common/pagination.test.d.ts +1 -0
  62. package/dist/cjs-browser/types/common/settings.d.ts +9 -0
  63. package/dist/cjs-browser/types/drive/index.d.ts +35 -4
  64. package/dist/cjs-browser/types/index.d.ts +1 -0
  65. package/dist/cjs-browser/types/jobs/jobs.d.ts +33 -3
  66. package/dist/cjs-browser/types/sandbox/client/sdk.gen.d.ts +1 -1
  67. package/dist/cjs-browser/types/sandbox/client/types.gen.d.ts +24 -0
  68. package/dist/cjs-browser/types/sandbox/preview.d.ts +2 -2
  69. package/dist/cjs-browser/types/sandbox/sandbox.d.ts +36 -2
  70. package/dist/cjs-browser/types/volume/index.d.ts +37 -4
  71. package/dist/cjs-browser/volume/index.js +41 -3
  72. package/dist/esm/.tsbuildinfo +1 -1
  73. package/dist/esm/authentication/credentials.js +9 -0
  74. package/dist/esm/authentication/index.js +4 -2
  75. package/dist/esm/client/sdk.gen.js +57 -9
  76. package/dist/esm/common/credentials.test.js +69 -0
  77. package/dist/esm/common/errors.js +13 -0
  78. package/dist/esm/common/h2fetch.js +101 -50
  79. package/dist/esm/common/h2pool.js +9 -0
  80. package/dist/esm/common/pagination.js +83 -0
  81. package/dist/esm/common/pagination.test.js +60 -0
  82. package/dist/esm/common/settings.js +41 -3
  83. package/dist/esm/common/settings.test.js +12 -3
  84. package/dist/esm/drive/index.js +39 -3
  85. package/dist/esm/index.js +1 -0
  86. package/dist/esm/jobs/jobs.js +42 -9
  87. package/dist/esm/sandbox/client/sdk.gen.js +1 -1
  88. package/dist/esm/sandbox/preview.js +8 -3
  89. package/dist/esm/sandbox/sandbox.js +41 -4
  90. package/dist/esm/volume/index.js +41 -3
  91. package/dist/esm-browser/.tsbuildinfo +1 -1
  92. package/dist/esm-browser/authentication/credentials.js +9 -0
  93. package/dist/esm-browser/authentication/index.js +4 -2
  94. package/dist/esm-browser/client/sdk.gen.js +57 -9
  95. package/dist/esm-browser/common/credentials.test.js +69 -0
  96. package/dist/esm-browser/common/errors.js +13 -0
  97. package/dist/esm-browser/common/pagination.js +83 -0
  98. package/dist/esm-browser/common/pagination.test.js +60 -0
  99. package/dist/esm-browser/common/settings.js +41 -3
  100. package/dist/esm-browser/common/settings.test.js +12 -3
  101. package/dist/esm-browser/drive/index.js +39 -3
  102. package/dist/esm-browser/index.js +1 -0
  103. package/dist/esm-browser/jobs/jobs.js +42 -9
  104. package/dist/esm-browser/sandbox/client/sdk.gen.js +1 -1
  105. package/dist/esm-browser/sandbox/preview.js +8 -3
  106. package/dist/esm-browser/sandbox/sandbox.js +41 -4
  107. package/dist/esm-browser/volume/index.js +41 -3
  108. package/package.json +1 -1
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const vitest_1 = require("vitest");
4
+ const pagination_js_1 = require("./pagination.js");
5
+ (0, vitest_1.describe)("pagination helpers", () => {
6
+ (0, vitest_1.it)("unwraps legacy array and paginated list responses", () => {
7
+ (0, vitest_1.expect)((0, pagination_js_1.unwrapListData)([{ name: "legacy" }])).toEqual([{ name: "legacy" }]);
8
+ (0, vitest_1.expect)((0, pagination_js_1.unwrapListData)({
9
+ data: [{ name: "paginated" }],
10
+ meta: { hasMore: false },
11
+ })).toEqual([{ name: "paginated" }]);
12
+ });
13
+ (0, vitest_1.it)("returns page data and lets callers request the next page", async () => {
14
+ const cursors = [];
15
+ const fetchPage = async (query) => {
16
+ await Promise.resolve();
17
+ cursors.push(query?.cursor);
18
+ if (!query?.cursor) {
19
+ return {
20
+ data: ["first"],
21
+ meta: { hasMore: true, nextCursor: "next-page" },
22
+ };
23
+ }
24
+ return {
25
+ data: ["second"],
26
+ meta: { hasMore: false },
27
+ };
28
+ };
29
+ const page = await (0, pagination_js_1.createPaginatedList)({
30
+ response: await fetchPage(),
31
+ fetchPage,
32
+ mapItem: (item) => item.toUpperCase(),
33
+ });
34
+ (0, vitest_1.expect)(page.data).toEqual(["FIRST"]);
35
+ (0, vitest_1.expect)(page.hasMore).toBe(true);
36
+ (0, vitest_1.expect)(page.nextCursor).toBe("next-page");
37
+ const nextPage = await page.nextPage();
38
+ (0, vitest_1.expect)(nextPage?.data).toEqual(["SECOND"]);
39
+ (0, vitest_1.expect)(cursors).toEqual([undefined, "next-page"]);
40
+ });
41
+ (0, vitest_1.it)("supports auto paging with an explicit limit", async () => {
42
+ const fetchPage = async (query) => {
43
+ await Promise.resolve();
44
+ if (!query?.cursor) {
45
+ return {
46
+ data: ["first"],
47
+ meta: { hasMore: true, nextCursor: "next-page" },
48
+ };
49
+ }
50
+ return {
51
+ data: ["second"],
52
+ meta: { hasMore: false },
53
+ };
54
+ };
55
+ const page = await (0, pagination_js_1.createPaginatedList)({
56
+ response: await fetchPage(),
57
+ fetchPage,
58
+ mapItem: (item) => item,
59
+ });
60
+ await (0, vitest_1.expect)(page.autoPagingToArray({ limit: 2 })).resolves.toEqual(["first", "second"]);
61
+ });
62
+ });
@@ -7,14 +7,31 @@ exports.settings = void 0;
7
7
  const yaml_1 = __importDefault(require("yaml"));
8
8
  const apikey_js_1 = require("../authentication/apikey.js");
9
9
  const clientcredentials_js_1 = require("../authentication/clientcredentials.js");
10
+ const credentials_js_1 = require("../authentication/credentials.js");
10
11
  const index_js_1 = require("../authentication/index.js");
11
12
  const env_js_1 = require("../common/env.js");
13
+ const errors_js_1 = require("../common/errors.js");
12
14
  const node_js_1 = require("../common/node.js");
15
+ /**
16
+ * Build an actionable "credentials missing" message naming exactly which piece
17
+ * is absent, based on the env vars currently set.
18
+ */
19
+ function missingCredentialsMessage() {
20
+ const hasWorkspace = !!env_js_1.env.BL_WORKSPACE;
21
+ const hasApiKey = !!env_js_1.env.BL_API_KEY;
22
+ if (hasWorkspace && !hasApiKey) {
23
+ return "Blaxel API key is missing. Set the BL_API_KEY environment variable, or run `bl login`, to authenticate (BL_WORKSPACE is already set).";
24
+ }
25
+ if (hasApiKey && !hasWorkspace) {
26
+ return "Blaxel workspace is missing. Set the BL_WORKSPACE environment variable, or run `bl login`, to authenticate (BL_API_KEY is already set).";
27
+ }
28
+ return "No Blaxel credentials found. Set the BL_API_KEY and BL_WORKSPACE environment variables, or run `bl login`.";
29
+ }
13
30
  // Build info - these placeholders are replaced at build time by build:replace-imports
14
- const BUILD_VERSION = "0.2.86-preview.165";
15
- const BUILD_COMMIT = "e53a861ff9a1ab4392f576a45a9ab18a3bdf47fe";
31
+ const BUILD_VERSION = "0.2.87-dev.173";
32
+ const BUILD_COMMIT = "43df206258fd8138bafddefa56333aadab2be731";
16
33
  const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
17
- const BLAXEL_API_VERSION = "2026-04-16";
34
+ const BLAXEL_API_VERSION = "2026-04-28";
18
35
  // Cache for config.yaml tracking value
19
36
  let configTrackingValue = null;
20
37
  let configTrackingLoaded = false;
@@ -173,6 +190,7 @@ class Settings {
173
190
  return env_js_1.env.BL_API_VERSION || BLAXEL_API_VERSION;
174
191
  }
175
192
  get headers() {
193
+ this.assertCredentials();
176
194
  const osArch = getOsArch();
177
195
  return {
178
196
  "x-blaxel-authorization": this.authorization,
@@ -258,7 +276,27 @@ class Settings {
258
276
  }
259
277
  return 0;
260
278
  }
279
+ /**
280
+ * Fail fast with a clear, actionable error when credentials are missing or
281
+ * incomplete, instead of sending empty workspace/authorization headers and
282
+ * surfacing a misleading server-side "workspace is required". Skipped for
283
+ * `forceUrl` sandbox sessions, which carry their own headers and never read
284
+ * `settings.headers`. Leaves `workspace` itself non-throwing so telemetry
285
+ * tagging stays safe.
286
+ */
287
+ assertCredentials() {
288
+ const hasConfigCredentials = !!(this.config.apikey ||
289
+ this.config.apiKey ||
290
+ this.config.clientCredentials);
291
+ if (!hasConfigCredentials && this.credentials instanceof credentials_js_1.MissingCredentials) {
292
+ throw new errors_js_1.CredentialsError(missingCredentialsMessage());
293
+ }
294
+ if (!this.workspace) {
295
+ throw new errors_js_1.CredentialsError("Blaxel workspace is missing. Set the BL_WORKSPACE environment variable, or run `bl login`, to authenticate your requests.");
296
+ }
297
+ }
261
298
  async authenticate() {
299
+ this.assertCredentials();
262
300
  await this.credentials.authenticate();
263
301
  }
264
302
  }
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  const vitest_1 = require("vitest");
37
+ const apikey_js_1 = require("../authentication/apikey.js");
37
38
  const env_js_1 = require("./env.js");
38
39
  (0, vitest_1.describe)('Settings.apiVersion', () => {
39
40
  (0, vitest_1.beforeEach)(() => {
@@ -42,14 +43,22 @@ const env_js_1 = require("./env.js");
42
43
  (0, vitest_1.afterEach)(() => {
43
44
  delete env_js_1.env.BL_API_VERSION;
44
45
  });
45
- (0, vitest_1.it)('defaults to 2026-04-16 when BL_API_VERSION is not set', async () => {
46
+ (0, vitest_1.it)('defaults to 2026-04-28 when BL_API_VERSION is not set', async () => {
46
47
  delete env_js_1.env.BL_API_VERSION;
47
48
  const { settings } = await Promise.resolve().then(() => __importStar(require('./settings.js')));
48
- (0, vitest_1.expect)(settings.apiVersion).toBe('2026-04-16');
49
+ (0, vitest_1.expect)(settings.apiVersion).toBe('2026-04-28');
49
50
  });
50
51
  (0, vitest_1.it)('headers include Blaxel-Version set to the default', async () => {
51
52
  delete env_js_1.env.BL_API_VERSION;
52
53
  const { settings } = await Promise.resolve().then(() => __importStar(require('./settings.js')));
53
- (0, vitest_1.expect)(settings.headers['Blaxel-Version']).toBe('2026-04-16');
54
+ // headers now requires resolvable credentials; run in an authenticated context
55
+ const previous = settings.credentials;
56
+ settings.credentials = new apikey_js_1.ApiKey({ apiKey: 'test-key', workspace: 'test-ws' });
57
+ try {
58
+ (0, vitest_1.expect)(settings.headers['Blaxel-Version']).toBe('2026-04-28');
59
+ }
60
+ finally {
61
+ settings.credentials = previous;
62
+ }
54
63
  });
55
64
  });
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DriveInstance = void 0;
4
4
  const uuid_1 = require("uuid");
5
5
  const index_js_1 = require("../client/index.js");
6
+ const pagination_js_1 = require("../common/pagination.js");
6
7
  const settings_js_1 = require("../common/settings.js");
7
8
  class DriveInstance {
8
9
  drive;
@@ -86,9 +87,44 @@ class DriveInstance {
86
87
  });
87
88
  return new DriveInstance(data);
88
89
  }
89
- static async list() {
90
- const { data } = await (0, index_js_1.listDrives)({ throwOnError: true });
91
- return data.map((drive) => new DriveInstance(drive));
90
+ /**
91
+ * List one page of drives.
92
+ *
93
+ * The returned page exposes `data` for the current page, `meta` for cursor
94
+ * metadata, and helpers to fetch more pages only when you need them.
95
+ *
96
+ * @example
97
+ * ```ts
98
+ * const page = await DriveInstance.list({ limit: 50 });
99
+ *
100
+ * for (const drive of page.data) {
101
+ * console.log(drive.name);
102
+ * }
103
+ *
104
+ * const nextPage = await page.nextPage();
105
+ * ```
106
+ *
107
+ * @example
108
+ * ```ts
109
+ * const allDrives = await (await DriveInstance.list()).autoPagingToArray({
110
+ * limit: 1000,
111
+ * });
112
+ * ```
113
+ */
114
+ static async list(query) {
115
+ const fetchPage = async (pageQuery) => {
116
+ const { data } = await (0, index_js_1.listDrives)({
117
+ query: pageQuery,
118
+ throwOnError: true,
119
+ });
120
+ return data;
121
+ };
122
+ return (0, pagination_js_1.createPaginatedList)({
123
+ response: await fetchPage(query),
124
+ fetchPage,
125
+ mapItem: (drive) => new DriveInstance(drive),
126
+ query,
127
+ });
92
128
  }
93
129
  static async delete(driveName) {
94
130
  const { data } = await (0, index_js_1.deleteDrive)({
package/dist/cjs/index.js CHANGED
@@ -23,6 +23,7 @@ __exportStar(require("./common/node.js"), exports);
23
23
  __exportStar(require("./common/errors.js"), exports);
24
24
  __exportStar(require("./common/internal.js"), exports);
25
25
  __exportStar(require("./common/logger.js"), exports);
26
+ __exportStar(require("./common/pagination.js"), exports);
26
27
  __exportStar(require("./common/settings.js"), exports);
27
28
  __exportStar(require("./common/webhook.js"), exports);
28
29
  __exportStar(require("./drive/index.js"), exports);
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.blJob = void 0;
4
4
  const index_js_1 = require("../client/index.js");
5
5
  const logger_js_1 = require("../common/logger.js");
6
+ const pagination_js_1 = require("../common/pagination.js");
6
7
  const settings_js_1 = require("../common/settings.js");
7
8
  const telemetry_js_1 = require("../telemetry/telemetry.js");
8
9
  class BlJob {
@@ -78,18 +79,50 @@ class BlJob {
78
79
  return data;
79
80
  }
80
81
  /**
81
- * List all executions for this job
82
+ * List one page of executions for this job.
83
+ *
84
+ * The returned page exposes `data` for the current page, `meta` for cursor
85
+ * metadata, and helpers to fetch more pages only when you need them.
86
+ *
87
+ * @example
88
+ * ```ts
89
+ * const job = blJob("daily-import");
90
+ * const page = await job.listExecutions({ limit: 50 });
91
+ *
92
+ * for (const execution of page.data) {
93
+ * console.log(execution.status);
94
+ * }
95
+ *
96
+ * const nextPage = await page.nextPage();
97
+ * ```
98
+ *
99
+ * @example
100
+ * ```ts
101
+ * const job = blJob("daily-import");
102
+ * const executions = await (await job.listExecutions()).autoPagingToArray({
103
+ * limit: 1000,
104
+ * });
105
+ * ```
82
106
  */
83
- async listExecutions() {
107
+ async listExecutions(query) {
84
108
  logger_js_1.logger.debug(`Listing executions for job: ${this.jobName}`);
85
- const { data } = await (0, index_js_1.listJobExecutions)({
86
- path: {
87
- jobId: this.jobName,
88
- },
89
- headers: settings_js_1.settings.headers,
90
- throwOnError: true,
109
+ const fetchPage = async (pageQuery) => {
110
+ const { data } = await (0, index_js_1.listJobExecutions)({
111
+ path: {
112
+ jobId: this.jobName,
113
+ },
114
+ query: pageQuery,
115
+ headers: settings_js_1.settings.headers,
116
+ throwOnError: true,
117
+ });
118
+ return data;
119
+ };
120
+ return (0, pagination_js_1.createPaginatedList)({
121
+ response: await fetchPage(query),
122
+ fetchPage,
123
+ mapItem: (execution) => execution,
124
+ query,
91
125
  });
92
- return data ?? [];
93
126
  }
94
127
  /**
95
128
  * Get the status of a specific execution
@@ -92,7 +92,7 @@ const getDrivesMount = (options) => {
92
92
  exports.getDrivesMount = getDrivesMount;
93
93
  /**
94
94
  * Attach a drive to a local path
95
- * Mounts an agent drive using the blfs binary to a local path, optionally mounting a subpath within the drive
95
+ * Mounts an agent drive using the blfs binary to a local path, optionally mounting a subpath within the drive. Supports optional UID/GID mapping to remap file ownership between the local sandbox and the filer (always mapped to filer UID/GID 0). Mapping values can be set per-request via uidMap/gidMap fields, or globally via BLFS_UID_MAP/BLFS_GID_MAP environment variables (request values take precedence).
96
96
  */
97
97
  const postDrivesMount = (options) => {
98
98
  return (options.client ?? client_gen_1.client).post({
@@ -105,24 +105,29 @@ class SandboxPreviews {
105
105
  });
106
106
  return data.map((preview) => new SandboxPreview(preview));
107
107
  }
108
- async create(preview) {
108
+ async create(preview, force) {
109
+ const query = {};
110
+ if (force) {
111
+ query['force'] = 'true';
112
+ }
109
113
  const { data } = await (0, index_js_1.createSandboxPreview)({
110
114
  path: {
111
115
  sandboxName: this.sandboxName,
112
116
  },
117
+ query,
113
118
  body: preview,
114
119
  throwOnError: true,
115
120
  });
116
121
  return new SandboxPreview(data);
117
122
  }
118
- async createIfNotExists(preview) {
123
+ async createIfNotExists(preview, force) {
119
124
  try {
120
125
  const previewInstance = await this.get(preview.metadata.name);
121
126
  return previewInstance;
122
127
  }
123
128
  catch (e) {
124
129
  if (typeof e === "object" && e !== null && "code" in e && e.code === 404) {
125
- return this.create(preview);
130
+ return this.create(preview, force);
126
131
  }
127
132
  throw e;
128
133
  }
@@ -37,6 +37,7 @@ exports.SandboxInstance = void 0;
37
37
  const uuid_1 = require("uuid");
38
38
  const index_js_1 = require("../client/index.js");
39
39
  const logger_js_1 = require("../common/logger.js");
40
+ const pagination_js_1 = require("../common/pagination.js");
40
41
  const settings_js_1 = require("../common/settings.js");
41
42
  const index_js_2 = require("./codegen/index.js");
42
43
  const index_js_3 = require("./drive/index.js");
@@ -255,10 +256,46 @@ class SandboxInstance {
255
256
  const instance = new SandboxInstance(data);
256
257
  return SandboxInstance.attachH2Session(instance);
257
258
  }
258
- static async list() {
259
- const { data } = await (0, index_js_1.listSandboxes)({ throwOnError: true });
260
- const instances = data.map((sandbox) => new SandboxInstance(sandbox));
261
- return Promise.all(instances.map((instance) => SandboxInstance.attachH2Session(instance)));
259
+ /**
260
+ * List one page of sandboxes.
261
+ *
262
+ * The returned page exposes `data` for the current page, `meta` for cursor
263
+ * metadata, and helpers to fetch more pages only when you need them.
264
+ *
265
+ * @example
266
+ * ```ts
267
+ * const page = await SandboxInstance.list({ limit: 50 });
268
+ *
269
+ * for (const sandbox of page.data) {
270
+ * console.log(sandbox.metadata.name);
271
+ * }
272
+ *
273
+ * const nextPage = await page.nextPage();
274
+ * ```
275
+ *
276
+ * @example
277
+ * ```ts
278
+ * const page = await SandboxInstance.list({ limit: 100 });
279
+ *
280
+ * for await (const sandbox of page) {
281
+ * console.log(sandbox.metadata.name);
282
+ * }
283
+ * ```
284
+ */
285
+ static async list(query) {
286
+ const fetchPage = async (pageQuery) => {
287
+ const { data } = await (0, index_js_1.listSandboxes)({
288
+ query: pageQuery,
289
+ throwOnError: true,
290
+ });
291
+ return data;
292
+ };
293
+ return (0, pagination_js_1.createPaginatedList)({
294
+ response: await fetchPage(query),
295
+ fetchPage,
296
+ mapItem: (sandbox) => SandboxInstance.attachH2Session(new SandboxInstance(sandbox)),
297
+ query,
298
+ });
262
299
  }
263
300
  static async delete(sandboxName) {
264
301
  const { data } = await (0, index_js_1.deleteSandbox)({
@@ -4,3 +4,12 @@ export declare class Credentials {
4
4
  get authorization(): string;
5
5
  get token(): string;
6
6
  }
7
+ /**
8
+ * Marker returned by `authentication()` when no usable Blaxel credentials were
9
+ * resolved (no env vars, no matching config workspace). Construction is
10
+ * side-effect free so importing `@blaxel/core` never fails; the actionable
11
+ * error is raised when an authenticated request is actually attempted
12
+ * (see `Settings.assertCredentials`).
13
+ */
14
+ export declare class MissingCredentials extends Credentials {
15
+ }
@@ -1,5 +1,5 @@
1
1
  import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
2
- import type { ListAgentsData, CreateAgentData, DeleteAgentData, GetAgentData, UpdateAgentData, ListAgentRevisionsData, GetConfigurationData, ListCustomDomainsData, CreateCustomDomainData, DeleteCustomDomainData, GetCustomDomainData, UpdateCustomDomainData, VerifyCustomDomainData, ListDrivesData, CreateDriveData, DeleteDriveData, GetDriveData, UpdateDriveData, CreateDriveAccessTokenData, GetDriveJwksData, ListAllEgressGatewaysData, ListAllEgressIpsData, GetWorkspaceFeaturesData, TestFeatureFlagData, ListFunctionsData, CreateFunctionData, DeleteFunctionData, GetFunctionData, UpdateFunctionData, ListFunctionRevisionsData, CleanupImagesData, ListImagesData, CreateImageData, DeleteImageData, GetImageData, ListImageSharesData, ShareImageData, ShareImageResponse, UnshareImageData, DeleteImageTagData, GetIntegrationData, ListIntegrationConnectionsData, CreateIntegrationConnectionData, DeleteIntegrationConnectionData, GetIntegrationConnectionData, UpdateIntegrationConnectionData, GetIntegrationConnectionModelEndpointConfigurationsData, ListIntegrationConnectionModelsData, GetIntegrationConnectionModelData, ListJobsData, CreateJobData, DeleteJobData, GetJobData, UpdateJobData, ListJobExecutionsData, CreateJobExecutionData, DeleteJobExecutionData, GetJobExecutionData, ListJobRevisionsData, ListLocationsData, ListMcpHubDefinitionsData, ListModelsData, CreateModelData, DeleteModelData, GetModelData, UpdateModelData, ListModelRevisionsData, ListPendingImageSharesData, AcceptImageShareData, DeclineImageShareData, ListPoliciesData, CreatePolicyData, DeletePolicyData, GetPolicyData, UpdatePolicyData, ListPublicIpsData, ListSandboxHubDefinitionsData, ListSandboxesData, CreateSandboxData, DeleteSandboxData, GetSandboxData, UpdateSandboxData, ListSandboxPreviewsData, CreateSandboxPreviewData, DeleteSandboxPreviewData, GetSandboxPreviewData, UpdateSandboxPreviewData, ListSandboxPreviewTokensData, CreateSandboxPreviewTokenData, DeleteSandboxPreviewTokenData, GetWorkspaceServiceAccountsData, CreateWorkspaceServiceAccountData, DeleteWorkspaceServiceAccountData, UpdateWorkspaceServiceAccountData, ListApiKeysForServiceAccountData, CreateApiKeyForServiceAccountData, DeleteApiKeyForServiceAccountData, ListTemplatesData, GetTemplateData, ListWorkspaceUsersData, InviteWorkspaceUserData, RemoveWorkspaceUserData, UpdateWorkspaceUserRoleData, ListVolumeTemplatesData, CreateVolumeTemplateData, DeleteVolumeTemplateData, GetVolumeTemplateData, UpdateVolumeTemplateData, DeleteVolumeTemplateVersionData, ListVolumesData, CreateVolumeData, DeleteVolumeData, GetVolumeData, UpdateVolumeData, ListVpcsData, CreateVpcData, DeleteVpcData, GetVpcData, ListEgressGatewaysData, CreateEgressGatewayData, DeleteEgressGatewayData, GetEgressGatewayData, ListEgressIpsData, CreateEgressIpData, DeleteEgressIpData, GetEgressIpData, ListWorkspacesData, CreateWorkspaceData, DeleteWorkspaceData, GetWorkspaceData, UpdateWorkspaceData, DeclineWorkspaceInvitationData, AcceptWorkspaceInvitationData, LeaveWorkspaceData, CheckWorkspaceAvailabilityData } from './types.gen.js';
2
+ import type { ListAgentsData, CreateAgentData, DeleteAgentData, GetAgentData, UpdateAgentData, ListAgentRevisionsData, GetConfigurationData, ListCustomDomainsData, CreateCustomDomainData, DeleteCustomDomainData, GetCustomDomainData, UpdateCustomDomainData, VerifyCustomDomainData, ListDrivesData, CreateDriveData, DeleteDriveData, GetDriveData, UpdateDriveData, CreateDriveAccessTokenData, GetDriveJwksData, ListAllEgressGatewaysData, GetEgressGatewayUsageData, ListAllEgressIpsData, GetWorkspaceFeaturesData, TestFeatureFlagData, ListFunctionsData, CreateFunctionData, DeleteFunctionData, GetFunctionData, UpdateFunctionData, ListFunctionRevisionsData, CleanupImagesData, ListImagesData, CreateImageData, DeleteImageData, GetImageData, ListImageSharesData, ShareImageData, ShareImageResponse, UnshareImageData, DeleteImageTagData, GetIntegrationData, ListIntegrationConnectionsData, CreateIntegrationConnectionData, DeleteIntegrationConnectionData, GetIntegrationConnectionData, UpdateIntegrationConnectionData, GetIntegrationConnectionModelEndpointConfigurationsData, ListIntegrationConnectionModelsData, GetIntegrationConnectionModelData, ListJobsData, CreateJobData, DeleteJobData, GetJobData, UpdateJobData, ListJobExecutionsData, CreateJobExecutionData, DeleteJobExecutionData, GetJobExecutionData, ListJobExecutionTasksData, ListJobRevisionsData, ListLocationsData, ListMcpHubDefinitionsData, ListModelsData, CreateModelData, DeleteModelData, GetModelData, UpdateModelData, ListModelRevisionsData, ListPendingImageSharesData, AcceptImageShareData, DeclineImageShareData, ListPoliciesData, CreatePolicyData, DeletePolicyData, GetPolicyData, UpdatePolicyData, GetPolicyUsagesData, ListPublicIpsData, ListSandboxHubDefinitionsData, ListSandboxesData, CreateSandboxData, DeleteSandboxData, GetSandboxData, UpdateSandboxData, ListSandboxPreviewsData, CreateSandboxPreviewData, DeleteSandboxPreviewData, GetSandboxPreviewData, UpdateSandboxPreviewData, ListSandboxPreviewTokensData, CreateSandboxPreviewTokenData, DeleteSandboxPreviewTokenData, GetWorkspaceServiceAccountsData, CreateWorkspaceServiceAccountData, DeleteWorkspaceServiceAccountData, UpdateWorkspaceServiceAccountData, ListApiKeysForServiceAccountData, CreateApiKeyForServiceAccountData, DeleteApiKeyForServiceAccountData, ListTemplatesData, GetTemplateData, ListWorkspaceUsersData, InviteWorkspaceUserData, RemoveWorkspaceUserData, UpdateWorkspaceUserRoleData, ListVolumeTemplatesData, CreateVolumeTemplateData, DeleteVolumeTemplateData, GetVolumeTemplateData, UpdateVolumeTemplateData, DeleteVolumeTemplateVersionData, ListVolumesData, CreateVolumeData, DeleteVolumeData, GetVolumeData, UpdateVolumeData, ListVpcsData, CreateVpcData, DeleteVpcData, GetVpcData, ListEgressGatewaysData, CreateEgressGatewayData, DeleteEgressGatewayData, GetEgressGatewayData, ListEgressIpsData, CreateEgressIpData, DeleteEgressIpData, GetEgressIpData, ListWorkspacesData, CreateWorkspaceData, DeleteWorkspaceData, GetWorkspaceData, UpdateWorkspaceData, DeclineWorkspaceInvitationData, AcceptWorkspaceInvitationData, LeaveWorkspaceData, CheckWorkspaceAvailabilityData } from './types.gen.js';
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -15,9 +15,9 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
15
15
  };
16
16
  /**
17
17
  * List all agents
18
- * Returns all AI agents deployed in the workspace. Each agent includes its deployment status, runtime configuration, and global inference endpoint URL.
18
+ * Returns AI agents deployed in the workspace. Each agent includes its deployment status, runtime configuration, and global inference endpoint URL. Starting with API version 2026-04-28 the response is wrapped in `{data, meta}` and supports cursor pagination via the `cursor` and `limit` query parameters; older versions keep returning a bare array with all agents.
19
19
  */
20
- export declare const listAgents: <ThrowOnError extends boolean = false>(options?: Options<ListAgentsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Agent[], import("./types.gen.js")._Error, ThrowOnError>;
20
+ export declare const listAgents: <ThrowOnError extends boolean = false>(options?: Options<ListAgentsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").AgentList, import("./types.gen.js")._Error, ThrowOnError>;
21
21
  /**
22
22
  * Create agent
23
23
  * Creates a new AI agent deployment from your code. The agent will be built and deployed as a serverless auto-scaling endpoint. Use the Blaxel CLI 'bl deploy' for a simpler deployment experience.
@@ -75,9 +75,9 @@ export declare const updateCustomDomain: <ThrowOnError extends boolean = false>(
75
75
  export declare const verifyCustomDomain: <ThrowOnError extends boolean = false>(options: Options<VerifyCustomDomainData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").CustomDomain, unknown, ThrowOnError>;
76
76
  /**
77
77
  * List drives
78
- * Returns all drives in the workspace. Drives provide persistent storage that can be attached to agents, functions, and sandboxes.
78
+ * Returns all drives in the workspace. Drives provide persistent storage that can be attached to agents, functions, and sandboxes. Starting with API version 2026-04-28, the response wraps items in `{data, meta}` and supports cursor pagination via the `cursor` and `limit` query parameters; older versions keep returning a bare array with all drives.
79
79
  */
80
- export declare const listDrives: <ThrowOnError extends boolean = false>(options?: Options<ListDrivesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Drive[], unknown, ThrowOnError>;
80
+ export declare const listDrives: <ThrowOnError extends boolean = false>(options?: Options<ListDrivesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").DriveList, unknown, ThrowOnError>;
81
81
  /**
82
82
  * Create a drive
83
83
  * Creates a new drive in the workspace. Drives can be buckets and can be mounted at runtime to sandboxes.
@@ -123,6 +123,11 @@ export declare const getDriveJwks: <ThrowOnError extends boolean = false>(option
123
123
  * List all egress gateways across all VPCs in the workspace
124
124
  */
125
125
  export declare const listAllEgressGateways: <ThrowOnError extends boolean = false>(options?: Options<ListAllEgressGatewaysData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").EgressGateway[], unknown, ThrowOnError>;
126
+ /**
127
+ * Egress gateway sandbox attachments
128
+ * Returns the inverse map (gateway → sandbox names) for the workspace. Used by the egress-IPs UI to render attachment counts without fetching the sandboxes listing full client-side.
129
+ */
130
+ export declare const getEgressGatewayUsage: <ThrowOnError extends boolean = false>(options?: Options<GetEgressGatewayUsageData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").EgressGatewayUsage, unknown, ThrowOnError>;
126
131
  /**
127
132
  * List all egress IPs across all VPCs and gateways in the workspace
128
133
  */
@@ -151,9 +156,9 @@ export declare const testFeatureFlag: <ThrowOnError extends boolean = false>(opt
151
156
  }, import("./types.gen.js")._Error, ThrowOnError>;
152
157
  /**
153
158
  * List all MCP servers
154
- * Returns all MCP server functions deployed in the workspace. Each function includes its deployment status, transport protocol (websocket or http-stream), and endpoint URL.
159
+ * Returns MCP server functions deployed in the workspace. Each function includes its deployment status, transport protocol (websocket or http-stream), and endpoint URL. Starting with API version 2026-04-28 the response is wrapped in `{data, meta}` and supports cursor pagination via the `cursor` and `limit` query parameters; older versions keep returning a bare array with all functions.
155
160
  */
156
- export declare const listFunctions: <ThrowOnError extends boolean = false>(options?: Options<ListFunctionsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js")._Function[], import("./types.gen.js")._Error, ThrowOnError>;
161
+ export declare const listFunctions: <ThrowOnError extends boolean = false>(options?: Options<ListFunctionsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").FunctionList, import("./types.gen.js")._Error, ThrowOnError>;
157
162
  /**
158
163
  * Create MCP server
159
164
  * Creates a new MCP server function deployment. The function will expose tools via the Model Context Protocol that can be used by AI agents. Supports streamable HTTP transport.
@@ -279,9 +284,9 @@ export declare const listIntegrationConnectionModels: <ThrowOnError extends bool
279
284
  export declare const getIntegrationConnectionModel: <ThrowOnError extends boolean = false>(options: Options<GetIntegrationConnectionModelData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<unknown, unknown, ThrowOnError>;
280
285
  /**
281
286
  * List batch jobs
282
- * Returns all batch job definitions in the workspace. Each job can be triggered to run multiple parallel tasks with configurable concurrency and retry settings.
287
+ * Returns batch job definitions in the workspace. Each job can be triggered to run multiple parallel tasks with configurable concurrency and retry settings. Starting with API version 2026-04-28 the response is wrapped in `{data, meta}` and supports cursor pagination via the `cursor` and `limit` query parameters; older versions keep returning a bare array with all jobs.
283
288
  */
284
- export declare const listJobs: <ThrowOnError extends boolean = false>(options?: Options<ListJobsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Job[], unknown, ThrowOnError>;
289
+ export declare const listJobs: <ThrowOnError extends boolean = false>(options?: Options<ListJobsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").JobList, unknown, ThrowOnError>;
285
290
  /**
286
291
  * Create batch job
287
292
  * Creates a new batch job definition for parallel AI task processing. Jobs can be triggered via API or scheduled, and support configurable parallelism, timeouts, and retry logic.
@@ -304,9 +309,9 @@ export declare const getJob: <ThrowOnError extends boolean = false>(options: Opt
304
309
  export declare const updateJob: <ThrowOnError extends boolean = false>(options: Options<UpdateJobData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Job, unknown, ThrowOnError>;
305
310
  /**
306
311
  * List job executions
307
- * Returns paginated list of executions for a batch job, sorted by creation time. Each execution contains status, task counts, and timing information.
312
+ * Returns executions for a batch job. Starting with API version 2026-04-28 the response is wrapped in `{data, meta}` and supports cursor pagination via the `cursor` and `limit` query parameters; older versions keep the legacy offset/limit contract and return a bare array.
308
313
  */
309
- export declare const listJobExecutions: <ThrowOnError extends boolean = false>(options: Options<ListJobExecutionsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").JobExecution[], unknown, ThrowOnError>;
314
+ export declare const listJobExecutions: <ThrowOnError extends boolean = false>(options: Options<ListJobExecutionsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").JobExecutionList, unknown, ThrowOnError>;
310
315
  /**
311
316
  * Create job execution
312
317
  * Triggers a new execution of the batch job. Each execution runs multiple tasks in parallel according to the job's configured concurrency. Tasks can be parameterized via the request body.
@@ -322,6 +327,11 @@ export declare const deleteJobExecution: <ThrowOnError extends boolean = false>(
322
327
  * Returns detailed information about a specific job execution including status, task statistics (success/failure/running counts), and timing information.
323
328
  */
324
329
  export declare const getJobExecution: <ThrowOnError extends boolean = false>(options: Options<GetJobExecutionData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").JobExecution, unknown, ThrowOnError>;
330
+ /**
331
+ * List execution tasks
332
+ * Returns one cursor-paginated page of an execution's tasks. Tasks are derived from event history each request; only the in-memory slicing is paginated, the events scan still fetches the whole event log behind the scenes. Available starting with API version 2026-04-28.
333
+ */
334
+ export declare const listJobExecutionTasks: <ThrowOnError extends boolean = false>(options: Options<ListJobExecutionTasksData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").JobExecutionTaskList, unknown, ThrowOnError>;
325
335
  /**
326
336
  * List job revisions
327
337
  * Returns revisions for a job by name.
@@ -339,9 +349,9 @@ export declare const listLocations: <ThrowOnError extends boolean = false>(optio
339
349
  export declare const listMcpHubDefinitions: <ThrowOnError extends boolean = false>(options?: Options<ListMcpHubDefinitionsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").McpDefinition[], unknown, ThrowOnError>;
340
350
  /**
341
351
  * List model endpoints
342
- * Returns all model gateway endpoints configured in the workspace. Each model represents a proxy to an external LLM provider (OpenAI, Anthropic, etc.) with unified access control.
352
+ * Returns model gateway endpoints configured in the workspace. Each model represents a proxy to an external LLM provider (OpenAI, Anthropic, etc.) with unified access control. Starting with API version 2026-04-28 the response is wrapped in `{data, meta}` and supports cursor pagination via the `cursor` and `limit` query parameters; older versions keep returning a bare array with all models.
343
353
  */
344
- export declare const listModels: <ThrowOnError extends boolean = false>(options?: Options<ListModelsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Model[], import("./types.gen.js")._Error, ThrowOnError>;
354
+ export declare const listModels: <ThrowOnError extends boolean = false>(options?: Options<ListModelsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").ModelList, import("./types.gen.js")._Error, ThrowOnError>;
345
355
  /**
346
356
  * Create model endpoint
347
357
  * Creates a new model gateway endpoint that proxies requests to an external LLM provider. Requires an integration connection with valid API credentials for the target provider.
@@ -384,9 +394,9 @@ export declare const acceptImageShare: <ThrowOnError extends boolean = false>(op
384
394
  export declare const declineImageShare: <ThrowOnError extends boolean = false>(options: Options<DeclineImageShareData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<void, unknown, ThrowOnError>;
385
395
  /**
386
396
  * List governance policies
387
- * Returns all governance policies in the workspace. Policies control deployment locations, hardware flavors, and token limits for agents, functions, and models.
397
+ * Returns governance policies in the workspace. Policies control deployment locations, hardware flavors, and token limits for agents, functions, and models. Starting with API version 2026-04-28 the response is wrapped in `{data, meta}` and supports cursor pagination via the `cursor` and `limit` query parameters; older versions keep returning a bare array with all policies.
388
398
  */
389
- export declare const listPolicies: <ThrowOnError extends boolean = false>(options?: Options<ListPoliciesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Policy[], unknown, ThrowOnError>;
399
+ export declare const listPolicies: <ThrowOnError extends boolean = false>(options?: Options<ListPoliciesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").PolicyList, unknown, ThrowOnError>;
390
400
  /**
391
401
  * Create governance policy
392
402
  * Creates a new governance policy to control where and how resources are deployed. Policies can restrict deployment to specific regions, countries, or continents for compliance.
@@ -407,6 +417,11 @@ export declare const getPolicy: <ThrowOnError extends boolean = false>(options:
407
417
  * Updates a governance policy's restrictions. Changes take effect on the next deployment of resources using this policy.
408
418
  */
409
419
  export declare const updatePolicy: <ThrowOnError extends boolean = false>(options: Options<UpdatePolicyData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Policy, unknown, ThrowOnError>;
420
+ /**
421
+ * List resources using a policy
422
+ * Returns the names of every resource (agent, function, model, sandbox, job) currently referencing the given policy. Replaces the client-side fan-out the policies UI used to do over the listings.
423
+ */
424
+ export declare const getPolicyUsages: <ThrowOnError extends boolean = false>(options: Options<GetPolicyUsagesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").PolicyUsages, unknown, ThrowOnError>;
410
425
  /**
411
426
  * List public ips
412
427
  * Returns a list of all public ips used in Blaxel..
@@ -419,9 +434,9 @@ export declare const listPublicIps: <ThrowOnError extends boolean = false>(optio
419
434
  export declare const listSandboxHubDefinitions: <ThrowOnError extends boolean = false>(options?: Options<ListSandboxHubDefinitionsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").SandboxDefinition[], unknown, ThrowOnError>;
420
435
  /**
421
436
  * List sandboxes
422
- * Returns all sandboxes in the workspace. Each sandbox includes its configuration, status, and endpoint URL.
437
+ * Returns sandboxes in the workspace. Each sandbox includes its configuration, status, and endpoint URL. Terminated sandboxes are hidden by default; pass `showTerminated=true` to include them. Starting with API version 2026-04-28 the response is wrapped in `{data, meta}` and supports cursor pagination via the `cursor` and `limit` query parameters; older versions keep returning a bare array of all sandboxes.
423
438
  */
424
- export declare const listSandboxes: <ThrowOnError extends boolean = false>(options?: Options<ListSandboxesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Sandbox[], import("./types.gen.js")._Error, ThrowOnError>;
439
+ export declare const listSandboxes: <ThrowOnError extends boolean = false>(options?: Options<ListSandboxesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").SandboxList, import("./types.gen.js")._Error, ThrowOnError>;
425
440
  /**
426
441
  * Create sandbox
427
442
  * Creates a new sandbox VM for secure AI code execution. Sandboxes automatically scale to zero when idle and resume instantly, preserving memory state including running processes and filesystem.
@@ -609,9 +624,9 @@ export declare const deleteVolumeTemplateVersion: <ThrowOnError extends boolean
609
624
  }, unknown, ThrowOnError>;
610
625
  /**
611
626
  * List persistent volumes
612
- * Returns all persistent storage volumes in the workspace. Volumes can be attached to sandboxes for durable file storage that persists across sessions and sandbox deletions.
627
+ * Returns persistent storage volumes in the workspace. Volumes can be attached to sandboxes for durable file storage that persists across sessions and sandbox deletions. Starting with API version 2026-04-28 the response is wrapped in `{data, meta}` and supports cursor pagination via the `cursor` and `limit` query parameters; older versions keep returning a bare array of volumes.
613
628
  */
614
- export declare const listVolumes: <ThrowOnError extends boolean = false>(options?: Options<ListVolumesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Volume[], import("./types.gen.js")._Error, ThrowOnError>;
629
+ export declare const listVolumes: <ThrowOnError extends boolean = false>(options?: Options<ListVolumesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").VolumeList, import("./types.gen.js")._Error, ThrowOnError>;
615
630
  /**
616
631
  * Create persistent volume
617
632
  * Creates a new persistent storage volume that can be attached to sandboxes. Volumes must be created in a specific region and can only attach to sandboxes in the same region.