signetai 0.211.16 → 0.211.20

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/mcp-stdio.js CHANGED
@@ -14846,6 +14846,319 @@ function up137(db) {
14846
14846
  if (!cols.has(name))
14847
14847
  db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${name} ${type}`);
14848
14848
  }
14849
+ function hasColumn25(db, table, column) {
14850
+ const rows = db.prepare(`PRAGMA table_info(${table})`).all();
14851
+ return rows.some((row) => row.name === column);
14852
+ }
14853
+ function addColumnIfMissing27(db, table, column, definition) {
14854
+ if (!hasColumn25(db, table, column))
14855
+ db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
14856
+ }
14857
+ function up138(db) {
14858
+ addColumnIfMissing27(db, "memories", "manual_override", "INTEGER DEFAULT 0");
14859
+ db.exec(`
14860
+ CREATE TABLE IF NOT EXISTS transcript_capture_status (
14861
+ agent_id TEXT PRIMARY KEY,
14862
+ pending INTEGER NOT NULL DEFAULT 0,
14863
+ processing INTEGER NOT NULL DEFAULT 0,
14864
+ completed INTEGER NOT NULL DEFAULT 0,
14865
+ failed INTEGER NOT NULL DEFAULT 0,
14866
+ dead INTEGER NOT NULL DEFAULT 0,
14867
+ oldest_pending_at TEXT,
14868
+ last_error TEXT,
14869
+ last_error_at TEXT
14870
+ );
14871
+
14872
+ CREATE INDEX IF NOT EXISTS idx_transcript_capture_jobs_agent_status_created_at
14873
+ ON transcript_capture_jobs(agent_id, status, created_at);
14874
+
14875
+ CREATE INDEX IF NOT EXISTS idx_transcript_capture_jobs_error_updated_at
14876
+ ON transcript_capture_jobs(agent_id, updated_at DESC)
14877
+ WHERE error IS NOT NULL;
14878
+
14879
+ CREATE TABLE IF NOT EXISTS memories_duplicate_hash_counts (
14880
+ content_hash TEXT PRIMARY KEY,
14881
+ dup_count INTEGER NOT NULL
14882
+ );
14883
+
14884
+ CREATE INDEX IF NOT EXISTS idx_memories_dup_counts_active
14885
+ ON memories_duplicate_hash_counts(dup_count)
14886
+ WHERE dup_count > 1;
14887
+
14888
+ CREATE TABLE IF NOT EXISTS memories_diagnostics_state (
14889
+ id INTEGER PRIMARY KEY CHECK (id = 1),
14890
+ total_active INTEGER NOT NULL DEFAULT 0,
14891
+ exact_duplicates INTEGER NOT NULL DEFAULT 0,
14892
+ exact_clusters INTEGER NOT NULL DEFAULT 0
14893
+ );
14894
+
14895
+ CREATE INDEX IF NOT EXISTS idx_memories_active_hash_diagnostics
14896
+ ON memories(content_hash)
14897
+ WHERE is_deleted = 0
14898
+ AND content_hash IS NOT NULL
14899
+ AND pinned = 0
14900
+ AND manual_override = 0;
14901
+ `);
14902
+ db.exec(`
14903
+ CREATE TRIGGER IF NOT EXISTS transcript_capture_status_ai
14904
+ AFTER INSERT ON transcript_capture_jobs
14905
+ BEGIN
14906
+ INSERT INTO transcript_capture_status (agent_id)
14907
+ VALUES (NEW.agent_id)
14908
+ ON CONFLICT(agent_id) DO NOTHING;
14909
+
14910
+ UPDATE transcript_capture_status
14911
+ SET pending = pending + (NEW.status = 'pending'),
14912
+ processing = processing + (NEW.status = 'processing'),
14913
+ completed = completed + (NEW.status = 'completed'),
14914
+ failed = failed + (NEW.status = 'failed'),
14915
+ dead = dead + (NEW.status = 'dead')
14916
+ WHERE agent_id = NEW.agent_id;
14917
+
14918
+ UPDATE transcript_capture_status
14919
+ SET oldest_pending_at = (
14920
+ SELECT MIN(created_at) FROM transcript_capture_jobs
14921
+ WHERE agent_id = NEW.agent_id AND status = 'pending'
14922
+ )
14923
+ WHERE agent_id = NEW.agent_id;
14924
+
14925
+ UPDATE transcript_capture_status
14926
+ SET last_error = (
14927
+ SELECT error FROM transcript_capture_jobs
14928
+ WHERE agent_id = NEW.agent_id AND error IS NOT NULL
14929
+ ORDER BY updated_at DESC LIMIT 1
14930
+ ),
14931
+ last_error_at = (
14932
+ SELECT updated_at FROM transcript_capture_jobs
14933
+ WHERE agent_id = NEW.agent_id AND error IS NOT NULL
14934
+ ORDER BY updated_at DESC LIMIT 1
14935
+ )
14936
+ WHERE agent_id = NEW.agent_id
14937
+ AND NEW.error IS NOT NULL;
14938
+ END;
14939
+
14940
+ CREATE TRIGGER IF NOT EXISTS transcript_capture_status_au
14941
+ AFTER UPDATE OF status, error, updated_at, created_at ON transcript_capture_jobs
14942
+ BEGIN
14943
+ UPDATE transcript_capture_status
14944
+ SET pending = pending + (NEW.status = 'pending') - (OLD.status = 'pending'),
14945
+ processing = processing + (NEW.status = 'processing') - (OLD.status = 'processing'),
14946
+ completed = completed + (NEW.status = 'completed') - (OLD.status = 'completed'),
14947
+ failed = failed + (NEW.status = 'failed') - (OLD.status = 'failed'),
14948
+ dead = dead + (NEW.status = 'dead') - (OLD.status = 'dead')
14949
+ WHERE agent_id = NEW.agent_id;
14950
+
14951
+ UPDATE transcript_capture_status
14952
+ SET oldest_pending_at = (
14953
+ SELECT MIN(created_at) FROM transcript_capture_jobs
14954
+ WHERE agent_id = NEW.agent_id AND status = 'pending'
14955
+ )
14956
+ WHERE agent_id = NEW.agent_id;
14957
+
14958
+ UPDATE transcript_capture_status
14959
+ SET last_error = (
14960
+ SELECT error FROM transcript_capture_jobs
14961
+ WHERE agent_id = NEW.agent_id AND error IS NOT NULL
14962
+ ORDER BY updated_at DESC LIMIT 1
14963
+ ),
14964
+ last_error_at = (
14965
+ SELECT updated_at FROM transcript_capture_jobs
14966
+ WHERE agent_id = NEW.agent_id AND error IS NOT NULL
14967
+ ORDER BY updated_at DESC LIMIT 1
14968
+ )
14969
+ WHERE agent_id = NEW.agent_id
14970
+ AND (NEW.error IS NOT NULL OR OLD.error IS NOT NULL);
14971
+ END;
14972
+
14973
+ CREATE TRIGGER IF NOT EXISTS transcript_capture_status_ad
14974
+ AFTER DELETE ON transcript_capture_jobs
14975
+ BEGIN
14976
+ UPDATE transcript_capture_status
14977
+ SET pending = pending - (OLD.status = 'pending'),
14978
+ processing = processing - (OLD.status = 'processing'),
14979
+ completed = completed - (OLD.status = 'completed'),
14980
+ failed = failed - (OLD.status = 'failed'),
14981
+ dead = dead - (OLD.status = 'dead')
14982
+ WHERE agent_id = OLD.agent_id;
14983
+
14984
+ UPDATE transcript_capture_status
14985
+ SET oldest_pending_at = (
14986
+ SELECT MIN(created_at) FROM transcript_capture_jobs
14987
+ WHERE agent_id = OLD.agent_id AND status = 'pending'
14988
+ )
14989
+ WHERE agent_id = OLD.agent_id;
14990
+
14991
+ UPDATE transcript_capture_status
14992
+ SET last_error = (
14993
+ SELECT error FROM transcript_capture_jobs
14994
+ WHERE agent_id = OLD.agent_id AND error IS NOT NULL
14995
+ ORDER BY updated_at DESC LIMIT 1
14996
+ ),
14997
+ last_error_at = (
14998
+ SELECT updated_at FROM transcript_capture_jobs
14999
+ WHERE agent_id = OLD.agent_id AND error IS NOT NULL
15000
+ ORDER BY updated_at DESC LIMIT 1
15001
+ )
15002
+ WHERE agent_id = OLD.agent_id
15003
+ AND OLD.error IS NOT NULL;
15004
+ END;
15005
+ `);
15006
+ db.exec(`
15007
+ CREATE TRIGGER IF NOT EXISTS memories_dup_projection_ai
15008
+ AFTER INSERT ON memories
15009
+ BEGIN
15010
+ UPDATE memories_diagnostics_state
15011
+ SET total_active = total_active + CASE WHEN NEW.is_deleted = 0 THEN 1 ELSE 0 END,
15012
+ exact_duplicates = exact_duplicates + CASE
15013
+ WHEN NEW.is_deleted = 0 AND NEW.content_hash IS NOT NULL
15014
+ AND NEW.pinned = 0 AND NEW.manual_override = 0
15015
+ AND COALESCE((SELECT dup_count FROM memories_duplicate_hash_counts WHERE content_hash = NEW.content_hash), 0) >= 1
15016
+ THEN 1 ELSE 0 END,
15017
+ exact_clusters = exact_clusters + CASE
15018
+ WHEN NEW.is_deleted = 0 AND NEW.content_hash IS NOT NULL
15019
+ AND NEW.pinned = 0 AND NEW.manual_override = 0
15020
+ AND COALESCE((SELECT dup_count FROM memories_duplicate_hash_counts WHERE content_hash = NEW.content_hash), 0) = 1
15021
+ THEN 1 ELSE 0 END
15022
+ WHERE id = 1;
15023
+
15024
+ INSERT INTO memories_duplicate_hash_counts (content_hash, dup_count)
15025
+ SELECT NEW.content_hash, 1
15026
+ WHERE NEW.is_deleted = 0
15027
+ AND NEW.content_hash IS NOT NULL
15028
+ AND NEW.pinned = 0
15029
+ AND NEW.manual_override = 0
15030
+ ON CONFLICT(content_hash) DO UPDATE SET dup_count = dup_count + 1;
15031
+ END;
15032
+
15033
+ CREATE TRIGGER IF NOT EXISTS memories_dup_projection_au
15034
+ AFTER UPDATE OF is_deleted, content_hash, pinned, manual_override ON memories
15035
+ BEGIN
15036
+ UPDATE memories_diagnostics_state
15037
+ SET total_active = total_active
15038
+ + CASE WHEN NEW.is_deleted = 0 THEN 1 ELSE 0 END
15039
+ - CASE WHEN OLD.is_deleted = 0 THEN 1 ELSE 0 END,
15040
+ exact_duplicates = exact_duplicates - CASE
15041
+ WHEN OLD.is_deleted = 0 AND OLD.content_hash IS NOT NULL
15042
+ AND OLD.pinned = 0 AND OLD.manual_override = 0
15043
+ AND COALESCE((SELECT dup_count FROM memories_duplicate_hash_counts WHERE content_hash = OLD.content_hash), 0) > 1
15044
+ THEN 1 ELSE 0 END,
15045
+ exact_clusters = exact_clusters - CASE
15046
+ WHEN OLD.is_deleted = 0 AND OLD.content_hash IS NOT NULL
15047
+ AND OLD.pinned = 0 AND OLD.manual_override = 0
15048
+ AND COALESCE((SELECT dup_count FROM memories_duplicate_hash_counts WHERE content_hash = OLD.content_hash), 0) = 2
15049
+ THEN 1 ELSE 0 END
15050
+ WHERE id = 1;
15051
+
15052
+ UPDATE memories_duplicate_hash_counts
15053
+ SET dup_count = dup_count - 1
15054
+ WHERE OLD.is_deleted = 0
15055
+ AND OLD.content_hash IS NOT NULL
15056
+ AND OLD.pinned = 0
15057
+ AND OLD.manual_override = 0
15058
+ AND content_hash = OLD.content_hash;
15059
+
15060
+ DELETE FROM memories_duplicate_hash_counts
15061
+ WHERE content_hash = OLD.content_hash
15062
+ AND dup_count <= 0;
15063
+
15064
+ UPDATE memories_diagnostics_state
15065
+ SET exact_duplicates = exact_duplicates + CASE
15066
+ WHEN NEW.is_deleted = 0 AND NEW.content_hash IS NOT NULL
15067
+ AND NEW.pinned = 0 AND NEW.manual_override = 0
15068
+ AND COALESCE((SELECT dup_count FROM memories_duplicate_hash_counts WHERE content_hash = NEW.content_hash), 0) >= 1
15069
+ THEN 1 ELSE 0 END,
15070
+ exact_clusters = exact_clusters + CASE
15071
+ WHEN NEW.is_deleted = 0 AND NEW.content_hash IS NOT NULL
15072
+ AND NEW.pinned = 0 AND NEW.manual_override = 0
15073
+ AND COALESCE((SELECT dup_count FROM memories_duplicate_hash_counts WHERE content_hash = NEW.content_hash), 0) = 1
15074
+ THEN 1 ELSE 0 END
15075
+ WHERE id = 1;
15076
+
15077
+ INSERT INTO memories_duplicate_hash_counts (content_hash, dup_count)
15078
+ SELECT NEW.content_hash, 1
15079
+ WHERE NEW.is_deleted = 0
15080
+ AND NEW.content_hash IS NOT NULL
15081
+ AND NEW.pinned = 0
15082
+ AND NEW.manual_override = 0
15083
+ ON CONFLICT(content_hash) DO UPDATE SET dup_count = dup_count + 1;
15084
+ END;
15085
+
15086
+ CREATE TRIGGER IF NOT EXISTS memories_dup_projection_ad
15087
+ AFTER DELETE ON memories
15088
+ BEGIN
15089
+ UPDATE memories_diagnostics_state
15090
+ SET total_active = total_active - CASE WHEN OLD.is_deleted = 0 THEN 1 ELSE 0 END,
15091
+ exact_duplicates = exact_duplicates - CASE
15092
+ WHEN OLD.is_deleted = 0 AND OLD.content_hash IS NOT NULL
15093
+ AND OLD.pinned = 0 AND OLD.manual_override = 0
15094
+ AND COALESCE((SELECT dup_count FROM memories_duplicate_hash_counts WHERE content_hash = OLD.content_hash), 0) > 1
15095
+ THEN 1 ELSE 0 END,
15096
+ exact_clusters = exact_clusters - CASE
15097
+ WHEN OLD.is_deleted = 0 AND OLD.content_hash IS NOT NULL
15098
+ AND OLD.pinned = 0 AND OLD.manual_override = 0
15099
+ AND COALESCE((SELECT dup_count FROM memories_duplicate_hash_counts WHERE content_hash = OLD.content_hash), 0) = 2
15100
+ THEN 1 ELSE 0 END
15101
+ WHERE id = 1;
15102
+
15103
+ UPDATE memories_duplicate_hash_counts
15104
+ SET dup_count = dup_count - 1
15105
+ WHERE OLD.is_deleted = 0
15106
+ AND OLD.content_hash IS NOT NULL
15107
+ AND OLD.pinned = 0
15108
+ AND OLD.manual_override = 0
15109
+ AND content_hash = OLD.content_hash;
15110
+
15111
+ DELETE FROM memories_duplicate_hash_counts
15112
+ WHERE content_hash = OLD.content_hash
15113
+ AND dup_count <= 0;
15114
+ END;
15115
+ `);
15116
+ db.exec(`
15117
+ DELETE FROM transcript_capture_status;
15118
+ DELETE FROM memories_duplicate_hash_counts;
15119
+ INSERT INTO memories_duplicate_hash_counts (content_hash, dup_count)
15120
+ SELECT content_hash, COUNT(*)
15121
+ FROM memories
15122
+ WHERE is_deleted = 0
15123
+ AND content_hash IS NOT NULL
15124
+ AND pinned = 0
15125
+ AND manual_override = 0
15126
+ GROUP BY content_hash;
15127
+
15128
+ INSERT INTO memories_diagnostics_state (id, total_active, exact_duplicates, exact_clusters)
15129
+ VALUES (
15130
+ 1,
15131
+ (SELECT COUNT(*) FROM memories WHERE is_deleted = 0),
15132
+ COALESCE((SELECT SUM(dup_count - 1) FROM memories_duplicate_hash_counts WHERE dup_count > 1), 0),
15133
+ (SELECT COUNT(*) FROM memories_duplicate_hash_counts WHERE dup_count > 1)
15134
+ )
15135
+ ON CONFLICT(id) DO UPDATE SET
15136
+ total_active = excluded.total_active,
15137
+ exact_duplicates = excluded.exact_duplicates,
15138
+ exact_clusters = excluded.exact_clusters;
15139
+
15140
+ INSERT INTO transcript_capture_status (
15141
+ agent_id, pending, processing, completed, failed, dead,
15142
+ oldest_pending_at, last_error, last_error_at
15143
+ )
15144
+ SELECT
15145
+ j.agent_id,
15146
+ SUM(j.status = 'pending'),
15147
+ SUM(j.status = 'processing'),
15148
+ SUM(j.status = 'completed'),
15149
+ SUM(j.status = 'failed'),
15150
+ SUM(j.status = 'dead'),
15151
+ MIN(CASE WHEN j.status = 'pending' THEN j.created_at END),
15152
+ (SELECT e2.error FROM transcript_capture_jobs e2
15153
+ WHERE e2.agent_id = j.agent_id AND e2.error IS NOT NULL
15154
+ ORDER BY e2.updated_at DESC LIMIT 1),
15155
+ (SELECT e3.updated_at FROM transcript_capture_jobs e3
15156
+ WHERE e3.agent_id = j.agent_id AND e3.error IS NOT NULL
15157
+ ORDER BY e3.updated_at DESC LIMIT 1)
15158
+ FROM transcript_capture_jobs j
15159
+ GROUP BY j.agent_id;
15160
+ `);
15161
+ }
14849
15162
  function resolveDefaultBasePath() {
14850
15163
  return process.env.SIGNET_PATH || join2(homedir2(), ".agents");
14851
15164
  }
@@ -24157,6 +24470,14 @@ ${end.comment}` : end.comment;
24157
24470
  { table: "dreaming_passes", column: "head_hash" }
24158
24471
  ]
