@solongate/proxy 0.81.61 → 0.81.62

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.
@@ -27,3 +27,29 @@
27
27
  {"ms":2,"ts":1784360134508,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
28
28
  {"ms":5,"ts":1784360234461,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
29
29
  {"ms":4,"ts":1784360256656,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
30
+ {"ms":5,"ts":1784365255204,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
31
+ {"ms":4,"ts":1784365279092,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
32
+ {"ms":4,"ts":1784365328385,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
33
+ {"ms":4,"ts":1784365360712,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
34
+ {"ms":4,"ts":1784365375478,"tool":"Write","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
35
+ {"ms":3,"ts":1784365383985,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
36
+ {"ms":9,"ts":1784365415903,"tool":"Write","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
37
+ {"ms":4,"ts":1784365422626,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
38
+ {"ms":5,"ts":1784365497358,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
39
+ {"ms":4,"ts":1784365509533,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
40
+ {"ms":4,"ts":1784365523577,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
41
+ {"ms":1,"ts":1784365524083,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
42
+ {"ms":2,"ts":1784365525077,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
43
+ {"ms":3,"ts":1784365525605,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
44
+ {"ms":3,"ts":1784365526627,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
45
+ {"ms":2,"ts":1784365527031,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
46
+ {"ms":5,"ts":1784366243066,"tool":"Write","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
47
+ {"ms":3,"ts":1784366250503,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
48
+ {"ms":4,"ts":1784366281171,"tool":"Write","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
49
+ {"ms":2,"ts":1784366288049,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
50
+ {"ms":3,"ts":1784367337998,"tool":"Write","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
51
+ {"ms":2,"ts":1784367345104,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
52
+ {"ms":4,"ts":1784367420866,"tool":"Write","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
53
+ {"ms":2,"ts":1784367428790,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
54
+ {"ms":3,"ts":1784369708978,"tool":"Write","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
55
+ {"ms":4,"ts":1784369720104,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
@@ -1 +1 @@
1
- {"tool":"Bash","ts":1784360236505}
1
+ {"tool":"Bash","ts":1784365527031}
@@ -1 +1 @@
1
- {"ms":4,"ts":1784360256656,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
1
+ {"ms":4,"ts":1784369720104,"tool":"Bash","session":"f5933c65-c315-4440-9afb-7136fce6b695"}
@@ -1 +1 @@
1
- 1784360236504
1
+ 1784369709035
@@ -6536,7 +6536,7 @@ import { resolve, join, dirname, isAbsolute } from "node:path";
6536
6536
  import { homedir } from "node:os";
6537
6537
  import { gunzipSync } from "node:zlib";
6538
6538
  import { createHash } from "node:crypto";
6539
- var HOOK_VERSION = 35;
6539
+ var HOOK_VERSION = 36;
6540
6540
  function localLogsOnly(security) {
6541
6541
  if (security && typeof security === "object") {
6542
6542
  const l = security.localLogs;
@@ -6557,6 +6557,7 @@ function writeLocalMarker(security) {
6557
6557
  } catch {
6558
6558
  }
6559
6559
  }
6560
+ var _invalidPathNoted = false;
6560
6561
  function resolveLocalLogDir(rawPath) {
6561
6562
  const dir = String(rawPath || "").trim().replace(/[\\/]+$/, "");
6562
6563
  if (!dir)
@@ -6564,13 +6565,16 @@ function resolveLocalLogDir(rawPath) {
6564
6565
  if (isAbsolute(dir))
6565
6566
  return dir;
6566
6567
  const fallback = resolve(homedir(), ".solongate", "local-logs");
6567
- try {
6568
- mkdirSync(resolve(homedir(), ".solongate"), { recursive: true });
6569
- writeFileSync(
6570
- resolve(homedir(), ".solongate", ".local-logs-invalid-path"),
6571
- JSON.stringify({ configured: dir, fallback, ts: Date.now() })
6572
- );
6573
- } catch {
6568
+ if (!_invalidPathNoted) {
6569
+ _invalidPathNoted = true;
6570
+ try {
6571
+ mkdirSync(resolve(homedir(), ".solongate"), { recursive: true });
6572
+ writeFileSync(
6573
+ resolve(homedir(), ".solongate", ".local-logs-invalid-path"),
6574
+ JSON.stringify({ configured: dir, fallback, ts: Date.now() })
6575
+ );
6576
+ } catch {
6577
+ }
6574
6578
  }
6575
6579
  return fallback;
6576
6580
  }
package/hooks/guard.mjs CHANGED
@@ -32,7 +32,7 @@ import { createHash } from 'node:crypto';
32
32
  // the installed hook self-updates when the cloud version is higher (see
33
33
  // maybeSelfUpdate). This is what makes guard fixes propagate without a manual
34
34
  // reinstall — the same trust model as the OPA WASM this hook already runs.
35
- const HOOK_VERSION = 35;
35
+ const HOOK_VERSION = 36;
36
36
 
37
37
  // True when local log storage is ON. In that mode logs are kept LOCAL ONLY and
38
38
  // nothing is sent to the cloud audit log.
@@ -72,16 +72,24 @@ function writeLocalMarker(security) {
72
72
  // When the configured path isn't absolute here, fall back to a fixed home folder
73
73
  // so entries are never lost and never leak into a project, and record the bad
74
74
  // path so the dashboard/user can be told their path isn't valid on this device.
75
+ let _invalidPathNoted = false;
75
76
  function resolveLocalLogDir(rawPath) {
76
77
  const dir = String(rawPath || '').trim().replace(/[\\/]+$/, '');
77
78
  if (!dir) return null;
78
79
  if (isAbsolute(dir)) return dir;
79
80
  const fallback = resolve(homedir(), '.solongate', 'local-logs');
80
- try {
81
- mkdirSync(resolve(homedir(), '.solongate'), { recursive: true });
82
- writeFileSync(resolve(homedir(), '.solongate', '.local-logs-invalid-path'),
83
- JSON.stringify({ configured: dir, fallback, ts: Date.now() }));
84
- } catch { /* ignore */ }
81
+ // Non-absolute path (e.g. a Windows path on Linux): fall back. The diagnostic
82
+ // marker is written at most ONCE per process, NOT on every denial — a per-call
83
+ // writeFileSync here widened the window where a concurrent guard process dies
84
+ // before its audit append lands (dropped denials under a simultaneous burst).
85
+ if (!_invalidPathNoted) {
86
+ _invalidPathNoted = true;
87
+ try {
88
+ mkdirSync(resolve(homedir(), '.solongate'), { recursive: true });
89
+ writeFileSync(resolve(homedir(), '.solongate', '.local-logs-invalid-path'),
90
+ JSON.stringify({ configured: dir, fallback, ts: Date.now() }));
91
+ } catch { /* ignore */ }
92
+ }
85
93
  return fallback;
86
94
  }
87
95
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.81.61",
3
+ "version": "0.81.62",
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": {