@solongate/proxy 0.82.30 → 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 CHANGED
@@ -8906,13 +8906,6 @@ function PoliciesPanel({ focused }) {
8906
8906
  return;
8907
8907
  }
8908
8908
  if (view === "rules") {
8909
- if (key.ctrl && input === "d") {
8910
- if (selected) {
8911
- openBrowser(`${DASHBOARD_URL}/playground?policy=${encodeURIComponent(selected.id)}`);
8912
- setStatus("Opened the dry-run playground in your browser.");
8913
- }
8914
- return;
8915
- }
8916
8909
  if (key.leftArrow) return setView("list"), void setStatus(null);
8917
8910
  if (key.upArrow) setRi((n) => Math.max(0, n - 1));
8918
8911
  else if (key.downArrow) setRi((n) => Math.min(rules.length - 1, n + 1));
@@ -8940,13 +8933,10 @@ function PoliciesPanel({ focused }) {
8940
8933
  setFi(0);
8941
8934
  setView("rule");
8942
8935
  } else if (input === "D") {
8943
- setStatus("Dry-running\u2026");
8944
- void api.policies.dryRun({ rules, mode }).then((res) => setStatus(
8945
- `dry-run: replayed ${res.evaluated} recent calls against ${rules.length} rules
8946
- would allow ${res.would_allow} would deny ${res.would_deny}
8947
- newly allowed ${res.newly_allowed} newly blocked ${res.newly_blocked} unchanged ${res.unchanged}` + (res.sample_newly_blocked?.length ? `
8948
- now blocked e.g.: ${res.sample_newly_blocked.slice(0, 3).map((s) => truncate2(s.tool, 24)).join(", ")}` : "")
8949
- )).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
+ }
8950
8940
  } else if (input === "s") void save();
8951
8941
  else if (input === "x") discard();
8952
8942
  return;
@@ -9025,7 +9015,7 @@ function PoliciesPanel({ focused }) {
9025
9015
  /* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: ` ${rules.length} rules` }),
9026
9016
  dirtyTag
9027
9017
  ] }),
9028
- /* @__PURE__ */ jsx3(Text3, { color: theme.dim, wrap: "truncate", children: `\u2191\u2193 \xB7 enter edit \xB7 space on/off \xB7 e effect \xB7 n new \xB7 d del \xB7 m mode \xB7 D dry-run \xB7 ^D playground \xB7 s save \xB7 \u2190 back${rAbove ? ` \xB7 \u25B2${rAbove}` : ""}${rBelow ? ` \xB7 \u25BC${rBelow}` : ""}` }),
9018
+ /* @__PURE__ */ jsx3(Text3, { color: theme.dim, wrap: "truncate", children: `\u2191\u2193 \xB7 enter edit \xB7 space on/off \xB7 e effect \xB7 n new \xB7 d del \xB7 m mode \xB7 D dry-run \xB7 s save \xB7 \u2190 back${rAbove ? ` \xB7 \u25B2${rAbove}` : ""}${rBelow ? ` \xB7 \u25BC${rBelow}` : ""}` }),
9029
9019
  /* @__PURE__ */ jsx3(Box3, { marginTop: 1, children: /* @__PURE__ */ jsx3(
9030
9020
  Table,
9031
9021
  {
@@ -11130,6 +11120,26 @@ function LiveHint() {
11130
11120
  ] }) })
11131
11121
  ] });
