/** * The canonical tool vocabulary and the toolMap that extends it. * * One toolMap shape (RFC-02 change 8): a config file carries the raw * shape, harness -> canonical -> native, and `mergeToolMaps` folds the * tiers into the one shape everything downstream reads, harness -> * canonical -> the native name plus the tier that set it. Tool selection * and the access preset call `hasCounterpart` and `nativeFor` instead of * restating them. */ import type { DescriptorSet } from "../knowledge/overrides.js"; export declare const NATIVE_PREFIX: "native:"; export type VocabularyEntry = { kind: "builtin"; native: string; } | { kind: "category"; key: string; }; export declare const READ_PRESET: readonly ["read", "grep", "glob", "list", "web-fetch", "web-search"]; export type ParsedSelector = { kind: "canonical"; name: string; } | { kind: "native"; name: string; }; export declare const parseToolSelector: (raw: string) => ParsedSelector; /** The raw shape a config file carries: harness -> canonical -> native. */ export type ToolMapConfig = Readonly>>>; export type ToolMapTier = "user-config" | "project-config"; export interface ToolMapEntry { readonly native: string; readonly tier: ToolMapTier; } /** The one shape past the merge: harness -> canonical -> native plus the * tier that set it. Carried on the turn options and read by every * consumer. */ export type ToolMap = Readonly>>>; /** Pure merge per harness per canonical: project > user. */ export declare const mergeToolMaps: (tiers: { readonly user?: ToolMapConfig; readonly project?: ToolMapConfig; }) => ToolMap; export type CanonicalTable = Readonly>>>>; export declare const canonicalTable: (set: DescriptorSet) => CanonicalTable; export declare const canonicalNames: (set: DescriptorSet) => readonly string[]; /** Every canonical name: the descriptors' plus every name a toolMap adds. */ export declare const allCanonicalNames: (set: DescriptorSet, toolMap?: ToolMap) => readonly string[]; /** Whether `harnessName` can express `canonical`: through its toolMap * entry, a built-in, or a category. */ export declare const hasCounterpart: (table: CanonicalTable, canonical: string, harnessName: string, toolMap?: ToolMap) => boolean; /** The native name `harnessName` lists `canonical` under: the toolMap * entry wins, then the built-in; a category has no name-list spelling. */ export declare const nativeFor: (table: CanonicalTable, canonical: string, harnessName: string, toolMap?: ToolMap) => string | null; export declare const validateCanonicalList: (names: readonly string[] | undefined, allCanonical: readonly string[], harness: string) => void; //# sourceMappingURL=tool-vocabulary.d.ts.map