@nimbus-sh/worker 0.9.0 → 0.10.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 +24 -24
- package/dist/esbuild-wasm-bundle.generated.d.ts.map +1 -1
- package/dist/esbuild-wasm-bundle.generated.js +24 -24
- package/dist/facets/cirrus-real.js +3 -3
- package/dist/facets/compose.js +9 -2
- package/dist/facets/esbuild-bundle-pool.d.ts +1 -1
- package/dist/facets/esbuild-bundle-pool.js +3 -3
- package/dist/facets/esbuild-transform.d.ts +6 -2
- package/dist/facets/esbuild-transform.d.ts.map +1 -1
- package/dist/facets/esbuild-transform.js +8 -4
- package/dist/facets/manager.d.ts +28 -0
- package/dist/facets/manager.d.ts.map +1 -1
- package/dist/facets/manager.js +89 -37
- package/dist/facets/real-vite-hmr.d.ts +2 -0
- package/dist/facets/real-vite-hmr.d.ts.map +1 -1
- package/dist/facets/real-vite-hmr.js +3 -2
- package/dist/git/commands.d.ts +17 -1
- package/dist/git/commands.d.ts.map +1 -1
- package/dist/git/commands.js +73 -9
- package/dist/git/network-facet.d.ts +2 -0
- package/dist/git/network-facet.d.ts.map +1 -1
- package/dist/git/network-facet.js +10 -5
- package/dist/hosted/commands.d.ts.map +1 -1
- package/dist/hosted/commands.js +2 -2
- package/dist/hosted/runtime.d.ts +3 -2
- package/dist/hosted/runtime.d.ts.map +1 -1
- package/dist/hosted/runtime.js +1 -0
- package/dist/hosted/services.d.ts +8 -0
- package/dist/hosted/services.d.ts.map +1 -1
- package/dist/hosted/services.js +3 -0
- 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 +4 -4
- package/dist/loaders/pre-bundle-preamble.d.ts +6 -3
- package/dist/loaders/pre-bundle-preamble.d.ts.map +1 -1
- package/dist/loaders/pre-bundle-preamble.js +13 -8
- package/dist/node-shims-artifact.generated.js +3 -3
- package/dist/npm/cache.d.ts +6 -1
- package/dist/npm/cache.d.ts.map +1 -1
- package/dist/npm/cache.js +8 -6
- package/dist/npm/install-batch-facet.d.ts +2 -0
- package/dist/npm/install-batch-facet.d.ts.map +1 -1
- package/dist/npm/install-batch-facet.js +29 -15
- package/dist/npm/installer.d.ts +8 -4
- package/dist/npm/installer.d.ts.map +1 -1
- package/dist/npm/installer.js +173 -113
- package/dist/npm/npx-install.d.ts +3 -1
- package/dist/npm/npx-install.d.ts.map +1 -1
- package/dist/npm/npx-install.js +4 -1
- package/dist/npm/placement.d.ts +16 -0
- package/dist/npm/placement.d.ts.map +1 -0
- package/dist/npm/placement.js +33 -0
- package/dist/npm/r2-cache.d.ts +10 -6
- package/dist/npm/r2-cache.d.ts.map +1 -1
- package/dist/npm/r2-cache.js +32 -16
- package/dist/npm/resolve-one-facet.d.ts +3 -0
- package/dist/npm/resolve-one-facet.d.ts.map +1 -1
- package/dist/npm/resolve-one-facet.js +1 -0
- package/dist/npm/resolver.d.ts +11 -6
- package/dist/npm/resolver.d.ts.map +1 -1
- package/dist/npm/resolver.js +12 -3
- package/dist/runtime/cpython-resident.d.ts.map +1 -1
- package/dist/runtime/cpython-resident.js +2 -10
- package/dist/runtime/esbuild-wasm-bytes.d.ts +25 -18
- package/dist/runtime/esbuild-wasm-bytes.d.ts.map +1 -1
- package/dist/runtime/esbuild-wasm-bytes.js +55 -30
- package/dist/runtime/facet-loader-host.d.ts.map +1 -1
- package/dist/runtime/facet-loader-host.js +0 -7
- package/dist/runtime/node-shims.d.ts.map +1 -1
- package/dist/runtime/node-shims.js +839 -180
- package/dist/runtime/python-repl.d.ts.map +1 -1
- package/dist/runtime/python-repl.js +2 -33
- package/dist/runtime/ruby-resident.d.ts.map +1 -1
- package/dist/runtime/ruby-resident.js +5 -16
- package/dist/runtime/wasi/preamble.d.ts +0 -22
- package/dist/runtime/wasi/preamble.d.ts.map +1 -1
- package/dist/runtime/wasi/preamble.js +98 -1401
- package/dist/session/hibernation.d.ts +45 -2
- package/dist/session/hibernation.d.ts.map +1 -1
- package/dist/session/hibernation.js +78 -1
- package/dist/session/nimbus-session.d.ts +10 -2
- package/dist/session/nimbus-session.d.ts.map +1 -1
- package/dist/session/nimbus-session.js +13 -1
- package/dist/session/npm-install-port.d.ts.map +1 -1
- package/dist/session/npm-install-port.js +1 -0
- package/dist/session/routes.d.ts.map +1 -1
- package/dist/session/routes.js +4 -2
- package/dist/session/rpc.d.ts +5 -2
- package/dist/session/rpc.d.ts.map +1 -1
- package/dist/session/rpc.js +10 -2
- package/dist/session/supervisor-rpc.d.ts +17 -9
- package/dist/session/supervisor-rpc.d.ts.map +1 -1
- package/dist/session/supervisor-rpc.js +15 -22
- package/dist/workspace-host.d.ts +1 -1
- package/dist/workspace-host.d.ts.map +1 -1
- package/dist/wrangler/nimbus-wrangler.d.ts.map +1 -1
- package/dist/wrangler/nimbus-wrangler.js +3 -0
- package/package.json +30 -4
- package/public/_assets/esbuild-0.24.2.js +2380 -0
- package/public/_assets/runtime/{node-shims-acaa037e6d26ec0d.js → node-shims-7b4dd7a76d95d21e.js} +838 -179
- package/scripts/bundle-esbuild-wasm.mjs +55 -39
- package/scripts/bundle-facet-workers.mjs +45 -7
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
* Exported from index.ts. Facets receive `env.SUPERVISOR` service binding
|
|
5
5
|
* pointing to this class via ctx.exports loopback binding.
|
|
6
6
|
*
|
|
7
|
-
* Props: { doId: string, pid: number, writerId: string }
|
|
7
|
+
* Props: { doId: string, pid: number, writerId: string, route: HostRoute }
|
|
8
8
|
* doId — the supervisor DO's durable object ID (for routing)
|
|
9
9
|
* pid — the process ID (for stdout/stderr routing)
|
|
10
10
|
* writerId — the active append-writer incarnation for this process
|
|
11
|
+
* route — the host namespace and dispatch method, minted with the binding
|
|
12
|
+
* in the host's isolate; this entrypoint may answer from another
|
|
11
13
|
*
|
|
12
14
|
* Methods callable by facets via RPC:
|
|
13
15
|
* readFile(path) → string | null
|
|
@@ -30,7 +32,7 @@
|
|
|
30
32
|
*/
|
|
31
33
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
32
34
|
import type { PackumentReadThrough } from '../npm/r2-cache.js';
|
|
33
|
-
import type { VfsAcquireResult, VfsListPage, RuntimeFsBridge, RuntimeFsPath, RuntimeOpenFlags, RuntimeFileHandle } from '@nimbus-sh/core/runtime/os-contracts.js';
|
|
35
|
+
import type { VfsAcquireResult, VfsListPage, VfsMutationReceipt, RuntimeFsBridge, RuntimeFsPath, RuntimeOpenFlags, RuntimeFileHandle } from '@nimbus-sh/core/runtime/os-contracts.js';
|
|
34
36
|
import type { WriteBatchStreamResult } from '@nimbus-sh/core/vfs/sqlite-vfs.js';
|
|
35
37
|
import type { FsReadBatchEntry, FsReadBatchRequest } from './rpc.js';
|
|
36
38
|
import type { CacheTier, CacheKind } from '@nimbus-sh/core/_shared/cache-stats.js';
|
|
@@ -53,7 +55,11 @@ export type SupervisorCacheStatEvent = {
|
|
|
53
55
|
cacheKind: CacheKind;
|
|
54
56
|
};
|
|
55
57
|
export declare class SupervisorRPC extends WorkerEntrypoint {
|
|
56
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Resolve the host anew for each WorkerEntrypoint invocation, by the
|
|
60
|
+
* route the binding carries. The platform serves this entrypoint from
|
|
61
|
+
* whichever isolate it likes; the props were minted in the host's.
|
|
62
|
+
*/
|
|
57
63
|
private _dispatch;
|
|
58
64
|
private _op;
|
|
59
65
|
/** Stamp filesystem credentials from the binding, not the supplied arguments. */
|
|
@@ -74,12 +80,12 @@ export declare class SupervisorRPC extends WorkerEntrypoint {
|
|
|
74
80
|
}): Promise<Awaited<ReturnType<RuntimeFsBridge['stat']>>>;
|
|
75
81
|
lstat(path: string): Promise<any>;
|
|
76
82
|
hasLegacySymlinkUnder(path: string): Promise<boolean>;
|
|
77
|
-
utimes(path: RuntimeFsPath, atimeMs: number, mtimeMs: number): Promise<
|
|
78
|
-
chmod(path: RuntimeFsPath, mode: number): Promise<
|
|
83
|
+
utimes(path: RuntimeFsPath, atimeMs: number, mtimeMs: number): Promise<VfsMutationReceipt>;
|
|
84
|
+
chmod(path: RuntimeFsPath, mode: number): Promise<VfsMutationReceipt>;
|
|
79
85
|
access(path: RuntimeFsPath, mode: number): Promise<void>;
|
|
80
86
|
chown(path: RuntimeFsPath, uid: number, gid: number, options?: {
|
|
81
87
|
followSymlinks?: boolean;
|
|
82
|
-
}): Promise<
|
|
88
|
+
}): Promise<VfsMutationReceipt>;
|
|
83
89
|
setUmask(mask: number): Promise<number>;
|
|
84
90
|
readdir(path: RuntimeFsPath): Promise<{
|
|
85
91
|
name: string;
|
|
@@ -184,10 +190,10 @@ export declare class SupervisorRPC extends WorkerEntrypoint {
|
|
|
184
190
|
* a short result, which a caller could mistake for a short file.
|
|
185
191
|
*/
|
|
186
192
|
fsReadBatch(requests: FsReadBatchRequest[]): Promise<FsReadBatchEntry[]>;
|
|
187
|
-
fsWriteRange(path: string, offset: number, bytes: Uint8Array | ArrayBuffer): Promise<
|
|
193
|
+
fsWriteRange(path: string, offset: number, bytes: Uint8Array | ArrayBuffer): Promise<VfsMutationReceipt>;
|
|
188
194
|
fsAppend(path: string, moduleId: string, operationId: string, bytes: Uint8Array | ArrayBuffer): Promise<number>;
|
|
189
195
|
fsAppendAck(moduleId: string, operationId: string): Promise<void>;
|
|
190
|
-
fsTruncate(path: string, size: number): Promise<
|
|
196
|
+
fsTruncate(path: string, size: number): Promise<VfsMutationReceipt>;
|
|
191
197
|
/**
|
|
192
198
|
* Bulk-write all inodes + chunks in ONE transactionSync on the supervisor.
|
|
193
199
|
* Used by facets that buffer writes locally (git clone/fetch/pull).
|
|
@@ -283,11 +289,13 @@ export declare class SupervisorRPC extends WorkerEntrypoint {
|
|
|
283
289
|
* it, so a caller-supplied `put` would be a cross-tenant
|
|
284
290
|
* code-execution primitive for anyone holding a supervisor stub. No
|
|
285
291
|
* such RPC exists: the only bytes that reach `pc/<name>.json` are the
|
|
286
|
-
* ones registry.npmjs.org served for that exact name
|
|
292
|
+
* ones registry.npmjs.org served for that exact name; another registry
|
|
293
|
+
* (`options.registry`, the install's `NPM_REGISTRY`) has its own keys.
|
|
287
294
|
*/
|
|
288
295
|
getPackument(name: string, options?: {
|
|
289
296
|
retries?: number;
|
|
290
297
|
timeoutMs?: number;
|
|
298
|
+
registry?: string;
|
|
291
299
|
}): Promise<PackumentReadThrough & {
|
|
292
300
|
events: SupervisorCacheStatEvent[];
|
|
293
301
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor-rpc.d.ts","sourceRoot":"","sources":["../../src/session/supervisor-rpc.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"supervisor-rpc.d.ts","sourceRoot":"","sources":["../../src/session/supervisor-rpc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAUtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,kBAAkB,EAAE,eAAe,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AACtL,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,CAA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,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,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"}
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
* Exported from index.ts. Facets receive `env.SUPERVISOR` service binding
|
|
5
5
|
* pointing to this class via ctx.exports loopback binding.
|
|
6
6
|
*
|
|
7
|
-
* Props: { doId: string, pid: number, writerId: string }
|
|
7
|
+
* Props: { doId: string, pid: number, writerId: string, route: HostRoute }
|
|
8
8
|
* doId — the supervisor DO's durable object ID (for routing)
|
|
9
9
|
* pid — the process ID (for stdout/stderr routing)
|
|
10
10
|
* writerId — the active append-writer incarnation for this process
|
|
11
|
+
* route — the host namespace and dispatch method, minted with the binding
|
|
12
|
+
* in the host's isolate; this entrypoint may answer from another
|
|
11
13
|
*
|
|
12
14
|
* Methods callable by facets via RPC:
|
|
13
15
|
* readFile(path) → string | null
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
* prefetch(cwd, entryCode) → Record<string, string>
|
|
30
32
|
*/
|
|
31
33
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
32
|
-
import {
|
|
34
|
+
import { hostNamespaceBinding, hostOpDispatch } from '@nimbus-sh/fabric/host-dispatch.js';
|
|
33
35
|
// W5: OOM discriminator — record last-known RPC frame on writeBatch entry
|
|
34
36
|
import { setLastRpcFrame } from '@nimbus-sh/platform/oom-discriminator.js';
|
|
35
37
|
// Phase 2 A'.2 — supervisor in-flight RPC payload byte tracking.
|
|
@@ -79,30 +81,20 @@ function _estimateWriteBatchBytes(payload) {
|
|
|
79
81
|
// worker's composition root (src/index.ts) names this class to the fabric
|
|
80
82
|
// with composeFabric.
|
|
81
83
|
export class SupervisorRPC extends WorkerEntrypoint {
|
|
82
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Resolve the host anew for each WorkerEntrypoint invocation, by the
|
|
86
|
+
* route the binding carries. The platform serves this entrypoint from
|
|
87
|
+
* whichever isolate it likes; the props were minted in the host's.
|
|
88
|
+
*/
|
|
83
89
|
_dispatch() {
|
|
84
|
-
const
|
|
90
|
+
const props = (this.ctx.props ?? {});
|
|
91
|
+
const doId = props.doId;
|
|
85
92
|
if (typeof doId !== 'string' || doId.length === 0) {
|
|
86
93
|
throw new Error('SupervisorRPC: missing doId in props');
|
|
87
94
|
}
|
|
88
|
-
const
|
|
89
|
-
const namespace = Reflect.get(this.env, binding);
|
|
90
|
-
if (!namespace || typeof namespace.idFromString !== 'function') {
|
|
91
|
-
throw new Error(`SupervisorRPC: env.${binding} is not a Durable Object namespace; `
|
|
92
|
-
+ "a workspace host names its own with composeFabric({ hostNamespace: '<binding>' })");
|
|
93
|
-
}
|
|
95
|
+
const namespace = hostNamespaceBinding(this.env, 'SupervisorRPC', props.route);
|
|
94
96
|
const stub = namespace.get(namespace.idFromString(doId));
|
|
95
|
-
|
|
96
|
-
const dispatch = Reflect.get(stub, method);
|
|
97
|
-
if (typeof dispatch !== 'function') {
|
|
98
|
-
throw new Error(`SupervisorRPC: the workspace host mounts no ${method}(); `
|
|
99
|
-
+ 'a host forwards one method to workspace.supervisorOp(op)');
|
|
100
|
-
}
|
|
101
|
-
// Never `.call(stub, …)` on an RpcStub: the proxy treats `call` as a
|
|
102
|
-
// property get, which becomes an RPC to a method literally named "call".
|
|
103
|
-
// `Reflect.apply` reaches the proxied member's apply trap instead, and on
|
|
104
|
-
// a plain-object host it still invokes the method with the stub as `this`.
|
|
105
|
-
return (envelope) => Reflect.apply(dispatch, stub, [envelope]);
|
|
97
|
+
return hostOpDispatch(stub, 'SupervisorRPC', props.route);
|
|
106
98
|
}
|
|
107
99
|
_op(op, args = [], extra = {}) {
|
|
108
100
|
return this._dispatch()({ op, args, ...extra });
|
|
@@ -534,7 +526,8 @@ export class SupervisorRPC extends WorkerEntrypoint {
|
|
|
534
526
|
* it, so a caller-supplied `put` would be a cross-tenant
|
|
535
527
|
* code-execution primitive for anyone holding a supervisor stub. No
|
|
536
528
|
* such RPC exists: the only bytes that reach `pc/<name>.json` are the
|
|
537
|
-
* ones registry.npmjs.org served for that exact name
|
|
529
|
+
* ones registry.npmjs.org served for that exact name; another registry
|
|
530
|
+
* (`options.registry`, the install's `NPM_REGISTRY`) has its own keys.
|
|
538
531
|
*/
|
|
539
532
|
async getPackument(name, options) {
|
|
540
533
|
const r2 = this._r2();
|
package/dist/workspace-host.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { composeFacetManager, type FacetManagerDeps, type FacetManagerHostHooks, type ComposedFacetManager } from './facets/compose.js';
|
|
2
|
-
export type { WorkerRecipe, ResolvedWorkerLaunch } from './facets/manager.js';
|
|
2
|
+
export type { WorkerRecipe, ResolvedWorkerLaunch, LongRunningWorkerSpawnOptions } from './facets/manager.js';
|
|
3
3
|
export { composeHostedRuntime, type HostedRuntime, type HostedRuntimeOptions, type HostedRuntimeLifecycle, type HostedRuntimeTask, type RuntimeFiles } from './hosted/runtime.js';
|
|
4
4
|
export { runtimeCatalogSource } from './runtime/runtime-catalog.js';
|
|
5
5
|
export { SupervisorRPC } from './session/supervisor-rpc.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-host.d.ts","sourceRoot":"","sources":["../src/workspace-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACxI,YAAY,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"workspace-host.d.ts","sourceRoot":"","sources":["../src/workspace-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACxI,YAAY,EAAE,YAAY,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAC7G,OAAO,EAAE,oBAAoB,EAAE,KAAK,aAAa,EAAE,KAAK,oBAAoB,EAAE,KAAK,sBAAsB,EAAE,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAClL,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nimbus-wrangler.d.ts","sourceRoot":"","sources":["../../src/wrangler/nimbus-wrangler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,KAAK,EAAY,eAAe,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"nimbus-wrangler.d.ts","sourceRoot":"","sources":["../../src/wrangler/nimbus-wrangler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,O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EAAE,qBAAqB;IAWvC,qCAAqC;IAC/B,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;IAqB/B,oCAAoC;IACpC,IAAI,IAAI,IAAI;IAgBZ,IAAI,SAAS,YAA2B;IAIxC,OAAO,CAAC,UAAU;IAiDlB,oFAAoF;IACpF,OAAO,CAAC,gBAAgB;IAqBxB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,gBAAgB;YAIV,YAAY;IA6L1B,OAAO,CAAC,aAAa;IAwOrB,OAAO,CAAC,eAAe;IAkCvB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACG,aAAa,CACjB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM;IAChB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,QAAQ,CAAC;IAsFpB,IAAI,KAAK;;;;;;MAQR;IAYD,8FAA8F;IAC9F,kBAAkB,IAAI,OAAO;IAK7B,+EAA+E;IAC/E,qBAAqB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI5C;;;;;gCAK4B;IAC5B,uBAAuB,IAAI,IAAI;CA4BhC"}
|
|
@@ -18,6 +18,7 @@ import { registerInnerDoClass, clearInnerDoClasses } from '@nimbus-sh/fabric/inn
|
|
|
18
18
|
import { KvEmulator } from '../bindings/kv.js';
|
|
19
19
|
import { D1Emulator } from '../bindings/d1.js';
|
|
20
20
|
import { R2Emulator } from '../bindings/r2.js';
|
|
21
|
+
import { hostRoute } from '@nimbus-sh/fabric/composition.js';
|
|
21
22
|
// ── Proxy helpers ──────────────────────────────────────────────────────
|
|
22
23
|
/**
|
|
23
24
|
* Rewrite a Location header emitted by the inner Worker so that, when
|
|
@@ -558,6 +559,7 @@ export class NimbusWrangler {
|
|
|
558
559
|
vfsRoot: this.root,
|
|
559
560
|
assetsDir,
|
|
560
561
|
doId,
|
|
562
|
+
route: hostRoute() ?? undefined,
|
|
561
563
|
},
|
|
562
564
|
});
|
|
563
565
|
}
|
|
@@ -624,6 +626,7 @@ export class NimbusWrangler {
|
|
|
624
626
|
props: {
|
|
625
627
|
bindingName,
|
|
626
628
|
supervisorDoId: doId,
|
|
629
|
+
route: hostRoute() ?? undefined,
|
|
627
630
|
},
|
|
628
631
|
});
|
|
629
632
|
// Track facet names we might create later so stop() can abort
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nimbus-sh/worker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Nimbus runtime package for Cloudflare Workers, re-exported publicly through @nimbus-sh/sdk/worker.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -78,6 +78,31 @@
|
|
|
78
78
|
"types": "./dist/git/commands.d.ts",
|
|
79
79
|
"import": "./dist/git/commands.js"
|
|
80
80
|
},
|
|
81
|
+
"./session/programmatic": {
|
|
82
|
+
"workspace": "./src/session/programmatic.ts",
|
|
83
|
+
"types": "./dist/session/programmatic.d.ts",
|
|
84
|
+
"import": "./dist/session/programmatic.js"
|
|
85
|
+
},
|
|
86
|
+
"./session/rpc": {
|
|
87
|
+
"workspace": "./src/session/rpc.ts",
|
|
88
|
+
"types": "./dist/session/rpc.d.ts",
|
|
89
|
+
"import": "./dist/session/rpc.js"
|
|
90
|
+
},
|
|
91
|
+
"./session/supervisor-rpc": {
|
|
92
|
+
"workspace": "./src/session/supervisor-rpc.ts",
|
|
93
|
+
"types": "./dist/session/supervisor-rpc.d.ts",
|
|
94
|
+
"import": "./dist/session/supervisor-rpc.js"
|
|
95
|
+
},
|
|
96
|
+
"./session/routes": {
|
|
97
|
+
"workspace": "./src/session/routes.ts",
|
|
98
|
+
"types": "./dist/session/routes.d.ts",
|
|
99
|
+
"import": "./dist/session/routes.js"
|
|
100
|
+
},
|
|
101
|
+
"./runtime/package-manager": {
|
|
102
|
+
"workspace": "./src/runtime/package-manager.ts",
|
|
103
|
+
"types": "./dist/runtime/package-manager.d.ts",
|
|
104
|
+
"import": "./dist/runtime/package-manager.js"
|
|
105
|
+
},
|
|
81
106
|
"./runtime-sync-helper": "./scripts/bundle-runtime.mjs",
|
|
82
107
|
"./public/*": "./public/*",
|
|
83
108
|
"./package.json": "./package.json"
|
|
@@ -109,9 +134,9 @@
|
|
|
109
134
|
},
|
|
110
135
|
"dependencies": {
|
|
111
136
|
"@ai-sdk/openai-compatible": "^2.0.41",
|
|
112
|
-
"@nimbus-sh/core": "^0.
|
|
113
|
-
"@nimbus-sh/fabric": "^0.7.
|
|
114
|
-
"@nimbus-sh/platform": "^0.5.
|
|
137
|
+
"@nimbus-sh/core": "^0.12.0",
|
|
138
|
+
"@nimbus-sh/fabric": "^0.7.1",
|
|
139
|
+
"@nimbus-sh/platform": "^0.5.1",
|
|
115
140
|
"@renovatebot/pep440": "^5.0.0",
|
|
116
141
|
"ai": "^6.0.182",
|
|
117
142
|
"clean-git-ref": "^2.0.1",
|
|
@@ -135,6 +160,7 @@
|
|
|
135
160
|
},
|
|
136
161
|
"devDependencies": {
|
|
137
162
|
"@cloudflare/workers-types": "^4.20250327.0",
|
|
163
|
+
"acorn": "^8.15.0",
|
|
138
164
|
"dompurify": "3.4.12",
|
|
139
165
|
"highlight.js": "11.11.1",
|
|
140
166
|
"marked": "18.0.6",
|