@solongate/proxy 0.81.20 → 0.81.21
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/dist/index.js +67 -5
- package/dist/tui/index.js +66 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7375,6 +7375,7 @@ function LivePanel({ active: active2 }) {
|
|
|
7375
7375
|
const [frozen, setFrozen] = useState2(false);
|
|
7376
7376
|
const frozenRef = useRef2(false);
|
|
7377
7377
|
frozenRef.current = frozen;
|
|
7378
|
+
const [showHelp, setShowHelp] = useState2(false);
|
|
7378
7379
|
const pushLog = useCallback2((msg, level = "ok") => {
|
|
7379
7380
|
setLog((prev) => [...prev.slice(-59), { ts: Date.now(), msg, level }]);
|
|
7380
7381
|
}, []);
|
|
@@ -7712,6 +7713,14 @@ function LivePanel({ active: active2 }) {
|
|
|
7712
7713
|
return;
|
|
7713
7714
|
}
|
|
7714
7715
|
if (frozen) return;
|
|
7716
|
+
if (showHelp) {
|
|
7717
|
+
setShowHelp(false);
|
|
7718
|
+
return;
|
|
7719
|
+
}
|
|
7720
|
+
if (input === "?") {
|
|
7721
|
+
setShowHelp(true);
|
|
7722
|
+
return;
|
|
7723
|
+
}
|
|
7715
7724
|
if (input === "/" && mode !== "pick") {
|
|
7716
7725
|
setEditingSearch(true);
|
|
7717
7726
|
return;
|
|
@@ -7834,6 +7843,20 @@ function LivePanel({ active: active2 }) {
|
|
|
7834
7843
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", children: ` ${spin} up ${fmtUp(nowMs - startRef.current)} \xB7 ${hhmmss(nowMs)} \xB7 api ${latNow}ms ` }),
|
|
7835
7844
|
frozen ? /* @__PURE__ */ jsx2(Text2, { backgroundColor: "#123d1f", color: "#7bd88f", bold: true, children: " \u23F5 COPY MODE \u2014 screen frozen, select & copy freely \xB7 space resume " }) : backingOff ? /* @__PURE__ */ jsx2(Text2, { backgroundColor: "#3d2a12", color: "#ffb454", bold: true, children: " RATE LIMITED \xB7 backing off " }) : lastDeny ? /* @__PURE__ */ jsx2(Text2, { backgroundColor: "#3d1220", color: "#ff6b6b", bold: true, children: ` \u26A0 ${hhmmss(lastDeny.at)} ${lastDeny.tool} DENIED ` }) : /* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#4f6db8", children: " \u2713 clean " })
|
|
7836
7845
|
] });
|
|
7846
|
+
if (showHelp) {
|
|
7847
|
+
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", paddingX: 1, children: [
|
|
7848
|
+
titleBar,
|
|
7849
|
+
/* @__PURE__ */ jsx2(Text2, { bold: true, color: theme.accentBright, children: "LIVE \u2014 all keys" }),
|
|
7850
|
+
/* @__PURE__ */ jsx2(Box2, { flexDirection: "column", marginTop: 1, children: LIVE_HELP.map(([group, keys]) => /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", marginBottom: 1, children: [
|
|
7851
|
+
/* @__PURE__ */ jsx2(Text2, { bold: true, color: theme.accent, children: group }),
|
|
7852
|
+
keys.map(([k, desc]) => /* @__PURE__ */ jsxs2(Text2, { wrap: "truncate", children: [
|
|
7853
|
+
/* @__PURE__ */ jsx2(Text2, { color: theme.accentBright, children: (" " + k).padEnd(20) }),
|
|
7854
|
+
/* @__PURE__ */ jsx2(Text2, { color: theme.dim, children: desc })
|
|
7855
|
+
] }, k))
|
|
7856
|
+
] }, group)) }),
|
|
7857
|
+
/* @__PURE__ */ jsx2(Text2, { color: theme.dim, children: "press any key to close" })
|
|
7858
|
+
] });
|
|
7859
|
+
}
|
|
7837
7860
|
if (mode === "inspect" && inspect) {
|
|
7838
7861
|
const e = inspect;
|
|
7839
7862
|
const bodyW = Math.max(20, cols - 4);
|
|
@@ -7876,7 +7899,7 @@ function LivePanel({ active: active2 }) {
|
|
|
7876
7899
|
/* @__PURE__ */ jsxs2(Text2, { wrap: "truncate", children: [
|
|
7877
7900
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", bold: true, children: " ENTRY " }),
|
|
7878
7901
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: "#0b1530", color: "#4f6db8", children: ` ${e.id} ` }),
|
|
7879
|
-
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", children: " \u2191\u2193 scroll \xB7 space copy
|
|
7902
|
+
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", children: " \u2191\u2193 scroll \xB7 space copy \xB7 ? all keys \xB7 \u2190 back \xB7 esc menu " })
|
|
7880
7903
|
] })
|
|
7881
7904
|
] });
|
|
7882
7905
|
}
|
|
@@ -7949,7 +7972,7 @@ function LivePanel({ active: active2 }) {
|
|
|
7949
7972
|
/* @__PURE__ */ jsxs2(Text2, { wrap: "truncate", children: [
|
|
7950
7973
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", bold: true, children: " SESSION " }),
|
|
7951
7974
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: "#0b1530", color: "#4f6db8", children: ` ${detail.id} ` }),
|
|
7952
|
-
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", children: " \u2191\u2193 select \xB7 enter full entry \xB7 \u2190 back \xB7 esc menu " })
|
|
7975
|
+
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", children: " \u2191\u2193 select \xB7 enter full entry \xB7 ? all keys \xB7 \u2190 back \xB7 esc menu " })
|
|
7953
7976
|
] })
|
|
7954
7977
|
] });
|
|
7955
7978
|
}
|
|
@@ -8062,7 +8085,7 @@ function LivePanel({ active: active2 }) {
|
|
|
8062
8085
|
PaneTitle,
|
|
8063
8086
|
{
|
|
8064
8087
|
label: "TOOL STREAM",
|
|
8065
|
-
extra: `${selClamped + 1}/${visibleDesc.length}${signal !== "none" ? ` \xB7 ${signal}` : ""}${q ? " \xB7 search" : ""}
|
|
8088
|
+
extra: `${selClamped + 1}/${visibleDesc.length}${signal !== "none" ? ` \xB7 ${signal}` : ""}${q ? " \xB7 search" : ""}${filter !== "all" ? ` \xB7 source:${filter}` : ""} \xB7 enter full entry \xB7 ? all keys`,
|
|
8066
8089
|
width: innerW
|
|
8067
8090
|
}
|
|
8068
8091
|
),
|
|
@@ -8081,11 +8104,11 @@ function LivePanel({ active: active2 }) {
|
|
|
8081
8104
|
/* @__PURE__ */ jsxs2(Text2, { wrap: "truncate", children: [
|
|
8082
8105
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", bold: true, children: " LIVE " }),
|
|
8083
8106
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: "#0b1530", color: "#4f6db8", children: ` local ${localOn ? "on" : "off"} \xB7 ${localBuf.length} loc/${cloudBuf.length} cld \xB7 top ${topTools.map(([t, c2]) => `${t}\xD7${c2}`).join(" ") || "\u2014"} ` }),
|
|
8084
|
-
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", children:
|
|
8107
|
+
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", children: ` \u2191\u2193 select \xB7 enter full entry \xB7 / search \xB7 space copy \xB7 ? all keys \xB7 esc menu \xB7 q quit ` })
|
|
8085
8108
|
] })
|
|
8086
8109
|
] });
|
|
8087
8110
|
}
|
|
8088
|
-
var CONFIG, SPIN, BG, DIM_FLOOR, LOCAL_LOG, RING, hhmmss, fmtUp, FILTERS, sessStatus, STATUS_STYLE;
|
|
8111
|
+
var CONFIG, SPIN, BG, DIM_FLOOR, LOCAL_LOG, RING, hhmmss, fmtUp, FILTERS, sessStatus, STATUS_STYLE, LIVE_HELP;
|
|
8089
8112
|
var init_Live = __esm({
|
|
8090
8113
|
"src/tui/panels/Live.tsx"() {
|
|
8091
8114
|
"use strict";
|
|
@@ -8116,6 +8139,45 @@ var init_Live = __esm({
|
|
|
8116
8139
|
idle: { dot: "\u25D0", label: "IDLE", color: theme.warn },
|
|
8117
8140
|
ended: { dot: "\u25CB", label: "ENDED", color: theme.dim }
|
|
8118
8141
|
};
|
|
8142
|
+
LIVE_HELP = [
|
|
8143
|
+
[
|
|
8144
|
+
"Stream",
|
|
8145
|
+
[
|
|
8146
|
+
["\u2191\u2193 / PgUp PgDn", "select a row (window follows)"],
|
|
8147
|
+
["enter", "open the FULL entry content"],
|
|
8148
|
+
["w", "whitelist the selected DENY (adds ALLOW rule)"],
|
|
8149
|
+
["b", "block the selected ALLOW (adds DENY rule)"],
|
|
8150
|
+
["d / x / r", "filter: denies / dlp hits / rate-limit bursts"],
|
|
8151
|
+
["f", "source filter: all \u2192 local \u2192 cloud"],
|
|
8152
|
+
["/", "live search (tool, agent, command\u2026) \xB7 enter done"],
|
|
8153
|
+
["s", "session picker"],
|
|
8154
|
+
["e", "export visible rows \u2192 ~/.solongate/live-export.jsonl"],
|
|
8155
|
+
["space", "copy mode: freeze screen for mouse selection"],
|
|
8156
|
+
["esc", "back to menu"],
|
|
8157
|
+
["q", "quit dataroom"]
|
|
8158
|
+
]
|
|
8159
|
+
],
|
|
8160
|
+
[
|
|
8161
|
+
"Entry (full content)",
|
|
8162
|
+
[
|
|
8163
|
+
["\u2191\u2193 / PgUp PgDn", "scroll the content"],
|
|
8164
|
+
["space", "copy mode (freeze, then select with mouse)"],
|
|
8165
|
+
["\u2190", "back to where you came from"]
|
|
8166
|
+
]
|
|
8167
|
+
],
|
|
8168
|
+
[
|
|
8169
|
+
"Sessions",
|
|
8170
|
+
[
|
|
8171
|
+
["\u2191\u2193 + enter", "pick & open a session (picker)"],
|
|
8172
|
+
["s or \u2190", "cancel the picker"],
|
|
8173
|
+
["\u2191\u2193", "select a timeline row (detail)"],
|
|
8174
|
+
["enter", "full entry content of the selected row"],
|
|
8175
|
+
["/", "search within the timeline"],
|
|
8176
|
+
["\u2190", "back to stream"]
|
|
8177
|
+
]
|
|
8178
|
+
],
|
|
8179
|
+
["Anywhere", [["?", "this help"], ["any key", "close this help"]]]
|
|
8180
|
+
];
|
|
8119
8181
|
}
|
|
8120
8182
|
});
|
|
8121
8183
|
|
package/dist/tui/index.js
CHANGED
|
@@ -745,6 +745,45 @@ var STATUS_STYLE = {
|
|
|
745
745
|
idle: { dot: "\u25D0", label: "IDLE", color: theme.warn },
|
|
746
746
|
ended: { dot: "\u25CB", label: "ENDED", color: theme.dim }
|
|
747
747
|
};
|
|
748
|
+
var LIVE_HELP = [
|
|
749
|
+
[
|
|
750
|
+
"Stream",
|
|
751
|
+
[
|
|
752
|
+
["\u2191\u2193 / PgUp PgDn", "select a row (window follows)"],
|
|
753
|
+
["enter", "open the FULL entry content"],
|
|
754
|
+
["w", "whitelist the selected DENY (adds ALLOW rule)"],
|
|
755
|
+
["b", "block the selected ALLOW (adds DENY rule)"],
|
|
756
|
+
["d / x / r", "filter: denies / dlp hits / rate-limit bursts"],
|
|
757
|
+
["f", "source filter: all \u2192 local \u2192 cloud"],
|
|
758
|
+
["/", "live search (tool, agent, command\u2026) \xB7 enter done"],
|
|
759
|
+
["s", "session picker"],
|
|
760
|
+
["e", "export visible rows \u2192 ~/.solongate/live-export.jsonl"],
|
|
761
|
+
["space", "copy mode: freeze screen for mouse selection"],
|
|
762
|
+
["esc", "back to menu"],
|
|
763
|
+
["q", "quit dataroom"]
|
|
764
|
+
]
|
|
765
|
+
],
|
|
766
|
+
[
|
|
767
|
+
"Entry (full content)",
|
|
768
|
+
[
|
|
769
|
+
["\u2191\u2193 / PgUp PgDn", "scroll the content"],
|
|
770
|
+
["space", "copy mode (freeze, then select with mouse)"],
|
|
771
|
+
["\u2190", "back to where you came from"]
|
|
772
|
+
]
|
|
773
|
+
],
|
|
774
|
+
[
|
|
775
|
+
"Sessions",
|
|
776
|
+
[
|
|
777
|
+
["\u2191\u2193 + enter", "pick & open a session (picker)"],
|
|
778
|
+
["s or \u2190", "cancel the picker"],
|
|
779
|
+
["\u2191\u2193", "select a timeline row (detail)"],
|
|
780
|
+
["enter", "full entry content of the selected row"],
|
|
781
|
+
["/", "search within the timeline"],
|
|
782
|
+
["\u2190", "back to stream"]
|
|
783
|
+
]
|
|
784
|
+
],
|
|
785
|
+
["Anywhere", [["?", "this help"], ["any key", "close this help"]]]
|
|
786
|
+
];
|
|
748
787
|
function LivePanel({ active: active2 }) {
|
|
749
788
|
const [s, setS] = useState2(null);
|
|
750
789
|
const [lat, setLat] = useState2([]);
|
|
@@ -780,6 +819,7 @@ function LivePanel({ active: active2 }) {
|
|
|
780
819
|
const [frozen, setFrozen] = useState2(false);
|
|
781
820
|
const frozenRef = useRef2(false);
|
|
782
821
|
frozenRef.current = frozen;
|
|
822
|
+
const [showHelp, setShowHelp] = useState2(false);
|
|
783
823
|
const pushLog = useCallback2((msg, level = "ok") => {
|
|
784
824
|
setLog((prev) => [...prev.slice(-59), { ts: Date.now(), msg, level }]);
|
|
785
825
|
}, []);
|
|
@@ -1117,6 +1157,14 @@ function LivePanel({ active: active2 }) {
|
|
|
1117
1157
|
return;
|
|
1118
1158
|
}
|
|
1119
1159
|
if (frozen) return;
|
|
1160
|
+
if (showHelp) {
|
|
1161
|
+
setShowHelp(false);
|
|
1162
|
+
return;
|
|
1163
|
+
}
|
|
1164
|
+
if (input === "?") {
|
|
1165
|
+
setShowHelp(true);
|
|
1166
|
+
return;
|
|
1167
|
+
}
|
|
1120
1168
|
if (input === "/" && mode !== "pick") {
|
|
1121
1169
|
setEditingSearch(true);
|
|
1122
1170
|
return;
|
|
@@ -1239,6 +1287,20 @@ function LivePanel({ active: active2 }) {
|
|
|
1239
1287
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", children: ` ${spin} up ${fmtUp(nowMs - startRef.current)} \xB7 ${hhmmss(nowMs)} \xB7 api ${latNow}ms ` }),
|
|
1240
1288
|
frozen ? /* @__PURE__ */ jsx2(Text2, { backgroundColor: "#123d1f", color: "#7bd88f", bold: true, children: " \u23F5 COPY MODE \u2014 screen frozen, select & copy freely \xB7 space resume " }) : backingOff ? /* @__PURE__ */ jsx2(Text2, { backgroundColor: "#3d2a12", color: "#ffb454", bold: true, children: " RATE LIMITED \xB7 backing off " }) : lastDeny ? /* @__PURE__ */ jsx2(Text2, { backgroundColor: "#3d1220", color: "#ff6b6b", bold: true, children: ` \u26A0 ${hhmmss(lastDeny.at)} ${lastDeny.tool} DENIED ` }) : /* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#4f6db8", children: " \u2713 clean " })
|
|
1241
1289
|
] });
|
|
1290
|
+
if (showHelp) {
|
|
1291
|
+
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", paddingX: 1, children: [
|
|
1292
|
+
titleBar,
|
|
1293
|
+
/* @__PURE__ */ jsx2(Text2, { bold: true, color: theme.accentBright, children: "LIVE \u2014 all keys" }),
|
|
1294
|
+
/* @__PURE__ */ jsx2(Box2, { flexDirection: "column", marginTop: 1, children: LIVE_HELP.map(([group, keys]) => /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", marginBottom: 1, children: [
|
|
1295
|
+
/* @__PURE__ */ jsx2(Text2, { bold: true, color: theme.accent, children: group }),
|
|
1296
|
+
keys.map(([k, desc]) => /* @__PURE__ */ jsxs2(Text2, { wrap: "truncate", children: [
|
|
1297
|
+
/* @__PURE__ */ jsx2(Text2, { color: theme.accentBright, children: (" " + k).padEnd(20) }),
|
|
1298
|
+
/* @__PURE__ */ jsx2(Text2, { color: theme.dim, children: desc })
|
|
1299
|
+
] }, k))
|
|
1300
|
+
] }, group)) }),
|
|
1301
|
+
/* @__PURE__ */ jsx2(Text2, { color: theme.dim, children: "press any key to close" })
|
|
1302
|
+
] });
|
|
1303
|
+
}
|
|
1242
1304
|
if (mode === "inspect" && inspect) {
|
|
1243
1305
|
const e = inspect;
|
|
1244
1306
|
const bodyW = Math.max(20, cols - 4);
|
|
@@ -1281,7 +1343,7 @@ function LivePanel({ active: active2 }) {
|
|
|
1281
1343
|
/* @__PURE__ */ jsxs2(Text2, { wrap: "truncate", children: [
|
|
1282
1344
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", bold: true, children: " ENTRY " }),
|
|
1283
1345
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: "#0b1530", color: "#4f6db8", children: ` ${e.id} ` }),
|
|
1284
|
-
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", children: " \u2191\u2193 scroll \xB7 space copy
|
|
1346
|
+
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", children: " \u2191\u2193 scroll \xB7 space copy \xB7 ? all keys \xB7 \u2190 back \xB7 esc menu " })
|
|
1285
1347
|
] })
|
|
1286
1348
|
] });
|
|
1287
1349
|
}
|
|
@@ -1354,7 +1416,7 @@ function LivePanel({ active: active2 }) {
|
|
|
1354
1416
|
/* @__PURE__ */ jsxs2(Text2, { wrap: "truncate", children: [
|
|
1355
1417
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", bold: true, children: " SESSION " }),
|
|
1356
1418
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: "#0b1530", color: "#4f6db8", children: ` ${detail.id} ` }),
|
|
1357
|
-
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", children: " \u2191\u2193 select \xB7 enter full entry \xB7 \u2190 back \xB7 esc menu " })
|
|
1419
|
+
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", children: " \u2191\u2193 select \xB7 enter full entry \xB7 ? all keys \xB7 \u2190 back \xB7 esc menu " })
|
|
1358
1420
|
] })
|
|
1359
1421
|
] });
|
|
1360
1422
|
}
|
|
@@ -1467,7 +1529,7 @@ function LivePanel({ active: active2 }) {
|
|
|
1467
1529
|
PaneTitle,
|
|
1468
1530
|
{
|
|
1469
1531
|
label: "TOOL STREAM",
|
|
1470
|
-
extra: `${selClamped + 1}/${visibleDesc.length}${signal !== "none" ? ` \xB7 ${signal}` : ""}${q ? " \xB7 search" : ""}
|
|
1532
|
+
extra: `${selClamped + 1}/${visibleDesc.length}${signal !== "none" ? ` \xB7 ${signal}` : ""}${q ? " \xB7 search" : ""}${filter !== "all" ? ` \xB7 source:${filter}` : ""} \xB7 enter full entry \xB7 ? all keys`,
|
|
1471
1533
|
width: innerW
|
|
1472
1534
|
}
|
|
1473
1535
|
),
|
|
@@ -1486,7 +1548,7 @@ function LivePanel({ active: active2 }) {
|
|
|
1486
1548
|
/* @__PURE__ */ jsxs2(Text2, { wrap: "truncate", children: [
|
|
1487
1549
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", bold: true, children: " LIVE " }),
|
|
1488
1550
|
/* @__PURE__ */ jsx2(Text2, { backgroundColor: "#0b1530", color: "#4f6db8", children: ` local ${localOn ? "on" : "off"} \xB7 ${localBuf.length} loc/${cloudBuf.length} cld \xB7 top ${topTools.map(([t, c2]) => `${t}\xD7${c2}`).join(" ") || "\u2014"} ` }),
|
|
1489
|
-
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", children:
|
|
1551
|
+
/* @__PURE__ */ jsx2(Text2, { backgroundColor: BG, color: "#82AAF0", children: ` \u2191\u2193 select \xB7 enter full entry \xB7 / search \xB7 space copy \xB7 ? all keys \xB7 esc menu \xB7 q quit ` })
|
|
1490
1552
|
] })
|
|
1491
1553
|
] });
|
|
1492
1554
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.81.
|
|
3
|
+
"version": "0.81.21",
|
|
4
4
|
"description": "AI tool security proxy: protect any AI tool server with customizable policies, path/command constraints, rate limiting, and audit logging. No code changes required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|