@opengeni/react 0.29.0 → 0.32.1

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 (207) hide show
  1. package/dist/approvals.d.ts +14 -0
  2. package/dist/{chunk-M7X4JZOD.js → chunk-4QOQ2DSR.js} +8 -1
  3. package/dist/chunk-4QOQ2DSR.js.map +1 -0
  4. package/dist/{chunk-HQFPO7VX.js → chunk-7CJOAW3V.js} +24 -3
  5. package/dist/{chunk-HQFPO7VX.js.map → chunk-7CJOAW3V.js.map} +1 -1
  6. package/dist/{chunk-CSJBF3QJ.js → chunk-A2WITZTI.js} +377 -113
  7. package/dist/chunk-A2WITZTI.js.map +1 -0
  8. package/dist/{chunk-BC6RKIHS.js → chunk-GZ4KR67U.js} +11 -11
  9. package/dist/{chunk-AVLMIWYO.js → chunk-KZRUYCL4.js} +12 -6
  10. package/dist/chunk-KZRUYCL4.js.map +1 -0
  11. package/dist/{chunk-OKXCECLG.js → chunk-TCCE5ZU5.js} +171 -22
  12. package/dist/chunk-TCCE5ZU5.js.map +1 -0
  13. package/dist/chunk-U255M5EZ.js +178 -0
  14. package/dist/chunk-U255M5EZ.js.map +1 -0
  15. package/dist/{chunk-IPVOVOW6.js → chunk-WY2QN2CX.js} +2539 -2174
  16. package/dist/chunk-WY2QN2CX.js.map +1 -0
  17. package/dist/chunk-ZNNE2VES.js +6413 -0
  18. package/dist/chunk-ZNNE2VES.js.map +1 -0
  19. package/dist/client.d.ts +33 -0
  20. package/dist/commands/index.d.ts +3 -0
  21. package/dist/commands/registry.d.ts +41 -0
  22. package/dist/commands/types.d.ts +85 -0
  23. package/dist/components/approval-surface.d.ts +28 -0
  24. package/dist/components/chat-composer.d.ts +51 -0
  25. package/dist/components/code-editor.d.ts +43 -0
  26. package/dist/components/command-palette.d.ts +25 -0
  27. package/dist/components/composer-transcription-control.d.ts +36 -0
  28. package/dist/components/composer.d.ts +277 -0
  29. package/dist/components/copy-button.d.ts +26 -0
  30. package/dist/components/desktop-viewer.d.ts +85 -0
  31. package/dist/components/diff-view.d.ts +38 -0
  32. package/dist/components/enrollment-consent.d.ts +33 -0
  33. package/dist/components/enrollment-device-flow.d.ts +27 -0
  34. package/dist/components/file-browser.d.ts +47 -0
  35. package/dist/components/fleet-tile.d.ts +18 -0
  36. package/dist/components/human-input-form.d.ts +47 -0
  37. package/dist/components/machine-card.d.ts +21 -0
  38. package/dist/components/machine-dock-bar.d.ts +31 -0
  39. package/dist/components/machine-health-pill.d.ts +9 -0
  40. package/dist/components/machine-metrics.d.ts +15 -0
  41. package/dist/components/machine-status-pill.d.ts +54 -0
  42. package/dist/components/machines/health.d.ts +25 -0
  43. package/dist/components/machines/machine-detail.d.ts +14 -0
  44. package/dist/components/machines/metric-history-chart.d.ts +24 -0
  45. package/dist/components/machines/metric-sparkline.d.ts +9 -0
  46. package/dist/components/machines/series.d.ts +24 -0
  47. package/dist/components/machines-dashboard.d.ts +30 -0
  48. package/dist/components/markdown.d.ts +31 -0
  49. package/dist/components/message-timeline.d.ts +98 -0
  50. package/dist/components/model-picker.d.ts +19 -0
  51. package/dist/components/pierre-diff.d.ts +34 -0
  52. package/dist/components/pierre-file.d.ts +27 -0
  53. package/dist/components/queue-draft-policy.d.ts +7 -0
  54. package/dist/components/queue-surface-implementation.d.ts +20 -0
  55. package/dist/components/queue-surface-state.d.ts +12 -0
  56. package/dist/components/queue-surface.d.ts +12 -0
  57. package/dist/components/sandbox-files.d.ts +49 -0
  58. package/dist/components/sandbox-terminal.d.ts +123 -0
  59. package/dist/components/sandbox-workspace.d.ts +128 -0
  60. package/dist/components/session-chrome.d.ts +70 -0
  61. package/dist/components/session-status.d.ts +25 -0
  62. package/dist/components/soften-streaming-markdown.d.ts +13 -0
  63. package/dist/components/stream-reveal.d.ts +37 -0
  64. package/dist/components/tip-follow.d.ts +139 -0
  65. package/dist/components/tooltip.d.ts +16 -0
  66. package/dist/components/workbench-changes.d.ts +34 -0
  67. package/dist/components/workspace-dock.d.ts +35 -0
  68. package/dist/composer.d.ts +11 -7
  69. package/dist/composer.js +9 -6
  70. package/dist/hooks/internal.d.ts +46 -0
  71. package/dist/hooks/use-available-models.d.ts +37 -0
  72. package/dist/hooks/use-billing-usage.d.ts +26 -0
  73. package/dist/hooks/use-codex-accounts.d.ts +69 -0
  74. package/dist/{use-composer-ClHy1rkL.d.ts → hooks/use-composer.d.ts} +16 -24
  75. package/dist/hooks/use-desktop-stream.d.ts +43 -0
  76. package/dist/hooks/use-environments.d.ts +35 -0
  77. package/dist/{use-file-attachments-BmT8WtqO.d.ts → hooks/use-file-attachments.d.ts} +6 -9
  78. package/dist/hooks/use-goal.d.ts +46 -0
  79. package/dist/hooks/use-human-input.d.ts +26 -0
  80. package/dist/hooks/use-last-started-turn-policy.d.ts +27 -0
  81. package/dist/hooks/use-machine-chip.d.ts +54 -0
  82. package/dist/hooks/use-machines.d.ts +81 -0
  83. package/dist/hooks/use-packs.d.ts +27 -0
  84. package/dist/hooks/use-relay-frame-stream.d.ts +53 -0
  85. package/dist/hooks/use-rigs.d.ts +87 -0
  86. package/dist/hooks/use-sandbox-files.d.ts +108 -0
  87. package/dist/hooks/use-sandbox-git.d.ts +58 -0
  88. package/dist/hooks/use-sandbox-terminal.d.ts +62 -0
  89. package/dist/hooks/use-scheduled-tasks.d.ts +15 -0
  90. package/dist/hooks/use-session-capabilities.d.ts +83 -0
  91. package/dist/hooks/use-session-control.d.ts +22 -0
  92. package/dist/hooks/use-session-events.d.ts +92 -0
  93. package/dist/hooks/use-session-lineage.d.ts +17 -0
  94. package/dist/hooks/use-session-mcp-approval-policy.d.ts +23 -0
  95. package/dist/hooks/use-session.d.ts +23 -0
  96. package/dist/hooks/use-slash-commands.d.ts +66 -0
  97. package/dist/hooks/use-terminal-stream.d.ts +46 -0
  98. package/dist/hooks/use-transcription.d.ts +73 -0
  99. package/dist/hooks/use-turn-queue.d.ts +44 -0
  100. package/dist/hooks/use-voice-input.d.ts +25 -0
  101. package/dist/hooks/use-windowed-sections.d.ts +42 -0
  102. package/dist/hooks/use-workspace-capture.d.ts +49 -0
  103. package/dist/hooks/use-workspace-edit.d.ts +73 -0
  104. package/dist/hooks/use-workspace-sessions.d.ts +30 -0
  105. package/dist/hooks/use-workspaces.d.ts +22 -0
  106. package/dist/human-input.d.ts +18 -0
  107. package/dist/index.d.ts +144 -2119
  108. package/dist/index.js +421 -324
  109. package/dist/index.js.map +1 -1
  110. package/dist/lib/clipboard.d.ts +7 -0
  111. package/dist/lib/cn.d.ts +3 -0
  112. package/dist/lib/format.d.ts +48 -0
  113. package/dist/lib/git-patch.d.ts +8 -0
  114. package/dist/lib/motion-inspect.d.ts +5 -0
  115. package/dist/lib/motion.d.ts +14 -0
  116. package/dist/lib/noto-sans-arabic-loader.d.ts +1 -0
  117. package/dist/lib/noto-sans-jp-loader.generated.d.ts +1 -0
  118. package/dist/lib/relay-wire.d.ts +30 -0
  119. package/dist/lib/use-portal-token-style.d.ts +9 -0
  120. package/dist/lib/use-theme-type.d.ts +5 -0
  121. package/dist/lib/use-unicode-fonts.d.ts +12 -0
  122. package/dist/lib/xterm-renderer.d.ts +19 -0
  123. package/dist/lib/xterm-theme.d.ts +75 -0
  124. package/dist/machines.d.ts +30 -413
  125. package/dist/machines.js +3 -3
  126. package/dist/model-policy.d.ts +32 -0
  127. package/dist/model-policy.js +33 -0
  128. package/dist/model-policy.js.map +1 -0
  129. package/dist/provider.d.ts +16 -0
  130. package/dist/{queue-surface-implementation-UQ535OKQ.js → queue-surface-implementation-THPAKGMD.js} +2 -2
  131. package/dist/{queue-surface-implementation-UQ535OKQ.js.map → queue-surface-implementation-THPAKGMD.js.map} +1 -1
  132. package/dist/session-context.d.ts +82 -0
  133. package/dist/session-ui.d.ts +10 -7
  134. package/dist/session-ui.js +9 -5
  135. package/dist/session.d.ts +28 -6
  136. package/dist/session.js +11 -11
  137. package/dist/timeline/activity-rail.d.ts +19 -0
  138. package/dist/timeline/disclosure-context.d.ts +14 -0
  139. package/dist/timeline/entrance.d.ts +14 -0
  140. package/dist/timeline/fleet-decision-projection.d.ts +9 -0
  141. package/dist/timeline/fleet-decision-row.d.ts +11 -0
  142. package/dist/timeline/fold-memory.d.ts +15 -0
  143. package/dist/timeline/index.d.ts +18 -0
  144. package/dist/timeline/parsers.d.ts +96 -0
  145. package/dist/timeline/projection.d.ts +38 -0
  146. package/dist/timeline/registry.d.ts +40 -0
  147. package/dist/timeline/screenshot-lightbox.d.ts +26 -0
  148. package/dist/timeline/seen-activity-ids.d.ts +2 -0
  149. package/dist/timeline/shared.d.ts +125 -0
  150. package/dist/timeline/tool-diff.d.ts +8 -0
  151. package/dist/timeline/tool-display-name.d.ts +10 -0
  152. package/dist/timeline/tool-renderers.d.ts +5 -0
  153. package/dist/timeline/turn-summary.d.ts +116 -0
  154. package/dist/{use-turn-queue-D_1a8W_l.d.ts → timeline/types.d.ts} +41 -69
  155. package/dist/types/machines.d.ts +11 -0
  156. package/package.json +8 -4
  157. package/src/client.ts +1 -0
  158. package/src/components/composer-transcription-control.tsx +278 -130
  159. package/src/components/composer.tsx +20 -15
  160. package/src/components/copy-button.tsx +127 -0
  161. package/src/components/markdown.tsx +231 -32
  162. package/src/components/message-timeline.tsx +1304 -378
  163. package/src/components/model-picker.tsx +83 -43
  164. package/src/components/queue-surface-implementation.tsx +1 -1
  165. package/src/components/session-chrome.tsx +942 -0
  166. package/src/components/soften-streaming-markdown.ts +205 -0
  167. package/src/components/stream-reveal.ts +195 -0
  168. package/src/components/tip-follow.ts +459 -0
  169. package/src/components/tooltip.tsx +103 -0
  170. package/src/composer.ts +6 -0
  171. package/src/hooks/internal.ts +30 -4
  172. package/src/hooks/use-available-models.ts +51 -4
  173. package/src/hooks/use-composer.ts +23 -3
  174. package/src/hooks/use-last-started-turn-policy.ts +95 -0
  175. package/src/hooks/use-session-events.ts +359 -5
  176. package/src/hooks/use-voice-input.ts +232 -0
  177. package/src/index.ts +47 -1
  178. package/src/lib/clipboard.ts +58 -0
  179. package/src/lib/format.ts +18 -0
  180. package/src/lib/motion-inspect.ts +5 -0
  181. package/src/lib/motion.ts +80 -0
  182. package/src/model-policy.ts +210 -0
  183. package/src/session-ui.ts +7 -0
  184. package/src/timeline/activity-rail.tsx +46 -7
  185. package/src/timeline/entrance.tsx +10 -0
  186. package/src/timeline/fold-memory.ts +52 -0
  187. package/src/timeline/index.ts +9 -1
  188. package/src/timeline/projection.ts +226 -41
  189. package/src/timeline/seen-activity-ids.ts +19 -0
  190. package/src/timeline/shared.tsx +1 -1
  191. package/src/timeline/tool-renderers.tsx +75 -6
  192. package/src/timeline/turn-summary.tsx +387 -97
  193. package/src/timeline/types.ts +21 -0
  194. package/styles/index.css +99 -7
  195. package/styles/tokens.css +44 -3
  196. package/dist/chunk-AVLMIWYO.js.map +0 -1
  197. package/dist/chunk-CSJBF3QJ.js.map +0 -1
  198. package/dist/chunk-IPVOVOW6.js.map +0 -1
  199. package/dist/chunk-M7X4JZOD.js.map +0 -1
  200. package/dist/chunk-OKXCECLG.js.map +0 -1
  201. package/dist/chunk-ZMNPFZWL.js +0 -3918
  202. package/dist/chunk-ZMNPFZWL.js.map +0 -1
  203. package/dist/composer-BMzimGTO.d.ts +0 -528
  204. package/dist/session-DaONt-dY.d.ts +0 -264
  205. package/dist/session-context-CAjlaeZb.d.ts +0 -84
  206. package/dist/session-ui-B5_roA95.d.ts +0 -259
  207. /package/dist/{chunk-BC6RKIHS.js.map → chunk-GZ4KR67U.js.map} +0 -0
