Relocate the ~6k-file docs tree from the repo root into plugins/document-navigator/docs/ so the plugin is self-contained and portable. docs/superpowers/ (specs and plans) stays at the repo root. Moved via cp+rm rather than git mv because directory rename() fails with EPERM on this WSL /mnt DrvFs mount; git rename-detection pairs the identical-content files at commit time. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@suaveplan/queue-distribution-http - HTTP transport plugin for @suaveplan/queue-distribution: HttpWorkerCommunicator (fetch-backed, Zod-validated wire envelope) and RemoteWorker (AbstractWorker subclass with @suaveplan/retry-backed connect / reconnect / health loop).
Summary
HTTP transport plugin for @suaveplan/queue-distribution. Ships HttpWorkerCommunicator (a fetch-backed WorkerCommunicator with a Zod-validated wire envelope, injectable fetch, structured timeouts, and AbortSignal threading) and RemoteWorker (an AbstractWorker subclass driving the communicator with bounded exponential-backoff connect retries via @suaveplan/retry).
The plugin lives separately from the core distribution package so browser-only and worker-thread-only consumers don't have to carry HTTP transport code they never use.
Documentation tree
- base — (no submodules)
- base — (no submodules)
- http — (no submodules)
- http-communicator — (no submodules)
- errors — (no submodules)
- queue-distribution-http-error — (no submodules)
- observability — (no submodules)
- instruments — (no submodules)
- remote — (no submodules)
- remote — (no submodules)
Install
bun add @suaveplan/queue-distribution-http
Quick start
import { WorkerPool, WorkerManager } from "@suaveplan/queue-distribution";
import {
HttpWorkerCommunicator,
RemoteWorker,
} from "@suaveplan/queue-distribution-http";
const communicator = new HttpWorkerCommunicator({
defaultTimeoutMs: 5_000,
headers: { Authorization: `Bearer ${token}` },
});
const pool = new WorkerPool();
pool.addWorker(new RemoteWorker("https://worker-a.example", communicator, { id: "a" }));
pool.addWorker(new RemoteWorker("https://worker-b.example", communicator, { id: "b" }));
await pool.startAllWorkers();
const manager = new WorkerManager(pool, {
autoHealthCheck: false,
maxTaskRetries: 3,
});
const result = await manager.assignTask(task, input);
Modules
- Errors —
QueueDistributionHttpError+ 6 stableHTTP.*codes. - WorkerCommunicator base — interface +
AbstractWorkerCommunicator. - HttpWorkerCommunicator — fetch-backed transport.
- RemoteWorker — connect / reconnect / health loop.
- Observability — OTel counters, histograms, tracers.
Design highlights
- 100% test coverage (statements + branches + functions + lines).
- Injectable
fetchandClock— deterministic under test, swappable for auth-wrapped fetch in production. - Connect retries routed through
@suaveplan/retry'ssleep; bounded loop, no recursion. - Zod-validated wire envelope rejects malformed payloads at the boundary.
- Structured
QueueDistributionHttpErrorsubclasses with a frozen stable-code registry.
Status
Part of the rebuild — version 0.1.0 while it stabilises.