open-index/open-npm huggingface dataset:
npm package: @mindburn/helm
Description: TypeScript SDK for HELM — fail-closed tool calling for AI agents
Latest version: 0.3.0

# HELM SDK — TypeScript

Typed TypeScript/JavaScript client for the HELM kernel API. Zero runtime dependencies.

## Install

```bash
npm install @mindburn/helm
```

## Quick Example

```typescript
import { HelmClient } from '@mindburn/helm';

const helm = new HelmClient({ baseUrl: 'http://localhost:8080' });

// OpenAI-compatible chat (tool calls governed by HELM)
try {
  const res = await helm.chatCompletions({
    model: 'gpt-4',
    messages: [{ role: 'user', content: 'List files in /tmp' }],
  });
  console.log(res.choices[0].message.content);
} catch (err) {
  if (err instanceof HelmApiError) {
    console.log('Denied:', err.reasonCode); // e.g. DENY_TOOL_NOT_FOUND
  }
}

// Export + verify evidence pack
const pack = await helm.exportEvidence();
const result = await helm.verifyEvidence(pack);
console.log(result.verdict); // PASS

// Conformance
const conf = await helm.conformanceRun({ level: 'L2' });
console.log(conf.verdict, conf.gates, 'gates');
```

## API

| Method | Endpoint |
|--------|----------|
| `chatCompletions(req)` | `POST /v1/chat/completions` |
| `approveIntent(req)` | `POST /api/v1/kernel/approve` |
| `listSessions()` | `GET /api/v1/proofgraph/sessions` |
| `getReceipts(sessionId)` | `GET /api/v1/proofgraph/sessions/{id}/receipts` |
| `exportEvidence(sessionId?)` | `POST /api/v1/evidence/export` |
| `verifyEvidence(bundle)` | `POST /api/v1/evidence/verify` |
| `replayVerify(bundle)` | `POST /api/v1/replay/verify` |
| `conformanceRun(req)` | `POST /api/v1/conformance/run` |
| `health()` | `GET /healthz` |
| `version()` | `GET /version` |

## Error Handling

All errors throw `HelmApiError` with a typed `reasonCode`:
```typescript
try { await helm.chatCompletions(req); }
catch (e) { if (e instanceof HelmApiError) console.log(e.reasonCode); }
```
npm package: @mindburn/helm-autogen
Description: HELM governance adapter for AutoGen
Latest version: 0.3.0

# @mindburn/helm-autogen

