@solongate/proxy 0.57.0 → 0.59.0

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/README.md CHANGED
@@ -1,68 +1,78 @@
1
- # @solongate/proxy
2
-
3
- > **Don't `npm i` this.** There's nothing to install. Run the two commands below to pair your machine:
4
- > ```bash
5
- > npx -y @solongate/proxy@latest
6
- > npx -y @solongate/proxy@latest login
7
- > ```
8
-
9
- **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.
10
-
11
- ```
12
- AI agent ──(tool call)──> SolonGate guard ──> Tool runs
13
-
14
- [policy eval] ← OPA-WASM, fail-closed
15
- [prompt-injection scan]
16
- [allow / block / audit]
17
- ```
18
-
19
- SolonGate is fully managed — nothing to host. Pair your machine with one command and manage policies + audit logs at [dashboard.solongate.com](https://dashboard.solongate.com).
20
-
21
- ---
22
-
23
- ## Quick start
24
-
25
- **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).
26
-
27
- Pair the machine and turn on the guard — no API keys to copy. First fetch SolonGate, then log in:
28
-
29
- ```bash
30
- npx -y @solongate/proxy@latest
31
- npx -y @solongate/proxy@latest login
32
- ```
33
-
34
- 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.
35
-
36
- > Start a **new** terminal session afterwards — hooks load when a session starts, so already-open terminals aren't guarded yet.
37
-
38
- ## Write a policy
39
-
40
- 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:
41
-
42
- - **Denylist** everything is allowed except what you block (e.g. deny any file named `*.env`, or commands matching `*rm -rf*`).
43
- - **Whitelist** — nothing is allowed except what you permit.
44
-
45
- 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.
46
-
47
- ## Review the audit log
48
-
49
- 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**.
50
-
51
- ## Uninstall
52
-
53
- ```bash
54
- npx @solongate/proxy logout
55
- ```
56
-
57
- ---
58
-
59
- ## Why SolonGate?
60
-
61
- 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.
62
-
63
- - **Docs:** [solongate.com/docs](https://solongate.com/docs)
64
- - **Dashboard:** [dashboard.solongate.com](https://dashboard.solongate.com)
65
-
66
- ## License
67
-
68
- MIT
1
+ # @solongate/proxy
2
+
3
+ > **Don't `npm i` this.** There's nothing to import. Run the two commands below to pair your machine:
4
+ > ```bash
5
+ > npx -y @solongate/proxy@latest
6
+ > npx -y @solongate/proxy@latest login
7
+ > ```
8
+
9
+ **Security for AI agents.** SolonGate checks every action an AI agent takes. Each tool call (shell command, file read or write, network request) is allowed, blocked, or logged before it runs, based on a policy you control. No code changes.
10
+
11
+ ```
12
+ AI agent ──(tool call)──> SolonGate guard ──> Tool runs
13
+
14
+ [ policy check ]
15
+ [ allow / block / log ]
16
+ ```
17
+
18
+ SolonGate is fully managed. There is nothing to host: pair your machine with one command, then manage policies and review logs at [dashboard.solongate.com](https://dashboard.solongate.com).
19
+
20
+ ## Quick start
21
+
22
+ **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).
23
+
24
+ Pair the machine and turn on the guard. There are no API keys to copy. First fetch SolonGate, then log in:
25
+
26
+ ```bash
27
+ npx -y @solongate/proxy@latest
28
+ npx -y @solongate/proxy@latest login
29
+ ```
30
+
31
+ This 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 checks it against your active policy.
32
+
33
+ > Start a **new** terminal session afterwards. Hooks load when a session starts, so already-open terminals aren't guarded yet.
34
+
35
+ ## Write a policy
36
+
37
+ 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, or URL) and is either ALLOW or DENY. Two modes:
38
+
39
+ - **Denylist:** everything is allowed except what you block (for example, deny any file named `*.env`, or commands matching `*rm -rf*`).
40
+ - **Whitelist:** nothing is allowed except what you permit.
41
+
42
+ Click **Activate** to make a policy the one the guard enforces. It takes effect on the next tool call.
43
+
44
+ ## What SolonGate can enforce
45
+
46
+ - **Policy rules:** allow or block tool calls by path, command, filename, or URL.
47
+ - **Ghost paths:** make chosen files and folders invisible to the agent. They don't show up in listings and can't be read.
48
+ - **Data loss prevention (DLP):** if a call contains a secret (API key, token, private key), block it, or hide the secret in the output the model sees.
49
+ - **Rate limiting:** cap how many tool calls an agent can make per minute, hour, or day.
50
+
51
+ ## Review the audit log
52
+
53
+ Every decision shows up under **Audit**: what was allowed, what was blocked, and which rule matched. Each agent run is also grouped as a **session** with its own timeline. When a legitimate action is blocked, open the entry and click **Whitelist this**: SolonGate adds a narrow ALLOW exception for exactly that action. Revoke any exception from **Granted exceptions**.
54
+
55
+ ## Keep logs on your own machine
56
+
57
+ Prefer to keep everything local? In **Settings**, turn on **Local log storage** and pick a folder. Every decision is written there as a JSON line, and nothing is sent to SolonGate cloud.
58
+
59
+ ## Get alerted
60
+
61
+ Set a threshold in **Settings** and SolonGate notifies you by Telegram, email, or webhook when blocks spike.
62
+
63
+ ## Uninstall
64
+
65
+ ```bash
66
+ npx @solongate/proxy logout
67
+ ```
68
+
69
+ ## Why SolonGate?
70
+
71
+ AI agents get direct access to your system: shell, file system, databases, network. SolonGate sits between the agent and the action, enforcing your policy on every tool call before it runs, and recording every decision for audit.
72
+
73
+ - **Docs:** [solongate.com/docs](https://solongate.com/docs)
74
+ - **Dashboard:** [dashboard.solongate.com](https://dashboard.solongate.com)
75
+
76
+ ## License
77
+
78
+ MIT
File without changes
package/dist/create.js CHANGED
File without changes
@@ -232,7 +232,7 @@ async function runGlobalInstall(opts = {}) {
232
232
  writeFileSync(join(p.hooksDir, "stop.mjs"), readHook("stop.mjs"));
233
233
  writeFileSync(join(p.hooksDir, "shield.mjs"), readHook("shield.mjs"));
234
234
  console.log(` Installed hooks \u2192 ${p.hooksDir}`);
235
- installClaudeShim(join(p.hooksDir, "shield.mjs"));
235
+ removeClaudeShim();
236
236
  writeFileSync(p.configPath, JSON.stringify({ apiKey, apiUrl }, null, 2) + "\n");
237
237
  console.log(` Wrote ${p.configPath}`);
238
238
  let existing = {};