@opengeni/react 0.23.0 → 0.25.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/{chunk-UQS7OQDE.js → chunk-F4CFWKVI.js} +334 -64
  2. package/dist/chunk-F4CFWKVI.js.map +1 -0
  3. package/dist/chunk-GQN2QIR2.js +3767 -0
  4. package/dist/chunk-GQN2QIR2.js.map +1 -0
  5. package/dist/{chunk-I3BJZIG5.js → chunk-HIWPQYWI.js} +2 -120
  6. package/dist/chunk-HIWPQYWI.js.map +1 -0
  7. package/dist/chunk-M7X4JZOD.js +121 -0
  8. package/dist/chunk-M7X4JZOD.js.map +1 -0
  9. package/dist/{chunk-UAHPKLB6.js → chunk-MP6237JB.js} +571 -975
  10. package/dist/chunk-MP6237JB.js.map +1 -0
  11. package/dist/chunk-OZDLELJQ.js +937 -0
  12. package/dist/chunk-OZDLELJQ.js.map +1 -0
  13. package/dist/{chunk-CATATY77.js → chunk-TMH6HZWF.js} +8 -7
  14. package/dist/chunk-TMH6HZWF.js.map +1 -0
  15. package/dist/{chunk-6XUS5VFM.js → chunk-YU5PGUK7.js} +6 -4
  16. package/dist/{chunk-6XUS5VFM.js.map → chunk-YU5PGUK7.js.map} +1 -1
  17. package/dist/{composer-CVm5uoUI.d.ts → composer-DoC4veX1.d.ts} +6 -63
  18. package/dist/composer.d.ts +3 -2
  19. package/dist/composer.js +4 -3
  20. package/dist/fleet-decision-projection-SLNZMS42.js +241 -0
  21. package/dist/fleet-decision-projection-SLNZMS42.js.map +1 -0
  22. package/dist/fleet-decision-row-GGCAT4E4.js +351 -0
  23. package/dist/fleet-decision-row-GGCAT4E4.js.map +1 -0
  24. package/dist/index.d.ts +17 -259
  25. package/dist/index.js +1042 -5058
  26. package/dist/index.js.map +1 -1
  27. package/dist/machines.js +3 -2
  28. package/dist/session-Du_FsrZ1.d.ts +264 -0
  29. package/dist/session-ui-BqQDH7YV.d.ts +183 -0
  30. package/dist/session-ui.d.ts +7 -0
  31. package/dist/session-ui.js +17 -0
  32. package/dist/session-ui.js.map +1 -0
  33. package/dist/session.d.ts +4 -2
  34. package/dist/session.js +26 -9
  35. package/dist/{use-composer-By1wn3MM.d.ts → use-composer-BnEzheSk.d.ts} +8 -2
  36. package/dist/use-file-attachments-C0kpHrs9.d.ts +76 -0
  37. package/dist/use-turn-queue-3rkJwjFv.d.ts +290 -0
  38. package/package.json +6 -2
  39. package/src/components/composer.tsx +7 -6
  40. package/src/components/message-timeline.tsx +94 -54
  41. package/src/hooks/use-composer.ts +470 -73
  42. package/src/hooks/use-file-attachments.ts +96 -3
  43. package/src/hooks/use-goal.ts +23 -5
  44. package/src/hooks/use-session-events.ts +5 -0
  45. package/src/hooks/use-session-lineage.ts +1 -1
  46. package/src/hooks/use-session.ts +9 -6
  47. package/src/hooks/use-workspace-sessions.ts +30 -5
  48. package/src/session-ui.ts +13 -0
  49. package/src/session.ts +15 -0
  50. package/src/timeline/activity-rail.tsx +18 -2
  51. package/src/timeline/fleet-decision-projection.ts +366 -0
  52. package/src/timeline/fleet-decision-row.tsx +412 -0
  53. package/src/timeline/index.ts +2 -0
  54. package/src/timeline/projection.ts +19 -8
  55. package/src/timeline/tool-display-name.ts +16 -0
  56. package/src/timeline/tool-renderers.tsx +1 -1
  57. package/src/timeline/types.ts +68 -1
  58. package/dist/chunk-CATATY77.js.map +0 -1
  59. package/dist/chunk-I3BJZIG5.js.map +0 -1
  60. package/dist/chunk-UAHPKLB6.js.map +0 -1
  61. package/dist/chunk-UQS7OQDE.js.map +0 -1
  62. package/dist/session-Db00TRwl.d.ts +0 -446
package/dist/index.d.ts CHANGED
@@ -1,16 +1,22 @@
1
1
  import { S as SessionClientLike, C as ClientOverride } from './session-context-rgrfElMl.js';
2
2
  export { a as EmbeddedHumanInputSessionClientLike, b as EmbeddedSessionClientLike, c as EmbeddedSessionMcpApprovalPolicyClientLike, O as OpenGeniContextValue, u as useOpenGeni, d as useOpenGeniClient } from './session-context-rgrfElMl.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { WorkspaceControlEvent, Session, SessionEvent, EffectiveSessionControl, ClientModel, SessionGoal, ScheduledTask, SessionLineageResponse, VariableSet, CreateVariableSetRequest, UpdateVariableSetRequest, VariableSetVariableMetadata, RigChange, Rig, UpdateRigRequest, RigVersion, ProposeRigChangeRequest, CreateRigRequest, CapabilityPack, PackInstallation, RegisterCapabilityPackRequest, WorkspaceRegisteredPack, EnablePackRequest, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, BillingBalance, UsageEvent, SessionCapabilities, DesktopStreamCapability, DesktopConnectionState, DesktopRfbFactory, TerminalCapability, OpenGeniRequestOptions, FsReadResponse, FsWriteResponse, WorkspaceCaptureManifest, GitFileDiff, WorkspaceCaptureDegradedReason, MachineState, SessionHumanInputRequest, SubmitHumanInputResponseRequest, HumanInputQuestion, HumanInputAnswer, Permission, SessionStatus as SessionStatus$1, CapabilityUnavailableReason, MachineView, CodexAccountsResponse, CodexAccount, CodexRotationSettings } from '@opengeni/sdk';
