agent-relay-server 0.12.1 → 0.12.3
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/package.json +1 -1
- package/public/index.html +145 -6
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -123798,6 +123798,68 @@ function Input({ className, type, ...props }) {
|
|
|
123798
123798
|
});
|
|
123799
123799
|
}
|
|
123800
123800
|
//#endregion
|
|
123801
|
+
//#region src/components/shared/zoomable-image.tsx
|
|
123802
|
+
function ImageLightbox({ src, alt, onClose }) {
|
|
123803
|
+
const [zoomed, setZoomed] = (0, import_react.useState)(false);
|
|
123804
|
+
(0, import_react.useEffect)(() => {
|
|
123805
|
+
const prev = document.body.style.overflow;
|
|
123806
|
+
document.body.style.overflow = "hidden";
|
|
123807
|
+
function onKey(e) {
|
|
123808
|
+
if (e.key === "Escape") onClose();
|
|
123809
|
+
}
|
|
123810
|
+
document.addEventListener("keydown", onKey);
|
|
123811
|
+
return () => {
|
|
123812
|
+
document.body.style.overflow = prev;
|
|
123813
|
+
document.removeEventListener("keydown", onKey);
|
|
123814
|
+
};
|
|
123815
|
+
}, [onClose]);
|
|
123816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
123817
|
+
className: "fixed inset-0 z-[100] flex flex-col bg-black/95",
|
|
123818
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
123819
|
+
className: "flex shrink-0 items-center justify-end gap-2 p-2",
|
|
123820
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
123821
|
+
type: "button",
|
|
123822
|
+
className: "rounded-full bg-white/10 p-2 text-white/70 hover:bg-white/20 hover:text-white",
|
|
123823
|
+
onClick: () => setZoomed(!zoomed),
|
|
123824
|
+
title: zoomed ? "Fit to screen" : "Actual size",
|
|
123825
|
+
children: zoomed ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ZoomOut, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ZoomIn, { className: "h-4 w-4" })
|
|
123826
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
123827
|
+
type: "button",
|
|
123828
|
+
className: "rounded-full bg-white/10 p-2 text-white/70 hover:bg-white/20 hover:text-white",
|
|
123829
|
+
onClick: onClose,
|
|
123830
|
+
title: "Close",
|
|
123831
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(X$3, { className: "h-4 w-4" })
|
|
123832
|
+
})]
|
|
123833
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
123834
|
+
className: `min-h-0 flex-1 ${zoomed ? "overflow-auto" : "flex items-center justify-center overflow-hidden p-4"}`,
|
|
123835
|
+
onClick: zoomed ? void 0 : onClose,
|
|
123836
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
|
|
123837
|
+
src,
|
|
123838
|
+
alt,
|
|
123839
|
+
className: zoomed ? "max-w-none" : "max-h-full max-w-full cursor-zoom-in object-contain",
|
|
123840
|
+
onClick: (e) => {
|
|
123841
|
+
e.stopPropagation();
|
|
123842
|
+
setZoomed(!zoomed);
|
|
123843
|
+
}
|
|
123844
|
+
})
|
|
123845
|
+
})]
|
|
123846
|
+
});
|
|
123847
|
+
}
|
|
123848
|
+
function ZoomableImage({ src, alt = "", className, style }) {
|
|
123849
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
123850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
|
|
123851
|
+
src,
|
|
123852
|
+
alt,
|
|
123853
|
+
className: `${className || ""} cursor-zoom-in`,
|
|
123854
|
+
style,
|
|
123855
|
+
onClick: () => setOpen(true)
|
|
123856
|
+
}), open && (0, import_react_dom.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ImageLightbox, {
|
|
123857
|
+
src,
|
|
123858
|
+
alt,
|
|
123859
|
+
onClose: () => setOpen(false)
|
|
123860
|
+
}), document.body)] });
|
|
123861
|
+
}
|
|
123862
|
+
//#endregion
|
|
123801
123863
|
//#region src/components/shared/markdown-preview.tsx
|
|
123802
123864
|
var markdownSchema = {
|
|
123803
123865
|
...defaultSchema,
|
|
@@ -123815,7 +123877,7 @@ function externalLinkProps(href) {
|
|
|
123815
123877
|
}
|
|
123816
123878
|
function MarkdownPreview({ content, path }) {
|
|
123817
123879
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
123818
|
-
className: "markdown-preview max-w-none p-4 text-sm leading-6",
|
|
123880
|
+
className: "markdown-preview max-w-none overflow-hidden p-4 text-sm leading-6",
|
|
123819
123881
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Markdown, {
|
|
123820
123882
|
remarkPlugins: [remarkGfm],
|
|
123821
123883
|
rehypePlugins: [[rehypeSanitize, markdownSchema]],
|
|
@@ -123827,6 +123889,14 @@ function MarkdownPreview({ content, path }) {
|
|
|
123827
123889
|
children
|
|
123828
123890
|
});
|
|
123829
123891
|
},
|
|
123892
|
+
img({ src, alt }) {
|
|
123893
|
+
if (!src) return null;
|
|
123894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ZoomableImage, {
|
|
123895
|
+
src,
|
|
123896
|
+
alt,
|
|
123897
|
+
className: "max-w-full"
|
|
123898
|
+
});
|
|
123899
|
+
},
|
|
123830
123900
|
code({ className, children, ...props }) {
|
|
123831
123901
|
const match = /language-([\w-]+)/.exec(className || "");
|
|
123832
123902
|
const code = String(children).replace(/\n$/, "");
|
|
@@ -124183,7 +124253,7 @@ function FileContent({ orchestratorId, selectedPath, line, onReadError }) {
|
|
|
124183
124253
|
]
|
|
124184
124254
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
124185
124255
|
className: "flex min-h-0 flex-1 items-center justify-center overflow-auto p-4",
|
|
124186
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
124256
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ZoomableImage, {
|
|
124187
124257
|
src: `data:${file.mediaType};base64,${file.content ?? ""}`,
|
|
124188
124258
|
alt: file.name,
|
|
124189
124259
|
className: "max-h-full max-w-full object-contain",
|
|
@@ -124522,7 +124592,7 @@ function FileBrowser({ overlay = false }) {
|
|
|
124522
124592
|
})
|
|
124523
124593
|
]
|
|
124524
124594
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
124525
|
-
className: `flex min-h-0 flex-col ${selectedPath ? "" : "hidden md:flex"}`,
|
|
124595
|
+
className: `flex min-h-0 flex-col overflow-hidden ${selectedPath ? "" : "hidden md:flex"}`,
|
|
124526
124596
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
124527
124597
|
type: "button",
|
|
124528
124598
|
className: "flex items-center gap-1.5 border-b border-border px-3 py-2 text-xs text-muted-foreground hover:text-foreground md:hidden",
|
|
@@ -125313,7 +125383,7 @@ function ActivityTrace({ steps }) {
|
|
|
125313
125383
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Brain, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
125314
125384
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
125315
125385
|
className: "truncate",
|
|
125316
|
-
children: expanded ? "Activity" : summary.length > 80 ? `${summary.slice(0, 79)}…` : summary || "thinking"
|
|
125386
|
+
children: expanded || steps.length > 1 ? "Activity" : summary.length > 80 ? `${summary.slice(0, 79)}…` : summary || "thinking"
|
|
125317
125387
|
}),
|
|
125318
125388
|
steps.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
125319
125389
|
className: "opacity-60 shrink-0",
|
|
@@ -127481,11 +127551,12 @@ function LogViewer({ orchestratorId, session, lines = 200 }) {
|
|
|
127481
127551
|
const [logLines, setLogLines] = (0, import_react.useState)([]);
|
|
127482
127552
|
const [query, setQuery] = (0, import_react.useState)("");
|
|
127483
127553
|
const [paused, setPaused] = (0, import_react.useState)(false);
|
|
127554
|
+
const [stream, setStream] = (0, import_react.useState)("provider");
|
|
127484
127555
|
const [error, setError] = (0, import_react.useState)(null);
|
|
127485
127556
|
async function load() {
|
|
127486
127557
|
if (paused) return;
|
|
127487
127558
|
try {
|
|
127488
|
-
setLogLines((await apiCall("GET", `/orchestrators/${encodeURIComponent(orchestratorId)}/logs/${encodeURIComponent(session)}?lines=${lines}`)).lines || []);
|
|
127559
|
+
setLogLines((await apiCall("GET", `/orchestrators/${encodeURIComponent(orchestratorId)}/logs/${encodeURIComponent(session)}?lines=${lines}${stream === "mirror" ? "&stream=mirror" : ""}`)).lines || []);
|
|
127489
127560
|
setError(null);
|
|
127490
127561
|
} catch (e) {
|
|
127491
127562
|
setError(e instanceof Error ? e.message : String(e));
|
|
@@ -127498,7 +127569,8 @@ function LogViewer({ orchestratorId, session, lines = 200 }) {
|
|
|
127498
127569
|
}, [
|
|
127499
127570
|
orchestratorId,
|
|
127500
127571
|
session,
|
|
127501
|
-
paused
|
|
127572
|
+
paused,
|
|
127573
|
+
stream
|
|
127502
127574
|
]);
|
|
127503
127575
|
const visible = query ? logLines.filter((line) => line.toLowerCase().includes(query.toLowerCase())) : logLines;
|
|
127504
127576
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -127516,6 +127588,22 @@ function LogViewer({ orchestratorId, session, lines = 200 }) {
|
|
|
127516
127588
|
placeholder: "Search logs"
|
|
127517
127589
|
})]
|
|
127518
127590
|
}),
|
|
127591
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
127592
|
+
className: "flex rounded-md border border-border overflow-hidden",
|
|
127593
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
127594
|
+
type: "button",
|
|
127595
|
+
onClick: () => setStream("provider"),
|
|
127596
|
+
title: "Provider output",
|
|
127597
|
+
className: cn$2("flex items-center gap-1 px-2 py-1.5 text-xs", stream === "provider" ? "bg-accent text-accent-foreground" : "text-muted-foreground hover:bg-accent/50"),
|
|
127598
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Terminal, { className: "h-3.5 w-3.5" }), " Output"]
|
|
127599
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
127600
|
+
type: "button",
|
|
127601
|
+
onClick: () => setStream("mirror"),
|
|
127602
|
+
title: "Session-mirror diagnostics (clean)",
|
|
127603
|
+
className: cn$2("flex items-center gap-1 px-2 py-1.5 text-xs border-l border-border", stream === "mirror" ? "bg-accent text-accent-foreground" : "text-muted-foreground hover:bg-accent/50"),
|
|
127604
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Brain, { className: "h-3.5 w-3.5" }), " Mirror"]
|
|
127605
|
+
})]
|
|
127606
|
+
}),
|
|
127519
127607
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
127520
127608
|
type: "button",
|
|
127521
127609
|
variant: "outline",
|
|
@@ -157588,6 +157676,10 @@ if ("serviceWorker" in navigator) {
|
|
|
157588
157676
|
z-index: 50;
|
|
157589
157677
|
}
|
|
157590
157678
|
|
|
157679
|
+
.z-\[100\] {
|
|
157680
|
+
z-index: 100;
|
|
157681
|
+
}
|
|
157682
|
+
|
|
157591
157683
|
.col-span-2 {
|
|
157592
157684
|
grid-column: span 2 / span 2;
|
|
157593
157685
|
}
|
|
@@ -158413,6 +158505,10 @@ if ("serviceWorker" in navigator) {
|
|
|
158413
158505
|
cursor: pointer;
|
|
158414
158506
|
}
|
|
158415
158507
|
|
|
158508
|
+
.cursor-zoom-in {
|
|
158509
|
+
cursor: zoom-in;
|
|
158510
|
+
}
|
|
158511
|
+
|
|
158416
158512
|
.touch-none {
|
|
158417
158513
|
touch-action: none;
|
|
158418
158514
|
}
|
|
@@ -159779,6 +159875,16 @@ if ("serviceWorker" in navigator) {
|
|
|
159779
159875
|
}
|
|
159780
159876
|
}
|
|
159781
159877
|
|
|
159878
|
+
.bg-white\/10 {
|
|
159879
|
+
background-color: #ffffff1a;
|
|
159880
|
+
}
|
|
159881
|
+
|
|
159882
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
159883
|
+
.bg-white\/10 {
|
|
159884
|
+
background-color: color-mix(in oklab, var(--color-white) 10%, transparent);
|
|
159885
|
+
}
|
|
159886
|
+
}
|
|
159887
|
+
|
|
159782
159888
|
.bg-yellow-400 {
|
|
159783
159889
|
background-color: var(--color-yellow-400);
|
|
159784
159890
|
}
|
|
@@ -160269,6 +160375,10 @@ if ("serviceWorker" in navigator) {
|
|
|
160269
160375
|
white-space: pre-wrap;
|
|
160270
160376
|
}
|
|
160271
160377
|
|
|
160378
|
+
.text-accent-foreground {
|
|
160379
|
+
color: var(--accent-foreground);
|
|
160380
|
+
}
|
|
160381
|
+
|
|
160272
160382
|
.text-amber-50\/55 {
|
|
160273
160383
|
color: #fffbeb8c;
|
|
160274
160384
|
}
|
|
@@ -160551,6 +160661,16 @@ if ("serviceWorker" in navigator) {
|
|
|
160551
160661
|
color: var(--color-white);
|
|
160552
160662
|
}
|
|
160553
160663
|
|
|
160664
|
+
.text-white\/70 {
|
|
160665
|
+
color: #ffffffb3;
|
|
160666
|
+
}
|
|
160667
|
+
|
|
160668
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
160669
|
+
.text-white\/70 {
|
|
160670
|
+
color: color-mix(in oklab, var(--color-white) 70%, transparent);
|
|
160671
|
+
}
|
|
160672
|
+
}
|
|
160673
|
+
|
|
160554
160674
|
.text-yellow-200\/80 {
|
|
160555
160675
|
color: #fff085cc;
|
|
160556
160676
|
}
|
|
@@ -161201,6 +161321,16 @@ if ("serviceWorker" in navigator) {
|
|
|
161201
161321
|
}
|
|
161202
161322
|
}
|
|
161203
161323
|
|
|
161324
|
+
.hover\:bg-white\/20:hover {
|
|
161325
|
+
background-color: #fff3;
|
|
161326
|
+
}
|
|
161327
|
+
|
|
161328
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
161329
|
+
.hover\:bg-white\/20:hover {
|
|
161330
|
+
background-color: color-mix(in oklab, var(--color-white) 20%, transparent);
|
|
161331
|
+
}
|
|
161332
|
+
}
|
|
161333
|
+
|
|
161204
161334
|
.hover\:bg-zinc-800\/50:hover {
|
|
161205
161335
|
background-color: #27272a80;
|
|
161206
161336
|
}
|
|
@@ -161247,6 +161377,10 @@ if ("serviceWorker" in navigator) {
|
|
|
161247
161377
|
color: var(--color-violet-300);
|
|
161248
161378
|
}
|
|
161249
161379
|
|
|
161380
|
+
.hover\:text-white:hover {
|
|
161381
|
+
color: var(--color-white);
|
|
161382
|
+
}
|
|
161383
|
+
|
|
161250
161384
|
.hover\:text-zinc-100:hover {
|
|
161251
161385
|
color: var(--color-zinc-100);
|
|
161252
161386
|
}
|
|
@@ -163214,6 +163348,11 @@ if ("serviceWorker" in navigator) {
|
|
|
163214
163348
|
font-size: .85em;
|
|
163215
163349
|
}
|
|
163216
163350
|
|
|
163351
|
+
.markdown-preview img {
|
|
163352
|
+
max-width: 100%;
|
|
163353
|
+
height: auto;
|
|
163354
|
+
}
|
|
163355
|
+
|
|
163217
163356
|
.markdown-preview pre {
|
|
163218
163357
|
border: 1px solid var(--border);
|
|
163219
163358
|
background: var(--muted);
|