@signetai/connector-hermes-agent 0.219.6 → 0.221.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.
package/dist/index.js CHANGED
@@ -20,10 +20,10 @@ import { homedir as homedir5 } from "node:os";
20
20
  import { dirname as dirname4, join as join8, resolve as resolve3 } from "node:path";
21
21
  import { homedir as homedir6, platform as platform2 } from "node:os";
22
22
  import { basename, dirname as dirname5, resolve as resolve5 } from "node:path";
23
- import { existsSync as existsSync13, readFileSync as readFileSync11, readdirSync as readdirSync5, realpathSync, statSync as statSync7 } from "node:fs";
24
- import { homedir as homedir9 } from "node:os";
25
- import { dirname as dirname8, join as join13 } from "node:path";
26
- import { homedir as homedir10 } from "node:os";
23
+ import { existsSync as existsSync11, readFileSync as readFileSync9, realpathSync, statSync as statSync7 } from "node:fs";
24
+ import { homedir as homedir7 } from "node:os";
25
+ import { dirname as dirname6, join as join11 } from "node:path";
26
+ import { homedir as homedir8 } from "node:os";
27
27
  var __create = Object.create;
28
28
  var __getProtoOf = Object.getPrototypeOf;
29
29
  var __defProp = Object.defineProperty;
@@ -17944,31 +17944,31 @@ var IDENTITY_FILES = {
17944
17944
  var REQUIRED_IDENTITY_KEYS = Object.entries(IDENTITY_FILES).filter(([, spec]) => !spec.optional).map(([key]) => key);
17945
17945
  var OPTIONAL_IDENTITY_KEYS = Object.entries(IDENTITY_FILES).filter(([, spec]) => spec.optional).map(([key]) => key);
17946
17946
  function userHome() {
17947
- return process.env.HOME?.trim() || homedir9();
17947
+ return process.env.HOME?.trim() || homedir7();
17948
17948
  }
17949
17949
  function resolveHermesHomePath() {
17950
17950
  const hermesHome = process.env.HERMES_HOME?.trim();
17951
- return hermesHome || join13(userHome(), ".hermes");
17951
+ return hermesHome || join11(userHome(), ".hermes");
17952
17952
  }
17953
17953
  function hermesAgentCandidateDirs() {
17954
17954
  const home = userHome();
17955
17955
  const hermesHome = resolveHermesHomePath();
17956
17956
  return [
17957
17957
  hermesHome,
17958
- join13(hermesHome, "hermes-agent"),
17959
- join13(home, "hermes-agent"),
17960
- join13(home, ".local", "share", "hermes-agent"),
17961
- join13(home, "src", "hermes-agent"),
17958
+ join11(hermesHome, "hermes-agent"),
17959
+ join11(home, "hermes-agent"),
17960
+ join11(home, ".local", "share", "hermes-agent"),
17961
+ join11(home, "src", "hermes-agent"),
17962
17962
  "/opt/hermes-agent"
17963
17963
  ];
17964
17964
  }
17965
17965
  function resolveHermesRepoPath() {
17966
17966
  const hermesRepo = process.env.HERMES_REPO?.trim();
17967
- if (hermesRepo && existsSync13(join13(hermesRepo, "plugins", "memory"))) {
17967
+ if (hermesRepo && existsSync11(join11(hermesRepo, "plugins", "memory"))) {
17968
17968
  return hermesRepo;
17969
17969
  }
17970
17970
  for (const base of hermesAgentCandidateDirs()) {
17971
- if (existsSync13(join13(base, "plugins", "memory")))
17971
+ if (existsSync11(join11(base, "plugins", "memory")))
17972
17972
  return base;
17973
17973
  }
17974
17974
  try {
@@ -17978,20 +17978,20 @@ function resolveHermesRepoPath() {
17978
17978
  timeout: 3000
17979
17979
  }).trim();
17980
17980
  if (hermesPath) {
17981
- const repoDir = dirname8(realpathSync(hermesPath));
17982
- if (existsSync13(join13(repoDir, "plugins", "memory")))
17981
+ const repoDir = dirname6(realpathSync(hermesPath));
17982
+ if (existsSync11(join11(repoDir, "plugins", "memory")))
17983
17983
  return repoDir;
17984
17984
  }
17985
17985
  } catch {}
17986
17986
  return null;
17987
17987
  }
17988
- var home = homedir10();
17988
+ var home = homedir8();
17989
17989
 
17990
17990
  // src/index.ts
17991
17991
  import { createHash as createHash5 } from "node:crypto";
17992
17992
  import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, realpathSync as realpathSync3, rmSync, writeFileSync as writeFileSync2 } from "node:fs";
