@adonis-agora/durable 1.0.0-rc.1 → 1.0.0-rc.11

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 (180) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/dist/assets/spa/assets/index-B2kIfzsc.css +1 -0
  3. package/dist/assets/spa/assets/index-Bgf_8IJ0.js +16 -0
  4. package/dist/assets/spa/assets/index-Bgf_8IJ0.js.map +1 -0
  5. package/dist/assets/spa/index.html +2 -2
  6. package/dist/commands/durable_worker.d.ts +3 -3
  7. package/dist/commands/durable_worker.js +7 -7
  8. package/dist/commands/durable_worker.js.map +1 -1
  9. package/dist/commands/runs.d.ts.map +1 -1
  10. package/dist/commands/runs.js +4 -2
  11. package/dist/commands/runs.js.map +1 -1
  12. package/dist/providers/dashboard_provider.d.ts +20 -54
  13. package/dist/providers/dashboard_provider.d.ts.map +1 -1
  14. package/dist/providers/dashboard_provider.js +87 -262
  15. package/dist/providers/dashboard_provider.js.map +1 -1
  16. package/dist/providers/durable_provider.d.ts.map +1 -1
  17. package/dist/providers/durable_provider.js +38 -33
  18. package/dist/providers/durable_provider.js.map +1 -1
  19. package/dist/src/commands/runs.js +1 -1
  20. package/dist/src/commands/runs.js.map +1 -1
  21. package/dist/src/concurrency.d.ts.map +1 -1
  22. package/dist/src/concurrency.js +1 -0
  23. package/dist/src/concurrency.js.map +1 -1
  24. package/dist/src/config_types.d.ts +12 -12
  25. package/dist/src/config_types.d.ts.map +1 -1
  26. package/dist/src/control-flow-signal.d.ts +5 -4
  27. package/dist/src/control-flow-signal.d.ts.map +1 -1
  28. package/dist/src/control-flow-signal.js +5 -4
  29. package/dist/src/control-flow-signal.js.map +1 -1
  30. package/dist/src/dashboard/access_denied_page.d.ts +5 -7
  31. package/dist/src/dashboard/access_denied_page.d.ts.map +1 -1
  32. package/dist/src/dashboard/access_denied_page.js +2 -6
  33. package/dist/src/dashboard/access_denied_page.js.map +1 -1
  34. package/dist/src/dashboard/console_authorize.d.ts +76 -0
  35. package/dist/src/dashboard/console_authorize.d.ts.map +1 -0
  36. package/dist/src/dashboard/console_authorize.js +101 -0
  37. package/dist/src/dashboard/console_authorize.js.map +1 -0
  38. package/dist/src/dashboard/define_config.d.ts +44 -81
  39. package/dist/src/dashboard/define_config.d.ts.map +1 -1
  40. package/dist/src/dashboard/define_config.js +16 -112
  41. package/dist/src/dashboard/define_config.js.map +1 -1
  42. package/dist/src/dashboard/diagnostics-recorder.d.ts +1 -1
  43. package/dist/src/dashboard/diagnostics-recorder.js +1 -1
  44. package/dist/src/dashboard/gateway-adapter.d.ts +6 -6
  45. package/dist/src/dashboard/gateway-adapter.d.ts.map +1 -1
  46. package/dist/src/dashboard/gateway-adapter.js +5 -5
  47. package/dist/src/dashboard/gateway-adapter.js.map +1 -1
  48. package/dist/src/dashboard/handlers.d.ts +4 -4
  49. package/dist/src/dashboard/handlers.d.ts.map +1 -1
  50. package/dist/src/dashboard/handlers.js +11 -7
  51. package/dist/src/dashboard/handlers.js.map +1 -1
  52. package/dist/src/dashboard/index.d.ts +6 -9
  53. package/dist/src/dashboard/index.d.ts.map +1 -1
  54. package/dist/src/dashboard/index.js +5 -7
  55. package/dist/src/dashboard/index.js.map +1 -1
  56. package/dist/src/dashboard/openapi.d.ts.map +1 -1
  57. package/dist/src/dashboard/openapi.js +12 -2
  58. package/dist/src/dashboard/openapi.js.map +1 -1
  59. package/dist/src/dashboard/run-filter.d.ts.map +1 -1
  60. package/dist/src/dashboard/run-filter.js +1 -0
  61. package/dist/src/dashboard/run-filter.js.map +1 -1
  62. package/dist/src/define_config.d.ts +10 -12
  63. package/dist/src/define_config.d.ts.map +1 -1
  64. package/dist/src/define_config.js +9 -4
  65. package/dist/src/define_config.js.map +1 -1
  66. package/dist/src/diagnostics/index.d.ts +11 -0
  67. package/dist/src/diagnostics/index.d.ts.map +1 -0
  68. package/dist/src/diagnostics/index.js +6 -0
  69. package/dist/src/diagnostics/index.js.map +1 -0
  70. package/dist/src/diagnostics/transport.d.ts +71 -0
  71. package/dist/src/diagnostics/transport.d.ts.map +1 -0
  72. package/dist/src/diagnostics/transport.js +188 -0
  73. package/dist/src/diagnostics/transport.js.map +1 -0
  74. package/dist/src/diagnostics-bridge.d.ts +2 -1
  75. package/dist/src/diagnostics-bridge.d.ts.map +1 -1
  76. package/dist/src/diagnostics-bridge.js +7 -1
  77. package/dist/src/diagnostics-bridge.js.map +1 -1
  78. package/dist/src/engine.d.ts +14 -9
  79. package/dist/src/engine.d.ts.map +1 -1
  80. package/dist/src/engine.js +137 -52
  81. package/dist/src/engine.js.map +1 -1
  82. package/dist/src/errors.d.ts +9 -0
  83. package/dist/src/errors.d.ts.map +1 -1
  84. package/dist/src/errors.js +13 -0
  85. package/dist/src/errors.js.map +1 -1
  86. package/dist/src/event-trigger-bridge.d.ts +5 -14
  87. package/dist/src/event-trigger-bridge.d.ts.map +1 -1
  88. package/dist/src/event-trigger-bridge.js +11 -99
  89. package/dist/src/event-trigger-bridge.js.map +1 -1
  90. package/dist/src/index.d.ts +1 -1
  91. package/dist/src/index.d.ts.map +1 -1
  92. package/dist/src/index.js +1 -1
  93. package/dist/src/index.js.map +1 -1
  94. package/dist/src/interfaces.d.ts +24 -8
  95. package/dist/src/interfaces.d.ts.map +1 -1
  96. package/dist/src/interfaces.js +8 -0
  97. package/dist/src/interfaces.js.map +1 -1
  98. package/dist/src/origin.js +3 -3
  99. package/dist/src/role_bindings.d.ts +8 -8
  100. package/dist/src/role_bindings.js +8 -8
  101. package/dist/src/run-gateway/interface.d.ts +4 -3
  102. package/dist/src/run-gateway/interface.d.ts.map +1 -1
  103. package/dist/src/run-gateway/proxy-run-gateway.d.ts +1 -1
  104. package/dist/src/run-gateway/proxy-run-gateway.js +1 -1
  105. package/dist/src/run-gateway/run-request-responder.d.ts +1 -1
  106. package/dist/src/run-gateway/store-run-gateway.d.ts +4 -4
  107. package/dist/src/run-gateway/store-run-gateway.d.ts.map +1 -1
  108. package/dist/src/run-gateway/store-run-gateway.js +4 -4
  109. package/dist/src/run-gateway/store-run-gateway.js.map +1 -1
  110. package/dist/src/scheduler.d.ts.map +1 -1
  111. package/dist/src/scheduler.js +2 -1
  112. package/dist/src/scheduler.js.map +1 -1
  113. package/dist/src/services/main.d.ts +3 -3
  114. package/dist/src/services/main.js +6 -6
  115. package/dist/src/services/main.js.map +1 -1
  116. package/dist/src/singleton-admission.d.ts.map +1 -1
  117. package/dist/src/singleton-admission.js +2 -0
  118. package/dist/src/singleton-admission.js.map +1 -1
  119. package/dist/src/singleton-gate.d.ts +1 -1
  120. package/dist/src/singleton-gate.d.ts.map +1 -1
  121. package/dist/src/singleton-gate.js +4 -3
  122. package/dist/src/singleton-gate.js.map +1 -1
  123. package/dist/src/stores/lucid-pg-hot-path.d.ts +6 -2
  124. package/dist/src/stores/lucid-pg-hot-path.d.ts.map +1 -1
  125. package/dist/src/stores/lucid-pg-hot-path.js +7 -3
  126. package/dist/src/stores/lucid-pg-hot-path.js.map +1 -1
  127. package/dist/src/stores/lucid.d.ts +15 -2
  128. package/dist/src/stores/lucid.d.ts.map +1 -1
  129. package/dist/src/stores/lucid.js +191 -49
  130. package/dist/src/stores/lucid.js.map +1 -1
  131. package/dist/src/testing/in-memory-state-store.js +3 -3
  132. package/dist/src/testing/in-memory-state-store.js.map +1 -1
  133. package/dist/src/testing-kit/state-store-conformance.d.ts.map +1 -1
  134. package/dist/src/testing-kit/state-store-conformance.js +13 -0
  135. package/dist/src/testing-kit/state-store-conformance.js.map +1 -1
  136. package/dist/src/testing-kit/transport-conformance.d.ts.map +1 -1
  137. package/dist/src/testing-kit/transport-conformance.js +5 -1
  138. package/dist/src/testing-kit/transport-conformance.js.map +1 -1
  139. package/dist/src/transports/bullmq/bullmq-transport.d.ts +1 -1
  140. package/dist/src/transports/bullmq/bullmq-transport.d.ts.map +1 -1
  141. package/dist/src/transports/bullmq/bullmq-transport.js +14 -3
  142. package/dist/src/transports/bullmq/bullmq-transport.js.map +1 -1
  143. package/dist/src/transports/db.d.ts.map +1 -1
  144. package/dist/src/transports/db.js +42 -3
  145. package/dist/src/transports/db.js.map +1 -1
  146. package/dist/src/transports/queue.d.ts +2 -2
  147. package/dist/src/transports/queue.d.ts.map +1 -1
  148. package/dist/src/transports/queue.js +49 -8
  149. package/dist/src/transports/queue.js.map +1 -1
  150. package/dist/src/workflow-discovery.d.ts +1 -1
  151. package/dist/src/workflow-discovery.d.ts.map +1 -1
  152. package/dist/src/workflow-discovery.js +4 -7
  153. package/dist/src/workflow-discovery.js.map +1 -1
  154. package/dist/src/workflow-events.d.ts +20 -51
  155. package/dist/src/workflow-events.d.ts.map +1 -1
  156. package/dist/src/workflow-events.js +12 -30
  157. package/dist/src/workflow-events.js.map +1 -1
  158. package/dist/src/workflow-ref.d.ts +1 -1
  159. package/dist/src/workflow-turn.d.ts.map +1 -1
  160. package/dist/src/workflow-turn.js +18 -1
  161. package/dist/src/workflow-turn.js.map +1 -1
  162. package/dist/stubs/config/durable_dashboard.stub +9 -29
  163. package/package.json +12 -2
  164. package/skills/durable-cluster/SKILL.md +34 -22
  165. package/skills/durable-reliability/SKILL.md +2 -2
  166. package/dist/assets/spa/assets/index-70hGzOnT.css +0 -1
  167. package/dist/assets/spa/assets/index-CJjMAUau.js +0 -16
  168. package/dist/assets/spa/assets/index-CJjMAUau.js.map +0 -1
  169. package/dist/src/dashboard/auth.d.ts +0 -134
  170. package/dist/src/dashboard/auth.d.ts.map +0 -1
  171. package/dist/src/dashboard/auth.js +0 -156
  172. package/dist/src/dashboard/auth.js.map +0 -1
  173. package/dist/src/dashboard/login_page.d.ts +0 -36
  174. package/dist/src/dashboard/login_page.d.ts.map +0 -1
  175. package/dist/src/dashboard/login_page.js +0 -158
  176. package/dist/src/dashboard/login_page.js.map +0 -1
  177. package/dist/src/dashboard/session_cookie.d.ts +0 -45
  178. package/dist/src/dashboard/session_cookie.d.ts.map +0 -1
  179. package/dist/src/dashboard/session_cookie.js +0 -97
  180. package/dist/src/dashboard/session_cookie.js.map +0 -1
