/** * COAIA Narrative - Argument Hygiene * * A malformed tool call must not become chart content. * * On 2026-07-30 a live store was found carrying seven observations whose bodies * ended in `` followed by a `` block: * the raw text of a call whose argument tags never parsed, persisted verbatim as * if it were prose. The call did not fail — it wrote, and every consumer that * renders current reality has shown that tag ever since. * * The check belongs here, at the write boundary. Anything that reaches the JSONL * is already in every reader's render, so a read-side filter arrives too late. * A body carrying plainly unparsed call syntax is refused with the offending * fragment named, so the caller can retry with the text it meant to record. */ export interface UnparsedCallSyntaxHit { /** The offending text, quoted back so the caller can see what it sent. */ fragment: string; /** Plain-language account of what the fragment is. */ reason: string; /** Where in the body the prose ended and the call text began. */ index: number; } export interface UnparsedCallSyntaxLocation extends UnparsedCallSyntaxHit { /** Where in the arguments it was found, e.g. `newObservations[0]`. */ path: string; } /** * Return the first unparsed-call-syntax fragment in `text`, or null if the text * is ordinary prose. Angle brackets on their own are fine — `
`, `a < b`, * `` all pass. Only call machinery and argument closing tags are refused. */ export declare function findUnparsedCallSyntax(text: string): UnparsedCallSyntaxHit | null; /** * Walk any argument value — string, array, or object — and return the first * location carrying unparsed call syntax. */ export declare function findUnparsedCallSyntaxIn(value: unknown, path?: string): UnparsedCallSyntaxLocation | null; /** The message a caller sees: what was refused, where, and what to do next. */ export declare function describeUnparsedCallSyntax(location: UnparsedCallSyntaxLocation): string; /** Throw unless `value` is free of unparsed call syntax. Used at the store's edge. */ export declare function assertNoUnparsedCallSyntax(value: unknown, path: string): void; /** The argument-name vocabulary, exported so the scrubber reports what the server refuses. */ export declare const KNOWN_ARGUMENT_NAMES: readonly string[];