@dopl/client
v0.12.1
Published
Shared HTTP client for the Dopl API — consumed by @dopl/mcp-server and @dopl/cli
Maintainers
Readme
@dopl/client
Shared HTTP client for the Dopl API. Consumed by @dopl/cli and @dopl/mcp-server — extracted into its own package so behavior never drifts between the two channels.
Most users want one of those packages, not this one directly.
What's inside
DoplClient— typed HTTP client with progressive-disclosure methods across packs, clusters, canvas, ingest, and entries.DoplTransport— internal transport with retries (jittered exponential backoff for idempotent methods,Retry-Afterhonored on 429), structured error parsing, and adebugnamespace.- Typed errors —
DoplApiError(with parsedcode/apiMessage/detailsfrom the canonical{ error: { code, message, details } }body shape),DoplAuthError,DoplNetworkError,DoplTimeoutError.
Usage (advanced)
import { DoplClient } from "@dopl/client";
const client = new DoplClient("https://www.usedopl.com", process.env.DOPL_API_KEY!, {
clientIdentifier: "[email protected]",
});
const { packs } = await client.listPacks();The clientIdentifier is sent as X-Dopl-Client on every request and used for server-side adoption analytics.
Debug
DEBUG=dopl:client node my-script.jsLogs each request as METHOD /path → status in Nms. The Authorization header is never logged.
Related
@dopl/cli—doplshell binary built on this client.@dopl/mcp-server— MCP server built on this client.- CHANGELOG.md — release history.
MIT License.
