@adonis-agora/durable 0.10.0 → 0.11.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 (163) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/assets/dashboard.html +116 -3
  3. package/dist/commands/durable_worker.d.ts +25 -0
  4. package/dist/commands/durable_worker.d.ts.map +1 -0
  5. package/dist/commands/durable_worker.js +113 -0
  6. package/dist/commands/durable_worker.js.map +1 -0
  7. package/dist/commands/main.d.ts +6 -5
  8. package/dist/commands/main.d.ts.map +1 -1
  9. package/dist/commands/main.js +11 -4
  10. package/dist/commands/main.js.map +1 -1
  11. package/dist/providers/dashboard_provider.d.ts +37 -0
  12. package/dist/providers/dashboard_provider.d.ts.map +1 -1
  13. package/dist/providers/dashboard_provider.js +98 -9
  14. package/dist/providers/dashboard_provider.js.map +1 -1
  15. package/dist/providers/durable_provider.d.ts +24 -16
  16. package/dist/providers/durable_provider.d.ts.map +1 -1
  17. package/dist/providers/durable_provider.js +195 -20
  18. package/dist/providers/durable_provider.js.map +1 -1
  19. package/dist/src/config_types.d.ts +92 -0
  20. package/dist/src/config_types.d.ts.map +1 -0
  21. package/dist/src/config_types.js +2 -0
  22. package/dist/src/config_types.js.map +1 -0
  23. package/dist/src/dashboard/compat-view.d.ts +13 -0
  24. package/dist/src/dashboard/compat-view.d.ts.map +1 -0
  25. package/dist/src/dashboard/compat-view.js +32 -0
  26. package/dist/src/dashboard/compat-view.js.map +1 -0
  27. package/dist/src/dashboard/compat.d.ts +76 -0
  28. package/dist/src/dashboard/compat.d.ts.map +1 -0
  29. package/dist/src/dashboard/compat.js +130 -0
  30. package/dist/src/dashboard/compat.js.map +1 -0
  31. package/dist/src/dashboard/diagnostics-recorder.d.ts +59 -0
  32. package/dist/src/dashboard/diagnostics-recorder.d.ts.map +1 -0
  33. package/dist/src/dashboard/diagnostics-recorder.js +75 -0
  34. package/dist/src/dashboard/diagnostics-recorder.js.map +1 -0
  35. package/dist/src/dashboard/gateway-adapter.d.ts +37 -0
  36. package/dist/src/dashboard/gateway-adapter.d.ts.map +1 -0
  37. package/dist/src/dashboard/gateway-adapter.js +49 -0
  38. package/dist/src/dashboard/gateway-adapter.js.map +1 -0
  39. package/dist/src/dashboard/handlers.d.ts +31 -8
  40. package/dist/src/dashboard/handlers.d.ts.map +1 -1
  41. package/dist/src/dashboard/handlers.js +2 -1
  42. package/dist/src/dashboard/handlers.js.map +1 -1
  43. package/dist/src/dashboard/index.d.ts +10 -3
  44. package/dist/src/dashboard/index.d.ts.map +1 -1
  45. package/dist/src/dashboard/index.js +8 -2
  46. package/dist/src/dashboard/index.js.map +1 -1
  47. package/dist/src/define_config.d.ts +31 -5
  48. package/dist/src/define_config.d.ts.map +1 -1
  49. package/dist/src/define_config.js +4 -3
  50. package/dist/src/define_config.js.map +1 -1
  51. package/dist/src/dispatch-routing.d.ts +105 -0
  52. package/dist/src/dispatch-routing.d.ts.map +1 -0
  53. package/dist/src/dispatch-routing.js +114 -0
  54. package/dist/src/dispatch-routing.js.map +1 -0
  55. package/dist/src/engine.d.ts +65 -2
  56. package/dist/src/engine.d.ts.map +1 -1
  57. package/dist/src/engine.js +131 -3
  58. package/dist/src/engine.js.map +1 -1
  59. package/dist/src/handshake/descriptor.d.ts +128 -0
  60. package/dist/src/handshake/descriptor.d.ts.map +1 -0
  61. package/dist/src/handshake/descriptor.js +133 -0
  62. package/dist/src/handshake/descriptor.js.map +1 -0
  63. package/dist/src/handshake/negotiate.d.ts +83 -0
  64. package/dist/src/handshake/negotiate.d.ts.map +1 -0
  65. package/dist/src/handshake/negotiate.js +108 -0
  66. package/dist/src/handshake/negotiate.js.map +1 -0
  67. package/dist/src/handshake/routing.d.ts +51 -0
  68. package/dist/src/handshake/routing.d.ts.map +1 -0
  69. package/dist/src/handshake/routing.js +57 -0
  70. package/dist/src/handshake/routing.js.map +1 -0
  71. package/dist/src/index.d.ts +14 -2
  72. package/dist/src/index.d.ts.map +1 -1
  73. package/dist/src/index.js +12 -1
  74. package/dist/src/index.js.map +1 -1
  75. package/dist/src/interfaces.d.ts +168 -2
  76. package/dist/src/interfaces.d.ts.map +1 -1
  77. package/dist/src/remote-workflow-executor.d.ts +25 -1
  78. package/dist/src/remote-workflow-executor.d.ts.map +1 -1
  79. package/dist/src/remote-workflow-executor.js +41 -0
  80. package/dist/src/remote-workflow-executor.js.map +1 -1
  81. package/dist/src/role_bindings.d.ts +85 -0
  82. package/dist/src/role_bindings.d.ts.map +1 -0
  83. package/dist/src/role_bindings.js +73 -0
  84. package/dist/src/role_bindings.js.map +1 -0
  85. package/dist/src/run-gateway/interface.d.ts +89 -0
  86. package/dist/src/run-gateway/interface.d.ts.map +1 -0
  87. package/dist/src/run-gateway/interface.js +2 -0
  88. package/dist/src/run-gateway/interface.js.map +1 -0
  89. package/dist/src/run-gateway/proxy-run-gateway.d.ts +84 -0
  90. package/dist/src/run-gateway/proxy-run-gateway.d.ts.map +1 -0
  91. package/dist/src/run-gateway/proxy-run-gateway.js +142 -0
  92. package/dist/src/run-gateway/proxy-run-gateway.js.map +1 -0
  93. package/dist/src/run-gateway/run-request-responder.d.ts +67 -0
  94. package/dist/src/run-gateway/run-request-responder.d.ts.map +1 -0
  95. package/dist/src/run-gateway/run-request-responder.js +228 -0
  96. package/dist/src/run-gateway/run-request-responder.js.map +1 -0
  97. package/dist/src/run-gateway/store-run-gateway.d.ts +90 -0
  98. package/dist/src/run-gateway/store-run-gateway.d.ts.map +1 -0
  99. package/dist/src/run-gateway/store-run-gateway.js +80 -0
  100. package/dist/src/run-gateway/store-run-gateway.js.map +1 -0
  101. package/dist/src/run-gateway/tenant-auth.d.ts +19 -0
  102. package/dist/src/run-gateway/tenant-auth.d.ts.map +1 -0
  103. package/dist/src/run-gateway/tenant-auth.js +71 -0
  104. package/dist/src/run-gateway/tenant-auth.js.map +1 -0
  105. package/dist/src/services/main.d.ts +16 -3
  106. package/dist/src/services/main.d.ts.map +1 -1
  107. package/dist/src/services/main.js +23 -4
  108. package/dist/src/services/main.js.map +1 -1
  109. package/dist/src/step-name-symbol.d.ts +3 -0
  110. package/dist/src/step-name-symbol.d.ts.map +1 -1
  111. package/dist/src/step-name-symbol.js.map +1 -1
  112. package/dist/src/step-ref.d.ts +4 -0
  113. package/dist/src/step-ref.d.ts.map +1 -1
  114. package/dist/src/step-ref.js +2 -0
  115. package/dist/src/step-ref.js.map +1 -1
  116. package/dist/src/transports/bullmq/bullmq-transport.d.ts +130 -0
  117. package/dist/src/transports/bullmq/bullmq-transport.d.ts.map +1 -0
  118. package/dist/src/transports/bullmq/bullmq-transport.js +562 -0
  119. package/dist/src/transports/bullmq/bullmq-transport.js.map +1 -0
  120. package/dist/src/transports/bullmq/deps.d.ts +59 -0
  121. package/dist/src/transports/bullmq/deps.d.ts.map +1 -0
  122. package/dist/src/transports/bullmq/deps.js +41 -0
  123. package/dist/src/transports/bullmq/deps.js.map +1 -0
  124. package/dist/src/transports/bullmq/index.d.ts +5 -0
  125. package/dist/src/transports/bullmq/index.d.ts.map +1 -0
  126. package/dist/src/transports/bullmq/index.js +5 -0
  127. package/dist/src/transports/bullmq/index.js.map +1 -0
  128. package/dist/src/transports/bullmq/naming.d.ts +71 -0
  129. package/dist/src/transports/bullmq/naming.d.ts.map +1 -0
  130. package/dist/src/transports/bullmq/naming.js +101 -0
  131. package/dist/src/transports/bullmq/naming.js.map +1 -0
  132. package/dist/src/transports/bullmq/serialization.d.ts +56 -0
  133. package/dist/src/transports/bullmq/serialization.d.ts.map +1 -0
  134. package/dist/src/transports/bullmq/serialization.js +101 -0
  135. package/dist/src/transports/bullmq/serialization.js.map +1 -0
  136. package/dist/src/transports/factory.d.ts +31 -0
  137. package/dist/src/transports/factory.d.ts.map +1 -1
  138. package/dist/src/transports/factory.js +21 -0
  139. package/dist/src/transports/factory.js.map +1 -1
  140. package/dist/src/worker-runtime/index.d.ts +22 -0
  141. package/dist/src/worker-runtime/index.d.ts.map +1 -0
  142. package/dist/src/worker-runtime/index.js +27 -0
  143. package/dist/src/worker-runtime/index.js.map +1 -0
  144. package/dist/src/worker-runtime/naming.d.ts +24 -0
  145. package/dist/src/worker-runtime/naming.d.ts.map +1 -0
  146. package/dist/src/worker-runtime/naming.js +28 -0
  147. package/dist/src/worker-runtime/naming.js.map +1 -0
  148. package/dist/src/worker-runtime/registry.d.ts +81 -0
  149. package/dist/src/worker-runtime/registry.d.ts.map +1 -0
  150. package/dist/src/worker-runtime/registry.js +44 -0
  151. package/dist/src/worker-runtime/registry.js.map +1 -0
  152. package/dist/src/worker-runtime/worker-runtime.d.ts +155 -0
  153. package/dist/src/worker-runtime/worker-runtime.d.ts.map +1 -0
  154. package/dist/src/worker-runtime/worker-runtime.js +265 -0
  155. package/dist/src/worker-runtime/worker-runtime.js.map +1 -0
  156. package/dist/src/workflow-ctx.d.ts.map +1 -1
  157. package/dist/src/workflow-ctx.js +3 -0
  158. package/dist/src/workflow-ctx.js.map +1 -1
  159. package/dist/src/workflow-turn.d.ts +167 -0
  160. package/dist/src/workflow-turn.d.ts.map +1 -0
  161. package/dist/src/workflow-turn.js +372 -0
  162. package/dist/src/workflow-turn.js.map +1 -0
  163. package/package.json +7 -1
