@opengeni/react 0.45.0 → 0.48.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 +68 -12
- package/dist/{chunk-U3CSCMWA.js → chunk-FK6VG4LL.js} +9 -13
- package/dist/chunk-FK6VG4LL.js.map +1 -0
- package/dist/{chunk-HFO4ERGQ.js → chunk-FWXGSNXT.js} +2 -2
- package/dist/{chunk-SRFUT2ZU.js → chunk-I4MPFDRP.js} +119 -63
- package/dist/chunk-I4MPFDRP.js.map +1 -0
- package/dist/{chunk-EB67J347.js → chunk-KZ73RL76.js} +111 -31
- package/dist/chunk-KZ73RL76.js.map +1 -0
- package/dist/{chunk-LWR4MXSS.js → chunk-LHLYWG5R.js} +10 -1
- package/dist/chunk-LHLYWG5R.js.map +1 -0
- package/dist/{chunk-L3EWO3UK.js → chunk-NJ7M2B6Z.js} +445 -84
- package/dist/chunk-NJ7M2B6Z.js.map +1 -0
- package/dist/{chunk-VCBFUSUZ.js → chunk-O4VXOBGF.js} +3 -3
- package/dist/{chunk-VCBFUSUZ.js.map → chunk-O4VXOBGF.js.map} +1 -1
- package/dist/{chunk-6EDV6YFE.js → chunk-OL6QVXGF.js} +121 -29
- package/dist/chunk-OL6QVXGF.js.map +1 -0
- package/dist/chunk-VZTQ73XT.js +86 -0
- package/dist/chunk-VZTQ73XT.js.map +1 -0
- package/dist/{chunk-EHSYZ4KP.js → chunk-WYA65Y3F.js} +16 -16
- package/dist/chunk-WYA65Y3F.js.map +1 -0
- package/dist/{chunk-FD72GJMK.js → chunk-XCNTXWBB.js} +274 -125
- package/dist/chunk-XCNTXWBB.js.map +1 -0
- package/dist/client.d.ts +1 -1
- package/dist/components/chat-composer.d.ts +7 -2
- package/dist/components/composer-transcription-control.d.ts +2 -0
- package/dist/components/composer.d.ts +14 -0
- package/dist/components/machines/machine-detail.d.ts +3 -1
- package/dist/components/machines-dashboard.d.ts +3 -3
- package/dist/components/message-timeline.d.ts +12 -2
- package/dist/components/sandbox-files.d.ts +2 -2
- package/dist/components/sandbox-terminal.d.ts +29 -0
- package/dist/components/sandbox-workspace.d.ts +5 -1
- package/dist/components/workspace-dock.d.ts +3 -1
- package/dist/composer.d.ts +2 -2
- package/dist/composer.js +6 -6
- package/dist/hooks/internal.d.ts +6 -0
- package/dist/hooks/use-codex-accounts.d.ts +1 -1
- package/dist/hooks/use-environments.d.ts +10 -4
- package/dist/hooks/use-machines.d.ts +7 -0
- package/dist/hooks/use-sandbox-files.d.ts +19 -0
- package/dist/hooks/use-sandbox-git.d.ts +7 -0
- package/dist/hooks/use-transcription.d.ts +2 -2
- package/dist/hooks/use-voice-input.d.ts +13 -4
- package/dist/index.d.ts +6 -5
- package/dist/index.js +904 -538
- package/dist/index.js.map +1 -1
- package/dist/lib/composer-responsive-context.d.ts +9 -0
- package/dist/lib/use-portal-token-style.d.ts +14 -3
- package/dist/machines.js +2 -2
- package/dist/{queue-surface-implementation-J4XJFKRW.js → queue-surface-implementation-U5JFG7HT.js} +19 -18
- package/dist/queue-surface-implementation-U5JFG7HT.js.map +1 -0
- package/dist/realtime/realtime-control.d.ts +9 -0
- package/dist/realtime.js +29 -32
- package/dist/realtime.js.map +1 -1
- package/dist/session-ui.js +5 -5
- package/dist/session.js +4 -4
- package/dist/timeline/activity-rail.d.ts +3 -2
- package/dist/timeline/index.d.ts +2 -2
- package/dist/timeline/parsers.d.ts +3 -3
- package/dist/timeline/registry.d.ts +3 -0
- package/dist/timeline/screenshot-lightbox.d.ts +1 -1
- package/dist/timeline/types.d.ts +4 -0
- package/dist/voice-recording-store.d.ts +8 -2
- package/package.json +20 -4
- package/src/client.ts +3 -0
- package/src/components/chat-composer.tsx +12 -2
- package/src/components/code-editor.tsx +1 -1
- package/src/components/command-palette.tsx +1 -1
- package/src/components/composer-transcription-control.tsx +41 -16
- package/src/components/composer.tsx +52 -26
- package/src/components/copy-button.tsx +2 -2
- package/src/components/desktop-viewer.tsx +2 -2
- package/src/components/file-browser.tsx +39 -17
- package/src/components/human-input-form.tsx +2 -2
- package/src/components/machine-card.tsx +1 -1
- package/src/components/machines/machine-detail.tsx +39 -15
- package/src/components/machines-dashboard.tsx +7 -6
- package/src/components/message-timeline.tsx +44 -11
- package/src/components/model-picker.tsx +2 -2
- package/src/components/model-policy-picker.tsx +16 -15
- package/src/components/queue-surface-implementation.tsx +20 -16
- package/src/components/queue-surface-state.tsx +2 -2
- package/src/components/sandbox-files.tsx +140 -60
- package/src/components/sandbox-terminal.tsx +24 -5
- package/src/components/sandbox-workspace.tsx +180 -142
- package/src/components/session-chrome.tsx +14 -14
- package/src/components/tooltip.tsx +13 -16
- package/src/components/user-message-body.tsx +1 -1
- package/src/components/workbench-changes.tsx +4 -4
- package/src/components/workspace-dock.tsx +13 -5
- package/src/composer.ts +3 -0
- package/src/hooks/internal.ts +132 -38
- package/src/hooks/use-codex-accounts.ts +4 -4
- package/src/hooks/use-environments.ts +24 -5
- package/src/hooks/use-file-attachments.ts +70 -32
- package/src/hooks/use-goal.ts +17 -5
- package/src/hooks/use-machines.ts +47 -1
- package/src/hooks/use-sandbox-files.ts +310 -59
- package/src/hooks/use-sandbox-git.ts +148 -41
- package/src/hooks/use-session-capabilities.ts +35 -24
- package/src/hooks/use-session-events.ts +18 -4
- package/src/hooks/use-transcription.ts +4 -14
- package/src/hooks/use-turn-queue.ts +17 -5
- package/src/hooks/use-voice-input.ts +481 -36
- package/src/hooks/use-windowed-sections.ts +9 -7
- package/src/index.ts +11 -6
- package/src/lib/composer-responsive-context.ts +15 -0
- package/src/lib/use-portal-token-style.ts +60 -15
- package/src/provider.tsx +52 -7
- package/src/realtime/dropdown-menu.tsx +15 -19
- package/src/realtime/realtime-control.tsx +18 -7
- package/src/timeline/activity-rail.tsx +15 -6
- package/src/timeline/index.ts +1 -1
- package/src/timeline/parsers.ts +33 -20
- package/src/timeline/projection.ts +23 -0
- package/src/timeline/registry.ts +7 -0
- package/src/timeline/screenshot-lightbox.tsx +15 -4
- package/src/timeline/shared.tsx +8 -8
- package/src/timeline/tool-renderers.tsx +166 -22
- package/src/timeline/turn-summary.tsx +6 -6
- package/src/timeline/types.ts +4 -0
- package/src/voice-recording-store.ts +15 -0
- package/styles/compiled.css +5065 -0
- package/styles/compiled.d.ts +2 -0
- package/styles/effective-tokens.css +27 -0
- package/styles/index.css +3 -0
- package/styles/responsive.css +196 -0
- package/styles/responsive.d.ts +2 -0
- package/styles/tokens.css +50 -17
- package/dist/chunk-6EDV6YFE.js.map +0 -1
- package/dist/chunk-EB67J347.js.map +0 -1
- package/dist/chunk-EHSYZ4KP.js.map +0 -1
- package/dist/chunk-FD72GJMK.js.map +0 -1
- package/dist/chunk-JB5725BI.js +0 -48
- package/dist/chunk-JB5725BI.js.map +0 -1
- package/dist/chunk-L3EWO3UK.js.map +0 -1
- package/dist/chunk-LWR4MXSS.js.map +0 -1
- package/dist/chunk-SRFUT2ZU.js.map +0 -1
- package/dist/chunk-U3CSCMWA.js.map +0 -1
- package/dist/queue-surface-implementation-J4XJFKRW.js.map +0 -1
- /package/dist/{chunk-HFO4ERGQ.js.map → chunk-FWXGSNXT.js.map} +0 -0
package/dist/client.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { OpenGeniClient } from "@opengeni/sdk";
|
|
|
4
4
|
* pass the real SDK client, a proxy-backed client that routes through their
|
|
5
5
|
* own API, or a scripted client in tests/demos.
|
|
6
6
|
*/
|
|
7
|
-
export type SessionClientLike = Pick<OpenGeniClient, "getClientConfig" | "getSession" | "getSessionLineage" | "updateSession" | "updateSessionPin" | "listSessions" | "listSessionPage" | "sendMessage" | "steerMessage" | "pauseSession" | "resumeSession" | "sendApprovalDecision" | "listHumanInputRequests" | "getHumanInputRequest" | "submitHumanInputResponse" | "listEvents" | "streamEvents" | "getQueue" | "moveQueueItem" | "editQueueItem" | "steerQueueItem" | "deleteQueueItem" | "getComposerDraft" | "saveComposerDraft" | "listTurns" | "getGoal" | "updateGoal" | "deleteGoal" | "clearSessionContext" | "compactSessionContext" | "listScheduledTasks" | "uploadFile" | "getFile" | "createFileDownloadUrl" | "listVariableSets" | "createVariableSet" | "updateVariableSet" | "deleteVariableSet" | "setVariableSetVariable" | "deleteVariableSetVariable" | "listEnvironments" | "createEnvironment" | "updateEnvironment" | "deleteEnvironment" | "setEnvironmentVariable" | "deleteEnvironmentVariable" | "listRigs" | "createRig" | "getRig" | "updateRig" | "deleteRig" | "listRigVersions" | "activateRigVersion" | "listRigChanges" | "proposeRigChange" | "getRigChange" | "verifyRigChange" | "promoteRigChange" | "verifyRig" | "listPacks" | "registerPack" | "enablePack" | "deletePack" | "listWorkspaces" | "createWorkspace" | "updateWorkspace" | "setWorkspaceInferenceState" | "getWorkspace" | "getWorkspaceModelCatalog" | "listWorkspaceControlEvents" | "streamWorkspaceControlEvents" | "getBillingUsage" | "getClientConfig" | "getStreamCapabilities" | "acknowledgeStream" | "attachViewer" | "heartbeatViewer" | "detachViewer" | "fsList" | "fsRead" | "fsWrite" | "fsDelete" | "fsMove" | "fsMkdir" | "gitStatus" | "gitDiff" | "getWorkspaceCapture" | "getWorkspaceCaptureFile" | "terminalExec" | "terminalPtyOpen" | "terminalPtyWrite" | "terminalPtyResize" | "terminalPtyClose">;
|
|
7
|
+
export type SessionClientLike = Pick<OpenGeniClient, "getClientConfig" | "getSession" | "getSessionLineage" | "updateSession" | "updateSessionPin" | "listSessions" | "listSessionPage" | "sendMessage" | "steerMessage" | "pauseSession" | "resumeSession" | "sendApprovalDecision" | "listHumanInputRequests" | "getHumanInputRequest" | "submitHumanInputResponse" | "listEvents" | "streamEvents" | "getQueue" | "moveQueueItem" | "editQueueItem" | "steerQueueItem" | "deleteQueueItem" | "getComposerDraft" | "saveComposerDraft" | "listTurns" | "getGoal" | "updateGoal" | "deleteGoal" | "clearSessionContext" | "compactSessionContext" | "listScheduledTasks" | "uploadFile" | "getFile" | "createFileDownloadUrl" | "listVariableSets" | "getVariableSetVariable" | "createVariableSet" | "updateVariableSet" | "deleteVariableSet" | "setVariableSetVariable" | "deleteVariableSetVariable" | "listEnvironments" | "createEnvironment" | "updateEnvironment" | "deleteEnvironment" | "setEnvironmentVariable" | "deleteEnvironmentVariable" | "listRigs" | "createRig" | "getRig" | "updateRig" | "deleteRig" | "listRigVersions" | "activateRigVersion" | "listRigChanges" | "proposeRigChange" | "getRigChange" | "verifyRigChange" | "promoteRigChange" | "verifyRig" | "listPacks" | "registerPack" | "enablePack" | "deletePack" | "listWorkspaces" | "createWorkspace" | "updateWorkspace" | "setWorkspaceInferenceState" | "getWorkspace" | "getWorkspaceModelCatalog" | "listWorkspaceControlEvents" | "streamWorkspaceControlEvents" | "getBillingUsage" | "getClientConfig" | "getStreamCapabilities" | "acknowledgeStream" | "attachViewer" | "heartbeatViewer" | "detachViewer" | "fsList" | "fsListBatch" | "fsRead" | "fsWrite" | "fsDelete" | "fsMove" | "fsMkdir" | "gitStatus" | "gitDiff" | "gitReadBatch" | "getWorkspaceCapture" | "getWorkspaceCaptureFile" | "terminalExec" | "terminalPtyOpen" | "terminalPtyWrite" | "terminalPtyResize" | "terminalPtyClose">;
|
|
8
8
|
/**
|
|
9
9
|
* Tenant-safe client surface required by the session-only React entry.
|
|
10
10
|
*
|
|
@@ -5,11 +5,16 @@ import type { ComposerState } from "../hooks/use-composer";
|
|
|
5
5
|
import type { UseFileAttachmentsResult } from "../hooks/use-file-attachments";
|
|
6
6
|
import type { SlashCommandContext } from "../hooks/use-slash-commands";
|
|
7
7
|
import { OPEN_WORKSTREAM_CONTROL_EVENT } from "../workstream-control-event";
|
|
8
|
-
import { type ChatComposerMessages, type ComposerControlLinks } from "./composer";
|
|
8
|
+
import { type ChatComposerMessages, type ComposerControlLinks, type ResponsiveBasis } from "./composer";
|
|
9
9
|
import { type ComposerTranscriptionControlProps } from "./composer-transcription-control";
|
|
10
10
|
export { OPEN_WORKSTREAM_CONTROL_EVENT };
|
|
11
11
|
export type ChatComposerProps = {
|
|
12
12
|
composer: ComposerState;
|
|
13
|
+
/**
|
|
14
|
+
* Measurement surface for responsive chrome. Defaults to the historical
|
|
15
|
+
* viewport breakpoints; opt into `container` for narrow embedded panels.
|
|
16
|
+
*/
|
|
17
|
+
responsiveBasis?: ResponsiveBasis | undefined;
|
|
13
18
|
/** Canonical workstream control, separate from lifecycle status. */
|
|
14
19
|
effectiveControl?: EffectiveSessionControl | null | undefined;
|
|
15
20
|
/** Waiting prompts already ahead of a normal Send. */
|
|
@@ -59,4 +64,4 @@ export type ChatComposerProps = {
|
|
|
59
64
|
* the public controller and compound primitives exported by the composer
|
|
60
65
|
* subpath, so custom and default layouts share one behavioral implementation.
|
|
61
66
|
*/
|
|
62
|
-
export declare function ChatComposer({ composer, effectiveControl, queuedAheadCount, canControlWorkspace, controlLinks, placeholder, disabled, autoFocus, hint, controlsLeading, controlsStart, actionsStart, attachButtonClassName, transcription, transcriptionClassName, transcriptionSuppressed, header, onPaste, attachments, models, selectedModel, onSelectModel, className, commands, commandContext, onClearView, messages, }: ChatComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
export declare function ChatComposer({ composer, responsiveBasis, effectiveControl, queuedAheadCount, canControlWorkspace, controlLinks, placeholder, disabled, autoFocus, hint, controlsLeading, controlsStart, actionsStart, attachButtonClassName, transcription, transcriptionClassName, transcriptionSuppressed, header, onPaste, attachments, models, selectedModel, onSelectModel, className, commands, commandContext, onClearView, messages, }: ChatComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,10 +5,12 @@ export type ComposerTranscriptionMessages = {
|
|
|
5
5
|
stop: string;
|
|
6
6
|
cancel: string;
|
|
7
7
|
retry: string;
|
|
8
|
+
pauseRetrying: string;
|
|
8
9
|
requestingPermission: string;
|
|
9
10
|
recording: string;
|
|
10
11
|
saving: string;
|
|
11
12
|
transcribing: string;
|
|
13
|
+
retrying: string;
|
|
12
14
|
recovered: string;
|
|
13
15
|
recoveredTranscript: string;
|
|
14
16
|
insertRecoveredTranscript: string;
|
|
@@ -4,9 +4,11 @@ import type { Notice, SlashCommand } from "../commands/types";
|
|
|
4
4
|
import type { ComposerState } from "../hooks/use-composer";
|
|
5
5
|
import type { UseFileAttachmentsResult } from "../hooks/use-file-attachments";
|
|
6
6
|
import { type ConfirmState, type SlashCommandContext } from "../hooks/use-slash-commands";
|
|
7
|
+
import { type ResponsiveBasis } from "../lib/composer-responsive-context";
|
|
7
8
|
import type { PickerModelRow } from "../model-policy";
|
|
8
9
|
import { OPEN_WORKSTREAM_CONTROL_EVENT } from "../workstream-control-event";
|
|
9
10
|
export { OPEN_WORKSTREAM_CONTROL_EVENT };
|
|
11
|
+
export type { ResponsiveBasis } from "../lib/composer-responsive-context";
|
|
10
12
|
export type ComposerDelivery = Pick<ComposerState, "value" | "setValue" | "send" | "steer" | "sending" | "canSend" | "error" | "clearError">;
|
|
11
13
|
export type ComposerDraftState = Pick<ComposerState, "draftConflict" | "draftSaving" | "resolveDraftConflict" | "restoredResources" | "removeRestoredResource">;
|
|
12
14
|
export type ComposerControlState = Pick<ComposerState, "pause" | "pausing" | "resume" | "resumeScope" | "resuming">;
|
|
@@ -227,10 +229,22 @@ export declare function useChatComposer(): ChatComposerContextValue;
|
|
|
227
229
|
export type ComposerRootProps = Omit<ComponentPropsWithoutRef<"div">, "children"> & {
|
|
228
230
|
controller: ChatComposerController;
|
|
229
231
|
children: ReactNode;
|
|
232
|
+
/**
|
|
233
|
+
* Measurement surface for responsive composer chrome. `viewport` preserves
|
|
234
|
+
* the existing breakpoint behavior; `container` responds to this root's
|
|
235
|
+
* inline size and also bounds composer-owned portalled menus to it.
|
|
236
|
+
*/
|
|
237
|
+
responsiveBasis?: ResponsiveBasis | undefined;
|
|
230
238
|
};
|
|
231
239
|
export declare const Root: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & {
|
|
232
240
|
controller: ChatComposerController;
|
|
233
241
|
children: ReactNode;
|
|
242
|
+
/**
|
|
243
|
+
* Measurement surface for responsive composer chrome. `viewport` preserves
|
|
244
|
+
* the existing breakpoint behavior; `container` responds to this root's
|
|
245
|
+
* inline size and also bounds composer-owned portalled menus to it.
|
|
246
|
+
*/
|
|
247
|
+
responsiveBasis?: ResponsiveBasis | undefined;
|
|
234
248
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
235
249
|
export type ComposerFrameProps = ComponentPropsWithoutRef<"div">;
|
|
236
250
|
export declare const Frame: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -8,7 +8,9 @@ export type MachineDetailProps = {
|
|
|
8
8
|
onWindowChange: (w: MetricWindow) => void;
|
|
9
9
|
loadingSeries?: boolean | undefined;
|
|
10
10
|
onBack?: (() => void) | undefined;
|
|
11
|
+
/** Open the workspace-admin removal confirmation for a self-hosted machine. */
|
|
12
|
+
onRemove?: ((machine: MachineView) => void) | undefined;
|
|
11
13
|
now?: number | undefined;
|
|
12
14
|
className?: string | undefined;
|
|
13
15
|
};
|
|
14
|
-
export declare function MachineDetail({ machine, series, window, onWindowChange, loadingSeries, onBack, now, className, }: MachineDetailProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function MachineDetail({ machine, series, window, onWindowChange, loadingSeries, onBack, onRemove, now, className, }: MachineDetailProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,16 +15,16 @@ export type MachinesDashboardProps = {
|
|
|
15
15
|
onOpenDetail?: ((machine: MachineView) => void) | undefined;
|
|
16
16
|
/** Shared clock so freshness/relative times render consistently across cards. */
|
|
17
17
|
now?: number | undefined;
|
|
18
|
-
/** Open the
|
|
18
|
+
/** Open the connection flow (the "Connect a machine" CTA). */
|
|
19
19
|
onEnroll?: (() => void) | undefined;
|
|
20
20
|
onRefresh?: (() => void) | undefined;
|
|
21
21
|
className?: string | undefined;
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
|
-
* The workspace Machines dashboard: the fleet of
|
|
24
|
+
* The workspace Machines dashboard: the fleet of Connected Machines + the
|
|
25
25
|
* session's managed sandbox, each with its connection-status pill, state badges,
|
|
26
26
|
* latest metrics, and an attach/swap affordance. Renders the empty state (no
|
|
27
|
-
* machines →
|
|
27
|
+
* machines → connect CTA), a load error, and the populated grid. The component
|
|
28
28
|
* is purely presentational — feed it `MachinesResponse` data via `useMachines`.
|
|
29
29
|
*/
|
|
30
30
|
export declare function MachinesDashboard({ machines, activeSandboxId, loading, error, onAttach, attachingSandboxId, seriesByMachine, onOpenDetail, now, onEnroll, onRefresh, className, }: MachinesDashboardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SessionEvent, SessionStatus } from "@opengeni/sdk";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
|
-
import { type AgentMessageItem, type AuthNeededItem, type TimelineGroup, type TimelineItem, type ToolRegistry, type TurnSummaryOptions, type UserMessageItem } from "../timeline";
|
|
3
|
+
import { type AgentMessageItem, type AuthNeededItem, type TimelineGroup, type TimelineItem, type RetainedScreenshotLoader, type ToolRegistry, type TurnSummaryOptions, type UserMessageItem } from "../timeline";
|
|
4
4
|
export type MessageTimelineProps = {
|
|
5
5
|
/** Raw session events (projected internally) … */
|
|
6
6
|
events?: SessionEvent[] | undefined;
|
|
@@ -29,6 +29,12 @@ export type MessageTimelineProps = {
|
|
|
29
29
|
* a Reconnect button without a handler to run it.
|
|
30
30
|
*/
|
|
31
31
|
onReconnect?: ((item: AuthNeededItem) => void | Promise<void>) | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Decide which durable authentication notices this timeline presents.
|
|
34
|
+
* Defaults to showing every notice. Embedded hosts can suppress notices for
|
|
35
|
+
* credentials they manage elsewhere without discarding the underlying event.
|
|
36
|
+
*/
|
|
37
|
+
shouldRenderAuthNeeded?: ((item: AuthNeededItem) => boolean) | undefined;
|
|
32
38
|
/**
|
|
33
39
|
* Resolve a provider domain (from a reconnect card) to a logo URL the host
|
|
34
40
|
* serves itself — the app maps it through its catalog + `catalogAssetUrl`.
|
|
@@ -43,6 +49,8 @@ export type MessageTimelineProps = {
|
|
|
43
49
|
* `createDefaultToolRegistry({ entries })` to add custom tool renderers.
|
|
44
50
|
*/
|
|
45
51
|
toolRegistry?: ToolRegistry | undefined;
|
|
52
|
+
/** Resolve opaque retained screenshot receipts through the authenticated host SDK. */
|
|
53
|
+
loadRetainedScreenshot?: RetainedScreenshotLoader | undefined;
|
|
46
54
|
/**
|
|
47
55
|
* Display name of the session's active compute target (Connected Machine or
|
|
48
56
|
* cloud sandbox). When set, exec_command collapsed previews prefix `on {label}`.
|
|
@@ -73,6 +81,8 @@ export type MessageTimelineProps = {
|
|
|
73
81
|
* scrolls the in-memory window.
|
|
74
82
|
*/
|
|
75
83
|
onJumpToLatest?: (() => void | Promise<void>) | undefined;
|
|
84
|
+
/** Host-owned content appended after timeline groups, such as startup progress. */
|
|
85
|
+
trailingState?: ReactNode | undefined;
|
|
76
86
|
emptyState?: ReactNode | undefined;
|
|
77
87
|
className?: string | undefined;
|
|
78
88
|
};
|
|
@@ -82,7 +92,7 @@ export type MessageTimelineProps = {
|
|
|
82
92
|
* cards, goal markers, and status transitions. Owns stick-to-bottom scrolling
|
|
83
93
|
* with a "jump to latest" affordance when the reader scrolls back.
|
|
84
94
|
*/
|
|
85
|
-
export declare function MessageTimeline({ events, items, status: _status, renderMessageText, onOpenSession, onMemoryClick, onReconnect, resolveProviderLogo, toolRegistry, computeLabel, turnSummary, autoFollow, hasOlder, loadingOlder, onLoadOlder, onJumpToStart, loadingOldest, hasNewer, loadingNewer, onLoadNewer, onJumpToLatest, emptyState, className, }: MessageTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
export declare function MessageTimeline({ events, items, status: _status, renderMessageText, onOpenSession, onMemoryClick, onReconnect, shouldRenderAuthNeeded, resolveProviderLogo, toolRegistry, loadRetainedScreenshot, computeLabel, turnSummary, autoFollow, hasOlder, loadingOlder, onLoadOlder, onJumpToStart, loadingOldest, hasNewer, loadingNewer, onLoadNewer, onJumpToLatest, trailingState, emptyState, className, }: MessageTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
86
96
|
/**
|
|
87
97
|
* Settled turns lift the final agent answer out as a sibling group. Include it
|
|
88
98
|
* in "Copy turn" when present so the chip copies the full assistant reply.
|
|
@@ -3,8 +3,8 @@ import type { UseSandboxGitResult } from "../hooks/use-sandbox-git";
|
|
|
3
3
|
export type SandboxFilesProps = {
|
|
4
4
|
/** From `useSandboxFiles(...)`. */
|
|
5
5
|
files: UseSandboxFilesResult;
|
|
6
|
-
/**
|
|
7
|
-
git
|
|
6
|
+
/** Compatibility fallback for callers that have not yet adopted `files.gitSummary`. */
|
|
7
|
+
git?: UseSandboxGitResult | undefined;
|
|
8
8
|
/** @deprecated Diffs live in the dedicated Changes tab now; accepted for
|
|
9
9
|
* source-compat but unused (the Files surface is a browser + viewer). */
|
|
10
10
|
stagedGit?: UseSandboxGitResult | undefined;
|
|
@@ -82,6 +82,35 @@ export type SandboxTerminalProps = {
|
|
|
82
82
|
onActivate?: (() => void) | undefined;
|
|
83
83
|
className?: string | undefined;
|
|
84
84
|
};
|
|
85
|
+
type XtermLike = {
|
|
86
|
+
open: (el: HTMLElement) => void;
|
|
87
|
+
write: (data: string) => void;
|
|
88
|
+
clear: () => void;
|
|
89
|
+
onData: (cb: (data: string) => void) => {
|
|
90
|
+
dispose: () => void;
|
|
91
|
+
};
|
|
92
|
+
onResize: (cb: (size: {
|
|
93
|
+
cols: number;
|
|
94
|
+
rows: number;
|
|
95
|
+
}) => void) => {
|
|
96
|
+
dispose: () => void;
|
|
97
|
+
};
|
|
98
|
+
loadAddon: (addon: unknown) => void;
|
|
99
|
+
dispose: () => void;
|
|
100
|
+
cols: number;
|
|
101
|
+
rows: number;
|
|
102
|
+
options: {
|
|
103
|
+
theme?: XtermTheme;
|
|
104
|
+
disableStdin?: boolean;
|
|
105
|
+
cursorBlink?: boolean;
|
|
106
|
+
fontFamily?: string;
|
|
107
|
+
fontSize?: number;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
/** Clear the transient wake line and put the first live prompt at cell 1,1.
|
|
111
|
+
* `Terminal.clear()` removes scrollback but deliberately preserves the cursor,
|
|
112
|
+
* which lets the first PTY frame append to the old wake message. */
|
|
113
|
+
export declare function clearTerminalBootStatus(term: Pick<XtermLike, "write">): void;
|
|
85
114
|
/** Debug seam (dev/evidence only, never a typed public API): a global hook the
|
|
86
115
|
* screenshot harness reads to probe the settled renderer tier + resolved font
|
|
87
116
|
* without mounting a real WebGL context in unit tests. */
|
|
@@ -57,6 +57,8 @@ export type UseSandboxWorkspaceTabsOptions = ClientOverride & {
|
|
|
57
57
|
/** Override the source-driven default tab (e.g. a host landing tab id). When
|
|
58
58
|
* omitted the workbench picks Changes-vs-Files from capture or live Git. */
|
|
59
59
|
initialTab?: string | null | undefined;
|
|
60
|
+
/** Actually selected dock tab. Inactive data surfaces retain cache but issue no live reads. */
|
|
61
|
+
activeTab?: string | null | undefined;
|
|
60
62
|
/** Host-routed notifications (mutation errors, desktop-consent failures). The
|
|
61
63
|
* package never imports a toast library — the host decides how to surface. */
|
|
62
64
|
onNotify?: ((notification: WorkspaceNotification) => void) | undefined;
|
|
@@ -109,6 +111,8 @@ export type SandboxWorkspaceProps = ClientOverride & {
|
|
|
109
111
|
/** Controlled collapsed state for hosts with their own dock toggle. */
|
|
110
112
|
collapsed?: boolean | undefined;
|
|
111
113
|
onCollapsedChange?: ((collapsed: boolean) => void) | undefined;
|
|
114
|
+
/** Keep the dock's built-in collapse control with controlled collapsed state. */
|
|
115
|
+
showCollapseControl?: boolean | undefined;
|
|
112
116
|
/** Host navigation shown only in the phone workspace overlay header. */
|
|
113
117
|
mobileLeadingControl?: ReactNode | undefined;
|
|
114
118
|
autoSaveId?: string | undefined;
|
|
@@ -121,7 +125,7 @@ export type SandboxWorkspaceProps = ClientOverride & {
|
|
|
121
125
|
* The whole session workspace, ready to mount: `<SandboxWorkspace>` assembles the
|
|
122
126
|
* capability-gated tabs, pins the machine-state chip in the dock header, and
|
|
123
127
|
* renders the resizable `<WorkspaceDock>`. Wrap the tree in `<OpenGeniProvider>`
|
|
124
|
-
* (client + workspaceId) and import `@opengeni/react/
|
|
128
|
+
* (client + workspaceId) and import `@opengeni/react/compiled.css`; that is the
|
|
125
129
|
* entire integration (see `docs/embedding-workbench.md`).
|
|
126
130
|
*/
|
|
127
131
|
export declare function SandboxWorkspace(props: SandboxWorkspaceProps): ReactNode;
|
|
@@ -17,6 +17,8 @@ export type WorkspaceDockProps = {
|
|
|
17
17
|
/** Controlled collapsed state for hosts that expose their own dock toggle. */
|
|
18
18
|
collapsed?: boolean | undefined;
|
|
19
19
|
onCollapsedChange?: ((collapsed: boolean) => void) | undefined;
|
|
20
|
+
/** Keep the built-in collapse control when the host controls collapsed state. */
|
|
21
|
+
showCollapseControl?: boolean | undefined;
|
|
20
22
|
/** A status accessory pinned to the right of the tab strip, left of the
|
|
21
23
|
* maximize/collapse controls (e.g. the machine-state chip). Renders in both
|
|
22
24
|
* the docked header and the full-screen overlay header. */
|
|
@@ -32,4 +34,4 @@ export type WorkspaceDockProps = {
|
|
|
32
34
|
maxSize?: number | undefined;
|
|
33
35
|
className?: string | undefined;
|
|
34
36
|
};
|
|
35
|
-
export declare function WorkspaceDock({ primary, tabs, activeTab, onActiveTabChange, collapsed: collapsedProp, onCollapsedChange, headerAccessory, mobileLeadingControl, autoSaveId, defaultSize, minSize, maxSize, className, }: WorkspaceDockProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare function WorkspaceDock({ primary, tabs, activeTab, onActiveTabChange, collapsed: collapsedProp, onCollapsedChange, showCollapseControl, headerAccessory, mobileLeadingControl, autoSaveId, defaultSize, minSize, maxSize, className, }: WorkspaceDockProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/composer.d.ts
CHANGED
|
@@ -7,10 +7,10 @@ export { OPEN_WORKSTREAM_CONTROL_EVENT } from "./workstream-control-event";
|
|
|
7
7
|
export { BillingClassMark, ModelPolicyPicker, ModelPolicyPickerMenu, PickerAnimatedPage, PickerBackHeader, PickerNavRow, defaultModelPolicyPickerMessages, } from "./components/model-policy-picker";
|
|
8
8
|
export type { ModelPolicyPickerMessages, ModelPolicyPickerProps, } from "./components/model-policy-picker";
|
|
9
9
|
export { Actions, AttachButton, Attachments, CommandPalette, Confirmation, Controls, Footer, Frame, Help, Hint, Input, ModelPicker, PauseButton, PausedState, RestoredResources, Root, SendButton, Status, Surface, defaultChatComposerMessages, useChatComposer, useChatComposerController, } from "./components/composer";
|
|
10
|
-
export type { ChatComposerController, ChatComposerContextValue, ChatComposerMessages, ComposerActionsProps, ComposerAttachButtonProps, ComposerCommandPaletteProps, ComposerControlLinks, ComposerControlState, ComposerControlsProps, ComposerDelivery, ComposerDraftState, ComposerFooterProps, ComposerFrameProps, ComposerHintProps, ComposerInputProps, ComposerModelPickerProps, ComposerPauseButtonProps, ComposerRootProps, ComposerSendButtonProps, ComposerSubmitBlocker, ComposerSubmitMode, ComposerSurfaceProps, UseChatComposerControllerOptions, } from "./components/composer";
|
|
10
|
+
export type { ChatComposerController, ChatComposerContextValue, ChatComposerMessages, ComposerActionsProps, ComposerAttachButtonProps, ComposerCommandPaletteProps, ComposerControlLinks, ComposerControlState, ComposerControlsProps, ComposerDelivery, ComposerDraftState, ComposerFooterProps, ComposerFrameProps, ComposerHintProps, ComposerInputProps, ComposerModelPickerProps, ComposerPauseButtonProps, ComposerRootProps, ComposerSendButtonProps, ComposerSubmitBlocker, ComposerSubmitMode, ComposerSurfaceProps, ResponsiveBasis, UseChatComposerControllerOptions, } from "./components/composer";
|
|
11
11
|
export { ComposerTranscriptionControl } from "./components/composer-transcription-control";
|
|
12
12
|
export type { ComposerTranscriptionControlProps, ComposerTranscriptionMessages, } from "./components/composer-transcription-control";
|
|
13
13
|
export { VOICE_RECORDING_CLIENT_MAX_DURATION_SECONDS, VOICE_RECORDING_OWNER_HEARTBEAT_MILLISECONDS, VOICE_RECORDING_OWNER_STALE_MILLISECONDS, VOICE_RECORDING_TIMESLICE_MILLISECONDS, useVoiceInput, } from "./hooks/use-voice-input";
|
|
14
14
|
export type { UseVoiceInputOptions, UseVoiceInputResult, VoiceInputStatus, } from "./hooks/use-voice-input";
|
|
15
15
|
export { IndexedDbVoiceRecordingStore, VoiceRecordingChunkConflictError, VoiceRecordingChunkSequenceError, VoiceRecordingNotFoundError, VoiceRecordingOwnedError, VoiceRecordingStorageUnavailableError, createVoiceRecordingManifest, planVoiceRecordingChunkCommit, prepareVoiceRecordingChunk, } from "./voice-recording-store";
|
|
16
|
-
export type { PersistVoiceRecordingChunkInput, PersistVoiceRecordingChunkResult, VoiceRecordingCaptureState, VoiceRecordingChunk, VoiceRecordingChunkUploadState, VoiceRecordingFinalizationState, VoiceRecordingManifest, VoiceRecordingStore, VoiceRecordingTranscriptionState, VoiceRecordingUploadState, } from "./voice-recording-store";
|
|
16
|
+
export type { PersistVoiceRecordingChunkInput, PersistVoiceRecordingChunkResult, VoiceRecordingCaptureState, VoiceRecordingChunk, VoiceRecordingChunkUploadState, VoiceRecordingFinalizationState, VoiceRecordingHandoffMode, VoiceRecordingManifest, VoiceRecordingRecoveryMode, VoiceRecordingStore, VoiceRecordingTranscriptionState, VoiceRecordingUploadState, } from "./voice-recording-store";
|
package/dist/composer.js
CHANGED
|
@@ -37,9 +37,9 @@ import {
|
|
|
37
37
|
useChatComposer,
|
|
38
38
|
useChatComposerController,
|
|
39
39
|
useVoiceInput
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-NJ7M2B6Z.js";
|
|
41
|
+
import "./chunk-FWXGSNXT.js";
|
|
42
|
+
import "./chunk-KZ73RL76.js";
|
|
43
43
|
import {
|
|
44
44
|
BillingClassMark,
|
|
45
45
|
ModelPolicyPicker,
|
|
@@ -48,12 +48,12 @@ import {
|
|
|
48
48
|
PickerBackHeader,
|
|
49
49
|
PickerNavRow,
|
|
50
50
|
defaultModelPolicyPickerMessages
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-WYA65Y3F.js";
|
|
52
52
|
import "./chunk-EKZH6IDG.js";
|
|
53
53
|
import "./chunk-23EJ676W.js";
|
|
54
|
-
import "./chunk-
|
|
54
|
+
import "./chunk-FK6VG4LL.js";
|
|
55
55
|
import "./chunk-LAKLF4PA.js";
|
|
56
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-VZTQ73XT.js";
|
|
57
57
|
import "./chunk-22KP6LR5.js";
|
|
58
58
|
export {
|
|
59
59
|
Actions,
|
package/dist/hooks/internal.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { SessionEvent } from "@opengeni/sdk";
|
|
2
2
|
import type { EmbeddedSessionEventClientLike } from "../client";
|
|
3
|
+
/**
|
|
4
|
+
* Keep live browser work active while the page is visible, then suspend it
|
|
5
|
+
* after a short hidden-tab grace period. Returning to the page re-enables the
|
|
6
|
+
* caller, which must reconcile durable state before resuming live delivery.
|
|
7
|
+
*/
|
|
8
|
+
export declare function usePageLiveActivity(hiddenGraceMs?: number): boolean;
|
|
3
9
|
export type AsyncListState<T> = {
|
|
4
10
|
data: T | null;
|
|
5
11
|
loading: boolean;
|
|
@@ -63,7 +63,7 @@ export type UseCodexAccountsResult = {
|
|
|
63
63
|
* The workspace's Codex accounts + the per-workspace active pointer + (when
|
|
64
64
|
* session-scoped) the session pin and last-ran-on account. Composed like
|
|
65
65
|
* `useMachines`: slow polling (the realtime work is done by the
|
|
66
|
-
* `codex.account.switched`
|
|
66
|
+
* `codex.account.switched` event trigger) + a `pin` mutation.
|
|
67
67
|
* Dual-consumer safe via the structural `CodexAccountsClientLike` surface.
|
|
68
68
|
*/
|
|
69
69
|
export declare function useCodexAccounts(options?: UseCodexAccountsOptions): UseCodexAccountsResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreateVariableSetRequest, UpdateVariableSetRequest, VariableSet, VariableSetVariableMetadata } from "@opengeni/sdk";
|
|
1
|
+
import type { CreateVariableSetRequest, UpdateVariableSetRequest, VariableSet, VariableSetSecret, VariableSetVariableMetadata } from "@opengeni/sdk";
|
|
2
2
|
import { type ClientOverride } from "../provider";
|
|
3
3
|
export type UseVariableSetsOptions = ClientOverride & {
|
|
4
4
|
pollIntervalMs?: number | undefined;
|
|
@@ -12,7 +12,12 @@ export type UseVariableSetsResult = {
|
|
|
12
12
|
create: (request: CreateVariableSetRequest) => Promise<VariableSet | null>;
|
|
13
13
|
update: (variableSetId: string, request: UpdateVariableSetRequest) => Promise<VariableSet | null>;
|
|
14
14
|
remove: (variableSetId: string) => Promise<boolean>;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Read one exact value through the dedicated permissioned API. The hook never
|
|
17
|
+
* puts plaintext in its polled variable-set cache.
|
|
18
|
+
*/
|
|
19
|
+
readVariable: (variableSetId: string, name: string) => Promise<VariableSetSecret | null>;
|
|
20
|
+
/** Set/rotate a variable. Generic reads expose metadata only. */
|
|
16
21
|
setVariable: (variableSetId: string, name: string, value: string) => Promise<VariableSetVariableMetadata | null>;
|
|
17
22
|
deleteVariable: (variableSetId: string, name: string) => Promise<boolean>;
|
|
18
23
|
mutating: boolean;
|
|
@@ -21,8 +26,9 @@ export type UseVariableSetsResult = {
|
|
|
21
26
|
};
|
|
22
27
|
/**
|
|
23
28
|
* Variable sets (named, encrypted variable sets attached to sessions
|
|
24
|
-
* and scheduled tasks).
|
|
25
|
-
*
|
|
29
|
+
* and scheduled tasks). Generic reads stay metadata-only. A dedicated,
|
|
30
|
+
* permissioned method can retrieve one value and returns it directly without
|
|
31
|
+
* adding plaintext to hook state or polling caches.
|
|
26
32
|
*/
|
|
27
33
|
export declare function useVariableSets(options?: UseVariableSetsOptions): UseVariableSetsResult;
|
|
28
34
|
/** @deprecated use UseVariableSetsOptions */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RemoveEnrollmentRequest, RemoveEnrollmentResponse } from "@opengeni/sdk";
|
|
1
2
|
import { type ClientOverride } from "../provider";
|
|
2
3
|
import type { MachinesResponse, MachineView, MetricSample } from "../types/machines";
|
|
3
4
|
/**
|
|
@@ -26,6 +27,8 @@ export type MachinesClientLike = {
|
|
|
26
27
|
machineMetricsSeries?: (workspaceId: string, enrollmentId: string, options?: {
|
|
27
28
|
window?: "15m" | "1h" | "6h" | "24h";
|
|
28
29
|
}) => Promise<MetricSample[]>;
|
|
30
|
+
/** POST .../enrollments/:enrollmentId/revoke — workspace-admin removal. */
|
|
31
|
+
removeEnrollment?: (workspaceId: string, enrollmentId: string, request?: RemoveEnrollmentRequest) => Promise<RemoveEnrollmentResponse>;
|
|
29
32
|
/**
|
|
30
33
|
* POST .../sessions/:sessionId/active-sandbox — swap the session's active
|
|
31
34
|
* sandbox to a machine. The default swap path; the real SDK client provides it.
|
|
@@ -60,6 +63,10 @@ export type UseMachinesResult = {
|
|
|
60
63
|
refresh: () => Promise<void>;
|
|
61
64
|
/** Attach/swap the session's active sandbox to a machine (returns the new pointer). */
|
|
62
65
|
attach: (sandboxId: string) => Promise<boolean>;
|
|
66
|
+
/** Remove a self-hosted enrollment while retaining history. */
|
|
67
|
+
remove: (enrollmentId: string, request?: RemoveEnrollmentRequest) => Promise<RemoveEnrollmentResponse | null>;
|
|
68
|
+
canRemove: boolean;
|
|
69
|
+
removingEnrollmentId: string | null;
|
|
63
70
|
/** Whether the host wired an attach/swap path (drives the card affordance). */
|
|
64
71
|
canAttach: boolean;
|
|
65
72
|
/** Fetch a downsampled metric series for one enrolled machine. */
|
|
@@ -48,6 +48,10 @@ export type UseSandboxFilesOptions = ClientOverride & {
|
|
|
48
48
|
rootPath?: string | undefined;
|
|
49
49
|
/** Hold off the initial list (e.g. panel collapsed). Default true. */
|
|
50
50
|
enabled?: boolean | undefined;
|
|
51
|
+
/** Pause live reads/invalidation while preserving the last rendered result. */
|
|
52
|
+
active?: boolean | undefined;
|
|
53
|
+
/** Repository roots advertised by capabilities, relative to the workspace. */
|
|
54
|
+
repoPaths?: readonly string[] | undefined;
|
|
51
55
|
/** The lease liveness ("cold" | "warm" | "draining"). The structured FileSystem
|
|
52
56
|
* capability is advertised even on a COLD box, so the mount-time list can race
|
|
53
57
|
* the box: it lists before the box is warm, gets an empty/errored result, and
|
|
@@ -90,14 +94,29 @@ export type UseSandboxFilesResult = {
|
|
|
90
94
|
}) => Promise<void>;
|
|
91
95
|
/** Re-list the whole tree from the root. */
|
|
92
96
|
refresh: () => Promise<void>;
|
|
97
|
+
/** Monotonic invalidation token for open file previews. Advances when an
|
|
98
|
+
* external filesystem change or completed agent tool may have changed bytes. */
|
|
99
|
+
contentRevision?: number | undefined;
|
|
93
100
|
/** Which source the tree is currently served from: the live box, the turn-end
|
|
94
101
|
* capture (cold/offline), or neither yet. M5's source badge reads this. */
|
|
95
102
|
source: "live" | "capture" | null;
|
|
96
103
|
/** When the served capture was taken (ISO), when `source === "capture"`. */
|
|
97
104
|
capturedAt: string | null;
|
|
105
|
+
/** Lightweight repository context loaded by the same status request that tints files. */
|
|
106
|
+
gitSummary?: SandboxFilesGitSummary | null | undefined;
|
|
107
|
+
/** True only while the initial repository-status overlay is still loading. */
|
|
108
|
+
gitLoading?: boolean | undefined;
|
|
98
109
|
loading: boolean;
|
|
99
110
|
error: Error | null;
|
|
100
111
|
};
|
|
112
|
+
export type SandboxFilesGitSummary = {
|
|
113
|
+
branch: string | null;
|
|
114
|
+
isRepo: boolean;
|
|
115
|
+
repoCount: number;
|
|
116
|
+
ahead: number;
|
|
117
|
+
behind: number;
|
|
118
|
+
dirtyCount: number;
|
|
119
|
+
};
|
|
101
120
|
/**
|
|
102
121
|
* Project the FileSystem service into a lazy-loaded Pierre tree. The initial
|
|
103
122
|
* list pulls one level (depth 1); `expand(path)` lists a directory's immediate
|
|
@@ -11,8 +11,14 @@ export type UseSandboxGitOptions = ClientOverride & {
|
|
|
11
11
|
repoPaths?: readonly string[] | undefined;
|
|
12
12
|
/** Diff the staged index vs HEAD (`--cached`) instead of the working tree. */
|
|
13
13
|
staged?: boolean | undefined;
|
|
14
|
+
/** Review scope. `branch` compares the current branch with the remote default
|
|
15
|
+
* branch, `working` shows uncommitted edits, and `staged` shows the index.
|
|
16
|
+
* `staged` above remains as a compatibility alias. */
|
|
17
|
+
comparison?: SandboxGitComparison | undefined;
|
|
14
18
|
/** Hold off the initial fetch. Default true. */
|
|
15
19
|
enabled?: boolean | undefined;
|
|
20
|
+
/** Pause live reads/invalidation while preserving the last rendered result. */
|
|
21
|
+
active?: boolean | undefined;
|
|
16
22
|
/** Lease liveness ("warm" | "draining" | "cold"). When NOT warm, the diff is
|
|
17
23
|
* served from the capture (cold/offline) instead of a live `gitDiff` RPC. */
|
|
18
24
|
liveness?: string | undefined;
|
|
@@ -21,6 +27,7 @@ export type UseSandboxGitOptions = ClientOverride & {
|
|
|
21
27
|
* surface in place if the live request is temporarily unavailable. */
|
|
22
28
|
capture?: WorkspaceCaptureManifest | null | undefined;
|
|
23
29
|
};
|
|
30
|
+
export type SandboxGitComparison = "branch" | "working" | "staged";
|
|
24
31
|
/** A Git diff qualified into workspace scope. `repoRoot` is present for the
|
|
25
32
|
* workspace-wide path and lets review UI group real repositories without
|
|
26
33
|
* guessing from the first path segment. */
|
|
@@ -53,7 +53,7 @@ export type UseTranscriptionOptions = {
|
|
|
53
53
|
disabled?: boolean | undefined;
|
|
54
54
|
createLocalSessionId?: (() => string) | undefined;
|
|
55
55
|
lifecycleTimeouts?: Partial<TranscriptionLifecycleTimeouts> | undefined;
|
|
56
|
-
/** Receives
|
|
56
|
+
/** Receives the exact diagnostic emitted by the transcription transport. */
|
|
57
57
|
onDiagnostic?: ((diagnostic: TranscriptionDiagnostic) => void) | undefined;
|
|
58
58
|
};
|
|
59
59
|
export type TranscriptionLifecycleTimeouts = {
|
|
@@ -70,4 +70,4 @@ export type UseTranscriptionResult = {
|
|
|
70
70
|
};
|
|
71
71
|
export declare function useTranscription({ adapter, policy, selection, value, setValue, focusInput, disabled, createLocalSessionId, lifecycleTimeouts, onDiagnostic, }: UseTranscriptionOptions): UseTranscriptionResult;
|
|
72
72
|
export declare function normalizeTranscriptionErrorCode(code: unknown): TranscriptionErrorCode;
|
|
73
|
-
export declare function
|
|
73
|
+
export declare function normalizeTranscriptionDiagnostic(diagnostic: unknown): TranscriptionDiagnostic;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ClientVoiceInputConfig, type OpenGeniClient } from "@opengeni/sdk";
|
|
2
2
|
import { type VoiceRecordingStore } from "../voice-recording-store";
|
|
3
|
-
export type VoiceInputStatus = "idle" | "requesting-permission" | "recording" | "saving" | "transcribing" | "recovered" | "transcript-ready" | "error";
|
|
3
|
+
export type VoiceInputStatus = "idle" | "requesting-permission" | "recording" | "saving" | "transcribing" | "retrying" | "recovered" | "transcript-ready" | "error";
|
|
4
4
|
export type UseVoiceInputOptions = {
|
|
5
|
-
client:
|
|
5
|
+
client: VoiceInputClient | null;
|
|
6
6
|
workspaceId: string;
|
|
7
7
|
capability: ClientVoiceInputConfig | null;
|
|
8
8
|
enabled: boolean;
|
|
@@ -15,7 +15,11 @@ export type UseVoiceInputOptions = {
|
|
|
15
15
|
createRecordingId?: (() => string) | undefined;
|
|
16
16
|
createOwnerId?: (() => string) | undefined;
|
|
17
17
|
now?: (() => Date) | undefined;
|
|
18
|
+
/** Test/embed seam. Production uses bounded exponential recovery backoff. */
|
|
19
|
+
automaticRetryDelayMilliseconds?: number | undefined;
|
|
18
20
|
};
|
|
21
|
+
type ResumableVoiceInputClient = Pick<OpenGeniClient, "createTranscriptionRecording" | "getTranscriptionRecording" | "uploadTranscriptionRecordingChunk" | "finalizeTranscriptionRecording" | "processNextTranscriptionRecordingSegment" | "discardTranscriptionRecording">;
|
|
22
|
+
type VoiceInputClient = Pick<OpenGeniClient, "transcribeAudio"> & Partial<ResumableVoiceInputClient>;
|
|
19
23
|
export type UseVoiceInputResult = {
|
|
20
24
|
status: VoiceInputStatus;
|
|
21
25
|
error: string | null;
|
|
@@ -43,4 +47,9 @@ export declare const VOICE_RECORDING_TIMESLICE_MILLISECONDS = 5000;
|
|
|
43
47
|
export declare const VOICE_RECORDING_OWNER_HEARTBEAT_MILLISECONDS = 5000;
|
|
44
48
|
export declare const VOICE_RECORDING_OWNER_STALE_MILLISECONDS = 30000;
|
|
45
49
|
export declare const VOICE_RECORDING_CLIENT_MAX_DURATION_SECONDS = 600;
|
|
46
|
-
export declare
|
|
50
|
+
export declare const VOICE_RECORDING_RESUMABLE_CLIENT_MAX_DURATION_SECONDS: number;
|
|
51
|
+
export declare const VOICE_RECORDING_RECOVERY_STATUS_POLL_MILLISECONDS = 2000;
|
|
52
|
+
export declare const VOICE_RECORDING_RECOVERY_MAX_MUTATION_DELAY_MILLISECONDS = 30000;
|
|
53
|
+
export declare function transcriptionRecoveryMutationDelayMilliseconds(retryAfterMilliseconds: number | undefined, attempt: number, random?: () => number): number;
|
|
54
|
+
export declare function useVoiceInput({ client, workspaceId, capability, enabled, value, setValue, focusInput, disabled, createRecordingStore, createRecordingId, createOwnerId, now, automaticRetryDelayMilliseconds, }: UseVoiceInputOptions): UseVoiceInputResult;
|
|
55
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { OpenGeniProvider } from "./provider";
|
|
|
3
3
|
export type { OpenGeniProviderProps } from "./provider";
|
|
4
4
|
export { useOpenGeni, useOpenGeniClient } from "./session-context";
|
|
5
5
|
export type { ClientOverride, OpenGeniContextValue } from "./session-context";
|
|
6
|
+
export { usePageLiveActivity } from "./hooks/internal";
|
|
6
7
|
export { useSession, isTitleEvent } from "./hooks/use-session";
|
|
7
8
|
export type { UseSessionOptions, UseSessionResult } from "./hooks/use-session";
|
|
8
9
|
export { SESSION_EVENT_BROWSER_MAX_BYTES, SESSION_EVENT_BROWSER_MAX_COUNT, SESSION_EVENT_BROWSER_PENDING_MAX_BYTES, SESSION_EVENT_BROWSER_PENDING_MAX_COUNT, SESSION_EVENT_BROWSER_SINGLE_EVENT_MAX_BYTES, boundBrowserSessionEventWindow, useSessionEvents, } from "./hooks/use-session-events";
|
|
@@ -12,7 +13,7 @@ export type { ComposerSendExtras, ComposerState, UseComposerOptions } from "./ho
|
|
|
12
13
|
export { VOICE_RECORDING_CLIENT_MAX_DURATION_SECONDS, VOICE_RECORDING_OWNER_HEARTBEAT_MILLISECONDS, VOICE_RECORDING_OWNER_STALE_MILLISECONDS, VOICE_RECORDING_TIMESLICE_MILLISECONDS, useVoiceInput, } from "./hooks/use-voice-input";
|
|
13
14
|
export type { UseVoiceInputOptions, UseVoiceInputResult, VoiceInputStatus, } from "./hooks/use-voice-input";
|
|
14
15
|
export { IndexedDbVoiceRecordingStore, VoiceRecordingChunkConflictError, VoiceRecordingChunkSequenceError, VoiceRecordingNotFoundError, VoiceRecordingOwnedError, VoiceRecordingStorageUnavailableError, createVoiceRecordingManifest, planVoiceRecordingChunkCommit, prepareVoiceRecordingChunk, } from "./voice-recording-store";
|
|
15
|
-
export type { PersistVoiceRecordingChunkInput, PersistVoiceRecordingChunkResult, VoiceRecordingCaptureState, VoiceRecordingChunk, VoiceRecordingChunkUploadState, VoiceRecordingFinalizationState, VoiceRecordingManifest, VoiceRecordingStore, VoiceRecordingTranscriptionState, VoiceRecordingUploadState, } from "./voice-recording-store";
|
|
16
|
+
export type { PersistVoiceRecordingChunkInput, PersistVoiceRecordingChunkResult, VoiceRecordingCaptureState, VoiceRecordingChunk, VoiceRecordingChunkUploadState, VoiceRecordingFinalizationState, VoiceRecordingHandoffMode, VoiceRecordingManifest, VoiceRecordingRecoveryMode, VoiceRecordingStore, VoiceRecordingTranscriptionState, VoiceRecordingUploadState, } from "./voice-recording-store";
|
|
16
17
|
export { COMPOSER_PAYMENT_REQUIRED_MESSAGE, composerSubmissionErrorMessage } from "./lib/format";
|
|
17
18
|
export { INITIAL_TRANSCRIPTION_CONTROL_STATE, appendFinalTranscript, transitionTranscriptionControl, useTranscription, } from "./hooks/use-transcription";
|
|
18
19
|
export type { TranscriptionControlAction, TranscriptionControlState, TranscriptionControlTransition, UseTranscriptionOptions, UseTranscriptionResult, } from "./hooks/use-transcription";
|
|
@@ -63,9 +64,9 @@ export type { TerminalStreamStatus, UseTerminalStreamOptions, UseTerminalStreamR
|
|
|
63
64
|
export { useSandboxTerminal } from "./hooks/use-sandbox-terminal";
|
|
64
65
|
export type { TerminalChunk, UseSandboxTerminalOptions, UseSandboxTerminalResult, } from "./hooks/use-sandbox-terminal";
|
|
65
66
|
export { CapturedFileUnavailableError, FileWriteConflictError, useSandboxFiles, } from "./hooks/use-sandbox-files";
|
|
66
|
-
export type { CapturedFileUnavailableReason, FileTreeNode, FileTreeStatus, SandboxWriteFileOptions, UseSandboxFilesOptions, UseSandboxFilesResult, } from "./hooks/use-sandbox-files";
|
|
67
|
+
export type { CapturedFileUnavailableReason, FileTreeNode, FileTreeStatus, SandboxFilesGitSummary, SandboxWriteFileOptions, UseSandboxFilesOptions, UseSandboxFilesResult, } from "./hooks/use-sandbox-files";
|
|
67
68
|
export { useSandboxGit } from "./hooks/use-sandbox-git";
|
|
68
|
-
export type { SandboxGitFileDiff, UseSandboxGitOptions, UseSandboxGitResult, } from "./hooks/use-sandbox-git";
|
|
69
|
+
export type { SandboxGitComparison, SandboxGitFileDiff, UseSandboxGitOptions, UseSandboxGitResult, } from "./hooks/use-sandbox-git";
|
|
69
70
|
export { useWorkspaceCapture } from "./hooks/use-workspace-capture";
|
|
70
71
|
export type { UseWorkspaceCaptureOptions, UseWorkspaceCaptureResult, } from "./hooks/use-workspace-capture";
|
|
71
72
|
export { useWorkspaceEdit } from "./hooks/use-workspace-edit";
|
|
@@ -90,7 +91,7 @@ export { createDefaultToolRegistry, createToolRegistry, defaultToolRegistry, raw
|
|
|
90
91
|
export type { CreateToolRegistryOptions, ToolRegistry, ToolRegistryEntry, ToolRenderer, ToolRendererProps, } from "./timeline";
|
|
91
92
|
export { ActivityDisclosure, ActivityRail, BodyNote, DisclosureDefaultsProvider, LightboxProvider, MediaEmpty, MediaSkeleton, PayloadBlock, ScreenshotFigure, TermBlock, Thumbnail, TurnSummary, BUILT_IN_TURN_SUMMARY_FACET_IDS, useLightbox, useLightboxOptional, } from "./timeline";
|
|
92
93
|
export type { ActivityDisclosureProps, ActivityRailProps, DisclosureChip, BuiltInTurnSummaryFacetId, TurnOutcome, TurnSummaryContext, TurnSummaryFacet, TurnSummaryFacetConfiguration, TurnSummaryFacetResult, TurnSummaryOptions, TurnSummaryProps, } from "./timeline";
|
|
93
|
-
export { applyPatchOps, applyPatchOpsFromToolItem, controlCaret, execTruncated, isApplyPatch, isExecSessionLostBanner, looksBinary, parseExecBannerSessionId, parseFreeformApplyPatch, parseToolArgs,
|
|
94
|
+
export { applyPatchOps, applyPatchOpsFromToolItem, controlCaret, execTruncated, isApplyPatch, isExecSessionLostBanner, looksBinary, parseExecBannerSessionId, parseFreeformApplyPatch, parseToolArgs, sandboxCommandExitCode, stripExecBanner, tailPeek, unwrapMcpOutput, v4aToGitFileDiff, } from "./timeline";
|
|
94
95
|
export type { ApplyPatchOperation } from "./timeline";
|
|
95
96
|
export { argHint, defaultCommands, filterCommands, firstMissingRequiredArg, hasPermission, matchCommand, parseCommandLine, } from "./commands/registry";
|
|
96
97
|
export type { ParsedCommandLine } from "./commands/registry";
|
|
@@ -104,7 +105,7 @@ export type { ChatComposerProps } from "./components/chat-composer";
|
|
|
104
105
|
export { ComposerTranscriptionControl } from "./components/composer-transcription-control";
|
|
105
106
|
export type { ComposerTranscriptionControlProps, ComposerTranscriptionMessages, } from "./components/composer-transcription-control";
|
|
106
107
|
export { defaultChatComposerMessages } from "./components/composer";
|
|
107
|
-
export type { ChatComposerMessages } from "./components/composer";
|
|
108
|
+
export type { ChatComposerMessages, ResponsiveBasis } from "./components/composer";
|
|
108
109
|
export { ModelPicker } from "./components/model-picker";
|
|
109
110
|
export type { ModelPickerProps } from "./components/model-picker";
|
|
110
111
|
export { BillingClassMark, ModelPolicyPicker, ModelPolicyPickerMenu, PickerAnimatedPage, PickerBackHeader, PickerNavRow, defaultModelPolicyPickerMessages, } from "./components/model-policy-picker";
|