24159
24472
  }
24473
+ },
24474
+ {
24475
+ version: 138,
24476
+ name: "bounded-status-projections",
24477
+ up: up138,
24478
+ artifacts: {
24479
+ tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
24480
+ }
24160
24481
  }
24161
24482
  ];
24162
24483
  LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
@@ -1,43 +1,43 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "0.211.16",
3
+ "version": "0.211.20",
4
4
  "assets": [
5
5
  {
6
6
  "name": "signet-darwin-arm64",
7
7
  "platform": "darwin-arm64",
8
- "sha256": "62e1c4d90de30a4790d945574fc416f78c42c6bb77f2cce0e25b08602e4e6008",
9
- "size": 161462176
8
+ "sha256": "c31470d554dfb2a28db4ff0373e00367f6aefa84b0e50c871ca4478ccf34b6d5",
9
+ "size": 161808928
10
10
  },
11
11
  {
12
12
  "name": "signet-darwin-x64",
13
13
  "platform": "darwin-x64",
14
- "sha256": "54f36e7bfe5cd7ec87b362b65bdd96d933871651bc1f0fd1452a155947504b6e",
15
- "size": 166201920
14
+ "sha256": "53a77b95acdcec7d860716a820713d8959b2ba662309a6c29fce555b31ba96e0",
15
+ "size": 166529600
16
16
  },
17
17
  {
18
18
  "name": "signet-linux-arm64",
19
19
  "platform": "linux-arm64",
20
- "sha256": "22eefcf88a6efaa8ce7cb16e0be9c8c30991ddf4e7bd8d592907d0e54e966967",
21
- "size": 208763186
20
+ "sha256": "76b33de5ae4628965066f4e31955a25e0606172d69bf55188320b42166bb526e",
21
+ "size": 209100863
22
22
  },
23
23
  {
24
24
  "name": "signet-linux-x64",
25
25
  "platform": "linux-x64",
26
- "sha256": "fa87f32e795c08478210ad7838724f12e0da56b5bd22183079bd8e0c725210a4",
27
- "size": 211551937
26
+ "sha256": "98baab7ad0c79ed5256fa0f5f0df71d19de3ef37985f5743c6e8f22bfa1adcac",
27
+ "size": 211889614
28
28
  },
29
29
  {
30
30
  "name": "signet-win32-x64.exe",
31
31
  "platform": "win32-x64",
32
- "sha256": "96bc9f8b3e62a278fd004b591c032832a58b63dfe90e75a56a79a4ea25c43a4f",
33
- "size": 218037760
32
+ "sha256": "d79ee875bb406cf8815a3a5fe376fedfcc540d0c4a3ac254f6738c2ebad67a28",
33
+ "size": 218375680
34
34
  }
35
35
  ],
