tzero-mcp 11.0.0 → 11.11.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.
- package/CHANGELOG.md +56 -56
- package/CONTRIBUTING.md +71 -71
- package/LICENSE +21 -21
- package/README.md +64 -64
- package/bin/tzero-mcp.js +62 -62
- package/bin/tzero.js +61 -61
- package/index.d.ts +25 -25
- package/index.js +15 -15
- package/package.json +89 -88
- package/src/addmcp.py +1203 -1197
- package/src/app.py +1810 -1810
- package/src/main.py +60 -60
- package/src/pc_fixer_mcp.py +25 -25
- package/src/tzero/__init__.py +54 -54
- package/src/tzero/__main__.py +6 -6
- package/src/tzero/siber_akademi_icon.py +77 -77
- package/src/tzero/tzero_arch_test.py +463 -463
- package/src/tzero/tzero_benchmark.py +475 -475
- package/src/tzero/tzero_blackboard.py +257 -257
- package/src/tzero/tzero_bridge.py +546 -546
- package/src/tzero/tzero_budget.py +195 -195
- package/src/tzero/tzero_card.py +431 -0
- package/src/tzero/tzero_ci.py +153 -153
- package/src/tzero/tzero_commit.py +192 -192
- package/src/tzero/tzero_contracts.py +1093 -1093
- package/src/tzero/tzero_cost.py +166 -166
- package/src/tzero/tzero_dashboard.py +1960 -1960
- package/src/tzero/tzero_debt.py +461 -461
- package/src/tzero/tzero_deps.py +462 -462
- package/src/tzero/tzero_drift.py +208 -208
- package/src/tzero/tzero_explain.py +306 -306
- package/src/tzero/tzero_features.py +3024 -3024
- package/src/tzero/tzero_federation.py +299 -299
- package/src/tzero/tzero_fix.py +557 -228
- package/src/tzero/tzero_fixer/__init__.py +63 -63
- package/src/tzero/tzero_fixer/amalgamation.py +334 -334
- package/src/tzero/tzero_fixer/ast_syntax_healer.py +464 -464
- package/src/tzero/tzero_fixer/ast_type_modernizer.py +288 -288
- package/src/tzero/tzero_fixer/async_io_modernizer.py +127 -127
- package/src/tzero/tzero_fixer/automated_regression_suite.py +600 -600
- package/src/tzero/tzero_fixer/benchmarks_and_diagnostics.py +174 -174
- package/src/tzero/tzero_fixer/ci_cd_self_healing_gate.py +246 -246
- package/src/tzero/tzero_fixer/code_duplicity_and_refactorer.py +151 -151
- package/src/tzero/tzero_fixer/code_smells_healer.py +260 -260
- package/src/tzero/tzero_fixer/cwe_remediator.py +171 -171
- package/src/tzero/tzero_fixer/dead_code_eliminator.py +150 -150
- package/src/tzero/tzero_fixer/dependency_vulnerability_auditor.py +309 -309
- package/src/tzero/tzero_fixer/git_advanced_surgeon.py +280 -280
- package/src/tzero/tzero_fixer/hardware_and_disk_doctor.py +325 -325
- package/src/tzero/tzero_fixer/import_graph_healer.py +412 -412
- package/src/tzero/tzero_fixer/interactive_tui.py +91 -91
- package/src/tzero/tzero_fixer/knowledge_base.py +295 -295
- package/src/tzero/tzero_fixer/knowledge_base_extended.py +940 -940
- package/src/tzero/tzero_fixer/linters_and_static_analyzer.py +307 -307
- package/src/tzero/tzero_fixer/mcp_server.py +489 -489
- package/src/tzero/tzero_fixer/models.py +385 -385
- package/src/tzero/tzero_fixer/orchestrator.py +375 -375
- package/src/tzero/tzero_fixer/os_doctor.py +502 -502
- package/src/tzero/tzero_fixer/packaging_abi_surgeon.py +323 -323
- package/src/tzero/tzero_fixer/pc_fixer_doctor.py +600 -600
- package/src/tzero/tzero_fixer/performance_and_memory_profiler.py +274 -274
- package/src/tzero/tzero_fixer/polyglot_ast_parsers.py +313 -313
- package/src/tzero/tzero_fixer/polyglot_build_healer.py +364 -364
- package/src/tzero/tzero_fixer/polyglot_config_healer.py +318 -318
- package/src/tzero/tzero_fixer/polyglot_doctor.py +372 -372
- package/src/tzero/tzero_fixer/polyglot_linters.py +619 -619
- package/src/tzero/tzero_fixer/polyglot_schema_validator.py +305 -305
- package/src/tzero/tzero_fixer/security_cwe_database.py +444 -444
- package/src/tzero/tzero_fixer/security_deep_rules.py +114 -114
- package/src/tzero/tzero_fixer/security_rules_catalog.py +110 -110
- package/src/tzero/tzero_fixer/security_zero_leak.py +326 -326
- package/src/tzero/tzero_fixer/smart_patch_recommender.py +223 -223
- package/src/tzero/tzero_fixer/synthetic_workspace_generator.py +220 -220
- package/src/tzero/tzero_fixer/system_diagnostics_extended.py +493 -493
- package/src/tzero/tzero_fixer/system_repair_recipes.py +447 -447
- package/src/tzero/tzero_fixer/venv_doctor.py +309 -309
- package/src/tzero/tzero_golden.py +319 -319
- package/src/tzero/tzero_graph_hud.html +338 -338
- package/src/tzero/tzero_graph_rag.py +263 -263
- package/src/tzero/tzero_growth.py +415 -0
- package/src/tzero/tzero_guard.py +251 -243
- package/src/tzero/tzero_hooks.py +565 -565
- package/src/tzero/tzero_infra.py +274 -274
- package/src/tzero/tzero_jarvis/__init__.py +134 -124
- package/src/tzero/tzero_jarvis/causal_graph.py +310 -310
- package/src/tzero/tzero_jarvis/creative_director.py +333 -0
- package/src/tzero/tzero_jarvis/graph_visualizer.py +395 -395
- package/src/tzero/tzero_jarvis/hybrid_search.py +214 -214
- package/src/tzero/tzero_jarvis/latent_press.py +137 -137
- package/src/tzero/tzero_jarvis/memory_consolidation.py +212 -212
- package/src/tzero/tzero_jarvis/minhash_lsh.py +184 -184
- package/src/tzero/tzero_jarvis/orchestrator.py +335 -335
- package/src/tzero/tzero_jarvis/self_healing.py +308 -308
- package/src/tzero/tzero_jarvis/semantic_compressor.py +887 -887
- package/src/tzero/tzero_jarvis/swarm.py +261 -261
- package/src/tzero/tzero_jarvis/swarm_bft.py +144 -144
- package/src/tzero/tzero_jarvis/workspace_orchestrator.py +1167 -1167
- package/src/tzero/tzero_jarvis/zero_key_router.py +173 -173
- package/src/tzero/tzero_lsp.py +634 -634
- package/src/tzero/tzero_mcp.py +5314 -5237
- package/src/tzero/tzero_mutation.py +358 -358
- package/src/tzero/tzero_neural_cortex.py +1425 -1425
- package/src/tzero/tzero_packer.py +577 -577
- package/src/tzero/tzero_patch.py +624 -624
- package/src/tzero/tzero_pc_fixer.py +12699 -12699
- package/src/tzero/tzero_pipe.py +95 -95
- package/src/tzero/tzero_polyglot.py +799 -799
- package/src/tzero/tzero_proxy.py +127 -127
- package/src/tzero/tzero_reachability.py +272 -272
- package/src/tzero/tzero_replay.py +141 -141
- package/src/tzero/tzero_rust_bridge.py +198 -198
- package/src/tzero/tzero_scip.py +368 -368
- package/src/tzero/tzero_security.py +573 -573
- package/src/tzero/tzero_semantic_merge.py +189 -189
- package/src/tzero/tzero_snapshot.py +471 -471
- package/src/tzero/tzero_stubs.py +313 -313
- package/src/tzero/tzero_subagent_engine.py +459 -459
- package/src/tzero/tzero_superdesign.py +774 -774
- package/src/tzero/tzero_sync.py +241 -241
- package/src/tzero/tzero_task_benchmark.py +506 -458
- package/src/tzero/tzero_tui.py +313 -313
- package/src/tzero/tzero_turbo.py +264 -264
- package/src/tzero/tzero_v3.py +9997 -9900
- package/src/tzero.py +6 -6
- package/src/tzero_mcp.py +25 -0
- package/test/package.test.js +55 -55
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
"""
|
|
3
|
-
T-ZERO LATENTPRESS: PRE-PREFILL CONTEXT COMPRESSION & QUANTIZATION ENGINE
|
|
4
|
-
Developer: Toprak Ahmet Aydoğmuş (Siber Akademi)
|
|
5
|
-
Version: 4.5.0
|
|
6
|
-
|
|
7
|
-
Bu modül, 2024-2025 "Latent Context Language Models (LCLM)" ve "LatentPress"
|
|
8
|
-
araştırma literatürünü uygulayarak; on binlerce kelimelik devasa log veya
|
|
9
|
-
kod bloklarını LLM prefill aşamasına girmeden önce upstream seviyede sıkıştırır,
|
|
10
|
-
MinHash LSH ile gereksiz tekrarları eler ve ultra-kompakt sanal bellek dizgisine
|
|
11
|
-
(<|tzero:mem:ID|>) dönüştürür.
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
from __future__ import annotations
|
|
15
|
-
import math
|
|
16
|
-
import time
|
|
17
|
-
from typing import Dict, List, Optional, Any
|
|
18
|
-
from dataclasses import dataclass
|
|
19
|
-
from tzero.tzero_jarvis.semantic_compressor import SemanticExtractor, DynamicVirtualMemoryInjector, get_global_compressor
|
|
20
|
-
from tzero.tzero_jarvis.minhash_lsh import MinHashLSHEngine
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
@dataclass
|
|
24
|
-
class LatentPressResult:
|
|
25
|
-
original_text: str
|
|
26
|
-
original_words: int
|
|
27
|
-
original_tokens_est: int
|
|
28
|
-
compressed_tokens: int
|
|
29
|
-
compression_ratio_x: float
|
|
30
|
-
token_savings_pct: float
|
|
31
|
-
shannon_entropy_original: float
|
|
32
|
-
shannon_entropy_compressed: float
|
|
33
|
-
virtual_token_stream: str
|
|
34
|
-
unique_semantic_triplets: int
|
|
35
|
-
duplicate_chunks_pruned: int
|
|
36
|
-
latency_ms: float
|
|
37
|
-
|
|
38
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
39
|
-
return {
|
|
40
|
-
"original_words": self.original_words,
|
|
41
|
-
"original_tokens_est": self.original_tokens_est,
|
|
42
|
-
"compressed_tokens": self.compressed_tokens,
|
|
43
|
-
"compression_ratio_x": round(self.compression_ratio_x, 2),
|
|
44
|
-
"token_savings_pct": round(self.token_savings_pct, 2),
|
|
45
|
-
"shannon_entropy_original": round(self.shannon_entropy_original, 3),
|
|
46
|
-
"shannon_entropy_compressed": round(self.shannon_entropy_compressed, 3),
|
|
47
|
-
"virtual_token_stream": self.virtual_token_stream,
|
|
48
|
-
"unique_semantic_triplets": self.unique_semantic_triplets,
|
|
49
|
-
"duplicate_chunks_pruned": self.duplicate_chunks_pruned,
|
|
50
|
-
"latency_ms": round(self.latency_ms, 2)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
class LatentPressCompressor:
|
|
55
|
-
"""
|
|
56
|
-
Upstream Pre-Prefill Bağlam Sıkıştırıcı ve Uyarlamalı Kuantizasyon Motoru.
|
|
57
|
-
"""
|
|
58
|
-
|
|
59
|
-
def __init__(self, injector: Optional[DynamicVirtualMemoryInjector] = None):
|
|
60
|
-
self.injector = injector or get_global_compressor()
|
|
61
|
-
self.lsh_engine = MinHashLSHEngine()
|
|
62
|
-
|
|
63
|
-
@staticmethod
|
|
64
|
-
def _calculate_shannon_entropy(text: str) -> float:
|
|
65
|
-
"""Karakter dağılımı üzerinden Shannon Entropisini hesaplar."""
|
|
66
|
-
if not text:
|
|
67
|
-
return 0.0
|
|
68
|
-
frequencies: Dict[str, int] = {}
|
|
69
|
-
for char in text:
|
|
70
|
-
frequencies[char] = frequencies.get(char, 0) + 1
|
|
71
|
-
|
|
72
|
-
entropy = 0.0
|
|
73
|
-
total_chars = len(text)
|
|
74
|
-
for count in frequencies.values():
|
|
75
|
-
p = count / total_chars
|
|
76
|
-
entropy -= p * math.log2(p)
|
|
77
|
-
return entropy
|
|
78
|
-
|
|
79
|
-
def compress_large_context(self, context_text: str, near_dup_threshold: float = 0.65) -> LatentPressResult:
|
|
80
|
-
"""
|
|
81
|
-
Geniş metni anlamsal bloklara ayırır, MinHash ile yakın-kopyaları eler
|
|
82
|
-
ve Latent Soft-Prompt akışına dönüştürür.
|
|
83
|
-
"""
|
|
84
|
-
t0 = time.time()
|
|
85
|
-
raw_words = context_text.split()
|
|
86
|
-
total_words = len(raw_words)
|
|
87
|
-
orig_tokens_est = max(1, int(total_words * 1.3))
|
|
88
|
-
orig_entropy = self._calculate_shannon_entropy(context_text)
|
|
89
|
-
|
|
90
|
-
# Cümle veya paragraf bazında parçala
|
|
91
|
-
chunks = [c.strip() for c in context_text.splitlines() if len(c.strip()) > 5]
|
|
92
|
-
if not chunks:
|
|
93
|
-
chunks = [context_text]
|
|
94
|
-
|
|
95
|
-
pruned_count = 0
|
|
96
|
-
accepted_tokens = []
|
|
97
|
-
unique_triplets = []
|
|
98
|
-
|
|
99
|
-
for chunk in chunks:
|
|
100
|
-
triplets = SemanticExtractor.extract_triplets(chunk)
|
|
101
|
-
for trip in triplets:
|
|
102
|
-
# MinHash LSH ile yakın-kopya kontrolü
|
|
103
|
-
near_dups = self.lsh_engine.query_near_duplicates(trip, threshold=near_dup_threshold)
|
|
104
|
-
if near_dups:
|
|
105
|
-
# Daha önce benzeri kaydedilmiş, gereksiz token yükünü ele!
|
|
106
|
-
pruned_count += 1
|
|
107
|
-
continue
|
|
108
|
-
|
|
109
|
-
code = self.injector.codebook.register_triplet(trip)
|
|
110
|
-
self.lsh_engine.insert(trip, code)
|
|
111
|
-
unique_triplets.append(trip)
|
|
112
|
-
accepted_tokens.append(f"<|tzero:mem:{code}|>")
|
|
113
|
-
|
|
114
|
-
if not accepted_tokens:
|
|
115
|
-
accepted_tokens.append("<|tzero:mem:8421|>")
|
|
116
|
-
|
|
117
|
-
virtual_stream = " ".join(accepted_tokens)
|
|
118
|
-
compressed_tokens = len(accepted_tokens)
|
|
119
|
-
savings_pct = max(0.0, ((orig_tokens_est - compressed_tokens) / float(orig_tokens_est)) * 100.0)
|
|
120
|
-
ratio_x = float(orig_tokens_est) / max(1.0, float(compressed_tokens))
|
|
121
|
-
comp_entropy = self._calculate_shannon_entropy(virtual_stream)
|
|
122
|
-
latency_ms = (time.time() - t0) * 1000.0
|
|
123
|
-
|
|
124
|
-
return LatentPressResult(
|
|
125
|
-
original_text=context_text,
|
|
126
|
-
original_words=total_words,
|
|
127
|
-
original_tokens_est=orig_tokens_est,
|
|
128
|
-
compressed_tokens=compressed_tokens,
|
|
129
|
-
compression_ratio_x=ratio_x,
|
|
130
|
-
token_savings_pct=savings_pct,
|
|
131
|
-
shannon_entropy_original=orig_entropy,
|
|
132
|
-
shannon_entropy_compressed=comp_entropy,
|
|
133
|
-
virtual_token_stream=virtual_stream,
|
|
134
|
-
unique_semantic_triplets=len(unique_triplets),
|
|
135
|
-
duplicate_chunks_pruned=pruned_count,
|
|
136
|
-
latency_ms=latency_ms
|
|
137
|
-
)
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
T-ZERO LATENTPRESS: PRE-PREFILL CONTEXT COMPRESSION & QUANTIZATION ENGINE
|
|
4
|
+
Developer: Toprak Ahmet Aydoğmuş (Siber Akademi)
|
|
5
|
+
Version: 4.5.0
|
|
6
|
+
|
|
7
|
+
Bu modül, 2024-2025 "Latent Context Language Models (LCLM)" ve "LatentPress"
|
|
8
|
+
araştırma literatürünü uygulayarak; on binlerce kelimelik devasa log veya
|
|
9
|
+
kod bloklarını LLM prefill aşamasına girmeden önce upstream seviyede sıkıştırır,
|
|
10
|
+
MinHash LSH ile gereksiz tekrarları eler ve ultra-kompakt sanal bellek dizgisine
|
|
11
|
+
(<|tzero:mem:ID|>) dönüştürür.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
import math
|
|
16
|
+
import time
|
|
17
|
+
from typing import Dict, List, Optional, Any
|
|
18
|
+
from dataclasses import dataclass
|
|
19
|
+
from tzero.tzero_jarvis.semantic_compressor import SemanticExtractor, DynamicVirtualMemoryInjector, get_global_compressor
|
|
20
|
+
from tzero.tzero_jarvis.minhash_lsh import MinHashLSHEngine
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@dataclass
|
|
24
|
+
class LatentPressResult:
|
|
25
|
+
original_text: str
|
|
26
|
+
original_words: int
|
|
27
|
+
original_tokens_est: int
|
|
28
|
+
compressed_tokens: int
|
|
29
|
+
compression_ratio_x: float
|
|
30
|
+
token_savings_pct: float
|
|
31
|
+
shannon_entropy_original: float
|
|
32
|
+
shannon_entropy_compressed: float
|
|
33
|
+
virtual_token_stream: str
|
|
34
|
+
unique_semantic_triplets: int
|
|
35
|
+
duplicate_chunks_pruned: int
|
|
36
|
+
latency_ms: float
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
39
|
+
return {
|
|
40
|
+
"original_words": self.original_words,
|
|
41
|
+
"original_tokens_est": self.original_tokens_est,
|
|
42
|
+
"compressed_tokens": self.compressed_tokens,
|
|
43
|
+
"compression_ratio_x": round(self.compression_ratio_x, 2),
|
|
44
|
+
"token_savings_pct": round(self.token_savings_pct, 2),
|
|
45
|
+
"shannon_entropy_original": round(self.shannon_entropy_original, 3),
|
|
46
|
+
"shannon_entropy_compressed": round(self.shannon_entropy_compressed, 3),
|
|
47
|
+
"virtual_token_stream": self.virtual_token_stream,
|
|
48
|
+
"unique_semantic_triplets": self.unique_semantic_triplets,
|
|
49
|
+
"duplicate_chunks_pruned": self.duplicate_chunks_pruned,
|
|
50
|
+
"latency_ms": round(self.latency_ms, 2)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class LatentPressCompressor:
|
|
55
|
+
"""
|
|
56
|
+
Upstream Pre-Prefill Bağlam Sıkıştırıcı ve Uyarlamalı Kuantizasyon Motoru.
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
def __init__(self, injector: Optional[DynamicVirtualMemoryInjector] = None):
|
|
60
|
+
self.injector = injector or get_global_compressor()
|
|
61
|
+
self.lsh_engine = MinHashLSHEngine()
|
|
62
|
+
|
|
63
|
+
@staticmethod
|
|
64
|
+
def _calculate_shannon_entropy(text: str) -> float:
|
|
65
|
+
"""Karakter dağılımı üzerinden Shannon Entropisini hesaplar."""
|
|
66
|
+
if not text:
|
|
67
|
+
return 0.0
|
|
68
|
+
frequencies: Dict[str, int] = {}
|
|
69
|
+
for char in text:
|
|
70
|
+
frequencies[char] = frequencies.get(char, 0) + 1
|
|
71
|
+
|
|
72
|
+
entropy = 0.0
|
|
73
|
+
total_chars = len(text)
|
|
74
|
+
for count in frequencies.values():
|
|
75
|
+
p = count / total_chars
|
|
76
|
+
entropy -= p * math.log2(p)
|
|
77
|
+
return entropy
|
|
78
|
+
|
|
79
|
+
def compress_large_context(self, context_text: str, near_dup_threshold: float = 0.65) -> LatentPressResult:
|
|
80
|
+
"""
|
|
81
|
+
Geniş metni anlamsal bloklara ayırır, MinHash ile yakın-kopyaları eler
|
|
82
|
+
ve Latent Soft-Prompt akışına dönüştürür.
|
|
83
|
+
"""
|
|
84
|
+
t0 = time.time()
|
|
85
|
+
raw_words = context_text.split()
|
|
86
|
+
total_words = len(raw_words)
|
|
87
|
+
orig_tokens_est = max(1, int(total_words * 1.3))
|
|
88
|
+
orig_entropy = self._calculate_shannon_entropy(context_text)
|
|
89
|
+
|
|
90
|
+
# Cümle veya paragraf bazında parçala
|
|
91
|
+
chunks = [c.strip() for c in context_text.splitlines() if len(c.strip()) > 5]
|
|
92
|
+
if not chunks:
|
|
93
|
+
chunks = [context_text]
|
|
94
|
+
|
|
95
|
+
pruned_count = 0
|
|
96
|
+
accepted_tokens = []
|
|
97
|
+
unique_triplets = []
|
|
98
|
+
|
|
99
|
+
for chunk in chunks:
|
|
100
|
+
triplets = SemanticExtractor.extract_triplets(chunk)
|
|
101
|
+
for trip in triplets:
|
|
102
|
+
# MinHash LSH ile yakın-kopya kontrolü
|
|
103
|
+
near_dups = self.lsh_engine.query_near_duplicates(trip, threshold=near_dup_threshold)
|
|
104
|
+
if near_dups:
|
|
105
|
+
# Daha önce benzeri kaydedilmiş, gereksiz token yükünü ele!
|
|
106
|
+
pruned_count += 1
|
|
107
|
+
continue
|
|
108
|
+
|
|
109
|
+
code = self.injector.codebook.register_triplet(trip)
|
|
110
|
+
self.lsh_engine.insert(trip, code)
|
|
111
|
+
unique_triplets.append(trip)
|
|
112
|
+
accepted_tokens.append(f"<|tzero:mem:{code}|>")
|
|
113
|
+
|
|
114
|
+
if not accepted_tokens:
|
|
115
|
+
accepted_tokens.append("<|tzero:mem:8421|>")
|
|
116
|
+
|
|
117
|
+
virtual_stream = " ".join(accepted_tokens)
|
|
118
|
+
compressed_tokens = len(accepted_tokens)
|
|
119
|
+
savings_pct = max(0.0, ((orig_tokens_est - compressed_tokens) / float(orig_tokens_est)) * 100.0)
|
|
120
|
+
ratio_x = float(orig_tokens_est) / max(1.0, float(compressed_tokens))
|
|
121
|
+
comp_entropy = self._calculate_shannon_entropy(virtual_stream)
|
|
122
|
+
latency_ms = (time.time() - t0) * 1000.0
|
|
123
|
+
|
|
124
|
+
return LatentPressResult(
|
|
125
|
+
original_text=context_text,
|
|
126
|
+
original_words=total_words,
|
|
127
|
+
original_tokens_est=orig_tokens_est,
|
|
128
|
+
compressed_tokens=compressed_tokens,
|
|
129
|
+
compression_ratio_x=ratio_x,
|
|
130
|
+
token_savings_pct=savings_pct,
|
|
131
|
+
shannon_entropy_original=orig_entropy,
|
|
132
|
+
shannon_entropy_compressed=comp_entropy,
|
|
133
|
+
virtual_token_stream=virtual_stream,
|
|
134
|
+
unique_semantic_triplets=len(unique_triplets),
|
|
135
|
+
duplicate_chunks_pruned=pruned_count,
|
|
136
|
+
latency_ms=latency_ms
|
|
137
|
+
)
|