
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@glidemq/fastify
Advanced tools
Fastify plugin for glide-mq - queue management REST API and SSE events
Fastify v5 plugin that turns glide-mq queues into a REST API with real-time SSE. Two registrations give you queue operations, schedulers, flow orchestration over HTTP, rolling usage summaries, and broadcast routes.
createTestApp builds an in-memory Fastify instance for app.inject() assertionsPOST /:name/produce endpoint for Lambda/edge functions that only enqueue jobsnpm install @glidemq/fastify glide-mq fastify
Optional - install zod for request validation (falls back to manual checks otherwise).
Requires glide-mq >= 0.14.0 and Fastify 5+.
import Fastify from "fastify";
import { glideMQPlugin, glideMQRoutes } from "@glidemq/fastify";
const app = Fastify();
await app.register(glideMQPlugin, {
connection: { addresses: [{ host: "localhost", port: 6379 }] },
queues: {
emails: {
processor: async (job) => {
await sendEmail(job.data.to, job.data.subject);
return { sent: true };
},
concurrency: 5,
},
},
});
await app.register(glideMQRoutes, { prefix: "/api/queues" });
await app.listen({ port: 3000 });
glideMQPlugin creates a registry on app.glidemq. glideMQRoutes mounts the full queue-management API. The onClose hook handles graceful shutdown.
glide-mq 0.14+ provides AI orchestration primitives - token/cost tracking, real-time streaming, human-in-the-loop suspend/signal, model failover chains, budget caps, dual-axis rate limiting, and vector search. This plugin exposes dedicated AI and flow endpoints:
GET /:name/flows/:id/usage - aggregate token counts, costs, and model usage across a flow (parent + children)GET /:name/flows/:id/budget - read budget state for a flow (caps, used amounts, exceeded status)POST /flows - create a tree flow or DAG over HTTP with { flow, budget? } or { dag }GET /flows/:id - inspect a flow snapshot with nodes, roots, counts, usage, and budgetGET /flows/:id/tree - inspect the nested tree view for a submitted tree flow or DAGDELETE /flows/:id - revoke or flag remaining jobs in a flow and delete the HTTP flow recordGET /:name/jobs/:id/stream - SSE stream of a job's streaming channel (supports lastId query param and Last-Event-ID header for resumption)GET /usage/summary - rolling per-queue or cross-queue usage summary from persisted minute bucketsPOST /broadcast/:name - publish a broadcast message with a subject, payload, and optional job optionsGET /broadcast/:name/events - SSE stream for broadcast delivery; requires subscription and optionally filters subjectsAll other AI primitives (usage metadata on jobs, signals, budget keys, fallback index, TPM tokens) are included in job serialization automatically. HTTP-submitted budgets are currently supported for tree flows only, not DAG payloads.
// Get aggregated usage for a flow
const usage = await fetch("/api/queues/ai-tasks/flows/flow-123/usage");
// { tokens: { input: 1200, output: 800 }, totalTokens: 2000, costs: { input: 0.003 }, totalCost: 0.005, jobCount: 3, models: { "gpt-5.4": 3 } }
// Check budget state
const budget = await fetch("/api/queues/ai-tasks/flows/flow-123/budget");
// { maxTotalTokens: 10000, usedTokens: 2000, exceeded: false, onExceeded: "pause" }
// Stream job output via SSE
const stream = new EventSource("/api/queues/ai-tasks/jobs/job-456/stream");
stream.onmessage = (e) => console.log(JSON.parse(e.data));
interface GlideMQPluginOptions {
connection?: ConnectionOptions; // Required unless testing: true
queues: Record<string, QueueConfig>;
producers?: Record<string, ProducerConfig>;
prefix?: string; // Valkey key prefix (default: "glide")
testing?: boolean; // In-memory mode, no Valkey needed
}
Route access control via GlideMQRoutesOptions:
await app.register(glideMQRoutes, {
prefix: "/api/queues",
queues: ["emails"], // restrict queue and broadcast names
producers: ["emails"], // restrict to specific producers
});
import { createTestApp } from "@glidemq/fastify/testing";
const { app } = await createTestApp({
emails: { processor: async (job) => ({ sent: true }) },
});
const res = await app.inject({
method: "POST",
url: "/emails/jobs",
payload: { name: "welcome", data: { to: "user@test.com" } },
});
// res.statusCode === 201
await app.close();
reply.hijack(), so Fastify onSend hooks do not run for SSE connections.@fastify/auth or @fastify/rate-limit in front of glideMQRoutes./flows*, GET /usage/summary, and broadcast routes require a live connection; they are unavailable in testing mode./^[a-zA-Z0-9_-]{1,128}$/.FAQs
Fastify plugin for glide-mq - queue management REST API and SSE events
We found that @glidemq/fastify demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.