bunqueue-dashboard 0.0.40 → 0.0.41

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 (69) hide show
  1. package/README.md +17 -3
  2. package/agent/manager/storageMode.ts +19 -0
  3. package/agent/manager.ts +5 -1
  4. package/agent/server/controlStatus.ts +5 -0
  5. package/dist/.vite/manifest.json +206 -189
  6. package/dist/assets/{AddJob-DkbI_J5p.js → AddJob-CFnESFEU.js} +1 -1
  7. package/dist/assets/{Alerts-CFj-u0iV.js → Alerts-CYwfGLSQ.js} +1 -1
  8. package/dist/assets/{Benchmark-Ey2sq57q.js → Benchmark-BINaJvak.js} +1 -1
  9. package/dist/assets/{BulkAddJobs-BwPoeSB6.js → BulkAddJobs-vyGFvlO3.js} +1 -1
  10. package/dist/assets/{CopilotPanel-CniuIIPn.js → CopilotPanel-DjHfX9ta.js} +1 -1
  11. package/dist/assets/{Cron-B5XFBvU-.js → Cron-CSoEPVeq.js} +1 -1
  12. package/dist/assets/{CronManager-Bdg2BECM.js → CronManager-s4xjNhGD.js} +1 -1
  13. package/dist/assets/Database-x6iWCu3-.js +3 -0
  14. package/dist/assets/{Diagnostics-BDRftXQy.js → Diagnostics-DFshXeHl.js} +1 -1
  15. package/dist/assets/{Dlq-CJO9itzJ.js → Dlq-Cayt1PEN.js} +1 -1
  16. package/dist/assets/{DlqControl-DZL2lHOU.js → DlqControl-BBQc6uu9.js} +1 -1
  17. package/dist/assets/DlqPro-BmrnGQ-3.js +1 -0
  18. package/dist/assets/Fleet-Bdrj9bLI.js +1 -0
  19. package/dist/assets/{Flows-BItJzbVQ.js → Flows-CcNdf_jS.js} +1 -1
  20. package/dist/assets/{JobInspector-CJHX63p_.js → JobInspector-BMjVR96H.js} +1 -1
  21. package/dist/assets/{Jobs-BwmTsjJx.js → Jobs-NN0fJ3BQ.js} +1 -1
  22. package/dist/assets/{JobsPro-eFVAZJ10.js → JobsPro-D_l1c80Q.js} +1 -1
  23. package/dist/assets/{Logs-CXIf58M4.js → Logs-BGeTppXO.js} +1 -1
  24. package/dist/assets/{LogsPro-Xm6rylAd.js → LogsPro-D7vvgZmb.js} +1 -1
  25. package/dist/assets/{McpServer-Rf3i6lRn.js → McpServer-AsaFGnYZ.js} +1 -1
  26. package/dist/assets/{Metrics-Cj3VYxzL.js → Metrics-CvoY4uhX.js} +1 -1
  27. package/dist/assets/{MetricsPro-C63eY00A.js → MetricsPro-C01FjqvR.js} +1 -1
  28. package/dist/assets/{Overview-CUM3XG7A.js → Overview-WStfS5ee.js} +1 -1
  29. package/dist/assets/{QueueActions-b19K0vCT.js → QueueActions-D51CYOjo.js} +1 -1
  30. package/dist/assets/{QueueControl-DusMoa05.js → QueueControl-Ce-O1L4p.js} +1 -1
  31. package/dist/assets/{QueueDetail-CpFIG1PU.js → QueueDetail-D5TKm4bv.js} +1 -1
  32. package/dist/assets/{QueueDetailPro-BNlBOj5s.js → QueueDetailPro-CFNQcKho.js} +1 -1
  33. package/dist/assets/{Queues-CZ2qc7FY.js → Queues-DlznHsfh.js} +1 -1
  34. package/dist/assets/QueuesOverview-DGtapyV0.js +1 -0
  35. package/dist/assets/{S3Backup-x4mOV-AO.js → S3Backup-CxwbLJGK.js} +1 -1
  36. package/dist/assets/{S3BackupPro-BtvbPVg-.js → S3BackupPro-8y0J0-3_.js} +2 -2
  37. package/dist/assets/{ServerControl-C5nQ7CCp.js → ServerControl-DpE7t-OF.js} +2 -2
  38. package/dist/assets/Settings-Bw5MtDTF.js +1 -0
  39. package/dist/assets/{Usage-UYovs3D-.js → Usage-DpShi3FE.js} +1 -1
  40. package/dist/assets/{UsagePro-bT82DS-d.js → UsagePro-D4cGbozz.js} +1 -1
  41. package/dist/assets/{Webhooks-BjsUMJAn.js → Webhooks-UYiTg6hn.js} +1 -1
  42. package/dist/assets/{Workers-CD4YZpca.js → Workers-D70B_uAI.js} +1 -1
  43. package/dist/assets/{WorkersPro-hCPhfb1Z.js → WorkersPro-YycNhm9w.js} +1 -1
  44. package/dist/assets/Workflows-BxlrgGEB.js +1 -0
  45. package/dist/assets/{api-BxYPEynh.js → api-BAGaBh6R.js} +1 -1
  46. package/dist/assets/bq-Qh0VFLKV.js +1 -0
  47. package/dist/assets/connectionStore-BJLihGaC.js +1 -0
  48. package/dist/assets/controlConnectionEpoch-CZsS0wAb.js +1 -0
  49. package/dist/assets/index-ByvrmBif.js +8 -0
  50. package/dist/assets/index-CxhXRVH_.css +1 -0
  51. package/dist/assets/{toastStore-B31o6Z5J.js → toastStore-IZn6OPLZ.js} +1 -1
  52. package/dist/assets/{useControlActionGuard-DT7uudrj.js → useControlActionGuard-B-bzKZKI.js} +1 -1
  53. package/dist/assets/usePolledData-0CVelkl2.js +1 -0
  54. package/dist/assets/{useServerActionGuard-Db7PPgaI.js → useServerActionGuard-uGePilQQ.js} +1 -1
  55. package/dist/assets/{useThroughputSeries-y7Yyi7Zh.js → useThroughputSeries-Cagm3qzB.js} +1 -1
  56. package/dist/index.html +7 -7
  57. package/package.json +4 -3
  58. package/scripts/embedded.gen.ts +152 -150
  59. package/dist/assets/Database-CB0oOEFB.js +0 -3
  60. package/dist/assets/DlqPro-OqBlzCnN.js +0 -1
  61. package/dist/assets/QueuesOverview-CBFqQ3N_.js +0 -1
  62. package/dist/assets/Settings-B5kCRSBH.js +0 -1
  63. package/dist/assets/Workflows-DOpeo-TP.js +0 -1
  64. package/dist/assets/bq-C7wdABtE.js +0 -1
  65. package/dist/assets/connectionStore-CFuNYZ_8.js +0 -1
  66. package/dist/assets/controlConnectionEpoch-DzbuWOhe.js +0 -1
  67. package/dist/assets/index-AUHH2nTG.js +0 -8
  68. package/dist/assets/index-BK7fjWKK.css +0 -1
  69. package/dist/assets/usePolledData-CNtNtd0a.js +0 -1
