import { H as HonchoProviderOptions, a as HonchoMiddlewareConfig, b as HonchoToolsConfig, c as HonchoSendConfig } from './index-C3SAXrBo.js'; export { C as CardDiff, d as CardSnapshot, P as PeerIdentity, e as PeerIdentityOptions, f as compareIdentityPerspectives, g as createMultiPerspectiveIdentity, h as createPeerIdentity } from './index-C3SAXrBo.js'; import { Honcho, SessionContext, Peer, Session } from '@honcho-ai/sdk'; import { LanguageModelV3Middleware } from '@ai-sdk/provider'; import * as ai from 'ai'; /** * Create a Honcho SDK client. */ declare function createClient(options?: HonchoProviderOptions): Honcho; interface ResolvedMiddlewareConfig { userId: string; sessionId?: string; assistantId: string; persistInput: boolean; injectHistory: boolean; formatContext?: (context: SessionContext) => string; onError: (error: unknown) => void; } interface MiddlewareResources { userPeer: Peer; assistantPeer?: Peer; session?: Session; } interface MiddlewareCreateOptions { config: ResolvedMiddlewareConfig; ensureResources: () => Promise; } /** * Build a single Honcho middleware with flat config. */ declare function createMiddleware({ config, ensureResources, }: MiddlewareCreateOptions): LanguageModelV3Middleware; interface ResolvedToolsConfig { userId: string; sessionId?: string; assistantId: string; } interface ToolResources { userPeer: Peer; assistantPeer: Peer; session?: Session; } interface CreateToolsOptions { config: ResolvedToolsConfig; ensureResources: () => Promise; } type SessionContextResult = { session_id: string | null; observer_id: string; target_id: string; representation: string | null; peer_card: string[] | null; summary: string | null; messages: Array<{ content: string; peer_id: string; role: "assistant" | "user"; }>; message_count: number; }; /** * Returns all Honcho tools as a spreadable object. * * @example * ```ts * const result = await generateText({ * model: openai("gpt-4o"), * tools: honcho.tools({ userId: "user-123", sessionId: "chat-456" }), * prompt: "What did we talk about last week?", * }); * ``` */ declare function createTools(options: CreateToolsOptions): { honcho_chat: ai.Tool<{ query: string; targetId?: string | undefined; }, { content: string; }>; honcho_context: ai.Tool<{ includeSummary: boolean; tokens: number; messageLimit: number; targetId?: string | undefined; }, SessionContextResult>; honcho_search: ai.Tool<{ query: string; limit: number; }, { results: { content: string; peer_id: string; created_at: string; }[]; count: number; }>; honcho_search_conclusions: ai.Tool<{ query: string; limit: number; targetId?: string | undefined; }, { results: { content: string; observed_id: string; observer_id: string; created_at: string; }[]; count: number; }>; honcho_get_representation: ai.Tool<{ targetId?: string | undefined; }, { representation: string; }>; honcho_save_conclusion: ai.Tool<{ content: string; targetId?: string | undefined; }, { success: boolean; id: string; }>; }; /** * The Honcho provider object returned by createHoncho(). */ interface HonchoProvider { /** Create middleware with flat config. */ middleware: (config?: HonchoMiddlewareConfig) => ReturnType; /** Create tools spreadable into generateText/streamText. */ tools: (config?: HonchoToolsConfig) => ReturnType; /** Persist one user message to a session. */ send: (config: HonchoSendConfig) => Promise; /** The underlying Honcho client for direct API access. */ client: ReturnType; } declare function createHoncho(options?: HonchoProviderOptions): HonchoProvider; /** * Centralized tool descriptions and parameter descriptions. * Shared across all framework adapters for consistency. */ declare const TOOL_DESCRIPTIONS: { readonly chat: string; readonly search: string; readonly searchConclusions: string; readonly getRepresentation: string; readonly saveConclusion: string; readonly getContext: string; }; declare const PARAM_DESCRIPTIONS: { readonly query: "The natural language query or question to ask"; readonly peerId: "The peer (user) ID to query about"; readonly sessionId: "The session ID to scope the query to"; readonly observerId: "The peer ID acting as the observer perspective"; readonly limit: "Maximum number of results to return"; readonly content: "The conclusion or observation text to save"; readonly observedId: "The peer ID this conclusion is about"; readonly targetPeerId: "Optional peer whose perspective to use"; readonly includeFrequent: "Include most frequently referenced conclusions"; readonly maxConclusions: "Maximum number of conclusions to include"; readonly contextTokens: "Maximum token budget for context retrieval"; readonly includeSummary: "Whether to include a session summary in context"; readonly messageLimit: "Maximum number of recent messages to return"; }; declare const DEFAULTS: { readonly assistantPeerId: "assistant"; readonly searchLimit: 10; readonly conclusionTopK: 10; readonly maxConclusions: 20; readonly contextTokens: 4096; readonly contextMessageLimit: 8; }; export { DEFAULTS, HonchoMiddlewareConfig, type HonchoProvider, HonchoProviderOptions, HonchoSendConfig, HonchoToolsConfig, PARAM_DESCRIPTIONS, TOOL_DESCRIPTIONS, createHoncho };