agent-cli-Mrzhou300 0.2.1__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 (102) hide show
  1. agent_cli_mrzhou300-0.2.1/.github/workflows/cd.yml +79 -0
  2. agent_cli_mrzhou300-0.2.1/.github/workflows/ci.yml +132 -0
  3. agent_cli_mrzhou300-0.2.1/.gitignore +34 -0
  4. agent_cli_mrzhou300-0.2.1/.pre-commit-config.yaml +66 -0
  5. agent_cli_mrzhou300-0.2.1/.vscode/extensions.json +5 -0
  6. agent_cli_mrzhou300-0.2.1/.vscode/settings.json +7 -0
  7. agent_cli_mrzhou300-0.2.1/CHANGELOG.md +41 -0
  8. agent_cli_mrzhou300-0.2.1/DEVELOPMENT_SPECIFICATION.md +1355 -0
  9. agent_cli_mrzhou300-0.2.1/LICENSE +21 -0
  10. agent_cli_mrzhou300-0.2.1/PKG-INFO +379 -0
  11. agent_cli_mrzhou300-0.2.1/README.md +352 -0
  12. agent_cli_mrzhou300-0.2.1/docs/architecture.md +439 -0
  13. agent_cli_mrzhou300-0.2.1/docs/examples/basic-qa.md +105 -0
  14. agent_cli_mrzhou300-0.2.1/docs/examples/multi-agent.md +95 -0
  15. agent_cli_mrzhou300-0.2.1/docs/modules.md +762 -0
  16. agent_cli_mrzhou300-0.2.1/examples/demo_basic.py +58 -0
  17. agent_cli_mrzhou300-0.2.1/pyproject.toml +83 -0
  18. agent_cli_mrzhou300-0.2.1/src/agent_cli/__init__.py +2 -0
  19. agent_cli_mrzhou300-0.2.1/src/agent_cli/compact/__init__.py +1 -0
  20. agent_cli_mrzhou300-0.2.1/src/agent_cli/compact/pipeline.py +347 -0
  21. agent_cli_mrzhou300-0.2.1/src/agent_cli/config.py +178 -0
  22. agent_cli_mrzhou300-0.2.1/src/agent_cli/core/__init__.py +0 -0
  23. agent_cli_mrzhou300-0.2.1/src/agent_cli/core/executor.py +65 -0
  24. agent_cli_mrzhou300-0.2.1/src/agent_cli/core/loop.py +190 -0
  25. agent_cli_mrzhou300-0.2.1/src/agent_cli/core/provider.py +746 -0
  26. agent_cli_mrzhou300-0.2.1/src/agent_cli/hooks/__init__.py +0 -0
  27. agent_cli_mrzhou300-0.2.1/src/agent_cli/hooks/manager.py +97 -0
  28. agent_cli_mrzhou300-0.2.1/src/agent_cli/main.py +1284 -0
  29. agent_cli_mrzhou300-0.2.1/src/agent_cli/mcp/__init__.py +6 -0
  30. agent_cli_mrzhou300-0.2.1/src/agent_cli/mcp/bridge.py +370 -0
  31. agent_cli_mrzhou300-0.2.1/src/agent_cli/mcp/models.py +60 -0
  32. agent_cli_mrzhou300-0.2.1/src/agent_cli/memory/__init__.py +1 -0
  33. agent_cli_mrzhou300-0.2.1/src/agent_cli/memory/file_memory.py +357 -0
  34. agent_cli_mrzhou300-0.2.1/src/agent_cli/memory/manager.py +103 -0
  35. agent_cli_mrzhou300-0.2.1/src/agent_cli/memory/project_memory.py +130 -0
  36. agent_cli_mrzhou300-0.2.1/src/agent_cli/memory/session_memory.py +118 -0
  37. agent_cli_mrzhou300-0.2.1/src/agent_cli/monitor/__init__.py +6 -0
  38. agent_cli_mrzhou300-0.2.1/src/agent_cli/monitor/alerts.py +201 -0
  39. agent_cli_mrzhou300-0.2.1/src/agent_cli/monitor/metrics.py +197 -0
  40. agent_cli_mrzhou300-0.2.1/src/agent_cli/permissions/__init__.py +0 -0
  41. agent_cli_mrzhou300-0.2.1/src/agent_cli/permissions/engine.py +163 -0
  42. agent_cli_mrzhou300-0.2.1/src/agent_cli/permissions/hook.py +155 -0
  43. agent_cli_mrzhou300-0.2.1/src/agent_cli/planning/__init__.py +6 -0
  44. agent_cli_mrzhou300-0.2.1/src/agent_cli/planning/models.py +141 -0
  45. agent_cli_mrzhou300-0.2.1/src/agent_cli/planning/planner.py +287 -0
  46. agent_cli_mrzhou300-0.2.1/src/agent_cli/py.typed +0 -0
  47. agent_cli_mrzhou300-0.2.1/src/agent_cli/session/__init__.py +0 -0
  48. agent_cli_mrzhou300-0.2.1/src/agent_cli/session/store.py +206 -0
  49. agent_cli_mrzhou300-0.2.1/src/agent_cli/skills/__init__.py +6 -0
  50. agent_cli_mrzhou300-0.2.1/src/agent_cli/skills/loader.py +255 -0
  51. agent_cli_mrzhou300-0.2.1/src/agent_cli/skills/models.py +44 -0
  52. agent_cli_mrzhou300-0.2.1/src/agent_cli/subagent/__init__.py +5 -0
  53. agent_cli_mrzhou300-0.2.1/src/agent_cli/subagent/manager.py +260 -0
  54. agent_cli_mrzhou300-0.2.1/src/agent_cli/swarm/__init__.py +5 -0
  55. agent_cli_mrzhou300-0.2.1/src/agent_cli/swarm/coordinator.py +443 -0
  56. agent_cli_mrzhou300-0.2.1/src/agent_cli/tools/__init__.py +0 -0
  57. agent_cli_mrzhou300-0.2.1/src/agent_cli/tools/agent_tool.py +65 -0
  58. agent_cli_mrzhou300-0.2.1/src/agent_cli/tools/base.py +100 -0
  59. agent_cli_mrzhou300-0.2.1/src/agent_cli/tools/bash.py +138 -0
  60. agent_cli_mrzhou300-0.2.1/src/agent_cli/tools/file.py +330 -0
  61. agent_cli_mrzhou300-0.2.1/src/agent_cli/tools/registry.py +84 -0
  62. agent_cli_mrzhou300-0.2.1/src/agent_cli/tools/web.py +83 -0
  63. agent_cli_mrzhou300-0.2.1/src/agent_cli/ui/__init__.py +0 -0
  64. agent_cli_mrzhou300-0.2.1/src/agent_cli/ui/renderer.py +58 -0
  65. agent_cli_mrzhou300-0.2.1/src/agent_cli/ui/repl.py +332 -0
  66. agent_cli_mrzhou300-0.2.1/tests/conftest.py +39 -0
  67. agent_cli_mrzhou300-0.2.1/tests/integration/__init__.py +1 -0
  68. agent_cli_mrzhou300-0.2.1/tests/integration/cassettes/deepseek-stream.yaml +99 -0
  69. agent_cli_mrzhou300-0.2.1/tests/integration/cassettes/deepseek-system.yaml +57 -0
  70. agent_cli_mrzhou300-0.2.1/tests/integration/cassettes/deepseek-text.yaml +58 -0
  71. agent_cli_mrzhou300-0.2.1/tests/integration/conftest.py +59 -0
  72. agent_cli_mrzhou300-0.2.1/tests/integration/test_provider_deepseek.py +84 -0
  73. agent_cli_mrzhou300-0.2.1/tests/test_benchmark.py +243 -0
  74. agent_cli_mrzhou300-0.2.1/tests/test_compact.py +133 -0
  75. agent_cli_mrzhou300-0.2.1/tests/test_compact_deep.py +337 -0
  76. agent_cli_mrzhou300-0.2.1/tests/test_config.py +191 -0
  77. agent_cli_mrzhou300-0.2.1/tests/test_executor.py +131 -0
  78. agent_cli_mrzhou300-0.2.1/tests/test_hooks.py +89 -0
  79. agent_cli_mrzhou300-0.2.1/tests/test_loop.py +131 -0
  80. agent_cli_mrzhou300-0.2.1/tests/test_main.py +1100 -0
  81. agent_cli_mrzhou300-0.2.1/tests/test_mcp.py +134 -0
  82. agent_cli_mrzhou300-0.2.1/tests/test_mcp_deep.py +721 -0
  83. agent_cli_mrzhou300-0.2.1/tests/test_memory.py +385 -0
  84. agent_cli_mrzhou300-0.2.1/tests/test_monitor.py +226 -0
  85. agent_cli_mrzhou300-0.2.1/tests/test_permission_hook.py +240 -0
  86. agent_cli_mrzhou300-0.2.1/tests/test_permissions.py +140 -0
  87. agent_cli_mrzhou300-0.2.1/tests/test_planning.py +247 -0
  88. agent_cli_mrzhou300-0.2.1/tests/test_provider.py +1214 -0
  89. agent_cli_mrzhou300-0.2.1/tests/test_renderer.py +125 -0
  90. agent_cli_mrzhou300-0.2.1/tests/test_repl.py +454 -0
  91. agent_cli_mrzhou300-0.2.1/tests/test_session.py +158 -0
  92. agent_cli_mrzhou300-0.2.1/tests/test_session_memory.py +110 -0
  93. agent_cli_mrzhou300-0.2.1/tests/test_skills.py +312 -0
  94. agent_cli_mrzhou300-0.2.1/tests/test_subagent.py +375 -0
  95. agent_cli_mrzhou300-0.2.1/tests/test_swarm.py +204 -0
  96. agent_cli_mrzhou300-0.2.1/tests/test_tools/__init__.py +0 -0
  97. agent_cli_mrzhou300-0.2.1/tests/test_tools/test_agent_tool.py +104 -0
  98. agent_cli_mrzhou300-0.2.1/tests/test_tools/test_bash.py +193 -0
  99. agent_cli_mrzhou300-0.2.1/tests/test_tools/test_file.py +383 -0
  100. agent_cli_mrzhou300-0.2.1/tests/test_tools/test_registry.py +76 -0
  101. agent_cli_mrzhou300-0.2.1/tests/test_tools/test_web.py +159 -0
  102. agent_cli_mrzhou300-0.2.1/uv.lock +884 -0
