Metadata-Version: 2.4
Name: crystalplane
Version: 0.1.0
Summary: Hermetic, zero-dependency slim runtime client for Crystalplane / Crystalspace knowledge and skill crystals across non-Vanguard agent systems.
Author-email: Enterprise Picard Engineering <engineering@picard.enterprise>
License: Apache-2.0
Keywords: crystalplane,crystalspace,agents,langchain,mcp,skills,knowledge,rag
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.1.0; extra == "langchain"
Provides-Extra: crewai
Requires-Dist: crewai>=0.1.0; extra == "crewai"
Provides-Extra: all
Requires-Dist: langchain-core>=0.1.0; extra == "all"
Requires-Dist: crewai>=0.1.0; extra == "all"

# Crystalplane Python Slim Runtime Client (`crystalplane`)

A hermetic, zero-dependency Python client for connecting any AI agent system (LangChain, LlamaIndex, CrewAI, AutoGen, OpenAI, Claude/MCP) to **Crystalplane** knowledge and skill crystals.

## Features
- **Zero External Dependencies**: Pure Python standard library (`urllib.request`, `hashlib`, `json`).
- **Prompt Hydration**: Automatically resolves `~~shardID~~` markers in system prompts into verified authoritative skills.
- **Dynamic Skill Assembly**: Call `/api/assemble` to compile composite skills within a specified token budget.
- **Memory & Crystal Ingestion**: Ingest agent traces and learned workflows into durable SHA-256 microchain shards.
- **Dual-Layer Caching**: In-memory LRU + optional persistent disk cache with SHA-256 node integrity verification.
- **Universal MCP Bridge**: Run `python -m crystalplane.mcp_bridge` to expose Crystalplane tools to Claude Desktop, Cursor, or Zed.

## Quickstart

```python
from crystalplane import CrystalClient

# Automatically reads CRYSTAL_SERVER_URL and CRYSTAL_API_KEY from environment
client = CrystalClient()

# 1. Hydrate a prompt template with authoritative skill shards
prompt = client.hydrate("""
You are Picard's Chief Architect. Adhere to our platform invariants:
~~sh_core_directive_mathematical_fidelity~~

Task: {task}
""", task="Verify the Reed-Solomon polynomial codec.")

# 2. Search knowledge crystals
results = client.search(query="distributed database locking", limit=5)

# 3. Dynamic context assembly within token budget
assembled = client.assemble(query="motor safety", max_tokens=2048)
print(assembled.prompt_injection)
```
