@nimbus-sh/worker 0.3.0 → 0.4.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/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/manager.d.ts +8 -8
- package/dist/facets/manager.d.ts.map +1 -1
- package/dist/facets/manager.js +23 -18
- 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/network-facet.d.ts.map +1 -1
- package/dist/git/network-facet.js +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- 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/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.js +2 -2
- package/dist/router/remote-api.js +1 -1
- 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.js +2 -1
- 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/diag.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 +2 -3
- package/dist/session/init-phases.d.ts.map +1 -1
- package/dist/session/init-phases.js +3 -2
- package/dist/session/init.d.ts.map +1 -1
- package/dist/session/init.js +5 -4
- package/dist/session/keys.d.ts.map +1 -1
- package/dist/session/keys.js +4 -3
- package/dist/session/nimbus-session.d.ts +4 -15
- package/dist/session/nimbus-session.d.ts.map +1 -1
- package/dist/session/nimbus-session.js +16 -28
- package/dist/session/programmatic.d.ts +0 -2
- package/dist/session/programmatic.d.ts.map +1 -1
- package/dist/session/programmatic.js +8 -9
- package/dist/session/routes.d.ts.map +1 -1
- package/dist/session/routes.js +19 -18
- package/dist/session/rpc.d.ts +7 -7
- package/dist/session/rpc.d.ts.map +1 -1
- package/dist/session/rpc.js +20 -19
- package/dist/session/start-real-vite.js +1 -1
- package/dist/session/supervisor-rpc.d.ts.map +1 -1
- package/dist/session/supervisor-rpc.js +7 -9
- package/dist/session/ws.d.ts +1 -3
- package/dist/session/ws.d.ts.map +1 -1
- package/dist/session/ws.js +4 -3
- package/package.json +4 -3
- 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/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';
|
|
@@ -1172,11 +1173,11 @@ export function vfsWriteFile(self, path, data) {
|
|
|
1172
1173
|
self.sqliteFs.as(CRED_KERNEL).writeFile(stripped, new Uint8Array(data));
|
|
1173
1174
|
}
|
|
1174
1175
|
/**
|
|
1175
|
-
* RPC: peer-DO execute leg of
|
|
1176
|
+
* RPC: peer-DO execute leg of Fanout's peer-DO fanout topology.
|
|
1176
1177
|
*
|
|
1177
1178
|
* Called by a coordinator NimbusSession DO via
|
|
1178
1179
|
* `env.NIMBUS_SESSION.idFromName(siblingName).get()._rpcFanoutExecute(...)`.
|
|
1179
|
-
* THIS DO instance acts as a peer worker: it runs ONE
|
|
1180
|
+
* THIS DO instance acts as a peer worker: it runs ONE IsolatePool
|
|
1180
1181
|
* over its assigned shard and returns the per-task results.
|
|
1181
1182
|
*
|
|
1182
1183
|
* Cap-sidestep mechanic
|
|
@@ -1185,7 +1186,7 @@ export function vfsWriteFile(self, path, data) {
|
|
|
1185
1186
|
* Each RPC is a stub.fetch / RPC method invocation, NOT an
|
|
1186
1187
|
* `env.LOADER.get()` from the supervisor's own method context — so
|
|
1187
1188
|
* those N calls don't count against the V8 4-loaders-per-method cap.
|
|
1188
|
-
* Inside this RPC handler, we run a SINGLE
|
|
1189
|
+
* Inside this RPC handler, we run a SINGLE IsolatePool with concurrency
|
|
1189
1190
|
* matching the shard size — and since the shard arrived via the peer
|
|
1190
1191
|
* router (capped at MAX_PEER_FANOUT = 32 peers, so each shard is
|
|
1191
1192
|
* ⌈totalTasks / 32⌉ wide), the in-DO pool stays well under 4.
|
|
@@ -1200,9 +1201,9 @@ export function vfsWriteFile(self, path, data) {
|
|
|
1200
1201
|
* Bytes-isolation
|
|
1201
1202
|
* ───────────────
|
|
1202
1203
|
* The fnSource string is forwarded verbatim into a fresh
|
|
1203
|
-
*
|
|
1204
|
+
* IsolatePool, which serializes it into the loader's worker
|
|
1204
1205
|
* code. No supervisor-side eval. Same trust posture as every other
|
|
1205
|
-
*
|
|
1206
|
+
* IsolatePool dispatch.
|
|
1206
1207
|
*/
|
|
1207
1208
|
export async function _rpcFanoutExecute(self, fnSource, args, poolOpts = {}) {
|
|
1208
1209
|
if (!Array.isArray(args)) {
|
|
@@ -1216,7 +1217,7 @@ export async function _rpcFanoutExecute(self, fnSource, args, poolOpts = {}) {
|
|
|
1216
1217
|
// with N=8 peers, that's 7 tasks per peer, capped to 4 here so
|
|
1217
1218
|
// each peer DO stays safely below the cap.
|
|
1218
1219
|
const concurrency = Math.min(args.length, 4);
|
|
1219
|
-
const pool = new
|
|
1220
|
+
const pool = new IsolatePool(self.env, self.ctx, {
|
|
1220
1221
|
concurrency,
|
|
1221
1222
|
timeoutMs: poolOpts.timeoutMs,
|
|
1222
1223
|
tag: poolOpts.tag ?? 'fanout-peer',
|
|
@@ -1226,7 +1227,7 @@ export async function _rpcFanoutExecute(self, fnSource, args, poolOpts = {}) {
|
|
|
1226
1227
|
omitSupervisor: poolOpts.omitSupervisor,
|
|
1227
1228
|
// INSTALL-HONESTY: route SUPERVISOR.* back to the coordinator
|
|
1228
1229
|
// (the user's session DO), not the peer DO. When undefined
|
|
1229
|
-
// (back-compat with non-fanout callers),
|
|
1230
|
+
// (back-compat with non-fanout callers), IsolatePool falls
|
|
1230
1231
|
// back to ctx.id.toString() — the legacy behavior, correct for
|
|
1231
1232
|
// single-DO callers.
|
|
1232
1233
|
supervisorDoIdOverride: poolOpts.coordinatorDoId,
|
|
@@ -1249,7 +1250,7 @@ export async function _rpcFanoutExecute(self, fnSource, args, poolOpts = {}) {
|
|
|
1249
1250
|
// ── Process fabric: the peer host leg ───────────────────────────────────────
|
|
1250
1251
|
//
|
|
1251
1252
|
// 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 `
|
|
1253
|
+
// it opens the process as a facet of ITSELF — the same `processes().spawn`
|
|
1253
1254
|
// call the coordinator makes when it hosts one directly — so the facet lands
|
|
1254
1255
|
// in THIS DO's workerd process, with its own memory AND its own CPU. The
|
|
1255
1256
|
// facet's SUPERVISOR binding is minted for the COORDINATOR's doId, so every
|
|
@@ -1286,7 +1287,7 @@ const HOSTED_RECORD_WAIT_MS = 30_000;
|
|
|
1286
1287
|
/**
|
|
1287
1288
|
* Whole-file reads for a boot spec's by-path members, in ranges. This is the
|
|
1288
1289
|
* one thing a peer does differently from a coordinator, and it is a PARAMETER
|
|
1289
|
-
* of `
|
|
1290
|
+
* of `processes().spawn` rather than a branch inside it: the coordinator reads
|
|
1290
1291
|
* its own disk synchronously, a peer reads the same disk over the supervisor.
|
|
1291
1292
|
*
|
|
1292
1293
|
* Ranged because these are the session's largest files — a ruby
|
|
@@ -1435,7 +1436,7 @@ export async function _rpcHostProcess(self, boot, opts) {
|
|
|
1435
1436
|
});
|
|
1436
1437
|
let facet;
|
|
1437
1438
|
try {
|
|
1438
|
-
facet =
|
|
1439
|
+
facet = processes(self.ctx, self.env).spawn(() => peerDiskReader(supervisor), supervisor, {
|
|
1439
1440
|
pid: hostOpts.pid,
|
|
1440
1441
|
workerKey,
|
|
1441
1442
|
boot: spec,
|
|
@@ -20,7 +20,7 @@ import { EsbuildService } from '@nimbus-sh/core/runtime/esbuild-service.js';
|
|
|
20
20
|
import { rewriteCirrusViteConfigBundle } from '@nimbus-sh/core/runtime/cirrus-vite-config-rewriter.js';
|
|
21
21
|
import { CirrusReal } from '../facets/cirrus-real.js';
|
|
22
22
|
import { makeLongRunningPortStub } from '@nimbus-sh/core/runtime/long-running-handle.js';
|
|
23
|
-
import { acquireHeavyAlloc } from '@nimbus-sh/
|
|
23
|
+
import { acquireHeavyAlloc } from '@nimbus-sh/platform/heavy-alloc-coord.js';
|
|
24
24
|
import { VITE_CONFIG_KEY } from './keys.js';
|
|
25
25
|
import { clearPortCapability } from './port-capability.js';
|
|
26
26
|
/**
|
|
@@ -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;
|
|
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;AAOtD,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,E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,CAAC,OAAO,CAAC;IAI1D,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAI1H;;;;;;;OAOG;IACG,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QACtD,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;KAClD,CAAC;CAGH"}
|
|
@@ -29,15 +29,14 @@
|
|
|
29
29
|
* prefetch(cwd, entryCode) → Record<string, string>
|
|
30
30
|
*/
|
|
31
31
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
32
|
-
import { setSupervisorEntrypointName } from '@nimbus-sh/fabric/ctx-exports.js';
|
|
33
32
|
// W5: OOM discriminator — record last-known RPC frame on writeBatch entry
|
|
34
|
-
import { setLastRpcFrame } from '@nimbus-sh/
|
|
33
|
+
import { setLastRpcFrame } from '@nimbus-sh/platform/oom-discriminator.js';
|
|
35
34
|
// Phase 2 A'.2 — supervisor in-flight RPC payload byte tracking.
|
|
36
|
-
import { rpcPayloadStart, rpcPayloadEnd } from '@nimbus-sh/
|
|
35
|
+
import { rpcPayloadStart, rpcPayloadEnd } from '@nimbus-sh/platform/diag-counters.js';
|
|
37
36
|
// W4: R2 cross-tenant npm cache (tarballs + packuments)
|
|
38
37
|
import { R2CacheClient, MAX_R2_TARBALL_BYTES } from '../npm/r2-cache.js';
|
|
39
|
-
import { useRpcResource } from '@nimbus-sh/
|
|
40
|
-
import { W7_MAX_RECORD_BYTES } from '@nimbus-sh/
|
|
38
|
+
import { useRpcResource } from '@nimbus-sh/platform/rpc-dispose.js';
|
|
39
|
+
import { W7_MAX_RECORD_BYTES } from '@nimbus-sh/platform/w7-frame.js';
|
|
41
40
|
/**
|
|
42
41
|
* Drain the per-call event list captured by R2CacheClient during this
|
|
43
42
|
* SupervisorRPC call.
|
|
@@ -75,10 +74,9 @@ function _estimateWriteBatchBytes(payload) {
|
|
|
75
74
|
n += 80 + (i?.path?.length ?? 0);
|
|
76
75
|
return n;
|
|
77
76
|
}
|
|
78
|
-
// The fabric mints `env.SUPERVISOR` bindings for the programs it hosts;
|
|
79
|
-
//
|
|
80
|
-
//
|
|
81
|
-
setSupervisorEntrypointName('SupervisorRPC');
|
|
77
|
+
// The fabric mints `env.SUPERVISOR` bindings for the programs it hosts; the
|
|
78
|
+
// worker's composition root (src/index.ts) names this class to the fabric
|
|
79
|
+
// with composeFabric.
|
|
82
80
|
export class SupervisorRPC extends WorkerEntrypoint {
|
|
83
81
|
/**
|
|
84
82
|
* The supervisor DO stub for RPC routing, found from the doId in ctx.props.
|
package/dist/session/ws.d.ts
CHANGED
|
@@ -60,15 +60,13 @@ export interface WsHost {
|
|
|
60
60
|
_w9PersistWired: boolean;
|
|
61
61
|
_w9FlushTimer: any;
|
|
62
62
|
_w9SchemaInit: boolean;
|
|
63
|
-
_isolateGen: number;
|
|
64
|
-
_isolateGenPersisted: boolean;
|
|
65
63
|
_w9WsConfig: any;
|
|
66
64
|
_diagPeakRss: number;
|
|
67
65
|
_diagPeakHeapUsed: number;
|
|
68
66
|
_w5LastPersistAt: number;
|
|
69
67
|
_w5LastPersistRingSize: number;
|
|
70
68
|
/** [B'.4] live phase indicator — see nimbus-session-internal.d.ts */
|
|
71
|
-
_b4Phase: import('@nimbus-sh/
|
|
69
|
+
_b4Phase: import('@nimbus-sh/platform/oom-discriminator.js').SessionState | null;
|
|
72
70
|
_w5PersistRing(): Promise<void> | null;
|
|
73
71
|
_w9FlushOnClose(): void;
|
|
74
72
|
}
|
package/dist/session/ws.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws.d.ts","sourceRoot":"","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MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,qEAAqE;IACrE,QAAQ,EAAE,OAAO,0CAA0C,EAAE,YAAY,GAAG,IAAI,CAAC;IACjF,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACvC,eAAe,IAAI,IAAI,CAAC;CACzB;AAgDD;;;;;;;GAOG;AACH,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AA0CD,wBAAgB,MAAM,CAAC,EAAE,EAAE,SAAS,GAAG,YAAY,CAElD;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuEzG;AA+CD,wBAAsB,OAAO,CAC3B,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,SAAS,EACb,KAAK,CAAC,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,IAAI,CAAC,CA4Ff;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAuEtF;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAUlD"}
|
package/dist/session/ws.js
CHANGED
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
* touches ctx.waitUntil; uses `(host.ctx as any)` cast).
|
|
34
34
|
*/
|
|
35
35
|
import { dec } from '@nimbus-sh/core/_shared/bytes.js';
|
|
36
|
-
import { recordFailure, getLastRpcFrame, getLastFacetId, recordRecoveryEvent } from '@nimbus-sh/
|
|
36
|
+
import { recordFailure, getLastRpcFrame, getLastFacetId, recordRecoveryEvent } from '@nimbus-sh/platform/oom-discriminator.js';
|
|
37
|
+
import { generation } from '@nimbus-sh/fabric/generation.js';
|
|
37
38
|
import { persistShellState } from './state-store.js';
|
|
38
39
|
import { handleFsWatchSubscribe, handleFsWatchUnsubscribe, cleanupFsWatchOnClose, } from './fs-watch.js';
|
|
39
40
|
import { parseProcessLogClientFrame } from '@nimbus-sh/core/runtime/process-io-protocol.js';
|
|
@@ -320,7 +321,7 @@ export async function wsClose(self, ws, _code, _reason, _wasClean) {
|
|
|
320
321
|
fromState: 'active',
|
|
321
322
|
toState: 'drained',
|
|
322
323
|
trigger: 'ws-close',
|
|
323
|
-
isolateGen: self.
|
|
324
|
+
isolateGen: generation(self.ctx),
|
|
324
325
|
dataLoss: false,
|
|
325
326
|
snapshotKeysRehydrated: 0,
|
|
326
327
|
});
|
|
@@ -400,7 +401,7 @@ export async function wsError(self, ws, _error) {
|
|
|
400
401
|
fromState: 'active',
|
|
401
402
|
toState: 'drained',
|
|
402
403
|
trigger: 'ws-error',
|
|
403
|
-
isolateGen: self.
|
|
404
|
+
isolateGen: generation(self.ctx),
|
|
404
405
|
dataLoss: false,
|
|
405
406
|
snapshotKeysRehydrated: 0,
|
|
406
407
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nimbus-sh/worker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Nimbus runtime package for Cloudflare Workers, re-exported publicly through @nimbus-sh/sdk/worker.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -84,8 +84,9 @@
|
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
86
|
"@ai-sdk/openai-compatible": "^2.0.41",
|
|
87
|
-
"@nimbus-sh/core": "^0.
|
|
88
|
-
"@nimbus-sh/fabric": "^0.
|
|
87
|
+
"@nimbus-sh/core": "^0.6.0",
|
|
88
|
+
"@nimbus-sh/fabric": "^0.2.0",
|
|
89
|
+
"@nimbus-sh/platform": "^0.1.0",
|
|
89
90
|
"@renovatebot/pep440": "^5.0.0",
|
|
90
91
|
"ai": "^6.0.182",
|
|
91
92
|
"clean-git-ref": "^2.0.1",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Why this exists
|
|
6
6
|
* ───────────────
|
|
7
7
|
* Pre-bundling npm packages (the `Pre-bundling N modules…` step in
|
|
8
|
-
* src/npm/installer.ts) runs inside
|
|
8
|
+
* src/npm/installer.ts) runs inside NimbusIsolatePool isolates so each
|
|
9
9
|
* `esbuild.build()` allocation hits a fresh 128 MiB envelope rather
|
|
10
10
|
* than the supervisor's. The facet needs two pieces of esbuild-wasm
|
|
11
11
|
* at module-load time:
|
|
@@ -175,7 +175,7 @@ async function main() {
|
|
|
175
175
|
* esbuild-wasm-bundle.generated.ts — AUTO-GENERATED by scripts/bundle-esbuild-wasm.mjs
|
|
176
176
|
* DO NOT EDIT.
|
|
177
177
|
*
|
|
178
|
-
* Bundled esbuild-wasm ${version} adapter for use inside
|
|
178
|
+
* Bundled esbuild-wasm ${version} adapter for use inside NimbusIsolatePool
|
|
179
179
|
* isolates. Only the JS adapter is bundled here (~117 KiB); the wasm
|
|
180
180
|
* binary itself lives in the static-assets layer at
|
|
181
181
|
* public/_assets/esbuild-${version}.wasm and is fetched on demand by
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* injects into dynamic workers.
|
|
5
5
|
*
|
|
6
6
|
* WHY this exists:
|
|
7
|
-
* Dynamic workers (NimbusFacetPool /
|
|
7
|
+
* Dynamic workers (NimbusFacetPool / NimbusIsolatePool) receive their
|
|
8
8
|
* module source as strings — they cannot import supervisor modules,
|
|
9
9
|
* and user functions cannot capture supervisor closure variables. Any
|
|
10
10
|
* TypeScript the injected code needs must therefore be esbuild-bundled
|
|
@@ -51,6 +51,7 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
|
51
51
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
52
52
|
const root = join(__dirname, '..');
|
|
53
53
|
const coreRoot = join(root, '..', 'core');
|
|
54
|
+
const platformRoot = join(root, '..', 'platform');
|
|
54
55
|
|
|
55
56
|
/**
|
|
56
57
|
* Bundle one TS source into a self-contained ESM string suitable for
|
|
@@ -273,11 +274,8 @@ async function main() {
|
|
|
273
274
|
// facet has no access to the encoder symbol (cloudflare-parallel
|
|
274
275
|
// serialises via fn.toString() — no runtime imports).
|
|
275
276
|
//
|
|
276
|
-
// The W7-frame module imports a TypeScript type from sqlite-vfs,
|
|
277
|
-
// which esbuild's type-stripping handles transparently. The
|
|
278
|
-
// runtime output has no imports.
|
|
279
277
|
const w7Stripped = await bundleAsPreamble(
|
|
280
|
-
join(
|
|
278
|
+
join(platformRoot, 'src', 'w7-frame.ts'),
|
|
281
279
|
'w7-frame',
|
|
282
280
|
);
|
|
283
281
|
|
|
@@ -291,7 +289,7 @@ async function main() {
|
|
|
291
289
|
' *',
|
|
292
290
|
' * Produced by scripts/bundle-facet-workers.mjs from:',
|
|
293
291
|
' * - @nimbus-sh/core src/_shared/tarball-stream.ts (streaming tar primitives)',
|
|
294
|
-
' * - @nimbus-sh/
|
|
292
|
+
' * - @nimbus-sh/platform src/w7-frame.ts (W7 streaming bulk-write encoder)',
|
|
295
293
|
' *',
|
|
296
294
|
' * Consumed by src/loaders/loader-pool.ts callers via the `preamble`',
|
|
297
295
|
' * option. The preamble is injected at the top of every generated',
|
|
@@ -327,7 +325,7 @@ async function main() {
|
|
|
327
325
|
' *',
|
|
328
326
|
' * Self-contained IIFE that installs globalThis.__nimbusVirtualSockets.',
|
|
329
327
|
' * Consumed by python-runner.ts and ruby-runner.ts: spliced into the',
|
|
330
|
-
' * socket process worker module source passed to
|
|
328
|
+
' * socket process worker module source passed to NimbusIsolatePool.',
|
|
331
329
|
' *',
|
|
332
330
|
` * Size: ${(kernelSrc.length / 1024).toFixed(2)} KiB`,
|
|
333
331
|
' */',
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Why this exists
|
|
7
7
|
* ───────────────
|
|
8
|
-
* `import { DatabaseSync } from "node:sqlite"` runs inside
|
|
8
|
+
* `import { DatabaseSync } from "node:sqlite"` runs inside NimbusIsolatePool
|
|
9
9
|
* facet isolates. sql.js (Emscripten SQLite) needs two pieces at facet
|
|
10
10
|
* runtime:
|
|
11
11
|
*
|