@pratik7368patil/anchor-core 0.1.32 → 0.1.33

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.32",
3
+ "version": "0.1.33",
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
@@ -348,8 +348,12 @@ CREATE TABLE IF NOT EXISTS org_cross_repo_edges (
348
348
  source_path TEXT NOT NULL,
349
349
  target_repo TEXT NOT NULL,
350
350
  target_path TEXT,
351
+ layer TEXT NOT NULL DEFAULT 'file',
351
352
  relationship TEXT NOT NULL,
352
353
  evidence_json TEXT NOT NULL,
354
+ match_reasons_json TEXT NOT NULL DEFAULT '[]',
355
+ evidence_count INTEGER NOT NULL DEFAULT 0,
356
+ is_weak INTEGER NOT NULL DEFAULT 0,
353
357
  confidence REAL NOT NULL,
354
358
  created_at TEXT NOT NULL
355
359
  );
@@ -374,6 +378,9 @@ CREATE TABLE IF NOT EXISTS org_api_consumers (
374
378
  consumer_path TEXT NOT NULL,
375
379
  contract TEXT NOT NULL,
376
380
  evidence_json TEXT NOT NULL,
381
+ match_reasons_json TEXT NOT NULL DEFAULT '[]',
382
+ evidence_count INTEGER NOT NULL DEFAULT 0,
383
+ is_weak INTEGER NOT NULL DEFAULT 0,
377
384
  confidence REAL NOT NULL,
378
385
  created_at TEXT NOT NULL
379
386
  );
@@ -398,6 +405,10 @@ CREATE TABLE IF NOT EXISTS org_graph_state (
398
405
  last_status TEXT NOT NULL DEFAULT 'unknown',
399
406
  last_duration_ms INTEGER,
400
407
  edge_count INTEGER NOT NULL DEFAULT 0,
408
+ visible_edge_count INTEGER NOT NULL DEFAULT 0,
409
+ weak_edge_count INTEGER NOT NULL DEFAULT 0,
410
+ edge_confidence_json TEXT NOT NULL DEFAULT '{"strong":0,"moderate":0,"weak":0}',
411
+ last_render_prep_ms INTEGER,
401
412
  api_contract_count INTEGER NOT NULL DEFAULT 0,
402
413
  api_consumer_count INTEGER NOT NULL DEFAULT 0,
403
414
  last_error TEXT,
@@ -438,8 +449,11 @@ CREATE INDEX IF NOT EXISTS idx_org_repositories_org ON org_repositories(org);
438
449
  CREATE INDEX IF NOT EXISTS idx_org_repo_state_org ON org_repo_state(org);
439
450
  CREATE INDEX IF NOT EXISTS idx_org_edges_source ON org_cross_repo_edges(org, source_repo);
440
451
  CREATE INDEX IF NOT EXISTS idx_org_edges_target ON org_cross_repo_edges(org, target_repo);
452
+ CREATE INDEX IF NOT EXISTS idx_org_edges_layer ON org_cross_repo_edges(org, layer, confidence);
453
+ CREATE INDEX IF NOT EXISTS idx_org_edges_repo_pair ON org_cross_repo_edges(org, layer, source_repo, target_repo, relationship);
441
454
  CREATE INDEX IF NOT EXISTS idx_org_consumers_provider ON org_api_consumers(org, provider_repo);
442
455
  CREATE INDEX IF NOT EXISTS idx_org_consumers_consumer ON org_api_consumers(org, consumer_repo);
456
+ CREATE INDEX IF NOT EXISTS idx_org_consumers_contract ON org_api_consumers(org, contract);
443
457
  CREATE INDEX IF NOT EXISTS idx_org_anomalies_org ON org_anomaly_events(org, severity);
444
458
  CREATE INDEX IF NOT EXISTS idx_org_graph_state_status ON org_graph_state(org, last_status);
445
459