@opengeni/react 0.13.0 → 0.20.0
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.
- package/README.md +129 -23
- package/dist/chunk-6BXBGJ3B.js +1956 -0
- package/dist/chunk-6BXBGJ3B.js.map +1 -0
- package/dist/chunk-6UT5OC3P.js +2133 -0
- package/dist/chunk-6UT5OC3P.js.map +1 -0
- package/dist/chunk-EBTT3MYN.js +92 -0
- package/dist/chunk-EBTT3MYN.js.map +1 -0
- package/dist/chunk-HHFA4AFX.js +425 -0
- package/dist/chunk-HHFA4AFX.js.map +1 -0
- package/dist/chunk-LAZ2A743.js +2393 -0
- package/dist/chunk-LAZ2A743.js.map +1 -0
- package/dist/chunk-MRSECXRP.js +563 -0
- package/dist/chunk-MRSECXRP.js.map +1 -0
- package/dist/chunk-TK7G6XLT.js +18 -0
- package/dist/chunk-TK7G6XLT.js.map +1 -0
- package/dist/composer-DvUaa5ki.d.ts +585 -0
- package/dist/composer.d.ts +6 -0
- package/dist/composer.js +56 -0
- package/dist/composer.js.map +1 -0
- package/dist/index.d.ts +642 -1080
- package/dist/index.js +7672 -8005
- package/dist/index.js.map +1 -1
- package/dist/machines.d.ts +412 -3
- package/dist/machines.js +25 -1
- package/dist/noto-sans-arabic-loader-IA2T4X2A.js +21 -0
- package/dist/noto-sans-arabic-loader-IA2T4X2A.js.map +1 -0
- package/dist/noto-sans-jp-loader.generated-HFGLYBR3.js +292 -0
- package/dist/noto-sans-jp-loader.generated-HFGLYBR3.js.map +1 -0
- package/dist/queue-surface-implementation-NQMV2ML3.js +890 -0
- package/dist/queue-surface-implementation-NQMV2ML3.js.map +1 -0
- package/dist/session-Gd4iVPYw.d.ts +425 -0
- package/dist/session-context-DIFFlXKc.d.ts +52 -0
- package/dist/session.d.ts +4 -0
- package/dist/session.js +50 -0
- package/dist/session.js.map +1 -0
- package/dist/use-composer-BCfm4mzX.d.ts +112 -0
- package/package.json +23 -4
- package/src/approvals.ts +5 -3
- package/src/client.ts +50 -1
- package/src/components/approval-surface.tsx +198 -0
- package/src/components/chat-composer.tsx +104 -751
- package/src/components/code-editor.tsx +104 -26
- package/src/components/command-palette.tsx +8 -2
- package/src/components/composer-transcription-control.tsx +211 -0
- package/src/components/composer.tsx +1536 -0
- package/src/components/desktop-viewer.tsx +3 -3
- package/src/components/enrollment-consent.tsx +2 -2
- package/src/components/file-browser.tsx +367 -29
- package/src/components/human-input-form.tsx +417 -0
- package/src/components/machine-card.tsx +82 -16
- package/src/components/machine-health-pill.tsx +68 -0
- package/src/components/machine-metrics.tsx +10 -24
- package/src/components/machines/health.ts +146 -0
- package/src/components/machines/machine-detail.tsx +220 -0
- package/src/components/machines/metric-history-chart.tsx +298 -0
- package/src/components/machines/metric-sparkline.tsx +76 -0
- package/src/components/machines/series.ts +113 -0
- package/src/components/machines-dashboard.tsx +16 -4
- package/src/components/message-timeline.tsx +15 -7
- package/src/components/model-picker.tsx +12 -3
- package/src/components/pierre-diff.tsx +32 -6
- package/src/components/queue-surface-implementation.tsx +1041 -0
- package/src/components/queue-surface-state.tsx +94 -0
- package/src/components/queue-surface.tsx +60 -0
- package/src/components/sandbox-files.tsx +230 -21
- package/src/components/sandbox-terminal.tsx +8 -2
- package/src/components/sandbox-workspace.tsx +489 -135
- package/src/components/session-status.tsx +0 -6
- package/src/components/workbench-changes.tsx +145 -50
- package/src/components/workspace-dock.tsx +329 -68
- package/src/composer.ts +60 -0
- package/src/hooks/internal.ts +115 -34
- package/src/hooks/use-composer.ts +635 -74
- package/src/hooks/use-human-input.ts +131 -0
- package/src/hooks/use-machine-chip.ts +2 -2
- package/src/hooks/use-machines.ts +27 -11
- package/src/hooks/use-sandbox-files.ts +310 -62
- package/src/hooks/use-sandbox-git.ts +154 -40
- package/src/hooks/use-sandbox-terminal.ts +28 -6
- package/src/hooks/use-session-capabilities.ts +38 -9
- package/src/hooks/use-session-control.ts +43 -15
- package/src/hooks/use-session-events.ts +523 -48
- package/src/hooks/use-session-lineage.ts +15 -6
- package/src/hooks/use-session.ts +10 -2
- package/src/hooks/use-slash-commands.ts +38 -38
- package/src/hooks/use-transcription.ts +757 -0
- package/src/hooks/use-turn-queue.ts +273 -77
- package/src/hooks/use-windowed-sections.ts +2 -2
- package/src/hooks/use-workspace-capture.ts +146 -40
- package/src/hooks/use-workspace-edit.ts +50 -14
- package/src/hooks/use-workspace-sessions.ts +3 -0
- package/src/human-input.ts +72 -0
- package/src/index.ts +88 -12
- package/src/lib/noto-sans-arabic-loader.ts +21 -0
- package/src/lib/noto-sans-jp-loader.generated.ts +295 -0
- package/src/lib/use-portal-token-style.ts +51 -0
- package/src/lib/use-unicode-fonts.ts +57 -0
- package/src/machines.ts +16 -0
- package/src/provider.tsx +163 -41
- package/src/session-context.ts +135 -0
- package/src/session.ts +79 -0
- package/src/timeline/parsers.ts +78 -6
- package/src/timeline/projection.ts +36 -6
- package/src/timeline/tool-renderers.tsx +41 -0
- package/src/timeline/turn-summary.tsx +2 -2
- package/src/timeline/types.ts +16 -8
- package/styles/index.css +78 -0
- package/styles/index.d.ts +2 -0
- package/styles/tokens.css +11 -6
- package/styles/tokens.d.ts +2 -0
- package/dist/chunk-NFYVQWIB.js +0 -1377
- package/dist/chunk-NFYVQWIB.js.map +0 -1
- package/dist/machines-CnlMb7E-.d.ts +0 -329
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { a as
|
|
3
|
-
import
|
|
1
|
+
import { S as SessionClientLike, C as ClientOverride } from './session-context-DIFFlXKc.js';
|
|
2
|
+
export { a as EmbeddedHumanInputSessionClientLike, b as EmbeddedSessionClientLike, O as OpenGeniContextValue, u as useOpenGeni, c as useOpenGeniClient } from './session-context-DIFFlXKc.js';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import { WorkspaceControlEvent, Session, SessionEvent, EffectiveSessionControl, ClientModel, SessionGoal, ScheduledTask, SessionLineageResponse, VariableSet, CreateVariableSetRequest, UpdateVariableSetRequest, VariableSetVariableMetadata, RigChange, Rig, UpdateRigRequest, RigVersion, ProposeRigChangeRequest, CreateRigRequest, CapabilityPack, PackInstallation, RegisterCapabilityPackRequest, WorkspaceRegisteredPack, EnablePackRequest, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, BillingBalance, UsageEvent, SessionCapabilities, DesktopStreamCapability, DesktopConnectionState, DesktopRfbFactory, TerminalCapability, OpenGeniRequestOptions, FsReadResponse, FsWriteResponse, WorkspaceCaptureManifest, GitFileDiff, WorkspaceCaptureDegradedReason, MachineState, SessionHumanInputRequest, SubmitHumanInputResponseRequest, HumanInputQuestion, HumanInputAnswer, Permission, SessionStatus as SessionStatus$1, CapabilityUnavailableReason, MachineView, CodexAccountsResponse, CodexAccount, CodexRotationSettings } from '@opengeni/sdk';
|
|
4
5
|
export { MachineKind, MachineMetricsSeriesResponse, MachineState, MachineView, MachinesResponse, MetricSample } from '@opengeni/sdk';
|
|
5
6
|
import * as react from 'react';
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
7
|
+
import { ReactNode, ClipboardEvent, RefObject, ComponentType } from 'react';
|
|
8
|
+
import { S as SessionEventFeedOptions, C as ComposerState } from './use-composer-BCfm4mzX.js';
|
|
9
|
+
export { a as ComposerSendExtras, F as FILE_ONLY_MESSAGE_TEXT, U as UseComposerOptions, c as composeSendInput, s as shouldSteerOnKey, b as shouldSubmitOnKey, u as useComposer } from './use-composer-BCfm4mzX.js';
|
|
10
|
+
import { U as UseTurnQueueResult, P as PendingApproval, T as ToolCallItem, A as ActivityItem, a as TurnOutcome, b as TimelineItem, c as AgentMessageItem, d as UserMessageItem, e as AuthNeededItem } from './session-Gd4iVPYw.js';
|
|
11
|
+
export { B as BrowserSessionEventWindow, G as GoalItem, N as NoticeItem, f as PendingHumanInputRequest, Q as QueueMutationKind, R as ReasoningItem, S as SESSION_EVENT_BROWSER_MAX_BYTES, g as SESSION_EVENT_BROWSER_MAX_COUNT, h as SESSION_EVENT_BROWSER_PENDING_MAX_BYTES, i as SESSION_EVENT_BROWSER_PENDING_MAX_COUNT, j as SESSION_EVENT_BROWSER_SINGLE_EVENT_MAX_BYTES, k as SandboxItem, l as SessionEventsConnectionState, m as SessionStatusItem, n as TimelineGroup, o as TurnEndItem, p as UseHumanInputRequestsOptions, q as UseHumanInputRequestsResult, r as UseSessionControlOptions, s as UseSessionControlResult, t as UseSessionEventsOptions, u as UseSessionEventsResult, v as UseTurnQueueOptions, W as WorkerItem, w as approvalsFromRequiresAction, x as boundBrowserSessionEventWindow, y as buildTimeline, z as creditExhaustedFromEvents, C as extractSessionRef, D as groupTimeline, E as humanInputRequestFromEvent, F as isHumanInputEvent, H as isTurnQueueEvent, I as projectPendingApprovals, J as projectPendingHumanInputRequests, K as sessionStatusFromEvents, L as toolDisplayName, M as useHumanInputRequests, O as useSessionControl, V as useSessionEvents, X as useTurnQueue } from './session-Gd4iVPYw.js';
|
|
12
|
+
import { C as ComposerControlLinks, a as ComposerTranscriptionControlProps, U as UseFileAttachmentsResult, S as SlashCommand, b as SlashCommandContext, c as ChatComposerMessages, d as SlashArg, e as CommandContext } from './composer-DvUaa5ki.js';
|
|
13
|
+
export { f as CommandResult, g as ComposerTranscriptionControl, h as ComposerTranscriptionMessages, i as ConfirmState, F as FileAttachment, I as INITIAL_TRANSCRIPTION_CONTROL_STATE, N as Notice, O as OPEN_WORKSTREAM_CONTROL_EVENT, j as SlashCommandHandlers, T as TranscriptionControlAction, k as TranscriptionControlState, l as TranscriptionControlTransition, m as UseFileAttachmentsOptions, n as UseSlashCommandsOptions, o as UseSlashCommandsResult, p as UseTranscriptionOptions, q as UseTranscriptionResult, r as appendFinalTranscript, s as defaultChatComposerMessages, t as transitionTranscriptionControl, u as useFileAttachments, v as useSlashCommands, w as useTranscription } from './composer-DvUaa5ki.js';
|
|
14
|
+
export { CONNECTION_STATUS_META, ConnectionDot, ConnectionDotProps, ConnectionStatus, ConnectionStatusMeta, ConnectionStatusPill, ConnectionStatusPillProps, DeviceFlowPhase, EnrollmentConsent, EnrollmentConsentMachine, EnrollmentConsentPhase, EnrollmentConsentProps, EnrollmentDeviceFlow, EnrollmentDeviceFlowProps, HEALTH_TOKEN, HealthLevel, HealthVerdict, MACHINE_STATE_BADGE_META, METRICS, METRIC_WINDOWS, MachineCard, MachineCardProps, MachineDetail, MachineDetailProps, MachineDockBar, MachineDockBarProps, MachineHealthPill, MachineHealthPillProps, MachineMetrics, MachineMetricsProps, MachineStateBadgeMeta, MachineStatusPill, MachineStatusPillProps, MachinesClientLike, MachinesDashboard, MachinesDashboardProps, MetricDef, MetricHistoryChart, MetricHistoryChartProps, MetricKey, MetricSparkline, MetricSparklineProps, MetricWindow, SeriesPoint, SharedMachineDisclosure, SharedMachineDisclosureProps, UseMachinesOptions, UseMachinesResult, WINDOW_LABEL, connectionStatusForState, deriveHealth, healthPulses, pointsFor, useMachines } from './machines.js';
|
|
8
15
|
import { ClassValue } from 'clsx';
|
|
9
16
|
|
|
10
|
-
type
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
events?: SessionEvent[] | undefined;
|
|
17
|
-
enabled?: boolean | undefined;
|
|
17
|
+
type OpenGeniProviderProps = {
|
|
18
|
+
client: SessionClientLike;
|
|
19
|
+
workspaceId: string;
|
|
20
|
+
onWorkspaceControlEvent?: ((event: WorkspaceControlEvent) => void) | undefined;
|
|
21
|
+
children?: ReactNode;
|
|
18
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Supplies the OpenGeni client + workspace to all hooks below it. Hooks also
|
|
25
|
+
* accept `{ client, workspaceId }` overrides per call for multi-workspace UIs.
|
|
26
|
+
*/
|
|
27
|
+
declare function OpenGeniProvider({ client, workspaceId, onWorkspaceControlEvent, children, }: OpenGeniProviderProps): react_jsx_runtime.JSX.Element;
|
|
19
28
|
|
|
20
29
|
type UseSessionOptions = ClientOverride & SessionEventFeedOptions & {
|
|
21
30
|
/** Re-fetch on an interval (ms). Off by default — pair with `useSessionEvents` for live status. */
|
|
@@ -38,752 +47,66 @@ declare function isTitleEvent(event: Pick<SessionEvent, "type">): boolean;
|
|
|
38
47
|
/** Fetch one session (with optional polling), live-patching its title on `session.title_set`. */
|
|
39
48
|
declare function useSession(sessionId: string | null | undefined, options?: UseSessionOptions): UseSessionResult;
|
|
40
49
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/** Resources attached to this message (file uploads, repositories). */
|
|
46
|
-
resources: ResourceRef[];
|
|
47
|
-
/** Tools requested for the turn this message starts. */
|
|
48
|
-
tools: ToolRef[];
|
|
49
|
-
occurredAt: string;
|
|
50
|
-
};
|
|
51
|
-
type AgentMessageItem = {
|
|
52
|
-
kind: "agent-message";
|
|
53
|
-
id: string;
|
|
54
|
-
turnId: string | null;
|
|
55
|
-
text: string;
|
|
56
|
-
/** Still receiving deltas (no completed/turn-end seen yet). */
|
|
57
|
-
streaming: boolean;
|
|
58
|
-
occurredAt: string;
|
|
59
|
-
};
|
|
60
|
-
type ReasoningItem = {
|
|
61
|
-
kind: "reasoning";
|
|
62
|
-
id: string;
|
|
63
|
-
turnId: string | null;
|
|
64
|
-
text: string;
|
|
65
|
-
streaming: boolean;
|
|
66
|
-
occurredAt: string;
|
|
67
|
-
};
|
|
68
|
-
type ToolCallItem = {
|
|
69
|
-
kind: "tool-call";
|
|
70
|
-
id: string;
|
|
71
|
-
turnId: string | null;
|
|
72
|
-
callId: string | null;
|
|
73
|
-
name: string;
|
|
74
|
-
arguments: unknown;
|
|
75
|
-
output: unknown;
|
|
76
|
-
/**
|
|
77
|
-
* The provider-native tool item (`agent.toolCall.created.payload.raw`). Carries
|
|
78
|
-
* `type` (e.g. `apply_patch_call`, `computer_call`, `hosted_tool_call`) and the
|
|
79
|
-
* tool-specific fields the per-tool renderers read (`operation`, `action`,
|
|
80
|
-
* `providerData`, …). `undefined` for first-party MCP tools, which carry their
|
|
81
|
-
* payload in `arguments`/`output` instead.
|
|
82
|
-
*/
|
|
83
|
-
raw: unknown;
|
|
84
|
-
status: "running" | "complete" | "failed" | "cancelled";
|
|
85
|
-
occurredAt: string;
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* An orchestration call against another session — the manager spawning or
|
|
89
|
-
* messaging a worker. Rendered as a first-class "worker" row, not a generic
|
|
90
|
-
* tool call.
|
|
91
|
-
*/
|
|
92
|
-
type WorkerItem = {
|
|
93
|
-
kind: "worker";
|
|
94
|
-
id: string;
|
|
95
|
-
turnId: string | null;
|
|
96
|
-
callId: string | null;
|
|
97
|
-
action: "spawn" | "message";
|
|
98
|
-
/** The worker's initial message / the message sent to it, when parseable. */
|
|
99
|
-
prompt: string | null;
|
|
100
|
-
/** The target/spawned worker session id, when parseable from args/output. */
|
|
101
|
-
workerSessionId: string | null;
|
|
102
|
-
status: "running" | "complete" | "failed" | "cancelled";
|
|
103
|
-
occurredAt: string;
|
|
104
|
-
};
|
|
105
|
-
type WorkerCompletionItem = {
|
|
106
|
-
kind: "worker-completion";
|
|
107
|
-
id: string;
|
|
108
|
-
turnId: string | null;
|
|
109
|
-
occurredAt: string;
|
|
110
|
-
childSessionId: string;
|
|
111
|
-
childStatus: string;
|
|
112
|
-
goalStatus: string | null;
|
|
113
|
-
goalText: string | null;
|
|
114
|
-
evidence: string | null;
|
|
115
|
-
pausedReason: string | null;
|
|
116
|
-
text: string;
|
|
117
|
-
};
|
|
118
|
-
type SandboxItem = {
|
|
119
|
-
kind: "sandbox";
|
|
120
|
-
id: string;
|
|
121
|
-
turnId: string | null;
|
|
122
|
-
name: string;
|
|
123
|
-
command: string | null;
|
|
124
|
-
output: string;
|
|
125
|
-
origin?: "created" | "restored" | "resumed" | null;
|
|
126
|
-
status: "running" | "complete" | "failed" | "cancelled";
|
|
127
|
-
occurredAt: string;
|
|
128
|
-
};
|
|
129
|
-
/**
|
|
130
|
-
* A first-party workspace-memory write the agent made mid-turn — a `memory.saved`
|
|
131
|
-
* (it committed a new preference / fact / procedure / decision / history) or a
|
|
132
|
-
* `memory.corrected` (it updated or archived an existing one). A settled save is
|
|
133
|
-
* ordinary progress, not an exceptional state, so it renders as a calm NEUTRAL
|
|
134
|
-
* step on the rail (never accent/color). When the host app supplies an
|
|
135
|
-
* `onMemoryClick` handler the row also deep-links to the record in its memory
|
|
136
|
-
* pane; without one it is non-interactive rich content.
|
|
137
|
-
*/
|
|
138
|
-
type MemoryItem = {
|
|
139
|
-
kind: "memory";
|
|
140
|
-
id: string;
|
|
141
|
-
turnId: string | null;
|
|
142
|
-
variant: "saved" | "corrected";
|
|
143
|
-
/** The memory's kind enum (`"preference" | "semantic" | …`); mapped to a human label at render. */
|
|
144
|
-
memoryKind: string;
|
|
145
|
-
/** The memory text, ellipsized to ≤120 chars server-side. For a supersede this is the OLD text. */
|
|
146
|
-
preview: string;
|
|
147
|
-
/** The save collapsed into an existing memory (no new row was written). Saved variant only. */
|
|
148
|
-
deduped?: boolean;
|
|
149
|
-
/** The NEW text when a correction superseded the memory with a replacement; absent = updated-in-place or archived. */
|
|
150
|
-
replacementPreview?: string;
|
|
151
|
-
/**
|
|
152
|
-
* What a `memory.corrected` did: `"superseded"` (replaced by a new record, see
|
|
153
|
-
* `replacementPreview`), `"updated"` (edited in place — the record lives on), or
|
|
154
|
-
* `"archived"` (retired). Distinguishes updated-in-place from archived when there
|
|
155
|
-
* is no replacement. Corrected variant only; read defensively (may be absent).
|
|
156
|
-
*/
|
|
157
|
-
action?: string;
|
|
158
|
-
/** The saved / corrected memory's id — the deep-link target for a save. */
|
|
159
|
-
memoryId: string;
|
|
160
|
-
/** The replacement memory's id when a correction produced one — the LIVE record the deep-link targets. */
|
|
161
|
-
replacementMemoryId?: string;
|
|
162
|
-
occurredAt: string;
|
|
163
|
-
};
|
|
164
|
-
type SessionStatusItem = {
|
|
165
|
-
kind: "session-status";
|
|
166
|
-
id: string;
|
|
167
|
-
status: SessionStatus$1;
|
|
168
|
-
occurredAt: string;
|
|
169
|
-
};
|
|
170
|
-
type GoalItem = {
|
|
171
|
-
kind: "goal";
|
|
172
|
-
id: string;
|
|
173
|
-
action: "set" | "updated" | "completed" | "paused" | "resumed" | "cleared" | "continuation";
|
|
174
|
-
text: string | null;
|
|
175
|
-
occurredAt: string;
|
|
176
|
-
};
|
|
177
|
-
type NoticeItem = {
|
|
178
|
-
kind: "notice";
|
|
179
|
-
id: string;
|
|
180
|
-
tone: "waiting" | "cancelled" | "failed";
|
|
181
|
-
text: string;
|
|
182
|
-
/** Optional evidence kept inspectable without overwhelming the main rail. */
|
|
183
|
-
details?: {
|
|
184
|
-
label: string;
|
|
185
|
-
value: unknown;
|
|
186
|
-
};
|
|
187
|
-
action?: {
|
|
188
|
-
label: string;
|
|
189
|
-
url: string;
|
|
190
|
-
};
|
|
191
|
-
occurredAt: string;
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* A tool call hit a connection whose credential lapsed — the broker asked the
|
|
195
|
-
* user to reconnect the provider before the turn can continue. Carries the
|
|
196
|
-
* structured `tool.auth_needed` payload so the renderer can draw a clean inline
|
|
197
|
-
* reconnect affordance (provider logo + one human line + a Reconnect button)
|
|
198
|
-
* and the app can start the right recovery flow (OAuth reconnect for the
|
|
199
|
-
* surviving connection, or credential re-entry for an api-key one). The `reason`
|
|
200
|
-
* shapes the human copy but is never shown raw.
|
|
201
|
-
*/
|
|
202
|
-
type AuthNeededItem = {
|
|
203
|
-
kind: "auth-needed";
|
|
204
|
-
id: string;
|
|
205
|
-
turnId: string | null;
|
|
206
|
-
/** The connection's registrable domain, e.g. "linear.app". */
|
|
207
|
-
providerDomain: string;
|
|
208
|
-
/** The lapsed connection to reconnect, when the row survived. */
|
|
209
|
-
connectionId: string | null;
|
|
210
|
-
reason: "missing_connection" | "expired" | "insufficient_scope" | "refresh_failed" | null;
|
|
211
|
-
/** Scopes the provider now needs; may inform the copy, never shown as a raw label. */
|
|
212
|
-
scopes: string[];
|
|
213
|
-
/** The OAuth `resource` (RFC 8707) the reconnect should target, when supplied. */
|
|
214
|
-
resource: string | null;
|
|
215
|
-
/** The tool whose call triggered the reauth, for context. */
|
|
216
|
-
toolName: string | null;
|
|
217
|
-
/** A pre-minted authorization URL, when the broker already produced one. */
|
|
218
|
-
authorizationUrl: string | null;
|
|
219
|
-
occurredAt: string;
|
|
220
|
-
};
|
|
221
|
-
type TurnOutcome = "complete" | "failed" | "cancelled";
|
|
222
|
-
type TurnEndItem = {
|
|
223
|
-
kind: "turn-end";
|
|
224
|
-
id: string;
|
|
225
|
-
turnId: string | null;
|
|
226
|
-
outcome: TurnOutcome;
|
|
227
|
-
failureText: string | null;
|
|
228
|
-
occurredAt: string;
|
|
229
|
-
};
|
|
230
|
-
type TimelineItem = UserMessageItem | AgentMessageItem | ReasoningItem | ToolCallItem | WorkerItem | WorkerCompletionItem | SandboxItem | SessionStatusItem | GoalItem | NoticeItem | AuthNeededItem | MemoryItem | TurnEndItem;
|
|
231
|
-
/** Activity items cluster between chat messages (reasoning, tools, workers, sandbox, memory). */
|
|
232
|
-
type ActivityItem = ReasoningItem | ToolCallItem | WorkerItem | SandboxItem | MemoryItem;
|
|
233
|
-
type TimelineGroup = {
|
|
234
|
-
kind: "item";
|
|
235
|
-
item: TimelineItem;
|
|
236
|
-
} | {
|
|
237
|
-
kind: "activity";
|
|
238
|
-
id: string;
|
|
239
|
-
items: ActivityItem[];
|
|
240
|
-
outcome?: TurnOutcome;
|
|
241
|
-
failureText?: string;
|
|
242
|
-
} | {
|
|
243
|
-
kind: "turn";
|
|
244
|
-
id: string;
|
|
245
|
-
outcome: TurnOutcome;
|
|
246
|
-
failureText?: string;
|
|
247
|
-
startedAt: string;
|
|
248
|
-
endedAt: string;
|
|
249
|
-
groups: TimelineGroup[];
|
|
50
|
+
/** The sole human prompt queue: compact above Goal, Agents, and composer. */
|
|
51
|
+
type QueueSurfaceCommonProps = {
|
|
52
|
+
/** Focus the composer owned by this queue after checkout/removal. */
|
|
53
|
+
onRequestComposerFocus?: (() => void) | undefined;
|
|
250
54
|
};
|
|
55
|
+
type QueueSurfaceProps = (QueueSurfaceCommonProps & {
|
|
56
|
+
queue: UseTurnQueueResult;
|
|
57
|
+
composer: ComposerState;
|
|
58
|
+
readOnly?: false | undefined;
|
|
59
|
+
}) | (QueueSurfaceCommonProps & {
|
|
60
|
+
queue: UseTurnQueueResult;
|
|
61
|
+
composer?: undefined;
|
|
62
|
+
readOnly: true;
|
|
63
|
+
});
|
|
251
64
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
* Whether the session's most recent turn ended in credit exhaustion — the
|
|
255
|
-
* terminal credit state apps key their "add credits" affordances on. Derived
|
|
256
|
-
* from the LAST turn-end event (completed/failed/cancelled): a later turn that
|
|
257
|
-
* settles any other way (someone topped up and kept working) clears it.
|
|
258
|
-
*/
|
|
259
|
-
declare function creditExhaustedFromEvents(events: SessionEvent[]): boolean;
|
|
260
|
-
/** The latest session status carried in the event log, if any. */
|
|
261
|
-
declare function sessionStatusFromEvents(events: SessionEvent[]): SessionStatus$1 | null;
|
|
262
|
-
declare function groupTimeline(items: TimelineItem[]): TimelineGroup[];
|
|
263
|
-
/**
|
|
264
|
-
* Find a session id in orchestration tool arguments or output. Handles raw
|
|
265
|
-
* objects, JSON strings, and MCP tool results (`{ content: [{ type: "text",
|
|
266
|
-
* text: "{...}" }], structuredContent? }`).
|
|
267
|
-
*/
|
|
268
|
-
declare function extractSessionRef(value: unknown, depth?: number): string | null;
|
|
269
|
-
/**
|
|
270
|
-
* Readable label for a tool call ("session_create" -> "session create").
|
|
271
|
-
*
|
|
272
|
-
* MCP tools are namespaced `<serverId>__<toolName>` (see prefixedMcpToolName),
|
|
273
|
-
* and for catalog-imported servers that serverId is an opaque slug+hash
|
|
274
|
-
* ("mcp-integrations-sh-supabase-com-34ed9dcf1390-0i6tcf8"). De-slugging the
|
|
275
|
-
* whole thing leaked that id into the timeline; strip the server prefix and show
|
|
276
|
-
* just the tool ("list organizations"). Names without the `__` boundary (plain
|
|
277
|
-
* built-ins like "session_create") are unaffected.
|
|
278
|
-
*/
|
|
279
|
-
declare function toolDisplayName(name: string): string;
|
|
280
|
-
|
|
281
|
-
type ToolRendererProps = {
|
|
282
|
-
item: ToolCallItem;
|
|
283
|
-
};
|
|
284
|
-
type ToolRenderer = ComponentType<ToolRendererProps>;
|
|
285
|
-
/** A registry entry: which key it matches and the component that renders it. */
|
|
286
|
-
type ToolRegistryEntry = {
|
|
287
|
-
match: "rawType";
|
|
288
|
-
type: string;
|
|
289
|
-
render: ToolRenderer;
|
|
290
|
-
} | {
|
|
291
|
-
match: "name";
|
|
292
|
-
name: string;
|
|
293
|
-
render: ToolRenderer;
|
|
294
|
-
};
|
|
295
|
-
type ToolRegistry = {
|
|
296
|
-
/** Resolve the renderer for a call (never null — falls back to generic). */
|
|
297
|
-
resolve: (item: ToolCallItem) => ToolRenderer;
|
|
298
|
-
/** The generic fallback renderer. */
|
|
299
|
-
fallback: ToolRenderer;
|
|
300
|
-
};
|
|
301
|
-
type CreateToolRegistryOptions = {
|
|
302
|
-
/**
|
|
303
|
-
* Entries that take precedence over the built-ins. Earlier entries win, so a
|
|
304
|
-
* consumer can shadow a default renderer for the same key.
|
|
305
|
-
*/
|
|
306
|
-
entries?: ToolRegistryEntry[] | undefined;
|
|
307
|
-
/** Replace the generic fallback used for unmatched tools. */
|
|
308
|
-
fallback?: ToolRenderer | undefined;
|
|
309
|
-
};
|
|
310
|
-
/** The `raw.type` of a projected tool call, when the provider item carries one. */
|
|
311
|
-
declare function rawTypeOf(item: ToolCallItem): string | null;
|
|
312
|
-
/**
|
|
313
|
-
* Build a tool registry from a set of entries and a fallback. The returned
|
|
314
|
-
* registry resolves in priority order: `raw.type` entries first, then `name`
|
|
315
|
-
* entries, then the fallback. Consumer `entries` are consulted before the
|
|
316
|
-
* built-in `baseEntries`, so they shadow defaults cleanly.
|
|
317
|
-
*/
|
|
318
|
-
declare function createToolRegistry(baseEntries: ToolRegistryEntry[], baseFallback: ToolRenderer, options?: CreateToolRegistryOptions): ToolRegistry;
|
|
319
|
-
|
|
320
|
-
/** The built-in tool renderer registry: every first-party tool plus a fallback. */
|
|
321
|
-
declare const defaultToolRegistry: ToolRegistry;
|
|
322
|
-
/** Build a registry that extends the built-ins with consumer entries/fallback. */
|
|
323
|
-
declare function createDefaultToolRegistry(options?: Parameters<typeof createToolRegistry>[2]): ToolRegistry;
|
|
324
|
-
|
|
325
|
-
type ActivityRailProps = {
|
|
326
|
-
items: ActivityItem[];
|
|
327
|
-
/** Renderer registry for tool calls. Defaults to {@link defaultToolRegistry}. */
|
|
328
|
-
toolRegistry?: ToolRegistry | undefined;
|
|
329
|
-
/** Drill into a spawned worker session. */
|
|
330
|
-
onOpenSession?: ((sessionId: string) => void) | undefined;
|
|
331
|
-
/**
|
|
332
|
-
* Deep-link a memory row to its record in the host's memory pane. Opt-in: the
|
|
333
|
-
* library draws no "View in memory" affordance without a handler (the memory
|
|
334
|
-
* row is then non-interactive rich content). See {@link MessageTimelineProps}.
|
|
335
|
-
*/
|
|
336
|
-
onMemoryClick?: ((memoryId: string) => void) | undefined;
|
|
337
|
-
/** Drop the left rule + indent (used inside a folded turn summary). */
|
|
338
|
-
bare?: boolean | undefined;
|
|
339
|
-
className?: string | undefined;
|
|
340
|
-
};
|
|
341
|
-
declare function ActivityRail({ items, toolRegistry, onOpenSession, onMemoryClick, bare, className, }: ActivityRailProps): react_jsx_runtime.JSX.Element;
|
|
342
|
-
|
|
343
|
-
/**
|
|
344
|
-
* A subtle settle signal — see the CHIP DOCTRINE above. The closed tone set.
|
|
345
|
-
* `"interrupted"` is a calm neutral tone for cancelled items — no dot, same
|
|
346
|
-
* quiet weight as `"muted"`, but semantically distinct from metadata.
|
|
347
|
-
*/
|
|
348
|
-
type DisclosureChip = {
|
|
349
|
-
tone: "ok" | "bad" | "muted" | "interrupted";
|
|
350
|
-
text: string;
|
|
351
|
-
};
|
|
352
|
-
type ActivityDisclosureProps = {
|
|
353
|
-
icon: ReactNode;
|
|
354
|
-
/** Icon tint. Defaults to the muted foreground; renderers pass accent/failed. */
|
|
355
|
-
iconTone?: "accent" | "failed" | "running" | "muted" | undefined;
|
|
356
|
-
title: ReactNode;
|
|
357
|
-
/** Render the title in the mono face (commands, paths). */
|
|
358
|
-
titleMono?: boolean | undefined;
|
|
359
|
-
/** Shimmer the title while the tool is in-flight. */
|
|
360
|
-
running?: boolean | undefined;
|
|
361
|
-
/**
|
|
362
|
-
* Quiet single-line secondary text (truncated). It is detail-on-demand: hidden
|
|
363
|
-
* when a media preview is set, AND hidden once the row is expanded (the body
|
|
364
|
-
* then owns the detail), so a stat/path never appears twice at once.
|
|
365
|
-
*/
|
|
366
|
-
preview?: ReactNode | undefined;
|
|
367
|
-
/** A small inline media preview (a screenshot thumbnail) shown in place of `preview`. */
|
|
368
|
-
media?: ReactNode | undefined;
|
|
369
|
-
/** At most one quiet settle chip, right-aligned to the gutter. */
|
|
370
|
-
chip?: DisclosureChip | undefined;
|
|
371
|
-
/**
|
|
372
|
-
* When true the row carries the standard failure affordance: the icon is tinted
|
|
373
|
-
* red and a "failed" bad-chip appears in the right gutter (unless an explicit
|
|
374
|
-
* `chip` is already supplied — the caller's chip wins). Output is still visible
|
|
375
|
-
* on expand; this is a quiet status signal, not a blocking banner.
|
|
376
|
-
*
|
|
377
|
-
* Renderers should pass `failed={item.status === "failed"}` on their settled
|
|
378
|
-
* (non-running) paths so any tool with a failed status shows a consistent
|
|
379
|
-
* affordance without each renderer having to duplicate the logic.
|
|
380
|
-
*/
|
|
381
|
-
failed?: boolean | undefined;
|
|
382
|
-
/**
|
|
383
|
-
* When true the row carries a calm "interrupted" affordance: the icon stays
|
|
384
|
-
* muted (no red) and a quiet "interrupted" chip appears in the right gutter
|
|
385
|
-
* (unless an explicit `chip` is already supplied — the caller's chip wins).
|
|
386
|
-
* This is the cancelled-status analogue of `failed`, but deliberately calm
|
|
387
|
-
* and neutral — it is NOT an error; the user chose to stop.
|
|
388
|
-
*
|
|
389
|
-
* Renderers should pass `cancelled={item.status === "cancelled"}` so any
|
|
390
|
-
* in-flight item that was interrupted on turn.cancelled reads consistently.
|
|
391
|
-
* `cancelled` is ignored when `failed` is also true (failure takes precedence).
|
|
392
|
-
*/
|
|
393
|
-
cancelled?: boolean | undefined;
|
|
394
|
-
/** When false the row is a static line (no expand affordance). */
|
|
395
|
-
expandable?: boolean | undefined;
|
|
396
|
-
children?: ReactNode | undefined;
|
|
397
|
-
};
|
|
398
|
-
/**
|
|
399
|
-
* The one disclosure row shape every activity row reuses (tool calls, reasoning,
|
|
400
|
-
* sandbox ops): a chevron, a tinted icon, a title, an optional muted preview or
|
|
401
|
-
* inline media, and at most one right-gutter settle chip. Compact by default;
|
|
402
|
-
* the body mounts only when expanded.
|
|
403
|
-
*/
|
|
404
|
-
declare function ActivityDisclosure({ icon, iconTone: iconToneProp, title, titleMono, running, preview, media, chip: chipProp, failed, cancelled, expandable, children, }: ActivityDisclosureProps): react_jsx_runtime.JSX.Element;
|
|
405
|
-
declare function TermBlock({ command, workdir, output, live, tailLines, failed, }: {
|
|
406
|
-
/**
|
|
407
|
-
* The command shown in the prompt header. Pass `null` when the row title
|
|
408
|
-
* already carries it (e.g. an exec row titled `$ cmd`): the header then drops
|
|
409
|
-
* the command — and the whole prompt line if there is no workdir either — so
|
|
410
|
-
* the command never reads twice, stacked, above the output.
|
|
411
|
-
*/
|
|
412
|
-
command: string | null;
|
|
413
|
-
workdir?: string | null | undefined;
|
|
414
|
-
/** The FULL output. TermBlock owns the tail/full slicing internally. */
|
|
415
|
-
output: string;
|
|
416
|
-
live?: boolean | undefined;
|
|
417
|
-
/** A non-zero exit / failed call — tints the left accent red (the one hue). */
|
|
418
|
-
failed?: boolean | undefined;
|
|
419
|
-
/**
|
|
420
|
-
* When the output exceeds the tail window, only the last `tailLines` are shown
|
|
421
|
-
* with a "show full output" toggle. The component holds the full text, so the
|
|
422
|
-
* toggle reveals the rest (never a dead affordance). Defaults to 12.
|
|
423
|
-
*/
|
|
424
|
-
tailLines?: number | undefined;
|
|
425
|
-
}): react_jsx_runtime.JSX.Element;
|
|
426
|
-
declare function PayloadBlock({ label, value, failed, }: {
|
|
427
|
-
label: string;
|
|
428
|
-
value: unknown;
|
|
429
|
-
failed?: boolean | undefined;
|
|
430
|
-
}): react_jsx_runtime.JSX.Element | null;
|
|
431
|
-
/** A quiet inline note inside an expanded body (lost output, empty frame, …). */
|
|
432
|
-
declare function BodyNote({ children, tone, }: {
|
|
433
|
-
children: ReactNode;
|
|
434
|
-
tone?: "error" | "muted" | undefined;
|
|
435
|
-
}): react_jsx_runtime.JSX.Element;
|
|
436
|
-
/**
|
|
437
|
-
* A loading screenshot placeholder. A faint camera glyph over a shimmering box,
|
|
438
|
-
* so a still frame of the running state reads unambiguously as "capturing" — not
|
|
439
|
-
* a broken thumbnail.
|
|
440
|
-
*/
|
|
441
|
-
declare function MediaSkeleton(): react_jsx_runtime.JSX.Element;
|
|
442
|
-
/** A standardized "tool ran, produced no image" placeholder in the media slot. */
|
|
443
|
-
declare function MediaEmpty(): react_jsx_runtime.JSX.Element;
|
|
444
|
-
/**
|
|
445
|
-
* A small inline screenshot thumbnail that opens the app lightbox on click.
|
|
446
|
-
*
|
|
447
|
-
* Requires a `LightboxProvider` ancestor for the click-to-expand affordance.
|
|
448
|
-
* Outside one it degrades to a plain, non-interactive image — never a dead
|
|
449
|
-
* "Expand" button that announces an action it cannot perform.
|
|
450
|
-
*/
|
|
451
|
-
declare function Thumbnail({ src, caption, alt, }: {
|
|
452
|
-
src: string;
|
|
453
|
-
caption?: string | undefined;
|
|
454
|
-
alt?: string;
|
|
455
|
-
}): react_jsx_runtime.JSX.Element;
|
|
456
|
-
/**
|
|
457
|
-
* The expanded screenshot inside a tool body: a contained, clickable preview
|
|
458
|
-
* (opens the lightbox) with a quiet caption. Constrained height + object-contain
|
|
459
|
-
* so it never breaks the row layout. Like {@link Thumbnail}, it degrades to a
|
|
460
|
-
* plain image outside a `LightboxProvider`.
|
|
461
|
-
*/
|
|
462
|
-
declare function ScreenshotFigure({ src, caption, alt, }: {
|
|
463
|
-
src: string;
|
|
464
|
-
caption?: string | undefined;
|
|
465
|
-
alt?: string;
|
|
466
|
-
}): react_jsx_runtime.JSX.Element;
|
|
467
|
-
|
|
468
|
-
type LightboxController = {
|
|
469
|
-
open: (src: string, caption?: string) => void;
|
|
470
|
-
};
|
|
471
|
-
/** Open the app-level screenshot lightbox. No-op outside a `LightboxProvider`. */
|
|
472
|
-
declare function useLightbox(): LightboxController;
|
|
473
|
-
/**
|
|
474
|
-
* The lightbox controller when one is mounted, or `null` outside a
|
|
475
|
-
* `LightboxProvider`. Lets a media primitive degrade to a non-interactive image
|
|
476
|
-
* (rather than a dead "Expand" button that announces an action it cannot do).
|
|
477
|
-
*/
|
|
478
|
-
declare function useLightboxOptional(): LightboxController | null;
|
|
479
|
-
/**
|
|
480
|
-
* The app-level screenshot lightbox. Render once near the timeline; renderers
|
|
481
|
-
* call `useLightbox().open(src)`.
|
|
482
|
-
*
|
|
483
|
-
* Idempotent by design: when an ancestor `LightboxProvider` already exists (e.g.
|
|
484
|
-
* a `MessageTimeline` mounted inside an app that already wraps its shell), this
|
|
485
|
-
* one becomes a pass-through and does NOT mount a second focus-trapping Dialog.
|
|
486
|
-
* That keeps `MessageTimeline` self-sufficient (it owns its own provider) while
|
|
487
|
-
* composing cleanly when nested.
|
|
488
|
-
*/
|
|
489
|
-
declare function LightboxProvider({ children }: {
|
|
490
|
-
children: ReactNode;
|
|
491
|
-
}): react_jsx_runtime.JSX.Element;
|
|
492
|
-
|
|
493
|
-
/**
|
|
494
|
-
* Seed the initial open state of every timeline collapsible below this node.
|
|
495
|
-
* Intended for screenshot/test instrumentation only; absent by default.
|
|
496
|
-
*/
|
|
497
|
-
declare function DisclosureDefaultsProvider({ defaultOpen, children, }: {
|
|
498
|
-
defaultOpen: boolean;
|
|
499
|
-
children: ReactNode;
|
|
500
|
-
}): react_jsx_runtime.JSX.Element;
|
|
501
|
-
|
|
502
|
-
type TurnSummaryProps = {
|
|
503
|
-
/** The activity items in the turn (used only to compute the facet counts). */
|
|
504
|
-
items: ActivityItem[];
|
|
505
|
-
/**
|
|
506
|
-
* The settled verdict — or absent for a completed CLUSTER of a still-running
|
|
507
|
-
* turn, which folds neutrally: no verdict glyph (the turn has none yet), a
|
|
508
|
-
* quiet pulse dot in its place so alignment and the running feel both hold.
|
|
509
|
-
*/
|
|
510
|
-
outcome?: TurnOutcome | undefined;
|
|
511
|
-
/** A short failure reason shown inline on a failed chip (never hidden). */
|
|
512
|
-
failureText?: string | undefined;
|
|
513
|
-
/** Elapsed turn duration; shown as a trailing facet when at least 1s. */
|
|
514
|
-
durationMs?: number | undefined;
|
|
515
|
-
/** Start expanded. */
|
|
516
|
-
defaultOpen?: boolean | undefined;
|
|
517
|
-
/**
|
|
518
|
-
* A nested fold — a cluster or sub-turn INSIDE an already-expanded turn. It
|
|
519
|
-
* drops the bordered/filled chip and renders as a plain disclosure node on the
|
|
520
|
-
* parent's rail (chevron + glyph + facets), so expanding a turn reveals a thread
|
|
521
|
-
* of nodes, never a stack of boxes-in-boxes. The top-level fold stays a chip.
|
|
522
|
-
*/
|
|
523
|
-
bare?: boolean | undefined;
|
|
524
|
-
/** The rendered activity rail revealed on expand. */
|
|
525
|
-
children: React.ReactNode;
|
|
526
|
-
};
|
|
527
|
-
declare function TurnSummary({ items, outcome, failureText, durationMs, defaultOpen, bare, children, }: TurnSummaryProps): react_jsx_runtime.JSX.Element;
|
|
528
|
-
|
|
529
|
-
/** Recover the exit code from a sandbox exec banner (`Process exited with code N`). */
|
|
530
|
-
declare function sandboxCommandExitCode(out: unknown): number | null;
|
|
531
|
-
/**
|
|
532
|
-
* Recover the numeric exec-session id the sandbox embeds for a STILL-RUNNING
|
|
533
|
-
* (backgrounded) process (`Process running with session ID N`). A finished
|
|
534
|
-
* command emits `Process exited with code N` instead, which yields `null`.
|
|
535
|
-
*/
|
|
536
|
-
declare function parseExecBannerSessionId(out: unknown): number | null;
|
|
537
|
-
/** Strip the exec banner (`Chunk ID ...\n...\nOutput:\n`) down to the command's stdout. */
|
|
538
|
-
declare function stripExecBanner(out: unknown): string;
|
|
539
|
-
/** The sandbox clamped the output (token/line truncation markers in the banner). */
|
|
540
|
-
declare function execTruncated(out: unknown): boolean;
|
|
541
|
-
/** A `write_stdin` whose target PTY vanished (`write_stdin failed: session not found: N`). */
|
|
542
|
-
declare function isExecSessionLostBanner(out: unknown): boolean;
|
|
543
|
-
/** True when the exec stdout looks binary/garbled (a NUL byte or ELF magic). */
|
|
544
|
-
declare function looksBinary(text: string): boolean;
|
|
545
|
-
/**
|
|
546
|
-
* Render unprintable control characters as caret notation (0x03 -> `^C`) so a
|
|
547
|
-
* `write_stdin` keystroke payload reads cleanly in the row title.
|
|
548
|
-
*/
|
|
549
|
-
declare function controlCaret(printable: string): string;
|
|
550
|
-
/** One operation inside an `apply_patch_call` (a V4A file edit). */
|
|
551
|
-
type ApplyPatchOperation = {
|
|
552
|
-
/**
|
|
553
|
-
* The V4A op kind. The three canonical values are `create_file`,
|
|
554
|
-
* `update_file`, and `delete_file`; the open `string` tail tolerates a
|
|
555
|
-
* forward-compatible/unknown op kind from the provider without a type error
|
|
556
|
-
* (it falls through to the "Edited" treatment).
|
|
557
|
-
*/
|
|
558
|
-
type: "create_file" | "update_file" | "delete_file" | (string & {});
|
|
559
|
-
path: string;
|
|
560
|
-
/** Rename target -- when present the op is a move/rename. */
|
|
561
|
-
moveTo?: string | null | undefined;
|
|
562
|
-
/** The V4A hunk string (`@@ ...` lines with `+`/`-`/context prefixes). */
|
|
563
|
-
diff?: string | undefined;
|
|
564
|
-
};
|
|
565
|
-
/**
|
|
566
|
-
* Parse a single V4A `apply_patch` operation into the SDK's `GitFileDiff` shape
|
|
567
|
-
* so it can flow into the SAME `DiffView` / `PierreDiff` the Files tab uses.
|
|
568
|
-
* Throws on a hunk string it cannot structure (no `@@` anchor on an update); the
|
|
569
|
-
* renderer catches and falls back to a raw-patch view.
|
|
570
|
-
*/
|
|
571
|
-
declare function v4aToGitFileDiff(op: ApplyPatchOperation): GitFileDiff;
|
|
572
|
-
/**
|
|
573
|
-
* Extract the `apply_patch` operations from a provider-native tool item's `raw`
|
|
574
|
-
* payload, normalizing the two wire shapes (`raw.operations[]` for a multi-file
|
|
575
|
-
* patch, `raw.operation` for a single op). The single owner of this shape so the
|
|
576
|
-
* renderer and the turn-summary facet counter never drift.
|
|
577
|
-
*/
|
|
578
|
-
declare function applyPatchOps(raw: unknown): ApplyPatchOperation[];
|
|
579
|
-
/**
|
|
580
|
-
* True when a tool item is an `apply_patch_call` — by its provider-native
|
|
581
|
-
* `raw.type` (the live-wire source of truth) or by tool `name` (first-party
|
|
582
|
-
* replays that omit `raw`). Centralizes the rawType-or-name check.
|
|
583
|
-
*/
|
|
584
|
-
declare function isApplyPatch(item: {
|
|
585
|
-
name: string;
|
|
586
|
-
raw: unknown;
|
|
587
|
-
}): boolean;
|
|
588
|
-
/** Deep-redact secret-looking values so arguments never leak a key into the UI. */
|
|
589
|
-
declare function redactSecrets(value: unknown): unknown;
|
|
590
|
-
/** Parse tool arguments that may arrive as a JSON string or an object. */
|
|
591
|
-
declare function parseToolArgs(args: unknown): Record<string, unknown>;
|
|
592
|
-
/** The last non-empty line of a string -- the compact "what happened" peek. */
|
|
593
|
-
declare function tailPeek(text: string): string;
|
|
594
|
-
/**
|
|
595
|
-
* Unwrap an MCP tool result (`{ content: [{ type: "text", text }], isError? }`)
|
|
596
|
-
* into a flat `{ text, isError }`. Non-MCP outputs pass through as their string
|
|
597
|
-
* form.
|
|
598
|
-
*/
|
|
599
|
-
declare function unwrapMcpOutput(output: unknown): {
|
|
600
|
-
text: string;
|
|
601
|
-
isError: boolean;
|
|
602
|
-
};
|
|
603
|
-
|
|
604
|
-
type SessionEventsConnectionState = StreamConnectionState | "idle" | "ended" | "error";
|
|
605
|
-
type UseSessionEventsOptions = ClientOverride & {
|
|
606
|
-
/** Resume after this sequence (exclusive). Nonzero keeps full replay/resume semantics. */
|
|
607
|
-
after?: number | undefined;
|
|
608
|
-
/** Load a bounded tail by default, or opt back into full replay from `after`. */
|
|
609
|
-
replay?: "windowed" | "full" | undefined;
|
|
610
|
-
/** Pause the stream without unmounting (e.g. hidden tab). Defaults to true. */
|
|
611
|
-
enabled?: boolean | undefined;
|
|
612
|
-
};
|
|
613
|
-
type UseSessionEventsResult = {
|
|
614
|
-
/** Replayed + live events, ordered by sequence, no gaps, no duplicates. */
|
|
615
|
-
events: SessionEvent[];
|
|
616
|
-
/** Projected, renderable timeline (memoized over `events`). */
|
|
617
|
-
timeline: TimelineItem[];
|
|
618
|
-
/** Latest session status observed in the event log, if any. */
|
|
619
|
-
sessionStatus: SessionStatus$1 | null;
|
|
620
|
-
connectionState: SessionEventsConnectionState;
|
|
621
|
-
/** Highest sequence seen so far (0 before the first event). */
|
|
622
|
-
lastSequence: number;
|
|
623
|
-
/** True until the initial tail window has been applied (windowed mode). */
|
|
624
|
-
initialLoading: boolean;
|
|
625
|
-
/** Whether older durable events are available before the current window. */
|
|
626
|
-
hasOlder: boolean;
|
|
627
|
-
/** True while an older window is being fetched. */
|
|
628
|
-
loadingOlder: boolean;
|
|
629
|
-
/** Prepend an older density-bounded window; resolves true when more remain. */
|
|
630
|
-
loadOlder: () => Promise<boolean>;
|
|
631
|
-
error: Error | null;
|
|
632
|
-
};
|
|
633
|
-
/**
|
|
634
|
-
* Live-stream a session's event log with replay-by-sequence, reconnect, and
|
|
635
|
-
* batched React updates. Fresh loads default to a bounded tail window; pass
|
|
636
|
-
* `replay: "full"` or a nonzero `after` for the previous full replay path.
|
|
637
|
-
*/
|
|
638
|
-
declare function useSessionEvents(sessionId: string | null | undefined, options?: UseSessionEventsOptions): UseSessionEventsResult;
|
|
639
|
-
|
|
640
|
-
type ComposerSendExtras = Omit<SendMessageInput, "text" | "clientEventId">;
|
|
641
|
-
/**
|
|
642
|
-
* Enter appends a prompt; Cmd/Ctrl+Enter steers it to the head and supersedes
|
|
643
|
-
* the current inference.
|
|
644
|
-
*/
|
|
645
|
-
type ComposerMode = "queue" | "steer";
|
|
646
|
-
type UseComposerOptions = ClientOverride & {
|
|
647
|
-
/** Called with the accepted text after a successful send. */
|
|
648
|
-
onSent?: ((text: string) => void) | undefined;
|
|
649
|
-
/**
|
|
650
|
-
* Extra message fields (resources, tools, model, reasoningEffort) merged
|
|
651
|
-
* into every send. A function is evaluated at send time so it can read the
|
|
652
|
-
* surrounding UI state (attachment pickers, model selectors, ...).
|
|
653
|
-
*/
|
|
654
|
-
sendExtras?: ComposerSendExtras | (() => ComposerSendExtras) | undefined;
|
|
655
|
-
};
|
|
656
|
-
type ComposerState = {
|
|
657
|
-
value: string;
|
|
658
|
-
setValue: (value: string) => void;
|
|
659
|
-
/** Send the draft (or explicit text). Queue is the default; steer is explicit. */
|
|
660
|
-
send: (text?: string, mode?: ComposerMode) => Promise<boolean>;
|
|
661
|
-
sending: boolean;
|
|
662
|
-
canSend: boolean;
|
|
663
|
-
/** Pause the session without deleting its prompt queue. */
|
|
664
|
-
pause: (reason?: string) => Promise<void>;
|
|
665
|
-
pausing: boolean;
|
|
666
|
-
resume: (reason?: string) => Promise<void>;
|
|
667
|
-
resuming: boolean;
|
|
668
|
-
error: Error | null;
|
|
669
|
-
clearError: () => void;
|
|
670
|
-
};
|
|
671
|
-
/**
|
|
672
|
-
* Draft + send + Pause/Resume state for the chat composer — the only
|
|
673
|
-
* human-to-agent input surface. The draft survives a failed send (nothing is
|
|
674
|
-
* more hostile than losing a typed message); each send carries a generated
|
|
675
|
-
* `clientEventId` so retries stay idempotent server-side.
|
|
676
|
-
*/
|
|
677
|
-
declare function useComposer(sessionId: string | null | undefined, options?: UseComposerOptions): ComposerState;
|
|
678
|
-
/**
|
|
679
|
-
* Default text for a file-only message (attachment(s) present, no typed draft).
|
|
680
|
-
* Kept non-empty so the wire contract (`text: z.string().min(1)`) and the
|
|
681
|
-
* worker's non-whitespace guard accept it; the attached files still ride in
|
|
682
|
-
* `resources`. Exported for tests.
|
|
683
|
-
*/
|
|
684
|
-
declare const FILE_ONLY_MESSAGE_TEXT = "(see attached files)";
|
|
685
|
-
/**
|
|
686
|
-
* Merge the draft text + idempotency key with caller-provided extras. The
|
|
687
|
-
* text and clientEventId always win over extras. Exported for tests.
|
|
688
|
-
*/
|
|
689
|
-
declare function composeSendInput(text: string, clientEventId: string, extras: ComposerSendExtras | (() => ComposerSendExtras) | undefined): SendMessageInput;
|
|
690
|
-
/** Submit on plain Enter; Shift+Enter inserts a newline. Exported for tests. */
|
|
691
|
-
declare function shouldSubmitOnKey(event: {
|
|
692
|
-
key: string;
|
|
693
|
-
shiftKey: boolean;
|
|
694
|
-
metaKey?: boolean;
|
|
695
|
-
ctrlKey?: boolean;
|
|
696
|
-
nativeEvent?: {
|
|
697
|
-
isComposing?: boolean;
|
|
698
|
-
};
|
|
699
|
-
}): boolean;
|
|
700
|
-
|
|
701
|
-
type UseFileAttachmentsOptions = ClientOverride & {
|
|
702
|
-
/**
|
|
703
|
-
* Only files matching this predicate are accepted by {@link
|
|
704
|
-
* UseFileAttachmentsResult.addFromPaste} (the clipboard path). Defaults to
|
|
705
|
-
* `image/*` — the console's historical paste filter. {@link
|
|
706
|
-
* UseFileAttachmentsResult.addFiles} (the explicit picker / drop path)
|
|
707
|
-
* bypasses it.
|
|
708
|
-
*/
|
|
709
|
-
pasteFilter?: ((file: File) => boolean) | undefined;
|
|
710
|
-
};
|
|
711
|
-
type FileAttachment = {
|
|
712
|
-
id: string;
|
|
713
|
-
name: string;
|
|
714
|
-
contentType: string;
|
|
715
|
-
sizeBytes: number;
|
|
716
|
-
status: "uploading" | "ready" | "failed";
|
|
717
|
-
/** The SDK `FileAsset` once the upload finishes. */
|
|
718
|
-
file?: FileAsset | undefined;
|
|
719
|
-
/** Object-URL for an inline preview; minted for `image/*` files only. */
|
|
720
|
-
previewUrl?: string | undefined;
|
|
721
|
-
error?: string | undefined;
|
|
722
|
-
};
|
|
723
|
-
type UseFileAttachmentsResult = {
|
|
724
|
-
attachments: FileAttachment[];
|
|
725
|
-
/**
|
|
726
|
-
* `FileResourceRef[]` for every attachment that finished uploading — feed
|
|
727
|
-
* straight into `useComposer`'s `sendExtras.resources`.
|
|
728
|
-
*/
|
|
729
|
-
readyResources: FileResourceRef[];
|
|
730
|
-
/** True while any attachment is still uploading (drives the send-gate). */
|
|
731
|
-
uploading: boolean;
|
|
732
|
-
/** Explicit picker / drop path — uploads every file, no filter. */
|
|
733
|
-
addFiles: (files: Iterable<File>) => void;
|
|
734
|
-
/** Clipboard path — applies `pasteFilter` (default `image/*`) then uploads. */
|
|
735
|
-
addFromPaste: (event: {
|
|
736
|
-
clipboardData: DataTransfer | null;
|
|
737
|
-
}) => void;
|
|
738
|
-
/**
|
|
739
|
-
* Re-run the upload for a `failed` attachment, in place (same id, same
|
|
740
|
-
* source file). No-op for an id that isn't a known failed upload.
|
|
741
|
-
*/
|
|
742
|
-
retry: (id: string) => void;
|
|
743
|
-
/** Remove one attachment; revokes its object-URL. */
|
|
744
|
-
remove: (id: string) => void;
|
|
745
|
-
/** Remove all; revokes every object-URL. Call from `useComposer`'s `onSent`. */
|
|
746
|
-
clear: () => void;
|
|
747
|
-
};
|
|
748
|
-
/**
|
|
749
|
-
* Upload-and-track state for files attached to the next message. Owns the
|
|
750
|
-
* full client-side upload layer: a per-file `uploading | ready | failed`
|
|
751
|
-
* status machine driven by the SDK's `client.uploadFile`, object-URL image
|
|
752
|
-
* previews with create/revoke lifecycle, the `image/*` clipboard paste filter,
|
|
753
|
-
* and a `FileResourceRef[]` projection that drops straight into a message's
|
|
754
|
-
* `resources`. Workspace-scoped, so it resolves both client and workspace from
|
|
755
|
-
* the {@link OpenGeniProvider} (or a per-call `{ client, workspaceId }`).
|
|
756
|
-
*/
|
|
757
|
-
declare function useFileAttachments(options?: UseFileAttachmentsOptions): UseFileAttachmentsResult;
|
|
65
|
+
/** The sole human prompt queue: compact above Goal, Agents, and composer. */
|
|
66
|
+
declare const QueueSurface: (props: QueueSurfaceProps) => react_jsx_runtime.JSX.Element | null;
|
|
758
67
|
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
/**
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
68
|
+
type ChatComposerProps = {
|
|
69
|
+
composer: ComposerState;
|
|
70
|
+
/** Canonical workstream control, separate from lifecycle status. */
|
|
71
|
+
effectiveControl?: EffectiveSessionControl | null | undefined;
|
|
72
|
+
/** Waiting prompts already ahead of a normal Send. */
|
|
73
|
+
queuedAheadCount?: number | undefined;
|
|
74
|
+
/** Whether broader Workspace Resume is authorized for this viewer. */
|
|
75
|
+
canControlWorkspace?: boolean | undefined;
|
|
76
|
+
/** Optional host routes used to navigate from effective Pause blockers. */
|
|
77
|
+
controlLinks?: ComposerControlLinks | undefined;
|
|
78
|
+
placeholder?: string | undefined;
|
|
79
|
+
disabled?: boolean | undefined;
|
|
80
|
+
autoFocus?: boolean | undefined;
|
|
81
|
+
/** Replaces the default keyboard hint under the field. */
|
|
82
|
+
hint?: string | undefined;
|
|
83
|
+
/** App controls in the footer row, replacing the hint. */
|
|
84
|
+
controlsStart?: ReactNode | undefined;
|
|
85
|
+
/** Provider-neutral speech capability. Provider configuration stays in workspace settings. */
|
|
86
|
+
transcription?: ComposerTranscriptionControlProps | undefined;
|
|
87
|
+
/** Content rendered above the textarea, inside the field chrome. */
|
|
88
|
+
header?: ReactNode | undefined;
|
|
89
|
+
/** Paste hook composed with the attachment paste path. */
|
|
90
|
+
onPaste?: ((event: ClipboardEvent<HTMLTextAreaElement>) => void) | undefined;
|
|
91
|
+
/** Opt-in file attachment state, typically from `useFileAttachments`. */
|
|
92
|
+
attachments?: UseFileAttachmentsResult | undefined;
|
|
93
|
+
/** Opt-in model picker choices. */
|
|
94
|
+
models?: ClientModel[] | undefined;
|
|
95
|
+
selectedModel?: string | undefined;
|
|
96
|
+
onSelectModel?: ((modelId: string) => void) | undefined;
|
|
97
|
+
className?: string | undefined;
|
|
98
|
+
commands?: readonly SlashCommand[] | undefined;
|
|
99
|
+
commandContext?: SlashCommandContext | undefined;
|
|
100
|
+
onClearView?: (() => void) | undefined;
|
|
101
|
+
/** Partial overrides for all composer-owned visible and accessible copy. */
|
|
102
|
+
messages?: Partial<ChatComposerMessages> | undefined;
|
|
781
103
|
};
|
|
782
104
|
/**
|
|
783
|
-
*
|
|
784
|
-
*
|
|
105
|
+
* Batteries-included chat composer. This preset is assembled exclusively from
|
|
106
|
+
* the public controller and compound primitives exported by the composer
|
|
107
|
+
* subpath, so custom and default layouts share one behavioral implementation.
|
|
785
108
|
*/
|
|
786
|
-
declare function
|
|
109
|
+
declare function ChatComposer({ composer, effectiveControl, queuedAheadCount, canControlWorkspace, controlLinks, placeholder, disabled, autoFocus, hint, controlsStart, transcription, header, onPaste, attachments, models, selectedModel, onSelectModel, className, commands, commandContext, onClearView, messages, }: ChatComposerProps): react_jsx_runtime.JSX.Element;
|
|
787
110
|
|
|
788
111
|
/** Event types that change the session goal (set/updated/completed/paused/...). */
|
|
789
112
|
declare function isGoalEvent(event: Pick<SessionEvent, "type">): boolean;
|
|
@@ -822,27 +145,6 @@ type UseGoalResult = {
|
|
|
822
145
|
*/
|
|
823
146
|
declare function useGoal(sessionId: string | null | undefined, options?: UseGoalOptions): UseGoalResult;
|
|
824
147
|
|
|
825
|
-
type UseSessionControlOptions = ClientOverride;
|
|
826
|
-
type UseSessionControlResult = {
|
|
827
|
-
pause: (reason?: string) => Promise<SessionEvent | null>;
|
|
828
|
-
resume: (reason?: string) => Promise<SessionEvent | null>;
|
|
829
|
-
controlling: boolean;
|
|
830
|
-
/** Approve a pending `requires_action` approval. */
|
|
831
|
-
approve: (approvalId: string, message?: string) => Promise<SessionEvent | null>;
|
|
832
|
-
/** Reject a pending `requires_action` approval. */
|
|
833
|
-
reject: (approvalId: string, message?: string) => Promise<SessionEvent | null>;
|
|
834
|
-
/** True while an approval decision is in flight. */
|
|
835
|
-
responding: boolean;
|
|
836
|
-
error: Error | null;
|
|
837
|
-
clearError: () => void;
|
|
838
|
-
};
|
|
839
|
-
/**
|
|
840
|
-
* Session pause/resume and approval decisions. Pair with
|
|
841
|
-
* `useSessionEvents` (for `session.requiresAction` payloads carrying the
|
|
842
|
-
* `approvalId`) to render an approval bar.
|
|
843
|
-
*/
|
|
844
|
-
declare function useSessionControl(sessionId: string | null | undefined, options?: UseSessionControlOptions): UseSessionControlResult;
|
|
845
|
-
|
|
846
148
|
type UseScheduledTasksOptions = ClientOverride & {
|
|
847
149
|
limit?: number | undefined;
|
|
848
150
|
pollIntervalMs?: number | undefined;
|
|
@@ -874,6 +176,8 @@ type UseWorkspaceSessionsResult = {
|
|
|
874
176
|
sessions: Session[];
|
|
875
177
|
/** The complete personal pinned section, also present in `sessions`. */
|
|
876
178
|
pinned: Session[];
|
|
179
|
+
/** True when the server omitted older pins from its bounded pinned section. */
|
|
180
|
+
pinnedTruncated: boolean;
|
|
877
181
|
nextCursor: string | null;
|
|
878
182
|
loading: boolean;
|
|
879
183
|
error: Error | null;
|
|
@@ -1396,6 +700,30 @@ declare function useSandboxTerminal(sessionId: string | null | undefined, option
|
|
|
1396
700
|
|
|
1397
701
|
/** The git-status overlay a file row may carry (tints modified files in the tree). */
|
|
1398
702
|
type FileTreeStatus = "added" | "modified" | "deleted" | "renamed" | "untracked";
|
|
703
|
+
type CapturedFileUnavailableReason = "not-captured" | "too-large" | "content-missing";
|
|
704
|
+
/** A cold capture can index a path without retaining its contents. Components
|
|
705
|
+
* use this typed result to offer an explicit wake action instead of silently
|
|
706
|
+
* turning passive review into a live sandbox read. */
|
|
707
|
+
declare class CapturedFileUnavailableError extends Error {
|
|
708
|
+
readonly path: string;
|
|
709
|
+
readonly reason: CapturedFileUnavailableReason;
|
|
710
|
+
readonly code = "captured_file_unavailable";
|
|
711
|
+
constructor(path: string, reason: CapturedFileUnavailableReason);
|
|
712
|
+
}
|
|
713
|
+
declare class FileWriteConflictError extends Error {
|
|
714
|
+
readonly path: string;
|
|
715
|
+
readonly expectedContent: string;
|
|
716
|
+
readonly liveContent: string;
|
|
717
|
+
readonly code = "file_write_conflict";
|
|
718
|
+
constructor(path: string, expectedContent: string, liveContent: string);
|
|
719
|
+
}
|
|
720
|
+
type SandboxWriteFileOptions = {
|
|
721
|
+
/** Exact text loaded into the editor. The live file is re-read before write;
|
|
722
|
+
* divergence fails closed with FileWriteConflictError. */
|
|
723
|
+
expectedContent?: string | undefined;
|
|
724
|
+
/** Deliberately bypass the expected-content guard after a visible conflict. */
|
|
725
|
+
force?: boolean | undefined;
|
|
726
|
+
};
|
|
1399
727
|
/** A node in the Pierre file tree. `children === undefined` ⇒ an unexpanded dir
|
|
1400
728
|
* (lazy treeMode); `children: []` ⇒ an expanded-but-empty dir. */
|
|
1401
729
|
type FileTreeNode = {
|
|
@@ -1424,11 +752,10 @@ type UseSandboxFilesOptions = ClientOverride & {
|
|
|
1424
752
|
* (with no `fs.changed` event) never re-lists. Passing liveness re-lists when
|
|
1425
753
|
* the box first becomes warm, so the tree populates as soon as the box is up. */
|
|
1426
754
|
liveness?: string | undefined;
|
|
1427
|
-
/** The latest turn-end workspace capture (from `useWorkspaceCapture`).
|
|
1428
|
-
*
|
|
1429
|
-
*
|
|
1430
|
-
*
|
|
1431
|
-
* is merged in place — no remount, no flash (dossier §10.4 / §12-A1/D1). */
|
|
755
|
+
/** The latest turn-end workspace capture (from `useWorkspaceCapture`). The tree
|
|
756
|
+
* paints immediately from this durable index, then a warm box reconciles live
|
|
757
|
+
* in place. If that live read fails, the capture remains a truthful read-only
|
|
758
|
+
* fallback instead of turning into an empty error surface. */
|
|
1432
759
|
capture?: WorkspaceCaptureManifest | null | undefined;
|
|
1433
760
|
/** Called when an OPTIMISTIC mutation is reverted because its background
|
|
1434
761
|
* Channel-A op failed (e.g. a 409 rename collision). The host wires this to a
|
|
@@ -1444,11 +771,11 @@ type UseSandboxFilesResult = {
|
|
|
1444
771
|
* spinner on these nodes so a 2-3s Channel-A list never looks frozen. */
|
|
1445
772
|
expandingPaths: Set<string>;
|
|
1446
773
|
/** Read a file for the preview pane (text or base64-for-binary, size-capped). */
|
|
1447
|
-
readFile: (path: string) => Promise<FsReadResponse>;
|
|
774
|
+
readFile: (path: string, options?: OpenGeniRequestOptions) => Promise<FsReadResponse>;
|
|
1448
775
|
/** Write a file (overwrite, last-writer-wins) — the editor save path.
|
|
1449
776
|
* Optimistic: a brand-new file is spliced into the tree immediately and the
|
|
1450
777
|
* Channel-A write runs in the background; on failure the splice is reverted. */
|
|
1451
|
-
writeFile: (path: string, content: string) => Promise<FsWriteResponse>;
|
|
778
|
+
writeFile: (path: string, content: string, options?: SandboxWriteFileOptions) => Promise<FsWriteResponse>;
|
|
1452
779
|
/** Create a new empty file (refuses to clobber an existing path: overwrite=false). */
|
|
1453
780
|
createFile: (path: string) => Promise<void>;
|
|
1454
781
|
/** Create a directory (recursive by default). */
|
|
@@ -1484,6 +811,9 @@ type UseSandboxGitOptions = ClientOverride & {
|
|
|
1484
811
|
events?: SessionEvent[] | undefined;
|
|
1485
812
|
/** Repo root within the workspace (multi-repo). Default: workspace root. */
|
|
1486
813
|
repoPath?: string | undefined;
|
|
814
|
+
/** All repository roots in the workspace. When supplied, status and diff are
|
|
815
|
+
* aggregated into one workspace-wide result and paths are workspace-relative. */
|
|
816
|
+
repoPaths?: readonly string[] | undefined;
|
|
1487
817
|
/** Diff the staged index vs HEAD (`--cached`) instead of the working tree. */
|
|
1488
818
|
staged?: boolean | undefined;
|
|
1489
819
|
/** Hold off the initial fetch. Default true. */
|
|
@@ -1491,19 +821,29 @@ type UseSandboxGitOptions = ClientOverride & {
|
|
|
1491
821
|
/** Lease liveness ("warm" | "draining" | "cold"). When NOT warm, the diff is
|
|
1492
822
|
* served from the capture (cold/offline) instead of a live `gitDiff` RPC. */
|
|
1493
823
|
liveness?: string | undefined;
|
|
1494
|
-
/** The latest turn-end capture (from `useWorkspaceCapture`).
|
|
1495
|
-
*
|
|
824
|
+
/** The latest turn-end capture (from `useWorkspaceCapture`). Seeds the diff
|
|
825
|
+
* immediately; a warm box reconciles live and leaves this durable review
|
|
826
|
+
* surface in place if the live request is temporarily unavailable. */
|
|
1496
827
|
capture?: WorkspaceCaptureManifest | null | undefined;
|
|
1497
828
|
};
|
|
829
|
+
/** A Git diff qualified into workspace scope. `repoRoot` is present for the
|
|
830
|
+
* workspace-wide path and lets review UI group real repositories without
|
|
831
|
+
* guessing from the first path segment. */
|
|
832
|
+
type SandboxGitFileDiff = GitFileDiff & {
|
|
833
|
+
repoRoot?: string | undefined;
|
|
834
|
+
};
|
|
1498
835
|
type UseSandboxGitResult = {
|
|
1499
836
|
/** Working-tree (or staged) diff vs HEAD — the structured hunks the Pierre
|
|
1500
837
|
* diff view renders. */
|
|
1501
|
-
diff:
|
|
838
|
+
diff: SandboxGitFileDiff[];
|
|
1502
839
|
branch: string | null;
|
|
1503
840
|
/** Whether a repo is actually mounted (drives "no repository" vs "no changes"). */
|
|
1504
841
|
isRepo: boolean;
|
|
1505
842
|
ahead: number;
|
|
1506
843
|
behind: number;
|
|
844
|
+
/** Number and workspace-relative roots of repositories represented here. */
|
|
845
|
+
repoCount: number;
|
|
846
|
+
repoRoots: string[];
|
|
1507
847
|
refresh: () => Promise<void>;
|
|
1508
848
|
/** Which source the diff is served from: the live box or the turn-end capture. */
|
|
1509
849
|
source: "live" | "capture" | null;
|
|
@@ -1517,7 +857,7 @@ type UseSandboxGitResult = {
|
|
|
1517
857
|
* `GitFileDiff[]` (per-file hunks with per-line old/new numbers, rename
|
|
1518
858
|
* detection, binary flag, add/del counts) plus branch + ahead/behind. When the
|
|
1519
859
|
* box is warm the `git diff` runs in-box (API-direct); when it is cold/offline the
|
|
1520
|
-
* diff is served from the turn-end capture instead
|
|
860
|
+
* diff is served from the turn-end capture instead. Refreshes on
|
|
1521
861
|
* `git.changed`; reconciles live in place on the cold→warm transition.
|
|
1522
862
|
*/
|
|
1523
863
|
declare function useSandboxGit(sessionId: string | null | undefined, options?: UseSandboxGitOptions): UseSandboxGitResult;
|
|
@@ -1560,7 +900,7 @@ type UseWorkspaceCaptureResult = {
|
|
|
1560
900
|
/**
|
|
1561
901
|
* The cold-paint data source: fetch the latest turn-end workspace capture with a
|
|
1562
902
|
* SINGLE api round-trip on mount (no machine, no Channel-A — this is the <200ms
|
|
1563
|
-
* first paint
|
|
903
|
+
* first paint). The manifest is served inline in the common
|
|
1564
904
|
* case; a rare >2MB manifest comes back as a short-TTL signed URL we follow.
|
|
1565
905
|
*
|
|
1566
906
|
* Subscribes to the live event log: a `workspace.revision.captured` for a revision
|
|
@@ -1571,8 +911,8 @@ type UseWorkspaceCaptureResult = {
|
|
|
1571
911
|
declare function useWorkspaceCapture(sessionId: string | null | undefined, options?: UseWorkspaceCaptureOptions): UseWorkspaceCaptureResult;
|
|
1572
912
|
|
|
1573
913
|
/**
|
|
1574
|
-
* The wake-on-edit state machine
|
|
1575
|
-
*
|
|
914
|
+
* The wake-on-edit state machine. This hook owns the logic and the UI renders
|
|
915
|
+
* its result. States are explicit and exhaustive:
|
|
1576
916
|
*
|
|
1577
917
|
* viewing-cold — cold snapshot open, no local edits (editable, cloud).
|
|
1578
918
|
* buffering — local edits buffered; the box is not warm and no warm is
|
|
@@ -1634,164 +974,462 @@ type UseWorkspaceEditResult = {
|
|
|
1634
974
|
* Cold-editing without a spinner: the editor opens instantly from the capture,
|
|
1635
975
|
* the first keystroke buffers locally AND signals the host to warm the box, and on
|
|
1636
976
|
* warm the buffer flushes IF the live file still matches the captured base — else a
|
|
1637
|
-
* non-blocking conflict is surfaced and nothing is overwritten
|
|
977
|
+
* non-blocking conflict is surfaced and nothing is overwritten.
|
|
978
|
+
*
|
|
979
|
+
* The base guard compares the live content at flush time against `baseContent`
|
|
980
|
+
* (the exact bytes the editor loaded). This is equivalent to the sha256 compare
|
|
981
|
+
* the design specifies — M1 leaves `baseHash` null, so the loaded content IS the
|
|
982
|
+
* authoritative base — and avoids async Web Crypto in the render path.
|
|
983
|
+
*/
|
|
984
|
+
declare function useWorkspaceEdit(sessionId: string | null | undefined, options?: UseWorkspaceEditOptions): UseWorkspaceEditResult;
|
|
985
|
+
|
|
986
|
+
/** The one truthful machine indicator. Honest staleness beats
|
|
987
|
+
* fake liveness: a cold/asleep box reads "offline — as of <time>", never "live". */
|
|
988
|
+
type MachineChipState = "live" | "waking" | "offline";
|
|
989
|
+
type MachineChip = {
|
|
990
|
+
state: MachineChipState;
|
|
991
|
+
/** A ready-to-render label ("Live" / "Waking…" / "Offline — as of 3m ago"). */
|
|
992
|
+
label: string;
|
|
993
|
+
/** The capture time backing an offline/stale label (ISO), or null. M4 may
|
|
994
|
+
* reformat this; `label` already embeds a relative form. */
|
|
995
|
+
asOf: string | null;
|
|
996
|
+
};
|
|
997
|
+
type DeriveMachineChipInput = {
|
|
998
|
+
/** `capabilities.liveness` — "warm" | "draining" | "cold" (or null pre-negotiation). */
|
|
999
|
+
liveness?: string | null | undefined;
|
|
1000
|
+
/** `useSessionCapabilities().state` — drives the "waking" (negotiating) read. */
|
|
1001
|
+
capabilitiesState?: SessionCapabilitiesState | null | undefined;
|
|
1002
|
+
/** The ACTIVE machine's connection state (from `useMachines`), when known. A
|
|
1003
|
+
* self-hosted machine that is `offline` cannot be remotely woken. */
|
|
1004
|
+
activeMachineState?: MachineState | null | undefined;
|
|
1005
|
+
/** Whether the active sandbox is a user-owned self-hosted machine (no remote wake). */
|
|
1006
|
+
activeIsSelfhosted?: boolean | undefined;
|
|
1007
|
+
/** An interaction (wake-on-edit, terminal focus) is actively warming the box. */
|
|
1008
|
+
wantsWarm?: boolean | undefined;
|
|
1009
|
+
/** The latest capture's `capturedAt` (ISO) — the "as of <time>" backing. */
|
|
1010
|
+
capturedAt?: string | null | undefined;
|
|
1011
|
+
/** Injectable clock for deterministic relative labels (defaults to Date.now). */
|
|
1012
|
+
now?: number | undefined;
|
|
1013
|
+
};
|
|
1014
|
+
/** Compact relative-time for the "as of" label. Pure, no Intl dependency. */
|
|
1015
|
+
declare function formatAsOf(capturedAt: string, now: number): string;
|
|
1016
|
+
/**
|
|
1017
|
+
* Derive the machine-state chip from the live capability/liveness surface, the
|
|
1018
|
+
* active machine's connection state, and the latest capture time. PURE (M4 renders
|
|
1019
|
+
* it; the whole point is a deterministic, testable projection).
|
|
1020
|
+
*
|
|
1021
|
+
* Precedence:
|
|
1022
|
+
* 1. warm/draining lease → **live** (a warm box always wins).
|
|
1023
|
+
* 2. actively warming (negotiating, wake-on-edit, or a reconnecting/enrolling
|
|
1024
|
+
* machine) → **waking**.
|
|
1025
|
+
* 3. everything else (a cold/asleep box, a self-hosted machine that's offline,
|
|
1026
|
+
* an error) → **offline**, labelled "as of <capture time>".
|
|
1027
|
+
*/
|
|
1028
|
+
declare function deriveMachineChip(input: DeriveMachineChipInput): MachineChip;
|
|
1029
|
+
type UseMachineChipOptions = DeriveMachineChipInput;
|
|
1030
|
+
/**
|
|
1031
|
+
* Thin memoized wrapper over `deriveMachineChip` for the dock header (M4). The
|
|
1032
|
+
* dock already runs `useSessionCapabilities` + `useMachines` + `useWorkspace
|
|
1033
|
+
* capture`; it feeds their `liveness` / `state` / active-machine state /
|
|
1034
|
+
* `capturedAt` here. Pass a periodically-updated `now` if you want the relative
|
|
1035
|
+
* "as of" label to tick.
|
|
1036
|
+
*/
|
|
1037
|
+
declare function useMachineChip(input: UseMachineChipOptions): MachineChip;
|
|
1038
|
+
|
|
1039
|
+
type ApprovalSurfaceMessages = {
|
|
1040
|
+
title: string;
|
|
1041
|
+
description: string;
|
|
1042
|
+
approve: string;
|
|
1043
|
+
reject: string;
|
|
1044
|
+
approving: string;
|
|
1045
|
+
rejecting: string;
|
|
1046
|
+
formatToolName: (name: string) => string;
|
|
1047
|
+
};
|
|
1048
|
+
declare const defaultApprovalSurfaceMessages: ApprovalSurfaceMessages;
|
|
1049
|
+
type ApprovalSurfaceProps = {
|
|
1050
|
+
approvals: PendingApproval[];
|
|
1051
|
+
onApprove: (approval: PendingApproval) => void | Promise<void>;
|
|
1052
|
+
onReject: (approval: PendingApproval) => void | Promise<void>;
|
|
1053
|
+
responding?: boolean | undefined;
|
|
1054
|
+
error?: string | Error | null | undefined;
|
|
1055
|
+
messages?: Partial<ApprovalSurfaceMessages> | undefined;
|
|
1056
|
+
renderApproval?: ((approval: PendingApproval) => ReactNode) | undefined;
|
|
1057
|
+
className?: string | undefined;
|
|
1058
|
+
};
|
|
1059
|
+
/**
|
|
1060
|
+
* Host-neutral approval presentation backed by the native pending-approval
|
|
1061
|
+
* projection and control callbacks. It owns only presentation and duplicate
|
|
1062
|
+
* click fencing; OpenGeni remains the authority for approval state.
|
|
1063
|
+
*/
|
|
1064
|
+
declare function ApprovalSurface({ approvals, onApprove, onReject, responding, error, messages: overrides, renderApproval, className, }: ApprovalSurfaceProps): react_jsx_runtime.JSX.Element | null;
|
|
1065
|
+
|
|
1066
|
+
type HumanInputAnswerDraft = {
|
|
1067
|
+
values: string[];
|
|
1068
|
+
other: string;
|
|
1069
|
+
otherSelected: boolean;
|
|
1070
|
+
};
|
|
1071
|
+
type HumanInputFormMessages = {
|
|
1072
|
+
title: string;
|
|
1073
|
+
description: string;
|
|
1074
|
+
submit: string;
|
|
1075
|
+
skip: string;
|
|
1076
|
+
submitting: string;
|
|
1077
|
+
other: string;
|
|
1078
|
+
deadlineLabel: string;
|
|
1079
|
+
formatDeadline: (value: string) => string;
|
|
1080
|
+
required: string;
|
|
1081
|
+
minLength: (count: number) => string;
|
|
1082
|
+
maxLength: (count: number) => string;
|
|
1083
|
+
otherRequired: string;
|
|
1084
|
+
minSelections: (count: number) => string;
|
|
1085
|
+
maxSelections: (count: number) => string;
|
|
1086
|
+
};
|
|
1087
|
+
declare const defaultHumanInputFormMessages: HumanInputFormMessages;
|
|
1088
|
+
type HumanInputFormProps = {
|
|
1089
|
+
request: Pick<SessionHumanInputRequest, "id" | "questions" | "allowSkip" | "expiresAt">;
|
|
1090
|
+
onSubmit: (response: SubmitHumanInputResponseRequest) => void | Promise<void>;
|
|
1091
|
+
submitting?: boolean | undefined;
|
|
1092
|
+
error?: string | null | undefined;
|
|
1093
|
+
title?: ReactNode;
|
|
1094
|
+
description?: ReactNode;
|
|
1095
|
+
submitLabel?: string | undefined;
|
|
1096
|
+
skipLabel?: string | undefined;
|
|
1097
|
+
messages?: Partial<HumanInputFormMessages> | undefined;
|
|
1098
|
+
autoFocus?: boolean | undefined;
|
|
1099
|
+
className?: string | undefined;
|
|
1100
|
+
};
|
|
1101
|
+
/**
|
|
1102
|
+
* Styled but host-neutral renderer for one structured request. Hosts can use
|
|
1103
|
+
* the headless `useHumanInputRequests` hook instead, or replace the title and
|
|
1104
|
+
* description while retaining accessible field semantics and validation.
|
|
1105
|
+
*/
|
|
1106
|
+
declare function HumanInputForm({ request, onSubmit, submitting, error, title, description, submitLabel, skipLabel, messages: messageOverrides, autoFocus, className, }: HumanInputFormProps): react_jsx_runtime.JSX.Element;
|
|
1107
|
+
declare function answersFromDrafts(questions: HumanInputQuestion[], drafts: Record<string, HumanInputAnswerDraft>, messageOverrides?: Partial<HumanInputFormMessages>): {
|
|
1108
|
+
answers: HumanInputAnswer[];
|
|
1109
|
+
errors: Record<string, string>;
|
|
1110
|
+
};
|
|
1111
|
+
|
|
1112
|
+
type ToolRendererProps = {
|
|
1113
|
+
item: ToolCallItem;
|
|
1114
|
+
};
|
|
1115
|
+
type ToolRenderer = ComponentType<ToolRendererProps>;
|
|
1116
|
+
/** A registry entry: which key it matches and the component that renders it. */
|
|
1117
|
+
type ToolRegistryEntry = {
|
|
1118
|
+
match: "rawType";
|
|
1119
|
+
type: string;
|
|
1120
|
+
render: ToolRenderer;
|
|
1121
|
+
} | {
|
|
1122
|
+
match: "name";
|
|
1123
|
+
name: string;
|
|
1124
|
+
render: ToolRenderer;
|
|
1125
|
+
};
|
|
1126
|
+
type ToolRegistry = {
|
|
1127
|
+
/** Resolve the renderer for a call (never null — falls back to generic). */
|
|
1128
|
+
resolve: (item: ToolCallItem) => ToolRenderer;
|
|
1129
|
+
/** The generic fallback renderer. */
|
|
1130
|
+
fallback: ToolRenderer;
|
|
1131
|
+
};
|
|
1132
|
+
type CreateToolRegistryOptions = {
|
|
1133
|
+
/**
|
|
1134
|
+
* Entries that take precedence over the built-ins. Earlier entries win, so a
|
|
1135
|
+
* consumer can shadow a default renderer for the same key.
|
|
1136
|
+
*/
|
|
1137
|
+
entries?: ToolRegistryEntry[] | undefined;
|
|
1138
|
+
/** Replace the generic fallback used for unmatched tools. */
|
|
1139
|
+
fallback?: ToolRenderer | undefined;
|
|
1140
|
+
};
|
|
1141
|
+
/** The `raw.type` of a projected tool call, when the provider item carries one. */
|
|
1142
|
+
declare function rawTypeOf(item: ToolCallItem): string | null;
|
|
1143
|
+
/**
|
|
1144
|
+
* Build a tool registry from a set of entries and a fallback. The returned
|
|
1145
|
+
* registry resolves in priority order: `raw.type` entries first, then `name`
|
|
1146
|
+
* entries, then the fallback. Consumer `entries` are consulted before the
|
|
1147
|
+
* built-in `baseEntries`, so they shadow defaults cleanly.
|
|
1148
|
+
*/
|
|
1149
|
+
declare function createToolRegistry(baseEntries: ToolRegistryEntry[], baseFallback: ToolRenderer, options?: CreateToolRegistryOptions): ToolRegistry;
|
|
1150
|
+
|
|
1151
|
+
/** The built-in tool renderer registry: every first-party tool plus a fallback. */
|
|
1152
|
+
declare const defaultToolRegistry: ToolRegistry;
|
|
1153
|
+
/** Build a registry that extends the built-ins with consumer entries/fallback. */
|
|
1154
|
+
declare function createDefaultToolRegistry(options?: Parameters<typeof createToolRegistry>[2]): ToolRegistry;
|
|
1155
|
+
|
|
1156
|
+
type ActivityRailProps = {
|
|
1157
|
+
items: ActivityItem[];
|
|
1158
|
+
/** Renderer registry for tool calls. Defaults to {@link defaultToolRegistry}. */
|
|
1159
|
+
toolRegistry?: ToolRegistry | undefined;
|
|
1160
|
+
/** Drill into a spawned worker session. */
|
|
1161
|
+
onOpenSession?: ((sessionId: string) => void) | undefined;
|
|
1162
|
+
/**
|
|
1163
|
+
* Deep-link a memory row to its record in the host's memory pane. Opt-in: the
|
|
1164
|
+
* library draws no "View in memory" affordance without a handler (the memory
|
|
1165
|
+
* row is then non-interactive rich content). See {@link MessageTimelineProps}.
|
|
1166
|
+
*/
|
|
1167
|
+
onMemoryClick?: ((memoryId: string) => void) | undefined;
|
|
1168
|
+
/** Drop the left rule + indent (used inside a folded turn summary). */
|
|
1169
|
+
bare?: boolean | undefined;
|
|
1170
|
+
className?: string | undefined;
|
|
1171
|
+
};
|
|
1172
|
+
declare function ActivityRail({ items, toolRegistry, onOpenSession, onMemoryClick, bare, className, }: ActivityRailProps): react_jsx_runtime.JSX.Element;
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* A subtle settle signal — see the CHIP DOCTRINE above. The closed tone set.
|
|
1176
|
+
* `"interrupted"` is a calm neutral tone for cancelled items — no dot, same
|
|
1177
|
+
* quiet weight as `"muted"`, but semantically distinct from metadata.
|
|
1178
|
+
*/
|
|
1179
|
+
type DisclosureChip = {
|
|
1180
|
+
tone: "ok" | "bad" | "muted" | "interrupted";
|
|
1181
|
+
text: string;
|
|
1182
|
+
};
|
|
1183
|
+
type ActivityDisclosureProps = {
|
|
1184
|
+
icon: ReactNode;
|
|
1185
|
+
/** Icon tint. Defaults to the muted foreground; renderers pass accent/failed. */
|
|
1186
|
+
iconTone?: "accent" | "failed" | "running" | "muted" | undefined;
|
|
1187
|
+
title: ReactNode;
|
|
1188
|
+
/** Render the title in the mono face (commands, paths). */
|
|
1189
|
+
titleMono?: boolean | undefined;
|
|
1190
|
+
/** Shimmer the title while the tool is in-flight. */
|
|
1191
|
+
running?: boolean | undefined;
|
|
1192
|
+
/**
|
|
1193
|
+
* Quiet single-line secondary text (truncated). It is detail-on-demand: hidden
|
|
1194
|
+
* when a media preview is set, AND hidden once the row is expanded (the body
|
|
1195
|
+
* then owns the detail), so a stat/path never appears twice at once.
|
|
1196
|
+
*/
|
|
1197
|
+
preview?: ReactNode | undefined;
|
|
1198
|
+
/** A small inline media preview (a screenshot thumbnail) shown in place of `preview`. */
|
|
1199
|
+
media?: ReactNode | undefined;
|
|
1200
|
+
/** At most one quiet settle chip, right-aligned to the gutter. */
|
|
1201
|
+
chip?: DisclosureChip | undefined;
|
|
1202
|
+
/**
|
|
1203
|
+
* When true the row carries the standard failure affordance: the icon is tinted
|
|
1204
|
+
* red and a "failed" bad-chip appears in the right gutter (unless an explicit
|
|
1205
|
+
* `chip` is already supplied — the caller's chip wins). Output is still visible
|
|
1206
|
+
* on expand; this is a quiet status signal, not a blocking banner.
|
|
1207
|
+
*
|
|
1208
|
+
* Renderers should pass `failed={item.status === "failed"}` on their settled
|
|
1209
|
+
* (non-running) paths so any tool with a failed status shows a consistent
|
|
1210
|
+
* affordance without each renderer having to duplicate the logic.
|
|
1211
|
+
*/
|
|
1212
|
+
failed?: boolean | undefined;
|
|
1213
|
+
/**
|
|
1214
|
+
* When true the row carries a calm "interrupted" affordance: the icon stays
|
|
1215
|
+
* muted (no red) and a quiet "interrupted" chip appears in the right gutter
|
|
1216
|
+
* (unless an explicit `chip` is already supplied — the caller's chip wins).
|
|
1217
|
+
* This is the cancelled-status analogue of `failed`, but deliberately calm
|
|
1218
|
+
* and neutral — it is NOT an error; the user chose to stop.
|
|
1219
|
+
*
|
|
1220
|
+
* Renderers should pass `cancelled={item.status === "cancelled"}` so any
|
|
1221
|
+
* in-flight item that was interrupted on turn.cancelled reads consistently.
|
|
1222
|
+
* `cancelled` is ignored when `failed` is also true (failure takes precedence).
|
|
1223
|
+
*/
|
|
1224
|
+
cancelled?: boolean | undefined;
|
|
1225
|
+
/** When false the row is a static line (no expand affordance). */
|
|
1226
|
+
expandable?: boolean | undefined;
|
|
1227
|
+
children?: ReactNode | undefined;
|
|
1228
|
+
};
|
|
1229
|
+
/**
|
|
1230
|
+
* The one disclosure row shape every activity row reuses (tool calls, reasoning,
|
|
1231
|
+
* sandbox ops): a chevron, a tinted icon, a title, an optional muted preview or
|
|
1232
|
+
* inline media, and at most one right-gutter settle chip. Compact by default;
|
|
1233
|
+
* the body mounts only when expanded.
|
|
1234
|
+
*/
|
|
1235
|
+
declare function ActivityDisclosure({ icon, iconTone: iconToneProp, title, titleMono, running, preview, media, chip: chipProp, failed, cancelled, expandable, children, }: ActivityDisclosureProps): react_jsx_runtime.JSX.Element;
|
|
1236
|
+
declare function TermBlock({ command, workdir, output, live, tailLines, failed, }: {
|
|
1237
|
+
/**
|
|
1238
|
+
* The command shown in the prompt header. Pass `null` when the row title
|
|
1239
|
+
* already carries it (e.g. an exec row titled `$ cmd`): the header then drops
|
|
1240
|
+
* the command — and the whole prompt line if there is no workdir either — so
|
|
1241
|
+
* the command never reads twice, stacked, above the output.
|
|
1242
|
+
*/
|
|
1243
|
+
command: string | null;
|
|
1244
|
+
workdir?: string | null | undefined;
|
|
1245
|
+
/** The FULL output. TermBlock owns the tail/full slicing internally. */
|
|
1246
|
+
output: string;
|
|
1247
|
+
live?: boolean | undefined;
|
|
1248
|
+
/** A non-zero exit / failed call — tints the left accent red (the one hue). */
|
|
1249
|
+
failed?: boolean | undefined;
|
|
1250
|
+
/**
|
|
1251
|
+
* When the output exceeds the tail window, only the last `tailLines` are shown
|
|
1252
|
+
* with a "show full output" toggle. The component holds the full text, so the
|
|
1253
|
+
* toggle reveals the rest (never a dead affordance). Defaults to 12.
|
|
1254
|
+
*/
|
|
1255
|
+
tailLines?: number | undefined;
|
|
1256
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1257
|
+
declare function PayloadBlock({ label, value, failed, }: {
|
|
1258
|
+
label: string;
|
|
1259
|
+
value: unknown;
|
|
1260
|
+
failed?: boolean | undefined;
|
|
1261
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
1262
|
+
/** A quiet inline note inside an expanded body (lost output, empty frame, …). */
|
|
1263
|
+
declare function BodyNote({ children, tone, }: {
|
|
1264
|
+
children: ReactNode;
|
|
1265
|
+
tone?: "error" | "muted" | undefined;
|
|
1266
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1267
|
+
/**
|
|
1268
|
+
* A loading screenshot placeholder. A faint camera glyph over a shimmering box,
|
|
1269
|
+
* so a still frame of the running state reads unambiguously as "capturing" — not
|
|
1270
|
+
* a broken thumbnail.
|
|
1271
|
+
*/
|
|
1272
|
+
declare function MediaSkeleton(): react_jsx_runtime.JSX.Element;
|
|
1273
|
+
/** A standardized "tool ran, produced no image" placeholder in the media slot. */
|
|
1274
|
+
declare function MediaEmpty(): react_jsx_runtime.JSX.Element;
|
|
1275
|
+
/**
|
|
1276
|
+
* A small inline screenshot thumbnail that opens the app lightbox on click.
|
|
1638
1277
|
*
|
|
1639
|
-
*
|
|
1640
|
-
*
|
|
1641
|
-
*
|
|
1642
|
-
* authoritative base — and avoids async Web Crypto in the render path.
|
|
1278
|
+
* Requires a `LightboxProvider` ancestor for the click-to-expand affordance.
|
|
1279
|
+
* Outside one it degrades to a plain, non-interactive image — never a dead
|
|
1280
|
+
* "Expand" button that announces an action it cannot perform.
|
|
1643
1281
|
*/
|
|
1644
|
-
declare function
|
|
1282
|
+
declare function Thumbnail({ src, caption, alt, }: {
|
|
1283
|
+
src: string;
|
|
1284
|
+
caption?: string | undefined;
|
|
1285
|
+
alt?: string;
|
|
1286
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1287
|
+
/**
|
|
1288
|
+
* The expanded screenshot inside a tool body: a contained, clickable preview
|
|
1289
|
+
* (opens the lightbox) with a quiet caption. Constrained height + object-contain
|
|
1290
|
+
* so it never breaks the row layout. Like {@link Thumbnail}, it degrades to a
|
|
1291
|
+
* plain image outside a `LightboxProvider`.
|
|
1292
|
+
*/
|
|
1293
|
+
declare function ScreenshotFigure({ src, caption, alt, }: {
|
|
1294
|
+
src: string;
|
|
1295
|
+
caption?: string | undefined;
|
|
1296
|
+
alt?: string;
|
|
1297
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1645
1298
|
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
type MachineChipState = "live" | "waking" | "offline";
|
|
1649
|
-
type MachineChip = {
|
|
1650
|
-
state: MachineChipState;
|
|
1651
|
-
/** A ready-to-render label ("Live" / "Waking…" / "Offline — as of 3m ago"). */
|
|
1652
|
-
label: string;
|
|
1653
|
-
/** The capture time backing an offline/stale label (ISO), or null. M4 may
|
|
1654
|
-
* reformat this; `label` already embeds a relative form. */
|
|
1655
|
-
asOf: string | null;
|
|
1656
|
-
};
|
|
1657
|
-
type DeriveMachineChipInput = {
|
|
1658
|
-
/** `capabilities.liveness` — "warm" | "draining" | "cold" (or null pre-negotiation). */
|
|
1659
|
-
liveness?: string | null | undefined;
|
|
1660
|
-
/** `useSessionCapabilities().state` — drives the "waking" (negotiating) read. */
|
|
1661
|
-
capabilitiesState?: SessionCapabilitiesState | null | undefined;
|
|
1662
|
-
/** The ACTIVE machine's connection state (from `useMachines`), when known. A
|
|
1663
|
-
* self-hosted machine that is `offline` cannot be remotely woken. */
|
|
1664
|
-
activeMachineState?: MachineState | null | undefined;
|
|
1665
|
-
/** Whether the active sandbox is a user-owned self-hosted machine (no remote wake). */
|
|
1666
|
-
activeIsSelfhosted?: boolean | undefined;
|
|
1667
|
-
/** An interaction (wake-on-edit, terminal focus) is actively warming the box. */
|
|
1668
|
-
wantsWarm?: boolean | undefined;
|
|
1669
|
-
/** The latest capture's `capturedAt` (ISO) — the "as of <time>" backing. */
|
|
1670
|
-
capturedAt?: string | null | undefined;
|
|
1671
|
-
/** Injectable clock for deterministic relative labels (defaults to Date.now). */
|
|
1672
|
-
now?: number | undefined;
|
|
1299
|
+
type LightboxController = {
|
|
1300
|
+
open: (src: string, caption?: string) => void;
|
|
1673
1301
|
};
|
|
1674
|
-
/**
|
|
1675
|
-
declare function
|
|
1302
|
+
/** Open the app-level screenshot lightbox. No-op outside a `LightboxProvider`. */
|
|
1303
|
+
declare function useLightbox(): LightboxController;
|
|
1676
1304
|
/**
|
|
1677
|
-
*
|
|
1678
|
-
*
|
|
1679
|
-
*
|
|
1680
|
-
*
|
|
1681
|
-
* Precedence:
|
|
1682
|
-
* 1. warm/draining lease → **live** (a warm box always wins).
|
|
1683
|
-
* 2. actively warming (negotiating, wake-on-edit, or a reconnecting/enrolling
|
|
1684
|
-
* machine) → **waking**.
|
|
1685
|
-
* 3. everything else (a cold/asleep box, a self-hosted machine that's offline,
|
|
1686
|
-
* an error) → **offline**, labelled "as of <capture time>".
|
|
1305
|
+
* The lightbox controller when one is mounted, or `null` outside a
|
|
1306
|
+
* `LightboxProvider`. Lets a media primitive degrade to a non-interactive image
|
|
1307
|
+
* (rather than a dead "Expand" button that announces an action it cannot do).
|
|
1687
1308
|
*/
|
|
1688
|
-
declare function
|
|
1689
|
-
type UseMachineChipOptions = DeriveMachineChipInput;
|
|
1309
|
+
declare function useLightboxOptional(): LightboxController | null;
|
|
1690
1310
|
/**
|
|
1691
|
-
*
|
|
1692
|
-
*
|
|
1693
|
-
*
|
|
1694
|
-
*
|
|
1695
|
-
*
|
|
1311
|
+
* The app-level screenshot lightbox. Render once near the timeline; renderers
|
|
1312
|
+
* call `useLightbox().open(src)`.
|
|
1313
|
+
*
|
|
1314
|
+
* Idempotent by design: when an ancestor `LightboxProvider` already exists (e.g.
|
|
1315
|
+
* a `MessageTimeline` mounted inside an app that already wraps its shell), this
|
|
1316
|
+
* one becomes a pass-through and does NOT mount a second focus-trapping Dialog.
|
|
1317
|
+
* That keeps `MessageTimeline` self-sufficient (it owns its own provider) while
|
|
1318
|
+
* composing cleanly when nested.
|
|
1696
1319
|
*/
|
|
1697
|
-
declare function
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
/** The id to send back via `user.approvalDecision` (`approvalId`). */
|
|
1701
|
-
id: string;
|
|
1702
|
-
/** Tool/function name awaiting the decision. */
|
|
1703
|
-
name: string;
|
|
1704
|
-
arguments?: unknown;
|
|
1705
|
-
/** The raw approval entry from the `session.requiresAction` payload. */
|
|
1706
|
-
raw?: unknown;
|
|
1707
|
-
};
|
|
1708
|
-
/** The approvals carried by one `session.requiresAction` payload. */
|
|
1709
|
-
declare function approvalsFromRequiresAction(payload: unknown): PendingApproval[];
|
|
1710
|
-
/** The approvals still awaiting a decision after replaying `events` in order. */
|
|
1711
|
-
declare function projectPendingApprovals(events: SessionEvent[]): PendingApproval[];
|
|
1320
|
+
declare function LightboxProvider({ children }: {
|
|
1321
|
+
children: ReactNode;
|
|
1322
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1712
1323
|
|
|
1713
1324
|
/**
|
|
1714
|
-
*
|
|
1715
|
-
*
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
* and the UI affordances (notice, openHelp, clearView, confirm) for both.
|
|
1726
|
-
*/
|
|
1727
|
-
/** A positional argument a command accepts after its name. */
|
|
1728
|
-
type SlashArg = {
|
|
1729
|
-
name: string;
|
|
1730
|
-
/** Enter runs only once every required arg is present; otherwise autocompletes. */
|
|
1731
|
-
required?: boolean;
|
|
1732
|
-
/** Closed value set (rendered as a hint; validated by the command itself). */
|
|
1733
|
-
oneOf?: readonly string[];
|
|
1734
|
-
description?: string;
|
|
1735
|
-
};
|
|
1736
|
-
/** Transient feedback surfaced in the composer (generalized error line). */
|
|
1737
|
-
type Notice = {
|
|
1738
|
-
tone: "ok" | "error";
|
|
1739
|
-
message: string;
|
|
1740
|
-
};
|
|
1741
|
-
/** Everything a command handler can reach. Assembled by the composer. */
|
|
1742
|
-
type CommandContext = {
|
|
1743
|
-
/** SDK-shaped client for server commands. */
|
|
1744
|
-
client: SessionClientLike;
|
|
1745
|
-
workspaceId: string;
|
|
1746
|
-
/** Null before a session exists (server commands should guard on this). */
|
|
1747
|
-
sessionId: string | null;
|
|
1748
|
-
status: SessionStatus$1 | null;
|
|
1749
|
-
/** The operator's permissions on this workspace (gates command visibility). */
|
|
1750
|
-
permissions: Permission[];
|
|
1751
|
-
/** Surface a transient ok/error notice in the composer. */
|
|
1752
|
-
notice: (notice: Notice) => void;
|
|
1753
|
-
/** Open the in-composer /help panel (rendered from the registry). */
|
|
1754
|
-
openHelp: () => void;
|
|
1325
|
+
* Seed the initial open state of every timeline collapsible below this node.
|
|
1326
|
+
* Intended for screenshot/test instrumentation only; absent by default.
|
|
1327
|
+
*/
|
|
1328
|
+
declare function DisclosureDefaultsProvider({ defaultOpen, children, }: {
|
|
1329
|
+
defaultOpen: boolean;
|
|
1330
|
+
children: ReactNode;
|
|
1331
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1332
|
+
|
|
1333
|
+
type TurnSummaryProps = {
|
|
1334
|
+
/** The activity items in the turn (used only to compute the facet counts). */
|
|
1335
|
+
items: ActivityItem[];
|
|
1755
1336
|
/**
|
|
1756
|
-
*
|
|
1757
|
-
*
|
|
1758
|
-
*
|
|
1759
|
-
* that don't (no resettable local timeline) get `false`. The /clear-view
|
|
1760
|
-
* command uses this to avoid reporting a false "cleared" success on a no-op.
|
|
1337
|
+
* The settled verdict — or absent for a completed CLUSTER of a still-running
|
|
1338
|
+
* turn, which folds neutrally: no verdict glyph (the turn has none yet), a
|
|
1339
|
+
* quiet pulse dot in its place so alignment and the running feel both hold.
|
|
1761
1340
|
*/
|
|
1762
|
-
|
|
1763
|
-
/**
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1341
|
+
outcome?: TurnOutcome | undefined;
|
|
1342
|
+
/** A short failure reason shown inline on a failed chip (never hidden). */
|
|
1343
|
+
failureText?: string | undefined;
|
|
1344
|
+
/** Elapsed turn duration; shown as a trailing facet when at least 1s. */
|
|
1345
|
+
durationMs?: number | undefined;
|
|
1346
|
+
/** Start expanded. */
|
|
1347
|
+
defaultOpen?: boolean | undefined;
|
|
1769
1348
|
/**
|
|
1770
|
-
*
|
|
1771
|
-
*
|
|
1772
|
-
*
|
|
1773
|
-
*
|
|
1349
|
+
* A nested fold — a cluster or sub-turn INSIDE an already-expanded turn. It
|
|
1350
|
+
* drops the bordered/filled chip and renders as a plain disclosure node on the
|
|
1351
|
+
* parent's rail (chevron + glyph + facets), so expanding a turn reveals a thread
|
|
1352
|
+
* of nodes, never a stack of boxes-in-boxes. The top-level fold stays a chip.
|
|
1774
1353
|
*/
|
|
1775
|
-
|
|
1354
|
+
bare?: boolean | undefined;
|
|
1355
|
+
/** The rendered activity rail revealed on expand. */
|
|
1356
|
+
children: React.ReactNode;
|
|
1776
1357
|
};
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1358
|
+
declare function TurnSummary({ items, outcome, failureText, durationMs, defaultOpen, bare, children, }: TurnSummaryProps): react_jsx_runtime.JSX.Element;
|
|
1359
|
+
|
|
1360
|
+
/** Recover the exit code from a sandbox exec banner (`Process exited with code N`). */
|
|
1361
|
+
declare function sandboxCommandExitCode(out: unknown): number | null;
|
|
1362
|
+
/**
|
|
1363
|
+
* Recover the numeric exec-session id the sandbox embeds for a STILL-RUNNING
|
|
1364
|
+
* (backgrounded) process (`Process running with session ID N`). A finished
|
|
1365
|
+
* command emits `Process exited with code N` instead, which yields `null`.
|
|
1366
|
+
*/
|
|
1367
|
+
declare function parseExecBannerSessionId(out: unknown): number | null;
|
|
1368
|
+
/** Strip the exec banner (`Chunk ID ...\n...\nOutput:\n`) down to the command's stdout. */
|
|
1369
|
+
declare function stripExecBanner(out: unknown): string;
|
|
1370
|
+
/** The sandbox clamped the output (token/line truncation markers in the banner). */
|
|
1371
|
+
declare function execTruncated(out: unknown): boolean;
|
|
1372
|
+
/** A `write_stdin` whose target PTY vanished (`write_stdin failed: session not found: N`). */
|
|
1373
|
+
declare function isExecSessionLostBanner(out: unknown): boolean;
|
|
1374
|
+
/** True when the exec stdout looks binary/garbled (a NUL byte or ELF magic). */
|
|
1375
|
+
declare function looksBinary(text: string): boolean;
|
|
1376
|
+
/**
|
|
1377
|
+
* Render unprintable control characters as caret notation (0x03 -> `^C`) so a
|
|
1378
|
+
* `write_stdin` keystroke payload reads cleanly in the row title.
|
|
1379
|
+
*/
|
|
1380
|
+
declare function controlCaret(printable: string): string;
|
|
1381
|
+
/** One operation inside an `apply_patch_call` (a V4A file edit). */
|
|
1382
|
+
type ApplyPatchOperation = {
|
|
1788
1383
|
/**
|
|
1789
|
-
*
|
|
1790
|
-
*
|
|
1384
|
+
* The V4A op kind. The three canonical values are `create_file`,
|
|
1385
|
+
* `update_file`, and `delete_file`; the open `string` tail tolerates a
|
|
1386
|
+
* forward-compatible/unknown op kind from the provider without a type error
|
|
1387
|
+
* (it falls through to the "Edited" treatment).
|
|
1791
1388
|
*/
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1389
|
+
type: "create_file" | "update_file" | "delete_file" | (string & {});
|
|
1390
|
+
path: string;
|
|
1391
|
+
/** Rename target -- when present the op is a move/rename. */
|
|
1392
|
+
moveTo?: string | null | undefined;
|
|
1393
|
+
/** The V4A hunk string (`@@ ...` lines with `+`/`-`/context prefixes). */
|
|
1394
|
+
diff?: string | undefined;
|
|
1395
|
+
};
|
|
1396
|
+
/**
|
|
1397
|
+
* Parse a single V4A `apply_patch` operation into the SDK's `GitFileDiff` shape
|
|
1398
|
+
* so it can flow into the SAME `DiffView` / `PierreDiff` the Files tab uses.
|
|
1399
|
+
* Throws on a hunk string it cannot structure (no `@@` anchor on an update); the
|
|
1400
|
+
* renderer catches and falls back to a raw-patch view.
|
|
1401
|
+
*/
|
|
1402
|
+
declare function v4aToGitFileDiff(op: ApplyPatchOperation): GitFileDiff;
|
|
1403
|
+
/**
|
|
1404
|
+
* Extract the `apply_patch` operations from a provider-native tool item's `raw`
|
|
1405
|
+
* payload, normalizing the two wire shapes (`raw.operations[]` for a multi-file
|
|
1406
|
+
* patch, `raw.operation` for a single op). The single owner of this shape so the
|
|
1407
|
+
* renderer and the turn-summary facet counter never drift.
|
|
1408
|
+
*/
|
|
1409
|
+
declare function applyPatchOps(raw: unknown): ApplyPatchOperation[];
|
|
1410
|
+
/**
|
|
1411
|
+
* True when a tool item is an `apply_patch_call` — by its provider-native
|
|
1412
|
+
* `raw.type` (the live-wire source of truth) or by tool `name` (first-party
|
|
1413
|
+
* replays that omit `raw`). Centralizes the rawType-or-name check.
|
|
1414
|
+
*/
|
|
1415
|
+
declare function isApplyPatch(item: {
|
|
1416
|
+
name: string;
|
|
1417
|
+
raw: unknown;
|
|
1418
|
+
}): boolean;
|
|
1419
|
+
/** Deep-redact secret-looking values so arguments never leak a key into the UI. */
|
|
1420
|
+
declare function redactSecrets(value: unknown): unknown;
|
|
1421
|
+
/** Parse tool arguments that may arrive as a JSON string or an object. */
|
|
1422
|
+
declare function parseToolArgs(args: unknown): Record<string, unknown>;
|
|
1423
|
+
/** The last non-empty line of a string -- the compact "what happened" peek. */
|
|
1424
|
+
declare function tailPeek(text: string): string;
|
|
1425
|
+
/**
|
|
1426
|
+
* Unwrap an MCP tool result (`{ content: [{ type: "text", text }], isError? }`)
|
|
1427
|
+
* into a flat `{ text, isError }`. Non-MCP outputs pass through as their string
|
|
1428
|
+
* form.
|
|
1429
|
+
*/
|
|
1430
|
+
declare function unwrapMcpOutput(output: unknown): {
|
|
1431
|
+
text: string;
|
|
1432
|
+
isError: boolean;
|
|
1795
1433
|
};
|
|
1796
1434
|
|
|
1797
1435
|
/**
|
|
@@ -1833,71 +1471,6 @@ declare function firstMissingRequiredArg(command: SlashCommand, args: string[]):
|
|
|
1833
1471
|
*/
|
|
1834
1472
|
declare const defaultCommands: readonly SlashCommand[];
|
|
1835
1473
|
|
|
1836
|
-
/**
|
|
1837
|
-
* Context the composer supplies for command execution and visibility. The
|
|
1838
|
-
* composer owns the UI affordances (notice/openHelp/clearView/confirm), so they
|
|
1839
|
-
* are NOT part of this slice — the hook closes over them via `handlers`.
|
|
1840
|
-
*/
|
|
1841
|
-
type SlashCommandContext = Pick<CommandContext, "client" | "workspaceId" | "sessionId" | "status" | "permissions">;
|
|
1842
|
-
/**
|
|
1843
|
-
* UI affordances the composer supplies. `confirm` differs from the registry-
|
|
1844
|
-
* facing {@link CommandContext.confirm} (which takes no args): the composer's
|
|
1845
|
-
* confirm receives the command being run so the confirm bar renders from that
|
|
1846
|
-
* exact command's identity. The hook bridges the two in {@link buildContext}.
|
|
1847
|
-
*/
|
|
1848
|
-
type SlashCommandHandlers = Pick<CommandContext, "notice" | "openHelp" | "clearView"> & {
|
|
1849
|
-
confirm: (command: SlashCommand) => Promise<boolean>;
|
|
1850
|
-
};
|
|
1851
|
-
type ConfirmState = {
|
|
1852
|
-
command: SlashCommand;
|
|
1853
|
-
/** Resolve the pending confirm() promise. */
|
|
1854
|
-
resolve: (confirmed: boolean) => void;
|
|
1855
|
-
} | null;
|
|
1856
|
-
type UseSlashCommandsOptions = {
|
|
1857
|
-
commands: readonly SlashCommand[];
|
|
1858
|
-
context: SlashCommandContext | undefined;
|
|
1859
|
-
handlers: SlashCommandHandlers;
|
|
1860
|
-
/** The current composer draft. */
|
|
1861
|
-
value: string;
|
|
1862
|
-
/** Replace the composer draft (autocomplete writes through this). */
|
|
1863
|
-
setValue: (value: string) => void;
|
|
1864
|
-
};
|
|
1865
|
-
type UseSlashCommandsResult = {
|
|
1866
|
-
/** Whether the palette is open (a command token is being typed). */
|
|
1867
|
-
open: boolean;
|
|
1868
|
-
/**
|
|
1869
|
-
* Whether the draft is a slash-command attempt (matches a registered command)
|
|
1870
|
-
* — true even after Escape dismisses the popover. The composer blocks its send
|
|
1871
|
-
* path while this holds so a command can't be delivered to the agent as chat.
|
|
1872
|
-
*/
|
|
1873
|
-
isCommandDraft: boolean;
|
|
1874
|
-
/** Commands shown for the current token + context, in display order. */
|
|
1875
|
-
items: SlashCommand[];
|
|
1876
|
-
/** Index into `items` of the highlighted row. */
|
|
1877
|
-
highlight: number;
|
|
1878
|
-
setHighlight: (index: number) => void;
|
|
1879
|
-
/** The matched command once the name is closed by a space (arg-hint mode). */
|
|
1880
|
-
activeCommand: SlashCommand | null;
|
|
1881
|
-
/** The arg hint string for the active command (footer), or "". */
|
|
1882
|
-
activeArgHint: string;
|
|
1883
|
-
/**
|
|
1884
|
-
* Key handler for the textarea. Returns true when it consumed the event
|
|
1885
|
-
* (the composer must then NOT run its send path). Only consumes while open.
|
|
1886
|
-
*/
|
|
1887
|
-
onKeyDown: (event: KeyboardEvent<HTMLTextAreaElement>) => boolean;
|
|
1888
|
-
/** Run the highlighted command (or the active command in arg-hint mode). */
|
|
1889
|
-
runHighlighted: () => Promise<void>;
|
|
1890
|
-
/**
|
|
1891
|
-
* Run the command at an explicitly chosen index (a pointer click on a row).
|
|
1892
|
-
* Bypasses the exact-match token heuristic that runHighlighted uses for
|
|
1893
|
-
* keyboard Enter, so an explicit click always runs the clicked command.
|
|
1894
|
-
*/
|
|
1895
|
-
runAt: (index: number) => Promise<void>;
|
|
1896
|
-
/** Autocomplete the highlighted command name + a trailing space. */
|
|
1897
|
-
autocompleteHighlighted: () => void;
|
|
1898
|
-
};
|
|
1899
|
-
declare function useSlashCommands(options: UseSlashCommandsOptions): UseSlashCommandsResult;
|
|
1900
|
-
|
|
1901
1474
|
type CommandPaletteProps = {
|
|
1902
1475
|
open: boolean;
|
|
1903
1476
|
items: SlashCommand[];
|
|
@@ -1910,6 +1483,10 @@ type CommandPaletteProps = {
|
|
|
1910
1483
|
argHintText: string;
|
|
1911
1484
|
/** id used for aria-activedescendant wiring from the textarea. */
|
|
1912
1485
|
listboxId: string;
|
|
1486
|
+
/** Accessible list label. Defaults to "Slash commands". */
|
|
1487
|
+
label?: string | undefined;
|
|
1488
|
+
/** Badge shown for destructive commands. Defaults to "danger". */
|
|
1489
|
+
dangerLabel?: string | undefined;
|
|
1913
1490
|
};
|
|
1914
1491
|
/**
|
|
1915
1492
|
* The slash-command palette: a popover anchored above the textarea, rendered
|
|
@@ -1917,73 +1494,7 @@ type CommandPaletteProps = {
|
|
|
1917
1494
|
* the opengeni#46 design tokens. Full keyboard nav lives in useSlashCommands;
|
|
1918
1495
|
* this component is presentational + aria.
|
|
1919
1496
|
*/
|
|
1920
|
-
declare function CommandPalette({ open, items, highlight, onHighlight, onRun, argHintText, listboxId, }: CommandPaletteProps): react_jsx_runtime.JSX.Element;
|
|
1921
|
-
|
|
1922
|
-
type ChatComposerProps = {
|
|
1923
|
-
composer: ComposerState;
|
|
1924
|
-
/** Current session status; shows the stop control while a turn runs. */
|
|
1925
|
-
status?: SessionStatus$1 | null | undefined;
|
|
1926
|
-
placeholder?: string | undefined;
|
|
1927
|
-
disabled?: boolean | undefined;
|
|
1928
|
-
autoFocus?: boolean | undefined;
|
|
1929
|
-
/** Replaces the default keyboard hint under the field. */
|
|
1930
|
-
hint?: string | undefined;
|
|
1931
|
-
/** App controls (model picker, attach button, ...) in the footer row, replacing the hint. */
|
|
1932
|
-
controlsStart?: ReactNode | undefined;
|
|
1933
|
-
/** Content rendered above the textarea, inside the field chrome (e.g. attachment chips). */
|
|
1934
|
-
header?: ReactNode | undefined;
|
|
1935
|
-
/** Paste hook on the textarea (e.g. paste-image-to-attach). */
|
|
1936
|
-
onPaste?: ((event: ClipboardEvent<HTMLTextAreaElement>) => void) | undefined;
|
|
1937
|
-
/**
|
|
1938
|
-
* Opt-in file attachments. When supplied (e.g. from {@link useFileAttachments}),
|
|
1939
|
-
* the composer renders a built-in attach button (prepended to `controlsStart`),
|
|
1940
|
-
* an attachment-chips strip (above the textarea, before any host `header`),
|
|
1941
|
-
* routes paste through `addFromPaste` (image/* filter lives in the hook), and
|
|
1942
|
-
* gates send while `uploading` so a message never departs without its files.
|
|
1943
|
-
* Absent → no attachment UI renders and the composer behaves exactly as before.
|
|
1944
|
-
*/
|
|
1945
|
-
attachments?: UseFileAttachmentsResult | undefined;
|
|
1946
|
-
/**
|
|
1947
|
-
* Opt-in model picker. When supplied (e.g. from {@link useAvailableModels}),
|
|
1948
|
-
* the composer renders a {@link ModelPicker} at the start of `controlsStart`
|
|
1949
|
-
* so the operator can choose which host-exposed model serves the next message.
|
|
1950
|
-
* The host owns the selection (`selectedModel`/`onSelectModel`) and is
|
|
1951
|
-
* responsible for threading it into the composer's `sendExtras` (typically
|
|
1952
|
-
* `useComposer({ sendExtras: () => ({ model }) })`) so `composeSendInput`
|
|
1953
|
-
* carries it. Absent → no picker renders and the composer behaves as before.
|
|
1954
|
-
*/
|
|
1955
|
-
models?: ClientModel[] | undefined;
|
|
1956
|
-
/** The currently selected model id (the picker's controlled value). */
|
|
1957
|
-
selectedModel?: string | undefined;
|
|
1958
|
-
/** Called with the chosen model id when the operator picks one. */
|
|
1959
|
-
onSelectModel?: ((modelId: string) => void) | undefined;
|
|
1960
|
-
className?: string | undefined;
|
|
1961
|
-
/**
|
|
1962
|
-
* Slash-command palette. Defaults to the built-in {@link defaultCommands};
|
|
1963
|
-
* apps concat their own. Backward-compatible: when `commandContext` is absent
|
|
1964
|
-
* the palette is inert and behavior is identical to before.
|
|
1965
|
-
*/
|
|
1966
|
-
commands?: readonly SlashCommand[] | undefined;
|
|
1967
|
-
/**
|
|
1968
|
-
* Wiring the palette needs to run server commands and gate visibility. The
|
|
1969
|
-
* composer supplies notice/openHelp/clearView/confirm internally.
|
|
1970
|
-
*/
|
|
1971
|
-
commandContext?: SlashCommandContext | undefined;
|
|
1972
|
-
/** Reset the local timeline view (the /clear-view command target). */
|
|
1973
|
-
onClearView?: (() => void) | undefined;
|
|
1974
|
-
};
|
|
1975
|
-
/**
|
|
1976
|
-
* The chat composer — the only human-to-agent input surface. Plain chat in,
|
|
1977
|
-
* everything else is the agent's job. Enter sends, Shift+Enter breaks the
|
|
1978
|
-
* line, and the stop control appears while a turn is running (sending while
|
|
1979
|
-
* running is legitimate steering, so send stays available too).
|
|
1980
|
-
*
|
|
1981
|
-
* Typing a leading "/" opens the slash-command palette — SESSION/OPERATOR
|
|
1982
|
-
* controls (clear, compact, pause goal, help), never a structured channel to
|
|
1983
|
-
* the agent. The palette is purely additive: with no `commandContext` it is
|
|
1984
|
-
* inert and the composer behaves exactly as before.
|
|
1985
|
-
*/
|
|
1986
|
-
declare function ChatComposer({ composer, status, placeholder, disabled, autoFocus, hint, controlsStart, header, onPaste, attachments, models, selectedModel, onSelectModel, className, commands, commandContext, onClearView, }: ChatComposerProps): react_jsx_runtime.JSX.Element;
|
|
1497
|
+
declare function CommandPalette({ open, items, highlight, onHighlight, onRun, argHintText, listboxId, label, dangerLabel, }: CommandPaletteProps): react_jsx_runtime.JSX.Element;
|
|
1987
1498
|
|
|
1988
1499
|
type ModelPickerProps = {
|
|
1989
1500
|
/** The host-exposed models to choose from (typically {@link useAvailableModels}). */
|
|
@@ -1994,6 +1505,8 @@ type ModelPickerProps = {
|
|
|
1994
1505
|
onChange: (modelId: string) => void;
|
|
1995
1506
|
disabled?: boolean | undefined;
|
|
1996
1507
|
className?: string | undefined;
|
|
1508
|
+
/** Visible-to-assistive-technology label. Defaults to "Model". */
|
|
1509
|
+
label?: string | undefined;
|
|
1997
1510
|
};
|
|
1998
1511
|
/**
|
|
1999
1512
|
* The model picker — a compact dropdown for the composer footer, grouping the
|
|
@@ -2006,7 +1519,7 @@ type ModelPickerProps = {
|
|
|
2006
1519
|
* the send path. Renders nothing when no models are exposed, so a single-model
|
|
2007
1520
|
* deployment shows no chrome.
|
|
2008
1521
|
*/
|
|
2009
|
-
declare function ModelPicker({ models, value, onChange, disabled, className }: ModelPickerProps): react_jsx_runtime.JSX.Element | null;
|
|
1522
|
+
declare function ModelPicker({ models, value, onChange, disabled, className, label, }: ModelPickerProps): react_jsx_runtime.JSX.Element | null;
|
|
2010
1523
|
|
|
2011
1524
|
type MessageTimelineProps = {
|
|
2012
1525
|
/** Raw session events (projected internally) … */
|
|
@@ -2290,7 +1803,8 @@ type FileBrowserProps = {
|
|
|
2290
1803
|
editable?: boolean | undefined;
|
|
2291
1804
|
/**
|
|
2292
1805
|
* Confirm a (recursive) delete before it runs. Return `false` to cancel.
|
|
2293
|
-
*
|
|
1806
|
+
* The default is an accessible, non-blocking confirmation dialog. Supply this
|
|
1807
|
+
* callback to delegate confirmation to a host-owned dialog.
|
|
2294
1808
|
*/
|
|
2295
1809
|
confirmDelete?: ((node: FileTreeNode) => boolean | Promise<boolean>) | undefined;
|
|
2296
1810
|
className?: string | undefined;
|
|
@@ -2420,6 +1934,10 @@ type CodeEditorProps = {
|
|
|
2420
1934
|
initialContents: string;
|
|
2421
1935
|
/** Persist the current buffer. Resolves when the write lands; rejects to surface an error. */
|
|
2422
1936
|
onSave: (contents: string) => Promise<unknown>;
|
|
1937
|
+
/** Explicitly overwrite after a visible expected-content conflict. */
|
|
1938
|
+
onOverwrite?: ((contents: string) => Promise<unknown>) | undefined;
|
|
1939
|
+
/** Re-read the selected file after a visible save conflict. */
|
|
1940
|
+
onReload?: (() => void) | undefined;
|
|
2423
1941
|
/** Fired once when the buffer FIRST diverges from its baseline (the first real
|
|
2424
1942
|
* keystroke) — the wake-on-edit intent. The host warms the box on this so the
|
|
2425
1943
|
* eventual save lands fast; merely opening the file for reading never fires it. */
|
|
@@ -2445,7 +1963,7 @@ type CodeEditorProps = {
|
|
|
2445
1963
|
* `readOnly` suppresses every mutation path so a truncated/binary file can never
|
|
2446
1964
|
* be saved back (which would corrupt it by writing the truncated prefix).
|
|
2447
1965
|
*/
|
|
2448
|
-
declare function CodeEditor({ path, initialContents, onSave, onEditIntent, readOnly, themeType, loading, fallback, className, }: CodeEditorProps): react_jsx_runtime.JSX.Element;
|
|
1966
|
+
declare function CodeEditor({ path, initialContents, onSave, onOverwrite, onReload, onEditIntent, readOnly, themeType, loading, fallback, className, }: CodeEditorProps): react_jsx_runtime.JSX.Element;
|
|
2449
1967
|
|
|
2450
1968
|
type SandboxFilesProps = {
|
|
2451
1969
|
/** From `useSandboxFiles(...)`. */
|
|
@@ -2466,6 +1984,23 @@ type SandboxFilesProps = {
|
|
|
2466
1984
|
* dock warms the box on this so the save lands fast; opening/reading never fires
|
|
2467
1985
|
* it. Browsing the tree/diff must not warm a box. */
|
|
2468
1986
|
onEditIntent?: (() => void) | undefined;
|
|
1987
|
+
/** A guarded diff path routed here by the parent workspace. */
|
|
1988
|
+
requestedPath?: string | undefined;
|
|
1989
|
+
/** Identity for one guarded-file request. Increment this when the same path is
|
|
1990
|
+
* deliberately requested again; it also lets a pending request be consumed
|
|
1991
|
+
* without overriding later manual tree navigation. Defaults to the path. */
|
|
1992
|
+
requestedPathRequestId?: string | number | undefined;
|
|
1993
|
+
/** False while the parent is waking a cold sandbox for `requestedPath`. */
|
|
1994
|
+
requestedPathReady?: boolean | undefined;
|
|
1995
|
+
/** The machine is cold and no durable capture exists yet. Render an explicit
|
|
1996
|
+
* wake gate instead of an empty-tree lie or an implicit Channel-A read. */
|
|
1997
|
+
workspaceResting?: boolean | undefined;
|
|
1998
|
+
/** A deliberate wake has started but the live file surface is not ready yet. */
|
|
1999
|
+
workspaceWaking?: boolean | undefined;
|
|
2000
|
+
/** Whether live reads are currently authoritative. */
|
|
2001
|
+
liveWorkspaceReady?: boolean | undefined;
|
|
2002
|
+
/** Deliberately wake the machine to read content absent from the capture. */
|
|
2003
|
+
onWakeWorkspace?: (() => void) | undefined;
|
|
2469
2004
|
themeType?: "dark" | "light" | undefined;
|
|
2470
2005
|
className?: string | undefined;
|
|
2471
2006
|
};
|
|
@@ -2476,7 +2011,7 @@ type SandboxFilesProps = {
|
|
|
2476
2011
|
* surface deliberately does NOT replicate the changed-files list, and does not
|
|
2477
2012
|
* diff here — one job per tab). The agent commits; the human reviews.
|
|
2478
2013
|
*/
|
|
2479
|
-
declare function SandboxFiles({ files, git, fileSystemAvailable, usePierre, editable, onEditIntent, themeType, className, }: SandboxFilesProps): react_jsx_runtime.JSX.Element;
|
|
2014
|
+
declare function SandboxFiles({ files, git, fileSystemAvailable, usePierre, editable, onEditIntent, requestedPath, requestedPathRequestId, requestedPathReady, workspaceResting, workspaceWaking, liveWorkspaceReady, onWakeWorkspace, themeType, className, }: SandboxFilesProps): react_jsx_runtime.JSX.Element;
|
|
2480
2015
|
|
|
2481
2016
|
type DesktopViewerProps = {
|
|
2482
2017
|
/** The desktop cell of the negotiated capabilities (`capabilities.DesktopStream`). */
|
|
@@ -2604,21 +2139,30 @@ type WorkspaceNotification = {
|
|
|
2604
2139
|
/** The workbench's canonical tab ids (a host injects extras around these). */
|
|
2605
2140
|
declare const WORKBENCH_TAB_CHANGES = "changes";
|
|
2606
2141
|
declare const WORKBENCH_TAB_FILES = "files";
|
|
2142
|
+
declare const WORKBENCH_TAB_TERMINAL = "terminal";
|
|
2143
|
+
declare const WORKBENCH_TAB_DESKTOP = "desktop";
|
|
2144
|
+
/**
|
|
2145
|
+
* The built-in workbench surfaces in their canonical display order. Hosts can
|
|
2146
|
+
* pass a subset through `surfaces`; omission preserves the complete standalone
|
|
2147
|
+
* workbench.
|
|
2148
|
+
*/
|
|
2149
|
+
declare const WORKBENCH_SURFACES: readonly ["changes", "files", "terminal", "desktop"];
|
|
2150
|
+
type SandboxWorkspaceSurface = (typeof WORKBENCH_SURFACES)[number];
|
|
2607
2151
|
/**
|
|
2608
2152
|
* Decide a workspace tab from an already-local event log: the newest
|
|
2609
2153
|
* `workspace.revision.captured` announce carries the change surface stats, so
|
|
2610
2154
|
* "changes exist → Changes, else Files" needs zero machine round-trips. A host
|
|
2611
2155
|
* `override` (e.g. a landing "run" tab) wins when supplied.
|
|
2612
2156
|
*
|
|
2613
|
-
*
|
|
2614
|
-
*
|
|
2615
|
-
*
|
|
2616
|
-
* 2). This remains exported as a standalone helper for hosts that already hold
|
|
2617
|
-
* the event log and want the same decision without the capture fetch.
|
|
2157
|
+
* `<SandboxWorkspace>` uses this only as an optional early hint after its own
|
|
2158
|
+
* capture GET reports no durable capture. A pure embedder needs no events-at-mount
|
|
2159
|
+
* contract: it falls through to authoritative live Git instead.
|
|
2618
2160
|
*/
|
|
2619
2161
|
declare function initialWorkspaceTab(events: SessionEvent[] | undefined, override?: string | null): string;
|
|
2620
2162
|
type WorkspaceMachine = {
|
|
2621
|
-
/**
|
|
2163
|
+
/** Whether at least one built-in workbench surface is enabled. */
|
|
2164
|
+
enabled: boolean;
|
|
2165
|
+
/** The derived live/waking/offline chip model. */
|
|
2622
2166
|
chip: MachineChip;
|
|
2623
2167
|
/** The machine these surfaces are bound to (the Modal group box or a
|
|
2624
2168
|
* self-hosted machine), or null while the fleet is still resolving. */
|
|
@@ -2631,21 +2175,34 @@ type UseSandboxWorkspaceTabsOptions = ClientOverride & {
|
|
|
2631
2175
|
sessionId: string;
|
|
2632
2176
|
/** Live event log (usually `useSessionEvents().events`). */
|
|
2633
2177
|
events: SessionEvent[];
|
|
2634
|
-
/**
|
|
2635
|
-
*
|
|
2178
|
+
/**
|
|
2179
|
+
* Built-in surfaces this host wants to expose. Omit for all four. A disabled
|
|
2180
|
+
* surface is behaviorally dormant: its data hooks, warm intents, stream
|
|
2181
|
+
* attachment, and navigation callbacks are not activated.
|
|
2182
|
+
*/
|
|
2183
|
+
surfaces?: readonly SandboxWorkspaceSurface[] | undefined;
|
|
2184
|
+
/** Override the source-driven default tab (e.g. a host landing tab id). When
|
|
2185
|
+
* omitted the workbench picks Changes-vs-Files from capture or live Git. */
|
|
2636
2186
|
initialTab?: string | null | undefined;
|
|
2637
2187
|
/** Host-routed notifications (mutation errors, desktop-consent failures). The
|
|
2638
2188
|
* package never imports a toast library — the host decides how to surface. */
|
|
2639
2189
|
onNotify?: ((notification: WorkspaceNotification) => void) | undefined;
|
|
2190
|
+
/** File requested by a Changes guard. The Files surface defers the read until
|
|
2191
|
+
* the sandbox is live, then reveals this path. */
|
|
2192
|
+
requestedFilePath?: string | null | undefined;
|
|
2193
|
+
/** Unique identity for `requestedFilePath`, including repeated requests for the
|
|
2194
|
+
* same path. */
|
|
2195
|
+
requestedFileRequestId?: string | number | null | undefined;
|
|
2196
|
+
/** Route a guarded diff into the host's Files tab. */
|
|
2197
|
+
onOpenFile?: ((path: string) => void) | undefined;
|
|
2640
2198
|
};
|
|
2641
2199
|
type UseSandboxWorkspaceTabsResult = {
|
|
2642
2200
|
/** Changes | Files | Terminal | Desktop (capability-gated where noted). */
|
|
2643
2201
|
tabs: WorkspaceTab[];
|
|
2644
|
-
/** The
|
|
2645
|
-
* Files (a host `initialTab` overrides).
|
|
2646
|
-
*
|
|
2647
|
-
*
|
|
2648
|
-
* never causes a post-render switch. */
|
|
2202
|
+
/** The source-driven default tab: Changes when the first authoritative capture
|
|
2203
|
+
* or live Git result has changes, else Files (a host `initialTab` overrides).
|
|
2204
|
+
* null while that source resolves, or permanently when neither Changes nor
|
|
2205
|
+
* Files is enabled; the choice latches once. */
|
|
2649
2206
|
defaultTab: string | null;
|
|
2650
2207
|
/** The machine-state model for the dock-header chip. */
|
|
2651
2208
|
machine: WorkspaceMachine;
|
|
@@ -2662,12 +2219,17 @@ type SandboxWorkspaceProps = ClientOverride & {
|
|
|
2662
2219
|
events: SessionEvent[];
|
|
2663
2220
|
/** The chat / primary pane shown beside the dock. */
|
|
2664
2221
|
primary: ReactNode;
|
|
2222
|
+
/**
|
|
2223
|
+
* Built-in surfaces this host wants to expose. Omit for Changes, Files,
|
|
2224
|
+
* Terminal, and Desktop. Disabled surfaces remain behaviorally dormant.
|
|
2225
|
+
*/
|
|
2226
|
+
surfaces?: readonly SandboxWorkspaceSurface[] | undefined;
|
|
2665
2227
|
/** Host tabs injected BEFORE the workbench tabs (e.g. a "Run" landing tab). */
|
|
2666
2228
|
leadingTabs?: WorkspaceTab[] | undefined;
|
|
2667
2229
|
/** Host tabs injected AFTER the workbench tabs (e.g. a "Debug" tab). */
|
|
2668
2230
|
trailingTabs?: WorkspaceTab[] | undefined;
|
|
2669
2231
|
/** Override the pre-paint default tab (e.g. a host landing tab id). When
|
|
2670
|
-
* omitted the workbench decides
|
|
2232
|
+
* omitted the workbench decides from capture, then live Git when no capture exists. */
|
|
2671
2233
|
initialTab?: string | undefined;
|
|
2672
2234
|
/** Host-routed notifications (no toast dependency in the package). */
|
|
2673
2235
|
onNotify?: ((notification: WorkspaceNotification) => void) | undefined;
|
|
@@ -2823,4 +2385,4 @@ declare function isCreditExhaustion(input: {
|
|
|
2823
2385
|
*/
|
|
2824
2386
|
declare function humanizeFailureReason(reason: string | null): string | null;
|
|
2825
2387
|
|
|
2826
|
-
export { ActivityDisclosure, type ActivityDisclosureProps,
|
|
2388
|
+
export { ActivityDisclosure, type ActivityDisclosureProps, ActivityItem, ActivityRail, type ActivityRailProps, AgentMessageItem, type ApplyPatchOperation, ApprovalSurface, type ApprovalSurfaceMessages, type ApprovalSurfaceProps, AuthNeededItem, BodyNote, CREDIT_EXHAUSTION_MESSAGE, CapturedFileUnavailableError, type CapturedFileUnavailableReason, ChatComposer, ChatComposerMessages, type ChatComposerProps, ClientOverride, CodeEditor, type CodeEditorProps, type CodexAccountsClientLike, CommandContext, CommandPalette, type CommandPaletteProps, ComposerState, ComposerTranscriptionControlProps, type CreateToolRegistryOptions, type DeriveMachineChipInput, DesktopViewer, type DesktopViewerProps, type DesktopWebSocketFactory, type DesktopWebSocketLike, type DiffTheme, DiffView, type DiffViewProps, type DisclosureChip, DisclosureDefaultsProvider, FileBrowser, type FileBrowserProps, type FileTreeNode, type FileTreeStatus, FileWriteConflictError, FleetTile, type FleetTileProps, type HumanInputAnswerDraft, HumanInputForm, type HumanInputFormMessages, type HumanInputFormProps, LightboxProvider, type MachineChip, type MachineChipState, Markdown, type MarkdownProps, MediaEmpty, MediaSkeleton, MessageTimeline, type MessageTimelineProps, ModelPicker, type ModelPickerProps, OpenGeniProvider, type OpenGeniProviderProps, type ParsedCommandLine, PayloadBlock, PendingApproval, PierreDiff, type PierreDiffProps, PierreFile, type PierreFileProps, QueueSurface, type QueueSurfaceProps, SESSION_STATUS_META, SandboxFiles, type SandboxFilesProps, type SandboxGitFileDiff, SandboxTerminal, type SandboxTerminalProps, SandboxWorkspace, type SandboxWorkspaceProps, type SandboxWorkspaceSurface, type SandboxWriteFileOptions, ScreenshotFigure, type SessionCapabilitiesState, SessionClientLike, SessionStatus, type SessionStatusMeta, type SessionStatusProps, SlashArg, SlashCommand, SlashCommandContext, StatusDot, type StatusDotProps, TermBlock, type TerminalChunk, type TerminalStreamStatus, Thumbnail, TimelineItem, TimelineRow, ToolCallItem, type ToolRegistry, type ToolRegistryEntry, type ToolRenderer, type ToolRendererProps, TurnOutcome, TurnSummary, type TurnSummaryProps, type UseAvailableModelsOptions, type UseAvailableModelsResult, type UseBillingUsageOptions, type UseBillingUsageResult, type UseCodexAccountsOptions, type UseCodexAccountsResult, type UseDesktopStreamOptions, type UseDesktopStreamResult, type UseEnvironmentsOptions, type UseEnvironmentsResult, UseFileAttachmentsResult, type UseGoalOptions, type UseGoalResult, type UseMachineChipOptions, type UsePacksOptions, type UsePacksResult, type UseRelayFrameStreamOptions, type UseRelayFrameStreamResult, type UseRigChangesOptions, type UseRigChangesResult, type UseRigOptions, type UseRigResult, type UseRigVersionsOptions, type UseRigVersionsResult, type UseRigsOptions, type UseRigsResult, type UseSandboxFilesOptions, type UseSandboxFilesResult, type UseSandboxGitOptions, type UseSandboxGitResult, type UseSandboxTerminalOptions, type UseSandboxTerminalResult, type UseSandboxWorkspaceTabsOptions, type UseSandboxWorkspaceTabsResult, type UseScheduledTasksOptions, type UseScheduledTasksResult, type UseSessionCapabilitiesOptions, type UseSessionCapabilitiesResult, type UseSessionLineageOptions, type UseSessionLineageResult, type UseSessionOptions, type UseSessionResult, type UseTerminalStreamOptions, type UseTerminalStreamResult, UseTurnQueueResult, type UseVariableSetsOptions, type UseVariableSetsResult, type UseWorkspaceCaptureOptions, type UseWorkspaceCaptureResult, type UseWorkspaceEditOptions, type UseWorkspaceEditResult, type UseWorkspaceSessionsOptions, type UseWorkspaceSessionsResult, type UseWorkspacesOptions, type UseWorkspacesResult, UserMessageItem, WORKBENCH_SURFACES, WORKBENCH_TAB_CHANGES, WORKBENCH_TAB_DESKTOP, WORKBENCH_TAB_FILES, WORKBENCH_TAB_TERMINAL, WorkspaceDock, type WorkspaceDockProps, type WorkspaceEditConflict, type WorkspaceEditState, type WorkspaceMachine, type WorkspaceNotification, type WorkspaceTab, type XtermTheme, answersFromDrafts, applyPatchOps, argHint, cn, controlCaret, createDefaultToolRegistry, createToolRegistry, defaultApprovalSurfaceMessages, defaultCommands, defaultHumanInputFormMessages, defaultToolRegistry, deriveMachineChip, execTruncated, filterCommands, firstMissingRequiredArg, formatAsOf, formatBytes, formatRelativeTime, gitFileDiffToPatch, hasPermission, humanizeFailureReason, initialWorkspaceTab, isApplyPatch, isCodexAccountEvent, isCreditExhaustion, isExecSessionLostBanner, isGoalEvent, isLineageRefreshEvent, isTitleEvent, languageForPath, looksBinary, matchCommand, parseCommandLine, parseExecBannerSessionId, parseToolArgs, rawTypeOf, redactSecrets, sandboxCommandExitCode, sessionDisplayTitle, stringifyPayload, stripExecBanner, tailPeek, truncate, tryParseJson, unwrapMcpOutput, useAvailableModels, useBillingUsage, useCodexAccounts, useDesktopStream, useEnvironments, useGoal, useLightbox, useLightboxOptional, useMachineChip, usePacks, useRelayFrameStream, useRig, useRigChanges, useRigVersions, useRigs, useSandboxFiles, useSandboxGit, useSandboxTerminal, useSandboxWorkspaceTabs, useScheduledTasks, useSession, useSessionCapabilities, useSessionLineage, useTerminalStream, useVariableSets, useWorkspaceCapture, useWorkspaceEdit, useWorkspaceSessions, useWorkspaces, v4aToGitFileDiff, xtermThemeFromTokens };
|