@nimbus-sh/worker 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +46 -43
  2. package/dist/_shared/preview-host.d.ts +33 -2
  3. package/dist/_shared/preview-host.d.ts.map +1 -1
  4. package/dist/_shared/preview-host.js +73 -8
  5. package/dist/_shared/session-router.d.ts +43 -0
  6. package/dist/_shared/session-router.d.ts.map +1 -1
  7. package/dist/_shared/session-router.js +59 -12
  8. package/dist/facets/durable-images.d.ts +59 -0
  9. package/dist/facets/durable-images.d.ts.map +1 -0
  10. package/dist/facets/durable-images.js +94 -0
  11. package/dist/facets/durable-slots.d.ts +45 -0
  12. package/dist/facets/durable-slots.d.ts.map +1 -0
  13. package/dist/facets/durable-slots.js +95 -0
  14. package/dist/facets/esbuild-transform.d.ts +10 -0
  15. package/dist/facets/esbuild-transform.d.ts.map +1 -0
  16. package/dist/facets/esbuild-transform.js +36 -0
  17. package/dist/facets/manager.d.ts +244 -6
  18. package/dist/facets/manager.d.ts.map +1 -1
  19. package/dist/facets/manager.js +901 -117
  20. package/dist/facets/resident-identity.d.ts +23 -0
  21. package/dist/facets/resident-identity.d.ts.map +1 -0
  22. package/dist/facets/resident-identity.js +31 -0
  23. package/dist/git/commands.d.ts +22 -1
  24. package/dist/git/commands.d.ts.map +1 -1
  25. package/dist/git/commands.js +429 -425
  26. package/dist/git-bundle.generated.d.ts +2 -2
  27. package/dist/git-bundle.generated.d.ts.map +1 -1
  28. package/dist/git-bundle.generated.js +3 -3
  29. package/dist/index.d.ts +2 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +2 -1
  32. package/dist/node-shims-artifact.generated.js +3 -3
  33. package/dist/router/index.d.ts.map +1 -1
  34. package/dist/router/index.js +97 -3
  35. package/dist/router/public-directory-do.d.ts +17 -0
  36. package/dist/router/public-directory-do.d.ts.map +1 -0
  37. package/dist/router/public-directory-do.js +16 -0
  38. package/dist/router/public-directory.d.ts +79 -0
  39. package/dist/router/public-directory.d.ts.map +1 -0
  40. package/dist/router/public-directory.js +122 -0
  41. package/dist/router/remote-api.d.ts +27 -1
  42. package/dist/router/remote-api.d.ts.map +1 -1
  43. package/dist/router/remote-api.js +48 -2
  44. package/dist/runtime/cpython-resident.d.ts.map +1 -1
  45. package/dist/runtime/cpython-resident.js +3 -1
  46. package/dist/runtime/node-shims.d.ts +4 -1
  47. package/dist/runtime/node-shims.d.ts.map +1 -1
  48. package/dist/runtime/node-shims.js +324 -6
  49. package/dist/runtime/package-manager.d.ts +44 -1
  50. package/dist/runtime/package-manager.d.ts.map +1 -1
  51. package/dist/runtime/package-manager.js +168 -3
  52. package/dist/runtime/ruby-resident.d.ts.map +1 -1
  53. package/dist/runtime/ruby-resident.js +2 -0
  54. package/dist/session/agent.d.ts +11 -0
  55. package/dist/session/agent.d.ts.map +1 -1
  56. package/dist/session/agent.js +28 -1
  57. package/dist/session/helpers.js +1 -1
  58. package/dist/session/init-phases.d.ts +17 -23
  59. package/dist/session/init-phases.d.ts.map +1 -1
  60. package/dist/session/init-phases.js +17 -41
  61. package/dist/session/init.d.ts.map +1 -1
  62. package/dist/session/init.js +28 -15
  63. package/dist/session/keys.d.ts +12 -0
  64. package/dist/session/keys.d.ts.map +1 -1
  65. package/dist/session/keys.js +12 -0
  66. package/dist/session/nimbus-session.d.ts +63 -5
  67. package/dist/session/nimbus-session.d.ts.map +1 -1
  68. package/dist/session/nimbus-session.js +131 -17
  69. package/dist/session/port-capability.d.ts +141 -8
  70. package/dist/session/port-capability.d.ts.map +1 -1
  71. package/dist/session/port-capability.js +265 -8
  72. package/dist/session/programmatic.d.ts +145 -3
  73. package/dist/session/programmatic.d.ts.map +1 -1
  74. package/dist/session/programmatic.js +434 -12
  75. package/dist/session/routes.d.ts +26 -0
  76. package/dist/session/routes.d.ts.map +1 -1
  77. package/dist/session/routes.js +117 -25
  78. package/dist/session/rpc.d.ts +24 -1
  79. package/dist/session/rpc.d.ts.map +1 -1
  80. package/dist/session/rpc.js +65 -98
  81. package/dist/session/shell-socket.d.ts +76 -0
  82. package/dist/session/shell-socket.d.ts.map +1 -0
  83. package/dist/session/shell-socket.js +172 -0
  84. package/dist/session/start-real-vite.js +1 -1
  85. package/dist/session/supervisor-op.d.ts +42 -0
  86. package/dist/session/supervisor-op.d.ts.map +1 -0
  87. package/dist/session/supervisor-op.js +96 -0
  88. package/dist/session/supervisor-rpc.d.ts +6 -10
  89. package/dist/session/supervisor-rpc.d.ts.map +1 -1
  90. package/dist/session/supervisor-rpc.js +91 -71
  91. package/dist/session/ws.d.ts.map +1 -1
  92. package/dist/session/ws.js +19 -4
  93. package/package.json +4 -4
  94. package/public/_assets/runtime/{node-shims-fea906843f6d594e.js → node-shims-9e1380d9ee430fcc.js} +320 -5
  95. package/public/s/index.html +101 -5