@@ -0,0 +1,79 @@
1
+ # =============================================================================
2
+ # CD(持续部署)workflow
3
+ #
4
+ # 功能:当你发布新版本(打 git tag)时,自动构建并发布到 PyPI
5
+ # 触发条件:推送 v 开头的标签,如 v0.1.0, v0.2.0, v1.0.0
6
+ # 依赖:需要在 GitHub 仓库设置 PYPI_API_TOKEN 密钥
7
+ # =============================================================================
8
+
9
+ name: CD
10
+
11
+ # ── 触发条件 ────────────────────────────────────────────────────────────────
12
+ # 只有推送 "v" 开头的 git tag 时才触发
13
+ # 比如: git tag v0.2.0 && git push origin v0.2.0
14
+ on:
15
+ push:
16
+ tags:
17
+ - "v*" # v0.1.0, v0.2.0, v1.0.0 等
18
+
19
+ env:
20
+ PYTHON_VERSION: "3.12"
21
+
22
+ jobs:
23
+ # ──── 发布到 PyPI ──────────────────────────────────────────────────────────
24
+ publish:
25
+ name: "📦 发布到 PyPI"
26
+ runs-on: ubuntu-latest
27
+ # permissions: 声明这个 job 需要的权限
28
+ # 这里是创建 Release 需要的
29
+ permissions:
30
+ contents: write
31
+ id-token: write
32
+
33
+ steps:
34
+ - uses: actions/checkout@v6.0.3
35
+
36
+ - name: "🐍 安装 Python ${{ env.PYTHON_VERSION }}"
37
+ uses: actions/setup-python@v6.2.0
38
+ with:
39
+ python-version: "${{ env.PYTHON_VERSION }}"
40
+
41
+ - name: "📦 安装 uv"
42
+ uses: astral-sh/setup-uv@v8.2.0
43
+
44
+ - name: "🔧 安装依赖"
45
+ run: uv sync
46
+
47
+ # ── 步骤 A: 构建发布包 ──────────────────────────────────────────────
48
+ # uv build 会生成 .tar.gz(源码包)和 .whl(wheel 包)
49
+ # 它们会放在 dist/ 目录下
50
+ - name: "🏗️ 构建发布包"
51
+ run: uv build
52
+
53
+ # ── 步骤 B: 发布到 PyPI ──────────────────────────────────────────────
54
+ # 使用 PyPI 官方提供的"可信发布"(Trusted Publishing)机制
55
+ # 不需要用户名密码,只需要在 PyPI 上配置好 GitHub 仓库的信任关系
56
+ #
57
+ # 💡 前置操作(只需做一次):
58
+ # 1. 登录 https://pypi.org/manage/account/publishing/
59
+ # 2. 添加一个"可信发布者"(Trusted Publisher)
60
+ # - PyPI 项目名: agent-cli-Mrzhou300(和 pyproject.toml 里一致)
61
+ # - GitHub 用户名: <你的 GitHub 用户名>
62
+ # - GitHub 仓库名: agent-cli
63
+ # - 工作流名称: cd.yml(就是这个文件)
64
+ # 3. 完成!以后每次打 tag 就自动发布了
65
+ - name: "🚀 发布到 PyPI"
66
+ # 固定到 v1.14.0 而不是 release/v1,避免缓存问题导致 OIDC 失败
67
+ uses: pypa/gh-action-pypi-publish@v1.14.0
68
+
69
+ # ── 步骤 C: 在 GitHub 上创建 Release ──────────────────────────────────
70
+ # 这样在 GitHub 仓库的 Releases 页面能看到发布记录
71
+ - name: "📝 创建 GitHub Release"
72
+ uses: softprops/action-gh-release@v2
73
+ with:
74
+ # 使用 git tag 作为 release 标题
75
+ name: "v${{ github.ref_name }}"
76
+ # 自动从 tag 名生成 release 说明
77
+ generate_release_notes: true
78
+ # 把构建好的包附加上去
79
+ files: dist/*
@@ -0,0 +1,132 @@
1
+ # =============================================================================
2
+ # CI(持续集成)workflow
3
+ #
4
+ # 功能:每次推送代码或提 PR 时,自动执行 测试 + 代码风格检查
5
+ # 触发条件:push(推送)或 pull_request(PR)
6
+ # 运行环境:GitHub 提供的 Ubuntu 服务器(每次启动都是全新的)
7
+ # =============================================================================
8
+
9
+ # workflow 的名字,会显示在 GitHub 仓库的 Actions 标签页里
10
+ name: CI
11
+
12
+ # ── 触发条件 ────────────────────────────────────────────────────────────────
13
+ # 什么时候自动运行这个 workflow
14
+ on:
15
+ # 推送代码到任意分支时触发
16
+ push:
17
+ branches: ["*"] # 所有分支
18
+ # 创建 PR 到 main 分支时触发
19
+ pull_request:
20
+ branches: ["main"] # 只监听 PR → main
21
+
22
+ # ── 环境变量(全局) ─────────────────────────────────────────────────────────
23
+ # 这些变量在整个 workflow 的所有 job 中都可以用
24
+ env:
25
+ PYTHON_VERSION: "3.12" # Python 版本(项目要求 >=3.12)
26
+
27
+ # ── Jobs(工作单元) ─────────────────────────────────────────────────────────
28
+ # 一个 workflow 可以包含多个 job,它们默认并行执行
29
+ jobs:
30
+
31
+ # ──── Job 1: 测试 ──────────────────────────────────────────────────────────
32
+ test:
33
+ # job 的名称(显示在 GitHub 界面上的名字)
34
+ name: "Test & Lint"
35
+ # 运行环境:Ubuntu 最新版
36
+ runs-on: ubuntu-latest
37
+
38
+ # steps:这个 job 要依次执行的步骤
39
+ # 注意:steps 是顺序执行的,上一步失败就停止
40
+ steps:
41
+ # Step 1: 拉取你的代码
42
+ # actions/checkout 是 GitHub 官方提供的"动作"(Action)
43
+ # 相当于 git clone 你的仓库到 CI 服务器上
44
+ - name: "📥 拉取代码"
45
+ # v6.0.3 — Node 24 兼容,GitHub 自 2026-06-02 起默认运行 Node 24
46
+ uses: actions/checkout@v6.0.3
47
+
48
+ # Step 2: 安装 Python
49
+ # actions/setup-python 是 GitHub 官方 Action
50
+ # 在 Ubuntu 上安装指定版本的 Python
51
+ - name: "🐍 安装 Python ${{ env.PYTHON_VERSION }}"
52
+ uses: actions/setup-python@v6.2.0
53
+ with:
54
+ python-version: "${{ env.PYTHON_VERSION }}"
55
+
56
+ # Step 3: 安装 uv(Python 包管理工具)
57
+ # astral-sh/setup-uv 是 uv 官方提供的 Action
58
+ # ⚠️ 注意:这个项目用 uv 管理依赖,不是 pip
59
+ - name: "📦 安装 uv"
60
+ uses: astral-sh/setup-uv@v8.2.0
61
+
62
+ # Step 4: 调试步骤 — 确认当前目录和文件结构
63
+ # 如果 CI 报错说找不到文件,这个步骤会显示当前目录的内容
64
+ - name: "📂 查看工作目录"
65
+ run: |
66
+ echo "当前目录: $(pwd)"
67
+ echo "文件列表:"
68
+ ls -la
69
+
70
+ # Step 5: 安装项目依赖
71
+ # uv sync 等效于 pip install -r requirements.txt
72
+ # 它读取 pyproject.toml,安装所有依赖(包括 dev 依赖)
73
+ - name: "🔧 安装依赖"
74
+ run: uv sync
75
+
76
+ # Step 6: 运行 ruff 代码检查
77
+ # ruff check 检查代码风格问题(替代 flake8 + isort)
78
+ - name: "🔍 Ruff 代码检查"
79
+ run: uv run ruff check src/ tests/
80
+
81
+ # Step 7: 检查 ruff 格式
82
+ # ruff format --check 只检查格式是否正确,不修改文件
83
+ # 如果格式不正确,这里会报错 ❌
84
+ - name: "🎨 Ruff 格式检查"
85
+ run: uv run ruff format src/ tests/ --check
86
+
87
+ # Step 8: 运行 pytest 单元测试
88
+ # --cov=agent_cli 测量核心代码的测试覆盖率
89
+ # --cov-report=term 在终端输出覆盖率报告
90
+ # --cov-fail-under=80 覆盖率低于 80% 时 CI 失败(低于当前 87% 的保守阈值)
91
+ - name: "🧪 运行测试"
92
+ run: uv run pytest tests/ -v --cov=agent_cli --cov-report=term --cov-fail-under=80
93
+
94
+ # Step 9: mypy 静态类型检查(非阻塞,仅供参考)
95
+ # ⚠️ continue-on-error 表示这个步骤失败不会导致整个 workflow 变红
96
+ # 目前项目对核心模块(agent_cli.core.*)启用了 disallow_untyped_defs
97
+ - name: "📝 Mypy 类型检查"
98
+ continue-on-error: true
99
+ run: uv run mypy src/ || true
100
+
101
+ # ──── Job 2: 构建检查(验证包能正常构建) ────────────────────────────────
102
+ build-check:
103
+ name: "📦 构建验证"
104
+ runs-on: ubuntu-latest
105
+ # needs: 这个 job 依赖于 test job 成功
106
+ # 只有 test 通过后才会执行(但 parallelism 可以不需要)
107
+ needs: [test]
108
+
109
+ steps:
110
+ - uses: actions/checkout@v6.0.3
111
+ - uses: actions/setup-python@v6.2.0
112
+ with:
113
+ python-version: "${{ env.PYTHON_VERSION }}"
114
+ - uses: astral-sh/setup-uv@v8.2.0
115
+
116
+ - name: "📂 查看工作目录"
117
+ run: |
118
+ echo "当前目录: $(pwd)"
119
+ echo "文件列表:"
120
+ ls -la
121
+
122
+ - name: "🔧 安装依赖"
123
+ run: uv sync
124
+
125
+ # 构建 wheel 包
126
+ # 生成的包在 dist/ 目录下
127
+ - name: "🏗️ 构建包"
128
+ run: uv build
129
+
130
+ # 验证构建的包可以正确安装
131
+ - name: "✅ 验证包可安装"
132
+ run: uv pip install dist/*.whl --force-reinstall
@@ -0,0 +1,34 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .pytest_cache/
8
+ .ruff_cache/
9
+
10
+ # 覆盖率数据
11
+ .coverage
12
+ htmlcov/
13
+
14
+ # 运行时数据(Claude 等工作目录,不上传)
15
+ .agent/
16
+ .claude/
17
+
18
+ # 环境变量
19
+ .env
20
+ .env.local
21
+
22
+ # IDE
23
+ .vscode/*
24
+ !.vscode/extensions.json
25
+ !.vscode/settings.json
26
+ .idea/
27
+
28
+ # 系统
29
+ .DS_Store
30
+ Thumbs.db
31
+
32
+ # 虚拟环境
33
+ .venv/
34
+ venv/
@@ -0,0 +1,66 @@
1
+ # =============================================================================
2
+ # pre-commit 本地钩子配置
3
+ #
4
+ # 功能:在 `git commit` 之前自动运行代码检查
5
+ # 如果检查不通过,commit 会被阻止
6
+ # 价值:在代码到达 GitHub 之前就发现问题,不用等 CI 报错
7
+ #
8
+ # 安装方法:
9
+ # 1. 安装 pre-commit: pip install pre-commit
10
+ # 2. 安装钩子: pre-commit install
11
+ # 3. 手动运行: pre-commit run --all-files
12
+ #
13
+ # 前置条件:
14
+ # Python 3.12+
15
+ # pre-commit: pip install pre-commit 或 uv pip install pre-commit
16
+ # =============================================================================
17
+
18
+ repos:
19
+ # ── 通用检查 ──────────────────────────────────────────────────────────
20
+ - repo: https://github.com/pre-commit/pre-commit-hooks
21
+ rev: v4.6.0
22
+ hooks:
23
+ # 检查是否有合并冲突标记(<<<<<<<, =======, >>>>>>>)
24
+ - id: check-merge-conflict
25
+ # 检查 YAML 文件语法是否正确
26
+ - id: check-yaml
27
+ # 检查 JSON 文件语法是否正确
28
+ - id: check-json
29
+ # 检查文件末尾是否有多余的空行
30
+ - id: trailing-whitespace
31
+ # 检查文件末尾是否有且仅有一个换行符
32
+ - id: end-of-file-fixer
33
+
34
+ # ── Ruff(代码风格 + 格式化) ─────────────────────────────────────────
35
+ - repo: https://github.com/astral-sh/ruff-pre-commit
36
+ rev: v0.15.16
37
+ hooks:
38
+ # ruff check: 代码质量检查(lint)
39
+ - id: ruff
40
+ args: [--fix] # 能自动修的顺手修掉
41
+ # ruff format: 代码格式化
42
+ - id: ruff-format
43
+
44
+ # ── pytest: 测试 ──────────────────────────────────────────
45
+ # 确保所有测试通过后才允许提交
46
+ # 与 CI 使用相同的命令,前置发现问题
47
+ - repo: local
48
+ hooks:
49
+ - id: pytest
50
+ name: 🧪 pytest
51
+ description: "运行所有测试,阻止提交失败的测试"
52
+ entry: uv run pytest tests/ -x --tb=short -q
53
+ language: system
54
+ pass_filenames: false
55
+ always_run: true
56
+ # 超时 120 秒——本地通常比 CI 快
57
+ args: []
58
+
59
+ # ── mypy: 类型检查 ───────────────────────────────────────────
60
+ - repo: https://github.com/pre-commit/mirrors-mypy
61
+ rev: v1.14.1
62
+ hooks:
63
+ - id: mypy
64
+ args: [--no-strict-optional, --ignore-missing-imports, --python-version=3.12, src/agent_cli/]
65
+ additional_dependencies: ['types-requests']
66
+ pass_filenames: false # 使用固定路径而非单个文件
@@ -0,0 +1,5 @@
1
+ {
2
+ "recommendations": [
3
+ "github.vscode-github-actions"
4
+ ]
5
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "github-actions.autoShowWorkflowFileContent": true,
3
+ "github-actions.workflowPath": ".github/workflows",
4
+ "yaml.schemas": {
5
+ "https://json.schemastore.org/github-workflow.json": ".github/workflows/*.yml"
6
+ }
7
+ }
@@ -0,0 +1,41 @@
1
+ # Changelog
2
+
3
+ ## [0.2.0] — 2026-06-11
4
+
5
+ ### Added
6
+ - **集成测试**:首次引入 VCR 录制/回放集成测试,5 个 DeepSeek 真实模型测试用例(`tests/integration/`)
7
+ - **CLI E2E 测试**:补齐 `run` 命令 7 个 + `swarm` 命令 7 个 CliRunner 测试用例
8
+ - **多模型切换**:`--provider` / `--api-key` / `--base-url` CLI 参数,支持 auto / anthropic / compatible / mock 四种模式
9
+ - **兼容 API 支持**:`CompatibleProvider` 支持 DeepSeek、OpenAI 等兼容 API,含 SSE 流式输出
10
+ - **技能系统**:双模式触发(自动上下文匹配 + `/skill` 命令),技能文件按需注入系统消息
11
+ - **上下文压缩**:L1-L4 四层渐进式压缩,前三层零 API 成本
12
+ - **多 Agent 协作**:Coordinator 模式 — 顺序 / 并行 / 投票 / 辩论四种编排
13
+ - **子 Agent 系统**:独立上下文 + 共享工具集 + 结构化结果
14
+ - **Hook 系统**:PRE_LOOP / POST_LOOP / PRE_TOOL / POST_TOOL 四个生命周期点
15
+ - **监控告警**:P0-P3 四级告警 + 工具调用统计 + Token 追踪
16
+ - **MCP Bridge**:JSON-RPC over stdio 外部工具协议
17
+
18
+ ### Changed
19
+ - 测试覆盖率从 46% → 90%(582 测试通过)
20
+ - README 更新为 v0.2.0 文档
21
+ - 完善架构详解(`docs/architecture.md`)和模块详解(`docs/modules.md`)
22
+
23
+ ### Fixed
24
+ - pre-commit ruff 版本与 CI 同步(v0.5.0 → v0.15.16)
25
+ - 19 个测试文件的 import 排序问题
26
+ - CompactPipeline provider 参数传递
27
+
28
+ ## [0.1.0] — 2026-06-10
29
+
30
+ ### Added
31
+ - 完整项目框架初始提交
32
+ - CI/CD workflow 和 pre-commit 配置
33
+ - 核心 Agent Loop(~60 行)
34
+ - Provider 抽象层(Mock / Anthropic / Compatible)
35
+ - 8+ 内置工具(Bash / Read / Write / Edit / Glob / Grep / WebFetch / Agent)
36
+ - 四级权限管理(Allow / Deny / Ask / Always_Ask)
37
+ - 三级记忆架构(文件级 + 会话级 + 项目级)
38
+ - JSONL 会话持久化(`--resume` 恢复,关键词搜索,自动归档)
39
+ - REPL 交互模式(含 12+ 内置命令)
40
+ - 任务规划与审批闭环(TodoItem 状态机 + 拓扑排序依赖)
41
+ - 测试覆盖 46%(339 测试用例)