@nimbus-sh/platform 0.7.1 → 0.8.1

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.
@@ -1,6 +1,16 @@
1
1
  /**
2
- * W7 v3 — incremental typed records for streamed bulk filesystem writes.
3
- * The format is internal: every producer and consumer deploys together.
2
+ * W7 v4 — incremental typed records for streamed filesystem writes, in
3
+ * program order: the records are the operations a writer made, in the order
4
+ * it made them, and a stream that stops commits a prefix of them (each group
5
+ * whole). A path may be named by several operations (a file written, renamed,
6
+ * written again). Every producer speaks v4; the format is internal, and every
7
+ * producer and consumer deploys together. v3 (no rename, truncate or setattr,
8
+ * one operation per path, deletes then directories then files) is still
9
+ * decoded for the one release that rolls v4 out: delete it with W7_MAGIC_V3.
10
+ * Fields added to v4 since (each deploys with both ends, so the magic stays):
11
+ * a create call's `umask`; the `open` and `close` calls (a write
12
+ * description's), an `open`'s `ino`, and a description's `description` on
13
+ * its write, append and ftruncate calls.
4
14
  */
5
15
  export type VfsInodeKind = 'file' | 'directory' | 'symlink';
6
16
  /** Entry for bulk inode creation via writeBatch(). */
@@ -17,6 +27,12 @@ export interface BatchInodeEntry {
17
27
  uid?: number;
18
28
  gid?: number;
19
29
  chunkCount: number;
30
+ /**
31
+ * The inode number a delegation's holder gave a file or directory it made
32
+ * (v4): one of the numbers its grant reserved, so the name keeps the
33
+ * number the holder already showed. Absent: the session numbers it.
34
+ */
35
+ ino?: number;
20
36
  }
21
37
  /** Entry for bulk chunk creation via writeBatch(). */
