picoclaw/pkg/agent
Liu Yuan f901af8cbc
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-21 22:38:03 +08:00
..
context.go refactor: centralize environment variable key constants (#1730) 2026-03-18 18:03:24 +08:00
context_cache_test.go feat(agent): include current sender in dynamic context (#1696) 2026-03-17 23:31:56 +08:00
context_test.go fix deepseek-chat bug (#1066) 2026-03-06 16:04:31 +08:00
instance.go fix(agent): rebind provider after /switch model to (#1769) 2026-03-19 21:44:01 +08:00
instance_test.go feat(tools): add exec tool enhancement with background execution and PTY support (#1752) 2026-03-21 22:38:03 +08:00
loop.go Merge pull request #1818 from Alix-007/fix/issue-1815-empty-response-message 2026-03-20 23:23:48 +01:00
loop_mcp.go feat(mcp): per server deferred mode (#1654) 2026-03-19 17:03:17 +08:00
loop_mcp_test.go feat(mcp): per server deferred mode (#1654) 2026-03-19 17:03:17 +08:00
loop_media.go feat: expose local file paths for non-image media to enable agent file tools (#1516) 2026-03-14 12:09:11 +08:00
loop_test.go fix(agent): separate empty-response and tool-limit fallbacks 2026-03-20 14:37:47 +08:00
memory.go refactor(modernize): apply safe modernize fixes 2026-02-27 16:35:07 +08:00
mock_provider_test.go feat(fmt): Fix formatting 2026-02-19 22:05:15 +02:00
model_resolution.go fix(agent): rebind provider after /switch model to (#1769) 2026-03-19 21:44:01 +08:00
registry.go feat(session): integrate JSONL persistence into agent loop (#1170) 2026-03-10 15:14:09 +08:00
registry_test.go feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00
thinking.go feat: add extended thinking support for Anthropic models (#1076) 2026-03-05 09:51:18 +08:00
thinking_test.go feat: add extended thinking support for Anthropic models (#1076) 2026-03-05 09:51:18 +08:00