Skip to main content

TypeScript API

:::warning Pre-stable — runtime not shipped The TypeScript binding is published as @dagstack/plugin-system@0.0.1-dev.0. At this version the package exposes only a small surface (notably a VERSION constant plus the placeholder ToolV1 / OrchestratorV1 types) — the runtime, the full set of KIND_* / RUNTIME_* / DISPATCH_* constants, dispatchers, and contract tests have not yet been released.

This page describes the planned API for the upcoming v0.1.0 release. The shape is fixed by the language-agnostic spec and by the Python and Go bindings; named exports will land in @dagstack/plugin-system@0.1.0. :::

What v0.1.0 will export (planned)

The published surface in v0.1.0 mirrors the Python and Go bindings:

// Planned for @dagstack/plugin-system@0.1.0 — not yet exported in 0.0.1-dev.0.
import {
PluginManifest,
KIND_LLM,
KIND_VECTOR_STORE,
KIND_CHUNKER,
KIND_PIPELINE,
KIND_TOOL,
RUNTIME_IN_PROCESS,
RUNTIME_MCP_STDIO,
RUNTIME_MCP_HTTP,
DISPATCH_SINGLETON,
DISPATCH_BROADCAST_COLLECT,
DISPATCH_BROADCAST_NOTIFY,
DISPATCH_CHAIN,
DISPATCH_CAPABILITY,
} from "@dagstack/plugin-system";

These constants are emitted from the spec and stay in sync across bindings — if Python uses kind = "llm", then KIND_LLM === "llm" in TypeScript.

While the runtime is unavailable

Until the full runtime ships, TypeScript teams have two options:

  1. Wrap Python through MCP. Run plugins on Python through the mcp_stdio or mcp_http adapter and call them from a TypeScript application via the standard MCP protocol.
  2. Wait for the runtime release — track updates to @dagstack/plugin-system on npmjs.org.

What the reference will cover

  • Public symbols from @dagstack/plugin-system (runtime core).
  • Kind protocols / interfaces (LLM, VectorStore, Chunker, Tool, ...).
  • The runContractSuite contract tests plus every assertion.
  • Standard resources Clock, Rng, BlobStore, HttpClient and their test doubles.
  • MCP adapters MCPStdioAdapter, MCPHttpAdapter.

The reference is generated by typedoc with markdown output and committed to site/docs/api/typescript/.