Repository navigation
refactor(computer-tool): split the computer tool by responsibility - #124358
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 16, 2026 02:31
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 16, 2026
This was referenced Oct 19, 2026
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.
What Problem This Solves
computer-tool.tshad accumulated the model schema, v1 coordinate/frame handling, v2 wire construction, node selection and execution affinity, result projection, and screenshot delivery in one 1,542-line module. That required a grandfatheredmax-linessuppression and made each responsibility harder to review in isolation.Why This Change Was Made
Split the implementation along settled ownership boundaries: a leaf shared-types module, schema construction, wire-request construction, node/session affinity, and model-result delivery.
computer-tool.tsnow retains only the public tool definition and orchestration. The schema, action set, capability descriptors, and model-visible behavior are unchanged.Post-split physical line counts:
computer-tool.tscomputer-tool-node.tscomputer-tool-request.tscomputer-tool-result.tscomputer-tool-schema.tscomputer-tool-shared.tsThe
max-linessuppression andconfig/max-lines-baseline.txtentry forcomputer-tool.tsare both removed. No replacement suppressions were added.User Impact
No user-visible behavior changes. This makes future computer-use work easier to review and keeps each production module within the repository line budget.
Evidence
node scripts/run-vitest.mjs src/agents/tools: 83 files and 1,959 tests before and after; 1,958 passed and 1 skipped.pnpm tsgo: passed.pnpm check:test-types: passed.node scripts/run-oxlint.mjs src/agents/tools: passed.node --import tsx scripts/check-madge-import-cycles.ts: 0 cycles.pnpm deadcode:full: passed.git diff --check: passed.refs/remotes/origin/ci-max-lines-baseref was absent after fetch, so the max-lines ratchet is left to the PR's authoritative CI run as directed by the work order.