import { type HarnessSessionList } from './harness-session-state.js'; import { type ComponentType, type ReactNode } from 'react'; import type { Context as ClientContext } from '@deepseek-ai/cordis'; import type { DshAccountSession } from '../dsh-remote/account-session-types.js'; type SessionsState = HarnessSessionList; type Workspace = { workspaceId: string; title: string; path: string; createdAt?: number; sessionIds: string[]; }; type WorkspacesState = { items: readonly Workspace[]; archivedSessionIds: readonly string[]; phase: string; state: string; error: unknown; }; type Hook = (select: (state: S) => T) => T; type BrowserView = Record & { orderBy: 'manual' | 'updated'; sessionOrderByAccount: Record; }; type BrowserProps = Record & { useSessions: Hook; useWorkspaces: Hook; useStore: Hook; open(id: string): void; startSession(id?: string): void; renameSession(id: string, title: string): Promise; archiveSession(id: string): Promise; forkSession(id: string): void; renderSlot(name: string, owner: object, options?: unknown): ReactNode; }; declare module '@deepseek-ai/dsh-client-ui-slots' { interface SlotMap { 'arkme.accountSessions.directoryFlow': { kind: 'single'; scope: 'root'; owner: object; }; } } export declare const accountSessionKey: (row: Pick) => string; /** The native updated mode promotes newly discovered rows, even old remote * history. Project its display orders by actual activity time, not arrival. */ export declare function projectAccountSessionOrder(view: BrowserView, sessions: SessionsState): BrowserView; /** Local rows keep native identity, blank/activity state and all native actions. */ export declare function projectAccountSessions(local: SessionsState, rows: readonly DshAccountSession[], selected?: DshAccountSession): SessionsState; export declare function projectAccountWorkspaces(local: WorkspacesState, rows: readonly DshAccountSession[]): WorkspacesState; /** Apply a complete authoritative catalog as add/update/delete; unchanged rows retain identity. */ export declare function reconcileAccountSessions(previous: DshAccountSession[], incoming: DshAccountSession[]): DshAccountSession[]; /** Header and browser consume the same account-scoped discovery owner. */ export declare function useAccountSessionCatalog(surface: Element): { rows: DshAccountSession[]; localRuntimeRef: string | undefined; localDesktopName: string | undefined; }; /** All native sources share one account-scoped catalog. */ export declare function AccountSessionBrowser({ Native, surface, ...props }: BrowserProps & { Native: ComponentType; surface: Element; }): import("react").JSX.Element; /** Shadow the native entry using its public component/store/inject seats. The * directory picker gets its own declared slot; never borrow another entry's * render authorization or mutate the original registration. */ export declare function installHarnessAccountSessions(ctx: ClientContext, surface: Element): () => void; export {}; //# sourceMappingURL=harness-account-sessions.d.ts.map