@blaxel/core 0.2.76 → 0.2.77

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.
@@ -237,7 +237,7 @@ export const listDrives = (options) => {
237
237
  };
238
238
  /**
239
239
  * Create a drive
240
- * Creates a new drive in the workspace. Drives are backed by SeaweedFS buckets and can be mounted at runtime to sandboxes.
240
+ * Creates a new drive in the workspace. Drives can be buckets and can be mounted at runtime to sandboxes.
241
241
  */
242
242
  export const createDrive = (options) => {
243
243
  return (options.client ?? _heyApiClient).post({
@@ -309,7 +309,7 @@ export const updateDrive = (options) => {
309
309
  };
310
310
  /**
311
311
  * Create drive access token
312
- * Issues a short-lived JWT access token scoped to a specific drive. The token can be used as Bearer authentication for direct S3 operations against the drive's SeaweedFS bucket.
312
+ * Issues a short-lived JWT access token scoped to a specific drive. The token can be used as Bearer authentication for direct S3 operations against the drive's bucket.
313
313
  */
314
314
  export const createDriveAccessToken = (options) => {
315
315
  return (options.client ?? _heyApiClient).post({
@@ -325,7 +325,7 @@ export const createDriveAccessToken = (options) => {
325
325
  };
326
326
  /**
327
327
  * Get drive token JWKS
328
- * Returns the JSON Web Key Set containing the Ed25519 public key used to verify drive access tokens. SeaweedFS or other S3-compatible storage can use this endpoint to validate Bearer tokens.
328
+ * Returns the JSON Web Key Set containing the Ed25519 public key used to verify drive access tokens. Other S3-compatible storage can use this endpoint to validate Bearer tokens.
329
329
  */
330
330
  export const getDriveJwks = (options) => {
331
331
  return (options?.client ?? _heyApiClient).get({
@@ -3,8 +3,8 @@ import { authentication } from "../authentication/index.js";
3
3
  import { env } from "../common/env.js";
4
4
  import { fs, os, path } from "../common/node.js";
5
5
  // Build info - these placeholders are replaced at build time by build:replace-imports
6
- const BUILD_VERSION = "0.2.76";
7
- const BUILD_COMMIT = "c20b61b130cca1692f6feaa2da8ad675f2aee770";
6
+ const BUILD_VERSION = "0.2.77";
7
+ const BUILD_COMMIT = "3d5932081fba211232402513e9765d0a776cd5d4";
8
8
  const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
9
9
  // Cache for config.yaml tracking value
10
10
  let configTrackingValue = null;
@@ -61,6 +61,15 @@ export class SandboxDrive extends SandboxAction {
61
61
  throw new Error(`Failed to list drives: ${errorText}`);
62
62
  }
63
63
  const data = await response.json();
64
- return data.mounts || [];
64
+ console.log("[drives.list] raw response:", JSON.stringify(data));
65
+ // Normalise whichever shape the API returns
66
+ const raw = Array.isArray(data)
67
+ ? data
68
+ : (data?.mounts ?? data?.drives ?? data?.data ?? []);
69
+ return raw.map((m) => ({
70
+ driveName: m.driveName ?? m.drive_name ?? m.name ?? "",
71
+ mountPath: m.mountPath ?? m.mount_path ?? "",
72
+ drivePath: m.drivePath ?? m.drive_path ?? "/",
73
+ }));
65
74
  }
66
75
  }