11132
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
+ }
11133
11143
  function Banner({ cols }) {
11134
11144
  const wide = cols >= 82;
11135
11145
  if (!wide) {
@@ -11287,6 +11297,7 @@ var init_App = __esm({
11287
11297
  init_Settings();
11288
11298
  init_hooks();
11289
11299
  init_client();
11300
+ init_device_login();
11290
11301
  init_api_client();
11291
11302
  init_self_update();
11292
11303
  SECTIONS = [
@@ -11294,6 +11305,7 @@ var init_App = __esm({
11294
11305
  { label: "Policies", Panel: PoliciesPanel },
11295
11306
  { label: "Rate Limit", Panel: RateLimitPanel },
11296
11307
  { label: "DLP", Panel: DlpPanel },
11308
+ { label: "Dry Run", Panel: DryRunPanel },
11297
11309
  { label: "Audit", Panel: AuditPanel },
11298
11310
  { label: "Settings", Panel: SettingsPanel }
11299
11311
  ];
package/dist/tui/index.js CHANGED
@@ -2032,13 +2032,6 @@ function PoliciesPanel({ focused }) {
2032
2032
  return;
2033
2033
  }
2034
2034
  if (view === "rules") {
2035
- if (key.ctrl && input === "d") {
2036
- if (selected) {
2037
- openBrowser(`${DASHBOARD_URL}/playground?policy=${encodeURIComponent(selected.id)}`);
2038
- setStatus("Opened the dry-run playground in your browser.");
2039
- }
2040
- return;
2041
- }
2042
2035
  if (key.leftArrow) return setView("list"), void setStatus(null);
2043
2036
  if (key.upArrow) setRi((n) => Math.max(0, n - 1));
2044
2037
  else if (key.downArrow) setRi((n) => Math.min(rules.length - 1, n + 1));
@@ -2066,13 +2059,10 @@ function PoliciesPanel({ focused }) {
2066
2059
  setFi(0);
2067
2060
  setView("rule");
2068
2061
  } else if (input === "D") {
2069
- setStatus("Dry-running\u2026");
2070
- void api.policies.dryRun({ rules, mode }).then((res) => setStatus(
2071
- `dry-run: replayed ${res.evaluated} recent calls against ${rules.length} rules
2072
- would allow ${res.would_allow} would deny ${res.would_deny}
2073
- newly allowed ${res.newly_allowed} newly blocked ${res.newly_blocked} unchanged ${res.unchanged}` + (res.sample_newly_blocked?.length ? `
2074
- now blocked e.g.: ${res.sample_newly_blocked.slice(0, 3).map((s) => truncate(s.tool, 24)).join(", ")}` : "")
2075
- )).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
+ }
2076
2066
  } else if (input === "s") void save();
2077
2067
  else if (input === "x") discard();
2078
2068
  return;
@@ -2151,7 +2141,7 @@ function PoliciesPanel({ focused }) {
2151
2141
  /* @__PURE__ */ jsx3(Text3, { color: theme.dim, children: ` ${rules.length} rules` }),
2152
2142
  dirtyTag
2153
2143
  ] }),
2154
- /* @__PURE__ */ jsx3(Text3, { color: theme.dim, wrap: "truncate", children: `\u2191\u2193 \xB7 enter edit \xB7 space on/off \xB7 e effect \xB7 n new \xB7 d del \xB7 m mode \xB7 D dry-run \xB7 ^D playground \xB7 s save \xB7 \u2190 back${rAbove ? ` \xB7 \u25B2${rAbove}` : ""}${rBelow ? ` \xB7 \u25BC${rBelow}` : ""}` }),
2144
+ /* @__PURE__ */ jsx3(Text3, { color: theme.dim, wrap: "truncate", children: `\u2191\u2193 \xB7 enter edit \xB7 space on/off \xB7 e effect \xB7 n new \xB7 d del \xB7 m mode \xB7 D dry-run \xB7 s save \xB7 \u2190 back${rAbove ? ` \xB7 \u25B2${rAbove}` : ""}${rBelow ? ` \xB7 \u25BC${rBelow}` : ""}` }),
2155
2145
  /* @__PURE__ */ jsx3(Box3, { marginTop: 1, children: /* @__PURE__ */ jsx3(
2156
2146
  Table,
2157
2147
  {
@@ -4352,11 +4342,32 @@ function LiveHint() {
4352
4342
  ] }) })
4353
4343
  ] });
4354
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
+ }
4355
4365
  var SECTIONS = [
4356
4366
  { label: "Live", Panel: LiveHint },
4357
4367
  { label: "Policies", Panel: PoliciesPanel },
4358
4368
  { label: "Rate Limit", Panel: RateLimitPanel },
4359
4369
  { label: "DLP", Panel: DlpPanel },
4370
+ { label: "Dry Run", Panel: DryRunPanel },
4360
4371
  { label: "Audit", Panel: AuditPanel },
4361
4372
  { label: "Settings", Panel: SettingsPanel }
4362
4373
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.82.30",
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": {