TypeScript SDK

TypeScript cliente para o kernel HELM — ligações digitadas e adaptadores de estrutura.

TypeScript SDK

You may not need the SDK. The simplest integration is changing base_url — see the Quickstart. The SDK adds typed bindings and framework adapters for deeper integration.

The TypeScript SDK ships in-repo at sdk/ts/ and is published on npm as @mindburn/helm.

Install

npm install @mindburn/helm

Usage

Drop-in proxy (no SDK needed)

const response = await fetch("http://localhost:8080/v1/chat/completions", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    model: "gpt-4",
    messages: [{ role: "user", content: "List /tmp" }],
  }),
});
// X-Helm-Verdict: ALLOW

SDK client

import { HelmClient, HelmApiError } from "@mindburn/helm";

const client = new HelmClient("http://localhost:8080");

try {
  const res = await client.chatCompletions({ model: "gpt-4", messages: [...] });
} catch (e) {
  if (e instanceof HelmApiError) {
    console.log("Denied:", e.reasonCode); // DENY_TOOL_NOT_FOUND
  }
}

Framework adapters

Adapter Path Status
Mastra sdk/ts/mastra/ Active
OpenAI Agents sdk/ts/openai-agents/ Active
Semantic Kernel sdk/ts/semantic-kernel/ Active
Autogen sdk/ts/autogen/ Active

Next steps