@nimbus-sh/worker 0.3.0 → 0.5.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 +46 -43
- package/dist/_shared/preview-host.d.ts +14 -1
- package/dist/_shared/preview-host.d.ts.map +1 -1
- package/dist/_shared/preview-host.js +28 -3
- package/dist/_shared/session-router.d.ts +43 -0
- package/dist/_shared/session-router.d.ts.map +1 -1
- package/dist/_shared/session-router.js +59 -12
- package/dist/esbuild-wasm-bundle.generated.d.ts +1 -1
- package/dist/esbuild-wasm-bundle.generated.js +1 -1
- package/dist/facets/cirrus-real.js +1 -1
- package/dist/facets/durable-images.d.ts +50 -0
- package/dist/facets/durable-images.d.ts.map +1 -0
- package/dist/facets/durable-images.js +75 -0
- package/dist/facets/durable-slots.d.ts +45 -0
- package/dist/facets/durable-slots.d.ts.map +1 -0
- package/dist/facets/durable-slots.js +94 -0
- package/dist/facets/esbuild-transform.d.ts +10 -0
- package/dist/facets/esbuild-transform.d.ts.map +1 -0
- package/dist/facets/esbuild-transform.js +36 -0
- package/dist/facets/manager.d.ts +167 -12
- package/dist/facets/manager.d.ts.map +1 -1
- package/dist/facets/manager.js +575 -113
- package/dist/facets/opencode-staging.d.ts.map +1 -1
- package/dist/facets/opencode-staging.js +3 -4
- package/dist/facets/real-vite-hmr.js +1 -1
- package/dist/facets/vite-dev-server.d.ts +4 -4
- package/dist/facets/vite-dev-server.js +5 -5
- package/dist/git/commands.d.ts +22 -0
- package/dist/git/commands.d.ts.map +1 -1
- package/dist/git/commands.js +431 -424
- package/dist/git/network-facet.d.ts.map +1 -1
- package/dist/git/network-facet.js +6 -5
- package/dist/git-bundle.generated.d.ts +2 -2
- package/dist/git-bundle.generated.d.ts.map +1 -1
- package/dist/git-bundle.generated.js +3 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -2
- package/dist/loaders/child-process/spawn-facet.js +1 -1
- package/dist/loaders/child-process/spawn-pool.d.ts.map +1 -1
- package/dist/loaders/child-process/spawn-pool.js +2 -2
- package/dist/loaders/generated-workers.d.ts +2 -2
- package/dist/loaders/generated-workers.d.ts.map +1 -1
- package/dist/loaders/generated-workers.js +3 -3
- package/dist/loaders/npm-resolve-preamble.d.ts +3 -3
- package/dist/loaders/npm-resolve-preamble.js +3 -3
- package/dist/loaders/pre-bundle-preamble.d.ts +5 -5
- package/dist/loaders/pre-bundle-preamble.js +6 -6
- package/dist/node-shims-artifact.generated.js +3 -3
- package/dist/npm/install-batch-facet.d.ts +1 -1
- package/dist/npm/install-batch-facet.js +1 -1
- package/dist/npm/installer.d.ts +6 -6
- package/dist/npm/installer.d.ts.map +1 -1
- package/dist/npm/installer.js +28 -27
- package/dist/npm/pre-bundle-facet.d.ts +2 -2
- package/dist/npm/pre-bundle-facet.js +5 -5
- package/dist/npm/r2-cache.d.ts +1 -1
- package/dist/npm/resolve-facet.d.ts +1 -1
- package/dist/npm/resolve-facet.js +1 -1
- package/dist/npm/resolve-one-facet.d.ts +5 -5
- package/dist/npm/resolve-one-facet.js +5 -5
- package/dist/router/index.d.ts.map +1 -1
- package/dist/router/index.js +61 -4
- package/dist/router/public-directory-do.d.ts +17 -0
- package/dist/router/public-directory-do.d.ts.map +1 -0
- package/dist/router/public-directory-do.js +16 -0
- package/dist/router/public-directory.d.ts +75 -0
- package/dist/router/public-directory.d.ts.map +1 -0
- package/dist/router/public-directory.js +115 -0
- package/dist/router/remote-api.d.ts +9 -1
- package/dist/router/remote-api.d.ts.map +1 -1
- package/dist/router/remote-api.js +20 -3
- package/dist/runtime/bun-repl.d.ts +1 -1
- package/dist/runtime/bun-repl.js +3 -3
- package/dist/runtime/esbuild-wasm-bytes.js +1 -1
- package/dist/runtime/facet-loader-host.d.ts +2 -2
- package/dist/runtime/facet-loader-host.js +3 -3
- package/dist/runtime/node-repl.js +2 -2
- package/dist/runtime/node-shims-artifact.js +1 -1
- package/dist/runtime/node-shims.d.ts +4 -1
- package/dist/runtime/node-shims.d.ts.map +1 -1
- package/dist/runtime/node-shims.js +326 -7
- package/dist/runtime/opencode-artifact.js +1 -1
- package/dist/runtime/opentui-wasm-bytes.js +1 -1
- package/dist/runtime/python-repl.js +3 -3
- package/dist/runtime/ruby-repl.js +2 -2
- package/dist/runtime/sqlite-wasm-bytes.js +1 -1
- package/dist/session/agent.d.ts +11 -0
- package/dist/session/agent.d.ts.map +1 -1
- package/dist/session/diag.js +1 -1
- package/dist/session/helpers.js +1 -1
- package/dist/session/hibernation.d.ts +8 -8
- package/dist/session/hibernation.d.ts.map +1 -1
- package/dist/session/hibernation.js +15 -15
- package/dist/session/init-phases.d.ts +19 -26
- package/dist/session/init-phases.d.ts.map +1 -1
- package/dist/session/init-phases.js +20 -43
- package/dist/session/init.d.ts.map +1 -1
- package/dist/session/init.js +24 -19
- package/dist/session/keys.d.ts +8 -0
- package/dist/session/keys.d.ts.map +1 -1
- package/dist/session/keys.js +12 -3
- package/dist/session/nimbus-session.d.ts +33 -19
- package/dist/session/nimbus-session.d.ts.map +1 -1
- package/dist/session/nimbus-session.js +78 -37
- package/dist/session/port-capability.d.ts +95 -8
- package/dist/session/port-capability.d.ts.map +1 -1
- package/dist/session/port-capability.js +165 -8
- package/dist/session/programmatic.d.ts +50 -4
- package/dist/session/programmatic.d.ts.map +1 -1
- package/dist/session/programmatic.js +112 -15
- package/dist/session/routes.d.ts +17 -0
- package/dist/session/routes.d.ts.map +1 -1
- package/dist/session/routes.js +111 -43
- package/dist/session/rpc.d.ts +7 -7
- package/dist/session/rpc.d.ts.map +1 -1
- package/dist/session/rpc.js +34 -23
- package/dist/session/shell-socket.d.ts +76 -0
- package/dist/session/shell-socket.d.ts.map +1 -0
- package/dist/session/shell-socket.js +172 -0
- package/dist/session/start-real-vite.js +2 -2
- package/dist/session/supervisor-op.d.ts +5 -0
- package/dist/session/supervisor-op.d.ts.map +1 -0
- package/dist/session/supervisor-op.js +74 -0
- package/dist/session/supervisor-rpc.d.ts +6 -10
- package/dist/session/supervisor-rpc.d.ts.map +1 -1
- package/dist/session/supervisor-rpc.js +98 -79
- package/dist/session/ws.d.ts +1 -3
- package/dist/session/ws.d.ts.map +1 -1
- package/dist/session/ws.js +23 -7
- package/package.json +4 -3
- package/public/_assets/runtime/{node-shims-fea906843f6d594e.js → node-shims-9e1380d9ee430fcc.js} +320 -5
- package/public/s/index.html +101 -5
- package/scripts/bundle-esbuild-wasm.mjs +2 -2
- package/scripts/bundle-facet-workers.mjs +5 -7
- package/scripts/bundle-sqlite-wasm.mjs +1 -1
package/dist/session/routes.js
CHANGED
|
@@ -27,26 +27,28 @@ import { handleReplicaPreflight as _w12HandleReplicaPreflight } from '../replica
|
|
|
27
27
|
import { replicasSuspended as _w12ReplicasSuspended } from '../replica/suspension.js';
|
|
28
28
|
import { sanitizeUntrustedRequest } from '@nimbus-sh/core/_shared/untrusted-request.js';
|
|
29
29
|
import { matchLogsPath, handleLogsWebSocketRequest, handleProcessesListRequest, } from '../runtime/process-logs-api.js';
|
|
30
|
-
import { readDiagCounters } from '@nimbus-sh/
|
|
31
|
-
import { getFailures, getLastRpcFrame, getLastFacetId, getRecoveryEvents, recordRecoveryEvent, resetRecoveryEvents, } from '@nimbus-sh/
|
|
30
|
+
import { readDiagCounters } from '@nimbus-sh/platform/diag-counters.js';
|
|
31
|
+
import { getFailures, getLastRpcFrame, getLastFacetId, getRecoveryEvents, recordRecoveryEvent, resetRecoveryEvents, } from '@nimbus-sh/platform/oom-discriminator.js';
|
|
32
32
|
import { DEFAULT_VITE_PORT, LRU_MAX_ENTRIES } from '@nimbus-sh/core/constants.js';
|
|
33
33
|
import { BASE_PATH_HEADER } from '../_shared/session-router.js';
|
|
34
34
|
import { VITE_CONFIG_KEY } from './keys.js';
|
|
35
|
-
import { estimateSupervisorHeap, WORKERD_EVICTION_LABELS } from '@nimbus-sh/
|
|
35
|
+
import { estimateSupervisorHeap, WORKERD_EVICTION_LABELS } from '@nimbus-sh/platform/heap-estimate.js';
|
|
36
36
|
import { loadShellState, loadKernelMounts, getScrollbackStats, clearSessionState, appendScrollback, loadScrollback } from './state-store.js';
|
|
37
37
|
import { classifyWsUpgrade, joinExistingSession } from './init-phases.js';
|
|
38
|
+
import { closeStaleShellSockets, tagShellSocket } from './shell-socket.js';
|
|
38
39
|
import { EsbuildService } from '@nimbus-sh/core/runtime/esbuild-service.js';
|
|
39
40
|
import { ViteDevServer } from '../facets/vite-dev-server.js';
|
|
40
41
|
import { notifyTerminalEvent, wireProcessLogSocketBroadcast } from '../runtime/process-logs-api.js';
|
|
41
42
|
import { makeLongRunningPortStub } from '@nimbus-sh/core/runtime/long-running-handle.js';
|
|
42
43
|
import { startRealVite } from './start-real-vite.js';
|
|
43
44
|
import { getLoadedCodesStats } from '@nimbus-sh/fabric/bindings.js';
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
45
|
+
import { generation } from '@nimbus-sh/fabric/generation.js';
|
|
46
|
+
import { facetIdBudget } from '@nimbus-sh/fabric/budgets.js';
|
|
47
|
+
import { loaderLedgerStats } from '@nimbus-sh/fabric/budgets.js';
|
|
46
48
|
import { HOSTED_WEBSOCKET_CAPABILITY_HEADER, HOSTED_WEBSOCKET_KEY_HEADER, } from '@nimbus-sh/fabric/process-host.js';
|
|
47
49
|
import { routeHostedWebSocket } from './rpc.js';
|
|
48
|
-
import { clearPortCapability, persistPortCapability, readPortCapability, restorePortCapability, } from './port-capability.js';
|
|
49
|
-
import { PREVIEW_CAPABILITY_HEADER } from '../_shared/session-router.js';
|
|
50
|
+
import { clearPortCapability, persistPortCapability, readPortCapability, readPortReservation, restorePortCapability, } from './port-capability.js';
|
|
51
|
+
import { PREVIEW_CAPABILITY_HEADER, PUBLIC_BEARER_HEADER, CALLER_SCOPES_HEADER, renderSessionStatusPage } from '../_shared/session-router.js';
|
|
50
52
|
import { renderNoDevServerHtml } from './helpers.js';
|
|
51
53
|
import { handleAgentRequest } from './agent.js';
|
|
52
54
|
import { captureSessionAiCredential } from './ai.js';
|
|
@@ -56,7 +58,7 @@ import { CRED_KERNEL } from '@nimbus-sh/core/runtime/os-contracts.js';
|
|
|
56
58
|
// uses (they did: the packument purge used a stale `/p/` segment).
|
|
57
59
|
import { R2CacheClient, packumentL2Url, tarballL2Url, parseTarballAddress } from '../npm/r2-cache.js';
|
|
58
60
|
import { fetchEsbuildWasmBytes, ESBUILD_WASM_L2_KEY } from '../runtime/esbuild-wasm-bytes.js';
|
|
59
|
-
import {
|
|
61
|
+
import { Fanout, IN_DO_THRESHOLD, MAX_PEER_FANOUT } from '@nimbus-sh/fabric/fanout.js';
|
|
60
62
|
import { z } from 'zod/v4';
|
|
61
63
|
const TestSpawnEmitterBodySchema = z.object({
|
|
62
64
|
lines: z.coerce.number().optional(),
|
|
@@ -138,8 +140,11 @@ async function restorePersistedDevServer(self, onlyPort) {
|
|
|
138
140
|
return;
|
|
139
141
|
}
|
|
140
142
|
self.ensureSqliteFs();
|
|
141
|
-
if (!self.esbuildService)
|
|
142
|
-
|
|
143
|
+
if (!self.esbuildService) {
|
|
144
|
+
if (!self.sqliteFs)
|
|
145
|
+
throw new Error('Session VFS is not initialized');
|
|
146
|
+
self.esbuildService = new EsbuildService(self.sqliteFs.as(CRED_KERNEL));
|
|
147
|
+
}
|
|
143
148
|
// Prefer the current request's basePath (just captured from the
|
|
144
149
|
// X-Nimbus-Base header) over the stored one — the latter is only
|
|
145
150
|
// a fallback for cold rehydrates that precede any header hit.
|
|
@@ -191,8 +196,27 @@ async function restorePersistedDevServer(self, onlyPort) {
|
|
|
191
196
|
* the untrusted-code boundary and cannot carry it, and a plain user server on
|
|
192
197
|
* any other port is mounted at root and needs no rewriting.
|
|
193
198
|
*/
|
|
194
|
-
async function routeToSessionPort(self, port, request, innerPath, mountBase, capability) {
|
|
199
|
+
export async function routeToSessionPort(self, port, request, innerPath, mountBase, capability) {
|
|
195
200
|
await restorePersistedDevServer(self, port);
|
|
201
|
+
// The durable seam: a request on a port nothing is serving may be a
|
|
202
|
+
// durable application a reset left dead — the alarm pump would re-drive
|
|
203
|
+
// it eventually, but a URL in someone's hands cannot wait for eventually.
|
|
204
|
+
// 'absent' falls through to the honest 502 unchanged; 'started' continues
|
|
205
|
+
// to normal routing with the port freshly bound; 'failed' is mid-launch
|
|
206
|
+
// or a lost boot, so the page re-asks on its own timer.
|
|
207
|
+
if (self.ensureDurableAppOnPort !== undefined) {
|
|
208
|
+
const durable = await self.ensureDurableAppOnPort(port);
|
|
209
|
+
if (durable === 'failed') {
|
|
210
|
+
return new Response(renderPortStartingHtml(port), {
|
|
211
|
+
status: 503,
|
|
212
|
+
headers: {
|
|
213
|
+
'Content-Type': 'text/html; charset=utf-8',
|
|
214
|
+
'Cache-Control': 'no-store',
|
|
215
|
+
'Retry-After': '3',
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
196
220
|
if (capability !== undefined) {
|
|
197
221
|
// A rebuilt supervisor holds a capability nobody was handed; the durable
|
|
198
222
|
// one is the value in circulation, so it wins before the check.
|
|
@@ -202,6 +226,15 @@ async function routeToSessionPort(self, port, request, innerPath, mountBase, cap
|
|
|
202
226
|
// listening at all.
|
|
203
227
|
return new Response('Not found', { status: 404 });
|
|
204
228
|
}
|
|
229
|
+
// The public bearer form arrived without a session attach: the
|
|
230
|
+
// capability is real, but it authorises this route only for a port the
|
|
231
|
+
// owner deliberately exposed — the stored visibility is the gate.
|
|
232
|
+
if (request.headers.get(PUBLIC_BEARER_HEADER) !== null) {
|
|
233
|
+
const reservation = await readPortReservation(self.ctx, port);
|
|
234
|
+
if (reservation === null || reservation.visibility !== 'public') {
|
|
235
|
+
return new Response('Not found', { status: 404 });
|
|
236
|
+
}
|
|
237
|
+
}
|
|
205
238
|
}
|
|
206
239
|
if (port === self._viteShimPort) {
|
|
207
240
|
// The preview HMR WebSocket can't cross the port-registry RPC, so it is
|
|
@@ -222,6 +255,15 @@ async function routeToSessionPort(self, port, request, innerPath, mountBase, cap
|
|
|
222
255
|
return proxied;
|
|
223
256
|
return new Response(`No process listening on port ${port}`, { status: 502 });
|
|
224
257
|
}
|
|
258
|
+
/** The "durable application is (re)starting" 503 page — self-refreshing. */
|
|
259
|
+
function renderPortStartingHtml(port) {
|
|
260
|
+
return renderSessionStatusPage({
|
|
261
|
+
title: 'Starting',
|
|
262
|
+
heading: 'Starting…',
|
|
263
|
+
body: `The application on port <code>${port}</code> is restarting.<br>This page refreshes itself.`,
|
|
264
|
+
metaRefreshSeconds: 3,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
225
267
|
/**
|
|
226
268
|
* Re-adopt a preview capability the embedder already holds, after a restore
|
|
227
269
|
* re-registered the port under a freshly minted one.
|
|
@@ -410,20 +452,11 @@ export async function handleFetch(self, request) {
|
|
|
410
452
|
catch { }
|
|
411
453
|
return new Response(null, { status: 101, webSocket: client });
|
|
412
454
|
}
|
|
413
|
-
// [B'.5] Three-way decision on a /ws upgrade
|
|
414
|
-
//
|
|
415
|
-
//
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
// terminal socket is currently attached.
|
|
419
|
-
// 2. Cold init: no shell yet (first connect, or post-DO-
|
|
420
|
-
// eviction). Run the full R/B/W/O sequence.
|
|
421
|
-
// 3. Active conflict: an open socket tagged `shell` proves
|
|
422
|
-
// another browser terminal is attached. 409 prevents
|
|
423
|
-
// two-tab cross-wiring (multi-tab share is separate).
|
|
424
|
-
// Decide before accepting/tagging the incoming server socket so
|
|
425
|
-
// it cannot be mistaken for an already-attached terminal.
|
|
426
|
-
const wsUpgrade = classifyWsUpgrade(self, self.ctx.getWebSockets());
|
|
455
|
+
// [B'.5] Three-way decision on a /ws upgrade — see
|
|
456
|
+
// classifyWsUpgrade. Decide before accepting/tagging the incoming
|
|
457
|
+
// server socket so it cannot be mistaken for the incumbent.
|
|
458
|
+
const priorSockets = self.ctx.getWebSockets();
|
|
459
|
+
const wsUpgrade = classifyWsUpgrade(self, priorSockets);
|
|
427
460
|
if (wsUpgrade === 'conflict') {
|
|
428
461
|
return new Response(JSON.stringify({
|
|
429
462
|
error: 'session already has active terminal',
|
|
@@ -433,13 +466,16 @@ export async function handleFetch(self, request) {
|
|
|
433
466
|
headers: { 'Content-Type': 'application/json' },
|
|
434
467
|
});
|
|
435
468
|
}
|
|
469
|
+
// This upgrade is taking the terminal, so no shell socket in
|
|
470
|
+
// `priorSockets` still has a peer. Close them: a socket whose tab
|
|
471
|
+
// is gone, or one a failed upgrade accepted and never handed to a
|
|
472
|
+
// client, otherwise stays accepted for the life of the object and
|
|
473
|
+
// refuses every later reconnect.
|
|
474
|
+
closeStaleShellSockets(self.ctx, priorSockets);
|
|
436
475
|
const pair = new WebSocketPair();
|
|
437
476
|
const [client, server] = Object.values(pair);
|
|
438
477
|
self.ctx.acceptWebSocket(server);
|
|
439
|
-
|
|
440
|
-
server.serializeAttachment?.({ kind: 'shell' });
|
|
441
|
-
}
|
|
442
|
-
catch { }
|
|
478
|
+
tagShellSocket(server);
|
|
443
479
|
if (wsUpgrade === 'warm-join') {
|
|
444
480
|
// Warm rejoin path. The existing Shell is alive; we just
|
|
445
481
|
// swap the WebSocketTerminal's ws ref + replay scrollback.
|
|
@@ -448,6 +484,10 @@ export async function handleFetch(self, request) {
|
|
|
448
484
|
}
|
|
449
485
|
catch (err) {
|
|
450
486
|
console.error('warm-rejoin error:', err?.message, err?.stack);
|
|
487
|
+
try {
|
|
488
|
+
server.close(1011, 'rejoin failed');
|
|
489
|
+
}
|
|
490
|
+
catch { /* already closing */ }
|
|
451
491
|
return new Response('Rejoin failed: ' + err?.message, { status: 500 });
|
|
452
492
|
}
|
|
453
493
|
return new Response(null, { status: 101, webSocket: client });
|
|
@@ -458,6 +498,10 @@ export async function handleFetch(self, request) {
|
|
|
458
498
|
}
|
|
459
499
|
catch (err) {
|
|
460
500
|
console.error('initSession error:', err?.message, err?.stack);
|
|
501
|
+
try {
|
|
502
|
+
server.close(1011, 'init failed');
|
|
503
|
+
}
|
|
504
|
+
catch { /* already closing */ }
|
|
461
505
|
return new Response('Init failed: ' + err?.message, { status: 500 });
|
|
462
506
|
}
|
|
463
507
|
return new Response(null, { status: 101, webSocket: client });
|
|
@@ -640,7 +684,7 @@ export async function handleFetch(self, request) {
|
|
|
640
684
|
// process.memoryUsage() and they were always zero — useless.
|
|
641
685
|
//
|
|
642
686
|
// C'.1 replaces the zero-everywhere readout with a deterministic
|
|
643
|
-
// estimator (src/
|
|
687
|
+
// estimator (src/@nimbus-sh/platform/heap-estimate.js) that sums known
|
|
644
688
|
// supervisor allocations from runtime counters. Every byte has a
|
|
645
689
|
// named contributor.
|
|
646
690
|
//
|
|
@@ -749,7 +793,7 @@ export async function handleFetch(self, request) {
|
|
|
749
793
|
// `autoResponseConfigured` reports the runtime's actual
|
|
750
794
|
// capability (older workerd builds report false).
|
|
751
795
|
hib: {
|
|
752
|
-
isolateGen: self.
|
|
796
|
+
isolateGen: generation(self.ctx),
|
|
753
797
|
autoResponseConfigured: self._w9WsConfig?.autoResponseConfigured ?? false,
|
|
754
798
|
autoResponseError: self._w9WsConfig?.autoResponseError ?? null,
|
|
755
799
|
hibernationEventTimeoutMs: self._w9WsConfig?.timeoutSetMs ?? null,
|
|
@@ -916,7 +960,7 @@ export async function handleFetch(self, request) {
|
|
|
916
960
|
fromState: body.fromState,
|
|
917
961
|
toState: body.toState,
|
|
918
962
|
trigger: body.trigger,
|
|
919
|
-
isolateGen: body.isolateGen || self.
|
|
963
|
+
isolateGen: body.isolateGen || generation(self.ctx),
|
|
920
964
|
dataLoss: body.dataLoss === true,
|
|
921
965
|
snapshotKeysRehydrated: body.snapshotKeysRehydrated || 0,
|
|
922
966
|
notes: body.notes,
|
|
@@ -954,7 +998,7 @@ export async function handleFetch(self, request) {
|
|
|
954
998
|
}
|
|
955
999
|
// ── two-tier-fanout primitive probe ──────────────────────────────
|
|
956
1000
|
// in-DO fanout in-DO and peer-DO fanout peer-DO speedups via the
|
|
957
|
-
//
|
|
1001
|
+
// Fanout primitive. Independent of any specific
|
|
958
1002
|
// production site (install-batch, pre-bundle, etc.) so the
|
|
959
1003
|
// primitive's behavior can be measured cleanly without
|
|
960
1004
|
// confounders.
|
|
@@ -1049,8 +1093,11 @@ export async function handleFetch(self, request) {
|
|
|
1049
1093
|
if (self.viteDevServer?.isRunning)
|
|
1050
1094
|
self.viteDevServer.stop();
|
|
1051
1095
|
// Start in-process ViteDevServer
|
|
1052
|
-
if (!self.esbuildService)
|
|
1053
|
-
|
|
1096
|
+
if (!self.esbuildService) {
|
|
1097
|
+
if (!self.sqliteFs)
|
|
1098
|
+
throw new Error('Session VFS is not initialized');
|
|
1099
|
+
self.esbuildService = new EsbuildService(self.sqliteFs.as(CRED_KERNEL));
|
|
1100
|
+
}
|
|
1054
1101
|
const basePath = self.viteBasePath;
|
|
1055
1102
|
// process metadata support: allocate a PID + port even on the
|
|
1056
1103
|
// /api/start-vite path so probes that drive vite via the test
|
|
@@ -1330,6 +1377,27 @@ export async function handleFetch(self, request) {
|
|
|
1330
1377
|
reset();
|
|
1331
1378
|
return new Response(null, { status: 204 });
|
|
1332
1379
|
}
|
|
1380
|
+
// ── /api/_diag/abort — a real DO isolate reset with storage intact ──
|
|
1381
|
+
//
|
|
1382
|
+
// The eviction probe's deterministic reset: `ctx.abort()` ends this
|
|
1383
|
+
// isolate and its in-flight work the same way the platform's own reset
|
|
1384
|
+
// does, while every synced storage row survives. The abort is deferred
|
|
1385
|
+
// onto waitUntil so the 204 reaches the caller before the isolate
|
|
1386
|
+
// unwinds — answering from inside the throw would tear the response.
|
|
1387
|
+
//
|
|
1388
|
+
// Gated twice, like the other _diag writes: NIMBUS_DEBUG off → 404, and
|
|
1389
|
+
// the caller's verified scopes must carry `session:admin` — a reset is
|
|
1390
|
+
// destructive even in debug mode, and an attach-scope token is not one.
|
|
1391
|
+
if (url.pathname === '/api/_diag/abort' && request.method === 'POST') {
|
|
1392
|
+
if (!self.nimbusDebug)
|
|
1393
|
+
return new Response('not found', { status: 404 });
|
|
1394
|
+
const callerScopes = (request.headers.get(CALLER_SCOPES_HEADER) ?? '').split(' ');
|
|
1395
|
+
if (!callerScopes.includes('session:admin')) {
|
|
1396
|
+
return new Response('forbidden: session:admin scope required', { status: 403 });
|
|
1397
|
+
}
|
|
1398
|
+
self.ctx.waitUntil(new Promise((resolve) => setTimeout(resolve, 250)).then(() => self.ctx.abort()));
|
|
1399
|
+
return new Response(null, { status: 204 });
|
|
1400
|
+
}
|
|
1333
1401
|
return new Response('Not found', { status: 404 });
|
|
1334
1402
|
}
|
|
1335
1403
|
// ── cache-and-scrub L2 benchmark endpoint ───────────────────────────────
|
|
@@ -1471,7 +1539,7 @@ async function handleCacheTestEndpoint(self, url, request) {
|
|
|
1471
1539
|
}
|
|
1472
1540
|
// ── two-tier-fanout primitive benchmark endpoint ────────────────────────
|
|
1473
1541
|
//
|
|
1474
|
-
// Routes under /api/_test/fanout/* exercise
|
|
1542
|
+
// Routes under /api/_test/fanout/* exercise Fanout's two
|
|
1475
1543
|
// topologies (in-DO fanout in-DO + peer-DO fanout peer-DO) via a synthetic workload
|
|
1476
1544
|
// that's independent of the production install-batch / pre-bundle
|
|
1477
1545
|
// sites. The probe measures speedup, peer-DO routing determinism,
|
|
@@ -1500,7 +1568,7 @@ async function handleFanoutTestEndpoint(self, url, request) {
|
|
|
1500
1568
|
const path = url.pathname;
|
|
1501
1569
|
if (path === '/api/_test/fanout/topology' && request.method === 'GET') {
|
|
1502
1570
|
const n = Math.max(0, parseInt(url.searchParams.get('n') || '0', 10));
|
|
1503
|
-
const pool = new
|
|
1571
|
+
const pool = new Fanout(env, self.ctx, {
|
|
1504
1572
|
tag: 'fanout-bench',
|
|
1505
1573
|
timeoutMs: 60_000,
|
|
1506
1574
|
});
|
|
@@ -1515,7 +1583,7 @@ async function handleFanoutTestEndpoint(self, url, request) {
|
|
|
1515
1583
|
const keysRaw = url.searchParams.get('keys') || '';
|
|
1516
1584
|
const keys = keysRaw.split(',').map((k) => k.trim()).filter(Boolean);
|
|
1517
1585
|
const peerCount = Math.max(1, Math.min(parseInt(url.searchParams.get('n') || String(keys.length), 10), MAX_PEER_FANOUT));
|
|
1518
|
-
const pool = new
|
|
1586
|
+
const pool = new Fanout(env, self.ctx, {
|
|
1519
1587
|
tag: 'fanout-bench',
|
|
1520
1588
|
timeoutMs: 60_000,
|
|
1521
1589
|
});
|
|
@@ -1529,7 +1597,7 @@ async function handleFanoutTestEndpoint(self, url, request) {
|
|
|
1529
1597
|
const body = await parseJsonBody(request, FanoutBenchBodySchema);
|
|
1530
1598
|
const n = Math.max(1, Math.min(64, body.n || 8));
|
|
1531
1599
|
const sleepMs = Math.max(0, Math.min(2000, body.sleepMs || 100));
|
|
1532
|
-
const pool = new
|
|
1600
|
+
const pool = new Fanout(env, self.ctx, {
|
|
1533
1601
|
tag: 'fanout-bench',
|
|
1534
1602
|
timeoutMs: 60_000,
|
|
1535
1603
|
});
|
|
@@ -1545,7 +1613,7 @@ async function handleFanoutTestEndpoint(self, url, request) {
|
|
|
1545
1613
|
const results = await pool.submitMany(tasks, async (item, env) => {
|
|
1546
1614
|
const startMs = Date.now();
|
|
1547
1615
|
// Identify which env we're running in. SUPERVISOR is the
|
|
1548
|
-
// RPC stub auto-injected by
|
|
1616
|
+
// RPC stub auto-injected by IsolatePool; its presence
|
|
1549
1617
|
// tells us we're inside a loader isolate (not the supervisor).
|
|
1550
1618
|
const loaderEnvKeys = Object.keys(env || {}).sort();
|
|
1551
1619
|
// Sleep entirely inside the isolate — no external network.
|
|
@@ -1585,11 +1653,11 @@ async function handleFanoutTestEndpoint(self, url, request) {
|
|
|
1585
1653
|
const n = Math.max(1, Math.min(64, body.n || 8));
|
|
1586
1654
|
const sleepMs = Math.max(0, Math.min(2000, body.sleepMs || 100));
|
|
1587
1655
|
// Same workload, but FORCE serial dispatch by using a single
|
|
1588
|
-
//
|
|
1656
|
+
// IsolatePool with concurrency=1 and submitting one task
|
|
1589
1657
|
// at a time. This is the T_serial reference for the 5× speedup
|
|
1590
1658
|
// assertion.
|
|
1591
|
-
const {
|
|
1592
|
-
const pool = new
|
|
1659
|
+
const { IsolatePool } = await import('@nimbus-sh/fabric/isolate-pool.js');
|
|
1660
|
+
const pool = new IsolatePool(env, self.ctx, {
|
|
1593
1661
|
concurrency: 1,
|
|
1594
1662
|
timeoutMs: 60_000,
|
|
1595
1663
|
tag: 'fanout-serial',
|
package/dist/session/rpc.d.ts
CHANGED
|
@@ -357,11 +357,11 @@ export declare function vfsReaddir(self: RpcHost, path: string): {
|
|
|
357
357
|
/** RPC: Write a file to the VFS. */
|
|
358
358
|
export declare function vfsWriteFile(self: RpcHost, path: string, data: ArrayBuffer): void;
|
|
359
359
|
/**
|
|
360
|
-
* RPC: peer-DO execute leg of
|
|
360
|
+
* RPC: peer-DO execute leg of Fanout's peer-DO fanout topology.
|
|
361
361
|
*
|
|
362
362
|
* Called by a coordinator NimbusSession DO via
|
|
363
363
|
* `env.NIMBUS_SESSION.idFromName(siblingName).get()._rpcFanoutExecute(...)`.
|
|
364
|
-
* THIS DO instance acts as a peer worker: it runs ONE
|
|
364
|
+
* THIS DO instance acts as a peer worker: it runs ONE IsolatePool
|
|
365
365
|
* over its assigned shard and returns the per-task results.
|
|
366
366
|
*
|
|
367
367
|
* Cap-sidestep mechanic
|
|
@@ -370,7 +370,7 @@ export declare function vfsWriteFile(self: RpcHost, path: string, data: ArrayBuf
|
|
|
370
370
|
* Each RPC is a stub.fetch / RPC method invocation, NOT an
|
|
371
371
|
* `env.LOADER.get()` from the supervisor's own method context — so
|
|
372
372
|
* those N calls don't count against the V8 4-loaders-per-method cap.
|
|
373
|
-
* Inside this RPC handler, we run a SINGLE
|
|
373
|
+
* Inside this RPC handler, we run a SINGLE IsolatePool with concurrency
|
|
374
374
|
* matching the shard size — and since the shard arrived via the peer
|
|
375
375
|
* router (capped at MAX_PEER_FANOUT = 32 peers, so each shard is
|
|
376
376
|
* ⌈totalTasks / 32⌉ wide), the in-DO pool stays well under 4.
|
|
@@ -385,9 +385,9 @@ export declare function vfsWriteFile(self: RpcHost, path: string, data: ArrayBuf
|
|
|
385
385
|
* Bytes-isolation
|
|
386
386
|
* ───────────────
|
|
387
387
|
* The fnSource string is forwarded verbatim into a fresh
|
|
388
|
-
*
|
|
388
|
+
* IsolatePool, which serializes it into the loader's worker
|
|
389
389
|
* code. No supervisor-side eval. Same trust posture as every other
|
|
390
|
-
*
|
|
390
|
+
* IsolatePool dispatch.
|
|
391
391
|
*/
|
|
392
392
|
export declare function _rpcFanoutExecute(self: RpcHost, fnSource: string, args: unknown[], poolOpts?: {
|
|
393
393
|
tag?: string;
|
|
@@ -398,7 +398,7 @@ export declare function _rpcFanoutExecute(self: RpcHost, fnSource: string, args:
|
|
|
398
398
|
omitSupervisor?: boolean;
|
|
399
399
|
/**
|
|
400
400
|
* INSTALL-HONESTY: full doId of the COORDINATOR (the DO that
|
|
401
|
-
* called
|
|
401
|
+
* called Fanout.submitMany). The peer's IsolatePool
|
|
402
402
|
* uses this to mint a SUPERVISOR binding that routes back to the
|
|
403
403
|
* coordinator instead of the peer (default behavior pre-fix).
|
|
404
404
|
* Without this, install-batch's writeBatchStream calls from inside
|
|
@@ -408,7 +408,7 @@ export declare function _rpcFanoutExecute(self: RpcHost, fnSource: string, args:
|
|
|
408
408
|
/**
|
|
409
409
|
* Invoking process pid, forwarded into the peer-side SUPERVISOR
|
|
410
410
|
* binding so writeBatchStream is authorized under the caller's
|
|
411
|
-
* credential (see
|
|
411
|
+
* credential (see IsolatePoolOptions.supervisorPid).
|
|
412
412
|
*/
|
|
413
413
|
supervisorPid?: number;
|
|
414
414
|
}): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../src/session/rpc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAgBH,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACxB,MAAM,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AO,EACb,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,kBAAkB,CAAC,CAoB7B;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,CAAC,CAKnB;AAED;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,CAQjC;AAoBD,OAAO,EAA4D,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAElJ,MAAM,MAAM,cAAc,GACtB;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;AAE5D,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAWlG"}
|
package/dist/session/rpc.js
CHANGED
|
@@ -23,25 +23,26 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import { enc, dec } from '@nimbus-sh/core/_shared/bytes.js';
|
|
25
25
|
import { normalizeTerminalNewlines } from '@nimbus-sh/core/_shared/terminal.js';
|
|
26
|
-
import { disposeRpcResource } from '@nimbus-sh/
|
|
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
30
|
import { SqliteRuntimeFsBridge } from '@nimbus-sh/core/runtime/sqlite-runtime-fs-bridge.js';
|
|
31
31
|
import { notifyTerminalEvent } from '../runtime/process-logs-api.js';
|
|
32
|
-
import {
|
|
32
|
+
import { IsolatePool } from '@nimbus-sh/fabric/isolate-pool.js';
|
|
33
33
|
import { residentBootSpecSchema, } from '@nimbus-sh/fabric/process-fabric.js';
|
|
34
|
-
import {
|
|
35
|
-
import { supervisorEntrypoint } from '@nimbus-sh/fabric/
|
|
34
|
+
import { processes, } from '@nimbus-sh/fabric/workerd-facet-host.js';
|
|
35
|
+
import { supervisorEntrypoint } from '@nimbus-sh/fabric/composition.js';
|
|
36
36
|
import { headerPairs, isolateToken, } from '@nimbus-sh/fabric/process-host.js';
|
|
37
37
|
import { OpencodeStageSpecSchema } from '../facets/opencode-staging.js';
|
|
38
|
-
import { recordFailure, getLastRpcFrame, getLastFacetId, } from '@nimbus-sh/
|
|
39
|
-
import { classifyError } from '@nimbus-sh/
|
|
40
|
-
import { acquireSupervisorReadAllocation, } from '@nimbus-sh/
|
|
41
|
-
import { rpcPayloadEnd, rpcPayloadStart, } from '@nimbus-sh/
|
|
38
|
+
import { recordFailure, getLastRpcFrame, getLastFacetId, } from '@nimbus-sh/platform/oom-discriminator.js';
|
|
39
|
+
import { classifyError } from '@nimbus-sh/platform/oom-classify.js';
|
|
40
|
+
import { acquireSupervisorReadAllocation, } from '@nimbus-sh/platform/heavy-alloc-coord.js';
|
|
41
|
+
import { rpcPayloadEnd, rpcPayloadStart, } from '@nimbus-sh/platform/diag-counters.js';
|
|
42
42
|
import { CRED_KERNEL, CRED_SESSION_USER, } from '@nimbus-sh/core/runtime/os-contracts.js';
|
|
43
43
|
import { getSymlinkRegistry } from '@nimbus-sh/core/vfs/symlink-registry.js';
|
|
44
|
-
import {
|
|
44
|
+
import { MAX_RPC_SAFE_PAYLOAD_BYTES } from '@nimbus-sh/platform/limits.js';
|
|
45
|
+
import { FS_LIST_PAGE_LIMIT, FS_READ_BATCH_PATH_LIMIT, FS_READ_BATCH_REQUEST_BYTES, } from '@nimbus-sh/core/constants.js';
|
|
45
46
|
import { routeSessionLoopback } from './loopback.js';
|
|
46
47
|
import { clearPortCapability } from './port-capability.js';
|
|
47
48
|
import { normalizeVfsPath, parentVfsPath } from '@nimbus-sh/core/vfs/path.js';
|
|
@@ -1008,9 +1009,17 @@ export async function _rpcPrefetch(self, cwd, entryCode) {
|
|
|
1008
1009
|
return prefetchForRequire(self.sqliteFs, entryCode, cwd).bundle;
|
|
1009
1010
|
}
|
|
1010
1011
|
export async function _rpcRegisterPort(self, pid, port) {
|
|
1011
|
-
// Port registration stores the facet association
|
|
1012
|
-
//
|
|
1013
|
-
//
|
|
1012
|
+
// Port registration stores the facet association — the actual facet stub
|
|
1013
|
+
// is stored by FacetManager separately. Registration goes through the
|
|
1014
|
+
// manager so a pid binding a reserved port inherits the reservation's
|
|
1015
|
+
// durable contract: its journal row is stamped with the port's owner and
|
|
1016
|
+
// the stored capability is re-adopted rather than retired.
|
|
1017
|
+
if (self.facetManager) {
|
|
1018
|
+
await self.facetManager.registerPort(pid, port);
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1021
|
+
// No facet manager yet means nothing resident is running — a bare
|
|
1022
|
+
// registration retires the previous occupant's preview capability.
|
|
1014
1023
|
await clearPortCapability(self, port);
|
|
1015
1024
|
self.portRegistry.register(port, pid);
|
|
1016
1025
|
}
|
|
@@ -1026,7 +1035,9 @@ export async function _rpcRouteLoopback(self, port, request) {
|
|
|
1026
1035
|
export async function _rpcTransform(self, code, loader) {
|
|
1027
1036
|
if (!self.esbuildService) {
|
|
1028
1037
|
self.ensureSqliteFs();
|
|
1029
|
-
|
|
1038
|
+
if (!self.sqliteFs)
|
|
1039
|
+
throw new Error('Session VFS is not initialized');
|
|
1040
|
+
self.esbuildService = new EsbuildService(self.sqliteFs.as(CRED_KERNEL));
|
|
1030
1041
|
}
|
|
1031
1042
|
try {
|
|
1032
1043
|
const result = await self.esbuildService.transform(code, {
|
|
@@ -1172,11 +1183,11 @@ export function vfsWriteFile(self, path, data) {
|
|
|
1172
1183
|
self.sqliteFs.as(CRED_KERNEL).writeFile(stripped, new Uint8Array(data));
|
|
1173
1184
|
}
|
|
1174
1185
|
/**
|
|
1175
|
-
* RPC: peer-DO execute leg of
|
|
1186
|
+
* RPC: peer-DO execute leg of Fanout's peer-DO fanout topology.
|
|
1176
1187
|
*
|
|
1177
1188
|
* Called by a coordinator NimbusSession DO via
|
|
1178
1189
|
* `env.NIMBUS_SESSION.idFromName(siblingName).get()._rpcFanoutExecute(...)`.
|
|
1179
|
-
* THIS DO instance acts as a peer worker: it runs ONE
|
|
1190
|
+
* THIS DO instance acts as a peer worker: it runs ONE IsolatePool
|
|
1180
1191
|
* over its assigned shard and returns the per-task results.
|
|
1181
1192
|
*
|
|
1182
1193
|
* Cap-sidestep mechanic
|
|
@@ -1185,7 +1196,7 @@ export function vfsWriteFile(self, path, data) {
|
|
|
1185
1196
|
* Each RPC is a stub.fetch / RPC method invocation, NOT an
|
|
1186
1197
|
* `env.LOADER.get()` from the supervisor's own method context — so
|
|
1187
1198
|
* those N calls don't count against the V8 4-loaders-per-method cap.
|
|
1188
|
-
* Inside this RPC handler, we run a SINGLE
|
|
1199
|
+
* Inside this RPC handler, we run a SINGLE IsolatePool with concurrency
|
|
1189
1200
|
* matching the shard size — and since the shard arrived via the peer
|
|
1190
1201
|
* router (capped at MAX_PEER_FANOUT = 32 peers, so each shard is
|
|
1191
1202
|
* ⌈totalTasks / 32⌉ wide), the in-DO pool stays well under 4.
|
|
@@ -1200,9 +1211,9 @@ export function vfsWriteFile(self, path, data) {
|
|
|
1200
1211
|
* Bytes-isolation
|
|
1201
1212
|
* ───────────────
|
|
1202
1213
|
* The fnSource string is forwarded verbatim into a fresh
|
|
1203
|
-
*
|
|
1214
|
+
* IsolatePool, which serializes it into the loader's worker
|
|
1204
1215
|
* code. No supervisor-side eval. Same trust posture as every other
|
|
1205
|
-
*
|
|
1216
|
+
* IsolatePool dispatch.
|
|
1206
1217
|
*/
|
|
1207
1218
|
export async function _rpcFanoutExecute(self, fnSource, args, poolOpts = {}) {
|
|
1208
1219
|
if (!Array.isArray(args)) {
|
|
@@ -1216,7 +1227,7 @@ export async function _rpcFanoutExecute(self, fnSource, args, poolOpts = {}) {
|
|
|
1216
1227
|
// with N=8 peers, that's 7 tasks per peer, capped to 4 here so
|
|
1217
1228
|
// each peer DO stays safely below the cap.
|
|
1218
1229
|
const concurrency = Math.min(args.length, 4);
|
|
1219
|
-
const pool = new
|
|
1230
|
+
const pool = new IsolatePool(self.env, self.ctx, {
|
|
1220
1231
|
concurrency,
|
|
1221
1232
|
timeoutMs: poolOpts.timeoutMs,
|
|
1222
1233
|
tag: poolOpts.tag ?? 'fanout-peer',
|
|
@@ -1226,7 +1237,7 @@ export async function _rpcFanoutExecute(self, fnSource, args, poolOpts = {}) {
|
|
|
1226
1237
|
omitSupervisor: poolOpts.omitSupervisor,
|
|
1227
1238
|
// INSTALL-HONESTY: route SUPERVISOR.* back to the coordinator
|
|
1228
1239
|
// (the user's session DO), not the peer DO. When undefined
|
|
1229
|
-
// (back-compat with non-fanout callers),
|
|
1240
|
+
// (back-compat with non-fanout callers), IsolatePool falls
|
|
1230
1241
|
// back to ctx.id.toString() — the legacy behavior, correct for
|
|
1231
1242
|
// single-DO callers.
|
|
1232
1243
|
supervisorDoIdOverride: poolOpts.coordinatorDoId,
|
|
@@ -1249,7 +1260,7 @@ export async function _rpcFanoutExecute(self, fnSource, args, poolOpts = {}) {
|
|
|
1249
1260
|
// ── Process fabric: the peer host leg ───────────────────────────────────────
|
|
1250
1261
|
//
|
|
1251
1262
|
// THIS DO instance acts as a process host for a sibling coordinator session:
|
|
1252
|
-
// it opens the process as a facet of ITSELF — the same `
|
|
1263
|
+
// it opens the process as a facet of ITSELF — the same `processes().spawn`
|
|
1253
1264
|
// call the coordinator makes when it hosts one directly — so the facet lands
|
|
1254
1265
|
// in THIS DO's workerd process, with its own memory AND its own CPU. The
|
|
1255
1266
|
// facet's SUPERVISOR binding is minted for the COORDINATOR's doId, so every
|
|
@@ -1286,7 +1297,7 @@ const HOSTED_RECORD_WAIT_MS = 30_000;
|
|
|
1286
1297
|
/**
|
|
1287
1298
|
* Whole-file reads for a boot spec's by-path members, in ranges. This is the
|
|
1288
1299
|
* one thing a peer does differently from a coordinator, and it is a PARAMETER
|
|
1289
|
-
* of `
|
|
1300
|
+
* of `processes().spawn` rather than a branch inside it: the coordinator reads
|
|
1290
1301
|
* its own disk synchronously, a peer reads the same disk over the supervisor.
|
|
1291
1302
|
*
|
|
1292
1303
|
* Ranged because these are the session's largest files — a ruby
|
|
@@ -1435,7 +1446,7 @@ export async function _rpcHostProcess(self, boot, opts) {
|
|
|
1435
1446
|
});
|
|
1436
1447
|
let facet;
|
|
1437
1448
|
try {
|
|
1438
|
-
facet =
|
|
1449
|
+
facet = processes(self.ctx, self.env).spawn(() => peerDiskReader(supervisor), supervisor, {
|
|
1439
1450
|
pid: hostOpts.pid,
|
|
1440
1451
|
workerKey,
|
|
1441
1452
|
boot: spec,
|