@signetai/connector-hermes-agent 0.154.4 → 0.154.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.
Files changed (2) hide show
  1. package/dist/index.js +47 -47
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -3,22 +3,22 @@ import { spawnSync } from "node:child_process";
3
3
  import { createHash } from "node:crypto";
4
4
  import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, rmSync, writeFileSync as writeFileSync2 } from "node:fs";
5
5
  import { homedir } from "node:os";
6
- import { dirname as dirname7, join as join4 } from "node:path";
6
+ import { dirname as dirname5, join as join4 } from "node:path";
7
7
  import { fileURLToPath as fileURLToPath3 } from "node:url";
8
8
 
9
9
  // ../../../libs/connector-base/dist/index.js
10
10
  import { randomBytes } from "node:crypto";
11
- import { existsSync, readFileSync, renameSync, statSync, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
12
- import { dirname as dirname2, join as join3, resolve } from "node:path";
11
+ import { existsSync, readFileSync, renameSync, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
12
+ import { dirname as dirname3, join as join3 } from "node:path";
13
13
  import { createRequire } from "node:module";
14
14
  import { dirname, join } from "node:path";
15
15
  import { fileURLToPath } from "node:url";
16
16
  import { createRequire as createRequire2 } from "node:module";
17
- import { homedir as homedir3, platform as platform2 } from "node:os";
18
- import { basename, dirname as dirname3, resolve as resolve3 } from "node:path";
19
- import { homedir as homedir7 } from "node:os";
20
- import { existsSync as existsSync12, lstatSync, mkdirSync as mkdirSync8, readdirSync as readdirSync6, symlinkSync, unlinkSync } from "node:fs";
21
- import { join as join12 } from "node:path";
17
+ import { homedir as homedir4, platform as platform2 } from "node:os";
18
+ import { basename, dirname as dirname4, resolve as resolve4 } from "node:path";
19
+ import { homedir as homedir8 } from "node:os";
20
+ import { existsSync as existsSync13, lstatSync, mkdirSync as mkdirSync9, readdirSync as readdirSync6, symlinkSync, unlinkSync } from "node:fs";
21
+ import { join as join13 } from "node:path";
22
22
  var __create2 = Object.create;
23
23
  var __getProtoOf2 = Object.getPrototypeOf;
24
24
  var __defProp2 = Object.defineProperty;
@@ -10771,11 +10771,11 @@ var VALID_GITHUB_RESOURCE_TYPES = new Set(DEFAULT_GITHUB_RESOURCE_TYPES);
10771
10771
  function defaultDiscordDesktopCachePath() {
10772
10772
  switch (platform2()) {
10773
10773
  case "darwin":
10774
- return resolve3(homedir3(), "Library", "Application Support", "discord");
10774
+ return resolve4(homedir4(), "Library", "Application Support", "discord");
10775
10775
  case "win32":
10776
- return resolve3(process.env.APPDATA || resolve3(homedir3(), "AppData", "Roaming"), "discord");
10776
+ return resolve4(process.env.APPDATA || resolve4(homedir4(), "AppData", "Roaming"), "discord");
10777
10777
  default:
10778
- return resolve3(process.env.XDG_CONFIG_HOME || resolve3(homedir3(), ".config"), "discord");
10778
+ return resolve4(process.env.XDG_CONFIG_HOME || resolve4(homedir4(), ".config"), "discord");
10779
10779
  }
10780
10780
  }
10781
10781
  var IDENTITY_FILES = {
@@ -10843,15 +10843,15 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
10843
10843
  skipped: [],
10844
10844
  errors: []
10845
10845
  };
10846
- if (!existsSync12(sourceDir)) {
10846
+ if (!existsSync13(sourceDir)) {
10847
10847
  return result;
10848
10848
  }
10849
- const targetParent = join12(targetDir, "..");
10850
- if (!existsSync12(targetParent)) {
10851
- mkdirSync8(targetParent, { recursive: true });
10849
+ const targetParent = join13(targetDir, "..");
10850
+ if (!existsSync13(targetParent)) {
10851
+ mkdirSync9(targetParent, { recursive: true });
10852
10852
  }
10853
- if (!existsSync12(targetDir)) {
10854
- mkdirSync8(targetDir, { recursive: true });
10853
+ if (!existsSync13(targetDir)) {
10854
+ mkdirSync9(targetDir, { recursive: true });
10855
10855
  }
10856
10856
  let entries;
10857
10857
  try {
@@ -10864,8 +10864,8 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
10864
10864
  return result;
10865
10865
  }
10866
10866
  for (const entry of entries) {
10867
- const srcPath = join12(sourceDir, entry);
10868
- const destPath = join12(targetDir, entry);
10867
+ const srcPath = join13(sourceDir, entry);
10868
+ const destPath = join13(targetDir, entry);
10869
10869
  try {
10870
10870
  const src = lstatSync(srcPath);
10871
10871
  if (src.isSymbolicLink() || !src.isDirectory()) {
@@ -10906,7 +10906,7 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
10906
10906
  }
10907
10907
  return result;
10908
10908
  }
10909
- var home = homedir7();
10909
+ var home = homedir8();
10910
10910
  var SIGNET_BLOCK_START = "<!-- SIGNET:START -->";
10911
10911
  var SIGNET_BLOCK_END = "<!-- SIGNET:END -->";
10912
10912
  function stripSignetBlock(content) {
@@ -11063,7 +11063,7 @@ class BaseConnector {
11063
11063
  generateHeader(sourcePath, targetName) {
11064
11064
  const name = targetName || this.name;
11065
11065
  const safe = (p) => p.replace(/[\n\r]/g, "");
11066
- const root = dirname2(sourcePath);
11066
+ const root = dirname3(sourcePath);
11067
11067
  return `# Auto-generated from ${safe(sourcePath)}
11068
11068
  # Source: ${safe(sourcePath)}
11069
11069
  # Generated: ${new Date().toISOString()}
@@ -11097,18 +11097,18 @@ ${content}`);
11097
11097
 
11098
11098
  // ../../../platform/core/dist/index.js
11099
11099
  import { createRequire as createRequire3 } from "node:module";
11100
- import { dirname as dirname4, join as join2 } from "node:path";
11100
+ import { dirname as dirname2, join as join2 } from "node:path";
11101
11101
  import { fileURLToPath as fileURLToPath2 } from "node:url";
11102
11102
  import { homedir as homedir2 } from "os";
11103
11103
  import { join as join22 } from "path";
11104
11104
  import { createRequire as createRequire22 } from "node:module";
11105
- import { homedir as homedir32, platform as platform22 } from "node:os";
11106
- import { basename as basename2, dirname as dirname32, resolve as resolve32 } from "node:path";
11105
+ import { homedir as homedir42, platform as platform22 } from "node:os";
11106
+ import { basename as basename2, dirname as dirname42, resolve as resolve42 } from "node:path";
11107
11107
  import { execFileSync } from "node:child_process";
11108
- import { existsSync as existsSync10, readFileSync as readFileSync8, readdirSync as readdirSync4, realpathSync, statSync as statSync4 } from "node:fs";
11109
- import { homedir as homedir6 } from "node:os";
11110
- import { dirname as dirname6, join as join10 } from "node:path";
11111
- import { homedir as homedir72 } from "node:os";
11108
+ import { existsSync as existsSync11, readFileSync as readFileSync9, readdirSync as readdirSync4, realpathSync, statSync as statSync5 } from "node:fs";
11109
+ import { homedir as homedir7 } from "node:os";
11110
+ import { dirname as dirname7, join as join11 } from "node:path";
11111
+ import { homedir as homedir82 } from "node:os";
11112
11112
  var __create = Object.create;
11113
11113
  var __getProtoOf = Object.getPrototypeOf;
11114
11114
  var __defProp = Object.defineProperty;
@@ -21783,7 +21783,7 @@ var MIGRATIONS2 = [
21783
21783
  ];
21784
21784
  var LATEST_SCHEMA_VERSION2 = MIGRATIONS2[MIGRATIONS2.length - 1]?.version ?? 0;
21785
21785
  var __filename22 = fileURLToPath2(import.meta.url);
21786
- var __dirname22 = dirname4(__filename22);
21786
+ var __dirname22 = dirname2(__filename22);
21787
21787
  var import_yaml3 = __toESM(require_dist2(), 1);
21788
21788
  function expandHome(p, home2 = homedir2()) {
21789
21789
  if (p === "~")
@@ -21868,11 +21868,11 @@ var VALID_GITHUB_RESOURCE_TYPES2 = new Set(DEFAULT_GITHUB_RESOURCE_TYPES2);
21868
21868
  function defaultDiscordDesktopCachePath2() {
21869
21869
  switch (platform22()) {
21870
21870
  case "darwin":
21871
- return resolve32(homedir32(), "Library", "Application Support", "discord");
21871
+ return resolve42(homedir42(), "Library", "Application Support", "discord");
21872
21872
  case "win32":
21873
- return resolve32(process.env.APPDATA || resolve32(homedir32(), "AppData", "Roaming"), "discord");
21873
+ return resolve42(process.env.APPDATA || resolve42(homedir42(), "AppData", "Roaming"), "discord");
21874
21874
  default:
21875
- return resolve32(process.env.XDG_CONFIG_HOME || resolve32(homedir32(), ".config"), "discord");
21875
+ return resolve42(process.env.XDG_CONFIG_HOME || resolve42(homedir42(), ".config"), "discord");
21876
21876
  }
21877
21877
  }
21878
21878
  var IDENTITY_FILES2 = {
@@ -21931,31 +21931,31 @@ var IDENTITY_FILES2 = {
21931
21931
  var REQUIRED_IDENTITY_KEYS2 = Object.entries(IDENTITY_FILES2).filter(([, spec]) => !spec.optional).map(([key]) => key);
21932
21932
  var OPTIONAL_IDENTITY_KEYS2 = Object.entries(IDENTITY_FILES2).filter(([, spec]) => spec.optional).map(([key]) => key);
21933
21933
  function userHome() {
21934
- return process.env.HOME?.trim() || homedir6();
21934
+ return process.env.HOME?.trim() || homedir7();
21935
21935
  }
21936
21936
  function resolveHermesHomePath() {
21937
21937
  const hermesHome = process.env.HERMES_HOME?.trim();
21938
- return hermesHome || join10(userHome(), ".hermes");
21938
+ return hermesHome || join11(userHome(), ".hermes");
21939
21939
  }
21940
21940
  function hermesAgentCandidateDirs() {
21941
21941
  const home2 = userHome();
21942
21942
  const hermesHome = resolveHermesHomePath();
21943
21943
  return [
21944
21944
  hermesHome,
21945
- join10(hermesHome, "hermes-agent"),
21946
- join10(home2, "hermes-agent"),
21947
- join10(home2, ".local", "share", "hermes-agent"),
21948
- join10(home2, "src", "hermes-agent"),
21945
+ join11(hermesHome, "hermes-agent"),
21946
+ join11(home2, "hermes-agent"),
21947
+ join11(home2, ".local", "share", "hermes-agent"),
21948
+ join11(home2, "src", "hermes-agent"),
21949
21949
  "/opt/hermes-agent"
21950
21950
  ];
21951
21951
  }
21952
21952
  function resolveHermesRepoPath() {
21953
21953
  const hermesRepo = process.env.HERMES_REPO?.trim();
21954
- if (hermesRepo && existsSync10(join10(hermesRepo, "plugins", "memory"))) {
21954
+ if (hermesRepo && existsSync11(join11(hermesRepo, "plugins", "memory"))) {
21955
21955
  return hermesRepo;
21956
21956
  }
21957
21957
  for (const base of hermesAgentCandidateDirs()) {
21958
- if (existsSync10(join10(base, "plugins", "memory")))
21958
+ if (existsSync11(join11(base, "plugins", "memory")))
21959
21959
  return base;
21960
21960
  }
21961
21961
  try {
@@ -21965,14 +21965,14 @@ function resolveHermesRepoPath() {
21965
21965
  timeout: 3000
21966
21966
  }).trim();
21967
21967
  if (hermesPath) {
21968
- const repoDir = dirname6(realpathSync(hermesPath));
21969
- if (existsSync10(join10(repoDir, "plugins", "memory")))
21968
+ const repoDir = dirname7(realpathSync(hermesPath));
21969
+ if (existsSync11(join11(repoDir, "plugins", "memory")))
21970
21970
  return repoDir;
21971
21971
  }
21972
21972
  } catch {}
21973
21973
  return null;
21974
21974
  }
21975
- var home2 = homedir72();
21975
+ var home2 = homedir82();
21976
21976
  var SKIP_SUBTYPES2 = new Set([
21977
21977
  "channel_join",
21978
21978
  "channel_leave",
@@ -22091,7 +22091,7 @@ var CODE_EXTS2 = new Set([
22091
22091
  var SKIP_FILES2 = new Set([".DS_Store", "Thumbs.db", ".gitkeep", "node_modules", ".git", ".env", ".env.local"]);
22092
22092
 
22093
22093
  // src/index.ts
22094
- var __dirname3 = dirname7(fileURLToPath3(import.meta.url));
22094
+ var __dirname3 = dirname5(fileURLToPath3(import.meta.url));
22095
22095
  function getPluginSourceDir() {
22096
22096
  const fromDist = join4(__dirname3, "..", "hermes-plugin");
22097
22097
  if (existsSync2(fromDist))
@@ -22289,7 +22289,7 @@ function writeProviderBackup(hermesHome, configPath, providerKind, previousProvi
22289
22289
  previousProvider,
22290
22290
  createdAt: new Date().toISOString()
22291
22291
  };
22292
- mkdirSync(dirname7(backupPath), { recursive: true });
22292
+ mkdirSync(dirname5(backupPath), { recursive: true });
22293
22293
  writeFileSync2(backupPath, `${JSON.stringify(backup, null, 2)}
22294
22294
  `);
22295
22295
  return backupPath;
@@ -22372,7 +22372,7 @@ function configureProvider(hermesHome, warnings) {
22372
22372
  }
22373
22373
  if (!changed)
22374
22374
  return { configPath: null, backupPath: null };
22375
- mkdirSync(dirname7(configPath), { recursive: true });
22375
+ mkdirSync(dirname5(configPath), { recursive: true });
22376
22376
  writeFileSync2(configPath, `${lines.join(`
22377
22377
  `).replace(/\n+$/g, "")}
22378
22378
  `);
@@ -22394,7 +22394,7 @@ function configureProvider(hermesHome, warnings) {
22394
22394
  lines.push("");
22395
22395
  lines.push("memory:", " provider: signet");
22396
22396
  }
22397
- mkdirSync(dirname7(configPath), { recursive: true });
22397
+ mkdirSync(dirname5(configPath), { recursive: true });
22398
22398
  writeFileSync2(configPath, `${lines.join(`
22399
22399
  `).replace(/\n+$/g, "")}
22400
22400
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-hermes-agent",
3
- "version": "0.154.4",
3
+ "version": "0.154.7",
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.154.4",
29
- "@signetai/core": "0.154.4"
28
+ "@signetai/connector-base": "0.154.7",
29
+ "@signetai/core": "0.154.7"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.0.0",