@@ -10,8 +10,8 @@
10
10
  rel="stylesheet"
11
11
  />
12
12
  <title>durable · control plane</title>
13
- <script type="module" crossorigin src="/__DURABLE_DASHBOARD__/assets/index-CJjMAUau.js"></script>
14
- <link rel="stylesheet" crossorigin href="/__DURABLE_DASHBOARD__/assets/index-70hGzOnT.css">
13
+ <script type="module" crossorigin src="/__DURABLE_DASHBOARD__/assets/index-Bgf_8IJ0.js"></script>
14
+ <link rel="stylesheet" crossorigin href="/__DURABLE_DASHBOARD__/assets/index-B2kIfzsc.css">
15
15
  </head>
16
16
  <body>
17
17
  <div id="root"></div>
@@ -1,17 +1,17 @@
1
1
  import { BaseCommand } from '@adonisjs/core/ace';
2
2
  import type { CommandOptions } from '@adonisjs/core/types/ace';
3
3
  /**
4
- * `node ace durable:worker` — the **store-less** task-consumer loop for a `role: 'tenant'` worker pod
4
+ * `node ace durable:worker` — the **store-less** task-consumer loop for a `topology: 'tenant'` worker pod
5
5
  * (design §3). Distinct from `durable:work` (the store-backed dispatch/recovery/timers loop, which
6
6
  * this command deliberately does NOT clobber): a store-less worker owns no durable state — it consumes
7
7
  * `${P}-tasks-<token>` tasks (executed through the shared `runStepHandler`, results published) and
8
8
  * advertises its {@link import('../src/handshake/descriptor.js').WorkerDescriptor} + heartbeat. Stays
9
9
  * alive until SIGINT/SIGTERM, then drains.
10
10
  *
11
- * On a `role: 'tenant'` pod it resolves the **container-bound {@link WorkerRuntime}** the provider wired
11
+ * On a `topology: 'tenant'` pod it resolves the **container-bound {@link WorkerRuntime}** the provider wired
12
12
  * (design §5): that runtime shares the tenant transport with the `ProxyRunGateway` and carries a
13
13
  * `RedisWorkerRegistry` built from the transport's Redis connection, so descriptor + heartbeat are
14
- * actually published on the shared Redis. Only when no bound runtime exists (a non-tenant role, or a
14
+ * actually published on the shared Redis. Only when no bound runtime exists (a non-tenant topology, or a
15
15
  * misconfigured pod) does it fall back to building a self-contained runtime from `config/durable.ts`
16
16
  * with a {@link NoopWorkerRegistry} (advertising is then a no-op).
17
17
  */
