import type { OpenGeniClient } from "@opengeni/sdk"; /** * The slice of `OpenGeniClient` the hooks depend on. Structural, so apps can * pass the real SDK client, a proxy-backed client that routes through their * own API, or a scripted client in tests/demos. */ type SessionClientMethods = Pick & Partial>; /** * Compact list transport is optional for scripted and older clients, and so is * the attention mutation an open conversation uses to mark itself read. */ export type SessionClientLike = SessionClientMethods & Partial>; /** * Tenant-safe client surface required by the session-only React entry. * * A host proxy can implement only these session-scoped operations instead of * stubbing Opengeni's workbench, billing, rig, file-system, and workspace * administration APIs. Workspace-level resume is deliberately optional: a * host that does not expose that authority still supports every session-local * composer/control path. */ export type EmbeddedSessionClientLike = Pick & { setWorkspaceInferenceState?: OpenGeniClient["setWorkspaceInferenceState"] | undefined; /** * Optional: lets an open conversation mark itself read while the person * watches it. Without it the conversation works, but replies stay unread. */ updateSessionAttention?: OpenGeniClient["updateSessionAttention"] | undefined; /** * Optional: lets conversation history see what the server's history filter * applied and whether a page has more. Without it history stays correct on * every server version, but keeps each long turn's tool calls and model * bookkeeping in its reads. */ listEventPage?: OpenGeniClient["listEventPage"] | undefined; }; /** Event-read surface shared by hooks that optionally tail a session. */ export type EmbeddedSessionEventClientLike = Pick; /** Exact client surface required by {@link useSession}. */ export type EmbeddedSessionReadClientLike = EmbeddedSessionEventClientLike & Pick; /** * Exact client surface required by {@link useGoal}. `findGoal` is optional: * when present the hook reads a goal-less session as a successful `null` * instead of an absorbed 404. */ export type EmbeddedGoalClientLike = EmbeddedSessionEventClientLike & Pick & { findGoal?: OpenGeniClient["findGoal"] | undefined; }; /** Exact client surface required by {@link useSessionLineage}. */ export type EmbeddedSessionLineageClientLike = EmbeddedSessionEventClientLike & Pick; /** Exact client surface required by {@link useFileAttachments}. */ export type EmbeddedFileAttachmentClientLike = Pick & Partial>; /** Exact client surface required by structured human-input hooks. */ export type EmbeddedHumanInputSessionClientLike = EmbeddedSessionEventClientLike & Pick; /** Exact client surface required by MCP approval-policy hooks. */ export type EmbeddedSessionMcpApprovalPolicyClientLike = EmbeddedSessionEventClientLike & Pick; /** Exact client surface required by the public realtime React subpath. */ export type EmbeddedRealtimeSessionClientLike = Pick & Partial>; /** Exact public SDK surface required by cross-surface human interventions. */ export type EmbeddedInterventionClientLike = Pick; /** Exact public SDK surface required by BrowserSession hooks and components. */ export type EmbeddedBrowserInteractionClientLike = Pick & EmbeddedInterventionClientLike; /** Exact public SDK surface required by ComputerSession hooks and components. */ export type EmbeddedComputerInteractionClientLike = Pick & EmbeddedInterventionClientLike & Partial>; /** Complete public Browser + Computer interaction surface. */ export type EmbeddedInteractionClientLike = EmbeddedBrowserInteractionClientLike & EmbeddedComputerInteractionClientLike; export {};