@signetai/connector-base 0.161.2 → 0.161.3

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.
Files changed (2) hide show
  1. package/dist/index.js +91 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -10282,6 +10282,92 @@ function up104(db) {
10282
10282
  `);
10283
10283
  }
10284
10284
  }
10285
+ function up105(db) {
10286
+ db.exec(`
10287
+ DROP TRIGGER IF EXISTS entities_fts_ai;
10288
+ DROP TRIGGER IF EXISTS entities_fts_ad;
10289
+ DROP TRIGGER IF EXISTS entities_fts_au;
10290
+ `);
10291
+ db.exec(`
10292
+ CREATE TABLE entities_105 (
10293
+ id TEXT PRIMARY KEY,
10294
+ name TEXT NOT NULL,
10295
+ entity_type TEXT NOT NULL,
10296
+ description TEXT,
10297
+ created_at TEXT NOT NULL,
10298
+ updated_at TEXT NOT NULL,
10299
+ canonical_name TEXT,
10300
+ mentions INTEGER DEFAULT 0,
10301
+ embedding BLOB,
10302
+ agent_id TEXT NOT NULL DEFAULT 'default',
10303
+ pinned INTEGER NOT NULL DEFAULT 0,
10304
+ pinned_at TEXT,
10305
+ last_synthesized_at TEXT,
10306
+ community_id TEXT REFERENCES entity_communities(id),
10307
+ source_id TEXT,
10308
+ source_kind TEXT,
10309
+ source_path TEXT,
10310
+ source_root TEXT,
10311
+ status TEXT NOT NULL DEFAULT 'active',
10312
+ archived_at TEXT,
10313
+ archived_by TEXT,
10314
+ archive_reason TEXT,
10315
+ proposal_id TEXT,
10316
+ proposal_evidence TEXT NOT NULL DEFAULT '[]',
10317
+ UNIQUE(agent_id, name)
10318
+ );
10319
+ `);
10320
+ db.exec(`
10321
+ INSERT INTO entities_105 (
10322
+ rowid, id, name, entity_type, description, created_at, updated_at,
10323
+ canonical_name, mentions, embedding, agent_id, pinned, pinned_at,
10324
+ last_synthesized_at, community_id, source_id, source_kind,
10325
+ source_path, source_root, status, archived_at, archived_by,
10326
+ archive_reason, proposal_id, proposal_evidence
10327
+ )
10328
+ SELECT
10329
+ rowid, id, name, entity_type, description, created_at, updated_at,
10330
+ canonical_name, mentions, embedding, agent_id, pinned, pinned_at,
10331
+ last_synthesized_at, community_id, source_id, source_kind,
10332
+ source_path, source_root, status, archived_at, archived_by,
10333
+ archive_reason, proposal_id, proposal_evidence
10334
+ FROM entities;
10335
+ `);
10336
+ db.exec(`
10337
+ DROP TABLE entities;
10338
+ ALTER TABLE entities_105 RENAME TO entities;
10339
+ `);
10340
+ db.exec(`
10341
+ CREATE INDEX IF NOT EXISTS idx_entities_canonical_name ON entities(canonical_name);
10342
+ CREATE INDEX IF NOT EXISTS idx_entities_agent ON entities(agent_id);
10343
+ CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC);
10344
+ CREATE INDEX IF NOT EXISTS idx_entities_order
10345
+ ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name);
10346
+ CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
10347
+ ON entities(entity_type, mentions)
10348
+ WHERE entity_type = 'extracted';
10349
+ CREATE INDEX IF NOT EXISTS idx_entities_source ON entities(agent_id, source_id, source_path);
10350
+ CREATE INDEX IF NOT EXISTS idx_entities_status ON entities(agent_id, status, updated_at DESC);
10351
+ CREATE INDEX IF NOT EXISTS idx_entities_proposal ON entities(agent_id, proposal_id);
10352
+ `);
10353
+ db.exec(`
10354
+ CREATE TRIGGER IF NOT EXISTS entities_fts_ai AFTER INSERT ON entities BEGIN
10355
+ INSERT INTO entities_fts(rowid, name, canonical_name)
10356
+ VALUES (new.rowid, new.name, new.canonical_name);
10357
+ END;
10358
+ CREATE TRIGGER IF NOT EXISTS entities_fts_ad AFTER DELETE ON entities BEGIN
10359
+ INSERT INTO entities_fts(entities_fts, rowid, name, canonical_name)
10360
+ VALUES ('delete', old.rowid, old.name, old.canonical_name);
10361
+ END;
10362
+ CREATE TRIGGER IF NOT EXISTS entities_fts_au AFTER UPDATE ON entities BEGIN
10363
+ INSERT INTO entities_fts(entities_fts, rowid, name, canonical_name)
10364
+ VALUES ('delete', old.rowid, old.name, old.canonical_name);
10365
+ INSERT INTO entities_fts(rowid, name, canonical_name)
10366
+ VALUES (new.rowid, new.name, new.canonical_name);
10367
+ END;
10368
+ INSERT INTO entities_fts(entities_fts) VALUES ('rebuild');
10369
+ `);
10370
+ }
10285
10371
  var MIGRATIONS = [
10286
10372
  {
10287
10373
  version: 1,
@@ -11109,6 +11195,11 @@ var MIGRATIONS = [
11109
11195
  tables: ["derived_memory_sources"],
11110
11196
  columns: [{ table: "memories", column: "stale_at" }]
11111
11197
  }
11198
+ },
11199
+ {
11200
+ version: 105,
11201
+ name: "agent-scoped-entity-name",
11202
+ up: up105
11112
11203
  }
11113
11204
  ];
11114
11205
  var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-base",
3
- "version": "0.161.2",
3
+ "version": "0.161.3",
4
4
  "description": "Base class for Signet harness connectors",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -26,7 +26,7 @@
26
26
  "typecheck": "tsc --noEmit"
27
27
  },
28
28
  "dependencies": {
29
- "@signetai/core": "0.161.2",
29
+ "@signetai/core": "0.161.3",
30
30
  "json5": "^2.2.3",
31
31
  "jsonc-parser": "3.3.1"
32
32
  },