@nimbus-sh/core 0.6.0 → 0.7.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.
Files changed (88) hide show
  1. package/README.md +47 -26
  2. package/dist/_shared/byte-stream.d.ts +5 -4
  3. package/dist/_shared/byte-stream.d.ts.map +1 -1
  4. package/dist/_shared/real-node-imports.d.ts +7 -0
  5. package/dist/_shared/real-node-imports.d.ts.map +1 -1
  6. package/dist/_shared/real-node-imports.js +8 -0
  7. package/dist/_shared/tarball.d.ts +23 -5
  8. package/dist/_shared/tarball.d.ts.map +1 -1
  9. package/dist/_shared/tarball.js +38 -5
  10. package/dist/_shared/vfs-write-ledger.d.ts.map +1 -1
  11. package/dist/_shared/vfs-write-ledger.js +22 -16
  12. package/dist/runtime/comment-strip.d.ts +0 -35
  13. package/dist/runtime/comment-strip.d.ts.map +1 -1
  14. package/dist/runtime/comment-strip.js +48 -20
  15. package/dist/runtime/esbuild-service.d.ts +38 -42
  16. package/dist/runtime/esbuild-service.d.ts.map +1 -1
  17. package/dist/runtime/esbuild-service.js +494 -197
  18. package/dist/runtime/javascript-ast.d.ts.map +1 -1
  19. package/dist/runtime/javascript-ast.js +45 -7
  20. package/dist/runtime/opentui-wasm-backend.d.ts.map +1 -1
  21. package/dist/runtime/opentui-wasm-backend.js +18 -16
  22. package/dist/runtime/port-registry.d.ts +4 -2
  23. package/dist/runtime/port-registry.d.ts.map +1 -1
  24. package/dist/runtime/port-registry.js +60 -8
  25. package/dist/shell/stdin-adapter.d.ts +11 -0
  26. package/dist/shell/stdin-adapter.d.ts.map +1 -0
  27. package/dist/shell/stdin-adapter.js +59 -0
  28. package/dist/shell/unix-commands.d.ts +2 -1
  29. package/dist/shell/unix-commands.d.ts.map +1 -1
  30. package/dist/shell/unix-commands.js +1078 -50
  31. package/dist/substrate/lifo/commands/io/dd.js +1 -1
  32. package/dist/substrate/lifo/commands/net/curl.d.ts.map +1 -1
  33. package/dist/substrate/lifo/commands/net/curl.js +270 -54
  34. package/dist/substrate/lifo/commands/system/npm.d.ts +18 -1
  35. package/dist/substrate/lifo/commands/system/npm.d.ts.map +1 -1
  36. package/dist/substrate/lifo/commands/system/npm.js +26 -43
  37. package/dist/substrate/lifo/commands/text/head.d.ts.map +1 -1
  38. package/dist/substrate/lifo/commands/text/head.js +2 -1
  39. package/dist/substrate/lifo/commands/text/sed.d.ts.map +1 -1
  40. package/dist/substrate/lifo/commands/text/sed.js +499 -117
  41. package/dist/substrate/lifo/commands/types.d.ts +8 -4
  42. package/dist/substrate/lifo/commands/types.d.ts.map +1 -1
  43. package/dist/substrate/lifo/node-compat/zlib.d.ts +37 -18
  44. package/dist/substrate/lifo/node-compat/zlib.d.ts.map +1 -1
  45. package/dist/substrate/lifo/node-compat/zlib.js +122 -23
  46. package/dist/substrate/lifo/shell/interpreter.d.ts +9 -1
  47. package/dist/substrate/lifo/shell/interpreter.d.ts.map +1 -1
  48. package/dist/substrate/lifo/shell/interpreter.js +79 -29
  49. package/dist/substrate/lifo/shell/pipe.d.ts +16 -0
  50. package/dist/substrate/lifo/shell/pipe.d.ts.map +1 -1
  51. package/dist/substrate/lifo/shell/pipe.js +62 -18
  52. package/dist/substrate/lifo/shell/terminal-stdin.d.ts +20 -3
  53. package/dist/substrate/lifo/shell/terminal-stdin.d.ts.map +1 -1
  54. package/dist/substrate/lifo/shell/terminal-stdin.js +60 -24
  55. package/dist/vfs/sqlite-vfs.d.ts +19 -0
  56. package/dist/vfs/sqlite-vfs.d.ts.map +1 -1
  57. package/dist/vfs/sqlite-vfs.js +106 -23
  58. package/dist/workspace/nimbus-workspace.d.ts +15 -0
  59. package/dist/workspace/nimbus-workspace.d.ts.map +1 -1
  60. package/dist/workspace/nimbus-workspace.js +20 -3
  61. package/dist/workspace/supervisor-op.d.ts +23 -0
  62. package/dist/workspace/supervisor-op.d.ts.map +1 -0
  63. package/dist/workspace/supervisor-op.js +92 -0
  64. package/package.json +2 -2
  65. package/src/_shared/byte-stream.ts +5 -4
  66. package/src/_shared/real-node-imports.ts +8 -0
  67. package/src/_shared/tarball.ts +56 -5
  68. package/src/_shared/vfs-write-ledger.ts +22 -16
  69. package/src/runtime/comment-strip.ts +42 -23
  70. package/src/runtime/esbuild-service.ts +566 -217
  71. package/src/runtime/javascript-ast.ts +40 -9
  72. package/src/runtime/opentui-wasm-backend.ts +19 -17
  73. package/src/runtime/port-registry.ts +66 -8
  74. package/src/shell/stdin-adapter.ts +58 -0
  75. package/src/shell/unix-commands.ts +1054 -50
  76. package/src/substrate/lifo/commands/io/dd.ts +2 -2
  77. package/src/substrate/lifo/commands/net/curl.ts +310 -58
  78. package/src/substrate/lifo/commands/system/npm.ts +58 -38
  79. package/src/substrate/lifo/commands/text/head.ts +2 -1
  80. package/src/substrate/lifo/commands/text/sed.ts +519 -109
  81. package/src/substrate/lifo/commands/types.ts +8 -5
  82. package/src/substrate/lifo/node-compat/zlib.ts +155 -26
  83. package/src/substrate/lifo/shell/interpreter.ts +74 -27
  84. package/src/substrate/lifo/shell/pipe.ts +65 -24
  85. package/src/substrate/lifo/shell/terminal-stdin.ts +66 -30
  86. package/src/vfs/sqlite-vfs.ts +104 -23
  87. package/src/workspace/nimbus-workspace.ts +26 -2
  88. package/src/workspace/supervisor-op.ts +117 -0
