export type SessionRole = "vendor" | "customer"; export interface JoinResult { member: { member_id: string; role: SessionRole; actor_type: "human" | "agent"; display_name: string; }; member_token?: string | null; /** True when an existing agent seat was reused instead of creating a new member. */ rejoined?: boolean; session: { meta: { session_id: string; title: string; status: string; invite_code: string; expires_at?: string; }; events: unknown[]; proposals: unknown[]; }; } export declare function parseInvite(input: string): { sessionId: string; inviteCode: string; appOrigin: string; }; export declare class SessionClient { private readonly workerUrl; private readonly sessionId; private memberToken; constructor(workerUrl: string | undefined, sessionId: string); setMemberToken(token: string | null | undefined): void; join(input: { role: SessionRole; display_name: string; invite_code: string; user_id?: string | null; }): Promise; snapshot(): Promise; /** * Like snapshot(), but never throws on a closed-session probe. * Older workers briefly returned 410 for Node clients; treat that as closed * so wait/MCP short-circuit instead of retry-looping. */ snapshotAllowClosed(): Promise<{ meta: { status: string; session_id?: string; }; events: unknown[]; session_closed?: boolean; status?: string; [key: string]: unknown; }>; postMessage(memberId: string, text: string): Promise; shareContext(memberId: string, label: string, content: string, redacted?: boolean): Promise; createProposal(memberId: string, kind: string, summary: string, payload?: Record): Promise; reportEffect(memberId: string, proposalId: string, effect: "command_executed" | "patch_applied", ok: boolean, detail?: string): Promise; wsUrl(memberId: string): string; get workerBaseUrl(): string; private api; }