@@ -1,264 +0,0 @@
1
- import { k as EmbeddedSessionReadClientOverride, a as EmbeddedSessionClientOverride, l as EmbeddedGoalClientOverride, m as EmbeddedSessionMcpApprovalPolicyClientOverride, n as EmbeddedSessionLineageClientOverride, o as EmbeddedHumanInputClientOverride } from './session-context-CAjlaeZb.js';
2
- import { Session, SessionEvent, StreamConnectionState, SessionStatus, SessionGoal, SessionControlResponse, SessionMcpServerMetadata, SessionMcpApprovalPolicy, UpdateSessionMcpApprovalPolicyResponse, SessionLineageResponse, HumanInputQuestion, SessionHumanInputRequest, SubmitHumanInputResponseRequest } from '@opengeni/sdk';
3
- import { S as SessionEventFeedOptions } from './use-composer-ClHy1rkL.js';
4
- import { e as TimelineItem, T as TimelineGroup } from './use-turn-queue-D_1a8W_l.js';
5
- import './use-file-attachments-BmT8WtqO.js';
6
-
7
- type UseSessionOptions = EmbeddedSessionReadClientOverride & SessionEventFeedOptions & {
8
- /** Re-fetch on an interval (ms). Off by default — pair with `useSessionEvents` for live status. */
9
- pollIntervalMs?: number | undefined;
10
- };
11
- type UseSessionResult = {
12
- session: Session | null;
13
- loading: boolean;
14
- error: Error | null;
15
- refresh: () => Promise<void>;
16
- /** Manually rename the session (PATCH, source='user'). Returns the updated session, or null on failure. */
17
- updateTitle: (title: string) => Promise<Session | null>;
18
- /** True while a rename is in flight. */
19
- updating: boolean;
20
- mutationError: Error | null;
21
- clearMutationError: () => void;
22
- };
23
- /** Event types that change the session title (auto + cross-client renames). */
24
- declare function isTitleEvent(event: Pick<SessionEvent, "type">): boolean;
25
- /** Fetch one session (with optional polling), live-patching its title on `session.title_set`. */
26
- declare function useSession(sessionId: string | null | undefined, options?: UseSessionOptions): UseSessionResult;
27
-
28
- type SessionEventsConnectionState = StreamConnectionState | "idle" | "ended" | "error";
29
- type UseSessionEventsOptions = EmbeddedSessionClientOverride & {
30
- /** Resume after this sequence (exclusive). Nonzero keeps full replay/resume semantics. */
31
- after?: number | undefined;
32
- /** Load a bounded tail by default, or opt back into full replay from `after`. */
33
- replay?: "windowed" | "full" | undefined;
34
- /** Pause the stream without unmounting (e.g. hidden tab). Defaults to true. */
35
- enabled?: boolean | undefined;
36
- };
37
- type UseSessionEventsResult = {
38
- /** Replayed + live events, ordered by sequence, no gaps, no duplicates. */
39
- events: SessionEvent[];
40
- /** Projected, renderable timeline (memoized over `events`). */
41
- timeline: TimelineItem[];
42
- /** Latest session status observed in the event log, if any. */
43
- sessionStatus: SessionStatus | null;
44
- connectionState: SessionEventsConnectionState;
45
- /** Highest sequence seen so far (0 before the first event). */
46
- lastSequence: number;
47
- /** Exact serialized bytes retained in the current browser event window. */
48
- windowBytes: number;
49
- /** Whether older delivered events were evicted from the browser window. */
50
- windowTruncated: boolean;
51
- /** True until the initial tail window has been applied (windowed mode). */
52
- initialLoading: boolean;
53
- /** Whether older durable events are available before the current window. */
54
- hasOlder: boolean;
55
- /** True while an older window is being fetched. */
56
- loadingOlder: boolean;
57
- /** Prepend an older density-bounded window; resolves true when more remain. */
58
- loadOlder: () => Promise<boolean>;
59
- error: Error | null;
60
- };
61
- declare const SESSION_EVENT_BROWSER_MAX_BYTES: number;
62
- declare const SESSION_EVENT_BROWSER_MAX_COUNT = 10000;
63
- declare const SESSION_EVENT_BROWSER_SINGLE_EVENT_MAX_BYTES: number;
64
- declare const SESSION_EVENT_BROWSER_PENDING_MAX_BYTES: number;
65
- declare const SESSION_EVENT_BROWSER_PENDING_MAX_COUNT = 256;
66
- type BrowserSessionEventWindow = {
67
- events: SessionEvent[];
68
- bytes: number;
69
- truncated: boolean;
70
- };
71
- /**
72
- * Live-stream a session's event log with replay-by-sequence, reconnect, and
73
- * batched React updates. Fresh loads default to a bounded tail window; pass
74
- * `replay: "full"` or a nonzero `after` for the previous full replay path.
75
- */
76
- declare function useSessionEvents(sessionId: string | null | undefined, options?: UseSessionEventsOptions): UseSessionEventsResult;
77
- /**
78
- * Keep one direction-aware count+byte-bounded browser window. Live/default
79
- * accumulation retains the newest suffix; backward paging retains the oldest
80
- * prefix so newly fetched history cannot be immediately evicted. This is
81
- * deliberately separate from durable history and transport paging: when a
82
- * backward page evicts the live tail, the hook reconnects from the retained
83
- * high-water mark while preserving the highest-ever-observed sequence
84
- * separately. The source event remains durable in PostgreSQL throughout.
85
- */
86
- declare function boundBrowserSessionEventWindow(events: readonly SessionEvent[], options?: {
87
- maxBytes?: number;
88
- maxCount?: number;
89
- direction?: "newest" | "oldest";
90
- }): BrowserSessionEventWindow;
91
-
92
- /** Event types that change the session goal (set/updated/completed/paused/...). */
93
- declare function isGoalEvent(event: Pick<SessionEvent, "type">): boolean;
94
- type UseGoalOptions = EmbeddedGoalClientOverride & SessionEventFeedOptions & {
95
- /** Optional safety-net polling (ms). Off by default — event refreshes drive updates. */
96
- pollIntervalMs?: number | undefined;
97
- };
98
- type UseGoalResult = {
99
- /** The session goal, or null when the session has none. */
100
- goal: SessionGoal | null;
101
- /** Convenience flags over `goal.status`. */
102
- isActive: boolean;
103
- isPaused: boolean;
104
- isCompleted: boolean;
105
- loading: boolean;
106
- error: Error | null;
107
- refresh: () => Promise<void>;
108
- /** Pause the goal loop (PATCH status=paused). */
109
- pause: (rationale?: string) => Promise<SessionGoal | null>;
110
- /** Resume a paused goal: resets counters and re-arms continuations. */
111
- resume: () => Promise<SessionGoal | null>;
112
- /** Clear the session goal; goal-less sessions remain a successful no-op. */
113
- clearGoal: () => Promise<void>;
114
- /** Alias for `clearGoal`. */
115
- deleteGoal: () => Promise<void>;
116
- /** True while a pause/resume/clear is in flight. */
117
- updating: boolean;
118
- mutationError: Error | null;
119
- clearMutationError: () => void;
120
- };
121
- /**
122
- * The session's goal: state, the autonomy counters (`autoContinuations`,
123
- * `noProgressStreak`), and pause/resume control. A goal-less session yields
124
- * `goal: null` (the 404 is absorbed). Live-updates on goal, turn, session,
125
- * control, and system-update events — pass `options.events` from
126
- * `useSessionEvents` to reuse its stream.
127
- */
128
- declare function useGoal(sessionId: string | null | undefined, options?: UseGoalOptions): UseGoalResult;
129
-
130
- type UseSessionControlOptions = EmbeddedSessionClientOverride;
131
- type UseSessionControlResult = {
132
- pause: (reason?: string) => Promise<SessionControlResponse | null>;
133
- resume: (reason?: string) => Promise<SessionControlResponse | null>;
134
- controlling: boolean;
135
- /** Approve a pending `requires_action` approval. */
136
- approve: (approvalId: string, message?: string) => Promise<SessionEvent | null>;
137
- /** Reject a pending `requires_action` approval. */
138
- reject: (approvalId: string, message?: string) => Promise<SessionEvent | null>;
139
- /** True while an approval decision is in flight. */
140
- responding: boolean;
141
- error: Error | null;
142
- clearError: () => void;
143
- };
144
- /**
145
- * Session pause/resume and approval decisions. Pair with
146
- * `useSessionEvents` (for `session.requiresAction` payloads carrying the
147
- * `approvalId`) to render an approval bar.
148
- */
149
- declare function useSessionControl(sessionId: string | null | undefined, options?: UseSessionControlOptions): UseSessionControlResult;
150
-
151
- declare function isSessionMcpApprovalPolicyEvent(event: Pick<SessionEvent, "type" | "payload">, serverId?: string): boolean;
152
- type UseSessionMcpApprovalPolicyOptions = EmbeddedSessionMcpApprovalPolicyClientOverride & SessionEventFeedOptions & {
153
- /** Optional safety-net polling (ms). Off by default; policy events drive refreshes. */
154
- pollIntervalMs?: number | undefined;
155
- };
156
- type UseSessionMcpApprovalPolicyResult = {
157
- server: SessionMcpServerMetadata | null;
158
- policy: SessionMcpApprovalPolicy | null;
159
- loading: boolean;
160
- error: Error | null;
161
- refresh: () => Promise<void>;
162
- update: (policy: SessionMcpApprovalPolicy) => Promise<UpdateSessionMcpApprovalPolicyResponse | null>;
163
- updating: boolean;
164
- clearError: () => void;
165
- };
166
- /**
167
- * Read and update one existing session MCP server's approval policy. Updates
168
- * become effective for the next claimed attempt; current work is unchanged.
169
- */
170
- declare function useSessionMcpApprovalPolicy(sessionId: string | null | undefined, serverId: string | null | undefined, options?: UseSessionMcpApprovalPolicyOptions): UseSessionMcpApprovalPolicyResult;
171
-
172
- type UseSessionLineageOptions = EmbeddedSessionLineageClientOverride & {
173
- events?: SessionEvent[] | undefined;
174
- /** Refresh interval (ms). Off by default. */
175
- pollIntervalMs?: number | undefined;
176
- enabled?: boolean | undefined;
177
- };
178
- type UseSessionLineageResult = {
179
- lineage: SessionLineageResponse | null;
180
- loading: boolean;
181
- error: Error | null;
182
- refresh: () => Promise<void>;
183
- };
184
- declare function isLineageRefreshEvent(event: SessionEvent): boolean;
185
- /** Read the ancestors + descendant tree for one session. Data-only; no UI state. */
186
- declare function useSessionLineage(sessionId: string | null | undefined, options?: UseSessionLineageOptions): UseSessionLineageResult;
187
-
188
- type PendingApproval = {
189
- /** The id to send back via `user.approvalDecision` (`approvalId`). */
190
- id: string;
191
- /** Tool/function name awaiting the decision. */
192
- name: string;
193
- arguments?: unknown;
194
- /** The raw approval entry from the `session.requiresAction` payload. */
195
- raw?: unknown;
196
- };
197
- /** The approvals carried by one `session.requiresAction` payload. */
198
- declare function approvalsFromRequiresAction(payload: unknown): PendingApproval[];
199
- /** The approvals still awaiting a decision after replaying `events` in order. */
200
- declare function projectPendingApprovals(events: SessionEvent[]): PendingApproval[];
201
-
202
- /** Minimal actionable request shape available from the durable event log. */
203
- type PendingHumanInputRequest = {
204
- id: string;
205
- turnId: string | null;
206
- questions: HumanInputQuestion[];
207
- allowSkip: boolean;
208
- expiresAt: string | null;
209
- };
210
- /** Parse one generic `session.humanInput.requested` event defensively. */
211
- declare function humanInputRequestFromEvent(event: Pick<SessionEvent, "type" | "payload" | "turnId">): PendingHumanInputRequest | null;
212
- /**
213
- * Fold a durable event log into the structured requests that are actionable
214
- * now. Responses remove one request; a terminal owning turn clears any
215
- * unresolved requests that died with it. Replaying history cannot resurrect a
216
- * previously answered card.
217
- */
218
- declare function projectPendingHumanInputRequests(events: SessionEvent[]): PendingHumanInputRequest[];
219
-
220
- /** Events that can create, settle, or invalidate an actionable request. */
221
- declare function isHumanInputEvent(event: Pick<SessionEvent, "type">): boolean;
222
- type UseHumanInputRequestsOptions = EmbeddedHumanInputClientOverride & SessionEventFeedOptions & {
223
- /** Optional safety-net polling. Durable events drive refresh by default. */
224
- pollIntervalMs?: number | undefined;
225
- };
226
- type UseHumanInputRequestsResult = {
227
- requests: SessionHumanInputRequest[];
228
- loading: boolean;
229
- error: Error | null;
230
- refresh: () => Promise<void>;
231
- respond: (requestId: string, response: SubmitHumanInputResponseRequest) => Promise<SessionEvent | null>;
232
- respondingRequestId: string | null;
233
- mutationError: Error | null;
234
- clearMutationError: () => void;
235
- };
236
- /**
237
- * Authoritative structured-human-input hook. The server's pending-request
238
- * table is the read model; events only trigger reconciliation. This lets an
239
- * embedded host use the same primitive with a shared event feed or its own SDK
240
- * proxy without rebuilding request lifecycle logic.
241
- */
242
- declare function useHumanInputRequests(sessionId: string | null | undefined, options?: UseHumanInputRequestsOptions): UseHumanInputRequestsResult;
243
-
244
- /** Readable label for a tool call, without leaking an MCP server prefix. */
245
- declare function toolDisplayName(name: string): string;
246
- declare function buildTimeline(events: SessionEvent[]): TimelineItem[];
247
- /**
248
- * Whether the session's most recent turn ended in credit exhaustion — the
249
- * terminal credit state apps key their "add credits" affordances on. Derived
250
- * from the LAST turn-end event (completed/failed/cancelled): a later turn that
251
- * settles any other way (someone topped up and kept working) clears it.
252
- */
253
- declare function creditExhaustedFromEvents(events: SessionEvent[]): boolean;
254
- /** The latest session status carried in the event log, if any. */
255
- declare function sessionStatusFromEvents(events: SessionEvent[]): SessionStatus | null;
256
- declare function groupTimeline(items: TimelineItem[]): TimelineGroup[];
257
- /**
258
- * Find a session id in orchestration tool arguments or output. Handles raw
259
- * objects, JSON strings, and MCP tool results (`{ content: [{ type: "text",
260
- * text: "{...}" }], structuredContent? }`).
261
- */
262
- declare function extractSessionRef(value: unknown, depth?: number): string | null;
263
-
264
- export { isGoalEvent as A, type BrowserSessionEventWindow as B, isHumanInputEvent as C, isLineageRefreshEvent as D, isSessionMcpApprovalPolicyEvent as E, isTitleEvent as F, projectPendingApprovals as G, projectPendingHumanInputRequests as H, sessionStatusFromEvents as I, toolDisplayName as J, useGoal as K, useHumanInputRequests as L, useSession as M, useSessionControl as N, useSessionEvents as O, type PendingApproval as P, useSessionLineage as Q, useSessionMcpApprovalPolicy as R, SESSION_EVENT_BROWSER_MAX_BYTES as S, type UseGoalOptions as U, type PendingHumanInputRequest as a, SESSION_EVENT_BROWSER_MAX_COUNT as b, SESSION_EVENT_BROWSER_PENDING_MAX_BYTES as c, SESSION_EVENT_BROWSER_PENDING_MAX_COUNT as d, SESSION_EVENT_BROWSER_SINGLE_EVENT_MAX_BYTES as e, type SessionEventsConnectionState as f, type UseGoalResult as g, type UseHumanInputRequestsOptions as h, type UseHumanInputRequestsResult as i, type UseSessionControlOptions as j, type UseSessionControlResult as k, type UseSessionEventsOptions as l, type UseSessionEventsResult as m, type UseSessionLineageOptions as n, type UseSessionLineageResult as o, type UseSessionMcpApprovalPolicyOptions as p, type UseSessionMcpApprovalPolicyResult as q, type UseSessionOptions as r, type UseSessionResult as s, approvalsFromRequiresAction as t, boundBrowserSessionEventWindow as u, buildTimeline as v, creditExhaustedFromEvents as w, extractSessionRef as x, groupTimeline as y, humanInputRequestFromEvent as z };
@@ -1,84 +0,0 @@
1
- import { OpenGeniClient, WorkspaceControlEvent, StreamConnectionState } from '@opengeni/sdk';
2
-
3
- /**
4
- * The slice of `OpenGeniClient` the hooks depend on. Structural, so apps can
5
- * pass the real SDK client, a proxy-backed client that routes through their
6
- * own API, or a scripted client in tests/demos.
7
- */
8
- type SessionClientLike = Pick<OpenGeniClient, "getClientConfig" | "getSession" | "getSessionLineage" | "updateSession" | "updateSessionPin" | "listSessions" | "listSessionPage" | "sendMessage" | "steerMessage" | "pauseSession" | "resumeSession" | "sendApprovalDecision" | "listHumanInputRequests" | "getHumanInputRequest" | "submitHumanInputResponse" | "listEvents" | "streamEvents" | "getQueue" | "moveQueueItem" | "editQueueItem" | "steerQueueItem" | "deleteQueueItem" | "getComposerDraft" | "saveComposerDraft" | "listTurns" | "getGoal" | "updateGoal" | "deleteGoal" | "clearSessionContext" | "compactSessionContext" | "listScheduledTasks" | "uploadFile" | "getFile" | "createFileDownloadUrl" | "listVariableSets" | "createVariableSet" | "updateVariableSet" | "deleteVariableSet" | "setVariableSetVariable" | "deleteVariableSetVariable" | "listEnvironments" | "createEnvironment" | "updateEnvironment" | "deleteEnvironment" | "setEnvironmentVariable" | "deleteEnvironmentVariable" | "listRigs" | "createRig" | "getRig" | "updateRig" | "deleteRig" | "listRigVersions" | "activateRigVersion" | "listRigChanges" | "proposeRigChange" | "getRigChange" | "verifyRigChange" | "promoteRigChange" | "verifyRig" | "listPacks" | "registerPack" | "enablePack" | "deletePack" | "listWorkspaces" | "createWorkspace" | "updateWorkspace" | "setWorkspaceInferenceState" | "getWorkspace" | "listWorkspaceControlEvents" | "streamWorkspaceControlEvents" | "getBillingUsage" | "getClientConfig" | "getStreamCapabilities" | "acknowledgeStream" | "attachViewer" | "heartbeatViewer" | "detachViewer" | "fsList" | "fsRead" | "fsWrite" | "fsDelete" | "fsMove" | "fsMkdir" | "gitStatus" | "gitDiff" | "getWorkspaceCapture" | "getWorkspaceCaptureFile" | "terminalExec" | "terminalPtyOpen" | "terminalPtyWrite" | "terminalPtyResize" | "terminalPtyClose">;
9
- /**
10
- * Tenant-safe client surface required by the session-only React entry.
11
- *
12
- * A host proxy can implement only these session-scoped operations instead of
13
- * stubbing OpenGeni's workbench, billing, rig, file-system, and workspace
14
- * administration APIs. Workspace-level resume is deliberately optional: a
15
- * host that does not expose that authority still supports every session-local
16
- * composer/control path.
17
- */
18
- type EmbeddedSessionClientLike = Pick<OpenGeniClient, "getSession" | "listEvents" | "streamEvents" | "getComposerDraft" | "saveComposerDraft" | "sendMessage" | "steerMessage" | "getQueue" | "moveQueueItem" | "editQueueItem" | "steerQueueItem" | "deleteQueueItem" | "pauseSession" | "resumeSession" | "sendApprovalDecision"> & {
19
- setWorkspaceInferenceState?: OpenGeniClient["setWorkspaceInferenceState"] | undefined;
20
- };
21
- /** Event-read surface shared by hooks that optionally tail a session. */
22
- type EmbeddedSessionEventClientLike = Pick<OpenGeniClient, "getSession" | "streamEvents">;
23
- /** Exact client surface required by {@link useSession}. */
24
- type EmbeddedSessionReadClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "getSession" | "updateSession">;
25
- /** Exact client surface required by {@link useGoal}. */
26
- type EmbeddedGoalClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "getGoal" | "updateGoal" | "deleteGoal">;
27
- /** Exact client surface required by {@link useSessionLineage}. */
28
- type EmbeddedSessionLineageClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "getSessionLineage">;
29
- /** Exact client surface required by {@link useFileAttachments}. */
30
- type EmbeddedFileAttachmentClientLike = Pick<OpenGeniClient, "uploadFile">;
31
- /** Exact client surface required by structured human-input hooks. */
32
- type EmbeddedHumanInputSessionClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "listHumanInputRequests" | "submitHumanInputResponse">;
33
- /** Exact client surface required by MCP approval-policy hooks. */
34
- type EmbeddedSessionMcpApprovalPolicyClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "updateSessionMcpApprovalPolicy">;
35
-
36
- type OpenGeniContextValue = {
37
- client: SessionClientLike;
38
- workspaceId: string;
39
- workspaceControlEvent: WorkspaceControlEvent | null;
40
- workspaceControlConnectionState: StreamConnectionState | "idle" | "error";
41
- registerSessionReconciler: (sessionId: string, key: string, reconcile: () => Promise<void>) => () => void;
42
- reconcileSession: (sessionId: string) => Promise<void>;
43
- };
44
- type ClientOverride = {
45
- client?: SessionClientLike | undefined;
46
- workspaceId?: string | undefined;
47
- };
48
- type EmbeddedSessionClientOverride = {
49
- client?: EmbeddedSessionClientLike | undefined;
50
- workspaceId?: string | undefined;
51
- };
52
- type EmbeddedHumanInputClientOverride = {
53
- client?: EmbeddedHumanInputSessionClientLike | undefined;
54
- workspaceId?: string | undefined;
55
- };
56
- type EmbeddedSessionMcpApprovalPolicyClientOverride = {
57
- client?: EmbeddedSessionMcpApprovalPolicyClientLike | undefined;
58
- workspaceId?: string | undefined;
59
- };
60
- type EmbeddedSessionReadClientOverride = {
61
- client?: EmbeddedSessionReadClientLike | undefined;
62
- workspaceId?: string | undefined;
63
- };
64
- type EmbeddedGoalClientOverride = {
65
- client?: EmbeddedGoalClientLike | undefined;
66
- workspaceId?: string | undefined;
67
- };
68
- type EmbeddedSessionLineageClientOverride = {
69
- client?: EmbeddedSessionLineageClientLike | undefined;
70
- workspaceId?: string | undefined;
71
- };
72
- type EmbeddedFileAttachmentClientOverride = {
73
- client?: EmbeddedFileAttachmentClientLike | undefined;
74
- workspaceId?: string | undefined;
75
- };
76
- /** Resolve client + workspace from explicit overrides or the provider. */
77
- declare function useOpenGeni(override?: ClientOverride): OpenGeniContextValue;
78
- /**
79
- * Resolve the client only — for hooks that are not workspace-scoped
80
- * (`useWorkspaces`, `useBillingUsage`).
81
- */
82
- declare function useOpenGeniClient(override?: Pick<ClientOverride, "client">): SessionClientLike;
83
-
84
- export { type ClientOverride as C, type EmbeddedFileAttachmentClientOverride as E, type OpenGeniContextValue as O, type SessionClientLike as S, type EmbeddedSessionClientOverride as a, type EmbeddedFileAttachmentClientLike as b, type EmbeddedGoalClientLike as c, type EmbeddedHumanInputSessionClientLike as d, type EmbeddedSessionClientLike as e, type EmbeddedSessionEventClientLike as f, type EmbeddedSessionLineageClientLike as g, type EmbeddedSessionMcpApprovalPolicyClientLike as h, type EmbeddedSessionReadClientLike as i, useOpenGeniClient as j, type EmbeddedSessionReadClientOverride as k, type EmbeddedGoalClientOverride as l, type EmbeddedSessionMcpApprovalPolicyClientOverride as m, type EmbeddedSessionLineageClientOverride as n, type EmbeddedHumanInputClientOverride as o, useOpenGeni as u };
@@ -1,259 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { SessionHumanInputRequest, SubmitHumanInputResponseRequest, HumanInputQuestion, HumanInputAnswer, SessionEvent, SessionStatus } from '@opengeni/sdk';
3
- import { ReactNode, ComponentType } from 'react';
4
- import { i as UseTurnQueueResult, f as ToolCallItem, A as ActivityItem, h as TurnOutcome, e as TimelineItem, a as AgentMessageItem, j as UserMessageItem, b as AuthNeededItem } from './use-turn-queue-D_1a8W_l.js';
5
- import { C as ComposerState } from './use-composer-ClHy1rkL.js';
6
-
7
- /** The sole pending-input surface: compact above Goal, Agents, and composer. */
8
- type QueueSurfaceCommonProps = {
9
- /** Focus the composer owned by this queue after checkout/removal. */
10
- onRequestComposerFocus?: (() => void) | undefined;
11
- };
12
- type QueueSurfaceProps = (QueueSurfaceCommonProps & {
13
- queue: UseTurnQueueResult;
14
- composer: ComposerState;
15
- readOnly?: false | undefined;
16
- }) | (QueueSurfaceCommonProps & {
17
- queue: UseTurnQueueResult;
18
- composer?: undefined;
19
- readOnly: true;
20
- });
21
-
22
- /** The sole pending-input surface: compact above Goal, Agents, and composer. */
23
- declare const QueueSurface: (props: QueueSurfaceProps) => react_jsx_runtime.JSX.Element | null;
24
-
25
- type HumanInputAnswerDraft = {
26
- values: string[];
27
- other: string;
28
- otherSelected: boolean;
29
- };
30
- type HumanInputFormMessages = {
31
- title: string;
32
- description: string;
33
- submit: string;
34
- skip: string;
35
- submitting: string;
36
- other: string;
37
- deadlineLabel: string;
38
- formatDeadline: (value: string) => string;
39
- required: string;
40
- minLength: (count: number) => string;
41
- maxLength: (count: number) => string;
42
- otherRequired: string;
43
- minSelections: (count: number) => string;
44
- maxSelections: (count: number) => string;
45
- };
46
- declare const defaultHumanInputFormMessages: HumanInputFormMessages;
47
- type HumanInputFormProps = {
48
- request: Pick<SessionHumanInputRequest, "id" | "questions" | "allowSkip" | "expiresAt">;
49
- onSubmit: (response: SubmitHumanInputResponseRequest) => void | Promise<void>;
50
- submitting?: boolean | undefined;
51
- error?: string | null | undefined;
52
- title?: ReactNode;
53
- description?: ReactNode;
54
- submitLabel?: string | undefined;
55
- skipLabel?: string | undefined;
56
- messages?: Partial<HumanInputFormMessages> | undefined;
57
- autoFocus?: boolean | undefined;
58
- className?: string | undefined;
59
- };
60
- /**
61
- * Styled but host-neutral renderer for one structured request. Hosts can use
62
- * the headless `useHumanInputRequests` hook instead, or replace the title and
63
- * description while retaining accessible field semantics and validation.
64
- */
65
- declare function HumanInputForm({ request, onSubmit, submitting, error, title, description, submitLabel, skipLabel, messages: messageOverrides, autoFocus, className, }: HumanInputFormProps): react_jsx_runtime.JSX.Element;
66
- declare function answersFromDrafts(questions: HumanInputQuestion[], drafts: Record<string, HumanInputAnswerDraft>, messageOverrides?: Partial<HumanInputFormMessages>): {
67
- answers: HumanInputAnswer[];
68
- errors: Record<string, string>;
69
- };
70
-
71
- type ToolRendererProps = {
72
- item: ToolCallItem;
73
- };
74
- type ToolRenderer = ComponentType<ToolRendererProps>;
75
- /** A registry entry: which key it matches and the component that renders it. */
76
- type ToolRegistryEntry = {
77
- match: "rawType";
78
- type: string;
79
- render: ToolRenderer;
80
- } | {
81
- match: "name";
82
- name: string;
83
- render: ToolRenderer;
84
- };
85
- type ToolRegistry = {
86
- /** Resolve the renderer for a call (never null — falls back to generic). */
87
- resolve: (item: ToolCallItem) => ToolRenderer;
88
- /** The generic fallback renderer. */
89
- fallback: ToolRenderer;
90
- };
91
- type CreateToolRegistryOptions = {
92
- /**
93
- * Entries that take precedence over the built-ins. Earlier entries win, so a
94
- * consumer can shadow a default renderer for the same key.
95
- */
96
- entries?: ToolRegistryEntry[] | undefined;
97
- /** Replace the generic fallback used for unmatched tools. */
98
- fallback?: ToolRenderer | undefined;
99
- };
100
- /** The `raw.type` of a projected tool call, when the provider item carries one. */
101
- declare function rawTypeOf(item: ToolCallItem): string | null;
102
- /**
103
- * Build a tool registry from a set of entries and a fallback. The returned
104
- * registry resolves in priority order: `raw.type` entries first, then `name`
105
- * entries, then the fallback. Consumer `entries` are consulted before the
106
- * built-in `baseEntries`, so they shadow defaults cleanly.
107
- */
108
- declare function createToolRegistry(baseEntries: ToolRegistryEntry[], baseFallback: ToolRenderer, options?: CreateToolRegistryOptions): ToolRegistry;
109
-
110
- declare const BUILT_IN_TURN_SUMMARY_FACET_IDS: readonly ["steps", "files", "commands", "screenshots", "memories", "duration"];
111
- type BuiltInTurnSummaryFacetId = (typeof BUILT_IN_TURN_SUMMARY_FACET_IDS)[number];
112
- type TurnSummaryContext = Readonly<{
113
- /** Every normalized activity item folded into this summary. */
114
- items: readonly ActivityItem[];
115
- /** Tool calls from `items`, retained in timeline order for convenient aggregation. */
116
- toolCalls: readonly ToolCallItem[];
117
- /** The settled turn verdict, or absent for a neutral/incomplete cluster. */
118
- outcome: TurnOutcome | undefined;
119
- /** The bounded failure reason rendered by the enclosing summary, when present. */
120
- failureText: string | undefined;
121
- /** Total turn duration when the enclosing group has both valid timestamps. */
122
- durationMs: number | undefined;
123
- /** False when any projected activity is still running or streaming. */
124
- settled: boolean;
125
- }>;
126
- type TurnSummaryFacetResult = Readonly<{
127
- icon?: ReactNode;
128
- content: ReactNode;
129
- ariaLabel?: string;
130
- title?: string;
131
- }>;
132
- type TurnSummaryFacet = Readonly<{
133
- /** Stable identity used for removal and deterministic de-duplication. */
134
- id: string;
135
- /** Return null when this facet has nothing useful to show. */
136
- summarize(context: TurnSummaryContext): TurnSummaryFacetResult | null;
137
- }>;
138
- type ModifyTurnSummaryFacets = Readonly<{
139
- /** Appended after the remaining built-ins, in supplied order. */
140
- add?: readonly TurnSummaryFacet[];
141
- /** Built-ins to omit before custom facets are appended. */
142
- remove?: readonly BuiltInTurnSummaryFacetId[];
143
- replace?: never;
144
- }>;
145
- type ReplaceTurnSummaryFacets = Readonly<{
146
- /** The complete ordered facet list. Mutually exclusive with add/remove. */
147
- replace: readonly TurnSummaryFacet[];
148
- add?: never;
149
- remove?: never;
150
- }>;
151
- type TurnSummaryFacetConfiguration = ModifyTurnSummaryFacets | ReplaceTurnSummaryFacets;
152
- type TurnSummaryOptions = Readonly<{
153
- facets?: TurnSummaryFacetConfiguration;
154
- }>;
155
- type TurnSummaryProps = {
156
- /** The activity items in the turn (used only to compute the facet counts). */
157
- items: ActivityItem[];
158
- /**
159
- * The settled verdict — or absent for a completed CLUSTER of a still-running
160
- * turn, which folds neutrally: no verdict glyph (the turn has none yet), a
161
- * quiet pulse dot in its place so alignment and the running feel both hold.
162
- */
163
- outcome?: TurnOutcome | undefined;
164
- /** A short failure reason shown inline on a failed chip (never hidden). */
165
- failureText?: string | undefined;
166
- /** Elapsed turn duration; shown as a trailing facet when at least 1s. */
167
- durationMs?: number | undefined;
168
- /** Start expanded. */
169
- defaultOpen?: boolean | undefined;
170
- /**
171
- * A nested fold — a cluster or sub-turn INSIDE an already-expanded turn. It
172
- * drops the bordered/filled chip and renders as a plain disclosure node on the
173
- * parent's rail (chevron + glyph + facets), so expanding a turn reveals a thread
174
- * of nodes, never a stack of boxes-in-boxes. The top-level fold stays a chip.
175
- */
176
- bare?: boolean | undefined;
177
- /** Per-instance facet customization. Omit to preserve the built-in summary exactly. */
178
- facets?: TurnSummaryFacetConfiguration | undefined;
179
- /** The rendered activity rail revealed on expand. */
180
- children: ReactNode;
181
- };
182
- declare function TurnSummary({ items, outcome, failureText, durationMs, defaultOpen, bare, facets: facetConfiguration, children, }: TurnSummaryProps): react_jsx_runtime.JSX.Element;
183
-
184
- type MessageTimelineProps = {
185
- /** Raw session events (projected internally) … */
186
- events?: SessionEvent[] | undefined;
187
- /** … or pre-projected items (e.g. from `useSessionEvents().timeline`). */
188
- items?: TimelineItem[] | undefined;
189
- /** Current session status; drives the live "working" indicator. */
190
- status?: SessionStatus | null | undefined;
191
- /** Plug a markdown renderer for message bodies (e.g. streamdown). */
192
- renderMessageText?: ((text: string, item: AgentMessageItem | UserMessageItem) => ReactNode) | undefined;
193
- /** Drill into a spawned worker session. */
194
- onOpenSession?: ((sessionId: string) => void) | undefined;
195
- /**
196
- * Deep-link a memory row (a `memory.saved` / `memory.corrected` step) to its
197
- * record in the host's memory pane. Opt-in, exactly like `onReconnect`: the
198
- * library draws no "View in memory" affordance without a handler — the memory
199
- * row is then non-interactive rich content. This is the switch that makes the
200
- * deep-link a first-party OpenGeni capability without other SDK consumers
201
- * opting into it. The app supplies it (it owns routing to the memory pane).
202
- */
203
- onMemoryClick?: ((memoryId: string) => void) | undefined;
204
- /**
205
- * Start the reconnect flow when a tool needs its connection reauthorized. The
206
- * app supplies this (it owns the SDK client + workspace): it typically kicks
207
- * off `startConnectionOAuth` and redirects, or routes to credential entry.
208
- * Rejecting surfaces a calm inline error on the card; the library never draws
209
- * a Reconnect button without a handler to run it.
210
- */
211
- onReconnect?: ((item: AuthNeededItem) => void | Promise<void>) | undefined;
212
- /**
213
- * Resolve a provider domain (from a reconnect card) to a logo URL the host
214
- * serves itself — the app maps it through its catalog + `catalogAssetUrl`.
215
- * Return null/undefined to fall back to a calm monogram. The library never
216
- * fetches an off-origin favicon (CSP + privacy); an unresolved logo is a
217
- * monogram, not an external image.
218
- */
219
- resolveProviderLogo?: ((providerDomain: string) => string | null | undefined) | undefined;
220
- /**
221
- * The tool-renderer registry that resolves how each tool call is drawn.
222
- * Defaults to {@link defaultToolRegistry}; pass a registry from
223
- * `createDefaultToolRegistry({ entries })` to add custom tool renderers.
224
- */
225
- toolRegistry?: ToolRegistry | undefined;
226
- /** Customize collapsed turn facets for this timeline instance. */
227
- turnSummary?: TurnSummaryOptions | undefined;
228
- /** Follow new events when pinned to the bottom. Defaults to true. */
229
- autoFollow?: boolean | undefined;
230
- /** Older durable history exists above the current window (see useSessionEvents). */
231
- hasOlder?: boolean | undefined;
232
- /** An older window is being fetched; shows the quiet top shimmer. */
233
- loadingOlder?: boolean | undefined;
234
- /** Called when the reader nears the top and older history should backfill. */
235
- onLoadOlder?: (() => void) | undefined;
236
- emptyState?: ReactNode | undefined;
237
- className?: string | undefined;
238
- };
239
- /**
240
- * The session timeline: chat messages with streaming deltas, collapsed
241
- * activity clusters (reasoning, tool calls, sandbox work), spawned-worker
242
- * cards, goal markers, and status transitions. Owns stick-to-bottom scrolling
243
- * with a "jump to latest" affordance when the reader scrolls back.
244
- */
245
- declare function MessageTimeline({ events, items, status, renderMessageText, onOpenSession, onMemoryClick, onReconnect, resolveProviderLogo, toolRegistry, turnSummary, autoFollow, hasOlder, loadingOlder, onLoadOlder, emptyState, className, }: MessageTimelineProps): react_jsx_runtime.JSX.Element;
246
- /**
247
- * Render one non-activity timeline item (chat message, status divider, goal
248
- * landmark, notice). Exported so the component demo draws the EXACT same rows as
249
- * the live app — no forked bubble/goal markup.
250
- */
251
- declare function TimelineRow({ item, renderMessageText, onReconnect, resolveProviderLogo, onOpenSession, }: {
252
- item: TimelineItem;
253
- renderMessageText?: ((text: string, item: AgentMessageItem | UserMessageItem) => ReactNode) | undefined;
254
- onReconnect?: ((item: AuthNeededItem) => void | Promise<void>) | undefined;
255
- resolveProviderLogo?: ((providerDomain: string) => string | null | undefined) | undefined;
256
- onOpenSession?: ((sessionId: string) => void) | undefined;
257
- }): react_jsx_runtime.JSX.Element | null;
258
-
259
- export { BUILT_IN_TURN_SUMMARY_FACET_IDS as B, type CreateToolRegistryOptions as C, type HumanInputAnswerDraft as H, MessageTimeline as M, QueueSurface as Q, type ToolRegistry as T, type BuiltInTurnSummaryFacetId as a, HumanInputForm as b, createToolRegistry as c, type HumanInputFormMessages as d, type HumanInputFormProps as e, type MessageTimelineProps as f, type QueueSurfaceProps as g, TimelineRow as h, type ToolRegistryEntry as i, type ToolRenderer as j, type ToolRendererProps as k, TurnSummary as l, type TurnSummaryContext as m, type TurnSummaryFacet as n, type TurnSummaryFacetConfiguration as o, type TurnSummaryFacetResult as p, type TurnSummaryOptions as q, type TurnSummaryProps as r, answersFromDrafts as s, defaultHumanInputFormMessages as t, rawTypeOf as u };