@solongate/proxy 0.81.26 → 0.81.27

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 CHANGED
@@ -8916,6 +8916,7 @@ function AuditPanel({ active: active2, focused }) {
8916
8916
  const [sessSel, setSessSel] = useState6(0);
8917
8917
  const [confirm, setConfirm] = useState6(null);
8918
8918
  const [msg, setMsg] = useState6(null);
8919
+ const [showHelp, setShowHelp] = useState6(false);
8919
8920
  const toTop = () => setSel(0);
8920
8921
  const statsQ = useLoader(() => source === "cloud" ? api.stats.get() : Promise.resolve(null), [source]);
8921
8922
  const tsQ = useLoader(() => source === "cloud" ? api.stats.timeseries({ period: "24h" }) : Promise.resolve(null), [source]);
@@ -9028,6 +9029,14 @@ function AuditPanel({ active: active2, focused }) {
9028
9029
  };
9029
9030
  useInput5(
9030
9031
  (input, key) => {
9032
+ if (showHelp) {
9033
+ setShowHelp(false);
9034
+ return;
9035
+ }
9036
+ if (input === "?") {
9037
+ setShowHelp(true);
9038
+ return;
9039
+ }
9031
9040
  if (view === "detail") {
9032
9041
  if (key.leftArrow || key.escape) setView("logs");
9033
9042
  else if (key.upArrow) setDetailScroll((n) => Math.max(0, n - 1));
@@ -9175,6 +9184,19 @@ function AuditPanel({ active: active2, focused }) {
9175
9184
  /* @__PURE__ */ jsx6(Text6, { color: source === "local" ? theme.ok : "#4f6db8", bold: true, children: source }),
9176
9185
  /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: " (s) " })
9177
9186
  ] });
9187
+ if (showHelp) {
9188
+ return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
9189
+ /* @__PURE__ */ jsx6(Text6, { bold: true, color: theme.accentBright, children: "AUDIT \u2014 all keys" }),
9190
+ AUDIT_HELP.map(([group, keys]) => /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", marginTop: 1, children: [
9191
+ /* @__PURE__ */ jsx6(Text6, { bold: true, color: theme.accent, children: group }),
9192
+ keys.map(([k, desc]) => /* @__PURE__ */ jsxs6(Text6, { wrap: "truncate", children: [
9193
+ /* @__PURE__ */ jsx6(Text6, { color: theme.accentBright, children: (" " + k).padEnd(20) }),
9194
+ /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: desc })
9195
+ ] }, k))
9196
+ ] }, group)),
9197
+ /* @__PURE__ */ jsx6(Box6, { marginTop: 1, children: /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: "press any key to close" }) })
9198
+ ] });
9199
+ }
9178
9200
  if (view === "detail" && current) {
9179
9201
  const sessionCalls = source === "cloud" ? (sessionQ.data?.entries ?? []).map(cloudRow) : localAll.filter((r) => r.session && r.session === current.session).slice(0, 40);
9180
9202
  const bodyW = Math.max(20, cols - 2);
@@ -9254,7 +9276,7 @@ function AuditPanel({ active: active2, focused }) {
9254
9276
  chip("status", SESS_STATUS[si] ?? "all", si !== 0),
9255
9277
  chip("search", sessSearch || "\xB7", !!sessSearch)
9256
9278
  ] }),
