@opengeni/react 0.28.2 → 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 (208) 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-PMSGE233.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-4F2YLLHP.js → chunk-KZRUYCL4.js} +14 -17
  10. package/dist/chunk-KZRUYCL4.js.map +1 -0
  11. package/dist/{chunk-OCHBZ2X7.js → chunk-TCCE5ZU5.js} +192 -28
  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-XVVQP7A4.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-Drm_ypue.d.ts → timeline/types.d.ts} +57 -67
  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 +1382 -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 +24 -18
  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 +49 -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/session.ts +2 -0
  185. package/src/timeline/activity-rail.tsx +46 -7
  186. package/src/timeline/entrance.tsx +10 -0
  187. package/src/timeline/fold-memory.ts +52 -0
  188. package/src/timeline/index.ts +11 -1
  189. package/src/timeline/projection.ts +252 -47
  190. package/src/timeline/seen-activity-ids.ts +19 -0
  191. package/src/timeline/shared.tsx +1 -1
  192. package/src/timeline/tool-renderers.tsx +75 -6
  193. package/src/timeline/turn-summary.tsx +387 -97
  194. package/src/timeline/types.ts +47 -0
  195. package/styles/index.css +99 -7
  196. package/styles/tokens.css +44 -3
  197. package/dist/chunk-4F2YLLHP.js.map +0 -1
  198. package/dist/chunk-M7X4JZOD.js.map +0 -1
  199. package/dist/chunk-OCHBZ2X7.js.map +0 -1
  200. package/dist/chunk-PMSGE233.js.map +0 -1
  201. package/dist/chunk-WAA247AB.js +0 -3858
  202. package/dist/chunk-WAA247AB.js.map +0 -1
  203. package/dist/chunk-XVVQP7A4.js.map +0 -1
  204. package/dist/composer-BMzimGTO.d.ts +0 -528
  205. package/dist/session-C3tIXLim.d.ts +0 -264
  206. package/dist/session-context-CAjlaeZb.d.ts +0 -84
  207. package/dist/session-ui-B_7cfN5u.d.ts +0 -259
  208. /package/dist/{chunk-BC6RKIHS.js.map → chunk-GZ4KR67U.js.map} +0 -0