@@ -5,17 +5,17 @@ import { InMemoryTransport } from '../src/testing/in-memory-transport.js';
5
5
  import { NoopWorkerRegistry, registerStepsFromDir, WorkerRuntime, } from '../src/worker-runtime/index.js';
6
6
  import { discoverWorkflows } from '../src/workflow-discovery.js';
7
7
  /**
8
- * `node ace durable:worker` — the **store-less** task-consumer loop for a `role: 'tenant'` worker pod
8
+ * `node ace durable:worker` — the **store-less** task-consumer loop for a `topology: 'tenant'` worker pod
9
9
  * (design §3). Distinct from `durable:work` (the store-backed dispatch/recovery/timers loop, which
10
10
  * this command deliberately does NOT clobber): a store-less worker owns no durable state — it consumes
11
11
  * `${P}-tasks-<token>` tasks (executed through the shared `runStepHandler`, results published) and
12
12
  * advertises its {@link import('../src/handshake/descriptor.js').WorkerDescriptor} + heartbeat. Stays
13
13
  * alive until SIGINT/SIGTERM, then drains.
14
14
  *
15
- * On a `role: 'tenant'` pod it resolves the **container-bound {@link WorkerRuntime}** the provider wired
15
+ * On a `topology: 'tenant'` pod it resolves the **container-bound {@link WorkerRuntime}** the provider wired
16
16
  * (design §5): that runtime shares the tenant transport with the `ProxyRunGateway` and carries a
17
17
  * `RedisWorkerRegistry` built from the transport's Redis connection, so descriptor + heartbeat are
18
- * actually published on the shared Redis. Only when no bound runtime exists (a non-tenant role, or a
18
+ * actually published on the shared Redis. Only when no bound runtime exists (a non-tenant topology, or a
19
19
  * misconfigured pod) does it fall back to building a self-contained runtime from `config/durable.ts`
20
20
  * with a {@link NoopWorkerRegistry} (advertising is then a no-op).
21
21
  */
