ata-coder 2.4.2__tar.gz → 2.4.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. {ata_coder-2.4.2 → ata_coder-2.4.4}/PKG-INFO +43 -3
  2. ata_coder-2.4.2/ata_coder.egg-info/PKG-INFO → ata_coder-2.4.4/README.md +816 -799
  3. {ata_coder-2.4.2 → ata_coder-2.4.4}/agent.py +27 -12
  4. {ata_coder-2.4.2 → ata_coder-2.4.4}/agent_compact.py +31 -26
  5. {ata_coder-2.4.2 → ata_coder-2.4.4}/agent_tools.py +17 -21
  6. {ata_coder-2.4.2 → ata_coder-2.4.4}/anthropic_client.py +13 -17
  7. ata_coder-2.4.2/README.md → ata_coder-2.4.4/ata_coder.egg-info/PKG-INFO +839 -776
  8. {ata_coder-2.4.2 → ata_coder-2.4.4}/ata_coder.egg-info/SOURCES.txt +6 -0
  9. {ata_coder-2.4.2 → ata_coder-2.4.4}/commands/_core.py +65 -0
  10. {ata_coder-2.4.2 → ata_coder-2.4.4}/config.py +20 -2
  11. {ata_coder-2.4.2 → ata_coder-2.4.4}/core/__init__.py +4 -1
  12. {ata_coder-2.4.2 → ata_coder-2.4.4}/core/events.py +6 -0
  13. ata_coder-2.4.4/core/state.py +40 -0
  14. {ata_coder-2.4.2 → ata_coder-2.4.4}/git_workflow.py +9 -7
  15. {ata_coder-2.4.2 → ata_coder-2.4.4}/llm_client.py +17 -29
  16. {ata_coder-2.4.2 → ata_coder-2.4.4}/main.py +13 -10
  17. {ata_coder-2.4.2 → ata_coder-2.4.4}/mcp_client.py +25 -3
  18. {ata_coder-2.4.2 → ata_coder-2.4.4}/memory.py +284 -34
  19. {ata_coder-2.4.2 → ata_coder-2.4.4}/privilege.py +7 -1
  20. {ata_coder-2.4.2 → ata_coder-2.4.4}/pyproject.toml +1 -1
  21. {ata_coder-2.4.2 → ata_coder-2.4.4}/repl_ui.py +14 -1
  22. {ata_coder-2.4.2 → ata_coder-2.4.4}/safety_guard.py +47 -32
  23. {ata_coder-2.4.2 → ata_coder-2.4.4}/server.py +235 -48
  24. ata_coder-2.4.4/server_session.py +233 -0
  25. {ata_coder-2.4.2 → ata_coder-2.4.4}/server_shell.py +8 -2
  26. {ata_coder-2.4.2 → ata_coder-2.4.4}/settings.py +139 -2
  27. {ata_coder-2.4.2 → ata_coder-2.4.4}/setup_wizard.py +137 -136
  28. ata_coder-2.4.4/skills/math-calculator/handler.py +206 -0
  29. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/weather-skill/handler.py +2 -1
  30. ata_coder-2.4.4/skills/weather-skill/weather_utils.py +50 -0
  31. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills.py +22 -1
  32. {ata_coder-2.4.2 → ata_coder-2.4.4}/system_prompt_builder.py +2 -6
  33. ata_coder-2.4.4/token_counter.py +217 -0
  34. {ata_coder-2.4.2 → ata_coder-2.4.4}/tools/definitions.py +1 -1
  35. {ata_coder-2.4.2 → ata_coder-2.4.4}/tools/executor.py +103 -28
  36. ata_coder-2.4.4/tools/strategy.py +76 -0
  37. {ata_coder-2.4.2 → ata_coder-2.4.4}/tools/web.py +68 -0
  38. {ata_coder-2.4.2 → ata_coder-2.4.4}/utils.py +7 -4
  39. ata_coder-2.4.2/core/state.py +0 -17
  40. ata_coder-2.4.2/server_session.py +0 -159
  41. ata_coder-2.4.2/skills/math-calculator/handler.py +0 -103
  42. {ata_coder-2.4.2 → ata_coder-2.4.4}/LICENSE +0 -0
  43. {ata_coder-2.4.2 → ata_coder-2.4.4}/MANIFEST.in +0 -0
  44. {ata_coder-2.4.2 → ata_coder-2.4.4}/__init__.py +0 -0
  45. {ata_coder-2.4.2 → ata_coder-2.4.4}/agent_controller.py +0 -0
  46. {ata_coder-2.4.2 → ata_coder-2.4.4}/agent_extension.py +0 -0
  47. {ata_coder-2.4.2 → ata_coder-2.4.4}/agent_routing.py +0 -0
  48. {ata_coder-2.4.2 → ata_coder-2.4.4}/agent_subsystems.py +0 -0
  49. {ata_coder-2.4.2 → ata_coder-2.4.4}/agent_undo.py +0 -0
  50. {ata_coder-2.4.2 → ata_coder-2.4.4}/ata_coder.egg-info/dependency_links.txt +0 -0
  51. {ata_coder-2.4.2 → ata_coder-2.4.4}/ata_coder.egg-info/entry_points.txt +0 -0
  52. {ata_coder-2.4.2 → ata_coder-2.4.4}/ata_coder.egg-info/requires.txt +0 -0
  53. {ata_coder-2.4.2 → ata_coder-2.4.4}/ata_coder.egg-info/top_level.txt +0 -0
  54. {ata_coder-2.4.2 → ata_coder-2.4.4}/change_tracker.py +0 -0
  55. {ata_coder-2.4.2 → ata_coder-2.4.4}/clawd_integration.py +0 -0
  56. {ata_coder-2.4.2 → ata_coder-2.4.4}/commands/__init__.py +0 -0
  57. {ata_coder-2.4.2 → ata_coder-2.4.4}/commands/_safety.py +0 -0
  58. {ata_coder-2.4.2 → ata_coder-2.4.4}/commands/_settings.py +0 -0
  59. {ata_coder-2.4.2 → ata_coder-2.4.4}/commands/_workflow.py +0 -0
  60. {ata_coder-2.4.2 → ata_coder-2.4.4}/core/queue.py +0 -0
  61. {ata_coder-2.4.2 → ata_coder-2.4.4}/event_queue.py +0 -0
  62. {ata_coder-2.4.2 → ata_coder-2.4.4}/extension.py +0 -0
  63. {ata_coder-2.4.2 → ata_coder-2.4.4}/extensions/__init__.py +0 -0
  64. {ata_coder-2.4.2 → ata_coder-2.4.4}/extensions/hello_skill.py +0 -0
  65. {ata_coder-2.4.2 → ata_coder-2.4.4}/fool_proof.py +0 -0
  66. {ata_coder-2.4.2 → ata_coder-2.4.4}/gui.py +0 -0
  67. {ata_coder-2.4.2 → ata_coder-2.4.4}/model_registry.py +0 -0
  68. {ata_coder-2.4.2 → ata_coder-2.4.4}/model_router.py +0 -0
  69. {ata_coder-2.4.2 → ata_coder-2.4.4}/permissions.py +0 -0
  70. {ata_coder-2.4.2 → ata_coder-2.4.4}/project.py +0 -0
  71. {ata_coder-2.4.2 → ata_coder-2.4.4}/prompt_template.py +0 -0
  72. {ata_coder-2.4.2 → ata_coder-2.4.4}/prompts/auto-mode.md +0 -0
  73. {ata_coder-2.4.2 → ata_coder-2.4.4}/prompts/coding-rules.md +0 -0
  74. {ata_coder-2.4.2 → ata_coder-2.4.4}/prompts/execution-guardrails.md +0 -0
  75. {ata_coder-2.4.2 → ata_coder-2.4.4}/prompts/memory-system.md +0 -0
  76. {ata_coder-2.4.2 → ata_coder-2.4.4}/prompts/output-style.md +0 -0
  77. {ata_coder-2.4.2 → ata_coder-2.4.4}/prompts/safety.md +0 -0
  78. {ata_coder-2.4.2 → ata_coder-2.4.4}/prompts/slash-commands.md +0 -0
  79. {ata_coder-2.4.2 → ata_coder-2.4.4}/prompts/sub-agents.md +0 -0
  80. {ata_coder-2.4.2 → ata_coder-2.4.4}/prompts/system-reminders.md +0 -0
  81. {ata_coder-2.4.2 → ata_coder-2.4.4}/prompts/system.md +0 -0
  82. {ata_coder-2.4.2 → ata_coder-2.4.4}/prompts/tool-policy.md +0 -0
  83. {ata_coder-2.4.2 → ata_coder-2.4.4}/repl_theme.py +0 -0
  84. {ata_coder-2.4.2 → ata_coder-2.4.4}/repl_tracker.py +0 -0
  85. {ata_coder-2.4.2 → ata_coder-2.4.4}/self_correct.py +0 -0
  86. {ata_coder-2.4.2 → ata_coder-2.4.4}/session.py +0 -0
  87. {ata_coder-2.4.2 → ata_coder-2.4.4}/setup.cfg +0 -0
  88. {ata_coder-2.4.2 → ata_coder-2.4.4}/skill_extension.py +0 -0
  89. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/architect/SKILL.md +0 -0
  90. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/code-reviewer/SKILL.md +0 -0
  91. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/codecraft/SKILL.md +0 -0
  92. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/debugger/SKILL.md +0 -0
  93. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/doc-writer/SKILL.md +0 -0
  94. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/general-coder/SKILL.md +0 -0
  95. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/math-calculator/README.md +0 -0
  96. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/math-calculator/SKILL.md +0 -0
  97. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/math-calculator/prompts/system.md +0 -0
  98. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/math-calculator/requirements.txt +0 -0
  99. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/math-calculator/resources/constants.json +0 -0
  100. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/math-calculator/tests/test_handler.py +0 -0
  101. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/security-auditor/SKILL.md +0 -0
  102. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/test-writer/SKILL.md +0 -0
  103. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/weather-skill/README.md +0 -0
  104. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/weather-skill/manifest.json +0 -0
  105. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/weather-skill/prompts/system_prompt.txt +0 -0
  106. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/weather-skill/prompts/user_prompt_template.txt +0 -0
  107. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/weather-skill/requirements.txt +0 -0
  108. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/weather-skill/resources/city_list.json +0 -0
  109. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/weather-skill/resources/error_messages.json +0 -0
  110. {ata_coder-2.4.2 → ata_coder-2.4.4}/skills/weather-skill/tests/test_handler.py +0 -0
  111. {ata_coder-2.4.2 → ata_coder-2.4.4}/sub_agent.py +0 -0
  112. {ata_coder-2.4.2 → ata_coder-2.4.4}/sub_agent_manager.py +0 -0
  113. {ata_coder-2.4.2 → ata_coder-2.4.4}/task_planner.py +0 -0
  114. {ata_coder-2.4.2 → ata_coder-2.4.4}/terminal.py +0 -0
  115. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_agent.py +0 -0
  116. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_change_tracker.py +0 -0
  117. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_config.py +0 -0
  118. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_event_queue.py +0 -0
  119. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_extension.py +0 -0
  120. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_fibonacci.py +0 -0
  121. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_fool_proof.py +0 -0
  122. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_llm_client.py +0 -0
  123. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_memory.py +0 -0
  124. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_model_registry.py +0 -0
  125. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_permissions.py +0 -0
  126. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_privilege.py +0 -0
  127. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_prompt_template.py +0 -0
  128. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_safety_guard.py +0 -0
  129. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_server.py +0 -0
  130. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_skill_handlers.py +0 -0
  131. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_sub_agent.py +0 -0
  132. {ata_coder-2.4.2 → ata_coder-2.4.4}/tests/test_tools.py +0 -0
  133. {ata_coder-2.4.2 → ata_coder-2.4.4}/tools/__init__.py +0 -0
  134. {ata_coder-2.4.2 → ata_coder-2.4.4}/tools/result.py +0 -0
  135. {ata_coder-2.4.2 → ata_coder-2.4.4}/tools/subagent.py +0 -0
  136. {ata_coder-2.4.2 → ata_coder-2.4.4}/types.py +0 -0
  137. {ata_coder-2.4.2 → ata_coder-2.4.4}/web/css/style.css +0 -0
  138. {ata_coder-2.4.2 → ata_coder-2.4.4}/web/index.html +0 -0
  139. {ata_coder-2.4.2 → ata_coder-2.4.4}/web/js/app.js +0 -0
  140. {ata_coder-2.4.2 → ata_coder-2.4.4}/web/package-lock.json +0 -0
  141. {ata_coder-2.4.2 → ata_coder-2.4.4}/web/package.json +0 -0
  142. {ata_coder-2.4.2 → ata_coder-2.4.4}/web/tsconfig.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ata-coder