9257
- /* @__PURE__ */ jsx6(Text6, { color: theme.dim, wrap: "truncate", children: focused ? "\u2191\u2193 select \xB7 enter \u2192 session logs \xB7 f status \xB7 / search \xB7 s source \xB7 v logs \xB7 c clear" : "press \u2192 to browse" }),
9279
+ /* @__PURE__ */ jsx6(Text6, { color: theme.dim, wrap: "truncate", children: focused ? "\u2191\u2193 select \xB7 enter \u2192 session logs \xB7 v logs \xB7 ? all keys" : "press \u2192 to browse" }),
9258
9280
  editing === "sess-search" ? /* @__PURE__ */ jsxs6(Box6, { children: [
9259
9281
  /* @__PURE__ */ jsx6(Text6, { color: theme.warn, children: "search: " }),
9260
9282
  /* @__PURE__ */ jsx6(
@@ -9328,7 +9350,7 @@ function AuditPanel({ active: active2, focused }) {
9328
9350
  chip("search", search || "\xB7", !!search),
9329
9351
  sessFilter ? chip("sess", sessFilter.slice(0, 8), true) : null
9330
9352
  ] }),
9331
- /* @__PURE__ */ jsx6(Text6, { color: theme.dim, wrap: "truncate", children: focused ? "\u2191\u2193 select \xB7 enter full entry \xB7 \u2190\u2192 page \xB7 f dec \xB7 g sig \xB7 t tool \xB7 n agent \xB7 / search \xB7 x del \xB7 X del ALL \xB7 s source \xB7 v sessions \xB7 c clear" : "press \u2192 to browse" }),
9353
+ /* @__PURE__ */ jsx6(Text6, { color: theme.dim, wrap: "truncate", children: focused ? "\u2191\u2193 select \xB7 enter full entry \xB7 \u2190\u2192 page \xB7 v sessions \xB7 ? all keys" : "press \u2192 to browse" }),
9332
9354
  msg ? /* @__PURE__ */ jsx6(Text6, { color: msg.level === "bad" ? theme.bad : theme.ok, children: truncate2(msg.text, cols) }) : null,
9333
9355
  editing && editing !== "sess-search" ? /* @__PURE__ */ jsxs6(Box6, { children: [
9334
9356
  /* @__PURE__ */ jsxs6(Text6, { color: theme.warn, children: [
@@ -9388,7 +9410,7 @@ function Detail({ label, value, color }) {
9388
9410
  /* @__PURE__ */ jsx6(Text6, { color, wrap: "truncate", children: value })
9389
9411
  ] });
9390
9412
  }
9391
- var DECISIONS, SIGNALS, SESS_STATUS, PAGE, LOCAL_MAX_BYTES, cloudRow, sessStatus2, STATUS_DOT;
9413
+ var DECISIONS, SIGNALS, SESS_STATUS, PAGE, LOCAL_MAX_BYTES, cloudRow, AUDIT_HELP, sessStatus2, STATUS_DOT;
9392
9414
  var init_Audit = __esm({
9393
9415
  "src/tui/panels/Audit.tsx"() {
9394
9416
  "use strict";
@@ -9418,6 +9440,43 @@ var init_Audit = __esm({
9418
9440
  burst: !!e.rate_limit_burst,
9419
9441
  args: e.arguments_summary ? JSON.stringify(e.arguments_summary) : null
9420
9442
  });
9443
+ AUDIT_HELP = [
9444
+ [
9445
+ "Logs",
9446
+ [
9447
+ ["\u2191\u2193 / PgUp PgDn", "select a row (window follows)"],
9448
+ ["enter", "open the FULL entry (reason + arguments)"],
9449
+ ["\u2190 \u2192", "previous / next page (500 per page, jumps to top)"],
9450
+ ["f", "decision filter: all \u2192 DENY \u2192 ALLOW"],
9451
+ ["g", "signal filter: all \u2192 dlp \u2192 ratelimit"],
9452
+ ["t / n", "tool / agent filter (type, enter done)"],
9453
+ ["/", "free-text search"],
9454
+ ["x", "delete the selected entry (press x twice)"],
9455
+ ["X", "delete ALL logs of the current source (press X twice)"],
9456
+ ["c", "clear every filter (incl. session)"]
9457
+ ]
9458
+ ],
9459
+ [
9460
+ "Sessions",
9461
+ [
9462
+ ["\u2191\u2193", "select a session"],
9463
+ ["enter", "open that session's logs"],
9464
+ ["f", "status filter: all \u2192 active \u2192 idle \u2192 ended"],
9465
+ ["/", "search agent / session id"],
9466
+ ["c", "clear session filters"]
9467
+ ]
9468
+ ],
9469
+ [
9470
+ "Anywhere in Audit",
9471
+ [
9472
+ ["v", "switch logs \u2194 sessions"],
9473
+ ["s", "switch source cloud \u2194 local file"],
9474
+ ["?", "this help \xB7 any key closes"],
9475
+ ["esc", "back to the menu"]
9476
+ ]
9477
+ ],
9478
+ ["Entry detail", [["\u2191\u2193 / PgUp PgDn", "scroll the arguments"], ["\u2190 / esc", "back to the list"]]]
9479
+ ];
9421
9480
  sessStatus2 = (lastAt) => Date.now() - lastAt < 6e4 ? "active" : Date.now() - lastAt < 3e5 ? "idle" : "ended";
9422
9481
  STATUS_DOT = {
9423
9482
  active: { ch: "\u25CF", color: theme.ok },
package/dist/tui/index.js CHANGED
@@ -2255,6 +2255,43 @@ function loadLocalRows() {
2255
2255
  args: j.arguments ? JSON.stringify(j.arguments) : null
2256
2256
  })).sort((a, b) => b.at - a.at);
2257
2257
  }
2258
+ var AUDIT_HELP = [
2259
+ [
2260
+ "Logs",
2261
+ [
2262
+ ["\u2191\u2193 / PgUp PgDn", "select a row (window follows)"],
2263
+ ["enter", "open the FULL entry (reason + arguments)"],
2264
+ ["\u2190 \u2192", "previous / next page (500 per page, jumps to top)"],
2265
+ ["f", "decision filter: all \u2192 DENY \u2192 ALLOW"],
2266
+ ["g", "signal filter: all \u2192 dlp \u2192 ratelimit"],
2267
+ ["t / n", "tool / agent filter (type, enter done)"],
2268
+ ["/", "free-text search"],
2269
+ ["x", "delete the selected entry (press x twice)"],
2270
+ ["X", "delete ALL logs of the current source (press X twice)"],
2271
+ ["c", "clear every filter (incl. session)"]
2272
+ ]
2273
+ ],
2274
+ [
2275
+ "Sessions",
2276
+ [
2277
+ ["\u2191\u2193", "select a session"],
2278
+ ["enter", "open that session's logs"],
2279
+ ["f", "status filter: all \u2192 active \u2192 idle \u2192 ended"],
2280
+ ["/", "search agent / session id"],
2281
+ ["c", "clear session filters"]
2282
+ ]
2283
+ ],
2284
+ [
2285
+ "Anywhere in Audit",
2286
+ [
2287
+ ["v", "switch logs \u2194 sessions"],
2288
+ ["s", "switch source cloud \u2194 local file"],
2289
+ ["?", "this help \xB7 any key closes"],
2290
+ ["esc", "back to the menu"]
2291
+ ]
2292
+ ],
2293
+ ["Entry detail", [["\u2191\u2193 / PgUp PgDn", "scroll the arguments"], ["\u2190 / esc", "back to the list"]]]
2294
+ ];
2258
2295
  var sessStatus2 = (lastAt) => Date.now() - lastAt < 6e4 ? "active" : Date.now() - lastAt < 3e5 ? "idle" : "ended";
2259
2296
  var STATUS_DOT = {
2260
2297
  active: { ch: "\u25CF", color: theme.ok },
@@ -2280,6 +2317,7 @@ function AuditPanel({ active: active2, focused }) {
2280
2317
  const [sessSel, setSessSel] = useState6(0);
2281
2318
  const [confirm, setConfirm] = useState6(null);
2282
2319
  const [msg, setMsg] = useState6(null);
2320
+ const [showHelp, setShowHelp] = useState6(false);
2283
2321
  const toTop = () => setSel(0);
2284
2322
  const statsQ = useLoader(() => source === "cloud" ? api.stats.get() : Promise.resolve(null), [source]);
2285
2323
  const tsQ = useLoader(() => source === "cloud" ? api.stats.timeseries({ period: "24h" }) : Promise.resolve(null), [source]);
@@ -2392,6 +2430,14 @@ function AuditPanel({ active: active2, focused }) {
2392
2430
  };
2393
2431
  useInput5(
2394
2432
  (input, key) => {
2433
+ if (showHelp) {
2434
+ setShowHelp(false);
2435
+ return;
2436
+ }
2437
+ if (input === "?") {
2438
+ setShowHelp(true);
2439
+ return;
2440
+ }
2395
2441
  if (view === "detail") {
2396
2442
  if (key.leftArrow || key.escape) setView("logs");
2397
2443
  else if (key.upArrow) setDetailScroll((n) => Math.max(0, n - 1));
@@ -2539,6 +2585,19 @@ function AuditPanel({ active: active2, focused }) {
2539
2585
  /* @__PURE__ */ jsx6(Text6, { color: source === "local" ? theme.ok : "#4f6db8", bold: true, children: source }),
2540
2586
  /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: " (s) " })
2541
2587
  ] });
2588
+ if (showHelp) {
2589
+ return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
2590
+ /* @__PURE__ */ jsx6(Text6, { bold: true, color: theme.accentBright, children: "AUDIT \u2014 all keys" }),
2591
+ AUDIT_HELP.map(([group, keys]) => /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", marginTop: 1, children: [
2592
+ /* @__PURE__ */ jsx6(Text6, { bold: true, color: theme.accent, children: group }),
2593
+ keys.map(([k, desc]) => /* @__PURE__ */ jsxs6(Text6, { wrap: "truncate", children: [
2594
+ /* @__PURE__ */ jsx6(Text6, { color: theme.accentBright, children: (" " + k).padEnd(20) }),
2595
+ /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: desc })
2596
+ ] }, k))
2597
+ ] }, group)),
2598
+ /* @__PURE__ */ jsx6(Box6, { marginTop: 1, children: /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: "press any key to close" }) })
2599
+ ] });
2600
+ }
2542
2601
  if (view === "detail" && current) {
2543
2602
  const sessionCalls = source === "cloud" ? (sessionQ.data?.entries ?? []).map(cloudRow) : localAll.filter((r) => r.session && r.session === current.session).slice(0, 40);
2544
2603
  const bodyW = Math.max(20, cols - 2);
@@ -2618,7 +2677,7 @@ function AuditPanel({ active: active2, focused }) {
2618
2677
  chip("status", SESS_STATUS[si] ?? "all", si !== 0),
2619
2678
  chip("search", sessSearch || "\xB7", !!sessSearch)
2620
2679
  ] }),