@@ -25,8 +25,8 @@ export default class DurableWorker extends BaseCommand {
25
25
  static options = { startApp: true, staysAlive: true };
26
26
  async run() {
27
27
  const config = this.app.config.get('durable', {});
28
- if (config.role !== 'tenant') {
29
- this.logger.warning(`durable:worker is the store-less worker for role 'tenant'; config.role is '${config.role ?? 'standalone'}'. Continuing, but a store-backed role should use durable:work.`);
28
+ if (config.topology !== 'tenant') {
29
+ this.logger.warning(`durable:worker is the store-less worker for topology 'tenant'; config.topology is '${config.topology ?? 'standalone'}'. Continuing, but a store-backed topology should use durable:work.`);
30
30
  }
31
31
  const { runtime, partition } = await this.#resolveRuntime(config);
32
32
  // Register `app/steps` (served by the transport) + advertise `app/workflows` names.
@@ -62,10 +62,10 @@ export default class DurableWorker extends BaseCommand {
62
62
  await this.terminate();
63
63
  }
64
64
  /**
65
- * Prefer the provider-bound {@link WorkerRuntime} (the `role: 'tenant'` branch of `durable_provider`):
65
+ * Prefer the provider-bound {@link WorkerRuntime} (the `topology: 'tenant'` branch of `durable_provider`):
66
66
  * it shares the tenant transport with the `ProxyRunGateway` and advertises through a real
67
67
  * `RedisWorkerRegistry`. Fall back to a self-built runtime (a {@link NoopWorkerRegistry}) only when the
68
- * container has no bound runtime — a non-tenant role, or a pod running this command by mistake.
68
+ * container has no bound runtime — a non-tenant topology, or a pod running this command by mistake.
69
69
  */
70
70
  async #resolveRuntime(config) {
71
71
  if (this.app.container.hasBinding(DURABLE_WORKER_RUNTIME)) {
@@ -1 +1 @@
1
- {"version":3,"file":"durable_worker.js","sourceRoot":"","sources":["../../commands/durable_worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,GAEd,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW;IACpD,MAAM,CAAU,WAAW,GAAG,gBAAgB,CAAC;IAC/C,MAAM,CAAU,WAAW,GAC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ACb,MAAM,IAAI,KAAK,CACb,wCAAwC,IAAI,4BAA4B,IAAI,iBAAiB,CAC9F,CAAC;QACJ,CAAC;QACD,OAAO,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACpC,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../commands/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAS,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAY/D;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IAClD,OAAgB,WAAW,SAAkB;IAC7C,OAAgB,WAAW,SAAuC;IAClE,OAAgB,OAAO,EAAE,cAAc,CAAsB;IAKrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,KAAK,EAAE,MAAM,CAAC;IAQd,KAAK,CAAC,EAAE,MAAM,CAAC;IAER,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CA0BlC;CACF"}
1
+ {"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../commands/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAS,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAY/D;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IAClD,OAAgB,WAAW,SAAkB;IAC7C,OAAgB,WAAW,SAAuC;IAClE,OAAgB,OAAO,EAAE,cAAc,CAAsB;IAKrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,KAAK,EAAE,MAAM,CAAC;IAQd,KAAK,CAAC,EAAE,MAAM,CAAC;IAER,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CA4BlC;CACF"}
@@ -26,10 +26,12 @@ export default class DurableRuns extends BaseCommand {
26
26
  const wantsStale = this.stale !== undefined;
27
27
  const runs = await listRuns(engine, {
28
28
  ...(this.status ? { status: this.status } : {}),
29
- // No explicit --status: scope the query to running/suspended, the only statuses a stranded
29
+ // No explicit --status: scope the query to running/suspended/cancelling, the only statuses a stranded
30
30
  // dispatch can show up in, so a stale candidate isn't pushed out of the window by newer
31
31
  // terminal runs.
32
- ...(!this.status && wantsStale ? { statuses: ['running', 'suspended'] } : {}),
32
+ ...(!this.status && wantsStale
33
+ ? { statuses: ['running', 'suspended', 'cancelling'] }
34
+ : {}),
33
35
  ...(this.workflow ? { workflow: this.workflow } : {}),
34
36
  limit: this.limit,
35
37
  });
@@ -1 +1 @@
1
- {"version":3,"file":"runs.js","sourceRoot":"","sources":["../../commands/runs.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,eAAe,EACf,eAAe,EACf,SAAS,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAkB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjE;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IAClD,MAAM,CAAU,WAAW,GAAG,cAAc,CAAC;IAC7C,MAAM,CAAU,WAAW,GAAG,mCAAmC,CAAC;IAClE,MAAM,CAAU,OAAO,GAAmB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAqBpD,KAAK,CAAC,GAAG;QAChB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC7D,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC;QAC5C,MAAM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C5F,CAAC;2CACsB;AAGhB;IADP,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;6CAC/B;AAGlB;IADP,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,kBAAkB,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;0CACzC;AAQd;IANP,KAAK,CAAC,MAAM,CAAC;QACZ,WAAW,EACT,2FAA2F;YAC3F,6FAA6F;YAC7F,iDAAiD;KACpD,CAAC;0CACqB"}
@@ -30,37 +30,29 @@ import type { ApplicationService } from '@adonisjs/core/types';
30
30
  * - `POST /api/bulk/:action` -> bulk retry/cancel every run matching a filter
31
31
  * - `GET /api/health` -> worker-group health (compact shape)
32
32
  * - `GET /api/workers` -> worker-group health (full heartbeats; SPA)
33
- * - `GET /api/topology` -> this deployment's durable role
33
+ * - `GET /api/topology` -> this deployment's durable topology
34
34
  * - `GET /api/compat` -> fleet health / protocol-compatibility panel
35
35
  * - `GET /api/openapi.json` -> the machine-readable API contract (OpenAPI 3.1)
36
36
  */
37
37
  export default class DashboardProvider {
38
38
  protected app: ApplicationService;
39
39
  constructor(app: ApplicationService);
40
- /** Warn once so a throwing `login`/`session` hook doesn't spam the logs on every failed attempt. */
41
- private warnedOnHookThrow;
42
40
  private warnedOnAuthorizeThrow;
43
- /** Login-attempt timestamps per client address — a simple sliding window (10/min) so a brute
44
- * force can't hammer the host's `login` hook at line rate. In-memory per instance: a cluster
45
- * multiplies the budget by pod count, which still reduces the attack by orders of magnitude. */
46
- private readonly loginAttempts;
47
- /** True (and reply 429) when this address exhausted its login window. */
48
- private loginRateLimited;
49
41
  /** SSE connections currently open, per client address (and in total) — see streamRun. */
50
42
  private readonly sseByAddress;
51
43
  private sseTotal;
52
44
  /**
53
45
  * Captures the engine's `capability.unavailable` / `protocol.incompatible` diagnostics events so the
54
46
  * `/compat` health panel can render each blocked run's structured delta + the live-fleet compat view
55
- * (design §7.6, §10). Store-role only — attached in {@link boot}; a `tenant` pod owns no engine.
47
+ * (design §7.6, §10). Store-topology only — attached in {@link boot}; a `tenant` pod owns no engine.
56
48
  */
57
49
  private readonly diagnostics;
58
50
  /** Detach handle for the diagnostics subscription, released on {@link shutdown}. */
59
51
  private detachDiagnostics;
60
- /** This process's event counters for `GET /metrics` (store roles; a tenant pod has no engine). */
52
+ /** This process's event counters for `GET /metrics` (store topologies; a tenant pod has no engine). */
61
53
  private metricsCollector;
62
- /** The active durable role (`standalone` when no `durable` config is present — today's default). */
63
- private durableRole;
54
+ /** The active durable topology (`standalone` when no `durable` config is present — today's default). */
55
+ private durableTopology;
64
56
  boot(): Promise<void>;
65
57
  private attachDiagnostics;
66
58
  private registerRoutes;
@@ -76,43 +68,23 @@ export default class DashboardProvider {
76
68
  private streamRun;
77
69
  private compatSource;
78
70
  private fleetTransport;
79
- /**
80
- * Mount the built-in `dashboardAuth` endpoints under `basePath`. All are public (no guard): they
81
- * create/destroy the session the {@link enforce} guard checks for.
82
- *
83
- * - `GET <base>/login` -> the server-rendered login page (Mode B only).
84
- * - `POST <base>/login` -> verifies credentials via the host `login` hook and mints the cookie.
85
- * - `POST <base>/session` -> Mode A: verifies the HOST APP's own auth (off the raw request) via the
86
- * `session` hook and mints the cookie. No body — the hook reads whatever it needs off `request`.
87
- * `204` on success, uniform `401` on denial. Mirrors `@dudousxd/nestjs-durable-dashboard`'s
88
- * `DurableAuthController.session` and `client/console-session.ts`'s `mintDurableConsoleSession`.
89
- * - `GET <base>/logout` -> clears the cookie and redirects to the login page (Mode B) or the
90
- * dashboard root (Mode A only). A plain `GET` (idempotent, only ever destroys the caller's own
91
- * session) so a simple `<a href>` works.
92
- */
93
- private registerAuthRoutes;
94
71
  /** Record one mutating console action (see DashboardAuditEntry). Never throws into the request. */
95
72
  private audit;
96
73
  /** Route a handler 500's detail to the app logger (the client only ever sees a generic body). */
97
74
  private logServerError;
98
75
  private warnAuthorizeThrow;
99
- private warnHookThrow;
76
+ /** The once-per-boot warning for a console with no `authorize` (open in dev, 403 in production). */
77
+ private warnNoAuthorize;
100
78
  /**
101
- * Run the guards for a dashboard resource. Composes the existing `authorize` hook (bearer
102
- * token/custom) with the optional `dashboardAuth` session guard — BOTH must pass:
79
+ * Run `authorize` for a dashboard resource. On a denial:
103
80
  *
104
- * 1. `authorize` denies -> the built-in (or host-customised) access-denied PAGE for a `page`
105
- * request, JSON for an `api` request. `reason: 'unauthenticated'` is a `401`
106
- * (`{ error: 'unauthorized' }`); `false`, `{ allowed: false }`, `reason: 'forbidden'` or a
107
- * throwing hook is a `403` (`{ error: 'forbidden' }`). A hook that already answered the request
108
- * (a redirect, a body) keeps its answer.
109
- * 2. `dashboardAuth` configured AND no valid session -> for a `page` request, redirect `302` to
110
- * the login page (Mode B) carrying a sanitized `returnTo`, or the `401` "open this console
111
- * from your app" page (Mode A only, no login page to redirect to); for an `api` request, a
112
- * plain `401 { error: 'unauthorized', auth: { modes } }` — the `modes` list lets the SPA's
113
- * client (`durable-client.ts`) decide whether to offer the login page.
81
+ * - `{ redirectTo }`: a `page` request is redirected there (`302`); an `api` request gets
82
+ * `401 { error: 'unauthenticated', redirectTo }`;
83
+ * - `reason: 'unauthenticated'`: `401` (the access-denied page, or `{ error: 'unauthenticated' }`);
84
+ * - anything else (`false`, `{ allowed: false }`, a throw): `403` (the access-denied page, or
85
+ * `{ error: 'forbidden' }`).
114
86
  *
115
- * When `dashboardAuth` is unconfigured only step 1 runs.
87
+ * A hook that already answered the request (a redirect, a body) keeps its answer.
116
88
  * Returns `false` (and has already written the response) when the request must short-circuit.
117
89
  */
118
90
  private enforce;
@@ -123,16 +95,8 @@ export default class DashboardProvider {
123
95
  * redirect keeps it; the provider never overwrites a `location` header.
124
96
  */
125
97
  private denyPage;
126
- private readSessionCookie;
127
- private writeSessionCookie;
128
98
  shutdown(): Promise<void>;
129
99
  }
130
- /**
131
- * Whether something already answered this request: a redirect (`location` header — the signal the
132
- * `authorize` contract has always honoured) or a body queued on the response. The body check reads
133
- * AdonisJS's `response.hasLazyBody` structurally so a plain-object `ctx` double in a unit test
134
- * (which has neither) still works.
135
- */
136
100
  /** Whether this request can change state (everything but GET/HEAD/OPTIONS). Exported for tests. */
137
101
  export declare function isMutatingMethod(ctx: HttpContext): boolean;
138
102
  /**
@@ -143,8 +107,10 @@ export declare function isMutatingMethod(ctx: HttpContext): boolean;
143
107
  * cross-subdomain POST caller, and strict beats sorry here.
144
108
  */
145
109
  export declare function crossSiteRequest(ctx: HttpContext): boolean;
146
- /** Role convention (see enforce): no roles = full access; with roles, mutating needs operator/admin. */
147
- export declare function sessionCanMutate(session: {
148
- roles: string[];
149
- }): boolean;
110
+ /**
111
+ * Who a mutating console action is attributed to: the signed-in user (`ctx.auth.user`'s `email`,
112
+ * `name` or `id`, read structurally — this package does not depend on `@adonisjs/auth`), `'bearer'`
113
+ * for a caller with an `Authorization` header and no user, else `'anonymous'`.
114
+ */
115
+ export declare function auditActor(ctx: HttpContext): string;
150
116
  //# sourceMappingURL=dashboard_provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard_provider.d.ts","sourceRoot":"","sources":["../../providers/dashboard_provider.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAqB,MAAM,sBAAsB,CAAC;AAiFlF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACxB,SAAS,CAAC,GAAG,EAAE,kBAAkB;IAA7C,YAAsB,GAAG,EAAE,kBAAkB,EAAI;IAEjD,oGAAoG;IACpG,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,sBAAsB,CAAS;IAEvC;;qGAEiG;IACjG,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA+B;IAE7D,yEAAyE;IACzE,OAAO,CAAC,gBAAgB;IAkBxB,yFAAyF;IACzF,OAAO,CAAC,QAAQ,CAA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