Repository navigation
feat: 完善原生 CLI alpha、恢复安全和交付验证 - #11
Merged
Merged
Conversation
This was referenced Oct 11, 2026
Merged
Merged
ZhuLinsen
marked this pull request as ready for review
October 11, 2026 13:37
This was referenced Oct 11, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
默认 CLI 切换到原生 Harness,并完成审查发现的恢复安全、执行状态、Skill、首页文档和交付验证补改。本 PR 交付 0.2.0a1 的可审查版本,不声明稳定 v0.3 或原计划全部验收完成。
行为变化与修复
验证
本地 Windows/Python 3.12:249 passed, 3 live cases deselected。另经 Anspire 的 qwen3.5-flash、deepseek-v4-flash 各通过 3 项真实普通/工具/流式测试,Qwen 真实 read → edit → bash Demo 通过且测试文件未变。SDK:any-llm-sdk 1.33.0 / OpenAI 2.44.0(开发锁)。
OpenAI、DeepSeek、DashScope/Qwen、Anthropic 原生 SDK 使用本地 HTTP 测试完成两轮工具协议;这是离线测试,不是实际远端兼容声明。
Ruff F checks、compileall、锁定生产依赖 pip-audit(无已知漏洞)、wheel/sdist 构建和不安装可选扩展的独立 wheel 验证通过。
最新提交 fccd011 的全部八项检查已通过(Windows/Linux × Python 3.11/3.12):
fix: 修复 CLI 重复消息并建立跨平台基线 #6~feat: 接入官方 MCP 并恢复 Skill 工具视图 #10 各自四组回归检查已通过,六个 PR 均为 Ready for review。
复现:python -m pytest tests -q;uv build;python scripts/minimal_install_smoke.py;python scripts/source_stats.py。
规模与未完成验收
前一版 4784 → 当前 4770 行;对本项 base,4580 → 4770 行。四文件核心 521 行;含 Policy/默认工具插件/Session 的运行机制 823 行;全部官方 Python 4770 行(含注释/空行,不含测试/示例/第三方依赖)。
2000~2800 总行数目标仍未达到:保留 Legacy、基础工具、旧解析器及扩展兼容,后续需要明确迁移再删除。
本轮补齐 Anspire 网关的两模型普通/工具/流式验收和隔离小型编程 Demo;不等同于原厂 Provider 接口验收或大型真实仓库任务。独立 wheel 69,643 bytes;含依赖 site-packages 32.2 MiB;CLI --help 五次中位数 0.2128 秒。缓存安装 0.8385 秒,不宣称前后性能改善。原厂 DeepSeek/Qwen/Claude 验收和同机 baseline 对比仍待完成。详见 docs/acceptance-2026-10-11.md、docs/legacy-migration.md。动态依赖恢复、长期 Memory、Streamable HTTP 与交互插件管理继续暂缓。
兼容、风险与回滚
Python >=3.11;默认 CLI 变更,旧教学入口 miniagent --legacy,基础/系统工具需 miniagent[legacy]。模型必须显式配置,不再根据密钥/API 地址猜模型;未配置时退出码 2。新文件错误结果带 isError,敏感文件保护可显式 opt-in。新增配置与行为已同步 .env.example、运行指南、CHANGELOG 和两份 README。
本项为 6/6,base 为 codex/lean-05-mcp-skills;已 merge 同步 #10 路由修复及前序 CI。
合入顺序 #6 → #7 → #8 → #9 → #10 → #11;中间 PR 是迁移步骤,不单独作为稳定发布。优先 merge commit;squash 时需重设后续 base 并复核 diff。
回滚本项可恢复旧默认 CLI,但需保留会话数据;若回滚整组,逆序 revert #11 → #6。未创建 tag、未合并 main。