@nimbus-sh/fabric 0.1.0 → 0.2.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 (103) hide show
  1. package/README.md +84 -55
  2. package/dist/bindings.js +5 -5
  3. package/dist/budgets.d.ts +132 -0
  4. package/dist/budgets.d.ts.map +1 -0
  5. package/dist/budgets.js +248 -0
  6. package/dist/composition.d.ts +87 -0
  7. package/dist/composition.d.ts.map +1 -0
  8. package/dist/composition.js +76 -0
  9. package/dist/connections.d.ts +81 -0
  10. package/dist/connections.d.ts.map +1 -0
  11. package/dist/connections.js +114 -0
  12. package/dist/derived.d.ts +65 -0
  13. package/dist/derived.d.ts.map +1 -0
  14. package/dist/derived.js +95 -0
  15. package/dist/do-calls.d.ts +94 -0
  16. package/dist/do-calls.d.ts.map +1 -0
  17. package/dist/do-calls.js +111 -0
  18. package/dist/facet-pool.d.ts +90 -0
  19. package/dist/facet-pool.d.ts.map +1 -0
  20. package/dist/facet-pool.js +113 -0
  21. package/dist/{fanout-pool.d.ts → fanout.d.ts} +20 -20
  22. package/dist/fanout.d.ts.map +1 -0
  23. package/dist/{fanout-pool.js → fanout.js} +20 -20
  24. package/dist/{launch-journal.d.ts → fenced-work.d.ts} +25 -13
  25. package/dist/fenced-work.d.ts.map +1 -0
  26. package/dist/{launch-journal.js → fenced-work.js} +47 -13
  27. package/dist/generation.d.ts +69 -0
  28. package/dist/generation.d.ts.map +1 -0
  29. package/dist/generation.js +118 -0
  30. package/dist/{facet-image-store.d.ts → image-store.d.ts} +8 -8
  31. package/dist/image-store.d.ts.map +1 -0
  32. package/dist/{facet-image-store.js → image-store.js} +4 -4
  33. package/dist/index.d.ts +16 -8
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +16 -8
  36. package/dist/{loader-pool.d.ts → isolate-pool.d.ts} +19 -19
  37. package/dist/isolate-pool.d.ts.map +1 -0
  38. package/dist/{loader-pool.js → isolate-pool.js} +20 -20
  39. package/dist/journal.d.ts +111 -0
  40. package/dist/journal.d.ts.map +1 -0
  41. package/dist/journal.js +177 -0
  42. package/dist/outbox.d.ts +249 -0
  43. package/dist/outbox.d.ts.map +1 -0
  44. package/dist/outbox.js +355 -0
  45. package/dist/process-fabric.d.ts +2 -14
  46. package/dist/process-fabric.d.ts.map +1 -1
  47. package/dist/process-fabric.js +6 -15
  48. package/dist/process-host.d.ts +1 -1
  49. package/dist/process-host.d.ts.map +1 -1
  50. package/dist/process-host.js +10 -9
  51. package/dist/sealed.d.ts +78 -0
  52. package/dist/sealed.d.ts.map +1 -0
  53. package/dist/sealed.js +145 -0
  54. package/dist/timers.d.ts +138 -0
  55. package/dist/timers.d.ts.map +1 -0
  56. package/dist/timers.js +231 -0
  57. package/dist/{launch-pacer.d.ts → turn-budget.d.ts} +19 -21
  58. package/dist/turn-budget.d.ts.map +1 -0
  59. package/dist/{launch-pacer.js → turn-budget.js} +22 -11
  60. package/dist/workerd-facet-host.d.ts +28 -67
  61. package/dist/workerd-facet-host.d.ts.map +1 -1
  62. package/dist/workerd-facet-host.js +49 -171
  63. package/examples/agent-core-adapter.ts +191 -0
  64. package/package.json +4 -2
  65. package/src/bindings.ts +6 -6
  66. package/src/budgets.ts +308 -0
  67. package/src/composition.ts +127 -0
  68. package/src/connections.ts +140 -0
  69. package/src/derived.ts +135 -0
  70. package/src/do-calls.ts +156 -0
  71. package/src/facet-pool.ts +157 -0
  72. package/src/{fanout-pool.ts → fanout.ts} +35 -35
  73. package/src/{launch-journal.ts → fenced-work.ts} +58 -22
  74. package/src/generation.ts +144 -0
  75. package/src/{facet-image-store.ts → image-store.ts} +9 -9
  76. package/src/index.ts +16 -8
  77. package/src/{loader-pool.ts → isolate-pool.ts} +34 -34
  78. package/src/journal.ts +242 -0
  79. package/src/node-async-hooks.d.ts +14 -0
  80. package/src/outbox.ts +520 -0
  81. package/src/process-fabric.ts +6 -33
  82. package/src/process-host.ts +10 -15
  83. package/src/sealed.ts +150 -0
  84. package/src/timers.ts +294 -0
  85. package/src/{launch-pacer.ts → turn-budget.ts} +30 -24
  86. package/src/workerd-facet-host.ts +67 -193
  87. package/dist/alarms.d.ts +0 -134
  88. package/dist/alarms.d.ts.map +0 -1
  89. package/dist/alarms.js +0 -214
  90. package/dist/ctx-exports.d.ts +0 -47
  91. package/dist/ctx-exports.d.ts.map +0 -1
  92. package/dist/ctx-exports.js +0 -54
  93. package/dist/facet-image-store.d.ts.map +0 -1
  94. package/dist/fanout-pool.d.ts.map +0 -1
  95. package/dist/launch-journal.d.ts.map +0 -1
  96. package/dist/launch-pacer.d.ts.map +0 -1
  97. package/dist/loader-ledger.d.ts +0 -57
  98. package/dist/loader-ledger.d.ts.map +0 -1
  99. package/dist/loader-ledger.js +0 -91
  100. package/dist/loader-pool.d.ts.map +0 -1
  101. package/src/alarms.ts +0 -275
  102. package/src/ctx-exports.ts +0 -77
  103. package/src/loader-ledger.ts +0 -112
