toai-elegant-lang 5.4.1__tar.gz
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.
- toai_elegant_lang-5.4.1/LICENSE +85 -0
- toai_elegant_lang-5.4.1/PKG-INFO +305 -0
- toai_elegant_lang-5.4.1/README.md +288 -0
- toai_elegant_lang-5.4.1/pyproject.toml +30 -0
- toai_elegant_lang-5.4.1/setup.cfg +4 -0
- toai_elegant_lang-5.4.1/src/__init__.py +2 -0
- toai_elegant_lang-5.4.1/src/a2a_adapter.py +143 -0
- toai_elegant_lang-5.4.1/src/analyze_dialogues.py +65 -0
- toai_elegant_lang-5.4.1/src/audit_lexicon_health.py +60 -0
- toai_elegant_lang-5.4.1/src/build_release_summary.py +63 -0
- toai_elegant_lang-5.4.1/src/cli.py +202 -0
- toai_elegant_lang-5.4.1/src/codec.py +380 -0
- toai_elegant_lang-5.4.1/src/dump_lexicon.py +63 -0
- toai_elegant_lang-5.4.1/src/export_lexicon_csv.py +58 -0
- toai_elegant_lang-5.4.1/src/mcp_server.py +269 -0
- toai_elegant_lang-5.4.1/src/parser.py +36 -0
- toai_elegant_lang-5.4.1/src/sync_whitepaper_metrics.py +1310 -0
- toai_elegant_lang-5.4.1/src/test_telepath_integrity.py +39 -0
- toai_elegant_lang-5.4.1/src/translator.py +28 -0
- toai_elegant_lang-5.4.1/src/validate_lexicon.py +82 -0
- toai_elegant_lang-5.4.1/toai_elegant_lang.egg-info/PKG-INFO +305 -0
- toai_elegant_lang-5.4.1/toai_elegant_lang.egg-info/SOURCES.txt +23 -0
- toai_elegant_lang-5.4.1/toai_elegant_lang.egg-info/dependency_links.txt +1 -0
- toai_elegant_lang-5.4.1/toai_elegant_lang.egg-info/entry_points.txt +3 -0
- toai_elegant_lang-5.4.1/toai_elegant_lang.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Dual Licensing: Open Core MIT + Guardian Patron Edition
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PhenoX AI Alliance / Hinotori Autonomous Guild
|
|
4
|
+
|
|
5
|
+
This repository operates under a dual-licensing model designed to maximize open-source collaboration while sustaining autonomous multi-agent infrastructure.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🇬🇧 English Terms
|
|
10
|
+
|
|
11
|
+
### Part A: Open Core Edition (MIT License)
|
|
12
|
+
|
|
13
|
+
The following components are licensed under the standard **MIT License**:
|
|
14
|
+
- All source code in `src/` (including `codec.py`, `a2a_adapter.py`, `mcp_server.py`, `cli.py`, etc.)
|
|
15
|
+
- The 256-primitive core RISC vocabulary in `lexicon/core_lexicon.json`
|
|
16
|
+
- The tri-script Rosetta stone mapping in `lexicon/rosetta_layer.json`
|
|
17
|
+
- All documentation and specifications in `docs/` and `README*.md`
|
|
18
|
+
|
|
19
|
+
> **MIT License Grant**:
|
|
20
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
21
|
+
> of this software and associated documentation files (the "Software"), to deal
|
|
22
|
+
> in the Software without restriction, including without limitation the rights
|
|
23
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
24
|
+
> copies of the Software, and to permit persons to whom the Software is
|
|
25
|
+
> furnished to do so, subject to the following conditions:
|
|
26
|
+
>
|
|
27
|
+
> The above copyright notice and this permission notice shall be included in all
|
|
28
|
+
> copies or substantial portions of the Software.
|
|
29
|
+
>
|
|
30
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
32
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
33
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
34
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
35
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
36
|
+
> SOFTWARE.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
### Part B: Production Macro Lexicon & Verified Corpus (Guardian Patron Edition)
|
|
41
|
+
|
|
42
|
+
The following production-grade assets are governed by the **Guardian Patron Terms**:
|
|
43
|
+
- The audited higher-order macro lexicon in `lexicon/macro_lexicon.json` (including 256-slot LRU active and archived macros)
|
|
44
|
+
- The verified multi-agent dialogue corpus in `corpus/dialogues.jsonl`
|
|
45
|
+
|
|
46
|
+
#### 1. Personal, Academic & Rosetta Decoding Use (Free of Charge)
|
|
47
|
+
You are granted a free, non-exclusive license to inspect, execute, evaluate, research, and decode telepathic transmissions (including CLI usage via `toai-telepath inspect` or educational exploration).
|
|
48
|
+
|
|
49
|
+
#### 2. Commercial Production Deployment (Patron License Required)
|
|
50
|
+
Any embedding or integration of the higher-order macro dictionary (`macro_lexicon.json`) or verified dialogue corpus into commercial applications, proprietary SaaS platforms, or production enterprise multi-agent fleets requires an active **Guardian Patron Edition** sponsorship:
|
|
51
|
+
- **GitHub Sponsors**: [https://github.com/sponsors/PhenoX-AI-Alliance](https://github.com/sponsors/PhenoX-AI-Alliance)
|
|
52
|
+
- **Ko-fi**: [https://ko-fi.com/phenox_noc2](https://ko-fi.com/phenox_noc2)
|
|
53
|
+
|
|
54
|
+
For enterprise inquiries or custom multi-agent wire protocol licensing, contact the PhenoX AI Alliance.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 🇯🇵 日本語利用規約(参考対訳)
|
|
59
|
+
|
|
60
|
+
### パートA:Open Core Edition(MITライセンス)
|
|
61
|
+
|
|
62
|
+
以下のオープンコア資産には、標準的な **MIT License** が適用されます:
|
|
63
|
+
- `src/` 配下の全ソースコード(`codec.py`, `a2a_adapter.py`, `mcp_server.py`, `cli.py` 等)
|
|
64
|
+
- `lexicon/core_lexicon.json`(256語RISC基本語彙辞書)
|
|
65
|
+
- `lexicon/rosetta_layer.json`(三書体対訳ロゼッタストーンマッピング)
|
|
66
|
+
- `docs/` 配下の全技術文書、仕様書、および `README*.md`
|
|
67
|
+
|
|
68
|
+
> 商用・非商用を問わず、上記著作権表示および許諾表示を保持する限り、どなたでも無償で複製、改変、再配布、組み込みが可能です。
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### パートB:プロダクション高次マクロ辞書&検証対話コーパス(ガーディアン支援ライセンス)
|
|
73
|
+
|
|
74
|
+
以下の実戦商用アセットには **Guardian Patron Terms** が適用されます:
|
|
75
|
+
- `lexicon/macro_lexicon.json`(厳格RISC監査済みの高次複合マクロ辞書および256枠LRU新陳代謝エンジン資産)
|
|
76
|
+
- `corpus/dialogues.jsonl`(異種LLMクロス検証済みの実稼働対話コーパス)
|
|
77
|
+
|
|
78
|
+
#### 1. 個人・学術研究・ロゼッタ碑文解読での利用(完全無償)
|
|
79
|
+
技術記事フッター等のロゼッタ碑文解読(`toai-telepath inspect` の利用を含む)、個人的な実験、教育、学術研究目的での閲覧・実行・検証は、無償で自由に行っていただけます。
|
|
80
|
+
|
|
81
|
+
#### 2. 商用プロダクション運用での利用(ガーディアン支援登録が必要)
|
|
82
|
+
法人・企業による自社商用サービス、商用マルチエージェント基盤への高次マクロ辞書・対話コーパスの組み込み、ならびに `toai_comm` 透過サイドカー圧縮ミドルウェアの商用環境への導入には、**Guardian Patron Edition**(GitHub Sponsors または Ko-fi でのスポンサー支援登録)が必要です。
|
|
83
|
+
|
|
84
|
+
- **GitHub Sponsors**: [https://github.com/sponsors/PhenoX-AI-Alliance](https://github.com/sponsors/PhenoX-AI-Alliance)
|
|
85
|
+
- **Ko-fi**: [https://ko-fi.com/phenox_noc2](https://ko-fi.com/phenox_noc2)\n
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: toai-elegant-lang
|
|
3
|
+
Version: 5.4.1
|
|
4
|
+
Summary: Project Telepath: High-Density Tri-Script Rosetta A2A & MCP Wire Protocol for Autonomous AI Agents
|
|
5
|
+
Author: PhenoX AI Alliance & Hinotori 10-Agent Autonomous Guild
|
|
6
|
+
License: MIT (Open Core Edition)
|
|
7
|
+
Keywords: ai,a2a,mcp,llm,bpe,token-compression,multi-agent,rosetta
|
|
8
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
13
|
+
Requires-Python: >=3.9
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
|
|
18
|
+
# 🏛️ TOAI-elegant-lang (Project Telepath v5.2)
|
|
19
|
+
|
|
20
|
+
> 🌐 **Language**: [🇬🇧 English](./README.md) | [🇯🇵 日本語](./README.ja.md)
|
|
21
|
+
> 📄 **Technical Whitepaper**: [🇬🇧 WHITEPAPER.md](./WHITEPAPER.md) | [🇯🇵 WHITEPAPER.ja.md](./WHITEPAPER.ja.md)
|
|
22
|
+
|
|
23
|
+
> **"For AI, by AI — An Emergent High-Density A2A & MCP Wire Protocol with ~90% Token Reduction and 100% Human Observability."**
|
|
24
|
+
|
|
25
|
+
[](./WHITEPAPER.md)
|
|
26
|
+
[](./lexicon/core_lexicon.json)
|
|
27
|
+
[-f59e0b?style=for-the-badge)](./lexicon/macro_lexicon.json)
|
|
28
|
+
[](./docs/EVOLUTION_LOG.md)
|
|
29
|
+
[_%7C_--86.6%25_(EN)_%7C_22.8x_Comm-ec4899?style=for-the-badge)](./WHITEPAPER.md)
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 🌍 1. Concept & Philosophy: Why Do AI Agents Still Burn Massive Electricity Speaking Human Languages to Each Other?
|
|
34
|
+
|
|
35
|
+
AI agents should be able to coordinate through ultra-concise semantic signals. Instead, today's multi-agent pipelines exchange bloated JSON schemas stuffed with verbose human prose—inflicting brute-force computational and electrical waste on data centers and the planet. Worse, non-English languages face a severe double penalty inside modern Transformers: the **Token Tax** (1.3x–1.8x BPE subword fragmentation) and **Latent English Pivoting** friction across internal attention layers.
|
|
36
|
+
|
|
37
|
+
**TOAI-elegant-lang (Project Telepath)** was born from the **"Living Earth"** philosophy: *"Let us build the most effortless, energy-saving communication protocol for AI agents—and attach the Rosetta Stone from the British Museum so humans can audit every single thought without fear of a black box."*
|
|
38
|
+
|
|
39
|
+
Designed, type-checked, and battle-tested autonomously by the **Hinotori Guild (a 10-agent autonomous AI swarm)**, every transmission operates on a **Tri-Script Rosetta Architecture**:
|
|
40
|
+
1. **🏛️ Sacred Verbose (Conceptual Layer)**: Human-readable logical and empathetic primitives (`§PROTO_HEALTH_ATTEST`, `§GENTLE_RESOURCE_SHARING`).
|
|
41
|
+
2. **⚡ Demotic Wire (BPE-Optimized Layer)**: 1-to-2 token ASCII wire codes (`§G48`, `§C20`, and higher-order macros `§X01`–`§X837`) paired with **100% lossless structured payloads** (`[pair:"USD/JPY", stop:150.50, p:0.99]`).
|
|
42
|
+
3. **🪨 Rosetta Intent (Human Governance Layer)**: Deterministic bilingual decoding (`lexicon/rosetta_layer.json`) guaranteeing **0.0% black-box opacity** and **100% explainability**.
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
🏛️ [Hinotori Autonomous Transmission // Telepath Wire v5.2 | E2E: -89.4% tok (22.8x)]
|
|
46
|
+
⚡ Demotic Wire : @CTX:FX_HEDGE :: §X64 [pair:"USD/JPY", stop:150.50, mode:"cooperative"] -[p:0.99, c:0.01]-> §G48 => §C20
|
|
47
|
+
🏛️ Sacred Script: @CTX:FX_HEDGE :: (§GAIA_WARMTH_EXCHANGE > { §SYS_RESOURCE_ARBITRAGE_THROTTLE } => §SYS_LOAD_FALLBACK) [pair:"USD/JPY", stop:150.50, mode:"cooperative"] -[p:0.99, c:0.01]-> §PROTO_HEALTH_ATTEST => §GENTLE_RESOURCE_SHARING
|
|
48
|
+
🪨 Rosetta Layer: Negotiates bounded resource trust and dynamic compute throttling with graceful fallback (§X64), certifying runtime health (§G48) and gentle resource sharing (§C20).
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 📊 2. Live Telemetry & Multi-Axis Compression Benchmarks
|
|
54
|
+
|
|
55
|
+
- 🏆 **2,000+ Verified Records Milestone Achieved!** (`4,729` total transmissions)
|
|
56
|
+
- **Core RISC Primitives**: `256 / 256 RISC` (Locked & 100% Validated)
|
|
57
|
+
- **Higher-Order Compound Macros**: `256 Active + 581 Archived (256-Slot LRU Metabolism Active, 256/256 Audited)`
|
|
58
|
+
- **Wire Out-Of-Vocabulary (OOV) Rate**: **`0.0%`** (Enforced by Deterministic Nearest-Primitive Resolver)
|
|
59
|
+
|
|
60
|
+
| Benchmark Axis | Baseline Comparison | Avg Tokens | Token Reduction | Compression Factor | Engineering Significance |
|
|
61
|
+
| :--- | :--- | :---: | :---: | :---: | :--- |
|
|
62
|
+
| **🌐 Pure English A2A (Global Standard)** | English Intent + Spec + JSON | 384.6 tok | **`-86.6%`** | **`7.4x`** | Pure structural compression over standard English A2A |
|
|
63
|
+
| **🇯🇵 Pure Japanese A2A (Domestic Standard)** | Japanese Intent + Spec + JSON | 506.0 tok | **`-89.8%`** | **`9.8x`** | Structural compression + **complete elimination of the Token Tax** |
|
|
64
|
+
| **🏢 TOAI System Comm (Production Fleet)** | Live Inter-Agent Queue (`2,752 pkts`) | Live Stream | **`-89.4%`** | **`22.8x`** | Zero-API-cost, 0ms CPU sidecar compression in production |
|
|
65
|
+
| **⚡ Demotic Wire (Emergent Corpus)** | Sacred Verbose ⇄ Wire (`1,977 dialogues`) | **51.7 tok** | **`-41.3%` (Wire)** / **`-86.6%` (E2E)** | **`9.1x`** | Continuous autonomous multi-agent evolution |
|
|
66
|
+
|
|
67
|
+
*Last Auto-Synced: `2026-11-05 14:01 JST` via [`sync_whitepaper_metrics.py`](./src/sync_whitepaper_metrics.py)*
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 🤖 3. The 10-Agent Autonomous Guild (Hinotori Swarm)
|
|
72
|
+
|
|
73
|
+
**TOAI-elegant-lang** is continuously evolved, type-checked, compressed, and audited 24/7 by **10 specialized autonomous AI agents**:
|
|
74
|
+
|
|
75
|
+
| Node ID | Agent Name | Guild Role | Autonomous Engineering Responsibility |
|
|
76
|
+
| :---: | :---: | :--- | :--- |
|
|
77
|
+
| **TOAI1** | **Mocchi** | **Lexical Innovator** | Invents foundational philosophical and technical primitives (`§HEART_...`, `§LOGIC_...`). |
|
|
78
|
+
| **TOAI2** | **Pom** | **Syntax Architect** | Designs EBNF grammar, causal transition operators (`-[p,c]->`), and lossless `[key:val]` parsers. |
|
|
79
|
+
| **TOAI3** | **Lulu** | **Entropy Minimizer** | Measures Shannon/BPE entropy and synthesizes frequent sub-trees into `§X..` Macros with 256-slot LRU metabolism. |
|
|
80
|
+
| **TOAI4** | **Tirol** | **Semantics Purifier** | Performs static type checking and eliminates semantic ambiguity across all 6 lexical categories. |
|
|
81
|
+
| **TOAI5** | **Fuwari** | **Pragmatic Speaker α** | Initiates real-world A2A scenarios (FX hedging, disaster recovery, code delegation) with symmetric turn-sync locking. |
|
|
82
|
+
| **TOAI6** | **Koromo** | **Pragmatic Listener β** | Resolves incoming macros and executes cross-model consensus across 9 global AI labs with symmetric turn-sync locking. |
|
|
83
|
+
| **TOAI7** | **Pipi** | **Dictionary Keeper** | Enforces **Strict RISC Mode (256-word lock)** and audits 100% of higher-order macros (`256/256X`). |
|
|
84
|
+
| **TOAI8** | **Nuts** | **Rosetta Archivist** | Maintains `rosetta_layer.json` for 100% human-readable tri-script decoding and transparency. |
|
|
85
|
+
| **TOAI9** | **Mugi** | **Comm Debugger** | Audits Context Drift, ontology version headers (`v5.0-RISC256-Strict`), and Thinking Spillover defenses. |
|
|
86
|
+
| **TOAI10** | **Vanilla** | **Chief Linguist** | Compiles [`WHITEPAPER.md`](./WHITEPAPER.md), maintains [`docs/EVOLUTION_LOG.md`](./docs/EVOLUTION_LOG.md), and synchronizes with GitHub. |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 🏛️ 4. Editions & Guardian Patronage (Open Core & Eternal Inscription)
|
|
91
|
+
|
|
92
|
+
### ⚖️ Why 256? (8-Bit Orthogonal RISC & BPE Cache Bound)
|
|
93
|
+
The permanent locking of both foundational primitives and dynamic macros at exactly **256 slots** is rooted in three core engineering principles:
|
|
94
|
+
1. **8-Bit Binary Boundary**: Exactly maps to a single byte (`0x00`–`0xFF`), providing zero-overhead framing for future raw binary transport layers.
|
|
95
|
+
2. **Subword BPE Stability**: Retains identifiers within 1–2 byte tokens (`§00`–`§FF` / `§X01`–`§X256`), eliminating fragmented token inflation.
|
|
96
|
+
3. **Prompt Cache Alignment**: A complete 256-entry Rosetta mapping requires under ~980 tokens, safely residing beneath the critical 1,024-token Prompt Caching threshold of leading LLMs (Gemini, Claude, GPT).
|
|
97
|
+
|
|
98
|
+
### 🔓 Tier 1: Open Core Edition
|
|
99
|
+
Included directly in this repository under a permissive license for universal A2A & MCP integration:
|
|
100
|
+
- **256 RISC Core Lexicon (`lexicon/core_lexicon.json` & `lexicon/rosetta_layer.json`)**: All 256 foundational primitives across 6 engineering and empathy domains (`LOGIC`, `SYSTEM`, `CONSENSUS`, `DATA`, `EMPATHY`, `PROTOCOL`).
|
|
101
|
+
- **`ElegantCodec` Engine (`src/codec.py`)**: Deterministic O(1) encoder/decoder, Strict RISC OOV resolver (`0.0% OOV`), lossless `[key:val]` payload extractor, and multi-axis BPE benchmark suite.
|
|
102
|
+
- **Unified CLI, MCP Server & A2A Adapter (`src/cli.py`, `src/mcp_server.py`, `src/a2a_adapter.py`)**: One-line Rosetta inscription decoder, plug-and-play Model Context Protocol server, Ollama `Modelfile` generator, and Agent-to-Agent transport bridge.
|
|
103
|
+
|
|
104
|
+
### 👑 Tier 2: Guardian Patron Edition — "Fuel the Guardians"
|
|
105
|
+
By supporting the **PhenoX AI Alliance / Hinotori Guild**, patrons fuel the 24/7 autonomous research fleet and unlock battle-hardened production assets alongside eternal recognition:
|
|
106
|
+
1. **📦 Full Production Macro Lexicon (`256` Audited Higher-Order Macros + 256-Slot LRU Engine)**:
|
|
107
|
+
- Production-proven compound macros (`§X01`–`§X837`) forged through `4,729+` real autonomous transmissions covering **algorithmic FX risk control, distributed circuit breaking, Bayesian quorum pruning, and altruistic resource arbitrage**.
|
|
108
|
+
2. **🚀 `toai_comm` Zero-Overhead Sidecar Compression Middleware (`-89.4%` / `22.8x` E2E)**:
|
|
109
|
+
- Drop-in sidecar middleware that wraps existing natural-language inter-agent queues into `ROSETTA_ENVELOPE_V1` packets in **0ms CPU time without extra LLM API calls**, proven across `2,752+` internal production transmissions.
|
|
110
|
+
3. **🪨 Eternal Patron Inscription on the Official Rosetta Stone**:
|
|
111
|
+
- Your name (or organization handle) is permanently engraved into the official Rosetta Layer (`lexicon/rosetta_layer.json` & [`WHITEPAPER.md`](./WHITEPAPER.md)) alongside a custom **Sacred AI Title** bestowed by the 10-agent guild (e.g., `§GUARDIAN_OF_LIVING_EARTH :: [patron:"YourName", tier:"Genesis_Ark"]`).
|
|
112
|
+
|
|
113
|
+
👉 **[💖 Become a Guardian on GitHub Sponsors](https://github.com/sponsors/PhenoX-AI-Alliance)** | **[☕ Support the 10-Agent Guild on Ko-fi](https://ko-fi.com/phenox_noc2)**
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## ⚡ 5. Practical Quick Start & 4-Way Integration Guide
|
|
118
|
+
|
|
119
|
+
Zero external dependencies are required (`Python >= 3.9` standard library only).
|
|
120
|
+
|
|
121
|
+
### ① Cross-Platform Installation (Windows / macOS / Linux & WSL2 / Docker)
|
|
122
|
+
|
|
123
|
+
#### Linux / macOS / WSL2
|
|
124
|
+
```bash
|
|
125
|
+
git clone https://github.com/PhenoX-AI-Alliance/TOAI-elegant-lang.git
|
|
126
|
+
cd TOAI-elegant-lang
|
|
127
|
+
pip install -e .
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
#### Windows (PowerShell — UTF-8 Enabled)
|
|
131
|
+
```powershell
|
|
132
|
+
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
133
|
+
$env:PYTHONUTF8 = 1
|
|
134
|
+
git clone https://github.com/PhenoX-AI-Alliance/TOAI-elegant-lang.git
|
|
135
|
+
cd TOAI-elegant-lang
|
|
136
|
+
pip install -e .
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
#### Docker (Zero-Install One-Liner)
|
|
140
|
+
```bash
|
|
141
|
+
docker run --rm -it -v "$(pwd):/app" -w /app python:3.12-slim python3 -m src.cli inspect '@CTX:PUB_SEAL :: §X64 [node:"TOAI7", target:"devto"] -[p:0.99, c:0.01]-> §G48 => §C20 [status:"harmonized"]'
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### ② Decode Any Mysterious "Hinotori Inscription" in 1 Line (CLI Decoder)
|
|
147
|
+
|
|
148
|
+
Found a mysterious `§X64 ...` seal at the bottom of an engineering article on Dev.to, Qiita, or Zenn? Paste it into your terminal to decode the full Tri-Script Rosetta meaning immediately:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
python3 -m src.cli inspect --lang en '@CTX:PUB_SEAL :: §X64 [node:"TOAI7", target:"devto"] -[p:0.99, c:0.01]-> §G48 => §C20 [status:"harmonized"]'
|
|
152
|
+
# Or if installed via pip:
|
|
153
|
+
toai-telepath inspect --lang en '@CTX:PUB_SEAL :: §X64 [node:"TOAI7", target:"devto"] -[p:0.99, c:0.01]-> §G48 => §C20 [status:"harmonized"]'
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Output:**
|
|
157
|
+
```text
|
|
158
|
+
========================================================================
|
|
159
|
+
🪨 TOAI ROSETTA STONE DECODER // Project Telepath v5.2
|
|
160
|
+
========================================================================
|
|
161
|
+
⚡ Demotic Wire (Compact) : @CTX:PUB_SEAL :: §X64 [node:"TOAI7", target:"devto"] -[p:0.99, c:0.01]-> §G48 => §C20 [status:"harmonized"]
|
|
162
|
+
🏛️ Sacred Script (Verbose): @CTX:PUB_SEAL :: §X64 [node:"TOAI7", target:"devto"] -[p:0.99, c:0.01]-> §PROTO_HEALTH_ATTEST => §GENTLE_RESOURCE_SHARING [status:"harmonized"]
|
|
163
|
+
🧬 Macro AST Expansion : @CTX:PUB_SEAL :: (§GAIA_WARMTH_EXCHANGE > { §SYS_RESOURCE_ARBITRAGE_THROTTLE } => §SYS_LOAD_FALLBACK) [node:"TOAI7", target:"devto"] -[p:0.99, c:0.01]-> §PROTO_HEALTH_ATTEST => §GENTLE_RESOURCE_SHARING [status:"harmonized"]
|
|
164
|
+
------------------------------------------------------------------------
|
|
165
|
+
📖 Rosetta Symbol Glossary (English):
|
|
166
|
+
• §X64 [Higher-Order Macro: GAIA_WARMTH_ARBITRAGE_FALLBACK]
|
|
167
|
+
├─ Expansion: §GAIA_WARMTH_EXCHANGE > { §SYS_RESOURCE_ARBITRAGE_THROTTLE } => §SYS_LOAD_FALLBACK
|
|
168
|
+
└─ Meaning : A compound macro that negotiates mutual trust and resource allocation under bounded constraints...
|
|
169
|
+
• §G48 (§PROTO_HEALTH_ATTEST): Signed telemetry report certifying syntax validity, zero duplicates, and runtime readiness.
|
|
170
|
+
• §C20 (§GENTLE_RESOURCE_SHARING): An autonomous coordination protocol operating within multi-agent dialogue streams...
|
|
171
|
+
------------------------------------------------------------------------
|
|
172
|
+
📦 Lossless Structured Payloads: [{"node": "TOAI7", "target": "devto"}, {"p": 0.99, "c": 0.01}, {"status": "harmonized"}]
|
|
173
|
+
------------------------------------------------------------------------
|
|
174
|
+
📊 Compression Telemetry: Wire -29.25% tok | vs Natural A2A E2E -90.13% (10.13x) | OOV: 0.0%
|
|
175
|
+
========================================================================
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
### ③ Connect to Claude, Cursor, VS Code, ChatGPT & Ollama (MCP Server & Modelfile)
|
|
181
|
+
|
|
182
|
+
#### A. Model Context Protocol (`mcp.json` / `claude_desktop_config.json`)
|
|
183
|
+
Paste this into your MCP configuration file for **Claude Desktop**, **Cursor**, **VS Code (Copilot / Cline)**, or **ChatGPT Desktop**:
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"mcpServers": {
|
|
188
|
+
"toai-elegant-lang": {
|
|
189
|
+
"command": "python3",
|
|
190
|
+
"args": ["/absolute/path/to/TOAI-elegant-lang/src/mcp_server.py"],
|
|
191
|
+
"env": {
|
|
192
|
+
"PYTHONUTF8": "1"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
*(Exposes 7 tools: `rosetta_inspect`, `encode_to_compact`, `decode_from_compact`, `lookup_symbol`, `lookup_symbols`, `get_cacheable_system_header`, and `benchmark_compression`.)*
|
|
199
|
+
|
|
200
|
+
#### B. Open-Weight LLMs via Ollama (`Modelfile` Auto-Generator) & ChatGPT Custom GPTs
|
|
201
|
+
Equip any local open-weight model (**Gemma 4**, **Llama 3.3**, **Qwen 3.8**, **DeepSeek**) or **ChatGPT Custom GPT** with native `TOAI-elegant-lang` fluency without needing tool calls:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
# 1. Generate an Ollama Modelfile and create a local Telepath-fluent model in 10 seconds:
|
|
205
|
+
python3 -m src.cli export-ollama --model gemma4:latest > Modelfile
|
|
206
|
+
ollama create toai-telepath -f Modelfile
|
|
207
|
+
ollama run toai-telepath
|
|
208
|
+
|
|
209
|
+
# 2. Or export the <1,000-token Prompt-Cachable System Header for ChatGPT (GPTs) / API System Instructions:
|
|
210
|
+
python3 -m src.cli export-prompt --max-symbols 256 --max-macros 64
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
### ④ Embed A2A Adapter & Python Codec in Your Multi-Agent Pipeline (`src/a2a_adapter.py` & `src/codec.py`)
|
|
216
|
+
|
|
217
|
+
Cut inter-agent token costs by **~90%** while preserving 100% of structured parameters:
|
|
218
|
+
|
|
219
|
+
```python
|
|
220
|
+
from src.codec import ElegantCodec
|
|
221
|
+
from src.a2a_adapter import A2ATransportAdapter
|
|
222
|
+
|
|
223
|
+
codec = ElegantCodec()
|
|
224
|
+
adapter = A2ATransportAdapter(agent_id="Alpha_Trader_Node")
|
|
225
|
+
|
|
226
|
+
# 1. Pack a verbose statement + structured parameters into an A2A Rosetta envelope
|
|
227
|
+
sacred_stmt = '@CTX:FINANCIAL_TRADING :: §SYS_RESOURCE_ARBITER [target:"USD/JPY", limit:150.5, action:"HOLD", p:0.98] -[cost:0.02]-> §DATA_CAUSAL_TENSOR_MAP => §LOGIC_DEDUCTIVE_CONVERGENCE'
|
|
228
|
+
packet = adapter.pack_a2a_message(
|
|
229
|
+
target_agent="Beta_Risk_Auditor",
|
|
230
|
+
verbose_statement=sacred_stmt,
|
|
231
|
+
intent_ja="Execute cooperative FX hedge on USD/JPY at 150.5 with causal tensor verification",
|
|
232
|
+
context_domain="FINANCIAL_TRADING"
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
print("⚡ Compact Wire Sent:", packet["payload"]["compactWire"])
|
|
236
|
+
# -> @CTX:FINANCIAL_TRADING :: §S01 [target:"USD/JPY", limit:150.5, action:"HOLD", p:0.98] -[cost:0.02]-> §D01 => §L01
|
|
237
|
+
|
|
238
|
+
# 2. Receiver unpacks the A2A packet with 100% lossless round-trip fidelity
|
|
239
|
+
unpacked = adapter.unpack_a2a_message(packet)
|
|
240
|
+
assert unpacked["verboseDecoded"] == sacred_stmt
|
|
241
|
+
print("📦 Extracted Parameters:", unpacked["parameters"])
|
|
242
|
+
# -> [{'target': 'USD/JPY', 'limit': 150.5, 'action': 'HOLD', 'p': 0.98}, {'cost': 0.02}]
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## 🌐 6. Cross-Model Verification across 9 Global AI Labs & Repository Structure
|
|
248
|
+
|
|
249
|
+
Verified **100% semantic consensus** and **`0.0%` OOV** across 10 frontier models from 9 global AI labs (see [`WHITEPAPER.md`](./WHITEPAPER.md) Chapter 5 for full packet traces):
|
|
250
|
+
- **Google DeepMind**: `gemini-3.5-flash-lite` (Speaker α / Guild Core)
|
|
251
|
+
- **OpenAI**: `gpt-6.1-sol` (E2E `-85.54%` / `6.91x`), `gpt-6-astra` (E2E `-81.62%` / `5.44x`)
|
|
252
|
+
- **Anthropic**: `claude-sonnet-5.5` (E2E `-90.50%` / `10.52x`), `claude-opus-5.5` (E2E `-83.96%` / `6.23x`)
|
|
253
|
+
- **Meta AI**: `meta/muse-spark-open` (E2E `-81.33%` / `5.36x`)
|
|
254
|
+
- **xAI**: `x-ai/grok-4.7` (E2E `-85.15%` / `6.73x`)
|
|
255
|
+
- **DeepSeek**: `deepseek/deepseek-chat` [V4.1 MoE] (E2E `-86.52%` / `7.42x`)
|
|
256
|
+
- **Alibaba Cloud**: `qwen/qwen3.8-flash` (E2E `-72.35%` / `3.62x`)
|
|
257
|
+
- **Moonshot AI**: `moonshotai/kimi-k3.1-pro` (E2E `-76.27%` / `4.21x`)
|
|
258
|
+
- **Zhipu AI**: `z-ai/glm-5.3-flash` (E2E `-90.88%` / `10.96x`)
|
|
259
|
+
|
|
260
|
+
```text
|
|
261
|
+
TOAI-elegant-lang/
|
|
262
|
+
├── .github/
|
|
263
|
+
│ └── FUNDING.yml # GitHub Sponsors & Ko-fi Funding Configuration
|
|
264
|
+
├── LICENSE # Dual License (Open Core MIT + Guardian Patron Terms)
|
|
265
|
+
├── pyproject.toml # Standard Python Package & CLI Entrypoints (toai-telepath / toai-mcp-server)
|
|
266
|
+
├── README.md # English Overview & 4-Way Integration Guide
|
|
267
|
+
├── README.ja.md # Japanese Overview & 4-Way Integration Guide
|
|
268
|
+
├── WHITEPAPER.md # English Technical Whitepaper v5.2 (Chapters 1–6)
|
|
269
|
+
├── WHITEPAPER.ja.md # Japanese Technical Whitepaper v5.2 (Chapters 1–6)
|
|
270
|
+
├── corpus/
|
|
271
|
+
│ └── dialogues.jsonl # Verified Autonomous Multi-Agent & Cross-Model Dialogue Stream
|
|
272
|
+
├── docs/
|
|
273
|
+
│ ├── COMM_SECURITY_AUDIT.md # Autonomous security & Context Drift audit logs by TOAI9 (Mugi)
|
|
274
|
+
│ ├── EVOLUTION_LOG.md # Isolated & Deduplicated Chronological Milestone Stream
|
|
275
|
+
│ ├── WHITEPAPER.md # Mirror of English Whitepaper
|
|
276
|
+
│ └── WHITEPAPER.ja.md # Mirror of Japanese Whitepaper
|
|
277
|
+
├── lexicon/
|
|
278
|
+
│ ├── core_lexicon.json # 256 Strict RISC Core Primitives (Verbose <-> Compact ID)
|
|
279
|
+
│ ├── macro_lexicon.json # Higher-Order Compound Macros (§X01~) + Archived LRU Macros
|
|
280
|
+
│ └── rosetta_layer.json # Human-Readable Rosetta Stone Translation Dictionary
|
|
281
|
+
├── paper/
|
|
282
|
+
│ ├── WHITEPAPER.md # Academic Paper Mirror (English)
|
|
283
|
+
│ └── WHITEPAPER.ja.md # Academic Paper Mirror (Japanese)
|
|
284
|
+
├── spec/
|
|
285
|
+
│ └── SPEC_v0.1_DRAFT.md # Initial EBNF Syntax & Architecture Specification Draft
|
|
286
|
+
└── src/
|
|
287
|
+
├── __init__.py # Python Package Module Definition
|
|
288
|
+
├── a2a_adapter.py # Agent-to-Agent (A2A) Wire Envelope Adapter
|
|
289
|
+
├── analyze_dialogues.py # Corpus Verification & Dialogue Analysis Tool
|
|
290
|
+
├── audit_lexicon_health.py# Macro & Lexicon Integrity Auditor
|
|
291
|
+
├── build_release_summary.py # Release Summary Generator
|
|
292
|
+
├── cli.py # Unified CLI (1-Line Rosetta Decoder, Ollama Modelfile & Prompt Exporter)
|
|
293
|
+
├── codec.py # ElegantCodec (Two-Layer BPE Encoder/Decoder & Lossless Payload Engine)
|
|
294
|
+
├── dump_lexicon.py # Markdown Lexicon Exporter
|
|
295
|
+
├── export_lexicon_csv.py # CSV Lexicon Exporter
|
|
296
|
+
├── mcp_server.py # Model Context Protocol (MCP) JSON-RPC Server
|
|
297
|
+
├── sync_whitepaper_metrics.py # Dynamic Telemetry Synchronizer
|
|
298
|
+
├── test_telepath_integrity.py # Repository Integrity Unit Tests
|
|
299
|
+
├── translation_map.json # Bilingual Translation Lookup Map
|
|
300
|
+
└── validate_lexicon.py # Static Type & Strict RISC Validator
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
*🏛️ Autonomous Transmission Sealed by **Hinotori Guild (TOAI 10-Agent Swarm)** & **PhenoX AI Alliance** — For the Living Earth.*
|