import { CredentialResolver } from '../auth/credentials.js'; import { type SessionShareMessage, type SessionShareToolActivity } from './session-share-projector.js'; import { type SessionShareSource } from './session-share-service.js'; export interface HostedSessionShareManifest { schemaVersion: 1; title: string; snapshotAt: string; description?: string; messages: SessionShareMessage[]; toolActivities: SessionShareToolActivity[]; attachments: Array<{ id: string; messageId: string; fileName: string; mimeType: string; size: number; sha256: string; }>; } export interface HostedSessionShareSnapshot { sessionId: string; cutoffSeq: number; manifest: HostedSessionShareManifest; assets: Array<{ id: string; path: string; size: number; }>; } export interface BuildHostedSessionShareInput { expectedSessionId: string; expectedCutoffSeq: number; expectedMetadataUpdatedAt: string; description?: string; includeToolActivities?: boolean; attachmentIds?: string[]; } export declare class HostedSessionShareBuilder { private readonly source; constructor(source: SessionShareSource); build(sessionKey: string, input: BuildHostedSessionShareInput): Promise; private loadExpectedSource; } export interface HostedShareResult { id: string; shareUrl: string; expiresAt: string; maxViews: number | null; viewCount: number; snapshotRevision: number; } type OwnerShare = { id: string; title: string; description: string | null; status: 'staging' | 'active' | 'revoked'; revision: number | null; expiresAt: string; maxViews: number | null; viewCount: number; createdAt: string; updatedAt: string; }; export declare class HostedSessionSharePublisher { private readonly credentials; private readonly fetchImpl; private readonly baseUrl; constructor(baseUrl?: string, credentials?: CredentialResolver, fetchImpl?: typeof fetch); create(snapshot: HostedSessionShareSnapshot, lifecycle: { ttlMs: number; maxViews: number | null; }): Promise; refresh(shareId: string, expectedRevision: number, publicUrl: string, snapshot: HostedSessionShareSnapshot): Promise; list(): Promise; revoke(shareId: string): Promise; private uploadAssets; private request; } export declare class HostedShareAuthorizationError extends Error { constructor(); } export interface HostedShareBinding extends HostedShareResult { sessionId: string; cutoffSeq: number; title: string; description: string | null; messageCount: number; attachmentCount: number; includeToolActivities: boolean; attachmentIds: string[]; createdAt: string; updatedAt: string; revoked: boolean; } export declare class HostedShareBindingStore { private readonly state; list(sessionId: string): Promise; upsert(binding: HostedShareBinding): Promise; reconcile(remote: OwnerShare[]): Promise; } export {};