Skip to main content

TypeScript SDK API reference

@stacklok-oss/mecatl-sdk provides a transport-neutral client for browsers and a Node.js and Bun client with gRPC and local-process capabilities.

Entry points

Entry pointContents
@stacklok-oss/mecatl-sdkHTTP and SSE transport, ergonomic client, sessions, runs, events, durable activity, and shared types.
@stacklok-oss/mecatl-sdk/nodeNode.js and Bun gRPC transport, local daemon management, one-shot queries, filesystem media helpers, and callback tools. It also exports the core API.
@stacklok-oss/mecatl-sdk/genGenerated protobuf-es messages and service descriptors. Use the gRPC API reference for the service contract.

The core and Node.js/Bun method pages are generated from the declarations in the published package. Edit their TSDoc under sdk/typescript/src/, then run task sdk:docs.

Runtime support

RuntimeSupport
Node.jsVersion 22 or later. Remote connections and local daemon management are supported on macOS and Linux. Windows supports remote connections.
BunVersion 1.4 or later on macOS and Linux.
BrowsersThe latest two stable Chrome, Firefox, and Safari releases. Browser applications use the HTTP and SSE transport through a same-origin backend-for-frontend.
TypeScriptDeclarations compile with TypeScript 5.7 or later. The SDK is developed with TypeScript 6.

The package is ESM-only.

Error model

SDK-authored failures extend MecatlError and carry a machine-readable code, an error origin, and available transport metadata. Server-declared terminal run outcomes, including cancellation and limits, resolve as RunResult values. Transport, protocol, authentication, and invalid local lifecycle failures throw.