feat(modes): introduced ACP mode for headless agent operation with session management and event streaming

- Added ACP (Agent Client Protocol) mode for headless agent operation via --mode acp flag.
- Integrated Agent Client Protocol SDK with session management, streaming communication, and event mapping.
- Added ensureOnDisk() method to SessionManager for immediate session persistence without requiring assistant messages.
- Changed session persistence to use atomic file rewrite for unflushed sessions.
- Implemented AcpAgent class with session management, prompt handling, MCP server configuration, and event streaming.
This commit is contained in:
can1357
2026-03-22 01:24:58 +01:00
parent 7be29ab70f
commit b64b6b8a79
12 changed files with 1560 additions and 40 deletions
+3 -1
View File
@@ -40,6 +40,7 @@
"test": "bun test"
},
"dependencies": {
"@agentclientprotocol/sdk": "0.16.1",
"@mozilla/readability": "^0.6",
"@oh-my-pi/omp-stats": "workspace:*",
"@oh-my-pi/pi-agent-core": "workspace:*",
@@ -54,7 +55,8 @@
"diff": "^8.0",
"handlebars": "^4.7",
"linkedom": "^0.18",
"puppeteer": "^24.37"
"puppeteer": "^24.37",
"zod": "4.3.6"
},
"devDependencies": {
"@types/bun": "^1.3"