disk 0.9.0 → 0.10.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 CHANGED
@@ -192,6 +192,36 @@ attributes are unchanged. When attributes are omitted, files default to
192
192
  `root:root 0644` and directories to `root:root 0755`. Automatic multipart
193
193
  uploads and append-created files use the same directory rules.
194
194
 
195
+ The disk **root** itself defaults to `root:root 0755`, which means an
196
+ unprivileged process cannot create entries directly under the mount root. To
197
+ avoid a post-mount `chown`, set the root's owner and mode when creating the
198
+ disk (creation-time only; a later `chown`/`chmod` through a mount changes the
199
+ live attributes as usual):
200
+
201
+ ```ts
202
+ const { disk } = await archil.createDisk({
203
+ name: "my-disk",
204
+ rootAttrs: { uid: 1000, gid: 1000, mode: 0o755 },
205
+ });
206
+ ```
207
+
208
+ `mode` is octal (pass `0o750`, not `750`). On regions that don't support
209
+ `rootAttrs` yet the field is ignored and the disk is created with the
210
+ defaults — check the `rootAttrs` field on the created disk to confirm it
211
+ was applied.
212
+
213
+ `rootAttrs` only sets the root directory itself — it does not change how
214
+ later writes get their attributes:
215
+
216
+ - **Through a mount**, normal POSIX rules apply: entries are owned by the
217
+ creating process's uid/gid, with mode derived from its umask. A process
218
+ running as the `rootAttrs` uid therefore owns everything it creates, with
219
+ no attributes to pass anywhere.
220
+ - **Through `putObject` and friends**, omitted attributes still mean the
221
+ server defaults (`root:root 0644` files, `root:root 0755` directories) —
222
+ the disk's `rootAttrs` is *not* used as a fallback. Keep passing
223
+ `uid`/`gid` on object writes when a non-root process will read them.
224
+
195
225
  `listObjects` auto-paginates by default, returning every matching key. The first
196
226
  argument is a key prefix; a non-recursive listing (the default) returns the
197
227
  immediate level as `objects` plus subdirectory `commonPrefixes`:
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { E as ArchilApiError, a as deleteApiKey, l as listApiKeys, n as createApiKey, r as createDisk, s as getDisk, t as configure, u as listDisks } from "./src-CR3Ksi_s.mjs";
2
+ import { E as ArchilApiError, a as deleteApiKey, l as listApiKeys, n as createApiKey, r as createDisk, s as getDisk, t as configure, u as listDisks } from "./src-DyVzhbAB.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { Command, Option } from "commander";
5
5
  //#region bin/cli.ts
@@ -44,6 +44,7 @@ type DiskMetrics = components["schemas"]["DiskMetrics"];
44
44
  type ConnectedClient = components["schemas"]["ConnectedClient"];
45
45
  type AuthorizedUser = components["schemas"]["AuthorizedUser"];
46
46
  type CreateDiskRequest = components["schemas"]["CreateDiskRequest"];
47
+ type RootAttrs = components["schemas"]["RootAttrs"];
47
48
  type MountConfig = components["schemas"]["MountConfig"];
48
49
  type S3Mount = components["schemas"]["S3Mount"];
49
50
  type GCSMount = components["schemas"]["GCSMount"];