36
36
  "components": {
37
37
  "connectors": {
38
- "url": "signet-connectors-0.211.16.tar.gz",
39
- "sha256": "14231e0e2ca13612841a9b33174f5d23bb1e59c5713a2edcd4cdbc6dd2cb16f4",
40
- "size": 21939
38
+ "url": "signet-connectors-0.211.20.tar.gz",
39
+ "sha256": "21c6b78877238296a2b40a448822b6dcf2b242929ad2836d17e5191070203934",
40
+ "size": 21940
41
41
  }
42
42
  }
43
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signetai",
3
- "version": "0.211.16",
3
+ "version": "0.211.20",
4
4
  "description": "Signet native CLI installer wrapper",
5
5
  "type": "module",
6
6
  "bin": {
@@ -65,10 +65,10 @@
65
65
  "access": "public"
66
66
  },
67
67
  "optionalDependencies": {
68
- "signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.211.16/signetai-darwin-arm64-0.211.16.tgz",
69
- "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.211.16/signetai-darwin-x64-0.211.16.tgz",
70
- "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.211.16/signetai-linux-arm64-0.211.16.tgz",
71
- "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.211.16/signetai-linux-x64-0.211.16.tgz",
72
- "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.211.16/signetai-win32-x64-0.211.16.tgz"
68
+ "signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.211.20/signetai-darwin-arm64-0.211.20.tgz",
69
+ "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.211.20/signetai-darwin-x64-0.211.20.tgz",
70
+ "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.211.20/signetai-linux-arm64-0.211.20.tgz",
71
+ "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.211.20/signetai-linux-x64-0.211.20.tgz",
72
+ "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.211.20/signetai-win32-x64-0.211.20.tgz"
73
73
  }
74
74
  }