mirror of
https://github.com/Heretek-AI/cod.ai.git
synced 2026-11-07 10:46:11 -10:00
Removes the Pi configs, the placeholder prompt, context, security and sub-agent modules, and the docs and tests that described them. Adds src/agent/: a streaming tool-use loop on the Messages API with file, search and shell tools, permission rules (.cod/settings.json), append-only JSONL sessions with resume, and a terminal front end (`cod`, `cod -p`, `--continue`, `--resume`). The web chat now shares the model table and history rules with the agent. Keeps the memory store and worktree runner, with a stricter memory key check and failed workers reported as failed. All tests use a fake client. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015NGPpYxuPWkyJUoefut3Wo
1.0 KiB
Executable File
1.0 KiB
Executable File
Notes for working on cod.ai
- Python 3.11+, Anthropic Python SDK. Run the tests with
python3 -m unittest discover -s tests. They use the fake client intests/fakes.py; never make real API calls from tests. - Requests use adaptive thinking,
output_config.effort, top-levelcache_control, andfallbacks: "default"where the model supports it (not Haiku 5.5). Don't addbudget_tokens,thinking: disabledor a forcedtool_choice: the current models reject them. - The history is append-only. Store assistant content exactly as returned (thinking signatures included), apply
history_contentafter a fallback, and keep the system prompt and tool list fixed for a session, or the prompt cache and thinking blocks break. - Tool inputs come from the model: validate them (the pydantic models in
src/agent/tools.py) and return failures asis_errortool results. - Credentials stay out of the browser and out of the agent's shell environment (
sanitized_env). src/agent/models.pyis the one model table; the CLI and the web server both read it.