@solongate/proxy 0.81.31 → 0.81.33

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
@@ -6742,14 +6742,6 @@ function modeColor(m) {
6742
6742
  if (m === "detect" || m === "idle") return theme.warn;
6743
6743
  return theme.dim;
6744
6744
  }
6745
- function sparkline(values, width2) {
6746
- let v = values;
6747
- if (width2 && v.length > width2) v = v.slice(v.length - width2);
6748
- if (v.length === 0) return "";
6749
- const max = Math.max(...v, 0);
6750
- if (max === 0) return BLOCKS[0].repeat(v.length);
6751
- return v.map((n) => BLOCKS[Math.min(BLOCKS.length - 1, Math.round(n / max * (BLOCKS.length - 1)))]).join("");
6752
- }
6753
6745
  function prettyJson(s) {
6754
6746
  try {
6755
6747
  return JSON.stringify(JSON.parse(s), null, 2);
@@ -6782,7 +6774,7 @@ function ago(ts) {
6782
6774
  if (s < 86400) return `${Math.floor(s / 3600)}h`;
6783
6775
  return `${Math.floor(s / 86400)}d`;
6784
6776
  }
6785
- var accent, theme, BLOCKS;
6777
+ var accent, theme;
6786
6778
  var init_theme = __esm({
6787
6779
  "src/tui/theme.ts"() {
6788
6780
  "use strict";
@@ -6796,7 +6788,6 @@ var init_theme = __esm({
6796
6788
  bad: "red",
6797
6789
  dim: "gray"
6798
6790
  };
6799
- BLOCKS = ["\u2581", "\u2582", "\u2583", "\u2584", "\u2585", "\u2586", "\u2587", "\u2588"];
6800
6791
  }
6801
6792
  });
6802
6793
 
@@ -6896,6 +6887,15 @@ function clearLocalLog() {
6896
6887
  return 0;
6897
6888
  }
6898
6889
  }
6890
+ function reasonSignals(reason) {
6891
+ const r = reason || "";
6892
+ const dlp = [];
6893
+ if (DLP_REASON.test(r)) {
6894
+ const m = r.match(/contain(?:s)? (?:a |an )?(.+?)(?:\.|$)/i);
6895
+ dlp.push(m ? m[1].trim() : "DLP");
6896
+ }
6897
+ return { dlp, burst: RL_REASON.test(r) };
6898
+ }
6899
6899
  function parseLocalLines(lines) {
6900
6900
  const out2 = [];
6901
6901
  for (const line of lines) {
@@ -6908,11 +6908,13 @@ function parseLocalLines(lines) {
6908
6908
  }
6909
6909
  return out2;
6910
6910
  }
6911
- var LOCAL_LOG;
6911
+ var LOCAL_LOG, DLP_REASON, RL_REASON;
6912
6912
  var init_local_log = __esm({
6913
6913
  "src/tui/local-log.ts"() {
6914
6914
  "use strict";
6915
6915
  LOCAL_LOG = join6(homedir4(), ".solongate", "local-logs", "solongate-audit.jsonl");
6916
+ DLP_REASON = /security layer \(dlp\)/i;
6917
+ RL_REASON = /security layer \(rate limit\)|rate[- ]?limit(?:ed)?\b.*exceed|exceeded \d+ calls/i;
6916
6918
  }
6917
6919
  });
6918
6920
 
@@ -8538,7 +8540,7 @@ function ColoredSpark({ values, limit, width: width2 = 60 }) {
8538
8540
  const v = values.length > width2 ? values.slice(values.length - width2) : values;
8539
8541
  const max = Math.max(1, ...v);
8540
8542
  return /* @__PURE__ */ jsx4(Text4, { children: v.map((n, i) => {
8541
- const ch = BLOCKS2[Math.min(BLOCKS2.length - 1, Math.round(n / max * (BLOCKS2.length - 1)))];
8543
+ const ch = BLOCKS[Math.min(BLOCKS.length - 1, Math.round(n / max * (BLOCKS.length - 1)))];
8542
8544
  const over = limit > 0 && n > limit;
8543
8545
  return /* @__PURE__ */ jsx4(Text4, { color: over ? theme.bad : theme.accent, children: ch }, i);
8544
8546
  }) });
@@ -8670,7 +8672,7 @@ function FieldRow({ label, active: active2, children }) {
8670
8672
  children
8671
8673
  ] });
8672
8674
  }
8673
- var MODES, FIELDS2, BLOCKS2;
8675
+ var MODES, FIELDS2, BLOCKS;
8674
8676
  var init_RateLimit = __esm({
8675
8677
  "src/tui/panels/RateLimit.tsx"() {
8676
8678
  "use strict";
@@ -8680,7 +8682,7 @@ var init_RateLimit = __esm({
8680
8682
  init_theme();
8681
8683
  MODES = ["off", "detect", "block"];
8682
8684
  FIELDS2 = ["mode", "perMinute", "perHour", "perDay"];
8683
- BLOCKS2 = ["\u2581", "\u2582", "\u2583", "\u2584", "\u2585", "\u2586", "\u2587", "\u2588"];
8685
+ BLOCKS = ["\u2581", "\u2582", "\u2583", "\u2584", "\u2585", "\u2586", "\u2587", "\u2588"];
8684
8686
  }
8685
8687
  });
8686
8688
 
@@ -8883,22 +8885,26 @@ import { join as join8 } from "path";
8883
8885
  import { useState as useState6 } from "react";
8884
8886
  import { Fragment as Fragment4, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
8885
8887
  function loadLocalRows() {
8886
- return parseLocalLines(tailLines(LOCAL_LOG, LOCAL_MAX_BYTES)).map((j, i) => ({
8887
- id: "l:" + j.at + ":" + i,
8888
- at: j.at,
8889
- tool: j.tool ?? "?",
8890
- decision: j.decision ?? "ALLOW",
8891
- permission: j.permission ?? "\u2014",
8892
- trust: j.trust_level ?? "\u2014",
8893
- agent: j.agent_name ?? null,
8894
- session: j.session_id ?? null,
8895
- reason: j.reason ?? null,
8896
- rule: j.matched_rule_id ?? null,
8897
- evalMs: j.evaluation_time_ms ?? null,
8898
- dlp: j.dlp ? Array.isArray(j.dlp) ? j.dlp.map(String) : ["dlp"] : [],
8899
- burst: !!j.rate_limit_burst,
8900
- args: j.arguments ? JSON.stringify(j.arguments) : null
8901
- })).sort((a, b) => b.at - a.at);
8888
+ return parseLocalLines(tailLines(LOCAL_LOG, LOCAL_MAX_BYTES)).map((j, i) => {
8889
+ const rs = reasonSignals(j.reason);
8890
+ const explicitDlp = j.dlp ? Array.isArray(j.dlp) ? j.dlp.map(String) : ["dlp"] : [];
8891
+ return {
8892
+ id: "l:" + j.at + ":" + i,
8893
+ at: j.at,
8894
+ tool: j.tool ?? "?",
8895
+ decision: j.decision ?? "ALLOW",
8896
+ permission: j.permission ?? "\u2014",
8897
+ trust: j.trust_level ?? "\u2014",
8898
+ agent: j.agent_name ?? null,
8899
+ session: j.session_id ?? null,
8900
+ reason: j.reason ?? null,
8901
+ rule: j.matched_rule_id ?? null,
8902
+ evalMs: j.evaluation_time_ms ?? null,
8903
+ dlp: explicitDlp.length ? explicitDlp : rs.dlp,
8904
+ burst: !!j.rate_limit_burst || rs.burst,
8905
+ args: j.arguments ? JSON.stringify(j.arguments) : null
8906
+ };
8907
+ }).sort((a, b) => b.at - a.at);
8902
8908
  }
8903
8909
  function AuditPanel({ active: active2, focused }) {
8904
8910
  const { cols, rows } = usePanelSize();
@@ -8923,11 +8929,7 @@ function AuditPanel({ active: active2, focused }) {
8923
8929
  const [frozen, setFrozen] = useState6(false);
8924
8930
  const toTop = () => setSel(0);
8925
8931
  const statsQ = useLoader(() => source === "cloud" ? api.stats.get() : Promise.resolve(null), [source]);
8926
- const tsQ = useLoader(() => source === "cloud" ? api.stats.timeseries({ period: "24h" }) : Promise.resolve(null), [source]);
8927
- usePoll(() => {
8928
- statsQ.reloadQuiet();
8929
- tsQ.reloadQuiet();
8930
- }, 15e3, active2 && source === "cloud" && !frozen);
8932
+ usePoll(statsQ.reloadQuiet, 15e3, active2 && source === "cloud" && !frozen);
8931
8933
  const query = {
8932
8934
  filter: DECISIONS[di],
8933
8935
  signal: SIGNALS[gi],
@@ -9171,7 +9173,6 @@ function AuditPanel({ active: active2, focused }) {
9171
9173
  },
9172
9174
  { isActive: focused && !editing }
9173
9175
  );
9174
- const points = tsQ.data?.timeseries ?? [];
9175
9176
  const localAll = localQ.data ?? [];
9176
9177
  const strip = source === "cloud" ? /* @__PURE__ */ jsxs6(Text6, { wrap: "truncate", children: [
9177
9178
  /* @__PURE__ */ jsx6(Text6, { bold: true, children: statsQ.data ? statsQ.data.total_calls : "\xB7\xB7\xB7\xB7" }),
@@ -9185,10 +9186,7 @@ function AuditPanel({ active: active2, focused }) {
9185
9186
  statsQ.data?.denied ?? "\xB7\xB7",
9186
9187
  " deny"
9187
9188
  ] }),
9188
- /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: ` \xB7 ${statsQ.data?.active_policies ?? "\xB7"} policies \xB7 ${statsQ.data?.registered_tools ?? "\xB7"} tools \xB7 24h ` }),
9189
- /* @__PURE__ */ jsx6(Text6, { color: theme.accent, children: sparkline(points.map((p) => p.total), 24) }),
9190
- /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: " deny " }),
9191
- /* @__PURE__ */ jsx6(Text6, { color: theme.bad, children: sparkline(points.map((p) => p.denied), 24) })
9189
+ /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: ` \xB7 ${statsQ.data?.active_policies ?? "\xB7"} policies` })
9192
9190
  ] }) : /* @__PURE__ */ jsxs6(Text6, { wrap: "truncate", children: [
9193
9191
  /* @__PURE__ */ jsx6(Text6, { bold: true, children: localAll.length }),
9194
9192
  /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: " calls in local file \xB7 " }),
@@ -9463,22 +9461,25 @@ var init_Audit = __esm({
9463
9461
  SESS_STATUS = [void 0, "active", "idle", "ended"];
9464
9462
  PAGE = 500;
9465
9463
  LOCAL_MAX_BYTES = 16 * 1024 * 1024;
9466
- cloudRow = (e) => ({
9467
- id: e.id,
9468
- at: Date.parse(e.created_at),
9469
- tool: e.tool_name,
9470
- decision: e.decision,
9471
- permission: e.permission,
9472
- trust: e.trust_level,
9473
- agent: e.agent_name,
9474
- session: e.session_id,
9475
- reason: e.reason,
9476
- rule: e.matched_rule_id,
9477
- evalMs: e.evaluation_time_ms,
9478
- dlp: e.dlp_matches ?? [],
9479
- burst: !!e.rate_limit_burst,
9480
- args: e.arguments_summary ? JSON.stringify(e.arguments_summary) : null
9481
- });
9464
+ cloudRow = (e) => {
9465
+ const rs = reasonSignals(e.reason);
9466
+ return {
9467
+ id: e.id,
9468
+ at: Date.parse(e.created_at),
9469
+ tool: e.tool_name,
9470
+ decision: e.decision,
9471
+ permission: e.permission,
9472
+ trust: e.trust_level,
9473
+ agent: e.agent_name,
9474
+ session: e.session_id,
9475
+ reason: e.reason,
9476
+ rule: e.matched_rule_id,
9477
+ evalMs: e.evaluation_time_ms,
9478
+ dlp: e.dlp_matches?.length ? e.dlp_matches : rs.dlp,
9479
+ burst: !!e.rate_limit_burst || rs.burst,
9480
+ args: e.arguments_summary ? JSON.stringify(e.arguments_summary) : null
9481
+ };
9482
+ };
9482
9483
  AUDIT_HELP = [
9483
9484
  [
9484
9485
  "Logs",
@@ -9920,13 +9921,13 @@ function truncate3(s, n) {
9920
9921
  if (s.length <= n) return s;
9921
9922
  return s.slice(0, Math.max(0, n - 1)) + "\u2026";
9922
9923
  }
9923
- function sparkline2(values) {
9924
+ function sparkline(values) {
9924
9925
  if (values.length === 0) return "";
9925
9926
  const max = Math.max(...values, 0);
9926
- if (max === 0) return BLOCKS3[0].repeat(values.length);
9927
- return values.map((v) => BLOCKS3[Math.min(BLOCKS3.length - 1, Math.round(v / max * (BLOCKS3.length - 1)))]).join("");
9927
+ if (max === 0) return BLOCKS2[0].repeat(values.length);
9928
+ return values.map((v) => BLOCKS2[Math.min(BLOCKS2.length - 1, Math.round(v / max * (BLOCKS2.length - 1)))]).join("");
9928
9929
  }
9929
- var out, err, dim, bold, green, red, yellow, cyan, ANSI, width, BLOCKS3;
9930
+ var out, err, dim, bold, green, red, yellow, cyan, ANSI, width, BLOCKS2;
9930
9931
  var init_format = __esm({
9931
9932
  "src/commands/format.ts"() {
9932
9933
  "use strict";
@@ -9941,7 +9942,7 @@ var init_format = __esm({
9941
9942
  cyan = (s) => `${c.cyan}${s}${c.reset}`;
9942
9943
  ANSI = /\x1b\[[0-9;]*m/g;
9943
9944
  width = (s) => s.replace(ANSI, "").length;
9944
- BLOCKS3 = ["\u2581", "\u2582", "\u2583", "\u2584", "\u2585", "\u2586", "\u2587", "\u2588"];
9945
+ BLOCKS2 = ["\u2581", "\u2582", "\u2583", "\u2584", "\u2585", "\u2586", "\u2587", "\u2588"];
9945
9946
  }
9946
9947
  });
9947
9948
 
@@ -10217,7 +10218,7 @@ async function run2(argv) {
10217
10218
  err(` Rate limit mode: ${modeColor2(rl.mode)}`);
10218
10219
  err(` ${bold(String(rl.perMinute))} ${dim("/min")} ${bold(String(rl.perHour))} ${dim("/hour")} ${bold(String(rl.perDay))} ${dim("/day")}`);
10219
10220
  if (history.length) {
10220
- const spark = sparkline2(history.map((h) => h.minute));
10221
+ const spark = sparkline(history.map((h) => h.minute));
10221
10222
  err(` history ${cyan(spark)} ${dim(`(${history.length} changes, per-min)`)}`);
10222
10223
  }
10223
10224
  return 0;
@@ -10404,9 +10405,9 @@ async function run4(argv) {
10404
10405
  const pts = ts.timeseries;
10405
10406
  err("");
10406
10407
  err(` Timeseries ${dim(`(${ts.period}, per ${ts.granularity})`)}`);
10407
- err(` total ${cyan(sparkline2(pts.map((p) => p.total)))} ${dim(`max ${Math.max(0, ...pts.map((p) => p.total))}`)}`);
10408
- err(` allowed ${green(sparkline2(pts.map((p) => p.allowed)))}`);
10409
- err(` denied ${red(sparkline2(pts.map((p) => p.denied)))}`);
10408
+ err(` total ${cyan(sparkline(pts.map((p) => p.total)))} ${dim(`max ${Math.max(0, ...pts.map((p) => p.total))}`)}`);
10409
+ err(` allowed ${green(sparkline(pts.map((p) => p.allowed)))}`);
10410
+ err(` denied ${red(sparkline(pts.map((p) => p.denied)))}`);
10410
10411
  return 0;
10411
10412
  }
10412
10413
  case "drift": {
package/dist/tui/index.js CHANGED
@@ -87,15 +87,6 @@ function modeColor(m) {
87
87
  if (m === "detect" || m === "idle") return theme.warn;
88
88
  return theme.dim;
89
89
  }
90
- var BLOCKS = ["\u2581", "\u2582", "\u2583", "\u2584", "\u2585", "\u2586", "\u2587", "\u2588"];
91
- function sparkline(values, width) {
92
- let v = values;
93
- if (width && v.length > width) v = v.slice(v.length - width);
94
- if (v.length === 0) return "";
95
- const max = Math.max(...v, 0);
96
- if (max === 0) return BLOCKS[0].repeat(v.length);
97
- return v.map((n) => BLOCKS[Math.min(BLOCKS.length - 1, Math.round(n / max * (BLOCKS.length - 1)))]).join("");
98
- }
99
90
  function prettyJson(s) {
100
91
  try {
101
92
  return JSON.stringify(JSON.parse(s), null, 2);
@@ -226,6 +217,17 @@ function clearLocalLog() {
226
217
  return 0;
227
218
  }
228
219
  }
220
+ var DLP_REASON = /security layer \(dlp\)/i;
221
+ var RL_REASON = /security layer \(rate limit\)|rate[- ]?limit(?:ed)?\b.*exceed|exceeded \d+ calls/i;
222
+ function reasonSignals(reason) {
223
+ const r = reason || "";
224
+ const dlp = [];
225
+ if (DLP_REASON.test(r)) {
226
+ const m = r.match(/contain(?:s)? (?:a |an )?(.+?)(?:\.|$)/i);
227
+ dlp.push(m ? m[1].trim() : "DLP");
228
+ }
229
+ return { dlp, burst: RL_REASON.test(r) };
230
+ }
229
231
  function parseLocalLines(lines) {
230
232
  const out = [];
231
233
  for (const line of lines) {
@@ -1893,12 +1895,12 @@ import { useEffect as useEffect4, useState as useState4 } from "react";
1893
1895
  import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1894
1896
  var MODES = ["off", "detect", "block"];
1895
1897
  var FIELDS2 = ["mode", "perMinute", "perHour", "perDay"];
1896
- var BLOCKS2 = ["\u2581", "\u2582", "\u2583", "\u2584", "\u2585", "\u2586", "\u2587", "\u2588"];
1898
+ var BLOCKS = ["\u2581", "\u2582", "\u2583", "\u2584", "\u2585", "\u2586", "\u2587", "\u2588"];
1897
1899
  function ColoredSpark({ values, limit, width = 60 }) {
1898
1900
  const v = values.length > width ? values.slice(values.length - width) : values;
1899
1901
  const max = Math.max(1, ...v);
1900
1902
  return /* @__PURE__ */ jsx4(Text4, { children: v.map((n, i) => {
1901
- const ch = BLOCKS2[Math.min(BLOCKS2.length - 1, Math.round(n / max * (BLOCKS2.length - 1)))];
1903
+ const ch = BLOCKS[Math.min(BLOCKS.length - 1, Math.round(n / max * (BLOCKS.length - 1)))];
1902
1904
  const over = limit > 0 && n > limit;
1903
1905
  return /* @__PURE__ */ jsx4(Text4, { color: over ? theme.bad : theme.accent, children: ch }, i);
1904
1906
  }) });
@@ -2224,39 +2226,46 @@ var SIGNALS = [void 0, "dlp", "ratelimit"];
2224
2226
  var SESS_STATUS = [void 0, "active", "idle", "ended"];
2225
2227
  var PAGE = 500;
2226
2228
  var LOCAL_MAX_BYTES = 16 * 1024 * 1024;
2227
- var cloudRow = (e) => ({
2228
- id: e.id,
2229
- at: Date.parse(e.created_at),
2230
- tool: e.tool_name,
2231
- decision: e.decision,
2232
- permission: e.permission,
2233
- trust: e.trust_level,
2234
- agent: e.agent_name,
2235
- session: e.session_id,
2236
- reason: e.reason,
2237
- rule: e.matched_rule_id,
2238
- evalMs: e.evaluation_time_ms,
2239
- dlp: e.dlp_matches ?? [],
2240
- burst: !!e.rate_limit_burst,
2241
- args: e.arguments_summary ? JSON.stringify(e.arguments_summary) : null
2242
- });
2229
+ var cloudRow = (e) => {
2230
+ const rs = reasonSignals(e.reason);
2231
+ return {
2232
+ id: e.id,
2233
+ at: Date.parse(e.created_at),
2234
+ tool: e.tool_name,
2235
+ decision: e.decision,
2236
+ permission: e.permission,
2237
+ trust: e.trust_level,
2238
+ agent: e.agent_name,
2239
+ session: e.session_id,
2240
+ reason: e.reason,
2241
+ rule: e.matched_rule_id,
2242
+ evalMs: e.evaluation_time_ms,
2243
+ dlp: e.dlp_matches?.length ? e.dlp_matches : rs.dlp,
2244
+ burst: !!e.rate_limit_burst || rs.burst,
2245
+ args: e.arguments_summary ? JSON.stringify(e.arguments_summary) : null
2246
+ };
2247
+ };
2243
2248
  function loadLocalRows() {
2244
- return parseLocalLines(tailLines(LOCAL_LOG, LOCAL_MAX_BYTES)).map((j, i) => ({
2245
- id: "l:" + j.at + ":" + i,
2246
- at: j.at,
2247
- tool: j.tool ?? "?",
2248
- decision: j.decision ?? "ALLOW",
2249
- permission: j.permission ?? "\u2014",
2250
- trust: j.trust_level ?? "\u2014",
2251
- agent: j.agent_name ?? null,
2252
- session: j.session_id ?? null,
2253
- reason: j.reason ?? null,
2254
- rule: j.matched_rule_id ?? null,
2255
- evalMs: j.evaluation_time_ms ?? null,
2256
- dlp: j.dlp ? Array.isArray(j.dlp) ? j.dlp.map(String) : ["dlp"] : [],
2257
- burst: !!j.rate_limit_burst,
2258
- args: j.arguments ? JSON.stringify(j.arguments) : null
2259
- })).sort((a, b) => b.at - a.at);
2249
+ return parseLocalLines(tailLines(LOCAL_LOG, LOCAL_MAX_BYTES)).map((j, i) => {
2250
+ const rs = reasonSignals(j.reason);
2251
+ const explicitDlp = j.dlp ? Array.isArray(j.dlp) ? j.dlp.map(String) : ["dlp"] : [];
2252
+ return {
2253
+ id: "l:" + j.at + ":" + i,
2254
+ at: j.at,
2255
+ tool: j.tool ?? "?",
2256
+ decision: j.decision ?? "ALLOW",
2257
+ permission: j.permission ?? "\u2014",
2258
+ trust: j.trust_level ?? "\u2014",
2259
+ agent: j.agent_name ?? null,
2260
+ session: j.session_id ?? null,
2261
+ reason: j.reason ?? null,
2262
+ rule: j.matched_rule_id ?? null,
2263
+ evalMs: j.evaluation_time_ms ?? null,
2264
+ dlp: explicitDlp.length ? explicitDlp : rs.dlp,
2265
+ burst: !!j.rate_limit_burst || rs.burst,
2266
+ args: j.arguments ? JSON.stringify(j.arguments) : null
2267
+ };
2268
+ }).sort((a, b) => b.at - a.at);
2260
2269
  }
2261
2270
  var AUDIT_HELP = [
2262
2271
  [
@@ -2327,11 +2336,7 @@ function AuditPanel({ active: active2, focused }) {
2327
2336
  const [frozen, setFrozen] = useState6(false);
2328
2337
  const toTop = () => setSel(0);
2329
2338
  const statsQ = useLoader(() => source === "cloud" ? api.stats.get() : Promise.resolve(null), [source]);
2330
- const tsQ = useLoader(() => source === "cloud" ? api.stats.timeseries({ period: "24h" }) : Promise.resolve(null), [source]);
2331
- usePoll(() => {
2332
- statsQ.reloadQuiet();
2333
- tsQ.reloadQuiet();
2334
- }, 15e3, active2 && source === "cloud" && !frozen);
2339
+ usePoll(statsQ.reloadQuiet, 15e3, active2 && source === "cloud" && !frozen);
2335
2340
  const query = {
2336
2341
  filter: DECISIONS[di],
2337
2342
  signal: SIGNALS[gi],
@@ -2575,7 +2580,6 @@ function AuditPanel({ active: active2, focused }) {
2575
2580
  },
2576
2581
  { isActive: focused && !editing }
2577
2582
  );
2578
- const points = tsQ.data?.timeseries ?? [];
2579
2583
  const localAll = localQ.data ?? [];
2580
2584
  const strip = source === "cloud" ? /* @__PURE__ */ jsxs6(Text6, { wrap: "truncate", children: [
2581
2585
  /* @__PURE__ */ jsx6(Text6, { bold: true, children: statsQ.data ? statsQ.data.total_calls : "\xB7\xB7\xB7\xB7" }),
@@ -2589,10 +2593,7 @@ function AuditPanel({ active: active2, focused }) {
2589
2593
  statsQ.data?.denied ?? "\xB7\xB7",
2590
2594
  " deny"
2591
2595
  ] }),
2592
- /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: ` \xB7 ${statsQ.data?.active_policies ?? "\xB7"} policies \xB7 ${statsQ.data?.registered_tools ?? "\xB7"} tools \xB7 24h ` }),
2593
- /* @__PURE__ */ jsx6(Text6, { color: theme.accent, children: sparkline(points.map((p) => p.total), 24) }),
2594
- /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: " deny " }),
2595
- /* @__PURE__ */ jsx6(Text6, { color: theme.bad, children: sparkline(points.map((p) => p.denied), 24) })
2596
+ /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: ` \xB7 ${statsQ.data?.active_policies ?? "\xB7"} policies` })
2596
2597
  ] }) : /* @__PURE__ */ jsxs6(Text6, { wrap: "truncate", children: [
2597
2598
  /* @__PURE__ */ jsx6(Text6, { bold: true, children: localAll.length }),
2598
2599
  /* @__PURE__ */ jsx6(Text6, { color: theme.dim, children: " calls in local file \xB7 " }),
@@ -21,6 +21,11 @@ export interface LocalLogLine {
21
21
  export declare function deleteLocalEntry(at: number, tool: string, session?: string | null): number;
22
22
  /** Empty the local log file. Returns how many lines were removed. */
23
23
  export declare function clearLocalLog(): number;
24
+ /** DLP pattern name + rate-limit-burst flag derived from a decision's reason. */
25
+ export declare function reasonSignals(reason: string | null | undefined): {
26
+ dlp: string[];
27
+ burst: boolean;
28
+ };
24
29
  export declare function parseLocalLines(lines: string[]): Array<LocalLogLine & {
25
30
  at: number;
26
31
  }>;
@@ -0,0 +1,4 @@
1
+ {"ms":2,"ts":1784136532559,"tool":"Bash","session":"4aefeb66-3bff-4335-b710-e4f70d3adadf"}
2
+ {"ms":4,"ts":1784136544239,"tool":"Bash","session":"4aefeb66-3bff-4335-b710-e4f70d3adadf"}
3
+ {"ms":2,"ts":1784136555335,"tool":"Bash","session":"4aefeb66-3bff-4335-b710-e4f70d3adadf"}
4
+ {"ms":4,"ts":1784136601528,"tool":"Bash","session":"4aefeb66-3bff-4335-b710-e4f70d3adadf"}
@@ -1 +1 @@
1
- {"tool":"Bash","ts":1783610904106}
1
+ {"tool":"Bash","ts":1784136546307}
@@ -1 +1 @@
1
- {"ms":2391,"ts":1783610920233,"tool":"Bash","session":"fc94b672-fd99-4d52-9105-c77c7906d9f0"}
1
+ {"ms":4,"ts":1784136601528,"tool":"Bash","session":"4aefeb66-3bff-4335-b710-e4f70d3adadf"}
@@ -1 +1 @@
1
- 1783610904106
1
+ 1784136557479
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.81.31",
3
+ "version": "0.81.33",
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": {