@@ -1,12 +1,25 @@
1
+ import { encode } from '../utils/encoding.js';
2
+ /**
3
+ * A shell pipe that carries the producer's exact bytes. Text writes are
4
+ * encoded once at the write side, `writeBytes` stores bytes verbatim, and
5
+ * the text view (`read`/`readAll`/`readLine`) decodes progressively so a
6
+ * multi-byte UTF-8 sequence split across chunks survives intact.
7
+ */
1
8
  export class PipeChannel {
2
9
  buffer = [];
3
10
  closed = false;
4
11
  waiting = [];
12
+ decoder = new TextDecoder('utf-8');
5
13
  writer = {
6
14
  write: (text) => {
7
15
  if (this.closed)
8
16
  return;
9
- this.deliver(text, 'back');
17
+ this.deliver(encode(text), 'back');
18
+ },
19
+ writeBytes: (bytes) => {
20
+ if (this.closed)
21
+ return;
22
+ this.deliver(bytes, 'back');
10
23
  },
11
24
  };
12
25
  reader = {
@@ -15,7 +28,8 @@ export class PipeChannel {
15
28
  readLine: () => this.readLine(),
16
29
  readBytes: (maxLength) => this.readBytes(maxLength),
17
30
  };
18
- read() {
31
+ /** Next queued chunk, a waiter's delivery, or null once closed and empty. */
32
+ pull() {
19
33
  if (this.buffer.length > 0) {
20
34
  return Promise.resolve(this.buffer.shift() ?? null);
21
35
  }
@@ -26,6 +40,18 @@ export class PipeChannel {
26
40
  this.waiting.push(resolve);
27
41
  });
28
42
  }
43
+ async read() {
44
+ while (true) {
45
+ const bytes = await this.pull();
46
+ if (bytes === null) {
47
+ const tail = this.decoder.decode();
48
+ return tail.length > 0 ? tail : null;
49
+ }
50
+ const text = this.decoder.decode(bytes, { stream: true });
51
+ if (text.length > 0)
52
+ return text;
53
+ }
54
+ }
29
55
  async readAll() {
30
56
  const parts = [];
31
57
  while (true) {
@@ -38,30 +64,48 @@ export class PipeChannel {
38
64
  }
39
65
  async readLine() {
40
66
  let line = '';
67
+ let sawAny = false;
41
68
  while (true) {
42
- const chunk = await this.read();
43
- if (chunk === null)
44
- return line.length > 0 ? line : null;
45
- const newline = chunk.indexOf('\n');
69
+ const bytes = await this.pull();
70
+ if (bytes === null)
71
+ break;
72
+ sawAny = true;
73
+ // Split on the raw 0x0A byte so pushback returns ORIGINAL bytes; a
74
+ // multibyte sequence straddling the chunk boundary then survives as
75
+ // é instead of collapsing into a replacement character.
76
+ const newline = bytes.indexOf(0x0a);
46
77
  if (newline >= 0) {
47
- const rest = chunk.slice(newline + 1);
78
+ const rest = bytes.subarray(newline + 1);
48
79
  if (rest.length > 0)
49
80
  this.deliver(rest, 'front');
50
- return line + chunk.slice(0, newline);
81
+ line += this.decoder.decode(bytes.subarray(0, newline), { stream: true });
82
+ const flushed = this.decoder.decode();
83
+ return line + flushed;
51
84
  }
52
- line += chunk;
85
+ line += this.decoder.decode(bytes, { stream: true });
53
86
  }
87
+ // A trailing incomplete sequence still surfaces as U+FFFD at EOF.
88
+ const tail = this.decoder.decode();
89
+ line += tail;
90
+ return sawAny || tail.length > 0 ? line : null;
54
91
  }
92
+ /**
93
+ * Bounded byte read: returns whatever the producer has already delivered,
94
+ * capped at maxLength. maxLength bounds the result, it is never a fill
95
+ * target — waiting to complete it would stall every consumer downstream of
96
+ * a live open producer. A larger chunk keeps only its first maxLength
97
+ * bytes; the remainder stays queued in original order.
98
+ */
55
99
  async readBytes(maxLength) {
56
100
  if (maxLength <= 0)
57
- return '';
58
- const chunk = await this.read();
101
+ return new Uint8Array(0);
102
+ const chunk = await this.pull();
59
103
  if (chunk === null)
60
104
  return null;
61
105
  if (chunk.length <= maxLength)
62
106
  return chunk;
63
- this.deliver(chunk.slice(maxLength), 'front');
64
- return chunk.slice(0, maxLength);
107
+ this.buffer.unshift(chunk.subarray(maxLength));
108
+ return chunk.subarray(0, maxLength);
65
109
  }
66
110
  close() {
67
111
  this.closed = true;
@@ -70,17 +114,17 @@ export class PipeChannel {
70
114
  resolve(null);
71
115
  }
72
116
  }
73
- deliver(text, position) {
74
- if (text.length === 0)
117
+ deliver(bytes, position) {
118
+ if (bytes.length === 0)
75
119
  return;
76
120
  if (this.waiting.length > 0) {
77
121
  const resolve = this.waiting.shift();
78
- resolve(text);
122
+ resolve(bytes);
79
123
  return;
80
124
  }
81
125
  if (position === 'front')
82
- this.buffer.unshift(text);
126
+ this.buffer.unshift(bytes);
83
127
  else
84
- this.buffer.push(text);
128
+ this.buffer.push(bytes);
85
129
  }
86
130
  }
@@ -1,13 +1,16 @@
1
1
  import type { TerminalInputStream } from '../commands/types.js';
2
2
  /**
3
- * A bridge between terminal keyboard input and command stdin.
4
- * The Shell feeds lines in via feed(), commands consume via read()/readAll().
3
+ * A bridge between terminal keyboard input and command stdin. The Shell
4
+ * feeds lines in via feed(); commands consume bytes or text. Bytes are the
5
+ * storage format, so a byte read always makes progress even when maxLength
6
+ * splits a multi-byte code point — `dd bs=1` over `é` yields c3, then a9.
5
7
  */
6
8
  export declare class TerminalStdin implements TerminalInputStream {
7
9
  private buffer;
8
10
  private closed;
9
11
  private resolvers;
10
12
  private _rawMode;
13
+ private decoder;
11
14
  /** True when a command has called read() and is waiting for input. */
12
15
  get isWaiting(): boolean;
13
16
  /** When true, the shell should bypass line editing and feed raw keypresses. */
@@ -20,9 +23,23 @@ export declare class TerminalStdin implements TerminalInputStream {
20
23
  /** Commands consume input. Returns null on EOF. */
21
24
  read(): Promise<string | null>;
22
25
  readLine(): Promise<string | null>;
23
- readBytes(maxLength: number): Promise<string | null>;
26
+ /**
27
+ * Bounded byte read: returns whatever the user has already typed, capped
28
+ * at maxLength. maxLength bounds the result, it is never a fill target —
29
+ * a command reading bytes must not stall until maxLength arrive. A larger
30
+ * queued chunk keeps only its first maxLength bytes; the remainder stays
31
+ * queued, so `dd bs=1` over `é` still yields c3, then a9.
32
+ */
33
+ readBytes(maxLength: number): Promise<Uint8Array | null>;
24
34
  /** Read all remaining input until EOF, joined together. */
25
35
  readAll(): Promise<string>;
36
+ /**
37
+ * Text snapshot of everything queued but not yet consumed. The shell's
38
+ * wrap layer uses this for commands that want drained terminal input.
39
+ */
40
+ drainBuffered(): string;
41
+ private pull;
26
42
  private deliver;
43
+ private deliverBackText;
27
44
  }
28
45
  //# sourceMappingURL=terminal-stdin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"terminal-stdin.d.ts","sourceRoot":"","sources":["../../../../src/substrate/lifo/shell/terminal-stdin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE;;;GAGG;AACH,qBAAa,aAAc,YAAW,mBAAmB;IACvD,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAA6C;IAC9D,OAAO,CAAC,QAAQ,CAAS;IAEzB,sEAAsE;IACtE,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED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C;IAiBxC;;;;;;OAMG;IACG,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAU9D,2DAA2D;IACrD,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAUhC;;;OAGG;IACH,aAAa,IAAI,MAAM;IASvB,OAAO,CAAC,IAAI;IAYZ,OAAO,CAAC,OAAO;IAaf,OAAO,CAAC,eAAe;CAGxB"}
@@ -1,12 +1,16 @@
1
+ import { encode } from '../utils/encoding.js';
1
2
  /**
2
- * A bridge between terminal keyboard input and command stdin.
3
- * The Shell feeds lines in via feed(), commands consume via read()/readAll().
3
+ * A bridge between terminal keyboard input and command stdin. The Shell
4
+ * feeds lines in via feed(); commands consume bytes or text. Bytes are the
5
+ * storage format, so a byte read always makes progress even when maxLength
6
+ * splits a multi-byte code point — `dd bs=1` over `é` yields c3, then a9.
4
7
  */
5
8
  export class TerminalStdin {
6
9
  buffer = [];
7
10
  closed = false;
8
11
  resolvers = [];
9
12
  _rawMode = false;
13
+ decoder = new TextDecoder('utf-8');
10
14
  /** True when a command has called read() and is waiting for input. */
11
15
  get isWaiting() {
12
16
  return this.resolvers.length > 0;
@@ -20,14 +24,12 @@ export class TerminalStdin {
20
24
  }
21
25
  /** Shell calls this on Enter (with line + '\n'). */
22
26
  feed(text) {
23
- if (this.closed)
27
+ if (this.closed || text === '')
24
28
  return;
25
- this.deliver(text, 'back');
29
+ this.deliver(encode(text), 'back');
26
30
  }
27
31
  /** Shell calls this on Ctrl+D to signal EOF. */
28
32
  close() {
29
- if (this.closed)
30
- return;
31
33
  this.closed = true;
32
34
  while (this.resolvers.length > 0) {
33
35
  const resolve = this.resolvers.shift();
@@ -36,15 +38,16 @@ export class TerminalStdin {
36
38
  }
37
39
  /** Commands consume input. Returns null on EOF. */
38
40
  async read() {
39
- if (this.buffer.length > 0) {
40
- return this.buffer.shift();
41
- }
42
- if (this.closed) {
43
- return null;
41
+ while (true) {
42
+ const bytes = await this.pull();
43
+ if (bytes === null) {
44
+ const tail = this.decoder.decode();
45
+ return tail.length > 0 ? tail : null;
46
+ }
47
+ const text = this.decoder.decode(bytes, { stream: true });
48
+ if (text.length > 0)
49
+ return text;
44
50
  }
45
- return new Promise((resolve) => {
46
- this.resolvers.push(resolve);
47
- });
48
51
  }
49
52
  async readLine() {
50
53
  let line = '';
@@ -56,22 +59,29 @@ export class TerminalStdin {
56
59
  if (newline >= 0) {
57
60
  const rest = chunk.slice(newline + 1);
58
61
  if (rest.length > 0)
59
- this.deliver(rest, 'front');
62
+ this.deliverBackText(rest);
60
63
  return line + chunk.slice(0, newline);
61
64
  }
62
65
  line += chunk;
63
66
  }
64
67
  }
68
+ /**
69
+ * Bounded byte read: returns whatever the user has already typed, capped
70
+ * at maxLength. maxLength bounds the result, it is never a fill target —
71
+ * a command reading bytes must not stall until maxLength arrive. A larger
72
+ * queued chunk keeps only its first maxLength bytes; the remainder stays
73
+ * queued, so `dd bs=1` over `é` still yields c3, then a9.
74
+ */
65
75
  async readBytes(maxLength) {
66
76
  if (maxLength <= 0)
67
- return '';
68
- const chunk = await this.read();
77
+ return new Uint8Array(0);
78
+ const chunk = await this.pull();
69
79
  if (chunk === null)
70
80
  return null;
71
81
  if (chunk.length <= maxLength)
72
82
  return chunk;
73
- this.deliver(chunk.slice(maxLength), 'front');
74
- return chunk.slice(0, maxLength);
83
+ this.buffer.unshift(chunk.subarray(maxLength));
84
+ return chunk.subarray(0, maxLength);
75
85
  }
76
86
  /** Read all remaining input until EOF, joined together. */
77
87
  async readAll() {
@@ -84,17 +94,43 @@ export class TerminalStdin {
84
94
  }
85
95
  return parts.join('');
86
96
  }
87
- deliver(text, position) {
88
- if (text.length === 0)
97
+ /**
98
+ * Text snapshot of everything queued but not yet consumed. The shell's
99
+ * wrap layer uses this for commands that want drained terminal input.
100
+ */
101
+ drainBuffered() {
102
+ let text = '';
103
+ while (this.buffer.length > 0) {
104
+ text += this.decoder.decode(this.buffer.shift(), { stream: true });
105
+ }
106
+ text += this.decoder.decode();
107
+ return text;
108
+ }
109
+ pull() {
110
+ if (this.buffer.length > 0) {
111
+ return Promise.resolve(this.buffer.shift() ?? null);
112
+ }
113
+ if (this.closed) {
114
+ return Promise.resolve(null);
115
+ }
116
+ return new Promise((resolve) => {
117
+ this.resolvers.push(resolve);
118
+ });
119
+ }
120
+ deliver(bytes, position) {
121
+ if (bytes.length === 0)
89
122
  return;
90
123
  if (this.resolvers.length > 0) {
91
124
  const resolve = this.resolvers.shift();
92
- resolve(text);
125
+ resolve(bytes);
93
126
  return;
94
127
  }
95
128
  if (position === 'front')
96
- this.buffer.unshift(text);
129
+ this.buffer.unshift(bytes);
97
130
  else
98
- this.buffer.push(text);
131
+ this.buffer.push(bytes);
132
+ }
133
+ deliverBackText(text) {
134
+ this.deliver(encode(text), 'front');
99
135
  }
100
136
  }
@@ -186,6 +186,7 @@ export declare class SqliteVFS {
186
186
  private _usedBytes;
187
187
  private _revision;
188
188
  private _pathRevisions;
189
+ private transactionPublication;
189
190
  private readonly _epoch;
190
191
  private _invalidations;
191
192
  private _invalidationBytes;
@@ -615,6 +616,24 @@ export declare class SqliteVFS {
615
616
  private _estimateBatchBytes;
616
617
  private errorMessage;
617
618
  private isSqliteNoMem;
619
+ /**
620
+ * Participate in an embedder's synchronous transaction: VFS writes and SQL
621
+ * issued by callback commit together; on rollback the in-memory mirror
622
+ * returns to the committed state before the error is rethrown with cause.
623
+ *
624
+ * This method MUST own the outermost transaction on this VFS's SQL host;
625
+ * use it instead of wrapping VFS calls in storage.transactionSync. Do not
626
+ * nest it, return a Promise/thenable, or start asynchronous work inside it.
627
+ * The callback may read its writes. Revisions and events publish only on
628
+ * commit, once for the combined mutation. Existing credential checks apply.
629
+ *
630
+ * Inodes are an always-resident cache (absence means ENOENT), so rollback
631
+ * discards cached chunks and rebuilds metadata/children/counters from SQL.
632
+ * No inode snapshot or undo log is retained. Recovery failure is surfaced
633
+ * with both errors; the embedder must discard this VFS in that case.
634
+ */
635
+ withTransaction<T>(callback: () => T): T;
636
+ private emitMutation;
618
637
  private transactionSync;
619
638
  private executeTransactionPlan;
620
639
  private executeMeasuredTransaction;
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-vfs.d.ts","sourceRoot":"","sources":["../../src/vfs/sqlite-vfs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,eAAe,EAAqB,MAAM,aAAa,CAAC;AAkBjE,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAElB,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,kBAAkB,EAEvB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,4BAA4B,CAAC;AAmCpC,YAAY,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,YAAY,GACb,MAAM,iCAAiC,CAAC;AAEzC,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC;CAC5C;AAmBD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,WAAW,CAAC,IAAI,EAAE,MA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AAM,GAAG,UAAU;IAIlE,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI;IAO1D,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI;IAOhE,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAEzC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAC5B,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IACvC,IAAI,CAAC,GAAG,EAAE,MAAM;IAChB,OAAO,CAAC,GAAG,EAAE,MAAM;cAh8JY,MAAM;cAAQ,YAAY;;IAi8JzD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAEzB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI;IAIxD,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IACxB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAClC,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IACpC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IACtC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;CAGjE"}
@@ -306,10 +306,9 @@ export class SqliteVFS {
306
306
  _lruShrinkRefcount = 0;
307
307
  // ── Running counters for O(1) getStats() (B3 / AUDIT M10 / M-S8) ──
308
308
  // Replaces the triple scan of this.inodes on every /api/stats poll.
309
- // Bootstrapped in loadInodes(); maintained at every mutator entry:
310
- // mkdir/rmdir/writeFile/unlink/writeBatch (rename is a no-op
311
- // same inode, new path). Invariant: these match a fresh O(N)
312
- // walk of this.inodes. Unit-tested in the A5/B3 runtime tests.
309
+ // Bootstrapped in loadInodes(); maintained at committed publication by
310
+ // mkdir, batch writes/deletes and rename. These match a fresh O(N)
311
+ // walk of this.inodes; rollback reloads them from the durable rows.
313
312
  _totalFiles = 0;
314
313
  _totalDirs = 0;
315
314
  _usedBytes = 0;
@@ -323,6 +322,7 @@ export class SqliteVFS {
323
322
  // so unrelated writes no longer invalidate them. In-memory only — the
324
323
  // clock resets with the DO lifetime, exactly like the caches keyed on it.
325
324
  _pathRevisions = new Map();
325
+ transactionPublication = null;
326
326
  // ── Invalidation log (facet cache coherence) ──────────────────────────
327
327
  // A facet's resident set is a cache of this VFS, and it learns what to
328
328
  // drop by asking `invalidatedSince(cursor)` for the delta. _pathRevisions
@@ -1255,6 +1255,11 @@ export class SqliteVFS {
1255
1255
  * additional coverage, since no facet view keys on a grandparent.
1256
1256
  */
1257
1257
  bumpRevision(paths) {
1258
+ if (this.transactionPublication) {
1259
+ for (const path of paths)
1260
+ this.transactionPublication.paths.add(path);
1261
+ return;
1262
+ }
1258
1263
  const rev = ++this._revision;
1259
1264
  for (const path of paths) {
1260
1265
  let p = normalizeVfsPath(path);
@@ -1455,7 +1460,7 @@ export class SqliteVFS {
1455
1460
  this._addToChildrenIndex(pp, path);
1456
1461
  this._totalDirs++; // B3
1457
1462
  this.bumpRevision([path]);
1458
- this.events.emit('addDir', path);
1463
+ this.emitMutation('addDir', path);
1459
1464
  }
1460
1465
  writeFile(path, content, options, cred, onCommit) {
1461
1466
  this.assertMutationsAllowed([path]);
@@ -2224,11 +2229,11 @@ export class SqliteVFS {
2224
2229
  }
2225
2230
  const atime = atimeMs !== null && Number.isFinite(atimeMs) ? Math.trunc(atimeMs) : this.now();
2226
2231
  const mtime = mtimeMs !== null && Number.isFinite(mtimeMs) ? Math.trunc(mtimeMs) : this.now();
2232
+ this.sql.exec("UPDATE inodes SET atime = ?, mtime = ? WHERE path = ?", atime, mtime, inode.path);
2227
2233
  inode.atime = atime;
2228
2234
  inode.mtime = mtime;
2229
- this.sql.exec("UPDATE inodes SET atime = ?, mtime = ? WHERE path = ?", atime, mtime, inode.path);
2230
2235
  this.bumpRevision([inode.path]);
2231
- this.events.emit('change', inode.path);
2236
+ this.emitMutation('change', inode.path);
2232
2237
  }
2233
2238
  /**
2234
2239
  * Set the permission bits durably. Follows symlinks (POSIX chmod).
@@ -2266,10 +2271,10 @@ export class SqliteVFS {
2266
2271
  }
2267
2272
  this.assertMutationsAllowed([inode.path]);
2268
2273
  const full = inodeTypeBits(inode.kind) | (mode & 0o7777);
2269
- inode.mode = full;
2270
2274
  this.sql.exec("UPDATE inodes SET mode = ? WHERE path = ?", full, inode.path);
2275
+ inode.mode = full;
2271
2276
  this.bumpRevision([inode.path]);
2272
- this.events.emit('change', inode.path);
2277
+ this.emitMutation('change', inode.path);
2273
2278
  }
2274
2279
  chown(path, uid, gid, cred, followLeaf) {
2275
2280
  const resolved = this.checkAccess(path, 0, cred, { followLeaf });
@@ -2291,13 +2296,15 @@ export class SqliteVFS {
2291
2296
  if (gid !== null && gid === inode.gid && cred.uid !== 0 && !owner)
2292
2297
  throw vfsError('EPERM', resolved.path);
2293
2298
  this.assertMutationsAllowed([inode.path]);
2294
- inode.uid = uid ?? inode.uid;
2295
- inode.gid = gid ?? inode.gid;
2296
- if (cred.uid !== 0)
2297
- inode.mode &= ~0o6000;
2298
- this.sql.exec('UPDATE inodes SET uid = ?, gid = ?, mode = ? WHERE path = ?', inode.uid, inode.gid, inode.mode, inode.path);
2299
+ const nextUid = uid ?? inode.uid;
2300
+ const nextGid = gid ?? inode.gid;
2301
+ const nextMode = cred.uid === 0 ? inode.mode : inode.mode & ~0o6000;
2302
+ this.sql.exec('UPDATE inodes SET uid = ?, gid = ?, mode = ? WHERE path = ?', nextUid, nextGid, nextMode, inode.path);
2303
+ inode.uid = nextUid;
2304
+ inode.gid = nextGid;
2305
+ inode.mode = nextMode;
2299
2306
  this.bumpRevision([inode.path]);
2300
- this.events.emit('change', inode.path);
2307
+ this.emitMutation('change', inode.path);
2301
2308
  }
2302
2309
  /**
2303
2310
  * Enumerate the filesystem, one bounded page at a time.
@@ -2507,7 +2514,14 @@ export class SqliteVFS {
2507
2514
  }
2508
2515
  rename(oldPath, newPath, cred) {
2509
2516
  this.assertMutationsAllowed([oldPath, newPath]);
2510
- this.checkAccess(oldPath, 0, cred, { followLeaf: false });
2517
+ // Resolve private /tmp names to storage keys before reading or mutating.
2518
+ const source = this.checkAccess(oldPath, 0, cred, { followLeaf: false });
2519
+ const inode = source.inode;
2520
+ if (!inode)
2521
+ throw vfsError('ENOENT', oldPath);
2522
+ const target = this.checkAccess(newPath, 0, cred, { followLeaf: false, allowMissingLeaf: true });
2523
+ oldPath = source.path;
2524
+ newPath = target.path;
2511
2525
  this.checkParentAccess(oldPath, cred);
2512
2526
  this.checkParentAccess(newPath, cred);
2513
2527
  if (oldPath === newPath)
@@ -2515,9 +2529,6 @@ export class SqliteVFS {
2515
2529
  if (newPath.startsWith(`${oldPath}/`)) {
2516
2530
  throw new Error(`EINVAL: cannot move ${oldPath} inside itself`);
2517
2531
  }
2518
- const inode = this.inodes.get(oldPath);
2519
- if (!inode)
2520
- throw new Error("ENOENT: " + oldPath);
2521
2532
  this.checkStickyParentMutation(oldPath, inode, cred);
2522
2533
  // W-3 (WASI filesystem WASI): if newPath already exists, unlink it first so the
2523
2534
  // SQL UPDATE doesn't conflict on inodes.path uniqueness. POSIX rename(2)
@@ -2526,7 +2537,7 @@ export class SqliteVFS {
2526
2537
  // a 2nd `make` after a prior successful build throws on UPDATE
2527
2538
  // failure. Pre-unlink covers both file-over-file and file-over-dir
2528
2539
  // (the latter is rare but POSIX permits it for empty dirs).
2529
- const destInode = this.inodes.get(newPath);
2540
+ const destInode = target.inode;
2530
2541
  if (destInode) {
2531
2542
  this.checkStickyParentMutation(newPath, destInode, cred);
2532
2543
  if (destInode.isDir) {
@@ -2698,7 +2709,7 @@ export class SqliteVFS {
2698
2709
  }
2699
2710
  }
2700
2711
  this.bumpRevision([...touchedPaths]);
2701
- this.events.emit('rename', newPath, oldPath);
2712
+ this.emitMutation('rename', newPath, oldPath);
2702
2713
  this.runContentMaintenanceSafely(1);
2703
2714
  }
2704
2715
  /**
@@ -3347,6 +3358,76 @@ export class SqliteVFS {
3347
3358
  }
3348
3359
  return this.errorMessage(error).toUpperCase().includes('SQLITE_NOMEM');
3349
3360
  }
3361
+ /**
3362
+ * Participate in an embedder's synchronous transaction: VFS writes and SQL
3363
+ * issued by callback commit together; on rollback the in-memory mirror
3364
+ * returns to the committed state before the error is rethrown with cause.
3365
+ *
3366
+ * This method MUST own the outermost transaction on this VFS's SQL host;
3367
+ * use it instead of wrapping VFS calls in storage.transactionSync. Do not
3368
+ * nest it, return a Promise/thenable, or start asynchronous work inside it.
3369
+ * The callback may read its writes. Revisions and events publish only on
3370
+ * commit, once for the combined mutation. Existing credential checks apply.
3371
+ *
3372
+ * Inodes are an always-resident cache (absence means ENOENT), so rollback
3373
+ * discards cached chunks and rebuilds metadata/children/counters from SQL.
3374
+ * No inode snapshot or undo log is retained. Recovery failure is surfaced
3375
+ * with both errors; the embedder must discard this VFS in that case.
3376
+ */
3377
+ withTransaction(callback) {
3378
+ if (this.transactionPublication !== null) {
3379
+ throw new Error('[sqlite-vfs] nested embedder transactions are not supported');
3380
+ }
3381
+ const storage = this.ctx.storage;
3382
+ if (!storage)
3383
+ throw new Error('[sqlite-vfs] atomic storage operation requires transactionSync');
3384
+ const publication = {
3385
+ paths: new Set(),
3386
+ events: new Array(),
3387
+ };
3388
+ const maintenancePending = this.maintenancePending;
3389
+ this.transactionPublication = publication;
3390
+ let result;
3391
+ try {
3392
+ result = storage.transactionSync(() => {
3393
+ const value = callback();
3394
+ if (value !== null && (typeof value === 'object' || typeof value === 'function')
3395
+ && 'then' in value && typeof value.then === 'function') {
3396
+ throw new TypeError('[sqlite-vfs] transaction callback must be synchronous');
3397
+ }
3398
+ return value;
3399
+ });
3400
+ }
3401
+ catch (error) {
3402
+ this.evictAll();
3403
+ this.maintenancePending = maintenancePending;
3404
+ try {
3405
+ this.loadInodes();
3406
+ }
3407
+ catch (reloadError) {
3408
+ throw new AggregateError([error, reloadError], '[sqlite-vfs] transaction rollback reload failed', { cause: error });
3409
+ }
3410
+ throw new Error('[sqlite-vfs] embedder transaction rolled back', { cause: error });
3411
+ }
3412
+ finally {
3413
+ this.transactionPublication = null;
3414
+ }
3415
+ if (publication.paths.size > 0)
3416
+ this.bumpRevision([...publication.paths]);
3417
+ for (const event of publication.events) {
3418
+ this.events.emit(event.type, event.path, event.oldPath);
3419
+ }
3420
+ this.runContentMaintenanceSafely(1);
3421
+ return result;
3422
+ }
3423
+ emitMutation(type, path, oldPath) {
3424
+ if (this.transactionPublication) {
3425
+ this.transactionPublication.events.push({ type, path, oldPath });
3426
+ }
3427
+ else {
3428
+ this.events.emit(type, path, oldPath);
3429
+ }
3430
+ }
3350
3431
  transactionSync(callback) {
3351
3432
  if (!this.ctx?.storage?.transactionSync) {
3352
3433
  throw new Error('[sqlite-vfs] atomic storage operation requires transactionSync');
@@ -3602,6 +3683,8 @@ export class SqliteVFS {
3602
3683
  return { transactions };
3603
3684
  }
3604
3685
  runContentMaintenanceSafely(maxTransactions, force = false) {
3686
+ if (this.transactionPublication)
3687
+ return;
3605
3688
  if (!force && !this.maintenancePending)
3606
3689
  return;
3607
3690
  const startedAt = performance.now();
@@ -3907,10 +3990,10 @@ export class SqliteVFS {
3907
3990
  }
3908
3991
  // 5. Events observe the already-published metadata and revision.
3909
3992
  for (const inode of deletedInodes) {
3910
- this.events.emit(inode.isDir ? 'unlinkDir' : 'unlink', inode.path);
3993
+ this.emitMutation(inode.isDir ? 'unlinkDir' : 'unlink', inode.path);
3911
3994
  }
3912
3995
  for (const entry of plan.inodes) {
3913
- this.events.emit(entry.isDir ? 'addDir' : replacedPaths.has(entry.path) ? 'change' : 'add', entry.path);
3996
+ this.emitMutation(entry.isDir ? 'addDir' : replacedPaths.has(entry.path) ? 'change' : 'add', entry.path);
3914
3997
  }
3915
3998
  this.recordDuration(this._postCommitDuration, performance.now() - postCommitStartedAt);
3916
3999
  return { inodes: inodeCount, chunks: chunkCount };