rust-kgdb 0.6.10 → 0.6.14

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/CHANGELOG.md CHANGED
@@ -2,6 +2,152 @@
2
2
 
3
3
  All notable changes to the rust-kgdb TypeScript SDK will be documented in this file.
4
4
 
5
+ ## [0.6.14] - 2025-12-15
6
+
7
+ ### Industry Benchmarks, Control Plane Architecture & ProofDAG Visualization
8
+
9
+ #### Documentation Enhancements
10
+
11
+ **Industry Benchmark Comparison** (Factually Verified)
12
+ - Added comprehensive comparison with Tentris, RDFox, Virtuoso, Blazegraph, AllegroGraph
13
+ - All numbers from peer-reviewed papers (ISWC 2020, 2022, 2025) and official documentation
14
+ - WCOJ algorithm comparison table
15
+ - Unique advantages matrix
16
+ - Honest assessment section with proper citations
17
+
18
+ **Sources Added**:
19
+ - [Tentris ISWC 2020](https://papers.dice-research.org/2020/ISWC_Tentris/iswc2020_tentris_public.pdf)
20
+ - [Tentris WCOJ Update 2025](https://papers.dice-research.org/2025/ISWC_Tentris-WCOJ-Update/public.pdf)
21
+ - [RDFox Oxford Semantic](https://www.oxfordsemantic.tech/rdfox)
22
+ - [Virtuoso LUBM Benchmark](https://vos.openlinksw.com/owiki/wiki/VOS/VOSArticleLUBMBenchmark)
23
+
24
+ **HyperMind as Intelligence Control Plane**
25
+ - Added control plane architecture diagram
26
+ - Referenced [Chang 2025 - "The Missing Layer of AGI"](https://arxiv.org/abs/2512.05765)
27
+ - Explained semantic anchoring, goal-directed constraints, verification layer
28
+ - Linked to foundational research: Curry-Howard, Spivak's Ologs
29
+
30
+ **ProofDAG Visual Output**
31
+ - Added ASCII art visualization of ProofDAG structure
32
+ - Complete JSON schema for proof objects
33
+ - Derivation chain example with real tools
34
+
35
+ **Test Environment Note**
36
+ - All benchmarks run on commodity hardware (Intel Mac laptop)
37
+ - InMemoryBackend with zero-copy, no GC
38
+ - Criterion.rs statistical benchmarking
39
+
40
+ ## [0.6.13] - 2025-12-15
41
+
42
+ ### Schema-Aware GraphDB, Context Theory & BYOO (Bring Your Own Ontology)
43
+
44
+ Major release introducing enterprise-grade schema management with mathematical foundations.
45
+
46
+ #### New Features
47
+
48
+ **Schema-Aware GraphDB (v0.6.13)**
49
+ - `SchemaAwareGraphDB` - Auto-extracts schema at load time
50
+ - `createSchemaAwareGraphDB()` - Factory function for new databases
51
+ - `wrapWithSchemaAwareness()` - Wrap existing GraphDB instances
52
+ - `waitForSchema()` - Handles race conditions (Promise-based)
53
+ - Schema extraction triggers ONLY on data modifications (not reads)
54
+
55
+ ```javascript
56
+ const db = createSchemaAwareGraphDB('http://example.org/')
57
+ db.loadTtl('...', null) // Schema extracted automatically
58
+ const schema = await db.waitForSchema() // Race-condition safe
59
+ ```
60
+
61
+ **Schema Caching (v0.6.12)**
62
+ - `SchemaCache` - TTL-based cache (default: 5 minutes)
63
+ - `SCHEMA_CACHE` - Global singleton for cross-agent sharing
64
+ - `getOrCompute()` - Cache-aside pattern for automatic computation
65
+ - `invalidate()` - Clear cache on data changes
66
+ - Cache stats monitoring (`getStats()`)
67
+
68
+ **Context Theory (v0.6.11)**
69
+ - `SchemaContext` - Schema as category (Spivak's Ologs)
70
+ - Objects = Classes (owl:Class, rdfs:Class)
71
+ - Morphisms = Properties (owl:ObjectProperty, owl:DatatypeProperty)
72
+ - `TypeJudgment` - Type judgments (Γ ⊢ t : T)
73
+ - `QueryValidator` - Validate SPARQL against schema morphisms
74
+ - `ProofDAG` - Curry-Howard proof witnesses with deterministic hashes
75
+
76
+ **Bring Your Own Ontology (BYOO)**
77
+ - `SchemaContext.fromOntology()` - Load enterprise ontologies (TTL/OWL)
78
+ - `SchemaContext.merge()` - Combine ontology + KG-derived schemas
79
+ - Support for FIBO, HL7 FHIR, and domain-specific ontologies
80
+ - Enterprise governance: ontology teams define schemas centrally
81
+
82
+ #### Mathematical Foundation
83
+
84
+ Three pillars for predictable, verifiable AI:
85
+
86
+ | Pillar | Guarantee | Implementation |
87
+ |--------|-----------|----------------|
88
+ | Type Theory | Input/output contracts | `kg.sparql.query: Query → BindingSet` |
89
+ | Category Theory | Safe tool composition | Morphisms compose: `A → B → C` |
90
+ | Proof Theory | Full provenance | ProofDAG with Curry-Howard witness |
91
+
92
+ #### Schema-Aware Intent Classification
93
+
94
+ Different words → Same SPARQL (LLM + Schema injection):
95
+ - "high-risk providers" / "suspicious vendors" / "elevated risk" → Same query
96
+ - LLM understands schema morphisms and maps synonyms correctly
97
+ - No hallucinated predicates - uses YOUR actual schema
98
+
99
+ #### Breaking Changes
100
+ - None (fully backward compatible)
101
+
102
+ #### Files Added
103
+ - `ontology/agent-memory.ttl` - OWL ontology for agent memory
104
+
105
+ ## [0.6.10] - 2025-12-15
106
+
107
+ ### Complete KG Configuration & Default Settings Documentation
108
+
109
+ Added comprehensive documentation to examples explaining KG storage modes and defaults:
110
+
111
+ #### Knowledge Graph Storage Modes
112
+ ```javascript
113
+ // MODE 1: IN-MEMORY (Default)
114
+ const db = new GraphDB('http://example.org/') // Zero config
115
+ // - Storage: RAM (HashMap-based SPOC indexes)
116
+ // - Performance: 2.78µs lookups, 146K triples/sec
117
+ // - Persistence: None (data lost on restart)
118
+
119
+ // MODE 2: ENDPOINT (Distributed Cluster)
120
+ const agent = await HyperMindAgent.spawn({
121
+ endpoint: 'http://rust-kgdb-coordinator:8080', // K8s service
122
+ ...
123
+ })
124
+ // - Storage: HDRF-partitioned across executors
125
+ // - Persistence: RocksDB/LMDB per executor
126
+ // - Consensus: Raft for distributed writes
127
+ ```
128
+
129
+ #### Default Settings (When Not Specified)
130
+ | Setting | Default | Description |
131
+ |---------|---------|-------------|
132
+ | `storage` | `'inmemory'` | Not 'rocksdb' or 'lmdb' |
133
+ | `endpoint` | `null` | Local mode, no network |
134
+ | `graphUri` | `null` | Default graph |
135
+ | `working.maxSize` | `1MB` | Current task context |
136
+ | `episodic.retentionDays` | `30` | Conversation history |
137
+ | `weights` | `{recency: 0.3, relevance: 0.5, importance: 0.2}` | Memory scoring |
138
+ | `sandbox` | `null` | **⚠️ NO SANDBOX = full access** |
139
+
140
+ #### Sandbox Warning
141
+ ```javascript
142
+ // ⚠️ WITHOUT .withSandbox(), agent has UNRESTRICTED capabilities!
143
+ // Always use sandbox in production:
144
+ .withSandbox({
145
+ capabilities: ['ReadKG', 'ExecuteTool'], // Whitelist only
146
+ fuelLimit: 1_000_000, // Gas limit
147
+ maxExecTime: 30_000 // Timeout
148
+ })
149
+ ```
150
+
5
151
  ## [0.6.9] - 2025-12-15
6
152
 
7
153
  ### Deep Technical Comparison: Why rust-kgdb Wins