@@ -0,0 +1,76 @@
1
+ import type { WorkerDescriptor } from '../handshake/descriptor.js';
2
+ import type { WorkflowRun } from '../interfaces.js';
3
+ import type { RecordedBlock } from './diagnostics-recorder.js';
4
+ import { type ApiResponse } from './handlers.js';
5
+ /**
6
+ * The data source the {@link compat} health/compat handler reads (design §10). Deliberately a thin,
7
+ * framework-light port so the handler is unit-testable with fakes:
8
+ *
9
+ * - `controlPlaneDescriptor()` — the control plane's own handshake descriptor, negotiated against each
10
+ * worker; `undefined` when nothing has advertised yet (the handler falls back to a current-protocol CP);
11
+ * - `fleet()` — worker descriptors grouped by routing token: the LIVE green fleet enumerated off the
12
+ * transport ({@link enumerateLiveFleet}, so every advertising pod shows — compatible or not, blocked or
13
+ * not), merged with the descriptors {@link BlockedDiagnosticsRecorder} reconstructed from past blocks;
14
+ * - `blockedRuns()` — the runs parked `blocked` (their human reason on `run.error.message`);
15
+ * - `diagnosticsFor(runId)` — the captured loud delta for a blocked run, when one was recorded.
16
+ *
17
+ * The SAME handler serves a store-less `tenant` pod: there `fleet()` is empty and `diagnosticsFor` returns
18
+ * nothing, so the panel still lists blocked runs (reason-only) round-tripped over the wire.
19
+ */
20
+ export interface CompatSource {
21
+ controlPlaneDescriptor(): WorkerDescriptor | undefined;
22
+ fleet(): Array<{
23
+ token: string;
24
+ workers: WorkerDescriptor[];
25
+ }>;
26
+ blockedRuns(): Promise<WorkflowRun[]>;
27
+ diagnosticsFor(runId: string): RecordedBlock | undefined;
28
+ }
29
+ /** One routing token's live workers — the unit the compat panel negotiates per group. */
30
+ export type FleetGroup = {
31
+ token: string;
32
+ workers: WorkerDescriptor[];
33
+ };
34
+ /**
35
+ * The OPTIONAL transport capability the dashboard uses to enumerate the LIVE green fleet (design §7.2/§10) —
36
+ * every worker currently advertising a descriptor, whether or not it has ever triggered a blocked dispatch.
37
+ * Both methods are optional on the full `Transport` (only broker transports — e.g. bullmq — carry them), so
38
+ * a transport that offers neither degrades the panel to the diagnostics-only view. Mirrors the engine's own
39
+ * `listWorkerGroups`/`listWorkerDescriptors` narrowing.
40
+ */
41
+ export interface FleetTransport {
42
+ listWorkerGroups?(): Promise<string[]>;
43
+ listWorkerDescriptors?(token: string): Promise<WorkerDescriptor[]>;
44
+ }
45
+ /**
46
+ * Enumerate the LIVE fleet across ALL routing tokens: SCAN the heartbeat keyspace for distinct tokens
47
+ * (`listWorkerGroups`), then read each token's advertised descriptors (`listWorkerDescriptors`). This is
48
+ * what surfaces an incompatible worker that has NEVER blocked a dispatch — the diagnostics recorder only
49
+ * knows workers a past block captured, but a green-fleet enumeration sees every live pod (compatible +
50
+ * incompatible), so the panel can negotiate and red-flag it proactively.
51
+ *
52
+ * Degrades to `[]` (never throws): a transport without the capability, an empty keyspace, or a scan error
53
+ * all read as "no live fleet", leaving the panel on its diagnostics-only view. A token whose workers are
54
+ * all legacy (no descriptor published) contributes nothing — legacy is assume-compatible (design §7.7).
55
+ */
56
+ export declare function enumerateLiveFleet(transport: FleetTransport | null | undefined): Promise<FleetGroup[]>;
57
+ /**
58
+ * Union several fleet snapshots into one, keyed `token` → `instanceId`. Later sources WIN per instance, so
59
+ * pass the freshest last (the provider passes the captured diagnostics fleet first, the live enumeration
60
+ * last — a live descriptor supersedes a stale captured one, and a live-only worker with no prior block is
61
+ * added). The result is what {@link CompatSource.fleet} returns for negotiation.
62
+ */
63
+ export declare function mergeFleets(...sources: FleetGroup[][]): FleetGroup[];
64
+ /**
65
+ * `GET /compat` — the fleet health / protocol-compatibility panel (design §7.6, §10).
66
+ *
67
+ * Two sections, both LOUD and structured (never a bare boolean):
68
+ * 1. **Per queue/group/pod compatibility** — every live worker descriptor negotiated against the control
69
+ * plane: its protocol version + the negotiated level, plus a red flag + the exact reason when
70
+ * incompatible ("no common protocol major: local speaks [1, 1], remote speaks [2, 2]").
71
+ * 2. **Blocked runs** — runs parked because no worker can run them, each with its human reason and, when
72
+ * captured, the `capability.unavailable` / `protocol.incompatible` diagnostics delta (missing
73
+ * capabilities, the protocol ranges that failed to overlap).
74
+ */
75
+ export declare function compat(src: CompatSource): Promise<ApiResponse>;
76
+ //# sourceMappingURL=compat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.d.ts","sourceRoot":"","sources":["../../../src/dashboard/compat.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,KAAK,WAAW,EAAM,MAAM,eAAe,CAAC;AAErD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,YAAY;IAC3B,sBAAsB,IAAI,gBAAgB,GAAG,SAAS,CAAC;IACvD,KAAK,IAAI,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,gBAAgB,EAAE,CAAA;KAAE,CAAC,CAAC;IAC/D,WAAW,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACtC,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;CAC1D;AAED,yFAAyF;AACzF,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,gBAAgB,EAAE,CAAA;CAAE,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,gBAAgB,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACvC,qBAAqB,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;CACpE;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GAC3C,OAAO,CAAC,UAAU,EAAE,CAAC,CAmBvB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,GAAG,UAAU,EAAE,CAapE;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,MAAM,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAsEpE"}
@@ -0,0 +1,130 @@
1
+ import { controlPlaneDescriptor } from '../dispatch-routing.js';
2
+ import { negotiate } from '../handshake/negotiate.js';
3
+ import { ok } from './handlers.js';
4
+ /**
5
+ * Enumerate the LIVE fleet across ALL routing tokens: SCAN the heartbeat keyspace for distinct tokens
6
+ * (`listWorkerGroups`), then read each token's advertised descriptors (`listWorkerDescriptors`). This is
7
+ * what surfaces an incompatible worker that has NEVER blocked a dispatch — the diagnostics recorder only
8
+ * knows workers a past block captured, but a green-fleet enumeration sees every live pod (compatible +
9
+ * incompatible), so the panel can negotiate and red-flag it proactively.
10
+ *
11
+ * Degrades to `[]` (never throws): a transport without the capability, an empty keyspace, or a scan error
12
+ * all read as "no live fleet", leaving the panel on its diagnostics-only view. A token whose workers are
13
+ * all legacy (no descriptor published) contributes nothing — legacy is assume-compatible (design §7.7).
14
+ */
15
+ export async function enumerateLiveFleet(transport) {
16
+ if (!transport ||
17
+ typeof transport.listWorkerGroups !== 'function' ||
18
+ typeof transport.listWorkerDescriptors !== 'function') {
19
+ return [];
20
+ }
21
+ const groups = [];
22
+ try {
23
+ for (const token of await transport.listWorkerGroups()) {
24
+ const workers = await transport.listWorkerDescriptors(token);
25
+ if (workers.length > 0)
26
+ groups.push({ token, workers });
27
+ }
28
+ }
29
+ catch {
30
+ // A backend that can't SCAN/GET the descriptor keyspace degrades to whatever was read so far — the
31
+ // panel still renders (diagnostics + any partial live view) rather than 500-ing.
32
+ }
33
+ return groups;
34
+ }
35
+ /**
36
+ * Union several fleet snapshots into one, keyed `token` → `instanceId`. Later sources WIN per instance, so
37
+ * pass the freshest last (the provider passes the captured diagnostics fleet first, the live enumeration
38
+ * last — a live descriptor supersedes a stale captured one, and a live-only worker with no prior block is
39
+ * added). The result is what {@link CompatSource.fleet} returns for negotiation.
40
+ */
41
+ export function mergeFleets(...sources) {
42
+ const byToken = new Map();
43
+ for (const source of sources) {
44
+ for (const { token, workers } of source) {
45
+ const perInstance = byToken.get(token) ?? new Map();
46
+ for (const worker of workers)
47
+ perInstance.set(worker.instanceId, worker);
48
+ byToken.set(token, perInstance);
49
+ }
50
+ }
51
+ return [...byToken].map(([token, perInstance]) => ({
52
+ token,
53
+ workers: [...perInstance.values()],
54
+ }));
55
+ }
56
+ /**
57
+ * `GET /compat` — the fleet health / protocol-compatibility panel (design §7.6, §10).
58
+ *
59
+ * Two sections, both LOUD and structured (never a bare boolean):
60
+ * 1. **Per queue/group/pod compatibility** — every live worker descriptor negotiated against the control
61
+ * plane: its protocol version + the negotiated level, plus a red flag + the exact reason when
62
+ * incompatible ("no common protocol major: local speaks [1, 1], remote speaks [2, 2]").
63
+ * 2. **Blocked runs** — runs parked because no worker can run them, each with its human reason and, when
64
+ * captured, the `capability.unavailable` / `protocol.incompatible` diagnostics delta (missing
65
+ * capabilities, the protocol ranges that failed to overlap).
66
+ */
67
+ export async function compat(src) {
68
+ // Fall back to a current-protocol CP descriptor so pods can still be negotiated before the CP has
69
+ // advertised (or on a topology that never publishes one).
70
+ const cp = src.controlPlaneDescriptor() ?? controlPlaneDescriptor({ instanceId: 'control-plane' });
71
+ const groups = src.fleet().map(({ token, workers }) => {
72
+ const pods = workers.map((worker) => {
73
+ const result = negotiate(cp, worker);
74
+ return {
75
+ instanceId: worker.instanceId,
76
+ runtime: worker.runtime,
77
+ sdk: worker.sdk,
78
+ protocol: worker.protocol.version,
79
+ protocolRange: worker.protocol.range,
80
+ capabilities: worker.capabilities,
81
+ outcome: result.outcome,
82
+ negotiatedProtocol: result.negotiatedProtocol,
83
+ incompatible: result.outcome === 'incompatible',
84
+ // The red-flag reason: precise, structured copy for the panel (design §7.6). Absent when compatible.
85
+ reason: result.reason?.message,
86
+ missingOnRemote: result.capabilities.missingOnRemote,
87
+ missingOnLocal: result.capabilities.missingOnLocal,
88
+ };
89
+ });
90
+ return {
91
+ token,
92
+ pods,
93
+ incompatible: pods.some((pod) => pod.incompatible),
94
+ degraded: pods.some((pod) => pod.outcome === 'degraded'),
95
+ };
96
+ });
97
+ const blocked = (await src.blockedRuns()).map((run) => {
98
+ const recorded = src.diagnosticsFor(run.id);
99
+ return {
100
+ id: run.id,
101
+ workflow: run.workflow,
102
+ namespace: run.namespace,
103
+ status: run.status,
104
+ // Human reason: the persisted run error (always set when parked), or the captured delta's copy.
105
+ reason: run.error?.message ?? recorded?.reason ?? 'blocked',
106
+ code: recorded?.code,
107
+ requires: recorded?.diagnostics.requires ?? [],
108
+ // The structured delta (design §7.6), when a diagnostics event was captured for this run.
109
+ token: recorded?.diagnostics.token,
110
+ missingCapabilities: recorded?.diagnostics.missingCapabilities,
111
+ controlPlaneRange: recorded?.diagnostics.controlPlaneRange,
112
+ workerRanges: recorded?.diagnostics.workerRanges,
113
+ updatedAt: run.updatedAt.toISOString(),
114
+ };
115
+ });
116
+ const incompatibleCount = groups.reduce((n, group) => n + group.pods.filter((pod) => pod.incompatible).length, 0);
117
+ return ok({
118
+ controlPlane: {
119
+ instanceId: cp.instanceId,
120
+ protocol: cp.protocol.version,
121
+ protocolRange: cp.protocol.range,
122
+ capabilities: cp.capabilities,
123
+ },
124
+ groups,
125
+ blocked,
126
+ incompatibleCount,
127
+ blockedCount: blocked.length,
128
+ });
129
+ }
130
+ //# sourceMappingURL=compat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../src/dashboard/compat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAAoB,EAAE,EAAE,MAAM,eAAe,CAAC;AAuCrD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,SAA4C;IAE5C,IACE,CAAC,SAAS;QACV,OAAO,SAAS,CAAC,gBAAgB,KAAK,UAAU;QAChD,OAAO,SAAS,CAAC,qBAAqB,KAAK,UAAU,EACrD,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,MAAM,GAAiB,EAAE,CAAC;IAChC,IAAI,CAAC;QACH,KAAK,MAAM,KAAK,IAAI,MAAM,SAAS,CAAC,gBAAgB,EAAE,EAAE,CAAC;YACvD,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;YAC7D,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;gBAAE,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,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../handshake/descriptor.js';
3
+ import type { EngineEvent } from '../interfaces.js';
4
+ /** The minimal engine surface the recorder subscribes to — a broad lifecycle-event stream. Both the
5
+ * concrete `WorkflowEngine` and any `DurableEventSource` satisfy it. */
6
+ export interface EngineEventSource {
7
+ subscribe(listener: (event: EngineEvent) => void): () => void;
8
+ }
9
+ /**
10
+ * A single captured LOUD diagnostics event (design §7.6) — the human reason plus the full structured
11
+ * delta + descriptors the engine attached when it parked a run `blocked`. Enough for the dashboard
12
+ * health panel to render exactly WHY nobody could run the work, never a bare boolean.
13
+ */
14
+ export interface RecordedBlock {
15
+ /** Which failure fired — a missing capability vs. an unbridgeable protocol gap. */
16
+ code: 'capability.unavailable' | 'protocol.incompatible';
17
+ /** Human one-liner (the run's `error.message`, e.g. `blocked: no compatible worker (requires saga)`). */
18
+ reason: string;
19
+ /** The precise routing delta + both descriptors (`DispatchDiagnostics`). */
20
+ diagnostics: DispatchDiagnostics;
21
+ /** When the block fired (ISO). */
22
+ at: string;
23
+ }
24
+ /**
25
+ * Captures the engine's `capability.unavailable` / `protocol.incompatible` diagnostics events (design
26
+ * §7.6) into a bounded in-memory index the dashboard health panel reads (design §10, "fed by
27
+ * descriptors + diagnostics events"). Since the loud events carry BOTH descriptors + the precise delta,
28
+ * one subscription feeds the whole panel:
29
+ *
30
+ * - `diagnosticsFor(runId)` joins a `blocked` run to its captured delta (code, missing caps, ranges);
31
+ * - `fleet()` reconstructs the live-fleet compat view — the worker descriptors last seen per routing
32
+ * token — so each pod can be re-negotiated against the control plane;
33
+ * - `controlPlaneDescriptor()` is the CP side the events were negotiated against.
34
+ *
35
+ * Bounded by an LRU-ish cap on the per-run map (oldest evicted) so a long-lived control plane never
36
+ * grows this without bound. Store-role only: a `tenant` pod owns no engine to subscribe to, so its
37
+ * panel shows `blocked` runs (reason from `run.error.message`) without the enriched delta.
38
+ */
39
+ export declare class BlockedDiagnosticsRecorder {
40
+ #private;
41
+ constructor(opts?: {
42
+ max?: number;
43
+ });
44
+ /** Record one engine event; a no-op for anything but the two diagnostics types (or one missing its
45
+ * `diagnostics` payload). Idempotent per `runId` — a re-block overwrites with the freshest delta. */
46
+ record(event: EngineEvent): void;
47
+ /** Subscribe to `source`'s lifecycle events; returns the unsubscribe fn (call it on shutdown). */
48
+ attach(source: EngineEventSource): () => void;
49
+ /** The captured delta for a `blocked` run, or `undefined` when none was recorded. */
50
+ diagnosticsFor(runId: string): RecordedBlock | undefined;
51
+ /** The control-plane descriptor the recorded events negotiated against, if any has been seen. */
52
+ controlPlaneDescriptor(): WorkerDescriptor | undefined;
53
+ /** The live-fleet compat view: worker descriptors last seen per routing token. */
54
+ fleet(): Array<{
55
+ token: string;
56
+ workers: WorkerDescriptor[];
57
+ }>;
58
+ }
59
+ //# sourceMappingURL=diagnostics-recorder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics-recorder.d.ts","sourceRoot":"","sources":["../../../src/dashboard/diagnostics-recorder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;yEACyE;AACzE,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;CAC/D;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,mFAAmF;IACnF,IAAI,EAAE,wBAAwB,GAAG,uBAAuB,CAAC;IACzD,yGAAyG;IACzG,MAAM,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,WAAW,EAAE,mBAAmB,CAAC;IACjC,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,0BAA0B;;gBAOzB,IAAI,GAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAO;IAIvC;0GACsG;IACtG,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IA4BhC,kGAAkG;IAClG,MAAM,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,IAAI;IAI7C,qFAAqF;IACrF,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAIxD,iGAAiG;IACjG,sBAAsB,IAAI,gBAAgB,GAAG,SAAS;IAItD,kFAAkF;IAClF,KAAK,IAAI,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,gBAAgB,EAAE,CAAA;KAAE,CAAC;CAM/D"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Captures the engine's `capability.unavailable` / `protocol.incompatible` diagnostics events (design
3
+ * §7.6) into a bounded in-memory index the dashboard health panel reads (design §10, "fed by
4
+ * descriptors + diagnostics events"). Since the loud events carry BOTH descriptors + the precise delta,
5
+ * one subscription feeds the whole panel:
6
+ *
7
+ * - `diagnosticsFor(runId)` joins a `blocked` run to its captured delta (code, missing caps, ranges);
8
+ * - `fleet()` reconstructs the live-fleet compat view — the worker descriptors last seen per routing
9
+ * token — so each pod can be re-negotiated against the control plane;
10
+ * - `controlPlaneDescriptor()` is the CP side the events were negotiated against.
11
+ *
12
+ * Bounded by an LRU-ish cap on the per-run map (oldest evicted) so a long-lived control plane never
13
+ * grows this without bound. Store-role only: a `tenant` pod owns no engine to subscribe to, so its
14
+ * panel shows `blocked` runs (reason from `run.error.message`) without the enriched delta.
15
+ */
16
+ export class BlockedDiagnosticsRecorder {
17
+ #byRun = new Map();
18
+ /** token → (instanceId → latest descriptor). Latest-seen wins per instance. */
19
+ #fleet = new Map();
20
+ #controlPlane;
21
+ #max;
22
+ constructor(opts = {}) {
23
+ this.#max = opts.max ?? 500;
24
+ }
25
+ /** Record one engine event; a no-op for anything but the two diagnostics types (or one missing its
26
+ * `diagnostics` payload). Idempotent per `runId` — a re-block overwrites with the freshest delta. */
27
+ record(event) {
28
+ if (event.type !== 'capability.unavailable' && event.type !== 'protocol.incompatible')
29
+ return;
30
+ const diagnostics = event.diagnostics;
31
+ if (!diagnostics)
32
+ return;
33
+ // Bound the per-run index: evict the oldest insertion when a NEW run would exceed the cap.
34
+ if (!this.#byRun.has(event.runId) && this.#byRun.size >= this.#max) {
35
+ const oldest = this.#byRun.keys().next().value;
36
+ if (oldest !== undefined)
37
+ this.#byRun.delete(oldest);
38
+ }
39
+ // Re-insert at the end (freshest) so eviction stays roughly insertion-ordered.
40
+ this.#byRun.delete(event.runId);
41
+ this.#byRun.set(event.runId, {
42
+ code: event.type,
43
+ // The engine stamps the human reason on `error.message` when it parks the run (design §7.6).
44
+ reason: event.error?.message ?? event.type,
45
+ diagnostics,
46
+ at: (event.at instanceof Date ? event.at : new Date(event.at)).toISOString(),
47
+ });
48
+ // Refresh the live-fleet snapshot for this token from the descriptors the event carried.
49
+ const perToken = this.#fleet.get(diagnostics.token) ?? new Map();
50
+ for (const worker of diagnostics.workers)
51
+ perToken.set(worker.instanceId, worker);
52
+ this.#fleet.set(diagnostics.token, perToken);
53
+ this.#controlPlane = diagnostics.controlPlane;
54
+ }
55
+ /** Subscribe to `source`'s lifecycle events; returns the unsubscribe fn (call it on shutdown). */
56
+ attach(source) {
57
+ return source.subscribe((event) => this.record(event));
58
+ }
59
+ /** The captured delta for a `blocked` run, or `undefined` when none was recorded. */
60
+ diagnosticsFor(runId) {
61
+ return this.#byRun.get(runId);
62
+ }
63
+ /** The control-plane descriptor the recorded events negotiated against, if any has been seen. */
64
+ controlPlaneDescriptor() {
65
+ return this.#controlPlane;
66
+ }
67
+ /** The live-fleet compat view: worker descriptors last seen per routing token. */
68
+ fleet() {
69
+ return [...this.#fleet].map(([token, byInstance]) => ({
70
+ token,
71
+ workers: [...byInstance.values()],
72
+ }));
73
+ }
74
+ }
75
+ //# sourceMappingURL=diagnostics-recorder.js.map
@@ -0,0 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,CAAC,CAAC;IACN,CAAC;CACF"}
@@ -0,0 +1,37 @@
1
+ import type { RunGateway } from '../run-gateway/interface.js';
2
+ import type { DashboardEngine } from './handlers.js';
3
+ /**
4
+ * Adapt a {@link RunGateway} to the {@link DashboardEngine} port the JSON handlers drive, so a
5
+ * **store-less `tenant` pod** serves the SAME dashboard over the wire (design §8) — every read/control
6
+ * verb round-trips through the pod's `ProxyRunGateway` to the control plane, with NO local store or
7
+ * engine. Store presence stays invisible above the handler line.
8
+ *
9
+ * The gateway is a near-superset of the port; two verbs need bridging:
10
+ * - `listCheckpoints` → the gateway's `getCheckpoints` (same shape, §8 naming);
11
+ * - `requeue` → the gateway's `redispatchPending` (the operator recovery verb; the extra
12
+ * `redispatched` count on the result is a harmless superset of `RunResult`).
13
+ *
14
+ * `getRunChildren` (parent→child fan-out) now rides the P4 read surface too (a `getRunChildren`
15
+ * `RunRequestKind` verb), so a store-less tenant pod's run detail view lists children round-tripped over
16
+ * the wire — the responder enforces the tenant-ownership check before answering (anti-IDOR).
17
+ */
18
+ export declare function gatewayDashboardEngine(gateway: RunGateway): DashboardEngine;
19
+ /** The minimal container surface {@link dashboardEngineForRole} resolves bindings through. */
20
+ export interface DashboardContainer {
21
+ make(key: unknown): Promise<unknown>;
22
+ }
23
+ /**
24
+ * Resolve the dashboard's read/control port for the active durable `role` (design §5) — the single seam
25
+ * that makes the dashboard store-agnostic:
26
+ *
27
+ * - **`tenant`** (store-less): resolve the {@link DURABLE_RUN_GATEWAY} token (a `ProxyRunGateway`) and
28
+ * adapt it — the engine binding is deliberately ABSENT on a tenant pod (structural isolation), so we
29
+ * MUST NOT reach for `WorkflowEngine` here;
30
+ * - **store roles** (`standalone`/`control-plane`): resolve the concrete `WorkflowEngine` (structurally a
31
+ * {@link DashboardEngine}) exactly as before — behavior byte-for-byte unchanged.
32
+ *
33
+ * `engineToken` is injected (rather than imported) so the module doesn't hard-depend on the engine class
34
+ * for the tenant path — the tenant branch never touches it.
35
+ */
36
+ export declare function dashboardEngineForRole(role: 'standalone' | 'control-plane' | 'tenant', container: DashboardContainer, engineToken: unknown): Promise<DashboardEngine>;
37
+ //# sourceMappingURL=gateway-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gateway-adapter.d.ts","sourceRoot":"","sources":["../../../src/dashboard/gateway-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,UAAU,GAAG,eAAe,CAW3E;AAED,8FAA8F;AAC9F,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,YAAY,GAAG,eAAe,GAAG,QAAQ,EAC/C,SAAS,EAAE,kBAAkB,EAC7B,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,eAAe,CAAC,CAM1B"}
@@ -0,0 +1,49 @@
1
+ import { DURABLE_RUN_GATEWAY } from '../role_bindings.js';
2
+ /**
3
+ * Adapt a {@link RunGateway} to the {@link DashboardEngine} port the JSON handlers drive, so a
4
+ * **store-less `tenant` pod** serves the SAME dashboard over the wire (design §8) — every read/control
5
+ * verb round-trips through the pod's `ProxyRunGateway` to the control plane, with NO local store or
6
+ * engine. Store presence stays invisible above the handler line.
7
+ *
8
+ * The gateway is a near-superset of the port; two verbs need bridging:
9
+ * - `listCheckpoints` → the gateway's `getCheckpoints` (same shape, §8 naming);
10
+ * - `requeue` → the gateway's `redispatchPending` (the operator recovery verb; the extra
11
+ * `redispatched` count on the result is a harmless superset of `RunResult`).
12
+ *
13
+ * `getRunChildren` (parent→child fan-out) now rides the P4 read surface too (a `getRunChildren`
14
+ * `RunRequestKind` verb), so a store-less tenant pod's run detail view lists children round-tripped over
15
+ * the wire — the responder enforces the tenant-ownership check before answering (anti-IDOR).
16
+ */
17
+ export function gatewayDashboardEngine(gateway) {
18
+ return {
19
+ getRun: (runId) => gateway.getRun(runId),
20
+ listRuns: (query) => gateway.listRuns(query),
21
+ listCheckpoints: (runId) => gateway.getCheckpoints(runId),
22
+ getRunChildren: (runId) => gateway.getRunChildren(runId),
23
+ requeue: (runId) => gateway.redispatchPending(runId),
24
+ redispatchPending: (runId) => gateway.redispatchPending(runId),
25
+ cancel: (runId, opts) => gateway.cancel(runId, opts),
26
+ workerHealth: () => gateway.workerHealth(),
27
+ };
28
+ }
29
+ /**
30
+ * Resolve the dashboard's read/control port for the active durable `role` (design §5) — the single seam
31
+ * that makes the dashboard store-agnostic:
32
+ *
33
+ * - **`tenant`** (store-less): resolve the {@link DURABLE_RUN_GATEWAY} token (a `ProxyRunGateway`) and
34
+ * adapt it — the engine binding is deliberately ABSENT on a tenant pod (structural isolation), so we
35
+ * MUST NOT reach for `WorkflowEngine` here;
36
+ * - **store roles** (`standalone`/`control-plane`): resolve the concrete `WorkflowEngine` (structurally a
37
+ * {@link DashboardEngine}) exactly as before — behavior byte-for-byte unchanged.
38
+ *
39
+ * `engineToken` is injected (rather than imported) so the module doesn't hard-depend on the engine class
40
+ * for the tenant path — the tenant branch never touches it.
41
+ */
42
+ export async function dashboardEngineForRole(role, container, engineToken) {
43
+ if (role === 'tenant') {
44
+ const gateway = (await container.make(DURABLE_RUN_GATEWAY));
45
+ return gatewayDashboardEngine(gateway);
46
+ }
47
+ return (await container.make(engineToken));
48
+ }
49
+ //# sourceMappingURL=gateway-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gateway-adapter.js","sourceRoot":"","sources":["../../../src/dashboard/gateway-adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAI1D;;;;;;;;;;;;;;GAcG;AACH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flowRun } from '../index.js';
2
2
  /**
3
- * Framework-light JSON handlers over a {@link WorkflowEngine}.
3
+ * Framework-light JSON handlers over a {@link DashboardEngine}.
4
4
  *
5
- * Each handler takes a {@link Deps} bundle (just the engine — runs and
6
- * checkpoints are read through the engine's own read API, {@link
7
- * WorkflowEngine.listRuns} / {@link WorkflowEngine.listCheckpoints}, so the
8
- * dashboard never reaches for the engine's private store) plus a plain {@link
5
+ * Each handler takes a {@link Deps} bundle (just the read/control port — runs
6
+ * and checkpoints are read through its own read API, {@link
7
+ * DashboardEngine.listRuns} / {@link DashboardEngine.listCheckpoints}, so the
8
+ * dashboard never reaches for a private store) plus a plain {@link
9
9
  * ApiRequest} (a thin view of the parts of an HTTP request it needs), and
10
10
  * returns a plain {@link ApiResponse} (status + JSON body). No AdonisJS types
11
11
  * leak in, so the handlers are unit-testable against a real in-memory engine
12
12
  * with no HTTP server. The provider adapts an AdonisJS `HttpContext` to these
13
13
  * shapes.
14
14
  */
