Commit Graph
100 Commits
Author SHA1 Message Date
Zhengshou Lai f12cd5fcf1 feat(ollama): adapter 增强 — system 提升重构 + 保活终止 + 运行时 num_ctx 探测
- ollama_adapter: 拆出 is_adapter_endpoint/upstream_target/parse_num_ctx/
  runtime_num_ctx/listen_url;system 提升保留 cache_control;转发响应始终
  connection: close 终止(修 UI 卡 working);支持 https 上游与 600s 超时
- commands/ollama: 用 listen_url() 替代硬编码;mac launchd 已加载时重启而非
  跳过;sysd 启动前探测 active;新增 _wait_healthy
- tests: 覆盖 endpoint 判定、num_ctx 解析、转发保活与命令健康等待
2026-08-16 08:51:37 +08:00
Zhengshou Lai fa792674d3 myclaude -r: 清块后 \r 归位列 0,修复 Resuming 前空格式错位
raw 模式下 ONLCR 关闭,_draw_picker_block 每行以 \n 结尾时光标停在行末列而非列 0;\x1b[12A 上移、\x1b[12M 删除后列不变,rich console.print 的 Resuming 从 ~40 列打印,前面出现一长串空格。清块后补 \r 归位。
2026-08-16 00:06:44 +08:00
Zhengshou Lai 4a37d8d218 chore(version): bump 0.2.1 (ollama adapter rides xiaohe train) 2026-08-15 23:55:25 +08:00
Zhengshou Lai 0b0de97363 feat(ollama): Anthropic→Ollama 归一化 adapter + launchd/systemd 常驻管理 2026-08-15 23:31:39 +08:00
Zhengshou Lai 75a72a8b24 myclaude -r: 修快速连按方向键被退出 + 隐藏光标 + 退出删除行不留空行
- _read_key 改按需读 CSI 序列(方向键读到终止符即返回),连按 \x1b[B 不再被吞进同一序列误判为 ESC 退出
- picker 全程隐藏光标(\x1b[?25l),退出恢复(\x1b[?25h),末尾不再突兀闪现光标
- 退出改用 Delete Line(\x1b[{n}M)删除块区域,替代逐行清空,不再留下 N 个空行
- tests: 新增快速连按方向键回归测试
2026-08-15 22:38:15 +08:00
Zhengshou Lai c342c4e94a myclaude -r: 固定块 ANSI 重绘修复对齐与滚动冲突 + cli 测试 mock 修复
- picker 弃用 Live 整屏接管,改固定 12 行块增量重绘(\x1b[{n}A 回到块顶逐行覆盖),scrollback 不受影响
- 每行单行渲染,title 列定宽 43 + CJK 感知截断,布局按 80 列设计
- tests: 新增 TestPickerBlock;test_cli which mock 改 side_effect 只命中后端二进制,避免 _npm_global_bin 多跑 subprocess.run;裸 --resume 测试更新为新 picker 语义
2026-08-15 22:25:39 +08:00
Zhengshou Lai 969fc9ac27 myclaude -r: 交互式 resume picker(方向键/翻页/即时过滤) 2026-08-15 15:44:33 +08:00
Zhengshou Lai 88170bdf57 myclaude -r: unify resume picker with xiaohe client sessions
Bare -r/--resume now opens a numbered picker merging jsonl (source of
truth) with the xiaohe hosted-session index, deduped by cli_session_id
and sorted by real content activity (not jsonl mtime, which the xiaohe
projection re-touches). -l gains a Src column (xiaohe/cli); -r <id> and
-c stay passthrough. Adds read-only xiaohe_sessions data layer + tests.
2026-08-15 13:42:53 +08:00
Zhengshou Lai d6a0f455b0 Forward xiaohe upgrade --beta so the wrapper matches the agent CLI. 2026-08-14 16:26:39 +08:00
Zhengshou Lai c2d8e1c014 Refuse make install from GHA runner worktrees.
Keep host ~/.local/bin myagents links from pointing at ephemeral _work checkouts.
2026-08-11 22:16:56 +08:00
Zhengshou Lai 3d40e27a93 Remove MetaBot coupling from uninstall and workspace init.
Keep silent cleanup of legacy metabot stubs; drop METABOT_HOME symlink.
2026-08-11 17:23:23 +08:00
Zhengshou Lai 18154020a3 Prefer xiaohe ensure-agent hints and support non-interactive yes installs.
Install scripts and product CLI can install the default backend without a picker,
and skip messages point at xiaohe when it is on PATH.
2026-08-10 07:46:55 +08:00
Zhengshou Lai 5efc8380fb chore: bump myagents to 0.2.0
Pinned 0.1.0 left stale launcher wheels after xiaohe upgrades (missing backend_available).
2026-08-09 17:18:50 +08:00
Zhengshou Lai 3f79301eb3 feat: ensure-agent + resolve npm-global CLIs without PATH
Add guided multi-select ensure-agent, resolve backend binaries via npm
prefix when not on PATH, and optionally persist npm bin in shell rc.
2026-08-09 16:53:06 +08:00
Zhengshou Lai 9344b376da fix: clarify npm-global claude install progress vs skills-node 2026-08-09 16:42:28 +08:00
Zhengshou Lai 6702f67462 feat: guided auto-install for missing agent CLIs
Offer install with default Yes on TTY; auto-install when non-interactive
(install/CI). Resolve binaries from npm global prefix after install.
2026-08-09 15:54:23 +08:00
Zhengshou Lai c3e119e3c9 feat: offer backend CLI install on missing binary (entrypoints) + shared backend_available/ensure_backend helpers
- Standalone my* wrappers pass offer_install=True so a missing backend CLI
  triggers the interactive 'Install now? [y/N]' prompt (was a bare not-found).
- Add backend_available()/ensure_backend() to expose the backend registry
  (binary/env_bin/install_cmd) for xiaohe init / ensure-deps to reuse.
2026-08-09 15:08:03 +08:00
Zhengshou Lai a95c920d8a chore(myagents): 产品包名 xiaohe-api → xiaohe 2026-08-07 09:34:14 +08:00
Zhengshou Lai 1bce85cc19 perf(sessions): cache first-prompt titles, skip local-command noise in -l
Cursor/Claude session listing now scans only the head of each jsonl for a
title (aiTitle/customTitle/first user prompt), caches by (path, mtime, size),
and filters local-command protocol rows. COLUMNS=120 pinned in the table test.
2026-08-02 16:09:01 +08:00
Zhengshou Lai ffac0ba37d feat: add mycursor backend; drop myagents xiaohe entrypoint
Cursor Agent CLI wrapper (mycursor) with resume/session listing.
Product xiaohe CLI stays in xiaohe-api only — no dual entry.
2026-07-29 21:54:30 +08:00
Zhengshou Lai 6ec2a3ebe6 docs(skill): point paths at packages/myagents 2026-07-29 21:36:21 +08:00
Zhengshou Lai d99c5534cb refactor: drop workspace sync launcher path; simplify upgrade/switch
Align with xiaohe wheel/pip install: remove sync_workspace and desktop
launcher coupling from upgrade/switch flows.
2026-07-25 12:43:24 +08:00
Zhengshou Lai 37961feb21 feat: add myagents backends command (list supported agent backends) 2026-07-25 00:42:56 +08:00
Zhengshou Lai 7b6da50c93 test(upgrade): make pip-flag tests hermetic, cover uv branch
uv run injects VIRTUAL_ENV, which silently selects the uv pip branch and
broke test_uses_break_system_packages_on_externally_managed. Both tests
now delete VIRTUAL_ENV to pin the plain-pip branch; new test pins the
uv branch via mocks.
2026-07-18 11:47:08 +08:00
Zhengshou Lai 8be2a2dcd0 chore: drop dead templates/workspace and stale doc references
Nothing in the codebase ever read templates/workspace/; workspace
bootstrap is handled by the xiaohe runtime sync (MANAGED_PATHS).
README/AGENTS.md structure trees and the first-run claim updated.
2026-07-18 11:47:08 +08:00
Zhengshou Lai 12d746e0f8 fix(xiaohe): completion 缺失 _xiaohe + 首次运行无认证时引导设置 provider
- completion_install: completions_installed() 原只检查 progs[0](myagents),
  已存在则短路,导致 xiaohe 等后加 prog 的 completion 从未安装。
  改为遍历全部 prog,任一缺失即触发重新安装。
- first_run.py: xiaohe_main() 启动时检测是否有任何可用认证(env var、
  credentials、settings.json、已存 keys),无则弹交互式 provider 选择菜单。
- install.sh.in: 移除末尾 xiaohe init + scripts/init.sh wizard,安装脚本
  只装软件不初始化配置。
2026-07-16 23:25:04 +08:00
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 8a36245b5c chore: 累积 2026-07-16 21:17:31 +08:00
Zhengshou Lai d6344fef75 chore: 累积更新 2026-07-16 21:16:27 +08:00
Zhengshou Lai 46a41eb82a fix(provider): 测试与入口修复 2026-07-16 21:13:24 +08:00
Zhengshou Lai dd2011ae2d refactor(backend): backend 改名 provider,拆出 info 子命令 2026-07-16 21:07:16 +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 2169a0a303 docs(skill): enrich myagents SKILL.md with use cases and skill division table 2026-07-07 23:42:06 +08:00
Zhengshou Lai 47365e26ad refactor(config): migrate .claude/CLAUDE.md to .agents/AGENTS.md with compatibility symlinks; add skill 2026-07-07 23:34:13 +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 20e7eba93b feat(completion): 自动安装 myagents/myclaude/mykimi shell 补全,移除 eval 旧脚本 2026-07-04 19:25:01 +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 54c60eb463 feat(cli): pass through claude flags and add --list
Bare `myclaude` already launched claude, but a leading unknown flag
(`--resume`, `-r <id>`, `--continue`) made click raise "No such command"
because it was parsed as a subcommand name. click 8.3 raises this before
the group callback runs, so it can't be intercepted there.

- Add LaunchGroup overriding resolve_command: any non-subcommand leading
  token routes the raw args to a hidden `__run__` passthrough that forwards
  them to claude, run in the resolved cwd (--cwd, default workspace/).
- Add `--list/-l` to list resumable sessions (id, mtime, first prompt) for
  the working directory, read from ~/.claude/projects/<munged-cwd>/.
2026-06-27 21:39:43 +08:00
Zhengshou Lai 9111a574e9 refactor: rename bin/ package to myclaude/ 2026-06-26 22:58:18 +08:00
Zhengshou Lai c9fd2321ed docs: update README installation instructions
- Recommend official install script over npm
- Pin npm fallback to 2.1.118 due to Kimi compatibility
- Update Windows install notes and first-run auth hint
2026-06-13 09:21:08 +08:00
Zhengshou Lai 0c31cffeda refactor(template): generalize project config for lab members
- Stop tracking settings.local.json; commit base settings.json instead
- Scope file permissions to workspace/ and .claude/ as safer default
- Add .gitignore entries for .claude runtime files (scheduled_tasks, keybindings)
- Annotate _LINK_MAP in init.py as user-customizable
- Strip personal references from workspace CLAUDE.md template
2026-05-27 11:23:48 +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 72e27f9f6b remove(desktop): drop Electron desktop pet, keep CLI only 2026-05-27 11:23:14 +08:00
Zhengshou Lai 36773025b3 fix(desktop): add --strictPort to vite dev server
Prevent Vite from auto-switching ports when 5173 is occupied,
which caused wait-on to hang and Electron never to start.
2026-05-27 11:23:14 +08:00
Zhengshou Lai 6d033ac3b5 fix(desktop): mark dist-electron as CommonJS
tsc outputs CommonJS but root package.json has type: module.
Add dist-electron/package.json with type: commonjs so Electron
loads main.js correctly.
2026-05-27 11:23:14 +08:00
Zhengshou Lai 2ac1c9750e refactor(desktop): code review fixes
- Shortcut: Cmd+Shift+C → Cmd+Shift+M (avoid Chrome DevTools conflict)
- Preload: onData/onExit now return cleanup functions (fix memory leak)
- PTY: resolve shell path at construction time, throw on missing claude CLI
- Terminal: remove allowProposedApi, dedupe resize listeners, add cleanup
- Main: debounce window move config writes (500ms), restart PTY on activate
- CSS: remove unused orbGlow keyframes
- Package: fix appId to com.apaam.myclaude, skip code signing, remove unused deps
2026-05-27 11:23:14 +08:00
Zhengshou Lai 0c227cae19 feat(desktop): add Electron desktop pet for Claude CLI
- Electron + React + TypeScript 桌面宠物外壳
- xterm.js + node-pty 直接对接 Claude CLI 进程
- 宠物 orb(80x80)可拖拽,点击展开终端面板
- CRT 复古终端主题(扫描线、文字发光)
- 全局快捷键 Cmd+Shift+C 显隐
- 窗口位置自动保存
- 中华田园犬吉祥物 icon(AI 生成)
- Makefile 新增 `make app` 打包命令
2026-05-27 11:23:14 +08:00
Zhengshou Lai 75eaabbfb5 fix(cli): restore is_flag=False + flag_value on --cwd option
Reverts an earlier incorrect cleanup: click.option with
is_flag=False + flag_value="." is valid click syntax that
allows --cwd to work both with and without an argument:

  --cwd              → cwd="." (current directory)
  --cwd /path        → cwd="/path"
  --cwd=.            → cwd="."
  --cwd --flag       → cwd=".", flag=True (correctly parsed)

Without these parameters, --cwd requires a value and
--dangerously-skip-permissions would be misread as the cwd.
2026-05-27 11:23:14 +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 854a69d3d8 revert: restore original README content
The previous slimmed version removed too much ecosystem documentation.
Restore the full README as the project's single entry point.
2026-05-27 11:23:13 +08:00
Zhengshou Lai 593b7a85b3 refactor(docs): slim README and improve completion script UX
- Reduce README from 530+ lines to ~110 lines, focusing on CLI core
- Separate ecosystem extensions (cc-switch, Metabot, Skills) into
  an optional section
- Add unsupported shell hint in install_completion.sh
2026-05-27 11:23:13 +08:00
Zhengshou Lai af80ec1de0 fix(cli): remove invalid --cwd flag config and make upgrade a proper alias
- Remove is_flag=False + flag_value="." combination which has no effect
  on click option with is_flag=False (default)
- Create dedicated click.Command for upgrade instead of raw alias
  assignment, so help shows correct command name
2026-05-27 11:23:13 +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
lzhshou 7c5fa8ae24 minor updates 2026-05-18 18:40:20 +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 432b700265 minor 2026-04-26 09:14:42 +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
Zhengshou Lai bb39b80d06 refactor: clean up outdated references and orphan files
- Fix __init__.py docstring: Mybot → Myclaude
- Remove stale .gitignore entries (workspace/, knowledge/)
- Delete orphan package-lock.json from Python project
- Update README: project structure, commands, env vars
- Replace all myclaude chat references with myclaude
- Update defaultWorkingDirectory examples to ~/workspace
- Add MYCLAUDE_WORKSPACE_ROOT documentation
2026-04-23 08:55:15 +08:00
Zhengshou Lai 475a0911e2 feat(workspace): make workspace location configurable via env var
- Add MYCLAUDE_WORKSPACE_ROOT env var, default ~/workspace
- Auto-create workspace directory if it does not exist
- Move workspace/CLAUDE.md + .gitignore to workspace_template/
- Remove hardcoded symlink paths from workspace template
- Update get_workspace_root() with env-var priority logic
- Update metabot bots.json defaultWorkingDirectory to ~/workspace
2026-04-23 08:47:22 +08:00
Zhengshou Lai bebf7ba17a feat(cli): merge chat into default behavior, default cwd to workspace/
- Remove standalone chat subcommand; chat becomes default behavior
- Default --cwd resolves to workspace/ instead of repo root
- Split CLAUDE.md: repo/ for CLI dev, workspace/ for daily workflow
- Add workspace/CLAUDE.md, workspace/.gitignore for tmp files
- Ignore MCP temp artifacts (.mcp.json, .playwright-mcp/)
- Clean up removed mail subcommand files
2026-04-23 08:38:59 +08:00
Zhengshou Lai 5a665e38bb feat(mail): add IMAP/STP email subcommand
New `myclaude mail` group with:
- config: interactive account setup
- inbox: list recent messages
- read: show message by UID
- send: send email with attachments
- reply/forward: reply to or forward messages
2026-04-17 00:02:54 +08:00
Zhengshou Lai e8320b1798 feat(scripts): add rename_funcs_to_snake helper
Utility script to bulk-rename Python and C++ functions to
snake_case using AST analysis and regex heuristics.
2026-04-17 00:02:50 +08:00
Zhengshou Lai afc81dcd84 feat(cli): add upgrade alias and register mail command
- Add upgrade as an alias for update
- Register mail_cmd in CLI entrypoint
2026-04-17 00:02:46 +08:00
Zhengshou Lai 2618f626a7 feat(make): extract completion install to standalone script
Move shell-specific completion generation from Makefile inline
logic to scripts/install_completion.sh for easier maintenance.
2026-04-17 00:02:41 +08:00
Zhengshou Lai c890ef6d72 docs(CLAUDE): update workspace structure and memory mechanism
- Refresh workspace directory layout with current symlinks
- Replace old knowledge protocol with metamemory (mm CLI)
- Add mydesktop, myslides, mytoolkit paths
2026-04-17 00:02:37 +08:00
Zhengshou Lai 152db75e15 chore(skills): remove deprecated skills and update permissions
- Delete update-mykb-files and update-mykb-memories skills
- Update update-mywebpage skill to use lowercase mywebpage path
- Sync settings.local.json permissions
2026-04-17 00:02:30 +08:00
Zhengshou Lai f05811ef54 style(update): remove unused sys import
Oops, sys is still used by sys.executable. Restored.
2026-04-17 00:02:07 +08:00
Zhengshou Lai 686c0f736c fix(chat): register --cwd as Click option for shell completion
Replace manual ctx.args parsing with a proper @click.option using
is_flag=False and flag_value='.'. This enables tab completion for
the --cwd / -C option and directory-only path completion after it.
Also bump click dependency to >=8.3.2 to avoid the optional-value
regression in 8.3.0/8.3.1.
2026-04-17 00:00:49 +08:00
Zhengshou Lai 7c39d7c9d9 feat(make): auto install/uninstall shell completions
Add _install-completions and _uninstall-completions targets to Makefile:
- Detect shell (zsh/bash) and generate appropriate completion files
- Install to ~/.local/bin/completions/ on make install
- Remove completions on make uninstall
- Integrate with existing update/upgrade commands
2026-04-13 11:07:37 +08:00
Zhengshou Lai 929d808b3e fix(chat): remove --cwd from Click options to allow optional value parsing
--cwd was defined as a Click option but also parsed manually from ctx.args,
which caused conflicts when --cwd was followed by another flag (like
--dangerously-skip-permissions). Now --cwd is parsed entirely manually,
allowing:
  --cwd alone -> use current directory
  --cwd /path -> use specified path
  (none)      -> use myclaude project root (default)
2026-04-13 09:09:53 +08:00
Zhengshou Lai 250e3dd096 feat(chat): --cwd 支持可选值,缺省为当前目录
使 --cwd 选项支持无值调用:
- --cwd 单独使用 → 默认为当前目录 "."
- --cwd /path → 使用指定路径
- --cwd=. / -C. → 等号或短选项语法

修复:--cwd 后接其他 flag 时被误认为值的歧义问题。
2026-04-13 09:02:16 +08:00
Zhengshou Lai 6caf471eb3 docs: move git-proxy-clone to appendix with proper setup instructions
- Remove git-proxy-clone from skills table (it's a custom local skill)
- Add appendix section explaining FastGithub setup
- Include copy-paste prompt for Claude to create the skill
- Add manual alias configuration as fallback
2026-04-10 10:26:00 +08:00
Zhengshou Lai 21a7f032bf feat(install): symlink myclaude to ~/.local/bin, make uninstall, docs
- Makefile: uv sync or venv pip install -e, then ln -sf to ~/.local/bin/myclaude
- Add scripts/rm_user_local_myclaude.py for safe unlink on make uninstall
- README: install path, shell completion guarded by command -v
- Track uv.lock for reproducible uv sync

Made-with: Cursor
2026-04-10 08:23:14 +08:00
Zhengshou Lai 596da55753 chore: update local settings 2026-04-09 23:18:44 +08:00
Zhengshou Lai 7d37914cbf docs: update README with improved installation and configuration guide 2026-04-09 23:17:07 +08:00
Zhengshou Lai e693198727 minors 2026-04-09 14:06:07 +08:00
Zhengshou Lai 1bead9a6d8 chore: persist memories and excerpts under knowledge/ instead of .claude/
Move documented and skill paths to knowledge/memories and knowledge/files
(project root, mappable to @knowledge) to reduce sandbox issues on .claude/.
Update CLAUDE.md memory protocol, update-mykb-* skills, and settings.local.json
bootstrap check for core.json.

Made-with: Cursor
2026-04-09 10:36:00 +08:00
Zhengshou Lai d63ce56e3f update skills 2026-04-09 10:31:29 +08:00
Zhengshou Lai 18943a7399 update skills 2026-04-09 10:31:13 +08:00
Zhengshou Lai 2b3296b6a5 update skills 2026-04-09 10:27:34 +08:00
Zhengshou Lai da713c969e minor 2026-04-09 10:14:25 +08:00
Zhengshou Lai 790a16d030 chore(claude): version skills and local settings; add rag-files/rag-memories
- Adjust .gitignore to track .claude/settings.local.json and .claude/skills/** while keeping other .claude content local.

- Add rag-files (knowledge retrieval + .claude/files notes), rag-memories, and mywebpage-update skills with PDF/Excel references.

- Fix settings.local.json hooks (SessionStart schema) for Claude Code.

- Update CLAUDE.md for rag-files paths and memory/file pool notes.

- Remove tracked .claude/plans and sessions placeholders no longer used.

Made-with: Cursor
2026-04-09 10:11:54 +08:00
Zhengshou Lai e84737b527 Merge remote-tracking branch 'origin/main' into myusing 2026-04-08 22:20:50 +08:00
Zhengshou Lai 0b8a60b919 cleanup: remove old framework files and update CLAUDE.md
- Remove legacy agent/, todo/, souls/, insights/, conversations/ folders
- Remove outdated skills (coding.md, debugging.md, architecture.md)
- Remove old memory files (core.json, current_mode.json)
- Update CLAUDE.md with workspace structure and knowledge retrieval principles
- Add .claude/ and .obsidian/ to .gitignore
2026-04-08 22:20:36 +08:00