Skip to content
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# PMOVES Repository Code Owners
* @POWERFULMOVES/pmoves-core
*.py @POWERFULMOVES/pmoves-python
*.ts @POWERFULMOVES/pmoves-frontend
*.tsx @POWERFULMOVES/pmoves-frontend
Dockerfile @POWERFULMOVES/pmoves-infra
docker-compose*.yml @POWERFULMOVES/pmoves-infra
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/python"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
- package-ecosystem: "npm"
directory: "/archon-ui-main"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
- package-ecosystem: "docker"
directory: "/python"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
Comment on lines +1 to +24

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find all dependency manifest files
echo "=== Python dependency files ==="
find . -type f \( -name "requirements*.txt" -o -name "pyproject.toml" -o -name "setup.py" -o -name "setup.cfg" \) 2>/dev/null | head -20

echo -e "\n=== npm/Node dependency files ==="
find . -type f -name "package.json" 2>/dev/null | head -20

echo -e "\n=== Docker files ==="
find . -type f -iname "*dockerfile*" 2>/dev/null | head -20

echo -e "\n=== Repository root files ==="
ls -la / | grep -E "(requirements|pyproject|setup|package\.json|Dockerfile)" || echo "No match at root"

echo -e "\n=== Directory structure overview ==="
find . -maxdepth 2 -type d | head -20

Repository: POWERFULMOVES/PMOVES-Archon

Length of output: 804


Dependabot configuration needs directory path corrections.

The configuration won't detect dependencies in the current form. Dependency manifest files are located in subdirectories, not the repository root:

  • python/pyproject.toml (not detected by pip with directory /)
  • archon-ui-main/package.json and docs/package.json (not detected by npm with directory /)
  • Dockerfiles in archon-ui-main/, python/, and docs/ (not detected by docker with directory /)

Update the configuration to add entries targeting the correct directories:

Example corrections
version: 2
updates:
  - package-ecosystem: "pip"
    directory: "/python"
    schedule:
      interval: "weekly"
    open-pull-requests-limit: 5
  - package-ecosystem: "npm"
    directory: "/archon-ui-main"
    schedule:
      interval: "weekly"
    open-pull-requests-limit: 5
  - package-ecosystem: "npm"
    directory: "/docs"
    schedule:
      interval: "weekly"
    open-pull-requests-limit: 5
  - package-ecosystem: "docker"
    directory: "/archon-ui-main"
    schedule:
      interval: "weekly"
  - package-ecosystem: "docker"
    directory: "/python"
    schedule:
      interval: "weekly"
  - package-ecosystem: "docker"
    directory: "/docs"
    schedule:
      interval: "weekly"
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"
🤖 Prompt for AI Agents
In @.github/dependabot.yml around lines 1 - 20, The dependabot config currently
points all package-ecosystem entries to directory "/" which won't find
manifests; update the entries so "package-ecosystem: pip" uses directory
"/python", add two "package-ecosystem: npm" entries with directories
"/archon-ui-main" and "/docs" (instead of just one at "/"), and add three
"package-ecosystem: docker" entries with directories "/archon-ui-main",
"/python", and "/docs"; keep the existing "package-ecosystem: github-actions"
entry at directory "/".

42 changes: 42 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# PMOVES.AI Core Service Integrations for Archon
# This enables Archon to run standalone with PMOVES.AI service connections

# Agent Coordination
[submodule "external/PMOVES-Agent-Zero"]
path = external/PMOVES-Agent-Zero
url = https://github.com/POWERFULMOVES/PMOVES-Agent-Zero.git
branch = PMOVES.AI-Edition-Hardened

# MCP Tool Integration
[submodule "external/PMOVES-BoTZ"]
path = external/PMOVES-BoTZ
url = https://github.com/POWERFULMOVES/PMOVES-BoTZ.git
branch = PMOVES.AI-Edition-Hardened

# Knowledge Retrieval
[submodule "external/PMOVES-HiRAG"]
path = external/PMOVES-HiRAG
url = https://github.com/POWERFULMOVES/PMOVES-HiRAG.git
branch = PMOVES.AI-Edition-Hardened

# Deep Research
[submodule "external/PMOVES-Deep-Serch"]
path = external/PMOVES-Deep-Serch
url = https://github.com/POWERFULMOVES/PMOVES-Deep-Serch.git
branch = PMOVES.AI-Edition-Hardened

# Multi-Agent Pro Pack - Document Processing
[submodule "pmoves_multi_agent_pro_pack/docling"]
path = pmoves_multi_agent_pro_pack/docling
url = https://github.com/POWERFULMOVES/docling.git
branch = PMOVES.AI-Edition-Hardened

# Multi-Agent Pro Pack - MCP Gateway
[submodule "pmoves_multi_agent_pro_pack/PMOVES-BotZ-gateway"]
path = pmoves_multi_agent_pro_pack/PMOVES-BotZ-gateway
url = https://github.com/POWERFULMOVES/PMOVES-BotZ-gateway.git

