import type { ToolDef } from './types.js'; /** * MTL/1 tool-set digest — the digest HISTOR's public log keys tool sets by * (awr/adoption/mcp-trust-label/PROFILE.md §5, histor/subject.py). * * It is NOT {@link pinToolsHash}: a pin covers every advertised field and is * local state; this digest covers exactly `name`, `description`, `inputSchema` * and (only when present) `outputSchema`, sorted by UTF-16 code units of the * name, serialised as RFC 8785 with every number a double (MTL/1.1 §5.4: the * AWR/2 bytes wherever the set has integers only), and is what two strangers can * compare without exchanging the definitions themselves. That property is why * `scan --histor` sends only this value: the log answers "same / different / * previously observed" without ever receiving a tool description. * * Throws {@link MtlError}: `MTL-SUBJ-001` (not an object / no name) and * `MTL-NUM-001` (a number with no double, which only a non-JSON value can be). * MTL/1.0 also refused empty sets, duplicate names and every fraction; 1.1 * digests them, so HISTOR answers for the servers that carry them. */ export declare class MtlError extends Error { readonly code: string; constructor(code: string, detail: string); } export declare const MTL_DIGESTED_FIELDS: readonly ['name', 'description', 'inputSchema', 'outputSchema']; /** The normalised, sorted tool array MTL/1 digests. May be empty; may repeat a name. */ export declare function mtlToolSet(tools: readonly unknown[]): Record[]; /** `sha256-` over the canonical MTL/1 tool set. */ export declare function mtlToolSetDigest(tools: readonly ToolDef[] | readonly unknown[]): string; //# sourceMappingURL=mtl.d.ts.map