@@ -0,0 +1,45 @@
1
+ /**
2
+ * facets/durable-slots.ts — the durable application's facet-name allocator.
3
+ *
4
+ * A durable application's storage has to answer under ONE facet name for its
5
+ * whole life: abort ends the process, not the store, so relaunch and eviction
6
+ * re-attach the same SQLite — which is only true while the name is stable.
7
+ * The ephemeral slot book in `workerd-facet-host.ts` cannot supply it: it is
8
+ * in-memory, and a fresh incarnation restarts `proc-slot-<n>` numbering from
9
+ * zero, so a durable name needs a store of its own — the DO storage this file
10
+ * keeps it in.
11
+ *
12
+ * The rows:
13
+ *
14
+ * durable-slot:next — the lowest never-issued slot number. Minting burns
15
+ * one facet ID forever, so a freed name goes to
16
+ * `free`, never back to `next`.
17
+ * durable-slot:free — slot numbers whose applications were removed.
18
+ * durable-slot:<owner> — the owner's pinned slot. Written once, ever;
19
+ * re-read on every relaunch and re-drive.
20
+ *
21
+ * Names carry the `app-slot-` prefix, disjoint by construction from the
22
+ * ephemeral book's `proc-slot-` — the two namespaces share the facet-ID
23
+ * budget, and a collision would hand one application's retained storage to
24
+ * another process.
25
+ */
26
+ /** The facet name a durable slot number names. */
27
+ export declare function durableFacetName(slot: number): string;
28
+ /**
29
+ * The owner's facet name, minted on first call and pinned for the
30
+ * application's life. The owner key, counter and free list move inside one
31
+ * transaction, so a concurrent spawn cannot split the claim, and a re-read
32
+ * after a reset — or after eviction — answers the same name.
33
+ *
34
+ * A fresh name records the mint against the lifetime facet-ID ledger so the
35
+ * budget a durable spawn consumes is counted the same way an ephemeral one's
36
+ * is.
37
+ */
38
+ export declare function acquireDurableFacetSlot(ctx: DurableObjectState, owner: string): Promise<string>;
39
+ /**
40
+ * Hand the owner's slot back to the free list and drop its pin — the last
41
+ * step of explicit removal, after the facet's SQLite is already gone. Answers
42
+ * the freed name, or null when the owner held nothing.
43
+ */
44
+ export declare function freeDurableFacetSlot(ctx: DurableObjectState, owner: string, beforeFree?: (name: string) => void): Promise<string | null>;
45
+ //# sourceMappingURL=durable-slots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"durable-slots.d.ts","sourceRoot":"","sources":["../../src/facets/durable-slots.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAUH,kDAAkD;AAClD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;;;;;;;;GASG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,kBAAkB,EACvB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,CA4BjB;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,kBAAkB,EACvB,KAAK,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAClC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAaxB"}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * facets/durable-slots.ts — the durable application's facet-name allocator.
3
+ *
4
+ * A durable application's storage has to answer under ONE facet name for its
5
+ * whole life: abort ends the process, not the store, so relaunch and eviction
6
+ * re-attach the same SQLite — which is only true while the name is stable.
7
+ * The ephemeral slot book in `workerd-facet-host.ts` cannot supply it: it is
8
+ * in-memory, and a fresh incarnation restarts `proc-slot-<n>` numbering from
9
+ * zero, so a durable name needs a store of its own — the DO storage this file
10
+ * keeps it in.
11
+ *
12
+ * The rows:
13
+ *
14
+ * durable-slot:next — the lowest never-issued slot number. Minting burns
15
+ * one facet ID forever, so a freed name goes to
16
+ * `free`, never back to `next`.
17
+ * durable-slot:free — slot numbers whose applications were removed.
18
+ * durable-slot:<owner> — the owner's pinned slot. Written once, ever;
19
+ * re-read on every relaunch and re-drive.
20
+ *
21
+ * Names carry the `app-slot-` prefix, disjoint by construction from the
22
+ * ephemeral book's `proc-slot-` — the two namespaces share the facet-ID
23
+ * budget, and a collision would hand one application's retained storage to
24
+ * another process.
25
+ */
26
+ import { DURABLE_SLOT_KEY_PREFIX } from '../session/keys.js';
27
+ import { DURABLE_FACET_NAME_PREFIX } from '@nimbus-sh/fabric/workerd-facet-host.js';
28
+ import { facetNameCountDurable, recordFacetNameMinted } from '@nimbus-sh/fabric/budgets.js';
29
+ const NEXT_KEY = `${DURABLE_SLOT_KEY_PREFIX}next`;
30
+ const FREE_KEY = `${DURABLE_SLOT_KEY_PREFIX}free`;
31
+ const ownerKey = (owner) => `${DURABLE_SLOT_KEY_PREFIX}${owner}`;
32
+ /** The facet name a durable slot number names. */
33
+ export function durableFacetName(slot) {
34
+ return `${DURABLE_FACET_NAME_PREFIX}${slot}`;
35
+ }
36
+ /**
37
+ * The owner's facet name, minted on first call and pinned for the
38
+ * application's life. The owner key, counter and free list move inside one
39
+ * transaction, so a concurrent spawn cannot split the claim, and a re-read
40
+ * after a reset — or after eviction — answers the same name.
41
+ *
42
+ * A fresh name records the mint against the lifetime facet-ID ledger so the
43
+ * budget a durable spawn consumes is counted the same way an ephemeral one's
44
+ * is.
45
+ */
46
+ export async function acquireDurableFacetSlot(ctx, owner) {
47
+ let minted = false;
48
+ const slot = await ctx.storage.transaction(async (txn) => {
49
+ const held = await txn.get(ownerKey(owner));
50
+ if (typeof held === 'number')
51
+ return held;
52
+ const free = await txn.get(FREE_KEY);
53
+ const freeList = Array.isArray(free) ? free.filter((n) => typeof n === 'number') : [];
54
+ if (freeList.length > 0) {
55
+ freeList.sort((a, b) => a - b);
56
+ const reused = freeList.shift();
57
+ await txn.put(FREE_KEY, freeList);
58
+ await txn.put(ownerKey(owner), reused);
59
+ return reused;
60
+ }
61
+ const next = await txn.get(NEXT_KEY);
62
+ const slot = typeof next === 'number' ? next : 0;
63
+ await txn.put(NEXT_KEY, slot + 1);
64
+ await txn.put(ownerKey(owner), slot);
65
+ minted = true;
66
+ return slot;
67
+ });
68
+ if (minted) {
69
+ // The ledger counts EVERY name ever minted on this DO; the durable slot
70
+ // number alone is not that count (proc-slot names share the budget), so
71
+ // the record is the adopted total advanced by one — never an undercount.
72
+ recordFacetNameMinted(ctx, await facetNameCountDurable(ctx) + 1);
73
+ }
74
+ return durableFacetName(slot);
75
+ }
76
+ /**
77
+ * Hand the owner's slot back to the free list and drop its pin — the last
78
+ * step of explicit removal, after the facet's SQLite is already gone. Answers
79
+ * the freed name, or null when the owner held nothing.
80
+ */
81
+ export async function freeDurableFacetSlot(ctx, owner, beforeFree) {
82
+ return ctx.storage.transaction(async (txn) => {
83
+ const held = await txn.get(ownerKey(owner));
84
+ if (typeof held !== 'number')
85
+ return null;
86
+ beforeFree?.(durableFacetName(held));
87
+ await txn.delete(ownerKey(owner));
88
+ const free = await txn.get(FREE_KEY);
89
+ const freeList = Array.isArray(free) ? free.filter((n) => typeof n === 'number') : [];
90
+ freeList.push(held);
91
+ freeList.sort((a, b) => a - b);
92
+ await txn.put(FREE_KEY, freeList);
93
+ return durableFacetName(held);
94
+ });
95
+ }
@@ -0,0 +1,10 @@
1
+ import { type EsbuildTransformOptions, type TransformResult } from '@nimbus-sh/core/runtime/esbuild-service.js';
2
+ import type { DurableObject } from 'cloudflare:workers';
3
+ import type { WorkerCode } from '@nimbus-sh/fabric/vendor/types.js';
4
+ export declare const ESBUILD_TRANSFORM_WORKER_ID: string;
5
+ export type EsbuildTransformFacetRpc = DurableObject & {
6
+ transform(code: string, options: EsbuildTransformOptions): Promise<TransformResult>;
7
+ };
8
+ /** Slim Worker Loader module whose DO class owns the esbuild wasm heap. */
9
+ export declare function esbuildTransformWorkerCode(wasmBytes: ArrayBuffer): WorkerCode;
10
+ //# sourceMappingURL=esbuild-transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esbuild-transform.d.ts","sourceRoot":"","sources":["../../src/facets/esbuild-transform.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACrB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAMpE,eAAO,MAAM,2BAA2B,QAC+B,CAAC;AAExE,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAAG;IACrD,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CACrF,CAAC;AAEF,2EAA2E;AAC3E,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,WAAW,GAAG,UAAU,CA8B7E"}
@@ -0,0 +1,36 @@
1
+ import { CF_COMPAT_DATE } from '@nimbus-sh/core/constants.js';
2
+ import { BUNDLER_VERSION, generateEsbuildTransformRuntimeSource, } from '@nimbus-sh/core/runtime/esbuild-service.js';
3
+ import { ESBUILD_NAME_GLOBAL_SHIM } from '@nimbus-sh/core/_shared/esbuild-facet-shim.js';
4
+ import { ESBUILD_WASM_JS_FN_BODY, ESBUILD_WASM_VERSION, } from '../esbuild-wasm-bundle.generated.js';
5
+ export const ESBUILD_TRANSFORM_WORKER_ID = `nimbus-esbuild-transform:${ESBUILD_WASM_VERSION}:${BUNDLER_VERSION}`;
6
+ /** Slim Worker Loader module whose DO class owns the esbuild wasm heap. */
7
+ export function esbuildTransformWorkerCode(wasmBytes) {
8
+ const source = [
9
+ 'import { DurableObject } from "cloudflare:workers";',
10
+ 'import wasmModule from "esbuild.wasm";',
11
+ `const esbuild = new Function(${JSON.stringify(ESBUILD_WASM_JS_FN_BODY)})();`,
12
+ ESBUILD_NAME_GLOBAL_SHIM,
13
+ generateEsbuildTransformRuntimeSource(),
14
+ 'let initialized;',
15
+ 'function ensureInitialized() {',
16
+ ' initialized ||= esbuild.initialize({ wasmModule, worker: false });',
17
+ ' return initialized;',
18
+ '}',
19
+ 'export class EsbuildTransformFacet extends DurableObject {',
20
+ ' async transform(code, options) {',
21
+ ' await ensureInitialized();',
22
+ ' return transformWithEsbuild(esbuild, code, options);',
23
+ ' }',
24
+ '}',
25
+ ].join('\n');
26
+ return {
27
+ compatibilityDate: CF_COMPAT_DATE,
28
+ compatibilityFlags: ['nodejs_compat'],
29
+ mainModule: 'worker.js',
30
+ modules: {
31
+ 'worker.js': source,
32
+ 'esbuild.wasm': { wasm: wasmBytes },
33
+ },
34
+ globalOutbound: null,
35
+ };
36
+ }
@@ -19,11 +19,14 @@ import type { ProcessEntry } from '@nimbus-sh/core/runtime/process-table.js';
19
19
  import { SessionProcessSupervisor } from '@nimbus-sh/core/runtime/session-process-supervisor.js';