4
+ import { WorkspaceControlEvent, EffectiveSessionControl, ClientModel, ScheduledTask, Session, VariableSet, CreateVariableSetRequest, UpdateVariableSetRequest, VariableSetVariableMetadata, RigChange, Rig, UpdateRigRequest, RigVersion, ProposeRigChangeRequest, CreateRigRequest, CapabilityPack, PackInstallation, RegisterCapabilityPackRequest, WorkspaceRegisteredPack, EnablePackRequest, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, BillingBalance, UsageEvent, SessionEvent, SessionCapabilities, DesktopStreamCapability, DesktopConnectionState, DesktopRfbFactory, TerminalCapability, OpenGeniRequestOptions, FsReadResponse, FsWriteResponse, WorkspaceCaptureManifest, GitFileDiff, WorkspaceCaptureDegradedReason, MachineState, Permission, SessionStatus as SessionStatus$1, CapabilityUnavailableReason, MachineView, CodexAccountsResponse, CodexAccount, CodexRotationSettings } from '@opengeni/sdk';
5
5
  export { MachineKind, MachineMetricsSeriesResponse, MachineState, MachineView, MachinesResponse, MetricSample } from '@opengeni/sdk';
6
6
  import * as react from 'react';
7
- import { ReactNode, ClipboardEvent, RefObject, ComponentType } from 'react';
8
- import { S as SessionEventFeedOptions, C as ComposerState } from './use-composer-By1wn3MM.js';
9
- export { a as ComposerSendExtras, F as FILE_ONLY_MESSAGE_TEXT, U as UseComposerOptions, c as composeSendInput, s as shouldSteerOnKey, b as shouldSubmitOnKey, u as useComposer } from './use-composer-By1wn3MM.js';
10
- import { U as UseTurnQueueResult, P as PendingApproval, T as ToolCallItem, A as ActivityItem, a as TurnOutcome, b as TimelineItem, c as AgentMessageItem, d as UserMessageItem, e as AuthNeededItem } from './session-Db00TRwl.js';
11
- export { B as BrowserSessionEventWindow, G as GoalItem, N as NoticeItem, f as PendingHumanInputRequest, Q as QueueMutationKind, R as ReasoningItem, S as SESSION_EVENT_BROWSER_MAX_BYTES, g as SESSION_EVENT_BROWSER_MAX_COUNT, h as SESSION_EVENT_BROWSER_PENDING_MAX_BYTES, i as SESSION_EVENT_BROWSER_PENDING_MAX_COUNT, j as SESSION_EVENT_BROWSER_SINGLE_EVENT_MAX_BYTES, k as SandboxItem, l as SessionEventsConnectionState, m as SessionStatusItem, n as TimelineGroup, o as TurnEndItem, p as UseHumanInputRequestsOptions, q as UseHumanInputRequestsResult, r as UseSessionControlOptions, s as UseSessionControlResult, t as UseSessionEventsOptions, u as UseSessionEventsResult, v as UseSessionMcpApprovalPolicyOptions, w as UseSessionMcpApprovalPolicyResult, x as UseTurnQueueOptions, W as WorkerItem, y as approvalsFromRequiresAction, z as boundBrowserSessionEventWindow, C as buildTimeline, D as creditExhaustedFromEvents, E as extractSessionRef, F as groupTimeline, H as humanInputRequestFromEvent, I as isHumanInputEvent, J as isSessionMcpApprovalPolicyEvent, K as isTurnQueueEvent, L as projectPendingApprovals, M as projectPendingHumanInputRequests, O as sessionStatusFromEvents, V as toolDisplayName, X as useHumanInputRequests, Y as useSessionControl, Z as useSessionEvents, _ as useSessionMcpApprovalPolicy, $ as useTurnQueue } from './session-Db00TRwl.js';
12
- import { C as ComposerControlLinks, a as ComposerTranscriptionControlProps, U as UseFileAttachmentsResult, S as SlashCommand, b as SlashCommandContext, c as ChatComposerMessages, d as SlashArg, e as CommandContext } from './composer-CVm5uoUI.js';
13
- export { f as CommandResult, g as ComposerTranscriptionControl, h as ComposerTranscriptionMessages, i as ConfirmState, F as FileAttachment, I as INITIAL_TRANSCRIPTION_CONTROL_STATE, N as Notice, O as OPEN_WORKSTREAM_CONTROL_EVENT, j as SlashCommandHandlers, T as TranscriptionControlAction, k as TranscriptionControlState, l as TranscriptionControlTransition, m as UseFileAttachmentsOptions, n as UseSlashCommandsOptions, o as UseSlashCommandsResult, p as UseTranscriptionOptions, q as UseTranscriptionResult, r as appendFinalTranscript, s as defaultChatComposerMessages, t as transitionTranscriptionControl, u as useFileAttachments, v as useSlashCommands, w as useTranscription } from './composer-CVm5uoUI.js';
7
+ import { ReactNode, ClipboardEvent, RefObject } from 'react';
8
+ import { P as PendingApproval } from './session-Du_FsrZ1.js';
9
+ export { B as BrowserSessionEventWindow, a as PendingHumanInputRequest, S as SESSION_EVENT_BROWSER_MAX_BYTES, b as SESSION_EVENT_BROWSER_MAX_COUNT, c as SESSION_EVENT_BROWSER_PENDING_MAX_BYTES, d as SESSION_EVENT_BROWSER_PENDING_MAX_COUNT, e as SESSION_EVENT_BROWSER_SINGLE_EVENT_MAX_BYTES, f as SessionEventsConnectionState, U as UseGoalOptions, g as UseGoalResult, h as UseHumanInputRequestsOptions, i as UseHumanInputRequestsResult, j as UseSessionControlOptions, k as UseSessionControlResult, l as UseSessionEventsOptions, m as UseSessionEventsResult, n as UseSessionLineageOptions, o as UseSessionLineageResult, p as UseSessionMcpApprovalPolicyOptions, q as UseSessionMcpApprovalPolicyResult, r as UseSessionOptions, s as UseSessionResult, t as approvalsFromRequiresAction, u as boundBrowserSessionEventWindow, v as buildTimeline, w as creditExhaustedFromEvents, x as extractSessionRef, y as groupTimeline, z as humanInputRequestFromEvent, A as isGoalEvent, C as isHumanInputEvent, D as isLineageRefreshEvent, E as isSessionMcpApprovalPolicyEvent, F as isTitleEvent, G as projectPendingApprovals, H as projectPendingHumanInputRequests, I as sessionStatusFromEvents, J as toolDisplayName, K as useGoal, L as useHumanInputRequests, M as useSession, N as useSessionControl, O as useSessionEvents, Q as useSessionLineage, R as useSessionMcpApprovalPolicy } from './session-Du_FsrZ1.js';
10
+ import { C as ComposerState, S as SessionEventFeedOptions } from './use-composer-BnEzheSk.js';
11
+ export { a as ComposerSendExtras, F as FILE_ONLY_MESSAGE_TEXT, U as UseComposerOptions, c as composeSendInput, s as shouldSteerOnKey, b as shouldSubmitOnKey, u as useComposer } from './use-composer-BnEzheSk.js';
12
+ import { C as ComposerControlLinks, a as ComposerTranscriptionControlProps, S as SlashCommand, b as SlashCommandContext, c as ChatComposerMessages, d as SlashArg, e as CommandContext } from './composer-DoC4veX1.js';
13
+ export { f as CommandResult, g as ComposerTranscriptionControl, h as ComposerTranscriptionMessages, i as ConfirmState, I as INITIAL_TRANSCRIPTION_CONTROL_STATE, N as Notice, O as OPEN_WORKSTREAM_CONTROL_EVENT, j as SlashCommandHandlers, T as TranscriptionControlAction, k as TranscriptionControlState, l as TranscriptionControlTransition, U as UseSlashCommandsOptions, m as UseSlashCommandsResult, n as UseTranscriptionOptions, o as UseTranscriptionResult, p as appendFinalTranscript, q as defaultChatComposerMessages, t as transitionTranscriptionControl, u as useSlashCommands, r as useTranscription } from './composer-DoC4veX1.js';
14
+ import { U as UseFileAttachmentsResult } from './use-file-attachments-C0kpHrs9.js';
15
+ export { F as FileAttachment, a as UseFileAttachmentsOptions, u as useFileAttachments } from './use-file-attachments-C0kpHrs9.js';
16
+ import { A as ActivityItem, T as TurnOutcome } from './use-turn-queue-3rkJwjFv.js';
17
+ export { a as AgentMessageItem, b as AuthNeededItem, G as GoalItem, N as NoticeItem, Q as QueueMutationKind, R as ReasoningItem, S as SandboxItem, c as SessionStatusItem, d as TimelineGroup, e as TimelineItem, f as ToolCallItem, g as TurnEndItem, U as UseTurnQueueOptions, h as UseTurnQueueResult, i as UserMessageItem, W as WorkerItem, j as isTurnQueueEvent, u as useTurnQueue } from './use-turn-queue-3rkJwjFv.js';
18
+ import { c as createToolRegistry, T as ToolRegistry } from './session-ui-BqQDH7YV.js';
19
+ export { C as CreateToolRegistryOptions, H as HumanInputAnswerDraft, a as HumanInputForm, b as HumanInputFormMessages, d as HumanInputFormProps, M as MessageTimeline, e as MessageTimelineProps, Q as QueueSurface, f as QueueSurfaceProps, g as TimelineRow, h as ToolRegistryEntry, i as ToolRenderer, j as ToolRendererProps, k as answersFromDrafts, l as defaultHumanInputFormMessages, r as rawTypeOf } from './session-ui-BqQDH7YV.js';
14
20
  export { CONNECTION_STATUS_META, ConnectionDot, ConnectionDotProps, ConnectionStatus, ConnectionStatusMeta, ConnectionStatusPill, ConnectionStatusPillProps, DeviceFlowPhase, EnrollmentConsent, EnrollmentConsentMachine, EnrollmentConsentPhase, EnrollmentConsentProps, EnrollmentDeviceFlow, EnrollmentDeviceFlowProps, HEALTH_TOKEN, HealthLevel, HealthVerdict, MACHINE_STATE_BADGE_META, METRICS, METRIC_WINDOWS, MachineCard, MachineCardProps, MachineDetail, MachineDetailProps, MachineDockBar, MachineDockBarProps, MachineHealthPill, MachineHealthPillProps, MachineMetrics, MachineMetricsProps, MachineStateBadgeMeta, MachineStatusPill, MachineStatusPillProps, MachinesClientLike, MachinesDashboard, MachinesDashboardProps, MetricDef, MetricHistoryChart, MetricHistoryChartProps, MetricKey, MetricSparkline, MetricSparklineProps, MetricWindow, SeriesPoint, SharedMachineDisclosure, SharedMachineDisclosureProps, UseMachinesOptions, UseMachinesResult, WINDOW_LABEL, connectionStatusForState, deriveHealth, healthPulses, pointsFor, useMachines } from './machines.js';
