@solongate/proxy 0.82.43 → 0.82.45
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/dist/index.js +47 -1
- package/dist/logs-server.js +4 -1
- package/dist/tui/index.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6909,7 +6909,10 @@ function startLogsServerDaemon() {
|
|
|
6909
6909
|
const p = spawn2(process.execPath, [cli, "logs-server"], {
|
|
6910
6910
|
detached: true,
|
|
6911
6911
|
stdio: ["ignore", log3, log3],
|
|
6912
|
-
windowsHide: true
|
|
6912
|
+
windowsHide: true,
|
|
6913
|
+
// Spawned by US, not by an agent: exempt from the human-only TTY gate
|
|
6914
|
+
// (a detached daemon has no terminal by definition).
|
|
6915
|
+
env: { ...process.env, SOLONGATE_INTERNAL: "1" }
|
|
6913
6916
|
});
|
|
6914
6917
|
p.on("error", () => {
|
|
6915
6918
|
});
|
|
@@ -16164,8 +16167,51 @@ function printHelp() {
|
|
|
16164
16167
|
console.log(` ${c.dim}Details for a command: ${c.reset}${c.cyan}solongate <command> help${c.reset}${c.dim} \xB7 Dashboard: ${c.reset}${c.cyan}https://dashboard.solongate.com${c.reset}`);
|
|
16165
16168
|
console.log("");
|
|
16166
16169
|
}
|
|
16170
|
+
var AGENT_ENV_PREFIXES = [
|
|
16171
|
+
"CLAUDECODE",
|
|
16172
|
+
"CLAUDE_CODE",
|
|
16173
|
+
"CLAUDE_AGENT",
|
|
16174
|
+
"ANTIGRAVITY",
|
|
16175
|
+
"CORTEX_",
|
|
16176
|
+
"CASCADE_",
|
|
16177
|
+
"WINDSURF",
|
|
16178
|
+
"JETSKI",
|
|
16179
|
+
"EXA_",
|
|
16180
|
+
"GEMINI_CLI",
|
|
16181
|
+
"GEMINI_SESSION",
|
|
16182
|
+
"GEMINI_PROJECT",
|
|
16183
|
+
"GEMINI_CWD",
|
|
16184
|
+
"CURSOR",
|
|
16185
|
+
"AIDER",
|
|
16186
|
+
"OPENAI_CODEX",
|
|
16187
|
+
"CODEX_",
|
|
16188
|
+
"OPENCLAW",
|
|
16189
|
+
"REPLIT",
|
|
16190
|
+
"DEVIN"
|
|
16191
|
+
];
|
|
16192
|
+
function agentMarker() {
|
|
16193
|
+
for (const k of Object.keys(process.env)) {
|
|
16194
|
+
if (AGENT_ENV_PREFIXES.some((p) => k === p || k.startsWith(p))) return k;
|
|
16195
|
+
}
|
|
16196
|
+
return null;
|
|
16197
|
+
}
|
|
16198
|
+
function assertHumanTerminal() {
|
|
16199
|
+
if (process.env["SOLONGATE_INTERNAL"] === "1") return;
|
|
16200
|
+
const marker = agentMarker();
|
|
16201
|
+
const isTty = Boolean(process.stdin.isTTY && process.stdout.isTTY);
|
|
16202
|
+
if (isTty && !marker) return;
|
|
16203
|
+
const w = (s) => void process.stderr.write(s + "\n");
|
|
16204
|
+
w("");
|
|
16205
|
+
w(" SolonGate is human-only.");
|
|
16206
|
+
w(" These commands control your security policy, so they cannot be run by an AI");
|
|
16207
|
+
w(" agent or any non-interactive process. Run them yourself, in a terminal.");
|
|
16208
|
+
w(marker ? ` (refused: agent environment detected via ${marker})` : " (refused: no interactive terminal)");
|
|
16209
|
+
w("");
|
|
16210
|
+
process.exit(1);
|
|
16211
|
+
}
|
|
16167
16212
|
async function main() {
|
|
16168
16213
|
const subcommand = process.argv[2];
|
|
16214
|
+
if (IS_HUMAN_CLI) assertHumanTerminal();
|
|
16169
16215
|
if (subcommand === "--help" || subcommand === "-h" || subcommand === "help") {
|
|
16170
16216
|
printHelp();
|
|
16171
16217
|
return;
|
package/dist/logs-server.js
CHANGED
|
@@ -68,7 +68,10 @@ function startLogsServerDaemon() {
|
|
|
68
68
|
const p = spawn(process.execPath, [cli, "logs-server"], {
|
|
69
69
|
detached: true,
|
|
70
70
|
stdio: ["ignore", log, log],
|
|
71
|
-
windowsHide: true
|
|
71
|
+
windowsHide: true,
|
|
72
|
+
// Spawned by US, not by an agent: exempt from the human-only TTY gate
|
|
73
|
+
// (a detached daemon has no terminal by definition).
|
|
74
|
+
env: { ...process.env, SOLONGATE_INTERNAL: "1" }
|
|
72
75
|
});
|
|
73
76
|
p.on("error", () => {
|
|
74
77
|
});
|
package/dist/tui/index.js
CHANGED
|
@@ -3792,7 +3792,10 @@ function startLogsServerDaemon() {
|
|
|
3792
3792
|
const p = spawn3(process.execPath, [cli, "logs-server"], {
|
|
3793
3793
|
detached: true,
|
|
3794
3794
|
stdio: ["ignore", log, log],
|
|
3795
|
-
windowsHide: true
|
|
3795
|
+
windowsHide: true,
|
|
3796
|
+
// Spawned by US, not by an agent: exempt from the human-only TTY gate
|
|
3797
|
+
// (a detached daemon has no terminal by definition).
|
|
3798
|
+
env: { ...process.env, SOLONGATE_INTERNAL: "1" }
|
|
3796
3799
|
});
|
|
3797
3800
|
p.on("error", () => {
|
|
3798
3801
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.82.
|
|
3
|
+
"version": "0.82.45",
|
|
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": {
|