import type { IdeAdapter } from '../ide-types.js'; /** * Trae IDE adapter —— peaks-loop 的第二个内置 IDE 适配器。 * * 不可消除的 per-IDE 字段(slice #1 锁定): * - settings.dirName = '.trae' : Trae 项目根下的配置目录 * - envVar = 'TRAE_PROJECT_DIR' : Trae 注入的 env 变量(用于 ${...} 占位) * * Slice #1 的 slim `IdeAdapter` shape 在 slice #1 RD 中被锁为"填表"模式。 * 本文件是 slice #2 第一个真实客户,验证 slice #1 抽出的形状真的可以 * 简单复制粘贴就接入新 IDE。 * * 与 slice #1 claude-code-adapter.ts 的区别(故意): * - Trae 的 hookEvent 名是 `beforeToolCall` 而不是 `PreToolUse`(VERIFIED) * - Trae 的 toolMatcher 是 `terminal` 而不是 `Bash`(VERIFIED) * - Trae 的 settings 路径是 `.trae/settings.json`(同 Claude 风格,只是目录名不同;VERIFIED) * - Trae 的 envVar 是 `TRAE_PROJECT_DIR` * - installHints 提示用户"重启 Trae"(同 Claude 风格) * * Slice #009 验证结论(2026-06-07): * - 4 UNVERIFIED fields are all VERIFIED-AS-IS against the Trae 1.x fixture * (tests/fixtures/trae/trae-1x-payload.json) AND the live install * dispatch path exercised by `peaks hooks install` / `peaks statusline * install` / `peaks hook handle`. The fixture mimics a real Trae 1.x * install's payload shape; the dispatch path is the byte-level same path * a real Trae install would trigger. Caveat: a follow-up slice should * re-run the same 5+ dogfood paths on a real Trae 1.x install once one * is available, to confirm the 1.x assumption is correct (see PRD R-1 * + the new memory at * .peaks/memory/trae-adapter-values-verified-against-1x.md). * - See .peaks/_runtime/2026-06-06-session-5b1095/qa/dogfood-trae-1x-2026-06-07.md * for the full resolution table. * * Slice #3 refactor: the `peaks hooks install` command now dispatches on the * IDE adapter (auto-detect from env / cwd, override with `--ide trae`). When * a Trae install is run, the resulting `/.trae/settings.json` will use * the `beforeToolCall` event key and the `terminal` matcher from this adapter. */ export declare const TRAE_ADAPTER: IdeAdapter;