Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(runtime): add traecli to custom runtime profile whitelist (#4972)
Bohan Jiang346f818206ea
diff --git a/packages/core/types/agent.ts b/packages/core/types/agent.tsindex 5893754174..f749924958 100644--- a/packages/core/types/agent.ts+++ b/packages/core/types/agent.ts@@ -110,6 +110,7 @@ export const RUNTIME_PROFILE_PROTOCOL_FAMILIES = ["kiro","antigravity","qoder",+ "traecli",] as const;export type RuntimeProtocolFamily =diff --git a/server/migrations/136_runtime_profile_add_traecli.down.sql b/server/migrations/136_runtime_profile_add_traecli.down.sqlnew file mode 100644index 0000000000..512047ba2b--- /dev/null+++ b/server/migrations/136_runtime_profile_add_traecli.down.sql@@ -0,0 +1,20 @@+ALTER TABLE runtime_profile DROP CONSTRAINT IF EXISTS runtime_profile_protocol_family_check;++-- Restore the pre-136 whitelist (migration 134 shape, without traecli). NOT VALID+-- keeps the historical Gemini tolerance so the rollback cannot fail on old rows.+ALTER TABLE runtime_profile ADD CONSTRAINT runtime_profile_protocol_family_check+ CHECK (protocol_family IN (+ 'claude',+ 'codebuddy',+ 'codex',+ 'copilot',+ 'opencode',+ 'openclaw',+ 'hermes',+ 'pi',+ 'cursor',+ 'kimi',+ 'kiro',+ 'antigravity',+ 'qoder'+ )) NOT VALID;diff --git a/server/migrations/136_runtime_profile_add_traecli.up.sql b/server/migrations/136_runtime_profile_add_traecli.up.sqlnew file mode 100644index 0000000000..f375cb1931--- /dev/null+++ b/server/migrations/136_runtime_profile_add_traecli.up.sql@@ -0,0 +1,25 @@+ALTER TABLE runtime_profile DROP CONSTRAINT IF EXISTS runtime_profile_protocol_family_check;++-- Widen the whitelist to include Trae (`traecli`). Trae already has a New()+-- backend, launch header (`traecli acp serve`) and provider branding, but was+-- missing from the protocol_family whitelist, so custom runtime profiles based+-- on Trae were rejected and it never appeared in the family picker (#4945).+-- NOT VALID mirrors migrations 126/134 so a historical Gemini row they+-- intentionally tolerated does not block the upgrade.+ALTER TABLE runtime_profile ADD CONSTRAINT runtime_profile_protocol_family_check+ CHECK (protocol_family IN (+ 'claude',+ 'codebuddy',+ 'codex',+ 'copilot',+ 'opencode',+ 'openclaw',+ 'hermes',+ 'pi',+ 'cursor',+ 'kimi',+ 'kiro',+ 'antigravity',+ 'qoder',+ 'traecli'+ )) NOT VALID;diff --git a/server/pkg/agent/agent.go b/server/pkg/agent/agent.goindex 86d5584dfe..f07a4a3f56 100644--- a/server/pkg/agent/agent.go+++ b/server/pkg/agent/agent.go@@ -138,10 +138,13 @@ type Config struct {// SupportedTypes is the canonical whitelist of agent types eligible to back a// custom runtime profile. It MUST stay in lockstep with the// runtime_profile.protocol_family CHECK constraint (migration 120, widened by-// migration 134 to add qoder): a custom runtime profile may only be based on a-// backend Multica officially supports. qoder is exposed here so Qoder CN-// (`qoderclicn`) users can point the Qoder backend at a non-default binary-// instead of misrouting through Kiro/ACP with incompatible arguments (#4883).+// migration 134 to add qoder and migration 136 to add traecli): a custom+// runtime profile may only be based on a backend Multica officially supports.+// qoder is exposed here so Qoder CN (`qoderclicn`) users can point the Qoder+// backend at a non-default binary instead of misrouting through Kiro/ACP with+// incompatible arguments (#4883). traecli (Trae) has a New backend, launch+// header and provider branding but was previously missing from this whitelist,+// so the family picker rejected it (#4945).var SupportedTypes = []string{"claude","codebuddy",@@ -156,6 +159,7 @@ var SupportedTypes = []string{"kiro","antigravity","qoder",+ "traecli",}// IsSupportedType reports whether agentType is in the SupportedTypes whitelist.diff --git a/server/pkg/agent/agent_supported_types_test.go b/server/pkg/agent/agent_supported_types_test.goindex 4b1d54f602..5e66013c95 100644--- a/server/pkg/agent/agent_supported_types_test.go+++ b/server/pkg/agent/agent_supported_types_test.go@@ -40,7 +40,7 @@ func TestSupportedTypesMatchesMigrationWhitelist(t *testing.T) {"claude": true, "codebuddy": true, "codex": true, "copilot": true,"opencode": true, "openclaw": true, "hermes": true,"pi": true, "cursor": true, "kimi": true, "kiro": true, "antigravity": true,- "qoder": true,+ "qoder": true, "traecli": true,}if len(SupportedTypes) != len(want) {t.Fatalf("SupportedTypes has %d entries, migration whitelist has %d; keep them in lockstep", len(SupportedTypes), len(want))