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

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.