bunqueue-dashboard 0.0.32 → 0.0.34
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.
- package/README.md +44 -15
- package/agent/db.ts +537 -64
- package/agent/dbQueryWorker.ts +34 -11
- package/agent/manager.ts +186 -45
- package/agent/server.ts +124 -35
- package/dist/.vite/manifest.json +212 -157
- package/dist/assets/AddJob-Cih9F84t.js +3 -0
- package/dist/assets/Alerts-Dp4Vclez.js +1 -0
- package/dist/assets/{AreaChart-2gM0YoZT.js → AreaChart-REK4ZsTC.js} +1 -1
- package/dist/assets/Benchmark-X_gdZun5.js +1 -0
- package/dist/assets/BulkAddJobs-CXTpYMZf.js +5 -0
- package/dist/assets/CopilotPanel-CIXpcwkH.js +44 -0
- package/dist/assets/Cron-DUHkse77.js +1 -0
- package/dist/assets/CronManager-BeYrLK2E.js +1 -0
- package/dist/assets/Database-CXPb3XGr.js +3 -0
- package/dist/assets/Diagnostics-DDtoiDYT.js +1 -0
- package/dist/assets/Dlq-CX_uRblW.js +1 -0
- package/dist/assets/DlqControl-CazFmSEd.js +1 -0
- package/dist/assets/DlqPro-HSffdtLJ.js +1 -0
- package/dist/assets/Flows-CGmyghKF.js +1 -0
- package/dist/assets/JobInspector-B9i1HnG5.js +2 -0
- package/dist/assets/Jobs-BZGtMnJI.js +1 -0
- package/dist/assets/JobsPro-tmEN8f-P.js +1 -0
- package/dist/assets/Logs-DxUD9V2A.js +1 -0
- package/dist/assets/LogsPro-BTQhvPKj.js +1 -0
- package/dist/assets/McpServer-D5rwBg74.js +22 -0
- package/dist/assets/Metrics-CSPpBf1m.js +1 -0
- package/dist/assets/MetricsPro-DSn-3qNT.js +1 -0
- package/dist/assets/Overview-StvHYRZ5.js +1 -0
- package/dist/assets/{Pagination-B9JDi5MI.js → Pagination-eotgGQf9.js} +1 -1
- package/dist/assets/QueueActions-CibRLzrz.js +1 -0
- package/dist/assets/QueueControl-DwYNcMfI.js +1 -0
- package/dist/assets/QueueDetail-NMfKwj6E.js +1 -0
- package/dist/assets/QueueDetailPro-C8SBjX09.js +1 -0
- package/dist/assets/Queues-BeTAi8V8.js +1 -0
- package/dist/assets/QueuesOverview-BfQO8NS4.js +1 -0
- package/dist/assets/S3Backup-BYkAtONl.js +1 -0
- package/dist/assets/S3BackupPro-BP1Ch54R.js +2 -0
- package/dist/assets/ServerControl-C85jYgyN.js +3 -0
- package/dist/assets/Settings-DjP28c_5.js +1 -0
- package/dist/assets/Usage-DECeEsO2.js +1 -0
- package/dist/assets/UsagePro-CD7dgt3d.js +1 -0
- package/dist/assets/Webhooks-Ct-x8DD1.js +1 -0
- package/dist/assets/Workers-lP1BXHFq.js +1 -0
- package/dist/assets/WorkersPro-CAUqy3Cp.js +1 -0
- package/dist/assets/connectionStore-Cd9-3Fw0.js +1 -0
- package/dist/assets/flowMutationSafety-DVD1IMr-.js +1 -0
- package/dist/assets/form-DsUq0w8s.js +1 -0
- package/dist/assets/index-BWoUj86M.css +1 -0
- package/dist/assets/index-Dr__4DsT.js +8 -0
- package/dist/assets/install-DPCcfOYo.js +3 -0
- package/dist/assets/jobActions-LQD4KfCc.js +1 -0
- package/dist/assets/promisePool-BVfQ9n9Q.js +1 -0
- package/dist/assets/{react-vendor-BcouBxpZ.js → react-vendor-Bjui4wS4.js} +1 -1
- package/dist/assets/upstreamPaths-nG8N1XAz.js +1 -0
- package/dist/assets/useServerActionGuard-CItj3hvh.js +1 -0
- package/dist/assets/useThroughputSeries-Bpyg6Jaq.js +1 -0
- package/dist/index.html +5 -4
- package/package.json +11 -3
- package/scripts/embedded.gen.ts +132 -126
- package/scripts/serve.ts +259 -67
- package/dist/assets/AddJob-Dvpp--yq.js +0 -3
- package/dist/assets/Alerts-CR9jgCCs.js +0 -1
- package/dist/assets/Benchmark-CkL-Ee-M.js +0 -1
- package/dist/assets/BulkAddJobs-wI6cRZnX.js +0 -5
- package/dist/assets/CopilotPanel-DPZV9opm.js +0 -44
- package/dist/assets/Cron-gWVkYWad.js +0 -1
- package/dist/assets/CronManager-BvfW219u.js +0 -1
- package/dist/assets/Database-D2T_ZIGA.js +0 -3
- package/dist/assets/Diagnostics-C2goqq5h.js +0 -1
- package/dist/assets/Dlq-Q4TmmZrK.js +0 -1
- package/dist/assets/DlqControl-C5BfE7Gq.js +0 -1
- package/dist/assets/DlqPro-ClPNmw-X.js +0 -1
- package/dist/assets/Flows-DbhMbvSG.js +0 -1
- package/dist/assets/JobInspector-CO_zKjSX.js +0 -2
- package/dist/assets/Jobs-D2rDHPM_.js +0 -1
- package/dist/assets/JobsPro-Drdgdj3s.js +0 -1
- package/dist/assets/Logs-DjwGuRLi.js +0 -1
- package/dist/assets/LogsPro-7uTBjPWX.js +0 -1
- package/dist/assets/McpServer-DAklQDB5.js +0 -22
- package/dist/assets/Metrics-Dup9Zinh.js +0 -1
- package/dist/assets/MetricsPro-PP3TymeP.js +0 -1
- package/dist/assets/Overview-C7RCDE6r.js +0 -1
- package/dist/assets/QueueActions-DJTw0h2g.js +0 -1
- package/dist/assets/QueueControl-CxKjUjF-.js +0 -1
- package/dist/assets/QueueDetail-bf2n-r2h.js +0 -1
- package/dist/assets/QueueDetailPro-C-XLWFBa.js +0 -1
- package/dist/assets/Queues-CMQW89J9.js +0 -1
- package/dist/assets/QueuesOverview-x7-akDzf.js +0 -1
- package/dist/assets/S3Backup-1jAySC9R.js +0 -1
- package/dist/assets/S3BackupPro-BG_0OHW7.js +0 -1
- package/dist/assets/ServerControl-DohTB--h.js +0 -3
- package/dist/assets/Settings-CnS5PjNe.js +0 -1
- package/dist/assets/Usage-C3H0hMSA.js +0 -1
- package/dist/assets/UsagePro-CdnQkP9o.js +0 -1
- package/dist/assets/Webhooks-CAwVmIEZ.js +0 -1
- package/dist/assets/Workers-lvujKZwF.js +0 -1
- package/dist/assets/WorkersPro-CIJKl7U1.js +0 -1
- package/dist/assets/connectionStore-DO6xQY7h.js +0 -1
- package/dist/assets/form-DGinTEEb.js +0 -1
- package/dist/assets/index-DcVOpnSj.css +0 -1
- package/dist/assets/index-r1ZMLIZ9.js +0 -8
- package/dist/assets/install-BIVfix28.js +0 -3
- package/dist/assets/jobActions-CuOdMglt.js +0 -1
- package/dist/assets/promisePool-Daxkc1OB.js +0 -1
- package/dist/assets/useThroughputSeries-CVKzWzdv.js +0 -1
package/README.md
CHANGED
|
@@ -88,8 +88,11 @@ The full dashboard running on sample data, no server needed.
|
|
|
88
88
|
## Why
|
|
89
89
|
|
|
90
90
|
bunqueue exposes a rich HTTP API, but operating it by hand (curl, ad-hoc scripts) is slow and
|
|
91
|
-
error-prone. This dashboard is a
|
|
92
|
-
|
|
91
|
+
error-prone. This dashboard is a production-oriented operator console: it exposes the verified,
|
|
92
|
+
safe subset of the API, fails closed where
|
|
93
|
+
[v2.8.55](https://github.com/egeominotti/bunqueue/releases/tag/v2.8.55) lacks atomic
|
|
94
|
+
flow-safety guarantees, and also manages the
|
|
95
|
+
server *process* through a separate guarded agent.
|
|
93
96
|
|
|
94
97
|
It talks **only** to bunqueue's public HTTP API (`:6790`) and a small local **control agent**. It
|
|
95
98
|
never imports or modifies bunqueue itself, so it tracks any bunqueue server you point it at.
|
|
@@ -101,16 +104,20 @@ never imports or modifies bunqueue itself, so it tracks any bunqueue server you
|
|
|
101
104
|
| **Home** | Overview | Live health banner, throughput, queue health, recent activity |
|
|
102
105
|
| **Server** | Control ▸ Server | **Start / stop / restart** the server process, edit its config, tail process logs |
|
|
103
106
|
| **Enqueue** | Control ▸ Add Job | Add jobs (single or bulk) with every option |
|
|
104
|
-
| **Inspect** | Control ▸ Job Inspector | Look up any job; promote /
|
|
105
|
-
| **Queues** | Control ▸ Queue Control | Pause / resume /
|
|
106
|
-
| **Cron** | Control ▸ Cron Manager |
|
|
107
|
-
| **DLQ** | Control ▸ DLQ | Inspect
|
|
107
|
+
| **Inspect** | Control ▸ Job Inspector | Look up any job; promote / re-prioritize / delay; view data & result |
|
|
108
|
+
| **Queues** | Control ▸ Queue Control | Pause / resume / promote, explicit desired-state limits, stall config & guarded DLQ policy |
|
|
109
|
+
| **Cron** | Control ▸ Cron Manager | Submit acknowledged cron/interval upserts and delete schedules |
|
|
110
|
+
| **DLQ** | Control ▸ DLQ | Inspect entries, failure history and CSV exports; retry and purge stay unavailable |
|
|
108
111
|
| **Webhooks** | Control ▸ Webhooks | Create / enable / delete job-event webhooks |
|
|
109
112
|
| **Ops** | Control ▸ Diagnostics | Health, ping, storage, memory, connections, totals |
|
|
110
113
|
| **Browse** | Queues / Jobs / DLQ / Cron / Metrics / Workers / Logs | Read-only browsing with basic actions |
|
|
111
114
|
|
|
112
|
-
>
|
|
113
|
-
>
|
|
115
|
+
> Job actions are gated by the v2.8.55 flow contract. Every DLQ retry and completed-job requeue is
|
|
116
|
+
> unavailable: the DLQ GET + POST sequence has no atomic generation/state/topology precondition and
|
|
117
|
+
> can target a job recreated under the same ID, while `retryCompleted` does not rebuild dependency
|
|
118
|
+
> registration or flow order. Cancel, Discard, Drain, Clean, Obliterate and DLQ Purge also fail
|
|
119
|
+
> closed. DLQ `maxAge`/`maxEntries` are read-only, auto-retry can only be disabled, and Copilot's only
|
|
120
|
+
> mutations are Promote, Pause and Resume.
|
|
114
121
|
|
|
115
122
|
## Quick start
|
|
116
123
|
|
|
@@ -127,7 +134,8 @@ One command, **zero dependencies** (a 543 kB download): serves the prebuilt dash
|
|
|
127
134
|
http://127.0.0.1:8080, proxies `/api/*` to your bunqueue server (`BUNQUEUE_URL`, default
|
|
128
135
|
`http://localhost:6790`), and runs the control agent on `127.0.0.1:6800`. Same env knobs as the
|
|
129
136
|
standalone binaries: `PORT` · `BIND_ADDR` · `BUNQUEUE_URL` · `AGENT_PORT` ·
|
|
130
|
-
`AGENT_ALLOWED_ORIGINS` · `AGENT_TOKEN` · `
|
|
137
|
+
`AGENT_ALLOWED_ORIGINS` · `AGENT_ALLOWED_HOSTS` · `AGENT_TOKEN` · `BUNQUEUE_TOKEN` ·
|
|
138
|
+
`TRUST_PROXY` · `BUNQUEUE_START_CMD`.
|
|
131
139
|
|
|
132
140
|
Install it permanently instead of running via `bunx`:
|
|
133
141
|
|
|
@@ -189,11 +197,27 @@ in-app **Settings** page. Copy [`.env.example`](.env.example) to `.env` to set d
|
|
|
189
197
|
| Variable | Purpose | Default |
|
|
190
198
|
| --- | --- | --- |
|
|
191
199
|
| `VITE_BUNQUEUE_URL` | bunqueue server origin | `/api` (dev proxy → `:6790`) |
|
|
192
|
-
| `VITE_BUNQUEUE_TOKEN` | Bearer token, if the server has `AUTH_TOKENS` set | _none_ |
|
|
193
200
|
| `VITE_BUNQUEUE_AGENT_URL` | Control-agent origin | `http://localhost:6800` |
|
|
201
|
+
| `BIND_ADDR` | All-in-one dashboard bind address | `127.0.0.1` |
|
|
194
202
|
| `AGENT_PORT` | Control-agent port | `6800` |
|
|
195
203
|
| `AGENT_ALLOWED_ORIGINS` | Extra browser origins allowed to drive the agent (comma-separated) | dev defaults |
|
|
196
|
-
| `
|
|
204
|
+
| `AGENT_ALLOWED_HOSTS` | Extra Host names/IPs accepted by the all-in-one server and agent | loopback names |
|
|
205
|
+
| `AGENT_TOKEN` | Agent bearer token; mandatory on every bridged route for LAN/proxy access | _none_ (local-only) |
|
|
206
|
+
| `BUNQUEUE_TOKEN` | Admin-API bearer; mandatory on every `/api/*` route for LAN/proxy access | _none_ (`/api` remote-disabled) |
|
|
207
|
+
| `TRUST_PROXY` | Trust an overwritten `X-Forwarded-Host` from a Host-rewriting proxy (`1`) | _off_ |
|
|
208
|
+
|
|
209
|
+
Server and agent bearer tokens are secrets: enter them in **Settings** or the
|
|
210
|
+
authentication prompt for the current browser session. Do not put secrets in a
|
|
211
|
+
`VITE_*` variable; Vite values are compiled as plaintext into the public bundle.
|
|
212
|
+
|
|
213
|
+
For `BIND_ADDR=0.0.0.0`, list every LAN hostname/IP in
|
|
214
|
+
`AGENT_ALLOWED_HOSTS` (or its full origin in `AGENT_ALLOWED_ORIGINS`) and set
|
|
215
|
+
both `AGENT_TOKEN` and `BUNQUEUE_TOKEN`. Enter `BUNQUEUE_TOKEN` as the Server
|
|
216
|
+
token in Settings; when Bunqueue itself uses `AUTH_TOKENS`, use the same token
|
|
217
|
+
there so the forwarded Authorization header is valid upstream. Behind a reverse
|
|
218
|
+
proxy, allowlist the public origin; if it rewrites `Host`, also allowlist the
|
|
219
|
+
rewritten Host and use `TRUST_PROXY=1` only when the proxy overwrites
|
|
220
|
+
`X-Forwarded-Host`.
|
|
197
221
|
|
|
198
222
|
## Scripts
|
|
199
223
|
|
|
@@ -282,10 +306,15 @@ The control agent can spawn processes, so it is hardened by design (`agent/serve
|
|
|
282
306
|
- Binds **`127.0.0.1` only**.
|
|
283
307
|
- **CORS locked to an allowlist**, `Access-Control-Allow-Origin` is never `*`.
|
|
284
308
|
- Requests carrying a **disallowed `Origin` are rejected (403)** before reaching the process manager, blocking drive-by CSRF from a malicious tab.
|
|
285
|
-
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
309
|
+
- A **Host allowlist** blocks DNS-rebinding requests and fails closed for unknown names.
|
|
310
|
+
- Truly local agent reads stay zero-configuration; any LAN/proxied `/agent` bridge requires **`AGENT_TOKEN` on every route**.
|
|
311
|
+
- The all-in-one server requires **`BUNQUEUE_TOKEN` on every LAN/proxied `/api/*` route**; without it the API proxy returns `403` before contacting Bunqueue.
|
|
312
|
+
- Embedded and Docker responses deny framing, MIME sniffing and referrer leakage.
|
|
313
|
+
|
|
314
|
+
Keep the direct agent port on loopback. Static/Caddy deployments that expose Bunqueue directly must
|
|
315
|
+
still use Bunqueue `AUTH_TOKENS` or front-proxy authentication; the all-in-one `BUNQUEUE_TOKEN`
|
|
316
|
+
boundary applies only to `scripts/serve.ts`. Host/Origin checks are not user authentication. See
|
|
317
|
+
[`docs/known-issues.md`](docs/known-issues.md) for the honest, verified limitations.
|
|
289
318
|
|
|
290
319
|
## Contributing
|
|
291
320
|
|