2621
- /* @__PURE__ */ jsx6(Text6, { color: theme.dim, wrap: "truncate", children: focused ? "\u2191\u2193 select \xB7 enter \u2192 session logs \xB7 f status \xB7 / search \xB7 s source \xB7 v logs \xB7 c clear" : "press \u2192 to browse" }),
2680
+ /* @__PURE__ */ jsx6(Text6, { color: theme.dim, wrap: "truncate", children: focused ? "\u2191\u2193 select \xB7 enter \u2192 session logs \xB7 v logs \xB7 ? all keys" : "press \u2192 to browse" }),
2622
2681
  editing === "sess-search" ? /* @__PURE__ */ jsxs6(Box6, { children: [
2623
2682
  /* @__PURE__ */ jsx6(Text6, { color: theme.warn, children: "search: " }),
2624
2683
  /* @__PURE__ */ jsx6(
@@ -2692,7 +2751,7 @@ function AuditPanel({ active: active2, focused }) {
2692
2751
  chip("search", search || "\xB7", !!search),
2693
2752
  sessFilter ? chip("sess", sessFilter.slice(0, 8), true) : null
2694
2753
  ] }),
2695
- /* @__PURE__ */ jsx6(Text6, { color: theme.dim, wrap: "truncate", children: focused ? "\u2191\u2193 select \xB7 enter full entry \xB7 \u2190\u2192 page \xB7 f dec \xB7 g sig \xB7 t tool \xB7 n agent \xB7 / search \xB7 x del \xB7 X del ALL \xB7 s source \xB7 v sessions \xB7 c clear" : "press \u2192 to browse" }),
2754
+ /* @__PURE__ */ jsx6(Text6, { color: theme.dim, wrap: "truncate", children: focused ? "\u2191\u2193 select \xB7 enter full entry \xB7 \u2190\u2192 page \xB7 v sessions \xB7 ? all keys" : "press \u2192 to browse" }),
2696
2755
  msg ? /* @__PURE__ */ jsx6(Text6, { color: msg.level === "bad" ? theme.bad : theme.ok, children: truncate(msg.text, cols) }) : null,
2697
2756
  editing && editing !== "sess-search" ? /* @__PURE__ */ jsxs6(Box6, { children: [
2698
2757
  /* @__PURE__ */ jsxs6(Text6, { color: theme.warn, children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.81.26",
3
+ "version": "0.81.27",
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": {