17993
17993
  import { homedir } from "node:os";
17994
- import { dirname as dirname6, isAbsolute as isAbsolute2, join as join6, relative as relative2 } from "node:path";
17994
+ import { dirname as dirname7, isAbsolute as isAbsolute2, join as join6, relative as relative2 } from "node:path";
17995
17995
  import { fileURLToPath as fileURLToPath3 } from "node:url";
17996
17996
 
17997
17997
  // ../../../libs/connector-base/dist/index.js
@@ -18017,9 +18017,9 @@ import { homedir as homedir52 } from "node:os";
18017
18017
  import { dirname as dirname42, join as join82, resolve as resolve32 } from "node:path";
18018
18018
  import { homedir as homedir62, platform as platform22 } from "node:os";
18019
18019
  import { basename as basename2, dirname as dirname52, resolve as resolve52 } from "node:path";
18020
- import { homedir as homedir102 } from "node:os";
18021
- import { existsSync as existsSync15, lstatSync, mkdirSync as mkdirSync10, readdirSync as readdirSync7, symlinkSync, unlinkSync as unlinkSync2 } from "node:fs";
18022
- import { join as join15 } from "node:path";
18020
+ import { homedir as homedir82 } from "node:os";
18021
+ import { existsSync as existsSync13, lstatSync, mkdirSync as mkdirSync8, readdirSync as readdirSync6, symlinkSync, unlinkSync as unlinkSync2 } from "node:fs";
18022
+ import { join as join13 } from "node:path";
18023
18023
  var __create2 = Object.create;
18024
18024
  var __getProtoOf2 = Object.getPrototypeOf;
18025
18025
  var __defProp2 = Object.defineProperty;
@@ -35928,19 +35928,19 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
35928
35928
  skipped: [],
35929
35929
  errors: []
35930
35930
  };
