Appendix: The Code Behind It

Source Link
FileRole
src/query.tsAgent Loop execution engine — the loop body for a single turn's task
src/QueryEngine.tsConversation manager — maintains session state across multiple turns
src/tools.tsTool registry — lists and permission-filters all tools
src/Task.tsTask type and status definitions
src/tools/AgentTool/AgentTool.tsxComplete implementation of agent launch and routing
src/services/compact/autoCompact.tsAuto-compact strategy and threshold calculation