15
- /** The engine the handlers operate over. */
15
+ /**
16
+ * The bounded read/control surface the JSON handlers drive — declared STRUCTURALLY (a port), not by
17
+ * importing the concrete `WorkflowEngine` class, so the same handlers serve BOTH durable topologies
18
+ * (design §8): a store role passes the real {@link import('../engine.js').WorkflowEngine} (structurally
19
+ * assignable — it has every method here); a store-less `tenant` pod passes an adapter over its
20
+ * {@link import('../run-gateway/interface.js').RunGateway} (see `gatewayDashboardEngine`). Store presence
21
+ * is therefore invisible to the handlers. Mirrors the `RunGatewayEngine` port pattern already used by
22
+ * `StoreRunGateway`.
23
+ */
24
+ export interface DashboardEngine {
25
+ getRun(runId: string): Promise<WorkflowRun | null>;
26
+ listRuns(query: RunQuery): Promise<WorkflowRun[]>;
27
+ listCheckpoints(runId: string): Promise<StepCheckpoint[]>;
28
+ getRunChildren(runId: string): Promise<string[]>;
29
+ requeue(runId: string): Promise<RunResult | null>;
30
+ redispatchPending(runId: string): Promise<RunResult | null>;
31
+ cancel(runId: string, opts?: {
32
+ compensate?: boolean;
33
+ }): Promise<RunResult | null>;
34
+ workerHealth(extra?: string[]): Promise<GroupHealth[]>;
35
+ }
36
+ /** The read/control port the handlers operate over (a store engine or a tenant gateway adapter). */
16
37
  export interface Deps {
17
- engine: WorkflowEngine;
38
+ engine: DashboardEngine;
18
39
  }