20
20
  import type { CredentialedVfs, SqliteVFS, VfsStat } from '@nimbus-sh/core/vfs/sqlite-vfs.js';
21
21
  import type { PortRegistry } from '@nimbus-sh/core/runtime/port-registry.js';
22
+ import { type PortVisibility } from '../session/port-capability.js';
22
23
  import { TurnBudget } from '@nimbus-sh/fabric/turn-budget.js';
23
- import { EsbuildService } from '@nimbus-sh/core/runtime/esbuild-service.js';
24
- import { type ProcessHostFactory } from '@nimbus-sh/fabric/process-fabric.js';
24
+ import { EsbuildService, type TransformResult } from '@nimbus-sh/core/runtime/esbuild-service.js';
25
+ import { type ProcessHostFactory, type ResidentCodeSpec } from '@nimbus-sh/fabric/process-fabric.js';
25
26
  import { type OpencodeRunnerOptions } from '../runtime/opencode-facet-runner.js';
26
27
  import { type FacetBundleProfile } from '@nimbus-sh/core/runtime/bundle-profile.js';
28
+ type EsbuildTransformOptions = NonNullable<Parameters<EsbuildService['transform']>[1]>;
29
+ type LargeEsmTransform = (code: string, options: EsbuildTransformOptions) => Promise<TransformResult>;
27
30
  /** Result returned from a facet execution */