@@ -0,0 +1,33 @@
1
+ import type { OpenGeniClient } from "@opengeni/sdk";
2
+ /**
3
+ * The slice of `OpenGeniClient` the hooks depend on. Structural, so apps can
4
+ * pass the real SDK client, a proxy-backed client that routes through their
5
+ * own API, or a scripted client in tests/demos.
6
+ */
7
+ export 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" | "getWorkspaceModelCatalog" | "listWorkspaceControlEvents" | "streamWorkspaceControlEvents" | "getBillingUsage" | "getClientConfig" | "getStreamCapabilities" | "acknowledgeStream" | "attachViewer" | "heartbeatViewer" | "detachViewer" | "fsList" | "fsRead" | "fsWrite" | "fsDelete" | "fsMove" | "fsMkdir" | "gitStatus" | "gitDiff" | "getWorkspaceCapture" | "getWorkspaceCaptureFile" | "terminalExec" | "terminalPtyOpen" | "terminalPtyWrite" | "terminalPtyResize" | "terminalPtyClose">;
8
+ /**
9
+ * Tenant-safe client surface required by the session-only React entry.
10
+ *
11
+ * A host proxy can implement only these session-scoped operations instead of
12
+ * stubbing OpenGeni's workbench, billing, rig, file-system, and workspace
13
+ * administration APIs. Workspace-level resume is deliberately optional: a
14
+ * host that does not expose that authority still supports every session-local
15
+ * composer/control path.
16
+ */
17
+ export type EmbeddedSessionClientLike = Pick<OpenGeniClient, "getSession" | "listEvents" | "streamEvents" | "getComposerDraft" | "saveComposerDraft" | "sendMessage" | "steerMessage" | "getQueue" | "moveQueueItem" | "editQueueItem" | "steerQueueItem" | "deleteQueueItem" | "pauseSession" | "resumeSession" | "sendApprovalDecision"> & {
18
+ setWorkspaceInferenceState?: OpenGeniClient["setWorkspaceInferenceState"] | undefined;
19
+ };
20
+ /** Event-read surface shared by hooks that optionally tail a session. */
21
+ export type EmbeddedSessionEventClientLike = Pick<OpenGeniClient, "getSession" | "streamEvents">;
22
+ /** Exact client surface required by {@link useSession}. */
23
+ export type EmbeddedSessionReadClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "getSession" | "updateSession">;
24
+ /** Exact client surface required by {@link useGoal}. */
25
+ export type EmbeddedGoalClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "getGoal" | "updateGoal" | "deleteGoal">;
26
+ /** Exact client surface required by {@link useSessionLineage}. */
27
+ export type EmbeddedSessionLineageClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "getSessionLineage">;
28
+ /** Exact client surface required by {@link useFileAttachments}. */
29
+ export type EmbeddedFileAttachmentClientLike = Pick<OpenGeniClient, "uploadFile">;
30
+ /** Exact client surface required by structured human-input hooks. */
31
+ export type EmbeddedHumanInputSessionClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "listHumanInputRequests" | "submitHumanInputResponse">;
32
+ /** Exact client surface required by MCP approval-policy hooks. */
33
+ export type EmbeddedSessionMcpApprovalPolicyClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "updateSessionMcpApprovalPolicy">;
@@ -0,0 +1,3 @@
1
+ export type { CommandContext, CommandResult, Notice, SlashArg, SlashCommand } from "./types";
2
+ export { argHint, defaultCommands, filterCommands, firstMissingRequiredArg, hasPermission, matchCommand, parseCommandLine, } from "./registry";
3
+ export type { ParsedCommandLine } from "./registry";
@@ -0,0 +1,41 @@
1
+ import type { Permission } from "@opengeni/sdk";
2
+ import type { CommandContext, SlashArg, SlashCommand } from "./types";
3
+ /**
4
+ * Parse a composer value into a command name + the rest. A command is
5
+ * recognized ONLY when the value's first character is "/" (the start token);
6
+ * anything else is plain chat and returns null.
7
+ *
8
+ * "/cl" -> { name: "cl", rest: "", hasTrailingSpace: false }
9
+ * "/goal " -> { name: "goal", rest: "", hasTrailingSpace: true }
10
+ * "/goal pause"-> { name: "goal", rest: "pause", hasTrailingSpace: false }
11
+ */
12
+ export type ParsedCommandLine = {
13
+ name: string;
14
+ rest: string;
15
+ /** True when the name token is closed by a space — arg-hint mode. */
16
+ hasTrailingSpace: boolean;
17
+ args: string[];
18
+ };
19
+ export declare function parseCommandLine(value: string): ParsedCommandLine | null;
20
+ /** Whether the operator's permission set satisfies a command's gate. */
21
+ export declare function hasPermission(required: Permission | undefined, permissions: Permission[]): boolean;
22
+ /** Match a command (by name or alias) against the value. */
23
+ export declare function matchCommand(commands: readonly SlashCommand[], value: string): SlashCommand | null;
24
+ type FilterCtx = Pick<CommandContext, "sessionId" | "status" | "permissions">;
25
+ /**
26
+ * The commands visible for the current token + context. Permission-absent and
27
+ * `available()===false` commands are dropped entirely (a gated command is never
28
+ * shown, not shown-disabled). Filtering is a prefix match on name/alias.
29
+ */
30
+ export declare function filterCommands(commands: readonly SlashCommand[], token: string, ctx: FilterCtx): SlashCommand[];
31
+ /** Render a command's arg hint for the palette footer / help, e.g. "<pause|resume>". */
32
+ export declare function argHint(args: readonly SlashArg[] | undefined): string;
33
+ /** The first required arg that has not yet been supplied, if any. */
34
+ export declare function firstMissingRequiredArg(command: SlashCommand, args: string[]): SlashArg | null;
35
+ /**
36
+ * The default command set. Adding a command is one object literal here; the
37
+ * palette list, filter, arg-hint footer, and /help all render from this array.
38
+ * Apps concat their own commands via the ChatComposer `commands` prop.
39
+ */
40
+ export declare const defaultCommands: readonly SlashCommand[];
41
+ export {};
@@ -0,0 +1,85 @@
1
+ import type { Permission, SessionStatus } from "@opengeni/sdk";
2
+ import type { SessionClientLike } from "../client";
3
+ /**
4
+ * The slash-command registry. A command is a SESSION / OPERATOR control — an
5
+ * action on the session or the UI (clear, compact, pause the goal, show help) —
6
+ * NOT a structured way to talk to the agent. The human↔agent channel stays
7
+ * plain chat; the palette only recognizes a leading "/" and never sends a
8
+ * command to the model.
9
+ *
10
+ * Two kinds, modeled by where the handler does its work:
11
+ * - CLIENT commands touch only the local UI (e.g. /help, /clear-view).
12
+ * - SERVER commands call the API through the SDK (e.g. /clear, /compact,
13
+ * /goal).
14
+ * Both are just `run(args, ctx)`; `ctx` exposes the client for server commands
15
+ * and the UI affordances (notice, openHelp, clearView, confirm) for both.
16
+ */
17
+ /** A positional argument a command accepts after its name. */
18
+ export type SlashArg = {
19
+ name: string;
20
+ /** Enter runs only once every required arg is present; otherwise autocompletes. */
21
+ required?: boolean;
22
+ /** Closed value set (rendered as a hint; validated by the command itself). */
23
+ oneOf?: readonly string[];
24
+ description?: string;
25
+ };
26
+ /** Transient feedback surfaced in the composer (generalized error line). */
27
+ export type Notice = {
28
+ tone: "ok" | "error";
29
+ message: string;
30
+ };
31
+ /** Everything a command handler can reach. Assembled by the composer. */
32
+ export type CommandContext = {
33
+ /** SDK-shaped client for server commands. */
34
+ client: SessionClientLike;
35
+ workspaceId: string;
36
+ /** Null before a session exists (server commands should guard on this). */
37
+ sessionId: string | null;
38
+ status: SessionStatus | null;
39
+ /** The operator's permissions on this workspace (gates command visibility). */
40
+ permissions: Permission[];
41
+ /** Surface a transient ok/error notice in the composer. */
42
+ notice: (notice: Notice) => void;
43
+ /** Open the in-composer /help panel (rendered from the registry). */
44
+ openHelp: () => void;
45
+ /**
46
+ * Reset only the LOCAL timeline view — no server call. Returns whether a
47
+ * view-reset affordance was actually wired (and thus had an effect): the host
48
+ * surface supplies one via the composer's `onClearView` prop, and consoles
49
+ * that don't (no resettable local timeline) get `false`. The /clear-view
50
+ * command uses this to avoid reporting a false "cleared" success on a no-op.
51
+ */
52
+ clearView: () => boolean;
53
+ /** Show the danger confirm bar; resolves true once the operator confirms. */
54
+ confirm: () => Promise<boolean>;
55
+ };
56
+ export type CommandResult = {
57
+ status: "ok" | "error";
58
+ message?: string;
59
+ /**
60
+ * Keep the composer draft instead of clearing it on an ok result. Used when a
61
+ * command resolves to a no-op the operator may want to retry — e.g. canceling
62
+ * the /clear confirm bar returns ok (no error) but must NOT wipe the typed
63
+ * "/clear" draft. Default false: a successful command clears the draft.
64
+ */
65
+ keepDraft?: boolean;
66
+ };
67
+ export type SlashCommand = {
68
+ /** Primary token after the slash (no leading "/"). */
69
+ name: string;
70
+ /** Alternate tokens that resolve to this command. */
71
+ aliases?: readonly string[];
72
+ description: string;
73
+ args?: readonly SlashArg[];
74
+ /** Required permission; the command is hidden from the palette without it. */
75
+ permission?: Permission;
76
+ /** Destructive — the palette shows a confirm bar before running. */
77
+ danger?: boolean;
78
+ /**
79
+ * Dynamic availability beyond the permission gate (e.g. hide a server command
80
+ * until a session exists). Returning false hides the command.
81
+ */
82
+ available?: (ctx: Pick<CommandContext, "sessionId" | "status" | "permissions">) => boolean;
83
+ /** Execute the command. Throwing is caught and surfaced as an error notice. */
84
+ run: (args: string[], ctx: CommandContext) => Promise<CommandResult> | CommandResult;
85
+ };
@@ -0,0 +1,28 @@
1
+ import { type ReactNode } from "react";
2
+ import type { PendingApproval } from "../approvals";
3
+ export type ApprovalSurfaceMessages = {
4
+ title: string;
5
+ description: string;
6
+ approve: string;
7
+ reject: string;
8
+ approving: string;
9
+ rejecting: string;
10
+ formatToolName: (name: string) => string;
11
+ };
12
+ export declare const defaultApprovalSurfaceMessages: ApprovalSurfaceMessages;
13
+ export type ApprovalSurfaceProps = {
14
+ approvals: PendingApproval[];
15
+ onApprove: (approval: PendingApproval) => void | Promise<void>;
16
+ onReject: (approval: PendingApproval) => void | Promise<void>;
17
+ responding?: boolean | undefined;
18
+ error?: string | Error | null | undefined;
19
+ messages?: Partial<ApprovalSurfaceMessages> | undefined;
20
+ renderApproval?: ((approval: PendingApproval) => ReactNode) | undefined;
21
+ className?: string | undefined;
22
+ };
23
+ /**
24
+ * Host-neutral approval presentation backed by the native pending-approval
25
+ * projection and control callbacks. It owns only presentation and duplicate
26
+ * click fencing; OpenGeni remains the authority for approval state.
27
+ */
28
+ export declare function ApprovalSurface({ approvals, onApprove, onReject, responding, error, messages: overrides, renderApproval, className, }: ApprovalSurfaceProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,51 @@
1
+ import type { ClientModel, EffectiveSessionControl } from "@opengeni/sdk";
2
+ import type { ClipboardEvent, ReactNode } from "react";
3
+ import type { SlashCommand } from "../commands/types";
4
+ import type { ComposerState } from "../hooks/use-composer";
5
+ import type { UseFileAttachmentsResult } from "../hooks/use-file-attachments";
6
+ import type { SlashCommandContext } from "../hooks/use-slash-commands";
7
+ import { OPEN_WORKSTREAM_CONTROL_EVENT, type ChatComposerMessages, type ComposerControlLinks } from "./composer";
8
+ import { type ComposerTranscriptionControlProps } from "./composer-transcription-control";
9
+ export { OPEN_WORKSTREAM_CONTROL_EVENT };
10
+ export type ChatComposerProps = {
11
+ composer: ComposerState;
12
+ /** Canonical workstream control, separate from lifecycle status. */
13
+ effectiveControl?: EffectiveSessionControl | null | undefined;
14
+ /** Waiting prompts already ahead of a normal Send. */
15
+ queuedAheadCount?: number | undefined;
16
+ /** Whether broader Workspace Resume is authorized for this viewer. */
17
+ canControlWorkspace?: boolean | undefined;
18
+ /** Optional host routes used to navigate from effective Pause blockers. */
19
+ controlLinks?: ComposerControlLinks | undefined;
20
+ placeholder?: string | undefined;
21
+ disabled?: boolean | undefined;
22
+ autoFocus?: boolean | undefined;
23
+ /** Replaces the default keyboard hint under the field. */
24
+ hint?: string | undefined;
25
+ /** App controls in the footer row, replacing the hint. */
26
+ controlsStart?: ReactNode | undefined;
27
+ /** Provider-neutral speech capability. Provider configuration stays in workspace settings. */
28
+ transcription?: ComposerTranscriptionControlProps | undefined;
29
+ /** Content rendered above the textarea, inside the field chrome. */
30
+ header?: ReactNode | undefined;
31
+ /** Paste hook composed with the attachment paste path. */
32
+ onPaste?: ((event: ClipboardEvent<HTMLTextAreaElement>) => void) | undefined;
33
+ /** Opt-in file attachment state, typically from `useFileAttachments`. */
34
+ attachments?: UseFileAttachmentsResult | undefined;
35
+ /** Opt-in model picker choices. */
36
+ models?: ClientModel[] | undefined;
37
+ selectedModel?: string | undefined;
38
+ onSelectModel?: ((modelId: string) => void) | undefined;
39
+ className?: string | undefined;
40
+ commands?: readonly SlashCommand[] | undefined;
41
+ commandContext?: SlashCommandContext | undefined;
42
+ onClearView?: (() => void) | undefined;
43
+ /** Partial overrides for all composer-owned visible and accessible copy. */
44
+ messages?: Partial<ChatComposerMessages> | undefined;
45
+ };
46
+ /**
47
+ * Batteries-included chat composer. This preset is assembled exclusively from
48
+ * the public controller and compound primitives exported by the composer
49
+ * subpath, so custom and default layouts share one behavioral implementation.
50
+ */
51
+ export declare function ChatComposer({ composer, effectiveControl, queuedAheadCount, canControlWorkspace, controlLinks, placeholder, disabled, autoFocus, hint, controlsStart, transcription, header, onPaste, attachments, models, selectedModel, onSelectModel, className, commands, commandContext, onClearView, messages, }: ChatComposerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,43 @@
1
+ import { type ReactNode } from "react";
2
+ /** Language grammar loaders, keyed by the extension class we infer from the path. */
3
+ declare const LANGUAGE_LOADERS: Record<string, () => Promise<unknown>>;
4
+ /** Map a filename to a grammar key (or null for plain text — still fully editable). */
5
+ export declare function languageForPath(path: string): keyof typeof LANGUAGE_LOADERS | null;
6
+ export type CodeEditorProps = {
7
+ /** Workspace-relative path — drives language inference (and the save target upstream). */
8
+ path: string;
9
+ /** The decoded text contents to seed the editor with. */
10
+ initialContents: string;
11
+ /** Persist the current buffer. Resolves when the write lands; rejects to surface an error. */
12
+ onSave: (contents: string) => Promise<unknown>;
13
+ /** Explicitly overwrite after a visible expected-content conflict. */
14
+ onOverwrite?: ((contents: string) => Promise<unknown>) | undefined;
15
+ /** Re-read the selected file after a visible save conflict. */
16
+ onReload?: (() => void) | undefined;
17
+ /** Fired once when the buffer FIRST diverges from its baseline (the first real
18
+ * keystroke) — the wake-on-edit intent. The host warms the box on this so the
19
+ * eventual save lands fast; merely opening the file for reading never fires it. */
20
+ onEditIntent?: (() => void) | undefined;
21
+ /** Read-only mode (e.g. a truncated/too-large file shown for reference only). */
22
+ readOnly?: boolean | undefined;
23
+ themeType?: "dark" | "light" | undefined;
24
+ /** Rendered while the (lazy) CodeMirror bundle loads. */
25
+ loading?: ReactNode | undefined;
26
+ /** Rendered if `@uiw/react-codemirror` is not installed / fails to import. */
27
+ fallback?: ReactNode | undefined;
28
+ className?: string | undefined;
29
+ };
30
+ /**
31
+ * The EDITABLE single-file pane: CodeMirror 6 with a per-language grammar chosen
32
+ * from the filename, og-* themed, with dirty tracking and a save path wired to
33
+ * `Cmd/Ctrl+S` *and* an explicit Save button. The viewer (Pierre `File`) stays
34
+ * the read-only complement — this is only mounted when the user opts to edit.
35
+ *
36
+ * Save semantics: the buffer is "dirty" the moment it diverges from the last
37
+ * saved baseline; a successful `onSave` clears dirty and re-baselines. A failed
38
+ * save keeps the buffer dirty (nothing is lost) and surfaces the error inline.
39
+ * `readOnly` suppresses every mutation path so a truncated/binary file can never
40
+ * be saved back (which would corrupt it by writing the truncated prefix).
41
+ */
42
+ export declare function CodeEditor({ path, initialContents, onSave, onOverwrite, onReload, onEditIntent, readOnly, themeType, loading, fallback, className, }: CodeEditorProps): import("react/jsx-runtime").JSX.Element;
43
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { SlashCommand } from "../commands/types";
2
+ export type CommandPaletteProps = {
3
+ open: boolean;
4
+ items: SlashCommand[];
5
+ highlight: number;
6
+ /** Hover/click selects a row. */
7
+ onHighlight: (index: number) => void;
8
+ /** Click runs the row (same path as Enter). */
9
+ onRun: (index: number) => void;
10
+ /** Footer arg hint shown in arg-hint mode (e.g. "<pause|resume>"). */
11
+ argHintText: string;
12
+ /** id used for aria-activedescendant wiring from the textarea. */
13
+ listboxId: string;
14
+ /** Accessible list label. Defaults to "Slash commands". */
15
+ label?: string | undefined;
16
+ /** Badge shown for destructive commands. Defaults to "danger". */
17
+ dangerLabel?: string | undefined;
18
+ };
19
+ /**
20
+ * The slash-command palette: a popover anchored above the textarea, rendered
21
+ * entirely from the filtered registry. Dark-first, Linear/Vercel-calm, using
22
+ * the opengeni#46 design tokens. Full keyboard nav lives in useSlashCommands;
23
+ * this component is presentational + aria.
24
+ */
25
+ export declare function CommandPalette({ open, items, highlight, onHighlight, onRun, argHintText, listboxId, label, dangerLabel, }: CommandPaletteProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,36 @@
1
+ import type { ClientVoiceInputConfig, OpenGeniClient, TranscriptionAdapter, WorkspaceTranscriptionPolicy } from "@opengeni/sdk";
2
+ export type ComposerTranscriptionMessages = {
3
+ start: string;
4
+ stop: string;
5
+ cancel: string;
6
+ retry: string;
7
+ requestingPermission: string;
8
+ recording: string;
9
+ transcribing: string;
10
+ unavailableDisabled: string;
11
+ unavailable: string;
12
+ errorPermissionDenied: string;
13
+ errorNotSupported: string;
14
+ errorUnavailable: string;
15
+ errorTooLarge: string;
16
+ errorInvalidAudio: string;
17
+ errorUnknown: string;
18
+ };
19
+ export type ComposerTranscriptionControlProps = {
20
+ client?: OpenGeniClient | null | undefined;
21
+ workspaceId?: string | undefined;
22
+ capability?: ClientVoiceInputConfig | null | undefined;
23
+ workspaceEnabled?: boolean | undefined;
24
+ /** @deprecated Native MediaRecorder input no longer uses host adapters. */
25
+ adapter?: TranscriptionAdapter | null | undefined;
26
+ /** @deprecated Native MediaRecorder input no longer uses host policies. */
27
+ policy?: WorkspaceTranscriptionPolicy | undefined;
28
+ /** @deprecated Native input uses the server capability duration limit. */
29
+ lifecycleTimeouts?: unknown;
30
+ /** @deprecated Native input does not expose provider diagnostics. */
31
+ onDiagnostic?: unknown;
32
+ messages?: Partial<ComposerTranscriptionMessages> | undefined;
33
+ className?: string | undefined;
34
+ };
35
+ /** One provider-neutral microphone control for the nearest editable composer. */
36
+ export declare function ComposerTranscriptionControl({ client, workspaceId, capability, workspaceEnabled, messages: overrides, className, }: ComposerTranscriptionControlProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,277 @@
1
+ import type { ClientModel, EffectiveSessionControl } from "@opengeni/sdk";
2
+ import { type ButtonHTMLAttributes, type ChangeEvent, type ClipboardEvent, type ComponentPropsWithoutRef, type DragEvent, type KeyboardEvent, type ReactNode, type RefObject } from "react";
3
+ import type { Notice, SlashCommand } from "../commands/types";
4
+ import type { ComposerState } from "../hooks/use-composer";
5
+ import type { UseFileAttachmentsResult } from "../hooks/use-file-attachments";
6
+ import { type ConfirmState, type SlashCommandContext } from "../hooks/use-slash-commands";
7
+ import type { PickerModelRow } from "../model-policy";
8
+ export declare const OPEN_WORKSTREAM_CONTROL_EVENT = "opengeni:open-workstream-control";
9
+ export type ComposerDelivery = Pick<ComposerState, "value" | "setValue" | "send" | "steer" | "sending" | "canSend" | "error" | "clearError">;
10
+ export type ComposerDraftState = Pick<ComposerState, "draftConflict" | "draftSaving" | "resolveDraftConflict" | "restoredResources" | "removeRestoredResource">;
11
+ export type ComposerControlState = Pick<ComposerState, "pause" | "pausing" | "resume" | "resumeScope" | "resuming">;
12
+ export type ComposerControlLinks = {
13
+ workspaceHref?: string | undefined;
14
+ sessionHref?: ((sessionId: string) => string) | undefined;
15
+ };
16
+ export type ChatComposerMessages = {
17
+ messagePlaceholder: string;
18
+ pausedPlaceholder: string;
19
+ inputLabel: string;
20
+ keyboardHint: string;
21
+ slashCommandBlocked: string;
22
+ controlChangedError: string;
23
+ sendFailedError: string;
24
+ dropFiles: string;
25
+ attachFiles: string;
26
+ pauseAriaLabel: string;
27
+ pauseTitle: string;
28
+ sendMessageAriaLabel: string;
29
+ sendAndResumeAriaLabel: string;
30
+ sendTitle: string;
31
+ sendAndResumeTitle: string;
32
+ workspacePaused: string;
33
+ pausedHere: string;
34
+ parentBlocker: string;
35
+ narrowerPause: string;
36
+ pausedBy: (displayName: string) => string;
37
+ queuedAhead: (count: number) => string;
38
+ resumingAndSending: string;
39
+ nextMessageResumes: string;
40
+ resumeThisWorkstream: string;
41
+ resumeShort: string;
42
+ hidePauseDetails: string;
43
+ showPauseDetails: string;
44
+ pauseReasonsLabel: string;
45
+ pausedByLabel: string;
46
+ alsoPausedByLabel: string;
47
+ resumeWorkspace: string;
48
+ resumeFromSession: string;
49
+ sessionCanRun: string;
50
+ stillPausedBy: (displayName: string) => string;
51
+ restoredResourcesLabel: string;
52
+ restoredFile: (fileId: string) => string;
53
+ removeRestoredResource: (index: number) => string;
54
+ uploading: string;
55
+ uploadFailed: string;
56
+ retryAttachment: (name: string) => string;
57
+ retryUpload: string;
58
+ removeAttachment: (name: string) => string;
59
+ confirmCommand: (name: string) => string;
60
+ confirmDescription: (command: SlashCommand) => string;
61
+ cancel: string;
62
+ runCommand: (name: string) => string;
63
+ commands: string;
64
+ slashCommandsLabel: string;
65
+ modelLabel: string;
66
+ close: string;
67
+ danger: string;
68
+ draftConflict: string;
69
+ useOtherDraft: string;
70
+ keepMine: string;
71
+ savingDraft: string;
72
+ formatBytes: (bytes: number) => string;
73
+ formatRelativeTime: (changedAt: string) => string;
74
+ };
75
+ export declare const defaultChatComposerMessages: ChatComposerMessages;
76
+ export type ComposerSubmitMode = "queue" | "steer";
77
+ export type ComposerSubmitBlocker = "disabled" | "attachment" | "sending" | "command" | "empty" | null;
78
+ export type UseChatComposerControllerOptions = {
79
+ delivery: ComposerDelivery;
80
+ draft?: ComposerDraftState | undefined;
81
+ control?: ComposerControlState | undefined;
82
+ effectiveControl?: EffectiveSessionControl | null | undefined;
83
+ queuedAheadCount?: number | undefined;
84
+ canControlWorkspace?: boolean | undefined;
85
+ controlLinks?: ComposerControlLinks | undefined;
86
+ disabled?: boolean | undefined;
87
+ attachments?: UseFileAttachmentsResult | undefined;
88
+ commands?: readonly SlashCommand[] | undefined;
89
+ commandContext?: SlashCommandContext | undefined;
90
+ onClearView?: (() => void) | undefined;
91
+ onPaste?: ((event: ClipboardEvent<HTMLTextAreaElement>) => void) | undefined;
92
+ messages?: Partial<ChatComposerMessages> | undefined;
93
+ };
94
+ /**
95
+ * Headless interaction layer for a chat composer. It is the single owner of
96
+ * delivery guards, keyboard routing, command interception, drag/drop, focus,
97
+ * confirmation, and feedback state used by both the preset and primitives.
98
+ */
99
+ export declare function useChatComposerController({ delivery, draft, control, effectiveControl, queuedAheadCount, canControlWorkspace, controlLinks, disabled, attachments, commands, commandContext, onClearView, onPaste, messages: messageOverrides, }: UseChatComposerControllerOptions): {
100
+ id: string;
101
+ rootRef: RefObject<HTMLDivElement | null>;
102
+ textareaRef: RefObject<HTMLTextAreaElement | null>;
103
+ pauseButtonRef: RefObject<HTMLButtonElement | null>;
104
+ fileInputRef: RefObject<HTMLInputElement | null>;
105
+ listboxId: string;
106
+ effectiveControl: EffectiveSessionControl | null | undefined;
107
+ queuedAheadCount: number;
108
+ canControlWorkspace: boolean;
109
+ controlLinks: ComposerControlLinks | undefined;
110
+ disabled: boolean;
111
+ attachments: UseFileAttachmentsResult | undefined;
112
+ messages: {
113
+ messagePlaceholder: string;
114
+ pausedPlaceholder: string;
115
+ inputLabel: string;
116
+ keyboardHint: string;
117
+ slashCommandBlocked: string;
118
+ controlChangedError: string;
119
+ sendFailedError: string;
120
+ dropFiles: string;
121
+ attachFiles: string;
122
+ pauseAriaLabel: string;
123
+ pauseTitle: string;
124
+ sendMessageAriaLabel: string;
125
+ sendAndResumeAriaLabel: string;
126
+ sendTitle: string;
127
+ sendAndResumeTitle: string;
128
+ workspacePaused: string;
129
+ pausedHere: string;
130
+ parentBlocker: string;
131
+ narrowerPause: string;
132
+ pausedBy: (displayName: string) => string;
133
+ queuedAhead: (count: number) => string;
134
+ resumingAndSending: string;
135
+ nextMessageResumes: string;
136
+ resumeThisWorkstream: string;
137
+ resumeShort: string;
138
+ hidePauseDetails: string;
139
+ showPauseDetails: string;
140
+ pauseReasonsLabel: string;
141
+ pausedByLabel: string;
142
+ alsoPausedByLabel: string;
143
+ resumeWorkspace: string;
144
+ resumeFromSession: string;
145
+ sessionCanRun: string;
146
+ stillPausedBy: (displayName: string) => string;
147
+ restoredResourcesLabel: string;
148
+ restoredFile: (fileId: string) => string;
149
+ removeRestoredResource: (index: number) => string;
150
+ uploading: string;
151
+ uploadFailed: string;
152
+ retryAttachment: (name: string) => string;
153
+ retryUpload: string;
154
+ removeAttachment: (name: string) => string;
155
+ confirmCommand: (name: string) => string;
156
+ confirmDescription: (command: SlashCommand) => string;
157
+ cancel: string;
158
+ runCommand: (name: string) => string;
159
+ commands: string;
160
+ slashCommandsLabel: string;
161
+ modelLabel: string;
162
+ close: string;
163
+ danger: string;
164
+ draftConflict: string;
165
+ useOtherDraft: string;
166
+ keepMine: string;
167
+ savingDraft: string;
168
+ formatBytes: (bytes: number) => string;
169
+ formatRelativeTime: (changedAt: string) => string;
170
+ };
171
+ sending: boolean;
172
+ error: Error | null;
173
+ clearError: () => void;
174
+ hasDraftState: boolean;
175
+ draftConflict: Error | null;
176
+ draftSaving: boolean;
177
+ restoredResources: import("@opengeni/sdk").ResourceRef[];
178
+ removeRestoredResource: ((index: number) => void) | undefined;
179
+ resolveDraftConflict: ((choice: "keep_mine" | "use_remote") => Promise<void>) | undefined;
180
+ hasControl: boolean;
181
+ pausing: boolean;
182
+ resuming: boolean;
183
+ pause: (reason?: string) => Promise<boolean>;
184
+ resume: (reason?: string) => Promise<boolean>;
185
+ resumeScope: (option: EffectiveSessionControl["resumeOptions"][number]) => Promise<boolean>;
186
+ paused: boolean;
187
+ controlDetailsOpen: boolean;
188
+ setControlDetailsOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
189
+ paletteMounted: boolean;
190
+ setPaletteMounted: import("react").Dispatch<import("react").SetStateAction<boolean>>;
191
+ dragging: boolean;
192
+ handleDragOver: (event: DragEvent<HTMLDivElement>) => void;
193
+ handleDragLeave: (event: DragEvent<HTMLDivElement>) => void;
194
+ handleDrop: (event: DragEvent<HTMLDivElement>) => void;
195
+ palette: import("..").UseSlashCommandsResult;
196
+ paletteEnabled: boolean;
197
+ commandDraftBlocked: boolean;
198
+ confirmState: ConfirmState;
199
+ settleConfirmation: (confirmed: boolean) => void;
200
+ helpOpen: boolean;
201
+ setHelpOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
202
+ helpCommands: SlashCommand[];
203
+ activeNotice: Notice | null;
204
+ canSubmit: boolean;
205
+ submitBlocker: ComposerSubmitBlocker;
206
+ submit: (mode: ComposerSubmitMode) => Promise<boolean>;
207
+ handleKeyDown: (event: KeyboardEvent<HTMLTextAreaElement>) => void;
208
+ handlePaste: (event: ClipboardEvent<HTMLTextAreaElement>) => void;
209
+ handleFileChange: (event: ChangeEvent<HTMLInputElement>) => void;
210
+ focusInput: () => void | undefined;
211
+ setValue: (value: string) => void;
212
+ value: string;
213
+ };
214
+ export type ChatComposerController = ReturnType<typeof useChatComposerController>;
215
+ export type ChatComposerContextValue = Pick<ChatComposerController, "id" | "value" | "setValue" | "focusInput" | "submit" | "canSubmit" | "submitBlocker" | "disabled" | "sending" | "error" | "clearError" | "attachments" | "messages" | "effectiveControl" | "paused" | "hasControl" | "pausing" | "resuming" | "pause" | "resume" | "resumeScope">;
216
+ /** Read the nearest compound composer's safe accessory-facing state and actions. */
217
+ export declare function useChatComposer(): ChatComposerContextValue;
218
+ export type ComposerRootProps = Omit<ComponentPropsWithoutRef<"div">, "children"> & {
219
+ controller: ChatComposerController;
220
+ children: ReactNode;
221
+ };
222
+ export declare const Root: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & {
223
+ controller: ChatComposerController;
224
+ children: ReactNode;
225
+ } & import("react").RefAttributes<HTMLDivElement>>;
226
+ export type ComposerFrameProps = ComponentPropsWithoutRef<"div">;
227
+ export declare const Frame: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
228
+ export type ComposerCommandPaletteProps = {
229
+ className?: string | undefined;
230
+ };
231
+ export declare function CommandPalette({ className }: ComposerCommandPaletteProps): import("react/jsx-runtime").JSX.Element | null;
232
+ type OwnedSurfaceProps = "onDragOver" | "onDragLeave" | "onDrop";
233
+ export type ComposerSurfaceProps = Omit<ComponentPropsWithoutRef<"div">, OwnedSurfaceProps>;
234
+ export declare const Surface: import("react").ForwardRefExoticComponent<ComposerSurfaceProps & import("react").RefAttributes<HTMLDivElement>>;
235
+ export declare function PausedState(): import("react/jsx-runtime").JSX.Element | null;
236
+ export declare function RestoredResources(): import("react/jsx-runtime").JSX.Element | null;
237
+ export declare function Attachments(): import("react/jsx-runtime").JSX.Element | null;
238
+ type OwnedInputProps = "value" | "defaultValue" | "onChange" | "onKeyDown" | "onPaste" | "disabled" | "aria-autocomplete" | "aria-controls" | "aria-activedescendant" | "aria-keyshortcuts";
239
+ export type ComposerInputProps = Omit<ComponentPropsWithoutRef<"textarea">, OwnedInputProps>;
240
+ export declare const Input: import("react").ForwardRefExoticComponent<ComposerInputProps & import("react").RefAttributes<HTMLTextAreaElement>>;
241
+ export declare function Confirmation(): import("react/jsx-runtime").JSX.Element | null;
242
+ export type ComposerFooterProps = ComponentPropsWithoutRef<"div">;
243
+ export declare const Footer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
244
+ export type ComposerControlsProps = ComponentPropsWithoutRef<"span">;
245
+ export declare const Controls: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
246
+ export type ComposerHintProps = ComponentPropsWithoutRef<"span">;
247
+ export declare const Hint: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
248
+ export type ComposerActionsProps = ComponentPropsWithoutRef<"span">;
249
+ export declare const Actions: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
250
+ type OwnedButtonProps = "type" | "onClick" | "disabled";
251
+ export type ComposerAttachButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, OwnedButtonProps> & {
252
+ accept?: string | undefined;
253
+ multiple?: boolean | undefined;
254
+ };
255
+ export declare const AttachButton: import("react").ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, OwnedButtonProps> & {
256
+ accept?: string | undefined;
257
+ multiple?: boolean | undefined;
258
+ } & import("react").RefAttributes<HTMLButtonElement>>;
259
+ export type ComposerModelPickerProps = {
260
+ models?: ClientModel[] | undefined;
261
+ /** Catalog-backed rows preferred over legacy provider-grouped models. */
262
+ rows?: PickerModelRow[] | undefined;
263
+ value?: string | undefined;
264
+ onChange?: ((modelId: string) => void) | undefined;
265
+ label?: string | undefined;
266
+ className?: string | undefined;
267
+ /** Filter to Codex models for remote_v2-locked sessions. */
268
+ codexOnly?: boolean | undefined;
269
+ };
270
+ export declare function ModelPicker({ models, rows, value, onChange, label, className, codexOnly, }: ComposerModelPickerProps): import("react/jsx-runtime").JSX.Element;
271
+ export type ComposerPauseButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, OwnedButtonProps>;
272
+ export declare const PauseButton: import("react").ForwardRefExoticComponent<ComposerPauseButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
273
+ export type ComposerSendButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, OwnedButtonProps>;
274
+ export declare const SendButton: import("react").ForwardRefExoticComponent<ComposerSendButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
275
+ export declare function Help(): import("react/jsx-runtime").JSX.Element;
276
+ export declare function Status(): import("react/jsx-runtime").JSX.Element;
277
+ export {};