Skip to content

feat: add proactive command monitors - #1894

Open
zhanba wants to merge 2 commits into
mainfrom
feat/monitor-tool-stage3
Open

feat: add proactive command monitors#1894
zhanba wants to merge 2 commits into
mainfrom
feat/monitor-tool-stage3

Conversation

@zhanba

@zhanba zhanba commented Aug 14, 2026

Copy link
Copy Markdown
Member

Summary

  • add the standalone startMonitor tool with task-scoped monitor IDs, timeout/persistence controls, cancellation, and active-monitor environment context
  • deliver batched, rate-limited monitor output events through CLI and VS Code transports into non-removable, steerable WebUI notifications
  • preserve existing background executeCommand transcripts and durable completion notifications while preventing duplicate completion notifications for monitor jobs

Test plan

  • Run bun check
  • Run bun tsc
  • Run common monitor watcher tests (14 passed)
  • Run CLI background job manager tests (122 passed)
  • Run WebUI chat toolbar tests (6 passed)
  • Run VS Code extension tests (199 passed)
  • Run pre-push unit test suite
  • Run full VS Code integration suite (attempted twice; @vscode/test-electron timed out during startup after 15 seconds, before assertions)

Notes

  • CLI monitor events consume stdout only while preserving stdout and stderr in the transcript.
  • VS Code's TerminalShellExecution.read() exposes a combined stream, so its monitor events can include stderr.

🤖 Generated with Pochi

zhanba and others added 2 commits August 14, 2026 15:09
Add task-scoped monitor jobs so agents can receive command output events without polling while preserving existing background command semantics.

🤖 Generated with [Pochi](https://getpochi.com)

Co-Authored-By: Pochi <noreply@getpochi.com>
Keep the environment prompt snapshot aligned with the new command and monitor job descriptions.

🤖 Generated with [Pochi](https://getpochi.com)

Co-Authored-By: Pochi <noreply@getpochi.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 46.59207% with 525 lines in your changes missing coverage. Please review.
✅ Project coverage is 31.04%. Comparing base (2c6432d) to head (3cd44d0).

Files with missing lines Patch % Lines
...scode/src/integrations/monitor/monitor-registry.ts 0.00% 147 Missing ⚠️
packages/cli/src/task-runner.ts 0.00% 61 Missing ⚠️
packages/vscode/src/tools/monitor.ts 0.00% 53 Missing ⚠️
...de-webui/src/features/tools/components/monitor.tsx 17.07% 34 Missing ⚠️
...ebui/src/features/chat/components/chat-toolbar.tsx 13.51% 32 Missing ⚠️
packages/cli/src/tools/monitor.ts 11.76% 30 Missing ⚠️
...de-webui/src/components/message/monitor-events.tsx 14.28% 30 Missing ⚠️
packages/cli/src/lib/background-job-manager.ts 75.70% 26 Missing ⚠️
...ebui/src/features/chat/hooks/use-monitor-events.ts 44.73% 20 Missing and 1 partial ⚠️
...c/features/chat/lib/use-background-job-display.tsx 0.00% 16 Missing ⚠️
... and 13 more

❌ Your patch status has failed because the patch coverage (46.59%) 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    #1894      +/-   ##
==========================================
- Coverage   36.94%   31.04%   -5.91%     
==========================================
  Files         770      779       +9     
  Lines       81173    82120     +947     
  Branches     3697     4363     +666     
==========================================
- Hits        29990    25493    -4497     
- Misses      51070    56508    +5438     
- Partials      113      119       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants