@xdarkicex/openclaw-memory-libravdb 1.6.5 → 1.6.7

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/identity.js CHANGED
@@ -2,6 +2,7 @@ import { userInfo, hostname } from "node:os";
2
2
  import { createHash } from "node:crypto";
3
3
  import { existsSync, readFileSync, writeFileSync, renameSync, mkdirSync, } from "node:fs";
4
4
  import { join, dirname } from "node:path";
5
+ import { execSync } from "node:child_process";
5
6
  /**
6
7
  * Resolves the identity file path, respecting OpenClaw's state directory conventions.
7
8
  *
@@ -56,8 +57,17 @@ function writeIdentityFile(path, userId, parts) {
56
57
  const dir = dirname(path);
57
58
  mkdirSync(dir, { recursive: true });
58
59
  const tmp = `${path}.${process.pid}.${Math.random().toString(36).slice(2, 8)}.tmp`;
59
- writeFileSync(tmp, JSON.stringify(identity, null, 2) + "\n");
60
+ writeFileSync(tmp, JSON.stringify(identity, null, 2) + "\n", { mode: 0o600 });
60
61
  renameSync(tmp, path);
62
+ // POSIX mode bits are advisory on Windows — enforce owner-only access via ACLs.
63
+ if (process.platform === "win32") {
64
+ try {
65
+ execSync(`icacls "${path}" /inheritance:r /grant:r "%USERNAME%:(R,W)"`, { stdio: "ignore", timeout: 5000 });
66
+ }
67
+ catch {
68
+ // best-effort; the file is already written with 0o600
69
+ }
70
+ }
61
71
  }
62
72
  export function resolveIdentity(params) {
63
73
  // 1. Plugin config override (highest priority)
package/dist/index.js CHANGED
@@ -24994,6 +24994,7 @@ import {
24994
24994
  mkdirSync
24995
24995
  } from "node:fs";
24996
24996
  import { join, dirname } from "node:path";
24997
+ import { execSync } from "node:child_process";
24997
24998
  function resolveIdentityPath(configuredPath) {
24998
24999
  if (configuredPath) return configuredPath;
24999
25000
  const stateDir = process.env.OPENCLAW_STATE_DIR?.trim();
@@ -25033,8 +25034,17 @@ function writeIdentityFile(path4, userId, parts) {
25033
25034
  const dir = dirname(path4);
25034
25035
  mkdirSync(dir, { recursive: true });
25035
25036
  const tmp = `${path4}.${process.pid}.${Math.random().toString(36).slice(2, 8)}.tmp`;
25036
- writeFileSync(tmp, JSON.stringify(identity, null, 2) + "\n");
25037
+ writeFileSync(tmp, JSON.stringify(identity, null, 2) + "\n", { mode: 384 });
25037
25038
  renameSync(tmp, path4);
25039
+ if (process.platform === "win32") {
25040
+ try {
25041
+ execSync(
25042
+ `icacls "${path4}" /inheritance:r /grant:r "%USERNAME%:(R,W)"`,
25043
+ { stdio: "ignore", timeout: 5e3 }
25044
+ );
25045
+ } catch {
25046
+ }
25047
+ }
25038
25048
  }
25039
25049
  function resolveIdentity(params) {
25040
25050
  const configUserId = params.configUserId?.trim();
@@ -2,7 +2,7 @@
2
2
  "id": "libravdb-memory",
3
3
  "name": "LibraVDB Memory",
4
4
  "description": "Persistent vector memory with three-tier hybrid scoring",
5
- "version": "1.6.5",
5
+ "version": "1.6.7",
6
6
  "kind": [
7
7
  "memory",
8
8
  "context-engine"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xdarkicex/openclaw-memory-libravdb",
3
- "version": "1.6.5",
3
+ "version": "1.6.7",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",