package/README.md CHANGED
@@ -104,6 +104,7 @@ contracts; it never patches Bunqueue internals.
104
104
  | Area | Where | What you can do |
105
105
  | --- | --- | --- |
106
106
  | **Home** | Overview | Live health banner, throughput, queue health, recent activity |
107
+ | **Fleet** | Fleet | Probe and operate multiple Bunqueue APIs + paired agents; verify shared PostgreSQL target/namespace topology |
107
108
  | **Server** | Control ▸ Server | **Start / stop / restart** the server process, edit its config, tail process logs |
108
109
  | **Enqueue** | Control ▸ Add Job | Add jobs (single or bulk) with every option |
109
110
  | **Inspect** | Control ▸ Job Inspector | Look up any job; promote / re-prioritize / delay; view data & result |
@@ -192,14 +193,22 @@ flowchart LR
192
193
  - **Writes** through the same HTTP API, with every mutation shape-verified against the live server.
193
194
  - **Process lifecycle**, the one thing HTTP can't do, is delegated to the local control agent.
194
195
 
196
+ For multiple brokers, create one named Dashboard profile and one paired control
197
+ agent per broker. The Fleet page probes all profiles without retargeting the
198
+ active UI, groups brokers that share an exact PostgreSQL target + namespace,
199
+ and drives each node's Start/Stop/Restart controls. Queue state is shared by
200
+ PostgreSQL; lifecycle, process logs/config, in-memory webhooks, and each agent's
201
+ Workflow Engine store remain node-local. See the
202
+ [Fleet guide](https://egeominotti.github.io/bunqueue-dashboard/docs/guide/fleet).
203
+
195
204
  Two HTTP clients coexist on purpose: `src/lib/api.ts` (first-generation view pages) and
196
205
  `src/lib/bq.ts` (the complete, shape-verified client used by every `Control ▸ *` page). See
197
206
  [`docs/`](docs/README.md) for the full, source-verified reference.
198
207
 
199
208
  ## Configuration
200
209
 
201
- The `VITE_*` dashboard defaults are build-time values and can **also** be changed at runtime from
202
- the in-app **Settings** page. The all-in-one server reads the non-`VITE_*` runtime variables below.
210
+ The `VITE_*` dashboard defaults are build-time values and can **also** seed the first named profile
211
+ in **Settings**. Add up to 32 broker/agent profiles at runtime. The all-in-one server reads the non-`VITE_*` runtime variables below.
203
212
  Copy [`.env.example`](.env.example) to `.env` to set defaults.
204
213
 
205
214
  | Variable | Purpose | Default |
@@ -253,6 +262,8 @@ target-pinned Flow, Workflow, Queue and Backup agent operations.
253
262
  | `bun run check` | Oxlint + Oxfmt validation (the CI gate) |
254
263
  | `bun run check:fix` | Apply safe Oxlint fixes, then format with Oxfmt |
255
264
  | `bun test` | Unit + agent-lifecycle tests |
265
+ | `bun run test:e2e` | Real Flow, Workflow, Queue SDK, and three-broker PostgreSQL runtime tests |
266
+ | `bun run test:e2e:postgres-fleet` | Three authenticated Bunqueue 2.9.2 brokers + three agents sharing disposable PostgreSQL 18.6 |
256
267
 
257
268
  ## Docker
258
269
 
@@ -300,7 +311,10 @@ bun run quality # architecture, lint/build, size, docs, coverage, real E2E, pa
300
311
  ```
301
312
 
302
313
  The E2E stage starts disposable Bunqueue 2.9.2 processes and exercises the complete FlowProducer,
303
- Workflow Engine, and Queue SDK operator bridges. Run it alone with `bun run test:e2e`.
314
+ Workflow Engine, and Queue SDK operator bridges. It also starts PostgreSQL 18.6 in Docker with
315
+ three authenticated brokers and paired agents, proving cross-broker enqueue/inspect/leased
316
+ pull+ack, pause/resume, cron, and rate-limit behavior. Run it alone with `bun run test:e2e` (Docker
317
+ is required for the PostgreSQL stage).
304
318
 
305
319
  The blocking browser job builds the production bundle under `/e2e/dashboard`, starts an
306
320
  authenticated disposable Bunqueue server, and drives the UI with Playwright on Chromium, Firefox,
@@ -23,6 +23,25 @@ export function managedPostgresNamespace(config: ServerConfig): string {
23
23
  );
24
24
  }
25
25
 
26
+ /** Credential-free PostgreSQL cluster label safe to expose to authenticated operators. */
27
+ export function managedPostgresTarget(config: ServerConfig): string | undefined {
28
+ const configured = managedPostgresUrl(config);
29
+ if (!configured) return undefined;
30
+ try {
31
+ const parsed = new URL(configured);
32
+ if (
33
+ (parsed.protocol !== 'postgres:' && parsed.protocol !== 'postgresql:') ||
34
+ !parsed.hostname
35
+ ) {
36
+ return undefined;
37
+ }
38
+ const database = decodeURIComponent(parsed.pathname.replace(/^\/+/, '')) || 'postgres';
39
+ return `${parsed.hostname}:${parsed.port || '5432'}/${database}`;
40
+ } catch {
41
+ return undefined;
42
+ }
43
+ }
44
+
26
45
  /** Fail before spawning when Bunqueue would reject an incomplete PostgreSQL config. */
27
46
  export function validateManagedStorage(config: ServerConfig): ManagedStorageMode {
28
47
  const mode = managedStorageMode(config);
package/agent/manager.ts CHANGED
@@ -1,7 +1,11 @@
1
1
  /** Public compatibility entrypoint for managed bunqueue process supervision. */
2
2
  export { validateConfigPatch } from './manager/config';
3
3
  export { ProcessManager } from './manager/process';
4
- export { managedPostgresNamespace, managedStorageMode } from './manager/storageMode';
4
+ export {
5
+ managedPostgresNamespace,
6
+ managedPostgresTarget,
7
+ managedStorageMode,
8
+ } from './manager/storageMode';
5
9
  export type {
6
10
  DbStats,
7
11
  LogLine,
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  managedPostgresNamespace,
3
+ managedPostgresTarget,
3
4
  managedStorageMode,
4
5
  type ProcessManager,
5
6
  } from '../manager';
@@ -64,6 +65,8 @@ export async function statusWithHealth(
64
65
  storageMode: currentStorageMode,
65
66
  postgresNamespace:
66
67
  currentStorageMode === 'postgres' ? managedPostgresNamespace(currentConfig) : undefined,
68
+ postgresTarget:
69
+ currentStorageMode === 'postgres' ? managedPostgresTarget(currentConfig) : undefined,
67
70
  db: await statusDatabase(manager, currentConfig),
68
71
  };
69
72
  }
@@ -76,6 +79,8 @@ export async function statusWithHealth(
76
79
  storageMode,
77
80
  postgresNamespace:
78
81
  storageMode === 'postgres' ? managedPostgresNamespace(effectiveConfig) : undefined,
82
+ postgresTarget:
83
+ storageMode === 'postgres' ? managedPostgresTarget(effectiveConfig) : undefined,
79
84
  db: database,
80
85
  };
81
86
  }