@edictum/server
v0.4.0
Published
Server SDK (HTTP client, SSE, audit sink) for edictum
Downloads
826
Maintainers
Readme
@edictum/server
Server SDK for connecting Edictum-governed agents to the Edictum API.
Part of Edictum — runtime rule enforcement for AI agent tool calls.
Install
pnpm add @edictum/server @edictum/coreUsage
import { createServerGuard } from '@edictum/server'
const { guard, close } = await createServerGuard({
url: 'https://api.example.com',
apiKey: 'edk_production_...',
agentId: 'my-agent',
bundleName: 'production-rules',
})
// guard is a standard Edictum instance backed by the API
// Rules hot-reload via SSE, audit events stream to the API
// Clean up on shutdown
await close()API
createServerGuard(options)— factory returning{ guard, close }with server-backed rules, audit, sessions, and approvalsEdictumServerClient— low-level HTTP client for the canonical/v1APIServerRuleSource— SSE-based rules hot-reloadServerAuditSink— streams audit events to the APIServerBackend— server-backed session storageServerApprovalBackend— server-backed HITL approval workflowsverifyBundleSignature(bundle, publicKey)— Ed25519 bundle signature verification
