/** * One-line, paraphrase-stable summary of a `DataContract` shape. * * Two consumers share this string: * 1. **Embedding input** — concatenated with the intent prose * before bge-small embedding. The structured summary anchors * retrieval to slot/action names that survive prose * paraphrase, while the prose half feeds bge-small's * topic-similarity awareness. Hybrid input. * 2. **LLM rerank prompt** — shown to Haiku alongside the user's * query so the judge has the structural context it needs to * decide match-vs-no-match. * * Putting both consumers on the same string is load-bearing: if the * embedded vector and the prompt-shown summary diverged, we'd get * "RAG retrieved candidate X, but the prompt shows a different * summary" — the judge would lose context the index used to * retrieve. One source of truth eliminates that drift class. * * Format (deterministic): * * slots=; * actions=; streams=; * props= * * Format details: * - slots: `name:type` (e.g. `count:number,draft:string`). Bare * `name` when the schema has no `type` field. * - actions: `name(field1,field2,...)` when the action's schema has * non-empty `properties`; bare `name` when payload-less. This * differentiation is load-bearing: a `sendChip` action with * `{chipText: string}` payload must NOT match a payload-less * `sendChip` cached blueprint, since the runtime-emitted action * would arrive with `data: {}` instead of `data: {chipText}` — * the agent loses the user's input. Surfacing payload field names * in the summary lets the judge see this distinction. * - streams: bare `name` (channel schemas vary a lot and are usually * emitted by the agent later; including them adds noise). * - props: `name:type` (initial render shape). A trailing `!` marks a * required prop (e.g. `name:type!` = required; `name:type` = * optional). Bare `name!` when a required prop's schema has no * `type` field. Only props the component MUST accept are marked; * surfacing required-vs-optional lets the rerank judge tell a * mandatory prop apart from an optional one instead of guessing. * * Empty slots/actions/streams/props collapse to `∅`. */ import type { DataContract } from '../types/data-contract.js'; /** Stable summary of `contract` for embedding + rerank input. */ export declare function summarizeContract(contract: DataContract | undefined): string; //# sourceMappingURL=summarize-contract.d.ts.map