@nimbus-sh/worker 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/README.md +46 -43
  2. package/dist/_shared/preview-host.d.ts +14 -1
  3. package/dist/_shared/preview-host.d.ts.map +1 -1
  4. package/dist/_shared/preview-host.js +28 -3
  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/esbuild-wasm-bundle.generated.d.ts +1 -1
  9. package/dist/esbuild-wasm-bundle.generated.js +1 -1
  10. package/dist/facets/cirrus-real.js +1 -1
  11. package/dist/facets/durable-images.d.ts +50 -0
  12. package/dist/facets/durable-images.d.ts.map +1 -0
  13. package/dist/facets/durable-images.js +75 -0
  14. package/dist/facets/durable-slots.d.ts +45 -0
  15. package/dist/facets/durable-slots.d.ts.map +1 -0
  16. package/dist/facets/durable-slots.js +94 -0
  17. package/dist/facets/esbuild-transform.d.ts +10 -0
  18. package/dist/facets/esbuild-transform.d.ts.map +1 -0
  19. package/dist/facets/esbuild-transform.js +36 -0
  20. package/dist/facets/manager.d.ts +167 -12
  21. package/dist/facets/manager.d.ts.map +1 -1
  22. package/dist/facets/manager.js +575 -113
  23. package/dist/facets/opencode-staging.d.ts.map +1 -1
  24. package/dist/facets/opencode-staging.js +3 -4
  25. package/dist/facets/real-vite-hmr.js +1 -1
  26. package/dist/facets/vite-dev-server.d.ts +4 -4
  27. package/dist/facets/vite-dev-server.js +5 -5
  28. package/dist/git/commands.d.ts +22 -0
  29. package/dist/git/commands.d.ts.map +1 -1
  30. package/dist/git/commands.js +431 -424
  31. package/dist/git/network-facet.d.ts.map +1 -1
  32. package/dist/git/network-facet.js +6 -5
  33. package/dist/git-bundle.generated.d.ts +2 -2
  34. package/dist/git-bundle.generated.d.ts.map +1 -1
  35. package/dist/git-bundle.generated.js +3 -3
  36. package/dist/index.d.ts +2 -1
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +11 -2
  39. package/dist/loaders/child-process/spawn-facet.js +1 -1
  40. package/dist/loaders/child-process/spawn-pool.d.ts.map +1 -1
  41. package/dist/loaders/child-process/spawn-pool.js +2 -2
  42. package/dist/loaders/generated-workers.d.ts +2 -2
  43. package/dist/loaders/generated-workers.d.ts.map +1 -1
  44. package/dist/loaders/generated-workers.js +3 -3
  45. package/dist/loaders/npm-resolve-preamble.d.ts +3 -3
  46. package/dist/loaders/npm-resolve-preamble.js +3 -3
  47. package/dist/loaders/pre-bundle-preamble.d.ts +5 -5
  48. package/dist/loaders/pre-bundle-preamble.js +6 -6
  49. package/dist/node-shims-artifact.generated.js +3 -3
  50. package/dist/npm/install-batch-facet.d.ts +1 -1
  51. package/dist/npm/install-batch-facet.js +1 -1
  52. package/dist/npm/installer.d.ts +6 -6
  53. package/dist/npm/installer.d.ts.map +1 -1
  54. package/dist/npm/installer.js +28 -27
  55. package/dist/npm/pre-bundle-facet.d.ts +2 -2
  56. package/dist/npm/pre-bundle-facet.js +5 -5
  57. package/dist/npm/r2-cache.d.ts +1 -1
  58. package/dist/npm/resolve-facet.d.ts +1 -1
  59. package/dist/npm/resolve-facet.js +1 -1
  60. package/dist/npm/resolve-one-facet.d.ts +5 -5
  61. package/dist/npm/resolve-one-facet.js +5 -5
  62. package/dist/router/index.d.ts.map +1 -1
  63. package/dist/router/index.js +61 -4
  64. package/dist/router/public-directory-do.d.ts +17 -0
  65. package/dist/router/public-directory-do.d.ts.map +1 -0
  66. package/dist/router/public-directory-do.js +16 -0
  67. package/dist/router/public-directory.d.ts +75 -0
  68. package/dist/router/public-directory.d.ts.map +1 -0
  69. package/dist/router/public-directory.js +115 -0
  70. package/dist/router/remote-api.d.ts +9 -1
  71. package/dist/router/remote-api.d.ts.map +1 -1
  72. package/dist/router/remote-api.js +20 -3
  73. package/dist/runtime/bun-repl.d.ts +1 -1
  74. package/dist/runtime/bun-repl.js +3 -3
  75. package/dist/runtime/esbuild-wasm-bytes.js +1 -1
  76. package/dist/runtime/facet-loader-host.d.ts +2 -2
  77. package/dist/runtime/facet-loader-host.js +3 -3
  78. package/dist/runtime/node-repl.js +2 -2
  79. package/dist/runtime/node-shims-artifact.js +1 -1
  80. package/dist/runtime/node-shims.d.ts +4 -1
  81. package/dist/runtime/node-shims.d.ts.map +1 -1
  82. package/dist/runtime/node-shims.js +326 -7
  83. package/dist/runtime/opencode-artifact.js +1 -1
  84. package/dist/runtime/opentui-wasm-bytes.js +1 -1
  85. package/dist/runtime/python-repl.js +3 -3
  86. package/dist/runtime/ruby-repl.js +2 -2
  87. package/dist/runtime/sqlite-wasm-bytes.js +1 -1
  88. package/dist/session/agent.d.ts +11 -0
  89. package/dist/session/agent.d.ts.map +1 -1
  90. package/dist/session/diag.js +1 -1
  91. package/dist/session/helpers.js +1 -1
  92. package/dist/session/hibernation.d.ts +8 -8
  93. package/dist/session/hibernation.d.ts.map +1 -1
  94. package/dist/session/hibernation.js +15 -15
  95. package/dist/session/init-phases.d.ts +19 -26
  96. package/dist/session/init-phases.d.ts.map +1 -1
  97. package/dist/session/init-phases.js +20 -43
  98. package/dist/session/init.d.ts.map +1 -1
  99. package/dist/session/init.js +24 -19
  100. package/dist/session/keys.d.ts +8 -0
  101. package/dist/session/keys.d.ts.map +1 -1
  102. package/dist/session/keys.js +12 -3
  103. package/dist/session/nimbus-session.d.ts +33 -19
  104. package/dist/session/nimbus-session.d.ts.map +1 -1
  105. package/dist/session/nimbus-session.js +78 -37
  106. package/dist/session/port-capability.d.ts +95 -8
  107. package/dist/session/port-capability.d.ts.map +1 -1
  108. package/dist/session/port-capability.js +165 -8
  109. package/dist/session/programmatic.d.ts +50 -4
  110. package/dist/session/programmatic.d.ts.map +1 -1
  111. package/dist/session/programmatic.js +112 -15
  112. package/dist/session/routes.d.ts +17 -0
  113. package/dist/session/routes.d.ts.map +1 -1
  114. package/dist/session/routes.js +111 -43
  115. package/dist/session/rpc.d.ts +7 -7
  116. package/dist/session/rpc.d.ts.map +1 -1
  117. package/dist/session/rpc.js +34 -23
  118. package/dist/session/shell-socket.d.ts +76 -0
  119. package/dist/session/shell-socket.d.ts.map +1 -0
  120. package/dist/session/shell-socket.js +172 -0
  121. package/dist/session/start-real-vite.js +2 -2
  122. package/dist/session/supervisor-op.d.ts +5 -0
  123. package/dist/session/supervisor-op.d.ts.map +1 -0
  124. package/dist/session/supervisor-op.js +74 -0
  125. package/dist/session/supervisor-rpc.d.ts +6 -10
  126. package/dist/session/supervisor-rpc.d.ts.map +1 -1
  127. package/dist/session/supervisor-rpc.js +98 -79
  128. package/dist/session/ws.d.ts +1 -3
  129. package/dist/session/ws.d.ts.map +1 -1
  130. package/dist/session/ws.js +23 -7
  131. package/package.json +4 -3
  132. package/public/_assets/runtime/{node-shims-fea906843f6d594e.js → node-shims-9e1380d9ee430fcc.js} +320 -5
  133. package/public/s/index.html +101 -5
  134. package/scripts/bundle-esbuild-wasm.mjs +2 -2
  135. package/scripts/bundle-facet-workers.mjs +5 -7
  136. package/scripts/bundle-sqlite-wasm.mjs +1 -1
