refactor: simplify startup_script to bare claude command (drop bash header and cd)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
caoimhinr 2026-05-27 09:20:30 +02:00
parent 87f5993149
commit a9ef13afa8

View file

@ -27,10 +27,6 @@ mcp = FastMCP("homelab-tickets")
_HEADERS = {"X-Api-Key": API_KEY, "Content-Type": "application/json"} _HEADERS = {"X-Api-Key": API_KEY, "Content-Type": "application/json"}
# Repo root used in generated startup scripts (cd here before running claude)
_REPO_PATH = os.environ.get("CORVID_REPO_PATH",
os.path.expanduser("~/Projects/corvid"))
# MCP tool names always included so the agent can read and update its own ticket # MCP tool names always included so the agent can read and update its own ticket
_BASE_TOOLS = [ _BASE_TOOLS = [
"Read", "Read",
@ -72,13 +68,7 @@ def _generate_startup_script(ticket_id: int, human_id: str, title: str,
f"Start by calling mcp__homelab-tickets__get_ticket({ticket_id}) to read the full " f"Start by calling mcp__homelab-tickets__get_ticket({ticket_id}) to read the full "
f"ticket details, then complete the work and mark the ticket as completed." f"ticket details, then complete the work and mark the ticket as completed."
) )
return ( return f'claude "{prompt}" --allowedTools "{tools_str}"'
f"#!/usr/bin/env bash\n"
f"# Startup script for {human_id}: {title}\n"
f"cd {_REPO_PATH}\n"
f'claude "{prompt}" \\\n'
f' --allowedTools "{tools_str}"\n'
)
def _client() -> httpx.Client: def _client() -> httpx.Client: