@signetai/connector-hermes-agent 0.231.2 → 0.232.1

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.
Files changed (2) hide show
  1. package/dist/index.js +52 -54
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -13,15 +13,14 @@ import { promisify } from "node:util";
13
13
  import { createHash } from "node:crypto";
14
14
  import { homedir as homedir2 } from "node:os";
15
15
  import { join as join2, resolve as resolve2 } from "node:path";
16
- import { constants as fsConstants, fstatSync, statfsSync as statfsSync2 } from "node:fs";
17
16
  import { createRequire as createRequire2 } from "node:module";
18
17
  import { homedir as homedir5 } from "node:os";
19
- import { dirname as dirname6, join as join14, resolve as resolve8 } from "node:path";
18
+ import { dirname as dirname6, join as join15, resolve as resolve7 } from "node:path";
20
19
  import { homedir as homedir6, platform as platform2 } from "node:os";
21
- import { basename, dirname as dirname7, resolve as resolve9 } from "node:path";
20
+ import { basename, dirname as dirname7, resolve as resolve8 } from "node:path";
22
21
  import { existsSync as existsSync16, readFileSync as readFileSync13, realpathSync, statSync as statSync8 } from "node:fs";
23
22
  import { homedir as homedir7 } from "node:os";
24
- import { dirname as dirname8, join as join16 } from "node:path";
23
+ import { dirname as dirname8, join as join17 } from "node:path";
25
24
  import { homedir as homedir8 } from "node:os";
26
25
  var __defProp = Object.defineProperty;
27
26
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
@@ -17368,6 +17367,8 @@ function expandHome(p, home = homedir2()) {
17368
17367
  return join2(home, p.slice(2));
17369
17368
  return p;
17370
17369
  }
17370
+ var PRIVATE_SEGMENTS = new Set([".daemon", ".secrets", "memory"]);
17371
+ var PRIVATE_ROOT_DIRS = new Set(["runtime", "data", "transcripts", "cache"]);
17371
17372
  var SIGNET_SOURCE_CHECKOUT_DIRNAME = "signetai";
17372
17373
  var SIGNET_GIT_ALLOWED_DIRECTORIES = ["skills", "tools", "dreaming"];
