| feat: major architecture overhaul — context management, smart truncation, agent discipline
Phase 1: Tool result externalization
- ToolResultRef + ToolResultStore: large tool outputs cached to disk
- Hot zone inflated from disk, cold zone uses summaries
Phase 2: Turn-aware context windowing
- TurnTracker: tracks conversation turns (user message → completion)
- Budgeted windowing operates at turn granularity
- Cold turns: only user question + assistant conclusion retained
- Synthesized outcomes for turns without assistant text
Phase 3: Smart per-tool truncation
- bash: preserve error lines, skip verbose build logs
- read_file: threshold raised to 2000 lines (prevents multi-read cycles)
- First read of any file forces full content (ignores offset/limit)
- edit_file returns compact diff + file outline after edit
Agent discipline:
- Sleep loop detection (warn at 2, block at 3+)
- Repeated command detection (normalized, warn at 2, block at 3+)
- Same-file multi-edit blocking (threshold 4)
- Re-read soft reminder (not blocking)
- Over-verification detection (3+ consecutive check commands)
- HTTP 200 detection → stop verifying
- 429 rate limit retry with exponential backoff (up to 5 retries)
- Loop detection allows retry after edit (fix-then-retry is not a loop)
- Intercepted/blocked calls don't count toward step limit
- Bash pipe/cat detection with redirect to proper tools
System prompt:
- Restored v1.3.1 proven rules + new additions
- ACT DON'T INSTRUCT / BE CONCISE / ONE SIGNAL IS ENOUGH
- COMMAND DISCIPLINE / ERROR HANDLING sections
- Glob wildcard guidance
- Tech-stack neutral (zero specific tool/language names)
Project context:
- Added pom.xml, build.gradle, requirements.txt, composer.json, CMakeLists.txt to descriptors
- Cross-session context: previous session turns injected into system prompt
- Conversation history loaded on startup (not fresh each session)
- Active services detection: port scanning on startup + URL extraction from bash output
- Frontend hot-reload hint when dev server detected
UX improvements:
- TTFT per LLM call (not cumulative), removed from status bar
- Spinner shows last tool name: "After read_file, thinking..."
- Tool call streaming: shows file_path/command as args stream in
- Turn completion summary: "✻ Completed in N steps, Xs"
- Streaming markdown: trim incomplete backtick/bold tokens
- Pangu spacing (CJK-ASCII)
- Code block styling refresh
- Append input during streaming (Enter sends additional context)
- UTF-8 safe string truncation (char boundary check)
Tooling:
- edit_file: atomic_write retry on rename failure (dev server file locks)
- edit_file: suggested fix on old_string mismatch
- glob: rewritten pattern parser (handles absolute paths, **/ splits)
- LLM request logging to ~/.atomcode/logs/
- Datalog analyzer script (scripts/analyze_datalogs.py) with --deep mode (Claude Code)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| 2 个月前 |
| chore(release): bump version to v4.24.2
Update workspace crates, install scripts, READMEs, docker docs, and site
docs/badges from v4.24.1 to v4.24.2. latest.json intentionally unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| 14 小时前 |
| chore(release): bump version to v4.24.2
Update workspace crates, install scripts, READMEs, docker docs, and site
docs/badges from v4.24.1 to v4.24.2. latest.json intentionally unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| 14 小时前 |
| build: 发布管线集成 webui 前端构建(npm 缺失时回退已提交的 dist)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| 5 天前 |
| build: 发布管线集成 webui 前端构建(npm 缺失时回退已提交的 dist)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| 5 天前 |
| build: 发布管线集成 webui 前端构建(npm 缺失时回退已提交的 dist)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| 5 天前 |
| build: 发布管线集成 webui 前端构建(npm 缺失时回退已提交的 dist)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| 5 天前 |
| build: 发布管线集成 webui 前端构建(npm 缺失时回退已提交的 dist)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| 5 天前 |
| chore: add one-click dev environment setup script
scripts/setup.sh 支持 macOS / Linux,自动安装系统依赖、rustup 工具链、
rustfmt/clippy,可选 --release 构建验证和 --cross 交叉编译 target。
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| 2 个月前 |
| build: add macOS codesign + notarize for atomcode release binary
New scripts/sign-macos.sh:
- codesign with Developer ID (hardened runtime + RFC 3161 timestamp)
- ditto-zip + notarytool submit --wait
- skips atomcode-daemon per project decision (user-facing launcher only)
- preflight checks: identity in keychain, notarytool profile valid
- env overrides for identity, profile, and skip-notarize
release.sh now calls sign-macos.sh on \$DIST before tar.gz packaging,
so the released .tar.gz contains a signed + notarized atomcode binary.
Skip via ATOMCODE_SKIP_SIGN=1.
One-time setup required (per-machine):
xcrun notarytool store-credentials atomcode-notary \\
--apple-id <email> --team-id T949H383MF \\
--password <app-specific-password>
Limitations: tar.gz can't carry a stapled ticket, so Gatekeeper queries
Apple online on first run. For offline-valid tickets, package into .dmg
or .pkg and staple (future work).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| 1 个月前 |
| [共创大赛] Fix test-all warning counting
| 23 天前 |
| feat(headless): 默认静默 + -v / --verbose — Claude Code -p style 干净输出
用户反馈:Claude Code 的 -p 模式输出只有最终回复,干净。AtomCode 之前虽然
把工具日志/tokens 摘要从 stdout 移到了 stderr,但终端默认会同时显示
stdout+stderr,视觉上仍然夹杂 [tool→ ...]、[tokens] ...、[done] ... 噪音。
新默认:
| Event | 默认 | -v |
|------------------------|-------|------|
| TextDelta | stdout| stdout |
| ToolCallStarted/Result | 静默 | stderr |
| TokenUsage | 静默 | stderr |
| TurnComplete 摘要 | 静默* | stderr |
| WorkingDirChanged | 静默 | stderr |
| SubAgentProgress | 静默 | stderr |
| PhaseChange | 静默 | 静默 |
| ApprovalNeeded | stderr| stderr | ← 安全信号必须可见
| Error | stderr| stderr |
| TurnCancelled | stderr| stderr |
(*) TurnComplete 在默认模式下仍补 stdout 末尾换行,只是省略 [done] 摘要
为何 -v 是 opt-in:用户常态使用 -p 都要"干净答案",verbose 是少数 debug
场景。把多数路径设为默认更符合最少惊讶原则。
改动:
- crates/atomcode-cli/src/main.rs:Cli.verbose 字段;run_headless 增加 verbose
参数;6 处 eprintln 改 if verbose
- scripts/test-headless.sh:T3 加 -v;新增 T3b 验证默认 stderr 全空
- docs/headless-pipe-plan.md:追加 §7 verbose addendum
Live verify (--release,real provider):
- atomcode -p "用一句话介绍这个项目"
→ exit 0, stdout: 314 字节最终回复, stderr: 0 字节 ✓
- atomcode -v -p "..."
→ exit 0, stdout: 同上, stderr: 7 行(tool× 4 + tokens + done)✓
回归:
- cargo test -p atomcode --bin atomcode 5/5 PASS
- ./scripts/test-headless.sh T5/T5b PASS, T1/T2/T3/T3b/T4 SKIP(无 provider)
- cargo build 0 warning / 0 error
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| 1 个月前 |
| refactor: 统一 ATOMCODE_HOME 语义,废弃 ATOMCODE_HOME_OVERRIDE
此前 ATOMCODE_HOME 在工程内存在两套互不兼容的语义:
- 语义 A(Config::config_dir):直接把 ATOMCODE_HOME 当 config 根,
即 ATOMCODE_HOME=/X 等价于 ~/.atomcode/;config.toml、history、
memory.md 等都按此路径解析。
- 语义 B(skill/plugin/setup/event_loop):把 ATOMCODE_HOME 当 $HOME
替身,再追加 .atomcode/,即 ATOMCODE_HOME=/X 解析为 /X/.atomcode/。
后果是设了 ATOMCODE_HOME=/X 的用户数据目录会被劈成两半(/X 和
/X/.atomcode 各放一部分),且 uninstall 走另一套独立的
ATOMCODE_HOME_OVERRIDE 变量,自定义过路径的用户运行 uninstall
找不到自己的数据。
本次统一到语义 A,所有目录解析都走 Config::config_dir():
- crates/atomcode-core/src/skill.rs: SkillRegistry::reload 不再
手动拼 .atomcode 子目录
- crates/atomcode-core/src/plugin/paths.rs: plugins_root() 同上
- crates/atomcode-core/src/setup/mod.rs: install_directory_skills_from_seeds
删除双分支逻辑
- crates/atomcode-tuix/src/event_loop/mod.rs: should_auto_show_setup
同上,顺手清理一处多余的重复闭合括号
- crates/atomcode-core/src/uninstall/paths.rs: atomcode_dir() 切到
Config::config_dir(),废弃独立的 ATOMCODE_HOME_OVERRIDE
- scripts/uninstall.sh / uninstall.ps1: 同步从 ATOMCODE_HOME_OVERRIDE
改读 ATOMCODE_HOME
测试同步更新:uninstall_integration 把 env 从 ATOMCODE_HOME_OVERRIDE
换成 ATOMCODE_HOME 并去掉 .atomcode 子目录;skill 测试里两处期望路径
从 tmp/.atomcode/plugins 改为 tmp/plugins。
验证:
- cargo check -p atomcode-core -p atomcode -p atomcode-tuix 通过
- 6 个 uninstall::paths + plugin::paths 单测通过
- 24 个 skill 单测全过
- plugin_integration 端到端测试通过(ATOMCODE_HOME=tmp 后能正确
扫到 tmp/plugins/.../skills/sk)
- uninstall_integration 3 个测试通过
| 13 天前 |
| refactor: 统一 ATOMCODE_HOME 语义,废弃 ATOMCODE_HOME_OVERRIDE
此前 ATOMCODE_HOME 在工程内存在两套互不兼容的语义:
- 语义 A(Config::config_dir):直接把 ATOMCODE_HOME 当 config 根,
即 ATOMCODE_HOME=/X 等价于 ~/.atomcode/;config.toml、history、
memory.md 等都按此路径解析。
- 语义 B(skill/plugin/setup/event_loop):把 ATOMCODE_HOME 当 $HOME
替身,再追加 .atomcode/,即 ATOMCODE_HOME=/X 解析为 /X/.atomcode/。
后果是设了 ATOMCODE_HOME=/X 的用户数据目录会被劈成两半(/X 和
/X/.atomcode 各放一部分),且 uninstall 走另一套独立的
ATOMCODE_HOME_OVERRIDE 变量,自定义过路径的用户运行 uninstall
找不到自己的数据。
本次统一到语义 A,所有目录解析都走 Config::config_dir():
- crates/atomcode-core/src/skill.rs: SkillRegistry::reload 不再
手动拼 .atomcode 子目录
- crates/atomcode-core/src/plugin/paths.rs: plugins_root() 同上
- crates/atomcode-core/src/setup/mod.rs: install_directory_skills_from_seeds
删除双分支逻辑
- crates/atomcode-tuix/src/event_loop/mod.rs: should_auto_show_setup
同上,顺手清理一处多余的重复闭合括号
- crates/atomcode-core/src/uninstall/paths.rs: atomcode_dir() 切到
Config::config_dir(),废弃独立的 ATOMCODE_HOME_OVERRIDE
- scripts/uninstall.sh / uninstall.ps1: 同步从 ATOMCODE_HOME_OVERRIDE
改读 ATOMCODE_HOME
测试同步更新:uninstall_integration 把 env 从 ATOMCODE_HOME_OVERRIDE
换成 ATOMCODE_HOME 并去掉 .atomcode 子目录;skill 测试里两处期望路径
从 tmp/.atomcode/plugins 改为 tmp/plugins。
验证:
- cargo check -p atomcode-core -p atomcode -p atomcode-tuix 通过
- 6 个 uninstall::paths + plugin::paths 单测通过
- 24 个 skill 单测全过
- plugin_integration 端到端测试通过(ATOMCODE_HOME=tmp 后能正确
扫到 tmp/plugins/.../skills/sk)
- uninstall_integration 3 个测试通过
| 13 天前 |