diff options
| author | main <main@swarm.moe> | 2026-03-31 13:07:12 -0400 |
|---|---|---|
| committer | main <main@swarm.moe> | 2026-03-31 13:07:12 -0400 |
| commit | 2160224b7ef21e3319a93d057165712aabe8cbe2 (patch) | |
| tree | adad1f3f29eee071dae06766e057d851bf26e39c /crates/phone-opus/src/mcp/protocol.rs | |
| parent | 2bb470f0b28b75863809f127b7f12222db07496c (diff) | |
| download | phone_opus-2160224b7ef21e3319a93d057165712aabe8cbe2.zip | |
Exterminate inert consult slop
Diffstat (limited to 'crates/phone-opus/src/mcp/protocol.rs')
| -rw-r--r-- | crates/phone-opus/src/mcp/protocol.rs | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/crates/phone-opus/src/mcp/protocol.rs b/crates/phone-opus/src/mcp/protocol.rs index 9d3ec1a..79c2169 100644 --- a/crates/phone-opus/src/mcp/protocol.rs +++ b/crates/phone-opus/src/mcp/protocol.rs @@ -28,9 +28,48 @@ Prefer specific recommendations over vague commentary. If there are no meaningfu The real prompt follows."; pub(crate) const CLAUDE_EFFORT: &str = "max"; pub(crate) const CLAUDE_MODEL: &str = "claude-opus-4-6"; -pub(crate) const CLAUDE_TOOLSET: &str = "Bash,Read,Grep,Glob,LS,WebFetch"; pub(crate) const EMPTY_MCP_CONFIG: &str = "{\"mcpServers\":{}}"; +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +pub(crate) enum ClaudeTool { + Bash, + Read, + Grep, + Glob, + Ls, + WebFetch, +} + +impl ClaudeTool { + const fn cli_name(self) -> &'static str { + match self { + Self::Bash => "Bash", + Self::Read => "Read", + Self::Grep => "Grep", + Self::Glob => "Glob", + Self::Ls => "LS", + Self::WebFetch => "WebFetch", + } + } +} + +pub(crate) const CLAUDE_TOOLSET: &[ClaudeTool] = &[ + ClaudeTool::Bash, + ClaudeTool::Read, + ClaudeTool::Grep, + ClaudeTool::Glob, + ClaudeTool::Ls, + ClaudeTool::WebFetch, +]; + +pub(crate) fn render_claude_toolset(toolset: &[ClaudeTool]) -> String { + toolset + .iter() + .map(|tool| tool.cli_name()) + .collect::<Vec<_>>() + .join(",") +} + #[derive(Clone, Debug, Deserialize, Serialize)] pub(crate) struct HostStateSeed { pub(crate) session_kernel: HostSessionKernelSnapshot, |