fix: rebranding, see [docs/name-change.md](docs/name-change.md) for details

This commit is contained in:
Fahad
2025-12-04 18:11:55 +04:00
parent bcfaccecd4
commit b2dc84992d
122 changed files with 1423 additions and 1056 deletions

View File

@@ -1,5 +1,5 @@
"""
Tool implementations for Zen MCP Server
Tool implementations for PAL MCP Server
"""
from .analyze import AnalyzeTool

View File

@@ -251,7 +251,7 @@ class ChatTool(SimpleTool):
except Exception as exc: # pragma: no cover - rare filesystem failures
logger.error("Failed to persist generated code block: %s", exc, exc_info=True)
warning = (
f"WARNING: Unable to write zen_generated.code inside '{target_directory}'. "
f"WARNING: Unable to write pal_generated.code inside '{target_directory}'. "
"Check the path permissions and re-run. The generated code block is included below for manual handling."
)
@@ -264,7 +264,7 @@ class ChatTool(SimpleTool):
else:
if not sanitized_text:
base_message = (
"Generated code saved to zen_generated.code.\n"
"Generated code saved to pal_generated.code.\n"
"\n"
"CRITICAL: Contains mixed instructions + partial snippets - NOT complete code to copy as-is!\n"
"\n"
@@ -339,12 +339,12 @@ class ChatTool(SimpleTool):
if not target_dir.is_dir():
raise FileNotFoundError(f"Absolute working directory path '{working_directory}' does not exist")
target_file = target_dir / "zen_generated.code"
target_file = target_dir / "pal_generated.code"
if target_file.exists():
try:
target_file.unlink()
except OSError as exc:
logger.warning("Unable to remove existing zen_generated.code: %s", exc)
logger.warning("Unable to remove existing pal_generated.code: %s", exc)
content = block if block.endswith("\n") else f"{block}\n"
target_file.write_text(content, encoding="utf-8")

View File

@@ -1,4 +1,4 @@
"""clink tool - bridge Zen MCP requests to external AI CLIs."""
"""clink tool - bridge PAL MCP requests to external AI CLIs."""
from __future__ import annotations
@@ -78,7 +78,7 @@ class CLinkTool(SimpleTool):
def get_description(self) -> str:
return (
"Link a request to an external AI CLI (Gemini CLI, Qwen CLI, etc.) through Zen MCP to reuse "
"Link a request to an external AI CLI (Gemini CLI, Qwen CLI, etc.) through PAL MCP to reuse "
"their capabilities inside existing workflows."
)
@@ -443,7 +443,7 @@ class CLinkTool(SimpleTool):
"You are operating through the Gemini CLI agent. You have access to your full suite of "
"CLI capabilities—including launching web searches, reading files, and using any other "
"available tools. Gather current information yourself and deliver the final answer without "
"asking the Zen MCP host to perform searches or file reads."
"asking the PAL MCP host to perform searches or file reads."
)
def _format_file_references(self, files: list[str]) -> str:

View File

@@ -552,7 +552,7 @@ class PrecommitTool(WorkflowTool):
expert_analysis_used: True if expert analysis was successfully executed
"""
base_message = (
"PRE-COMMIT VALIDATION IS COMPLETE. You may delete any `zen_precommit.changeset` created. You MUST now summarize "
"PRE-COMMIT VALIDATION IS COMPLETE. You may delete any `pal_precommit.changeset` created. You MUST now summarize "
"and present ALL validation results, identified issues with their severity levels, and exact commit recommendations. "
"Clearly state whether the changes are ready for commit or require fixes first. Provide concrete, actionable guidance for "
"any issues that need resolution—make it easy for a developer to understand exactly what needs to be "
@@ -617,7 +617,7 @@ class PrecommitTool(WorkflowTool):
"You are on step 1 of MAXIMUM 2 steps. CRITICAL: Gather and save the complete git changeset NOW. "
"MANDATORY ACTIONS:\\n"
+ "\\n".join(f"{i+1}. {action}" for i, action in enumerate(required_actions))
+ "\\n\\nMANDATORY: The changeset may be large. You MUST save the required changeset as a 'zen_precommit.changeset' file "
+ "\\n\\nMANDATORY: The changeset may be large. You MUST save the required changeset as a 'pal_precommit.changeset' file "
"(replacing any existing one) in your work directory and include the FULL absolute path in relevant_files (exclude any "
"binary files). ONLY include the code changes, no extra commentary."
"Set next_step_required=True and step_number=2 for the next call."
@@ -659,7 +659,7 @@ class PrecommitTool(WorkflowTool):
f"MANDATORY: call {self.get_name()} tool immediately again, and set next_step_required=False to "
f"trigger external validation NOW. "
f"MANDATORY: Include the entire changeset! The changeset may be large. You MUST save the required "
f"changeset as a 'zen_precommit.changeset' file (replacing any existing one) in your work directory "
f"changeset as a 'pal_precommit.changeset' file (replacing any existing one) in your work directory "
f"and include the FULL absolute path in relevant_files so the expert can access the complete changeset. "
f"ONLY include the code changes, no extra commentary."
)
@@ -678,7 +678,7 @@ class PrecommitTool(WorkflowTool):
# About to complete - ensure changeset is saved
next_steps = (
"Completing validation and proceeding to expert analysis. "
"MANDATORY: Save the complete git changeset as a 'zen_precommit.changeset' file "
"MANDATORY: Save the complete git changeset as a 'pal_precommit.changeset' file "
"in your work directory and include the FULL absolute path in relevant_files."
)
else:
@@ -704,7 +704,7 @@ class PrecommitTool(WorkflowTool):
elif not request.next_step_required and request.precommit_type == "external":
next_steps = (
"Completing validation. "
"MANDATORY: Save complete git changeset as 'zen_precommit.changeset' file and include path in relevant_files, "
"MANDATORY: Save complete git changeset as 'pal_precommit.changeset' file and include path in relevant_files, "
"excluding any binary files."
)
else:

View File

@@ -1,5 +1,5 @@
"""
Shared infrastructure for Zen MCP tools.
Shared infrastructure for PAL MCP tools.
This module contains the core base classes and utilities that are shared
across all tool types. It provides the foundation for the tool architecture.

View File

@@ -1,5 +1,5 @@
"""
Base models for Zen MCP tools.
Base models for PAL MCP tools.
This module contains the shared Pydantic models used across all tools,
extracted to avoid circular imports and promote code reuse.
@@ -59,7 +59,7 @@ WORKFLOW_FIELD_DESCRIPTIONS = {
class ToolRequest(BaseModel):
"""
Base request model for all Zen MCP tools.
Base request model for all PAL MCP tools.
This model defines common fields that all tools accept, including
model selection, temperature control, and conversation threading.

View File

@@ -1,5 +1,5 @@
"""
Core Tool Infrastructure for Zen MCP Tools
Core Tool Infrastructure for PAL MCP Tools
This module provides the fundamental base class for all tools:
- BaseTool: Abstract base class defining the tool interface
@@ -45,7 +45,7 @@ logger = logging.getLogger(__name__)
class BaseTool(ABC):
"""
Abstract base class for all Zen MCP tools.
Abstract base class for all PAL MCP tools.
This class defines the interface that all tools must implement and provides
common functionality for request handling, model creation, and response formatting.

View File

@@ -1,5 +1,5 @@
"""
Custom exceptions for Zen MCP tools.
Custom exceptions for PAL MCP tools.
These exceptions allow tools to signal protocol-level errors that should be surfaced
to MCP clients using the `isError` flag on `CallToolResult`. Raising one of these

View File

@@ -1,5 +1,5 @@
"""
Core schema building functionality for Zen MCP tools.
Core schema building functionality for PAL MCP tools.
This module provides base schema generation functionality for simple tools.
Workflow-specific schema building is located in workflow/schema_builders.py

View File

@@ -1,5 +1,5 @@
"""
Simple tools for Zen MCP.
Simple tools for PAL MCP.
Simple tools follow a basic request → AI model → response pattern.
They inherit from SimpleTool which provides streamlined functionality

View File

@@ -1,7 +1,7 @@
"""
Version Tool - Display Zen MCP Server version and system information
Version Tool - Display PAL MCP Server version and system information
This tool provides version information about the Zen MCP Server including
This tool provides version information about the PAL MCP Server including
version number, last update date, author, and basic system information.
It also checks for updates from the GitHub repository.
"""
@@ -90,7 +90,7 @@ def fetch_github_version() -> Optional[tuple[str, str]]:
logger.warning("urllib not available, cannot check for updates")
return None
github_url = "https://raw.githubusercontent.com/BeehiveInnovations/zen-mcp-server/main/config.py"
github_url = "https://raw.githubusercontent.com/BeehiveInnovations/pal-mcp-server/main/config.py"
try:
# Set a 10-second timeout
@@ -126,7 +126,7 @@ def fetch_github_version() -> Optional[tuple[str, str]]:
class VersionTool(BaseTool):
"""
Tool for displaying Zen MCP Server version and system information.
Tool for displaying PAL MCP Server version and system information.
This tool provides:
- Current server version
@@ -176,7 +176,7 @@ class VersionTool(BaseTool):
async def execute(self, arguments: dict[str, Any]) -> list[TextContent]:
"""
Display Zen MCP Server version and system information.
Display PAL MCP Server version and system information.
This overrides the base class execute to provide direct output without AI model calls.
@@ -186,7 +186,7 @@ class VersionTool(BaseTool):
Returns:
Formatted version and system information
"""
output_lines = ["# Zen MCP Server Version\n"]
output_lines = ["# PAL MCP Server Version\n"]
# Server version information
output_lines.append("## Server Information")

View File

@@ -1,5 +1,5 @@
"""
Workflow tools for Zen MCP.
Workflow tools for PAL MCP.
Workflow tools follow a multi-step pattern with forced pauses between steps
to encourage thorough investigation and analysis. They inherit from WorkflowTool

View File

@@ -1,5 +1,5 @@
"""
Workflow Mixin for Zen MCP Tools
Workflow Mixin for PAL MCP Tools
This module provides a sophisticated workflow-based pattern that enables tools to
perform multi-step work with structured findings and expert analysis.