/** * Retrieval-service discovery for the plugin's internal cache. Not a model tool: * see `KB_PATHS.serviceList`. * * Listing is paged, and a workspace can hold far more services than are useful * for routing, so this module stops after {@link MAX_PAGES} and reports the * shortfall rather than paging through everything. Only deployed services are * requested: anything else is not callable by the default service version, so it * would be noise in the catalog the model reads. */ import type { ServiceScene } from "./api-types.js"; import type { KbClient } from "./client.js"; /** One deployed retrieval or Q&A service, reduced to the fields that inform routing. */ export interface ServiceEntry { agent_id: string; agent_name: string; scene: ServiceScene; /** Deployment status as reported for the service; only callable states are listed. */ status: string; /** Last modification timestamp; the only signal for "which of these is in use". */ modify_time?: string; /** Service description, when the listing provides one. */ description?: string; } export interface ServiceList { entries: ServiceEntry[]; /** Server-reported total across the queried scenes, including rows never fetched. */ total: number; /** True when a scene reported more rows than {@link MAX_PAGES} pages returned. */ truncated: boolean; /** Scenes whose query failed; a partial list stays usable. */ failedScenes: ServiceScene[]; } /** * List the deployed services of both scenes. * A scene that fails is recorded and skipped rather than failing the whole * refresh: half a list still routes better than none. * @param client - the shared knowledge API client. * @returns merged entries plus totals, truncation, and per-scene failures. */ export declare function listServices(client: KbClient): Promise;