@@ -384,6 +385,8 @@ declare class Disk implements FileSystem {
384
385
  readonly connectedClients?: ConnectedClient[];
385
386
  readonly authorizedUsers?: AuthorizedUser[];
386
387
  readonly allowedIps?: string[];
388
+ /** Root-directory POSIX attributes recorded at creation, if any. */
389
+ readonly rootAttrs?: RootAttrs;
387
390
  /** @internal */
388
391
  private readonly _client;
389
392
  /** @internal */
@@ -706,4 +709,4 @@ declare class DiskMultipart {
706
709
  */
707
710
  declare function effectiveUploadPartSize(totalBytes: number, requestedPartSize: number): number;
708
711
  //#endregion
709
- export { TokenUser as $, ApiTokenResponse as A, DiskStatus as B, PutObjectOptions as C, ShareUrlResult as D, ShareUrlOptions as E, CreateApiTokenRequest as F, GrepMatch as G, ExecDiskResult as H, CreateDiskRequest as I, MountConfigResponse as J, GrepStoppedReason as K, Delegation as L, AwsStsUser as M, AzureBlobMount as N, UploadPart as O, ConnectedClient as P, S3Mount as Q, DiskMetrics as R, PosixCreateAttrs as S, S3Object as T, ExecRequest as U, DiskUser as V, GCSMount as W, R2Mount as X, MountResponse as Y, S3CompatibleMount as Z, MultipartUploadListing as _, DeleteObjectsResult as a, PartInfo as b, ExecResult as c, ListMultipartUploadsOptions as d, FileSystem as et, ListObjectsOptions as f, MultipartUpload as g, MountOptions as h, DeleteObjectsOptions as i, AuthorizedUser as j, effectiveUploadPartSize as k, GrepOptions as l, ListPartsOptions as m, CompletedMultipartUpload as n, Disk as o, ListObjectsResult as p, MountConfig as q, DeleteObjectsError as r, DiskMultipart as s, AppendObjectOptions as t, ApiClient as tt, GrepResult as u, MultipartUploadSummary as v, PutObjectResult as w, PartListing as x, ObjectMetadata as y, DiskResponse as z };
712
+ export { S3Mount as $, ApiTokenResponse as A, DiskStatus as B, PutObjectOptions as C, ShareUrlResult as D, ShareUrlOptions as E, CreateApiTokenRequest as F, GrepMatch as G, ExecDiskResult as H, CreateDiskRequest as I, MountConfigResponse as J, GrepStoppedReason as K, Delegation as L, AwsStsUser as M, AzureBlobMount as N, UploadPart as O, ConnectedClient as P, S3CompatibleMount as Q, DiskMetrics as R, PosixCreateAttrs as S, S3Object as T, ExecRequest as U, DiskUser as V, GCSMount as W, R2Mount as X, MountResponse as Y, RootAttrs as Z, MultipartUploadListing as _, DeleteObjectsResult as a, PartInfo as b, ExecResult as c, ListMultipartUploadsOptions as d, TokenUser as et, ListObjectsOptions as f, MultipartUpload as g, MountOptions as h, DeleteObjectsOptions as i, AuthorizedUser as j, effectiveUploadPartSize as k, GrepOptions as l, ListPartsOptions as m, CompletedMultipartUpload as n, ApiClient as nt, Disk as o, ListObjectsResult as p, MountConfig as q, DeleteObjectsError as r, DiskMultipart as s, AppendObjectOptions as t, FileSystem as tt, GrepResult as u, MultipartUploadSummary as v, PutObjectResult as w, PartListing as x, ObjectMetadata as y, DiskResponse as z };
@@ -44,6 +44,7 @@ type DiskMetrics = components["schemas"]["DiskMetrics"];
44
44
  type ConnectedClient = components["schemas"]["ConnectedClient"];
45
45
  type AuthorizedUser = components["schemas"]["AuthorizedUser"];
46
46
  type CreateDiskRequest = components["schemas"]["CreateDiskRequest"];
47
+ type RootAttrs = components["schemas"]["RootAttrs"];
47
48
  type MountConfig = components["schemas"]["MountConfig"];
48
49
  type S3Mount = components["schemas"]["S3Mount"];
49
50
  type GCSMount = components["schemas"]["GCSMount"];
@@ -384,6 +385,8 @@ declare class Disk implements FileSystem {
384
385
  readonly connectedClients?: ConnectedClient[];
385
386
  readonly authorizedUsers?: AuthorizedUser[];
386
387
  readonly allowedIps?: string[];
388
+ /** Root-directory POSIX attributes recorded at creation, if any. */
389
+ readonly rootAttrs?: RootAttrs;
387
390
  /** @internal */
388
391
  private readonly _client;
389
392
  /** @internal */
@@ -706,4 +709,4 @@ declare class DiskMultipart {
706
709
  */
707
710
  declare function effectiveUploadPartSize(totalBytes: number, requestedPartSize: number): number;
708
711
  //#endregion
709
- export { TokenUser as $, ApiTokenResponse as A, DiskStatus as B, PutObjectOptions as C, ShareUrlResult as D, ShareUrlOptions as E, CreateApiTokenRequest as F, GrepMatch as G, ExecDiskResult as H, CreateDiskRequest as I, MountConfigResponse as J, GrepStoppedReason as K, Delegation as L, AwsStsUser as M, AzureBlobMount as N, UploadPart as O, ConnectedClient as P, S3Mount as Q, DiskMetrics as R, PosixCreateAttrs as S, S3Object as T, ExecRequest as U, DiskUser as V, GCSMount as W, R2Mount as X, MountResponse as Y, S3CompatibleMount as Z, MultipartUploadListing as _, DeleteObjectsResult as a, PartInfo as b, ExecResult as c, ListMultipartUploadsOptions as d, FileSystem as et, ListObjectsOptions as f, MultipartUpload as g, MountOptions as h, DeleteObjectsOptions as i, AuthorizedUser as j, effectiveUploadPartSize as k, GrepOptions as l, ListPartsOptions as m, CompletedMultipartUpload as n, Disk as o, ListObjectsResult as p, MountConfig as q, DeleteObjectsError as r, DiskMultipart as s, AppendObjectOptions as t, ApiClient as tt, GrepResult as u, MultipartUploadSummary as v, PutObjectResult as w, PartListing as x, ObjectMetadata as y, DiskResponse as z };
712
+ export { S3Mount as $, ApiTokenResponse as A, DiskStatus as B, PutObjectOptions as C, ShareUrlResult as D, ShareUrlOptions as E, CreateApiTokenRequest as F, GrepMatch as G, ExecDiskResult as H, CreateDiskRequest as I, MountConfigResponse as J, GrepStoppedReason as K, Delegation as L, AwsStsUser as M, AzureBlobMount as N, UploadPart as O, ConnectedClient as P, S3CompatibleMount as Q, DiskMetrics as R, PosixCreateAttrs as S, S3Object as T, ExecRequest as U, DiskUser as V, GCSMount as W, R2Mount as X, MountResponse as Y, RootAttrs as Z, MultipartUploadListing as _, DeleteObjectsResult as a, PartInfo as b, ExecResult as c, ListMultipartUploadsOptions as d, TokenUser as et, ListObjectsOptions as f, MultipartUpload as g, MountOptions as h, DeleteObjectsOptions as i, AuthorizedUser as j, effectiveUploadPartSize as k, GrepOptions as l, ListPartsOptions as m, CompletedMultipartUpload as n, ApiClient as nt, Disk as o, ListObjectsResult as p, MountConfig as q, DeleteObjectsError as r, DiskMultipart as s, AppendObjectOptions as t, FileSystem as tt, GrepResult as u, MultipartUploadSummary as v, PutObjectResult as w, PartListing as x, ObjectMetadata as y, DiskResponse as z };
package/dist/index.cjs CHANGED
@@ -134,7 +134,7 @@ function deriveS3BaseUrl(controlBaseUrl) {
134
134
  }
135
135
  //#endregion
136
136
  //#region src/version.ts
137
- const VERSION = "0.9.0";
137
+ const VERSION = "0.10.0";
138
138
  const USER_AGENT = `archil-js/${VERSION}`;
139
139
  //#endregion
140
140
  //#region src/client.ts
@@ -200,6 +200,8 @@ var Disk = class {
200
200
  connectedClients;
201
201
  authorizedUsers;
202
202
  allowedIps;
203
+ /** Root-directory POSIX attributes recorded at creation, if any. */
204
+ rootAttrs;
203
205
  /** @internal */
204
206
  _client;
205
207
  /** @internal */
@@ -228,6 +230,7 @@ var Disk = class {
228
230
  this.connectedClients = data.connectedClients;
229
231
  this.authorizedUsers = data.authorizedUsers;
230
232
  this.allowedIps = data.allowedIps;
233
+ this.rootAttrs = data.rootAttrs;
231
234
  this._client = client;
232
235
  this._archilRegion = archilRegion;
233
236
  this._s3BaseUrl = s3BaseUrl ?? "";
@@ -250,7 +253,8 @@ var Disk = class {
250
253
  metrics: this.metrics,
251
254
  connectedClients: this.connectedClients,
252
255
  authorizedUsers: this.authorizedUsers,
253
- allowedIps: this.allowedIps
256
+ allowedIps: this.allowedIps,
257
+ rootAttrs: this.rootAttrs
254
258
  };
255
259
  }
256
260
  async addUser(user) {
@@ -1154,6 +1158,11 @@ var Disks = class {
1154
1158
  *
1155
1159
  * Returns the Disk, the one-time token (save it — it cannot be retrieved
1156
1160
  * again), and the token identifier for later management.
1161
+ *
1162
+ * `rootAttrs` sets the POSIX owner and mode of the disk's root directory
1163
+ * (e.g. `{ uid: 1000, gid: 1000, mode: 0o755 }` so an unprivileged process
1164
+ * can create entries under the mount root without a post-mount `chown`).
1165
+ * Creation-time only.
1157
1166
  */
1158
1167
  async create(req) {
1159
1168
  const resp = await unwrap(this._client.POST("/api/disks", { body: req }));
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as TokenUser, A as ApiTokenResponse, B as DiskStatus, C as PutObjectOptions, D as ShareUrlResult, E as ShareUrlOptions, F as CreateApiTokenRequest, G as GrepMatch, H as ExecDiskResult, I as CreateDiskRequest, J as MountConfigResponse, K as GrepStoppedReason, L as Delegation, M as AwsStsUser, N as AzureBlobMount, O as UploadPart, P as ConnectedClient, Q as S3Mount, R as DiskMetrics, S as PosixCreateAttrs, T as S3Object, U as ExecRequest, V as DiskUser, W as GCSMount, X as R2Mount, Y as MountResponse, Z as S3CompatibleMount, _ as MultipartUploadListing, a as DeleteObjectsResult, b as PartInfo, c as ExecResult, d as ListMultipartUploadsOptions, et as FileSystem, f as ListObjectsOptions, g as MultipartUpload, h as MountOptions, i as DeleteObjectsOptions, j as AuthorizedUser, k as effectiveUploadPartSize, l as GrepOptions, m as ListPartsOptions, n as CompletedMultipartUpload, o as Disk, p as ListObjectsResult, q as MountConfig, r as DeleteObjectsError, s as DiskMultipart, t as AppendObjectOptions, tt as ApiClient, u as GrepResult, v as MultipartUploadSummary, w as PutObjectResult, x as PartListing, y as ObjectMetadata, z as DiskResponse } from "./disk-DseHuBL7.cjs";
1
+ import { $ as S3Mount, A as ApiTokenResponse, B as DiskStatus, C as PutObjectOptions, D as ShareUrlResult, E as ShareUrlOptions, F as CreateApiTokenRequest, G as GrepMatch, H as ExecDiskResult, I as CreateDiskRequest, J as MountConfigResponse, K as GrepStoppedReason, L as Delegation, M as AwsStsUser, N as AzureBlobMount, O as UploadPart, P as ConnectedClient, Q as S3CompatibleMount, R as DiskMetrics, S as PosixCreateAttrs, T as S3Object, U as ExecRequest, V as DiskUser, W as GCSMount, X as R2Mount, Y as MountResponse, Z as RootAttrs, _ as MultipartUploadListing, a as DeleteObjectsResult, b as PartInfo, c as ExecResult, d as ListMultipartUploadsOptions, et as TokenUser, f as ListObjectsOptions, g as MultipartUpload, h as MountOptions, i as DeleteObjectsOptions, j as AuthorizedUser, k as effectiveUploadPartSize, l as GrepOptions, m as ListPartsOptions, n as CompletedMultipartUpload, nt as ApiClient, o as Disk, p as ListObjectsResult, q as MountConfig, r as DeleteObjectsError, s as DiskMultipart, t as AppendObjectOptions, tt as FileSystem, u as GrepResult, v as MultipartUploadSummary, w as PutObjectResult, x as PartListing, y as ObjectMetadata, z as DiskResponse } from "./disk-DqGdJGsu.cjs";
2
2
  import { components } from "@archildata/api-types";
3
3
 
4
4
  //#region src/disks.d.ts
@@ -50,6 +50,11 @@ declare class Disks {
50
50
  *
51
51
  * Returns the Disk, the one-time token (save it — it cannot be retrieved
52
52
  * again), and the token identifier for later management.
53
+ *
54
+ * `rootAttrs` sets the POSIX owner and mode of the disk's root directory
55
+ * (e.g. `{ uid: 1000, gid: 1000, mode: 0o755 }` so an unprivileged process
56
+ * can create entries under the mount root without a post-mount `chown`).
57
+ * Creation-time only.
53
58
  */
54
59
  create(req: CreateDiskRequest): Promise<CreateDiskResult>;
55
60
  }
@@ -485,4 +490,4 @@ declare function exec(opts: ExecOptions): Promise<ExecDiskResult>;
485
490
  */
486
491
  declare function workspace(mounts: Record<string, ExecMount>): Workspace;
487
492
  //#endregion
488
- export { type ApiTokenResponse, type AppendObjectOptions, Archil, ArchilApiError, ArchilError, type ArchilOptions, ArchilS3Error, type AuthorizedUser, type AwsStsUser, type AzureBlobMount, type CompletedMultipartUpload, type ConnectedClient, type CreateApiTokenRequest, type CreateDiskRequest, type CreateDiskResult, type CreateSandboxRequest, type Delegation, type DeleteObjectsError, type DeleteObjectsOptions, type DeleteObjectsResult, Disk, type DiskListPage, type DiskMetrics, DiskMultipart, type DiskResponse, type DiskStatus, type DiskUser, Disks, type ExecMount, type ExecMountSpec, type ExecOptions, type ExecRequest, type ExecResult, type FileSystem, type GCSMount, type GrepMatch, type GrepOptions, type GrepResult, type GrepStoppedReason, type ListDisksOptions, type ListMultipartUploadsOptions, type ListObjectsOptions, type ListObjectsResult, type ListPartsOptions, type ListSandboxesOptions, type ListTokensOptions, type MountConfig, type MountConfigResponse, type MountOptions, type MountResponse, type MultipartUpload, type MultipartUploadListing, type MultipartUploadSummary, type ObjectMetadata, type PartInfo, type PartListing, type PosixCreateAttrs, type PutObjectOptions, type PutObjectResult, type R2Mount, type S3CompatibleMount, type S3Mount, type S3Object, Sandbox, type SandboxConnectionInfo, type SandboxEndpoint, SandboxExec, type SandboxExecOptions, type SandboxExecResponse, type SandboxExecStatus, type SandboxForkOptions, SandboxPty, type SandboxPtyOptions, type SandboxPtyResult, type SandboxResponse, type SandboxStatus, type SandboxWaitOptions, Sandboxes, type ShareUrlOptions, type ShareUrlResult, type TokenUser, Tokens, USER_AGENT, type UploadPart, VERSION, Workspace, configure, createApiKey, createDisk, createSandbox, deleteApiKey, effectiveUploadPartSize, exec, getDisk, getSandbox, listApiKeys, listDisks, listSandboxes, workspace };
493
+ export { type ApiTokenResponse, type AppendObjectOptions, Archil, ArchilApiError, ArchilError, type ArchilOptions, ArchilS3Error, type AuthorizedUser, type AwsStsUser, type AzureBlobMount, type CompletedMultipartUpload, type ConnectedClient, type CreateApiTokenRequest, type CreateDiskRequest, type CreateDiskResult, type CreateSandboxRequest, type Delegation, type DeleteObjectsError, type DeleteObjectsOptions, type DeleteObjectsResult, Disk, type DiskListPage, type DiskMetrics, DiskMultipart, type DiskResponse, type DiskStatus, type DiskUser, Disks, type ExecMount, type ExecMountSpec, type ExecOptions, type ExecRequest, type ExecResult, type FileSystem, type GCSMount, type GrepMatch, type GrepOptions, type GrepResult, type GrepStoppedReason, type ListDisksOptions, type ListMultipartUploadsOptions, type ListObjectsOptions, type ListObjectsResult, type ListPartsOptions, type ListSandboxesOptions, type ListTokensOptions, type MountConfig, type MountConfigResponse, type MountOptions, type MountResponse, type MultipartUpload, type MultipartUploadListing, type MultipartUploadSummary, type ObjectMetadata, type PartInfo, type PartListing, type PosixCreateAttrs, type PutObjectOptions, type PutObjectResult, type R2Mount, type RootAttrs, type S3CompatibleMount, type S3Mount, type S3Object, Sandbox, type SandboxConnectionInfo, type SandboxEndpoint, SandboxExec, type SandboxExecOptions, type SandboxExecResponse, type SandboxExecStatus, type SandboxForkOptions, SandboxPty, type SandboxPtyOptions, type SandboxPtyResult, type SandboxResponse, type SandboxStatus, type SandboxWaitOptions, Sandboxes, type ShareUrlOptions, type ShareUrlResult, type TokenUser, Tokens, USER_AGENT, type UploadPart, VERSION, Workspace, configure, createApiKey, createDisk, createSandbox, deleteApiKey, effectiveUploadPartSize, exec, getDisk, getSandbox, listApiKeys, listDisks, listSandboxes, workspace };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as TokenUser, A as ApiTokenResponse, B as DiskStatus, C as PutObjectOptions, D as ShareUrlResult, E as ShareUrlOptions, F as CreateApiTokenRequest, G as GrepMatch, H as ExecDiskResult, I as CreateDiskRequest, J as MountConfigResponse, K as GrepStoppedReason, L as Delegation, M as AwsStsUser, N as AzureBlobMount, O as UploadPart, P as ConnectedClient, Q as S3Mount, R as DiskMetrics, S as PosixCreateAttrs, T as S3Object, U as ExecRequest, V as DiskUser, W as GCSMount, X as R2Mount, Y as MountResponse, Z as S3CompatibleMount, _ as MultipartUploadListing, a as DeleteObjectsResult, b as PartInfo, c as ExecResult, d as ListMultipartUploadsOptions, et as FileSystem, f as ListObjectsOptions, g as MultipartUpload, h as MountOptions, i as DeleteObjectsOptions, j as AuthorizedUser, k as effectiveUploadPartSize, l as GrepOptions, m as ListPartsOptions, n as CompletedMultipartUpload, o as Disk, p as ListObjectsResult, q as MountConfig, r as DeleteObjectsError, s as DiskMultipart, t as AppendObjectOptions, tt as ApiClient, u as GrepResult, v as MultipartUploadSummary, w as PutObjectResult, x as PartListing, y as ObjectMetadata, z as DiskResponse } from "./disk-DseHuBL7.mjs";
1
+ import { $ as S3Mount, A as ApiTokenResponse, B as DiskStatus, C as PutObjectOptions, D as ShareUrlResult, E as ShareUrlOptions, F as CreateApiTokenRequest, G as GrepMatch, H as ExecDiskResult, I as CreateDiskRequest, J as MountConfigResponse, K as GrepStoppedReason, L as Delegation, M as AwsStsUser, N as AzureBlobMount, O as UploadPart, P as ConnectedClient, Q as S3CompatibleMount, R as DiskMetrics, S as PosixCreateAttrs, T as S3Object, U as ExecRequest, V as DiskUser, W as GCSMount, X as R2Mount, Y as MountResponse, Z as RootAttrs, _ as MultipartUploadListing, a as DeleteObjectsResult, b as PartInfo, c as ExecResult, d as ListMultipartUploadsOptions, et as TokenUser, f as ListObjectsOptions, g as MultipartUpload, h as MountOptions, i as DeleteObjectsOptions, j as AuthorizedUser, k as effectiveUploadPartSize, l as GrepOptions, m as ListPartsOptions, n as CompletedMultipartUpload, nt as ApiClient, o as Disk, p as ListObjectsResult, q as MountConfig, r as DeleteObjectsError, s as DiskMultipart, t as AppendObjectOptions, tt as FileSystem, u as GrepResult, v as MultipartUploadSummary, w as PutObjectResult, x as PartListing, y as ObjectMetadata, z as DiskResponse } from "./disk-DqGdJGsu.mjs";
2
2
  import { components } from "@archildata/api-types";
3
3
 
4
4
  //#region src/disks.d.ts
@@ -50,6 +50,11 @@ declare class Disks {
50
50
  *
51
51
  * Returns the Disk, the one-time token (save it — it cannot be retrieved
52
52
  * again), and the token identifier for later management.
53
+ *
54
+ * `rootAttrs` sets the POSIX owner and mode of the disk's root directory
55
+ * (e.g. `{ uid: 1000, gid: 1000, mode: 0o755 }` so an unprivileged process
56
+ * can create entries under the mount root without a post-mount `chown`).
57
+ * Creation-time only.
53
58
  */
54
59
  create(req: CreateDiskRequest): Promise<CreateDiskResult>;
55
60
  }
@@ -485,4 +490,4 @@ declare function exec(opts: ExecOptions): Promise<ExecDiskResult>;
485
490
  */
486
491
  declare function workspace(mounts: Record<string, ExecMount>): Workspace;
487
492
  //#endregion
488
- export { type ApiTokenResponse, type AppendObjectOptions, Archil, ArchilApiError, ArchilError, type ArchilOptions, ArchilS3Error, type AuthorizedUser, type AwsStsUser, type AzureBlobMount, type CompletedMultipartUpload, type ConnectedClient, type CreateApiTokenRequest, type CreateDiskRequest, type CreateDiskResult, type CreateSandboxRequest, type Delegation, type DeleteObjectsError, type DeleteObjectsOptions, type DeleteObjectsResult, Disk, type DiskListPage, type DiskMetrics, DiskMultipart, type DiskResponse, type DiskStatus, type DiskUser, Disks, type ExecMount, type ExecMountSpec, type ExecOptions, type ExecRequest, type ExecResult, type FileSystem, type GCSMount, type GrepMatch, type GrepOptions, type GrepResult, type GrepStoppedReason, type ListDisksOptions, type ListMultipartUploadsOptions, type ListObjectsOptions, type ListObjectsResult, type ListPartsOptions, type ListSandboxesOptions, type ListTokensOptions, type MountConfig, type MountConfigResponse, type MountOptions, type MountResponse, type MultipartUpload, type MultipartUploadListing, type MultipartUploadSummary, type ObjectMetadata, type PartInfo, type PartListing, type PosixCreateAttrs, type PutObjectOptions, type PutObjectResult, type R2Mount, type S3CompatibleMount, type S3Mount, type S3Object, Sandbox, type SandboxConnectionInfo, type SandboxEndpoint, SandboxExec, type SandboxExecOptions, type SandboxExecResponse, type SandboxExecStatus, type SandboxForkOptions, SandboxPty, type SandboxPtyOptions, type SandboxPtyResult, type SandboxResponse, type SandboxStatus, type SandboxWaitOptions, Sandboxes, type ShareUrlOptions, type ShareUrlResult, type TokenUser, Tokens, USER_AGENT, type UploadPart, VERSION, Workspace, configure, createApiKey, createDisk, createSandbox, deleteApiKey, effectiveUploadPartSize, exec, getDisk, getSandbox, listApiKeys, listDisks, listSandboxes, workspace };
493
+ export { type ApiTokenResponse, type AppendObjectOptions, Archil, ArchilApiError, ArchilError, type ArchilOptions, ArchilS3Error, type AuthorizedUser, type AwsStsUser, type AzureBlobMount, type CompletedMultipartUpload, type ConnectedClient, type CreateApiTokenRequest, type CreateDiskRequest, type CreateDiskResult, type CreateSandboxRequest, type Delegation, type DeleteObjectsError, type DeleteObjectsOptions, type DeleteObjectsResult, Disk, type DiskListPage, type DiskMetrics, DiskMultipart, type DiskResponse, type DiskStatus, type DiskUser, Disks, type ExecMount, type ExecMountSpec, type ExecOptions, type ExecRequest, type ExecResult, type FileSystem, type GCSMount, type GrepMatch, type GrepOptions, type GrepResult, type GrepStoppedReason, type ListDisksOptions, type ListMultipartUploadsOptions, type ListObjectsOptions, type ListObjectsResult, type ListPartsOptions, type ListSandboxesOptions, type ListTokensOptions, type MountConfig, type MountConfigResponse, type MountOptions, type MountResponse, type MultipartUpload, type MultipartUploadListing, type MultipartUploadSummary, type ObjectMetadata, type PartInfo, type PartListing, type PosixCreateAttrs, type PutObjectOptions, type PutObjectResult, type R2Mount, type RootAttrs, type S3CompatibleMount, type S3Mount, type S3Object, Sandbox, type SandboxConnectionInfo, type SandboxEndpoint, SandboxExec, type SandboxExecOptions, type SandboxExecResponse, type SandboxExecStatus, type SandboxForkOptions, SandboxPty, type SandboxPtyOptions, type SandboxPtyResult, type SandboxResponse, type SandboxStatus, type SandboxWaitOptions, Sandboxes, type ShareUrlOptions, type ShareUrlResult, type TokenUser, Tokens, USER_AGENT, type UploadPart, VERSION, Workspace, configure, createApiKey, createDisk, createSandbox, deleteApiKey, effectiveUploadPartSize, exec, getDisk, getSandbox, listApiKeys, listDisks, listSandboxes, workspace };
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { C as effectiveUploadPartSize, D as ArchilError, E as ArchilApiError, O as ArchilS3Error, S as DiskMultipart, T as VERSION, _ as Sandbox, a as deleteApiKey, b as Disks, c as getSandbox, d as listSandboxes, f as workspace, g as Sandboxes, h as Tokens, i as createSandbox, l as listApiKeys, m as Workspace, n as createApiKey, o as exec, p as Archil, r as createDisk, s as getDisk, t as configure, u as listDisks, v as SandboxExec, w as USER_AGENT, x as Disk, y as SandboxPty } from "./src-CR3Ksi_s.mjs";
1
+ import { C as effectiveUploadPartSize, D as ArchilError, E as ArchilApiError, O as ArchilS3Error, S as DiskMultipart, T as VERSION, _ as Sandbox, a as deleteApiKey, b as Disks, c as getSandbox, d as listSandboxes, f as workspace, g as Sandboxes, h as Tokens, i as createSandbox, l as listApiKeys, m as Workspace, n as createApiKey, o as exec, p as Archil, r as createDisk, s as getDisk, t as configure, u as listDisks, v as SandboxExec, w as USER_AGENT, x as Disk, y as SandboxPty } from "./src-DyVzhbAB.mjs";
2
2
  export { Archil, ArchilApiError, ArchilError, ArchilS3Error, Disk, DiskMultipart, Disks, Sandbox, SandboxExec, SandboxPty, Sandboxes, Tokens, USER_AGENT, VERSION, Workspace, configure, createApiKey, createDisk, createSandbox, deleteApiKey, effectiveUploadPartSize, exec, getDisk, getSandbox, listApiKeys, listDisks, listSandboxes, workspace };
@@ -1,4 +1,4 @@
1
- import { et as FileSystem } from "../disk-DseHuBL7.cjs";
1
+ import { tt as FileSystem } from "../disk-DqGdJGsu.cjs";
2
2
  import { ZodType, z } from "zod";
3
3
 
4
4
  //#region src/internal/tools.d.ts
@@ -1,4 +1,4 @@
1
- import { et as FileSystem } from "../disk-DseHuBL7.mjs";
1
+ import { tt as FileSystem } from "../disk-DqGdJGsu.mjs";
2
2
  import { ZodType, z } from "zod";
3
3
 
4
4
  //#region src/internal/tools.d.ts
@@ -111,7 +111,7 @@ function deriveS3BaseUrl(controlBaseUrl) {
111
111
  }
112
112
  //#endregion
113
113
  //#region src/version.ts
114
- const VERSION = "0.9.0";
114
+ const VERSION = "0.10.0";
115
115
  const USER_AGENT = `archil-js/${VERSION}`;
116
116
  //#endregion
117
117
  //#region src/client.ts
@@ -177,6 +177,8 @@ var Disk = class {
177
177
  connectedClients;
178
178
  authorizedUsers;
179
179
  allowedIps;
180
+ /** Root-directory POSIX attributes recorded at creation, if any. */
181
+ rootAttrs;
180
182
  /** @internal */
181
183
  _client;
182
184
  /** @internal */
@@ -205,6 +207,7 @@ var Disk = class {
205
207
  this.connectedClients = data.connectedClients;
206
208
  this.authorizedUsers = data.authorizedUsers;
207
209
  this.allowedIps = data.allowedIps;
210
+ this.rootAttrs = data.rootAttrs;
208
211
  this._client = client;
209
212
  this._archilRegion = archilRegion;
210
213
  this._s3BaseUrl = s3BaseUrl ?? "";
@@ -227,7 +230,8 @@ var Disk = class {
227
230
  metrics: this.metrics,
228
231
  connectedClients: this.connectedClients,
229
232
  authorizedUsers: this.authorizedUsers,
230
- allowedIps: this.allowedIps
233
+ allowedIps: this.allowedIps,
234
+ rootAttrs: this.rootAttrs
231
235
  };
232
236
  }
233
237
  async addUser(user) {
@@ -1131,6 +1135,11 @@ var Disks = class {
1131
1135
  *
1132
1136
  * Returns the Disk, the one-time token (save it — it cannot be retrieved
1133
1137
  * again), and the token identifier for later management.
1138
+ *
1139
+ * `rootAttrs` sets the POSIX owner and mode of the disk's root directory
1140
+ * (e.g. `{ uid: 1000, gid: 1000, mode: 0o755 }` so an unprivileged process
1141
+ * can create entries under the mount root without a post-mount `chown`).
1142
+ * Creation-time only.
1134
1143
  */
1135
1144
  async create(req) {
1136
1145
  const resp = await unwrap(this._client.POST("/api/disks", { body: req }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disk",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Pure-JS client and CLI for Archil disks",
5
5
  "keywords": [
6
6
  "archil",
@@ -38,7 +38,7 @@
38
38
  "LICENSE"
39
39
  ],
40
40
  "dependencies": {
41
- "@archildata/api-types": "^0.0.16",
41
+ "@archildata/api-types": "^0.0.18",
42
42
  "commander": "^14.0.3",
43
43
  "fast-xml-parser": "^5.7.0",
44
44
  "openapi-fetch": "^0.13.5",