19
40
  /** The subset of an HTTP request the handlers read. */
20
41
  export interface ApiRequest {
@@ -30,6 +51,8 @@ export interface ApiResponse {
30
51
  status: number;
31
52
  body: unknown;
32
53
  }
54
+ /** A `200 OK` JSON response. Exported so sibling handlers (e.g. `compat`) share one convention. */
55
+ export declare const ok: (body: unknown) => ApiResponse;
33
56
  /** `GET /runs` — list runs filtered by status/workflow/tag, paginated. */
34
57
  export declare function listRuns(deps: Deps, req: ApiRequest): Promise<ApiResponse>;
35
58
  /** `GET /runs/:id` — a run's detail: the run, its step timeline, and child run ids. */
@@ -1 +1 @@
1
- {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/dashboard/handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAKV,cAAc,EAEf,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;GAYG;AAEH,4CAA4C;AAC5C,MAAM,WAAW,IAAI;IACnB,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,uDAAuD;AACvD,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;IACrD,2CAA2C;IAC3C,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,qEAAqE;AACrE,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf;AAuCD,0EAA0E;AAC1E,wBAAsB,QAAQ,CAAC,IAAI,EAAE,IAAI,EA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AAI,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CAMhF;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CAM5F;AAED,kGAAkG;AAClG,wBAAsB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CAUjF;AAED,wFAAwF;AACxF,wBAAsB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,CAW7D"}
@@ -1,4 +1,5 @@
1
- const ok = (body) => ({ status: 200, body });
1
+ /** A `200 OK` JSON response. Exported so sibling handlers (e.g. `compat`) share one convention. */
2
+ export const ok = (body) => ({ status: 200, body });
2
3
  const notFound = (message) => ({
3
4
  status: 404,
4
5
  body: { error: message },
@@ -1 +1 @@
1
- {"version":3,"file":"handlers.js","sourceRoot":"","sources":["../../../src/dashboard/handlers.ts"],"names":[],"mappings":"AA4CA,MAAM,EAAE,GAAG,CAAC,IAAa,EAAe,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AACnE,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAe,EAAE,CAAC,CAAC;IAClD,MAAM,EAAE,GAAG;IACX,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;CACzB,CAAC,CAAC;AAEH,MAAM,YAAY,GAAyB;IACzC,SAAS;IACT,SAAS;IACT,WAAW;IACX,WAAW;IACX,QAAQ;IACR,WAAW;IACX,MAAM;CACP,CAAC;AAEF,SAAS,UAAU,CAAC,KAAoC;IACtD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1C,OAAO,KAAK,CAAC;AACf,CAAC;AAED,4FAA4F;AAC5F,SA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AE,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;IACpE,MAAM,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IACjE,OAAO;QACL,GAAG,EAAE,EAAE,CAAC,GAAG;QACX,IAAI,EAAE,EAAE,CAAC,IAAI;QACb,IAAI,EAAE,EAAE,CAAC,IAAI;QACb,MAAM,EAAE,EAAE,CAAC,MAAM;QACjB,QAAQ,EAAE,EAAE,CAAC,QAAQ;QACrB,WAAW,EAAE,EAAE,CAAC,WAAW;QAC3B,MAAM,EAAE,EAAE,CAAC,MAAM;QACjB,KAAK,EAAE,EAAE,CAAC,KAAK;QACf,MAAM,EAAE,EAAE,CAAC,MAAM,IAAI,EAAE;QACvB,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE;QACvC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE;QACrC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE;QACvC,UAAU,EAAE,UAAU,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC5C,OAAO,EAAE,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;KACpC,CAAC;AACJ,CAAC"}
@@ -1,10 +1,17 @@
1
1
  /** Keep in sync with this package's `version` in package.json. */
2
- export declare const VERSION = "0.10.0";
2
+ export declare const VERSION = "0.11.0";
3
3
  export { defineConfig, defaultAuthorize, resolveConfig } from './define_config.js';
4
4
  export type { AuthorizeHook, DurableDashboardConfig, ResolvedDurableDashboardConfig, } from './define_config.js';
5
- export { listRuns, getRun, retryRun, redispatchPendingRun, cancelRun, health, } from './handlers.js';
6
- export type { ApiRequest, ApiResponse, Deps } from './handlers.js';
5
+ export { listRuns, getRun, retryRun, redispatchPendingRun, cancelRun, health, ok, } from './handlers.js';
6
+ export type { ApiRequest, ApiResponse, Deps, DashboardEngine } from './handlers.js';
7
7
  export { renderDashboard } from './html.js';
8
+ export { compat, enumerateLiveFleet, mergeFleets } from './compat.js';
9
+ export type { CompatSource, FleetGroup, FleetTransport } from './compat.js';
10
+ export { BlockedDiagnosticsRecorder } from './diagnostics-recorder.js';
11
+ export type { RecordedBlock, EngineEventSource } from './diagnostics-recorder.js';
12
+ export { outcomeClass, outcomeLabel, formatProtocolRange } from './compat-view.js';
13
+ export { gatewayDashboardEngine, dashboardEngineForRole } from './gateway-adapter.js';
14
+ export type { DashboardContainer } from './gateway-adapter.js';
8
15
  export { resolveDashboardAuth, performLogin, readSession, sanitizeReturnTo, SESSION_COOKIE_NAME, } from './auth.js';
9
16
  export type { DashboardAuthOptions, ResolvedDashboardAuth, LoginHook, LoginOutcome, } from './auth.js';
10
17
  export { signSessionCookie, verifySessionCookie, } from './session_cookie.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dashboard/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,eAAO,MAAM,OAAO,WAAW,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnF,YAAY,EACV,aAAa,EACb,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,oBAAoB,EACpB,SAAS,EACT,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG5C,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,SAAS,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,CAAC;AAG/D,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,SAAS,EACT,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,WAAW,EACX,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,8 +1,14 @@
1
1
  /** Keep in sync with this package's `version` in package.json. */
2
- export const VERSION = '0.10.0';
2
+ export const VERSION = '0.11.0';
3
3
  export { defineConfig, defaultAuthorize, resolveConfig } from './define_config.js';
4
- export { listRuns, getRun, retryRun, redispatchPendingRun, cancelRun, health, } from './handlers.js';
4
+ export { listRuns, getRun, retryRun, redispatchPendingRun, cancelRun, health, ok, } from './handlers.js';
5
5
  export { renderDashboard } from './html.js';
6
+ // Fleet health / protocol-compatibility panel (design §7.6, §10).
7
+ export { compat, enumerateLiveFleet, mergeFleets } from './compat.js';
8
+ export { BlockedDiagnosticsRecorder } from './diagnostics-recorder.js';
9
+ export { outcomeClass, outcomeLabel, formatProtocolRange } from './compat-view.js';
10
+ // Store-less `tenant` dashboard: adapt the RunGateway to the handlers' read/control port (design §8).
11
+ export { gatewayDashboardEngine, dashboardEngineForRole } from './gateway-adapter.js';
6
12
  // Built-in `dashboardAuth` login screen (optional; opt-in via `config/durable_dashboard.ts`).
7
13
  export { resolveDashboardAuth, performLogin, readSession, sanitizeReturnTo, SESSION_COOKIE_NAME, } from './auth.js';
8
14
  export { signSessionCookie, verifySessionCookie, } from './session_cookie.js';