@opengeni/react 0.29.0 → 0.33.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-IPVOVOW6.js → chunk-MS3FBZ6A.js} +2539 -2174
  12. package/dist/chunk-MS3FBZ6A.js.map +1 -0
  13. package/dist/{chunk-OKXCECLG.js → chunk-TCCE5ZU5.js} +171 -22
  14. package/dist/chunk-TCCE5ZU5.js.map +1 -0
  15. package/dist/chunk-U255M5EZ.js +178 -0
  16. package/dist/chunk-U255M5EZ.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
@@ -0,0 +1,98 @@
1
+ import type { SessionEvent, SessionStatus } from "@opengeni/sdk";
2
+ import { type ReactNode } from "react";
3
+ import { type AgentMessageItem, type AuthNeededItem, type TimelineGroup, type TimelineItem, type ToolRegistry, type TurnSummaryOptions, type UserMessageItem } from "../timeline";
4
+ export type MessageTimelineProps = {
5
+ /** Raw session events (projected internally) … */
6
+ events?: SessionEvent[] | undefined;
7
+ /** … or pre-projected items (e.g. from `useSessionEvents().timeline`). */
8
+ items?: TimelineItem[] | undefined;
9
+ /** Current session status (reserved; tip "Working…" chrome removed for now). */
10
+ status?: SessionStatus | null | undefined;
11
+ /** Plug a markdown renderer for message bodies (e.g. streamdown). */
12
+ renderMessageText?: ((text: string, item: AgentMessageItem | UserMessageItem) => ReactNode) | undefined;
13
+ /** Drill into a spawned worker session. */
14
+ onOpenSession?: ((sessionId: string) => void) | undefined;
15
+ /**
16
+ * Deep-link a memory row (a `memory.saved` / `memory.corrected` step) to its
17
+ * record in the host's memory pane. Opt-in, exactly like `onReconnect`: the
18
+ * library draws no "View in memory" affordance without a handler — the memory
19
+ * row is then non-interactive rich content. This is the switch that makes the
20
+ * deep-link a first-party OpenGeni capability without other SDK consumers
21
+ * opting into it. The app supplies it (it owns routing to the memory pane).
22
+ */
23
+ onMemoryClick?: ((memoryId: string) => void) | undefined;
24
+ /**
25
+ * Start the reconnect flow when a tool needs its connection reauthorized. The
26
+ * app supplies this (it owns the SDK client + workspace): it typically kicks
27
+ * off `startConnectionOAuth` and redirects, or routes to credential entry.
28
+ * Rejecting surfaces a calm inline error on the card; the library never draws
29
+ * a Reconnect button without a handler to run it.
30
+ */
31
+ onReconnect?: ((item: AuthNeededItem) => void | Promise<void>) | undefined;
32
+ /**
33
+ * Resolve a provider domain (from a reconnect card) to a logo URL the host
34
+ * serves itself — the app maps it through its catalog + `catalogAssetUrl`.
35
+ * Return null/undefined to fall back to a calm monogram. The library never
36
+ * fetches an off-origin favicon (CSP + privacy); an unresolved logo is a
37
+ * monogram, not an external image.
38
+ */
39
+ resolveProviderLogo?: ((providerDomain: string) => string | null | undefined) | undefined;
40
+ /**
41
+ * The tool-renderer registry that resolves how each tool call is drawn.
42
+ * Defaults to {@link defaultToolRegistry}; pass a registry from
43
+ * `createDefaultToolRegistry({ entries })` to add custom tool renderers.
44
+ */
45
+ toolRegistry?: ToolRegistry | undefined;
46
+ /** Customize collapsed turn facets for this timeline instance. */
47
+ turnSummary?: TurnSummaryOptions | undefined;
48
+ /** Follow new events when pinned to the bottom. Defaults to true. */
49
+ autoFollow?: boolean | undefined;
50
+ /** Older durable history exists above the current window (see useSessionEvents). */
51
+ hasOlder?: boolean | undefined;
52
+ /** An older window is being fetched; shows the quiet top shimmer. */
53
+ loadingOlder?: boolean | undefined;
54
+ /** Called when the reader nears the top and older history should backfill. */
55
+ onLoadOlder?: (() => void) | undefined;
56
+ /** Jump to the durable session start (bounded oldest window, no middle). */
57
+ onJumpToStart?: (() => void | Promise<void>) | undefined;
58
+ /** True while the oldest window is loading. */
59
+ loadingOldest?: boolean | undefined;
60
+ /** Newer durable history exists below the current (history) window. */
61
+ hasNewer?: boolean | undefined;
62
+ /** A newer history page is being fetched. */
63
+ loadingNewer?: boolean | undefined;
64
+ /** Page forward through history without loading the whole gap to the tip. */
65
+ onLoadNewer?: (() => void) | undefined;
66
+ /**
67
+ * Reload the live tip window. When omitted, Jump to latest only re-pins and
68
+ * scrolls the in-memory window.
69
+ */
70
+ onJumpToLatest?: (() => void | Promise<void>) | undefined;
71
+ emptyState?: ReactNode | undefined;
72
+ className?: string | undefined;
73
+ };
74
+ /**
75
+ * The session timeline: chat messages with streaming deltas, collapsed
76
+ * activity clusters (reasoning, tool calls, sandbox work), spawned-worker
77
+ * cards, goal markers, and status transitions. Owns stick-to-bottom scrolling
78
+ * with a "jump to latest" affordance when the reader scrolls back.
79
+ */
80
+ export declare function MessageTimeline({ events, items, status: _status, renderMessageText, onOpenSession, onMemoryClick, onReconnect, resolveProviderLogo, toolRegistry, turnSummary, autoFollow, hasOlder, loadingOlder, onLoadOlder, onJumpToStart, loadingOldest, hasNewer, loadingNewer, onLoadNewer, onJumpToLatest, emptyState, className, }: MessageTimelineProps): import("react/jsx-runtime").JSX.Element;
81
+ /**
82
+ * Settled turns lift the final agent answer out as a sibling group. Include it
83
+ * in "Copy turn" when present so the chip copies the full assistant reply.
84
+ * Fenced by turnId so the next turn's answer is never stolen.
85
+ */
86
+ export declare function trailingAgentTextAfterTurn(group: TimelineGroup, next: TimelineGroup | undefined): string | undefined;
87
+ /**
88
+ * Render one non-activity timeline item (chat message, status divider, goal
89
+ * landmark, notice). Exported so the component demo draws the EXACT same rows as
90
+ * the live app — no forked bubble/goal markup.
91
+ */
92
+ export declare function TimelineRow({ item, renderMessageText, onReconnect, resolveProviderLogo, onOpenSession, }: {
93
+ item: TimelineItem;
94
+ renderMessageText?: ((text: string, item: AgentMessageItem | UserMessageItem) => ReactNode) | undefined;
95
+ onReconnect?: ((item: AuthNeededItem) => void | Promise<void>) | undefined;
96
+ resolveProviderLogo?: ((providerDomain: string) => string | null | undefined) | undefined;
97
+ onOpenSession?: ((sessionId: string) => void) | undefined;
98
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,19 @@
1
+ import type { ClientModel } from "@opengeni/sdk";
2
+ import { type PickerModelRow } from "../model-policy";
3
+ export type ModelPickerProps = {
4
+ /** Legacy host config models grouped by provider. */
5
+ models?: ClientModel[] | undefined;
6
+ /** Catalog-backed rows grouped by billing class. Preferred when available. */
7
+ rows?: PickerModelRow[] | undefined;
8
+ value?: string | undefined;
9
+ onChange: (modelId: string) => void;
10
+ disabled?: boolean | undefined;
11
+ className?: string | undefined;
12
+ label?: string | undefined;
13
+ /**
14
+ * When true (remote compaction v2), non-Codex models remain listed but are
15
+ * disabled. Same picker chrome — only selectability changes.
16
+ */
17
+ codexOnly?: boolean | undefined;
18
+ };
19
+ export declare function ModelPicker({ models, rows, value, onChange, disabled, className, label, codexOnly, }: ModelPickerProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,34 @@
1
+ import type { GitFileDiff } from "@opengeni/sdk";
2
+ import { type ReactNode } from "react";
3
+ export type PierreDiffProps = {
4
+ diff: GitFileDiff[];
5
+ layout?: "unified" | "split" | undefined;
6
+ themeType?: "dark" | "light" | undefined;
7
+ /** Shiki bundled theme names (dark/light) — derived from the host palette. */
8
+ theme?: {
9
+ dark: string;
10
+ light: string;
11
+ } | undefined;
12
+ /** Disable Pierre's worker pool if its worker bundling fights the host bundler. */
13
+ disableWorkerPool?: boolean | undefined;
14
+ /** Rendered while the (lazy) Pierre bundle loads. */
15
+ loading?: ReactNode | undefined;
16
+ /** Rendered if `@pierre/diffs/react` is not installed / fails to import. */
17
+ fallback?: ReactNode | undefined;
18
+ /** Skip the Shiki renderer entirely and show the plain-text degrade (the old
19
+ * `usePierre={false}` path — one renderer, opted out of highlighting). */
20
+ plain?: boolean | undefined;
21
+ /** Long-line handling: `"wrap"` soft-wraps (the default — a diff in a narrow
22
+ * dock pane should be readable without a horizontal-scroll tax), `"scroll"`
23
+ * keeps lines on one row behind a horizontal scrollbar (better for a wide
24
+ * viewport or pathological minified lines). */
25
+ overflow?: "wrap" | "scroll" | undefined;
26
+ className?: string | undefined;
27
+ };
28
+ /**
29
+ * The Pierre-backed diff: Shiki-highlighted, virtualized, unified/split. Renders
30
+ * one `PatchDiff` per changed file (a reconstructed unified patch from the
31
+ * `GitFileDiff` hunks). The ONE workbench diff renderer; a host without
32
+ * `@pierre/diffs` gets the built-in plain-text degrade (`PlainPatch`).
33
+ */
34
+ export declare function PierreDiff({ diff, layout, themeType, theme, disableWorkerPool, loading, fallback, plain, overflow, className, }: PierreDiffProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { type ReactNode } from "react";
2
+ export type PierreFileProps = {
3
+ /** Workspace-relative path (used for the header + language inference). */
4
+ path: string;
5
+ /** The decoded text contents. */
6
+ contents: string;
7
+ themeType?: "dark" | "light" | undefined;
8
+ /** Shiki bundled theme names (dark/light) — derived from the host palette. */
9
+ theme?: {
10
+ dark: string;
11
+ light: string;
12
+ } | undefined;
13
+ /** Disable Pierre's worker pool if its worker bundling fights the host bundler. */
14
+ disableWorkerPool?: boolean | undefined;
15
+ /** Rendered while the (lazy) Pierre bundle loads. */
16
+ loading?: ReactNode | undefined;
17
+ /** Rendered if `@pierre/diffs/react` is not installed / fails to import. */
18
+ fallback?: ReactNode | undefined;
19
+ className?: string | undefined;
20
+ };
21
+ /**
22
+ * The Pierre-backed single-file VIEWER: Shiki-highlighted, language inferred from
23
+ * the filename — the read complement of `PierreDiff`. Wired to `fs.read` so
24
+ * clicking any file in the tree shows its contents (NOT a diff; no repo needed).
25
+ * Falls back to a plain `<pre>` when `@pierre/diffs` is absent / fails to import.
26
+ */
27
+ export declare function PierreFile({ path, contents, themeType, theme, disableWorkerPool, loading, fallback, className, }: PierreFileProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { ComposerState } from "../hooks/use-composer";
2
+ /**
3
+ * Decide whether checking out a queued prompt would replace current composer
4
+ * content. `hasDraftContent` reads the synchronous draft refs, so this stays
5
+ * correct even when a controlled input update has not rendered yet.
6
+ */
7
+ export declare function requestQueueDraftEdit(composer: Pick<ComposerState, "hasDraftContent">, confirmReplacement: () => void, editImmediately: () => void): void;
@@ -0,0 +1,20 @@
1
+ import type { ComposerState } from "../hooks/use-composer";
2
+ import type { UseTurnQueueResult } from "../hooks/use-turn-queue";
3
+ /** The sole pending-input surface: compact above Goal, Agents, and composer. */
4
+ type QueueSurfaceCommonProps = {
5
+ /** Focus the composer owned by this queue after checkout/removal. */
6
+ onRequestComposerFocus?: (() => void) | undefined;
7
+ };
8
+ export type QueueSurfaceProps = (QueueSurfaceCommonProps & {
9
+ queue: UseTurnQueueResult;
10
+ composer: ComposerState;
11
+ readOnly?: false | undefined;
12
+ }) | (QueueSurfaceCommonProps & {
13
+ queue: UseTurnQueueResult;
14
+ composer?: undefined;
15
+ readOnly: true;
16
+ });
17
+ /** @internal Pure policy seam for queue/composer embedding tests. */
18
+ export declare function queueComposerCheckoutEnabled(composer: ComposerState | undefined, readOnly: boolean): boolean;
19
+ export declare function QueueSurface({ queue, composer, readOnly, onRequestComposerFocus, }: QueueSurfaceProps): import("react/jsx-runtime").JSX.Element | null;
20
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { UseTurnQueueResult } from "../hooks/use-turn-queue";
2
+ type QueueStateProps = {
3
+ queue: UseTurnQueueResult;
4
+ };
5
+ export declare function EmptyQueueStateSurface({ queue }: QueueStateProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function QueueStoppingStatus({ queue, dividerAfter, }: QueueStateProps & {
7
+ dividerAfter?: boolean;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export declare function QueueErrorAlert({ queue, dividerBefore, }: QueueStateProps & {
10
+ dividerBefore?: boolean;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ import { type ComponentType } from "react";
2
+ import type { QueueSurfaceProps } from "./queue-surface-implementation";
3
+ export { requestQueueDraftEdit } from "./queue-draft-policy";
4
+ export type { QueueSurfaceProps } from "./queue-surface-implementation";
5
+ type QueueSurfaceModule = {
6
+ QueueSurface: ComponentType<QueueSurfaceProps>;
7
+ };
8
+ type QueueSurfaceLoader = () => Promise<QueueSurfaceModule>;
9
+ /** The sole pending-input surface: compact above Goal, Agents, and composer. */
10
+ export declare const QueueSurface: (props: QueueSurfaceProps) => import("react/jsx-runtime").JSX.Element | null;
11
+ /** @internal Deterministic Suspense seam for the QueueSurface regression suite. */
12
+ export declare function createQueueSurfaceForTest(loadImplementation: QueueSurfaceLoader): (props: QueueSurfaceProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,49 @@
1
+ import { type UseSandboxFilesResult } from "../hooks/use-sandbox-files";
2
+ import type { UseSandboxGitResult } from "../hooks/use-sandbox-git";
3
+ export type SandboxFilesProps = {
4
+ /** From `useSandboxFiles(...)`. */
5
+ files: UseSandboxFilesResult;
6
+ /** From `useSandboxGit(...)` — drives the branch/dirty header only. */
7
+ git: UseSandboxGitResult;
8
+ /** @deprecated Diffs live in the dedicated Changes tab now; accepted for
9
+ * source-compat but unused (the Files surface is a browser + viewer). */
10
+ stagedGit?: UseSandboxGitResult | undefined;
11
+ /** Whether a FileSystem surface is advertised (drives the unavailable notice). */
12
+ fileSystemAvailable?: boolean | undefined;
13
+ /** Use Pierre's Shiki highlighter for the viewer (default true; plain fallback). */
14
+ usePierre?: boolean | undefined;
15
+ /** Allow in-place editing of tree files (CodeMirror). Default true. When false
16
+ * the surface is review-only: every text file opens in the read-only viewer. */
17
+ editable?: boolean | undefined;
18
+ /** Fired once when the user first edits an open file (wake-on-edit intent). The
19
+ * dock warms the box on this so the save lands fast; opening/reading never fires
20
+ * it. Browsing the tree/diff must not warm a box. */
21
+ onEditIntent?: (() => void) | undefined;
22
+ /** A guarded diff path routed here by the parent workspace. */
23
+ requestedPath?: string | undefined;
24
+ /** Identity for one guarded-file request. Increment this when the same path is
25
+ * deliberately requested again; it also lets a pending request be consumed
26
+ * without overriding later manual tree navigation. Defaults to the path. */
27
+ requestedPathRequestId?: string | number | undefined;
28
+ /** False while the parent is waking a cold sandbox for `requestedPath`. */
29
+ requestedPathReady?: boolean | undefined;
30
+ /** The machine is cold and no durable capture exists yet. Render an explicit
31
+ * wake gate instead of an empty-tree lie or an implicit Channel-A read. */
32
+ workspaceResting?: boolean | undefined;
33
+ /** A deliberate wake has started but the live file surface is not ready yet. */
34
+ workspaceWaking?: boolean | undefined;
35
+ /** Whether live reads are currently authoritative. */
36
+ liveWorkspaceReady?: boolean | undefined;
37
+ /** Deliberately wake the machine to read content absent from the capture. */
38
+ onWakeWorkspace?: (() => void) | undefined;
39
+ themeType?: "dark" | "light" | undefined;
40
+ className?: string | undefined;
41
+ };
42
+ /**
43
+ * The Files surface: a branch/dirty header, the full lazy file tree, and a
44
+ * viewer/editor pane for the selected file. This is the workspace BROWSER — pick
45
+ * a file to read or edit it. Diff review lives in the dedicated Changes tab (this
46
+ * surface deliberately does NOT replicate the changed-files list, and does not
47
+ * diff here — one job per tab). The agent commits; the human reviews.
48
+ */
49
+ export declare function SandboxFiles({ files, git, fileSystemAvailable, usePierre, editable, onEditIntent, requestedPath, requestedPathRequestId, requestedPathReady, workspaceResting, workspaceWaking, liveWorkspaceReady, onWakeWorkspace, themeType, className, }: SandboxFilesProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,123 @@
1
+ import type { TerminalCapability } from "@opengeni/sdk";
2
+ import { type ReactNode } from "react";
3
+ import type { UseSandboxTerminalResult } from "../hooks/use-sandbox-terminal";
4
+ import { type RendererTier } from "../lib/xterm-renderer";
5
+ /**
6
+ * A COMPLETE xterm `ITheme` (subset by intent, but every field xterm colors a
7
+ * cell with is present so it never falls back to its stock VGA palette). Built
8
+ * from the og tokens via `xtermThemeFromTokens`.
9
+ */
10
+ export type XtermTheme = {
11
+ background?: string;
12
+ foreground?: string;
13
+ cursor?: string;
14
+ cursorAccent?: string;
15
+ selectionBackground?: string;
16
+ selectionForeground?: string;
17
+ selectionInactiveBackground?: string;
18
+ black?: string;
19
+ red?: string;
20
+ green?: string;
21
+ yellow?: string;
22
+ blue?: string;
23
+ magenta?: string;
24
+ cyan?: string;
25
+ white?: string;
26
+ brightBlack?: string;
27
+ brightRed?: string;
28
+ brightGreen?: string;
29
+ brightYellow?: string;
30
+ brightBlue?: string;
31
+ brightMagenta?: string;
32
+ brightCyan?: string;
33
+ brightWhite?: string;
34
+ };
35
+ export type SandboxTerminalProps = {
36
+ /** From `useSandboxTerminal(...)`. */
37
+ result: UseSandboxTerminalResult;
38
+ /**
39
+ * The negotiated Terminal capability cell. When it advertises `transport:
40
+ * "pty-ws"` + a live `url` (a warm box with a viewer attached), the terminal is
41
+ * driven by a REAL bidirectional PTY over the Modal tunnel (ttyd-over-websocket)
42
+ * INSTEAD of the broken ptyWrite-over-HTTP path: xterm input → the socket, the
43
+ * socket's output → xterm, xterm resize → the socket. On a cold box / no url
44
+ * (`transport: "sse-events"`) it stays on the read-only Channel-A firehose
45
+ * (`result.chunks`). Omit to force the legacy firehose-only behavior.
46
+ */
47
+ terminalCapability?: TerminalCapability | null | undefined;
48
+ /**
49
+ * Full xterm theme. When omitted the terminal self-derives it from the `--og-*`
50
+ * tokens of its own container (correct even inside a nested `data-og-theme`
51
+ * subtree). Passing it lets the host drive re-theme on a theme flip.
52
+ */
53
+ theme?: XtermTheme | undefined;
54
+ fontFamily?: string | undefined;
55
+ fontSize?: number | undefined;
56
+ /**
57
+ * Lease liveness (`cold` | `warming` | `warm` | `draining`). Drives the
58
+ * boot-in-terminal status lines: once the user has focused the terminal and
59
+ * the box is not yet warm, a styled "● waking machine — Ns…" line is rendered
60
+ * INSIDE xterm (no overlay/spinner) until the live PTY connects.
61
+ */
62
+ liveness?: string | undefined;
63
+ /**
64
+ * Force read-only even when the PTY accepts stdin. Default: interactive
65
+ * whenever a live pty-ws stream is connected OR `result.write !== null` (the box
66
+ * advertises an interactive PTY); otherwise the read-only agent firehose.
67
+ */
68
+ readOnly?: boolean | undefined;
69
+ /** Shown on the server / before xterm hydrates (SSR-safe placeholder). */
70
+ placeholder?: ReactNode | undefined;
71
+ /** Render the small status header (pty/shell + running dot + read-only pill). */
72
+ showHeader?: boolean | undefined;
73
+ /** Shell label for the header (e.g. `/bin/bash`). */
74
+ shell?: string | undefined;
75
+ /**
76
+ * Fired the first time the user engages the terminal surface (focus or click).
77
+ * The host wires this to warm the box for the REAL pty-ws terminal (the viewer
78
+ * attach), so a cold box upgrades from the read-only firehose to a live PTY ON
79
+ * INTERACT — never on mere mount (which would force a box spin-up and regress
80
+ * the firehose-only default).
81
+ */
82
+ onActivate?: (() => void) | undefined;
83
+ className?: string | undefined;
84
+ };
85
+ /** Debug seam (dev/evidence only, never a typed public API): a global hook the
86
+ * screenshot harness reads to probe the settled renderer tier + resolved font
87
+ * without mounting a real WebGL context in unit tests. */
88
+ type TerminalDebugInfo = {
89
+ renderer: RendererTier | null;
90
+ fontFamily: string | undefined;
91
+ fontSize: number | undefined;
92
+ hasVarInFont: boolean;
93
+ theme: XtermTheme | undefined;
94
+ /** The live xterm instance (opaque) — the evidence harness reads its buffer to
95
+ * prove screen preservation (E5) and drive the burst-responsiveness probe. */
96
+ term: unknown;
97
+ };
98
+ declare global {
99
+ var __OG_TERMINAL_DEBUG__: ((info: TerminalDebugInfo) => void) | undefined;
100
+ var __OG_FORCE_RENDERER_FAIL__: string | undefined;
101
+ }
102
+ /**
103
+ * An xterm.js terminal fed by the Channel-A event projection
104
+ * (`useSandboxTerminal`) or a live ttyd PTY. xterm + its addons are lazy-imported
105
+ * inside an effect, so SSR renders the placeholder and the terminal mounts on
106
+ * hydration.
107
+ *
108
+ * Renderer: WebGL (GPU-composited cells) with a canvas → DOM fallback ladder
109
+ * (`attachRenderer`), so bursty output stays smooth but a lost/blocklisted
110
+ * context degrades gracefully. Font + theme are resolved to CONCRETE values
111
+ * from the og tokens BEFORE construction (xterm measures glyphs in a canvas
112
+ * where `var()` never resolves, and colors every cell from a full ANSI palette).
113
+ *
114
+ * The terminal is mounted ONCE and its data source is swapped in place: the
115
+ * read-only firehose (`result.chunks`) → the live PTY. Stdin is toggled via
116
+ * `term.options.disableStdin` at runtime (not a remount), so scrollback and the
117
+ * visible screen survive the projection→PTY handoff.
118
+ *
119
+ * Resizes are tracked with a `ResizeObserver` on the container (not just
120
+ * `window.resize`) so dragging the dock handle refits the grid.
121
+ */
122
+ export declare function SandboxTerminal({ result, terminalCapability, theme, fontFamily, fontSize, liveness, readOnly, placeholder, showHeader, shell, onActivate, className, }: SandboxTerminalProps): import("react/jsx-runtime").JSX.Element;
123
+ export {};
@@ -0,0 +1,128 @@
1
+ import { type ReactNode } from "react";
2
+ import type { SessionEvent } from "@opengeni/sdk";
3
+ import { type ClientOverride } from "../provider";
4
+ import { type MachineChip } from "../hooks/use-machine-chip";
5
+ import type { MachineView } from "../types/machines";
6
+ import { type WorkspaceDockProps, type WorkspaceTab } from "./workspace-dock";
7
+ /** A host-routed notification (replaces the app-only `sonner` toast coupling). */
8
+ export type WorkspaceNotification = {
9
+ kind: "error" | "info";
10
+ message: string;
11
+ };
12
+ /** The workbench's canonical tab ids (a host injects extras around these). */
13
+ export declare const WORKBENCH_TAB_CHANGES = "changes";
14
+ export declare const WORKBENCH_TAB_FILES = "files";
15
+ export declare const WORKBENCH_TAB_TERMINAL = "terminal";
16
+ export declare const WORKBENCH_TAB_DESKTOP = "desktop";
17
+ /**
18
+ * The built-in workbench surfaces in their canonical display order. Hosts can
19
+ * pass a subset through `surfaces`; omission preserves the complete standalone
20
+ * workbench.
21
+ */
22
+ export declare const WORKBENCH_SURFACES: readonly ["changes", "files", "terminal", "desktop"];
23
+ export type SandboxWorkspaceSurface = (typeof WORKBENCH_SURFACES)[number];
24
+ /**
25
+ * Decide a workspace tab from an already-local event log: the newest
26
+ * `workspace.revision.captured` announce carries the change surface stats, so
27
+ * "changes exist → Changes, else Files" needs zero machine round-trips. A host
28
+ * `override` (e.g. a landing "run" tab) wins when supplied.
29
+ *
30
+ * `<SandboxWorkspace>` uses this only as an optional early hint after its own
31
+ * capture GET reports no durable capture. A pure embedder needs no events-at-mount
32
+ * contract: it falls through to authoritative live Git instead.
33
+ */
34
+ export declare function initialWorkspaceTab(events: SessionEvent[] | undefined, override?: string | null): string;
35
+ export type WorkspaceMachine = {
36
+ /** Whether at least one built-in workbench surface is enabled. */
37
+ enabled: boolean;
38
+ /** The derived live/waking/offline chip model. */
39
+ chip: MachineChip;
40
+ /** The machine these surfaces are bound to (the Modal group box or a
41
+ * self-hosted machine), or null while the fleet is still resolving. */
42
+ activeMachine: MachineView | null;
43
+ loading: boolean;
44
+ error: Error | null;
45
+ refresh: () => Promise<void>;
46
+ };
47
+ export type UseSandboxWorkspaceTabsOptions = ClientOverride & {
48
+ sessionId: string;
49
+ /** Live event log (usually `useSessionEvents().events`). */
50
+ events: SessionEvent[];
51
+ /**
52
+ * Built-in surfaces this host wants to expose. Omit for all four. A disabled
53
+ * surface is behaviorally dormant: its data hooks, warm intents, stream
54
+ * attachment, and navigation callbacks are not activated.
55
+ */
56
+ surfaces?: readonly SandboxWorkspaceSurface[] | undefined;
57
+ /** Override the source-driven default tab (e.g. a host landing tab id). When
58
+ * omitted the workbench picks Changes-vs-Files from capture or live Git. */
59
+ initialTab?: string | null | undefined;
60
+ /** Host-routed notifications (mutation errors, desktop-consent failures). The
61
+ * package never imports a toast library — the host decides how to surface. */
62
+ onNotify?: ((notification: WorkspaceNotification) => void) | undefined;
63
+ /** File requested by a Changes guard. The Files surface defers the read until
64
+ * the sandbox is live, then reveals this path. */
65
+ requestedFilePath?: string | null | undefined;
66
+ /** Unique identity for `requestedFilePath`, including repeated requests for the
67
+ * same path. */
68
+ requestedFileRequestId?: string | number | null | undefined;
69
+ /** Route a guarded diff into the host's Files tab. */
70
+ onOpenFile?: ((path: string) => void) | undefined;
71
+ };
72
+ export type UseSandboxWorkspaceTabsResult = {
73
+ /** Changes | Files | Terminal | Desktop (capability-gated where noted). */
74
+ tabs: WorkspaceTab[];
75
+ /** The source-driven default tab: Changes when the first authoritative capture
76
+ * or live Git result has changes, else Files (a host `initialTab` overrides).
77
+ * null while that source resolves, or permanently when neither Changes nor
78
+ * Files is enabled; the choice latches once. */
79
+ defaultTab: string | null;
80
+ /** The machine-state model for the dock-header chip. */
81
+ machine: WorkspaceMachine;
82
+ };
83
+ /**
84
+ * Build the workbench tabs + the machine-chip model for one session. This is the
85
+ * dock "brain": capability negotiation, capture-backed cold reads, prewarm
86
+ * flags, desktop consent, and the xterm theme observer — all package-local.
87
+ */
88
+ export declare function useSandboxWorkspaceTabs(options: UseSandboxWorkspaceTabsOptions): UseSandboxWorkspaceTabsResult;
89
+ export type SandboxWorkspaceProps = ClientOverride & {
90
+ sessionId: string;
91
+ /** Live event log (usually `useSessionEvents().events`). */
92
+ events: SessionEvent[];
93
+ /** The chat / primary pane shown beside the dock. */
94
+ primary: ReactNode;
95
+ /**
96
+ * Built-in surfaces this host wants to expose. Omit for Changes, Files,
97
+ * Terminal, and Desktop. Disabled surfaces remain behaviorally dormant.
98
+ */
99
+ surfaces?: readonly SandboxWorkspaceSurface[] | undefined;
100
+ /** Host tabs injected BEFORE the workbench tabs (e.g. a "Run" landing tab). */
101
+ leadingTabs?: WorkspaceTab[] | undefined;
102
+ /** Host tabs injected AFTER the workbench tabs (e.g. a "Debug" tab). */
103
+ trailingTabs?: WorkspaceTab[] | undefined;
104
+ /** Override the pre-paint default tab (e.g. a host landing tab id). When
105
+ * omitted the workbench decides from capture, then live Git when no capture exists. */
106
+ initialTab?: string | undefined;
107
+ /** Host-routed notifications (no toast dependency in the package). */
108
+ onNotify?: ((notification: WorkspaceNotification) => void) | undefined;
109
+ /** Controlled collapsed state for hosts with their own dock toggle. */
110
+ collapsed?: boolean | undefined;
111
+ onCollapsedChange?: ((collapsed: boolean) => void) | undefined;
112
+ /** Host navigation shown only in the phone workspace overlay header. */
113
+ mobileLeadingControl?: ReactNode | undefined;
114
+ autoSaveId?: string | undefined;
115
+ defaultSize?: number | undefined;
116
+ minSize?: number | undefined;
117
+ maxSize?: number | undefined;
118
+ className?: string | undefined;
119
+ };
120
+ /**
121
+ * The whole session workspace, ready to mount: `<SandboxWorkspace>` assembles the
122
+ * capability-gated tabs, pins the machine-state chip in the dock header, and
123
+ * renders the resizable `<WorkspaceDock>`. Wrap the tree in `<OpenGeniProvider>`
124
+ * (client + workspaceId) and import `@opengeni/react/styles.css`; that is the
125
+ * entire integration (see `docs/embedding-workbench.md`).
126
+ */
127
+ export declare function SandboxWorkspace(props: SandboxWorkspaceProps): ReactNode;
128
+ export type { WorkspaceDockProps };
@@ -0,0 +1,70 @@
1
+ /**
2
+ * SessionChrome — compact merged session signals above the composer.
3
+ *
4
+ * Built-in session chrome for production and embeds. Token-themed
5
+ * (`--og-session-chrome-*`); hosts override on `.og-session-chrome` or an ancestor.
6
+ *
7
+ * ## Host tokens
8
+ * Defaults live in `tokens.css`.
9
+ *
10
+ * | Token | Role |
11
+ * | --- | --- |
12
+ * | `--og-session-chrome-surface` / `-open` | Dock fill (collapsed / expanded) |
13
+ * | `--og-session-chrome-border` / `-open` | Dock edge |
14
+ * | `--og-session-chrome-highlight` | Sliding chip selection pill |
15
+ * | `--og-session-chrome-shadow` / `-open` | Elevation |
16
+ * | `--og-session-chrome-radius` | Dock corner radius |
17
+ * | `--og-session-chrome-chip-min-height` | Signal chip height |
18
+ * | `--og-session-chrome-chip-pad-x` / `--og-session-chrome-chip-gap` | Chip padding / rail gap |
19
+ * | `--og-session-chrome-rail-pad` | Outer rail inset |
20
+ * | `--og-session-chrome-panel-pad-x` / `-y` | Expanded panel padding |
21
+ * | `--og-session-chrome-duration` / `--og-session-chrome-ease` | Expand + pill motion |
22
+ * | `--og-session-chrome-crossfade-duration` | Segment content opacity crossfade |
23
+ * | `--og-session-chrome-row-hover` | Inbox / queue row hover wash |
24
+ *
25
+ * Inbox and queue stay separate segments. Queue hover actions wire to
26
+ * `UseTurnQueueResult` (`editTurn` / `steerTurn` / `moveTurn` / `removeTurn`).
27
+ * Inbox has no product dismiss API; pass `onDismissIncoming` when the host
28
+ * wants a visible action (dev harness may use a local dummy).
29
+ *
30
+ * Segment switches keep the panel shell mounted and crossfade content while
31
+ * animating measured height — no `mode="wait"` unmount flash.
32
+ */
33
+ import type { SessionGoal } from "@opengeni/sdk";
34
+ import { type ReactNode } from "react";
35
+ import type { ComposerState } from "../hooks/use-composer";
36
+ import type { UseGoalResult } from "../hooks/use-goal";
37
+ import type { UseTurnQueueResult } from "../hooks/use-turn-queue";
38
+ export type SessionChromeSignalId = "incoming" | "queue" | "goal" | "agents";
39
+ export type SessionChromeSignalTone = "neutral" | "accent" | "waiting" | "running";
40
+ export type SessionChromeAgentsSignal = {
41
+ count: number;
42
+ detail?: string | undefined;
43
+ tone?: SessionChromeSignalTone | undefined;
44
+ };
45
+ export type SessionChromeProps = {
46
+ queue: UseTurnQueueResult;
47
+ /** Needed for queue edit → composer checkout. Omit with `readOnly`. */
48
+ composer?: ComposerState | undefined;
49
+ goal?: UseGoalResult | null | undefined;
50
+ /** Expanded agents body (host supplies tree / list). */
51
+ agentsPanel?: ReactNode;
52
+ /** Chip summary; when `count > 0` the agents segment appears. */
53
+ agentsSignal?: SessionChromeAgentsSignal | undefined;
54
+ /**
55
+ * Optional inbox dismiss. Product pending-inputs have no remove API — hosts
56
+ * (and the gallery) may still pass a handler so the action is visible.
57
+ */
58
+ onDismissIncoming?: ((inputId: string) => void) | undefined;
59
+ readOnly?: boolean | undefined;
60
+ className?: string | undefined;
61
+ /** Controlled active segment; omit for uncontrolled. */
62
+ active?: SessionChromeSignalId | null | undefined;
63
+ defaultActive?: SessionChromeSignalId | null | undefined;
64
+ onActiveChange?: ((next: SessionChromeSignalId | null) => void) | undefined;
65
+ };
66
+ type GoalPillState = "pursuing" | "scheduled" | "blocked" | "held" | "paused" | "invariant_broken" | "completed";
67
+ /** Select pill state from the goal's authoritative continuation projection. */
68
+ export declare function sessionChromeGoalPillState(goalStatus: "active" | "paused" | "completed", continuation: SessionGoal["continuation"] | null | undefined): GoalPillState;
69
+ export declare function SessionChrome({ queue, composer, goal, agentsPanel, agentsSignal, onDismissIncoming, readOnly, className, active: activeControlled, defaultActive, onActiveChange, }: SessionChromeProps): import("react/jsx-runtime").JSX.Element | null;
70
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { SessionStatus as SessionStatusValue } from "@opengeni/sdk";
2
+ export type SessionStatusMeta = {
3
+ label: string;
4
+ /** Token-backed color classes for the dot and tinted badge. */
5
+ dotClassName: string;
6
+ badgeClassName: string;
7
+ /** Live states breathe; terminal states hold still. */
8
+ pulse: boolean;
9
+ };
10
+ export declare const SESSION_STATUS_META: Record<SessionStatusValue, SessionStatusMeta>;
11
+ export type SessionStatusProps = {
12
+ status: SessionStatusValue;
13
+ /** Override the label ("Running" -> "Deploying", ...). */
14
+ label?: string | undefined;
15
+ size?: "sm" | "md" | undefined;
16
+ className?: string | undefined;
17
+ };
18
+ /** Status badge with a breathing dot for live states. */
19
+ export declare function SessionStatus({ status, label, size, className }: SessionStatusProps): import("react/jsx-runtime").JSX.Element;
20
+ export type StatusDotProps = {
21
+ status: SessionStatusValue;
22
+ className?: string | undefined;
23
+ };
24
+ /** Just the dot — for dense rows and tiles. */
25
+ export declare function StatusDot({ status, className }: StatusDotProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Display-only softener for mid-stream markdown.
3
+ *
4
+ * While tokens are still arriving, incomplete markers (`**bold`, an open
5
+ * fence, a half-finished link) would otherwise render as raw punctuation —
6
+ * the hard "breaking" flash. This closes a small set of common unfinished
7
+ * constructs so the parse looks settled; the SOURCE string is never mutated
8
+ * (callers pass the softened copy only into the markdown parser).
9
+ *
10
+ * When the real closers land, the softened and true parses converge and the
11
+ * crystallize breath covers the remount.
12
+ */
13
+ export declare function softenStreamingMarkdown(source: string): string;