- 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.
17 lines
657 B
TypeScript
17 lines
657 B
TypeScript
import { emergencyTerminalRestore } from "@oh-my-pi/pi-tui";
|
|
import { postmortem } from "@oh-my-pi/pi-utils";
|
|
|
|
/**
|
|
* Run modes for the coding agent.
|
|
*/
|
|
export { runAcpMode } from "./acp";
|
|
export { InteractiveMode, type InteractiveModeOptions } from "./interactive-mode";
|
|
export { type PrintModeOptions, runPrintMode } from "./print-mode";
|
|
export { type ModelInfo, RpcClient, type RpcClientOptions, type RpcEventListener } from "./rpc/rpc-client";
|
|
export { runRpcMode } from "./rpc/rpc-mode";
|
|
export type { RpcCommand, RpcResponse, RpcSessionState } from "./rpc/rpc-types";
|
|
|
|
postmortem.register("terminal-restore", () => {
|
|
emergencyTerminalRestore();
|
|
});
|