@glidemq/dashboard

中文文档
0.4.3发布于 2026/10/24Apache-2.0TypeScriptCommonJS零依赖构建来源已验证近 30 天下载 44.1万

Web dashboard for glide-mq - queue monitoring, management, and AI observability

原始使用文档
文档目录8 节
  1. Why
  2. Install
  3. Quick start
  4. AI-native features
  5. API
  6. Limitations
  7. Links
  8. License

@glidemq/dashboard

npm license

Real-time dashboard for glide-mq - queue monitoring with AI observability. Drop-in Express middleware, no frontend build required.

Why

  • Instant visibility - see job counts, states, workers, and throughput without writing tooling
  • Live updates - SSE pushes job events to the browser as they happen, no polling
  • Operational control - pause, resume, drain, retry, and clean queues from a point-and-click UI

Install

npm install @glidemq/dashboard glide-mq express

Requires glide-mq >= 0.15.2 and Express 4 or 5.

Compatibility is tested with glide-mq 0.20.0. The minimum supported peer range and dashboard HTTP behavior remain unchanged.

Quick start

import express from "express";
import { Queue } from "glide-mq";
import { createDashboard } from "@glidemq/dashboard";

const app = express();
const queue = new Queue("payments", {
  connection: { addresses: [{ host: "localhost", port: 6379 }] },
});

app.use("/dashboard", createDashboard([queue]));
app.listen(3000);
// Open http://localhost:3000/dashboard

AI-native features

Job detail views include AI fields when present: usage (record-based token/cost breakdown), signals, budgetKey, fallbackIndex, and tpmTokens.

Three dedicated endpoints expose AI orchestration state:

  • GET /api/queues/:name/flows/:id/usage - Aggregated token/cost usage across all jobs in a flow. Returns the combined usage record.
  • GET /api/queues/:name/flows/:id/budget - Budget state for a flow - current spend, per-category caps, remaining budget. Returns 404 if no budget is set.
  • GET /api/usage/summary - Rolling usage totals across all mounted queues or a ?queues= subset. Supports start, end, window, and windowMs.
  • GET /api/queues/:name/jobs/:id/stream - SSE endpoint for streaming job output chunks. Supports ?lastId= for resumption. Returns event: chunk messages with entry fields as data.

SSE event stream (/api/events) now includes usage, suspended, and budget-exceeded events alongside the standard queue lifecycle events.

For write-side flow orchestration over HTTP (POST /flows, GET /flows/:id, GET /flows/:id/tree, DELETE /flows/:id), use the core glide-mq proxy or the HTTP wrapper integrations: @glidemq/hono, @glidemq/fastify, and @glidemq/hapi. The dashboard stays focused on inspection and operations.

API

createDashboard(queues: Queue[], opts?: DashboardOptions): Router
OptionTypeDefaultDescription
queueEventsQueueEvents[][]Instances for real-time SSE events
readOnlybooleanfalseBlock all mutation routes with 403
authorize(req, action) => boolean | Promise<boolean>-Per-action authorization callback

Action strings: queue:pause, queue:resume, queue:obliterate, queue:drain, queue:retryAll, queue:clean, job:remove, job:retry, job:promote, job:changePriority, job:changeDelay, scheduler:upsert, scheduler:remove

app.use(
  "/dashboard",
  createDashboard(queues, {
    authorize: (req, action) => {
      if (action === "queue:obliterate") return req.session?.user?.role === "admin";
      return true;
    },
  })
);

Limitations

  • Express only. No built-in adapter for Fastify, Hono, or Koa.
  • Middleware, not a standalone server - mount it on an existing Express app.
  • Requires glide-mq Queue instances. Does not connect to Valkey/Redis directly.

License

Apache-2.0

版本与发布记录

@glidemq/dashboard 共发布 6 个版本,首次发布于 2026/02/24;过去 12 个月发布了 6 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.4.3latest2026/10/2423 天前
0.4.22026/10/061 个月前
0.4.12026/04/067 个月前
0.4.02026/04/027 个月前
0.3.02026/03/287 个月前
0.2.02026/02/248 个月前

关于 @glidemq/dashboard 的常见问题

@glidemq/dashboard 是什么?

Web dashboard for glide-mq - queue monitoring, management, and AI observability

如何安装 @glidemq/dashboard?

在项目目录运行 npm install @glidemq/dashboard,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:express(^4 || ^5)、glide-mq(>=0.15.2)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@glidemq/dashboard 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@glidemq/dashboard 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@glidemq/dashboard 可以商用吗?

@glidemq/dashboard 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@glidemq/dashboard 的下载量有多少?

根据 npm 官方下载统计,@glidemq/dashboard 在 2026/10/17 – 2026/11/15 这 30 天内被下载 440,878 次,日均约 14,696 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@glidemq/dashboard 还在维护吗?

最新版本 0.4.3 发布于 2026/10/24(23 天前);至今共发布 6 个版本,其中过去 12 个月发布了 6 个;首次发布于 2026/02/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。