@nimbus-sh/worker 0.5.0 → 0.6.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/dist/_shared/preview-host.d.ts +26 -8
- package/dist/_shared/preview-host.d.ts.map +1 -1
- package/dist/_shared/preview-host.js +51 -11
- package/dist/facets/durable-images.d.ts +9 -0
- package/dist/facets/durable-images.d.ts.map +1 -1
- package/dist/facets/durable-images.js +20 -1
- package/dist/facets/durable-slots.d.ts +1 -1
- package/dist/facets/durable-slots.d.ts.map +1 -1
- package/dist/facets/durable-slots.js +2 -1
- package/dist/facets/manager.d.ts +98 -15
- package/dist/facets/manager.d.ts.map +1 -1
- package/dist/facets/manager.js +443 -116
- package/dist/facets/resident-identity.d.ts +23 -0
- package/dist/facets/resident-identity.d.ts.map +1 -0
- package/dist/facets/resident-identity.js +31 -0
- package/dist/git/commands.d.ts +0 -1
- package/dist/git/commands.d.ts.map +1 -1
- package/dist/git/commands.js +0 -3
- package/dist/router/index.d.ts.map +1 -1
- package/dist/router/index.js +47 -10
- package/dist/router/public-directory.d.ts +5 -1
- package/dist/router/public-directory.d.ts.map +1 -1
- package/dist/router/public-directory.js +9 -2
- package/dist/router/remote-api.d.ts +18 -0
- package/dist/router/remote-api.d.ts.map +1 -1
- package/dist/router/remote-api.js +33 -4
- package/dist/runtime/cpython-resident.d.ts.map +1 -1
- package/dist/runtime/cpython-resident.js +3 -1
- package/dist/runtime/package-manager.d.ts +44 -1
- package/dist/runtime/package-manager.d.ts.map +1 -1
- package/dist/runtime/package-manager.js +168 -3
- package/dist/runtime/ruby-resident.d.ts.map +1 -1
- package/dist/runtime/ruby-resident.js +2 -0
- package/dist/session/agent.d.ts.map +1 -1
- package/dist/session/agent.js +28 -1
- package/dist/session/init.d.ts.map +1 -1
- package/dist/session/init.js +9 -0
- package/dist/session/keys.d.ts +4 -0
- package/dist/session/keys.d.ts.map +1 -1
- package/dist/session/keys.js +4 -0
- package/dist/session/nimbus-session.d.ts +34 -1
- package/dist/session/nimbus-session.d.ts.map +1 -1
- package/dist/session/nimbus-session.js +71 -10
- package/dist/session/port-capability.d.ts +46 -0
- package/dist/session/port-capability.d.ts.map +1 -1
- package/dist/session/port-capability.js +109 -9
- package/dist/session/programmatic.d.ts +95 -1
- package/dist/session/programmatic.d.ts.map +1 -1
- package/dist/session/programmatic.js +350 -26
- package/dist/session/routes.d.ts +9 -0
- package/dist/session/routes.d.ts.map +1 -1
- package/dist/session/routes.js +27 -2
- package/dist/session/rpc.d.ts +24 -1
- package/dist/session/rpc.d.ts.map +1 -1
- package/dist/session/rpc.js +51 -94
- package/dist/session/supervisor-op.d.ts +41 -4
- package/dist/session/supervisor-op.d.ts.map +1 -1
- package/dist/session/supervisor-op.js +95 -73
- package/dist/session/supervisor-rpc.d.ts.map +1 -1
- package/dist/session/supervisor-rpc.js +2 -3
- package/package.json +4 -4
package/dist/session/rpc.js
CHANGED
|
@@ -21,13 +21,12 @@
|
|
|
21
21
|
* these ~3 sites would each need ctx threaded through; cast at boundary
|
|
22
22
|
* is acceptable per plan §IX recommendation 1.
|
|
23
23
|
*/
|
|
24
|
-
import { enc
|
|
24
|
+
import { enc } from '@nimbus-sh/core/_shared/bytes.js';
|
|
25
25
|
import { normalizeTerminalNewlines } from '@nimbus-sh/core/_shared/terminal.js';
|
|
26
26
|
import { disposeRpcResource } from '@nimbus-sh/platform/rpc-dispose.js';
|
|
27
27
|
import { getInnerDoClass } from '@nimbus-sh/fabric/inner-do-registry.js';
|
|
28
28
|
import { NpmCache } from '../npm/cache.js';
|
|
29
29
|
import { EsbuildService } from '@nimbus-sh/core/runtime/esbuild-service.js';
|
|
30
|
-
import { SqliteRuntimeFsBridge } from '@nimbus-sh/core/runtime/sqlite-runtime-fs-bridge.js';
|
|
31
30
|
import { notifyTerminalEvent } from '../runtime/process-logs-api.js';
|
|
32
31
|
import { IsolatePool } from '@nimbus-sh/fabric/isolate-pool.js';
|
|
33
32
|
import { residentBootSpecSchema, } from '@nimbus-sh/fabric/process-fabric.js';
|
|
@@ -40,7 +39,6 @@ import { classifyError } from '@nimbus-sh/platform/oom-classify.js';
|
|
|
40
39
|
import { acquireSupervisorReadAllocation, } from '@nimbus-sh/platform/heavy-alloc-coord.js';
|
|
41
40
|
import { rpcPayloadEnd, rpcPayloadStart, } from '@nimbus-sh/platform/diag-counters.js';
|
|
42
41
|
import { CRED_KERNEL, CRED_SESSION_USER, } from '@nimbus-sh/core/runtime/os-contracts.js';
|
|
43
|
-
import { getSymlinkRegistry } from '@nimbus-sh/core/vfs/symlink-registry.js';
|
|
44
42
|
import { MAX_RPC_SAFE_PAYLOAD_BYTES } from '@nimbus-sh/platform/limits.js';
|
|
45
43
|
import { FS_LIST_PAGE_LIMIT, FS_READ_BATCH_PATH_LIMIT, FS_READ_BATCH_REQUEST_BYTES, } from '@nimbus-sh/core/constants.js';
|
|
46
44
|
import { routeSessionLoopback } from './loopback.js';
|
|
@@ -68,11 +66,6 @@ const WriteBatchPayloadSchema = z.object({
|
|
|
68
66
|
chunks: z.array(WriteBatchChunkSchema).default([]),
|
|
69
67
|
deletePaths: z.array(z.string()).optional(),
|
|
70
68
|
}).passthrough();
|
|
71
|
-
/**
|
|
72
|
-
* Bridge key for the pid-less (host caller) filesystem view. ProcessTable
|
|
73
|
-
* allocates pids from 1 upwards, so 0 can never collide with a process.
|
|
74
|
-
*/
|
|
75
|
-
const HOST_CALLER_KEY = 0;
|
|
76
69
|
function processPid(pid) {
|
|
77
70
|
if (!Number.isInteger(pid) || typeof pid !== 'number' || pid <= 0) {
|
|
78
71
|
throw new Error('filesystem RPC requires a valid process pid');
|
|
@@ -92,26 +85,7 @@ function processPid(pid) {
|
|
|
92
85
|
function callerCred(self, pid) {
|
|
93
86
|
return pid === undefined ? CRED_SESSION_USER : self.processes.cred(processPid(pid));
|
|
94
87
|
}
|
|
95
|
-
function
|
|
96
|
-
self.ensureSqliteFs();
|
|
97
|
-
return self.sqliteFs.as(callerCred(self, pid));
|
|
98
|
-
}
|
|
99
|
-
function runtimeFs(self, pid) {
|
|
100
|
-
const key = pid === undefined ? HOST_CALLER_KEY : processPid(pid);
|
|
101
|
-
const vfs = processVfs(self, pid);
|
|
102
|
-
if (!self.runtimeFsBridges)
|
|
103
|
-
self.runtimeFsBridges = new Map();
|
|
104
|
-
let bridge = self.runtimeFsBridges.get(key);
|
|
105
|
-
if (!bridge) {
|
|
106
|
-
bridge = new SqliteRuntimeFsBridge(vfs, self.sqliteFs);
|
|
107
|
-
self.runtimeFsBridges.set(key, bridge);
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
bridge.updateCredential(vfs);
|
|
111
|
-
}
|
|
112
|
-
return bridge;
|
|
113
|
-
}
|
|
114
|
-
function checkedReadPayloadBytes(bytes) {
|
|
88
|
+
export function checkedReadPayloadBytes(bytes) {
|
|
115
89
|
if (!Number.isSafeInteger(bytes) || bytes < 0) {
|
|
116
90
|
throw new RangeError(`filesystem RPC read size must be a non-negative safe integer: ${bytes}`);
|
|
117
91
|
}
|
|
@@ -129,13 +103,13 @@ function checkedReadPayloadBytes(bytes) {
|
|
|
129
103
|
* `stat` here is a local SQLite lookup inside the DO — the same one
|
|
130
104
|
* `_rpcReadFile` makes for the same reason — not a second round trip.
|
|
131
105
|
*/
|
|
132
|
-
async function rangeReadBytes(fs, path, offset, length) {
|
|
106
|
+
export async function rangeReadBytes(fs, path, offset, length) {
|
|
133
107
|
const stat = await fs.stat(path);
|
|
134
108
|
if (!stat)
|
|
135
109
|
return 0;
|
|
136
110
|
return Math.max(0, Math.min(length, stat.size - offset));
|
|
137
111
|
}
|
|
138
|
-
async function withReadAllocation(bytes, read) {
|
|
112
|
+
export async function withReadAllocation(bytes, read) {
|
|
139
113
|
const payloadBytes = checkedReadPayloadBytes(bytes);
|
|
140
114
|
if (payloadBytes === 0)
|
|
141
115
|
return read();
|
|
@@ -149,15 +123,13 @@ async function withReadAllocation(bytes, read) {
|
|
|
149
123
|
lease.release();
|
|
150
124
|
}
|
|
151
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* `files.readFile` — the read with the supervisor's allocation lease.
|
|
128
|
+
* The body lives in `buildSessionSupervisorOps`'s `readFile` override so
|
|
129
|
+
* direct `_rpc*` calls and the supervisor envelope share it.
|
|
130
|
+
*/
|
|
152
131
|
export async function _rpcReadFile(self, path, pid) {
|
|
153
|
-
|
|
154
|
-
const stat = await fs.stat(path);
|
|
155
|
-
if (!stat)
|
|
156
|
-
return null;
|
|
157
|
-
return withReadAllocation(stat.size, async () => {
|
|
158
|
-
const bytes = await fs.readFile(path);
|
|
159
|
-
return bytes ? dec.decode(bytes) : null;
|
|
160
|
-
});
|
|
132
|
+
return self.supervisorOp({ op: 'readFile', args: [path], pid });
|
|
161
133
|
}
|
|
162
134
|
/**
|
|
163
135
|
* Read a file as raw bytes (Uint8Array). Used by git network facet for
|
|
@@ -165,11 +137,7 @@ export async function _rpcReadFile(self, path, pid) {
|
|
|
165
137
|
* round-tripping through readFile (string) would corrupt bytes.
|
|
166
138
|
*/
|
|
167
139
|
export async function _rpcReadFileBytes(self, path, pid) {
|
|
168
|
-
|
|
169
|
-
const stat = await fs.stat(path);
|
|
170
|
-
if (!stat)
|
|
171
|
-
return null;
|
|
172
|
-
return withReadAllocation(stat.size, () => fs.readFile(path));
|
|
140
|
+
return self.supervisorOp({ op: 'readFileBytes', args: [path], pid });
|
|
173
141
|
}
|
|
174
142
|
/**
|
|
175
143
|
* Phase-3 inner-DO fetch dispatcher. Called by NimbusDOStub.fetch()
|
|
@@ -235,13 +203,10 @@ export async function _rpcInnerDoFetch(self, req) {
|
|
|
235
203
|
}
|
|
236
204
|
}
|
|
237
205
|
export async function _rpcWriteFile(self, path, content, pid) {
|
|
238
|
-
// binary-fs wave:
|
|
239
|
-
//
|
|
240
|
-
//
|
|
241
|
-
|
|
242
|
-
// a Buffer flows through node-shims.ts:writeFileSync which stores it as
|
|
243
|
-
// a plain Uint8Array on the cell — the shape that arrives here.
|
|
244
|
-
return runtimeFs(self, pid).writeFile(path, content);
|
|
206
|
+
// binary-fs wave: the bridge's writeFile already accepts
|
|
207
|
+
// string | Uint8Array — the shape arrives unchanged across structured
|
|
208
|
+
// clone.
|
|
209
|
+
return self.supervisorOp({ op: 'writeFile', args: [path, content], pid });
|
|
245
210
|
}
|
|
246
211
|
/**
|
|
247
212
|
* Write one host-governed file at a session root and let ordinary Unix
|
|
@@ -275,53 +240,52 @@ export async function _rpcWriteProtectedRootFile(self, rootPath, path, content)
|
|
|
275
240
|
fs.chmod(protectedPath, 0o444);
|
|
276
241
|
}
|
|
277
242
|
export async function _rpcStat(self, path, pid) {
|
|
278
|
-
return
|
|
243
|
+
return self.supervisorOp({ op: 'stat', args: [path], pid });
|
|
279
244
|
}
|
|
280
245
|
export async function _rpcLstat(self, path, pid) {
|
|
281
|
-
return
|
|
246
|
+
return self.supervisorOp({ op: 'lstat', args: [path], pid });
|
|
282
247
|
}
|
|
283
248
|
export async function _rpcHasLegacySymlinkUnder(self, path, pid) {
|
|
284
|
-
|
|
285
|
-
return getSymlinkRegistry(self.sqliteFs).hasAtOrBelow(path);
|
|
249
|
+
return self.supervisorOp({ op: 'hasLegacySymlinkUnder', args: [path], pid });
|
|
286
250
|
}
|
|
287
251
|
export async function _rpcUtimes(self, path, atimeMs, mtimeMs, pid) {
|
|
288
|
-
await
|
|
252
|
+
await self.supervisorOp({ op: 'utimes', args: [path, atimeMs, mtimeMs], pid });
|
|
289
253
|
}
|
|
290
254
|
export async function _rpcChmod(self, path, mode, pid) {
|
|
291
|
-
await
|
|
255
|
+
await self.supervisorOp({ op: 'chmod', args: [path, mode], pid });
|
|
292
256
|
}
|
|
293
257
|
export async function _rpcAccess(self, path, mode, pid) {
|
|
294
|
-
await
|
|
258
|
+
await self.supervisorBridge(pid).access(path, mode);
|
|
295
259
|
}
|
|
296
260
|
export async function _rpcChown(self, path, uid, gid, pid, options) {
|
|
297
|
-
await
|
|
261
|
+
await self.supervisorBridge(pid).chown(path, uid, gid, options);
|
|
298
262
|
}
|
|
299
263
|
export async function _rpcSetUmask(self, mask, pid) {
|
|
300
264
|
return self.processes.setUmask(processPid(pid), mask);
|
|
301
265
|
}
|
|
302
266
|
export async function _rpcReaddir(self, path, pid) {
|
|
303
|
-
return
|
|
267
|
+
return self.supervisorOp({ op: 'readdir', args: [path], pid });
|
|
304
268
|
}
|
|
305
269
|
export async function _rpcExists(self, path, pid) {
|
|
306
|
-
return (
|
|
270
|
+
return self.supervisorOp({ op: 'exists', args: [path], pid });
|
|
307
271
|
}
|
|
308
272
|
export async function _rpcMkdir(self, path, pid) {
|
|
309
|
-
await
|
|
273
|
+
await self.supervisorOp({ op: 'mkdir', args: [path], pid });
|
|
310
274
|
}
|
|
311
275
|
export async function _rpcRmdir(self, path, pid) {
|
|
312
|
-
await
|
|
276
|
+
await self.supervisorOp({ op: 'rmdir', args: [path], pid });
|
|
313
277
|
}
|
|
314
278
|
export async function _rpcRename(self, from, to, pid) {
|
|
315
|
-
await
|
|
279
|
+
await self.supervisorOp({ op: 'rename', args: [from, to], pid });
|
|
316
280
|
}
|
|
317
281
|
export async function _rpcReadlink(self, path, pid) {
|
|
318
|
-
return
|
|
282
|
+
return self.supervisorOp({ op: 'readlink', args: [path], pid });
|
|
319
283
|
}
|
|
320
284
|
export async function _rpcSymlink(self, target, path, pid) {
|
|
321
|
-
await
|
|
285
|
+
await self.supervisorOp({ op: 'symlink', args: [target, path], pid });
|
|
322
286
|
}
|
|
323
287
|
const FsRangeOffsetSchema = z.number().int().min(0).finite();
|
|
324
|
-
const FsReadRangeArgsSchema = z.object({
|
|
288
|
+
export const FsReadRangeArgsSchema = z.object({
|
|
325
289
|
path: z.string(),
|
|
326
290
|
offset: FsRangeOffsetSchema,
|
|
327
291
|
length: FsRangeOffsetSchema,
|
|
@@ -366,7 +330,7 @@ const FsListArgsSchema = z.object({
|
|
|
366
330
|
limit: z.number().int().min(1).max(FS_LIST_PAGE_LIMIT).nullable(),
|
|
367
331
|
});
|
|
368
332
|
export async function _rpcFsRevision(self, path, pid) {
|
|
369
|
-
return
|
|
333
|
+
return self.supervisorOp({ op: 'fsRevision', args: [path], pid });
|
|
370
334
|
}
|
|
371
335
|
/**
|
|
372
336
|
* The facet's WebSocket relay. A facet does not open its own sockets: the
|
|
@@ -416,23 +380,21 @@ export async function _rpcWsClose(self, id, code, reason, pid) {
|
|
|
416
380
|
*/
|
|
417
381
|
export async function _rpcFsAcquire(self, epoch, cursor, pid) {
|
|
418
382
|
const args = FsAcquireArgsSchema.parse({ epoch, cursor });
|
|
419
|
-
return
|
|
383
|
+
return self.supervisorBridge(pid).acquire(args.epoch, args.cursor);
|
|
420
384
|
}
|
|
421
385
|
/**
|
|
422
386
|
* Enumerate the session filesystem for a process, one bounded page at a time.
|
|
423
387
|
*
|
|
424
|
-
* Goes through `
|
|
388
|
+
* Goes through `self.supervisorBridge(pid)` like every other fs RPC, so the listing
|
|
425
389
|
* is filtered by the calling process's own credential rather than the kernel's
|
|
426
390
|
* — a process must not learn of a path it could not stat.
|
|
427
391
|
*/
|
|
428
392
|
export async function _rpcFsList(self, after, limit, pid) {
|
|
429
393
|
const args = FsListArgsSchema.parse({ after: after ?? null, limit: limit ?? null });
|
|
430
|
-
return
|
|
394
|
+
return self.supervisorBridge(pid).list(args.after, args.limit ?? undefined);
|
|
431
395
|
}
|
|
432
396
|
export async function _rpcFsReadRange(self, path, offset, length, pid) {
|
|
433
|
-
|
|
434
|
-
const fs = runtimeFs(self, pid);
|
|
435
|
-
return withReadAllocation(await rangeReadBytes(fs, args.path, args.offset, args.length), () => fs.readRange(args.path, args.offset, args.length));
|
|
397
|
+
return self.supervisorOp({ op: 'fsReadRange', args: [path, offset, length], pid });
|
|
436
398
|
}
|
|
437
399
|
/**
|
|
438
400
|
* The same read, through the same process credential and the same bridge, with
|
|
@@ -449,9 +411,7 @@ export async function _rpcFsReadRange(self, path, offset, length, pid) {
|
|
|
449
411
|
* substrate that was supposed to relieve the coordinator damages it instead.
|
|
450
412
|
*/
|
|
451
413
|
export async function _rpcFsReadRangeUncached(self, path, offset, length, pid) {
|
|
452
|
-
|
|
453
|
-
const fs = runtimeFs(self, pid);
|
|
454
|
-
return withReadAllocation(await rangeReadBytes(fs, args.path, args.offset, args.length), () => fs.readRange(args.path, args.offset, args.length, { cached: false }));
|
|
414
|
+
return self.supervisorOp({ op: 'fsReadRangeUncached', args: [path, offset, length], pid });
|
|
455
415
|
}
|
|
456
416
|
/**
|
|
457
417
|
* Read many ranges in ONE round trip.
|
|
@@ -481,7 +441,7 @@ export async function _rpcFsReadBatch(self, requests, pid) {
|
|
|
481
441
|
// Sizing pass. A path this process may not stat contributes nothing and
|
|
482
442
|
// still gets its own entry below — denying one path must not deny the
|
|
483
443
|
// batch, which is what N separate reads would have done.
|
|
484
|
-
const fs =
|
|
444
|
+
const fs = self.supervisorBridge(pid);
|
|
485
445
|
let residentBytes = 0;
|
|
486
446
|
for (const request of args) {
|
|
487
447
|
try {
|
|
@@ -520,7 +480,7 @@ function readBatchEntryError(error) {
|
|
|
520
480
|
}
|
|
521
481
|
export async function _rpcFsWriteRange(self, path, offset, bytes, pid) {
|
|
522
482
|
const args = FsWriteRangeArgsSchema.parse({ path, offset });
|
|
523
|
-
return
|
|
483
|
+
return self.supervisorBridge(pid).writeRange(args.path, args.offset, normalizeWriteBatchChunkData(bytes));
|
|
524
484
|
}
|
|
525
485
|
export async function _rpcFsAppend(self, path, writerId, moduleId, operationId, bytes, pid) {
|
|
526
486
|
const args = FsAppendArgsSchema.parse({ path, writerId, moduleId, operationId });
|
|
@@ -532,7 +492,7 @@ export async function _rpcFsAppend(self, path, writerId, moduleId, operationId,
|
|
|
532
492
|
const data = normalizeWriteBatchChunkData(bytes);
|
|
533
493
|
const digestBytes = new Uint8Array(await crypto.subtle.digest('SHA-256', data));
|
|
534
494
|
const digest = Array.from(digestBytes, (byte) => byte.toString(16).padStart(2, '0')).join('');
|
|
535
|
-
return
|
|
495
|
+
return self.supervisorBridge(pid).appendOnce(args.path, processId, args.writerId, args.moduleId, sequence, digest, data);
|
|
536
496
|
}
|
|
537
497
|
export async function _rpcFsAppendAck(self, writerId, moduleId, operationId, pid) {
|
|
538
498
|
const args = FsAppendAckArgsSchema.parse({ writerId, moduleId, operationId });
|
|
@@ -541,17 +501,16 @@ export async function _rpcFsAppendAck(self, writerId, moduleId, operationId, pid
|
|
|
541
501
|
throw new Error('filesystem append operation exceeds the safe integer range');
|
|
542
502
|
}
|
|
543
503
|
const processId = processPid(pid);
|
|
544
|
-
await
|
|
504
|
+
await self.supervisorBridge(processId).acknowledgeAppend(processId, args.writerId, args.moduleId, sequence);
|
|
545
505
|
}
|
|
546
506
|
export async function _rpcFsTruncate(self, path, size, pid) {
|
|
547
|
-
|
|
548
|
-
await runtimeFs(self, pid).truncate(args.path, args.size);
|
|
507
|
+
await self.supervisorOp({ op: 'fsTruncate', args: [path, size], pid });
|
|
549
508
|
}
|
|
550
509
|
export async function _rpcFsOpen(self, path, flags, pid) {
|
|
551
|
-
return
|
|
510
|
+
return self.supervisorBridge(pid).open(path, flags || {});
|
|
552
511
|
}
|
|
553
512
|
export async function _rpcFsRead(self, handleId, offset, length, pid) {
|
|
554
|
-
return withReadAllocation(length, () =>
|
|
513
|
+
return withReadAllocation(length, () => self.supervisorBridge(pid).read(handleId, offset, length));
|
|
555
514
|
}
|
|
556
515
|
export async function _rpcFsWrite(self, handleId, offset, bytes, pid) {
|
|
557
516
|
let data;
|
|
@@ -561,10 +520,10 @@ export async function _rpcFsWrite(self, handleId, offset, bytes, pid) {
|
|
|
561
520
|
data = new Uint8Array(bytes);
|
|
562
521
|
else
|
|
563
522
|
data = new Uint8Array(bytes || []);
|
|
564
|
-
return
|
|
523
|
+
return self.supervisorBridge(pid).write(handleId, offset, data);
|
|
565
524
|
}
|
|
566
525
|
export async function _rpcFsClose(self, handleId, pid) {
|
|
567
|
-
await
|
|
526
|
+
await self.supervisorBridge(pid).close(handleId);
|
|
568
527
|
}
|
|
569
528
|
/**
|
|
570
529
|
* Called by CirrusHmrRPC.hmrSend. Runs in the DO's own context so
|
|
@@ -577,7 +536,7 @@ export async function _rpcHmrRelay(self, clientId, msg) {
|
|
|
577
536
|
self.cirrusReal.hmr.relayToBrowser(clientId, msg);
|
|
578
537
|
}
|
|
579
538
|
export async function _rpcUnlink(self, path, pid) {
|
|
580
|
-
await
|
|
539
|
+
await self.supervisorOp({ op: 'unlink', args: [path], pid });
|
|
581
540
|
}
|
|
582
541
|
/**
|
|
583
542
|
* Bulk-write files and directories via one transactionSync().
|
|
@@ -601,7 +560,7 @@ export async function _rpcWriteBatch(self, payload, pid) {
|
|
|
601
560
|
chunkId: c.chunkId,
|
|
602
561
|
data: normalizeWriteBatchChunkData(c.data),
|
|
603
562
|
}));
|
|
604
|
-
return
|
|
563
|
+
return self.sqliteFs.as(callerCred(self, pid)).writeBatch({
|
|
605
564
|
inodes,
|
|
606
565
|
chunks,
|
|
607
566
|
deletePaths,
|
|
@@ -660,10 +619,8 @@ export async function _rpcWriteBatchStream(self, stream, mutationOwner, pid) {
|
|
|
660
619
|
// total writeBatchStream RPCs at the coordinator (vs 620+ pre-fix).
|
|
661
620
|
// Workerd's input-gate queue depth on the coordinator stays well
|
|
662
621
|
// under the queue-age threshold without any user-space semaphore.
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
decodeDrainStartedAt,
|
|
666
|
-
mutationOwner,
|
|
622
|
+
return self.supervisorOp({
|
|
623
|
+
op: 'writeBatchStream', stream, mutationOwner, pid,
|
|
667
624
|
});
|
|
668
625
|
}
|
|
669
626
|
/**
|
|
@@ -789,7 +746,7 @@ export async function _rpcReportExit(self, pid, code, tail) {
|
|
|
789
746
|
self.webSocketRelay?.closeForPid(pid);
|
|
790
747
|
}
|
|
791
748
|
catch { }
|
|
792
|
-
self.
|
|
749
|
+
self.supervisorForgetBridge?.(pid);
|
|
793
750
|
if (tail)
|
|
794
751
|
self.processes.appendOutput(pid, 'stderr', tail);
|
|
795
752
|
// Guard against double-reporting: if we've already recorded exit
|
|
@@ -951,7 +908,7 @@ export function _reportExternalExit(self, pid, code, reason) {
|
|
|
951
908
|
self.webSocketRelay?.closeForPid(pid);
|
|
952
909
|
}
|
|
953
910
|
catch { }
|
|
954
|
-
self.
|
|
911
|
+
self.supervisorForgetBridge?.(pid);
|
|
955
912
|
if (reason) {
|
|
956
913
|
self.processes.appendOutput(pid, 'stderr', `[process killed: ${reason}]\n`);
|
|
957
914
|
}
|
|
@@ -1,5 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The session's supervisor-op handler — one `createSupervisorOpHandler`
|
|
3
|
+
* built over this session's own SQLite filesystem, process table and `_rpc*`
|
|
4
|
+
* surface, so the same code serves process facets, the facet loopback stubs
|
|
5
|
+
* and the SDK's direct `_rpc*` calls.
|
|
6
|
+
*
|
|
7
|
+
* - The native filesystem ops in core's `ops` table run in-process against
|
|
8
|
+
* the shared bridge store — the same cache `supervisorBridge` hands the
|
|
9
|
+
* handle-based and append RPC bodies.
|
|
10
|
+
* - `readFile`, `readFileBytes`, `fsReadRange`, `fsReadRangeUncached` and
|
|
11
|
+
* `writeBatchStream` are overridden here, not replaced: they are the ops
|
|
12
|
+
* that carry this DO's heap accounting (read-allocation leases, the
|
|
13
|
+
* write-stream's decode-drain timestamp).
|
|
14
|
+
* - Every other named op dispatches through `SUPERVISOR_OP_ROUTES` to the
|
|
15
|
+
* session's `_rpc*` methods — `host` IS the session — exactly as the
|
|
16
|
+
* canonical route table maps them.
|
|
17
|
+
*/
|
|
18
|
+
import { type SupervisorOpBridgeStore, type SupervisorOpEnvelope } from '@nimbus-sh/core/workspace/supervisor-op.js';
|
|
19
|
+
import type { SqliteRuntimeFsBridge } from '@nimbus-sh/core/runtime/sqlite-runtime-fs-bridge.js';
|
|
20
|
+
import type { SqliteVFS } from '@nimbus-sh/core/vfs/sqlite-vfs.js';
|
|
21
|
+
import type { SessionProcessSupervisor } from '@nimbus-sh/core/runtime/session-process-supervisor.js';
|
|
22
|
+
/**
|
|
23
|
+
* The supervisor surface a session exposes to the handler: the `_rpc*`
|
|
24
|
+
* methods SUPERVISOR_OP_ROUTES can name plus the filesystem and process
|
|
25
|
+
* accessors the overrides read. Deliberately not an index-signature record —
|
|
26
|
+
* a class can't carry one, and the handler only ever reads named routes.
|
|
27
|
+
*/
|
|
28
|
+
export interface SessionSupervisorHost {
|
|
29
|
+
ensureSqliteFs(): void;
|
|
30
|
+
readonly sqliteFs: SqliteVFS | null;
|
|
31
|
+
readonly processes: SessionProcessSupervisor;
|
|
32
|
+
_rpcStdout(pid: number, data: string): Promise<void>;
|
|
33
|
+
_rpcStderr(pid: number, data: string): Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
export interface SessionSupervisorOps {
|
|
36
|
+
readonly dispatch: (envelope: SupervisorOpEnvelope) => Promise<unknown>;
|
|
37
|
+
readonly bridge: (pid?: number) => SqliteRuntimeFsBridge;
|
|
38
|
+
/** Drop a pid's bridge — a process exit ends its credential's validity. */
|
|
39
|
+
readonly forget: (pid: number) => void;
|
|
40
|
+
}
|
|
41
|
+
export declare function buildSessionSupervisorOps(host: SessionSupervisorHost, store?: SupervisorOpBridgeStore): SessionSupervisorOps;
|
|
5
42
|
//# sourceMappingURL=supervisor-op.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor-op.d.ts","sourceRoot":"","sources":["../../src/session/supervisor-op.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"supervisor-op.d.ts","sourceRoot":"","sources":["../../src/session/supervisor-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAGL,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAI1B,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AACjG,OAAO,KAAK,EAAE,SAAS,EAA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29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The session's supervisor-op handler — one `createSupervisorOpHandler`
|
|
3
|
+
* built over this session's own SQLite filesystem, process table and `_rpc*`
|
|
4
|
+
* surface, so the same code serves process facets, the facet loopback stubs
|
|
5
|
+
* and the SDK's direct `_rpc*` calls.
|
|
6
|
+
*
|
|
7
|
+
* - The native filesystem ops in core's `ops` table run in-process against
|
|
8
|
+
* the shared bridge store — the same cache `supervisorBridge` hands the
|
|
9
|
+
* handle-based and append RPC bodies.
|
|
10
|
+
* - `readFile`, `readFileBytes`, `fsReadRange`, `fsReadRangeUncached` and
|
|
11
|
+
* `writeBatchStream` are overridden here, not replaced: they are the ops
|
|
12
|
+
* that carry this DO's heap accounting (read-allocation leases, the
|
|
13
|
+
* write-stream's decode-drain timestamp).
|
|
14
|
+
* - Every other named op dispatches through `SUPERVISOR_OP_ROUTES` to the
|
|
15
|
+
* session's `_rpc*` methods — `host` IS the session — exactly as the
|
|
16
|
+
* canonical route table maps them.
|
|
17
|
+
*/
|
|
18
|
+
import { createSupervisorOpHandler, createSupervisorBridgeStore, } from '@nimbus-sh/core/workspace/supervisor-op.js';
|
|
19
|
+
import { FsReadRangeArgsSchema, rangeReadBytes, withReadAllocation, } from './rpc.js';
|
|
20
|
+
import { dec } from '@nimbus-sh/core/_shared/bytes.js';
|
|
21
|
+
export function buildSessionSupervisorOps(host, store) {
|
|
22
|
+
host.ensureSqliteFs();
|
|
23
|
+
store ??= createSupervisorBridgeStore({ vfs: host.sqliteFs, processes: host.processes });
|
|
24
|
+
const extend = {
|
|
25
|
+
// The native ops whose session bodies carry accounting the bridge
|
|
26
|
+
// alone doesn't know: a read lease sized to what the file can return.
|
|
27
|
+
readFile: async (envelope, tools) => {
|
|
28
|
+
const path = envelope.args?.[0];
|
|
29
|
+
const fs = tools.bridge(envelope.pid);
|
|
30
|
+
const stat = await fs.stat(path);
|
|
31
|
+
if (!stat)
|
|
32
|
+
return null;
|
|
33
|
+
return withReadAllocation(stat.size, async () => {
|
|
34
|
+
const bytes = await fs.readFile(path);
|
|
35
|
+
return bytes ? dec.decode(bytes) : null;
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
readFileBytes: async (envelope, tools) => {
|
|
39
|
+
const path = envelope.args?.[0];
|
|
40
|
+
const fs = tools.bridge(envelope.pid);
|
|
41
|
+
const stat = await fs.stat(path);
|
|
42
|
+
if (!stat)
|
|
43
|
+
return null;
|
|
44
|
+
return withReadAllocation(stat.size, () => fs.readFile(path));
|
|
45
|
+
},
|
|
46
|
+
fsReadRange: async (envelope, tools) => {
|
|
47
|
+
const args = FsReadRangeArgsSchema.parse({
|
|
48
|
+
path: envelope.args?.[0],
|
|
49
|
+
offset: envelope.args?.[1],
|
|
50
|
+
length: envelope.args?.[2],
|
|
51
|
+
});
|
|
52
|
+
const fs = tools.bridge(envelope.pid);
|
|
53
|
+
return withReadAllocation(await rangeReadBytes(fs, args.path, args.offset, args.length), () => fs.readRange(args.path, args.offset, args.length));
|
|
54
|
+
},
|
|
55
|
+
fsReadRangeUncached: async (envelope, tools) => {
|
|
56
|
+
const args = FsReadRangeArgsSchema.parse({
|
|
57
|
+
path: envelope.args?.[0],
|
|
58
|
+
offset: envelope.args?.[1],
|
|
59
|
+
length: envelope.args?.[2],
|
|
60
|
+
});
|
|
61
|
+
const fs = tools.bridge(envelope.pid);
|
|
62
|
+
return withReadAllocation(await rangeReadBytes(fs, args.path, args.offset, args.length), () => fs.readRange(args.path, args.offset, args.length, { cached: false }));
|
|
63
|
+
},
|
|
64
|
+
// The write stream's decode-drain timestamp starts when the envelope
|
|
65
|
+
// arrives, not when the DO first reads it — the same contract
|
|
66
|
+
// _rpcWriteBatchStream has always had.
|
|
67
|
+
writeBatchStream: (envelope, tools) => {
|
|
68
|
+
if (!envelope.stream)
|
|
69
|
+
throw new Error('supervisor op writeBatchStream: no stream');
|
|
70
|
+
// Same contract _rpcWriteBatchStream had: a supplied pid must be a
|
|
71
|
+
// real process pid; only an absent pid is a host call.
|
|
72
|
+
const pid = envelope.pid;
|
|
73
|
+
if (pid !== undefined && (!Number.isInteger(pid) || pid <= 0)) {
|
|
74
|
+
throw new Error('filesystem RPC requires a valid process pid');
|
|
75
|
+
}
|
|
76
|
+
return tools.vfs.as(tools.cred(pid)).writeStream(envelope.stream, {
|
|
77
|
+
decodeDrainStartedAt: performance.now(),
|
|
78
|
+
mutationOwner: envelope.mutationOwner,
|
|
79
|
+
});
|
|
80
|
+
},
|
|
81
|
+
// stdout/stderr are session methods, not bridge ops: mirroring,
|
|
82
|
+
// log-append and prior-generation filtering all live in _rpcStdout.
|
|
83
|
+
stdout: (envelope) => host._rpcStdout(envelope.pid ?? 0, envelope.args?.[0]),
|
|
84
|
+
stderr: (envelope) => host._rpcStderr(envelope.pid ?? 0, envelope.args?.[0]),
|
|
85
|
+
};
|
|
86
|
+
const dispatch = createSupervisorOpHandler({
|
|
87
|
+
vfs: host.sqliteFs,
|
|
88
|
+
processes: host.processes,
|
|
89
|
+
// The session IS the host — its _rpc* methods are the route table's
|
|
90
|
+
// targets. The index signature exists on the declared surface only.
|
|
91
|
+
host: host,
|
|
92
|
+
bridge: store,
|
|
93
|
+
extend,
|
|
94
|
+
});
|
|
95
|
+
return { dispatch, bridge: store.bridge, forget: store.forget };
|
|
74
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor-rpc.d.ts","sourceRoot":"","sources":["../../src/session/supervisor-rpc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAStD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAUrE,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEnF;;;;;;;GAOG;AACH,MAAM,MAAM,wBAAwB,GAChC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACrE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,CAAC;AA0C5D,qBAAa,aAAc,SAAQ,gBAAgB;IACjD,2EAA2E;IAC3E,OAAO,CAAC,SAAS;IAyBjB,OAAO,CAAC,GAAG;IAQX,iFAAiF;IACjF,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,IAAI;IAQZ,OAAO,CAAC,SAAS;IAUX,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC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