@signetai/connector-hermes-agent 0.211.1 → 0.211.2

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.d.ts CHANGED
@@ -12,6 +12,9 @@ export interface HermesConnectorOptions {
12
12
  readonly memoryPolicy?: "isolated" | "shared" | "group";
13
13
  readonly policyGroup?: string;
14
14
  }
15
+ export interface HermesConnectorTarget {
16
+ readonly profile?: string;
17
+ }
15
18
  export interface HermesDoctorReport {
16
19
  readonly ok: boolean;
17
20
  readonly hermesHome: string;
@@ -26,12 +29,13 @@ export interface HermesDoctorReport {
26
29
  export declare class HermesAgentConnector extends BaseConnector {
27
30
  readonly name = "Hermes Agent";
28
31
  readonly harnessId = "hermes-agent";
29
- private targetOptions;
32
+ private readonly target?;
33
+ constructor(target?: HermesConnectorTarget);
30
34
  private getHermesHome;
31
35
  private getHermesRepo;
32
36
  getConfigPath(): string;
33
37
  install(basePath: string, options?: HermesConnectorOptions): Promise<InstallResult>;
34
- uninstall(options?: HermesConnectorOptions): Promise<UninstallResult>;
38
+ uninstall(): Promise<UninstallResult>;
35
39
  isInstalled(): boolean;
36
40
  diagnose(): Promise<HermesDoctorReport>;
37
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAuB,MAAM,wBAAwB,CAAC;AAoDtH,MAAM,WAAW,qBAAqB;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,sBAAsB;IACtC,QAAQ,CAAC,OA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aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAClD,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAiuBD,qBAAa,oBAAqB,SAAQ,aAAa;IACtD,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,SAAS,kBAAkB;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAwB;gBAEpC,MAAM,CAAC,EAAE,qBAAqB;IAK1C,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,aAAa;IAKrB,aAAa,IAAI,MAAM;IAIjB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,aAAa,CAAC;IA6MvF,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC;IA4D3C,WAAW,IAAI,OAAO;IAQhB,QAAQ,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAS7C;AAED,wBAAsB,yBAAyB,CAAC,IAAI,CAAC,EAAE;IACtD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC5B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAuG9B;AAED,wBAAgB,eAAe,IAAI,oBAAoB,CAEtD;AAED,eAAe,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -35088,20 +35088,24 @@ async function ensureNamedAgentRegistered(daemonUrl, agentId, warnings, options
35088
35088
  class HermesAgentConnector extends BaseConnector {
35089
35089
  name = "Hermes Agent";
35090
35090
  harnessId = "hermes-agent";
35091
- targetOptions = {};
35091
+ target;
35092
+ constructor(target) {
35093
+ super();
35094
+ this.target = target;
35095
+ }
35092
35096
  getHermesHome() {
35093
- if (this.targetOptions.profile) {
35094
- if (!/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/.test(this.targetOptions.profile)) {
35097
+ if (this.target?.profile) {
35098
+ if (!/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/.test(this.target.profile)) {
35095
35099
  throw new Error("Invalid Hermes profile name; use 1-64 letters, numbers, '.', '_' or '-'.");
35096
35100
  }
35097
35101
  const userHome2 = process.env.HOME?.trim() || homedir();
35098
- const profileHome = join4(userHome2, ".hermes", "profiles", this.targetOptions.profile);
35102
+ const profileHome = join4(userHome2, ".hermes", "profiles", this.target.profile);
35099
35103
  return resolveContainedWritePath(profileHome, join4(userHome2, ".hermes", "profiles"));
35100
35104
  }
35101
35105
  return resolveHermesHomePath();
35102
35106
  }
35103
35107
  getHermesRepo() {
35104
- if (this.targetOptions.profile)
35108
+ if (this.target?.profile)
35105
35109
  return null;
35106
35110
  return resolveHermesRepoPath();
35107
35111
  }
@@ -35109,12 +35113,11 @@ class HermesAgentConnector extends BaseConnector {
35109
35113
  return resolveConfigPath(this.getHermesHome());
35110
35114
  }
35111
35115
  async install(basePath, options = {}) {
35112
- this.targetOptions = options;
35113
35116
  const filesWritten = [];
35114
35117
  const configsPatched = [];
35115
35118
  const warnings = [];
35116
35119
  const expandedBasePath = expandHome(basePath || join4(homedir(), ".agents"));
35117
- const strippedAgentsPath = options.profile ? null : this.stripLegacySignetBlock(expandedBasePath);
35120
+ const strippedAgentsPath = this.target?.profile ? null : this.stripLegacySignetBlock(expandedBasePath);
35118
35121
  if (strippedAgentsPath !== null) {
35119
35122
  filesWritten.push(strippedAgentsPath);
35120
35123
  }
@@ -35257,8 +35260,7 @@ ${key}=${value}
35257
35260
  warnings
35258
35261
  };
35259
35262
  }
35260
- async uninstall(options = {}) {
35261
- this.targetOptions = options;
35263
+ async uninstall() {
35262
35264
  const filesRemoved = [];
35263
35265
  const configsPatched = [];
35264
35266
  const hermesRepo = this.getHermesRepo();
@@ -35268,19 +35270,19 @@ ${key}=${value}
35268
35270
  }
35269
35271
  const hermesHome = this.getHermesHome();
35270
35272
  const userPluginTarget = getUserPluginTargetDir(hermesHome);
35271
- if (options.profile && (!existsSync2(userPluginTarget) || readInstallMarker(userPluginTarget) === null)) {
35273
+ if (this.target?.profile && (!existsSync2(userPluginTarget) || readInstallMarker(userPluginTarget) === null)) {
35272
35274
  return { filesRemoved, configsPatched };
35273
35275
  }
35274
- const userPluginRemoved = uninstallPlugin(userPluginTarget, options.profile ? hermesHome : undefined);
35276
+ const userPluginRemoved = uninstallPlugin(userPluginTarget, this.target?.profile ? hermesHome : undefined);
35275
35277
  filesRemoved.push(...userPluginRemoved);
35276
- const providerConfig = restoreOrClearProvider(hermesHome, options.profile ? hermesHome : undefined);
35278
+ const providerConfig = restoreOrClearProvider(hermesHome, this.target?.profile ? hermesHome : undefined);
35277
35279
  if (providerConfig.configPath) {
35278
35280
  configsPatched.push(providerConfig.configPath);
35279
35281
  }
35280
35282
  if (providerConfig.backupPath) {
35281
35283
  filesRemoved.push(providerConfig.backupPath);
35282
35284
  }
35283
- const envPath = options.profile ? resolveContainedWritePath(join4(hermesHome, ".env"), hermesHome) : join4(hermesHome, ".env");
35285
+ const envPath = this.target?.profile ? resolveContainedWritePath(join4(hermesHome, ".env"), hermesHome) : join4(hermesHome, ".env");
35284
35286
  if (existsSync2(envPath)) {
35285
35287
  try {
35286
35288
  let envContent = readFileSync2(envPath, "utf-8");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-hermes-agent",
3
- "version": "0.211.1",
3
+ "version": "0.211.2",
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.211.1",
29
- "@signetai/core": "0.211.1"
28
+ "@signetai/connector-base": "0.211.2",
29
+ "@signetai/core": "0.211.2"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.0.0",