@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
package/src/session-context.ts
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
StreamConnectionState,
|
|
3
|
+
WorkspaceControlEvent,
|
|
4
|
+
WorkspaceInteractionRevisionEvent,
|
|
5
|
+
} from "@opengeni/sdk";
|
|
2
6
|
import { createContext, useContext } from "react";
|
|
3
7
|
import type {
|
|
4
8
|
EmbeddedFileAttachmentClientLike,
|
|
5
9
|
EmbeddedGoalClientLike,
|
|
6
10
|
EmbeddedHumanInputSessionClientLike,
|
|
11
|
+
EmbeddedBrowserInteractionClientLike,
|
|
12
|
+
EmbeddedComputerInteractionClientLike,
|
|
13
|
+
EmbeddedInteractionClientLike,
|
|
14
|
+
EmbeddedInterventionClientLike,
|
|
7
15
|
EmbeddedRealtimeSessionClientLike,
|
|
8
16
|
EmbeddedSessionClientLike,
|
|
9
17
|
EmbeddedSessionLineageClientLike,
|
|
@@ -17,6 +25,8 @@ export type OpenGeniContextValue = {
|
|
|
17
25
|
workspaceId: string;
|
|
18
26
|
workspaceControlEvent: WorkspaceControlEvent | null;
|
|
19
27
|
workspaceControlConnectionState: StreamConnectionState | "idle" | "error";
|
|
28
|
+
workspaceInteractionEvent: WorkspaceInteractionRevisionEvent | null;
|
|
29
|
+
workspaceInteractionConnectionState: StreamConnectionState | "idle" | "error";
|
|
20
30
|
registerSessionReconciler: (
|
|
21
31
|
sessionId: string,
|
|
22
32
|
key: string,
|
|
@@ -76,6 +86,26 @@ export type EmbeddedFileAttachmentClientOverride = {
|
|
|
76
86
|
workspaceId?: string | undefined;
|
|
77
87
|
};
|
|
78
88
|
|
|
89
|
+
export type EmbeddedInteractionClientOverride = {
|
|
90
|
+
client?: EmbeddedInteractionClientLike | undefined;
|
|
91
|
+
workspaceId?: string | undefined;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export type EmbeddedInterventionClientOverride = {
|
|
95
|
+
client?: EmbeddedInterventionClientLike | undefined;
|
|
96
|
+
workspaceId?: string | undefined;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export type EmbeddedBrowserInteractionClientOverride = {
|
|
100
|
+
client?: EmbeddedBrowserInteractionClientLike | undefined;
|
|
101
|
+
workspaceId?: string | undefined;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export type EmbeddedComputerInteractionClientOverride = {
|
|
105
|
+
client?: EmbeddedComputerInteractionClientLike | undefined;
|
|
106
|
+
workspaceId?: string | undefined;
|
|
107
|
+
};
|
|
108
|
+
|
|
79
109
|
export type EmbeddedSessionContextValue = Omit<OpenGeniContextValue, "client"> & {
|
|
80
110
|
client: EmbeddedSessionClientLike;
|
|
81
111
|
};
|
|
@@ -114,6 +144,8 @@ function useEmbeddedClientRefinement<TClient extends object>(
|
|
|
114
144
|
workspaceId,
|
|
115
145
|
workspaceControlEvent: context?.workspaceControlEvent ?? null,
|
|
116
146
|
workspaceControlConnectionState: context?.workspaceControlConnectionState ?? "idle",
|
|
147
|
+
workspaceInteractionEvent: context?.workspaceInteractionEvent ?? null,
|
|
148
|
+
workspaceInteractionConnectionState: context?.workspaceInteractionConnectionState ?? "idle",
|
|
117
149
|
registerSessionReconciler: context?.registerSessionReconciler ?? NOOP_REGISTER_RECONCILER,
|
|
118
150
|
reconcileSession: context?.reconcileSession ?? NOOP_RECONCILE_SESSION,
|
|
119
151
|
};
|
|
@@ -140,11 +172,134 @@ export function useOpenGeni(override: ClientOverride = {}): OpenGeniContextValue
|
|
|
140
172
|
workspaceId,
|
|
141
173
|
workspaceControlEvent: context?.workspaceControlEvent ?? null,
|
|
142
174
|
workspaceControlConnectionState: context?.workspaceControlConnectionState ?? "idle",
|
|
175
|
+
workspaceInteractionEvent: context?.workspaceInteractionEvent ?? null,
|
|
176
|
+
workspaceInteractionConnectionState: context?.workspaceInteractionConnectionState ?? "idle",
|
|
143
177
|
registerSessionReconciler: context?.registerSessionReconciler ?? NOOP_REGISTER_RECONCILER,
|
|
144
178
|
reconcileSession: context?.reconcileSession ?? NOOP_RECONCILE_SESSION,
|
|
145
179
|
};
|
|
146
180
|
}
|
|
147
181
|
|
|
182
|
+
const BROWSER_INTERACTION_METHODS = [
|
|
183
|
+
"streamWorkspaceInteractionRevisions",
|
|
184
|
+
"listNetworkRoutes",
|
|
185
|
+
"getNetworkRoute",
|
|
186
|
+
"createNetworkRoute",
|
|
187
|
+
"updateNetworkRoute",
|
|
188
|
+
"listSiteAuthConnections",
|
|
189
|
+
"getSiteAuthConnection",
|
|
190
|
+
"createSiteAuthConnection",
|
|
191
|
+
"updateSiteAuthConnection",
|
|
192
|
+
"listAuthRuns",
|
|
193
|
+
"getAuthRun",
|
|
194
|
+
"startBrowserAuthRun",
|
|
195
|
+
"reportBrowserAuthRun",
|
|
196
|
+
"protectedBrowserAuthFill",
|
|
197
|
+
"verifyBrowserAuthRun",
|
|
198
|
+
"listInteractionInterventions",
|
|
199
|
+
"getInteractionIntervention",
|
|
200
|
+
"createInteractionIntervention",
|
|
201
|
+
"resolveInteractionIntervention",
|
|
202
|
+
"listAttachedBrowsers",
|
|
203
|
+
"getAttachedBrowser",
|
|
204
|
+
"listBrowserIdentities",
|
|
205
|
+
"getBrowserIdentity",
|
|
206
|
+
"createBrowserIdentity",
|
|
207
|
+
"updateBrowserIdentity",
|
|
208
|
+
"listBrowserRevisions",
|
|
209
|
+
"listBrowserSessions",
|
|
210
|
+
"getBrowserSession",
|
|
211
|
+
"readBrowserClipboard",
|
|
212
|
+
"listBrowserDownloads",
|
|
213
|
+
"getBrowserDownload",
|
|
214
|
+
"saveBrowserDownload",
|
|
215
|
+
"createBrowserSession",
|
|
216
|
+
"listBrowserTargets",
|
|
217
|
+
"openBrowserTarget",
|
|
218
|
+
"selectBrowserTarget",
|
|
219
|
+
"closeBrowserTarget",
|
|
220
|
+
"observeBrowserTarget",
|
|
221
|
+
"actInBrowser",
|
|
222
|
+
"getBrowserActionReceipt",
|
|
223
|
+
"listBrowserDiagnostics",
|
|
224
|
+
"attachBrowserSession",
|
|
225
|
+
"heartbeatBrowserSession",
|
|
226
|
+
"publishBrowserRevision",
|
|
227
|
+
"suspendBrowserSession",
|
|
228
|
+
"resumeBrowserSession",
|
|
229
|
+
"endBrowserSession",
|
|
230
|
+
] as const;
|
|
231
|
+
|
|
232
|
+
const COMPUTER_INTERACTION_METHODS = [
|
|
233
|
+
"streamWorkspaceInteractionRevisions",
|
|
234
|
+
"listInteractionInterventions",
|
|
235
|
+
"getInteractionIntervention",
|
|
236
|
+
"createInteractionIntervention",
|
|
237
|
+
"resolveInteractionIntervention",
|
|
238
|
+
"listComputerSessions",
|
|
239
|
+
"getComputerSession",
|
|
240
|
+
"readComputerClipboard",
|
|
241
|
+
"createComputerSession",
|
|
242
|
+
"listComputerTargets",
|
|
243
|
+
"observeComputerTarget",
|
|
244
|
+
"actInComputer",
|
|
245
|
+
"getComputerActionReceipt",
|
|
246
|
+
"attachComputerSession",
|
|
247
|
+
"heartbeatComputerSession",
|
|
248
|
+
"endComputerSession",
|
|
249
|
+
] as const;
|
|
250
|
+
|
|
251
|
+
const INTERVENTION_METHODS = [
|
|
252
|
+
"streamWorkspaceInteractionRevisions",
|
|
253
|
+
"listInteractionInterventions",
|
|
254
|
+
"getInteractionIntervention",
|
|
255
|
+
"createInteractionIntervention",
|
|
256
|
+
"resolveInteractionIntervention",
|
|
257
|
+
] as const;
|
|
258
|
+
|
|
259
|
+
/** Resolve only the workspace-wide Browser/Computer intervention surface. */
|
|
260
|
+
export function useEmbeddedInterventions(
|
|
261
|
+
override: EmbeddedInterventionClientOverride = {},
|
|
262
|
+
): EmbeddedClientContextValue<EmbeddedInterventionClientLike> {
|
|
263
|
+
return useEmbeddedClientRefinement(
|
|
264
|
+
override,
|
|
265
|
+
INTERVENTION_METHODS,
|
|
266
|
+
"interaction intervention hooks",
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/** Resolve only BrowserSession methods for a standalone Browser embed. */
|
|
271
|
+
export function useEmbeddedBrowserInteraction(
|
|
272
|
+
override: EmbeddedBrowserInteractionClientOverride = {},
|
|
273
|
+
): EmbeddedClientContextValue<EmbeddedBrowserInteractionClientLike> {
|
|
274
|
+
return useEmbeddedClientRefinement(
|
|
275
|
+
override,
|
|
276
|
+
BROWSER_INTERACTION_METHODS,
|
|
277
|
+
"browser interaction hooks",
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/** Resolve only ComputerSession methods for a standalone Computer embed. */
|
|
282
|
+
export function useEmbeddedComputerInteraction(
|
|
283
|
+
override: EmbeddedComputerInteractionClientOverride = {},
|
|
284
|
+
): EmbeddedClientContextValue<EmbeddedComputerInteractionClientLike> {
|
|
285
|
+
return useEmbeddedClientRefinement(
|
|
286
|
+
override,
|
|
287
|
+
COMPUTER_INTERACTION_METHODS,
|
|
288
|
+
"computer interaction hooks",
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/** Resolve the complete Browser + Computer client surface. */
|
|
293
|
+
export function useEmbeddedInteraction(
|
|
294
|
+
override: EmbeddedInteractionClientOverride = {},
|
|
295
|
+
): EmbeddedClientContextValue<EmbeddedInteractionClientLike> {
|
|
296
|
+
return useEmbeddedClientRefinement(
|
|
297
|
+
override,
|
|
298
|
+
[...BROWSER_INTERACTION_METHODS, ...COMPUTER_INTERACTION_METHODS],
|
|
299
|
+
"interaction hooks",
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
|
|
148
303
|
/**
|
|
149
304
|
* Resolve the narrow client required by the session-only hooks. The full
|
|
150
305
|
* provider client is structurally compatible, while an explicit host proxy
|
|
@@ -12,9 +12,9 @@ import { cn } from "../lib/cn";
|
|
|
12
12
|
import { truncate } from "../lib/format";
|
|
13
13
|
import { defaultToolRegistry } from "./tool-renderers";
|
|
14
14
|
import { useEntranceAnimation, useEntranceAnimationLive } from "./entrance";
|
|
15
|
-
import type { RetainedScreenshotLoader, ToolRegistry } from "./registry";
|
|
15
|
+
import type { RetainedArtifactLoader, RetainedScreenshotLoader, ToolRegistry } from "./registry";
|
|
16
16
|
import { useSeenActivityIds } from "./seen-activity-ids";
|
|
17
|
-
import { BodyNote, PayloadBlock, ActivityDisclosure } from "./shared";
|
|
17
|
+
import { BodyNote, PayloadBlock, ActivityDisclosure, ToolCallTruncationProvider } from "./shared";
|
|
18
18
|
import { toolDisplayName } from "./tool-display-name";
|
|
19
19
|
import type { ActivityItem, MemoryItem, ReasoningItem, SandboxItem, WorkerItem } from "./types";
|
|
20
20
|
|
|
@@ -44,6 +44,8 @@ export type ActivityRailProps = {
|
|
|
44
44
|
*/
|
|
45
45
|
onMemoryClick?: ((memoryId: string) => void) | undefined;
|
|
46
46
|
loadRetainedScreenshot?: RetainedScreenshotLoader | undefined;
|
|
47
|
+
/** Resolve permanent generated-image receipts through the authenticated host SDK. */
|
|
48
|
+
loadRetainedArtifact?: RetainedArtifactLoader | undefined;
|
|
47
49
|
/** Drop the left rule + indent (used inside a folded turn summary). */
|
|
48
50
|
bare?: boolean | undefined;
|
|
49
51
|
className?: string | undefined;
|
|
@@ -67,6 +69,7 @@ export function ActivityRail({
|
|
|
67
69
|
onOpenSession,
|
|
68
70
|
onMemoryClick,
|
|
69
71
|
loadRetainedScreenshot,
|
|
72
|
+
loadRetainedArtifact,
|
|
70
73
|
bare,
|
|
71
74
|
className,
|
|
72
75
|
}: ActivityRailProps) {
|
|
@@ -120,11 +123,15 @@ export function ActivityRail({
|
|
|
120
123
|
onOpenSession,
|
|
121
124
|
onMemoryClick,
|
|
122
125
|
loadRetainedScreenshot,
|
|
126
|
+
loadRetainedArtifact,
|
|
123
127
|
);
|
|
124
128
|
return (
|
|
125
129
|
<div
|
|
126
130
|
key={item.id}
|
|
127
131
|
data-og-timeline-row-anchor=""
|
|
132
|
+
data-og-annotation-source-key={
|
|
133
|
+
item.kind === "tool-call" ? item.annotationSource?.eventId : undefined
|
|
134
|
+
}
|
|
128
135
|
className={cn(newFamily && "mt-3", enteringIds.has(item.id) && "animate-og-row-enter")}
|
|
129
136
|
>
|
|
130
137
|
{row}
|
|
@@ -146,13 +153,22 @@ function renderActivity(
|
|
|
146
153
|
onOpenSession: ((sessionId: string) => void) | undefined,
|
|
147
154
|
onMemoryClick: ((memoryId: string) => void) | undefined,
|
|
148
155
|
loadRetainedScreenshot: RetainedScreenshotLoader | undefined,
|
|
156
|
+
loadRetainedArtifact: RetainedArtifactLoader | undefined,
|
|
149
157
|
) {
|
|
150
158
|
switch (item.kind) {
|
|
151
159
|
case "reasoning":
|
|
152
160
|
return <ReasoningRow item={item} />;
|
|
153
161
|
case "tool-call": {
|
|
154
162
|
const Renderer = toolRegistry.resolve(item);
|
|
155
|
-
return
|
|
163
|
+
return (
|
|
164
|
+
<ToolCallTruncationProvider value={item.truncation ?? null}>
|
|
165
|
+
<Renderer
|
|
166
|
+
item={item}
|
|
167
|
+
loadRetainedScreenshot={loadRetainedScreenshot}
|
|
168
|
+
loadRetainedArtifact={loadRetainedArtifact}
|
|
169
|
+
/>
|
|
170
|
+
</ToolCallTruncationProvider>
|
|
171
|
+
);
|
|
156
172
|
}
|
|
157
173
|
case "worker":
|
|
158
174
|
return <WorkerRow item={item} onOpenSession={onOpenSession} />;
|
|
@@ -401,6 +417,12 @@ function WorkerRow({
|
|
|
401
417
|
{truncate(item.prompt, 140)}
|
|
402
418
|
</p>
|
|
403
419
|
) : null}
|
|
420
|
+
{failed && item.failure ? (
|
|
421
|
+
<div className="mt-1 min-w-0 text-og-sm text-og-status-failed">
|
|
422
|
+
<p className="font-og-mono text-og-xs">{item.failure.code}</p>
|
|
423
|
+
<p className="mt-0.5 break-words">{item.failure.message}</p>
|
|
424
|
+
</div>
|
|
425
|
+
) : null}
|
|
404
426
|
</div>
|
|
405
427
|
{failed ? (
|
|
406
428
|
<span className="inline-flex shrink-0 self-center items-center gap-1.5 font-og-mono text-og-xs leading-none text-og-status-failed">
|
package/src/timeline/index.ts
CHANGED
|
@@ -45,6 +45,7 @@ export type {
|
|
|
45
45
|
SessionStatusItem,
|
|
46
46
|
TimelineGroup,
|
|
47
47
|
TimelineItem,
|
|
48
|
+
TimelineAnnotationSourceDescriptor,
|
|
48
49
|
TurnEndItem,
|
|
49
50
|
ToolCallItem,
|
|
50
51
|
UserMessageItem,
|
|
@@ -56,7 +57,9 @@ export type {
|
|
|
56
57
|
export { createToolRegistry, rawTypeOf } from "./registry";
|
|
57
58
|
export type {
|
|
58
59
|
CreateToolRegistryOptions,
|
|
60
|
+
RetainedArtifactLoader,
|
|
59
61
|
RetainedScreenshotLoader,
|
|
62
|
+
VideoArtifactPlaybackLoader,
|
|
60
63
|
ToolRegistry,
|
|
61
64
|
ToolRegistryEntry,
|
|
62
65
|
ToolRenderer,
|
package/src/timeline/parsers.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
normalizeMcpOutput,
|
|
3
|
+
parseGeneratedImageReceipt,
|
|
4
|
+
type GeneratedImageReceipt,
|
|
5
|
+
type GitFileDiff,
|
|
6
|
+
type RetainedArtifactMetadata,
|
|
7
|
+
} from "@opengeni/sdk";
|
|
2
8
|
import { tryParseJson } from "../lib/format";
|
|
3
9
|
|
|
10
|
+
export type { GeneratedImageReceipt };
|
|
11
|
+
|
|
4
12
|
/* ----------------------------------------------------------------------------
|
|
5
13
|
Pure parsers for the provider-native tool shapes that the timeline renders.
|
|
6
14
|
|
|
@@ -571,6 +579,11 @@ export function retainedScreenshotMetadata(out: unknown): RetainedArtifactMetada
|
|
|
571
579
|
: null;
|
|
572
580
|
}
|
|
573
581
|
|
|
582
|
+
/** Parse the closed permanent generated-image receipt from native/function tools. */
|
|
583
|
+
export function generatedImageReceipt(out: unknown): GeneratedImageReceipt | null {
|
|
584
|
+
return parseGeneratedImageReceipt(out);
|
|
585
|
+
}
|
|
586
|
+
|
|
574
587
|
export type TimelineMediaPreview = {
|
|
575
588
|
type: "media_preview";
|
|
576
589
|
mediaType: string;
|