@solongate/proxy 0.82.40 → 0.82.41
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/commands/index.js +5 -6
- package/dist/index.js +9 -12
- package/dist/tui/index.js +2 -4
- package/package.json +1 -1
package/dist/commands/index.js
CHANGED
|
@@ -524,8 +524,8 @@ function flagBool(flags, name) {
|
|
|
524
524
|
var USAGE = usage("solongate policy", "manage cloud policies", [
|
|
525
525
|
["policy list", "list all policies"],
|
|
526
526
|
["policy show <id>", "show one policy (rules, mode)"],
|
|
527
|
-
["policy allow <id>
|
|
528
|
-
["policy deny <id>
|
|
527
|
+
["policy allow <id> [--command|--path|--url <val>]", "append an ALLOW rule"],
|
|
528
|
+
["policy deny <id> [--command|--path|--url <val>]", "append a DENY rule"],
|
|
529
529
|
["policy revoke <id> <ruleId>", "remove a rule"],
|
|
530
530
|
["policy active", "show the resolved active policy"],
|
|
531
531
|
["policy activate <id> | --clear", "pin / unpin the active policy"],
|
|
@@ -576,8 +576,8 @@ async function run(argv) {
|
|
|
576
576
|
case "deny": {
|
|
577
577
|
const effect = sub === "allow" ? "ALLOW" : "DENY";
|
|
578
578
|
const id = positionals[1];
|
|
579
|
-
if (!id) return err(` Usage: policy ${sub} <id>
|
|
580
|
-
const toolPattern =
|
|
579
|
+
if (!id) return err(` Usage: policy ${sub} <id> [--command|--path|--url <val>]`), 1;
|
|
580
|
+
const toolPattern = "*";
|
|
581
581
|
let kind = "tool";
|
|
582
582
|
let value;
|
|
583
583
|
for (const k of ["command", "path", "url"]) {
|
|
@@ -660,11 +660,10 @@ async function run(argv) {
|
|
|
660
660
|
function printRules(rules) {
|
|
661
661
|
if (rules.length === 0) return void err(dim(" (no rules)"));
|
|
662
662
|
table(
|
|
663
|
-
["EFFECT", "PRIO", "
|
|
663
|
+
["EFFECT", "PRIO", "ID", "DESCRIPTION"],
|
|
664
664
|
rules.map((r) => [
|
|
665
665
|
r.effect === "ALLOW" ? green("ALLOW") : decisionColor("DENY"),
|
|
666
666
|
String(r.priority),
|
|
667
|
-
cyan(truncate(r.toolPattern, 24)),
|
|
668
667
|
dim(r.id),
|
|
669
668
|
truncate(r.description || "-", 40)
|
|
670
669
|
])
|
package/dist/index.js
CHANGED
|
@@ -8893,8 +8893,7 @@ function PoliciesPanel({ focused }) {
|
|
|
8893
8893
|
{ header: "ON", width: 2 },
|
|
8894
8894
|
{ header: "EFFECT", width: 7 },
|
|
8895
8895
|
{ header: "PRIO", width: 4 },
|
|
8896
|
-
{ header: "
|
|
8897
|
-
{ header: "DESCRIPTION", width: 30 },
|
|
8896
|
+
{ header: "DESCRIPTION", width: 38 },
|
|
8898
8897
|
{ header: "CONSTRAINTS", width: 14 }
|
|
8899
8898
|
],
|
|
8900
8899
|
rows: rWin.map((r, wi) => {
|
|
@@ -8904,8 +8903,7 @@ function PoliciesPanel({ focused }) {
|
|
|
8904
8903
|
{ value: r.enabled ? "\u25CF" : "\u25CB", color: r.enabled ? theme.ok : theme.dim },
|
|
8905
8904
|
{ value: r.effect, color: r.effect === "ALLOW" ? theme.ok : theme.bad, dim: !r.enabled },
|
|
8906
8905
|
{ value: String(r.priority), dim: true },
|
|
8907
|
-
{ value: truncate2(r.
|
|
8908
|
-
{ value: truncate2(r.description || "-", 30), dim: !r.enabled },
|
|
8906
|
+
{ value: truncate2(r.description || "-", 38), dim: !r.enabled },
|
|
8909
8907
|
{ value: ruleSummary(r) || "-", dim: true }
|
|
8910
8908
|
];
|
|
8911
8909
|
})
|
|
@@ -11400,8 +11398,8 @@ async function run(argv) {
|
|
|
11400
11398
|
case "deny": {
|
|
11401
11399
|
const effect = sub === "allow" ? "ALLOW" : "DENY";
|
|
11402
11400
|
const id = positionals[1];
|
|
11403
|
-
if (!id) return err(` Usage: policy ${sub} <id>
|
|
11404
|
-
const toolPattern =
|
|
11401
|
+
if (!id) return err(` Usage: policy ${sub} <id> [--command|--path|--url <val>]`), 1;
|
|
11402
|
+
const toolPattern = "*";
|
|
11405
11403
|
let kind = "tool";
|
|
11406
11404
|
let value;
|
|
11407
11405
|
for (const k of ["command", "path", "url"]) {
|
|
@@ -11484,11 +11482,10 @@ async function run(argv) {
|
|
|
11484
11482
|
function printRules(rules) {
|
|
11485
11483
|
if (rules.length === 0) return void err(dim(" (no rules)"));
|
|
11486
11484
|
table(
|
|
11487
|
-
["EFFECT", "PRIO", "
|
|
11485
|
+
["EFFECT", "PRIO", "ID", "DESCRIPTION"],
|
|
11488
11486
|
rules.map((r) => [
|
|
11489
11487
|
r.effect === "ALLOW" ? green("ALLOW") : decisionColor2("DENY"),
|
|
11490
11488
|
String(r.priority),
|
|
11491
|
-
cyan(truncate3(r.toolPattern, 24)),
|
|
11492
11489
|
dim(r.id),
|
|
11493
11490
|
truncate3(r.description || "-", 40)
|
|
11494
11491
|
])
|
|
@@ -11512,8 +11509,8 @@ var init_policy = __esm({
|
|
|
11512
11509
|
USAGE = usage("solongate policy", "manage cloud policies", [
|
|
11513
11510
|
["policy list", "list all policies"],
|
|
11514
11511
|
["policy show <id>", "show one policy (rules, mode)"],
|
|
11515
|
-
["policy allow <id>
|
|
11516
|
-
["policy deny <id>
|
|
11512
|
+
["policy allow <id> [--command|--path|--url <val>]", "append an ALLOW rule"],
|
|
11513
|
+
["policy deny <id> [--command|--path|--url <val>]", "append a DENY rule"],
|
|
11517
11514
|
["policy revoke <id> <ruleId>", "remove a rule"],
|
|
11518
11515
|
["policy active", "show the resolved active policy"],
|
|
11519
11516
|
["policy activate <id> | --clear", "pin / unpin the active policy"],
|
|
@@ -15916,8 +15913,8 @@ function printHelp() {
|
|
|
15916
15913
|
head("Policies");
|
|
15917
15914
|
cmd("policy list", "list all policies");
|
|
15918
15915
|
cmd("policy show <id>", "show one policy (rules, mode)");
|
|
15919
|
-
cmd("policy allow <id>
|
|
15920
|
-
cmd("policy deny <id>
|
|
15916
|
+
cmd("policy allow <id> [--command|--path|--url <val>]", "add an ALLOW rule");
|
|
15917
|
+
cmd("policy deny <id> [--command|--path|--url <val>]", "add a DENY rule");
|
|
15921
15918
|
cmd("policy revoke <id> <ruleId>", "remove a rule");
|
|
15922
15919
|
cmd("policy activate <id> | --clear", "pin / unpin the active policy");
|
|
15923
15920
|
cmd("policy active", "show the resolved active policy");
|
package/dist/tui/index.js
CHANGED
|
@@ -2359,8 +2359,7 @@ function PoliciesPanel({ focused }) {
|
|
|
2359
2359
|
{ header: "ON", width: 2 },
|
|
2360
2360
|
{ header: "EFFECT", width: 7 },
|
|
2361
2361
|
{ header: "PRIO", width: 4 },
|
|
2362
|
-
{ header: "
|
|
2363
|
-
{ header: "DESCRIPTION", width: 30 },
|
|
2362
|
+
{ header: "DESCRIPTION", width: 38 },
|
|
2364
2363
|
{ header: "CONSTRAINTS", width: 14 }
|
|
2365
2364
|
],
|
|
2366
2365
|
rows: rWin.map((r, wi) => {
|
|
@@ -2370,8 +2369,7 @@ function PoliciesPanel({ focused }) {
|
|
|
2370
2369
|
{ value: r.enabled ? "\u25CF" : "\u25CB", color: r.enabled ? theme.ok : theme.dim },
|
|
2371
2370
|
{ value: r.effect, color: r.effect === "ALLOW" ? theme.ok : theme.bad, dim: !r.enabled },
|
|
2372
2371
|
{ value: String(r.priority), dim: true },
|
|
2373
|
-
{ value: truncate(r.
|
|
2374
|
-
{ value: truncate(r.description || "-", 30), dim: !r.enabled },
|
|
2372
|
+
{ value: truncate(r.description || "-", 38), dim: !r.enabled },
|
|
2375
2373
|
{ value: ruleSummary(r) || "-", dim: true }
|
|
2376
2374
|
];
|
|
2377
2375
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.82.
|
|
3
|
+
"version": "0.82.41",
|
|
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": {
|