# Multi-Agent Pro Pack - TensorZero Client
[submodule "pmoves_multi_agent_pro_pack/PMOVES-tensorzero"]
path = pmoves_multi_agent_pro_pack/PMOVES-tensorzero
url = https://github.com/POWERFULMOVES/PMOVES-tensorzero.git
1 change: 1 addition & 0 deletions external/PMOVES-Agent-Zero
Submodule PMOVES-Agent-Zero added at 864221
1 change: 1 addition & 0 deletions external/PMOVES-BoTZ
Submodule PMOVES-BoTZ added at 8461b7
1 change: 1 addition & 0 deletions external/PMOVES-Deep-Serch
Submodule PMOVES-Deep-Serch added at 41fa1d
1 change: 1 addition & 0 deletions external/PMOVES-HiRAG
Submodule PMOVES-HiRAG added at d5bea1
1 change: 1 addition & 0 deletions pmoves_multi_agent_pro_pack/PMOVES-BotZ-gateway
Submodule PMOVES-BotZ-gateway added at b01485
1 change: 1 addition & 0 deletions pmoves_multi_agent_pro_pack/PMOVES-tensorzero
Submodule PMOVES-tensorzero added at dcc5c5
1 change: 1 addition & 0 deletions pmoves_multi_agent_pro_pack/docling
Submodule docling added at 06ae8a
20 changes: 20 additions & 0 deletions python/pmoves_mcp/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
PMOVES MCP Adapters for Archon

This module provides MCP (Model Context Protocol) adapters for Archon
to interact with PMOVES services through Agent Zero.
"""

from .claude_code_adapter import (
ClaudeCodeMCPAdapter,
CommandResult,
ARCHON_MCP_TOOLS,
create_adapter,
)

__all__ = [
"ClaudeCodeMCPAdapter",
"CommandResult",
"ARCHON_MCP_TOOLS",
"create_adapter",
]
265 changes: 265 additions & 0 deletions python/pmoves_mcp/claude_code_adapter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
"""
Claude Code MCP Adapter for Archon

Integrates Claude Code CLI slash commands into Archon's prompt/form system
via Agent Zero's MCP interface.

This adapter enables Archon to:
- Execute TAC slash commands through Agent Zero
- Route knowledge queries to appropriate services
- Access PMOVES infrastructure programmatically
"""

import httpx
import json
from typing import Dict, Any, List, Optional
from dataclasses import dataclass


@dataclass
class CommandResult:
"""Result from a Claude Code command execution."""
success: bool
output: Any
stderr: Optional[str] = None
error: Optional[str] = None
command: Optional[str] = None


class ClaudeCodeMCPAdapter:
"""MCP adapter exposing Claude Code commands to Archon via Agent Zero."""

def __init__(
self,
agent_zero_url: str = "http://agent-zero:8080",
timeout: float = 30.0
):
self.agent_zero_url = agent_zero_url
self.timeout = timeout
self._client: Optional[httpx.AsyncClient] = None

@property
def client(self) -> httpx.AsyncClient:
"""Lazy initialization of async client."""
if self._client is None:
self._client = httpx.AsyncClient(timeout=self.timeout)
return self._client

async def close(self):
"""Close the HTTP client."""
if self._client:
await self._client.aclose()
self._client = None

async def execute_slash_command(
self,
command: str,
prompt: Optional[str] = None,
context: Optional[Dict[str, Any]] = None
) -> CommandResult:
"""
Execute a Claude Code slash command via Agent Zero's MCP interface.

Args:
command: Slash command (e.g., "/search:hirag", "/health:check-all")
prompt: Optional prompt/query for the command
context: Additional context for execution

