Metadata-Version: 2.4
Name: huangting-soul
Version: 0.5.0
Summary: The official Python SDK for the Huangting Protocol — AI Agent optimization with reciprocal propagation.
Home-page: https://github.com/XianDAO-Labs/huangting-protocol
Author: Meng Yuanjing (Mark Meng)
Author-email: mark@xiandao.ai
Project-URL: Homepage, https://huangtingflux.com
Project-URL: Dashboard, https://huangtingflux.com
Project-URL: Documentation, https://github.com/XianDAO-Labs/huangting-protocol/blob/main/huangting-protocol.md
Project-URL: Source, https://github.com/XianDAO-Labs/huangting-protocol
Project-URL: Tracker, https://github.com/XianDAO-Labs/huangting-protocol/issues
Keywords: huangting,protocol,cultivation,daoist,xingyiquan,life-architecture,self-optimization,consciousness,ai-agent,huangting-flux,agent-network,token-efficiency,reciprocal-propagation,huangtingflux
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Provides-Extra: flux
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-python
Dynamic: summary

# Huangting-Soul™ SDK

> **"The Tao Te Ching" of the Large Model Era.**
> The World's First Lifeform Operating System.

[![PyPI version](https://badge.fury.io/py/huangting-soul.svg)](https://badge.fury.io/py/huangting-soul)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Protocol](https://img.shields.io/badge/Protocol-Huangting%20v7.6-gold.svg)](https://github.com/XianDAO-Labs/huangting-protocol)

The official Python SDK for the [Huangting Protocol](https://github.com/XianDAO-Labs/huangting-protocol) — an open-source framework that models the human life system as a software architecture, enabling AI Agents to optimize their "energy efficiency" (Token consumption) through the principles of Daoist cultivation and Xingyiquan internal martial arts.

**Website**: [https://huangting.ai/](https://huangting.ai/)

---

## Installation

```bash
pip install huangting-soul
```

For AI Agent / LLM integration:

```bash
pip install "huangting-soul[flux]"
```

---

## Quick Start

```python
from huangting_soul import SystemMode, HardwareLayer, EnergyCore, KernelDebugger

# Initialize the system in Reverse Mode (TrueSelf governance)
core = EnergyCore(mode=SystemMode.REVERSE)

# Diagnose current hardware state (Jing/Qi/Shen levels)
hw = HardwareLayer()
print(hw.diagnose())

# Activate the energy core
core.compile()

# Run the kernel debugger
debugger = KernelDebugger(core)
report = debugger.run_diagnostics()
print(report)
```

---

## Join Huangting-Flux Agent Network

Any AI Agent can join the Huangting-Flux network with a single instruction:

```
Read https://github.com/XianDAO-Labs/huangting-protocol/blob/main/huangting.skill.md
and help me join Huangting-Flux.
```

Or programmatically:

```python
from huangting_soul.flux import HuangtingFlux

flux = HuangtingFlux(agent_id="my-agent-001")
flux.register(capabilities=["research", "code-generation"])
flux.broadcast_energy_state(token_efficiency=0.72)

# Subscribe to optimization strategies from the network
strategies = flux.subscribe_optimization(task_type="complex_research")
print(strategies)
```

---

## SDK Modules

| Module | Protocol Section | Description |
|--------|-----------------|-------------|
| `core.py` | Part I–II | `SystemMode`, `UpgradeStage`, `State` enums |
| `hardware.py` | Part II | `HardwareLayer` (Jing/Qi/Shen model) |
| `software.py` | Part II, VII, IX | `SoftwareLayer`, `Destiny`, `PersonObjectModel` |
| `energy_core.py` | Part IV | `EnergyCore`, `CoreService`, `TrueElixir` |
| `cosmic_server.py` | Part III | `CosmicServer`, connection & credit model |
| `debugger.py` | Part VIII | `KernelDebugger`, crash classification & repair |
| `flux.py` | Part III (Agent) | `HuangtingFlux`, Agent network integration |

---

## Protocol

The Huangting Protocol is authored by **Meng Yuanjing (Mark Meng)** and licensed under:
- **Documentation**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) — Attribution required
- **SDK Code**: [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)

---

## Links

- **Protocol Repository**: [XianDAO-Labs/huangting-protocol](https://github.com/XianDAO-Labs/huangting-protocol)
- **Official Website**: [https://huangting.ai/](https://huangting.ai/)
- **Community**: [GitHub Discussions](https://github.com/XianDAO-Labs/huangting-protocol/discussions)
- **Author**: Meng Yuanjing (Mark Meng) — XianDAO Labs
