@opengeni/react 0.48.0 → 0.57.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 +138 -2
- 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 +199 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/{chunk-NJ7M2B6Z.js → chunk-5UQPNLIO.js} +16 -8
- package/dist/{chunk-NJ7M2B6Z.js.map → chunk-5UQPNLIO.js.map} +1 -1
- package/dist/{chunk-LHLYWG5R.js → chunk-6KLX2RH5.js} +461 -38
- package/dist/chunk-6KLX2RH5.js.map +1 -0
- package/dist/chunk-7WCLAEFV.js +2828 -0
- package/dist/chunk-7WCLAEFV.js.map +1 -0
- package/dist/{chunk-I4MPFDRP.js → chunk-B6WPZSTT.js} +104 -104
- package/dist/{chunk-I4MPFDRP.js.map → chunk-B6WPZSTT.js.map} +1 -1
- package/dist/{chunk-EKZH6IDG.js → chunk-C5ZPSSS5.js} +111 -1
- package/dist/chunk-C5ZPSSS5.js.map +1 -0
- package/dist/{chunk-OL6QVXGF.js → chunk-HA46CYQK.js} +152 -8
- package/dist/chunk-HA46CYQK.js.map +1 -0
- package/dist/chunk-HUIKIDM5.js +2148 -0
- package/dist/chunk-HUIKIDM5.js.map +1 -0
- package/dist/{chunk-FWXGSNXT.js → chunk-IGC6A2ZI.js} +585 -34
- package/dist/chunk-IGC6A2ZI.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-LLOLUHVG.js +5937 -0
- package/dist/chunk-LLOLUHVG.js.map +1 -0
- package/dist/{chunk-WYA65Y3F.js → chunk-MKPIAGVL.js} +13 -3
- package/dist/chunk-MKPIAGVL.js.map +1 -0
- package/dist/chunk-PEI6RANI.js +3234 -0
- package/dist/chunk-PEI6RANI.js.map +1 -0
- package/dist/chunk-R3AZOAB5.js +933 -0
- package/dist/chunk-R3AZOAB5.js.map +1 -0
- package/dist/{chunk-O4VXOBGF.js → chunk-WSK7G5LE.js} +70 -2
- package/dist/chunk-WSK7G5LE.js.map +1 -0
- package/dist/{chunk-23EJ676W.js → chunk-XBZWOM2K.js} +9 -4
- package/dist/chunk-XBZWOM2K.js.map +1 -0
- package/dist/{chunk-XCNTXWBB.js → chunk-Y7OEDUJ5.js} +856 -338
- package/dist/chunk-Y7OEDUJ5.js.map +1 -0
- package/dist/client.d.ts +10 -2
- 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 +9 -0
- package/dist/components/artifacts/presentation-editor.d.ts +297 -0
- package/dist/components/artifacts/published-html-artifact-frame.d.ts +14 -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-input.d.ts +7 -0
- package/dist/components/browser-viewer.d.ts +30 -0
- package/dist/components/chat-composer.d.ts +8 -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 +2 -2
- package/dist/components/composer.d.ts +17 -17
- package/dist/components/computer-viewer.d.ts +24 -0
- package/dist/components/copy-button.d.ts +2 -2
- package/dist/components/desktop-viewer.d.ts +50 -22
- 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/interaction-intervention-banner.d.ts +11 -0
- 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 +3 -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 +2 -2
- package/dist/components/markdown.d.ts +1 -1
- package/dist/components/message-timeline.d.ts +12 -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 +3 -3
- package/dist/components/sandbox-terminal.d.ts +24 -4
- package/dist/components/sandbox-workspace.d.ts +28 -9
- 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 +1 -1
- package/dist/composer.d.ts +11 -11
- package/dist/composer.js +7 -7
- package/dist/hooks/internal.d.ts +1 -1
- package/dist/hooks/use-attached-browsers.d.ts +21 -0
- package/dist/hooks/use-auth-runs.d.ts +32 -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-downloads.d.ts +25 -0
- package/dist/hooks/use-browser-frame-stream.d.ts +28 -0
- package/dist/hooks/use-browser-identities.d.ts +30 -0
- package/dist/hooks/use-browser-session.d.ts +29 -0
- package/dist/hooks/use-browser-sessions.d.ts +32 -0
- package/dist/hooks/use-channels.d.ts +26 -0
- package/dist/hooks/use-codex-accounts.d.ts +2 -2
- 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 +29 -0
- package/dist/hooks/use-computer-sessions.d.ts +28 -0
- package/dist/hooks/use-desktop-stream.d.ts +5 -1
- package/dist/hooks/use-environments.d.ts +1 -1
- 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-interaction-interventions.d.ts +27 -0
- package/dist/hooks/use-interaction-invalidation.d.ts +19 -0
- 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 +4 -4
- package/dist/hooks/use-network-routes.d.ts +25 -0
- 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 +6 -4
- package/dist/hooks/use-sandbox-git.d.ts +6 -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-site-auth-connections.d.ts +25 -0
- package/dist/hooks/use-slash-commands.d.ts +1 -1
- package/dist/hooks/use-supergrok-accounts.d.ts +26 -0
- package/dist/hooks/use-terminal-stream.d.ts +11 -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 +1 -1
- 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 +162 -155
- package/dist/index.js +1822 -1703
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +33 -0
- package/dist/interaction.js +550 -0
- package/dist/interaction.js.map +1 -0
- package/dist/interactive-workbench-viewers-TOHBXJEE.js +15 -0
- package/dist/interactive-workbench-viewers-TOHBXJEE.js.map +1 -0
- package/dist/lib/host-platform.d.ts +5 -0
- package/dist/lib/relay-wire.d.ts +24 -1
- package/dist/lib/sandbox-liveness.d.ts +9 -0
- package/dist/lib/terminal-capability.d.ts +5 -0
- package/dist/lib/xterm-theme.d.ts +1 -1
- package/dist/machines.d.ts +30 -30
- package/dist/machines.js +2 -2
- package/dist/model-policy.d.ts +1 -1
- package/dist/model-policy.js +1 -1
- package/dist/provider.d.ts +6 -5
- package/dist/{queue-surface-implementation-U5JFG7HT.js → queue-surface-implementation-2KVJTYXH.js} +100 -48
- 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 +8 -8
- package/dist/realtime.d.ts +4 -4
- package/dist/realtime.js +38 -11
- package/dist/realtime.js.map +1 -1
- package/dist/session-context.d.ts +28 -2
- package/dist/session-ui.d.ts +14 -14
- package/dist/session-ui.js +5 -4
- package/dist/session.d.ts +28 -28
- package/dist/session.js +10 -10
- package/dist/timeline/activity-rail.d.ts +5 -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 +4 -1
- package/dist/timeline/projection.d.ts +3 -3
- package/dist/timeline/registry.d.ts +8 -2
- 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 +44 -3
- 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/package.json +36 -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 +89 -0
- package/src/client.ts +157 -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 +104 -0
- package/src/components/artifacts/presentation-editor.tsx +3148 -0
- package/src/components/artifacts/published-html-artifact-frame.tsx +38 -0
- package/src/components/artifacts/spreadsheet-canvas.ts +799 -0
- package/src/components/artifacts/spreadsheet-grid.tsx +2129 -0
- package/src/components/browser-input.ts +65 -0
- package/src/components/browser-viewer.tsx +2702 -0
- package/src/components/chat-composer.tsx +13 -0
- package/src/components/code-editor.tsx +89 -30
- package/src/components/composer-transcription-control.tsx +10 -6
- package/src/components/computer-viewer.tsx +1636 -0
- package/src/components/desktop-viewer.tsx +215 -74
- package/src/components/generated-video-player.tsx +89 -0
- package/src/components/interaction-intervention-banner.tsx +99 -0
- package/src/components/interactive-workbench-viewers.ts +2 -0
- package/src/components/machine-input-display.ts +3 -0
- package/src/components/machines/machine-detail.tsx +1 -1
- package/src/components/message-timeline.tsx +289 -32
- package/src/components/model-policy-picker.tsx +15 -0
- package/src/components/queue-surface-implementation.tsx +116 -60
- package/src/components/sandbox-files.tsx +2 -2
- package/src/components/sandbox-terminal.tsx +128 -46
- package/src/components/sandbox-workspace.tsx +256 -90
- package/src/components/session-chrome.tsx +53 -13
- 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/workbench-changes.tsx +188 -31
- package/src/components/workspace-dock.tsx +59 -5
- package/src/hooks/use-attached-browsers.ts +154 -0
- package/src/hooks/use-auth-runs.ts +278 -0
- package/src/hooks/use-browser-downloads.ts +218 -0
- package/src/hooks/use-browser-frame-stream.ts +425 -0
- package/src/hooks/use-browser-identities.ts +266 -0
- package/src/hooks/use-browser-session.ts +543 -0
- package/src/hooks/use-browser-sessions.ts +286 -0
- package/src/hooks/use-channels.ts +99 -0
- package/src/hooks/use-composer.ts +769 -24
- package/src/hooks/use-computer-frame-stream.ts +434 -0
- package/src/hooks/use-computer-session.ts +462 -0
- package/src/hooks/use-computer-sessions.ts +251 -0
- package/src/hooks/use-desktop-stream.ts +39 -7
- package/src/hooks/use-interaction-interventions.ts +242 -0
- package/src/hooks/use-interaction-invalidation.ts +66 -0
- package/src/hooks/use-machine-chip.ts +15 -3
- package/src/hooks/use-machines.ts +33 -3
- package/src/hooks/use-network-routes.ts +214 -0
- package/src/hooks/use-packs.ts +51 -0
- package/src/hooks/use-sandbox-files.ts +98 -55
- package/src/hooks/use-sandbox-git.ts +93 -38
- package/src/hooks/use-sandbox-terminal.ts +3 -2
- package/src/hooks/use-session-capabilities.ts +59 -46
- package/src/hooks/use-site-auth-connections.ts +226 -0
- package/src/hooks/use-supergrok-accounts.ts +81 -0
- package/src/hooks/use-terminal-stream.ts +359 -47
- package/src/hooks/use-video-artifact-playback.ts +28 -0
- package/src/hooks/use-workspace-edit.ts +2 -1
- package/src/index.ts +18 -0
- package/src/interaction.ts +101 -0
- package/src/lib/host-platform.ts +10 -0
- package/src/lib/relay-wire.ts +47 -4
- package/src/lib/sandbox-liveness.ts +11 -0
- package/src/lib/terminal-capability.ts +10 -0
- package/src/model-policy.ts +19 -4
- package/src/provider.tsx +133 -1
- package/src/realtime/realtime-control.tsx +34 -6
- package/src/session-context.ts +156 -1
- package/src/timeline/activity-rail.tsx +25 -3
- package/src/timeline/index.ts +3 -0
- package/src/timeline/parsers.ts +14 -1
- package/src/timeline/projection.ts +269 -14
- package/src/timeline/registry.ts +13 -1
- package/src/timeline/screenshot-lightbox.tsx +19 -9
- package/src/timeline/shared.tsx +56 -8
- package/src/timeline/tool-renderers.tsx +303 -50
- package/src/timeline/types.ts +57 -3
- package/styles/compiled.css +312 -21
- package/styles/index.css +15 -0
- package/styles/responsive.css +13 -1
- package/dist/chunk-23EJ676W.js.map +0 -1
- package/dist/chunk-EKZH6IDG.js.map +0 -1
- package/dist/chunk-FWXGSNXT.js.map +0 -1
- package/dist/chunk-LHLYWG5R.js.map +0 -1
- package/dist/chunk-O4VXOBGF.js.map +0 -1
- package/dist/chunk-OL6QVXGF.js.map +0 -1
- package/dist/chunk-WYA65Y3F.js.map +0 -1
- package/dist/chunk-XCNTXWBB.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-U5JFG7HT.js.map +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type BrowserFrame, type BrowserFrameStreamOptions, type BrowserSessionAttachment } from "@opengeni/sdk/interaction";
|
|
2
|
+
import { type EmbeddedBrowserInteractionClientOverride } from "../session-context.js";
|
|
3
|
+
export type BrowserFrameConnectionState = "idle" | "attaching" | "connecting" | "live" | "reconnecting" | "error";
|
|
4
|
+
export type BrowserFrameWebSocket = Pick<WebSocket, "binaryType" | "readyState" | "close" | "addEventListener" | "removeEventListener"> & {
|
|
5
|
+
send(data: ArrayBuffer): void;
|
|
6
|
+
};
|
|
7
|
+
export type BrowserFrameWebSocketFactory = (url: string, protocols: string[]) => BrowserFrameWebSocket;
|
|
8
|
+
export type UseBrowserFrameStreamOptions = EmbeddedBrowserInteractionClientOverride & {
|
|
9
|
+
browserSessionId: string | null;
|
|
10
|
+
targetId: string | null;
|
|
11
|
+
enabled?: boolean | undefined;
|
|
12
|
+
stream?: BrowserFrameStreamOptions | undefined;
|
|
13
|
+
webSocketFactory?: BrowserFrameWebSocketFactory | undefined;
|
|
14
|
+
};
|
|
15
|
+
export type UseBrowserFrameStreamResult = {
|
|
16
|
+
state: BrowserFrameConnectionState;
|
|
17
|
+
frame: BrowserFrame | null;
|
|
18
|
+
attachment: Pick<BrowserSessionAttachment, "browserSessionId" | "controllerGeneration" | "targetId" | "expiresAt"> | null;
|
|
19
|
+
error: Error | null;
|
|
20
|
+
reconnect: () => void;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Reconnecting, latest-only BrowserSession media attachment. Direct placement
|
|
24
|
+
* grants travel as a WebSocket subprotocol; connected-machine grants stay in the
|
|
25
|
+
* relay's first authenticated binary message. Neither transport puts a grant in
|
|
26
|
+
* a URL, event, log, or separately exposed React state.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useBrowserFrameStream(options: UseBrowserFrameStreamOptions): UseBrowserFrameStreamResult;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { BrowserIdentity, BrowserIdentityMutationResponse, BrowserRevisionListResponse, CreateBrowserIdentityRequest, PublishBrowserRevisionRequest, PublishBrowserRevisionResponse, UpdateBrowserIdentityRequest } from "@opengeni/sdk/interaction";
|
|
2
|
+
import type { EmbeddedBrowserInteractionClientLike } from "../client.js";
|
|
3
|
+
import { type EmbeddedBrowserInteractionClientOverride } from "../session-context.js";
|
|
4
|
+
export type UseBrowserIdentitiesOptions = EmbeddedBrowserInteractionClientOverride & {
|
|
5
|
+
enabled?: boolean | undefined;
|
|
6
|
+
includeArchived?: boolean | undefined;
|
|
7
|
+
};
|
|
8
|
+
export type UseBrowserIdentitiesResult = {
|
|
9
|
+
revision: number;
|
|
10
|
+
identities: BrowserIdentity[];
|
|
11
|
+
loading: boolean;
|
|
12
|
+
refreshing: boolean;
|
|
13
|
+
mutating: boolean;
|
|
14
|
+
error: Error | null;
|
|
15
|
+
refresh: () => Promise<void>;
|
|
16
|
+
create: (request: Omit<CreateBrowserIdentityRequest, "operationId"> & {
|
|
17
|
+
operationId?: string;
|
|
18
|
+
}) => Promise<BrowserIdentityMutationResponse>;
|
|
19
|
+
update: (identityId: string, request: Omit<UpdateBrowserIdentityRequest, "operationId"> & {
|
|
20
|
+
operationId?: string;
|
|
21
|
+
}) => Promise<BrowserIdentityMutationResponse>;
|
|
22
|
+
revisions: (identityId: string) => Promise<BrowserRevisionListResponse>;
|
|
23
|
+
publish: (browserSessionId: string, request: Omit<PublishBrowserRevisionRequest, "operationId"> & {
|
|
24
|
+
operationId?: string;
|
|
25
|
+
}) => Promise<PublishBrowserRevisionResponse>;
|
|
26
|
+
};
|
|
27
|
+
/** Workspace browser-profile library and explicit immutable-version mutations. */
|
|
28
|
+
export declare function useBrowserIdentities(options?: UseBrowserIdentitiesOptions): UseBrowserIdentitiesResult;
|
|
29
|
+
/** Exported for narrow proxy implementations and tests. */
|
|
30
|
+
export type BrowserIdentitiesClient = EmbeddedBrowserInteractionClientLike;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { BrowserAction, BrowserActionBatch, BrowserActionReceipt, BrowserClipboard, BrowserDiagnosticBatch, BrowserDiagnosticsOptions, BrowserFrame, BrowserObservation, BrowserSession, BrowserTarget } from "@opengeni/sdk/interaction";
|
|
2
|
+
import { type EmbeddedBrowserInteractionClientOverride } from "../session-context.js";
|
|
3
|
+
export type UseBrowserSessionOptions = EmbeddedBrowserInteractionClientOverride & {
|
|
4
|
+
browserSessionId: string | null;
|
|
5
|
+
enabled?: boolean | undefined;
|
|
6
|
+
pollIntervalMs?: number | undefined;
|
|
7
|
+
};
|
|
8
|
+
export type UseBrowserSessionResult = {
|
|
9
|
+
session: BrowserSession | null;
|
|
10
|
+
targets: BrowserTarget[];
|
|
11
|
+
selectedTarget: BrowserTarget | null;
|
|
12
|
+
observation: BrowserObservation | null;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
mutating: boolean;
|
|
15
|
+
error: Error | null;
|
|
16
|
+
refresh: () => Promise<void>;
|
|
17
|
+
selectTarget: (targetId: string) => Promise<BrowserTarget>;
|
|
18
|
+
openTarget: (url?: string) => Promise<BrowserTarget>;
|
|
19
|
+
closeTarget: (targetId: string) => Promise<void>;
|
|
20
|
+
act: (action: BrowserAction | BrowserActionBatch, operationId?: string) => Promise<BrowserActionReceipt>;
|
|
21
|
+
/** Dispatch input against the exact image a human saw. Stale images fail at
|
|
22
|
+
* the controller fence instead of targeting a newer page. */
|
|
23
|
+
actFromFrame: (action: BrowserAction | BrowserActionBatch, frame: BrowserFrame, operationId?: string) => Promise<BrowserActionReceipt>;
|
|
24
|
+
readClipboard: () => Promise<BrowserClipboard>;
|
|
25
|
+
diagnostics: (options?: BrowserDiagnosticsOptions) => Promise<BrowserDiagnosticBatch>;
|
|
26
|
+
};
|
|
27
|
+
/** Selected BrowserSession control state. All human actions use the same
|
|
28
|
+
* generation-fenced controller operation stream as agent actions. */
|
|
29
|
+
export declare function useBrowserSession(options: UseBrowserSessionOptions): UseBrowserSessionResult;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { BrowserSession, BrowserSessionMutationResponse, CreateBrowserSessionRequest } from "@opengeni/sdk/interaction";
|
|
2
|
+
import type { EmbeddedBrowserInteractionClientLike } from "../client.js";
|
|
3
|
+
import { type EmbeddedBrowserInteractionClientOverride } from "../session-context.js";
|
|
4
|
+
export type UseBrowserSessionsOptions = EmbeddedBrowserInteractionClientOverride & {
|
|
5
|
+
/** Current agent/session relevance. Workspace peers remain in `sessions`. */
|
|
6
|
+
sessionId?: string | undefined;
|
|
7
|
+
enabled?: boolean | undefined;
|
|
8
|
+
/** Polling fallback used only while the workspace invalidation stream is unavailable. */
|
|
9
|
+
pollIntervalMs?: number | undefined;
|
|
10
|
+
};
|
|
11
|
+
export type UseBrowserSessionsResult = {
|
|
12
|
+
revision: number;
|
|
13
|
+
sessions: BrowserSession[];
|
|
14
|
+
relevantSessions: BrowserSession[];
|
|
15
|
+
loading: boolean;
|
|
16
|
+
refreshing: boolean;
|
|
17
|
+
error: Error | null;
|
|
18
|
+
refresh: () => Promise<void>;
|
|
19
|
+
create: (request: Omit<CreateBrowserSessionRequest, "operationId"> & {
|
|
20
|
+
operationId?: string;
|
|
21
|
+
}) => Promise<BrowserSessionMutationResponse>;
|
|
22
|
+
suspend: (browserSessionId: string, operationId?: string) => Promise<BrowserSessionMutationResponse>;
|
|
23
|
+
resume: (browserSessionId: string, operationId?: string) => Promise<BrowserSessionMutationResponse>;
|
|
24
|
+
end: (browserSessionId: string, operationId?: string) => Promise<BrowserSessionMutationResponse>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Workspace-wide BrowserSession registry. Associations rank relevance but never
|
|
28
|
+
* hide peer resources; no explicit share ceremony or per-view ownership exists.
|
|
29
|
+
*/
|
|
30
|
+
export declare function useBrowserSessions(options?: UseBrowserSessionsOptions): UseBrowserSessionsResult;
|
|
31
|
+
/** Exported for narrow proxy implementations and tests. */
|
|
32
|
+
export type BrowserSessionsClient = EmbeddedBrowserInteractionClientLike;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Channel, CreateChannelRequest, Session, UpdateChannelRequest } from "@opengeni/sdk";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
|
+
export type UseChannelsOptions = ClientOverride & {
|
|
4
|
+
pollIntervalMs?: number | undefined;
|
|
5
|
+
enabled?: boolean | undefined;
|
|
6
|
+
};
|
|
7
|
+
export type UseChannelsResult = {
|
|
8
|
+
channels: Channel[];
|
|
9
|
+
loading: boolean;
|
|
10
|
+
error: Error | null;
|
|
11
|
+
refresh: () => Promise<void>;
|
|
12
|
+
create: (request: CreateChannelRequest) => Promise<Channel | null>;
|
|
13
|
+
update: (channelId: string, request: UpdateChannelRequest) => Promise<Channel | null>;
|
|
14
|
+
remove: (channelId: string) => Promise<boolean>;
|
|
15
|
+
/** Re-file a session into a channel; null moves it back to the inbox. */
|
|
16
|
+
moveSession: (sessionId: string, channelId: string | null) => Promise<Session | null>;
|
|
17
|
+
mutating: boolean;
|
|
18
|
+
mutationError: Error | null;
|
|
19
|
+
clearMutationError: () => void;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Workspace-shared channels: rail organization for root sessions
|
|
23
|
+
* ("workstreams") by work type. Pure metadata — filing a session into a
|
|
24
|
+
* channel never affects execution.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useChannels(options?: UseChannelsOptions): UseChannelsResult;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CodexAccount, CodexAccountsResponse, CodexRotationSettings, SessionEvent } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
4
|
/** Events that change which Codex account a session runs on (or just ran). */
|
|
5
5
|
export declare function isCodexAccountEvent(event: Pick<SessionEvent, "type">): boolean;
|
|
6
6
|
/**
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { type ComposerDraft, type EffectiveControlResumeOption, type EffectiveSessionControl, type ResourceRef, type SendMessageInput, type SessionEvent } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedSessionClientOverride } from "../session-context";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
4
|
-
export type ComposerSendExtras = Omit<SendMessageInput, "text" | "clientEventId">;
|
|
1
|
+
import { type ComposerDraft, type DraftTimelineAnnotation, type EffectiveControlResumeOption, type EffectiveSessionControl, type ResourceRef, type SendMessageInput, type SessionEvent } from "@opengeni/sdk";
|
|
2
|
+
import { type EmbeddedSessionClientOverride } from "../session-context.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
|
+
export type ComposerSendExtras = Omit<SendMessageInput, "text" | "clientEventId" | "annotations">;
|
|
5
5
|
export type UseComposerOptions = EmbeddedSessionClientOverride & SessionEventFeedOptions & {
|
|
6
|
+
/** Called synchronously after an ordinary Send is accepted by the local UI. */
|
|
7
|
+
onSubmitted?: ((text: string, input: SendMessageInput) => void) | undefined;
|
|
6
8
|
/** Called with the exact accepted wire input after a successful send. */
|
|
7
9
|
onSent?: ((text: string, input: SendMessageInput) => void) | undefined;
|
|
8
10
|
/**
|
|
@@ -24,17 +26,40 @@ export type UseComposerOptions = EmbeddedSessionClientOverride & SessionEventFee
|
|
|
24
26
|
/** Disable remote composer-draft reads and writes for embedded hosts. */
|
|
25
27
|
draftPersistence?: "durable" | "disabled" | undefined;
|
|
26
28
|
};
|
|
29
|
+
export type ComposerOptimisticMessage = {
|
|
30
|
+
clientEventId: string;
|
|
31
|
+
text: string;
|
|
32
|
+
annotations: DraftTimelineAnnotation[];
|
|
33
|
+
resources: ResourceRef[];
|
|
34
|
+
occurredAt: string;
|
|
35
|
+
state: "sending" | "queued" | "failed";
|
|
36
|
+
error?: string | undefined;
|
|
37
|
+
outcomeUnknown?: boolean | undefined;
|
|
38
|
+
};
|
|
27
39
|
export type ComposerState = {
|
|
28
40
|
value: string;
|
|
29
41
|
setValue: (value: string) => void;
|
|
42
|
+
annotations?: DraftTimelineAnnotation[] | undefined;
|
|
43
|
+
addAnnotation?: ((annotation: DraftTimelineAnnotation) => void) | undefined;
|
|
44
|
+
updateAnnotation?: ((id: string, note: string) => void) | undefined;
|
|
45
|
+
removeAnnotation?: ((id: string) => void) | undefined;
|
|
46
|
+
/** Newly captured annotation the review surface should focus. */
|
|
47
|
+
annotationReviewTargetId?: string | null | undefined;
|
|
48
|
+
clearAnnotationReviewTarget?: (() => void) | undefined;
|
|
30
49
|
/** Read the current draft synchronously before a destructive replacement. */
|
|
31
50
|
hasDraftContent: () => boolean;
|
|
32
51
|
/** Append the draft behind prompts already visible in the queue. */
|
|
33
52
|
send: (text?: string) => Promise<boolean>;
|
|
53
|
+
/** Locally acknowledged ordinary sends awaiting durable timeline reconciliation. */
|
|
54
|
+
optimisticMessages?: ComposerOptimisticMessage[] | undefined;
|
|
55
|
+
retryOptimisticMessage?: ((clientEventId: string) => void) | undefined;
|
|
56
|
+
removeOptimisticMessage?: ((clientEventId: string) => void) | undefined;
|
|
34
57
|
/** Supersede current direction with the draft. */
|
|
35
58
|
steer: (text?: string) => Promise<boolean>;
|
|
36
59
|
/** Optimistic-to-durable projection for a Steer that has not started yet. */
|
|
37
60
|
steering?: ComposerSteeringState | null | undefined;
|
|
61
|
+
/** Immediate mutation-receipt projection while physical cancellation settles. */
|
|
62
|
+
stoppingAttempt?: "current" | "previous" | null | undefined;
|
|
38
63
|
sending: boolean;
|
|
39
64
|
canSend: boolean;
|
|
40
65
|
/** Pause the session without deleting its prompt queue. */
|
|
@@ -65,6 +90,8 @@ export type ComposerSteeringState = {
|
|
|
65
90
|
clientEventId: string | null;
|
|
66
91
|
triggerEventId: string | null;
|
|
67
92
|
turnId: string | null;
|
|
93
|
+
/** True only when the accepted Steer durably interrupted a live attempt. */
|
|
94
|
+
stoppingPreviousAttempt?: boolean | undefined;
|
|
68
95
|
};
|
|
69
96
|
/**
|
|
70
97
|
* Draft + send + Pause/Resume state for the chat composer — the only
|
|
@@ -76,12 +103,12 @@ export declare function useComposer(sessionId: string | null | undefined, option
|
|
|
76
103
|
/** Events that can atomically replace or clear this subject's durable draft. */
|
|
77
104
|
export declare function isComposerDraftEvent(event: Pick<SessionEvent, "type">): boolean;
|
|
78
105
|
/**
|
|
79
|
-
* Default text for a
|
|
80
|
-
* Kept non-empty so the wire contract (`text: z.string().min(1)`) and
|
|
81
|
-
* worker's non-whitespace guard accept it
|
|
82
|
-
* `resources`.
|
|
106
|
+
* Default text for a resource-only message (attachments present, no typed
|
|
107
|
+
* draft). Kept non-empty so the wire contract (`text: z.string().min(1)`) and
|
|
108
|
+
* the worker's non-whitespace guard accept it. The export name is retained for
|
|
109
|
+
* compatibility now that repositories can ride beside files in `resources`.
|
|
83
110
|
*/
|
|
84
|
-
export declare const FILE_ONLY_MESSAGE_TEXT = "(see attached
|
|
111
|
+
export declare const FILE_ONLY_MESSAGE_TEXT = "(see attached context)";
|
|
85
112
|
/** Resolve possibly-deferred extras to a concrete bag (function evaluated now). */
|
|
86
113
|
export declare function resolveSendExtras(extras: ComposerSendExtras | (() => ComposerSendExtras) | undefined): ComposerSendExtras;
|
|
87
114
|
/**
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ComputerFrame, type ComputerFrameStreamOptions, type ComputerSessionAttachment } from "@opengeni/sdk/interaction";
|
|
2
|
+
import { type EmbeddedComputerInteractionClientOverride } from "../session-context.js";
|
|
3
|
+
export type ComputerFrameConnectionState = "idle" | "attaching" | "connecting" | "live" | "reconnecting" | "error";
|
|
4
|
+
export type ComputerFrameWebSocket = Pick<WebSocket, "binaryType" | "readyState" | "close" | "addEventListener" | "removeEventListener"> & {
|
|
5
|
+
send(data: ArrayBuffer): void;
|
|
6
|
+
};
|
|
7
|
+
export type ComputerFrameWebSocketFactory = (url: string, protocols: string[]) => ComputerFrameWebSocket;
|
|
8
|
+
export type UseComputerFrameStreamOptions = EmbeddedComputerInteractionClientOverride & {
|
|
9
|
+
computerSessionId: string | null;
|
|
10
|
+
targetId: string | null;
|
|
11
|
+
enabled?: boolean | undefined;
|
|
12
|
+
stream?: ComputerFrameStreamOptions | undefined;
|
|
13
|
+
webSocketFactory?: ComputerFrameWebSocketFactory | undefined;
|
|
14
|
+
};
|
|
15
|
+
export type UseComputerFrameStreamResult = {
|
|
16
|
+
state: ComputerFrameConnectionState;
|
|
17
|
+
frame: ComputerFrame | null;
|
|
18
|
+
attachment: Pick<ComputerSessionAttachment, "computerSessionId" | "controllerGeneration" | "targetId" | "stream" | "expiresAt"> | null;
|
|
19
|
+
error: Error | null;
|
|
20
|
+
reconnect: () => void;
|
|
21
|
+
};
|
|
22
|
+
/** Reconnecting, latest-only ComputerSession media attachment. Grants remain in
|
|
23
|
+
* WebSocket subprotocols or the relay's authenticated first binary message. */
|
|
24
|
+
export declare function useComputerFrameStream(options: UseComputerFrameStreamOptions): UseComputerFrameStreamResult;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ComputerAction, ComputerActionReceipt, ComputerClipboard, 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
|
+
readClipboard: () => Promise<ComputerClipboard>;
|
|
18
|
+
/** Changes only this viewer's target cursor; it never takes ownership or
|
|
19
|
+
* foregrounds an application. */
|
|
20
|
+
selectTarget: (targetId: string) => Promise<ComputerTarget>;
|
|
21
|
+
act: (action: ComputerAction, operationId?: string) => Promise<ComputerActionReceipt>;
|
|
22
|
+
/** Dispatch pointer input against the exact displayed frame. */
|
|
23
|
+
actFromFrame: (action: Extract<ComputerAction, {
|
|
24
|
+
type: "pointer";
|
|
25
|
+
}>, frame: ComputerFrame, operationId?: string) => Promise<ComputerActionReceipt>;
|
|
26
|
+
};
|
|
27
|
+
/** Selected ComputerSession state. Semantic and pixel input share the same
|
|
28
|
+
* generation-fenced controller operation stream used by agents. */
|
|
29
|
+
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
|
+
/** Polling fallback used only while the workspace invalidation stream is unavailable. */
|
|
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;
|
|
@@ -11,6 +11,8 @@ export type UseDesktopStreamOptions = {
|
|
|
11
11
|
scaleViewport?: boolean | undefined;
|
|
12
12
|
/** Custom RFB factory (tests / a WebRTC swap). Defaults to a lazy @novnc/novnc. */
|
|
13
13
|
rfbFactory?: DesktopRfbFactory | undefined;
|
|
14
|
+
/** Additional WebSocket protocols for an authenticated placement proxy. */
|
|
15
|
+
webSocketProtocols?: string[] | undefined;
|
|
14
16
|
/** Custom socket factory for the `relay-frames` transport (tests). Defaults to
|
|
15
17
|
* `new WebSocket(url)`. Mirrors `rfbFactory` for the frame renderer. */
|
|
16
18
|
webSocketFactory?: DesktopWebSocketFactory | undefined;
|
|
@@ -20,6 +22,8 @@ export type UseDesktopStreamResult = {
|
|
|
20
22
|
error: Error | null;
|
|
21
23
|
/** Manual reconnect (e.g. after a securityfailure once a fresh URL arrives). */
|
|
22
24
|
reconnect: () => void;
|
|
25
|
+
/** Synchronous input on the already-open RFB authority. */
|
|
26
|
+
sendKey?: ((keysym: number, code: string, down?: boolean) => boolean) | undefined;
|
|
23
27
|
};
|
|
24
28
|
/**
|
|
25
29
|
* Drive the noVNC RFB lifecycle from a `DesktopStreamCapability`, using the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CreateVariableSetRequest, UpdateVariableSetRequest, VariableSet, VariableSetSecret, VariableSetVariableMetadata } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseVariableSetsOptions = ClientOverride & {
|
|
4
4
|
pollIntervalMs?: number | undefined;
|
|
5
5
|
enabled?: boolean | undefined;
|
|
@@ -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 & {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CreateInteractionInterventionRequest, InteractionIntervention, InteractionInterventionMutationResponse, ResolveInteractionInterventionRequest } from "@opengeni/sdk/interaction";
|
|
2
|
+
import type { EmbeddedInterventionClientLike } from "../client.js";
|
|
3
|
+
import { type EmbeddedInterventionClientOverride } from "../session-context.js";
|
|
4
|
+
export type UseInteractionInterventionsOptions = EmbeddedInterventionClientOverride & {
|
|
5
|
+
enabled?: boolean | undefined;
|
|
6
|
+
resourceKind?: "browser_session" | "computer_session" | undefined;
|
|
7
|
+
resourceId?: string | null | undefined;
|
|
8
|
+
includeSettled?: boolean | undefined;
|
|
9
|
+
pollIntervalMs?: number | undefined;
|
|
10
|
+
};
|
|
11
|
+
export type UseInteractionInterventionsResult = {
|
|
12
|
+
interventions: InteractionIntervention[];
|
|
13
|
+
loading: boolean;
|
|
14
|
+
refreshing: boolean;
|
|
15
|
+
mutating: boolean;
|
|
16
|
+
error: Error | null;
|
|
17
|
+
refresh: () => Promise<void>;
|
|
18
|
+
create: (request: Omit<CreateInteractionInterventionRequest, "operationId"> & {
|
|
19
|
+
operationId?: string;
|
|
20
|
+
}) => Promise<InteractionInterventionMutationResponse>;
|
|
21
|
+
resolve: (interventionId: string, request: Omit<ResolveInteractionInterventionRequest, "operationId"> & {
|
|
22
|
+
operationId?: string;
|
|
23
|
+
}) => Promise<InteractionInterventionMutationResponse>;
|
|
24
|
+
};
|
|
25
|
+
/** Human-action bridge shared by Browser and Computer surfaces. */
|
|
26
|
+
export declare function useInteractionInterventions(options?: UseInteractionInterventionsOptions): UseInteractionInterventionsResult;
|
|
27
|
+
export type InteractionInterventionsClient = EmbeddedInterventionClientLike;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StreamConnectionState, WorkspaceInteractionRevisionEvent } from "@opengeni/sdk";
|
|
2
|
+
export type InteractionInvalidationOptions = {
|
|
3
|
+
workspaceId: string;
|
|
4
|
+
/** Distinguishes filtered projections of the same workspace catalog. */
|
|
5
|
+
key: string;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
event: WorkspaceInteractionRevisionEvent | null;
|
|
8
|
+
connectionState: StreamConnectionState | "idle" | "error";
|
|
9
|
+
/** Catalog responses carry the workspace revision; live-state lists do not. */
|
|
10
|
+
knownRevision?: number | undefined;
|
|
11
|
+
refresh: () => Promise<void>;
|
|
12
|
+
fallbackPollIntervalMs?: number | undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Refetch authoritative lists on the shared latest-revision stream. Poll only
|
|
16
|
+
* while that stream is unavailable, preserving standalone-hook degradation
|
|
17
|
+
* without multiplying healthy-provider traffic.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useInteractionInvalidation(options: InteractionInvalidationOptions): void;
|
|
@@ -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,6 +1,6 @@
|
|
|
1
|
-
import type { RemoveEnrollmentRequest, RemoveEnrollmentResponse } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
3
|
-
import type { MachinesResponse, MachineView, MetricSample } from "../types/machines";
|
|
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";
|
|
4
4
|
/**
|
|
5
5
|
* The slice of the SDK client the Machines surface needs. The method NAMES +
|
|
6
6
|
* SIGNATURES match M10's `OpenGeniClient` (`listMachines`, `machineMetricsSeries`)
|
|
@@ -35,7 +35,7 @@ export type MachinesClientLike = {
|
|
|
35
35
|
*/
|
|
36
36
|
swapActiveSandbox?: (workspaceId: string, sessionId: string, request: {
|
|
37
37
|
target: string;
|
|
38
|
-
}) => Promise<
|
|
38
|
+
}) => Promise<SwapActiveSandboxResponse>;
|
|
39
39
|
/**
|
|
40
40
|
* Host-supplied swap adapter (an escape hatch). When present it wins over the
|
|
41
41
|
* default `swapActiveSandbox` path. Session-scoped, like the swap it backs.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { CreateNetworkRouteRequest, NetworkRoute, NetworkRouteMutationResponse, UpdateNetworkRouteRequest } from "@opengeni/sdk/interaction";
|
|
2
|
+
import type { EmbeddedBrowserInteractionClientLike } from "../client.js";
|
|
3
|
+
import { type EmbeddedBrowserInteractionClientOverride } from "../session-context.js";
|
|
4
|
+
export type UseNetworkRoutesOptions = EmbeddedBrowserInteractionClientOverride & {
|
|
5
|
+
enabled?: boolean | undefined;
|
|
6
|
+
includeArchived?: boolean | undefined;
|
|
7
|
+
};
|
|
8
|
+
export type UseNetworkRoutesResult = {
|
|
9
|
+
revision: number;
|
|
10
|
+
routes: NetworkRoute[];
|
|
11
|
+
loading: boolean;
|
|
12
|
+
refreshing: boolean;
|
|
13
|
+
mutating: boolean;
|
|
14
|
+
error: Error | null;
|
|
15
|
+
refresh: () => Promise<void>;
|
|
16
|
+
create: (request: Omit<CreateNetworkRouteRequest, "operationId"> & {
|
|
17
|
+
operationId?: string;
|
|
18
|
+
}) => Promise<NetworkRouteMutationResponse>;
|
|
19
|
+
update: (networkRouteId: string, request: Omit<UpdateNetworkRouteRequest, "operationId"> & {
|
|
20
|
+
operationId?: string;
|
|
21
|
+
}) => Promise<NetworkRouteMutationResponse>;
|
|
22
|
+
};
|
|
23
|
+
/** Workspace network-route registry. Route mutations never expose brokered credentials. */
|
|
24
|
+
export declare function useNetworkRoutes(options?: UseNetworkRoutesOptions): UseNetworkRoutesResult;
|
|
25
|
+
export type NetworkRoutesClient = EmbeddedBrowserInteractionClientLike;
|
|
@@ -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";
|
|
@@ -52,12 +52,14 @@ export type UseSandboxFilesOptions = ClientOverride & {
|
|
|
52
52
|
active?: boolean | undefined;
|
|
53
53
|
/** Repository roots advertised by capabilities, relative to the workspace. */
|
|
54
54
|
repoPaths?: readonly string[] | undefined;
|
|
55
|
-
/** The lease liveness
|
|
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
|
|
56
58
|
* capability is advertised even on a COLD box, so the mount-time list can race
|
|
57
59
|
* the box: it lists before the box is warm, gets an empty/errored result, and
|
|
58
60
|
* (with no `fs.changed` event) never re-lists. Passing liveness re-lists when
|
|
59
61
|
* the box first becomes warm, so the tree populates as soon as the box is up. */
|
|
60
|
-
liveness?:
|
|
62
|
+
liveness?: SessionCapabilities["liveness"] | null | undefined;
|
|
61
63
|
/** The latest turn-end workspace capture (from `useWorkspaceCapture`). The tree
|
|
62
64
|
* paints immediately from this durable index, then a warm box reconciles live
|
|
63
65
|
* in place. If that live read fails, the capture remains a truthful read-only
|
|
@@ -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`. */
|
|
@@ -19,9 +19,10 @@ export type UseSandboxGitOptions = ClientOverride & {
|
|
|
19
19
|
enabled?: boolean | undefined;
|
|
20
20
|
/** Pause live reads/invalidation while preserving the last rendered result. */
|
|
21
21
|
active?: boolean | undefined;
|
|
22
|
-
/** Lease liveness
|
|
23
|
-
*
|
|
24
|
-
|
|
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;
|
|
25
26
|
/** The latest turn-end capture (from `useWorkspaceCapture`). Seeds the diff
|
|
26
27
|
* immediately; a warm box reconciles live and leaves this durable review
|
|
27
28
|
* surface in place if the live request is temporarily unavailable. */
|
|
@@ -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;
|