@solongate/proxy 0.82.39 → 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.
@@ -4,4 +4,4 @@
4
4
  */
5
5
  export declare function runCommand(command: string, argv: string[]): Promise<number>;
6
6
  /** The subcommand names this router owns (used by src/index.ts to route). */
7
- export declare const COMMAND_NAMES: readonly ["policy", "ratelimit", "dlp", "stats", "audit", "agents", "agent", "doctor", "watch", "alerts", "webhooks"];
7
+ export declare const COMMAND_NAMES: readonly ["policy", "ratelimit", "dlp", "stats", "audit", "sessions", "session", "doctor", "watch", "alerts", "webhooks"];
@@ -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> --tool <p> [--command|--path|--url <val>]", "append an ALLOW rule"],
528
- ["policy deny <id> --tool <p> [--command|--path|--url <val>]", "append a DENY rule"],
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> --tool <pattern> [--command|--path|--url <val>]`), 1;
580
- const toolPattern = flagStr(flags, "tool") ?? "*";
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", "TOOL", "ID", "DESCRIPTION"],
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
  ])
@@ -963,7 +962,7 @@ async function runAgents(argv) {
963
962
  const res = await api.agents.live({ limit: flagNum(flags, "limit"), includeDeactivated: flagBool(flags, "all") });
964
963
  if (json) return printJson(res), 0;
965
964
  err("");
966
- err(` Agents ${green(String(res.counts.active))} active ${yellow(String(res.counts.idle))} idle ${dim(String(res.counts.deactivated) + " off")}`);
965
+ err(` Sessions ${green(String(res.counts.active))} active ${yellow(String(res.counts.idle))} idle ${dim(String(res.counts.deactivated) + " off")}`);
967
966
  if (!res.agents.length) return err(dim(" No agent sessions.")), 0;
968
967
  table(
969
968
  ["STATUS", "AGENT", "CALLS", "DENY", "DLP", "TRUST", "CHARACTER"],
@@ -983,7 +982,7 @@ async function runAgent(argv) {
983
982
  const { positionals, flags } = parse(argv);
984
983
  const json = flagBool(flags, "json");
985
984
  const id = positionals[0];
986
- if (!id) return err(" Usage: solongate agent <agent_id> [--json]"), 1;
985
+ if (!id) return err(" Usage: solongate session <id> [--json]"), 1;
987
986
  const a = await api.agents.get(id);
988
987
  if (json) return printJson(a), 0;
989
988
  err("");
@@ -1286,9 +1285,9 @@ async function dispatch(command, argv) {
1286
1285
  return run4(argv);
1287
1286
  case "audit":
1288
1287
  return run5(argv);
1289
- case "agents":
1288
+ case "sessions":
1290
1289
  return runAgents(argv);
1291
- case "agent":
1290
+ case "session":
1292
1291
  return runAgent(argv);
1293
1292
  case "doctor":
1294
1293
  return run6(argv);
@@ -1320,7 +1319,7 @@ async function runCommand(command, argv) {
1320
1319
  return 1;
1321
1320
  }
1322
1321
  }
1323
- var COMMAND_NAMES = ["policy", "ratelimit", "dlp", "stats", "audit", "agents", "agent", "doctor", "watch", "alerts", "webhooks"];
1322
+ var COMMAND_NAMES = ["policy", "ratelimit", "dlp", "stats", "audit", "sessions", "session", "doctor", "watch", "alerts", "webhooks"];
1324
1323
  export {
1325
1324
  COMMAND_NAMES,
1326
1325
  runCommand