@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
@@ -0,0 +1,76 @@
1
+ /**
2
+ * src/session/shell-socket.ts — who owns the session's terminal.
3
+ *
4
+ * The /ws upgrade refuses a second browser terminal on one session, so it
5
+ * has to know whether the terminal already has an owner. `readyState ===
6
+ * OPEN` does not answer that. It describes this end of the socket. A tab
7
+ * that dies without a close frame leaves a socket that still reads OPEN
8
+ * with nobody on the other end, and an upgrade that fails after accepting
9
+ * its socket leaves one whose client half was never handed to anyone. No
10
+ * close frame can ever arrive for either. Refusing every reconnect
11
+ * against such a socket locks the session out for good.
12
+ *
13
+ * Ownership needs peer-originated evidence, and that evidence has to
14
+ * outlive a hibernation cycle, because isolate memory does not. Two
15
+ * sources qualify:
16
+ *
17
+ * 1. `seenAt` in the socket's attachment. The attachment survives
18
+ * hibernation. Every inbound frame refreshes it, rate-limited to one
19
+ * write per STAMP_INTERVAL_MS, so a fast typist costs one attachment
20
+ * write per 15 s.
21
+ * 2. `ctx.getWebSocketAutoResponseTimestamp(ws)`. The runtime answers
22
+ * the configured `ping` itself without waking the object, so a ping
23
+ * never reaches case 1 and leaves no other trace. The browser
24
+ * terminal does not ping — it probes with an ordinary frame, for
25
+ * the reasons public/s/index.html gives — so this covers the other
26
+ * clients rather than that one.
27
+ *
28
+ * A close or an error is better than either: the runtime is telling the
29
+ * object outright that this socket is finished, so `clearShellSocketStamp`
30
+ * drops the evidence there and the next upgrade needs no inference at all.
31
+ *
32
+ * A socket owns the terminal while the later of the two falls inside
33
+ * SHELL_OWNER_LIVENESS_MS. The window has to cover the longest silence a
34
+ * live tab can produce. Browsers throttle a background tab's timers to
35
+ * about one tick per minute, so 120 s clears that with margin. A tab
36
+ * quiet for longer has stopped running its own code, and the upgrade that
37
+ * takes the terminal also closes its socket — so it redials cleanly
38
+ * instead of holding a terminal it can no longer use.
39
+ */
40
+ /** How long a shell socket owns the terminal after its peer was heard. */
41
+ export declare const SHELL_OWNER_LIVENESS_MS = 120000;
42
+ /** The part of `DurableObjectState` this module reads. */
43
+ export interface AutoResponseHost {
44
+ getWebSocketAutoResponseTimestamp?(ws: WebSocket): Date | null;
45
+ }
46
+ /** Tag a freshly accepted terminal socket as this session's shell owner. */
47
+ export declare function tagShellSocket(ws: WebSocket, now?: number): void;
48
+ /**
49
+ * Drop the evidence that a peer was on this socket.
50
+ *
51
+ * Called when the runtime reports the socket closed or errored. Both say
52
+ * this socket is finished, so the next upgrade must not read a stamp the
53
+ * dying handler wrote moments earlier and refuse the reconnect. Keeps the
54
+ * kind, so the socket still classifies as the terminal's while it drains.
55
+ * A peer that turns out to be alive re-stamps on its next frame.
56
+ */
57
+ export declare function clearShellSocketStamp(ws: WebSocket): void;
58
+ /**
59
+ * Record that the peer on this socket is still there.
60
+ *
61
+ * Called on every inbound shell frame. Rewrites the attachment only once
62
+ * the recorded stamp has aged past STAMP_INTERVAL_MS. No-op on sockets
63
+ * that carry another kind.
64
+ */
65
+ export declare function noteShellSocketActivity(ws: WebSocket, now?: number): void;
66
+ /** True when another browser terminal currently holds this session. */
67
+ export declare function hasLiveShellOwner(ctx: AutoResponseHost | undefined, sockets: readonly WebSocket[], now?: number): boolean;
68
+ /**
69
+ * Close the shell sockets no peer holds any more.
70
+ *
71
+ * Called on an upgrade that is taking the terminal. Without it, a socket
72
+ * whose tab is gone stays accepted for the life of the object, and every
73
+ * warm rejoin adds another one.
74
+ */
75
+ export declare function closeStaleShellSockets(ctx: AutoResponseHost | undefined, sockets: readonly WebSocket[], now?: number): void;
76
+ //# sourceMappingURL=shell-socket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell-socket.d.ts","sourceRoot":"","sources":["../../src/session/shell-socket.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,0EAA0E;AAC1E,eAAO,MAAM,uBAAuB,SAAU,CAAC;AAU/C,0DAA0D;AAC1D,MAAM,WAAW,gBAAgB;IAC/B,iCAAiC,CAAC,CAAC,EAAE,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;CAChE;AAwFD,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,GAAE,MAAmB,GAAG,IAAI,CAE5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,SAAS,GAAG,IAAI,CAGzD;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,GAAE,MAAmB,GAAG,IAAI,CAKrF;AAED,uEAAuE;AACvE,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,gBAAgB,GAAG,SAAS,EACjC,OAAO,EAAE,SAAS,SAAS,EAAE,EAC7B,GAAG,GAAE,MAAmB,GACvB,OAAO,CAET;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,gBAAgB,GAAG,SAAS,EACjC,OAAO,EAAE,SAAS,SAAS,EAAE,EAC7B,GAAG,GAAE,MAAmB,GACvB,IAAI,CAKN"}
@@ -0,0 +1,172 @@
1
+ /**
2
+ * src/session/shell-socket.ts — who owns the session's terminal.
3
+ *
4
+ * The /ws upgrade refuses a second browser terminal on one session, so it
5
+ * has to know whether the terminal already has an owner. `readyState ===
6
+ * OPEN` does not answer that. It describes this end of the socket. A tab
7
+ * that dies without a close frame leaves a socket that still reads OPEN
8
+ * with nobody on the other end, and an upgrade that fails after accepting
9
+ * its socket leaves one whose client half was never handed to anyone. No
10
+ * close frame can ever arrive for either. Refusing every reconnect
11
+ * against such a socket locks the session out for good.
12
+ *
13
+ * Ownership needs peer-originated evidence, and that evidence has to
14
+ * outlive a hibernation cycle, because isolate memory does not. Two
15
+ * sources qualify:
16
+ *
17
+ * 1. `seenAt` in the socket's attachment. The attachment survives
18
+ * hibernation. Every inbound frame refreshes it, rate-limited to one
19
+ * write per STAMP_INTERVAL_MS, so a fast typist costs one attachment
20
+ * write per 15 s.
21
+ * 2. `ctx.getWebSocketAutoResponseTimestamp(ws)`. The runtime answers
22
+ * the configured `ping` itself without waking the object, so a ping
23
+ * never reaches case 1 and leaves no other trace. The browser
24
+ * terminal does not ping — it probes with an ordinary frame, for
25
+ * the reasons public/s/index.html gives — so this covers the other
26
+ * clients rather than that one.
27
+ *
28
+ * A close or an error is better than either: the runtime is telling the
29
+ * object outright that this socket is finished, so `clearShellSocketStamp`
30
+ * drops the evidence there and the next upgrade needs no inference at all.
31
+ *
32
+ * A socket owns the terminal while the later of the two falls inside
33
+ * SHELL_OWNER_LIVENESS_MS. The window has to cover the longest silence a
34
+ * live tab can produce. Browsers throttle a background tab's timers to
35
+ * about one tick per minute, so 120 s clears that with margin. A tab
36
+ * quiet for longer has stopped running its own code, and the upgrade that
37
+ * takes the terminal also closes its socket — so it redials cleanly
38
+ * instead of holding a terminal it can no longer use.
39
+ */
40
+ /** How long a shell socket owns the terminal after its peer was heard. */
41
+ export const SHELL_OWNER_LIVENESS_MS = 120_000;
42
+ /** Smallest gap between two attachment writes on one socket. */
43
+ const STAMP_INTERVAL_MS = 15_000;
44
+ /** Tolerance for a `seenAt` that reads ahead of the current clock. */
45
+ const CLOCK_SKEW_MS = 60_000;
46
+ const SHELL_KIND = 'shell';
47
+ function readAttachment(ws) {
48
+ try {
49
+ const read = Reflect.get(ws, 'deserializeAttachment');
50
+ if (typeof read !== 'function')
51
+ return null;
52
+ return Reflect.apply(read, ws, []);
53
+ }
54
+ catch {
55
+ return null;
56
+ }
57
+ }
58
+ function writeAttachment(ws, attachment) {
59
+ try {
60
+ const write = Reflect.get(ws, 'serializeAttachment');
61
+ if (typeof write === 'function')
62
+ Reflect.apply(write, ws, [attachment]);
63
+ }
64
+ catch { /* the socket is closing, or the runtime refused the write */ }
65
+ }
66
+ /**
67
+ * Read a shell socket's stamp in one attachment pass.
68
+ *
69
+ * Returns null when the socket carries another kind, and a stamp of null
70
+ * when it is a shell socket nothing has stamped yet. An attachment
71
+ * outlives the deploy that wrote it and is untrusted on the way back, so
72
+ * a stamp that is not a plain timestamp, or that reads further ahead than
73
+ * the clocks can differ, counts as no stamp at all.
74
+ */
75
+ function readShellStamp(ws, now) {
76
+ const attachment = readAttachment(ws);
77
+ if (typeof attachment !== 'object' || attachment === null)
78
+ return null;
79
+ const record = attachment;
80
+ if (record.kind !== SHELL_KIND)
81
+ return null;
82
+ const seenAt = record.seenAt;
83
+ if (typeof seenAt !== 'number' || !Number.isFinite(seenAt) || seenAt > now + CLOCK_SKEW_MS) {
84
+ return { seenAt: null };
85
+ }
86
+ return { seenAt };
87
+ }
88
+ /** When the runtime last answered a ping on this socket, if it ever did. */
89
+ function autoResponseAt(ctx, ws, now) {
90
+ // Null whenever the runtime has never auto-answered on this socket.
91
+ const at = ctx?.getWebSocketAutoResponseTimestamp?.(ws) ?? null;
92
+ if (!at)
93
+ return null;
94
+ const ms = at.getTime();
95
+ if (!Number.isFinite(ms) || ms > now + CLOCK_SKEW_MS)
96
+ return null;
97
+ return ms;
98
+ }
99
+ /** True while a peer is still proven to be on this shell socket. */
100
+ function ownsTerminal(ctx, ws, stamp, now) {
101
+ const answered = autoResponseAt(ctx, ws, now);
102
+ const heard = stamp.seenAt === null
103
+ ? answered
104
+ : (answered === null ? stamp.seenAt : Math.max(stamp.seenAt, answered));
105
+ return heard !== null && now - heard < SHELL_OWNER_LIVENESS_MS;
106
+ }
107
+ /** The open shell sockets, each with the stamp it carries. */
108
+ function openShellSockets(sockets, now) {
109
+ const found = [];
110
+ for (const ws of sockets) {
111
+ if (ws.readyState !== WebSocket.OPEN)
112
+ continue;
113
+ const stamp = readShellStamp(ws, now);
114
+ if (stamp)
115
+ found.push({ ws, stamp });
116
+ }
117
+ return found;
118
+ }
119
+ /** Tag a freshly accepted terminal socket as this session's shell owner. */
120
+ export function tagShellSocket(ws, now = Date.now()) {
121
+ writeAttachment(ws, { kind: SHELL_KIND, seenAt: now });
122
+ }
123
+ /**
124
+ * Drop the evidence that a peer was on this socket.
125
+ *
126
+ * Called when the runtime reports the socket closed or errored. Both say
127
+ * this socket is finished, so the next upgrade must not read a stamp the
128
+ * dying handler wrote moments earlier and refuse the reconnect. Keeps the
129
+ * kind, so the socket still classifies as the terminal's while it drains.
130
+ * A peer that turns out to be alive re-stamps on its next frame.
131
+ */
132
+ export function clearShellSocketStamp(ws) {
133
+ if (readShellStamp(ws, Date.now()) === null)
134
+ return;
135
+ writeAttachment(ws, { kind: SHELL_KIND });
136
+ }
137
+ /**
138
+ * Record that the peer on this socket is still there.
139
+ *
140
+ * Called on every inbound shell frame. Rewrites the attachment only once
141
+ * the recorded stamp has aged past STAMP_INTERVAL_MS. No-op on sockets
142
+ * that carry another kind.
143
+ */
144
+ export function noteShellSocketActivity(ws, now = Date.now()) {
145
+ const stamp = readShellStamp(ws, now);
146
+ if (!stamp)
147
+ return;
148
+ if (stamp.seenAt !== null && now - stamp.seenAt < STAMP_INTERVAL_MS)
149
+ return;
150
+ writeAttachment(ws, { kind: SHELL_KIND, seenAt: now });
151
+ }
152
+ /** True when another browser terminal currently holds this session. */
153
+ export function hasLiveShellOwner(ctx, sockets, now = Date.now()) {
154
+ return openShellSockets(sockets, now).some(({ ws, stamp }) => ownsTerminal(ctx, ws, stamp, now));
155
+ }
156
+ /**
157
+ * Close the shell sockets no peer holds any more.
158
+ *
159
+ * Called on an upgrade that is taking the terminal. Without it, a socket
160
+ * whose tab is gone stays accepted for the life of the object, and every
161
+ * warm rejoin adds another one.
162
+ */
163
+ export function closeStaleShellSockets(ctx, sockets, now = Date.now()) {
164
+ for (const { ws, stamp } of openShellSockets(sockets, now)) {
165
+ if (ownsTerminal(ctx, ws, stamp, now))
166
+ continue;
167
+ try {
168
+ ws.close(1001, 'terminal taken over');
169
+ }
170
+ catch { /* already closing */ }
171
+ }
172
+ }
@@ -20,7 +20,7 @@ import { EsbuildService } from '@nimbus-sh/core/runtime/esbuild-service.js';
20
20
  import { rewriteCirrusViteConfigBundle } from '@nimbus-sh/core/runtime/cirrus-vite-config-rewriter.js';
