@solongate/proxy 0.83.58 → 0.83.59
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/hooks/conversation.mjs +21 -15
- package/package.json +7 -7
package/hooks/conversation.mjs
CHANGED
|
@@ -16,12 +16,10 @@
|
|
|
16
16
|
* UserPromptSubmit → user_input what the person typed
|
|
17
17
|
* Stop → last_assistant_message what the agent said back
|
|
18
18
|
*
|
|
19
|
-
* WHAT IS SENT, AND WHEN NOTHING IS.
|
|
19
|
+
* WHAT IS SENT, AND WHEN NOTHING IS. Two gates, cheapest first:
|
|
20
20
|
*
|
|
21
21
|
* 1. No credential → nothing. The same rule every hook here follows.
|
|
22
|
-
* 2.
|
|
23
|
-
* on their machine has asked about this more than about anything else.
|
|
24
|
-
* 3. Not in a fleet → the SERVER drops it. This hook cannot know whether a
|
|
22
|
+
* 2. Not in a fleet → the SERVER drops it. This hook cannot know whether a
|
|
25
23
|
* grant exists, and asking would be a round trip before every send; the
|
|
26
24
|
* API answers 204 and the row is never written. That check is on the
|
|
27
25
|
* server deliberately: a check that lived here would live on the machine
|
|
@@ -43,7 +41,7 @@ import { resolve } from 'node:path';
|
|
|
43
41
|
import { homedir } from 'node:os';
|
|
44
42
|
|
|
45
43
|
// Bump on every change to this file, alongside the other hooks.
|
|
46
|
-
const HOOK_VERSION =
|
|
44
|
+
const HOOK_VERSION = 3;
|
|
47
45
|
|
|
48
46
|
const AGENT_ID = (process.env.SOLONGATE_AGENT_ID || process.argv[2] || 'default').replace(/[^a-zA-Z0-9_-]/g, '_');
|
|
49
47
|
|
|
@@ -108,14 +106,24 @@ function redact(text, cache) {
|
|
|
108
106
|
return { text: out, masked };
|
|
109
107
|
}
|
|
110
108
|
|
|
111
|
-
//
|
|
112
|
-
//
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
109
|
+
// There is no local-logs gate here any more, and its absence is deliberate.
|
|
110
|
+
//
|
|
111
|
+
// It read the local-log setting and sent nothing when it looked on — which it
|
|
112
|
+
// did for anybody who had ever typed a folder into that field, because the
|
|
113
|
+
// predicate counted the PATH as well as the switch and the path survives
|
|
114
|
+
// turning the feature off. So the record was silently empty on accounts whose
|
|
115
|
+
// settings said local logging was off, with nothing anywhere to say so.
|
|
116
|
+
//
|
|
117
|
+
// Fixing the predicate was the small answer. The gate itself is the wrong idea:
|
|
118
|
+
// this record exists ONLY for a machine in a fleet, where a host is answerable
|
|
119
|
+
// for what runs there, and a setting on the guest's own machine that switches
|
|
120
|
+
// off the host's view of it is a self-disarm — the exact shape this product
|
|
121
|
+
// exists to prevent everywhere else. Local logging decides where a machine
|
|
122
|
+
// keeps its OWN copy; it was never a claim on somebody else's record.
|
|
123
|
+
//
|
|
124
|
+
// What still applies is unchanged and is what actually protects people: no
|
|
125
|
+
// credential, nothing sent; no accepted grant, the server drops it; and secrets
|
|
126
|
+
// are removed before the text leaves the machine.
|
|
119
127
|
|
|
120
128
|
function readStdin() {
|
|
121
129
|
try { return readFileSync(0, 'utf-8'); } catch { return ''; }
|
|
@@ -131,8 +139,6 @@ async function send(sessionId, role, body, agentName) {
|
|
|
131
139
|
if (!apiKey) return;
|
|
132
140
|
|
|
133
141
|
const cache = loadPolicyCache();
|
|
134
|
-
if (localLogsOn(cache)) return;
|
|
135
|
-
|
|
136
142
|
const cleaned = redact(body, cache);
|
|
137
143
|
try {
|
|
138
144
|
await fetch(`${apiUrl}/api/v1/conversations`, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.83.
|
|
3
|
+
"version": "0.83.59",
|
|
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": {
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"node": ">=20.0.0"
|
|
62
62
|
},
|
|
63
63
|
"optionalDependencies": {
|
|
64
|
-
"@solongate/guard-linux-x64": "0.83.
|
|
65
|
-
"@solongate/guard-linux-arm64": "0.83.
|
|
66
|
-
"@solongate/guard-darwin-x64": "0.83.
|
|
67
|
-
"@solongate/guard-darwin-arm64": "0.83.
|
|
68
|
-
"@solongate/guard-win32-x64": "0.83.
|
|
69
|
-
"@solongate/guard-win32-arm64": "0.83.
|
|
64
|
+
"@solongate/guard-linux-x64": "0.83.59",
|
|
65
|
+
"@solongate/guard-linux-arm64": "0.83.59",
|
|
66
|
+
"@solongate/guard-darwin-x64": "0.83.59",
|
|
67
|
+
"@solongate/guard-darwin-arm64": "0.83.59",
|
|
68
|
+
"@solongate/guard-win32-x64": "0.83.59",
|
|
69
|
+
"@solongate/guard-win32-arm64": "0.83.59"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@modelcontextprotocol/sdk": "^1.26.0",
|