diff --git a/AGENTS.md b/AGENTS.md index 3e35c109..62f50fd1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -86,56 +86,3 @@ When closing issues via commit: 5. **Add new [Unreleased] section** at top of CHANGELOG.md for next cycle, commit it -## coding-agent Code Map - -``` -packages/coding-agent/src/ -├── cli.ts # CLI entry point -├── main.ts # Main orchestration, mode routing -├── index.ts # Public exports - -├── cli/ # CLI-specific utilities -│ ├── args.ts # Argument parsing, help display -│ ├── file-processor.ts # @file argument processing -│ └── session-picker.ts # TUI session selector for --resume - -├── core/ # Core business logic (mode-agnostic) -│ ├── agent-session.ts # AgentSession: unified session management -│ ├── bash-executor.ts # Bash command execution -│ ├── compaction.ts # Context compaction logic -│ ├── export-html.ts # HTML export functionality -│ ├── messages.ts # Message types and transformers -│ ├── model-config.ts # Model configuration loading -│ ├── model-resolver.ts # Model resolution and scoping -│ ├── session-manager.ts # Session persistence (JSONL) -│ ├── settings-manager.ts # User settings persistence -│ ├── slash-commands.ts # Slash command loading -│ ├── system-prompt.ts # System prompt construction -│ ├── oauth/ # OAuth authentication -│ └── tools/ # Tool implementations (read, bash, edit, write, etc.) - -├── modes/ # Run mode implementations -│ ├── index.ts # Mode exports -│ ├── print-mode.ts # Non-interactive print mode -│ ├── interactive/ # Interactive TUI mode -│ │ ├── interactive-mode.ts # InteractiveMode class -│ │ ├── components/ # TUI components -│ │ └── theme/ # Theme definitions -│ └── rpc/ # RPC/JSON mode for programmatic use -│ ├── rpc-mode.ts # RPC server (stdin/stdout JSON protocol) -│ ├── rpc-types.ts # RpcCommand, RpcResponse types -│ └── rpc-client.ts # RpcClient class for embedding - -└── utils/ # Generic utilities - ├── changelog.ts # Changelog parsing - ├── clipboard.ts # Clipboard operations - ├── config.ts # App configuration, paths - ├── fuzzy.ts # Fuzzy matching - ├── shell.ts # Shell detection - └── tools-manager.ts # External tool management (fd, etc.) -``` - -Key abstractions: -- `AgentSession` (core/agent-session.ts): Central session management, wraps Agent with persistence, compaction, model cycling -- `InteractiveMode` (modes/interactive/interactive-mode.ts): TUI rendering and user interaction -- `runPrintMode` / `runRpcMode`: Non-interactive output modes