import * as smoltalk from "smoltalk";
export type MessageThreadJSON = {
    messages: smoltalk.MessageJSON[];
    parentId?: string | null;
    hidden?: boolean;
    label?: string | null;
    summary?: string | null;
};
export declare class MessageThread {
    messages: smoltalk.Message[];
    id: string;
    /** ID of the parent thread when this thread was created via
     *  `ThreadStore.createSubthread()`. `null` for top-level threads
     *  (the default `MessageThread` constructor leaves it null). Used by
     *  `agency.threads.list()` to surface the parent linkage in
     *  ThreadInfo, and by `ThreadStore.resumeExisting()` to reject
     *  resuming a subthread outside its parent's context. */
    parentId: string | null;
    /** When `true`, this thread is excluded from `agency.threads.list()`
     *  (and therefore the stdlib `listThreads()` user-facing surface).
     *  Set by `Runner.thread` at first-create time when the user opts
     *  in via `thread(hidden: true) { ... }`. Round-tripped through
     *  `toJSON`/`fromJSON` so the flag survives interrupt resume. */
    hidden: boolean;
    /** Optional user-supplied label from `thread(label: "...") { ... }`.
     *  Set by `Runner.thread` at first-create time. `null` for threads
     *  created without a label or via `subthread {}` without one.
     *  Surfaces on `agency.threads.list()` so the stdlib `listThreads()`
     *  can attach it to `ThreadInfo`. Round-tripped through
     *  `toJSON`/`fromJSON` so the value survives interrupt resume. */
    label: string | null;
    /** Cached summary produced by the stdlib `summaryFor()` helper on
     *  first `listThreads()` call after the thread closes. Written via
     *  the TS-side `_setThreadSummary` shim so the cache lives on the
     *  per-run `MessageThread` and gets GC'd with the run — no
     *  module-level state in TS. `null` until the summary is computed.
     *  Round-tripped through `toJSON`/`fromJSON`. */
    summary: string | null;
    constructor(messages?: smoltalk.Message[]);
    addMessage(message: smoltalk.Message): void;
    cloneMessages(): smoltalk.Message[];
    getMessages(): smoltalk.Message[];
    setMessages(messages: smoltalk.Message[]): void;
    push(message: smoltalk.Message): void;
    newChild(): MessageThread;
    newSubthreadChild(): MessageThread;
    toJSON(): MessageThreadJSON;
    static fromJSON(json: MessageThreadJSON | MessageThread | smoltalk.MessageJSON[] | smoltalk.Message[]): MessageThread;
}
