@opengeni/react 1.4.2 → 1.4.5-canary.37458084490001
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 +17 -6
- package/dist/artifacts.d.ts +1 -0
- package/dist/artifacts.js +22 -15
- package/dist/artifacts.js.map +1 -1
- package/dist/{browser-viewer-WGJ43YGI.js → browser-viewer-CV23VIHB.js} +8 -6
- package/dist/chunk-3ZC6QPOM.js +174 -0
- package/dist/chunk-3ZC6QPOM.js.map +1 -0
- package/dist/{chunk-YVFRBXST.js → chunk-4BCVCJSU.js} +2 -2
- package/dist/{chunk-JHTIMBOL.js → chunk-5JSUNNQN.js} +26 -4
- package/dist/{chunk-JHTIMBOL.js.map → chunk-5JSUNNQN.js.map} +1 -1
- package/dist/{chunk-MDIXFKA3.js → chunk-6FOTSVWU.js} +303 -109
- package/dist/chunk-6FOTSVWU.js.map +1 -0
- package/dist/{chunk-IUHHPMAX.js → chunk-7RRBX5EM.js} +14 -85
- package/dist/chunk-7RRBX5EM.js.map +1 -0
- package/dist/{chunk-L2J3PU7A.js → chunk-7ZB7I3KP.js} +24 -98
- package/dist/chunk-7ZB7I3KP.js.map +1 -0
- package/dist/{chunk-LVS3MH5T.js → chunk-ATIRUHBZ.js} +128 -10
- package/dist/chunk-ATIRUHBZ.js.map +1 -0
- package/dist/chunk-BOFEQC6K.js +162 -0
- package/dist/chunk-BOFEQC6K.js.map +1 -0
- package/dist/{chunk-VCSERYXH.js → chunk-CESBPQP5.js} +309 -162
- package/dist/chunk-CESBPQP5.js.map +1 -0
- package/dist/{chunk-IYQCWGU5.js → chunk-GHJU7XG7.js} +35 -62
- package/dist/chunk-GHJU7XG7.js.map +1 -0
- package/dist/{chunk-G6YRCIYJ.js → chunk-HNVWMDNN.js} +55 -60
- package/dist/chunk-HNVWMDNN.js.map +1 -0
- package/dist/{chunk-PHBFJCEU.js → chunk-I5EGRXXG.js} +110 -7
- package/dist/chunk-I5EGRXXG.js.map +1 -0
- package/dist/{chunk-PBCZL4JP.js → chunk-INIZSNXT.js} +2 -2
- package/dist/{chunk-XS67YG5R.js → chunk-IX3K4THH.js} +24 -3
- package/dist/chunk-IX3K4THH.js.map +1 -0
- package/dist/chunk-IZV5FTJC.js +55 -0
- package/dist/chunk-IZV5FTJC.js.map +1 -0
- package/dist/chunk-JDJJMBB3.js +1883 -0
- package/dist/chunk-JDJJMBB3.js.map +1 -0
- package/dist/{chunk-C5BF4L26.js → chunk-KHF2VRXF.js} +7 -7
- package/dist/{chunk-QMMCJGFI.js → chunk-L5OKM2VX.js} +2 -2
- package/dist/chunk-LHF6BVM4.js +83 -0
- package/dist/chunk-LHF6BVM4.js.map +1 -0
- package/dist/chunk-N7S72EXK.js +25 -0
- package/dist/chunk-N7S72EXK.js.map +1 -0
- package/dist/{chunk-CVYCLFMH.js → chunk-PEHTX3V7.js} +19 -1
- package/dist/chunk-PEHTX3V7.js.map +1 -0
- package/dist/chunk-R5R5RQQD.js +51 -0
- package/dist/chunk-R5R5RQQD.js.map +1 -0
- package/dist/chunk-RI42H5IU.js +326 -0
- package/dist/chunk-RI42H5IU.js.map +1 -0
- package/dist/{chunk-JH7V627O.js → chunk-SHLZMAJN.js} +2 -11
- package/dist/chunk-SHLZMAJN.js.map +1 -0
- package/dist/{chunk-CREMJMVN.js → chunk-TZQSHCZN.js} +692 -1996
- package/dist/chunk-TZQSHCZN.js.map +1 -0
- package/dist/chunk-ZIB4H5LN.js +101 -0
- package/dist/chunk-ZIB4H5LN.js.map +1 -0
- package/dist/client.d.ts +9 -3
- package/dist/clipboard.js +1 -1
- package/dist/components/browser-viewer.d.ts +6 -0
- package/dist/components/composer.d.ts +3 -69
- package/dist/components/human-input-form.d.ts +3 -32
- package/dist/components/markdown.d.ts +8 -0
- package/dist/components/model-policy-picker.d.ts +4 -37
- package/dist/components/opper-mark.d.ts +7 -0
- package/dist/components/provider-recovery-notice.d.ts +15 -0
- package/dist/components/remark-soft-line-breaks.d.ts +38 -0
- package/dist/components/sandbox-workspace.d.ts +13 -0
- package/dist/components/session-chrome.d.ts +5 -3
- package/dist/components/session-conversation.d.ts +15 -3
- package/dist/composer-messages.d.ts +74 -0
- package/dist/composer-messages.js +9 -0
- package/dist/composer.js +15 -10
- package/dist/{computer-viewer-46UIN7F3.js → computer-viewer-K4CKYRX6.js} +4 -4
- package/dist/connect-setup.d.ts +2 -0
- package/dist/connect.d.ts +1 -1
- package/dist/connect.js +21 -6
- package/dist/connect.js.map +1 -1
- package/dist/{embedded-voice-NIL4RDX3.js → embedded-voice-3ZFWWJ6O.js} +6 -4
- package/dist/{embedded-voice-NIL4RDX3.js.map → embedded-voice-3ZFWWJ6O.js.map} +1 -1
- package/dist/hooks/shared-machines-list.d.ts +4 -0
- package/dist/hooks/use-client-config-flags.d.ts +6 -0
- package/dist/hooks/use-computer-session.d.ts +2 -0
- package/dist/hooks/use-goal.d.ts +2 -1
- package/dist/human-input-model.d.ts +40 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +116 -73
- package/dist/index.js.map +1 -1
- package/dist/interaction.js +5 -5
- package/dist/{latest-question-2POFPYNB.js → latest-question-SWC6QEVN.js} +3 -3
- package/dist/lib/clipboard.d.ts +7 -0
- package/dist/lib/provider-recovery.d.ts +49 -0
- package/dist/machines.js +2 -2
- package/dist/model-mark-paths.d.ts +34 -0
- package/dist/model-mark-paths.js +16 -0
- package/dist/model-picker-model.d.ts +111 -0
- package/dist/model-picker-model.js +25 -0
- package/dist/model-picker-model.js.map +1 -0
- package/dist/{model-policy-picker-menu-WRNSRFQC.js → model-policy-picker-menu-NM4RPTY6.js} +6 -4
- package/dist/model-policy-picker-menu-NM4RPTY6.js.map +1 -0
- package/dist/model-policy.d.ts +10 -0
- package/dist/model-policy.js +5 -1
- package/dist/organization-model.d.ts +32 -0
- package/dist/organization-model.js +65 -0
- package/dist/organization-model.js.map +1 -0
- package/dist/{platform-activity-row-PJJVATTZ.js → platform-activity-row-NJ47YBXW.js} +7 -84
- package/dist/platform-activity-row-NJ47YBXW.js.map +1 -0
- package/dist/queue-presentation-model.d.ts +72 -0
- package/dist/queue-presentation-model.js +38 -0
- package/dist/queue-presentation-model.js.map +1 -0
- package/dist/{queue-surface-implementation-67FS7FUI.js → queue-surface-implementation-YPJFQ3O6.js} +24 -252
- package/dist/queue-surface-implementation-YPJFQ3O6.js.map +1 -0
- package/dist/realtime.js +5 -3
- package/dist/{sandbox-files-34CJJNOY.js → sandbox-files-RCVCMXG7.js} +5 -5
- package/dist/sandbox-files-RCVCMXG7.js.map +1 -0
- package/dist/sandbox-label-model.d.ts +23 -0
- package/dist/sandbox-label-model.js +28 -0
- package/dist/sandbox-label-model.js.map +1 -0
- package/dist/session-attention-model.d.ts +8 -0
- package/dist/session-attention-model.js +46 -0
- package/dist/session-attention-model.js.map +1 -0
- package/dist/session-feedback-model.d.ts +20 -0
- package/dist/session-feedback-model.js +56 -0
- package/dist/session-feedback-model.js.map +1 -0
- package/dist/session-list-model.d.ts +96 -0
- package/dist/session-list-model.js +219 -0
- package/dist/session-list-model.js.map +1 -0
- package/dist/session-status-model.d.ts +19 -0
- package/dist/session-ui.js +26 -17
- package/dist/session-ui.js.map +1 -1
- package/dist/session.js +8 -6
- package/dist/testing/session-scenarios.d.ts +10 -0
- package/dist/testing/session-scenarios.js +303 -0
- package/dist/testing/session-scenarios.js.map +1 -0
- package/dist/timeline/genie-copy.d.ts +3 -0
- package/dist/timeline/genie-loading.d.ts +11 -0
- package/dist/timeline/index.d.ts +1 -1
- package/dist/timeline/notice-presentation.d.ts +7 -0
- package/dist/timeline/patch-apply-command.d.ts +18 -0
- package/dist/timeline/platform-activity-presentation.d.ts +7 -0
- package/dist/timeline/presented-image.d.ts +6 -1
- package/dist/timeline/question-nav-model.d.ts +23 -0
- package/dist/timeline/registry.d.ts +10 -1
- package/dist/timeline/retained-loaders.d.ts +1 -1
- package/dist/timeline/tool-presentation.d.ts +172 -0
- package/dist/timeline/turn-summary-model.d.ts +90 -0
- package/dist/timeline/turn-summary.d.ts +4 -74
- package/dist/timeline/work-presentation.d.ts +42 -0
- package/dist/timeline-model.d.ts +24 -0
- package/dist/timeline-model.js +152 -0
- package/dist/timeline-model.js.map +1 -0
- package/package.json +47 -3
- package/src/artifacts.ts +1 -0
- package/src/client.ts +9 -3
- package/src/components/browser-viewer.tsx +23 -2
- package/src/components/claude-mark.tsx +2 -1
- package/src/components/composer.tsx +4 -144
- package/src/components/computer-viewer.tsx +139 -30
- package/src/components/grok-mark.tsx +2 -1
- package/src/components/human-input-form.tsx +13 -124
- package/src/components/markdown.tsx +19 -1
- package/src/components/message-timeline.tsx +45 -99
- package/src/components/model-mark.tsx +2 -1
- package/src/components/model-policy-picker-menu.tsx +30 -85
- package/src/components/model-policy-picker.tsx +15 -148
- package/src/components/opper-mark.tsx +18 -0
- package/src/components/provider-recovery-notice.tsx +41 -0
- package/src/components/queue-surface-implementation.tsx +20 -349
- package/src/components/remark-soft-line-breaks.ts +166 -0
- package/src/components/sandbox-workspace.tsx +17 -1
- package/src/components/session-chrome.tsx +114 -99
- package/src/components/session-conversation.tsx +55 -6
- package/src/components/session-list.tsx +1 -1
- package/src/components/session-status.tsx +17 -16
- package/src/composer-messages.ts +150 -0
- package/src/connect-setup.tsx +45 -11
- package/src/connect.ts +1 -1
- package/src/hooks/shared-machines-list.ts +34 -1
- package/src/hooks/use-browser-session.ts +445 -168
- package/src/hooks/use-client-config-flags.ts +8 -0
- package/src/hooks/use-computer-session.ts +334 -98
- package/src/hooks/use-goal.ts +66 -10
- package/src/human-input-model.ts +147 -0
- package/src/index.ts +16 -0
- package/src/lib/clipboard.ts +29 -0
- package/src/lib/format.ts +7 -0
- package/src/lib/provider-recovery.ts +202 -0
- package/src/model-mark-paths.ts +53 -0
- package/src/model-picker-model.ts +330 -0
- package/src/model-policy.ts +43 -2
- package/src/organization-model.ts +118 -0
- package/src/queue-presentation-model.ts +464 -0
- package/src/sandbox-label-model.ts +41 -0
- package/src/session-attention-model.ts +59 -0
- package/src/session-feedback-model.ts +95 -0
- package/src/session-list-model.ts +327 -0
- package/src/session-status-model.ts +62 -0
- package/src/testing/session-scenarios.ts +326 -0
- package/src/timeline/activity-rail.tsx +5 -17
- package/src/timeline/genie-copy.ts +19 -0
- package/src/timeline/genie-loading.tsx +13 -18
- package/src/timeline/index.ts +1 -0
- package/src/timeline/notice-presentation.ts +22 -0
- package/src/timeline/patch-apply-command.tsx +135 -0
- package/src/timeline/platform-activity-presentation.ts +122 -0
- package/src/timeline/platform-activity-row.tsx +6 -96
- package/src/timeline/presented-image.ts +16 -2
- package/src/timeline/question-nav-model.ts +28 -0
- package/src/timeline/registry.ts +11 -1
- package/src/timeline/retained-loaders.ts +9 -4
- package/src/timeline/rolling-activity.tsx +7 -19
- package/src/timeline/tool-presentation.ts +1316 -0
- package/src/timeline/tool-renderers.tsx +226 -1025
- package/src/timeline/turn-summary-model.ts +338 -0
- package/src/timeline/turn-summary.tsx +21 -326
- package/src/timeline/work-presentation.ts +139 -0
- package/src/timeline-model.ts +108 -0
- package/styles/compiled.css +8 -0
- package/styles/connect.css +4 -0
- package/dist/chunk-CREMJMVN.js.map +0 -1
- package/dist/chunk-CVYCLFMH.js.map +0 -1
- package/dist/chunk-G6YRCIYJ.js.map +0 -1
- package/dist/chunk-HXYOSSQO.js +0 -117
- package/dist/chunk-HXYOSSQO.js.map +0 -1
- package/dist/chunk-IUHHPMAX.js.map +0 -1
- package/dist/chunk-IYQCWGU5.js.map +0 -1
- package/dist/chunk-JH7V627O.js.map +0 -1
- package/dist/chunk-L2J3PU7A.js.map +0 -1
- package/dist/chunk-LVS3MH5T.js.map +0 -1
- package/dist/chunk-MDIXFKA3.js.map +0 -1
- package/dist/chunk-PHBFJCEU.js.map +0 -1
- package/dist/chunk-VCSERYXH.js.map +0 -1
- package/dist/chunk-XS67YG5R.js.map +0 -1
- package/dist/platform-activity-row-PJJVATTZ.js.map +0 -1
- package/dist/queue-surface-implementation-67FS7FUI.js.map +0 -1
- /package/dist/{browser-viewer-WGJ43YGI.js.map → browser-viewer-CV23VIHB.js.map} +0 -0
- /package/dist/{chunk-YVFRBXST.js.map → chunk-4BCVCJSU.js.map} +0 -0
- /package/dist/{chunk-PBCZL4JP.js.map → chunk-INIZSNXT.js.map} +0 -0
- /package/dist/{chunk-C5BF4L26.js.map → chunk-KHF2VRXF.js.map} +0 -0
- /package/dist/{chunk-QMMCJGFI.js.map → chunk-L5OKM2VX.js.map} +0 -0
- /package/dist/{computer-viewer-46UIN7F3.js.map → composer-messages.js.map} +0 -0
- /package/dist/{model-policy-picker-menu-WRNSRFQC.js.map → computer-viewer-K4CKYRX6.js.map} +0 -0
- /package/dist/{latest-question-2POFPYNB.js.map → latest-question-SWC6QEVN.js.map} +0 -0
- /package/dist/{sandbox-files-34CJJNOY.js.map → model-mark-paths.js.map} +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/timeline/platform-activity-presentation.ts
|
|
4
|
+
function sandboxRowTitle(item, displayName) {
|
|
5
|
+
if (item.name === "sandbox.provision") {
|
|
6
|
+
return startupPhaseTitle(
|
|
7
|
+
"sandbox",
|
|
8
|
+
item.status === "cancelled" ? "complete" : item.status,
|
|
9
|
+
item.origin ?? null
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
return displayName(item.name);
|
|
13
|
+
}
|
|
14
|
+
function startupPhaseTitle(phase, status, outcome) {
|
|
15
|
+
if (status === "complete" && phase === "sandbox" && outcome && outcome !== "skipped") {
|
|
16
|
+
return `Sandbox ${outcome === "resumed" ? "reattached" : outcome}`;
|
|
17
|
+
}
|
|
18
|
+
if (status === "complete" && phase === "rig" && outcome === "skipped") {
|
|
19
|
+
return "Sandbox Environment already ready";
|
|
20
|
+
}
|
|
21
|
+
const statusIndex = status === "running" ? 0 : status === "failed" ? 1 : status === "cancelled" ? 2 : 3;
|
|
22
|
+
return STARTUP_PHASE_TITLES[phase][statusIndex];
|
|
23
|
+
}
|
|
24
|
+
var STARTUP_WAIT_TITLES = {
|
|
25
|
+
capture_in_progress: "Waiting for sandbox checkpoint",
|
|
26
|
+
rotation_in_progress: "Waiting for sandbox rotation",
|
|
27
|
+
provider_recovery_in_progress: "Waiting for sandbox recovery"
|
|
28
|
+
};
|
|
29
|
+
var STARTUP_PHASE_TITLES = {
|
|
30
|
+
queue: [
|
|
31
|
+
"Waiting for a worker",
|
|
32
|
+
"Worker startup failed",
|
|
33
|
+
"Worker wait interrupted",
|
|
34
|
+
"Worker started"
|
|
35
|
+
],
|
|
36
|
+
sandbox: [
|
|
37
|
+
"Starting sandbox",
|
|
38
|
+
"Sandbox didn\u2019t start",
|
|
39
|
+
"Sandbox startup interrupted",
|
|
40
|
+
"Sandbox ready"
|
|
41
|
+
],
|
|
42
|
+
rig: [
|
|
43
|
+
"Setting up sandbox environment",
|
|
44
|
+
"Sandbox Environment setup failed",
|
|
45
|
+
"Sandbox Environment setup interrupted",
|
|
46
|
+
"Sandbox Environment ready"
|
|
47
|
+
],
|
|
48
|
+
repository: [
|
|
49
|
+
"Preparing repository",
|
|
50
|
+
"Repository preparation failed",
|
|
51
|
+
"Repository preparation interrupted",
|
|
52
|
+
"Repository ready"
|
|
53
|
+
],
|
|
54
|
+
files: [
|
|
55
|
+
"Preparing files",
|
|
56
|
+
"File preparation failed",
|
|
57
|
+
"File preparation interrupted",
|
|
58
|
+
"Files ready"
|
|
59
|
+
],
|
|
60
|
+
tools: [
|
|
61
|
+
"Connecting tools",
|
|
62
|
+
"Tool connection failed",
|
|
63
|
+
"Tool connection interrupted",
|
|
64
|
+
"Tools ready"
|
|
65
|
+
],
|
|
66
|
+
model_preparation: [
|
|
67
|
+
"Preparing runtime and model request",
|
|
68
|
+
"Runtime/model preparation failed",
|
|
69
|
+
"Runtime/model preparation interrupted",
|
|
70
|
+
"Model request dispatched"
|
|
71
|
+
],
|
|
72
|
+
provider_first_byte: [
|
|
73
|
+
"Waiting for model",
|
|
74
|
+
"Model didn\u2019t respond",
|
|
75
|
+
"Model wait interrupted",
|
|
76
|
+
"Model started responding"
|
|
77
|
+
]
|
|
78
|
+
};
|
|
79
|
+
function startupDuration(durationMs) {
|
|
80
|
+
if (durationMs === null || !Number.isFinite(durationMs) || durationMs < 0) return null;
|
|
81
|
+
if (durationMs < 1e3) return `${Math.round(durationMs)}ms`;
|
|
82
|
+
if (durationMs < 6e4) return `${(durationMs / 1e3).toFixed(1)}s`;
|
|
83
|
+
const minutes = Math.floor(durationMs / 6e4);
|
|
84
|
+
const seconds = Math.round(durationMs % 6e4 / 1e3);
|
|
85
|
+
return `${minutes}m ${String(seconds).padStart(2, "0")}s`;
|
|
86
|
+
}
|
|
87
|
+
function workerRowTitle(item) {
|
|
88
|
+
const running = item.status === "running";
|
|
89
|
+
const failed = item.status === "failed";
|
|
90
|
+
const cancelled = item.status === "cancelled";
|
|
91
|
+
return item.action === "spawn" ? running ? "Spawning worker" : failed ? "Worker spawn failed" : cancelled ? "Worker interrupted" : "Worker spawned" : running ? "Messaging worker" : failed ? "Worker message failed" : cancelled ? "Worker interrupted" : "Worker messaged";
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export {
|
|
95
|
+
sandboxRowTitle,
|
|
96
|
+
startupPhaseTitle,
|
|
97
|
+
STARTUP_WAIT_TITLES,
|
|
98
|
+
startupDuration,
|
|
99
|
+
workerRowTitle
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=chunk-ZIB4H5LN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/timeline/platform-activity-presentation.ts"],"sourcesContent":["import type { SandboxItem, StartupPhaseItem, WorkerItem } from \"./types\";\n\n/* Pure titles and durations for platform activity rows (startup phases and\n sandbox operations), shared by DOM and non-DOM renderers. */\n\nexport function sandboxRowTitle(item: SandboxItem, displayName: (name: string) => string): string {\n if (item.name === \"sandbox.provision\") {\n return startupPhaseTitle(\n \"sandbox\",\n item.status === \"cancelled\" ? \"complete\" : item.status,\n item.origin ?? null,\n );\n }\n return displayName(item.name);\n}\n\nexport function startupPhaseTitle(\n phase: StartupPhaseItem[\"phase\"],\n status: StartupPhaseItem[\"status\"],\n outcome: StartupPhaseItem[\"outcome\"],\n): string {\n if (status === \"complete\" && phase === \"sandbox\" && outcome && outcome !== \"skipped\") {\n return `Sandbox ${outcome === \"resumed\" ? \"reattached\" : outcome}`;\n }\n if (status === \"complete\" && phase === \"rig\" && outcome === \"skipped\") {\n return \"Sandbox Environment already ready\";\n }\n const statusIndex =\n status === \"running\" ? 0 : status === \"failed\" ? 1 : status === \"cancelled\" ? 2 : 3;\n return STARTUP_PHASE_TITLES[phase][statusIndex];\n}\n\nexport const STARTUP_WAIT_TITLES: Record<NonNullable<StartupPhaseItem[\"blockedReason\"]>, string> = {\n capture_in_progress: \"Waiting for sandbox checkpoint\",\n rotation_in_progress: \"Waiting for sandbox rotation\",\n provider_recovery_in_progress: \"Waiting for sandbox recovery\",\n};\n\nconst STARTUP_PHASE_TITLES: Record<\n StartupPhaseItem[\"phase\"],\n readonly [string, string, string, string]\n> = {\n queue: [\n \"Waiting for a worker\",\n \"Worker startup failed\",\n \"Worker wait interrupted\",\n \"Worker started\",\n ],\n sandbox: [\n \"Starting sandbox\",\n \"Sandbox didn’t start\",\n \"Sandbox startup interrupted\",\n \"Sandbox ready\",\n ],\n rig: [\n \"Setting up sandbox environment\",\n \"Sandbox Environment setup failed\",\n \"Sandbox Environment setup interrupted\",\n \"Sandbox Environment ready\",\n ],\n repository: [\n \"Preparing repository\",\n \"Repository preparation failed\",\n \"Repository preparation interrupted\",\n \"Repository ready\",\n ],\n files: [\n \"Preparing files\",\n \"File preparation failed\",\n \"File preparation interrupted\",\n \"Files ready\",\n ],\n tools: [\n \"Connecting tools\",\n \"Tool connection failed\",\n \"Tool connection interrupted\",\n \"Tools ready\",\n ],\n model_preparation: [\n \"Preparing runtime and model request\",\n \"Runtime/model preparation failed\",\n \"Runtime/model preparation interrupted\",\n \"Model request dispatched\",\n ],\n provider_first_byte: [\n \"Waiting for model\",\n \"Model didn’t respond\",\n \"Model wait interrupted\",\n \"Model started responding\",\n ],\n};\n\nexport function startupDuration(durationMs: number | null): string | null {\n if (durationMs === null || !Number.isFinite(durationMs) || durationMs < 0) return null;\n if (durationMs < 1_000) return `${Math.round(durationMs)}ms`;\n if (durationMs < 60_000) return `${(durationMs / 1_000).toFixed(1)}s`;\n const minutes = Math.floor(durationMs / 60_000);\n const seconds = Math.round((durationMs % 60_000) / 1_000);\n return `${minutes}m ${String(seconds).padStart(2, \"0\")}s`;\n}\n\n/** The worker step title for a spawn or message, by status. */\nexport function workerRowTitle(item: Pick<WorkerItem, \"action\" | \"status\">): string {\n const running = item.status === \"running\";\n const failed = item.status === \"failed\";\n const cancelled = item.status === \"cancelled\";\n return item.action === \"spawn\"\n ? running\n ? \"Spawning worker\"\n : failed\n ? \"Worker spawn failed\"\n : cancelled\n ? \"Worker interrupted\"\n : \"Worker spawned\"\n : running\n ? \"Messaging worker\"\n : failed\n ? \"Worker message failed\"\n : cancelled\n ? \"Worker interrupted\"\n : \"Worker messaged\";\n}\n"],"mappings":";;;AAKO,SAAS,gBAAgB,MAAmB,aAA+C;AAChG,MAAI,KAAK,SAAS,qBAAqB;AACrC,WAAO;AAAA,MACL;AAAA,MACA,KAAK,WAAW,cAAc,aAAa,KAAK;AAAA,MAChD,KAAK,UAAU;AAAA,IACjB;AAAA,EACF;AACA,SAAO,YAAY,KAAK,IAAI;AAC9B;AAEO,SAAS,kBACd,OACA,QACA,SACQ;AACR,MAAI,WAAW,cAAc,UAAU,aAAa,WAAW,YAAY,WAAW;AACpF,WAAO,WAAW,YAAY,YAAY,eAAe,OAAO;AAAA,EAClE;AACA,MAAI,WAAW,cAAc,UAAU,SAAS,YAAY,WAAW;AACrE,WAAO;AAAA,EACT;AACA,QAAM,cACJ,WAAW,YAAY,IAAI,WAAW,WAAW,IAAI,WAAW,cAAc,IAAI;AACpF,SAAO,qBAAqB,KAAK,EAAE,WAAW;AAChD;AAEO,IAAM,sBAAsF;AAAA,EACjG,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,+BAA+B;AACjC;AAEA,IAAM,uBAGF;AAAA,EACF,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,KAAK;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,mBAAmB;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,qBAAqB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,gBAAgB,YAA0C;AACxE,MAAI,eAAe,QAAQ,CAAC,OAAO,SAAS,UAAU,KAAK,aAAa,EAAG,QAAO;AAClF,MAAI,aAAa,IAAO,QAAO,GAAG,KAAK,MAAM,UAAU,CAAC;AACxD,MAAI,aAAa,IAAQ,QAAO,IAAI,aAAa,KAAO,QAAQ,CAAC,CAAC;AAClE,QAAM,UAAU,KAAK,MAAM,aAAa,GAAM;AAC9C,QAAM,UAAU,KAAK,MAAO,aAAa,MAAU,GAAK;AACxD,SAAO,GAAG,OAAO,KAAK,OAAO,OAAO,EAAE,SAAS,GAAG,GAAG,CAAC;AACxD;AAGO,SAAS,eAAe,MAAqD;AAClF,QAAM,UAAU,KAAK,WAAW;AAChC,QAAM,SAAS,KAAK,WAAW;AAC/B,QAAM,YAAY,KAAK,WAAW;AAClC,SAAO,KAAK,WAAW,UACnB,UACE,oBACA,SACE,wBACA,YACE,uBACA,mBACN,UACE,qBACA,SACE,0BACA,YACE,uBACA;AACZ;","names":[]}
|
package/dist/client.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { OpenGeniClient } from "@opengeni/sdk";
|
|
|
6
6
|
*/
|
|
7
7
|
type SessionClientMethods = Pick<OpenGeniClient, "getClientConfig" | "getSession" | "getSessionLineage" | "updateSession" | "updateSessionPin" | "listSessions" | "listSessionPage" | "sendMessage" | "steerMessage" | "pauseSession" | "resumeSession" | "sendApprovalDecision" | "listHumanInputRequests" | "getHumanInputRequest" | "submitHumanInputResponse" | "listEvents" | "streamEvents" | "getQueue" | "moveQueueItem" | "editQueueItem" | "steerQueueItem" | "deleteQueueItem" | "getComposerDraft" | "saveComposerDraft" | "submitComposerDraft" | "listTurns" | "getGoal" | "updateGoal" | "deleteGoal" | "clearSessionContext" | "compactSessionContext" | "listScheduledTasks" | "uploadFile" | "getFile" | "createFileDownloadUrl" | "listVariableSets" | "getVariableSetVariable" | "createVariableSet" | "updateVariableSet" | "deleteVariableSet" | "setVariableSetVariable" | "deleteVariableSetVariable" | "listEnvironments" | "createEnvironment" | "updateEnvironment" | "deleteEnvironment" | "setEnvironmentVariable" | "deleteEnvironmentVariable" | "listChannels" | "createChannel" | "updateChannel" | "reorderChannels" | "deleteChannel" | "updateSessionChannel" | "listRigs" | "createRig" | "getRig" | "updateRig" | "deleteRig" | "listRigVersions" | "activateRigVersion" | "listRigChanges" | "proposeRigChange" | "getRigChange" | "verifyRigChange" | "promoteRigChange" | "verifyRig" | "listWorkspaces" | "createWorkspace" | "updateWorkspace" | "setWorkspaceInferenceState" | "getWorkspace" | "getWorkspaceModelCatalog" | "listWorkspaceControlEvents" | "streamWorkspaceControlEvents" | "streamWorkspaceInteractionRevisions" | "getBillingUsage" | "getClientConfig" | "getStreamCapabilities" | "acknowledgeStream" | "attachViewer" | "heartbeatViewer" | "detachViewer" | "listNetworkRoutes" | "getNetworkRoute" | "createNetworkRoute" | "updateNetworkRoute" | "listSiteAuthConnections" | "getSiteAuthConnection" | "createSiteAuthConnection" | "updateSiteAuthConnection" | "listAuthRuns" | "getAuthRun" | "startBrowserAuthRun" | "reportBrowserAuthRun" | "protectedBrowserAuthFill" | "verifyBrowserAuthRun" | "listInteractionInterventions" | "getInteractionIntervention" | "createInteractionIntervention" | "resolveInteractionIntervention" | "listAttachedBrowsers" | "getAttachedBrowser" | "listBrowserIdentities" | "getBrowserIdentity" | "createBrowserIdentity" | "updateBrowserIdentity" | "listBrowserRevisions" | "listBrowserSessions" | "getBrowserSession" | "readBrowserClipboard" | "listBrowserDownloads" | "getBrowserDownload" | "saveBrowserDownload" | "createBrowserSession" | "listBrowserTargets" | "openBrowserTarget" | "selectBrowserTarget" | "closeBrowserTarget" | "observeBrowserTarget" | "actInBrowser" | "getBrowserActionReceipt" | "listBrowserDiagnostics" | "attachBrowserSession" | "heartbeatBrowserSession" | "publishBrowserRevision" | "suspendBrowserSession" | "resumeBrowserSession" | "endBrowserSession" | "listComputerSessions" | "getComputerSession" | "readComputerClipboard" | "createComputerSession" | "listComputerTargets" | "observeComputerTarget" | "actInComputer" | "getComputerActionReceipt" | "attachComputerSession" | "heartbeatComputerSession" | "endComputerSession" | "fsList" | "fsListBatch" | "fsRead" | "fsWrite" | "fsDelete" | "fsMove" | "fsMkdir" | "gitStatus" | "gitDiff" | "gitReadBatch" | "getWorkspaceCapture" | "getWorkspaceCaptureFile" | "terminalExec" | "terminalPtyOpen" | "terminalPtyWrite" | "terminalPtyResize" | "terminalPtyClose"> & Partial<Pick<OpenGeniClient, "createVideoArtifactPlaybackSource" | "streamWorkspaceLiveEvents" | "listSessionBackgroundCommands" | "cancelSessionBackgroundCommand" | "getComputerInputPosture">>;
|
|
8
8
|
/** Compact list transport is optional for scripted and older clients. */
|
|
9
|
-
export type SessionClientLike = SessionClientMethods & Partial<Pick<OpenGeniClient, "listSessionSummaryPage">>;
|
|
9
|
+
export type SessionClientLike = SessionClientMethods & Partial<Pick<OpenGeniClient, "listSessionSummaryPage" | "findGoal">>;
|
|
10
10
|
/**
|
|
11
11
|
* Tenant-safe client surface required by the session-only React entry.
|
|
12
12
|
*
|
|
@@ -23,8 +23,14 @@ export type EmbeddedSessionClientLike = Pick<OpenGeniClient, "getSession" | "lis
|
|
|
23
23
|
export type EmbeddedSessionEventClientLike = Pick<OpenGeniClient, "getSession" | "streamEvents">;
|
|
24
24
|
/** Exact client surface required by {@link useSession}. */
|
|
25
25
|
export type EmbeddedSessionReadClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "getSession" | "updateSession">;
|
|
26
|
-
/**
|
|
27
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Exact client surface required by {@link useGoal}. `findGoal` is optional:
|
|
28
|
+
* when present the hook reads a goal-less session as a successful `null`
|
|
29
|
+
* instead of an absorbed 404.
|
|
30
|
+
*/
|
|
31
|
+
export type EmbeddedGoalClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "getGoal" | "updateGoal" | "deleteGoal"> & {
|
|
32
|
+
findGoal?: OpenGeniClient["findGoal"] | undefined;
|
|
33
|
+
};
|
|
28
34
|
/** Exact client surface required by {@link useSessionLineage}. */
|
|
29
35
|
export type EmbeddedSessionLineageClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "getSessionLineage">;
|
|
30
36
|
/** Exact client surface required by {@link useFileAttachments}. */
|
package/dist/clipboard.js
CHANGED
|
@@ -2,6 +2,12 @@ import type { ComputerSession, InteractionPlacement } from "@opengeni/sdk/intera
|
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
3
|
import { type BrowserFrameWebSocketFactory } from "../hooks/use-browser-frame-stream.js";
|
|
4
4
|
import type { EmbeddedBrowserInteractionClientOverride } from "../session-context.js";
|
|
5
|
+
/**
|
|
6
|
+
* Delay before retrying an automatic end of a lost attached-device browser, or null to stop.
|
|
7
|
+
* A refusal (4xx, e.g. 409 when the server will not end it) is never retried: re-sending it on
|
|
8
|
+
* every registry refresh looped about one request per second on prod.
|
|
9
|
+
*/
|
|
10
|
+
export declare function staleBrowserEndRetryDelayMs(cause: unknown, failedAttempts: number): number | null;
|
|
5
11
|
export type BrowserViewerNotification = {
|
|
6
12
|
kind: "error" | "info";
|
|
7
13
|
message: string;
|
|
@@ -5,6 +5,7 @@ import type { ComposerState } from "../hooks/use-composer.js";
|
|
|
5
5
|
import type { UseFileAttachmentsResult } from "../hooks/use-file-attachments.js";
|
|
6
6
|
import { type ConfirmState, type SlashCommandContext } from "../hooks/use-slash-commands.js";
|
|
7
7
|
import { type ResponsiveBasis } from "../lib/composer-responsive-context.js";
|
|
8
|
+
import { type ChatComposerMessages } from "../composer-messages.js";
|
|
8
9
|
import type { PickerModelRow } from "../model-policy.js";
|
|
9
10
|
import { OPEN_WORKSTREAM_CONTROL_EVENT } from "../workstream-control-event.js";
|
|
10
11
|
export { OPEN_WORKSTREAM_CONTROL_EVENT };
|
|
@@ -16,75 +17,8 @@ export type ComposerControlLinks = {
|
|
|
16
17
|
workspaceHref?: string | undefined;
|
|
17
18
|
sessionHref?: ((sessionId: string) => string) | undefined;
|
|
18
19
|
};
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
pausedPlaceholder: string;
|
|
22
|
-
inputLabel: string;
|
|
23
|
-
keyboardHint: string;
|
|
24
|
-
slashCommandBlocked: string;
|
|
25
|
-
controlChangedError: string;
|
|
26
|
-
sendFailedError: string;
|
|
27
|
-
dropFiles: string;
|
|
28
|
-
attachFiles: string;
|
|
29
|
-
pauseAriaLabel: string;
|
|
30
|
-
pauseTitle: string;
|
|
31
|
-
/** Stop control shown while a response runs (`runControl="stop"`). */
|
|
32
|
-
stopAriaLabel?: string | undefined;
|
|
33
|
-
stopTitle?: string | undefined;
|
|
34
|
-
sendMessageAriaLabel: string;
|
|
35
|
-
sendAndResumeAriaLabel: string;
|
|
36
|
-
sendTitle: string;
|
|
37
|
-
sendAndResumeTitle: string;
|
|
38
|
-
annotationNotesRequired: string;
|
|
39
|
-
workspacePaused: string;
|
|
40
|
-
pausedHere: string;
|
|
41
|
-
parentBlocker: string;
|
|
42
|
-
narrowerPause: string;
|
|
43
|
-
pausedBy: (displayName: string) => string;
|
|
44
|
-
queuedAhead: (count: number) => string;
|
|
45
|
-
resumingAndSending: string;
|
|
46
|
-
nextMessageResumes: string;
|
|
47
|
-
resumeThisWorkstream: string;
|
|
48
|
-
resumeShort: string;
|
|
49
|
-
hidePauseDetails: string;
|
|
50
|
-
showPauseDetails: string;
|
|
51
|
-
pauseReasonsLabel: string;
|
|
52
|
-
pausedByLabel: string;
|
|
53
|
-
alsoPausedByLabel: string;
|
|
54
|
-
resumeWorkspace: string;
|
|
55
|
-
resumeFromSession: string;
|
|
56
|
-
sessionCanRun: string;
|
|
57
|
-
stillPausedBy: (displayName: string) => string;
|
|
58
|
-
restoredResourcesLabel: string;
|
|
59
|
-
restoredFile: (fileId: string) => string;
|
|
60
|
-
removeRestoredResource: (index: number) => string;
|
|
61
|
-
uploading: string;
|
|
62
|
-
uploadFailed: string;
|
|
63
|
-
previewAttachment: (name: string) => string;
|
|
64
|
-
previewUnavailable?: string | undefined;
|
|
65
|
-
attachmentPreviewLabel: string;
|
|
66
|
-
downloadAttachment: (name: string) => string;
|
|
67
|
-
closeAttachmentPreview: string;
|
|
68
|
-
retryAttachment: (name: string) => string;
|
|
69
|
-
retryUpload: string;
|
|
70
|
-
removeAttachment: (name: string) => string;
|
|
71
|
-
confirmCommand: (name: string) => string;
|
|
72
|
-
confirmDescription: (command: SlashCommand) => string;
|
|
73
|
-
cancel: string;
|
|
74
|
-
runCommand: (name: string) => string;
|
|
75
|
-
commands: string;
|
|
76
|
-
slashCommandsLabel: string;
|
|
77
|
-
modelLabel: string;
|
|
78
|
-
close: string;
|
|
79
|
-
danger: string;
|
|
80
|
-
draftConflict: string;
|
|
81
|
-
useOtherDraft: string;
|
|
82
|
-
keepMine: string;
|
|
83
|
-
savingDraft: string;
|
|
84
|
-
formatBytes: (bytes: number) => string;
|
|
85
|
-
formatRelativeTime: (changedAt: string) => string;
|
|
86
|
-
};
|
|
87
|
-
export declare const defaultChatComposerMessages: ChatComposerMessages;
|
|
20
|
+
export { defaultChatComposerMessages } from "../composer-messages.js";
|
|
21
|
+
export type { ChatComposerMessages } from "../composer-messages.js";
|
|
88
22
|
export type ComposerSubmitMode = "queue" | "steer";
|
|
89
23
|
export type ComposerSubmitBlocker = "disabled" | "attachment" | "sending" | "command" | "annotations" | "empty" | null;
|
|
90
24
|
/**
|
|
@@ -1,32 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HumanInputQuestion, SkillRecord, SessionHumanInputRequest, SubmitHumanInputResponseRequest } from "@opengeni/sdk";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
other: string;
|
|
6
|
-
otherSelected: boolean;
|
|
7
|
-
};
|
|
8
|
-
export type HumanInputFormMessages = {
|
|
9
|
-
title: string;
|
|
10
|
-
description: string;
|
|
11
|
-
submit: string;
|
|
12
|
-
skip: string;
|
|
13
|
-
submitting: string;
|
|
14
|
-
other: string;
|
|
15
|
-
deadlineLabel: string;
|
|
16
|
-
formatDeadline: (value: string) => string;
|
|
17
|
-
required: string;
|
|
18
|
-
otherRequired: string;
|
|
19
|
-
minSelections: (count: number) => string;
|
|
20
|
-
maxSelections: (count: number) => string;
|
|
21
|
-
optional: string;
|
|
22
|
-
/** Shown when the question list overflows the card and more content is below. */
|
|
23
|
-
moreBelow: string;
|
|
24
|
-
questionCount: (count: number) => string;
|
|
25
|
-
collapse: string;
|
|
26
|
-
expand: string;
|
|
27
|
-
selectionHint: (min: number | null | undefined, max: number | null | undefined) => string | null;
|
|
28
|
-
};
|
|
29
|
-
export declare const defaultHumanInputFormMessages: HumanInputFormMessages;
|
|
3
|
+
import { answersFromDrafts, defaultHumanInputFormMessages, type HumanInputAnswerDraft, type HumanInputFormMessages } from "../human-input-model.js";
|
|
4
|
+
export { answersFromDrafts, defaultHumanInputFormMessages, type HumanInputAnswerDraft, type HumanInputFormMessages, };
|
|
30
5
|
export type HumanInputFormProps = {
|
|
31
6
|
/** Scoped immutable revision reader. Saving a Skill fails closed without its full preview. */
|
|
32
7
|
loadSkillReview?: ((reference: NonNullable<HumanInputQuestion["skillReview"]>) => Promise<SkillRecord>) | undefined;
|
|
@@ -70,7 +45,3 @@ export declare function binaryDecision(questions: readonly HumanInputQuestion[])
|
|
|
70
45
|
accept: HumanInputQuestion["options"][number];
|
|
71
46
|
decline: HumanInputQuestion["options"][number];
|
|
72
47
|
} | null;
|
|
73
|
-
export declare function answersFromDrafts(questions: HumanInputQuestion[], drafts: Record<string, HumanInputAnswerDraft>, messageOverrides?: Partial<HumanInputFormMessages>): {
|
|
74
|
-
answers: HumanInputAnswer[];
|
|
75
|
-
errors: Record<string, string>;
|
|
76
|
-
};
|
|
@@ -34,6 +34,14 @@ export type MarkdownProps = {
|
|
|
34
34
|
renderInteractiveBlock?: ((block: MarkdownInteractiveBlock) => ReactNode) | undefined;
|
|
35
35
|
children: string;
|
|
36
36
|
className?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Render a single newline inside prose as a line break (`<br>`), the way chat
|
|
39
|
+
* apps show messages; CommonMark otherwise folds it into a space. Chat message
|
|
40
|
+
* bodies enable this. Leave it off for documents and other authored Markdown.
|
|
41
|
+
* Code (fenced and inline), lists, tables, and blank-line paragraphs are
|
|
42
|
+
* unaffected either way.
|
|
43
|
+
*/
|
|
44
|
+
softLineBreaks?: boolean | undefined;
|
|
37
45
|
/**
|
|
38
46
|
* While true, newly arrived source fades in through tip ink (`.og-stream-ink`):
|
|
39
47
|
* an age window over each append batch — fast streams keep a large soft band,
|
|
@@ -1,37 +1,12 @@
|
|
|
1
1
|
import type { ClientModel, LatencyMode, ReasoningEffort } from "@opengeni/sdk";
|
|
2
2
|
import { type CSSProperties, type ReactNode } from "react";
|
|
3
|
+
import { defaultModelPolicyPickerMessages, groupPresentationFor, SCOPED_BILLING_HINTS, type ModelPickerGroupPresentation, type ModelPolicyPickerMessages } from "../model-picker-model.js";
|
|
3
4
|
import { type PickerBillingClass, type PickerModelRow } from "../model-policy.js";
|
|
4
5
|
type ClientPickerModelRow = PickerModelRow<ClientModel>;
|
|
5
6
|
/** Presentation only; never changes model identity, billing or availability. */
|
|
6
|
-
export type ModelPolicyPickerGroupPresentation =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
description?: string | null | undefined;
|
|
10
|
-
/** Decorative, non-interactive content. Omit for the default; null hides it. */
|
|
11
|
-
icon?: ReactNode | undefined;
|
|
12
|
-
}>>;
|
|
13
|
-
export type ModelPolicyPickerMessages = {
|
|
14
|
-
label: string;
|
|
15
|
-
loading: string;
|
|
16
|
-
noModels: string;
|
|
17
|
-
connectTitle: string;
|
|
18
|
-
connectBody: string;
|
|
19
|
-
connectAction: string;
|
|
20
|
-
thinking: string;
|
|
21
|
-
fast: string;
|
|
22
|
-
fastRateHint: string;
|
|
23
|
-
codexOnly: string;
|
|
24
|
-
searchLabel?: string;
|
|
25
|
-
searchPlaceholder?: string;
|
|
26
|
-
currentModel?: string;
|
|
27
|
-
noMatches?: string;
|
|
28
|
-
unsupportedAttachments?: string;
|
|
29
|
-
thinkingEffort?: string;
|
|
30
|
-
selected?: string;
|
|
31
|
-
free?: string;
|
|
32
|
-
billingHints: Record<PickerBillingClass, string>;
|
|
33
|
-
};
|
|
34
|
-
export declare const defaultModelPolicyPickerMessages: ModelPolicyPickerMessages;
|
|
7
|
+
export type ModelPolicyPickerGroupPresentation = ModelPickerGroupPresentation<ReactNode>;
|
|
8
|
+
export { defaultModelPolicyPickerMessages, groupPresentationFor, SCOPED_BILLING_HINTS };
|
|
9
|
+
export type { ModelPolicyPickerMessages };
|
|
35
10
|
export type ModelPolicyPickerProps = {
|
|
36
11
|
/** Host branding for payment-source groups, shared by menu and trigger. */
|
|
37
12
|
groupPresentation?: ModelPolicyPickerGroupPresentation | undefined;
|
|
@@ -94,13 +69,6 @@ export declare function BillingClassMark(props: {
|
|
|
94
69
|
className?: string | undefined;
|
|
95
70
|
"aria-label"?: string | undefined;
|
|
96
71
|
}): import("react").JSX.Element | null;
|
|
97
|
-
/** Models settings keeps naming who is billed for a key. */
|
|
98
|
-
export declare const SCOPED_BILLING_HINTS: Partial<Record<PickerBillingClass, string>>;
|
|
99
|
-
/**
|
|
100
|
-
* Host branding for a payment group. While scopes are collapsed, API keys are
|
|
101
|
-
* one group, so either API-key presentation serves both.
|
|
102
|
-
*/
|
|
103
|
-
export declare function groupPresentationFor(props: Pick<ModelPolicyPickerProps, "groupPresentation" | "collapseScopes">, billingClass: PickerBillingClass): ModelPolicyPickerGroupPresentation[PickerBillingClass];
|
|
104
72
|
export declare function effectiveRows(props: ModelPolicyPickerProps): ClientPickerModelRow[];
|
|
105
73
|
export declare function PickerNavRow(props: {
|
|
106
74
|
label: string;
|
|
@@ -133,4 +101,3 @@ export declare function useModelPolicyPickerState(props: ModelPolicyPickerProps)
|
|
|
133
101
|
rows: ClientPickerModelRow[];
|
|
134
102
|
};
|
|
135
103
|
export declare function ModelPolicyPicker(props: ModelPolicyPickerProps): import("react").JSX.Element;
|
|
136
|
-
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SVGProps } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Opper's mark (the leaf-and-star symbol of the opper.ai wordmark), redrawn
|
|
4
|
+
* as a single currentColor path on a square box.
|
|
5
|
+
* Source: https://opper.ai (header logo SVG).
|
|
6
|
+
*/
|
|
7
|
+
export declare function OpperMark(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ProviderRecoveryFacts } from "../lib/provider-recovery.js";
|
|
2
|
+
export type ProviderRecoveryNoticeProps = {
|
|
3
|
+
/** From `currentProviderRecovery(session, events)`; renders nothing when null. */
|
|
4
|
+
recovery: ProviderRecoveryFacts | null | undefined;
|
|
5
|
+
/** Replaces the secondary line; `null` hides it. */
|
|
6
|
+
detail?: string | null | undefined;
|
|
7
|
+
className?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
export declare const PROVIDER_RECOVERY_NOTICE_DETAIL = "Your message is saved. Opengeni keeps retrying automatically for a few minutes.";
|
|
10
|
+
/**
|
|
11
|
+
* One calm, live status line while the same turn waits for an automatic retry
|
|
12
|
+
* after a transient provider failure. It replaces itself on every attempt
|
|
13
|
+
* instead of adding timeline rows, and disappears once the turn runs again.
|
|
14
|
+
*/
|
|
15
|
+
export declare function ProviderRecoveryNotice({ recovery, detail, className, }: ProviderRecoveryNoticeProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* remark: render a single newline inside prose as a line break.
|
|
3
|
+
*
|
|
4
|
+
* CommonMark folds a lone line ending inside a paragraph into a space, so an
|
|
5
|
+
* agent writing `1\n2\n3` shows "1 2 3". Chat surfaces (ChatGPT, GitHub
|
|
6
|
+
* comments) keep the line, which is what message authors expect. This plugin
|
|
7
|
+
* turns every line ending inside an mdast `text` node into a `break` node — the
|
|
8
|
+
* same result as `remark-breaks` — while leaving code (`code` / `inlineCode`
|
|
9
|
+
* carry `value`, not `text` children), raw HTML, and block structure (lists,
|
|
10
|
+
* tables, blockquotes, headings, blank-line paragraphs) untouched.
|
|
11
|
+
*
|
|
12
|
+
* Unlike `remark-breaks` (built on `mdast-util-find-and-replace`, which drops
|
|
13
|
+
* positions on the split nodes), every split text node keeps a source position.
|
|
14
|
+
* Streaming tip ink (`rehypeStreamReveal`) keys fade-in on those offsets, so a
|
|
15
|
+
* positionless line would render without ink and snap in at the stream tail.
|
|
16
|
+
*
|
|
17
|
+
* Structural local types keep the module dependency-free, like
|
|
18
|
+
* `stream-reveal.ts`; the renderer casts once at the plugin seam.
|
|
19
|
+
*/
|
|
20
|
+
type MdPoint = {
|
|
21
|
+
line?: number | undefined;
|
|
22
|
+
column?: number | undefined;
|
|
23
|
+
offset?: number | undefined;
|
|
24
|
+
};
|
|
25
|
+
type MdPosition = {
|
|
26
|
+
start?: MdPoint | undefined;
|
|
27
|
+
end?: MdPoint | undefined;
|
|
28
|
+
};
|
|
29
|
+
type MdNode = {
|
|
30
|
+
type: string;
|
|
31
|
+
value?: string | undefined;
|
|
32
|
+
position?: MdPosition | undefined;
|
|
33
|
+
children?: MdNode[] | undefined;
|
|
34
|
+
};
|
|
35
|
+
export declare function remarkSoftLineBreaks(): (tree: MdNode, file?: {
|
|
36
|
+
value?: unknown;
|
|
37
|
+
} | undefined) => void;
|
|
38
|
+
export {};
|
|
@@ -58,6 +58,13 @@ export type UseSandboxWorkspaceTabsOptions = ClientOverride & {
|
|
|
58
58
|
* attachment, and navigation callbacks are not activated.
|
|
59
59
|
*/
|
|
60
60
|
surfaces?: readonly SandboxWorkspaceSurface[] | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Whether this viewer may read the workspace machine fleet
|
|
63
|
+
* (`GET /machines`, permission `enrollments:read`). Defaults to true. Pass
|
|
64
|
+
* false for a viewer without it: the dock then never requests the fleet and
|
|
65
|
+
* the machine chip derives from the session's own capabilities alone.
|
|
66
|
+
*/
|
|
67
|
+
machinesEnabled?: boolean | undefined;
|
|
61
68
|
/** Override the source-driven default tab (e.g. a host landing tab id). When
|
|
62
69
|
* omitted the workbench picks Changes-vs-Files from capture or live Git. */
|
|
63
70
|
initialTab?: string | null | undefined;
|
|
@@ -129,6 +136,12 @@ export type SandboxWorkspaceProps = ClientOverride & {
|
|
|
129
136
|
* Terminal, Browser, and Desktop. Disabled surfaces remain behaviorally dormant.
|
|
130
137
|
*/
|
|
131
138
|
surfaces?: readonly SandboxWorkspaceSurface[] | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* Whether this viewer may read the workspace machine fleet
|
|
141
|
+
* (`GET /machines`, permission `enrollments:read`). Defaults to true. Pass
|
|
142
|
+
* false for a viewer without it so the dock never requests the fleet.
|
|
143
|
+
*/
|
|
144
|
+
machinesEnabled?: boolean | undefined;
|
|
132
145
|
/** Host tabs injected BEFORE the workbench tabs (e.g. a "Run" landing tab). */
|
|
133
146
|
leadingTabs?: WorkspaceTab[] | undefined;
|
|
134
147
|
/** Host tabs injected AFTER the workbench tabs (e.g. a "Debug" tab). */
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
*
|
|
26
26
|
* Inbox and queue stay separate segments. Queue hover actions wire to
|
|
27
27
|
* `UseTurnQueueResult` (`editTurn` / `steerTurn` / `moveTurn` / `removeTurn`).
|
|
28
|
+
* The collapsed queue chip previews the latest queued message beside its Steer
|
|
29
|
+
* action; open queue rows keep Steer visible and reveal the rest on hover.
|
|
28
30
|
* Inbox has no product dismiss API; pass `onDismissIncoming` when the host
|
|
29
31
|
* wants a visible action (dev harness may use a local dummy).
|
|
30
32
|
*
|
|
@@ -39,11 +41,12 @@
|
|
|
39
41
|
* shell uses one CSS grid-track transition for deliberate open/close actions;
|
|
40
42
|
* live queue reconciliation never feeds measurements back into layout.
|
|
41
43
|
*/
|
|
42
|
-
import type { SessionGoal, SessionStatus
|
|
44
|
+
import type { SessionGoal, SessionStatus } from "@opengeni/sdk";
|
|
43
45
|
import { type ReactNode } from "react";
|
|
44
46
|
import type { ComposerOptimisticMessage, ComposerState } from "../hooks/use-composer.js";
|
|
45
47
|
import type { UseGoalResult } from "../hooks/use-goal.js";
|
|
46
48
|
import type { UseTurnQueueResult } from "../hooks/use-turn-queue.js";
|
|
49
|
+
import { countAuthoritativeQueuedTurns } from "../queue-presentation-model.js";
|
|
47
50
|
export type SessionChromeSignalId = "incoming" | "steering" | "queue" | "goal" | "agents" | "commands";
|
|
48
51
|
export type SessionChromeSignalTone = "neutral" | "accent" | "waiting" | "running";
|
|
49
52
|
export type SessionChromeAgentsSignal = {
|
|
@@ -102,7 +105,7 @@ export declare function sessionChromeGoalPillLabel(state: GoalPillState, record:
|
|
|
102
105
|
* next idle-backoff check time. Null when the state needs no explanation.
|
|
103
106
|
*/
|
|
104
107
|
export declare function sessionChromeGoalPillExplanation(state: GoalPillState, record: GoalPillRecord | null | undefined): string | null;
|
|
105
|
-
export
|
|
108
|
+
export { countAuthoritativeQueuedTurns };
|
|
106
109
|
export declare function countOptimisticQueuedMessages(messages: readonly ComposerOptimisticMessage[] | undefined, queuedTurnIds: ReadonlySet<string>, snapshot: UseTurnQueueResult["snapshot"]): number;
|
|
107
110
|
/**
|
|
108
111
|
* First uncontrolled segment. An existing authoritative queue opens itself
|
|
@@ -127,4 +130,3 @@ export declare function sessionChromeShouldOfferQueue(input: {
|
|
|
127
130
|
/** Select pill state from the goal's authoritative continuation projection. */
|
|
128
131
|
export declare function sessionChromeGoalPillState(goalStatus: "active" | "paused" | "completed", continuation: SessionGoal["continuation"] | null | undefined, sessionStatus?: SessionStatus): GoalPillState;
|
|
129
132
|
export declare function SessionChrome({ sessionStatus, queue, queueFocusTarget, composer, onComposerFocus, goal, agentsPanel, commandsPanel, commandsCount, agentsSignal, onDismissIncoming, onOpenSession, readOnly, className, active: activeControlled, defaultActive, onActiveChange, }: SessionChromeProps): import("react").JSX.Element | null;
|
|
130
|
-
export {};
|
|
@@ -2,6 +2,7 @@ import { type ClientVoiceInputConfig } from "@opengeni/sdk";
|
|
|
2
2
|
import { type CSSProperties } from "react";
|
|
3
3
|
import { type ClientOverride } from "../session-context.js";
|
|
4
4
|
import { type ModelPolicyPickerProps } from "./model-policy-picker.js";
|
|
5
|
+
import { type GenieLoadingOptions } from "../timeline/genie-loading.js";
|
|
5
6
|
import { type ChatComposerProps } from "./chat-composer.js";
|
|
6
7
|
import type { ComposerTranscriptionControlProps } from "./composer-transcription-control.js";
|
|
7
8
|
import { type HumanInputSurfaceProps } from "./human-input-surface.js";
|
|
@@ -60,6 +61,8 @@ export type SessionConversationProps = ClientOverride & SessionProxyBaseUrl & {
|
|
|
60
61
|
/**
|
|
61
62
|
* File attachments in the composer. Defaults to true; the attach control
|
|
62
63
|
* appears only when the deployment's client config enables file uploads.
|
|
64
|
+
* A session proxy reports them off when `files` is false and for anonymous
|
|
65
|
+
* visitors (`visitor: true` from `resolve`) unless it sets `visitorUploads`.
|
|
63
66
|
*/
|
|
64
67
|
attachments?: boolean | undefined;
|
|
65
68
|
/**
|
|
@@ -69,11 +72,20 @@ export type SessionConversationProps = ClientOverride & SessionProxyBaseUrl & {
|
|
|
69
72
|
*/
|
|
70
73
|
voiceInput?: boolean | undefined;
|
|
71
74
|
/**
|
|
72
|
-
* Live speech-to-speech voice in the composer.
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
+
* Live speech-to-speech voice in the composer. Opt-in: a call spends the
|
|
76
|
+
* workspace's credits and asks for the microphone, so it is off unless this
|
|
77
|
+
* is `true` or the client config reports `realtimeVoice: true`
|
|
78
|
+
* (`createSessionProxyHandler({ realtimeVoice: true })`). The button then
|
|
79
|
+
* appears only when the workspace offers an available voice model and the
|
|
80
|
+
* proxy has not turned voice off (`realtimeVoice: false`).
|
|
75
81
|
*/
|
|
76
82
|
realtimeVoice?: boolean | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Copy and visual for the "working" indicator before the first reply.
|
|
85
|
+
* Defaults to neutral copy ("Thinking…"); omitted fields keep those
|
|
86
|
+
* defaults. See `MessageTimeline`'s `genieLoading`.
|
|
87
|
+
*/
|
|
88
|
+
genieLoading?: GenieLoadingOptions | undefined;
|
|
77
89
|
/**
|
|
78
90
|
* Show the model/reasoning picker. End users of an embedded product rarely
|
|
79
91
|
* choose models, so it is hidden unless this is `true` or the client config
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The composer's user-facing copy, renderer-free so web and native composers
|
|
3
|
+
* (and hosts translating them) share one message catalog.
|
|
4
|
+
*/
|
|
5
|
+
import type { SlashCommand } from "./commands/types.js";
|
|
6
|
+
export type ChatComposerMessages = {
|
|
7
|
+
messagePlaceholder: string;
|
|
8
|
+
pausedPlaceholder: string;
|
|
9
|
+
inputLabel: string;
|
|
10
|
+
keyboardHint: string;
|
|
11
|
+
slashCommandBlocked: string;
|
|
12
|
+
controlChangedError: string;
|
|
13
|
+
sendFailedError: string;
|
|
14
|
+
dropFiles: string;
|
|
15
|
+
attachFiles: string;
|
|
16
|
+
pauseAriaLabel: string;
|
|
17
|
+
pauseTitle: string;
|
|
18
|
+
/** Stop control shown while a response runs (`runControl="stop"`). */
|
|
19
|
+
stopAriaLabel?: string | undefined;
|
|
20
|
+
stopTitle?: string | undefined;
|
|
21
|
+
sendMessageAriaLabel: string;
|
|
22
|
+
sendAndResumeAriaLabel: string;
|
|
23
|
+
sendTitle: string;
|
|
24
|
+
sendAndResumeTitle: string;
|
|
25
|
+
annotationNotesRequired: string;
|
|
26
|
+
workspacePaused: string;
|
|
27
|
+
pausedHere: string;
|
|
28
|
+
parentBlocker: string;
|
|
29
|
+
narrowerPause: string;
|
|
30
|
+
pausedBy: (displayName: string) => string;
|
|
31
|
+
queuedAhead: (count: number) => string;
|
|
32
|
+
resumingAndSending: string;
|
|
33
|
+
nextMessageResumes: string;
|
|
34
|
+
resumeThisWorkstream: string;
|
|
35
|
+
resumeShort: string;
|
|
36
|
+
hidePauseDetails: string;
|
|
37
|
+
showPauseDetails: string;
|
|
38
|
+
pauseReasonsLabel: string;
|
|
39
|
+
pausedByLabel: string;
|
|
40
|
+
alsoPausedByLabel: string;
|
|
41
|
+
resumeWorkspace: string;
|
|
42
|
+
resumeFromSession: string;
|
|
43
|
+
sessionCanRun: string;
|
|
44
|
+
stillPausedBy: (displayName: string) => string;
|
|
45
|
+
restoredResourcesLabel: string;
|
|
46
|
+
restoredFile: (fileId: string) => string;
|
|
47
|
+
removeRestoredResource: (index: number) => string;
|
|
48
|
+
uploading: string;
|
|
49
|
+
uploadFailed: string;
|
|
50
|
+
previewAttachment: (name: string) => string;
|
|
51
|
+
previewUnavailable?: string | undefined;
|
|
52
|
+
attachmentPreviewLabel: string;
|
|
53
|
+
downloadAttachment: (name: string) => string;
|
|
54
|
+
closeAttachmentPreview: string;
|
|
55
|
+
retryAttachment: (name: string) => string;
|
|
56
|
+
retryUpload: string;
|
|
57
|
+
removeAttachment: (name: string) => string;
|
|
58
|
+
confirmCommand: (name: string) => string;
|
|
59
|
+
confirmDescription: (command: SlashCommand) => string;
|
|
60
|
+
cancel: string;
|
|
61
|
+
runCommand: (name: string) => string;
|
|
62
|
+
commands: string;
|
|
63
|
+
slashCommandsLabel: string;
|
|
64
|
+
modelLabel: string;
|
|
65
|
+
close: string;
|
|
66
|
+
danger: string;
|
|
67
|
+
draftConflict: string;
|
|
68
|
+
useOtherDraft: string;
|
|
69
|
+
keepMine: string;
|
|
70
|
+
savingDraft: string;
|
|
71
|
+
formatBytes: (bytes: number) => string;
|
|
72
|
+
formatRelativeTime: (changedAt: string) => string;
|
|
73
|
+
};
|
|
74
|
+
export declare const defaultChatComposerMessages: ChatComposerMessages;
|