@solongate/proxy 0.82.29 → 0.82.31
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 +29 -8
- package/dist/tui/index.js +26 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8933,13 +8933,10 @@ function PoliciesPanel({ focused }) {
|
|
|
8933
8933
|
setFi(0);
|
|
8934
8934
|
setView("rule");
|
|
8935
8935
|
} else if (input === "D") {
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
newly allowed ${res.newly_allowed} newly blocked ${res.newly_blocked} unchanged ${res.unchanged}` + (res.sample_newly_blocked?.length ? `
|
|
8941
|
-
now blocked e.g.: ${res.sample_newly_blocked.slice(0, 3).map((s) => truncate2(s.tool, 24)).join(", ")}` : "")
|
|
8942
|
-
)).catch((e) => setStatus("\u2717 " + (e instanceof Error ? e.message : String(e))));
|
|
8936
|
+
if (selected) {
|
|
8937
|
+
openBrowser(`${DASHBOARD_URL}/playground?policy=${encodeURIComponent(selected.id)}`);
|
|
8938
|
+
setStatus("Opened the dry-run playground in your browser.");
|
|
8939
|
+
}
|
|
8943
8940
|
} else if (input === "s") void save();
|
|
8944
8941
|
else if (input === "x") discard();
|
|
8945
8942
|
return;
|
|
@@ -9085,14 +9082,16 @@ function PoliciesPanel({ focused }) {
|
|
|
9085
9082
|
status ? /* @__PURE__ */ jsx3(Text3, { color: status.startsWith("\u2717") ? theme.bad : theme.ok, children: status }) : null
|
|
9086
9083
|
] });
|
|
9087
9084
|
}
|
|
9088
|
-
var constr, setConstr, FIELDS;
|
|
9085
|
+
var DASHBOARD_URL, constr, setConstr, FIELDS;
|
|
9089
9086
|
var init_Policies = __esm({
|
|
9090
9087
|
"src/tui/panels/Policies.tsx"() {
|
|
9091
9088
|
"use strict";
|
|
9092
9089
|
init_api_client();
|
|
9090
|
+
init_device_login();
|
|
9093
9091
|
init_components();
|
|
9094
9092
|
init_hooks();
|
|
9095
9093
|
init_theme();
|
|
9094
|
+
DASHBOARD_URL = "https://dashboard.solongate.com";
|
|
9096
9095
|
constr = (r, g, side) => (r[g]?.[side] ?? []).join(", ");
|
|
9097
9096
|
setConstr = (r, g, side, val) => {
|
|
9098
9097
|
const arr = val.split(",").map((s) => s.trim()).filter(Boolean);
|
|
@@ -11121,6 +11120,26 @@ function LiveHint() {
|
|
|
11121
11120
|
] }) })
|
|
11122
11121
|
] });
|
|
11123
11122
|
}
|
|
11123
|
+
function DryRunPanel({ focused }) {
|
|
11124
|
+
const [opened, setOpened] = useState8(false);
|
|
11125
|
+
useEffect7(() => {
|
|
11126
|
+
if (focused && !opened) {
|
|
11127
|
+
openBrowser("https://dashboard.solongate.com/playground");
|
|
11128
|
+
setOpened(true);
|
|
11129
|
+
}
|
|
11130
|
+
}, [focused, opened]);
|
|
11131
|
+
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
|
|
11132
|
+
/* @__PURE__ */ jsx8(Text8, { color: theme.accentBright, bold: true, children: "Policy Dry Run" }),
|
|
11133
|
+
/* @__PURE__ */ jsx8(Text8, { color: theme.dim, children: "Replay a rule set against your real historical traffic and see exactly" }),
|
|
11134
|
+
/* @__PURE__ */ jsx8(Text8, { color: theme.dim, children: "what would change before you ship it." }),
|
|
11135
|
+
/* @__PURE__ */ jsx8(Box8, { marginTop: 1, children: opened ? /* @__PURE__ */ jsx8(Text8, { color: theme.ok, children: "Opened in your browser." }) : /* @__PURE__ */ jsxs8(Text8, { children: [
|
|
11136
|
+
"press ",
|
|
11137
|
+
/* @__PURE__ */ jsx8(Text8, { color: theme.accent, children: "enter" }),
|
|
11138
|
+
" to open the dry-run playground in your browser"
|
|
11139
|
+
] }) }),
|
|
11140
|
+
/* @__PURE__ */ jsx8(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx8(Text8, { color: theme.dim, children: "Pick any policy and tune the sample there. From Policies, open a policy and press D to dry-run that one." }) })
|
|
11141
|
+
] });
|
|
11142
|
+
}
|
|
11124
11143
|
function Banner({ cols }) {
|
|
11125
11144
|
const wide = cols >= 82;
|
|
11126
11145
|
if (!wide) {
|
|
@@ -11278,6 +11297,7 @@ var init_App = __esm({
|
|
|
11278
11297
|
init_Settings();
|
|
11279
11298
|
init_hooks();
|
|
11280
11299
|
init_client();
|
|
11300
|
+
init_device_login();
|
|
11281
11301
|
init_api_client();
|
|
11282
11302
|
init_self_update();
|
|
11283
11303
|
SECTIONS = [
|
|
@@ -11285,6 +11305,7 @@ var init_App = __esm({
|
|
|
11285
11305
|
{ label: "Policies", Panel: PoliciesPanel },
|
|
11286
11306
|
{ label: "Rate Limit", Panel: RateLimitPanel },
|
|
11287
11307
|
{ label: "DLP", Panel: DlpPanel },
|
|
11308
|
+
{ label: "Dry Run", Panel: DryRunPanel },
|
|
11288
11309
|
{ label: "Audit", Panel: AuditPanel },
|
|
11289
11310
|
{ label: "Settings", Panel: SettingsPanel }
|
|
11290
11311
|
];
|
package/dist/tui/index.js
CHANGED
|
@@ -1903,6 +1903,7 @@ import { Box as Box3, Text as Text3, useInput as useInput2 } from "ink";
|
|
|
1903
1903
|
import TextInput2 from "ink-text-input";
|
|
1904
1904
|
import { useEffect as useEffect3, useState as useState3 } from "react";
|
|
1905
1905
|
import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1906
|
+
var DASHBOARD_URL = "https://dashboard.solongate.com";
|
|
1906
1907
|
var constr = (r, g, side) => (r[g]?.[side] ?? []).join(", ");
|
|
1907
1908
|
var setConstr = (r, g, side, val) => {
|
|
1908
1909
|
const arr = val.split(",").map((s) => s.trim()).filter(Boolean);
|
|
@@ -2058,13 +2059,10 @@ function PoliciesPanel({ focused }) {
|
|
|
2058
2059
|
setFi(0);
|
|
2059
2060
|
setView("rule");
|
|
2060
2061
|
} else if (input === "D") {
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
newly allowed ${res.newly_allowed} newly blocked ${res.newly_blocked} unchanged ${res.unchanged}` + (res.sample_newly_blocked?.length ? `
|
|
2066
|
-
now blocked e.g.: ${res.sample_newly_blocked.slice(0, 3).map((s) => truncate(s.tool, 24)).join(", ")}` : "")
|
|
2067
|
-
)).catch((e) => setStatus("\u2717 " + (e instanceof Error ? e.message : String(e))));
|
|
2062
|
+
if (selected) {
|
|
2063
|
+
openBrowser(`${DASHBOARD_URL}/playground?policy=${encodeURIComponent(selected.id)}`);
|
|
2064
|
+
setStatus("Opened the dry-run playground in your browser.");
|
|
2065
|
+
}
|
|
2068
2066
|
} else if (input === "s") void save();
|
|
2069
2067
|
else if (input === "x") discard();
|
|
2070
2068
|
return;
|
|
@@ -4344,11 +4342,32 @@ function LiveHint() {
|
|
|
4344
4342
|
] }) })
|
|
4345
4343
|
] });
|
|
4346
4344
|
}
|
|
4345
|
+
function DryRunPanel({ focused }) {
|
|
4346
|
+
const [opened, setOpened] = useState8(false);
|
|
4347
|
+
useEffect7(() => {
|
|
4348
|
+
if (focused && !opened) {
|
|
4349
|
+
openBrowser("https://dashboard.solongate.com/playground");
|
|
4350
|
+
setOpened(true);
|
|
4351
|
+
}
|
|
4352
|
+
}, [focused, opened]);
|
|
4353
|
+
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
|
|
4354
|
+
/* @__PURE__ */ jsx8(Text8, { color: theme.accentBright, bold: true, children: "Policy Dry Run" }),
|
|
4355
|
+
/* @__PURE__ */ jsx8(Text8, { color: theme.dim, children: "Replay a rule set against your real historical traffic and see exactly" }),
|
|
4356
|
+
/* @__PURE__ */ jsx8(Text8, { color: theme.dim, children: "what would change before you ship it." }),
|
|
4357
|
+
/* @__PURE__ */ jsx8(Box8, { marginTop: 1, children: opened ? /* @__PURE__ */ jsx8(Text8, { color: theme.ok, children: "Opened in your browser." }) : /* @__PURE__ */ jsxs8(Text8, { children: [
|
|
4358
|
+
"press ",
|
|
4359
|
+
/* @__PURE__ */ jsx8(Text8, { color: theme.accent, children: "enter" }),
|
|
4360
|
+
" to open the dry-run playground in your browser"
|
|
4361
|
+
] }) }),
|
|
4362
|
+
/* @__PURE__ */ jsx8(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx8(Text8, { color: theme.dim, children: "Pick any policy and tune the sample there. From Policies, open a policy and press D to dry-run that one." }) })
|
|
4363
|
+
] });
|
|
4364
|
+
}
|
|
4347
4365
|
var SECTIONS = [
|
|
4348
4366
|
{ label: "Live", Panel: LiveHint },
|
|
4349
4367
|
{ label: "Policies", Panel: PoliciesPanel },
|
|
4350
4368
|
{ label: "Rate Limit", Panel: RateLimitPanel },
|
|
4351
4369
|
{ label: "DLP", Panel: DlpPanel },
|
|
4370
|
+
{ label: "Dry Run", Panel: DryRunPanel },
|
|
4352
4371
|
{ label: "Audit", Panel: AuditPanel },
|
|
4353
4372
|
{ label: "Settings", Panel: SettingsPanel }
|
|
4354
4373
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.82.
|
|
3
|
+
"version": "0.82.31",
|
|
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": {
|