@solongate/proxy 0.82.35 → 0.82.36
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 +6 -5
- package/dist/tui/index.js +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8853,7 +8853,7 @@ function DryRunPanel({ focused }) {
|
|
|
8853
8853
|
} else if (input === "r" || input === "R") run10(pi, limit);
|
|
8854
8854
|
});
|
|
8855
8855
|
function commitLogs(raw) {
|
|
8856
|
-
const cap = totalLogs && totalLogs > 0 ? totalLogs :
|
|
8856
|
+
const cap = Math.min(MAX_LIMIT, totalLogs && totalLogs > 0 ? totalLogs : MAX_LIMIT);
|
|
8857
8857
|
const parsed = parseInt(raw.replace(/[^0-9]/g, ""), 10);
|
|
8858
8858
|
const next = Number.isFinite(parsed) && parsed > 0 ? Math.min(parsed, cap) : limit;
|
|
8859
8859
|
setEditLogs(null);
|
|
@@ -8946,11 +8946,11 @@ function DryRunPanel({ focused }) {
|
|
|
8946
8946
|
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: " logs " }),
|
|
8947
8947
|
/* @__PURE__ */ jsx3(Text3, { color: theme.warn, children: "how many recent logs to replay: " }),
|
|
8948
8948
|
/* @__PURE__ */ jsx3(TextInput2, { value: editLogs, onChange: setEditLogs, onSubmit: commitLogs }),
|
|
8949
|
-
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: totalLogs
|
|
8949
|
+
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: ` (max ${Math.min(MAX_LIMIT, totalLogs && totalLogs > 0 ? totalLogs : MAX_LIMIT)})` })
|
|
8950
8950
|
] }) : /* @__PURE__ */ jsxs3(Text3, { wrap: "truncate", children: [
|
|
8951
8951
|
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: " logs " }),
|
|
8952
8952
|
/* @__PURE__ */ jsx3(Text3, { color: theme.accent, children: "\u2039 " + String(limit) + " \u203A" }),
|
|
8953
|
-
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: ` press n to type a number${totalLogs
|
|
8953
|
+
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: ` press n to type a number max ${Math.min(MAX_LIMIT, totalLogs && totalLogs > 0 ? totalLogs : MAX_LIMIT)}${res?.sampled != null ? ` replayed ${res.sampled}` : ""}` })
|
|
8954
8954
|
] }),
|
|
8955
8955
|
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, wrap: "truncate", children: focused ? `\u2191\u2193 scroll \xB7 p policy \xB7 n logs \xB7 r re-run${above ? ` \xB7 \u25B2${above}` : ""}${below ? ` \xB7 \u25BC${below}` : ""}` : "press \u2192 to open" }),
|
|
8956
8956
|
running ? /* @__PURE__ */ jsx3(Text3, { color: theme.warn, children: "replaying recent traffic\u2026" }) : null,
|
|
@@ -8959,7 +8959,7 @@ function DryRunPanel({ focused }) {
|
|
|
8959
8959
|
/* @__PURE__ */ jsx3(Box3, { marginTop: 1, flexDirection: "column", children: win })
|
|
8960
8960
|
] }) });
|
|
8961
8961
|
}
|
|
8962
|
-
var DEFAULT_LIMIT, pendingPolicyId, pct;
|
|
8962
|
+
var DEFAULT_LIMIT, MAX_LIMIT, pendingPolicyId, pct;
|
|
8963
8963
|
var init_DryRun = __esm({
|
|
8964
8964
|
"src/tui/panels/DryRun.tsx"() {
|
|
8965
8965
|
"use strict";
|
|
@@ -8968,6 +8968,7 @@ var init_DryRun = __esm({
|
|
|
8968
8968
|
init_hooks();
|
|
8969
8969
|
init_theme();
|
|
8970
8970
|
DEFAULT_LIMIT = 1e3;
|
|
8971
|
+
MAX_LIMIT = 5e3;
|
|
8971
8972
|
pendingPolicyId = null;
|
|
8972
8973
|
pct = (n, d) => d ? (n / d * 100).toFixed(1) + "%" : "0%";
|
|
8973
8974
|
}
|
|
@@ -9063,7 +9064,7 @@ function PoliciesPanel({ focused }) {
|
|
|
9063
9064
|
});
|
|
9064
9065
|
setRules(res.rules);
|
|
9065
9066
|
setDirty(false);
|
|
9066
|
-
setStatus("\u2713 Saved
|
|
9067
|
+
setStatus("\u2713 Saved");
|
|
9067
9068
|
list6.reload();
|
|
9068
9069
|
} catch (e) {
|
|
9069
9070
|
setStatus("\u2717 " + (e instanceof Error ? e.message : String(e)));
|
package/dist/tui/index.js
CHANGED
|
@@ -1913,6 +1913,7 @@ import TextInput2 from "ink-text-input";
|
|
|
1913
1913
|
import { useEffect as useEffect3, useState as useState3 } from "react";
|
|
1914
1914
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1915
1915
|
var DEFAULT_LIMIT = 1e3;
|
|
1916
|
+
var MAX_LIMIT = 5e3;
|
|
1916
1917
|
var pendingPolicyId = null;
|
|
1917
1918
|
function requestDryRun(policyId) {
|
|
1918
1919
|
pendingPolicyId = policyId;
|
|
@@ -1965,7 +1966,7 @@ function DryRunPanel({ focused }) {
|
|
|
1965
1966
|
} else if (input === "r" || input === "R") run(pi, limit);
|
|
1966
1967
|
});
|
|
1967
1968
|
function commitLogs(raw) {
|
|
1968
|
-
const cap = totalLogs && totalLogs > 0 ? totalLogs :
|
|
1969
|
+
const cap = Math.min(MAX_LIMIT, totalLogs && totalLogs > 0 ? totalLogs : MAX_LIMIT);
|
|
1969
1970
|
const parsed = parseInt(raw.replace(/[^0-9]/g, ""), 10);
|
|
1970
1971
|
const next = Number.isFinite(parsed) && parsed > 0 ? Math.min(parsed, cap) : limit;
|
|
1971
1972
|
setEditLogs(null);
|
|
@@ -2058,11 +2059,11 @@ function DryRunPanel({ focused }) {
|
|
|
2058
2059
|
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: " logs " }),
|
|
2059
2060
|
/* @__PURE__ */ jsx3(Text3, { color: theme.warn, children: "how many recent logs to replay: " }),
|
|
2060
2061
|
/* @__PURE__ */ jsx3(TextInput2, { value: editLogs, onChange: setEditLogs, onSubmit: commitLogs }),
|
|
2061
|
-
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: totalLogs
|
|
2062
|
+
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: ` (max ${Math.min(MAX_LIMIT, totalLogs && totalLogs > 0 ? totalLogs : MAX_LIMIT)})` })
|
|
2062
2063
|
] }) : /* @__PURE__ */ jsxs3(Text3, { wrap: "truncate", children: [
|
|
2063
2064
|
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: " logs " }),
|
|
2064
2065
|
/* @__PURE__ */ jsx3(Text3, { color: theme.accent, children: "\u2039 " + String(limit) + " \u203A" }),
|
|
2065
|
-
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: ` press n to type a number${totalLogs
|
|
2066
|
+
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: ` press n to type a number max ${Math.min(MAX_LIMIT, totalLogs && totalLogs > 0 ? totalLogs : MAX_LIMIT)}${res?.sampled != null ? ` replayed ${res.sampled}` : ""}` })
|
|
2066
2067
|
] }),
|
|
2067
2068
|
/* @__PURE__ */ jsx3(Text3, { color: theme.dim, wrap: "truncate", children: focused ? `\u2191\u2193 scroll \xB7 p policy \xB7 n logs \xB7 r re-run${above ? ` \xB7 \u25B2${above}` : ""}${below ? ` \xB7 \u25BC${below}` : ""}` : "press \u2192 to open" }),
|
|
2068
2069
|
running ? /* @__PURE__ */ jsx3(Text3, { color: theme.warn, children: "replaying recent traffic\u2026" }) : null,
|
|
@@ -2174,7 +2175,7 @@ function PoliciesPanel({ focused }) {
|
|
|
2174
2175
|
});
|
|
2175
2176
|
setRules(res.rules);
|
|
2176
2177
|
setDirty(false);
|
|
2177
|
-
setStatus("\u2713 Saved
|
|
2178
|
+
setStatus("\u2713 Saved");
|
|
2178
2179
|
list5.reload();
|
|
2179
2180
|
} catch (e) {
|
|
2180
2181
|
setStatus("\u2717 " + (e instanceof Error ? e.message : String(e)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.82.
|
|
3
|
+
"version": "0.82.36",
|
|
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": {
|