feat(agent-service): add native computer use tools#400
Draft
hiqiancheng wants to merge 3 commits into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
12 tasks
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.
Summary
Adds a TouchAI-native computer-use gateway for desktop automation without bundling Cua, Python, sandbox runtimes, OmniParser, or model weights.
The PR introduces disabled-by-default built-in tools for
computer_session,computer_observe, andcomputer_act, plus a Windows-first Rust runtime that reports platform capabilities, observes native/tree-first desktop state, executes one bounded action with structured receipts, and leaves adapter seams for future Cua-like or vision grounding providers.It also updates AgentService tool-round scheduling so
computer_actruns sequentially within a model tool round and only one successful computer action is counted per round, while later rounds can act again after another model step.Related issue or RFC
Link the issue or RFC:
For code changes, link the tracking issue. Only documentation wording, link fixes, or comment-only cleanups may skip the issue-first flow.
AI assistance disclosure
If AI tools materially assisted this contribution, disclose that here or point to the relevant commit trailer.
Testing evidence
List the commands you ran and the results you observed.
pnpm test:pr(includes type check, lint, format, all tests, and frontend coverage)123 passed / 692 tests, Rust tests passed, coverage completed, and site build completed. Existing lint warnings remain in unrelated Vue/test files, with 0 lint errors.pnpm test:coverage:rust(requires cargo-tarpaulin, or rely on CI)pnpm test:pr, targetedcargo test --manifest-path apps/desktop/src-tauri/Cargo.toml --lib core::built_in_tools::computer -- --nocapture, andcargo test --manifest-path apps/desktop/src-tauri/Cargo.toml --test computer_commands -- --nocapture.pnpm test:e2egit diff --checkpassed.pnpm exec prettier --check ...passed for touched TS/docs tests.pnpm --filter @touchai/desktop type:checkpassed.pnpm --filter @touchai/desktop test:typecheckpassed.pnpm --filter @touchai/desktop lint:checkpassed with 20 existing warnings and 0 errors.pnpm exec vitest run --configLoader runner tests/services/BuiltInToolService/tools/computer/index.test.ts tests/services/native-service.test.ts tests/services/AgentService/execution/tool-round-scheduling.test.ts --passWithNoTestspassed: 3 files, 64 tests.cargo fmt --manifest-path apps/desktop/src-tauri/Cargo.toml --all -- --checkpassed.cargo check --manifest-path apps/desktop/src-tauri/Cargo.toml --libpassed with existingtry_lock_mutexwarnings.Did you follow TDD (test-first) for feature and fix work? Strongly recommended. See docs/testing/testing.md.
Regression tests were added before fixing the late review findings for tree-first defaults, background scope-only rejection, observed native target gating, routeHint background-policy bypass, and post-action observation contract.
Risk notes
AgentService, runtime, MCP, or schema impact: AgentService tool-round scheduling changes built-in tool execution order whenbuiltin__computer_actis present; NativeService and Rust command contracts gain computer-use request/response types; Rust runtime owns desktop action policy and receipts.Screenshots or recordings
No UI surface changed.
Checklist
[WIP]or similar title prefixes.AgentService, runtime, MCP, or schema boundaries, there is an accepted RFC.pnpm test:prfor this code PR, or this is a docs-only change.pnpm test:coverage:rustor relied on CI coverage evidence.pnpm test:e2elocally or documented why CI is the first valid proof.