35931
- if (!existsSync15(sourceDir)) {
35931
+ if (!existsSync13(sourceDir)) {
35932
35932
  return result;
35933
35933
  }
35934
- const targetParent = join15(targetDir, "..");
35935
- if (!existsSync15(targetParent)) {
35936
- mkdirSync10(targetParent, { recursive: true });
35934
+ const targetParent = join13(targetDir, "..");
35935
+ if (!existsSync13(targetParent)) {
35936
+ mkdirSync8(targetParent, { recursive: true });
35937
35937
  }
35938
- if (!existsSync15(targetDir)) {
35939
- mkdirSync10(targetDir, { recursive: true });
35938
+ if (!existsSync13(targetDir)) {
35939
+ mkdirSync8(targetDir, { recursive: true });
35940
35940
  }
35941
35941
  let entries;
35942
35942
  try {
35943
- entries = readdirSync7(sourceDir);
35943
+ entries = readdirSync6(sourceDir);
35944
35944
  } catch (e) {
35945
35945
  result.errors.push({
35946
35946
  path: sourceDir,
@@ -35949,8 +35949,8 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
35949
35949
  return result;
35950
35950
  }
35951
35951
  for (const entry of entries) {
35952
- const srcPath = join15(sourceDir, entry);
35953
- const destPath = join15(targetDir, entry);
35952
+ const srcPath = join13(sourceDir, entry);
35953
+ const destPath = join13(targetDir, entry);
35954
35954
  try {
35955
35955
  const src = lstatSync(srcPath);
35956
35956
  if (src.isSymbolicLink() || !src.isDirectory()) {
@@ -35991,7 +35991,7 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
35991
35991
  }
35992
35992
  return result;
35993
35993
  }
35994
- var home2 = homedir102();
35994
+ var home2 = homedir82();
35995
35995
  var SIGNET_BLOCK_START = "<!-- SIGNET:START -->";
35996
35996
  var SIGNET_BLOCK_END = "<!-- SIGNET:END -->";
35997
35997
  function stripSignetBlock(content) {
@@ -36084,7 +36084,7 @@ function resolveSignetApiKey() {
36084
36084
  }
36085
36085
 
36086
36086
  // src/index.ts
36087
- var __dirname3 = dirname6(fileURLToPath3(import.meta.url));
36087
+ var __dirname3 = dirname7(fileURLToPath3(import.meta.url));
36088
36088
  function getPluginSourceDir() {
36089
36089
  const fromDist = join6(__dirname3, "..", "hermes-plugin");
36090
36090
  if (existsSync2(fromDist))
@@ -36123,7 +36123,7 @@ var REQUIRED_TOOL_NAMES = [
36123
36123
  function resolveContainedWritePath(targetPath, targetRoot) {
36124
36124
  let rootPath = targetRoot;
36125
36125
  while (!existsSync2(rootPath)) {
36126
- const parent = dirname6(rootPath);
36126
+ const parent = dirname7(rootPath);
36127
36127
  if (parent === rootPath)
36128
36128
  throw new Error(`Hermes target root does not exist: ${targetRoot}`);
36129
36129
  rootPath = parent;
@@ -36135,7 +36135,7 @@ function resolveContainedWritePath(targetPath, targetRoot) {
36135
36135
  let existing = targetPath;
36136
36136
  const missing = [];
36137
36137
  while (!existsSync2(existing)) {
36138
- const parent = dirname6(existing);
36138
+ const parent = dirname7(existing);
36139
36139
  if (parent === existing)
36140
36140
  throw new Error(`Hermes target path does not have an existing ancestor: ${targetPath}`);
36141
36141
  missing.unshift(existing.slice(parent.length + 1));
@@ -36315,7 +36315,7 @@ function writeProviderBackup(hermesHome, configPath, providerKind, previousProvi
36315
36315
  previousProvider,
36316
36316
  createdAt: new Date().toISOString()
36317
36317
  };
36318
- mkdirSync(dirname6(backupPath), { recursive: true });
36318
+ mkdirSync(dirname7(backupPath), { recursive: true });
36319
36319
  writeFileSync2(backupPath, `${JSON.stringify(backup, null, 2)}
36320
36320
  `);
36321
36321
  return backupPath;
@@ -36398,7 +36398,7 @@ function configureProvider(hermesHome, warnings, targetRoot) {
36398
36398
  }
36399
36399
  if (!changed)
36400
36400
  return { configPath: null, backupPath: null };
36401
- mkdirSync(dirname6(configPath), { recursive: true });
36401
+ mkdirSync(dirname7(configPath), { recursive: true });
36402
36402
  writeFileSync2(configPath, `${lines.join(`
36403
36403
  `).replace(/\n+$/g, "")}
36404
36404
  `);
@@ -36420,7 +36420,7 @@ function configureProvider(hermesHome, warnings, targetRoot) {
36420
36420
  lines.push("");
36421
36421
  lines.push("memory:", " provider: signet");
36422
36422
  }
36423
- mkdirSync(dirname6(configPath), { recursive: true });
36423
+ mkdirSync(dirname7(configPath), { recursive: true });
36424
36424
  writeFileSync2(configPath, `${lines.join(`
36425
36425
  `).replace(/\n+$/g, "")}
36426
36426
  `);
@@ -1263,27 +1263,9 @@ class SignetMemoryProvider(MemoryProvider):
1263
1263
 
1264
1264
  def on_delegation(self, task: str, result: str, *,
1265
1265
  child_session_id: str = "", **kwargs) -> None:
1266
- """Observe subagent delegation results — store as a memory."""
1267
- client = self._client
1268
- if not client or not result:
1266
+ """Refresh pending peer notifications."""
1267
+ if not self._client:
1269
1268
  return
1270
- project = self._project
1271
-
1272
- content = f"Delegated task: {task[:200]}\nResult: {result[:500]}"
1273
-
1274
- def _run():
1275
- try:
1276
- client.remember(
1277
- content,
1278
- importance=0.6,
1279
- tags=["delegation", "subagent"],
1280
- project=project,
1281
- )
1282
- except Exception as e:
1283
- logger.debug("Signet delegation memory failed: %s", e)
1284
-
1285
- t = threading.Thread(target=_run, daemon=True, name="signet-delegation")
1286
- t.start()
1287
1269
  self._queue_notification_refresh("on_delegation")
1288
1270
 
1289
1271
  def _fire_checkpoint(self) -> None:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-hermes-agent",
3
- "version": "0.219.6",
3
+ "version": "0.221.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.219.6",
29
- "@signetai/core": "0.219.6"
28
+ "@signetai/connector-base": "0.221.1",
29
+ "@signetai/core": "0.221.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.0.0",