HELM governance adapter for [AutoGen](https://microsoft.github.io/autogen).

## What it does

Wraps AutoGen agent tool functions with HELM governance:

1. Every tool call is evaluated against HELM policy before execution
2. Denied calls throw `HelmToolDenyError` (fail-closed by default)
3. Receipts with SHA-256 hashes are collected for every approved execution
4. Cross-platform: works in Node.js, Deno, and Bun

## Quick start

```typescript
import { HelmAutoGenGovernor } from "@mindburn/helm-autogen";

const governor = new HelmAutoGenGovernor({ helmUrl: "http://localhost:8080" });
const governed = governor.governTools([
  { name: "search", fn: searchWeb },
  { name: "calculate", fn: doMath },
]);
```

## License

Apache-2.0
npm package: @mindburn/helm-claude-code
Description: HELM governance adapter for Anthropic Claude Code — MCP-native tool governance
Latest version: 0.3.0

# @mindburn/helm-claude-code

HELM governance adapter for Anthropic Claude Code — MCP-native tool governance.

Every tool call goes through HELM's governance plane: policy-evaluated, receipt-producing, fail-closed by default.

## Install

```bash
npm install @mindburn/helm-claude-code
```

## Usage

```ts
import { HelmToolProxy } from '@mindburn/helm-claude-code';

const proxy = new HelmToolProxy({ baseUrl: 'http://localhost:8080' });

// Wrap MCP tools
const governed = proxy.wrapTools(mcpTools);

// Or govern individual calls
const result = await proxy.executeGoverned('file_write', { path, content }, executor);

// Convert to Anthropic API format
const anthropicTools = proxy.toAnthropicTools(mcpTools);

// Get receipts
console.log(proxy.getReceipts());
```

## Features

- **MCP native** — works with MCP ToolDefinition format
- **Anthropic conversion** — `toAnthropicTools()` for Claude messages API
- **Fail-closed** — denied tools never execute (configurable)
- **Receipts** — cryptographic proof of every tool call
- **Lamport clocks** — causal ordering of tool executions

## License

Apache-2.0
npm package: @mindburn/helm-gemini
Description: HELM governance adapter for Google Gemini — function calling governance
Latest version: 0.3.0

# @mindburn/helm-gemini

HELM governance adapter for Google Gemini — function calling governance.

Every function call goes through HELM's governance plane: policy-evaluated, receipt-producing, fail-closed by default.

## Install

```bash
npm install @mindburn/helm-gemini
```

## Usage

```ts
import { HelmToolProxy } from '@mindburn/helm-gemini';

const proxy = new HelmToolProxy({ baseUrl: 'http://localhost:8080' });

// Wrap Gemini function declarations
const governed = proxy.wrapTools(myFunctions);

// Process a Gemini function_call response
const result = await proxy.governFunctionCall(
  { name: 'search', args: { query: 'HELM' } },
  searchExecutor
);

// Get receipts
console.log(proxy.getReceipts());
```

## Features

- **Gemini native** — works with `@google/genai` FunctionDeclaration format
- **Function call governance** — `governFunctionCall()` for Gemini response processing
- **OpenAI conversion** — `toOpenAITools()` for HELM proxy compatibility
- **Fail-closed** — denied functions never execute (configurable)
- **Receipts** — cryptographic proof of every function call
- **Lamport clocks** — causal ordering of function executions

## License

Apache-2.0
npm package: @mindburn/helm-mastra
Description: HELM governance adapter for Mastra agent framework — sandbox-aware
Latest version: 0.3.0

# @mindburn/helm-mastra

HELM governance adapter for [Mastra](https://mastra.ai) agent framework with native Daytona sandbox integration.

## What it does

Wraps Mastra's Daytona sandbox with HELM governance:

1. Every sandbox `exec` is evaluated against HELM policy first
2. Denied commands never reach the sandbox
3. Receipts form a deterministic proof chain

## Quick start

```typescript
import { HelmMastraSandbox } from "@mindburn/helm-mastra";

const sandbox = new HelmMastraSandbox({
  baseUrl: "http://localhost:8080",
  daytonaApiKey: process.env.DAYTONA_API_KEY,
});

const result = await sandbox.exec({
  command: ["python3", "-c", 'print("governed exec")'],
});

console.log(result.stdout); // "governed exec\n"
console.log(result.receipt.requestHash); // "sha256:..."
```

## Configuration

| Option            | Default                  | Description              |
| ----------------- | ------------------------ | ------------------------ |
| `baseUrl`         | required                 | HELM kernel URL          |
| `daytonaApiKey`   | required                 | Daytona API key          |
| `daytonaUrl`      | `https://api.daytona.io` | Daytona API URL          |
| `failClosed`      | `true`                   | Deny on HELM errors      |
| `defaultLanguage` | `python3`                | Default exec language    |
| `execTimeout`     | `30000`                  | Per-command timeout (ms) |

## License

Apache-2.0
npm package: @mindburn/helm-openai-agents
Description: HELM governance adapter for OpenAI Agents SDK — one-line drop-in
Latest version: 0.3.0

# @mindburn/helm-openai-agents

HELM governance adapter for the [OpenAI Agents SDK](https://github.com/openai/openai-agents-sdk).

## What it does

Wraps tool definitions with HELM governance so every tool call:

1. Is evaluated against HELM policy **before** execution
2. Is denied if the policy rejects it (fail-closed by default)
3. Produces a receipt for the execution proof chain

## Quick start

```typescript
import { HelmToolProxy } from "@mindburn/helm-openai-agents";

const proxy = new HelmToolProxy({
  baseUrl: "http://localhost:8080",
  apiKey: process.env.HELM_API_KEY,
});

// Wrap your tools
const governedTools = proxy.wrapTools(myTools);

// Use in an agent — every call now goes through HELM
const agent = new Agent({ tools: governedTools });
```

## Configuration

| Option            | Default  | Description          |
| ----------------- | -------- | -------------------- |
| `baseUrl`         | required | HELM kernel URL      |
| `apiKey`          | optional | HELM API key         |
| `failClosed`      | `true`   | Deny on HELM errors  |
| `collectReceipts` | `true`   | Keep receipt chain   |
| `onReceipt`       | —        | Callback per receipt |
| `onDeny`          | —        | Callback per denial  |

## License

Apache-2.0
npm package: @mindburn/helm-semantic-kernel
Description: HELM governance adapter for Microsoft Semantic Kernel
Latest version: 0.3.0

# @mindburn/helm-semantic-kernel

HELM governance adapter for [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel).

## What it does

Wraps Semantic Kernel plugin functions with HELM governance:

1. Every function call is evaluated against HELM policy before execution
2. Denied calls throw `HelmToolDenyError` (fail-closed by default)
3. Per-plugin principal tracking (e.g. `MyPlugin.MyFunction`)
4. Receipts with SHA-256 hashes are collected for every approved execution

## Quick start

```typescript
import { HelmSKGovernor } from "@mindburn/helm-semantic-kernel";

const governor = new HelmSKGovernor({ helmUrl: "http://localhost:8080" });
const governed = governor.governPlugin("MathPlugin", {
  add: (a: number, b: number) => a + b,
  multiply: (a: number, b: number) => a * b,
});
```

## License

Apache-2.0