Skip to content

QDash TypeScript Client ​

@oqtopus-team/qdash-client provides typed QDash API access for Node.js applications, extensions, and agent integrations.

Installation ​

Install the package from npm. Node.js 20 or later is required.

bash
npm install @oqtopus-team/qdash-client

Changes to the client, API schema, or pi packages on develop publish a prerelease under the beta dist-tag, versioned as the next patch release with a -beta.<run ID>.<attempt> suffix (for example 1.9.21-beta.12345678.1). Use it to build against endpoints that are merged but not yet released, and switch back to latest once the release is tagged.

bash
npm install @oqtopus-team/qdash-client@beta

Independent pi-qdash releases pin a client snapshot from the same commit; the pi dist-tag identifies those snapshots without changing latest or beta. See Pi packages for local development and release ordering.

Configuration ​

The TypeScript and Python clients use the same QDASH_* environment variables and named profiles. This allows an extension to reuse an existing $XDG_CONFIG_HOME/qdash/config.ini or ~/.config/qdash/config.ini file.

ts
import { QDashClient } from "@oqtopus-team/qdash-client";

const fromEnvironment = QDashClient.fromEnv();
const fromProfile = await QDashClient.fromProfile("prod");

The required environment variable is QDASH_BASE_URL. API token, project, and Cloudflare Access authentication use QDASH_API_TOKEN, QDASH_PROJECT_ID, QDASH_CF_ACCESS_CLIENT_ID, and QDASH_CF_ACCESS_CLIENT_SECRET.

High-Level Client ​

Use high-level methods for common data access and agent-calibration workflows.

ts
const client = await QDashClient.fromProfile("prod");
const chip = await client.getDefaultChip();
const metrics = await client.getChipMetrics(chip.chip_id);

console.log(metrics.qubit_metrics);

The client provides polling helpers for QDash executions, agent action dispatch, execution linkage, and candidate application.

Generated API ​

The complete API is generated by Orval from the QDash OpenAPI document. It is available through client.api and uses the same authentication, timeout, retry, and error handling as the high-level methods.

ts
const chips = await client.api.listChips();
const posts = await client.api.listForumPosts({ limit: 20 });

Generated models and operation result types are exported from @oqtopus-team/qdash-client/models and @oqtopus-team/qdash-client/openapi. Application code should prefer the package root exports unless it needs a generated endpoint-specific type.

Released under the Apache 2.0 License.