eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
36 lines (35 loc) • 1.55 kB
TypeScript
import type { ResolvedDynamicToolResolver } from "#runtime/types.js";
import type { DynamicToolEvents } from "#shared/dynamic-tool-definition.js";
import type { ModelMessage } from "ai";
interface ConnectionSearchResultItem {
readonly connection: string;
readonly description: string;
readonly error?: string;
readonly inputSchema?: Record<string, unknown>;
readonly needsAuthorization?: boolean;
readonly outputSchema?: Record<string, unknown>;
readonly tool?: string;
readonly qualifiedName?: string;
}
/**
* Extracts connection search results from conversation history.
* Scans tool-result messages for `connection_search` results and
* returns deduplicated tool metadata (latest result wins per qualifiedName).
*/
export declare function extractDiscoveredTools(messages: readonly ModelMessage[]): ConnectionSearchResultItem[];
/**
* Creates the connection search dynamic tool resolver events.
*
* The resolver subscribes to `step.started` so it re-derives the tool
* set from conversation history on every step. After compaction, old
* `connection_search` results disappear from messages and discovered
* tools naturally drop from the toolset.
*/
export declare function createConnectionSearchEvents(): DynamicToolEvents;
/**
* Creates a `ResolvedDynamicToolResolver` for the framework connection
* search tool. Used by graph resolution to register alongside authored
* dynamic tool resolvers.
*/
export declare function createConnectionSearchResolver(): ResolvedDynamicToolResolver;
export {};