@opengeni/react 0.46.1 → 0.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +158 -14
- package/dist/artifacts-document.d.ts +3 -0
- package/dist/artifacts-document.js +17 -0
- package/dist/artifacts-document.js.map +1 -0
- package/dist/artifacts-presentation.d.ts +3 -0
- package/dist/artifacts-presentation.js +17 -0
- package/dist/artifacts-presentation.js.map +1 -0
- package/dist/artifacts-spreadsheet.d.ts +3 -0
- package/dist/artifacts-spreadsheet.js +17 -0
- package/dist/artifacts-spreadsheet.js.map +1 -0
- package/dist/artifacts.d.ts +2 -0
- package/dist/artifacts.js +170 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/chunk-6BBWWOOU.js +82 -0
- package/dist/chunk-6BBWWOOU.js.map +1 -0
- package/dist/{chunk-HFO4ERGQ.js → chunk-724BW4TW.js} +586 -35
- package/dist/chunk-724BW4TW.js.map +1 -0
- package/dist/chunk-7I2KB3OK.js +3895 -0
- package/dist/chunk-7I2KB3OK.js.map +1 -0
- package/dist/chunk-7WCLAEFV.js +2828 -0
- package/dist/chunk-7WCLAEFV.js.map +1 -0
- package/dist/{chunk-U3CSCMWA.js → chunk-FK6VG4LL.js} +9 -13
- package/dist/chunk-FK6VG4LL.js.map +1 -0
- package/dist/{chunk-SRFUT2ZU.js → chunk-FWS3KC3Z.js} +120 -64
- package/dist/chunk-FWS3KC3Z.js.map +1 -0
- package/dist/{chunk-EKZH6IDG.js → chunk-HDBG7XGO.js} +62 -1
- package/dist/chunk-HDBG7XGO.js.map +1 -0
- package/dist/chunk-HUIKIDM5.js +2148 -0
- package/dist/chunk-HUIKIDM5.js.map +1 -0
- package/dist/{chunk-LGVMUIRV.js → chunk-JAGDUCZQ.js} +1053 -390
- package/dist/chunk-JAGDUCZQ.js.map +1 -0
- package/dist/{chunk-LWR4MXSS.js → chunk-JR3QFY6B.js} +420 -35
- package/dist/chunk-JR3QFY6B.js.map +1 -0
- package/dist/chunk-JVYQRRC4.js +53 -0
- package/dist/chunk-JVYQRRC4.js.map +1 -0
- package/dist/chunk-KCGXPP5V.js +157 -0
- package/dist/chunk-KCGXPP5V.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-PEI6RANI.js +3234 -0
- package/dist/chunk-PEI6RANI.js.map +1 -0
- package/dist/{chunk-3PB7MIT6.js → chunk-ROIRTM37.js} +220 -72
- package/dist/chunk-ROIRTM37.js.map +1 -0
- package/dist/chunk-VZTQ73XT.js +86 -0
- package/dist/chunk-VZTQ73XT.js.map +1 -0
- package/dist/{chunk-VCBFUSUZ.js → chunk-WSK7G5LE.js} +72 -4
- package/dist/chunk-WSK7G5LE.js.map +1 -0
- package/dist/{chunk-FGZUCXZF.js → chunk-WYA65Y3F.js} +16 -16
- package/dist/chunk-WYA65Y3F.js.map +1 -0
- package/dist/{chunk-6EDV6YFE.js → chunk-X4S56Y2H.js} +147 -35
- package/dist/chunk-X4S56Y2H.js.map +1 -0
- package/dist/client.d.ts +7 -1
- package/dist/clipboard.d.ts +1 -0
- package/dist/clipboard.js +7 -0
- package/dist/clipboard.js.map +1 -0
- package/dist/commands/index.d.ts +3 -3
- package/dist/commands/registry.d.ts +1 -1
- package/dist/commands/types.d.ts +1 -1
- package/dist/components/approval-surface.d.ts +2 -2
- package/dist/components/artifacts/artifact-surface.d.ts +18 -0
- package/dist/components/artifacts/document-editor.d.ts +172 -0
- package/dist/components/artifacts/editable-artifact-ui.d.ts +13 -0
- package/dist/components/artifacts/editable-artifact-workbench.d.ts +49 -0
- package/dist/components/artifacts/editable-document.d.ts +24 -0
- package/dist/components/artifacts/editable-presentation.d.ts +24 -0
- package/dist/components/artifacts/editable-spreadsheet.d.ts +32 -0
- package/dist/components/artifacts/index.d.ts +8 -0
- package/dist/components/artifacts/presentation-editor.d.ts +297 -0
- package/dist/components/artifacts/spreadsheet-canvas.d.ts +120 -0
- package/dist/components/artifacts/spreadsheet-grid.d.ts +113 -0
- package/dist/components/browser-viewer.d.ts +29 -0
- package/dist/components/chat-composer.d.ts +13 -8
- package/dist/components/code-editor.d.ts +25 -3
- package/dist/components/command-palette.d.ts +2 -2
- package/dist/components/composer-transcription-control.d.ts +4 -2
- package/dist/components/composer.d.ts +29 -15
- package/dist/components/computer-viewer.d.ts +23 -0
- package/dist/components/copy-button.d.ts +2 -2
- package/dist/components/desktop-viewer.d.ts +25 -21
- package/dist/components/diff-view.d.ts +1 -1
- package/dist/components/enrollment-consent.d.ts +1 -1
- package/dist/components/enrollment-device-flow.d.ts +1 -1
- package/dist/components/file-browser.d.ts +2 -2
- package/dist/components/fleet-tile.d.ts +1 -1
- package/dist/components/generated-video-player.d.ts +10 -0
- package/dist/components/human-input-form.d.ts +1 -1
- package/dist/components/human-input-surface.d.ts +2 -2
- package/dist/components/interactive-workbench-viewers.d.ts +2 -0
- package/dist/components/machine-card.d.ts +2 -2
- package/dist/components/machine-dock-bar.d.ts +3 -3
- package/dist/components/machine-health-pill.d.ts +2 -2
- package/dist/components/machine-input-display.d.ts +1 -1
- package/dist/components/machine-metrics.d.ts +2 -2
- package/dist/components/machine-status-pill.d.ts +4 -4
- package/dist/components/machines/health.d.ts +1 -1
- package/dist/components/machines/machine-detail.d.ts +5 -3
- package/dist/components/machines/metric-history-chart.d.ts +1 -1
- package/dist/components/machines/metric-sparkline.d.ts +2 -2
- package/dist/components/machines/series.d.ts +2 -2
- package/dist/components/machines-dashboard.d.ts +5 -5
- package/dist/components/markdown.d.ts +1 -1
- package/dist/components/message-timeline.d.ts +22 -5
- package/dist/components/model-picker.d.ts +2 -2
- package/dist/components/model-policy-picker.d.ts +7 -7
- package/dist/components/pierre-diff.d.ts +1 -1
- package/dist/components/pierre-file.d.ts +1 -1
- package/dist/components/queue-draft-policy.d.ts +1 -1
- package/dist/components/queue-surface-implementation.d.ts +3 -3
- package/dist/components/queue-surface-state.d.ts +4 -4
- package/dist/components/queue-surface.d.ts +5 -5
- package/dist/components/sandbox-files.d.ts +5 -5
- package/dist/components/sandbox-terminal.d.ts +50 -4
- package/dist/components/sandbox-workspace.d.ts +30 -10
- package/dist/components/session-chrome.d.ts +4 -4
- package/dist/components/session-status.d.ts +2 -2
- package/dist/components/timeline-annotation-selection.d.ts +9 -0
- package/dist/components/timeline-annotations-dialog.d.ts +16 -0
- package/dist/components/timeline-annotations.d.ts +13 -0
- package/dist/components/tooltip.d.ts +4 -4
- package/dist/components/user-message-body.d.ts +2 -2
- package/dist/components/workbench-changes.d.ts +2 -2
- package/dist/components/workspace-dock.d.ts +3 -1
- package/dist/composer.d.ts +11 -11
- package/dist/composer.js +7 -7
- package/dist/hooks/internal.d.ts +7 -1
- package/dist/hooks/use-attached-browsers.d.ts +21 -0
- package/dist/hooks/use-available-models.d.ts +2 -2
- package/dist/hooks/use-billing-usage.d.ts +1 -1
- package/dist/hooks/use-browser-frame-stream.d.ts +28 -0
- package/dist/hooks/use-browser-identities.d.ts +26 -0
- package/dist/hooks/use-browser-session.d.ts +28 -0
- package/dist/hooks/use-browser-sessions.d.ts +32 -0
- package/dist/hooks/use-codex-accounts.d.ts +3 -3
- package/dist/hooks/use-composer.d.ts +36 -9
- package/dist/hooks/use-computer-frame-stream.d.ts +24 -0
- package/dist/hooks/use-computer-session.d.ts +28 -0
- package/dist/hooks/use-computer-sessions.d.ts +28 -0
- package/dist/hooks/use-desktop-stream.d.ts +1 -1
- package/dist/hooks/use-environments.d.ts +11 -5
- package/dist/hooks/use-file-attachments.d.ts +1 -1
- package/dist/hooks/use-goal.d.ts +2 -2
- package/dist/hooks/use-human-input.d.ts +2 -2
- package/dist/hooks/use-last-started-turn-policy.d.ts +2 -2
- package/dist/hooks/use-machine-chip.d.ts +2 -2
- package/dist/hooks/use-machines.d.ts +10 -3
- package/dist/hooks/use-packs.d.ts +7 -2
- package/dist/hooks/use-rigs.d.ts +1 -1
- package/dist/hooks/use-sandbox-files.d.ts +25 -4
- package/dist/hooks/use-sandbox-git.d.ts +13 -5
- package/dist/hooks/use-sandbox-terminal.d.ts +1 -1
- package/dist/hooks/use-scheduled-tasks.d.ts +1 -1
- package/dist/hooks/use-session-capabilities.d.ts +5 -4
- package/dist/hooks/use-session-control.d.ts +1 -1
- package/dist/hooks/use-session-events.d.ts +2 -2
- package/dist/hooks/use-session-lineage.d.ts +1 -1
- package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
- package/dist/hooks/use-session.d.ts +2 -2
- package/dist/hooks/use-slash-commands.d.ts +1 -1
- package/dist/hooks/use-terminal-stream.d.ts +8 -2
- package/dist/hooks/use-transcription.d.ts +2 -2
- package/dist/hooks/use-turn-queue.d.ts +2 -2
- package/dist/hooks/use-video-artifact-playback.d.ts +9 -0
- package/dist/hooks/use-voice-input.d.ts +6 -4
- package/dist/hooks/use-workspace-capture.d.ts +1 -1
- package/dist/hooks/use-workspace-edit.d.ts +1 -1
- package/dist/hooks/use-workspace-sessions.d.ts +1 -1
- package/dist/hooks/use-workspaces.d.ts +1 -1
- package/dist/index.d.ts +158 -154
- package/dist/index.js +1718 -908
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +23 -0
- package/dist/interaction.js +36 -0
- package/dist/interaction.js.map +1 -0
- package/dist/interactive-workbench-viewers-KHNOHWQE.js +13 -0
- package/dist/interactive-workbench-viewers-KHNOHWQE.js.map +1 -0
- package/dist/lib/composer-responsive-context.d.ts +9 -0
- package/dist/lib/relay-wire.d.ts +4 -0
- package/dist/lib/sandbox-liveness.d.ts +9 -0
- package/dist/lib/terminal-capability.d.ts +5 -0
- package/dist/lib/use-portal-token-style.d.ts +14 -3
- package/dist/lib/xterm-theme.d.ts +1 -1
- package/dist/machines.d.ts +30 -30
- package/dist/machines.js +3 -3
- package/dist/provider.d.ts +4 -4
- package/dist/{queue-surface-implementation-J4XJFKRW.js → queue-surface-implementation-2KVJTYXH.js} +117 -64
- package/dist/queue-surface-implementation-2KVJTYXH.js.map +1 -0
- package/dist/realtime/dropdown-menu.d.ts +8 -8
- package/dist/realtime/realtime-control.d.ts +15 -6
- package/dist/realtime.d.ts +4 -4
- package/dist/realtime.js +30 -33
- package/dist/realtime.js.map +1 -1
- package/dist/session-context.d.ts +19 -1
- package/dist/session-ui.d.ts +14 -14
- package/dist/session-ui.js +6 -5
- package/dist/session.d.ts +28 -28
- package/dist/session.js +5 -5
- package/dist/timeline/activity-rail.d.ts +6 -3
- package/dist/timeline/disclosure-context.d.ts +1 -1
- package/dist/timeline/fleet-decision-projection.d.ts +1 -1
- package/dist/timeline/fleet-decision-row.d.ts +3 -3
- package/dist/timeline/index.d.ts +19 -19
- package/dist/timeline/parsers.d.ts +6 -3
- package/dist/timeline/projection.d.ts +3 -3
- package/dist/timeline/registry.d.ts +10 -1
- package/dist/timeline/screenshot-lightbox.d.ts +2 -2
- package/dist/timeline/shared.d.ts +21 -10
- package/dist/timeline/tool-diff.d.ts +2 -2
- package/dist/timeline/tool-renderers.d.ts +1 -1
- package/dist/timeline/turn-summary.d.ts +3 -3
- package/dist/timeline/types.d.ts +42 -2
- package/dist/timeline-annotation-selection-3L7LHGG2.js +187 -0
- package/dist/timeline-annotation-selection-3L7LHGG2.js.map +1 -0
- package/dist/timeline-annotations-dialog-U7EVLR75.js +196 -0
- package/dist/timeline-annotations-dialog-U7EVLR75.js.map +1 -0
- package/dist/voice-recording-store.d.ts +8 -2
- package/package.json +52 -7
- package/src/artifacts-document.ts +31 -0
- package/src/artifacts-presentation.ts +36 -0
- package/src/artifacts-spreadsheet.ts +21 -0
- package/src/artifacts.ts +86 -0
- package/src/client.ts +90 -1
- package/src/clipboard.ts +2 -0
- package/src/components/artifacts/artifact-surface.tsx +93 -0
- package/src/components/artifacts/document-editor.tsx +2255 -0
- package/src/components/artifacts/editable-artifact-ui.tsx +89 -0
- package/src/components/artifacts/editable-artifact-workbench.tsx +203 -0
- package/src/components/artifacts/editable-document.tsx +657 -0
- package/src/components/artifacts/editable-presentation.tsx +1020 -0
- package/src/components/artifacts/editable-spreadsheet.tsx +733 -0
- package/src/components/artifacts/index.ts +99 -0
- package/src/components/artifacts/presentation-editor.tsx +3148 -0
- package/src/components/artifacts/spreadsheet-canvas.ts +799 -0
- package/src/components/artifacts/spreadsheet-grid.tsx +2129 -0
- package/src/components/browser-viewer.tsx +1592 -0
- package/src/components/chat-composer.tsx +25 -2
- package/src/components/code-editor.tsx +90 -31
- package/src/components/command-palette.tsx +1 -1
- package/src/components/composer-transcription-control.tsx +51 -22
- package/src/components/composer.tsx +49 -23
- package/src/components/computer-viewer.tsx +1139 -0
- package/src/components/copy-button.tsx +1 -1
- package/src/components/desktop-viewer.tsx +103 -75
- package/src/components/file-browser.tsx +39 -17
- package/src/components/generated-video-player.tsx +89 -0
- package/src/components/human-input-form.tsx +2 -2
- package/src/components/interactive-workbench-viewers.ts +2 -0
- package/src/components/machine-card.tsx +1 -1
- package/src/components/machine-input-display.ts +3 -0
- package/src/components/machines/machine-detail.tsx +39 -15
- package/src/components/machines-dashboard.tsx +7 -6
- package/src/components/message-timeline.tsx +327 -37
- package/src/components/model-picker.tsx +2 -2
- package/src/components/model-policy-picker.tsx +16 -15
- package/src/components/queue-surface-implementation.tsx +135 -75
- package/src/components/queue-surface-state.tsx +2 -2
- package/src/components/sandbox-files.tsx +142 -62
- package/src/components/sandbox-terminal.tsx +119 -35
- package/src/components/sandbox-workspace.tsx +394 -228
- package/src/components/session-chrome.tsx +67 -27
- package/src/components/timeline-annotation-selection.tsx +221 -0
- package/src/components/timeline-annotations-dialog.tsx +213 -0
- package/src/components/timeline-annotations.tsx +84 -0
- package/src/components/tooltip.tsx +13 -16
- package/src/components/user-message-body.tsx +1 -1
- package/src/components/workbench-changes.tsx +192 -35
- 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-attached-browsers.ts +152 -0
- package/src/hooks/use-browser-frame-stream.ts +316 -0
- package/src/hooks/use-browser-identities.ts +225 -0
- package/src/hooks/use-browser-session.ts +476 -0
- package/src/hooks/use-browser-sessions.ts +281 -0
- package/src/hooks/use-codex-accounts.ts +4 -4
- package/src/hooks/use-composer.ts +769 -24
- package/src/hooks/use-computer-frame-stream.ts +311 -0
- package/src/hooks/use-computer-session.ts +442 -0
- package/src/hooks/use-computer-sessions.ts +245 -0
- 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-machine-chip.ts +5 -3
- package/src/hooks/use-machines.ts +79 -3
- package/src/hooks/use-packs.ts +51 -0
- package/src/hooks/use-sandbox-files.ts +382 -88
- package/src/hooks/use-sandbox-git.ts +208 -46
- package/src/hooks/use-sandbox-terminal.ts +3 -2
- package/src/hooks/use-session-capabilities.ts +94 -70
- package/src/hooks/use-session-events.ts +18 -4
- package/src/hooks/use-terminal-stream.ts +102 -23
- package/src/hooks/use-transcription.ts +4 -14
- package/src/hooks/use-turn-queue.ts +17 -5
- package/src/hooks/use-video-artifact-playback.ts +28 -0
- package/src/hooks/use-voice-input.ts +163 -19
- package/src/hooks/use-windowed-sections.ts +9 -7
- package/src/hooks/use-workspace-edit.ts +2 -1
- package/src/index.ts +21 -6
- package/src/interaction.ts +71 -0
- package/src/lib/composer-responsive-context.ts +15 -0
- package/src/lib/relay-wire.ts +4 -0
- package/src/lib/sandbox-liveness.ts +11 -0
- package/src/lib/terminal-capability.ts +10 -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 +16 -5
- package/src/session-context.ts +90 -0
- package/src/timeline/activity-rail.tsx +31 -6
- package/src/timeline/index.ts +4 -1
- package/src/timeline/parsers.ts +46 -20
- package/src/timeline/projection.ts +233 -13
- package/src/timeline/registry.ts +19 -0
- package/src/timeline/screenshot-lightbox.tsx +30 -9
- package/src/timeline/shared.tsx +59 -11
- package/src/timeline/tool-renderers.tsx +421 -24
- package/src/timeline/turn-summary.tsx +2 -2
- package/src/timeline/types.ts +58 -2
- package/src/voice-recording-store.ts +15 -0
- package/styles/compiled.css +5298 -0
- package/styles/compiled.d.ts +2 -0
- package/styles/effective-tokens.css +27 -0
- package/styles/index.css +18 -0
- package/styles/responsive.css +208 -0
- package/styles/responsive.d.ts +2 -0
- package/styles/tokens.css +50 -17
- package/dist/chunk-3PB7MIT6.js.map +0 -1
- package/dist/chunk-6EDV6YFE.js.map +0 -1
- package/dist/chunk-EB67J347.js.map +0 -1
- package/dist/chunk-EKZH6IDG.js.map +0 -1
- package/dist/chunk-FGZUCXZF.js.map +0 -1
- package/dist/chunk-HFO4ERGQ.js.map +0 -1
- package/dist/chunk-JB5725BI.js +0 -48
- package/dist/chunk-JB5725BI.js.map +0 -1
- package/dist/chunk-LGVMUIRV.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/chunk-VCBFUSUZ.js.map +0 -1
- package/dist/fleet-decision-projection-SLNZMS42.js +0 -241
- package/dist/fleet-decision-projection-SLNZMS42.js.map +0 -1
- package/dist/queue-surface-implementation-J4XJFKRW.js.map +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ComputerAction, ComputerActionReceipt, ComputerFrame, ComputerObservation, ComputerSession, ComputerTarget } from "@opengeni/sdk/interaction";
|
|
2
|
+
import { type EmbeddedComputerInteractionClientOverride } from "../session-context.js";
|
|
3
|
+
export type UseComputerSessionOptions = EmbeddedComputerInteractionClientOverride & {
|
|
4
|
+
computerSessionId: string | null;
|
|
5
|
+
enabled?: boolean | undefined;
|
|
6
|
+
pollIntervalMs?: number | undefined;
|
|
7
|
+
};
|
|
8
|
+
export type UseComputerSessionResult = {
|
|
9
|
+
session: ComputerSession | null;
|
|
10
|
+
targets: ComputerTarget[];
|
|
11
|
+
selectedTarget: ComputerTarget | null;
|
|
12
|
+
observation: ComputerObservation | null;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
mutating: boolean;
|
|
15
|
+
error: Error | null;
|
|
16
|
+
refresh: () => Promise<void>;
|
|
17
|
+
/** Changes only this viewer's target cursor; it never takes ownership or
|
|
18
|
+
* foregrounds an application. */
|
|
19
|
+
selectTarget: (targetId: string) => Promise<ComputerTarget>;
|
|
20
|
+
act: (action: ComputerAction, operationId?: string) => Promise<ComputerActionReceipt>;
|
|
21
|
+
/** Dispatch pointer input against the exact displayed frame. */
|
|
22
|
+
actFromFrame: (action: Extract<ComputerAction, {
|
|
23
|
+
type: "pointer";
|
|
24
|
+
}>, frame: ComputerFrame, operationId?: string) => Promise<ComputerActionReceipt>;
|
|
25
|
+
};
|
|
26
|
+
/** Selected ComputerSession state. Semantic and pixel input share the same
|
|
27
|
+
* generation-fenced controller operation stream used by agents. */
|
|
28
|
+
export declare function useComputerSession(options: UseComputerSessionOptions): UseComputerSessionResult;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ComputerSession, ComputerSessionMutationResponse, CreateComputerSessionRequest } from "@opengeni/sdk/interaction";
|
|
2
|
+
import type { EmbeddedComputerInteractionClientLike } from "../client.js";
|
|
3
|
+
import { type EmbeddedComputerInteractionClientOverride } from "../session-context.js";
|
|
4
|
+
export type UseComputerSessionsOptions = EmbeddedComputerInteractionClientOverride & {
|
|
5
|
+
/** Current agent/session relevance. Workspace peers remain in `sessions`. */
|
|
6
|
+
sessionId?: string | undefined;
|
|
7
|
+
enabled?: boolean | undefined;
|
|
8
|
+
/** Temporary invalidation path until the interaction event stream lands. */
|
|
9
|
+
pollIntervalMs?: number | undefined;
|
|
10
|
+
};
|
|
11
|
+
export type UseComputerSessionsResult = {
|
|
12
|
+
revision: number;
|
|
13
|
+
sessions: ComputerSession[];
|
|
14
|
+
relevantSessions: ComputerSession[];
|
|
15
|
+
loading: boolean;
|
|
16
|
+
refreshing: boolean;
|
|
17
|
+
error: Error | null;
|
|
18
|
+
refresh: () => Promise<void>;
|
|
19
|
+
create: (request: Omit<CreateComputerSessionRequest, "operationId"> & {
|
|
20
|
+
operationId?: string;
|
|
21
|
+
}) => Promise<ComputerSessionMutationResponse>;
|
|
22
|
+
end: (computerSessionId: string, operationId?: string) => Promise<ComputerSessionMutationResponse>;
|
|
23
|
+
};
|
|
24
|
+
/** Workspace-wide ComputerSession registry. Associations rank relevance but
|
|
25
|
+
* never hide peer resources or create an ownership boundary. */
|
|
26
|
+
export declare function useComputerSessions(options?: UseComputerSessionsOptions): UseComputerSessionsResult;
|
|
27
|
+
/** Exported for narrow proxy implementations and tests. */
|
|
28
|
+
export type ComputerSessionsClient = EmbeddedComputerInteractionClientLike;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DesktopConnectionState, type DesktopRfbFactory, type DesktopStreamCapability } from "@opengeni/sdk";
|
|
2
2
|
import { type RefObject } from "react";
|
|
3
|
-
import { type DesktopWebSocketFactory } from "./use-relay-frame-stream";
|
|
3
|
+
import { type DesktopWebSocketFactory } from "./use-relay-frame-stream.js";
|
|
4
4
|
export type UseDesktopStreamOptions = {
|
|
5
5
|
/** The desktop cell of the negotiated capabilities (`capabilities.DesktopStream`). */
|
|
6
6
|
capability: DesktopStreamCapability | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CreateVariableSetRequest, UpdateVariableSetRequest, VariableSet, VariableSetVariableMetadata } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
1
|
+
import type { CreateVariableSetRequest, UpdateVariableSetRequest, VariableSet, VariableSetSecret, VariableSetVariableMetadata } from "@opengeni/sdk";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseVariableSetsOptions = ClientOverride & {
|
|
4
4
|
pollIntervalMs?: number | undefined;
|
|
5
5
|
enabled?: boolean | 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,5 +1,5 @@
|
|
|
1
1
|
import type { FileAsset, FileResourceRef } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedFileAttachmentClientOverride } from "../session-context";
|
|
2
|
+
import { type EmbeddedFileAttachmentClientOverride } from "../session-context.js";
|
|
3
3
|
export type UseFileAttachmentsOptions = EmbeddedFileAttachmentClientOverride & {
|
|
4
4
|
/**
|
|
5
5
|
* Only files matching this predicate are accepted by {@link
|
package/dist/hooks/use-goal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type SessionEvent, type SessionGoal } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedGoalClientOverride } from "../session-context";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
2
|
+
import { type EmbeddedGoalClientOverride } from "../session-context.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
4
|
/** Event types that change the session goal (set/updated/completed/paused/...). */
|
|
5
5
|
export declare function isGoalEvent(event: Pick<SessionEvent, "type">): boolean;
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SessionEvent, SessionHumanInputRequest, SubmitHumanInputResponseRequest } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedHumanInputClientOverride } from "../session-context";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
2
|
+
import { type EmbeddedHumanInputClientOverride } from "../session-context.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
4
|
/** Events that can create, settle, or invalidate an actionable request. */
|
|
5
5
|
export declare function isHumanInputEvent(event: Pick<SessionEvent, "type">): boolean;
|
|
6
6
|
export type UseHumanInputRequestsOptions = EmbeddedHumanInputClientOverride & SessionEventFeedOptions & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LatencyMode, ReasoningEffort, SessionEvent } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../session-context";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
2
|
+
import { type ClientOverride } from "../session-context.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
4
|
/** Refresh when a turn actually admits — not on composer picker / queue-only changes. */
|
|
5
5
|
export declare function isLastStartedTurnPolicyEvent(event: Pick<SessionEvent, "type">): boolean;
|
|
6
6
|
export type LastStartedTurnPolicy = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MachineState } from "@opengeni/sdk";
|
|
2
|
-
import type { SessionCapabilitiesState } from "./use-session-capabilities";
|
|
2
|
+
import type { SessionCapabilitiesState } from "./use-session-capabilities.js";
|
|
3
3
|
/** The one truthful machine indicator. Honest staleness beats
|
|
4
4
|
* fake liveness: a cold/asleep box reads "offline — as of <time>", never "live". */
|
|
5
5
|
export type MachineChipState = "live" | "waking" | "offline";
|
|
@@ -36,7 +36,7 @@ export declare function formatAsOf(capturedAt: string, now: number): string;
|
|
|
36
36
|
* it; the whole point is a deterministic, testable projection).
|
|
37
37
|
*
|
|
38
38
|
* Precedence:
|
|
39
|
-
* 1. warm
|
|
39
|
+
* 1. warm lease → **live** (a holder-confirmed box always wins).
|
|
40
40
|
* 2. actively warming (negotiating, wake-on-edit, or a reconnecting/enrolling
|
|
41
41
|
* machine) → **waking**.
|
|
42
42
|
* 3. everything else (a cold/asleep box, a self-hosted machine that's offline,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import type { RemoveEnrollmentRequest, RemoveEnrollmentResponse, SwapActiveSandboxResponse } from "@opengeni/sdk";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
|
+
import type { MachinesResponse, MachineView, MetricSample } from "../types/machines.js";
|
|
3
4
|
/**
|
|
4
5
|
* The slice of the SDK client the Machines surface needs. The method NAMES +
|
|
5
6
|
* SIGNATURES match M10's `OpenGeniClient` (`listMachines`, `machineMetricsSeries`)
|
|
@@ -26,13 +27,15 @@ 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.
|
|
32
35
|
*/
|
|
33
36
|
swapActiveSandbox?: (workspaceId: string, sessionId: string, request: {
|
|
34
37
|
target: string;
|
|
35
|
-
}) => Promise<
|
|
38
|
+
}) => Promise<SwapActiveSandboxResponse>;
|
|
36
39
|
/**
|
|
37
40
|
* Host-supplied swap adapter (an escape hatch). When present it wins over the
|
|
38
41
|
* default `swapActiveSandbox` path. Session-scoped, like the swap it backs.
|
|
@@ -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. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CapabilityPack, EnablePackRequest, PackInstallation, RegisterCapabilityPackRequest, WorkspaceRegisteredPack } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
1
|
+
import type { CapabilityPack, EnablePackRequest, InstallPackRequest, PackInstallationPreview, PackInstallation, PackUninstallPreview, PreviewPackInstallationRequest, RegisterCapabilityPackRequest, UninstallPackRequest, UninstallPackResult, WorkspaceRegisteredPack } from "@opengeni/sdk";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UsePacksOptions = ClientOverride & {
|
|
4
4
|
pollIntervalMs?: number | undefined;
|
|
5
5
|
enabled?: boolean | undefined;
|
|
@@ -16,7 +16,12 @@ export type UsePacksResult = {
|
|
|
16
16
|
refresh: () => Promise<void>;
|
|
17
17
|
/** Register (or replace) a workspace-scoped pack manifest. */
|
|
18
18
|
register: (manifest: RegisterCapabilityPackRequest) => Promise<WorkspaceRegisteredPack | null>;
|
|
19
|
+
/** @deprecated Use previewInstallation + install for component/Rig-aware Packs. */
|
|
19
20
|
enable: (packId: string, request?: EnablePackRequest) => Promise<PackInstallation | null>;
|
|
21
|
+
previewInstallation: (packId: string, request?: PreviewPackInstallationRequest) => Promise<PackInstallationPreview | null>;
|
|
22
|
+
install: (packId: string, request: InstallPackRequest) => Promise<PackInstallation | null>;
|
|
23
|
+
previewUninstall: (packId: string) => Promise<PackUninstallPreview | null>;
|
|
24
|
+
uninstall: (packId: string, request: UninstallPackRequest) => Promise<UninstallPackResult | null>;
|
|
20
25
|
/** Unregister a workspace-scoped pack (built-ins cannot be removed). */
|
|
21
26
|
remove: (packId: string) => Promise<boolean>;
|
|
22
27
|
mutating: boolean;
|
package/dist/hooks/use-rigs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CreateRigRequest, ProposeRigChangeRequest, Rig, RigChange, RigVersion, UpdateRigRequest } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseRigsOptions = ClientOverride & {
|
|
4
4
|
pollIntervalMs?: number | undefined;
|
|
5
5
|
enabled?: boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FsReadResponse, FsWriteResponse, OpenGeniRequestOptions, SessionEvent, WorkspaceCaptureManifest } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
1
|
+
import type { FsReadResponse, FsWriteResponse, OpenGeniRequestOptions, SessionCapabilities, SessionEvent, WorkspaceCaptureManifest } from "@opengeni/sdk";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
/** The git-status overlay a file row may carry (tints modified files in the tree). */
|
|
4
4
|
export type FileTreeStatus = "added" | "modified" | "deleted" | "renamed" | "untracked";
|
|
5
5
|
export type CapturedFileUnavailableReason = "not-captured" | "too-large" | "content-missing";
|
|
@@ -48,12 +48,18 @@ 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
|
-
/**
|
|
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;
|
|
55
|
+
/** The lease liveness. `null` means capability negotiation has not produced
|
|
56
|
+
* an authoritative lifecycle value yet and therefore blocks live I/O. Omitting
|
|
57
|
+
* the option preserves the legacy direct-hook behavior. The structured FileSystem
|
|
52
58
|
* capability is advertised even on a COLD box, so the mount-time list can race
|
|
53
59
|
* the box: it lists before the box is warm, gets an empty/errored result, and
|
|
54
60
|
* (with no `fs.changed` event) never re-lists. Passing liveness re-lists when
|
|
55
61
|
* the box first becomes warm, so the tree populates as soon as the box is up. */
|
|
56
|
-
liveness?:
|
|
62
|
+
liveness?: SessionCapabilities["liveness"] | null | undefined;
|
|
57
63
|
/** The latest turn-end workspace capture (from `useWorkspaceCapture`). The tree
|
|
58
64
|
* paints immediately from this durable index, then a warm box reconciles live
|
|
59
65
|
* in place. If that live read fails, the capture remains a truthful read-only
|
|
@@ -90,14 +96,29 @@ export type UseSandboxFilesResult = {
|
|
|
90
96
|
}) => Promise<void>;
|
|
91
97
|
/** Re-list the whole tree from the root. */
|
|
92
98
|
refresh: () => Promise<void>;
|
|
99
|
+
/** Monotonic invalidation token for open file previews. Advances when an
|
|
100
|
+
* external filesystem change or completed agent tool may have changed bytes. */
|
|
101
|
+
contentRevision?: number | undefined;
|
|
93
102
|
/** Which source the tree is currently served from: the live box, the turn-end
|
|
94
103
|
* capture (cold/offline), or neither yet. M5's source badge reads this. */
|
|
95
104
|
source: "live" | "capture" | null;
|
|
96
105
|
/** When the served capture was taken (ISO), when `source === "capture"`. */
|
|
97
106
|
capturedAt: string | null;
|
|
107
|
+
/** Lightweight repository context loaded by the same status request that tints files. */
|
|
108
|
+
gitSummary?: SandboxFilesGitSummary | null | undefined;
|
|
109
|
+
/** True only while the initial repository-status overlay is still loading. */
|
|
110
|
+
gitLoading?: boolean | undefined;
|
|
98
111
|
loading: boolean;
|
|
99
112
|
error: Error | null;
|
|
100
113
|
};
|
|
114
|
+
export type SandboxFilesGitSummary = {
|
|
115
|
+
branch: string | null;
|
|
116
|
+
isRepo: boolean;
|
|
117
|
+
repoCount: number;
|
|
118
|
+
ahead: number;
|
|
119
|
+
behind: number;
|
|
120
|
+
dirtyCount: number;
|
|
121
|
+
};
|
|
101
122
|
/**
|
|
102
123
|
* Project the FileSystem service into a lazy-loaded Pierre tree. The initial
|
|
103
124
|
* list pulls one level (depth 1); `expand(path)` lists a directory's immediate
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { GitFileDiff, SessionEvent, WorkspaceCaptureManifest } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
1
|
+
import type { GitFileDiff, SessionCapabilities, SessionEvent, WorkspaceCaptureManifest } from "@opengeni/sdk";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseSandboxGitOptions = ClientOverride & {
|
|
4
4
|
/** Live event log (usually `useSessionEvents().events`) — drives auto-refresh
|
|
5
5
|
* on `git.changed`. */
|
|
@@ -11,16 +11,24 @@ 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;
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
liveness
|
|
20
|
+
/** Pause live reads/invalidation while preserving the last rendered result. */
|
|
21
|
+
active?: boolean | undefined;
|
|
22
|
+
/** Lease liveness. `null` means capability negotiation is still pending and
|
|
23
|
+
* blocks live I/O. When not warm, the diff is served from the capture instead
|
|
24
|
+
* of a live `gitDiff` RPC. Omission preserves legacy direct-hook behavior. */
|
|
25
|
+
liveness?: SessionCapabilities["liveness"] | null | undefined;
|
|
19
26
|
/** The latest turn-end capture (from `useWorkspaceCapture`). Seeds the diff
|
|
20
27
|
* immediately; a warm box reconciles live and leaves this durable review
|
|
21
28
|
* surface in place if the live request is temporarily unavailable. */
|
|
22
29
|
capture?: WorkspaceCaptureManifest | null | undefined;
|
|
23
30
|
};
|
|
31
|
+
export type SandboxGitComparison = "branch" | "working" | "staged";
|
|
24
32
|
/** A Git diff qualified into workspace scope. `repoRoot` is present for the
|
|
25
33
|
* workspace-wide path and lets review UI group real repositories without
|
|
26
34
|
* guessing from the first path segment. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SessionEvent } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type TerminalChunk = {
|
|
4
4
|
/** Stable key (the source event id) so the xterm writer tracks a written-cursor. */
|
|
5
5
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ScheduledTask } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseScheduledTasksOptions = ClientOverride & {
|
|
4
4
|
limit?: number | undefined;
|
|
5
5
|
pollIntervalMs?: number | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SessionCapabilities, type SessionEvent } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type SessionCapabilitiesState = "idle" | "negotiating" | "ready" | "cold" | "on-demand" | "error";
|
|
4
4
|
export type UseSessionCapabilitiesOptions = ClientOverride & {
|
|
5
5
|
/**
|
|
@@ -59,7 +59,8 @@ export type UseSessionCapabilitiesResult = {
|
|
|
59
59
|
error: Error | null;
|
|
60
60
|
/**
|
|
61
61
|
* 409 from the desktop attach: the un-redacted (or shared) plane needs explicit
|
|
62
|
-
* acknowledgment before a viewer holder is granted.
|
|
62
|
+
* acknowledgment before a viewer holder is granted. The workbench uses this
|
|
63
|
+
* to complete acknowledgment automatically while Desktop is opening.
|
|
63
64
|
*/
|
|
64
65
|
acknowledgmentRequired: "unredacted" | "shared" | null;
|
|
65
66
|
/** 429 from the desktop attach: the per-session viewer cap is reached. */
|
|
@@ -77,7 +78,7 @@ export type UseSessionCapabilitiesResult = {
|
|
|
77
78
|
*
|
|
78
79
|
* Degradation is a value, never a crash: an unsupported surface comes back
|
|
79
80
|
* `available:false`/`transport:null` + a `reason`; the components render the
|
|
80
|
-
* reason-aware empty state. 409 (
|
|
81
|
-
* typed signals, not thrown.
|
|
81
|
+
* reason-aware empty state. 409 (acknowledgment) and 429 (viewer cap) are
|
|
82
|
+
* surfaced as typed signals, not thrown.
|
|
82
83
|
*/
|
|
83
84
|
export declare function useSessionCapabilities(sessionId: string | null | undefined, options?: UseSessionCapabilitiesOptions): UseSessionCapabilitiesResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SessionControlResponse, SessionEvent } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedSessionClientOverride } from "../session-context";
|
|
2
|
+
import { type EmbeddedSessionClientOverride } from "../session-context.js";
|
|
3
3
|
export type UseSessionControlOptions = EmbeddedSessionClientOverride;
|
|
4
4
|
export type UseSessionControlResult = {
|
|
5
5
|
pause: (reason?: string) => Promise<SessionControlResponse | null>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SessionEvent, SessionStatus, StreamConnectionState } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedSessionClientOverride } from "../session-context";
|
|
3
|
-
import type { TimelineItem } from "../timeline/types";
|
|
2
|
+
import { type EmbeddedSessionClientOverride } from "../session-context.js";
|
|
3
|
+
import type { TimelineItem } from "../timeline/types.js";
|
|
4
4
|
export type SessionEventsConnectionState = StreamConnectionState | "idle" | "ended" | "error";
|
|
5
5
|
export type UseSessionEventsOptions = EmbeddedSessionClientOverride & {
|
|
6
6
|
/** Resume after this sequence (exclusive). Nonzero keeps full replay/resume semantics. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SessionEvent, SessionLineageResponse } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedSessionLineageClientOverride } from "../session-context";
|
|
2
|
+
import { type EmbeddedSessionLineageClientOverride } from "../session-context.js";
|
|
3
3
|
export type UseSessionLineageOptions = EmbeddedSessionLineageClientOverride & {
|
|
4
4
|
events?: SessionEvent[] | undefined;
|
|
5
5
|
/** Refresh interval (ms). Off by default. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SessionEvent, SessionMcpApprovalPolicy, SessionMcpServerMetadata, UpdateSessionMcpApprovalPolicyResponse } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedSessionMcpApprovalPolicyClientOverride } from "../session-context";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
2
|
+
import { type EmbeddedSessionMcpApprovalPolicyClientOverride } from "../session-context.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
4
|
export declare function isSessionMcpApprovalPolicyEvent(event: Pick<SessionEvent, "type" | "payload">, serverId?: string): boolean;
|
|
5
5
|
export type UseSessionMcpApprovalPolicyOptions = EmbeddedSessionMcpApprovalPolicyClientOverride & SessionEventFeedOptions & {
|
|
6
6
|
/** Optional safety-net polling (ms). Off by default; policy events drive refreshes. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Session, SessionEvent } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedSessionReadClientOverride } from "../session-context";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
2
|
+
import { type EmbeddedSessionReadClientOverride } from "../session-context.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
4
|
export type UseSessionOptions = EmbeddedSessionReadClientOverride & SessionEventFeedOptions & {
|
|
5
5
|
/** Re-fetch on an interval (ms). Off by default — pair with `useSessionEvents` for live status. */
|
|
6
6
|
pollIntervalMs?: number | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { KeyboardEvent } from "react";
|
|
2
|
-
import type { CommandContext, SlashCommand } from "../commands/types";
|
|
2
|
+
import type { CommandContext, SlashCommand } from "../commands/types.js";
|
|
3
3
|
/**
|
|
4
4
|
* Context the composer supplies for command execution and visibility. The
|
|
5
5
|
* composer owns the UI affordances (notice/openHelp/clearView/confirm), so they
|
|
@@ -6,7 +6,7 @@ export type UseTerminalStreamOptions = {
|
|
|
6
6
|
* The stream connects ONLY when `transport === "pty-ws"` and `url` is set; on a
|
|
7
7
|
* cold box (`transport === "sse-events"` / no url) it stays idle and the caller
|
|
8
8
|
* falls back to the Channel-A read-only firehose. */
|
|
9
|
-
capability: Pick<TerminalCapability, "transport" | "url" | "token"> | null;
|
|
9
|
+
capability: Pick<TerminalCapability, "transport" | "url" | "token" | "expiresAt"> | null;
|
|
10
10
|
/** Called for each OUTPUT payload from ttyd (write verbatim into xterm). */
|
|
11
11
|
onOutput?: ((data: string) => void) | undefined;
|
|
12
12
|
/** Called when ttyd sends a SET_WINDOW_TITLE frame. */
|
|
@@ -19,13 +19,19 @@ export type UseTerminalStreamResult = {
|
|
|
19
19
|
/** True once the ttyd socket is open (and the auth frame has been sent). */
|
|
20
20
|
connected: boolean;
|
|
21
21
|
status: TerminalStreamStatus;
|
|
22
|
-
/** Pipe a keystroke/paste to
|
|
22
|
+
/** Pipe a keystroke/paste to PTY stdin. Input during CONNECTING is bounded and
|
|
23
|
+
* replayed only after ttyd authentication succeeds. */
|
|
23
24
|
write: (data: string) => void;
|
|
24
25
|
/** Tell ttyd the PTY window changed size (on xterm fit/resize). */
|
|
25
26
|
resize: (cols: number, rows: number) => void;
|
|
26
27
|
/** Tear the socket down (the effect also tears down on unmount / url change). */
|
|
27
28
|
disconnect: () => void;
|
|
28
29
|
};
|
|
30
|
+
export declare const MAX_PENDING_TERMINAL_INPUT_CODE_UNITS: number;
|
|
31
|
+
/** A bearer must remain valid long enough to finish a new websocket handshake.
|
|
32
|
+
* Existing open sockets are unaffected: this is evaluated only when the
|
|
33
|
+
* credential identity changes and the connection effect attempts a new socket. */
|
|
34
|
+
export declare function terminalStreamCredentialUsable(capability: Pick<TerminalCapability, "transport" | "url" | "expiresAt"> | null | undefined, nowMs?: number): boolean;
|
|
29
35
|
/**
|
|
30
36
|
* Drive a ttyd PTY-over-websocket connection from a `pty-ws` Terminal capability,
|
|
31
37
|
* symmetric with `use-desktop-stream` (the noVNC-over-tunnel hook). The scoped
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
import type { ComposerDraft, EffectiveSessionControl, McpPersonalConnectionSummary, SessionEvent, SessionQueueSnapshot, SessionPendingInputPreview, SessionTurn } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedSessionClientOverride } from "../session-context";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
2
|
+
import { type EmbeddedSessionClientOverride } from "../session-context.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
4
|
/** Events that can change the authoritative prompt queue or effective control. */
|
|
5
5
|
export declare function isTurnQueueEvent(event: Pick<SessionEvent, "type">): boolean;
|
|
6
6
|
export type QueueMutationKind = "move" | "edit" | "steer" | "delete";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VideoArtifactPlaybackLoader } from "../timeline/index.js";
|
|
2
|
+
import { type ClientOverride } from "../session-context.js";
|
|
3
|
+
/**
|
|
4
|
+
* Bind the current public SDK client/workspace to MessageTimeline's renewable
|
|
5
|
+
* video-source boundary. Proxy hosts may omit the method until they support
|
|
6
|
+
* retained video; the failure remains local to the player instead of loading
|
|
7
|
+
* any video bytes through React.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useVideoArtifactPlaybackLoader(options?: ClientOverride): VideoArtifactPlaybackLoader;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type VoiceRecordingStore } from "../voice-recording-store";
|
|
3
|
-
export type VoiceInputStatus = "idle" | "requesting-permission" | "recording" | "saving" | "transcribing" | "recovered" | "transcript-ready" | "error";
|
|
1
|
+
import { type ClientVoiceInputConfig, type OpenGeniClient } from "@opengeni/sdk";
|
|
2
|
+
import { type VoiceRecordingStore } from "../voice-recording-store.js";
|
|
3
|
+
export type VoiceInputStatus = "idle" | "requesting-permission" | "recording" | "saving" | "transcribing" | "retrying" | "recovered" | "transcript-ready" | "error";
|
|
4
4
|
export type UseVoiceInputOptions = {
|
|
5
5
|
client: VoiceInputClient | null;
|
|
6
6
|
workspaceId: string;
|
|
@@ -15,6 +15,8 @@ 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
|
};
|
|
19
21
|
type ResumableVoiceInputClient = Pick<OpenGeniClient, "createTranscriptionRecording" | "getTranscriptionRecording" | "uploadTranscriptionRecordingChunk" | "finalizeTranscriptionRecording" | "processNextTranscriptionRecordingSegment" | "discardTranscriptionRecording">;
|
|
20
22
|
type VoiceInputClient = Pick<OpenGeniClient, "transcribeAudio"> & Partial<ResumableVoiceInputClient>;
|
|
@@ -49,5 +51,5 @@ export declare const VOICE_RECORDING_RESUMABLE_CLIENT_MAX_DURATION_SECONDS: numb
|
|
|
49
51
|
export declare const VOICE_RECORDING_RECOVERY_STATUS_POLL_MILLISECONDS = 2000;
|
|
50
52
|
export declare const VOICE_RECORDING_RECOVERY_MAX_MUTATION_DELAY_MILLISECONDS = 30000;
|
|
51
53
|
export declare function transcriptionRecoveryMutationDelayMilliseconds(retryAfterMilliseconds: number | undefined, attempt: number, random?: () => number): number;
|
|
52
|
-
export declare function useVoiceInput({ client, workspaceId, capability, enabled, value, setValue, focusInput, disabled, createRecordingStore, createRecordingId, createOwnerId, now, }: UseVoiceInputOptions): UseVoiceInputResult;
|
|
54
|
+
export declare function useVoiceInput({ client, workspaceId, capability, enabled, value, setValue, focusInput, disabled, createRecordingStore, createRecordingId, createOwnerId, now, automaticRetryDelayMilliseconds, }: UseVoiceInputOptions): UseVoiceInputResult;
|
|
53
55
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SessionEvent, WorkspaceCaptureDegradedReason, WorkspaceCaptureManifest } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseWorkspaceCaptureOptions = ClientOverride & {
|
|
4
4
|
/** Live event log (usually `useSessionEvents().events`) — a
|
|
5
5
|
* `workspace.revision.captured` for a NEWER revision refreshes the manifest. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Session } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseWorkspaceSessionsOptions = ClientOverride & {
|
|
4
4
|
limit?: number | undefined;
|
|
5
5
|
parentSessionId?: string | null | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CreateWorkspaceRequest, UpdateWorkspaceRequest, Workspace } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseWorkspacesOptions = Pick<ClientOverride, "client"> & {
|
|
4
4
|
pollIntervalMs?: number | undefined;
|
|
5
5
|
enabled?: boolean | undefined;
|