@pratik7368patil/anchor-core 0.1.21 → 0.1.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pratik7368patil/anchor-core",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "Core local indexing, sanitization, and retrieval engine for Anchor.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/db/schema.sql CHANGED
@@ -391,6 +391,18 @@ CREATE TABLE IF NOT EXISTS org_anomaly_events (
391
391
  created_at TEXT NOT NULL
392
392
  );
393
393
 
394
+ CREATE TABLE IF NOT EXISTS org_graph_state (
395
+ org TEXT PRIMARY KEY,
396
+ last_built_at TEXT,
397
+ last_status TEXT NOT NULL DEFAULT 'unknown',
398
+ last_duration_ms INTEGER,
399
+ edge_count INTEGER NOT NULL DEFAULT 0,
400
+ api_contract_count INTEGER NOT NULL DEFAULT 0,
401
+ api_consumer_count INTEGER NOT NULL DEFAULT 0,
402
+ last_error TEXT,
403
+ updated_at TEXT NOT NULL
404
+ );
405
+
394
406
  CREATE TABLE IF NOT EXISTS org_sync_checkpoints (
395
407
  org TEXT NOT NULL,
396
408
  repo TEXT NOT NULL,
@@ -428,3 +440,4 @@ CREATE INDEX IF NOT EXISTS idx_org_edges_target ON org_cross_repo_edges(org, tar
428
440
  CREATE INDEX IF NOT EXISTS idx_org_consumers_provider ON org_api_consumers(org, provider_repo);
429
441
  CREATE INDEX IF NOT EXISTS idx_org_consumers_consumer ON org_api_consumers(org, consumer_repo);
430
442
  CREATE INDEX IF NOT EXISTS idx_org_anomalies_org ON org_anomaly_events(org, severity);
443
+ CREATE INDEX IF NOT EXISTS idx_org_graph_state_status ON org_graph_state(org, last_status);