@@ -11,20 +11,139 @@
11
11
  * back. Everything else is the security half of the same rule: a capability
12
12
  * names ONE registration, so any other registration on that port retires the
13
13
  * durable copy. Only a deliberate restore extends a capability's life, which
14
- * is why `clearPortCapability` sits next to every `portRegistry.register` and
14
+ * is why `clearPortCapability` sits next to every `portRegistry.register`,
15
15
  * `restorePortCapability` sits only at the two places a dev server is
16
- * deliberately brought back.
16
+ * deliberately brought back, and `restoreReservedPortCapability` sits only
17
+ * on the durable spawn's re-adopt path, gated on the stored reservation's
18
+ * owner.
19
+ *
20
+ * The same per-port record also carries a RESERVATION: an owner may hold a
21
+ * port with no capability yet, so a durable application keeps its port across
22
+ * instances whether or not it is currently exposed. Clearing a capability
23
+ * keeps the owner's reservation; only `releasePortReservation` ends it.
17
24
  */
18
25
  import { z } from 'zod/v4';
19
26
  import { PORT_CAPABILITY_KEY_PREFIX } from './keys.js';
20
27
  /** The shape `createPortCapability` mints: 12 random bytes, hex. */
21
28
  const PortCapabilitySchema = z.string().regex(/^[a-f0-9]{24}$/);