package/dist/alarms.js DELETED
@@ -1,214 +0,0 @@
1
- /**
2
- * alarms.ts — Durable Object alarm multiplexing + isolate-generation
3
- * machinery, persisted across hibernation.
4
- *
5
- * Workerd hibernates Durable Objects between requests to free memory. On
6
- * wake, the new isolate must rebuild its in-memory state from SQL — but it
7
- * also needs to know "is this the same lifecycle as before, or did workerd
8
- * recycle me?" That distinction matters for recovery (warmJoin vs cold init)
9
- * and is captured by the isolate generation, a counter persisted across
10
- * hibernations.
11
- *
12
- * A Durable Object has ONE alarm, and a second `setAlarm()` silently
13
- * overwrites the first — so every alarm-driven subsystem coordinates through
14
- * a single reason→deadline map and one dispatcher. Reasons are plain strings
15
- * registered by the embedder: `scheduleAlarm` arms one, and `dispatchAlarm`
16
- * runs the embedder-supplied handler for every reason whose deadline has
17
- * passed.
18
- */
19
- import { errorText } from '@nimbus-sh/core/_shared/error-text.js';
20
- /**
21
- * Multi-reason alarm coordination map.
22
- *
23
- * JSON-serialised `Record<reason, deadlineMsEpoch>` where keys are the
24
- * embedder's canonical reason strings (e.g. 'w9-flush', 'log-janitor'). The
25
- * alarm() dispatcher reads this on fire, dispatches every reason whose
26
- * deadline has passed, and re-arms `ctx.storage.setAlarm` at the earliest
27
- * remaining deadline.
28
- *
29
- * Why a map (not a single nextAlarmAt + reason): two subsystems can have
30
- * distinct deadlines. Without the map, the later setAlarm() call would
31
- * overwrite the earlier reason silently, breaking whichever subsystem
32
- * expected its deadline.
33
- *
34
- * Forward-compat: the dispatcher silently drops unknown reasons so a
35
- * rollback from a future deploy that added new reasons doesn't leave the
36
- * alarm stuck.
37
- *
38
- * The VALUE is live production DO storage ('w1_next_alarm_reasons', from the
39
- * workstream that introduced it) and must never change — renaming a storage
40
- * key is a migration, and orphaned rows are the least of what it breaks.
41
- */
42
- export const ALARM_REASONS_KEY = 'w1_next_alarm_reasons';
43
- /**
44
- * Storage key for the isolate-generation counter (cold-start +
45
- * post-hibernation wake; one increment per fresh isolate).
46
- *
47
- * The VALUE is live production DO storage ('w9_isolate_gen') and must never
48
- * change, same contract as {@link ALARM_REASONS_KEY}.
49
- */
50
- export const ISOLATE_GEN_KEY = 'w9_isolate_gen';
51
- /**
52
- * Schedule (or re-schedule) an alarm reason. Coordinated via a single map in
53
- * DO storage so multiple subsystems don't clobber each other's `setAlarm()`
54
- * calls.
55
- *
56
- * Semantics:
57
- * - Reads the existing reasons map.
58
- * - Sets `map[reason] = whenMs` IF `whenMs` is sooner than the
59
- * currently-pending deadline for that reason (or no entry exists).
60
- * Later-than-pending requests are silently ignored — the existing
61
- * alarm will fire and re-arm anyway.
62
- * - Writes the map back and calls `ctx.storage.setAlarm(min(deadlines))`.
63
- *
64
- * Cost: 1 storage read + 1 storage write + 1 setAlarm per call. setAlarm
65
- * itself is billed as 1 row written per DO pricing. At a 60s janitor
66
- * cadence, this is ~$0.05/mo/session at scale — dwarfed by the
67
- * hibernation duration savings.
68
- *
69
- * Fail-soft: any throw is swallowed with a warn. On older runtimes /
70
- * wrangler-dev where setAlarm is unavailable, this is a no-op (the
71
- * subsystem's in-isolate setTimeout fallback continues to work).
72
- */
73
- export function scheduleAlarm(host, ctx, reason, whenMs) {
74
- // Serialize every read-modify-write of the reasons map through one
75
- // per-instance chain: two schedulers firing back-to-back from one activity
76
- // hook would otherwise interleave their get→put cycles and silently drop
77
- // whichever reason wrote first.
78
- const run = async () => {
79
- try {
80
- const setAlarmFn = ctx?.storage?.setAlarm;
81
- if (typeof setAlarmFn !== 'function')
82
- return false;
83
- const existing = (await ctx.storage.get(ALARM_REASONS_KEY));
84
- const map = { ...(existing || {}) };
85
- // Earliest-deadline-first: only update if new request is sooner or
86
- // this reason has no pending entry.
87
- if (!(reason in map) || whenMs < map[reason]) {
88
- map[reason] = whenMs;
89
- await ctx.storage.put(ALARM_REASONS_KEY, map);
90
- }
91
- const earliest = Math.min(...Object.values(map));
92
- setAlarmFn.call(ctx.storage, earliest);
93
- return true;
94
- }
95
- catch (e) {
96
- console.warn('[nimbus/W1] scheduleAlarm threw:', errorText(e));
97
- return false;
98
- }
99
- };
100
- const chained = (host._alarmChain ?? Promise.resolve()).then(run, run);
101
- host._alarmChain = chained;
102
- return chained;
103
- }
104
- /**
105
- * Multi-reason alarm dispatcher. Called from the DO's `alarm()` handler with
106
- * the embedder's handler map.
107
- *
108
- * For each pending reason whose deadline has passed, run its handler.
109
- * Handlers are awaited in place: the alarm invocation is the fresh turn a
110
- * re-entering subsystem asked for, and it has to stay the one paying for the
111
- * work it just released.
112
- *
113
- * After running fireable reasons, re-arms `ctx.storage.setAlarm` at the
114
- * earliest remaining deadline. If no reasons remain, deletes the map key and
115
- * does NOT call setAlarm — the DO becomes hibernation-eligible after the 10s
116
- * idle window.
117
- *
118
- * Forward/back-compat: unknown reasons silently dropped. `onLegacyAlarm`
119
- * covers an alarm that fires with no map at all — a deploy from before the
120
- * map existed left a bare `setAlarm` behind, and the embedder decides what
121
- * that one-time fire means (one dispatch later the map is populated by the
122
- * next scheduleAlarm call).
123
- */
124
- export function dispatchAlarm(host, ctx, handlers, onLegacyAlarm) {
125
- // Same serialization as scheduleAlarm: the dispatcher's read→handlers→write
126
- // cycle must not interleave with an activity-hook scheduleAlarm.
127
- const chained = (host._alarmChain ?? Promise.resolve()).then(() => dispatchAlarmBody(ctx, handlers, onLegacyAlarm), () => dispatchAlarmBody(ctx, handlers, onLegacyAlarm));
128
- host._alarmChain = chained;
129
- return chained;
130
- }
131
- async function dispatchAlarmBody(ctx, handlers, onLegacyAlarm) {
132
- try {
133
- const now = Date.now();
134
- const existing = (await ctx?.storage?.get?.(ALARM_REASONS_KEY));
135
- if (!existing || Object.keys(existing).length === 0) {
136
- onLegacyAlarm?.();
137
- return;
138
- }
139
- const map = { ...existing };
140
- // Snapshot fireable reasons BEFORE running any of them, so a
141
- // handler that schedules itself for the next cycle doesn't get
142
- // immediately re-fired in the same dispatch.
143
- const fired = [];
144
- for (const [reason, when] of Object.entries(map)) {
145
- if (when <= now)
146
- fired.push(reason);
147
- }
148
- for (const reason of fired) {
149
- delete map[reason];
150
- const handler = handlers[reason];
151
- // Unknown reasons silently dropped (forward-compat).
152
- if (!handler)
153
- continue;
154
- try {
155
- const result = await handler(now);
156
- if (result && typeof result.rearmAt === 'number') {
157
- map[reason] = result.rearmAt;
158
- }
159
- }
160
- catch (e) {
161
- console.warn(`[nimbus/W1] dispatch ${reason} threw:`, errorText(e));
162
- }
163
- }
164
- // Re-arm or clear.
165
- const setAlarmFn = ctx?.storage?.setAlarm;
166
- if (Object.keys(map).length > 0) {
167
- await ctx.storage.put(ALARM_REASONS_KEY, map);
168
- const earliest = Math.min(...Object.values(map));
169
- if (typeof setAlarmFn === 'function') {
170
- setAlarmFn.call(ctx.storage, earliest);
171
- }
172
- }
173
- else {
174
- try {
175
- await ctx.storage.delete(ALARM_REASONS_KEY);
176
- }
177
- catch { }
178
- // No remaining reasons → no setAlarm call → DO becomes
179
- // hibernation-eligible after the 10s idle window.
180
- }
181
- }
182
- catch (e) {
183
- console.warn('[nimbus/W1] dispatchAlarm threw:', errorText(e));
184
- }
185
- }
186
- /** Increment + persist the isolate-gen counter once per fresh isolate. */
187
- export async function maybeBumpIsolateGen(host, ctx) {
188
- if (host._isolateGenPersisted)
189
- return;
190
- host._isolateGenPersisted = true;
191
- try {
192
- const prev = (await ctx.storage.get(ISOLATE_GEN_KEY));
193
- // Adopt the persisted truth first, and adopt the bump only after the
194
- // put resolves. An unpersisted `next` would be re-read as `prev` by the
195
- // NEXT boot and re-issued — two instances sharing one generation is
196
- // exactly the pid-aliasing this counter exists to prevent. Running on
197
- // the previous persisted generation is the lesser lapse, and the
198
- // put-failure case is replica-only in practice (replicas never spawn).
199
- //
200
- // What holds the guarantee is the output gate, not this await: measured,
201
- // the block body resolves in 0 ms even with a confirmed put, because
202
- // `await storage.put()` returns before durability. The gate is what
203
- // keeps a pid from generation N from escaping before N is durable, which
204
- // is why marking this put `allowUnconfirmed` is not a free speedup — see
205
- // scratchpad/coldstart-s1.md.
206
- host._isolateGen = typeof prev === 'number' ? prev : 0;
207
- const next = host._isolateGen + 1;
208
- await ctx.storage.put(ISOLATE_GEN_KEY, next);
209
- host._isolateGen = next;
210
- }
211
- catch (e) {
212
- console.warn('[nimbus/W9] isolate-gen bump failed:', errorText(e));
213
- }
214
- }
@@ -1,47 +0,0 @@
1
- /**
2
- * ctx-exports.ts — leaf module holding the ctx.exports reference.
3
- *
4
- * Isolated from the embedder's entry module so helpers (notably
5
- * loader-pool.ts) can read `ctx.exports` without transitively importing the
6
- * Durable Object classes. Keeping this a leaf (no imports) lets the pool be
7
- * unit-tested in a plain Node/Bun process.
8
- *
9
- * The embedder's fetch handler calls `setCtxExports(ctx.exports)` on the
10
- * first request; callers like the loader pool read via `getCtxExports()`.
11
- * If the pool is constructed before the first fetch (unlikely) it just gets
12
- * null — the caller decides how to degrade.
13
- */
14
- /**
15
- * One entry of `ctx.exports`: a top-level entrypoint's loopback factory, which
16
- * mints a Service Binding stub for that entrypoint when called with props.
17
- *
18
- * The stub's RPC surface belongs to the entrypoint CLASS, which this leaf
19
- * cannot see — `Cloudflare.Exports` is derived from the embedder's own main
20
- * module, so for a library it evaluates to `{}`. A caller that knows the class
21
- * names the surface it expects (`factory<MySupervisorRpc>({ props })`); one
22
- * that does not gets `unknown` and has to narrow, same as
23
- * `DurableObjectNamespace<T>` and `RpcStub<T>` in @cloudflare/workers-types.
24
- */
25
- export type EntrypointLoopbackFactory = <Stub = unknown>(options: {
26
- props: object;
27
- }) => Stub;
28
- /**
29
- * `ctx.exports` itself — one factory per top-level entrypoint export, keyed by
30
- * export name. Absent names read as undefined, which is how a caller finds out
31
- * the embedder's entry module does not re-export the class it needs.
32
- */
33
- export type CtxExports = Record<string, EntrypointLoopbackFactory | undefined>;
34
- export declare function setCtxExports(value: CtxExports): void;
35
- export declare function getCtxExports(): CtxExports | null;
36
- export declare function setSupervisorEntrypointName(name: string): void;
37
- /**
38
- * Resolve the registered supervisor entrypoint on an exports object —
39
- * `exportsObj` when given (a WorkerEntrypoint reads its own ctx.exports),
40
- * the held ctx.exports otherwise. Calling the result with props mints one
41
- * supervisor binding (`env.SUPERVISOR`) for one hosted program. Null when
42
- * either half is missing; the caller decides whether that degrades or throws.
43
- */
44
- export declare function supervisorEntrypoint(exportsObj?: unknown): EntrypointLoopbackFactory | null;
45
- /** The registered name, for error messages that point at the missing export. */
46
- export declare function supervisorEntrypointName(): string | null;
47
- //# sourceMappingURL=ctx-exports.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ctx-exports.d.ts","sourceRoot":"","sources":["../src/ctx-exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,IAAI,GAAG,OAAO,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,KAAK,IAAI,CAAC;AAE7F;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,SAAS,CAAC,CAAC;AAI/E,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAGrD;AAED,wBAAgB,aAAa,IAAI,UAAU,GAAG,IAAI,CAEjD;AAUD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAG9D;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,yBAAyB,GAAG,IAAI,CAM3F;AAED,gFAAgF;AAChF,wBAAgB,wBAAwB,IAAI,MAAM,GAAG,IAAI,CAExD"}
@@ -1,54 +0,0 @@
1
- /**
2
- * ctx-exports.ts — leaf module holding the ctx.exports reference.
3
- *
4
- * Isolated from the embedder's entry module so helpers (notably
5
- * loader-pool.ts) can read `ctx.exports` without transitively importing the
6
- * Durable Object classes. Keeping this a leaf (no imports) lets the pool be
7
- * unit-tested in a plain Node/Bun process.
8
- *
9
- * The embedder's fetch handler calls `setCtxExports(ctx.exports)` on the
10
- * first request; callers like the loader pool read via `getCtxExports()`.
11
- * If the pool is constructed before the first fetch (unlikely) it just gets
12
- * null — the caller decides how to degrade.
13
- */
14
- let _ctxExports = null;
15
- export function setCtxExports(value) {
16
- if (_ctxExports)
17
- return; // first-write-wins, same as the prior inline impl
18
- _ctxExports = value;
19
- }
20
- export function getCtxExports() {
21
- return _ctxExports;
22
- }
23
- /**
24
- * The fabric mints supervisor bindings for the programs it hosts, but the
25
- * entrypoint class that answers them belongs to the embedder, so its
26
- * ctx.exports name is registered once at composition time rather than
27
- * hardcoded here. First-write-wins, same as the ctx.exports holder above.
28
- */
29
- let _supervisorEntrypointName = null;
30
- export function setSupervisorEntrypointName(name) {
31
- if (_supervisorEntrypointName)
32
- return;
33
- _supervisorEntrypointName = name;
34
- }
35
- /**
36
- * Resolve the registered supervisor entrypoint on an exports object —
37
- * `exportsObj` when given (a WorkerEntrypoint reads its own ctx.exports),
38
- * the held ctx.exports otherwise. Calling the result with props mints one
39
- * supervisor binding (`env.SUPERVISOR`) for one hosted program. Null when
40
- * either half is missing; the caller decides whether that degrades or throws.
41
- */
42
- export function supervisorEntrypoint(exportsObj) {
43
- const exports = exportsObj ?? _ctxExports;
44
- if (!_supervisorEntrypointName)
45
- return null;
46
- if ((typeof exports !== 'object' && typeof exports !== 'function') || exports === null)
47
- return null;
48
- const factory = exports[_supervisorEntrypointName];
49
- return typeof factory === 'function' ? factory : null;
50
- }
51
- /** The registered name, for error messages that point at the missing export. */
52
- export function supervisorEntrypointName() {
53
- return _supervisorEntrypointName;
54
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"facet-image-store.d.ts","sourceRoot":"","sources":["../src/facet-image-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;;;;;;GASG;AACH,eAAO,MAAM,6BAA6B,QAA0D,CAAC;AAErG;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,iEAAiE;IACjE,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,wEAAwE;IACxE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACpC,wEAAwE;IACxE,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACjD,kDAAkD;IAClD,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IAClE,2EAA2E;IAC3E,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,qDAAqD;IACrD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,qBAAa,eAAe;IAaxB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAbzB,8EA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a,cAAe,YAAW,mBAAmB;IAa5C,OAAO,CAAC,QAAQ,CAAC,IAAI;IAZjC;;;;;;;;;OASG;IACH,OAAO,CAAC,OAAO,CAAgE;gBAElD,IAAI,EAAE,kBAAkB;IAErD;;;;;;;;;OASG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAWlD;;;;;;;OAOG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAS3B,0DAA0D;IAC1D,IAAI,UAAU,IAAI,OAAO,CAExB;CACF;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAMxD"}
@@ -1,57 +0,0 @@
1
- /**
2
- * loader-ledger.ts — per-DO accounting for the Worker Loader's two caps.
3
- *
4
- * Measured on production workerd: a Durable Object admits ~5–6 concurrent
5
- * dynamic workers before the platform refuses with "Too many concurrent
6
- * dynamic workers", one DO method can drive at most 4 concurrent Loader
7
- * fetches, and loader-cache entries are never released — every DISTINCT
8
- * `loader.get(id)` permanently consumes one of the dynamic-worker slots for
9
- * the object's lifetime. Nimbus stays under the caps by construction
10
- * (`IN_DO_THRESHOLD` = 5 in the fanout pool), which until now meant the slots
11
- * were counted in prose. This ledger counts them at the fabric's loader call
12
- * sites instead — the loader pool's slots, a resident process's keyed worker,
13
- * a one-shot's load — so proximity is measurable and a cap failure can name
14
- * the ids actually holding slots.
15
- *
16
- * Measurement only: no admission control. The caps are the platform's, they
17
- * are approximate ("~5–6"), and a gate on an approximate number would refuse
18
- * work the platform would have run.
19
- *
20
- * Keyed weakly off the hosting actor's `ctx`, like the facet slot books: the
21
- * caps are per Durable Object, and dynamic workers die with the isolate that
22
- * loaded them, so a ledger that goes away with its host describes nothing
23
- * that still exists.
24
- */
25
- /** Record a keyed `loader.get(id)` — a permanent slot if the id is new. */
26
- export declare function recordLoaderId(ctx: object, id: string): void;
27
- /**
28
- * Count one call into a dynamic worker as a live Loader fetch; the returned
29
- * function ends it (idempotently), from the caller's own `finally`.
30
- *
31
- * A begin/end pair rather than a wrapper on purpose, and the shape is
32
- * load-bearing: wrapping the stub call in a ledger-owned async frame
33
- * (`trackLoaderFetch(ctx, () => entrypoint.execute(...))`) left the hosting
34
- * Durable Object poisoned after every pooled dispatch — the next fabric
35
- * activity hung the object or reset the instance outright (pid base jumped,
36
- * every attached WebSocket dropped with no close frame), measured 7/7 on
37
- * staging and gone 3/3 with the direct call restored. Same seam-quirk class
38
- * as pipelined `fetch.call`, which workerd refuses for dynamically-loaded
39
- * workers: an RPC stub call must stay a direct property call awaited by the
40
- * frame that made it, so the ledger only brackets it.
41
- */
42
- export declare function beginLoaderFetch(ctx: object): () => void;
43
- /** Snapshot for the diag surface. Pure read; no I/O. */
44
- export declare function loaderLedgerStats(ctx: object): {
45
- idsEverGotten: string[];
46
- liveFetches: number;
47
- peakLiveFetches: number;
48
- };
49
- /**
50
- * Name the per-DO accounting on a "Too many concurrent dynamic workers"
51
- * failure; hand every other error back untouched. The platform's message
52
- * says only that the cap was hit — which ids hold the slots, and that a
53
- * keyed id can never give one back, is what the operator needs to know to
54
- * shrink anything.
55
- */
56
- export declare function withDynamicWorkerCapNamed<E>(ctx: object, error: E): E | Error;
57
- //# sourceMappingURL=loader-ledger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loader-ledger.d.ts","sourceRoot":"","sources":["../src/loader-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAwBH,2EAA2E;AAC3E,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAE5D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,IAAI,CAUxD;AAED,wDAAwD;AACxD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG;IAC9C,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;CACzB,CAOA;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAW7E"}
@@ -1,91 +0,0 @@
1
- /**
2
- * loader-ledger.ts — per-DO accounting for the Worker Loader's two caps.
3
- *
4
- * Measured on production workerd: a Durable Object admits ~5–6 concurrent
5
- * dynamic workers before the platform refuses with "Too many concurrent
6
- * dynamic workers", one DO method can drive at most 4 concurrent Loader
7
- * fetches, and loader-cache entries are never released — every DISTINCT
8
- * `loader.get(id)` permanently consumes one of the dynamic-worker slots for
9
- * the object's lifetime. Nimbus stays under the caps by construction
10
- * (`IN_DO_THRESHOLD` = 5 in the fanout pool), which until now meant the slots
11
- * were counted in prose. This ledger counts them at the fabric's loader call
12
- * sites instead — the loader pool's slots, a resident process's keyed worker,
13
- * a one-shot's load — so proximity is measurable and a cap failure can name
14
- * the ids actually holding slots.
15
- *
16
- * Measurement only: no admission control. The caps are the platform's, they
17
- * are approximate ("~5–6"), and a gate on an approximate number would refuse
18
- * work the platform would have run.
19
- *
20
- * Keyed weakly off the hosting actor's `ctx`, like the facet slot books: the
21
- * caps are per Durable Object, and dynamic workers die with the isolate that
22
- * loaded them, so a ledger that goes away with its host describes nothing
23
- * that still exists.
24
- */
25
- import { classifyError } from '@nimbus-sh/core/observability/oom-classify.js';
26
- const ledgers = new WeakMap();
27
- function ledger(ctx) {
28
- let entry = ledgers.get(ctx);
29
- if (!entry) {
30
- entry = { ids: new Set(), liveFetches: 0, peakLiveFetches: 0 };
31
- ledgers.set(ctx, entry);
32
- }
33
- return entry;
34
- }
35
- /** Record a keyed `loader.get(id)` — a permanent slot if the id is new. */
36
- export function recordLoaderId(ctx, id) {
37
- ledger(ctx).ids.add(id);
38
- }
39
- /**
40
- * Count one call into a dynamic worker as a live Loader fetch; the returned
41
- * function ends it (idempotently), from the caller's own `finally`.
42
- *
43
- * A begin/end pair rather than a wrapper on purpose, and the shape is
44
- * load-bearing: wrapping the stub call in a ledger-owned async frame
45
- * (`trackLoaderFetch(ctx, () => entrypoint.execute(...))`) left the hosting
46
- * Durable Object poisoned after every pooled dispatch — the next fabric
47
- * activity hung the object or reset the instance outright (pid base jumped,
48
- * every attached WebSocket dropped with no close frame), measured 7/7 on
49
- * staging and gone 3/3 with the direct call restored. Same seam-quirk class
50
- * as pipelined `fetch.call`, which workerd refuses for dynamically-loaded
51
- * workers: an RPC stub call must stay a direct property call awaited by the
52
- * frame that made it, so the ledger only brackets it.
53
- */
54
- export function beginLoaderFetch(ctx) {
55
- const entry = ledger(ctx);
56
- entry.liveFetches++;
57
- entry.peakLiveFetches = Math.max(entry.peakLiveFetches, entry.liveFetches);
58
- let ended = false;
59
- return () => {
60
- if (ended)
61
- return;
62
- ended = true;
63
- entry.liveFetches--;
64
- };
65
- }
66
- /** Snapshot for the diag surface. Pure read; no I/O. */
67
- export function loaderLedgerStats(ctx) {
68
- const entry = ledger(ctx);
69
- return {
70
- idsEverGotten: [...entry.ids],
71
- liveFetches: entry.liveFetches,
72
- peakLiveFetches: entry.peakLiveFetches,
73
- };
74
- }
75
- /**
76
- * Name the per-DO accounting on a "Too many concurrent dynamic workers"
77
- * failure; hand every other error back untouched. The platform's message
78
- * says only that the cap was hit — which ids hold the slots, and that a
79
- * keyed id can never give one back, is what the operator needs to know to
80
- * shrink anything.
81
- */
82
- export function withDynamicWorkerCapNamed(ctx, error) {
83
- if (classifyError(error) !== 'dynamic_worker_cap')
84
- return error;
85
- const entry = ledger(ctx);
86
- const platform = error instanceof Error ? error.message : String(error);
87
- return new Error(`${platform} — this Durable Object has ${entry.ids.size} loader id(s) permanently `
88
- + `holding dynamic-worker slots (a loader.get id is never released): `
89
- + `${[...entry.ids].join(', ') || '(none recorded)'}; live Loader fetches ${entry.liveFetches}, `
90
- + `peak ${entry.peakLiveFetches}`, { cause: error });
91
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"loader-pool.d.ts","sourceRoot":"","sources":["../src/loader-pool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAgBH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAErE;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,EAAE,CAAC,IAAI;IAC9B,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,aAAa,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACnD,CAAC,MAAM,CAAC,CAAC;AAEV,wEAAwE;AACxE,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,kDAAkD;AAClD,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAClC;;;;;;;;;;;;;;;;OAgBG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;;;;;;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