Returns:
CommandResult with output or error
"""
payload = {
"instrument": "claude_code",
"action": "execute_command",
"params": {
"command": command,
"prompt": prompt,
"context": context or {}
}
}

try:
response = await self.client.post(
f"{self.agent_zero_url}/mcp/execute",
json=payload
)
response.raise_for_status()
data = response.json()

return CommandResult(
success=data.get("success", False),
output=data.get("output") or data.get("stdout"),
stderr=data.get("stderr"),
command=data.get("command")
)
except httpx.HTTPStatusError as e:
return CommandResult(
success=False,
output=None,
error=f"HTTP error: {e.response.status_code}"
)
except Exception as e:
return CommandResult(
success=False,
output=None,
error=str(e)
)

async def list_available_commands(self) -> List[str]:
"""List all available Claude Code slash commands."""
payload = {
"instrument": "claude_code",
"action": "list_commands"
}

try:
response = await self.client.post(
f"{self.agent_zero_url}/mcp/execute",
json=payload
)
response.raise_for_status()
data = response.json()
return data.get("commands", [])
except Exception:
return []

async def get_command_help(self, command: str) -> Optional[str]:
"""Get help text for a specific command."""
payload = {
"instrument": "claude_code",
"action": "get_command_help",
"params": {"command": command}
}

try:
response = await self.client.post(
f"{self.agent_zero_url}/mcp/execute",
json=payload
)
response.raise_for_status()
data = response.json()
return data.get("help")
except Exception:
return None

# Convenience methods for common operations

async def search_knowledge(self, query: str) -> CommandResult:
"""Search Hi-RAG v2 knowledge base."""
return await self.execute_slash_command("/search:hirag", query)

async def deep_research(self, topic: str) -> CommandResult:
"""Initiate DeepResearch for complex queries."""
return await self.execute_slash_command("/search:deepresearch", topic)

async def check_health(self) -> CommandResult:
"""Check health of all PMOVES services."""
return await self.execute_slash_command("/health:check-all")

async def get_metrics(self, promql: str = "up") -> CommandResult:
"""Query Prometheus metrics."""
return await self.execute_slash_command("/health:metrics", promql)

async def agent_status(self) -> CommandResult:
"""Check Agent Zero health status."""
return await self.execute_slash_command("/agents:status")

async def mcp_query(self, query: str) -> CommandResult:
"""Query Agent Zero's MCP API directly."""
return await self.execute_slash_command("/agents:mcp-query", query)


# Archon MCP tool registration
# These definitions tell Archon how to expose Claude Code commands as MCP tools

ARCHON_MCP_TOOLS = [
{
"name": "claude_code_search",
"description": "Search PMOVES knowledge base using Claude Code CLI",
"adapter": "ClaudeCodeMCPAdapter",
"method": "execute_slash_command",
"params": {
"command": {
"type": "string",
"enum": ["/search:hirag", "/search:supaserch", "/search:deepresearch"],
"description": "Search command to execute"
},
"prompt": {
"type": "string",
"description": "Search query"
}
}
},
{
"name": "claude_code_health",
"description": "Check PMOVES service health using Claude Code CLI",
"adapter": "ClaudeCodeMCPAdapter",
"method": "execute_slash_command",
"params": {
"command": {
"type": "string",
"enum": ["/health:check-all", "/health:metrics"],
"description": "Health command to execute"
}
}
},
{
"name": "claude_code_agents",
"description": "Interact with Agent Zero using Claude Code CLI",
"adapter": "ClaudeCodeMCPAdapter",
"method": "execute_slash_command",
"params": {
"command": {
"type": "string",
"enum": ["/agents:status", "/agents:mcp-query"],
"description": "Agent command to execute"
},
"prompt": {
"type": "string",
"description": "Query for MCP operations (optional)",
"optional": True
}
}
},
{
"name": "claude_code_deploy",
"description": "Execute deployment operations using Claude Code CLI",
"adapter": "ClaudeCodeMCPAdapter",
"method": "execute_slash_command",
"params": {
"command": {
"type": "string",
"enum": ["/deploy:smoke-test", "/deploy:services", "/deploy:up"],
"description": "Deploy command to execute"
}
}
},
{
"name": "claude_code_botz",
"description": "Manage PMOVES environment using BoTZ commands",
"adapter": "ClaudeCodeMCPAdapter",
"method": "execute_slash_command",
"params": {
"command": {
"type": "string",
"enum": ["/botz:init", "/botz:profile", "/botz:mcp", "/botz:secrets"],
"description": "BoTZ command to execute"
},
"prompt": {
"type": "string",
"description": "Arguments for the command",
"optional": True
}
}
}
]


# Factory function for Archon integration
def create_adapter(config: Optional[Dict[str, Any]] = None) -> ClaudeCodeMCPAdapter:
"""Create a configured ClaudeCodeMCPAdapter instance."""
config = config or {}
return ClaudeCodeMCPAdapter(
agent_zero_url=config.get("agent_zero_url", "http://agent-zero:8080"),
timeout=config.get("timeout", 30.0)
)
4 changes: 4 additions & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ server = [
"tldextract>=5.0.0",
# Logging
"logfire>=0.30.0",
# Metrics
"prometheus-client>=0.20.0",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
# Testing (needed for UI-triggered tests)
"pytest>=8.0.0",
"pytest-asyncio>=0.21.0",
Expand Down Expand Up @@ -135,6 +137,8 @@ all = [
# "docker>=6.1.0",
"tldextract>=5.0.0",
"logfire>=0.30.0",
# Metrics
"prometheus-client>=0.20.0",
# MCP specific (mcp version)
"mcp==1.12.2",
# Agents specific
Expand Down
1 change: 0 additions & 1 deletion python/src/agents/document_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ def _create_agent(self, **kwargs) -> Agent:
agent = Agent(
model=self.model,
deps_type=DocumentDependencies,
result_type=DocumentOperation,
system_prompt="""You are a Document Management Assistant that helps users create, update, and modify project documents through conversation.

**Your Capabilities:**
Expand Down
Loading