Zhengshou Lai
3d840a1ca3
fix(provider): _ProviderGroup 自定义 invoke 支持 invoke_without_command + 选项后置解析
...
Click 8.4.2 的 resolve_command 不兼容 invoke_without_command + 非子命令
位置参数。自定义 _ProviderGroup.invoke() 在首参数非子命令时路由到
group callback,并添加 _reparse_options 处理 allow_interspersed_args=False
时选项在 provider_id 后不被解析的问题。
修复 ctx.args = ctx._protected_args 后 clear() 导致引用共享清空的 bug。
测试:更新 test_switch.py 匹配新的 switch version/agent 子命令结构。
2026-07-16 21:27:57 +08:00
Zhengshou Lai
46a41eb82a
fix(provider): 测试与入口修复
2026-07-16 21:13:24 +08:00
Zhengshou Lai
e021aa9dbf
fix(backend): 改回全局 ~/.claude/settings.json + 补充测试
...
- claude_settings: 目标文件改为全局 ~/.claude/settings.json,与 cc-switch 行为一致
- claude_settings: 切回 claude 时保留用户已有的 ANTHROPIC_API_KEY
- backend: 修正 save_project_settings -> save_settings,提示文本同步
- test_backends: 清理未用 import
- test_entrypoints: 新增 backend 命令注册测试
- 新增 test_claude_settings / test_secrets / test_backend_command(共 36 tests)
2026-07-16 20:52:12 +08:00
Zhengshou Lai
3ec60aa6b3
feat(backend): 内置 Claude Code 后端切换——DeepSeek / Kimi / Kimi Code
2026-07-16 20:45:20 +08:00
Zhengshou Lai
1348c4f243
fix: Ubuntu 24.04 等 PEP668 系统 Python 安装时自动加 --break-system-packages(安装/升级/卸载全链路)
2026-07-16 19:43:35 +08:00
Zhengshou Lai
84ad0fa4cf
feat: 审查修复一轮——sync 解引用软链技能/防 CLAUDE.md 崩溃/init 建 agent-tasks;upgrade SHA256 校验+收尾容错;新增 xiaohe switch 回滚;uninstall --all 扩到 ~/.metabot ~/.mytoolkit;下载路径改 xiaohe-agent
2026-07-16 19:36:18 +08:00
Zhengshou Lai
f878a49c8a
feat: xiaohe version——显示 bin 跑的是研发检出还是安装快照(含 git describe);uninstall --all 三重确认
2026-07-16 19:13:51 +08:00
Zhengshou Lai
37eae6f283
feat: xiaohe uninstall——默认只卸 CLI 层,保留 ~/.xiaohe 与 workspace;--all 连配置一起删
2026-07-16 19:06:35 +08:00
Zhengshou Lai
5d34b247ef
feat: xiaohe upgrade + 启动器更名 Xiaohe Agent + CLI 输出全英文
...
- upgrade: 查版本(install.sh)→确认→rich 进度条下载→落 runtime 切 current(留两版)→重装三件套→自动 sync
- launcher: 'Xiaohe Agent.app' / 'Xiaohe Agent.desktop',自动清理旧 XiaoheAgent.{command,app,desktop}
- 修复 _current_version 对缺失 current 软链误判为 'current'
- 全部提示/log 英文化;93 tests passed
2026-07-16 18:55:43 +08:00
Zhengshou Lai
a50a22b992
test: project_root 测试隔离真实 settings.json——补 get_setting patch
2026-07-16 18:36:45 +08:00
Zhengshou Lai
3b8d458fbb
feat: 桌面启动器改 XiaoheAgent.app 形态——icns 图标、无 .command 后缀,Linux 桌面项同步带图标
2026-07-16 18:32:55 +08:00
Zhengshou Lai
f3d5414bf9
feat: xiaohe 命令组 + settings.json 拆分 + workspace 同步引擎
...
- xiaohe:默认转发 default_agent(settings.json default_agent,兼容 myclaude 拼写),
子命令 init(首用引导 workspace 路径+骨架+sync+启动器)/ sync(runtime→workspace
哈希三态同步:新增/覆盖/本地改动跳过;git 检出拒绝)
- settings.py:~/.xiaohe/agent/settings.json 优先,config.json settings 段兜底
- get_workspace_root:env > settings > project_root/workspace > ~/workspace
- build_cli 增 offer_install:缺二进制时交互提示安装(claude/codex 有 install_cmd)
- 测试 +11(settings/sync 引擎三态/幂等/git 拒绝)
2026-07-16 18:10:01 +08:00
Zhengshou Lai
5c3f90e910
feat: add --tmux/-t option to run agents in attachable tmux sessions
...
Wraps the backend in 'tmux new-session -A' with a per-backend, per-directory
session name, so agent sessions survive SSH drops and re-running the same
command reattaches. Falls back to a direct run when already inside tmux,
and errors clearly when tmux is not installed.
2026-07-15 20:03:28 +08:00
Zhengshou Lai
20e22eafd4
fix(hermes): align myhermes resume flags with myclaude UX
...
Hermes -r/--resume requires a session id and has no -c shorthand, so
bare 'myhermes -r' failed with an argparse error. Translate
myagents-style flags like the codex backend:
- bare -r/--resume -> 'hermes sessions browse' (interactive picker)
- -r/--resume <id> -> '--resume <id> --no-restore-cwd'
- -c/--continue/--last -> '--continue --no-restore-cwd'
--no-restore-cwd keeps resumed sessions in the launch cwd, matching
myclaude semantics instead of jumping to the session's original cwd.
2026-07-15 10:34:01 +08:00
Zhengshou Lai
78ca74152f
feat: add hermes backend support
...
- Add myhermes entrypoint and myagents hermes subcommand
- Hermes sessions read from global SQLite store (~/.hermes/state.db)
- Default args: --yolo
- Update README, AGENTS.md, Makefile, pyproject.toml
- Add tests for hermes subcommand, passthrough, and session listing
2026-07-15 10:21:38 +08:00
Zhengshou Lai
384b9b818b
feat(launcher): mycodex 默认启用 --dangerously-bypass-approvals-and-sandbox
2026-07-07 10:11:53 +08:00
Zhengshou Lai
c07b132f6d
feat(mycodex): 对齐 resume options,支持 -r/--resume/--continue/--last/--all
...
- 新增 _translate_codex_extra,将 -r/--resume 映射为 codex resume
- --continue 映射为 codex continue,--last/--all 映射为 resume --last/--all
- 更新 help 文案与 README 用法示例
- 补充 5 个 codex resume option 单元测试,50 tests passed
2026-07-07 09:05:09 +08:00
Zhengshou Lai
10530479d0
feat: 添加 mycodex 入口,支持 OpenAI Codex CLI
...
- 在 launcher 中注册 codex 后端,兼容 ~/.codex/sessions 日期嵌套目录
- 解析 session_meta.payload.cwd 过滤当前目录会话
- 添加 myagents codex 子命令与 mycodex 独立入口、补全及 Makefile 链接
- 更新 pyproject.toml 控制台脚本与 README 文档
- 补充 codex 相关单元测试,45 tests passed
2026-07-07 08:40:16 +08:00
Zhengshou Lai
7f1aa9f27e
rename: myclaude -> myagents
2026-07-01 23:27:14 +08:00
Zhengshou Lai
1db0187b70
test(cli): repair stale bin.* imports and cover passthrough/--list
...
Tests still imported and patched the old bin.* package (renamed to
myclaude.* earlier), breaking collection. Point them at myclaude.* and
add coverage for the new claude-flag passthrough and --list session
listing.
2026-06-27 21:44:14 +08:00
Zhengshou Lai
2bcfc0b82e
feat(cli): default to --dangerously-skip-permissions, remove explicit option
...
Always forward --dangerously-skip-permissions to claude binary without
requiring the user to pass the flag manually. Removes the option from
help output and CLI signature.
- Remove --dangerously-skip-permissions click option
- Always append the flag to the claude command
- Update tests to assert default behavior and help output
- Extend .gitignore with desktop build/release directories
2026-05-27 11:23:48 +08:00
Zhengshou Lai
b580eecc43
fix: expanduser in project_root, remove redundant cwd, add tests
...
- get_myclaude_project_root() now expands ~ in MYCLAUDE_PROJECT_ROOT
(was resolving to ./~/path instead of $HOME/path)
- Extract hardcoded 16/8 depth limits as _MAX_WALK_DEPTH / _MAX_SOURCE_DEPTH
- Remove redundant cwd= from _run_pip_editable (already specified via -e)
- Add test_cwd_invalid_directory and test_env_var_expands_tilde
- Remove incorrect test_extra_args_forwarded (click.Group does not
support forwarding arbitrary args; ctx.args is always empty)
2026-05-27 11:23:14 +08:00
Zhengshou Lai
480ee311f2
style: format with black and fix ruff SIM117 warnings
...
- Merge nested with statements in test_project_root.py
- Reformat multi-line calls in test_cli.py and update.py
2026-05-27 11:23:13 +08:00
Zhengshou Lai
ab597d1d02
refactor: rename source dir to bin, reorganize templates, remove personal info
...
- Rename myclaude/ source directory → bin/
- Update all Python imports (myclaude.* → bin.*) and mock patch paths
- Update pyproject.toml: entry point and packages config
- Move workspace_template/ → templates/workspace/ for future extensibility
- Migrate .claude/skills/ to global ~/.claude/skills/ and remove local copies
- Remove SessionStart hook (sync-global.sh) from settings.local.json
- Remove unrelated script rename_funcs_to_snake.py
- Remove personal info (name, org, paths) from CLAUDE.md, README.md, settings
- Update .gitignore with standard Python/runtime exclusions
- Clean .DS_Store, __pycache__, .mypy_cache, .pytest_cache, .ruff_cache,
.playwright-mcp runtime files
2026-04-26 09:37:13 +08:00
Zhengshou Lai
45ba5ab84b
fix(cli): correct forwarded flag name to --dangerously-skip-permissions
...
Claude CLI uses --dangerously-skip-permissions, not --dangerously-allow-browser-control.
Update option name, help text, and all test references.
2026-04-23 09:02:28 +08:00
Zhengshou Lai
29fafc39db
test: add pytest suite for core modules
...
- Add pytest dependency and config to pyproject.toml
- Test project_root: env var priority, fallback, directory creation
- Test CLI: help, version, subcommands, default behavior, options
2026-04-23 09:00:44 +08:00