17373
17374
  var SIGNET_GIT_PROTECTED_PATHS = [
@@ -17379,6 +17380,7 @@ var SIGNET_GIT_PROTECTED_PATHS = [
17379
17380
  "files",
17380
17381
  "runtime",
17381
17382
  "workspace-layout.json",
17383
+ ".workspace-layout-upgrade.json",
17382
17384
  "node_modules",
17383
17385
  ":(glob)**/node_modules/**",
17384
17386
  `${SIGNET_SOURCE_CHECKOUT_DIRNAME}`,
@@ -17419,11 +17421,12 @@ var SIGNET_GITIGNORE_PROTECTED_PATTERNS = [
17419
17421
  ".daemon/",
17420
17422
  ".secrets/",
17421
17423
  ".shadow/",
17422
- "cache/",
17423
- "data/",
17424
- "files/",
17425
- "runtime/",
17424
+ "/cache/",
17425
+ "/data/",
17426
+ "/files/",
17427
+ "/runtime/",
17426
17428
  "workspace-layout.json",
17429
+ ".workspace-layout-upgrade.json",
17427
17430
  "node_modules/",
17428
17431
  `${SIGNET_SOURCE_CHECKOUT_DIRNAME}/`,
17429
17432
  "memory/memories.db*",
@@ -17443,10 +17446,6 @@ var SIGNET_GITIGNORE_PROTECTED_PATTERNS = [
17443
17446
  "*.sqlite",
17444
17447
  "*.sqlite3"
17445
17448
  ];
17446
- var DESCRIPTOR_ROOT = process.platform === "linux" ? "/proc/self/fd" : process.platform === "darwin" ? "/dev/fd" : undefined;
17447
- var DIRECTORY_FLAGS = fsConstants.O_RDONLY | (fsConstants.O_DIRECTORY ?? 0) | (fsConstants.O_NOFOLLOW ?? 0);
17448
- var FILE_FLAGS = fsConstants.O_RDONLY | (fsConstants.O_NOFOLLOW ?? 0) | (fsConstants.O_NONBLOCK ?? 0);
17449
- var NOFOLLOW = fsConstants.O_NOFOLLOW ?? 0;
17450
17449
  var PROTECTION_COMPONENT_IDS = [
17451
17450
  "root-authored",
17452
17451
  "skills",
@@ -17496,18 +17495,18 @@ try {
17496
17495
  const esmRequire = createRequire2(import.meta.url);
17497
17496
  native = esmRequire("@signet/native");
17498
17497
  } catch {}
17499
- var GRAPHIQ_DEFAULT_INSTALL_DIR = join14(homedir5(), ".local", "bin");
17498
+ var GRAPHIQ_DEFAULT_INSTALL_DIR = join15(homedir5(), ".local", "bin");
17500
17499
  var DEFAULT_DISCORD_DESKTOP_CACHE_PATH = defaultDiscordDesktopCachePath();
17501
17500
  var DEFAULT_GITHUB_RESOURCE_TYPES = ["issues", "pulls", "discussions", "docs"];
17502
17501
  var VALID_GITHUB_RESOURCE_TYPES = new Set(DEFAULT_GITHUB_RESOURCE_TYPES);
17503
17502
  function defaultDiscordDesktopCachePath() {
17504
17503
  switch (platform2()) {
17505
17504
  case "darwin":
17506
- return resolve9(homedir6(), "Library", "Application Support", "discord");
17505
+ return resolve8(homedir6(), "Library", "Application Support", "discord");
17507
17506
  case "win32":
17508
- return resolve9(process.env.APPDATA || resolve9(homedir6(), "AppData", "Roaming"), "discord");
17507
+ return resolve8(process.env.APPDATA || resolve8(homedir6(), "AppData", "Roaming"), "discord");
17509
17508
  default:
17510
- return resolve9(process.env.XDG_CONFIG_HOME || resolve9(homedir6(), ".config"), "discord");
17509
+ return resolve8(process.env.XDG_CONFIG_HOME || resolve8(homedir6(), ".config"), "discord");
17511
17510
  }
17512
17511
  }
17513
17512
  var IDENTITY_FILES = {
@@ -17570,27 +17569,27 @@ function userHome() {
17570
17569
  }
17571
17570
  function resolveHermesHomePath() {
17572
17571
  const hermesHome = process.env.HERMES_HOME?.trim();
17573
- return hermesHome || join16(userHome(), ".hermes");
17572
+ return hermesHome || join17(userHome(), ".hermes");
17574
17573
  }
17575
17574
  function hermesAgentCandidateDirs() {
17576
17575
  const home = userHome();
17577
17576
  const hermesHome = resolveHermesHomePath();
17578
17577
  return [
17579
17578
  hermesHome,
17580
- join16(hermesHome, "hermes-agent"),
17581
- join16(home, "hermes-agent"),
17582
- join16(home, ".local", "share", "hermes-agent"),
17583
- join16(home, "src", "hermes-agent"),
17579
+ join17(hermesHome, "hermes-agent"),
17580
+ join17(home, "hermes-agent"),
17581
+ join17(home, ".local", "share", "hermes-agent"),
17582
+ join17(home, "src", "hermes-agent"),
17584
17583
  "/opt/hermes-agent"
17585
17584
  ];
17586
17585
  }
17587
17586
  function resolveHermesRepoPath() {
17588
17587
  const hermesRepo = process.env.HERMES_REPO?.trim();
17589
- if (hermesRepo && existsSync16(join16(hermesRepo, "plugins", "memory"))) {
17588
+ if (hermesRepo && existsSync16(join17(hermesRepo, "plugins", "memory"))) {
17590
17589
  return hermesRepo;
17591
17590
  }
17592
17591
  for (const base of hermesAgentCandidateDirs()) {
17593
- if (existsSync16(join16(base, "plugins", "memory")))
17592
+ if (existsSync16(join17(base, "plugins", "memory")))
17594
17593
  return base;
17595
17594
  }
17596
17595
  try {
@@ -17601,7 +17600,7 @@ function resolveHermesRepoPath() {
17601
17600
  }).trim();
17602
17601
  if (hermesPath) {
17603
17602
  const repoDir = dirname8(realpathSync(hermesPath));
17604
- if (existsSync16(join16(repoDir, "plugins", "memory")))
17603
+ if (existsSync16(join17(repoDir, "plugins", "memory")))
17605
17604
  return repoDir;
17606
17605
  }
17607
17606
  } catch {}
@@ -17615,7 +17614,7 @@ import {
17615
17614
  closeSync,
17616
17615
  constants,
17617
17616
  existsSync as existsSync2,
17618
- fstatSync as fstatSync3,
17617
+ fstatSync,
17619
17618
  ftruncateSync,
17620
17619
  lstatSync,
17621
17620
  mkdirSync,
@@ -17645,15 +17644,14 @@ import {
17645
17644
  } from "node:child_process";
17646
17645
  import { promisify as promisify2 } from "node:util";
17647
17646
  import { createHash as createHash2 } from "node:crypto";
17648
- import { constants as fsConstants2, fstatSync as fstatSync2, statfsSync as statfsSync22 } from "node:fs";
17649
17647
  import { createRequire as createRequire22 } from "node:module";
17650
17648
  import { homedir as homedir52 } from "node:os";
17651
- import { dirname as dirname62, join as join142, resolve as resolve82 } from "node:path";
17649
+ import { dirname as dirname62, join as join152, resolve as resolve72 } from "node:path";
17652
17650
  import { homedir as homedir62, platform as platform22 } from "node:os";
17653
- import { basename as basename3, dirname as dirname72, resolve as resolve92 } from "node:path";
17651
+ import { basename as basename3, dirname as dirname72, resolve as resolve82 } from "node:path";
17654
17652
  import { homedir as homedir82 } from "node:os";
17655
17653
  import { existsSync as existsSync18, lstatSync as lstatSync3, mkdirSync as mkdirSync10, readdirSync as readdirSync9, symlinkSync as symlinkSync2, unlinkSync as unlinkSync2 } from "node:fs";
17656
- import { join as join18 } from "node:path";
17654
+ import { join as join19 } from "node:path";
17657
17655
  var __defProp2 = Object.defineProperty;
17658
17656
  var __commonJS2 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
17659
17657
  var __esm2 = (fn, res, err) => () => {
@@ -34977,6 +34975,8 @@ var $parseDocument2 = publicApi2.parseDocument;
34977
34975
  var $stringify2 = publicApi2.stringify;
34978
34976
  var $visit2 = visit2.visit;
34979
34977
  var $visitAsync2 = visit2.visitAsync;
34978
+ var PRIVATE_SEGMENTS2 = new Set([".daemon", ".secrets", "memory"]);
34979
+ var PRIVATE_ROOT_DIRS2 = new Set(["runtime", "data", "transcripts", "cache"]);
34980
34980
  var SIGNET_SOURCE_CHECKOUT_DIRNAME2 = "signetai";
34981
34981
  var SIGNET_GIT_ALLOWED_DIRECTORIES2 = ["skills", "tools", "dreaming"];
34982
34982
  var SIGNET_GIT_PROTECTED_PATHS2 = [
@@ -34988,6 +34988,7 @@ var SIGNET_GIT_PROTECTED_PATHS2 = [
34988
34988
  "files",
34989
34989
  "runtime",
34990
34990
  "workspace-layout.json",
34991
+ ".workspace-layout-upgrade.json",
34991
34992
  "node_modules",
34992
34993
  ":(glob)**/node_modules/**",
34993
34994
  `${SIGNET_SOURCE_CHECKOUT_DIRNAME2}`,
@@ -35028,11 +35029,12 @@ var SIGNET_GITIGNORE_PROTECTED_PATTERNS2 = [
35028
35029
  ".daemon/",
35029
35030
  ".secrets/",
35030
35031
  ".shadow/",
35031
- "cache/",
35032
- "data/",
35033
- "files/",
35034
- "runtime/",
35032
+ "/cache/",
35033
+ "/data/",
35034
+ "/files/",
35035
+ "/runtime/",
35035
35036
  "workspace-layout.json",
35037
+ ".workspace-layout-upgrade.json",
35036
35038
  "node_modules/",
35037
35039
  `${SIGNET_SOURCE_CHECKOUT_DIRNAME2}/`,
35038
35040
  "memory/memories.db*",
@@ -35052,10 +35054,6 @@ var SIGNET_GITIGNORE_PROTECTED_PATTERNS2 = [
35052
35054
  "*.sqlite",
35053
35055
  "*.sqlite3"
35054
35056
  ];
35055
- var DESCRIPTOR_ROOT2 = process.platform === "linux" ? "/proc/self/fd" : process.platform === "darwin" ? "/dev/fd" : undefined;
35056
- var DIRECTORY_FLAGS2 = fsConstants2.O_RDONLY | (fsConstants2.O_DIRECTORY ?? 0) | (fsConstants2.O_NOFOLLOW ?? 0);
35057
- var FILE_FLAGS2 = fsConstants2.O_RDONLY | (fsConstants2.O_NOFOLLOW ?? 0) | (fsConstants2.O_NONBLOCK ?? 0);
35058
- var NOFOLLOW2 = fsConstants2.O_NOFOLLOW ?? 0;
35059
35057
  var PROTECTION_COMPONENT_IDS2 = [
35060
35058
  "root-authored",
35061
35059
  "skills",
@@ -35105,18 +35103,18 @@ try {
35105
35103
  const esmRequire = createRequire22(import.meta.url);
35106
35104
  native2 = esmRequire("@signet/native");
35107
35105
  } catch {}
35108
- var GRAPHIQ_DEFAULT_INSTALL_DIR2 = join142(homedir52(), ".local", "bin");
35106
+ var GRAPHIQ_DEFAULT_INSTALL_DIR2 = join152(homedir52(), ".local", "bin");
35109
35107
  var DEFAULT_DISCORD_DESKTOP_CACHE_PATH2 = defaultDiscordDesktopCachePath2();
35110
35108
  var DEFAULT_GITHUB_RESOURCE_TYPES2 = ["issues", "pulls", "discussions", "docs"];
35111
35109
  var VALID_GITHUB_RESOURCE_TYPES2 = new Set(DEFAULT_GITHUB_RESOURCE_TYPES2);
35112
35110
  function defaultDiscordDesktopCachePath2() {
35113
35111
  switch (platform22()) {
35114
35112
  case "darwin":
35115
- return resolve92(homedir62(), "Library", "Application Support", "discord");
35113
+ return resolve82(homedir62(), "Library", "Application Support", "discord");
35116
35114
  case "win32":
35117
- return resolve92(process.env.APPDATA || resolve92(homedir62(), "AppData", "Roaming"), "discord");
35115
+ return resolve82(process.env.APPDATA || resolve82(homedir62(), "AppData", "Roaming"), "discord");
35118
35116
  default:
35119
- return resolve92(process.env.XDG_CONFIG_HOME || resolve92(homedir62(), ".config"), "discord");
35117
+ return resolve82(process.env.XDG_CONFIG_HOME || resolve82(homedir62(), ".config"), "discord");
35120
35118
  }
35121
35119
  }
35122
35120
  var IDENTITY_FILES2 = {
@@ -35187,7 +35185,7 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
35187
35185
  if (!existsSync18(sourceDir)) {
35188
35186
  return result;
35189
35187
  }
35190
- const targetParent = join18(targetDir, "..");
35188
+ const targetParent = join19(targetDir, "..");
35191
35189
  if (!existsSync18(targetParent)) {
35192
35190
  mkdirSync10(targetParent, { recursive: true });
35193
35191
  }
@@ -35205,8 +35203,8 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
35205
35203
  return result;
35206
35204
  }
35207
35205
  for (const entry of entries) {
35208
- const srcPath = join18(sourceDir, entry);
35209
- const destPath = join18(targetDir, entry);
35206
+ const srcPath = join19(sourceDir, entry);
35207
+ const destPath = join19(targetDir, entry);
35210
35208
  try {
35211
35209
  const src = lstatSync3(srcPath);
35212
35210
  if (src.isSymbolicLink() || !src.isDirectory()) {
@@ -35412,8 +35410,8 @@ var REQUIRED_TOOL_NAMES = [
35412
35410
  "recall",
35413
35411
  "remember"
35414
35412
  ];
35415
- var DESCRIPTOR_ROOT3 = process.platform === "linux" ? "/proc/self/fd" : process.platform === "darwin" ? "/dev/fd" : null;
35416
- var DESCRIPTOR_WRITES_SUPPORTED = DESCRIPTOR_ROOT3 !== null && typeof constants.O_DIRECTORY === "number" && typeof constants.O_NOFOLLOW === "number";
35413
+ var DESCRIPTOR_ROOT = process.platform === "linux" ? "/proc/self/fd" : process.platform === "darwin" ? "/dev/fd" : null;
35414
+ var DESCRIPTOR_WRITES_SUPPORTED = DESCRIPTOR_ROOT !== null && typeof constants.O_DIRECTORY === "number" && typeof constants.O_NOFOLLOW === "number";
35417
35415
  var DESCRIPTOR_WRITE_UNAVAILABLE_ERROR = "Targeted Hermes profile writes require descriptor-backed no-follow filesystem support";
35418
35416
  function pathEntryExists(path) {
35419
35417
  try {
@@ -35424,9 +35422,9 @@ function pathEntryExists(path) {
35424
35422
  }
35425
35423
  }
35426
35424
  function descriptorPath(fd) {
35427
- if (DESCRIPTOR_ROOT3 === null)
35425
+ if (DESCRIPTOR_ROOT === null)
35428
35426
  throw new Error(DESCRIPTOR_WRITE_UNAVAILABLE_ERROR);
35429
- return join5(DESCRIPTOR_ROOT3, String(fd));
35427
+ return join5(DESCRIPTOR_ROOT, String(fd));
35430
35428
  }
35431
35429
  function isPathWithin(root, candidate) {
35432
35430
  const rel = relative2(root, candidate);
@@ -35657,7 +35655,7 @@ function getPythonCandidates() {
35657
35655
  ];
35658
35656
  }
35659
35657
  function runSecureFilesystemOperation(fd, rootPath, script, args, input) {
35660
- if (DESCRIPTOR_ROOT3 === null)
35658
+ if (DESCRIPTOR_ROOT === null)
35661
35659
  throw new Error(DESCRIPTOR_WRITE_UNAVAILABLE_ERROR);
35662
35660
  const errors = [];
35663
35661
  for (const candidate of getPythonCandidates()) {
@@ -35681,7 +35679,7 @@ function runSecureFilesystemOperation(fd, rootPath, script, args, input) {
35681
35679
  throw new Error(`${DESCRIPTOR_WRITE_UNAVAILABLE_ERROR}: ${errors.join("; ") || "No Python interpreter found"}`);
35682
35680
  }
35683
35681
  function runSecureEntryOperation(parentFd, parentPath, name, expectedDev, expectedIno, operation) {
35684
- if (DESCRIPTOR_ROOT3 === null)
35682
+ if (DESCRIPTOR_ROOT === null)
35685
35683
  throw new Error(DESCRIPTOR_WRITE_UNAVAILABLE_ERROR);
35686
35684
  const errors = [];
35687
35685
  for (const candidate of getPythonCandidates()) {
@@ -35725,7 +35723,7 @@ function sameStatIdentity(left, right) {
35725
35723
  }
35726
35724
  function assertDescriptorPathIdentity(fd, path, message) {
35727
35725
  const pathStat = lstatSync(path);
35728
- if (realpathSync3(path) !== path || pathStat.isSymbolicLink() || !sameStatIdentity(fstatSync3(fd), pathStat)) {
35726
+ if (realpathSync3(path) !== path || pathStat.isSymbolicLink() || !sameStatIdentity(fstatSync(fd), pathStat)) {
35729
35727
  throw new Error(message);
35730
35728
  }
35731
35729
  }
@@ -35860,7 +35858,7 @@ function writeContainedFile(targetPath, content, targetRoot) {
35860
35858
  const fileFd = openSync(filePath, constants.O_WRONLY | constants.O_NOFOLLOW | (existingFileIdentity === undefined ? constants.O_CREAT | constants.O_EXCL : 0), 438);
35861
35859
  try {
35862
35860
  const expectedFile = join5(expected, fileName);
35863
- if (existingFileIdentity !== undefined && !sameStatIdentity(existingFileIdentity, fstatSync3(fileFd))) {
35861
+ if (existingFileIdentity !== undefined && !sameStatIdentity(existingFileIdentity, fstatSync(fileFd))) {
35864
35862
  throw new Error(`Hermes target file changed during secure write: ${targetPath}`);
35865
35863
  }
35866
35864
  if (realpathSync3(descriptorPath(fileFd)) !== expectedFile) {
@@ -35955,7 +35953,7 @@ function removeDirectoryContentsNoFollow(directoryFd, expectedDirectoryPath) {
35955
35953
  if (entry.isDirectory() && !entry.isSymbolicLink()) {
35956
35954
  const childFd = openDirectoryNoFollow(childPath);
35957
35955
  try {
35958
- const childIdentity = fstatSync3(childFd);
35956
+ const childIdentity = fstatSync(childFd);
35959
35957
  assertDescriptorPathIdentity(childFd, expectedChildPath, `Hermes target directory changed during secure removal: ${expectedChildPath}`);
35960
35958
  assertEntryIdentityNoFollow(directoryFd, expectedDirectoryPath, entry.name, childIdentity.dev, childIdentity.ino);
35961
35959
  removeDirectoryContentsNoFollow(childFd, expectedChildPath);
@@ -36003,7 +36001,7 @@ function removeContainedDirectory(targetPath, targetRoot, targetKind, unownedTar
36003
36001
  const targetEntryPath = process.platform === "darwin" ? expectedTarget : join5(descriptorPath(parentFd), targetName);
36004
36002
  const targetFd = openDirectoryNoFollow(targetEntryPath);
36005
36003
  try {
36006
- const targetIdentity = fstatSync3(targetFd);
36004
+ const targetIdentity = fstatSync(targetFd);
36007
36005
  assertDescriptorPathIdentity(targetFd, expectedTarget, `Hermes target directory changed during secure removal: ${targetPath}`);
36008
36006
  const marker = readInstallMarkerFromDirectory(targetFd, expectedTarget);
36009
36007
  if (marker === null || marker.targetKind !== targetKind) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-hermes-agent",
3
- "version": "0.231.2",
3
+ "version": "0.232.1",
4
4
  "description": "Signet connector for Hermes Agent — installs Signet as a pluggable memory provider",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -25,8 +25,8 @@
25
25
  "typecheck": "tsc --noEmit"
26
26
  },
27
27
  "dependencies": {
28
- "@signetai/connector-base": "0.231.2",
29
- "@signetai/core": "0.231.2"
28
+ "@signetai/connector-base": "0.232.1",
29
+ "@signetai/core": "0.232.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.0.0",