28
31
  export interface FacetExecResult {
29
32
  exitCode: number;
@@ -532,8 +535,32 @@ export declare function isBundleModuleCandidate(path: string): boolean;
532
535
  * EXTENSION, where `.js` files transform on their content — `looksLikeEsm` is
533
536
  * the right question for a file that is already valid JS either way, and the
534
537
  * wrong one for a file that is never valid JS.
538
+ *
539
+ * A declaration file (`.d.ts`, `.d.mts`, `.d.cts`) is not a source: it has
540
+ * no runtime form, nothing `require()`s one, and esbuild's output for it is
541
+ * empty by definition. It is DATA — read by the program that ships it, which
542
+ * is exactly typescript: `tsc` reads its own `lib/lib.*.d.ts` with
543
+ * `readFileSync`, and every declaration it type-checks against comes from
544
+ * those bytes. Transforming them handed the compiler an 811-byte license
545
+ * comment where `lib.es5.d.ts` (217 KB) had been, and every global type was
546
+ * gone. So a declaration file is left exactly as it was staged.
535
547
  */
536
548
  export declare function bundleTypescriptLoader(path: string): 'ts' | 'tsx' | null;
549
+ /** `name.d.ts` / `name.d.mts` / `name.d.cts`, by TypeScript's own rule. */
550
+ export declare function isTypescriptDeclarationFile(path: string): boolean;
551
+ export declare function compiledCellKey(path: string): string;
552
+ /** The source path a compiled-cell key stands for, or null for a plain path. */
553
+ export declare function compiledCellPath(key: string): string | null;
554
+ /**
555
+ * The pre-compile loop both generated facets run at module evaluation, the
556
+ * only moment workerd lets a string become code. One definition so the two
557
+ * facets cannot drift on what they compile: every JavaScript-shaped cell
558
+ * (`.js`, `.mjs`, `.cjs` and the extensionless bin scripts) from its own
559
+ * bytes, and every TypeScript source from its compiled cell — which is
560
+ * removed from the bundle here, so a `readFileSync` of the source path
561
+ * returns the source and a directory listing never shows the key.
562
+ */
563
+ export declare const BUNDLE_PRECOMPILE_LOOP: string;
537
564
  /**
538
565
  * W2.6a: build the prefetch bundle for FacetManager.exec.
539
566
  *
@@ -550,7 +577,7 @@ export declare function bundleTypescriptLoader(path: string): 'ts' | 'tsx' | nul
550
577
  * behaviour for code paths that don't have esbuild handy).
551
578
  *
552
579
  */
553
- export declare function buildPrefetchBundle(vfs: CredentialedVfs, scriptPath: string | undefined, cwd: string, entryCode: string, esbuild?: EsbuildService, bundleProfile?: FacetBundleProfile, observedReads?: ReadonlySet<string>, pacer?: TurnBudget): Promise<FacetVfsState>;
580
+ export declare function buildPrefetchBundle(vfs: CredentialedVfs, scriptPath: string | undefined, cwd: string, entryCode: string, esbuild?: EsbuildService, bundleProfile?: FacetBundleProfile, observedReads?: ReadonlySet<string>, pacer?: TurnBudget, isolatedTransform?: LargeEsmTransform): Promise<FacetVfsState>;
554
581
  /**
555
582
  * Optional hooks wired in by NimbusSession. Kept as callbacks so
556
583
  * FacetManager stays unaware of the session / log-store types.
@@ -572,7 +599,7 @@ export interface FacetManagerHooks {
572
599
  * genuinely re-enters the object: a fresh turn is both a released thread and
573
600
  * a fresh CPU budget, and a launch needs each for a different reason.
574
601
  */
575
- requestLaunchTurn?: () => void;
602
+ requestLaunchTurn?: (notBefore?: number) => void;
576
603
  /**
577
604
  * Put a line in front of the user, whether or not a terminal is attached.
578
605
  *
@@ -583,8 +610,31 @@ export interface FacetManagerHooks {
583
610
  * survives until someone reconnects to read it.
584
611
  */
585
612
  notify?: (line: string) => void;
613
+ transformLargeEsm?: LargeEsmTransform;
614
+ /**
615
+ * Resolve the launch inputs a journalled worker launch needs re-driven with.
616
+ * Keyed by `recipe.owner`: the embedder's own record of the durable
617
+ * application decides — `null` means it is stopped or removed, so it is not
618
+ * restarted.
619
+ */
620
+ resolveWorkerLaunch?: (recipe: WorkerRecipe) => Promise<ResolvedWorkerLaunch | null>;
621
+ /**
622
+ * The session's own default resolver, reading the durable image store a
623
+ * self-owned spawn persisted under `.nimbus/images/`. Consulted ONLY when
624
+ * `resolveWorkerLaunch` is absent — an embedder's hook still overrides
625
+ * everything. Being the fallback is also what it is *not*: it can never
626
+ * re-mint a live globalOutbound binding, so a durable spawn carrying one
627
+ * is refused unless the embedder hook exists.
628
+ */
629
+ resolveWorkerLaunchFallback?: (recipe: WorkerRecipe) => Promise<ResolvedWorkerLaunch | null>;
586
630
  }
