Liu Yuan
3f1ac297d4
feat(tools): add exec tool enhancement with background execution and PTY support (#1752)
- Unified exec tool with actions: run/list/poll/read/write/send-keys/kill
- PTY support using creack/pty library
- Process session management with background execution
- Process group kill for cleaning up child processes
- Session cleanup: 30-minute TTL for old sessions
- Output buffer: 100MB limit with truncation
Actions:
- run: execute command (sync or background)
- list: list all sessions
- poll: check session status
- read: read session output
- write: send input to session stdin
- send-keys: send special keys (up, down, ctrl-c, enter, etc.)
- kill: terminate session
Tests:
- PTY: allowed commands, write/read, poll, kill, process group kill
- Non-PTY: background execution, list, read, write, poll, kill, process group kill
- Session management: add/get/remove/list/cleanup
2026-03-25 21:02:49 +08:00
..
2026-03-22 19:21:58 +08:00
2026-03-22 19:21:58 +08:00
2026-03-22 19:21:58 +08:00
2026-03-23 17:24:46 +08:00
2026-03-23 17:24:46 +08:00
2026-03-22 19:21:58 +08:00
2026-03-22 19:21:58 +08:00
2026-03-23 10:54:08 +08:00
2026-03-22 19:21:58 +08:00
2026-03-22 19:21:58 +08:00
2026-03-23 10:54:08 +08:00
2026-03-22 19:21:58 +08:00
2026-03-22 19:21:58 +08:00
2026-03-22 19:21:58 +08:00
2026-03-23 10:54:08 +08:00
2026-03-22 19:21:58 +08:00
2026-03-25 21:02:49 +08:00
2026-03-22 19:21:58 +08:00
2026-03-19 17:03:17 +08:00
2026-03-19 17:03:17 +08:00
2026-03-22 23:36:25 +01:00
2026-03-25 14:22:41 +08:00
2026-03-25 14:22:41 +08:00
2026-02-27 16:35:07 +08:00
2026-02-19 22:05:15 +02:00
2026-03-19 21:44:01 +08:00
2026-03-12 13:52:55 +08:00
2026-03-10 15:14:09 +08:00
2026-03-23 10:54:08 +08:00
2026-03-22 20:35:14 +08:00
2026-03-23 10:54:08 +08:00
2026-03-22 20:35:14 +08:00
2026-03-05 09:51:18 +08:00
2026-03-05 09:51:18 +08:00
2026-03-22 19:21:58 +08:00