@signetai/connector-hermes-agent 0.177.0 → 0.179.0
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 +81 -29
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3,20 +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
|
|
6
|
+
import { dirname as dirname6, 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
11
|
import { existsSync, readFileSync, renameSync, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
|
|
12
|
-
import { dirname as
|
|
12
|
+
import { dirname as dirname5, 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 { createRequire as createRequire2 } from "node:module";
|
|
17
|
-
import { homedir as homedir4
|
|
17
|
+
import { homedir as homedir4 } from "node:os";
|
|
18
|
+
import { dirname as dirname3, join as join6, resolve as resolve2 } from "node:path";
|
|
19
|
+
import { homedir as homedir5, platform as platform2 } from "node:os";
|
|
18
20
|
import { basename, dirname as dirname4, resolve as resolve4 } from "node:path";
|
|
19
|
-
import { homedir as
|
|
21
|
+
import { homedir as homedir9 } from "node:os";
|
|
20
22
|
import { existsSync as existsSync13, lstatSync, mkdirSync as mkdirSync9, readdirSync as readdirSync6, symlinkSync, unlinkSync } from "node:fs";
|
|
21
23
|
import { join as join13 } from "node:path";
|
|
22
24
|
var __create2 = Object.create;
|
|
@@ -10389,6 +10391,18 @@ function up110(db) {
|
|
|
10389
10391
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
10390
10392
|
`);
|
|
10391
10393
|
}
|
|
10394
|
+
function hasColumn19(db, table, column) {
|
|
10395
|
+
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
10396
|
+
return rows.some((row) => row.name === column);
|
|
10397
|
+
}
|
|
10398
|
+
var COLUMNS2 = ["first_remember_at", "first_recall_at"];
|
|
10399
|
+
function up111(db) {
|
|
10400
|
+
for (const column of COLUMNS2) {
|
|
10401
|
+
if (!hasColumn19(db, "telemetry_install", column)) {
|
|
10402
|
+
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
10403
|
+
}
|
|
10404
|
+
}
|
|
10405
|
+
}
|
|
10392
10406
|
var MIGRATIONS = [
|
|
10393
10407
|
{
|
|
10394
10408
|
version: 1,
|
|
@@ -11264,6 +11278,17 @@ var MIGRATIONS = [
|
|
|
11264
11278
|
version: 110,
|
|
11265
11279
|
name: "memory-mention-join-index",
|
|
11266
11280
|
up: up110
|
|
11281
|
+
},
|
|
11282
|
+
{
|
|
11283
|
+
version: 111,
|
|
11284
|
+
name: "telemetry-first-use",
|
|
11285
|
+
up: up111,
|
|
11286
|
+
artifacts: {
|
|
11287
|
+
columns: [
|
|
11288
|
+
{ table: "telemetry_install", column: "first_remember_at" },
|
|
11289
|
+
{ table: "telemetry_install", column: "first_recall_at" }
|
|
11290
|
+
]
|
|
11291
|
+
}
|
|
11267
11292
|
}
|
|
11268
11293
|
];
|
|
11269
11294
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|
|
@@ -11277,6 +11302,7 @@ try {
|
|
|
11277
11302
|
const esmRequire = createRequire2(import.meta.url);
|
|
11278
11303
|
native = esmRequire("@signet/native");
|
|
11279
11304
|
} catch {}
|
|
11305
|
+
var GRAPHIQ_DEFAULT_INSTALL_DIR = join6(homedir4(), ".local", "bin");
|
|
11280
11306
|
var SIGNET_SOURCE_CHECKOUT_DIRNAME = "signetai";
|
|
11281
11307
|
var SIGNET_GIT_ALLOWED_DIRECTORIES = ["skills", "tools", "dreaming"];
|
|
11282
11308
|
var SIGNET_GIT_PROTECTED_PATHS = [
|
|
@@ -11346,11 +11372,11 @@ var VALID_GITHUB_RESOURCE_TYPES = new Set(DEFAULT_GITHUB_RESOURCE_TYPES);
|
|
|
11346
11372
|
function defaultDiscordDesktopCachePath() {
|
|
11347
11373
|
switch (platform2()) {
|
|
11348
11374
|
case "darwin":
|
|
11349
|
-
return resolve4(
|
|
11375
|
+
return resolve4(homedir5(), "Library", "Application Support", "discord");
|
|
11350
11376
|
case "win32":
|
|
11351
|
-
return resolve4(process.env.APPDATA || resolve4(
|
|
11377
|
+
return resolve4(process.env.APPDATA || resolve4(homedir5(), "AppData", "Roaming"), "discord");
|
|
11352
11378
|
default:
|
|
11353
|
-
return resolve4(process.env.XDG_CONFIG_HOME || resolve4(
|
|
11379
|
+
return resolve4(process.env.XDG_CONFIG_HOME || resolve4(homedir5(), ".config"), "discord");
|
|
11354
11380
|
}
|
|
11355
11381
|
}
|
|
11356
11382
|
var IDENTITY_FILES = {
|
|
@@ -11481,7 +11507,7 @@ function symlinkSkills(sourceDir, targetDir, options = {}) {
|
|
|
11481
11507
|
}
|
|
11482
11508
|
return result;
|
|
11483
11509
|
}
|
|
11484
|
-
var home =
|
|
11510
|
+
var home = homedir9();
|
|
11485
11511
|
var SIGNET_BLOCK_START = "<!-- SIGNET:START -->";
|
|
11486
11512
|
var SIGNET_BLOCK_END = "<!-- SIGNET:END -->";
|
|
11487
11513
|
function stripSignetBlock(content) {
|
|
@@ -11522,7 +11548,7 @@ class BaseConnector {
|
|
|
11522
11548
|
generateHeader(sourcePath, targetName) {
|
|
11523
11549
|
const name = targetName || this.name;
|
|
11524
11550
|
const safe = (p) => p.replace(/[\n\r]/g, "");
|
|
11525
|
-
const root =
|
|
11551
|
+
const root = dirname5(sourcePath);
|
|
11526
11552
|
return `# Auto-generated from ${safe(sourcePath)}
|
|
11527
11553
|
# Source: ${safe(sourcePath)}
|
|
11528
11554
|
# Generated: ${new Date().toISOString()}
|
|
@@ -11574,13 +11600,15 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
|
11574
11600
|
import { homedir as homedir2 } from "os";
|
|
11575
11601
|
import { join as join22 } from "path";
|
|
11576
11602
|
import { createRequire as createRequire22 } from "node:module";
|
|
11577
|
-
import { homedir as homedir42
|
|
11603
|
+
import { homedir as homedir42 } from "node:os";
|
|
11604
|
+
import { dirname as dirname32, join as join62, resolve as resolve22 } from "node:path";
|
|
11605
|
+
import { homedir as homedir52, platform as platform22 } from "node:os";
|
|
11578
11606
|
import { basename as basename2, dirname as dirname42, resolve as resolve42 } from "node:path";
|
|
11579
11607
|
import { execFileSync } from "node:child_process";
|
|
11580
11608
|
import { existsSync as existsSync11, readFileSync as readFileSync9, readdirSync as readdirSync4, realpathSync, statSync as statSync5 } from "node:fs";
|
|
11581
|
-
import { homedir as
|
|
11609
|
+
import { homedir as homedir8 } from "node:os";
|
|
11582
11610
|
import { dirname as dirname7, join as join11 } from "node:path";
|
|
11583
|
-
import { homedir as
|
|
11611
|
+
import { homedir as homedir92 } from "node:os";
|
|
11584
11612
|
var __create = Object.create;
|
|
11585
11613
|
var __getProtoOf = Object.getPrototypeOf;
|
|
11586
11614
|
var __defProp = Object.defineProperty;
|
|
@@ -18528,7 +18556,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
|
|
|
18528
18556
|
return true;
|
|
18529
18557
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
|
|
18530
18558
|
}
|
|
18531
|
-
function
|
|
18559
|
+
function up112(db) {
|
|
18532
18560
|
db.exec(`
|
|
18533
18561
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
18534
18562
|
version INTEGER PRIMARY KEY,
|
|
@@ -18617,12 +18645,12 @@ function up111(db) {
|
|
|
18617
18645
|
} catch {}
|
|
18618
18646
|
createMemoriesFts2(db);
|
|
18619
18647
|
}
|
|
18620
|
-
function
|
|
18648
|
+
function hasColumn20(db, table, column) {
|
|
18621
18649
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
18622
18650
|
return rows.some((r) => r.name === column);
|
|
18623
18651
|
}
|
|
18624
18652
|
function addColumnIfMissing23(db, table, column, definition) {
|
|
18625
|
-
if (!
|
|
18653
|
+
if (!hasColumn20(db, table, column)) {
|
|
18626
18654
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
18627
18655
|
}
|
|
18628
18656
|
}
|
|
@@ -18951,7 +18979,7 @@ function up1010(db) {
|
|
|
18951
18979
|
)
|
|
18952
18980
|
`);
|
|
18953
18981
|
}
|
|
18954
|
-
function
|
|
18982
|
+
function up113(db) {
|
|
18955
18983
|
db.exec(`
|
|
18956
18984
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
18957
18985
|
id TEXT PRIMARY KEY,
|
|
@@ -21197,9 +21225,9 @@ function hasColumn112(db, table, column) {
|
|
|
21197
21225
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
21198
21226
|
return rows.some((row) => row.name === column);
|
|
21199
21227
|
}
|
|
21200
|
-
var
|
|
21228
|
+
var COLUMNS3 = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
|
|
21201
21229
|
function up822(db) {
|
|
21202
|
-
for (const column of
|
|
21230
|
+
for (const column of COLUMNS3) {
|
|
21203
21231
|
if (!hasColumn112(db, "skill_invocations", column)) {
|
|
21204
21232
|
db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
|
|
21205
21233
|
}
|
|
@@ -21951,11 +21979,23 @@ function up1102(db) {
|
|
|
21951
21979
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
21952
21980
|
`);
|
|
21953
21981
|
}
|
|
21982
|
+
function hasColumn192(db, table, column) {
|
|
21983
|
+
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
21984
|
+
return rows.some((row) => row.name === column);
|
|
21985
|
+
}
|
|
21986
|
+
var COLUMNS22 = ["first_remember_at", "first_recall_at"];
|
|
21987
|
+
function up1112(db) {
|
|
21988
|
+
for (const column of COLUMNS22) {
|
|
21989
|
+
if (!hasColumn192(db, "telemetry_install", column)) {
|
|
21990
|
+
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
21991
|
+
}
|
|
21992
|
+
}
|
|
21993
|
+
}
|
|
21954
21994
|
var MIGRATIONS2 = [
|
|
21955
21995
|
{
|
|
21956
21996
|
version: 1,
|
|
21957
21997
|
name: "baseline",
|
|
21958
|
-
up:
|
|
21998
|
+
up: up112,
|
|
21959
21999
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
21960
22000
|
},
|
|
21961
22001
|
{
|
|
@@ -22021,7 +22061,7 @@ var MIGRATIONS2 = [
|
|
|
22021
22061
|
{
|
|
22022
22062
|
version: 11,
|
|
22023
22063
|
name: "session-scores",
|
|
22024
|
-
up:
|
|
22064
|
+
up: up113,
|
|
22025
22065
|
artifacts: { tables: ["session_scores"] }
|
|
22026
22066
|
},
|
|
22027
22067
|
{
|
|
@@ -22826,6 +22866,17 @@ var MIGRATIONS2 = [
|
|
|
22826
22866
|
version: 110,
|
|
22827
22867
|
name: "memory-mention-join-index",
|
|
22828
22868
|
up: up1102
|
|
22869
|
+
},
|
|
22870
|
+
{
|
|
22871
|
+
version: 111,
|
|
22872
|
+
name: "telemetry-first-use",
|
|
22873
|
+
up: up1112,
|
|
22874
|
+
artifacts: {
|
|
22875
|
+
columns: [
|
|
22876
|
+
{ table: "telemetry_install", column: "first_remember_at" },
|
|
22877
|
+
{ table: "telemetry_install", column: "first_recall_at" }
|
|
22878
|
+
]
|
|
22879
|
+
}
|
|
22829
22880
|
}
|
|
22830
22881
|
];
|
|
22831
22882
|
var LATEST_SCHEMA_VERSION2 = MIGRATIONS2[MIGRATIONS2.length - 1]?.version ?? 0;
|
|
@@ -22846,6 +22897,7 @@ try {
|
|
|
22846
22897
|
const esmRequire = createRequire22(import.meta.url);
|
|
22847
22898
|
native2 = esmRequire("@signet/native");
|
|
22848
22899
|
} catch {}
|
|
22900
|
+
var GRAPHIQ_DEFAULT_INSTALL_DIR2 = join62(homedir42(), ".local", "bin");
|
|
22849
22901
|
var SIGNET_SOURCE_CHECKOUT_DIRNAME2 = "signetai";
|
|
22850
22902
|
var SIGNET_GIT_ALLOWED_DIRECTORIES2 = ["skills", "tools", "dreaming"];
|
|
22851
22903
|
var SIGNET_GIT_PROTECTED_PATHS2 = [
|
|
@@ -22915,11 +22967,11 @@ var VALID_GITHUB_RESOURCE_TYPES2 = new Set(DEFAULT_GITHUB_RESOURCE_TYPES2);
|
|
|
22915
22967
|
function defaultDiscordDesktopCachePath2() {
|
|
22916
22968
|
switch (platform22()) {
|
|
22917
22969
|
case "darwin":
|
|
22918
|
-
return resolve42(
|
|
22970
|
+
return resolve42(homedir52(), "Library", "Application Support", "discord");
|
|
22919
22971
|
case "win32":
|
|
22920
|
-
return resolve42(process.env.APPDATA || resolve42(
|
|
22972
|
+
return resolve42(process.env.APPDATA || resolve42(homedir52(), "AppData", "Roaming"), "discord");
|
|
22921
22973
|
default:
|
|
22922
|
-
return resolve42(process.env.XDG_CONFIG_HOME || resolve42(
|
|
22974
|
+
return resolve42(process.env.XDG_CONFIG_HOME || resolve42(homedir52(), ".config"), "discord");
|
|
22923
22975
|
}
|
|
22924
22976
|
}
|
|
22925
22977
|
var IDENTITY_FILES2 = {
|
|
@@ -22978,7 +23030,7 @@ var IDENTITY_FILES2 = {
|
|
|
22978
23030
|
var REQUIRED_IDENTITY_KEYS2 = Object.entries(IDENTITY_FILES2).filter(([, spec]) => !spec.optional).map(([key]) => key);
|
|
22979
23031
|
var OPTIONAL_IDENTITY_KEYS2 = Object.entries(IDENTITY_FILES2).filter(([, spec]) => spec.optional).map(([key]) => key);
|
|
22980
23032
|
function userHome() {
|
|
22981
|
-
return process.env.HOME?.trim() ||
|
|
23033
|
+
return process.env.HOME?.trim() || homedir8();
|
|
22982
23034
|
}
|
|
22983
23035
|
function resolveHermesHomePath() {
|
|
22984
23036
|
const hermesHome = process.env.HERMES_HOME?.trim();
|
|
@@ -23019,10 +23071,10 @@ function resolveHermesRepoPath() {
|
|
|
23019
23071
|
} catch {}
|
|
23020
23072
|
return null;
|
|
23021
23073
|
}
|
|
23022
|
-
var home2 =
|
|
23074
|
+
var home2 = homedir92();
|
|
23023
23075
|
|
|
23024
23076
|
// src/index.ts
|
|
23025
|
-
var __dirname3 =
|
|
23077
|
+
var __dirname3 = dirname6(fileURLToPath3(import.meta.url));
|
|
23026
23078
|
function getPluginSourceDir() {
|
|
23027
23079
|
const fromDist = join4(__dirname3, "..", "hermes-plugin");
|
|
23028
23080
|
if (existsSync2(fromDist))
|
|
@@ -23220,7 +23272,7 @@ function writeProviderBackup(hermesHome, configPath, providerKind, previousProvi
|
|
|
23220
23272
|
previousProvider,
|
|
23221
23273
|
createdAt: new Date().toISOString()
|
|
23222
23274
|
};
|
|
23223
|
-
mkdirSync(
|
|
23275
|
+
mkdirSync(dirname6(backupPath), { recursive: true });
|
|
23224
23276
|
writeFileSync2(backupPath, `${JSON.stringify(backup, null, 2)}
|
|
23225
23277
|
`);
|
|
23226
23278
|
return backupPath;
|
|
@@ -23303,7 +23355,7 @@ function configureProvider(hermesHome, warnings) {
|
|
|
23303
23355
|
}
|
|
23304
23356
|
if (!changed)
|
|
23305
23357
|
return { configPath: null, backupPath: null };
|
|
23306
|
-
mkdirSync(
|
|
23358
|
+
mkdirSync(dirname6(configPath), { recursive: true });
|
|
23307
23359
|
writeFileSync2(configPath, `${lines.join(`
|
|
23308
23360
|
`).replace(/\n+$/g, "")}
|
|
23309
23361
|
`);
|
|
@@ -23325,7 +23377,7 @@ function configureProvider(hermesHome, warnings) {
|
|
|
23325
23377
|
lines.push("");
|
|
23326
23378
|
lines.push("memory:", " provider: signet");
|
|
23327
23379
|
}
|
|
23328
|
-
mkdirSync(
|
|
23380
|
+
mkdirSync(dirname6(configPath), { recursive: true });
|
|
23329
23381
|
writeFileSync2(configPath, `${lines.join(`
|
|
23330
23382
|
`).replace(/\n+$/g, "")}
|
|
23331
23383
|
`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/connector-hermes-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.179.0",
|
|
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.
|
|
29
|
-
"@signetai/core": "0.
|
|
28
|
+
"@signetai/connector-base": "0.179.0",
|
|
29
|
+
"@signetai/core": "0.179.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.0.0",
|