/** * Priority-based tool filtering for providers with tool-count limits. * * Some providers impose a hard limit on the number of tool definitions * accepted in a single request (configured per provider via the `maxTools` * compatibility quirk). When the registered tool count * exceeds this limit, {@link filterToolsByMaxCount} drops the lowest-priority * tools so the provider never receives more tools than it can handle. * * Priority is determined entirely by tool name — the most stable identifier * across sessions, configs, and plugin sets. Tools are grouped into tiers * that mirror the existing token-saving tier system (TIER1/2/3 in * `@wrongstack/tools/builtin`), with diagnostic/status tools assigned the * lowest priority since the model rarely needs to invoke them directly. */ import type { Tool } from '@wrongstack/core/types'; /** * Score a single tool for filtering priority. * * @returns A number 0–6 where 0 is the highest priority (never dropped first) * and 6 is the lowest (dropped first). */ export declare function scoreTool(tool: Tool): number; /** * Filter a tool list to at most `maxTools` entries, keeping the * highest-priority tools and preserving their original registration order. * * When `tools.length <= maxTools`, the input is returned unchanged (as a * shallow copy) — no allocation, no scoring. * * @param tools The full registered tool list (from `ToolRegistry.list()`). * @param maxTools The provider-imposed limit. Must be a positive integer. * @returns A new array containing at most `maxTools` tools, in their original * relative order. */ export declare function filterToolsByMaxCount(tools: readonly Tool[], maxTools: number): Tool[]; //# sourceMappingURL=tool-priority.d.ts.map