import * as smoltalk from "smoltalk";
import { type ThreadInfoTS } from "../runtime/agency.js";
/** Pass-through to `agency.threads.list()`. */
export declare function _listThreadsRaw(): ThreadInfoTS[];
/** Read a slice of a thread's messages, coerced to the
 *  `{ role: string, content: string }` shape Agency's
 *  `ThreadMessage` declares. Non-string `content` values
 *  (tool-call / structured) are JSON-stringified at the boundary so
 *  the Agency caller's `m.content` field is always a string — the
 *  TS-internal `agency.threads.get` returns the raw
 *  `smoltalk.MessageJSON` shape for callers that need full structure.
 */
export declare function _getThread(id: string, offset?: number, limit?: number): Array<{
    role: string;
    content: string;
}>;
/** Slug form of the active thread, or `""` (Agency has no undefined). */
export declare function _currentThreadId(): string;
/** Stash a freshly-computed summary on the underlying `MessageThread`
 *  so subsequent `listThreads()` calls read it back without
 *  re-prompting. Called by the Agency-side `summaryFor()` helper after
 *  the lazy summarize round-trip. No-op when the id is unknown or
 *  there is no active store (e.g. called from non-Agency code). */
export declare function _setThreadSummary(id: string, summary: string): void;
/** Best-effort summarize at thread close. Mirrors the Agency-side
 *  `summarize()` prompt + structured-output shape so eager and lazy
 *  paths produce comparable summaries. Uses an ephemeral standalone
 *  `MessageThread` (NOT registered with the active `ThreadStore`)
 *  for the LLM call so the summarizer prompt doesn't pollute the
 *  agent's main conversation and doesn't show up in `listThreads()`.
 *  Mirrors what `thread(hidden: true) { llm(...) }` would do in
 *  Agency-land.
 *
 *  Errors never propagate to the caller — eager summarize is a
 *  performance optimization, not a correctness path. If the call
 *  fails (no LLM client, network error, missing API key), the next
 *  `listThreads()` falls back to the lazy summarize path which
 *  surfaces a clean error path through `try _listThreadsRaw()`.
 *  Failures are still recorded via `logger.debug` and the
 *  `threadEndHookError` statelog event so they're observable. */
export declare function _eagerSummarizeIfNeeded(evt: {
    threadId: string;
    eagerSummarize: boolean;
    messages: smoltalk.MessageJSON[];
}): Promise<void>;
