@signetai/connector-hermes-agent 0.197.7 → 0.197.8
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 +121 -7
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -11180,6 +11180,58 @@ function up128(db) {
|
|
|
11180
11180
|
AND error IS NOT NULL;
|
|
11181
11181
|
`);
|
|
11182
11182
|
}
|
|
11183
|
+
function tableExists3(db, table) {
|
|
11184
|
+
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
11185
|
+
}
|
|
11186
|
+
function up129(db) {
|
|
11187
|
+
if (!tableExists3(db, "memory_jobs"))
|
|
11188
|
+
return;
|
|
11189
|
+
if (!tableExists3(db, "job_cancellations")) {
|
|
11190
|
+
throw new Error("job_cancellations table missing; cannot retire structural jobs without an audit trail");
|
|
11191
|
+
}
|
|
11192
|
+
db.prepare(`
|
|
11193
|
+
INSERT INTO job_cancellations (
|
|
11194
|
+
id, source_table, source_id, status_before, payload_json,
|
|
11195
|
+
reason, actor, actor_type, request_id, created_at
|
|
11196
|
+
)
|
|
11197
|
+
SELECT
|
|
11198
|
+
'retire-structural-jobs-129:' || id,
|
|
11199
|
+
'memory_jobs',
|
|
11200
|
+
id,
|
|
11201
|
+
status,
|
|
11202
|
+
json_object(
|
|
11203
|
+
'id', id,
|
|
11204
|
+
'memory_id', memory_id,
|
|
11205
|
+
'document_id', document_id,
|
|
11206
|
+
'job_type', job_type,
|
|
11207
|
+
'status', status,
|
|
11208
|
+
'payload', payload,
|
|
11209
|
+
'result', result,
|
|
11210
|
+
'attempts', attempts,
|
|
11211
|
+
'max_attempts', max_attempts,
|
|
11212
|
+
'leased_at', leased_at,
|
|
11213
|
+
'completed_at', completed_at,
|
|
11214
|
+
'failed_at', failed_at,
|
|
11215
|
+
'error', error,
|
|
11216
|
+
'created_at', created_at,
|
|
11217
|
+
'updated_at', updated_at
|
|
11218
|
+
),
|
|
11219
|
+
'retired structural queue after Dreaming cutover',
|
|
11220
|
+
'migration:129',
|
|
11221
|
+
'system',
|
|
11222
|
+
NULL,
|
|
11223
|
+
strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
11224
|
+
FROM memory_jobs
|
|
11225
|
+
WHERE job_type IN ('structural_classify', 'structural_dependency')
|
|
11226
|
+
AND status IN ('pending', 'leased');
|
|
11227
|
+
`).run();
|
|
11228
|
+
db.exec(`
|
|
11229
|
+
UPDATE memory_jobs
|
|
11230
|
+
SET status = 'cancelled', updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
11231
|
+
WHERE job_type IN ('structural_classify', 'structural_dependency')
|
|
11232
|
+
AND status IN ('pending', 'leased');
|
|
11233
|
+
`);
|
|
11234
|
+
}
|
|
11183
11235
|
var MIGRATIONS = [
|
|
11184
11236
|
{
|
|
11185
11237
|
version: 1,
|
|
@@ -12211,6 +12263,11 @@ var MIGRATIONS = [
|
|
|
12211
12263
|
version: 128,
|
|
12212
12264
|
name: "bounded-queue-diagnostics",
|
|
12213
12265
|
up: up128
|
|
12266
|
+
},
|
|
12267
|
+
{
|
|
12268
|
+
version: 129,
|
|
12269
|
+
name: "retire-structural-jobs",
|
|
12270
|
+
up: up129
|
|
12214
12271
|
}
|
|
12215
12272
|
];
|
|
12216
12273
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|
|
@@ -19572,7 +19629,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
|
|
|
19572
19629
|
return true;
|
|
19573
19630
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
|
|
19574
19631
|
}
|
|
19575
|
-
function
|
|
19632
|
+
function up130(db) {
|
|
19576
19633
|
db.exec(`
|
|
19577
19634
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
19578
19635
|
version INTEGER PRIMARY KEY,
|
|
@@ -22807,7 +22864,7 @@ function up1032(db) {
|
|
|
22807
22864
|
)
|
|
22808
22865
|
`);
|
|
22809
22866
|
}
|
|
22810
|
-
function
|
|
22867
|
+
function tableExists4(db, table) {
|
|
22811
22868
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) !== undefined;
|
|
22812
22869
|
}
|
|
22813
22870
|
function hasColumn162(db, table, column) {
|
|
@@ -22829,7 +22886,7 @@ function up1042(db) {
|
|
|
22829
22886
|
CREATE INDEX IF NOT EXISTS idx_derived_memory_sources_source
|
|
22830
22887
|
ON derived_memory_sources(agent_id, source_kind, source_id);
|
|
22831
22888
|
`);
|
|
22832
|
-
if (
|
|
22889
|
+
if (tableExists4(db, "aggregate_evidence_sources")) {
|
|
22833
22890
|
db.exec(`
|
|
22834
22891
|
INSERT OR IGNORE INTO derived_memory_sources
|
|
22835
22892
|
(derived_memory_id, source_kind, source_id, source_path, agent_id, created_at)
|
|
@@ -22837,7 +22894,7 @@ function up1042(db) {
|
|
|
22837
22894
|
FROM aggregate_evidence_sources
|
|
22838
22895
|
`);
|
|
22839
22896
|
}
|
|
22840
|
-
if (
|
|
22897
|
+
if (tableExists4(db, "aggregate_memory_sources")) {
|
|
22841
22898
|
db.exec(`
|
|
22842
22899
|
INSERT OR IGNORE INTO derived_memory_sources
|
|
22843
22900
|
(derived_memory_id, source_kind, source_id, source_path, agent_id, created_at)
|
|
@@ -22845,10 +22902,10 @@ function up1042(db) {
|
|
|
22845
22902
|
FROM aggregate_memory_sources
|
|
22846
22903
|
`);
|
|
22847
22904
|
}
|
|
22848
|
-
if (
|
|
22905
|
+
if (tableExists4(db, "memories") && !hasColumn162(db, "memories", "stale_at")) {
|
|
22849
22906
|
db.exec("ALTER TABLE memories ADD COLUMN stale_at TEXT");
|
|
22850
22907
|
}
|
|
22851
|
-
if (
|
|
22908
|
+
if (tableExists4(db, "memories")) {
|
|
22852
22909
|
db.exec(`
|
|
22853
22910
|
CREATE INDEX IF NOT EXISTS idx_memories_stale_derived
|
|
22854
22911
|
ON memories(agent_id, stale_at)
|
|
@@ -23690,11 +23747,63 @@ function up1282(db) {
|
|
|
23690
23747
|
AND error IS NOT NULL;
|
|
23691
23748
|
`);
|
|
23692
23749
|
}
|
|
23750
|
+
function tableExists32(db, table) {
|
|
23751
|
+
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
23752
|
+
}
|
|
23753
|
+
function up1292(db) {
|
|
23754
|
+
if (!tableExists32(db, "memory_jobs"))
|
|
23755
|
+
return;
|
|
23756
|
+
if (!tableExists32(db, "job_cancellations")) {
|
|
23757
|
+
throw new Error("job_cancellations table missing; cannot retire structural jobs without an audit trail");
|
|
23758
|
+
}
|
|
23759
|
+
db.prepare(`
|
|
23760
|
+
INSERT INTO job_cancellations (
|
|
23761
|
+
id, source_table, source_id, status_before, payload_json,
|
|
23762
|
+
reason, actor, actor_type, request_id, created_at
|
|
23763
|
+
)
|
|
23764
|
+
SELECT
|
|
23765
|
+
'retire-structural-jobs-129:' || id,
|
|
23766
|
+
'memory_jobs',
|
|
23767
|
+
id,
|
|
23768
|
+
status,
|
|
23769
|
+
json_object(
|
|
23770
|
+
'id', id,
|
|
23771
|
+
'memory_id', memory_id,
|
|
23772
|
+
'document_id', document_id,
|
|
23773
|
+
'job_type', job_type,
|
|
23774
|
+
'status', status,
|
|
23775
|
+
'payload', payload,
|
|
23776
|
+
'result', result,
|
|
23777
|
+
'attempts', attempts,
|
|
23778
|
+
'max_attempts', max_attempts,
|
|
23779
|
+
'leased_at', leased_at,
|
|
23780
|
+
'completed_at', completed_at,
|
|
23781
|
+
'failed_at', failed_at,
|
|
23782
|
+
'error', error,
|
|
23783
|
+
'created_at', created_at,
|
|
23784
|
+
'updated_at', updated_at
|
|
23785
|
+
),
|
|
23786
|
+
'retired structural queue after Dreaming cutover',
|
|
23787
|
+
'migration:129',
|
|
23788
|
+
'system',
|
|
23789
|
+
NULL,
|
|
23790
|
+
strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
23791
|
+
FROM memory_jobs
|
|
23792
|
+
WHERE job_type IN ('structural_classify', 'structural_dependency')
|
|
23793
|
+
AND status IN ('pending', 'leased');
|
|
23794
|
+
`).run();
|
|
23795
|
+
db.exec(`
|
|
23796
|
+
UPDATE memory_jobs
|
|
23797
|
+
SET status = 'cancelled', updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
23798
|
+
WHERE job_type IN ('structural_classify', 'structural_dependency')
|
|
23799
|
+
AND status IN ('pending', 'leased');
|
|
23800
|
+
`);
|
|
23801
|
+
}
|
|
23693
23802
|
var MIGRATIONS2 = [
|
|
23694
23803
|
{
|
|
23695
23804
|
version: 1,
|
|
23696
23805
|
name: "baseline",
|
|
23697
|
-
up:
|
|
23806
|
+
up: up130,
|
|
23698
23807
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
23699
23808
|
},
|
|
23700
23809
|
{
|
|
@@ -24721,6 +24830,11 @@ var MIGRATIONS2 = [
|
|
|
24721
24830
|
version: 128,
|
|
24722
24831
|
name: "bounded-queue-diagnostics",
|
|
24723
24832
|
up: up1282
|
|
24833
|
+
},
|
|
24834
|
+
{
|
|
24835
|
+
version: 129,
|
|
24836
|
+
name: "retire-structural-jobs",
|
|
24837
|
+
up: up1292
|
|
24724
24838
|
}
|
|
24725
24839
|
];
|
|
24726
24840
|
var LATEST_SCHEMA_VERSION2 = MIGRATIONS2[MIGRATIONS2.length - 1]?.version ?? 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/connector-hermes-agent",
|
|
3
|
-
"version": "0.197.
|
|
3
|
+
"version": "0.197.8",
|
|
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.197.
|
|
29
|
-
"@signetai/core": "0.197.
|
|
28
|
+
"@signetai/connector-base": "0.197.8",
|
|
29
|
+
"@signetai/core": "0.197.8"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.0.0",
|