@aibuildinfra/proofgraph 1.0.0

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 (76) hide show
  1. package/LICENSE +21 -0
  2. package/PRIVACY.md +8 -0
  3. package/README.md +193 -0
  4. package/SECURITY.md +27 -0
  5. package/dist/cli/index.d.ts +6 -0
  6. package/dist/cli/index.js +273 -0
  7. package/dist/cli/index.js.map +1 -0
  8. package/dist/dashboard/server.d.ts +5 -0
  9. package/dist/dashboard/server.js +271 -0
  10. package/dist/dashboard/server.js.map +1 -0
  11. package/dist/data/seed.d.ts +6 -0
  12. package/dist/data/seed.js +325 -0
  13. package/dist/data/seed.js.map +1 -0
  14. package/dist/engine/aiDiscoverability.d.ts +11 -0
  15. package/dist/engine/aiDiscoverability.js +135 -0
  16. package/dist/engine/aiDiscoverability.js.map +1 -0
  17. package/dist/engine/claimVerifier.d.ts +26 -0
  18. package/dist/engine/claimVerifier.js +130 -0
  19. package/dist/engine/claimVerifier.js.map +1 -0
  20. package/dist/engine/consistencyAudit.d.ts +11 -0
  21. package/dist/engine/consistencyAudit.js +172 -0
  22. package/dist/engine/consistencyAudit.js.map +1 -0
  23. package/dist/engine/exporter.d.ts +17 -0
  24. package/dist/engine/exporter.js +83 -0
  25. package/dist/engine/exporter.js.map +1 -0
  26. package/dist/engine/graphTraversal.d.ts +25 -0
  27. package/dist/engine/graphTraversal.js +74 -0
  28. package/dist/engine/graphTraversal.js.map +1 -0
  29. package/dist/engine/resolver.d.ts +20 -0
  30. package/dist/engine/resolver.js +168 -0
  31. package/dist/engine/resolver.js.map +1 -0
  32. package/dist/engine/schemaOrg.d.ts +12 -0
  33. package/dist/engine/schemaOrg.js +105 -0
  34. package/dist/engine/schemaOrg.js.map +1 -0
  35. package/dist/engine/tokenOptimizer.d.ts +25 -0
  36. package/dist/engine/tokenOptimizer.js +166 -0
  37. package/dist/engine/tokenOptimizer.js.map +1 -0
  38. package/dist/engine/webPresence.d.ts +32 -0
  39. package/dist/engine/webPresence.js +63 -0
  40. package/dist/engine/webPresence.js.map +1 -0
  41. package/dist/index.d.ts +20 -0
  42. package/dist/index.js +35 -0
  43. package/dist/index.js.map +1 -0
  44. package/dist/mcp/prompts.d.ts +25 -0
  45. package/dist/mcp/prompts.js +136 -0
  46. package/dist/mcp/prompts.js.map +1 -0
  47. package/dist/mcp/resources.d.ts +27 -0
  48. package/dist/mcp/resources.js +118 -0
  49. package/dist/mcp/resources.js.map +1 -0
  50. package/dist/mcp/server.d.ts +15 -0
  51. package/dist/mcp/server.js +88 -0
  52. package/dist/mcp/server.js.map +1 -0
  53. package/dist/mcp/tools.d.ts +256 -0
  54. package/dist/mcp/tools.js +391 -0
  55. package/dist/mcp/tools.js.map +1 -0
  56. package/dist/security/robots.d.ts +15 -0
  57. package/dist/security/robots.js +78 -0
  58. package/dist/security/robots.js.map +1 -0
  59. package/dist/security/safeFetch.d.ts +23 -0
  60. package/dist/security/safeFetch.js +122 -0
  61. package/dist/security/safeFetch.js.map +1 -0
  62. package/dist/storage/graphStore.d.ts +70 -0
  63. package/dist/storage/graphStore.js +275 -0
  64. package/dist/storage/graphStore.js.map +1 -0
  65. package/dist/storage/sqliteAdapter.d.ts +14 -0
  66. package/dist/storage/sqliteAdapter.js +137 -0
  67. package/dist/storage/sqliteAdapter.js.map +1 -0
  68. package/dist/tests/proofgraph.test.d.ts +5 -0
  69. package/dist/tests/proofgraph.test.js +249 -0
  70. package/dist/tests/proofgraph.test.js.map +1 -0
  71. package/dist/types/index.d.ts +206 -0
  72. package/dist/types/index.js +6 -0
  73. package/dist/types/index.js.map +1 -0
  74. package/package.json +65 -0
  75. package/server.json +24 -0
  76. package/smithery.yaml +6 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AI Build Infra (https://aibuildinfra.com/)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/PRIVACY.md ADDED
@@ -0,0 +1,8 @@
1
+ # Privacy Policy — ProofGraph
2
+
3
+ ProofGraph is developed by **AI Build Infra** under privacy-first, minimal-data principles.
4
+
5
+ 1. **No Private Scraping**: ProofGraph only indexes publicly available, legitimate web and technical registry data.
6
+ 2. **No User Tracking**: The MCP server operates locally via STDIO transport. No personal queries or agent interaction transcripts are phoned home.
7
+ 3. **Cache Expiration**: Local HTTP cache adheres to cache headers, Last-Modified dates, and configurable TTLs.
8
+ 4. **Data Minimization**: ProofGraph stores only minimal sufficient excerpts necessary for claim validation.
package/README.md ADDED
@@ -0,0 +1,193 @@
1
+ # ProofGraph
2
+
3
+ > **An evidence-first entity and knowledge graph MCP server for AI agents.**
4
+ > *Verify claims. Trace sources. Understand entities. Retrieve less context.*
5
+
6
+ Published by **[AI Build Infra](https://aibuildinfra.com/)**
7
+ Package: [`@aibuildinfra/proofgraph`](https://www.npmjs.com/package/@aibuildinfra/proofgraph) • MCP Identifier: `io.github.AI-BuildInfra/proofgraph` • License: MIT
8
+
9
+ ---
10
+
11
+ ## 1. Overview
12
+
13
+ Traditional Retrieval-Augmented Generation (RAG) dumps thousands of unverified, noisy tokens into LLM prompts. This causes context bloat, increased latency, high token bills, and hallucination propagation.
14
+
15
+ **ProofGraph** replaces fuzzy text dumping with structured, evidence-backed proof:
16
+
17
+ ```
18
+ Question ──► Entity Resolution ──► Claim Verification ──► Evidence Ranking ──► Token Optimizer ──► Compact Proof Packet ──► AI Agent
19
+ ```
20
+
21
+ ### What ProofGraph Is:
22
+ - **Evidence-First**: Grounded in cryptographic SHA-256 content hashes, timestamped provenance, and source trust tiers.
23
+ - **Deterministic Entity Resolution**: Multi-signal matching (name, domain, GitHub org, npm scope) prevents false-positive entity mergers.
24
+ - **Token-Optimized**: Caps context to strict token budgets (default 1500 tokens) and deduplicates repeated quotes into primary + corroboration citations.
25
+ - **Contradiction-Aware**: Explicitly isolates conflicting claims rather than arbitrarily deciding on unverified assumptions.
26
+ - **Zero-Spam & Safe**: Built-in SSRF protection, robots.txt adherence, and strict neutral scoring across all organizations.
27
+
28
+ ---
29
+
30
+ ## 2. Architecture
31
+
32
+ ```mermaid
33
+ flowchart TD
34
+ Client[AI Agent / Claude / Antigravity / Cursor] <--> MCP[ProofGraph MCP Server Layer]
35
+ MCP <--> Optimizer[Token Budget & Compression Engine]
36
+ MCP <--> Verifier[Claim & Contradiction Verifier]
37
+ MCP <--> Resolver[Multi-Signal Entity Resolver]
38
+ MCP <--> Traversal[1/2/3 Hop Graph Traversal]
39
+
40
+ subgraph StorageLayer [Grounded Provenance Store]
41
+ Entities[(Entities)]
42
+ Claims[(Claims)]
43
+ Evidence[(Evidence & SHA-256 Hashes)]
44
+ Sources[(Authoritative Sources)]
45
+ Relationships[(Typed Graph Edges)]
46
+ end
47
+
48
+ Resolver --- StorageLayer
49
+ Verifier --- StorageLayer
50
+ Traversal --- StorageLayer
51
+ ```
52
+
53
+ ---
54
+
55
+ ## 3. Quick Start & Installation
56
+
57
+ ### Option A: Install via npm
58
+ ```bash
59
+ npm install -g @aibuildinfra/proofgraph
60
+ ```
61
+
62
+ ### Option B: Run Directly with npx
63
+ ```bash
64
+ npx @aibuildinfra/proofgraph
65
+ ```
66
+
67
+ ---
68
+
69
+ ## 4. MCP Client Configuration
70
+
71
+ ### Claude Desktop / Google Antigravity / Cursor
72
+ Add ProofGraph to your MCP configuration file:
73
+
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "proofgraph": {
78
+ "command": "npx",
79
+ "args": ["-y", "@aibuildinfra/proofgraph"]
80
+ }
81
+ }
82
+ }
83
+ ```
84
+
85
+ ---
86
+
87
+ ## 5. MCP Tools Suite
88
+
89
+ | Tool | Purpose | Key Parameters |
90
+ | :--- | :--- | :--- |
91
+ | `get_evidence_packet` | **Primary AI retrieval interface**: Returns minimal sufficient proof packet. | `question`, `entity_id`, `max_tokens` (default 1500) |
92
+ | `search_entities` | Multi-signal entity discovery by name, domain, or alias. | `query`, `limit` |
93
+ | `get_entity` | Retrieve canonical entity record, metadata, and Schema.org JSON-LD. | `entity_id` |
94
+ | `verify_claim` | Grounded verification against evidence (`supported`, `contradicted`, `conflicting`). | `claim`, `entity_id` |
95
+ | `find_evidence` | Compact token-budgeted proof retrieval for a claim. | `claim`, `max_tokens` |
96
+ | `find_relationships` | Multi-hop graph traversal (1, 2, or 3 hops). | `entity_id`, `relationship`, `depth` |
97
+ | `explain_entity` | Concise factual entity profile backed by verified sources. | `entity_id` |
98
+ | `trace_claim` | Step-by-step provenance audit trail (Claim ➔ Evidence ➔ Source ➔ URL ➔ SHA-256). | `claim`, `entity_id` |
99
+ | `compare_claims` | Impartial discrepancy detection between conflicting statements. | `claims` |
100
+ | `analyze_web_presence`| Digital footprint breakdown (official, GitHub, npm, registries, 3rd party). | `entity_id`, `domain` |
101
+ | `audit_entity_consistency`| Cross-platform diagnostic identifying footprint mismatches. | `entity_id` |
102
+ | `export_graph` | Export graph to `json`, `jsonld`, `csv`, or `graphml`. | `format` |
103
+
104
+ ---
105
+
106
+ ## 6. MCP Resources & Prompts
107
+
108
+ ### Resources
109
+ - `proofgraph://entities/{id}` — Canonical entity records and relationship graphs.
110
+ - `proofgraph://claims/{id}` — Claim statements and supporting evidence references.
111
+ - `proofgraph://sources/{id}` — Source metadata, trust classification, and SHA-256 hashes.
112
+ - `proofgraph://relationships/{id}` — Directional entity relationship mappings.
113
+
114
+ ### Prompts
115
+ - `verify-answer` — Instructs LLM to strictly ground answers in ProofGraph evidence packets.
116
+ - `research-entity` — Guides complete entity profiling and relationship discovery.
117
+ - `trace-claim` — Produces full cryptographic provenance audit trails.
118
+ - `build-evidence-summary` — Citation-first summaries within token limits.
119
+ - `detect-conflicts` — Impartial discrepancy analysis for conflicting claims.
120
+
121
+ ---
122
+
123
+ ## 7. Token Optimization & Benchmark
124
+
125
+ ProofGraph dramatically reduces context consumption without sacrificing retrieval precision:
126
+
127
+ ```
128
+ Traditional Raw Context Dumping: 8,400 tokens
129
+ ProofGraph Compact Packet: 1,240 tokens
130
+ Context Reduction: ~85.2% Token Savings
131
+ ```
132
+
133
+ ### Compression Algorithm:
134
+ 1. **Deduplication**: Excerpts with $>0.88$ string similarity are collapsed into a single quote with corroboration IDs.
135
+ 2. **Budget Enforcement**: Dynamically allocates budget across entities (12%), claims (15%), primary evidence (55%), and provenance (12%).
136
+ 3. **Evidence Ranking**: Prioritizes sources based on Trust Class, Directness, Freshness, and Relevance.
137
+
138
+ ---
139
+
140
+ ## 8. CLI Usage
141
+
142
+ ProofGraph includes a rich developer CLI:
143
+
144
+ ```bash
145
+ # Initialize seed graph
146
+ proofgraph init
147
+
148
+ # Search entities
149
+ proofgraph search "AI Build Infra"
150
+
151
+ # Verify a claim
152
+ proofgraph verify "AI Build Infra develops MCP servers"
153
+
154
+ # Trace cryptographic provenance
155
+ proofgraph trace "AI Build Infra develops MCP servers"
156
+
157
+ # Run consistency audit
158
+ proofgraph audit "AI Build Infra"
159
+
160
+ # Run token reduction benchmark
161
+ proofgraph benchmark
162
+ ```
163
+
164
+ ---
165
+
166
+ ## 9. Developer Web Dashboard
167
+
168
+ Launch the developer dashboard to visually explore graph topologies, entities, claims, and audit diagnostics:
169
+
170
+ ```bash
171
+ npm run dashboard
172
+ # Running at http://localhost:3456
173
+ ```
174
+
175
+ ---
176
+
177
+ ## 10. Security & SSRF Protection
178
+
179
+ ProofGraph includes production-grade security controls:
180
+ - **SSRF Disallowed Ranges**: Blocks loopback (`127.0.0.1`), RFC 1918 private subnets (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`), and Cloud Metadata endpoints (`169.254.169.254`, `metadata.google.internal`).
181
+ - **Robots.txt Adherence**: Parses and respects crawl policies and rate limits.
182
+ - **Payload Limits**: 8-second request timeouts and 1MB response size limits.
183
+
184
+ ---
185
+
186
+ ## 11. Publisher & Open-Source Integrity
187
+
188
+ ProofGraph is proudly engineered and maintained by **AI Build Infra**.
189
+
190
+ - **Website**: [https://aibuildinfra.com/](https://aibuildinfra.com/)
191
+ - **Documentation**: [https://aibuildinfra.com/proofgraph/](https://aibuildinfra.com/proofgraph/)
192
+ - **GitHub**: [https://github.com/AI-BuildInfra/proofgraph](https://github.com/AI-BuildInfra/proofgraph)
193
+ - **License**: MIT
package/SECURITY.md ADDED
@@ -0,0 +1,27 @@
1
+ # Security Policy — ProofGraph
2
+
3
+ ProofGraph is committed to ensuring high security, rigorous SSRF prevention, and safe data retrieval.
4
+
5
+ ## 1. SSRF Protection Policy
6
+
7
+ ProofGraph implements strict Server-Side Request Forgery (SSRF) controls:
8
+ - **Disallowed Local & Loopback Hosts**: `localhost`, `127.0.0.0/8`, `::1`.
9
+ - **Disallowed Private IP Ranges (RFC 1918)**:
10
+ - `10.0.0.0/8`
11
+ - `172.16.0.0/12`
12
+ - `192.168.0.0/16`
13
+ - **Disallowed Cloud Metadata Endpoints**:
14
+ - `169.254.0.0/16` (e.g. `169.254.169.254` AWS/GCP/Azure instance metadata)
15
+ - `metadata.google.internal`
16
+ - `instance-data`
17
+ - **Redirect Revalidation**: Any HTTP 3xx redirect is re-evaluated against the SSRF policy before following.
18
+
19
+ ## 2. Crawler & Network Guardrails
20
+
21
+ - **Robots.txt Adherence**: Respects `robots.txt` disallows and crawl-delays.
22
+ - **Request Limits**: Enforces 8-second request timeouts and 1MB maximum payload limits.
23
+ - **Header Identification**: Sends explicit user-agent identifying ProofGraph bot as a neutral evidence collector.
24
+
25
+ ## 3. Reporting Vulnerabilities
26
+
27
+ To report a security concern, contact security@aibuildinfra.com.
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * ProofGraph CLI Tool Suite
4
+ * Direct command line interface for entity management, verification, audits & benchmarks
5
+ */
6
+ export {};
@@ -0,0 +1,273 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * ProofGraph CLI Tool Suite
4
+ * Direct command line interface for entity management, verification, audits & benchmarks
5
+ */
6
+ import { globalGraphStore } from '../storage/graphStore.js';
7
+ import { seedStandardGraph } from '../data/seed.js';
8
+ import { EntityResolver } from '../engine/resolver.js';
9
+ import { ClaimVerifier } from '../engine/claimVerifier.js';
10
+ import { ConsistencyAuditor } from '../engine/consistencyAudit.js';
11
+ import { AIDiscoverabilityEngine } from '../engine/aiDiscoverability.js';
12
+ import { GraphExporter } from '../engine/exporter.js';
13
+ import { TokenOptimizer } from '../engine/tokenOptimizer.js';
14
+ import { ProofGraphMCPServer } from '../mcp/server.js';
15
+ // Initialize with standard seed data
16
+ seedStandardGraph(globalGraphStore);
17
+ const args = process.argv.slice(2);
18
+ const command = args[0] || 'help';
19
+ async function main() {
20
+ switch (command) {
21
+ case 'help':
22
+ case '--help':
23
+ case '-h': {
24
+ console.log(`
25
+ ProofGraph CLI — Evidence-First Knowledge & Entity Graph
26
+ Publisher: AI Build Infra (https://aibuildinfra.com/proofgraph/)
27
+
28
+ Usage:
29
+ proofgraph <command> [arguments]
30
+
31
+ Commands:
32
+ init Initialize or re-seed the local graph database
33
+ search <query> Search for candidate entities by name or alias
34
+ verify "<claim>" Verify a claim against cryptographic evidence
35
+ trace "<claim>" Display complete provenance trail for a claim
36
+ audit <entity> Run an entity consistency audit across platforms
37
+ discoverability <entity> Run AI Discoverability diagnostic checklist
38
+ export <json|jsonld|csv> Export knowledge graph to specified format
39
+ benchmark Run quantitative token reduction & retrieval benchmark
40
+ serve Launch ProofGraph MCP server over STDIO
41
+ `);
42
+ break;
43
+ }
44
+ case 'init': {
45
+ seedStandardGraph(globalGraphStore);
46
+ console.log('✓ ProofGraph verified seed dataset initialized successfully.');
47
+ console.log(` Indexed Entities: ${globalGraphStore.getAllEntities().length}`);
48
+ console.log(` Indexed Claims: ${globalGraphStore.getAllClaims().length}`);
49
+ console.log(` Indexed Evidence: ${globalGraphStore.getAllEvidence().length}`);
50
+ console.log(` Indexed Relationships: ${globalGraphStore.getAllRelationships().length}`);
51
+ break;
52
+ }
53
+ case 'search': {
54
+ const query = args.slice(1).join(' ');
55
+ if (!query) {
56
+ console.error('Error: Please provide a search query. Example: proofgraph search "AI Build Infra"');
57
+ process.exit(1);
58
+ }
59
+ const resolver = new EntityResolver(globalGraphStore);
60
+ const candidates = resolver.resolve({ name: query });
61
+ console.log(`\nSearch Results for "${query}":`);
62
+ if (candidates.length === 0) {
63
+ console.log(' No matching entities found.');
64
+ }
65
+ else {
66
+ candidates.forEach((c, idx) => {
67
+ console.log(`\n[${idx + 1}] ${c.entity.name} (${c.entity.type})`);
68
+ console.log(` Canonical ID: ${c.entity.id}`);
69
+ console.log(` Match Score: ${(c.match_score * 100).toFixed(1)}%`);
70
+ console.log(` Signals: Name=${c.signals.name}, Domain=${c.signals.domain}, GitHub=${c.signals.github}, npm=${c.signals.npm}`);
71
+ console.log(` URL: ${c.entity.canonical_url || 'N/A'}`);
72
+ });
73
+ }
74
+ break;
75
+ }
76
+ case 'verify': {
77
+ const claimStmt = args.slice(1).join(' ');
78
+ if (!claimStmt) {
79
+ console.error('Error: Please provide a claim statement to verify.');
80
+ process.exit(1);
81
+ }
82
+ const verifier = new ClaimVerifier(globalGraphStore);
83
+ const result = verifier.verify(claimStmt);
84
+ console.log('\n================ PROOFGRAPH CLAIM VERIFICATION ================');
85
+ console.log(`Claim: "${result.claim}"`);
86
+ console.log(`Status: [${result.status.toUpperCase()}]`);
87
+ console.log(`Confidence: ${(result.confidence * 100).toFixed(1)}%`);
88
+ console.log(`Detail: ${result.explanation}`);
89
+ console.log('----------------------------------------------------------------');
90
+ if (result.supporting_evidence.length > 0) {
91
+ console.log('\nSupporting Evidence:');
92
+ result.supporting_evidence.forEach((ev, i) => {
93
+ console.log(` (${i + 1}) [${ev.source_type}] ${ev.publisher} (${ev.url})`);
94
+ console.log(` Excerpt: "${ev.excerpt}"`);
95
+ console.log(` Directness: ${ev.directness} | Hash: ${ev.content_hash.substring(0, 12)}...`);
96
+ });
97
+ }
98
+ if (result.contradicting_evidence.length > 0) {
99
+ console.log('\nContradicting Evidence:');
100
+ result.contradicting_evidence.forEach((ev, i) => {
101
+ console.log(` (${i + 1}) [${ev.source_type}] ${ev.publisher} (${ev.url})`);
102
+ console.log(` Excerpt: "${ev.excerpt}"`);
103
+ });
104
+ }
105
+ console.log('================================================================\n');
106
+ break;
107
+ }
108
+ case 'trace': {
109
+ const claimStmt = args.slice(1).join(' ');
110
+ if (!claimStmt) {
111
+ console.error('Error: Please provide a claim statement to trace.');
112
+ process.exit(1);
113
+ }
114
+ const verifier = new ClaimVerifier(globalGraphStore);
115
+ const res = verifier.verify(claimStmt);
116
+ const sourcesMap = new Map(globalGraphStore.getAllSources().map(s => [s.id, s]));
117
+ console.log(`\nProvenance Chain for: "${claimStmt}"`);
118
+ console.log(`Status: [${res.status.toUpperCase()}] (${(res.confidence * 100).toFixed(1)}%)\n`);
119
+ res.supporting_evidence.forEach((ev, idx) => {
120
+ const src = sourcesMap.get(ev.source_id);
121
+ console.log(`[Provenance Trail #${idx + 1}]`);
122
+ console.log(` 1. Claim: "${claimStmt}"`);
123
+ console.log(` ↓`);
124
+ console.log(` 2. Evidence Excerpt: "${ev.excerpt}"`);
125
+ console.log(` ↓`);
126
+ console.log(` 3. Source: ${src?.title || ev.publisher} (${ev.source_type})`);
127
+ console.log(` ↓`);
128
+ console.log(` 4. URL: ${ev.url}`);
129
+ console.log(` ↓`);
130
+ console.log(` 5. Retrieved: ${ev.retrieved_at}`);
131
+ console.log(` ↓`);
132
+ console.log(` 6. Content Hash (SHA-256): ${ev.content_hash}\n`);
133
+ });
134
+ break;
135
+ }
136
+ case 'audit': {
137
+ const entityName = args.slice(1).join(' ') || 'AI Build Infra';
138
+ const auditor = new ConsistencyAuditor(globalGraphStore);
139
+ const audit = auditor.audit(entityName);
140
+ console.log('\n================ ENTITY CONSISTENCY AUDIT ================');
141
+ console.log(`Entity: ${audit.entity}`);
142
+ console.log(`Consistency Score: ${(audit.consistency_score * 100).toFixed(1)}%`);
143
+ console.log('\nPlatform Footprint:');
144
+ for (const [key, val] of Object.entries(audit.footprint)) {
145
+ console.log(` • ${key.padEnd(22)}: ${val ? '✓ Verified' : '✗ Missing'}`);
146
+ }
147
+ if (audit.issues.length > 0) {
148
+ console.log('\nDiagnostic Issues:');
149
+ audit.issues.forEach((iss, i) => {
150
+ console.log(` (${i + 1}) [${iss.severity.toUpperCase()}] ${iss.component}: ${iss.message}`);
151
+ console.log(` Action: ${iss.recommendation}`);
152
+ });
153
+ }
154
+ console.log('==========================================================\n');
155
+ break;
156
+ }
157
+ case 'discoverability': {
158
+ const entityName = args.slice(1).join(' ') || 'AI Build Infra';
159
+ const engine = new AIDiscoverabilityEngine(globalGraphStore);
160
+ const res = engine.evaluate(entityName);
161
+ console.log('\n================ AI DISCOVERABILITY DIAGNOSTIC ================');
162
+ console.log(`Entity: ${res.entity}`);
163
+ console.log(`Overall Score: ${(res.overall_score * 100).toFixed(1)}%`);
164
+ console.log('\nChecklist:');
165
+ for (const [key, item] of Object.entries(res.checklist)) {
166
+ console.log(` • ${key.padEnd(26)} [${item.status.toUpperCase().padEnd(7)}]: ${item.detail}`);
167
+ }
168
+ if (res.recommendations.length > 0) {
169
+ console.log('\nRecommendations:');
170
+ res.recommendations.forEach((r, i) => console.log(` (${i + 1}) ${r}`));
171
+ }
172
+ console.log('===============================================================\n');
173
+ break;
174
+ }
175
+ case 'export': {
176
+ const format = (args[1] || 'json').toLowerCase();
177
+ const exporter = new GraphExporter(globalGraphStore);
178
+ if (format === 'jsonld') {
179
+ console.log(exporter.toJSONLD());
180
+ }
181
+ else if (format === 'csv') {
182
+ const csv = exporter.toCSV();
183
+ console.log('--- Entities CSV ---');
184
+ console.log(csv.entitiesCSV);
185
+ console.log('\n--- Relationships CSV ---');
186
+ console.log(csv.relationshipsCSV);
187
+ }
188
+ else if (format === 'graphml') {
189
+ console.log(exporter.toGraphML());
190
+ }
191
+ else {
192
+ console.log(exporter.toJSON());
193
+ }
194
+ break;
195
+ }
196
+ case 'benchmark': {
197
+ console.log('\n================ PROOFGRAPH TOKEN REDUCTION BENCHMARK ================');
198
+ const benchmarkQuestions = [
199
+ 'Who is AI Build Infra?',
200
+ 'What is HumanCraft?',
201
+ 'What evidence connects HumanCraft to AI Build Infra?',
202
+ 'Is AI Build Infra associated with HumanCraft and ProofGraph?',
203
+ 'What software development services does AI Build Infra provide?',
204
+ ];
205
+ const sourcesMap = new Map(globalGraphStore.getAllSources().map(s => [s.id, s]));
206
+ let totalRaw = 0;
207
+ let totalPacket = 0;
208
+ for (let i = 0; i < benchmarkQuestions.length; i++) {
209
+ const q = benchmarkQuestions[i];
210
+ const resolver = new EntityResolver(globalGraphStore);
211
+ const candidates = resolver.resolve({ name: q });
212
+ const entity = candidates[0]?.entity || globalGraphStore.getEntity('entity:organization:ai-build-infra');
213
+ const rels = globalGraphStore.getRelationships(entity.id);
214
+ const verifier = new ClaimVerifier(globalGraphStore);
215
+ const verification = verifier.verify(q, entity.id);
216
+ const packet = TokenOptimizer.buildPacket({
217
+ question: q,
218
+ entities: [entity],
219
+ claims: [
220
+ {
221
+ id: `claim:q${i}`,
222
+ subject_id: entity.id,
223
+ predicate: 'RETRIEVED',
224
+ statement: q,
225
+ status: verification.status,
226
+ confidence: verification.confidence,
227
+ evidence_ids: verification.supporting_evidence.map(e => e.id),
228
+ created_at: new Date().toISOString(),
229
+ updated_at: new Date().toISOString(),
230
+ },
231
+ ],
232
+ relationships: rels.map(r => ({
233
+ source_id: r.source_id,
234
+ target_id: r.target_id,
235
+ relationship: r.relationship,
236
+ confidence: r.confidence,
237
+ })),
238
+ evidence: verification.supporting_evidence,
239
+ sources: sourcesMap,
240
+ maxTokens: 1500,
241
+ });
242
+ totalRaw += packet.metrics.raw_estimated_tokens;
243
+ totalPacket += packet.metrics.returned_tokens;
244
+ console.log(`\nQuestion ${i + 1}: "${q}"`);
245
+ console.log(` Raw Text Context: ~${packet.metrics.raw_estimated_tokens.toLocaleString()} tokens`);
246
+ console.log(` ProofGraph Packet: ${packet.metrics.returned_tokens.toLocaleString()} tokens`);
247
+ console.log(` Token Compression: ${((1 - packet.metrics.compression_ratio) * 100).toFixed(1)}% savings`);
248
+ console.log(` Evidence Precision: ${packet.evidence.length} compact proofs selected from ${packet.metrics.sources_considered} sources`);
249
+ }
250
+ console.log('\n----------------------------------------------------------------------');
251
+ console.log(`Cumulative Benchmark Summary:`);
252
+ console.log(` Traditional Unfiltered Context: ~${totalRaw.toLocaleString()} tokens`);
253
+ console.log(` ProofGraph Evidence Packets: ${totalPacket.toLocaleString()} tokens`);
254
+ console.log(` Overall Context Reduction: ${(((totalRaw - totalPacket) / totalRaw) * 100).toFixed(1)}%`);
255
+ console.log('======================================================================\n');
256
+ break;
257
+ }
258
+ case 'serve': {
259
+ const server = new ProofGraphMCPServer(globalGraphStore);
260
+ await server.start();
261
+ break;
262
+ }
263
+ default: {
264
+ console.error(`Unknown command: "${command}". Run "proofgraph --help" for available commands.`);
265
+ process.exit(1);
266
+ }
267
+ }
268
+ }
269
+ main().catch(err => {
270
+ console.error('Execution error:', err);
271
+ process.exit(1);
272
+ });
273
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1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OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YAC9G,OAAO,CAAC,GAAG,CAAC,0EAA0E,CAAC,CAAC;YACxF,MAAM;QACR,CAAC;QAED,KAAK,OAAO,CAAC,CAAC,CAAC;YACb,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;YACzD,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;YACrB,MAAM;QACR,CAAC;QAED,OAAO,CAAC,CAAC,CAAC;YACR,OAAO,CAAC,KAAK,CAAC,qBAAqB,OAAO,oDAAoD,CAAC,CAAC;YAChG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;IACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * ProofGraph Lightweight Developer Dashboard
3
+ * Built with native Node.js HTTP server and responsive vanilla UI
4
+ */
5
+ export declare function startDashboard(port?: number): void;