22
- function key(port) {
29
+ /** 'scoped' is the default: capability-checked but never the public bearer. */
30
+ const PortVisibilitySchema = z.enum(['scoped', 'public']);
31
+ export const PortRecordSchema = z.object({
32
+ capability: PortCapabilitySchema.nullable(),
33
+ owner: z.string().nullable(),
34
+ visibility: PortVisibilitySchema.optional(),
35
+ });
36
+ const RESERVATION_FIRST_PORT = 20000;
37
+ const RESERVATION_LAST_PORT = 65535;
38
+ export function portRecordKey(port) {
23
39
  return `${PORT_CAPABILITY_KEY_PREFIX}${Number(port)}`;
24
40
  }
41
+ function conflict(detail) {
42
+ return new Error(`port reservation conflict: ${detail}`);
43
+ }
44
+ /** Read the raw per-port record: a reservation, an exposure, or nothing. */
45
+ export async function readPortReservation(ctx, port) {
46
+ const stored = PortRecordSchema.safeParse(await ctx.storage.get(portRecordKey(port)));
47
+ if (!stored.success)
48
+ return null;
49
+ return { ...stored.data, visibility: stored.data.visibility ?? 'scoped' };
50
+ }
51
+ /** Read retained exposure metadata without starting a session or restoring a listener. */
52
+ export async function readPortExposure(ctx, port) {
53
+ const stored = await readPortReservation(ctx, port);
54
+ return stored !== null && stored.capability !== null
55
+ ? { capability: stored.capability, owner: stored.owner, visibility: stored.visibility }
56
+ : null;
57
+ }
58
+ /**
59
+ * Hold a port for `owner` across instances. The owner's existing port is
60
+ * answered again; otherwise the preferred port is claimed, or the lowest
61
+ * free one. A preferred port that another record or a live listener holds
62
+ * is refused, never silently moved.
63
+ *
64
+ * `capability`/`visibility` give the embedder-durable path its URL material
65
+ * up front: a reservation can carry the capability the application will
66
+ * re-adopt when it binds, and the visibility the public bearer form is
67
+ * gated on. An existing reservation for the same owner is answered again,
68
+ * upgraded in place when the caller supplies values it lacks — an existing
69
+ * capability is never rotated, a URL already handed out stays good.
70
+ */
71
+ export async function reservePort(ctx, input) {
72
+ const claim = async (txn) => {
73
+ const records = await txn.list({ prefix: PORT_CAPABILITY_KEY_PREFIX });
74
+ const taken = new Set(input.occupiedPorts);
75
+ let held = null;
76
+ for (const [storedKey, value] of records) {
77
+ const port = Number(storedKey.slice(PORT_CAPABILITY_KEY_PREFIX.length));
78
+ if (!Number.isInteger(port))
79
+ continue;
80
+ taken.add(port);
81
+ const parsed = PortRecordSchema.safeParse(value);
82
+ if (parsed.success && parsed.data.owner === input.owner) {
83
+ held = { port, stored: parsed.data };
84
+ }
85
+ }
86
+ const preferred = input.preferredPort;
87
+ if (held !== null) {
88
+ if (preferred !== undefined && preferred !== held.port) {
89
+ throw conflict(`owner already holds port ${held.port}, cannot reserve ${preferred}`);
90
+ }
91
+ // Upgrade in place: adopt a caller-supplied capability the row lacks
92
+ // and/or apply the caller's visibility — never rotate an existing one.
93
+ const stored = held.stored;
94
+ const capability = stored?.capability ?? input.capability ?? null;
95
+ const visibility = input.visibility ?? stored?.visibility ?? 'scoped';
96
+ if (stored === null || capability !== stored.capability || visibility !== (stored.visibility ?? 'scoped')) {
97
+ await txn.put(portRecordKey(held.port), { owner: input.owner, capability, visibility });
98
+ }
99
+ return held.port;
100
+ }
101
+ let port;
102
+ if (preferred !== undefined) {
103
+ if (!Number.isInteger(preferred) || preferred < 1 || preferred > RESERVATION_LAST_PORT) {
104
+ throw conflict(`port ${preferred} is outside 1..${RESERVATION_LAST_PORT}`);
105
+ }
106
+ if (taken.has(preferred))
107
+ throw conflict(`port ${preferred} is held by another owner or listener`);
108
+ port = preferred;
109
+ }
110
+ else {
111
+ port = RESERVATION_FIRST_PORT;
112
+ while (port <= RESERVATION_LAST_PORT && taken.has(port))
113
+ port += 1;
114
+ if (port > RESERVATION_LAST_PORT)
115
+ throw conflict('no free port left to reserve');
116
+ }
117
+ await txn.put(portRecordKey(port), {
118
+ owner: input.owner,
119
+ capability: input.capability ?? null,
120
+ visibility: input.visibility ?? 'scoped',
121
+ });
122
+ return port;
123
+ };
124
+ return ctx.storage.transaction(claim);
125
+ }
126
+ /** End an owner's hold on a port. Another owner's record is left alone and refused. */
127
+ export async function releasePortReservation(ctx, input) {
128
+ // The read, the owner check and the delete are one transaction: a concurrent
129
+ // claim or a foreign release cannot interleave between them.
130
+ return ctx.storage.transaction(async (txn) => {
131
+ const stored = await readPortReservation({ storage: txn }, input.port);
132
+ if (stored === null)
133
+ return false;
134
+ if (stored.owner !== input.owner)
135
+ throw conflict(`port ${input.port} is held by another owner`);
136
+ await txn.delete(portRecordKey(input.port));
137
+ return true;
138
+ });
139
+ }
25
140
  export async function readPortCapability(self, port) {
26
- const stored = PortCapabilitySchema.safeParse(await self.ctx.storage.get(key(port)));
27
- return stored.success ? stored.data : null;
141
+ // The stored record is the only source of truth: a capability belongs to
142
+ // whoever is registered on the port, and its owner field is preserved by
143
+ // persist, never consulted as a gate. Durable ownership rides the
144
+ // reservation's own restore path (restoreReservedPortCapability).
145
+ const stored = await readPortExposure(self.ctx, port);
146
+ return stored?.capability ?? null;
28
147
  }
29
148
  /**
30
149
  * Re-adopt the persisted capability into whatever the registry holds now.
@@ -36,14 +155,52 @@ export async function restorePortCapability(self, port) {
36
155
  return null;
37
156
  return self.portRegistry.restoreCapability(Number(port), stored) ? stored : null;
38
157
  }
158
+ /**
159
+ * Re-adopt the persisted capability ONLY for the owner the stored record
160
+ * names. The durable re-drive calls this with its own owner: the reservation
161
+ * is the same source of truth the preflight reads, so a release or a foreign
162
+ * claim mid-boot cannot smuggle an exposure across.
163
+ */
164
+ export async function restoreReservedPortCapability(self, port, owner) {
165
+ const stored = await readPortReservation(self.ctx, port);
166
+ if (stored === null || stored.owner !== owner || stored.capability === null)
167
+ return null;
168
+ return self.portRegistry.restoreCapability(Number(port), stored.capability) ? stored.capability : null;
169
+ }
39
170
  export async function persistPortCapability(self, port, capability) {
40
- await self.ctx.storage.put(key(port), PortCapabilitySchema.parse(capability));
171
+ // Read-modify-write inside the reservation's own transaction, and the stored
172
+ // record is the ONLY source of truth for owner: an SDK ports.list()/expose
173
+ // on a durable application's port must not rewrite the row it is reporting
174
+ // on, or the next durable preflight sees a reservation nobody owns.
175
+ await self.ctx.storage.transaction(async (txn) => {
176
+ const stored = await txn.get(portRecordKey(port));
177
+ const parsed = PortRecordSchema.safeParse(stored);
178
+ await txn.put(portRecordKey(port), {
179
+ capability: PortCapabilitySchema.parse(capability),
180
+ owner: parsed.success ? parsed.data.owner : null,
181
+ ...(parsed.success && parsed.data.visibility !== undefined
182
+ ? { visibility: parsed.data.visibility }
183
+ : {}),
184
+ });
185
+ });
41
186
  }
42
187
  /**
43
188
  * Retire the durable capability for a port. Called before every registration
44
189
  * that is not a restore, so a token handed out for the previous occupant of a
45
- * port cannot reach the next one.
190
+ * port cannot reach the next one. An owner's reservation survives it.
46
191
  */
47
192
  export async function clearPortCapability(self, port) {
48
- await self.ctx.storage.delete(key(port));
193
+ await self.ctx.storage.transaction(async (txn) => {
194
+ const stored = PortRecordSchema.safeParse(await txn.get(portRecordKey(port)));
195
+ const record = stored.success ? stored.data : null;
196
+ if (record !== null && record.owner !== null) {
197
+ await txn.put(portRecordKey(port), {
198
+ owner: record.owner,
199
+ capability: null,
200
+ ...(record.visibility !== undefined ? { visibility: record.visibility } : {}),
201
+ });
202
+ return;
203
+ }
204
+ await txn.delete(portRecordKey(port));
205
+ });
49
206
  }
@@ -32,20 +32,36 @@ interface ProgrammaticShellExecuteOptions {
32
32
  commandContext?: Record<string, unknown>;
33
33
  }
34
34
  interface ProgrammaticContext {
35
+ /** The session DO's own id — the public-directory binding reads its name. */
36
+ id?: {
37
+ name?: unknown;
38
+ };
35
39
  getWebSockets?(tag?: string): WebSocket[];
36
40
  /** Holds a background process's work open for the life of the process. */
37
41
  waitUntil?(promise: Promise<unknown>): void;
38
42
  storage: {
39
43
  get(key: string): Promise<unknown>;
44
+ put(key: string, value: unknown): Promise<void>;
40
45
  delete(key: string): Promise<void>;
41
46
  deleteAll(): Promise<void>;
42
47
  deleteAlarm(): Promise<void>;
43
- put(key: string, value: unknown): Promise<void>;
48
+ list<T = unknown>(options: {
49
+ prefix: string;
50
+ }): Promise<Map<string, T>>;
51
+ transaction<T>(body: (txn: {
52
+ get(key: string): Promise<unknown>;
53
+ put(key: string, value: unknown): Promise<void>;
54
+ delete(key: string): Promise<unknown>;
55
+ list<T2 = unknown>(options: {
56
+ prefix: string;
57
+ }): Promise<Map<string, T2>>;
58
+ }) => Promise<T>): Promise<T>;
44
59
  };
45
60
  }
46
61
  interface ProgrammaticFacetManager {
47
62
  kill(pid: number): boolean;
48
63
  hasResidentProcess(pid: number): boolean;
64
+ removeDurableApp(owner: string): Promise<boolean>;
49
65
  }
50
66
  interface ProgrammaticViteServer {
51
67
  isRunning: boolean;
@@ -93,8 +109,6 @@ export interface ProgrammaticHost {
93
109
  _w9PersistWired?: boolean;
94
110
  _w9FlushTimer?: ReturnType<typeof setTimeout> | null;
95
111
  _w9SchemaInit?: boolean;
96
- _isolateGen?: number;
97
- _isolateGenPersisted?: boolean;
98
112
  _w9WireProcessLogPersist?(): void;
99
113
  ensureSqliteFs(): void;
100
114
  ensureFacetManager(): void;
@@ -251,17 +265,49 @@ export declare function rpcProcessLogs(self: ProgrammaticHost, pid: number, opti
251
265
  exit: import("@nimbus-sh/core/runtime/process-logs.js").ProcessExitInfo | null;
252
266
  }>;
253
267
  export declare function rpcListPorts(self: ProgrammaticHost): Promise<SerializedPort[]>;
254
- export declare function rpcExposePort(self: ProgrammaticHost, port: number): Promise<{
268
+ export declare function rpcExposePort(self: ProgrammaticHost, port: number, options?: {
269
+ visibility?: 'scoped' | 'public';
270
+ }): Promise<{
255
271
  port: number;
256
272
  listening: boolean;
257
273
  pid: number | null;
258
274
  registeredAt: number | null;
259
275
  capability: string | null;
276
+ visibility: "scoped" | "public";
277
+ }>;
278
+ /**
279
+ * The embedder's durable-application seam: reserve (or re-answer) the port
280
+ * `owner` holds, minting the capability the application's public URL is
281
+ * built on — minted HERE, stored on the reservation, so a URL handed out
282
+ * before the application has ever booted is the one its eventual binding
283
+ * re-adopts, and the one a reset re-adopts again. Answers the port, the
284
+ * capability, and the record's visibility.
285
+ */
286
+ export declare function rpcEnsureDurableApp(self: ProgrammaticHost, input: {
287
+ owner: string;
288
+ preferredPort?: number;
289
+ visibility?: 'scoped' | 'public';
290
+ }): Promise<{
291
+ port: number;
292
+ capability: string | null;
293
+ visibility: 'scoped' | 'public';
260
294
  }>;
261
295
  export declare function rpcUnexposePort(self: ProgrammaticHost, port: number): Promise<{
262
296
  port: number;
263
297
  ok: boolean;
264
298
  }>;
299
+ /**
300
+ * End a durable application's contract. The reservation's port is read first
301
+ * so the caller learns which durable address was released; the manager then
302
+ * kills every launch the owner claims, purges its journal rows, releases the
303
+ * port, and frees the durable slot. `removed` is false only when no durable
304
+ * application held that owner at all.
305
+ */
306
+ export declare function rpcRemoveDurableApp(self: ProgrammaticHost, owner: string): Promise<{
307
+ owner: string;
308
+ removed: boolean;
309
+ port: number | null;
310
+ }>;
265
311
  /**
266
312
  * Route an embedder request that carries a port capability. The embedder has
267
313
  * authenticated the capability at its edge and stripped its own credentials,
@@ -1 +1 @@
1
- {"version":3,"file":"programmatic.d.ts","sourceRoot":"","sources":["../../src/session/programmatic.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,+CAA+C,CAAC;AAEvD,OAAO,KAAK,EAAY,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAC/F,OAAO,EAAuB,KAAK,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uDAAuD,CAAC;AACjG,OAAO,EAAE,YAAY,EAAkB,MAAM,0CAA0C,CAAC;AACxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAmB,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAiBpF,MAAM,WAAW,iB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;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,GACpC,OAAO,CAAC,IAAI,CAAC,CAcf;AAED,wBAAsB,UAAU,CAC9B,IAAI,EAAE,gBAAgB,EACtB,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,yBAAyB,CAAC,CA8EpC"}
@@ -10,13 +10,15 @@ import { listInstalledRuntimes, } from '@nimbus-sh/core/runtime/installed-runtim
10
10
  import { PID_GEN_STRIDE } from '@nimbus-sh/core/runtime/process-table.js';
11
11
  import { notifyTerminalEvent } from '../runtime/process-logs-api.js';
12
12
  import { SessionProcessSupervisor } from '@nimbus-sh/core/runtime/session-process-supervisor.js';
13
- import { PortRegistry } from '@nimbus-sh/core/runtime/port-registry.js';
13
+ import { PortRegistry, createPortCapability } from '@nimbus-sh/core/runtime/port-registry.js';
14
14
  import { CRED_KERNEL } from '@nimbus-sh/core/runtime/os-contracts.js';
15
15
  import { endProcessInput, resizeProcess, signalProcess, writeProcessInput, } from '@nimbus-sh/core/runtime/process-input-routing.js';
16
16
  import { z } from 'zod/v4';
17
17
  import { SESSION_DESTROYED_KEY, SHELL_STATE_KEY_PREFIX, VITE_CONFIG_KEY } from './keys.js';
18
- import { clearPortCapability, persistPortCapability, restorePortCapability, } from './port-capability.js';
19
- import { ISOLATE_GEN_KEY } from '@nimbus-sh/fabric/alarms.js';
18
+ import { clearPortCapability, persistPortCapability, PortRecordSchema, portRecordKey, readPortReservation, reservePort, restorePortCapability, } from './port-capability.js';
19
+ import { PORT_CAPABILITY_KEY_PREFIX } from './keys.js';
20
+ import { bindPublicPortCapability, unbindPublicPortCapability } from '../router/public-directory.js';
21
+ import { GENERATION_KEY, assumeGeneration, generation } from '@nimbus-sh/fabric/generation.js';
20
22
  import { HeadlessTerminal, Shell } from '@nimbus-sh/core/substrate/lifo/index.js';
21
23
  const ShellIdSchema = z.string().min(1).max(160).regex(/^[A-Za-z0-9][A-Za-z0-9._:-]*$/);
22
24
  const ShellStateSchema = z.object({
@@ -169,8 +171,8 @@ function runtimeDeps(self) {
169
171
  export async function ensureProgrammaticReady(self, options = {}) {
170
172
  if (!self.shell) {
171
173
  await self.initSession(makeHeadlessWebSocket());
172
- // Programmatic boot owns no real terminal socket. Mark the session
173
- // drained so a later browser /ws can warm-join instead of 409ing.
174
+ // A programmatic boot owns no terminal socket, which is what
175
+ // 'drained' reports to the diagnostics and the recovery ring.
174
176
  self._b4Phase = 'drained';
175
177
  }
176
178
  else {
@@ -522,28 +524,124 @@ export async function rpcListPorts(self) {
522
524
  await Promise.all(entries.map((entry) => persistPortCapability(self, entry.port, entry.capability)));
523
525
  return entries.map(serializePort);
524
526
  }
525
- export async function rpcExposePort(self, port) {
527
+ export async function rpcExposePort(self, port, options) {
526
528
  await ensureProgrammaticReady(self);
527
529
  const n = Number(port);
528
530
  const entry = self.portRegistry.get(n);
529
531
  if (entry)
530
532
  await persistPortCapability(self, n, entry.capability);
533
+ // The stored record decides visibility: a reservation's mark is sticky,
534
+ // so 'public' survives persists of unrelated fields — and the caller's
535
+ // explicit choice, when given, lands on the row the same way.
536
+ if (options?.visibility !== undefined) {
537
+ // A visibility choice is a write on the stored row, not a reservation
538
+ // claim: owner and capability stay exactly as they were.
539
+ await self.ctx.storage.transaction(async (txn) => {
540
+ const stored = await readPortReservation({ storage: txn }, n);
541
+ if (stored !== null && stored.visibility !== options.visibility) {
542
+ await txn.put(portRecordKey(n), {
543
+ owner: stored.owner,
544
+ capability: stored.capability,
545
+ visibility: options.visibility,
546
+ });
547
+ }
548
+ });
549
+ }
550
+ const record = await readPortReservation(self.ctx, n);
551
+ if (record?.visibility === 'public' && entry) {
552
+ // A port that goes public must be resolvable: the capability the URL
553
+ // carries has to name this session in the directory, and a non-legacy
554
+ // deployment without the binding is refused loudly — never half-public.
555
+ await bindPublicPortCapability(self, entry.capability, n);
556
+ }
531
557
  return {
532
558
  port: n,
533
559
  listening: !!entry,
534
560
  pid: entry?.pid ?? null,
535
561
  registeredAt: entry?.registeredAt ?? null,
536
562
  capability: entry?.capability ?? null,
563
+ visibility: record?.visibility ?? 'scoped',
564
+ };
565
+ }
566
+ /**
567
+ * The embedder's durable-application seam: reserve (or re-answer) the port
568
+ * `owner` holds, minting the capability the application's public URL is
569
+ * built on — minted HERE, stored on the reservation, so a URL handed out
570
+ * before the application has ever booted is the one its eventual binding
571
+ * re-adopts, and the one a reset re-adopts again. Answers the port, the
572
+ * capability, and the record's visibility.
573
+ */
574
+ export async function rpcEnsureDurableApp(self, input) {
575
+ await ensureProgrammaticReady(self);
576
+ const owner = input.owner;
577
+ if (typeof owner !== 'string' || owner.length === 0) {
578
+ throw new Error('ensureDurableApp: owner must be a non-empty string');
579
+ }
580
+ const occupied = new Set(self.portRegistry.getAll().map((entry) => entry.port));
581
+ const port = await reservePort(self.ctx, {
582
+ owner,
583
+ preferredPort: input.preferredPort,
584
+ occupiedPorts: occupied,
585
+ // Minted here, not at boot: the URL is built from this capability, and
586
+ // re-drive re-adopts it out of the same row.
587
+ capability: createPortCapability(),
588
+ ...(input.visibility !== undefined ? { visibility: input.visibility } : {}),
589
+ });
590
+ const record = await readPortReservation(self.ctx, port);
591
+ if (record?.visibility === 'public' && record.capability !== null) {
592
+ // The URL is built on this capability before the app has ever run:
593
+ // publish it to the directory now, loudly refusing a deployment whose
594
+ // binding is missing rather than minting an unroutable URL.
595
+ await bindPublicPortCapability(self, record.capability, port);
596
+ }
597
+ return {
598
+ port,
599
+ capability: record?.capability ?? null,
600
+ visibility: record?.visibility ?? 'scoped',
537
601
  };
538
602
  }
539
603
  export async function rpcUnexposePort(self, port) {
540
604
  await ensureProgrammaticReady(self);
541
605
  const n = Number(port);
542
606
  // Before the unregister, so a crash between the two leaves a dead token
543
- // rather than a live one.
607
+ // rather than a live one. A public capability also leaves the directory.
608
+ const record = await readPortReservation(self.ctx, n);
544
609
  await clearPortCapability(self, n);
610
+ if (record?.visibility === 'public' && record.capability !== null) {
611
+ await unbindPublicPortCapability(self, record.capability);
612
+ }
545
613
  return { port: n, ok: self.portRegistry.unregister(n) };
546
614
  }
615
+ /**
616
+ * End a durable application's contract. The reservation's port is read first
617
+ * so the caller learns which durable address was released; the manager then
618
+ * kills every launch the owner claims, purges its journal rows, releases the
619
+ * port, and frees the durable slot. `removed` is false only when no durable
620
+ * application held that owner at all.
621
+ */
622
+ export async function rpcRemoveDurableApp(self, owner) {
623
+ await ensureProgrammaticReady(self);
624
+ if (typeof owner !== 'string' || owner.length === 0) {
625
+ throw new Error('removeDurableApp: owner must be a non-empty string');
626
+ }
627
+ // Which durable address is being released — the reservation's row names it
628
+ // before the manager retires it.
629
+ const rows = await self.ctx.storage.list({ prefix: PORT_CAPABILITY_KEY_PREFIX });
630
+ let port = null;
631
+ for (const [key, record] of rows) {
632
+ const parsed = PortRecordSchema.safeParse(record);
633
+ if (!parsed.success || parsed.data.owner !== owner)
634
+ continue;
635
+ const n = Number(key.slice(PORT_CAPABILITY_KEY_PREFIX.length));
636
+ if (Number.isInteger(n) && n > 0) {
637
+ port = n;
638
+ break;
639
+ }
640
+ }
641
+ self.ensureFacetManager();
642
+ const removed = await self.facetManager.removeDurableApp(owner);
643
+ return { owner, removed, port };
644
+ }
547
645
  /**
548
646
  * Route an embedder request that carries a port capability. The embedder has
549
647
  * authenticated the capability at its edge and stripped its own credentials,
@@ -677,7 +775,7 @@ export async function rpcDestroy(self, options = {}) {
677
775
  // current-generation (pid > pidBase) — landing its output on the
678
776
  // destroyed/recreated session. Keep {tombstone, isolateGen} consistent.
679
777
  try {
680
- await self.ctx.storage.put(ISOLATE_GEN_KEY, self._isolateGen ?? 0);
778
+ await self.ctx.storage.put(GENERATION_KEY, generation(self.ctx));
681
779
  }
682
780
  catch { /* best-effort */ }
683
781
  resetInMemorySessionState(self);
@@ -713,10 +811,10 @@ async function quiesceInMemorySessionState(self) {
713
811
  * The generation the NEXT boot of this session will run as.
714
812
  *
715
813
  * rpcDestroy re-persists the pre-destroy generation after wiping storage,
716
- * so `maybeBumpIsolateGen` reads it back and bumps once — landing here.
814
+ * so `adoptGeneration` reads it back and bumps once — landing here.
717
815
  */
718
816
  function successorGeneration(self) {
719
- return (self._isolateGen ?? 0) + 1;
817
+ return generation(self.ctx) + 1;
720
818
  }
721
819
  /**
722
820
  * Install the empty process/port state a destroyed session leaves behind.
@@ -810,12 +908,11 @@ function resetInMemorySessionState(self) {
810
908
  // Adopt the generation the next boot will derive from the counter
811
909
  // rpcDestroy just re-persisted, so the in-memory pid floor and the
812
910
  // persisted one agree. Deliberately left unpersisted: storage keeps the
813
- // pre-destroy value, and maybeBumpIsolateGen re-derives this one from it.
814
- const generation = successorGeneration(self);
815
- installEmptyProcessState(self, generation);
911
+ // pre-destroy value, and adoptGeneration re-derives this one from it.
912
+ const successor = successorGeneration(self);
913
+ installEmptyProcessState(self, successor);
816
914
  self._w9SchemaInit = false;
817
- self._isolateGen = generation;
818
- self._isolateGenPersisted = false;
915
+ assumeGeneration(self.ctx, successor);
819
916
  try {
820
917
  self._w9WireProcessLogPersist?.();
821
918
  }
@@ -24,6 +24,23 @@
24
24
  * (~30 sites). RoutesHost = any pragmatic deviation, like InitHost in S6.
25
25
  */
26
26
  type RoutesHost = any;
27
+ /**
28
+ * Route a request to whatever is listening on a session port.
29
+ *
30
+ * The one implementation behind every port-addressed surface: `/port/<n>/`,
31
+ * `/preview/?port=N`, and the `<port>--<sid>` preview hostname, which the
32
+ * router forwards as `/port/<n>/`. They differ only in how the port and the
33
+ * inner path are spelled, so they must not differ in what answers.
34
+ *
35
+ * `mountBase` is the public URL prefix the served app is mounted at for THIS
36
+ * request — '' for a root-mounted `<port>--<sid>` host, '/s/<sid>/preview' for
37
+ * the preview path. The in-process Cirrus dev server rewrites base-relative
38
+ * URLs (module URLs, <base href>, BASE_URL, router basename), so it is handed
39
+ * the base directly: the generic port proxy strips the Nimbus base header at
40
+ * the untrusted-code boundary and cannot carry it, and a plain user server on
41
+ * any other port is mounted at root and needs no rewriting.
42
+ */
43
+ export declare function routeToSessionPort(self: RoutesHost, port: number, request: Request, innerPath: string, mountBase: string, capability?: string): Promise<Response>;
27
44
  /** Route a capability-authenticated embedder request to a guest HTTP server. */
28
45
  export declare function routeCapabilityPort(self: RoutesHost, port: number, capability: string, request: Request, innerPath: string): Promise<Response>;
29
46
  export declare function handleFetch(self: RoutesHost, request: Request): Promise<Response>;
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/session/routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAoDH,KAAK,UAAU,GAAG,GAAG,CAAC;AA6LtB,gFAAgF;AAChF,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,QAAQ,CAAC,CAEnB;AAyGD,wBAAsB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CA8+BvF"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/session/routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAuDH,KAAK,UAAU,GAAG,GAAG,CAAC;AA2HtB;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,QAAQ,CAAC,CAyDnB;AA2BD,gFAAgF;AAChF,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,QAAQ,CAAC,CAEnB;AAyGD,wBAAsB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAugCvF"}