15
21
  import { ClassValue } from 'clsx';
16
22
 
@@ -26,45 +32,6 @@ type OpenGeniProviderProps = {
26
32
  */
27
33
  declare function OpenGeniProvider({ client, workspaceId, onWorkspaceControlEvent, children, }: OpenGeniProviderProps): react_jsx_runtime.JSX.Element;
28
34
 
29
- type UseSessionOptions = ClientOverride & SessionEventFeedOptions & {
30
- /** Re-fetch on an interval (ms). Off by default — pair with `useSessionEvents` for live status. */
31
- pollIntervalMs?: number | undefined;
32
- };
33
- type UseSessionResult = {
34
- session: Session | null;
35
- loading: boolean;
36
- error: Error | null;
37
- refresh: () => Promise<void>;
38
- /** Manually rename the session (PATCH, source='user'). Returns the updated session, or null on failure. */
39
- updateTitle: (title: string) => Promise<Session | null>;
40
- /** True while a rename is in flight. */
41
- updating: boolean;
42
- mutationError: Error | null;
43
- clearMutationError: () => void;
44
- };
45
- /** Event types that change the session title (auto + cross-client renames). */
46
- declare function isTitleEvent(event: Pick<SessionEvent, "type">): boolean;
47
- /** Fetch one session (with optional polling), live-patching its title on `session.title_set`. */
48
- declare function useSession(sessionId: string | null | undefined, options?: UseSessionOptions): UseSessionResult;
49
-
50
- /** The sole human prompt queue: compact above Goal, Agents, and composer. */
51
- type QueueSurfaceCommonProps = {
52
- /** Focus the composer owned by this queue after checkout/removal. */
53
- onRequestComposerFocus?: (() => void) | undefined;
54
- };
55
- type QueueSurfaceProps = (QueueSurfaceCommonProps & {
56
- queue: UseTurnQueueResult;
57
- composer: ComposerState;
58
- readOnly?: false | undefined;
59
- }) | (QueueSurfaceCommonProps & {
60
- queue: UseTurnQueueResult;
61
- composer?: undefined;
62
- readOnly: true;
63
- });
64
-
65
- /** The sole human prompt queue: compact above Goal, Agents, and composer. */
66
- declare const QueueSurface: (props: QueueSurfaceProps) => react_jsx_runtime.JSX.Element | null;
67
-
68
35
  type ChatComposerProps = {
69
36
  composer: ComposerState;
70
37
  /** Canonical workstream control, separate from lifecycle status. */
@@ -108,43 +75,6 @@ type ChatComposerProps = {
108
75
  */
109
76
  declare function ChatComposer({ composer, effectiveControl, queuedAheadCount, canControlWorkspace, controlLinks, placeholder, disabled, autoFocus, hint, controlsStart, transcription, header, onPaste, attachments, models, selectedModel, onSelectModel, className, commands, commandContext, onClearView, messages, }: ChatComposerProps): react_jsx_runtime.JSX.Element;
110
77
 
111
- /** Event types that change the session goal (set/updated/completed/paused/...). */
112
- declare function isGoalEvent(event: Pick<SessionEvent, "type">): boolean;
113
- type UseGoalOptions = ClientOverride & SessionEventFeedOptions & {
114
- /** Optional safety-net polling (ms). Off by default — goal.* events drive updates. */
115
- pollIntervalMs?: number | undefined;
116
- };
117
- type UseGoalResult = {
118
- /** The session goal, or null when the session has none. */
119
- goal: SessionGoal | null;
120
- /** Convenience flags over `goal.status`. */
121
- isActive: boolean;
122
- isPaused: boolean;
123
- isCompleted: boolean;
124
- loading: boolean;
125
- error: Error | null;
126
- refresh: () => Promise<void>;
127
- /** Pause the goal loop (PATCH status=paused). */
128
- pause: (rationale?: string) => Promise<SessionGoal | null>;
129
- /** Resume a paused goal: resets counters and re-arms continuations. */
130
- resume: () => Promise<SessionGoal | null>;
131
- /** Clear the session goal; goal-less sessions remain a successful no-op. */
132
- clearGoal: () => Promise<void>;
133
- /** Alias for `clearGoal`. */
134
- deleteGoal: () => Promise<void>;
135
- /** True while a pause/resume/clear is in flight. */
136
- updating: boolean;
137
- mutationError: Error | null;
138
- clearMutationError: () => void;
139
- };
140
- /**
141
- * The session's goal: state, the autonomy counters (`autoContinuations`,
142
- * `noProgressStreak`), and pause/resume control. A goal-less session yields
143
- * `goal: null` (the 404 is absorbed). Live-updates on `goal.*` events —
144
- * pass `options.events` from `useSessionEvents` to reuse its stream.
145
- */
146
- declare function useGoal(sessionId: string | null | undefined, options?: UseGoalOptions): UseGoalResult;
147
-
148
78
  type UseScheduledTasksOptions = ClientOverride & {
149
79
  limit?: number | undefined;
150
80
  pollIntervalMs?: number | undefined;
@@ -164,6 +94,8 @@ type UseWorkspaceSessionsOptions = ClientOverride & {
164
94
  parentSessionId?: string | null | undefined;
165
95
  cursor?: string | undefined;
166
96
  search?: string | undefined;
97
+ /** Return only the complete personal pinned projection. */
98
+ pinsOnly?: boolean | undefined;
167
99
  /** Refresh interval (ms) for fleet/manager views. Off by default. */
168
100
  pollIntervalMs?: number | undefined;
169
101
  enabled?: boolean | undefined;
@@ -186,22 +118,6 @@ type UseWorkspaceSessionsResult = {
186
118
  /** List the workspace's sessions — the data behind fleet and manager views. */
187
119
  declare function useWorkspaceSessions(options?: UseWorkspaceSessionsOptions): UseWorkspaceSessionsResult;
188
120
 
189
- type UseSessionLineageOptions = ClientOverride & {
190
- events?: SessionEvent[] | undefined;
191
- /** Refresh interval (ms). Off by default. */
192
- pollIntervalMs?: number | undefined;
193
- enabled?: boolean | undefined;
194
- };
195
- type UseSessionLineageResult = {
196
- lineage: SessionLineageResponse | null;
197
- loading: boolean;
198
- error: Error | null;
199
- refresh: () => Promise<void>;
200
- };
201
- declare function isLineageRefreshEvent(event: SessionEvent): boolean;
202
- /** Read the ancestors + descendant tree for one session. Data-only; no UI state. */
203
- declare function useSessionLineage(sessionId: string | null | undefined, options?: UseSessionLineageOptions): UseSessionLineageResult;
204
-
205
121
  type UseVariableSetsOptions = ClientOverride & {
206
122
  pollIntervalMs?: number | undefined;
207
123
  enabled?: boolean | undefined;
@@ -1063,91 +979,6 @@ type ApprovalSurfaceProps = {
1063
979
  */
1064
980
  declare function ApprovalSurface({ approvals, onApprove, onReject, responding, error, messages: overrides, renderApproval, className, }: ApprovalSurfaceProps): react_jsx_runtime.JSX.Element | null;
1065
981
 
1066
- type HumanInputAnswerDraft = {
1067
- values: string[];
1068
- other: string;
1069
- otherSelected: boolean;
1070
- };
1071
- type HumanInputFormMessages = {
1072
- title: string;
1073
- description: string;
1074
- submit: string;
1075
- skip: string;
1076
- submitting: string;
1077
- other: string;
1078
- deadlineLabel: string;
1079
- formatDeadline: (value: string) => string;
1080
- required: string;
1081
- minLength: (count: number) => string;
1082
- maxLength: (count: number) => string;
1083
- otherRequired: string;
1084
- minSelections: (count: number) => string;
1085
- maxSelections: (count: number) => string;
1086
- };
1087
- declare const defaultHumanInputFormMessages: HumanInputFormMessages;
1088
- type HumanInputFormProps = {
1089
- request: Pick<SessionHumanInputRequest, "id" | "questions" | "allowSkip" | "expiresAt">;
1090
- onSubmit: (response: SubmitHumanInputResponseRequest) => void | Promise<void>;
1091
- submitting?: boolean | undefined;
1092
- error?: string | null | undefined;
1093
- title?: ReactNode;
1094
- description?: ReactNode;
1095
- submitLabel?: string | undefined;
1096
- skipLabel?: string | undefined;
1097
- messages?: Partial<HumanInputFormMessages> | undefined;
1098
- autoFocus?: boolean | undefined;
1099
- className?: string | undefined;
1100
- };
1101
- /**
1102
- * Styled but host-neutral renderer for one structured request. Hosts can use
1103
- * the headless `useHumanInputRequests` hook instead, or replace the title and
1104
- * description while retaining accessible field semantics and validation.
1105
- */
1106
- declare function HumanInputForm({ request, onSubmit, submitting, error, title, description, submitLabel, skipLabel, messages: messageOverrides, autoFocus, className, }: HumanInputFormProps): react_jsx_runtime.JSX.Element;
1107
- declare function answersFromDrafts(questions: HumanInputQuestion[], drafts: Record<string, HumanInputAnswerDraft>, messageOverrides?: Partial<HumanInputFormMessages>): {
1108
- answers: HumanInputAnswer[];
1109
- errors: Record<string, string>;
1110
- };
1111
-
1112
- type ToolRendererProps = {
1113
- item: ToolCallItem;
1114
- };
1115
- type ToolRenderer = ComponentType<ToolRendererProps>;
1116
- /** A registry entry: which key it matches and the component that renders it. */
1117
- type ToolRegistryEntry = {
1118
- match: "rawType";
1119
- type: string;
1120
- render: ToolRenderer;
1121
- } | {
1122
- match: "name";
1123
- name: string;
1124
- render: ToolRenderer;
1125
- };
1126
- type ToolRegistry = {
1127
- /** Resolve the renderer for a call (never null — falls back to generic). */
1128
- resolve: (item: ToolCallItem) => ToolRenderer;
1129
- /** The generic fallback renderer. */
1130
- fallback: ToolRenderer;
1131
- };
1132
- type CreateToolRegistryOptions = {
1133
- /**
1134
- * Entries that take precedence over the built-ins. Earlier entries win, so a
1135
- * consumer can shadow a default renderer for the same key.
1136
- */
1137
- entries?: ToolRegistryEntry[] | undefined;
1138
- /** Replace the generic fallback used for unmatched tools. */
1139
- fallback?: ToolRenderer | undefined;
1140
- };
1141
- /** The `raw.type` of a projected tool call, when the provider item carries one. */
1142
- declare function rawTypeOf(item: ToolCallItem): string | null;
1143
- /**
1144
- * Build a tool registry from a set of entries and a fallback. The returned
1145
- * registry resolves in priority order: `raw.type` entries first, then `name`
1146
- * entries, then the fallback. Consumer `entries` are consulted before the
1147
- * built-in `baseEntries`, so they shadow defaults cleanly.
1148
- */
1149
- declare function createToolRegistry(baseEntries: ToolRegistryEntry[], baseFallback: ToolRenderer, options?: CreateToolRegistryOptions): ToolRegistry;
1150
-
1151
982
  /** The built-in tool renderer registry: every first-party tool plus a fallback. */
1152
983
  declare const defaultToolRegistry: ToolRegistry;
1153
984
  /** Build a registry that extends the built-ins with consumer entries/fallback. */
@@ -1521,79 +1352,6 @@ type ModelPickerProps = {
1521
1352
  */
1522
1353
  declare function ModelPicker({ models, value, onChange, disabled, className, label, }: ModelPickerProps): react_jsx_runtime.JSX.Element | null;
1523
1354
 
1524
- type MessageTimelineProps = {
1525
- /** Raw session events (projected internally) … */
1526
- events?: SessionEvent[] | undefined;
1527
- /** … or pre-projected items (e.g. from `useSessionEvents().timeline`). */
1528
- items?: TimelineItem[] | undefined;
1529
- /** Current session status; drives the live "working" indicator. */
1530
- status?: SessionStatus$1 | null | undefined;
1531
- /** Plug a markdown renderer for message bodies (e.g. streamdown). */
1532
- renderMessageText?: ((text: string, item: AgentMessageItem | UserMessageItem) => ReactNode) | undefined;
1533
- /** Drill into a spawned worker session. */
1534
- onOpenSession?: ((sessionId: string) => void) | undefined;
1535
- /**
1536
- * Deep-link a memory row (a `memory.saved` / `memory.corrected` step) to its
1537
- * record in the host's memory pane. Opt-in, exactly like `onReconnect`: the
1538
- * library draws no "View in memory" affordance without a handler — the memory
1539
- * row is then non-interactive rich content. This is the switch that makes the
1540
- * deep-link a first-party OpenGeni capability without other SDK consumers
1541
- * opting into it. The app supplies it (it owns routing to the memory pane).
1542
- */
1543
- onMemoryClick?: ((memoryId: string) => void) | undefined;
1544
- /**
1545
- * Start the reconnect flow when a tool needs its connection reauthorized. The
1546
- * app supplies this (it owns the SDK client + workspace): it typically kicks
1547
- * off `startConnectionOAuth` and redirects, or routes to credential entry.
1548
- * Rejecting surfaces a calm inline error on the card; the library never draws
1549
- * a Reconnect button without a handler to run it.
1550
- */
1551
- onReconnect?: ((item: AuthNeededItem) => void | Promise<void>) | undefined;
1552
- /**
1553
- * Resolve a provider domain (from a reconnect card) to a logo URL the host
1554
- * serves itself — the app maps it through its catalog + `catalogAssetUrl`.
1555
- * Return null/undefined to fall back to a calm monogram. The library never
1556
- * fetches an off-origin favicon (CSP + privacy); an unresolved logo is a
1557
- * monogram, not an external image.
1558
- */
1559
- resolveProviderLogo?: ((providerDomain: string) => string | null | undefined) | undefined;
1560
- /**
1561
- * The tool-renderer registry that resolves how each tool call is drawn.
1562
- * Defaults to {@link defaultToolRegistry}; pass a registry from
1563
- * `createDefaultToolRegistry({ entries })` to add custom tool renderers.
1564
- */
1565
- toolRegistry?: ToolRegistry | undefined;
1566
- /** Follow new events when pinned to the bottom. Defaults to true. */
1567
- autoFollow?: boolean | undefined;
1568
- /** Older durable history exists above the current window (see useSessionEvents). */
1569
- hasOlder?: boolean | undefined;
1570
- /** An older window is being fetched; shows the quiet top shimmer. */
1571
- loadingOlder?: boolean | undefined;
1572
- /** Called when the reader nears the top and older history should backfill. */
1573
- onLoadOlder?: (() => void) | undefined;
1574
- emptyState?: ReactNode | undefined;
1575
- className?: string | undefined;
1576
- };
1577
- /**
1578
- * The session timeline: chat messages with streaming deltas, collapsed
1579
- * activity clusters (reasoning, tool calls, sandbox work), spawned-worker
1580
- * cards, goal markers, and status transitions. Owns stick-to-bottom scrolling
1581
- * with a "jump to latest" affordance when the reader scrolls back.
1582
- */
1583
- declare function MessageTimeline({ events, items, status, renderMessageText, onOpenSession, onMemoryClick, onReconnect, resolveProviderLogo, toolRegistry, autoFollow, hasOlder, loadingOlder, onLoadOlder, emptyState, className, }: MessageTimelineProps): react_jsx_runtime.JSX.Element;
1584
- /**
1585
- * Render one non-activity timeline item (chat message, status divider, goal
1586
- * landmark, notice). Exported so the component demo draws the EXACT same rows as
1587
- * the live app — no forked bubble/goal markup.
1588
- */
1589
- declare function TimelineRow({ item, renderMessageText, onReconnect, resolveProviderLogo, onOpenSession, }: {
1590
- item: TimelineItem;
1591
- renderMessageText?: ((text: string, item: AgentMessageItem | UserMessageItem) => ReactNode) | undefined;
1592
- onReconnect?: ((item: AuthNeededItem) => void | Promise<void>) | undefined;
1593
- resolveProviderLogo?: ((providerDomain: string) => string | null | undefined) | undefined;
1594
- onOpenSession?: ((sessionId: string) => void) | undefined;
1595
- }): react_jsx_runtime.JSX.Element | null;
1596
-
1597
1355
  /**
1598
1356
  * The default renderer for chat message bodies in {@link MessageTimeline}.
1599
1357
  *
@@ -2385,4 +2143,4 @@ declare function isCreditExhaustion(input: {
2385
2143
  */
2386
2144
  declare function humanizeFailureReason(reason: string | null): string | null;
2387
2145
 
2388
- export { ActivityDisclosure, type ActivityDisclosureProps, ActivityItem, ActivityRail, type ActivityRailProps, AgentMessageItem, type ApplyPatchOperation, ApprovalSurface, type ApprovalSurfaceMessages, type ApprovalSurfaceProps, AuthNeededItem, BodyNote, CREDIT_EXHAUSTION_MESSAGE, CapturedFileUnavailableError, type CapturedFileUnavailableReason, ChatComposer, ChatComposerMessages, type ChatComposerProps, ClientOverride, CodeEditor, type CodeEditorProps, type CodexAccountsClientLike, CommandContext, CommandPalette, type CommandPaletteProps, ComposerState, ComposerTranscriptionControlProps, type CreateToolRegistryOptions, type DeriveMachineChipInput, DesktopViewer, type DesktopViewerProps, type DesktopWebSocketFactory, type DesktopWebSocketLike, type DiffTheme, DiffView, type DiffViewProps, type DisclosureChip, DisclosureDefaultsProvider, FileBrowser, type FileBrowserProps, type FileTreeNode, type FileTreeStatus, FileWriteConflictError, FleetTile, type FleetTileProps, type HumanInputAnswerDraft, HumanInputForm, type HumanInputFormMessages, type HumanInputFormProps, LightboxProvider, type MachineChip, type MachineChipState, Markdown, type MarkdownProps, MediaEmpty, MediaSkeleton, MessageTimeline, type MessageTimelineProps, ModelPicker, type ModelPickerProps, OpenGeniProvider, type OpenGeniProviderProps, type ParsedCommandLine, PayloadBlock, PendingApproval, PierreDiff, type PierreDiffProps, PierreFile, type PierreFileProps, QueueSurface, type QueueSurfaceProps, SESSION_STATUS_META, SandboxFiles, type SandboxFilesProps, type SandboxGitFileDiff, SandboxTerminal, type SandboxTerminalProps, SandboxWorkspace, type SandboxWorkspaceProps, type SandboxWorkspaceSurface, type SandboxWriteFileOptions, ScreenshotFigure, type SessionCapabilitiesState, SessionClientLike, SessionStatus, type SessionStatusMeta, type SessionStatusProps, SlashArg, SlashCommand, SlashCommandContext, StatusDot, type StatusDotProps, TermBlock, type TerminalChunk, type TerminalStreamStatus, Thumbnail, TimelineItem, TimelineRow, ToolCallItem, type ToolRegistry, type ToolRegistryEntry, type ToolRenderer, type ToolRendererProps, TurnOutcome, TurnSummary, type TurnSummaryProps, type UseAvailableModelsOptions, type UseAvailableModelsResult, type UseBillingUsageOptions, type UseBillingUsageResult, type UseCodexAccountsOptions, type UseCodexAccountsResult, type UseDesktopStreamOptions, type UseDesktopStreamResult, type UseEnvironmentsOptions, type UseEnvironmentsResult, UseFileAttachmentsResult, type UseGoalOptions, type UseGoalResult, type UseMachineChipOptions, type UsePacksOptions, type UsePacksResult, type UseRelayFrameStreamOptions, type UseRelayFrameStreamResult, type UseRigChangesOptions, type UseRigChangesResult, type UseRigOptions, type UseRigResult, type UseRigVersionsOptions, type UseRigVersionsResult, type UseRigsOptions, type UseRigsResult, type UseSandboxFilesOptions, type UseSandboxFilesResult, type UseSandboxGitOptions, type UseSandboxGitResult, type UseSandboxTerminalOptions, type UseSandboxTerminalResult, type UseSandboxWorkspaceTabsOptions, type UseSandboxWorkspaceTabsResult, type UseScheduledTasksOptions, type UseScheduledTasksResult, type UseSessionCapabilitiesOptions, type UseSessionCapabilitiesResult, type UseSessionLineageOptions, type UseSessionLineageResult, type UseSessionOptions, type UseSessionResult, type UseTerminalStreamOptions, type UseTerminalStreamResult, UseTurnQueueResult, type UseVariableSetsOptions, type UseVariableSetsResult, type UseWorkspaceCaptureOptions, type UseWorkspaceCaptureResult, type UseWorkspaceEditOptions, type UseWorkspaceEditResult, type UseWorkspaceSessionsOptions, type UseWorkspaceSessionsResult, type UseWorkspacesOptions, type UseWorkspacesResult, UserMessageItem, WORKBENCH_SURFACES, WORKBENCH_TAB_CHANGES, WORKBENCH_TAB_DESKTOP, WORKBENCH_TAB_FILES, WORKBENCH_TAB_TERMINAL, WorkspaceDock, type WorkspaceDockProps, type WorkspaceEditConflict, type WorkspaceEditState, type WorkspaceMachine, type WorkspaceNotification, type WorkspaceTab, type XtermTheme, answersFromDrafts, applyPatchOps, argHint, cn, controlCaret, createDefaultToolRegistry, createToolRegistry, defaultApprovalSurfaceMessages, defaultCommands, defaultHumanInputFormMessages, defaultToolRegistry, deriveMachineChip, execTruncated, filterCommands, firstMissingRequiredArg, formatAsOf, formatBytes, formatRelativeTime, gitFileDiffToPatch, hasPermission, humanizeFailureReason, initialWorkspaceTab, isApplyPatch, isCodexAccountEvent, isCreditExhaustion, isExecSessionLostBanner, isGoalEvent, isLineageRefreshEvent, isTitleEvent, languageForPath, looksBinary, matchCommand, parseCommandLine, parseExecBannerSessionId, parseToolArgs, rawTypeOf, redactSecrets, sandboxCommandExitCode, sessionDisplayTitle, stringifyPayload, stripExecBanner, tailPeek, truncate, tryParseJson, unwrapMcpOutput, useAvailableModels, useBillingUsage, useCodexAccounts, useDesktopStream, useEnvironments, useGoal, useLightbox, useLightboxOptional, useMachineChip, usePacks, useRelayFrameStream, useRig, useRigChanges, useRigVersions, useRigs, useSandboxFiles, useSandboxGit, useSandboxTerminal, useSandboxWorkspaceTabs, useScheduledTasks, useSession, useSessionCapabilities, useSessionLineage, useTerminalStream, useVariableSets, useWorkspaceCapture, useWorkspaceEdit, useWorkspaceSessions, useWorkspaces, v4aToGitFileDiff, xtermThemeFromTokens };
2146
+ export { ActivityDisclosure, type ActivityDisclosureProps, ActivityItem, ActivityRail, type ActivityRailProps, type ApplyPatchOperation, ApprovalSurface, type ApprovalSurfaceMessages, type ApprovalSurfaceProps, BodyNote, CREDIT_EXHAUSTION_MESSAGE, CapturedFileUnavailableError, type CapturedFileUnavailableReason, ChatComposer, ChatComposerMessages, type ChatComposerProps, ClientOverride, CodeEditor, type CodeEditorProps, type CodexAccountsClientLike, CommandContext, CommandPalette, type CommandPaletteProps, ComposerState, ComposerTranscriptionControlProps, type DeriveMachineChipInput, DesktopViewer, type DesktopViewerProps, type DesktopWebSocketFactory, type DesktopWebSocketLike, type DiffTheme, DiffView, type DiffViewProps, type DisclosureChip, DisclosureDefaultsProvider, FileBrowser, type FileBrowserProps, type FileTreeNode, type FileTreeStatus, FileWriteConflictError, FleetTile, type FleetTileProps, LightboxProvider, type MachineChip, type MachineChipState, Markdown, type MarkdownProps, MediaEmpty, MediaSkeleton, ModelPicker, type ModelPickerProps, OpenGeniProvider, type OpenGeniProviderProps, type ParsedCommandLine, PayloadBlock, PendingApproval, PierreDiff, type PierreDiffProps, PierreFile, type PierreFileProps, SESSION_STATUS_META, SandboxFiles, type SandboxFilesProps, type SandboxGitFileDiff, SandboxTerminal, type SandboxTerminalProps, SandboxWorkspace, type SandboxWorkspaceProps, type SandboxWorkspaceSurface, type SandboxWriteFileOptions, ScreenshotFigure, type SessionCapabilitiesState, SessionClientLike, SessionStatus, type SessionStatusMeta, type SessionStatusProps, SlashArg, SlashCommand, SlashCommandContext, StatusDot, type StatusDotProps, TermBlock, type TerminalChunk, type TerminalStreamStatus, Thumbnail, ToolRegistry, TurnOutcome, TurnSummary, type TurnSummaryProps, type UseAvailableModelsOptions, type UseAvailableModelsResult, type UseBillingUsageOptions, type UseBillingUsageResult, type UseCodexAccountsOptions, type UseCodexAccountsResult, type UseDesktopStreamOptions, type UseDesktopStreamResult, type UseEnvironmentsOptions, type UseEnvironmentsResult, UseFileAttachmentsResult, type UseMachineChipOptions, type UsePacksOptions, type UsePacksResult, type UseRelayFrameStreamOptions, type UseRelayFrameStreamResult, type UseRigChangesOptions, type UseRigChangesResult, type UseRigOptions, type UseRigResult, type UseRigVersionsOptions, type UseRigVersionsResult, type UseRigsOptions, type UseRigsResult, type UseSandboxFilesOptions, type UseSandboxFilesResult, type UseSandboxGitOptions, type UseSandboxGitResult, type UseSandboxTerminalOptions, type UseSandboxTerminalResult, type UseSandboxWorkspaceTabsOptions, type UseSandboxWorkspaceTabsResult, type UseScheduledTasksOptions, type UseScheduledTasksResult, type UseSessionCapabilitiesOptions, type UseSessionCapabilitiesResult, type UseTerminalStreamOptions, type UseTerminalStreamResult, type UseVariableSetsOptions, type UseVariableSetsResult, type UseWorkspaceCaptureOptions, type UseWorkspaceCaptureResult, type UseWorkspaceEditOptions, type UseWorkspaceEditResult, type UseWorkspaceSessionsOptions, type UseWorkspaceSessionsResult, type UseWorkspacesOptions, type UseWorkspacesResult, WORKBENCH_SURFACES, WORKBENCH_TAB_CHANGES, WORKBENCH_TAB_DESKTOP, WORKBENCH_TAB_FILES, WORKBENCH_TAB_TERMINAL, WorkspaceDock, type WorkspaceDockProps, type WorkspaceEditConflict, type WorkspaceEditState, type WorkspaceMachine, type WorkspaceNotification, type WorkspaceTab, type XtermTheme, applyPatchOps, argHint, cn, controlCaret, createDefaultToolRegistry, createToolRegistry, defaultApprovalSurfaceMessages, defaultCommands, defaultToolRegistry, deriveMachineChip, execTruncated, filterCommands, firstMissingRequiredArg, formatAsOf, formatBytes, formatRelativeTime, gitFileDiffToPatch, hasPermission, humanizeFailureReason, initialWorkspaceTab, isApplyPatch, isCodexAccountEvent, isCreditExhaustion, isExecSessionLostBanner, languageForPath, looksBinary, matchCommand, parseCommandLine, parseExecBannerSessionId, parseToolArgs, redactSecrets, sandboxCommandExitCode, sessionDisplayTitle, stringifyPayload, stripExecBanner, tailPeek, truncate, tryParseJson, unwrapMcpOutput, useAvailableModels, useBillingUsage, useCodexAccounts, useDesktopStream, useEnvironments, useLightbox, useLightboxOptional, useMachineChip, usePacks, useRelayFrameStream, useRig, useRigChanges, useRigVersions, useRigs, useSandboxFiles, useSandboxGit, useSandboxTerminal, useSandboxWorkspaceTabs, useScheduledTasks, useSessionCapabilities, useTerminalStream, useVariableSets, useWorkspaceCapture, useWorkspaceEdit, useWorkspaceSessions, useWorkspaces, v4aToGitFileDiff, xtermThemeFromTokens };