3
- Version: 2.4.2
3
+ Version: 2.4.4
4
4
  Summary: ATA Coder — AI-powered coding assistant
5
5
  Author: ATA Coder Team
6
6
  License-Expression: MIT
@@ -21,13 +21,15 @@ Requires-Dist: pytest-timeout>=2.0; extra == "dev"
21
21
  Requires-Dist: tiktoken>=0.5.0; extra == "dev"
22
22
  Dynamic: license-file
23
23
 
24
- # ATA Coder v2.4.2
24
+ # ATA Coder v2.4.3
25
25
 
26
26
  **AI-powered coding assistant — async, AST-aware, single config file.**
27
27
 
28
28
  [English](#english) | [中文](#中文)
29
29
 
30
- > **v2.4.2** — 🐾 **Clawd working state + Window tokens**: Clawd shows 'working' immediately. Status line shows window tokens (~120k) not cumulative (7.8M). Surrogate-safe session saves.
30
+ > **v2.4.3** — 🧠 **Comprehensive Refactoring**: Memory overhaul, unified token counting, safety pipeline, tool call optimization. 60+ issues fixed.
31
+ >
32
+ > > **v2.4.2** — 🐾 **Clawd working state + Window tokens**: Clawd shows 'working' immediately. Status line shows window tokens (~120k) not cumulative (7.8M). Surrogate-safe session saves.
31
33
  >
32
34
  > > **v2.4.1** — 🗂️ **3-Part Session IDs + /resume**: Session ID: `xxxxxxxx-xxxxxxxx-xxxxxxxx` (workspace·timestamp·task). `/resume` lists sessions for current project folder. Resume by any 8-char hash.
33
35
  >
@@ -49,6 +51,10 @@ Dynamic: license-file
49
51
 
50
52
  ATA Coder is a CLI AI coding assistant compatible with OpenAI and Anthropic APIs. It runs on a **single-threaded asyncio event loop** — no threads, no race conditions, low memory. Features deterministic AST-based code editing, sub-agent pool, MCP support, and a built-in HTTP API server.
51
53
 
54
+ ```bash
55
+ pip install ata-coder
56
+ ```
57
+
52
58
  ### Architecture (v2.3.3)
53
59
 
54
60
  ```
@@ -93,7 +99,12 @@ asyncio Event Loop (single-threaded)
93
99
  ### Quick Start
94
100
 
95
101
  ```bash
102
+ # Install from PyPI (recommended)
103
+ pip install ata-coder
104
+
105
+ # Or install from source (development)
96
106
  pip install -e .
107
+
97
108
  ata # Interactive REPL
98
109
  ata run "Add type hints" # Single task
99
110
  ata server --port 8080 # HTTP API server
@@ -295,6 +306,18 @@ curl -X POST http://localhost:8080/chat \
295
306
  | **Token Budget** | Auto-compact at 200k effective tokens, force-truncate at 95% of 1M max |
296
307
  | **Diff Preview** | `difflib.unified_diff` + Rich colored output before file writes |
297
308
 
309
+ ### 🧠 v2.4.3 Comprehensive Refactoring
310
+
311
+ 60+ issues fixed across 15 files. Memory overhaul, unified token counting, safety pipeline unification.
312
+
313
+ | # | Area | Detail |
314
+ |---|------|--------|
315
+ | 1 | 🧠 **Memory** | Atomic writes, lazy loading, TF-IDF stopwords, cross-memory dedup, `/remember-suggestion` command |
316
+ | 2 | 🔢 **TokenCounter** | NEW unified service — model-aware encoding, per-message cache, batch counting, CJK fallback |
317
+ | 3 | 🛡️ **Safety** | Removed double permission check, self-correct goes through safety pipeline, explicit tool handlers |
318
+ | 4 | ⚡ **Compaction** | Sequential tools batched into single message, `_force_truncate` uses token weight |
319
+ | 5 | 🐛 **Fixes** | File cache invalidation on write, `rename_symbol` method type, system prompt cache on `/remember` |
320
+
298
321
  ### 🐾 v2.4.2 Clawd + Window Tokens Fix
299
322
 
300
323
  | # | Fix | Detail |
@@ -544,7 +567,12 @@ asyncio 事件循环(单线程)
544
567
  ### 快速开始
545
568
 
546
569
  ```bash
570
+ # 从 PyPI 安装(推荐)
571
+ pip install ata-coder
572
+
573
+ # 或从源码安装(开发模式)
547
574
  pip install -e .
575
+
548
576
  ata # 交互模式
549
577
  ata run "添加类型注解" # 单任务
550
578
  ata server --port 8080 # API 服务
@@ -600,6 +628,18 @@ curl -N -X POST http://localhost:8080/chat/stream \
600
628
  -d '{"message": "解释 async/await"}'
601
629
  ```
602
630
 
631
+ ### 🧠 v2.4.3 全面重构
632
+
633
+ 跨 15 个文件修复 60+ 问题。记忆系统重构、统一 Token 计算、安全管道优化、工具调用优化。
634
+
635
+ | # | 领域 | 说明 |
636
+ |---|------|------|
637
+ | 1 | 🧠 **记忆系统** | 原子写入、延迟加载、TF-IDF 停用词过滤、跨记忆去重、`/remember-suggestion` 命令 |
638
+ | 2 | 🔢 **TokenCounter** | 新建统一服务 — 模型感知编码、消息缓存、批量计数、CJK 回退 |
639
+ | 3 | 🛡️ **安全管道** | 移除双重权限检查、自校正走完整安全管道、显式工具处理器注册 |
640
+ | 4 | ⚡ **压缩优化** | 顺序工具调用合并为单条消息、`_force_truncate` 按 token 权重截断 |
641
+ | 5 | 🐛 **Bug 修复** | 写入后文件缓存立即失效、`rename_symbol` method 类型、`/remember` 刷新提示缓存 |
642
+
603
643
  ### 🐾 v2.4.2 Clawd + 窗口 Token 修复
604
644
 
605
645
  | # | 修复 | 说明 |