fix: exit view attach on first Ctrl-C
Merged
WI
3mo ago+52+52+01234567890123456789-6-6-0123456789
Summary
- make the first Ctrl-C immediately detach
node agent attach --mode view - retain the normal close request while terminating the local WebSocket handle
- add regression coverage for raw-input and signal-driven detach paths
Why
View mode consumes Ctrl-C as raw terminal input to suppress terminal input-report noise. Its graceful WebSocket shutdown could leave the Node process alive while waiting for the broker to acknowledge the close, requiring a second Ctrl-C.
User impact
Detaching a read-only view now exits on the first Ctrl-C. The viewed agent is not stopped.
Validation
npm exec vitest -- run packages/cli/src/cli/lib/attach-view.test.tsnpx tsc --noEmit -p packages/cli/tsconfig.json