@signetai/connector-hermes-agent 0.200.3 → 0.200.4
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 +42 -42
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -8,20 +8,20 @@ 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 as renameSync2, statSync
|
|
12
|
-
import { dirname as
|
|
11
|
+
import { existsSync, readFileSync, renameSync as renameSync2, statSync, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
|
|
12
|
+
import { dirname as dirname2, isAbsolute, join as join3, relative, sep } 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 { createHash } from "node:crypto";
|
|
17
17
|
import { createRequire as createRequire2 } from "node:module";
|
|
18
|
-
import { homedir as
|
|
19
|
-
import { dirname as
|
|
20
|
-
import { homedir as
|
|
21
|
-
import { basename, dirname as
|
|
22
|
-
import { homedir as
|
|
18
|
+
import { homedir as homedir5 } from "node:os";
|
|
19
|
+
import { dirname as dirname4, join as join7, resolve as resolve2 } from "node:path";
|
|
20
|
+
import { homedir as homedir6, platform as platform2 } from "node:os";
|
|
21
|
+
import { basename, dirname as dirname5, resolve as resolve4 } from "node:path";
|
|
22
|
+
import { homedir as homedir10 } from "node:os";
|
|
23
23
|
import { existsSync as existsSync13, lstatSync, mkdirSync as mkdirSync9, readdirSync as readdirSync6, symlinkSync, unlinkSync } from "node:fs";
|
|
24
|
-
import { join as
|
|
24
|
+
import { join as join14 } from "node:path";
|
|
25
25
|
var __create2 = Object.create;
|
|
26
26
|
var __getProtoOf2 = Object.getPrototypeOf;
|
|
27
27
|
var __defProp2 = Object.defineProperty;
|
|
@@ -12363,7 +12363,7 @@ try {
|
|
|
12363
12363
|
const esmRequire = createRequire2(import.meta.url);
|
|
12364
12364
|
native = esmRequire("@signet/native");
|
|
12365
12365
|
} catch {}
|
|
12366
|
-
var GRAPHIQ_DEFAULT_INSTALL_DIR =
|
|
12366
|
+
var GRAPHIQ_DEFAULT_INSTALL_DIR = join7(homedir5(), ".local", "bin");
|
|
12367
12367
|
var SIGNET_SOURCE_CHECKOUT_DIRNAME = "signetai";
|
|
12368
12368
|
var SIGNET_GIT_ALLOWED_DIRECTORIES = ["skills", "tools", "dreaming"];
|
|
12369
12369
|
var SIGNET_GIT_PROTECTED_PATHS = [
|
|
@@ -12433,11 +12433,11 @@ var VALID_GITHUB_RESOURCE_TYPES = new Set(DEFAULT_GITHUB_RESOURCE_TYPES);
|
|
|
12433
12433
|
function defaultDiscordDesktopCachePath() {
|
|
12434
12434
|
switch (platform2()) {
|
|
12435
12435
|
case "darwin":
|
|
12436
|
-
return resolve4(
|
|
12436
|
+
return resolve4(homedir6(), "Library", "Application Support", "discord");
|
|
12437
12437
|
case "win32":
|
|
12438
|
-
return resolve4(process.env.APPDATA || resolve4(
|
|
12438
|
+
return resolve4(process.env.APPDATA || resolve4(homedir6(), "AppData", "Roaming"), "discord");
|
|
12439
12439
|
default:
|
|
12440
|
-
return resolve4(process.env.XDG_CONFIG_HOME || resolve4(
|
|
12440
|
+
return resolve4(process.env.XDG_CONFIG_HOME || resolve4(homedir6(), ".config"), "discord");
|
|
12441
12441
|
}
|
|
12442
12442
|
}
|
|
12443
12443
|
var IDENTITY_FILES = {
|
|
@@ -12508,7 +12508,7 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
|
|
|
12508
12508
|
if (!existsSync13(sourceDir)) {
|
|
12509
12509
|
return result;
|
|
12510
12510
|
}
|
|
12511
|
-
const targetParent =
|
|
12511
|
+
const targetParent = join14(targetDir, "..");
|
|
12512
12512
|
if (!existsSync13(targetParent)) {
|
|
12513
12513
|
mkdirSync9(targetParent, { recursive: true });
|
|
12514
12514
|
}
|
|
@@ -12526,8 +12526,8 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
|
|
|
12526
12526
|
return result;
|
|
12527
12527
|
}
|
|
12528
12528
|
for (const entry of entries) {
|
|
12529
|
-
const srcPath =
|
|
12530
|
-
const destPath =
|
|
12529
|
+
const srcPath = join14(sourceDir, entry);
|
|
12530
|
+
const destPath = join14(targetDir, entry);
|
|
12531
12531
|
try {
|
|
12532
12532
|
const src = lstatSync(srcPath);
|
|
12533
12533
|
if (src.isSymbolicLink() || !src.isDirectory()) {
|
|
@@ -12568,7 +12568,7 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
|
|
|
12568
12568
|
}
|
|
12569
12569
|
return result;
|
|
12570
12570
|
}
|
|
12571
|
-
var home =
|
|
12571
|
+
var home = homedir10();
|
|
12572
12572
|
var SIGNET_BLOCK_START = "<!-- SIGNET:START -->";
|
|
12573
12573
|
var SIGNET_BLOCK_END = "<!-- SIGNET:END -->";
|
|
12574
12574
|
function stripSignetBlock(content) {
|
|
@@ -12609,7 +12609,7 @@ class BaseConnector {
|
|
|
12609
12609
|
generateHeader(sourcePath, targetName) {
|
|
12610
12610
|
const name = targetName || this.name;
|
|
12611
12611
|
const safe = (p) => p.replace(/[\n\r]/g, "");
|
|
12612
|
-
const root =
|
|
12612
|
+
const root = dirname2(sourcePath);
|
|
12613
12613
|
return `# Auto-generated from ${safe(sourcePath)}
|
|
12614
12614
|
# Source: ${safe(sourcePath)}
|
|
12615
12615
|
# Generated: ${new Date().toISOString()}
|
|
@@ -12656,21 +12656,21 @@ function resolveSignetApiKey() {
|
|
|
12656
12656
|
|
|
12657
12657
|
// ../../../platform/core/dist/index.js
|
|
12658
12658
|
import { createRequire as createRequire3 } from "node:module";
|
|
12659
|
-
import { dirname as
|
|
12659
|
+
import { dirname as dirname3, join as join2 } from "node:path";
|
|
12660
12660
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
12661
12661
|
import { createHash as createHash2 } from "node:crypto";
|
|
12662
12662
|
import { homedir as homedir2 } from "os";
|
|
12663
12663
|
import { join as join22 } from "path";
|
|
12664
12664
|
import { createRequire as createRequire22 } from "node:module";
|
|
12665
|
-
import { homedir as
|
|
12666
|
-
import { dirname as
|
|
12667
|
-
import { homedir as
|
|
12668
|
-
import { basename as basename2, dirname as
|
|
12665
|
+
import { homedir as homedir52 } from "node:os";
|
|
12666
|
+
import { dirname as dirname42, join as join72, resolve as resolve22 } from "node:path";
|
|
12667
|
+
import { homedir as homedir62, platform as platform22 } from "node:os";
|
|
12668
|
+
import { basename as basename2, dirname as dirname52, resolve as resolve42 } from "node:path";
|
|
12669
12669
|
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
12670
|
-
import { existsSync as existsSync11, readFileSync as readFileSync9, readdirSync as readdirSync4, realpathSync, statSync as
|
|
12671
|
-
import { homedir as
|
|
12672
|
-
import { dirname as
|
|
12673
|
-
import { homedir as
|
|
12670
|
+
import { existsSync as existsSync11, readFileSync as readFileSync9, readdirSync as readdirSync4, realpathSync, statSync as statSync6 } from "node:fs";
|
|
12671
|
+
import { homedir as homedir9 } from "node:os";
|
|
12672
|
+
import { dirname as dirname8, join as join12 } from "node:path";
|
|
12673
|
+
import { homedir as homedir102 } from "node:os";
|
|
12674
12674
|
var __create = Object.create;
|
|
12675
12675
|
var __getProtoOf = Object.getPrototypeOf;
|
|
12676
12676
|
var __defProp = Object.defineProperty;
|
|
@@ -25003,7 +25003,7 @@ var MIGRATIONS2 = [
|
|
|
25003
25003
|
var LATEST_SCHEMA_VERSION2 = MIGRATIONS2[MIGRATIONS2.length - 1]?.version ?? 0;
|
|
25004
25004
|
var NETWORK_FILESYSTEM_TYPES2 = new Set(["afpfs", "nfs", "smbfs", "webdav"]);
|
|
25005
25005
|
var __filename22 = fileURLToPath2(import.meta.url);
|
|
25006
|
-
var __dirname22 =
|
|
25006
|
+
var __dirname22 = dirname3(__filename22);
|
|
25007
25007
|
var import_yaml3 = __toESM(require_dist2(), 1);
|
|
25008
25008
|
function expandHome(p, home2 = homedir2()) {
|
|
25009
25009
|
if (p === "~")
|
|
@@ -25019,7 +25019,7 @@ try {
|
|
|
25019
25019
|
const esmRequire = createRequire22(import.meta.url);
|
|
25020
25020
|
native2 = esmRequire("@signet/native");
|
|
25021
25021
|
} catch {}
|
|
25022
|
-
var GRAPHIQ_DEFAULT_INSTALL_DIR2 =
|
|
25022
|
+
var GRAPHIQ_DEFAULT_INSTALL_DIR2 = join72(homedir52(), ".local", "bin");
|
|
25023
25023
|
var SIGNET_SOURCE_CHECKOUT_DIRNAME2 = "signetai";
|
|
25024
25024
|
var SIGNET_GIT_ALLOWED_DIRECTORIES2 = ["skills", "tools", "dreaming"];
|
|
25025
25025
|
var SIGNET_GIT_PROTECTED_PATHS2 = [
|
|
@@ -25089,11 +25089,11 @@ var VALID_GITHUB_RESOURCE_TYPES2 = new Set(DEFAULT_GITHUB_RESOURCE_TYPES2);
|
|
|
25089
25089
|
function defaultDiscordDesktopCachePath2() {
|
|
25090
25090
|
switch (platform22()) {
|
|
25091
25091
|
case "darwin":
|
|
25092
|
-
return resolve42(
|
|
25092
|
+
return resolve42(homedir62(), "Library", "Application Support", "discord");
|
|
25093
25093
|
case "win32":
|
|
25094
|
-
return resolve42(process.env.APPDATA || resolve42(
|
|
25094
|
+
return resolve42(process.env.APPDATA || resolve42(homedir62(), "AppData", "Roaming"), "discord");
|
|
25095
25095
|
default:
|
|
25096
|
-
return resolve42(process.env.XDG_CONFIG_HOME || resolve42(
|
|
25096
|
+
return resolve42(process.env.XDG_CONFIG_HOME || resolve42(homedir62(), ".config"), "discord");
|
|
25097
25097
|
}
|
|
25098
25098
|
}
|
|
25099
25099
|
var IDENTITY_FILES2 = {
|
|
@@ -25152,31 +25152,31 @@ var IDENTITY_FILES2 = {
|
|
|
25152
25152
|
var REQUIRED_IDENTITY_KEYS2 = Object.entries(IDENTITY_FILES2).filter(([, spec]) => !spec.optional).map(([key]) => key);
|
|
25153
25153
|
var OPTIONAL_IDENTITY_KEYS2 = Object.entries(IDENTITY_FILES2).filter(([, spec]) => spec.optional).map(([key]) => key);
|
|
25154
25154
|
function userHome() {
|
|
25155
|
-
return process.env.HOME?.trim() ||
|
|
25155
|
+
return process.env.HOME?.trim() || homedir9();
|
|
25156
25156
|
}
|
|
25157
25157
|
function resolveHermesHomePath() {
|
|
25158
25158
|
const hermesHome = process.env.HERMES_HOME?.trim();
|
|
25159
|
-
return hermesHome ||
|
|
25159
|
+
return hermesHome || join12(userHome(), ".hermes");
|
|
25160
25160
|
}
|
|
25161
25161
|
function hermesAgentCandidateDirs() {
|
|
25162
25162
|
const home2 = userHome();
|
|
25163
25163
|
const hermesHome = resolveHermesHomePath();
|
|
25164
25164
|
return [
|
|
25165
25165
|
hermesHome,
|
|
25166
|
-
|
|
25167
|
-
|
|
25168
|
-
|
|
25169
|
-
|
|
25166
|
+
join12(hermesHome, "hermes-agent"),
|
|
25167
|
+
join12(home2, "hermes-agent"),
|
|
25168
|
+
join12(home2, ".local", "share", "hermes-agent"),
|
|
25169
|
+
join12(home2, "src", "hermes-agent"),
|
|
25170
25170
|
"/opt/hermes-agent"
|
|
25171
25171
|
];
|
|
25172
25172
|
}
|
|
25173
25173
|
function resolveHermesRepoPath() {
|
|
25174
25174
|
const hermesRepo = process.env.HERMES_REPO?.trim();
|
|
25175
|
-
if (hermesRepo && existsSync11(
|
|
25175
|
+
if (hermesRepo && existsSync11(join12(hermesRepo, "plugins", "memory"))) {
|
|
25176
25176
|
return hermesRepo;
|
|
25177
25177
|
}
|
|
25178
25178
|
for (const base of hermesAgentCandidateDirs()) {
|
|
25179
|
-
if (existsSync11(
|
|
25179
|
+
if (existsSync11(join12(base, "plugins", "memory")))
|
|
25180
25180
|
return base;
|
|
25181
25181
|
}
|
|
25182
25182
|
try {
|
|
@@ -25186,14 +25186,14 @@ function resolveHermesRepoPath() {
|
|
|
25186
25186
|
timeout: 3000
|
|
25187
25187
|
}).trim();
|
|
25188
25188
|
if (hermesPath) {
|
|
25189
|
-
const repoDir =
|
|
25190
|
-
if (existsSync11(
|
|
25189
|
+
const repoDir = dirname8(realpathSync(hermesPath));
|
|
25190
|
+
if (existsSync11(join12(repoDir, "plugins", "memory")))
|
|
25191
25191
|
return repoDir;
|
|
25192
25192
|
}
|
|
25193
25193
|
} catch {}
|
|
25194
25194
|
return null;
|
|
25195
25195
|
}
|
|
25196
|
-
var home2 =
|
|
25196
|
+
var home2 = homedir102();
|
|
25197
25197
|
|
|
25198
25198
|
// src/index.ts
|
|
25199
25199
|
var __dirname3 = dirname6(fileURLToPath3(import.meta.url));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/connector-hermes-agent",
|
|
3
|
-
"version": "0.200.
|
|
3
|
+
"version": "0.200.4",
|
|
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.200.
|
|
29
|
-
"@signetai/core": "0.200.
|
|
28
|
+
"@signetai/connector-base": "0.200.4",
|
|
29
|
+
"@signetai/core": "0.200.4"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.0.0",
|