22
38
  export interface BatchChunkEntry {
@@ -24,18 +40,240 @@ export interface BatchChunkEntry {
24
40
  chunkId: number;
25
41
  data: Uint8Array;
26
42
  }
43
+ /**
44
+ * A file whose bytes are read from `source` while the stream is drained, never
45
+ * held whole: its inode (in `inodes`) carries the size, and the source must
46
+ * yield exactly that many bytes, in pieces of any size.
47
+ */
48
+ export interface BatchStreamEntry {
49
+ path: string;
50
+ source: AsyncIterable<Uint8Array>;
51
+ }
27
52
  /** Payload for writeBatch() — all inodes + chunks written in ONE transactionSync(). */
28
53
  export interface BatchWritePayload {
29
54
  inodes: BatchInodeEntry[];
30
55
  chunks: BatchChunkEntry[];
31
56
  /** Paths to delete before writing (for clean reinstall). */
32
57
  deletePaths?: string[];
58
+ /** Files streamed from a source rather than given as chunks; encoder only. */
59
+ streams?: BatchStreamEntry[];
60
+ /**
61
+ * The operations themselves, in program order (encoder only): a writer
62
+ * with an order to keep (a delegation's holder) gives these, and nothing
63
+ * in `inodes`, `chunks`, `deletePaths` or `streams`. Without them, a
64
+ * payload is encoded as its deletes, then its directories, then its files.
65
+ */
66
+ ops?: W7Op[];
67
+ }
68
+ /** One attribute change (setattr): the mode, the owner, or the times; what chmod, chown and utimes each make. */
69
+ export type W7Attrs = {
70
+ mode: number;
71
+ } | {
72
+ uid: number;
73
+ gid: number;
74
+ } | {
75
+ atime: number;
76
+ mtime: number;
77
+ };
78
+ /**
79
+ * A process's filesystem call as a record (v4), applied by the session's own
80
+ * operation of that name with that operation's semantics and refusals: a
81
+ * writeFile follows a link at its name and refuses a directory (EISDIR), a
82
+ * new file is `mode` less the process's umask and an existing one keeps its
83
+ * mode, owner and inode, a mkdir refuses a name that exists (EEXIST), and
84
+ * nothing makes a missing parent. The program-order counterpart of the
85
+ * syscall, where `file` and `directory` are a checkout's upserts.
86
+ */
87
+ export type W7Call =
88
+ /**
89
+ * `ino`, on a call that makes a name (writeFile, appendFile, mkdir,
90
+ * symlink): the number a delegation's holder gave the name it made, from
91
+ * its grant's range, kept when the call makes it (W7 v4 `ino`).
92
+ */
93
+ /**
94
+ * `umask`, on a call that makes a name with a mode (writeFile, appendFile,
95
+ * mkdir): the process's umask when it made the call, applied in place of
96
+ * the session's record of it (which a later change may have moved).
97
+ */
98
+ {
99
+ call: 'writeFile';
100
+ path: string;
101
+ mode: number;
102
+ ino?: number;
103
+ umask?: number;
104
+ data: Uint8Array;
105
+ } | {
106
+ call: 'appendFile';
107
+ path: string;
108
+ mode: number;
109
+ ino?: number;
110
+ umask?: number;
111
+ data: Uint8Array;
33
112
  }
113
+ /**
114
+ * A write through an open description (pwrite(2)) at `offset`: through
115
+ * the session's description `description` when given (opened by an `open`
116
+ * call: its access was decided then, and no later chmod, chown, rename or
117
+ * unlink changes it), else of the file whose inode is `ino` (wherever that
118
+ * file is named now, and nowhere once no name has it), else of the file at
119
+ * `path`. Past its end, the gap reads as zeros.
120
+ */
121
+ | {
122
+ call: 'write';
123
+ path: string;
124
+ ino?: number;
125
+ description?: string;
126
+ offset: number;
127
+ data: Uint8Array;
128
+ }
129
+ /** A write through an O_APPEND description: at the file's end as it is when the write lands. */
130
+ | {
131
+ call: 'append';
132
+ path: string;
133
+ ino?: number;
134
+ description?: string;
135
+ data: Uint8Array;
136
+ }
137
+ /** ftruncate(2) through an open description: `description`'s file, else the file `ino` names, else the one at `path`. */
138
+ | {
139
+ call: 'ftruncate';
140
+ path: string;
141
+ ino?: number;
142
+ description?: string;
143
+ size: number;
144
+ }
145
+ /** `existing: 'ok'`: a directory already there answers success, as `mkdir -p` takes it (anything else there is still EEXIST). */
146
+ | {
147
+ call: 'mkdir';
148
+ path: string;
149
+ mode: number;
150
+ ino?: number;
151
+ umask?: number;
152
+ existing?: 'ok';
153
+ } | {
154
+ call: 'unlink';
155
+ path: string;
156
+ } | {
157
+ call: 'rmdir';
158
+ path: string;
159
+ } | {
160
+ call: 'symlink';
161
+ path: string;
162
+ target: string;
163
+ ino?: number;
164
+ }
165
+ /**
166
+ * rm(1) as fs.rm makes it: a file or link unlinked, a directory with all
167
+ * it holds when `recursive` (else EISDIR's refusal, as unlink's), and a
168
+ * name not there no refusal when `force`.
169
+ */
170
+ | {
171
+ call: 'rm';
172
+ path: string;
173
+ recursive?: true;
174
+ force?: true;
175
+ }
176
+ /** chown(2) of the link itself (lchown): the name's own entry, never what it names. */
177
+ | {
178
+ call: 'lchown';
179
+ path: string;
180
+ uid: number;
181
+ gid: number;
182
+ }
183
+ /** utimes of the link itself (lutimes). */
184
+ | {
185
+ call: 'lutimes';
186
+ path: string;
187
+ atime: number;
188
+ mtime: number;
189
+ }
190
+ /**
191
+ * open(2) of a file to write it (and to read it when `read`), as the
192
+ * session's own open decides it: a name made (`create`, `mode` less
193
+ * `umask`) or refused (EEXIST when `exclusive`, ENOENT without `create`,
194
+ * EISDIR, EACCES for any access asked that the file's mode refuses),
195
+ * emptied when `truncate`, a link at the name followed unless `nofollow`
196
+ * (ELOOP). Its answer is the file's stat. With `description` (an id the
197
+ * process chose), the session keeps the open description under it, its
198
+ * access fixed now; the description's write, append and ftruncate calls
199
+ * name it, and its `close` ends it. `ino`: the number a name it makes is
200
+ * given (a delegation's, as a mkdir's).
201
+ */
202
+ | {
203
+ call: 'open';
204
+ path: string;
205
+ mode: number;
206
+ ino?: number;
207
+ umask?: number;
208
+ read?: true;
209
+ create?: true;
210
+ truncate?: true;
211
+ exclusive?: true;
212
+ nofollow?: true;
213
+ description?: string;
214
+ }
215
+ /** close(2) of the session's open description `description` (an `open` call's). */
216
+ | {
217
+ call: 'close';
218
+ path: string;
219
+ description: string;
220
+ };
221
+ /** A call whose bytes travel as a file's chunks. */
222
+ export type W7DataCall = Extract<W7Call, {
223
+ data: Uint8Array;
224
+ }>['call'];
225
+ /** A call that is one metadata record. */
226
+ export type W7PathCall = Exclude<W7Call, {
227
+ data: Uint8Array;
228
+ }>;
229
+ /** One operation of a program-order payload (BatchWritePayload.ops). */
230
+ export type W7Op = {
231
+ type: 'delete';
232
+ path: string;
233
+ } | {
234
+ type: 'directory';
235
+ inode: BatchInodeEntry;
236
+ } | {
237
+ type: 'file';
238
+ inode: BatchInodeEntry;
239
+ data: Uint8Array;
240
+ } | {
241
+ type: 'file';
242
+ inode: BatchInodeEntry;
243
+ source: AsyncIterable<Uint8Array>;
244
+ } | {
245
+ type: 'rename';
246
+ from: string;
247
+ to: string;
248
+ } | {
249
+ type: 'truncate';
250
+ path: string;
251
+ size: number;
252
+ } | {
253
+ type: 'setattr';
254
+ path: string;
255
+ attrs: W7Attrs;
256
+ } | {
257
+ type: 'call';
258
+ call: W7Call;
259
+ };
34
260
  export declare const W7_MAGIC: Uint8Array<ArrayBuffer>;
35
- export declare const W7_MAX_PATHS_PER_BATCH = 128;
261
+ /**
262
+ * A batch's owned paths. Each stream costs the receiver a round trip and a
263
+ * publication's fixed work, so a batch is as wide as its byte budget allows;
264
+ * ownership is a set of names, small beside the bytes.
265
+ */
266
+ export declare const W7_MAX_PATHS_PER_BATCH = 1024;
36
267
  export declare const W7_MAX_OWNED_PATH_BYTES: number;
37
268
  export declare const W7_MAX_RECORD_BYTES: number;
38
- declare const MODE: "path-atomic-committed-prefix";
269
+ /** The wire chunks a file or link of `size` bytes travels as: CHUNK_SIZE each, the last short, none when empty. */
270
+ export declare function w7ChunkCount(size: number): number;
271
+ /** `data`, the content at `path`, as its wire chunks (w7ChunkCount): views of it, not copies. */
272
+ export declare function w7Chunks(path: string, data: Uint8Array): BatchChunkEntry[];
273
+ declare const MODE: "program-order-committed-prefix";
274
+ /** v3's batch mode. Delete with v3 decoding. */
275
+ declare const MODE_V3: "path-atomic-committed-prefix";
276
+ type W7Mode = typeof MODE | typeof MODE_V3;
39
277
  export interface W7BatchSummary {
40
278
  recordCount: number;
41
279
  pathCount: number;
@@ -44,6 +282,8 @@ export interface W7BatchSummary {
44
282
  fileCount: number;
45
283
  chunkCount: number;
46
284
  byteCount: number;
285
+ /** Renames, truncates, attribute changes and path calls (v4; none in v3). */
286
+ opCount: number;
47
287
  check: number;
48
288
  }
49
289
  export interface W7ChunkRetention {
@@ -58,9 +298,14 @@ type W7DirectoryInode = BatchInodeEntry & {
58
298
  kind: 'directory';
59
299
  isDir: true;
60
300
  };
301
+ /** `call`: the file is a W7DataCall's bytes (its path, mode and size), not an upsert's inode. */
61
302
  type W7ContentInode = BatchInodeEntry & {
62
303
  kind: 'file' | 'symlink';
63
304
  isDir: false;
305
+ call?: W7DataCall;
306
+ offset?: number;
307
+ umask?: number;
308
+ description?: string;
64
309
  };
65
310
  export type W7DecodedRecord = {
66
311
  type: 'delete';
@@ -86,17 +331,44 @@ export type W7DecodedRecord = {
86
331
  size: number;
87
332
  chunkCount: number;
88
333
  check: number;
334
+ } | {
335
+ type: 'rename';
336
+ from: string;
337
+ to: string;
338
+ } | {
339
+ type: 'truncate';
340
+ path: string;
341
+ size: number;
342
+ } | {
343
+ type: 'setattr';
344
+ path: string;
345
+ attrs: W7Attrs;
346
+ } | {
347
+ type: 'call';
348
+ call: W7PathCall;
89
349
  } | {
90
350
  type: 'batch-end';
91
351
  summary: W7BatchSummary;
92
352
  };
93
353
  export interface W7DecodedStream {
94
354
  readonly batchId: string;
95
- readonly mode: typeof MODE;
355
+ readonly mode: W7Mode;
96
356
  readonly records: AsyncIterable<W7DecodedRecord>;
97
357
  }
98
- /** Encode one bounded record per pull; no batch-sized metadata header exists. */
358
+ /**
359
+ * Encode the records a pull reaches into one enqueued chunk of about
360
+ * ENCODER_PULL_BYTES (a record never splits; a file's chunk is at most
361
+ * CHUNK_SIZE), so a wave crosses the RPC boundary in a few writes rather than
362
+ * one per record. The bytes are the same records either way; no batch-sized
363
+ * metadata header exists.
364
+ */
99
365
  export declare function encodeWriteBatchStream(payload: BatchWritePayload): ReadableStream<Uint8Array>;
366
+ /**
367
+ * The bytes encodeWriteBatchStream would stream for `payload`, as one buffer:
368
+ * for a payload held in memory (no streamed sources), the same records in
369
+ * the same order, copied once.
370
+ */
371
+ export declare function encodeWriteBatch(payload: BatchWritePayload): Promise<Uint8Array>;
100
372
  /**
101
373
  * Parse the v3 preamble eagerly, then expose validated operation records
102
374
  * incrementally. Chunk credit is acquired after its bounded header validates
@@ -1 +1 @@
1
- {"version":3,"file":"w7-frame.d.ts","sourceRoot":"","sources":["../src/w7-frame.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;AAE5D,sDAAsD;AACtD,MAAM,WAAW,eAAe;IAC9B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