export interface ArtifactGroup { key: string; name: string; } export interface SessionArtifactBase { path: string; displayPath: string; name: string; group?: ArtifactGroup; relativePath?: string; size?: number; mime?: string; mtime?: number; } export type SessionArtifact = SessionArtifactBase & ({ kind: 'presented'; } | { kind: 'changed'; additions: number; deletions: number; isNew: boolean; }); export interface ResolveSessionArtifactsResult { artifacts: readonly SessionArtifact[]; } /** * Returns the App-owned cumulative Artifact snapshot for a daemon-backed * Session. A successful result replaces the CLI snapshot; an empty array * clears it. Throwing or rejecting leaves the CLI snapshot in effect. */ export type ResolveSessionArtifacts = (localSessionId: string, cwd: string) => ResolveSessionArtifactsResult | Promise;