@opengeni/react 0.57.0 → 2.2.0-canary.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 +36 -11
- package/dist/artifacts-spreadsheet.js +1 -1
- package/dist/artifacts.js +1 -1
- package/dist/browser-viewer-GXUICIAG.js +14 -0
- package/dist/{chunk-R3AZOAB5.js → chunk-4MDLEHXL.js} +9 -115
- package/dist/chunk-4MDLEHXL.js.map +1 -0
- package/dist/{chunk-Y7OEDUJ5.js → chunk-5RZN3DD5.js} +1014 -420
- package/dist/chunk-5RZN3DD5.js.map +1 -0
- package/dist/chunk-5YK2ZDIG.js +116 -0
- package/dist/chunk-5YK2ZDIG.js.map +1 -0
- package/dist/chunk-H5YGYNXS.js +329 -0
- package/dist/chunk-H5YGYNXS.js.map +1 -0
- package/dist/{chunk-7WCLAEFV.js → chunk-ICA6R6TW.js} +2 -2
- package/dist/{chunk-7WCLAEFV.js.map → chunk-ICA6R6TW.js.map} +1 -1
- package/dist/{chunk-IGC6A2ZI.js → chunk-JOAVA2TW.js} +589 -217
- package/dist/chunk-JOAVA2TW.js.map +1 -0
- package/dist/{chunk-5UQPNLIO.js → chunk-LTCHJ4MS.js} +9 -9
- package/dist/chunk-LTCHJ4MS.js.map +1 -0
- package/dist/{chunk-C5ZPSSS5.js → chunk-NEXLLTP4.js} +2 -1
- package/dist/{chunk-C5ZPSSS5.js.map → chunk-NEXLLTP4.js.map} +1 -1
- package/dist/chunk-QGBJ6GHG.js +2300 -0
- package/dist/chunk-QGBJ6GHG.js.map +1 -0
- package/dist/{chunk-B6WPZSTT.js → chunk-UOLJWT5Y.js} +78 -16
- package/dist/chunk-UOLJWT5Y.js.map +1 -0
- package/dist/{chunk-MKPIAGVL.js → chunk-W6NFJXSA.js} +8 -19
- package/dist/chunk-W6NFJXSA.js.map +1 -0
- package/dist/{chunk-XBZWOM2K.js → chunk-X4A66EWZ.js} +8 -3
- package/dist/chunk-X4A66EWZ.js.map +1 -0
- package/dist/chunk-X4JAFD5R.js +3907 -0
- package/dist/chunk-X4JAFD5R.js.map +1 -0
- package/dist/{chunk-6KLX2RH5.js → chunk-XSA2QAKP.js} +334 -19
- package/dist/chunk-XSA2QAKP.js.map +1 -0
- package/dist/{chunk-HA46CYQK.js → chunk-XXWH2JLC.js} +792 -206
- package/dist/chunk-XXWH2JLC.js.map +1 -0
- package/dist/client.d.ts +2 -2
- package/dist/components/browser-viewer.d.ts +7 -1
- package/dist/components/computer-viewer.d.ts +4 -1
- package/dist/components/enrollment-consent.d.ts +6 -3
- package/dist/components/file-browser.d.ts +7 -1
- package/dist/components/human-input-form.d.ts +1 -1
- package/dist/components/human-input-surface.d.ts +1 -1
- package/dist/components/machine-card.d.ts +4 -1
- package/dist/components/machines/machine-detail.d.ts +4 -1
- package/dist/components/machines/machine-operation-policy.d.ts +11 -0
- package/dist/components/machines-dashboard.d.ts +3 -1
- package/dist/components/markdown.d.ts +20 -1
- package/dist/components/message-timeline.d.ts +1 -1
- package/dist/components/model-policy-picker.d.ts +2 -0
- package/dist/components/pierre-file.d.ts +1 -1
- package/dist/components/sandbox-files.d.ts +8 -2
- package/dist/components/sandbox-workspace.d.ts +33 -3
- package/dist/components/session-chrome.d.ts +15 -3
- package/dist/components/workspace-dock.d.ts +6 -2
- package/dist/composer.js +5 -5
- package/dist/computer-viewer-ZOP4Q7A7.js +16 -0
- package/dist/computer-viewer-ZOP4Q7A7.js.map +1 -0
- package/dist/hooks/channel-cache.d.ts +23 -0
- package/dist/hooks/shared-machines-list.d.ts +14 -0
- package/dist/hooks/use-attached-browsers.d.ts +2 -1
- package/dist/hooks/use-channels.d.ts +1 -0
- package/dist/hooks/use-composer.d.ts +37 -9
- package/dist/hooks/use-machine-chip.d.ts +3 -3
- package/dist/hooks/use-machines.d.ts +19 -1
- package/dist/hooks/use-sandbox-files.d.ts +1 -0
- package/dist/hooks/use-session-background-commands.d.ts +14 -0
- package/dist/hooks/use-turn-queue.d.ts +12 -0
- package/dist/hooks/use-workspace-sessions.d.ts +1 -0
- package/dist/index.d.ts +7 -5
- package/dist/index.js +1096 -623
- package/dist/index.js.map +1 -1
- package/dist/interaction.js +29 -181
- package/dist/interaction.js.map +1 -1
- package/dist/lib/interaction-errors.d.ts +3 -0
- package/dist/machines.d.ts +4 -2
- package/dist/machines.js +10 -2
- package/dist/model-policy.d.ts +1 -1
- package/dist/model-policy.js +1 -1
- package/dist/platform-activity-row-BJHUHXAT.js +169 -0
- package/dist/platform-activity-row-BJHUHXAT.js.map +1 -0
- package/dist/{queue-surface-implementation-2KVJTYXH.js → queue-surface-implementation-BSKUWHRI.js} +76 -16
- package/dist/queue-surface-implementation-BSKUWHRI.js.map +1 -0
- package/dist/realtime/realtime-control.d.ts +10 -3
- package/dist/realtime.js +138 -29
- package/dist/realtime.js.map +1 -1
- package/dist/session-ui.d.ts +1 -1
- package/dist/session-ui.js +6 -2
- package/dist/session.d.ts +2 -2
- package/dist/session.js +4 -4
- package/dist/timeline/index.d.ts +1 -1
- package/dist/timeline/platform-activity-row.d.ts +15 -0
- package/dist/timeline/screenshot-lightbox.d.ts +1 -1
- package/dist/timeline/shared.d.ts +4 -2
- package/dist/timeline/types.d.ts +48 -5
- package/dist/types/machines.d.ts +2 -2
- package/package.json +3 -3
- package/src/client.ts +12 -1
- package/src/components/artifacts/editable-spreadsheet.tsx +1 -1
- package/src/components/browser-viewer.tsx +361 -58
- package/src/components/chat-composer.tsx +1 -1
- package/src/components/composer.tsx +6 -6
- package/src/components/computer-viewer.tsx +368 -115
- package/src/components/enrollment-consent.tsx +64 -6
- package/src/components/file-browser.tsx +117 -2
- package/src/components/human-input-form.tsx +91 -55
- package/src/components/human-input-surface.tsx +1 -1
- package/src/components/machine-card.tsx +111 -0
- package/src/components/machine-input-display.ts +15 -0
- package/src/components/machines/machine-detail.tsx +47 -0
- package/src/components/machines/machine-operation-policy.tsx +179 -0
- package/src/components/machines-dashboard.tsx +6 -0
- package/src/components/markdown.tsx +174 -20
- package/src/components/message-timeline.tsx +162 -17
- package/src/components/model-policy-picker.tsx +9 -17
- package/src/components/pierre-file.tsx +1 -1
- package/src/components/queue-surface-implementation.tsx +82 -16
- package/src/components/sandbox-files.tsx +135 -19
- package/src/components/sandbox-workspace.tsx +204 -92
- package/src/components/session-chrome.tsx +415 -208
- package/src/components/session-status.tsx +1 -1
- package/src/components/user-message-body.tsx +168 -48
- package/src/components/workspace-dock.tsx +141 -175
- package/src/hooks/channel-cache.ts +104 -0
- package/src/hooks/shared-machines-list.ts +239 -0
- package/src/hooks/use-attached-browsers.ts +5 -1
- package/src/hooks/use-browser-frame-stream.ts +6 -1
- package/src/hooks/use-browser-session.ts +6 -4
- package/src/hooks/use-browser-sessions.ts +7 -1
- package/src/hooks/use-channels.ts +32 -10
- package/src/hooks/use-composer.ts +760 -291
- package/src/hooks/use-computer-frame-stream.ts +14 -9
- package/src/hooks/use-computer-session.ts +16 -14
- package/src/hooks/use-computer-sessions.ts +8 -1
- package/src/hooks/use-last-started-turn-policy.ts +1 -1
- package/src/hooks/use-machine-chip.ts +23 -6
- package/src/hooks/use-machines.ts +104 -6
- package/src/hooks/use-sandbox-files.ts +195 -140
- package/src/hooks/use-sandbox-git.ts +58 -29
- package/src/hooks/use-session-background-commands.ts +56 -0
- package/src/hooks/use-session-capabilities.ts +18 -0
- package/src/hooks/use-turn-queue.ts +111 -12
- package/src/hooks/use-workspace-sessions.ts +5 -1
- package/src/index.ts +26 -4
- package/src/lib/interaction-errors.ts +18 -0
- package/src/machines.ts +9 -1
- package/src/model-policy.ts +10 -2
- package/src/realtime/realtime-control.tsx +200 -37
- package/src/session-context.ts +1 -0
- package/src/session-ui.ts +6 -1
- package/src/session.ts +9 -1
- package/src/timeline/activity-rail.tsx +20 -75
- package/src/timeline/index.ts +4 -0
- package/src/timeline/platform-activity-row.tsx +201 -0
- package/src/timeline/projection.ts +476 -23
- package/src/timeline/screenshot-lightbox.tsx +48 -14
- package/src/timeline/shared.tsx +8 -2
- package/src/timeline/tool-renderers.tsx +104 -6
- package/src/timeline/turn-summary.tsx +6 -1
- package/src/timeline/types.ts +75 -2
- package/src/types/machines.ts +10 -0
- package/styles/compiled.css +115 -104
- package/dist/chunk-5UQPNLIO.js.map +0 -1
- package/dist/chunk-6KLX2RH5.js.map +0 -1
- package/dist/chunk-B6WPZSTT.js.map +0 -1
- package/dist/chunk-HA46CYQK.js.map +0 -1
- package/dist/chunk-IGC6A2ZI.js.map +0 -1
- package/dist/chunk-LLOLUHVG.js +0 -5937
- package/dist/chunk-LLOLUHVG.js.map +0 -1
- package/dist/chunk-MKPIAGVL.js.map +0 -1
- package/dist/chunk-R3AZOAB5.js.map +0 -1
- package/dist/chunk-XBZWOM2K.js.map +0 -1
- package/dist/chunk-Y7OEDUJ5.js.map +0 -1
- package/dist/interactive-workbench-viewers-TOHBXJEE.js +0 -15
- package/dist/queue-surface-implementation-2KVJTYXH.js.map +0 -1
- /package/dist/{interactive-workbench-viewers-TOHBXJEE.js.map → browser-viewer-GXUICIAG.js.map} +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import type { ReasoningItem, SandboxItem, StartupPhaseItem } from "./types";
|
|
2
|
+
|
|
3
|
+
type RowJsx = typeof import("react/jsx-runtime").jsx;
|
|
4
|
+
type RowJsxs = typeof import("react/jsx-runtime").jsxs;
|
|
5
|
+
|
|
6
|
+
export default function PlatformActivityRow({
|
|
7
|
+
item,
|
|
8
|
+
d: ActivityDisclosure,
|
|
9
|
+
p: PayloadBlock,
|
|
10
|
+
t: displayName,
|
|
11
|
+
b: BotIcon,
|
|
12
|
+
m: Markdown,
|
|
13
|
+
r: truncate,
|
|
14
|
+
j,
|
|
15
|
+
s,
|
|
16
|
+
}: {
|
|
17
|
+
item: ReasoningItem | SandboxItem | StartupPhaseItem;
|
|
18
|
+
d: typeof import("./shared").ActivityDisclosure;
|
|
19
|
+
p: typeof import("./shared").PayloadBlock;
|
|
20
|
+
t: (name: string) => string;
|
|
21
|
+
b: typeof import("lucide-react").BotIcon;
|
|
22
|
+
m: typeof import("../components/markdown").Markdown;
|
|
23
|
+
r: typeof import("../lib/format").truncate;
|
|
24
|
+
j: RowJsx;
|
|
25
|
+
s: RowJsxs;
|
|
26
|
+
}) {
|
|
27
|
+
if (item.kind === "reasoning") {
|
|
28
|
+
return j(ActivityDisclosure, {
|
|
29
|
+
icon: brainIcon(j, s),
|
|
30
|
+
iconTone: "muted",
|
|
31
|
+
title: item.streaming
|
|
32
|
+
? "Thinking"
|
|
33
|
+
: j("span", {
|
|
34
|
+
className: "font-normal italic text-og-fg-subtle",
|
|
35
|
+
children: "Thought",
|
|
36
|
+
}),
|
|
37
|
+
running: item.streaming,
|
|
38
|
+
preview: truncate(item.text, 110),
|
|
39
|
+
children: j("div", {
|
|
40
|
+
className: "text-og-base leading-6 text-og-fg-muted [&_strong]:text-og-fg-muted",
|
|
41
|
+
children: j(Markdown, { streaming: item.streaming, children: item.text }),
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
if (item.kind === "sandbox") {
|
|
46
|
+
return s(ActivityDisclosure, {
|
|
47
|
+
icon: terminalIcon(j, s),
|
|
48
|
+
iconTone:
|
|
49
|
+
item.status === "failed" ? "failed" : item.status === "running" ? "running" : "muted",
|
|
50
|
+
title: sandboxRowTitle(item, displayName),
|
|
51
|
+
running: item.status === "running",
|
|
52
|
+
failed: item.status === "failed",
|
|
53
|
+
cancelled: item.status === "cancelled",
|
|
54
|
+
preview: item.command ?? undefined,
|
|
55
|
+
children: [
|
|
56
|
+
item.command ? j(PayloadBlock, { label: "Command", value: item.command }, "command") : null,
|
|
57
|
+
item.output ? j(PayloadBlock, { label: "Output", value: item.output }, "output") : null,
|
|
58
|
+
],
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const failed = item.status === "failed";
|
|
63
|
+
const running = item.status === "running";
|
|
64
|
+
const duration = startupDuration(item.durationMs);
|
|
65
|
+
return j(ActivityDisclosure, {
|
|
66
|
+
icon: j(BotIcon, { className: "size-3.5" }),
|
|
67
|
+
iconTone: failed ? "failed" : running ? "running" : "muted",
|
|
68
|
+
title: startupPhaseTitle(item.phase, item.status, item.outcome),
|
|
69
|
+
preview:
|
|
70
|
+
item.phase === "model_preparation"
|
|
71
|
+
? "Includes overlapping sandbox, rig, repository, and runtime setup shown below."
|
|
72
|
+
: undefined,
|
|
73
|
+
running,
|
|
74
|
+
failed,
|
|
75
|
+
cancelled: item.status === "cancelled",
|
|
76
|
+
chip: duration ? { tone: failed ? "bad" : "muted", text: duration } : undefined,
|
|
77
|
+
expandable: false,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function brainIcon(j: RowJsx, s: RowJsxs) {
|
|
82
|
+
return lucideIcon(j, s, "brain", [
|
|
83
|
+
j("path", { d: "M 12 18V5" }, "spine"),
|
|
84
|
+
j("path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4" }, "center"),
|
|
85
|
+
j("path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5" }, "top"),
|
|
86
|
+
j("path", { d: "M17.997 5.125a4 4 0 0 1 2.526 5.77" }, "upper-right"),
|
|
87
|
+
j("path", { d: "M18 18a4 4 0 0 0 2-7.464" }, "right"),
|
|
88
|
+
j("path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" }, "base"),
|
|
89
|
+
j("path", { d: "M6 18a4 4 0 0 1-2-7.464" }, "left"),
|
|
90
|
+
j("path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77" }, "upper-left"),
|
|
91
|
+
]);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function terminalIcon(j: RowJsx, s: RowJsxs) {
|
|
95
|
+
return lucideIcon(j, s, "square-terminal", [
|
|
96
|
+
j("path", { d: "m7 11 2-2-2-2" }, "prompt"),
|
|
97
|
+
j("path", { d: "M11 13h4" }, "cursor"),
|
|
98
|
+
j("rect", { width: 18, height: 18, x: 3, y: 3, rx: 2, ry: 2 }, "frame"),
|
|
99
|
+
]);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function lucideIcon(j: RowJsx, s: RowJsxs, name: string, children: ReturnType<RowJsx>[]) {
|
|
103
|
+
return s("svg", {
|
|
104
|
+
"aria-hidden": "true",
|
|
105
|
+
className: `lucide lucide-${name} size-3.5`,
|
|
106
|
+
fill: "none",
|
|
107
|
+
height: 24,
|
|
108
|
+
stroke: "currentColor",
|
|
109
|
+
strokeLinecap: "round",
|
|
110
|
+
strokeLinejoin: "round",
|
|
111
|
+
strokeWidth: 2,
|
|
112
|
+
viewBox: "0 0 24 24",
|
|
113
|
+
width: 24,
|
|
114
|
+
children,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function sandboxRowTitle(item: SandboxItem, displayName: (name: string) => string): string {
|
|
119
|
+
if (item.name === "sandbox.provision") {
|
|
120
|
+
return startupPhaseTitle(
|
|
121
|
+
"sandbox",
|
|
122
|
+
item.status === "cancelled" ? "complete" : item.status,
|
|
123
|
+
item.origin ?? null,
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
return displayName(item.name);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function startupPhaseTitle(
|
|
130
|
+
phase: StartupPhaseItem["phase"],
|
|
131
|
+
status: StartupPhaseItem["status"],
|
|
132
|
+
outcome: StartupPhaseItem["outcome"],
|
|
133
|
+
): string {
|
|
134
|
+
if (status === "complete" && phase === "sandbox" && outcome && outcome !== "skipped") {
|
|
135
|
+
return `Sandbox ${outcome === "resumed" ? "reattached" : outcome}`;
|
|
136
|
+
}
|
|
137
|
+
if (status === "complete" && phase === "rig" && outcome === "skipped") {
|
|
138
|
+
return "Rig already ready";
|
|
139
|
+
}
|
|
140
|
+
const statusIndex =
|
|
141
|
+
status === "running" ? 0 : status === "failed" ? 1 : status === "cancelled" ? 2 : 3;
|
|
142
|
+
return STARTUP_PHASE_TITLES[phase][statusIndex];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const STARTUP_PHASE_TITLES: Record<
|
|
146
|
+
StartupPhaseItem["phase"],
|
|
147
|
+
readonly [string, string, string, string]
|
|
148
|
+
> = {
|
|
149
|
+
queue: [
|
|
150
|
+
"Waiting for a worker",
|
|
151
|
+
"Worker startup failed",
|
|
152
|
+
"Worker wait interrupted",
|
|
153
|
+
"Worker started",
|
|
154
|
+
],
|
|
155
|
+
sandbox: [
|
|
156
|
+
"Starting sandbox",
|
|
157
|
+
"Sandbox didn’t start",
|
|
158
|
+
"Sandbox startup interrupted",
|
|
159
|
+
"Sandbox ready",
|
|
160
|
+
],
|
|
161
|
+
rig: ["Setting up rig", "Rig setup failed", "Rig setup interrupted", "Rig ready"],
|
|
162
|
+
repository: [
|
|
163
|
+
"Preparing repository",
|
|
164
|
+
"Repository preparation failed",
|
|
165
|
+
"Repository preparation interrupted",
|
|
166
|
+
"Repository ready",
|
|
167
|
+
],
|
|
168
|
+
files: [
|
|
169
|
+
"Preparing files",
|
|
170
|
+
"File preparation failed",
|
|
171
|
+
"File preparation interrupted",
|
|
172
|
+
"Files ready",
|
|
173
|
+
],
|
|
174
|
+
tools: [
|
|
175
|
+
"Connecting tools",
|
|
176
|
+
"Tool connection failed",
|
|
177
|
+
"Tool connection interrupted",
|
|
178
|
+
"Tools ready",
|
|
179
|
+
],
|
|
180
|
+
model_preparation: [
|
|
181
|
+
"Preparing runtime and model request",
|
|
182
|
+
"Runtime/model preparation failed",
|
|
183
|
+
"Runtime/model preparation interrupted",
|
|
184
|
+
"Model request dispatched",
|
|
185
|
+
],
|
|
186
|
+
provider_first_byte: [
|
|
187
|
+
"Waiting for model",
|
|
188
|
+
"Model didn’t respond",
|
|
189
|
+
"Model wait interrupted",
|
|
190
|
+
"Model started responding",
|
|
191
|
+
],
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
function startupDuration(durationMs: number | null): string | null {
|
|
195
|
+
if (durationMs === null || !Number.isFinite(durationMs) || durationMs < 0) return null;
|
|
196
|
+
if (durationMs < 1_000) return `${Math.round(durationMs)}ms`;
|
|
197
|
+
if (durationMs < 60_000) return `${(durationMs / 1_000).toFixed(1)}s`;
|
|
198
|
+
const minutes = Math.floor(durationMs / 60_000);
|
|
199
|
+
const seconds = Math.round((durationMs % 60_000) / 1_000);
|
|
200
|
+
return `${minutes}m ${String(seconds).padStart(2, "0")}s`;
|
|
201
|
+
}
|