/** * Shared types + hint generators for the v1.5.0 `next_actions` envelope. * * Design: tools opt in by wrapping their return value as * `{ data, context: { state, next_actions } }`. Clients parsing the JSON see * `context.next_actions` and can route the agent's next call without asking. * Backwards compat is trivial — clients ignoring `context` keep working. */ export interface StateTokens { last_search_query?: string; last_search_results?: string[]; last_file_read?: string; last_file_outgoing?: string[]; last_file_unresolved_links?: string[]; last_connections_root?: string; last_connections_count?: number; } export interface NextAction { description: string; tool: string; args: Record; reason: string; } export interface ToolContext { state?: Partial; next_actions?: NextAction[]; } export interface ContextualResult { data: T; context: ToolContext; } export declare function isContextualResult(r: unknown): r is ContextualResult; export interface SearchHintHit { nodeId: string; title?: string; score?: number; } export declare function computeSearchHints(query: string, results: SearchHintHit[]): ToolContext; export interface ReadNoteHintInput { id: string; outgoing: string[]; unresolvedLinks: string[]; } export declare function computeReadNoteHints(note: ReadNoteHintInput): ToolContext; export interface FindConnectionsHintNeighbor { id: string; title?: string; } export declare function computeFindConnectionsHints(root: string, connections: FindConnectionsHintNeighbor[]): ToolContext;