1#[derive(Debug, Clone, Copy)]
2pub struct ClientConstraints {
3 pub id: &'static str,
4 pub display_name: &'static str,
5 pub mcp_instructions_max_chars: Option<usize>,
7 pub supports_auto_approve: bool,
9}
10
11pub const ALL_CLIENTS: &[ClientConstraints] = &[
13 ClientConstraints {
14 id: "cursor",
15 display_name: "Cursor",
16 mcp_instructions_max_chars: None,
17 supports_auto_approve: true,
18 },
19 ClientConstraints {
20 id: "claude-code",
21 display_name: "Claude Code",
22 mcp_instructions_max_chars: Some(2048),
23 supports_auto_approve: false,
24 },
25 ClientConstraints {
26 id: "codebuddy",
27 display_name: "CodeBuddy",
28 mcp_instructions_max_chars: Some(2048),
29 supports_auto_approve: false,
30 },
31 ClientConstraints {
32 id: "vscode-copilot",
33 display_name: "VS Code / GitHub Copilot",
34 mcp_instructions_max_chars: None,
35 supports_auto_approve: false,
36 },
37 ClientConstraints {
38 id: "windsurf",
39 display_name: "Windsurf",
40 mcp_instructions_max_chars: None,
41 supports_auto_approve: false,
42 },
43 ClientConstraints {
44 id: "zed",
45 display_name: "Zed",
46 mcp_instructions_max_chars: None,
47 supports_auto_approve: false,
48 },
49 ClientConstraints {
50 id: "jetbrains",
51 display_name: "JetBrains IDEs",
52 mcp_instructions_max_chars: None,
53 supports_auto_approve: false,
54 },
55 ClientConstraints {
56 id: "opencode",
57 display_name: "OpenCode",
58 mcp_instructions_max_chars: None,
59 supports_auto_approve: false,
60 },
61 ClientConstraints {
62 id: "crush",
63 display_name: "Crush",
64 mcp_instructions_max_chars: None,
65 supports_auto_approve: false,
66 },
67 ClientConstraints {
68 id: "amp",
69 display_name: "Amp",
70 mcp_instructions_max_chars: None,
71 supports_auto_approve: false,
72 },
73 ClientConstraints {
74 id: "hermes",
75 display_name: "Hermes Agent",
76 mcp_instructions_max_chars: None,
77 supports_auto_approve: false,
78 },
79 ClientConstraints {
80 id: "kiro",
81 display_name: "AWS Kiro",
82 mcp_instructions_max_chars: None,
83 supports_auto_approve: true,
84 },
85 ClientConstraints {
86 id: "amazonq",
87 display_name: "Amazon Q Developer",
88 mcp_instructions_max_chars: None,
89 supports_auto_approve: false,
90 },
91 ClientConstraints {
92 id: "gemini-cli",
93 display_name: "Gemini CLI",
94 mcp_instructions_max_chars: None,
95 supports_auto_approve: false,
96 },
97 ClientConstraints {
98 id: "antigravity",
99 display_name: "Antigravity",
100 mcp_instructions_max_chars: None,
101 supports_auto_approve: false,
102 },
103 ClientConstraints {
104 id: "codex",
105 display_name: "Codex CLI",
106 mcp_instructions_max_chars: None,
107 supports_auto_approve: false,
108 },
109 ClientConstraints {
110 id: "trae",
111 display_name: "Trae",
112 mcp_instructions_max_chars: None,
113 supports_auto_approve: false,
114 },
115 ClientConstraints {
116 id: "qwen-code",
117 display_name: "Qwen Code",
118 mcp_instructions_max_chars: None,
119 supports_auto_approve: false,
120 },
121 ClientConstraints {
122 id: "verdent",
123 display_name: "Verdent",
124 mcp_instructions_max_chars: None,
125 supports_auto_approve: false,
126 },
127 ClientConstraints {
128 id: "pi",
129 display_name: "Pi Coding Agent",
130 mcp_instructions_max_chars: None,
131 supports_auto_approve: false,
132 },
133 ClientConstraints {
134 id: "cline",
135 display_name: "Cline",
136 mcp_instructions_max_chars: None,
137 supports_auto_approve: false,
138 },
139 ClientConstraints {
140 id: "roo",
141 display_name: "Roo Code",
142 mcp_instructions_max_chars: None,
143 supports_auto_approve: false,
144 },
145];
146
147pub fn by_client_id(id: &str) -> Option<&'static ClientConstraints> {
148 let id = id.trim();
149 ALL_CLIENTS.iter().find(|c| c.id == id)
150}
151
152pub fn by_editor_name(name: &str) -> Option<&'static ClientConstraints> {
153 match name {
154 "Cursor" => by_client_id("cursor"),
155 "Claude Code" => by_client_id("claude-code"),
156 "VS Code" => by_client_id("vscode-copilot"),
157 "Copilot CLI" => by_client_id("copilot-cli"),
158 "Windsurf" => by_client_id("windsurf"),
159 "Zed" => by_client_id("zed"),
160 "JetBrains IDEs" => by_client_id("jetbrains"),
161 "OpenCode" => by_client_id("opencode"),
162 "Crush" => by_client_id("crush"),
163 "Amp" => by_client_id("amp"),
164 "Hermes Agent" => by_client_id("hermes"),
165 "AWS Kiro" => by_client_id("kiro"),
166 "Amazon Q Developer" => by_client_id("amazonq"),
167 "Gemini CLI" => by_client_id("gemini-cli"),
168 "Antigravity" => by_client_id("antigravity"),
169 "Codex CLI" => by_client_id("codex"),
170 "Trae" => by_client_id("trae"),
171 "Qwen Code" => by_client_id("qwen-code"),
172 "Verdent" => by_client_id("verdent"),
173 "Pi Coding Agent" => by_client_id("pi"),
174 "Cline" => by_client_id("cline"),
175 "Roo Code" => by_client_id("roo"),
176 _ => None,
177 }
178}