/** * The spelling new chats of a session use. It follows the session's recorded * default chat so every chat of a session is addressable by the same clients. */ export type ChatUriFormat = "opaque" | "shaped"; /** The format new chats follow for a session whose recorded default chat is `defaultChat`. */ export declare function chatUriFormatOf(defaultChat: string | undefined): ChatUriFormat; /** Mints the default chat of a new (or recreated) session. `generation` only distinguishes a shaped default of a reused session id. */ export declare function mintDefaultChatUri(format: ChatUriFormat, session: string, generation: string | undefined): string; /** Mints an additional chat of `session`. */ export declare function mintPeerChatUri(format: ChatUriFormat, session: string): string; /** * The id of the chat that runs a subagent. Opaque ids derive from the root * conversation chat that issued the tool call, so the same call always yields * the same chat and distinct chats never collide on a tool call id. */ export declare function subagentChatUri(format: ChatUriFormat, session: string, rootConversationChat: string, toolCallId: string): string; /** * Why a client-supplied `createChat` URI is unacceptable, or `undefined` when it * is fine: it must be an `ahp-chat:` URI, and a session with a shaped default * chat cannot hold opaque chats because clients of such sessions may not * understand them. Its client chat id must not equal that of a different * existing chat (`existingChats`, including the default chat), because client * links address chats by id and an opaque and a shaped chat can share one. */ export declare function createChatUriError(defaultChat: string | undefined, existingChats: readonly string[], chat: string): string | undefined;