feat(trae-cn): add desktop adapter#1743
Open
JasonYang0104 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add a Trae CN desktop adapter, modeled after the existing Cursor desktop adapter pattern: OpenCLI connects to the running Electron app through a Chrome DevTools Protocol endpoint and drives the active workbench target.
The adapter supports task creation, prompt sending, ask/read/export flows, model inspection/selection, activity watching, target discovery, screenshots/dumps, and explicit approval handling for visible Trae CN permission prompts.
Related issue: N/A
Type of Change
What this PR does
clis/trae-cn/*with 15 desktop commands:activity,approve,ask,dump,export,model,new,read,screenshot,select-model,send,setup,status,targets, andwatch.39240.docs/adapters/desktop/trae-cn.mdand updates the adapter index, sidebar, README command tables, and generated manifest.Approval behavior
askandwatchdefault to--auto-approve truefor visible Trae CN terminal/delete confirmation UI, matching the intended unattended local-agent workflow. The default approval kinds areterminal,delete;keepis intentionally opt-in only.Safety controls included here:
--auto-approve falsedisables automatic approval duringask/watch.--approve-kindssupportsterminal,delete,keep, andall; default remainsterminal,delete.opencli trae-cn approve --dry-run truedetects matching visible prompts without clicking.Checklist
Documentation (if adding/modifying an adapter)
docs/adapters/(if new adapter)docs/adapters/index.mdtable (if new adapter)docs/.vitepress/config.mts(if new adapter)README.md/README.zh-CN.mdwhen command discoverability changedCliErrorsubclasses instead of rawErrorScreenshots / Output
Local validation:
Additional PR-gate validation run locally:
Results summary:
1 passed,18 passed.363 passed,3438 passed.40 passed,791 passed; shard 239 passed,422 passed,1 skipped.77 passed,1139 passed,1 skipped.156/156 adapters documented.found 0 vulnerabilities.Live Trae CN smoke test was not run because
http://127.0.0.1:39240/jsonwas not listening locally at PR time. This is intentionally not a CI dependency because it requires a locally running and logged-in Trae CN app.