OpenAgentID documentation
Source referencesTypeScript reference

@openagentid/claude-agent API

Exported TypeScript types, signatures and source documentation.

Package manifest, subpaths, and integration guide.

This reference resolves exported symbols from the package entry point with the TypeScript parser/type checker. It includes declarations and inferred types, not implementation bodies. External dependencies unavailable to the extraction environment can remain unresolved; this is source documentation, not proof that all packages typecheck or are published.

openAgentPlugin

Build a Claude Agent SDK plugin that wires OpenAgent identity, capability control, and tamper-evident audit logging into the agent lifecycle.

export declare const openAgentPlugin: (opts: OpenAgentPluginOptions) => OpenAgentPlugin;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/plugin.ts:135.

OpenAgentPlugin

Shape returned by {@link openAgentPlugin}.

/** Shape returned by {@link openAgentPlugin}. */
export interface OpenAgentPlugin {
    /** Stable plugin identifier. */
    readonly name: '@openagentid/claude-agent';
    /** Plugin schema version. */
    readonly version: string;
    /** Bound hook handlers — wired to the Claude Agent SDK lifecycle. */
    readonly hooks: PluginHooks;
    /**
     * Inspect the in-memory audit buffer (only populated when `audit: true`
     * with the default sink). Returns an empty array otherwise.
     */
    inspectAudit(): readonly import('./types.js').AuditRecord[];
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/plugin.ts:86.

OpenAgentPluginOptions

Configuration accepted by {@link openAgentPlugin}.

/** Configuration accepted by {@link openAgentPlugin}. */
export interface OpenAgentPluginOptions {
    /** Verified OpenAgent identity to attach to the session. Required. */
    agent: OpenAgentIdentity;
    /** Capability checker — Arsenal-backed in production. Required. */
    capabilities: CapabilityChecker;
    /** Skills policy. Defaults to {@link DenyUnlessScopedSkillsPolicy}. */
    skillsPolicy?: SkillsPolicy;
    /**
     * Audit configuration:
     *   - `false`            → no audit (records are dropped)
     *   - `true`             → in-memory + stdout console sink
     *   - {@link AuditSink}  → custom sink
     */
    audit?: boolean | AuditSink;
    /**
     * Sign every outbound message with the agent's Ed25519 key. Defaults
     * to `false` because most agent flows don't need it.
     */
    signMessages?: boolean;
    /**
     * Behaviour on a denied tool / skill:
     *   - `'throw'`  (default) — throws {@link ToolDeniedError} or {@link SkillDeniedError}
     *   - `'block'`  — returns a blocking decision object the SDK can interpret
     */
    denyMode?: 'throw' | 'block';
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/plugin.ts:58.

PluginHooks

Bound hook handlers. Each method receives the SDK's hook input plus the SDK-managed context object and returns a plain JS object the SDK can route. The shapes below are the documented Claude Agent SDK hook signatures; if Anthropic adds a new lifecycle stage we add a new method here without breaking existing wiring.

/**
 * Bound hook handlers. Each method receives the SDK's hook input plus the
 * SDK-managed context object and returns a plain JS object the SDK can
 * route. The shapes below are the documented Claude Agent SDK hook
 * signatures; if Anthropic adds a new lifecycle stage we add a new method
 * here without breaking existing wiring.
 */
export interface PluginHooks {
    onSessionStart(input: SessionStartInput): Promise<{
        allow: true;
    }>;
    preToolUse(input: ToolUseInput): Promise<HookDecision>;
    postToolUse(input: PostToolUseInput): Promise<{
        ok: true;
    }>;
    onMessage(input: MessageInput): Promise<{
        allow: true;
        signature?: string;
    }>;
    onSkillInvoke(input: SkillInvokeInput): Promise<HookDecision>;
    onSessionEnd(): Promise<{
        ok: true;
    }>;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/plugin.ts:107.

HookDecision

Decision object returned by gating hooks (preToolUse, onSkillInvoke).

/** Decision object returned by gating hooks (preToolUse, onSkillInvoke). */
export interface HookDecision {
    allow: boolean;
    reason?: string;
    /**
     * Hash of the canonicalised tool input (preToolUse only) — thread it into
     * the matching postToolUse call so the audit chain links preflight to
     * completion.
     */
    inputHash?: string;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/plugin.ts:117.

AuditChain

Builds and signs (hash-chains) audit records. The chain is owned by a single session — callers should construct one chain per session.

export declare class AuditChain {
  constructor(opts: { sessionId: string; agentDid: string; sink: AuditSink; }): AuditChain;
  append(input: { kind: AuditKind; name?: string; outcome: AuditRecord["outcome"]; inputHash?: string; outputHash?: string; context?: Record<string, unknown>; }): Promise<AuditRecord>;
  head(): string;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/audit.ts:26.

ConsoleAuditSink

Audit sink that writes structured JSON to stdout — handy for dev.

export declare class ConsoleAuditSink {
  append(record: AuditRecord): void;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/audit.ts:119.

FanOutAuditSink

Compose multiple sinks (records are dispatched to all in order).

export declare class FanOutAuditSink {
  constructor(sinks: readonly AuditSink[]): FanOutAuditSink;
  append(record: AuditRecord): Promise<void>;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/audit.ts:127.

GENESIS_PREV_HASH

Sentinel for the head of the chain.

export declare const GENESIS_PREV_HASH: string;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/audit.ts:20.

InMemoryAuditSink

In-memory audit sink (handy for tests + dry runs).

export declare class InMemoryAuditSink {
  records: AuditRecord[];
  append(record: AuditRecord): void;
  clear(): void;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/audit.ts:105.

hashRecord

Compute the hash of a record (excludes the hash field itself).

export declare const hashRecord: (record: AuditRecord) => string;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/audit.ts:80.

verifyChain

Verify that a previously emitted chain has not been tampered with.

export declare const verifyChain: (records: readonly AuditRecord[]) => { valid: boolean; brokenAt?: number; };

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/audit.ts:88.

AllowListSkillsPolicy

Allow-listed skills policy: only the named skills are permitted, and the agent must additionally hold the right scope.

export declare class AllowListSkillsPolicy {
  constructor(allowedSkills: Iterable<string>, inner?: SkillsPolicy): AllowListSkillsPolicy;
  evaluate(skillName: string, ctx: SkillEvaluationContext): Promise<SkillDecision>;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/policy.ts:106.

CompositeSkillsPolicy

Compose multiple policies — a skill is allowed only if every policy allows it. Useful for stacking allow-list + scope + custom policies.

export declare class CompositeSkillsPolicy {
  constructor(policies: readonly SkillsPolicy[]): CompositeSkillsPolicy;
  evaluate(skillName: string, ctx: SkillEvaluationContext): Promise<SkillDecision>;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/policy.ts:130.

DenyUnlessScopedSkillsPolicy

Deny-unless-scoped skills policy.

For a skill named foo, requires the agent to hold skills:invoke:foo (or a wildcard that subsumes it). This is the default policy when the caller passes audit: true without supplying their own.

export declare class DenyUnlessScopedSkillsPolicy {
  evaluate(skillName: string, ctx: SkillEvaluationContext): Promise<SkillDecision>;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/policy.ts:81.

SKILL_SCOPE_PREFIX

Scope grammar for skill invocations.

export declare const SKILL_SCOPE_PREFIX: "skills:invoke:";

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/policy.ts:24.

StaticCapabilityChecker

Capability checker backed by a fixed allowlist. Supports literal scopes and one wildcard form: prefix:* matches anything starting with prefix:.

Example: tools:invoke:* allows every tool, skills:invoke:web.* allows every skill whose name starts with web..

export declare class StaticCapabilityChecker {
  constructor(scopes: Iterable<string>): StaticCapabilityChecker;
  check(scope: string): ScopeDecision;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/policy.ts:46.

TOOL_SCOPE_PREFIX

Scope grammar for tool invocations.

export declare const TOOL_SCOPE_PREFIX: "tools:invoke:";

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/policy.ts:27.

skillScope

Build the canonical scope string for a skill name.

export declare const skillScope: (name: string) => string;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/policy.ts:30.

toolScope

Build the canonical scope string for a tool name.

export declare const toolScope: (name: string) => string;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/policy.ts:35.

onMessage

Sign an outbound message with the agent's Ed25519 key (if signing is enabled) and append an audit record.

export declare const onMessage: (input: MessageInput, ctx: HookContext) => Promise<OnMessageResult>;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:226.

onSessionEnd

Emit a closing record at session end.

export declare const onSessionEnd: (ctx: HookContext) => Promise<AuditRecord>;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:320.

onSessionStart

Initialise the per-session hook context and emit the opening audit record. Call this once when the Claude Agent SDK fires the session start hook.

export declare const onSessionStart: (input: SessionStartInput, ctx: Omit<HookContext, "chain"> & { sink: AuditSink; }) => Promise<SessionStartResult>;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:57.

onSkillInvoke

Consult the OpenAgent skills policy before a SKILLS.md skill runs.

The Claude Agent SDK loads skills from SKILLS.md files; we hook the invocation point and refuse anything the policy denies. Default policy is DenyUnlessScopedSkillsPolicy.

export declare const onSkillInvoke: (input: SkillInvokeInput, ctx: HookContext) => Promise<SkillInvokeResult>;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:278.

onSkillInvokeOrThrow

Throw-on-deny variant of {@link onSkillInvoke}.

export declare const onSkillInvokeOrThrow: (input: SkillInvokeInput, ctx: HookContext) => Promise<SkillInvokeResult>;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:308.

postToolUse

Emit a post-tool-use audit record with input + output hashes.

The record's hash chain prevents post-hoc tampering: a verifier can replay {@link import ('./audit.js').verifyChain} over an exported chain to detect any modification.

export declare const postToolUse: (input: PostToolUseInput, ctx: HookContext) => Promise<AuditRecord>;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:190.

preToolUse

Verify a tool call against Arsenal scopes and emit a preflight audit record.

Returns &#123; allow: false &#125; rather than throwing so the caller can decide whether to short-circuit the SDK or surface an error to the model. The plugin's hook adapter throws {@link ToolDeniedError} when the SDK requires an exception-based deny.

export declare const preToolUse: (input: ToolUseInput, ctx: HookContext) => Promise<PreToolUseResult>;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:117.

preToolUseOrThrow

Throw-on-deny variant of {@link preToolUse}.

export declare const preToolUseOrThrow: (input: ToolUseInput, ctx: HookContext) => Promise<PreToolUseResult>;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:159.

HookContext

Per-session state that the hooks share. Constructed once when the session starts and disposed when it ends.

/**
 * Per-session state that the hooks share. Constructed once when the
 * session starts and disposed when it ends.
 */
export interface HookContext {
    readonly identity: OpenAgentIdentity;
    readonly capabilities: CapabilityChecker;
    readonly skillsPolicy: SkillsPolicy;
    readonly chain: AuditChain;
    readonly signMessages: boolean;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:31.

MessageInput

Input shape for {@link onMessage}.

/** Input shape for {@link onMessage}. */
export interface MessageInput {
    /** Plain-text or already-serialised message body. */
    body: string | Uint8Array;
    /** Direction of the message — used for the audit context only. */
    direction: 'in' | 'out';
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:207.

OnMessageResult

Result of {@link onMessage}.

/** Result of {@link onMessage}. */
export interface OnMessageResult {
    /** Hex-encoded Ed25519 signature, when message signing is enabled. */
    signature?: string;
    /** Audit record emitted for this message. */
    record: AuditRecord;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:215.

PostToolUseInput

Input shape for {@link postToolUse}.

/** Input shape for {@link postToolUse}. */
export interface PostToolUseInput {
    toolName: string;
    /** Tool result (any shape). */
    result: unknown;
    /** Was the underlying call successful? */
    ok: boolean;
    /** Optional error description if the call failed. */
    error?: string;
    /** Hash of the original input — typically threaded from preToolUse. */
    inputHash?: string;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:171.

PreToolUseResult

Result of a pre-tool-use evaluation.

/** Result of a pre-tool-use evaluation. */
export interface PreToolUseResult {
    /** Whether the tool call may proceed. */
    allow: boolean;
    /** Reason on deny. */
    reason?: string;
    /** The audit record emitted (preflight). */
    record: AuditRecord;
    /** Hash of the canonicalised input — reused by post hook. */
    inputHash: string;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:97.

SessionStartInput

Input shape for {@link onSessionStart}.

/** Input shape for {@link onSessionStart}. */
export interface SessionStartInput {
    sessionId: string;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:40.

SessionStartResult

Result of {@link onSessionStart}.

/** Result of {@link onSessionStart}. */
export interface SessionStartResult {
    /** The audit record emitted for the session start. */
    record: AuditRecord;
    /** The hook context to be threaded through subsequent hooks. */
    context: HookContext;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:45.

SkillInvokeInput

Input shape for {@link onSkillInvoke}.

/** Input shape for {@link onSkillInvoke}. */
export interface SkillInvokeInput {
    skillName: string;
    args?: unknown;
    metadata?: Record<string, unknown>;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:259.

SkillInvokeResult

Result of {@link onSkillInvoke}.

/** Result of {@link onSkillInvoke}. */
export interface SkillInvokeResult {
    decision: SkillDecision;
    record: AuditRecord;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:266.

ToolUseInput

Input shape for {@link preToolUse}.

/** Input shape for {@link preToolUse}. */
export interface ToolUseInput {
    /** Tool name as advertised by the Claude Agent SDK. */
    toolName: string;
    /** The arguments the agent intends to pass to the tool. */
    args: unknown;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hooks.ts:89.

ConfigError

Configuration was invalid at plugin construction time.

export declare class ConfigError {
  constructor(message: string, context?: Record<string, unknown>): ConfigError;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/errors.ts:79.

PluginError

Base error for the plugin.

export declare class PluginError {
  code: PluginErrorCodeValue;
  context: Record<string, unknown>;
  cause: unknown;
  constructor(message: string, code: PluginErrorCodeValue, options?: { context?: Record<string, unknown>; cause?: unknown; }): PluginError;
  toJSON(): Record<string, unknown>;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/errors.ts:22.

PluginErrorCode

Stable, machine-readable error codes.

export declare const PluginErrorCode: { readonly CONFIG_INVALID: "openagent/claude-agent/config-invalid"; readonly IDENTITY_MISSING: "openagent/claude-agent/identity-missing"; readonly TOOL_DENIED: "openagent/claude-agent/tool-denied"; readonly SKILL_DENIED: "openagent/claude-agent/skill-denied"; readonly AUDIT_FAILED: "openagent/claude-agent/audit-failed"; readonly HOOK_INTERNAL: "openagent/claude-agent/hook-internal"; readonly SIGN_FAILED: "openagent/claude-agent/sign-failed"; };

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/errors.ts:9.

PluginErrorCodeValue

export type PluginErrorCodeValue = (typeof PluginErrorCode)[keyof typeof PluginErrorCode];

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/errors.ts:19.

SkillDeniedError

A skill invocation was rejected by the skills policy.

export declare class SkillDeniedError {
  skill: string;
  constructor(skill: string, reason?: string, context?: Record<string, unknown>): SkillDeniedError;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/errors.ts:65.

ToolDeniedError

A tool call was rejected because the agent lacks the required scope.

export declare class ToolDeniedError {
  tool: string;
  constructor(tool: string, reason?: string, context?: Record<string, unknown>): ToolDeniedError;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/errors.ts:51.

AuditKind

Categories of audit events.

/** Categories of audit events. */
export type AuditKind = 'session.start' | 'session.stop' | 'tool.preflight' | 'tool.complete' | 'skill.preflight' | 'skill.complete' | 'message.signed' | 'policy.deny';

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/types.ts:89.

AuditRecord

A single tamper-evident audit record.

/** A single tamper-evident audit record. */
export interface AuditRecord {
    /** Monotonic sequence number within a session. */
    seq: number;
    /** ISO-8601 timestamp the record was emitted. */
    timestamp: string;
    /** Session id this record belongs to. */
    sessionId: string;
    /** Agent DID that performed the action. */
    agentDid: string;
    /** What kind of event this is. */
    kind: AuditKind;
    /** Tool or skill name (when applicable). */
    name?: string;
    /** Allow / deny outcome. */
    outcome: 'allow' | 'deny' | 'ok' | 'error';
    /** Hash of the request payload (BLAKE3 hex, lowercase). */
    inputHash?: string;
    /** Hash of the response payload (BLAKE3 hex, lowercase). */
    outputHash?: string;
    /** Hash chain pointer to the previous record. */
    prevHash: string;
    /** This record's hash. */
    hash: string;
    /** Free-form context (matched scope, error message, etc.). */
    context?: Record<string, unknown>;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/types.ts:61.

AuditSink

Audit sink — receives one record per tool / skill invocation.

/** Audit sink — receives one record per tool / skill invocation. */
export interface AuditSink {
    /** Append an audit record. MUST be best-effort and non-throwing. */
    append(record: AuditRecord): Promise<void> | void;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/types.ts:55.

CapabilityChecker

Anything implementing this can authorise tool / skill invocations.

/** Anything implementing this can authorise tool / skill invocations. */
export interface CapabilityChecker {
    /**
     * Check whether the agent currently holds the requested scope.
     *
     * Implementations should be deterministic and side-effect free —
     * Arsenal-backed checkers may cache, but MUST NOT mutate.
     */
    check(scope: string): Promise<ScopeDecision> | ScopeDecision;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/types.ts:44.

OpenAgentIdentity

A verified OpenAgent identity, anchored on a did:oas:* string.

/**
 * Shared types for the OpenAgent x Claude Agent SDK plugin.
 *
 * These mirror the public surface of `@openagentid/sdk` but are duplicated
 * here so the plugin can run in environments where the SDK is not yet
 * resolved (e.g., bun's optional peer dep handling, dev installs).
 *
 * When `@openagentid/sdk` is present, the runtime objects passed by the
 * caller are structurally compatible with the interfaces below.
 */
/** A verified OpenAgent identity, anchored on a `did:oas:*` string. */
export interface OpenAgentIdentity {
    /** Decentralised identifier, e.g. `did:oas:test:agent:refactor-bot`. */
    did: string;
    /** Entity kind: `hmr`, `mhr`, `agent`, `tool`, `skill`, etc. */
    kind: string;
    /** Optional human-readable display name (not authoritative). */
    displayName?: string;
    /** Public Ed25519 verification key, hex-encoded (32 bytes). */
    publicKey: string;
    /**
     * Sign a payload with the agent's Ed25519 secret key.
     *
     * The signing key MUST live behind this function — it is never
     * exposed to plugin code directly.
     */
    sign(payload: Uint8Array): Promise<Uint8Array> | Uint8Array;
    /** Optional lineage chain (HMR -> ... -> this agent). */
    lineage?: readonly string[];
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/types.ts:13.

ScopeDecision

Result of a credential / scope check.

/** Result of a credential / scope check. */
export interface ScopeDecision {
    /** Whether the request is allowed. */
    allowed: boolean;
    /** Matched scope string (e.g. `tools:invoke:bash`), if any. */
    matchedScope?: string;
    /** Human-readable reason for denial. */
    reason?: string;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/types.ts:34.

SkillDecision

Result of a skills policy evaluation.

/** Result of a skills policy evaluation. */
export interface SkillDecision {
    /** Allow / deny. */
    allowed: boolean;
    /** Reason on deny. */
    reason?: string;
    /** The scope that authorised the call. */
    matchedScope?: string;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/types.ts:131.

SkillEvaluationContext

Context passed to a skills policy evaluation.

/** Context passed to a skills policy evaluation. */
export interface SkillEvaluationContext {
    /** The agent's verified identity. */
    identity: OpenAgentIdentity;
    /** Capability checker (Arsenal-backed) for scope lookups. */
    capabilities: CapabilityChecker;
    /** Optional metadata about the call site. */
    metadata?: Record<string, unknown>;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/types.ts:121.

SkillsManifestEntry

SKILLS.md entry as parsed from a manifest.

/** SKILLS.md entry as parsed from a manifest. */
export interface SkillsManifestEntry {
    /** Stable skill identifier (e.g. `web.search`). */
    name: string;
    /** Human description. */
    description?: string;
    /** Required scope to invoke. Defaults to `skills:invoke:<name>`. */
    requiredScope?: string;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/types.ts:100.

SkillsPolicy

Skills policy: decides whether a SKILLS.md skill may be invoked.

/** Skills policy: decides whether a SKILLS.md skill may be invoked. */
export interface SkillsPolicy {
    /**
     * Check whether the named skill may be invoked by the current agent.
     *
     * Default behaviour for any concrete implementation: deny unless the
     * agent holds `skills:invoke:<skill-name>`.
     */
    evaluate(skillName: string, ctx: SkillEvaluationContext): Promise<SkillDecision> | SkillDecision;
}

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/types.ts:110.

canonicalJson

Stable JSON stringify (sorted keys) for deterministic hashing.

export declare const canonicalJson: (value: unknown) => string;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hash.ts:63.

getHashAlgo

Resolve which hash algorithm to use, attempting to load blake3 once. Subsequent calls are cached.

export declare const getHashAlgo: () => HashAlgo;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hash.ts:25.

hashHex

Hash a string or byte buffer and return lowercase hex.

export declare const hashHex: (data: string | Uint8Array) => string;

Source: openagent-sdk/integrations/claude-agent-sdk/typescript/src/hash.ts:50.

On this page