@nimbus-sh/worker 0.6.0 → 0.8.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 +2 -2
- package/dist/cirrus-npm-cjs.generated.d.ts +1 -1
- package/dist/cirrus-npm-cjs.generated.js +1 -1
- package/dist/facets/cirrus-real.d.ts.map +1 -1
- package/dist/facets/cirrus-real.js +6 -5
- package/dist/facets/compose.d.ts +148 -0
- package/dist/facets/compose.d.ts.map +1 -0
- package/dist/facets/compose.js +146 -0
- package/dist/facets/durable-images.d.ts +9 -5
- package/dist/facets/durable-images.d.ts.map +1 -1
- package/dist/facets/durable-images.js +17 -7
- package/dist/facets/esbuild-bundle-pool.d.ts +49 -0
- package/dist/facets/esbuild-bundle-pool.d.ts.map +1 -0
- package/dist/facets/esbuild-bundle-pool.js +122 -0
- package/dist/facets/exec-telemetry.d.ts +8 -0
- package/dist/facets/exec-telemetry.d.ts.map +1 -1
- package/dist/facets/manager.d.ts +240 -109
- package/dist/facets/manager.d.ts.map +1 -1
- package/dist/facets/manager.js +677 -342
- package/dist/facets/process.d.ts +20 -16
- package/dist/facets/process.d.ts.map +1 -1
- package/dist/facets/process.js +59 -28
- package/dist/facets/real-vite-fs-shim.js +2 -2
- package/dist/facets/real-vite-hmr.d.ts +3 -1
- package/dist/facets/real-vite-hmr.d.ts.map +1 -1
- package/dist/facets/real-vite-hmr.js +18 -8
- package/dist/facets/vite-dev-server.d.ts +25 -47
- package/dist/facets/vite-dev-server.d.ts.map +1 -1
- package/dist/facets/vite-dev-server.js +185 -219
- package/dist/facets/wasm-image-digest.d.ts +25 -0
- package/dist/facets/wasm-image-digest.d.ts.map +1 -0
- package/dist/facets/wasm-image-digest.js +25 -0
- package/dist/facets/wasm-swap-registry.d.ts +51 -92
- package/dist/facets/wasm-swap-registry.d.ts.map +1 -1
- package/dist/facets/wasm-swap-registry.js +68 -227
- package/dist/facets/ws-terminal.d.ts +9 -31
- package/dist/facets/ws-terminal.d.ts.map +1 -1
- package/dist/facets/ws-terminal.js +58 -51
- package/dist/git/network-facet.d.ts.map +1 -1
- package/dist/git/network-facet.js +6 -5
- package/dist/hosted/commands.d.ts +12 -0
- package/dist/hosted/commands.d.ts.map +1 -0
- package/dist/hosted/commands.js +1658 -0
- package/dist/hosted/runtime.d.ts +114 -0
- package/dist/hosted/runtime.d.ts.map +1 -0
- package/dist/hosted/runtime.js +288 -0
- package/dist/hosted/services.d.ts +40 -0
- package/dist/hosted/services.d.ts.map +1 -0
- package/dist/hosted/services.js +512 -0
- package/dist/loaders/child-process/spawn-pool.d.ts +3 -2
- package/dist/loaders/child-process/spawn-pool.d.ts.map +1 -1
- package/dist/loaders/child-process/spawn-pool.js +3 -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 -6
- package/dist/loaders/npm-resolve-preamble.d.ts.map +1 -1
- package/dist/loaders/npm-resolve-preamble.js +34 -108
- package/dist/node-shims-artifact.generated.js +3 -3
- package/dist/npm/install-batch-facet.d.ts +3 -2
- package/dist/npm/install-batch-facet.d.ts.map +1 -1
- package/dist/npm/install-batch-facet.js +45 -15
- package/dist/npm/installer.d.ts +22 -17
- package/dist/npm/installer.d.ts.map +1 -1
- package/dist/npm/installer.js +209 -193
- package/dist/npm/pre-bundle-facet.d.ts +1 -1
- package/dist/npm/pre-bundle-facet.d.ts.map +1 -1
- package/dist/npm/pre-bundle-facet.js +1 -1
- package/dist/npm/resolve-facet.d.ts +6 -0
- package/dist/npm/resolve-facet.d.ts.map +1 -1
- package/dist/npm/resolve-one-facet.d.ts +21 -20
- package/dist/npm/resolve-one-facet.d.ts.map +1 -1
- package/dist/npm/resolve-one-facet.js +85 -84
- package/dist/npm/semver.d.ts +59 -0
- package/dist/npm/semver.d.ts.map +1 -0
- package/dist/npm/semver.js +226 -0
- package/dist/router/remote-api.js +31 -1
- package/dist/runtime/bash-repl.d.ts +1 -1
- package/dist/runtime/bash-repl.d.ts.map +1 -1
- package/dist/runtime/bash-repl.js +38 -4
- package/dist/runtime/bun-runner.js +1 -1
- package/dist/runtime/html-entrypoint.d.ts +7 -0
- package/dist/runtime/html-entrypoint.d.ts.map +1 -1
- package/dist/runtime/html-entrypoint.js +18 -2
- package/dist/runtime/node-runner.d.ts +4 -1
- package/dist/runtime/node-runner.d.ts.map +1 -1
- package/dist/runtime/node-runner.js +9 -2
- package/dist/runtime/node-shims.d.ts.map +1 -1
- package/dist/runtime/node-shims.js +305 -29
- package/dist/runtime/opencode-facet-runner.js +16 -16
- package/dist/runtime/package-manager.d.ts +35 -122
- package/dist/runtime/package-manager.d.ts.map +1 -1
- package/dist/runtime/package-manager.js +61 -596
- package/dist/runtime/process-logs-api.d.ts +1 -1
- package/dist/runtime/process-logs-api.d.ts.map +1 -1
- package/dist/runtime/process-logs-api.js +1 -1
- package/dist/runtime/python-repl.d.ts +2 -1
- package/dist/runtime/python-repl.d.ts.map +1 -1
- package/dist/runtime/python-repl.js +82 -59
- package/dist/runtime/repl-session.d.ts +9 -47
- package/dist/runtime/repl-session.d.ts.map +1 -1
- package/dist/runtime/repl-session.js +105 -105
- package/dist/runtime/runtime-catalog.d.ts +13 -0
- package/dist/runtime/runtime-catalog.d.ts.map +1 -1
- package/dist/runtime/runtime-catalog.js +88 -0
- package/dist/session/agent.d.ts +1 -21
- package/dist/session/agent.d.ts.map +1 -1
- package/dist/session/ai.d.ts +5 -1
- package/dist/session/ai.d.ts.map +1 -1
- package/dist/session/ai.js +7 -0
- package/dist/session/helpers.d.ts +38 -0
- package/dist/session/helpers.d.ts.map +1 -1
- package/dist/session/helpers.js +76 -0
- package/dist/session/hibernation.d.ts +2 -1
- package/dist/session/hibernation.d.ts.map +1 -1
- package/dist/session/hibernation.js +7 -4
- package/dist/session/init-phases.d.ts +1 -1
- package/dist/session/init-phases.d.ts.map +1 -1
- package/dist/session/init-phases.js +2 -12
- package/dist/session/init.d.ts +15 -36
- package/dist/session/init.d.ts.map +1 -1
- package/dist/session/init.js +50 -2327
- package/dist/session/loopback.d.ts +2 -29
- package/dist/session/loopback.d.ts.map +1 -1
- package/dist/session/loopback.js +3 -27
- package/dist/session/nimbus-session.d.ts +77 -34
- package/dist/session/nimbus-session.d.ts.map +1 -1
- package/dist/session/nimbus-session.js +126 -514
- package/dist/session/npm-install-port.d.ts +18 -0
- package/dist/session/npm-install-port.d.ts.map +1 -0
- package/dist/session/npm-install-port.js +37 -0
- package/dist/session/port-capability.d.ts +44 -0
- package/dist/session/port-capability.d.ts.map +1 -1
- package/dist/session/port-capability.js +110 -0
- package/dist/session/programmatic.d.ts +36 -43
- package/dist/session/programmatic.d.ts.map +1 -1
- package/dist/session/programmatic.js +109 -115
- package/dist/session/routes.d.ts +30 -17
- package/dist/session/routes.d.ts.map +1 -1
- package/dist/session/routes.js +42 -131
- package/dist/session/rpc.d.ts +15 -15
- package/dist/session/rpc.d.ts.map +1 -1
- package/dist/session/rpc.js +98 -49
- package/dist/session/serving-port.d.ts +27 -0
- package/dist/session/serving-port.d.ts.map +1 -0
- package/dist/session/serving-port.js +27 -0
- package/dist/session/start-real-vite.d.ts +12 -0
- package/dist/session/start-real-vite.d.ts.map +1 -1
- package/dist/session/start-real-vite.js +4 -4
- package/dist/session/supervisor-op.d.ts +4 -4
- package/dist/session/supervisor-op.d.ts.map +1 -1
- package/dist/session/supervisor-op.js +24 -10
- package/dist/session/supervisor-rpc.d.ts +7 -7
- package/dist/session/supervisor-rpc.d.ts.map +1 -1
- package/dist/session/supervisor-rpc.js +4 -0
- package/dist/session/vite-command.d.ts +18 -0
- package/dist/session/vite-command.d.ts.map +1 -0
- package/dist/session/vite-command.js +609 -0
- package/dist/session/ws.d.ts +61 -0
- package/dist/session/ws.d.ts.map +1 -1
- package/dist/session/ws.js +122 -12
- package/dist/shell/npm-bin-entrypoints.d.ts +0 -35
- package/dist/shell/npm-bin-entrypoints.d.ts.map +1 -1
- package/dist/shell/npm-bin-entrypoints.js +12 -85
- package/dist/workspace-host.d.ts +6 -0
- package/dist/workspace-host.d.ts.map +1 -0
- package/dist/workspace-host.js +5 -0
- package/dist/workspace.d.ts +2 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +1 -0
- package/package.json +34 -9
- package/public/_assets/runtime/{node-shims-9e1380d9ee430fcc.js → node-shims-8f8c64edd2a1f0f5.js} +305 -29
- package/public/index.html +1 -1
- package/scripts/bundle-facet-workers.mjs +1 -1
- package/scripts/bundle-npm-cjs.mjs +2 -2
- package/dist/facets/on-demand-bundle-gate.d.ts +0 -65
- package/dist/facets/on-demand-bundle-gate.d.ts.map +0 -1
- package/dist/facets/on-demand-bundle-gate.js +0 -125
- package/dist/npm/install-args.d.ts +0 -21
- package/dist/npm/install-args.d.ts.map +0 -1
- package/dist/npm/install-args.js +0 -70
- package/dist/npm/npm-log.d.ts +0 -31
- package/dist/npm/npm-log.d.ts.map +0 -1
- package/dist/npm/npm-log.js +0 -51
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { NimbusWorkspace } from '@nimbus-sh/core/workspace';
|
|
2
|
+
import type { PortRegistry } from '@nimbus-sh/core/runtime/port-registry.js';
|
|
3
|
+
import type { ProcessLogReadOptions } from '@nimbus-sh/core/runtime/process-logs.js';
|
|
4
|
+
import type { VfsCred } from '@nimbus-sh/core/runtime/os-contracts.js';
|
|
5
|
+
import type { SandboxFs } from '@nimbus-sh/core/substrate/lifo/sandbox/types.js';
|
|
6
|
+
import { type SupervisorOpEnvelope } from '@nimbus-sh/core/workspace/supervisor-op.js';
|
|
7
|
+
import { WebSocketTerminal } from '../facets/ws-terminal.js';
|
|
8
|
+
import * as operations from '../session/programmatic.js';
|
|
9
|
+
import * as services from './services.js';
|
|
10
|
+
import { z } from 'zod/v4';
|
|
11
|
+
declare const HostedTask: z.ZodEnum<{
|
|
12
|
+
"resident-launch": "resident-launch";
|
|
13
|
+
"log-flush": "log-flush";
|
|
14
|
+
"log-janitor": "log-janitor";
|
|
15
|
+
}>;
|
|
16
|
+
export type HostedRuntimeTask = z.infer<typeof HostedTask>;
|
|
17
|
+
export interface HostedRuntimeLifecycle {
|
|
18
|
+
waitUntil(task: Promise<void>): void;
|
|
19
|
+
schedule(reason: HostedRuntimeTask, at: number): Promise<void>;
|
|
20
|
+
cancel(reason: HostedRuntimeTask): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
export interface HostedRuntimeOptions {
|
|
23
|
+
workspace: NimbusWorkspace;
|
|
24
|
+
ctx: DurableObjectState;
|
|
25
|
+
env: services.HostedRuntimeEnv;
|
|
26
|
+
ports: PortRegistry;
|
|
27
|
+
lifecycle: HostedRuntimeLifecycle;
|
|
28
|
+
basePath?: string;
|
|
29
|
+
origin?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface RuntimeFiles extends SandboxFs {
|
|
32
|
+
as(cred: VfsCred): RuntimeFiles;
|
|
33
|
+
}
|
|
34
|
+
export declare function composeHostedRuntime(options: HostedRuntimeOptions): Promise<{
|
|
35
|
+
workspace: NimbusWorkspace;
|
|
36
|
+
terminal: WebSocketTerminal;
|
|
37
|
+
files: RuntimeFiles;
|
|
38
|
+
runtimes: import("@nimbus-sh/core/runtime/runtime-manager.js").RuntimeManager;
|
|
39
|
+
ready: (options?: operations.ProgrammaticReadyOptions | undefined) => Promise<{
|
|
40
|
+
ok: true;
|
|
41
|
+
preinstalled: string[];
|
|
42
|
+
}>;
|
|
43
|
+
exec: (command: string, options?: operations.ProgrammaticExecOptions | undefined) => Promise<operations.ProgrammaticExecResult>;
|
|
44
|
+
runCode: (code: string, options?: (operations.ProgrammaticExecOptions & {
|
|
45
|
+
language?: "javascript" | "typescript" | "python" | "ruby" | "shell";
|
|
46
|
+
install?: "never" | "ifMissing";
|
|
47
|
+
}) | undefined) => Promise<operations.ProgrammaticExecResult>;
|
|
48
|
+
startProcess: (command: string, options?: operations.ProgrammaticExecOptions | undefined) => Promise<operations.ProgrammaticStartResult>;
|
|
49
|
+
listProcesses: () => Promise<operations.SerializedProcess[]>;
|
|
50
|
+
killProcess: (pid: number) => Promise<{
|
|
51
|
+
ok: boolean;
|
|
52
|
+
pid: number;
|
|
53
|
+
}>;
|
|
54
|
+
writeProcessInput: (pid: number, data: string) => Promise<{
|
|
55
|
+
ok: boolean;
|
|
56
|
+
pid: number;
|
|
57
|
+
}>;
|
|
58
|
+
endProcessInput: (pid: number) => Promise<{
|
|
59
|
+
ok: boolean;
|
|
60
|
+
pid: number;
|
|
61
|
+
}>;
|
|
62
|
+
resizeProcess: (pid: number, size: {
|
|
63
|
+
columns: number;
|
|
64
|
+
rows: number;
|
|
65
|
+
}) => Promise<{
|
|
66
|
+
ok: boolean;
|
|
67
|
+
pid: number;
|
|
68
|
+
}>;
|
|
69
|
+
signalProcess: (pid: number, signal: string) => Promise<{
|
|
70
|
+
ok: boolean;
|
|
71
|
+
pid: number;
|
|
72
|
+
}>;
|
|
73
|
+
processLogs: (pid: number, options?: ProcessLogReadOptions) => Promise<{
|
|
74
|
+
pid: number;
|
|
75
|
+
chunks: import("@nimbus-sh/core/runtime/process-logs.js").SequencedLogChunk[];
|
|
76
|
+
text: string;
|
|
77
|
+
cursor: number;
|
|
78
|
+
truncated: boolean;
|
|
79
|
+
exit: import("@nimbus-sh/core/runtime/process-logs.js").ProcessExitInfo | null;
|
|
80
|
+
}>;
|
|
81
|
+
listPorts: () => Promise<operations.SerializedPort[]>;
|
|
82
|
+
listApps: () => Promise<operations.ListedApp[]>;
|
|
83
|
+
exposeApp: (target: operations.AppTarget, options?: {
|
|
84
|
+
visibility?: "scoped" | "public";
|
|
85
|
+
name?: string;
|
|
86
|
+
} | undefined) => Promise<operations.ExposedAppResult>;
|
|
87
|
+
removeApp: (target: operations.AppTarget) => Promise<{
|
|
88
|
+
owner: string;
|
|
89
|
+
removed: boolean;
|
|
90
|
+
port: number | null;
|
|
91
|
+
}>;
|
|
92
|
+
rotateLink: (target: operations.AppTarget) => Promise<operations.ExposedAppResult>;
|
|
93
|
+
installRuntime: (spec: string, options?: {
|
|
94
|
+
force?: boolean;
|
|
95
|
+
} | undefined) => Promise<import("../runtime/package-manager.js").RuntimeInstallSummary>;
|
|
96
|
+
ensureRuntimes: (specs: string[], options?: {
|
|
97
|
+
force?: boolean;
|
|
98
|
+
} | undefined) => Promise<import("../runtime/package-manager.js").RuntimeInstallSummary[]>;
|
|
99
|
+
listRuntimes: () => Promise<{
|
|
100
|
+
installed: import("@nimbus-sh/core/runtime/installed-runtimes.js").RuntimeSummary[];
|
|
101
|
+
available: import("@nimbus-sh/core/runtime/runtime-package.js").RuntimeAvailability[];
|
|
102
|
+
}>;
|
|
103
|
+
spawnWorker: (workerCode: string, command: string, cwd: string, opts?: import("../facets/manager.js").LongRunningWorkerSpawnOptions | undefined) => Promise<import("../facets/manager.js").SpawnedWorker>;
|
|
104
|
+
routeCapabilityPort: (port: number, capability: string, request: Request<unknown, CfProperties<unknown>>, pathname: string) => Promise<Response>;
|
|
105
|
+
supervisorOp: (envelope: SupervisorOpEnvelope) => Promise<unknown>;
|
|
106
|
+
onScheduled: (task: HostedRuntimeTask) => Promise<void>;
|
|
107
|
+
attachTerminal: (ws: WebSocket) => Promise<void>;
|
|
108
|
+
terminalFrame: (ws: WebSocket, message: string | ArrayBuffer) => Promise<void>;
|
|
109
|
+
terminalClose: (ws: WebSocket) => void;
|
|
110
|
+
close: () => Promise<void>;
|
|
111
|
+
}>;
|
|
112
|
+
export type HostedRuntime = Awaited<ReturnType<typeof composeHostedRuntime>>;
|
|
113
|
+
export {};
|
|
114
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/hosted/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;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,CAAC,OAAO,EAAE,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAkBjD,MAAM,YAAY,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAWjC,oBAAoB;wBACzB,iBAAiB;yBAChB,SAAS;wBACV,SAAS,WAAW,MAAM,GAAG,WAAW;wBACxC,SAAS;;GAGhC;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { requireVfsCred } from '@nimbus-sh/core/runtime/os-contracts.js';
|
|
2
|
+
import { SandboxFsImpl } from '@nimbus-sh/core/substrate/lifo/sandbox/SandboxFs.js';
|
|
3
|
+
import { SUPERVISOR_OP_ROUTES } from '@nimbus-sh/core/workspace/supervisor-op.js';
|
|
4
|
+
import { WebSocketTerminal } from '../facets/ws-terminal.js';
|
|
5
|
+
import { buildSessionSupervisorOps } from '../session/supervisor-op.js';
|
|
6
|
+
import { installLogPersistence } from '../session/hibernation.js';
|
|
7
|
+
import { appendScrollback, ensureSessionStateSchema, loadScrollback, loadShellState, persistShellState } from '../session/state-store.js';
|
|
8
|
+
import { wireProcessLogSocketBroadcast } from '../runtime/process-logs-api.js';
|
|
9
|
+
import { routeRuntimeLoopback } from '../session/loopback.js';
|
|
10
|
+
import * as rpc from '../session/rpc.js';
|
|
11
|
+
import * as operations from '../session/programmatic.js';
|
|
12
|
+
import * as services from './services.js';
|
|
13
|
+
import { registerHostedCommands } from './commands.js';
|
|
14
|
+
import { z } from 'zod/v4';
|
|
15
|
+
import { adoptCtxExports, supervisorEntrypoint } from '@nimbus-sh/fabric/composition.js';
|
|
16
|
+
import { hostNamespaceBinding } from '@nimbus-sh/fabric/host-dispatch.js';
|
|
17
|
+
const HostedTask = z.enum(['resident-launch', 'log-flush', 'log-janitor']);
|
|
18
|
+
const InputFrame = z.discriminatedUnion('type', [
|
|
19
|
+
z.object({ type: z.literal('input'), data: z.string() }),
|
|
20
|
+
z.object({ type: z.literal('resize'), cols: z.number().int().positive(), rows: z.number().int().positive() }),
|
|
21
|
+
]);
|
|
22
|
+
class RuntimeOwner {
|
|
23
|
+
options;
|
|
24
|
+
terminal;
|
|
25
|
+
_cpRegistry;
|
|
26
|
+
_programmaticShellQueues = new Map();
|
|
27
|
+
_hostedProcesses = new Map();
|
|
28
|
+
_hostedProcessWaiters = new Map();
|
|
29
|
+
_cirrusHmrWsClients = new Map();
|
|
30
|
+
closing = null;
|
|
31
|
+
_w9PersistWired = false;
|
|
32
|
+
_w9SchemaInit = false;
|
|
33
|
+
_viteShimPid = null;
|
|
34
|
+
_viteShimPort = null;
|
|
35
|
+
wranglerAliasBannerShown = false;
|
|
36
|
+
facetManagerComposed = null;
|
|
37
|
+
facetProcessManager = null;
|
|
38
|
+
esbuildService = null;
|
|
39
|
+
bundlePool = null;
|
|
40
|
+
npmInstaller = null;
|
|
41
|
+
fetchProxyEntrypoint = null;
|
|
42
|
+
viteDevServer = null;
|
|
43
|
+
cirrusReal = null;
|
|
44
|
+
nimbusWrangler = null;
|
|
45
|
+
webSocketRelay = null;
|
|
46
|
+
readyPromise = null;
|
|
47
|
+
supervisor = null;
|
|
48
|
+
flushScheduled = false;
|
|
49
|
+
janitorScheduled = false;
|
|
50
|
+
recoveryNotice = false;
|
|
51
|
+
services;
|
|
52
|
+
constructor(options) {
|
|
53
|
+
this.options = options;
|
|
54
|
+
hostNamespaceBinding(options.env, 'HostedRuntime');
|
|
55
|
+
const exports = Reflect.get(options.ctx, 'exports');
|
|
56
|
+
if (!supervisorEntrypoint(exports)) {
|
|
57
|
+
throw new Error('Export the configured supervisor entrypoint and call composeFabric before composing a hosted runtime');
|
|
58
|
+
}
|
|
59
|
+
adoptCtxExports(exports);
|
|
60
|
+
ensureSessionStateSchema(options.ctx);
|
|
61
|
+
this.terminal = new WebSocketTerminal(null, (data) => {
|
|
62
|
+
appendScrollback(options.ctx, data, Date.now());
|
|
63
|
+
persistShellState(options.ctx, { cwd: this.shell.getCwd(), env: this.shell.getEnv() });
|
|
64
|
+
});
|
|
65
|
+
this._cpRegistry = options.workspace.registry;
|
|
66
|
+
this.services = services.bindRuntimeServices(this, {
|
|
67
|
+
ctx: options.ctx,
|
|
68
|
+
env: options.env,
|
|
69
|
+
notify: (line) => this._notifySession(line),
|
|
70
|
+
requestLaunchTurn: (at) => this._scheduleLaunchTurn(at),
|
|
71
|
+
});
|
|
72
|
+
options.workspace.shell.bindTerminal(this.terminal);
|
|
73
|
+
installLogPersistence(this, options.ctx, () => this.scheduleLogs());
|
|
74
|
+
wireProcessLogSocketBroadcast(this.processes, options.ctx);
|
|
75
|
+
}
|
|
76
|
+
get ctx() { return this.options.ctx; }
|
|
77
|
+
get _w1SessionDestroyed() { return this.closing !== null; }
|
|
78
|
+
get env() { return this.options.env; }
|
|
79
|
+
get sqliteFs() { return this.options.workspace.vfs; }
|
|
80
|
+
get kernel() { return this.options.workspace.kernel; }
|
|
81
|
+
get shell() { return this.options.workspace.shell; }
|
|
82
|
+
get shellProcessPid() { return this.options.workspace.shellProcessPid; }
|
|
83
|
+
get runtimeManager() { return this.options.workspace.runtimes; }
|
|
84
|
+
get processes() { return this.options.workspace.processes; }
|
|
85
|
+
get portRegistry() { return this.options.ports; }
|
|
86
|
+
get facetManager() { return this.facetManagerComposed?.manager ?? null; }
|
|
87
|
+
get sessionBasePath() { return this.options.basePath ?? ''; }
|
|
88
|
+
get sessionOrigin() { return this.options.origin ?? ''; }
|
|
89
|
+
get viteBasePath() { return `${this.sessionBasePath}/preview`; }
|
|
90
|
+
get nimbusDebug() { return Reflect.get(this.env, 'NIMBUS_DEBUG') === '1'; }
|
|
91
|
+
assertOpen() {
|
|
92
|
+
if (this._w1SessionDestroyed)
|
|
93
|
+
throw new Error('Nimbus runtime is closed');
|
|
94
|
+
}
|
|
95
|
+
ensureRuntimeReady() {
|
|
96
|
+
this.assertOpen();
|
|
97
|
+
this.readyPromise ??= (async () => {
|
|
98
|
+
const saved = loadShellState(this.ctx);
|
|
99
|
+
this.recoveryNotice = saved.hasPersistedState;
|
|
100
|
+
if (saved.cwd)
|
|
101
|
+
this.shell.setCwd(saved.cwd);
|
|
102
|
+
if (saved.env)
|
|
103
|
+
Object.assign(this.shell.getEnv(), saved.env);
|
|
104
|
+
await registerHostedCommands(this, this.options.workspace);
|
|
105
|
+
await this.options.workspace.start();
|
|
106
|
+
})();
|
|
107
|
+
return this.readyPromise;
|
|
108
|
+
}
|
|
109
|
+
ensureSqliteFs() { return this.sqliteFs; }
|
|
110
|
+
routeLoopback(port, request) { return routeRuntimeLoopback(this.portRegistry, port, request); }
|
|
111
|
+
ensureBundlePool() { this.assertOpen(); return this.services.ensureBundlePool(); }
|
|
112
|
+
ensureFacetManager() { this.assertOpen(); return this.services.ensureFacetManager(); }
|
|
113
|
+
ensureFetchProxy(log) { return this.services.ensureFetchProxy(log); }
|
|
114
|
+
buildFetchFn(log) { return this.services.buildFetchFn(log); }
|
|
115
|
+
ensureNpmInstaller(onProgress) { this.assertOpen(); return this.services.ensureNpmInstaller(onProgress); }
|
|
116
|
+
ensureGlobalPrefixDirs(prefix) { return this.services.ensureGlobalPrefixDirs(prefix); }
|
|
117
|
+
_envFlagDefaultOn(name) { return this.services._envFlagDefaultOn(name); }
|
|
118
|
+
_ensureFacetProcessManager() { this.assertOpen(); return this.services._ensureFacetProcessManager(); }
|
|
119
|
+
_ensureWebSocketRelay() { this.assertOpen(); return this.services._ensureWebSocketRelay(); }
|
|
120
|
+
_setCpRegistry(registry) {
|
|
121
|
+
if (registry !== this._cpRegistry)
|
|
122
|
+
throw new Error('Nimbus runtime cannot replace the workspace registry');
|
|
123
|
+
}
|
|
124
|
+
_notifySession(line) { this.terminal.write(`${line}\r\n`); }
|
|
125
|
+
async _scheduleLaunchTurn(notBefore = Date.now()) {
|
|
126
|
+
await this.options.lifecycle.schedule('resident-launch', Math.max(Date.now(), notBefore));
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
_reportExternalExit(pid, code, reason) { return rpc._reportExternalExit(this, pid, code, reason); }
|
|
130
|
+
_emitExitDump(pid, code) { return rpc._emitExitDump(this, pid, code); }
|
|
131
|
+
_emitShellExecDone(pid, command, code, duration) { return rpc._emitShellExecDone(this, pid, command, code, duration); }
|
|
132
|
+
_rpcStdout(pid, data) { return rpc._rpcStdout(this, pid, data); }
|
|
133
|
+
_rpcStderr(pid, data) { return rpc._rpcStderr(this, pid, data); }
|
|
134
|
+
supervisorOps() {
|
|
135
|
+
this.supervisor ??= buildSessionSupervisorOps(this, undefined, Object.fromEntries(Object.values(SUPERVISOR_OP_ROUTES).map(({ method }) => {
|
|
136
|
+
const handler = Reflect.get(rpc, method);
|
|
137
|
+
if (typeof handler !== 'function')
|
|
138
|
+
throw new Error(`Missing Nimbus supervisor implementation: ${method}`);
|
|
139
|
+
return [method, (...args) => Reflect.apply(handler, undefined, [this, ...args])];
|
|
140
|
+
})));
|
|
141
|
+
return this.supervisor;
|
|
142
|
+
}
|
|
143
|
+
supervisorOp(envelope) {
|
|
144
|
+
this.assertOpen();
|
|
145
|
+
return this.supervisorOps().dispatch(envelope);
|
|
146
|
+
}
|
|
147
|
+
supervisorBridge(pid) { return this.supervisorOps().bridge(pid); }
|
|
148
|
+
supervisorForgetBridge(pid) { this.supervisorOps().forget(pid); }
|
|
149
|
+
scheduleLogs() {
|
|
150
|
+
if (this._w1SessionDestroyed)
|
|
151
|
+
return;
|
|
152
|
+
if (!this.flushScheduled) {
|
|
153
|
+
this.flushScheduled = true;
|
|
154
|
+
this.options.lifecycle.waitUntil(this.options.lifecycle.schedule('log-flush', Date.now() + 250));
|
|
155
|
+
}
|
|
156
|
+
if (!this.janitorScheduled) {
|
|
157
|
+
this.janitorScheduled = true;
|
|
158
|
+
this.options.lifecycle.waitUntil(this.options.lifecycle.schedule('log-janitor', Date.now() + 60_000));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
async onScheduled(task) {
|
|
162
|
+
if (this._w1SessionDestroyed)
|
|
163
|
+
return;
|
|
164
|
+
if (task === 'resident-launch') {
|
|
165
|
+
await this.ensureFacetManager().pumpLaunches();
|
|
166
|
+
}
|
|
167
|
+
else if (task === 'log-flush') {
|
|
168
|
+
this.flushScheduled = false;
|
|
169
|
+
this.processes.flushLogs();
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
this.janitorScheduled = false;
|
|
173
|
+
this.processes.dropLogsOlderThan(undefined, (pid) => !this.processes.get(pid));
|
|
174
|
+
if (this.processes.stats.running > 0 || this.processes.logStats.totalPids > 0)
|
|
175
|
+
this.scheduleLogs();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
async attachTerminal(ws, resume = 'reconnect') {
|
|
179
|
+
await this.ensureRuntimeReady();
|
|
180
|
+
if (this.terminal.ws === ws)
|
|
181
|
+
return;
|
|
182
|
+
this.terminal.attach(ws);
|
|
183
|
+
if (resume === 'reconnect')
|
|
184
|
+
this.terminal.write(loadScrollback(this.ctx));
|
|
185
|
+
if (this.recoveryNotice) {
|
|
186
|
+
this.terminal.write('\r\n[Runtime resumed; files and shell settings restored. Previous interpreter state was not retained.]\r\n');
|
|
187
|
+
this.recoveryNotice = false;
|
|
188
|
+
}
|
|
189
|
+
if (!this.shell.running)
|
|
190
|
+
this.shell.printPrompt();
|
|
191
|
+
this.terminal.flushNow();
|
|
192
|
+
ws.send(JSON.stringify({ type: 'ready' }));
|
|
193
|
+
}
|
|
194
|
+
async terminalFrame(ws, frame) {
|
|
195
|
+
await this.attachTerminal(ws, 'wake');
|
|
196
|
+
const text = typeof frame === 'string' ? frame : new TextDecoder().decode(frame);
|
|
197
|
+
const input = InputFrame.parse(JSON.parse(text));
|
|
198
|
+
this.terminal.handleMessage(input);
|
|
199
|
+
persistShellState(this.ctx, { cwd: this.shell.getCwd(), env: this.shell.getEnv() });
|
|
200
|
+
}
|
|
201
|
+
terminalClose(ws) {
|
|
202
|
+
if (this.terminal.ws !== ws)
|
|
203
|
+
return;
|
|
204
|
+
this.terminal.flushNow();
|
|
205
|
+
persistShellState(this.ctx, { cwd: this.shell.getCwd(), env: this.shell.getEnv() });
|
|
206
|
+
this.terminal.detach();
|
|
207
|
+
this.processes.flushLogs();
|
|
208
|
+
}
|
|
209
|
+
close() {
|
|
210
|
+
this.closing ??= Promise.resolve().then(async () => {
|
|
211
|
+
const failures = [];
|
|
212
|
+
const clean = async (action) => {
|
|
213
|
+
try {
|
|
214
|
+
await action();
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
failures.push(error instanceof Error ? error : new Error(String(error)));
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
await clean(() => this.terminal.disposeRepl());
|
|
221
|
+
await clean(() => this.terminal.sendData('\x03'));
|
|
222
|
+
for (const process of this.processes.getAll()) {
|
|
223
|
+
await clean(() => this.webSocketRelay?.closeForPid(process.pid));
|
|
224
|
+
if (process.state !== 'running')
|
|
225
|
+
continue;
|
|
226
|
+
await clean(() => { if (!this.facetManager?.kill(process.pid))
|
|
227
|
+
this.processes.kill(process.pid); });
|
|
228
|
+
await clean(() => { this.portRegistry.unregisterByPid(process.pid); });
|
|
229
|
+
}
|
|
230
|
+
await clean(() => this.viteDevServer?.stop());
|
|
231
|
+
await clean(() => this.cirrusReal?.stop(this.ctx));
|
|
232
|
+
await clean(() => this.nimbusWrangler?.stop());
|
|
233
|
+
await clean(() => this.bundlePool?.dispose());
|
|
234
|
+
await clean(() => this.processes.flushLogs());
|
|
235
|
+
this.terminal.flushNow();
|
|
236
|
+
this.terminal.close();
|
|
237
|
+
for (const ws of this.ctx.getWebSockets('process-logs')) {
|
|
238
|
+
await clean(() => ws.close(1000, 'runtime closed'));
|
|
239
|
+
}
|
|
240
|
+
for (const task of HostedTask.options)
|
|
241
|
+
await clean(() => this.options.lifecycle.cancel(task));
|
|
242
|
+
if (failures.length > 0)
|
|
243
|
+
throw new AggregateError(failures, 'Nimbus runtime cleanup failed');
|
|
244
|
+
});
|
|
245
|
+
return this.closing;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
function runtimeFiles(workspace, cred) {
|
|
249
|
+
const view = new SandboxFsImpl(workspace.kernel.vfs.as(cred), () => workspace.shell.getCwd());
|
|
250
|
+
return Object.assign(view, { as: (next) => runtimeFiles(workspace, requireVfsCred(next, 'runtime files')) });
|
|
251
|
+
}
|
|
252
|
+
export async function composeHostedRuntime(options) {
|
|
253
|
+
const owner = new RuntimeOwner(options);
|
|
254
|
+
await owner.ensureRuntimeReady();
|
|
255
|
+
return {
|
|
256
|
+
workspace: options.workspace,
|
|
257
|
+
terminal: owner.terminal,
|
|
258
|
+
files: runtimeFiles(options.workspace, owner.processes.cred(owner.shellProcessPid)),
|
|
259
|
+
runtimes: owner.runtimeManager,
|
|
260
|
+
ready: operations.ensureProgrammaticReady.bind(null, owner),
|
|
261
|
+
exec: operations.rpcExec.bind(null, owner),
|
|
262
|
+
runCode: operations.rpcRunCode.bind(null, owner),
|
|
263
|
+
startProcess: operations.rpcStartProcess.bind(null, owner),
|
|
264
|
+
listProcesses: operations.rpcListProcesses.bind(null, owner),
|
|
265
|
+
killProcess: operations.rpcKillProcess.bind(null, owner),
|
|
266
|
+
writeProcessInput: operations.rpcWriteProcessInput.bind(null, owner),
|
|
267
|
+
endProcessInput: operations.rpcEndProcessInput.bind(null, owner),
|
|
268
|
+
resizeProcess: operations.rpcResizeProcess.bind(null, owner),
|
|
269
|
+
signalProcess: operations.rpcSignalProcess.bind(null, owner),
|
|
270
|
+
processLogs: (pid, options) => operations.rpcProcessLogs(owner, pid, options),
|
|
271
|
+
listPorts: operations.rpcListPorts.bind(null, owner),
|
|
272
|
+
listApps: operations.rpcListApps.bind(null, owner),
|
|
273
|
+
exposeApp: operations.rpcExposeApp.bind(null, owner),
|
|
274
|
+
removeApp: operations.rpcRemoveApp.bind(null, owner),
|
|
275
|
+
rotateLink: operations.rpcRotateLink.bind(null, owner),
|
|
276
|
+
installRuntime: operations.rpcInstallRuntime.bind(null, owner),
|
|
277
|
+
ensureRuntimes: operations.rpcEnsureRuntimes.bind(null, owner),
|
|
278
|
+
listRuntimes: operations.rpcListRuntimes.bind(null, owner),
|
|
279
|
+
spawnWorker: operations.rpcSpawnWorker.bind(null, owner),
|
|
280
|
+
routeCapabilityPort: operations.rpcRouteCapabilityPort.bind(null, owner),
|
|
281
|
+
supervisorOp: (envelope) => owner.supervisorOp(envelope),
|
|
282
|
+
onScheduled: (task) => owner.onScheduled(task),
|
|
283
|
+
attachTerminal: (ws) => owner.attachTerminal(ws),
|
|
284
|
+
terminalFrame: (ws, message) => owner.terminalFrame(ws, message),
|
|
285
|
+
terminalClose: (ws) => owner.terminalClose(ws),
|
|
286
|
+
close: () => owner.close(),
|
|
287
|
+
};
|
|
288
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ComposedFacetManager } from "../facets/compose.js";
|
|
2
|
+
import { EsbuildBundlePool } from "../facets/esbuild-bundle-pool.js";
|
|
3
|
+
import type { NpmInstaller } from "../npm/installer.js";
|
|
4
|
+
import { WebSocketRelay } from "../session/ws-relay.js";
|
|
5
|
+
import type { SessionInternal } from '../session/internal.js';
|
|
6
|
+
import type { RuntimeCatalogEnv } from '../runtime/runtime-catalog.js';
|
|
7
|
+
import type { IsolatePoolEnv } from '@nimbus-sh/fabric/isolate-pool.js';
|
|
8
|
+
export interface HostedRuntimeEnv extends RuntimeCatalogEnv, IsolatePoolEnv {
|
|
9
|
+
ASSETS?: Fetcher;
|
|
10
|
+
}
|
|
11
|
+
export type RuntimeServiceHost = Pick<SessionInternal, '_cpRegistry' | '_envFlagDefaultOn' | '_reportExternalExit' | 'buildFetchFn' | 'bundlePool' | 'ensureBundlePool' | 'ensureFacetManager' | 'ensureFetchProxy' | 'ensureSqliteFs' | 'esbuildService' | 'facetManagerComposed' | 'facetProcessManager' | 'fetchProxyEntrypoint' | 'npmInstaller' | 'portRegistry' | 'processes' | 'shell' | 'sqliteFs' | 'terminal'> & {
|
|
12
|
+
webSocketRelay: WebSocketRelay | null;
|
|
13
|
+
};
|
|
14
|
+
export interface RuntimeServiceContext {
|
|
15
|
+
readonly ctx: DurableObjectState;
|
|
16
|
+
readonly env: HostedRuntimeEnv;
|
|
17
|
+
notify(line: string): void;
|
|
18
|
+
requestLaunchTurn(notBefore?: number): Promise<boolean>;
|
|
19
|
+
}
|
|
20
|
+
export declare function ensureBundlePool(self: RuntimeServiceHost, runtimeContext: RuntimeServiceContext): EsbuildBundlePool;
|
|
21
|
+
export declare function ensureFacetManager(self: RuntimeServiceHost, runtimeContext: RuntimeServiceContext): ComposedFacetManager;
|
|
22
|
+
export declare function _ensureWebSocketRelay(self: RuntimeServiceHost, runtimeContext: RuntimeServiceContext): WebSocketRelay;
|
|
23
|
+
export declare function _ensureFacetProcessManager(self: RuntimeServiceHost, runtimeContext: RuntimeServiceContext): any;
|
|
24
|
+
export declare function ensureFetchProxy(self: RuntimeServiceHost, runtimeContext: RuntimeServiceContext, log?: (msg: string) => void): any | null;
|
|
25
|
+
export declare function buildFetchFn(self: RuntimeServiceHost, runtimeContext: RuntimeServiceContext, log?: (msg: string) => void): ((url: string, init?: RequestInit) => Promise<Response>) | undefined;
|
|
26
|
+
export declare function ensureNpmInstaller(self: RuntimeServiceHost, runtimeContext: RuntimeServiceContext, onProgress?: (msg: string) => void): Promise<NpmInstaller>;
|
|
27
|
+
export declare function _envFlagDefaultOn(self: RuntimeServiceHost, runtimeContext: RuntimeServiceContext, name: string): boolean;
|
|
28
|
+
export declare function ensureGlobalPrefixDirs(self: RuntimeServiceHost, runtimeContext: RuntimeServiceContext, prefix: string): void;
|
|
29
|
+
export declare function bindRuntimeServices(host: RuntimeServiceHost, context: RuntimeServiceContext): {
|
|
30
|
+
ensureBundlePool: () => EsbuildBundlePool;
|
|
31
|
+
ensureFacetManager: () => ComposedFacetManager;
|
|
32
|
+
_ensureWebSocketRelay: () => WebSocketRelay;
|
|
33
|
+
_ensureFacetProcessManager: () => any;
|
|
34
|
+
ensureFetchProxy: (log?: ((msg: string) => void) | undefined) => any;
|
|
35
|
+
buildFetchFn: (log?: ((msg: string) => void) | undefined) => ((url: string, init?: RequestInit) => Promise<Response>) | undefined;
|
|
36
|
+
ensureNpmInstaller: (onProgress?: ((msg: string) => void) | undefined) => Promise<NpmInstaller>;
|
|
37
|
+
_envFlagDefaultOn: (name: string) => boolean;
|
|
38
|
+
ensureGlobalPrefixDirs: (prefix: string) => void;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/hosted/services.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAItF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAKxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAoBxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB,EAAE,cAAc;IACzE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,eAAe,EACnD,aAAa,GAAG,mBAAmB,GAAG,qBAAqB,GAAG,cAAc,GAAG,YAAY,GAAG,kBAAkB,GAAG,oBAAoB,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,sBAAsB,GAAG,qBAAqB,GAAG,sBAAsB,GAAG,cAAc,GAAG,cAAc,GAAG,WAAW,GAAG,OAAO,GAAG,U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