@fledge-labs/compliance-engine-sdk
v0.3.0
Published
Framework-neutral TypeScript SDK for the Compliance Engine host API.
Readme
Compliance Engine TypeScript SDK
Framework-neutral, generated-contract TypeScript helpers for the engine-host/v1 API.
import { createHostClient } from "@fledge-labs/compliance-engine-sdk";
const client = createHostClient({ baseUrl: "https://host.example", tokenProvider: () => token });
const { data, error } = await client.GET("/engine/v1/sessions/{session_id}", { params: { path: { session_id: "session-001" } } });The token provider is called for every request. Requests carry Cache-Control: no-store, use cache: no-store, and reject redirects. The client accepts HTTPS endpoints and loopback HTTP only, and rejects responses larger than 1 MiB.
Call the exported runtime validators at untrusted JSON boundaries. They reject unknown fields, invalid lifecycle states, unsafe identifiers, malformed hashes and timestamps, and overly deep or large values. Catalog and workspace helpers validate first, then return deep immutable copies.
MCP support is phase 1 discovery metadata only: createMcpPhase1Payload exposes a session resource and read-only query tool, with no confirmation or execution operation.
Development
pnpm install --frozen-lockfile
pnpm run check:generated
pnpm test
pnpm pack --dry-run