› cavi-ai/
GitHub ↗

Choose an import path

The package root is the curated, provider-neutral API. Import concrete providers, framework bindings, extensions, and low-level infrastructure through subpaths so application dependencies remain explicit.

Stable root

Prefer createApiClient and CapabilityClient for application integrations. Use @cavi-ai/api-client for the universal runtime and gateway contracts, provider registries and factories, capability guards, shared errors, graceful degradation, route contracts, and team-manifest types.

ts
import {
  createApiClient,
  createRuntimeClient,
  createRuntimeProviderRegistry,
  runtimeSupports,
  type RuntimeClient,
} from "@cavi-ai/api-client";

Core subpaths

Import pathPurpose
@cavi-ai/api-client/core/runtimeRuntime types and run-stream contracts
@cavi-ai/api-client/core/runtime/providersProvider registry and factory kernel
@cavi-ai/api-client/core/gatewayGateway resource clients
@cavi-ai/api-client/core/httpRaw and JSON HTTP clients and redaction
@cavi-ai/api-client/core/sseSSE parsing and compatibility helpers
@cavi-ai/api-client/core/wsGateway WebSocket compatibility helpers
@cavi-ai/api-client/core/transportHTTP, SSE, WebSocket, JSON-RPC, and framing infrastructure
@cavi-ai/api-client/core/transport/nodeNode-only stdio and Unix-socket byte channels
@cavi-ai/api-client/core/dataShared data guards
@cavi-ai/api-client/core/errorsError types and helpers
@cavi-ai/api-client/core/memoryProvider-neutral memory contract
@cavi-ai/api-client/core/kanbanProvider-neutral kanban contract
@cavi-ai/api-client/core/teamsProvider-neutral team directory
@cavi-ai/api-client/core/envEnvironment and repository-root helpers
@cavi-ai/api-client/contractsRoute, surface, and manifest contracts

For direct HTTP integration, see response ownership, cancellation, and typed errors.

Provider subpaths

Broad provider entries remain available for compatibility. Prefer narrow entries when an application needs only one provider surface.

ProviderBroad entryNarrow entries
Claude@cavi-ai/api-client/providers/claude@cavi-ai/api-client/providers/claude/messages, @cavi-ai/api-client/providers/claude/managed-agents
Codex@cavi-ai/api-client/providers/codex@cavi-ai/api-client/providers/codex/runtime, @cavi-ai/api-client/providers/codex/files
Antigravity (AGY, active successor direction)@cavi-ai/api-client/providers/agy
Hermes@cavi-ai/api-client/providers/hermes@cavi-ai/api-client/providers/hermes/runtime
OpenClaw@cavi-ai/api-client/providers/openclaw@cavi-ai/api-client/providers/openclaw/runtime
OpenCode@cavi-ai/api-client/providers/opencode

Extensions, frameworks, and testing

Import pathPurpose
@cavi-ai/api-client/extensions/caviCAVI-owned control, portal, library, registry, and adapter surfaces
@cavi-ai/api-client/extensions/cavi/library-clip-contract.jsonRaw CaviClip ingest contract asset
@cavi-ai/api-client/frameworks/reactReact gateway bindings
@cavi-ai/api-client/testingProvider and gateway conformance helpers

package.json is the authoritative list of published entry points. The generated type reference lists the symbols available from the locked stable documentation artifact, including the OpenCode provider subpath.

Transport boundaries

The universal transport entry exports createHttpTransport, createJsonRpcTransport, createSseTransport, and createWebSocketTransport. The Node-only entry exports createStdioTransport and createUnixSocketTransport without pulling Node built-ins into browser-facing entry points.

Transport reconnects are bounded and never replay pending writes. These factories are infrastructure, not a provider adapter, and do not imply that a provider implements a corresponding capability.