21
21
  import { CirrusReal } from '../facets/cirrus-real.js';
22
22
  import { makeLongRunningPortStub } from '@nimbus-sh/core/runtime/long-running-handle.js';
23
- import { acquireHeavyAlloc } from '@nimbus-sh/core/observability/heavy-alloc-coord.js';
23
+ import { acquireHeavyAlloc } from '@nimbus-sh/platform/heavy-alloc-coord.js';
24
24
  import { VITE_CONFIG_KEY } from './keys.js';
25
25
  import { clearPortCapability } from './port-capability.js';
26
26
  /**
@@ -53,7 +53,7 @@ export async function startRealVite(self, opts) {
53
53
  if (cfgPath) {
54
54
  try {
55
55
  if (!self.esbuildService)
56
- self.esbuildService = new EsbuildService(self.sqliteFs);
56
+ self.esbuildService = new EsbuildService(kernelFs);
57
57
  const bundleResult = await self.esbuildService.build([cfgPath], {
58
58
  bundle: true,
59
59
  format: 'esm',
@@ -0,0 +1,5 @@
1
+ import type { SupervisorOpEnvelope } from '@nimbus-sh/core/workspace/supervisor-op.js';
2
+ import type { NimbusSession } from './nimbus-session.js';
3
+ /** Preserve hosted accounting and lifecycle work behind the shared host seam. */
4
+ export declare function sessionSupervisorOp(host: NimbusSession, envelope: SupervisorOpEnvelope): Promise<unknown>;
5
+ //# sourceMappingURL=supervisor-op.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supervisor-op.d.ts","sourceRoot":"","sources":["../../src/session/supervisor-op.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAuEzD,iFAAiF;AACjF,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,aAAa,EACnB,QAAQ,EAAE,oBAAoB,GAC7B,OAAO,CAAC,OAAO,CAAC,CASlB"}
@@ -0,0 +1,74 @@
1
+ // Only named supervisor operations are callable; no RPC name comes from input.
2
+ const routes = {
3
+ readFile: { method: '_rpcReadFile', args: [0, 'pid'] },
4
+ readFileBytes: { method: '_rpcReadFileBytes', args: [0, 'pid'] },
5
+ writeFile: { method: '_rpcWriteFile', args: [0, 1, 'pid'] },
6
+ stat: { method: '_rpcStat', args: [0, 'pid'] },
7
+ lstat: { method: '_rpcLstat', args: [0, 'pid'] },
8
+ hasLegacySymlinkUnder: { method: '_rpcHasLegacySymlinkUnder', args: [0, 'pid'] },
9
+ utimes: { method: '_rpcUtimes', args: [0, 1, 2, 'pid'] },
10
+ chmod: { method: '_rpcChmod', args: [0, 1, 'pid'] },
11
+ access: { method: '_rpcAccess', args: [0, 1, 'pid'] },
12
+ chown: { method: '_rpcChown', args: [0, 1, 2, 'pid', 3] },
13
+ setUmask: { method: '_rpcSetUmask', args: [0, 'pid'] },
14
+ readdir: { method: '_rpcReaddir', args: [0, 'pid'] },
15
+ exists: { method: '_rpcExists', args: [0, 'pid'] },
16
+ mkdir: { method: '_rpcMkdir', args: [0, 'pid'] },
17
+ rmdir: { method: '_rpcRmdir', args: [0, 'pid'] },
18
+ rename: { method: '_rpcRename', args: [0, 1, 'pid'] },
19
+ unlink: { method: '_rpcUnlink', args: [0, 'pid'] },
20
+ readlink: { method: '_rpcReadlink', args: [0, 'pid'] },
21
+ symlink: { method: '_rpcSymlink', args: [0, 1, 'pid'] },
22
+ fsAcquire: { method: '_rpcFsAcquire', args: [0, 1, 'pid'] },
23
+ fsRevision: { method: '_rpcFsRevision', args: [0, 'pid'] },
24
+ fsList: { method: '_rpcFsList', args: [0, 1, 'pid'] },
25
+ wsOpen: { method: '_rpcWsOpen', args: [0, 1, 'pid'] },
26
+ wsPoll: { method: '_rpcWsPoll', args: [0, 1, 'pid'] },
27
+ wsSend: { method: '_rpcWsSend', args: [0, 1, 2, 'pid'] },
28
+ wsClose: { method: '_rpcWsClose', args: [0, 1, 2, 'pid'] },
29
+ fsOpen: { method: '_rpcFsOpen', args: [0, 1, 'pid'] },
30
+ fsRead: { method: '_rpcFsRead', args: [0, 1, 2, 'pid'] },
31
+ fsWrite: { method: '_rpcFsWrite', args: [0, 1, 2, 'pid'] },
32
+ fsClose: { method: '_rpcFsClose', args: [0, 'pid'] },
33
+ fsReadRange: { method: '_rpcFsReadRange', args: [0, 1, 2, 'pid'] },
34
+ fsReadRangeUncached: { method: '_rpcFsReadRangeUncached', args: [0, 1, 2, 'pid'] },
35
+ fsReadBatch: { method: '_rpcFsReadBatch', args: [0, 'pid'] },
36
+ fsWriteRange: { method: '_rpcFsWriteRange', args: [0, 1, 2, 'pid'] },
37
+ fsAppend: { method: '_rpcFsAppend', args: [0, 'writerId', 1, 2, 3, 'pid'] },
38
+ fsAppendAck: { method: '_rpcFsAppendAck', args: [0, 1, 2, 'pid'] },
39
+ fsTruncate: { method: '_rpcFsTruncate', args: [0, 1, 'pid'] },
40
+ writeBatch: { method: '_rpcWriteBatch', args: [0, 'pid'] },
41
+ writeBatchStream: { method: '_rpcWriteBatchStream', args: ['stream', 'mutationOwner', 'pid'] },
42
+ putRegistryEntries: { method: '_rpcPutRegistryEntries', args: [0] },
43
+ stdout: { method: '_rpcStdout', args: ['pid', 0] },
44
+ stderr: { method: '_rpcStderr', args: ['pid', 0] },
45
+ reportExit: { method: '_rpcReportExit', args: ['pid', 0, 1] },
46
+ prefetch: { method: '_rpcPrefetch', args: [0, 1] },
47
+ registerPort: { method: '_rpcRegisterPort', args: ['pid', 0] },
48
+ ensureDurableApp: { method: '_rpcEnsureDurableApp', args: [0] },
49
+ removeDurableApp: { method: '_rpcRemoveDurableApp', args: [0] },
50
+ unregisterPort: { method: '_rpcUnregisterPort', args: [0] },
51
+ routeLoopback: { method: '_rpcRouteLoopback', args: [0, 1] },
52
+ transform: { method: '_rpcTransform', args: [0, 1] },
53
+ cpSpawn: { method: '_rpcCpSpawn', args: [0] },
54
+ cpStdinWrite: { method: '_rpcCpStdinWrite', args: [0, 1] },
55
+ cpStdinEnd: { method: '_rpcCpStdinEnd', args: [0] },
56
+ cpReadStdin: { method: '_rpcCpReadStdin', args: [0, 1] },
57
+ cpReadOutput: { method: '_rpcCpReadOutput', args: [0, 1, 2, 3] },
58
+ cpDrainOutput: { method: '_rpcCpDrainOutput', args: [0] },
59
+ cpKill: { method: '_rpcCpKill', args: [0, 1] },
60
+ cpWait: { method: '_rpcCpWait', args: [0, 1] },
61
+ cpDispatchInline: { method: '_rpcCpDispatchInline', args: [0, 1] },
62
+ };
63
+ /** Preserve hosted accounting and lifecycle work behind the shared host seam. */
64
+ export async function sessionSupervisorOp(host, envelope) {
65
+ if (!envelope || typeof envelope.op !== 'string' || !Object.hasOwn(routes, envelope.op)) {
66
+ throw new Error(`supervisor op: '${envelope?.op}' is not served by this host`);
67
+ }
68
+ const route = routes[envelope.op];
69
+ const args = route.args.map((slot) => typeof slot === 'number' ? envelope.args?.[slot] : envelope[slot]);
70
+ const method = host[route.method];
71
+ if (typeof method !== 'function')
72
+ throw new Error(`supervisor op: missing host method ${route.method}`);
73
+ return Reflect.apply(method, host, args);
74
+ }
@@ -53,16 +53,12 @@ export type SupervisorCacheStatEvent = {
53
53
  cacheKind: CacheKind;
54
54
  };
55
55
  export declare class SupervisorRPC extends WorkerEntrypoint {
56
- /**
57
- * The supervisor DO stub for RPC routing, found from the doId in ctx.props.
58
- *
59
- * Minted per call, because that is the only lifetime an instance of this
60
- * class has: workerd constructs a NEW WorkerEntrypoint for every RPC call,
61
- * not one per facet invocation, so a field cached here is written and
62
- * discarded by the same call and never read by another (measured: two calls
63
- * on one stub produced instances #3 and #4, each having served one call).
64
- */
65
- private _getStub;
56
+ /** Resolve the composed host anew for each WorkerEntrypoint invocation. */
57
+ private _dispatch;
58
+ private _op;
59
+ /** Stamp filesystem credentials from the binding, not the supplied arguments. */
60
+ private _fsOp;
61
+ private _reportingPid;
66
62
  private _call;
67
63
  private _pid;
68
64
  private _writerId;
@@ -1 +1 @@
1
- {"version":3,"file":"supervisor-rpc.d.ts","sourceRoot":"","sources":["../../src/session/supervisor-rpc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAQtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAUrE,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEnF;;;;;;;GAOG;AACH,MAAM,MAAM,wBAAwB,GAChC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACrE;IAAE,IAAI,EAAE,MA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