@solongate/proxy 0.82.18 → 0.82.19

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.
Files changed (2) hide show
  1. package/dist/index.js +64 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -13964,6 +13964,9 @@ var init_pull_push = __esm({
13964
13964
 
13965
13965
  // src/index.ts
13966
13966
  init_config();
13967
+ import { readFileSync as readFileSync15 } from "fs";
13968
+ import { fileURLToPath as fileURLToPath4 } from "url";
13969
+ import { dirname as dirname4, join as join17 } from "path";
13967
13970
 
13968
13971
  // src/proxy.ts
13969
13972
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -16987,7 +16990,8 @@ ${msg.content.text}`;
16987
16990
  // src/index.ts
16988
16991
  init_cli_utils();
16989
16992
  var CLI_SUBCOMMANDS = /* @__PURE__ */ new Set(["shield", "create", "inject", "pull", "push", "list", "ls", "logs-server", "local-logs", "policy", "ratelimit", "dlp", "stats", "audit", "agents", "agent", "doctor", "watch", "keys", "mcp", "alerts", "webhooks", "dataroom"]);
16990
- var IS_HUMAN_CLI = process.argv.length <= 2 || CLI_SUBCOMMANDS.has(process.argv[2] ?? "");
16993
+ var CLI_INFO_ARGS = /* @__PURE__ */ new Set(["login", "help", "--help", "-h", "--version", "-v", "version"]);
16994
+ var IS_HUMAN_CLI = process.argv.length <= 2 || CLI_SUBCOMMANDS.has(process.argv[2] ?? "") || CLI_INFO_ARGS.has(process.argv[2] ?? "");
16991
16995
  if (!IS_HUMAN_CLI) {
16992
16996
  console.log = (...args) => {
16993
16997
  process.stderr.write(`[SolonGate] ${args.map(String).join(" ")}
@@ -17002,24 +17006,76 @@ if (!IS_HUMAN_CLI) {
17002
17006
  `);
17003
17007
  };
17004
17008
  }
17009
+ var PKG_VERSION = (() => {
17010
+ try {
17011
+ const p = join17(dirname4(fileURLToPath4(import.meta.url)), "..", "package.json");
17012
+ return JSON.parse(readFileSync15(p, "utf-8")).version || "unknown";
17013
+ } catch {
17014
+ return "unknown";
17015
+ }
17016
+ })();
17005
17017
  function printWelcome() {
17006
17018
  console.log("");
17007
- console.log(` ${c.bold}${c.blue4}SolonGate${c.reset} ${c.dim}\u2014 secure gateway for your AI agents${c.reset}`);
17019
+ console.log(` ${c.bold}${c.blue4}SolonGate${c.reset} ${c.dim}secure gateway for your AI agents${c.reset}`);
17008
17020
  console.log("");
17009
17021
  console.log(" Get started with one command:");
17010
17022
  console.log("");
17011
- console.log(` ${c.cyan}solongate${c.reset}`);
17023
+ console.log(` ${c.cyan}solongate${c.reset} ${c.dim}open the dataroom (login, policies, audit, settings)${c.reset}`);
17024
+ console.log(` ${c.cyan}solongate --help${c.reset} ${c.dim}list every command${c.reset}`);
17012
17025
  console.log("");
17013
- console.log(` ${c.dim}This opens the dataroom; log in from the Accounts panel to pair this${c.reset}`);
17014
- console.log(` ${c.dim}device and protect every Claude Code session with your cloud policy.${c.reset}`);
17026
+ console.log(` ${c.dim}Open the dataroom, log in from the Accounts panel to pair this${c.reset}`);
17027
+ console.log(` ${c.dim}device, then the guard protects every AI session with your policy.${c.reset}`);
17015
17028
  console.log(` ${c.dim}Manage it at ${c.reset}${c.cyan}https://dashboard.solongate.com${c.reset}`);
17016
17029
  console.log("");
17017
- console.log(` ${c.dim}Using local log storage? Show it live in the dashboard with${c.reset}`);
17018
- console.log(` ${c.cyan}solongate logs-server${c.reset}`);
17030
+ }
17031
+ function printHelp3() {
17032
+ const row = (name, desc) => console.log(` ${c.cyan}${name.padEnd(13)}${c.reset}${c.dim}${desc}${c.reset}`);
17033
+ console.log("");
17034
+ console.log(` ${c.bold}${c.blue4}SolonGate${c.reset} ${c.dim}secure gateway for your AI agents${c.reset}`);
17035
+ console.log("");
17036
+ console.log(` ${c.dim}Usage:${c.reset} ${c.cyan}solongate${c.reset} ${c.dim}[command]${c.reset}`);
17037
+ console.log(` ${c.dim}With no command, opens the dataroom: accounts, policies, rate limits,${c.reset}`);
17038
+ console.log(` ${c.dim}DLP, audit and settings in one terminal UI.${c.reset}`);
17039
+ console.log("");
17040
+ console.log(` ${c.bold}Setup & status${c.reset}`);
17041
+ row("doctor", "health check: login, active policy, guard, local logs");
17042
+ row("create", "scaffold a guarded MCP server in the current folder");
17043
+ row("logs-server", "serve local audit logs to the dashboard");
17044
+ console.log("");
17045
+ console.log(` ${c.bold}Security config${c.reset}`);
17046
+ row("policy", "view and manage policies");
17047
+ row("ratelimit", "view and manage rate limits");
17048
+ row("dlp", "view and manage DLP (secret) rules");
17049
+ row("alerts", "view and manage alerts");
17050
+ row("webhooks", "view and manage webhooks");
17051
+ console.log("");
17052
+ console.log(` ${c.bold}Monitoring${c.reset}`);
17053
+ row("audit", "browse the audit log of tool-call decisions");
17054
+ row("stats", "usage statistics");
17055
+ row("watch", "live-tail tool calls as they happen");
17056
+ row("agents", "list agents and sessions");
17057
+ console.log("");
17058
+ console.log(` ${c.bold}Advanced${c.reset}`);
17059
+ row("keys", "manage API keys");
17060
+ row("mcp", "manage MCP servers");
17061
+ row("shield", "wrap a command with LLM-path secret redaction: shield -- <cmd>");
17062
+ row("pull", "pull a cloud policy to a local file");
17063
+ row("push", "push a local policy file to the cloud");
17064
+ row("list", "list cloud policies");
17065
+ console.log("");
17066
+ console.log(` ${c.dim}Dashboard: ${c.reset}${c.cyan}https://dashboard.solongate.com${c.reset}`);
17019
17067
  console.log("");
17020
17068
  }
17021
17069
  async function main4() {
17022
17070
  const subcommand = process.argv[2];
17071
+ if (subcommand === "--help" || subcommand === "-h" || subcommand === "help") {
17072
+ printHelp3();
17073
+ return;
17074
+ }
17075
+ if (subcommand === "--version" || subcommand === "-v" || subcommand === "version") {
17076
+ console.log(PKG_VERSION);
17077
+ return;
17078
+ }
17023
17079
  if (IS_HUMAN_CLI) {
17024
17080
  const tuiBound = subcommand === "dataroom" || process.argv.length <= 2 && process.stdout.isTTY && process.stdin.isTTY;
17025
17081
  if (!tuiBound) {
@@ -17054,7 +17110,7 @@ async function main4() {
17054
17110
  if (subcommand === "login") {
17055
17111
  console.log("");
17056
17112
  console.log(` ${c.dim}\`solongate login\` was removed.${c.reset} Run ${c.cyan}solongate${c.reset} and add your`);
17057
- console.log(` account from the Accounts panel \u2014 the guard installs and updates from there.`);
17113
+ console.log(` account from the Accounts panel. The guard installs and updates from there.`);
17058
17114
  console.log("");
17059
17115
  return;
17060
17116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.82.18",
3
+ "version": "0.82.19",
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": {