import { type ToolCategoryFilter } from '../tool-registry/index.js'; import type { ToolSpec } from '../tool-registry/types.js'; /** Answers "may this caller pass this door" — `'Query.jobOrders'`. */ export type ToolAccessCheck = (door: string) => Promise; export interface ScopedCategory { readonly name: string; readonly guidance: string; /** The tools of this category this caller may use. Never empty — a category with none is left out. */ readonly specs: ReadonlyArray; } export interface ToolScope { /** Categories with at least one usable tool, in registration order. */ readonly categories: ReadonlyArray; /** Every usable tool, flat. Offering and dispatch both read this. */ readonly specs: ReadonlyArray; } export declare const EMPTY_TOOL_SCOPE: ToolScope; export declare function resolveToolScope(requested: ToolCategoryFilter, access?: ToolAccessCheck): Promise; /** * Keep only the tools a surface can run — e.g. a surface with no document keeps `read`. A category * left with nothing drops out, so its guidance is not read to a model that cannot call it. */ export declare function narrowToolScope(scope: ToolScope, keep: (spec: ToolSpec) => boolean): ToolScope; /** The rules of the categories in scope, for the system prompt. */ export declare function toolScopeGuidance(scope: ToolScope): string[];