587
631
  export interface LongRunningWorkerSpawnOptions {
632
+ /** Interpreter residents share Node's atomic derived-owner claim. */
633
+ resident?: {
634
+ runtime: 'ruby' | 'python';
635
+ argv: string[];
636
+ };
637
+ restart?: ResidentRestartPolicy;
588
638
  port?: number;
589
639
  /** Inline modules: source text, or small wasm carried by value. */
590
640
  modules?: Record<string, string | {
@@ -597,8 +647,23 @@ export interface LongRunningWorkerSpawnOptions {
597
647
  */
598
648
  vfsWasmModules?: Record<string, string>;
599
649
  compatibilityFlags?: string[];
650
+ compatibilityDate?: string;
651
+ env?: ResidentCodeSpec['env'];
652
+ globalOutbound?: ResidentCodeSpec['globalOutbound'];
600
653
  /** Forwarded verbatim to the runner's startProcess. */
601
654
  startArgs?: unknown;
655
+ /**
656
+ * Set for a worker a durable application owns: the launch is journalled and
657
+ * re-driven after an instance reset through `hooks.resolveWorkerLaunch`.
658
+ * A plain spawnWorker stays unjournaled.
659
+ */
660
+ durable?: {
661
+ owner: string;
662
+ image?: {
663
+ runner: string;
664
+ application: string;
665
+ };
666
+ };
602
667
  }
603
668
  /** What `spawnNode` needs to build and boot one resident Node process. */
604
669
  export interface ResidentSpawnOptions {
@@ -614,6 +679,57 @@ export interface ResidentSpawnOptions {
614
679
  callerPid?: number;
615
680
  bundleProfile?: FacetBundleProfile;
616
681
  }
682
+ /** The launch inputs a re-drive rebuilds a worker from: content digests and
683
+ * transport, never env or credentials — the embedder resolves those. */
684
+ export interface WorkerRecipe {
685
+ resident?: LongRunningWorkerSpawnOptions['resident'];
686
+ kind: 'worker';
687
+ /** The durable application this process belongs to, keyed by the embedder. */
688
+ owner: string;
689
+ /** Content digests of the two images the launch was built from. */
690
+ image: {
691
+ runner: string;
692
+ application: string;
693
+ };
694
+ port: number;
695
+ cwd: string;
696
+ compatibilityDate: string;
697
+ compatibilityFlags: string[];
698
+ startArgs?: unknown;
699
+ }
700
+ export type ResidentRestartPolicy = 'never' | 'on-failure';
701
+ /** The env var a launch reads its restart policy from — set by startProcess({ restart }) and `nimbus start --restart`. */
702
+ export declare const RESTART_POLICY_ENV = "NIMBUS_RESTART";
703
+ /** One application as `apps.list` reports it — every stamped identity, live or not. */
704
+ export interface ResidentAppSummary {
705
+ owner: string;
706
+ name: string | null;
707
+ port: number | null;
708
+ pid: number | null;
709
+ status: 'running' | 'starting' | 'stopped' | 'failed';
710
+ visibility: PortVisibility;
711
+ capability: string | null;
712
+ restart: ResidentRestartPolicy;
713
+ /** Set with status 'failed': what went wrong, in the user's terms. */
714
+ diagnostic: string | null;
715
+ }
716
+ /** What a pid's journal row says about who it is. */
717
+ export interface ResidentIdentity {
718
+ owner: string | undefined;
719
+ ephemeral: boolean;
720
+ port: number | undefined;
721
+ }
722
+ /** What the embedder supplies for a re-driven worker launch. */
723
+ export interface ResolvedWorkerLaunch {
724
+ startArgs?: unknown;
725
+ /** Null is the absent answer — the same JSON the image blob carries. */
726
+ env: ResidentCodeSpec['env'] | null;
727
+ globalOutbound: ResidentCodeSpec['globalOutbound'];
728
+ /** Module name → source text, including the `worker.js` main module. */
729
+ modules: Record<string, string>;
730
+ /** Module name → VFS path of a wasm image, restored with the launch. */
731
+ vfsWasmModules?: Record<string, string>;
732
+ }
617
733
  export declare class FacetManager {
618
734
  private ctx;
619
735
  private env;
@@ -647,7 +763,7 @@ export declare class FacetManager {
647
763
  * The resident-launch journal (fabric's fenced-work.ts): the durable
648
764
  * record of every resident this session owes the user, and its recovery
649
765
  * after an instance reset. This manager supplies what a launch IS — the
650
- * inputs `_spawnResident` re-drives from — and how its loss is reported.
766
+ * recipe `_redrive` re-drives from — and how its loss is reported.
651
767
  */
652
768
  private readonly launchJournal;
653
769
  /**
@@ -691,12 +807,22 @@ export declare class FacetManager {
691
807
  * prefetch cache above so a profile can only ever seed the bundle it was
692
808
  * measured against.
693
809
  *
694
- * Lifetime is the supervisor incarnation's, same as the cache — a restart
695
810
  * costs one more loud failure and then relearns. Persisting it would be a
696
811
  * schema and a migration bought with nothing the in-memory form does not
697
812
  * already deliver for the case that matters: running the command again.
698
813
  */
699
814
  private residencyProfiles;
815
+ /** In-flight request-driven durable-app ensures, single-flight per port. */
816
+ private ensureInflight;
817
+ /** Per-pid chain of journal-row amendments; see `_amendRow`. */
818
+ private rowAmendments;
819
+ /**
820
+ * pid → the derived owner it duplicates: the second live instance of an
821
+ * identity. Not journalled (nothing re-drives it), so this is the only
822
+ * record of why `expose(pid)` refuses it.
823
+ */
824
+ private ephemeralPids;
825
+ private residentClaims;
700
826
  private static readonly RESIDENCY_PROFILE_MAX_ENTRIES;
701
827
  /**
702
828
  * A program that reads a directory of data files misses once per file, so
@@ -706,6 +832,23 @@ export declare class FacetManager {
706
832
  */
707
833
  private static readonly RESIDENCY_PROFILE_MAX_PATHS;
708
834
  constructor(ctx: DurableObjectState, env: unknown, processes: SessionProcessSupervisor, portRegistry: PortRegistry, host: ProcessHostFactory, hooks?: FacetManagerHooks);
835
+ /**
836
+ * The process is over. Every end-of-life passes through here: a clean
837
+ * exit, a kill, a timeout, a crash. Only one of them owes anything more
838
+ * than the journal row's release — a crash under 'on-failure' is re-driven
839
+ * from the row, after a backoff, while the row is still in storage so a
840
+ * reset inside the backoff window recovers it like any other resident.
841
+ */
842
+ private _onResidentTerminal;
843
+ /** Claim identity AND write its recovery row in one serializable storage transaction. */
844
+ private _claimResident;
845
+ private _releaseResidentClaim;
846
+ /**
847
+ * Amend one journal row in place — port stamp, owner adoption, settle —
848
+ * serialized per pid so two amendments in flight on the same row cannot
849
+ * interleave their read and write and lose one another's fields.
850
+ */
851
+ private _amendRow;
709
852
  setVfs(vfs: SqliteVFS): void;
710
853
  /**
711
854
  * The env/ctx pair every loader-backed runtime builds its facet pools
@@ -725,6 +868,11 @@ export declare class FacetManager {
725
868
  * store itself decides nothing about modes.
726
869
  */
727
870
  private _imageBlobs;
871
+ /**
872
+ * The kernel-scoped VFS the durable image store reads and writes through —
873
+ * `.nimbus/images/<sha256>` is session kernel data, not user content.
874
+ */
875
+ private _imageVfs;
728
876
  /**
729
877
  * W3.5 Fix B: hand the FacetManager a pre-warmed EsbuildService for
730
878
  * the ESM→CJS bundle pre-pass. NimbusSession already lazy-creates one
@@ -983,10 +1131,25 @@ export declare class FacetManager {
983
1131
  private _warmOpencodeServer;
984
1132
  /** Recent stderr/stdout tail for a pid, for fail-loud diagnostics. */
985
1133
  private _processLogTail;
1134
+ /**
1135
+ * A launch that fails before its process is running reports the same way
1136
+ * regardless of which phase failed: the pid is exited, the terminal event
1137
+ * recorded, and the session notified. Callers do their phase-specific
1138
+ * cleanup (ports, tracked RPC resources) first and pass a reason that names
1139
+ * the phase.
1140
+ */
1141
+ private _failLaunch;
986
1142
  /** Flush files written by the script back to the supervisor's VFS. */
987
1143
  private _flushVfsWrites;
988
1144
  /** Execution timeout. */
989
1145
  private _execWithTimeout;
1146
+ /**
1147
+ * Re-drive a journalled launch after an instance reset. What the journal
1148
+ * row carries is the recipe and nothing else: env and credentials are never
1149
+ * written to storage, so a worker launch's are re-resolved by the embedder
1150
+ * through `hooks.resolveWorkerLaunch`.
1151
+ */
1152
+ private _redrive;
990
1153
  /**
991
1154
  * Spawn a long-running Node process with the same shimmed require/fs/http
992
1155
  * environment used by foreground `node <script>` execution.
@@ -1036,11 +1199,86 @@ export declare class FacetManager {
1036
1199
  pid: number;
1037
1200
  boot: unknown;
1038
1201
  }>;
1202
+ /** `attempt` is the journal's re-drive budget, as `_spawnResident` carries it. */
1203
+ private _spawnWorker;
1204
+ /**
1205
+ * A resident process announcing it bound `port`.
1206
+ *
1207
+ * The stamp is unconditional: the pid's journal row gets `{ port }`
1208
+ * whether or not anything reserved it, which is what lets
1209
+ * `ensureDurableAppOnPort` re-drive ANY resident a reset killed — the
1210
+ * scoped URLs need no capability, so this alone makes every server's
1211
+ * preview survive a reset on demand.
1212
+ *
1213
+ * The capability is bound to identity, not to the port. The stored
1214
+ * capability is re-adopted only when the row's owner IS the reservation's
1215
+ * owner; any other occupant — an unrelated server, a pid outside the
1216
+ * resident lifecycle, the ephemeral second instance of an identity —
1217
+ * retires it and mints fresh, so a shared link 404s rather than reaching
1218
+ * a program it was never handed out for. An EXPLICIT reservation (an
1219
+ * embedder's `ensureDurableApp`) is the one exception, and it is the
1220
+ * landed contract: the embedder declared the port, so the row adopts the
1221
+ * reservation's owner and the capability with it.
1222
+ *
1223
+ * Under an injected `$PORT`, a resident that binds a different port is
1224
+ * registered anyway — the server must not break — but the row records
1225
+ * the mismatch, so `apps.list` reports it as failed and the user is told.
1226
+ */
1227
+ private _registerResidentPort;
1228
+ /** What a pid's journal row says about who it is; null for a pid without one. */
1229
+ residentIdentity(pid: number): Promise<ResidentIdentity | null>;
1230
+ /**
1231
+ * Every stamped identity — the reservations, and the journal rows that
1232
+ * carry an owner — folded one row per owner. A live pid in THIS instance
1233
+ * makes it running (or starting, until its launch settles and its port
1234
+ * is registered); a mismatch diagnostic makes it failed; everything else
1235
+ * is stopped, which for a row a reset left behind means re-drivable on
1236
+ * request.
1237
+ */
1238
+ listResidentApps(): Promise<ResidentAppSummary[]>;
1039
1239
  registerPort(pid: number, port: number): Promise<void>;
1040
1240
  waitForRouteablePorts(pid: number, timeoutMs?: number): Promise<number[]>;
1041
1241
  finishProcess(pid: number, exitCode: number, reason?: string): void;
1042
1242
  /** Kill a running process by PID. */
1043
1243
  kill(pid: number): boolean;
1244
+ /**
1245
+ * Remove a durable application: the ONLY path that deletes durable facet
1246
+ * storage. Owner-checked by construction — `freeDurableFacetSlot` answers
1247
+ * only a slot the owner actually holds, and the reservation release refuses
1248
+ * a foreign owner's record — so another owner's name cannot be reached.
1249
+ *
1250
+ * One ordered teardown: the live process is killed first (a released
1251
+ * durable facet only aborts, so nothing else ends it), the port reservation
1252
+ * is released, the journal rows for the owner are purged (nothing is owed a
1253
+ * removed application), the facet's SQLite is deleted, and the slot row is
1254
+ * freed last — so a crash mid-removal leaves a name still claimed rather
1255
+ * than a store nobody can re-drive.
1256
+ */
1257
+ removeDurableApp(owner: string): Promise<boolean>;
1258
+ /** The session-shaped view the public-directory helpers read env from. */
1259
+ private _publicDirectoryHost;
1260
+ /**
1261
+ * Whether a request addressed to `port` can reach a durable application —
1262
+ * and, when the application is journaled but dead, drive its re-drive and
1263
+ * wait for the boot, bounded.
1264
+ *
1265
+ * The port request is the one surface a reset leaves dark: the alarm pump
1266
+ * re-drives journaled launches eventually, but a URL a user is holding
1267
+ * cannot wait for an alarm that may never fire. 'started' means a live
1268
+ * process owns the port now; 'absent' means nothing durable claims it
1269
+ * (the caller answers 502 as it always has); 'failed' means a re-drive
1270
+ * ran and lost, or outlived its bound — the caller answers 503 and lets
1271
+ * the page re-ask.
1272
+ *
1273
+ * Single-flight per port: parallel requests on a woken page share one
1274
+ * ensure, which shares the journal's per-row drive with recovery — a
1275
+ * request that lands mid-recovery waits on that boot, it never boots a
1276
+ * second process.
1277
+ */
1278
+ ensureDurableAppOnPort(port: number): Promise<'started' | 'absent' | 'failed'>;
1279
+ private _ensureDurableAppOnPort;
1280
+ /** Poll for a port registration the in-flight launch has not made yet. */
1281
+ private _waitForPort;
1044
1282
  get stats(): {
1045
1283
  total: number;
1046
1284
  running: number;
@@ -1 +1 @@
1
- {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/facets/manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uDAAuD,CAAC;AAUjG,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,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