refactor(tools): fold background jobs into executeCommand - #1892
Merged
Conversation
Collapse startBackgroundJob and readBackgroundJobOutput into a single executeCommand tool with a background flag, so agents use one command surface and read job output through readFile instead of a dedicated polling tool. 🤖 Generated with [Pochi](https://getpochi.com) | [Task](https://app.getpochi.com/share/p-694b5ff250b14ffd8725893807e3dce0) Co-Authored-By: Pochi <noreply@getpochi.com>
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (54.74%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1892 +/- ##
==========================================
- Coverage 36.43% 30.62% -5.81%
==========================================
Files 775 770 -5
Lines 81332 81084 -248
Branches 3646 4128 +482
==========================================
- Hits 29630 24831 -4799
- Misses 51589 56135 +4546
- Partials 113 118 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
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
backgroundflag toexecuteCommandand remove the standalonestartBackgroundJob/readBackgroundJobOutputtools. A background call starts the job and returns its ID plus the output file path, which the model reads withreadFile;killBackgroundJobstill stops it.TerminalJob, the CLI delegates to the background job manager, and the WebUI renders background commands viaBackgroundJobPanel(job ID travels inoutput._meta, stripped before reaching the LLM).executeCommandsurface —startBackgroundJob(...)policy entries are gone, so background commands are governed byexecuteCommand(...)patterns.Test plan
bun checkbun tscbun run test(includes newpackages/toolsand updated CLI/VS Code/WebUI tests)readFile, andkillBackgroundJobstops itexecuteCommand(npm run dev)can start that background command and is blocked from others🤖 Generated with Pochi | Task