wangchuan 5.9.0 → 5.9.1

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.
@@ -45,7 +45,7 @@ const program = new Command();
45
45
  program
46
46
  .name('wangchuan')
47
47
  .description(t('cli.description'))
48
- .version('5.9.0');
48
+ .version('5.9.1');
49
49
  // ── init ────────────────────────────────────────────────────────
50
50
  program
51
51
  .command('init')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wangchuan",
3
- "version": "5.9.0",
3
+ "version": "5.9.1",
4
4
  "description": "忘川 · AI 记忆同步系统 — 智能体记忆永不遗失",
5
5
  "bin": {
6
6
  "wangchuan": "./dist/bin/wangchuan.js"
package/skill/SKILL.md CHANGED
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: wangchuan
3
- version: 1.4.0
3
+ version: 1.5.0
4
4
  description: >-
5
5
  Encrypt and sync AI agent configs, memories, skills, and MCP servers across environments via a private Git repo.
6
6
  Supports Claude, OpenClaw, Gemini, CodeBuddy, WorkBuddy, Cursor, and Codex.
7
7
  TRIGGER when: user mentions syncing AI memories/configs, wangchuan/忘川, cross-machine agent setup, backup/restore agent settings, memory sync, skill distribution, MCP server sync, agent migration, master key export, sync status, watch daemon, environment management, snapshot, pushing/pulling memories, conflict resolution, syncing between agents, rolling back/restoring versions, switching environments, health check, customizing agent paths, or any commands: init, sync, status, watch, doctor, memory, env, snapshot, lang.
8
- Triggers: 忘川、wangchuan、同步记忆、同步配置、同步技能、同步MCP、初始化忘川、备份记忆、恢复记忆、迁移agent、导出密钥、轮换密钥、同步状态、健康检查、多环境、快照、跨机器同步、agent记忆、配置路径、查看技能、删除技能、新增技能、修改技能、自定义agent、MCP服务器、新增MCP、删除MCP、修改MCP、查看MCP、写记忆、删除记忆、修改记忆、查看记忆、广播记忆、复制记忆、推送记忆、拉取记忆、同步到agent、冲突、合并记忆、回退记忆、回滚、恢复版本、切换环境、忘川状态、新建环境、删除环境、查看环境、切换语言、sync memories、push memory、pull memory、rollback、switch environment、custom agent、MCP server、health status、rotate key、switch language.
8
+ Triggers: 忘川、wangchuan、同步记忆、同步配置、同步技能、同步MCP、初始化忘川、备份记忆、恢复记忆、迁移agent、导出密钥、轮换密钥、同步状态、健康检查、多环境、快照、跨机器同步、agent记忆、配置路径、查看技能、删除技能、新增技能、修改技能、自定义agent、MCP服务器、新增MCP、删除MCP、修改MCP、查看MCP、写记忆、删除记忆、修改记忆、查看记忆、广播记忆、复制记忆、推送记忆、拉取记忆、同步到agent、冲突、合并记忆、回退记忆、回滚、恢复版本、切换环境、忘川状态、新建环境、删除环境、查看环境、切换语言、升级忘川、更新忘川、sync memories、push memory、pull memory、rollback、switch environment、custom agent、MCP server、health status、rotate key、switch language、upgrade wangchuan、update wangchuan.
9
9
  DO NOT TRIGGER when: general git operations, unrelated CLI tools, or AI model APIs.
10
10
  ---
11
11
 
@@ -42,6 +42,7 @@ Aliases: `sync`→`s`, `status`→`st`, `snapshot`→`snap`. All support `--agen
42
42
  | Switch/create/list/delete environments, rollback, snapshots | [references/environment.md](references/environment.md) |
43
43
  | Inspect/check skills, agents, MCP, memory, or health status | [references/inspect-status.md](references/inspect-status.md) |
44
44
  | Initialize wangchuan, install, migrate key, new machine setup | [references/install-setup.md](references/install-setup.md) |
45
+ | Upgrade/update wangchuan CLI and sync new profiles | [references/install-setup.md](references/install-setup.md) |
45
46
 
46
47
  **IMPORTANT**: Before executing any task below, **Read the corresponding reference file** for detailed instructions, bash commands, and decision flows. The reference files contain the complete procedures.
47
48
 
@@ -104,10 +105,10 @@ All push/pull/watch operations target the **current environment's branch only**.
104
105
 
105
106
  | Agent | Key synced files |
106
107
  |-------|-----------------|
107
- | `openclaw` | MEMORY.md (enc), AGENTS.md, SOUL.md, TOOLS.md, IDENTITY.md, USER.md (enc), memory/ (enc), skills/ |
108
- | `claude` | CLAUDE.md, settings.json (enc), .claude.json→mcpServers (enc), commands/, plugins/ |
109
- | `gemini` | settings.internal.json→security+model+general (enc), skills/ |
110
- | `codebuddy` | MEMORY.md (enc), CODEBUDDY.md, mcp.json→mcpServers (enc), settings.json→enabledPlugins (enc), plugins/ |
111
- | `workbuddy` | MEMORY.md (enc), IDENTITY.md, SOUL.md, USER.md (enc), mcp.json→mcpServers (enc), skills/, extensions/ |
112
- | `cursor` | rules/, mcp.json→mcpServers (enc), cli-config.json→permissions+model (enc), extensions/ |
113
- | `codex` | MEMORY.md (enc), instructions.md, config.toml (enc), skills/, memories/ (enc) |
108
+ | `openclaw` | MEMORY.md (enc), AGENTS.md, SOUL.md, TOOLS.md, IDENTITY.md, USER.md (enc), HEARTBEAT.md, BOOTSTRAP.md, memory/ (enc), skills/, openclaw.json→agents+skills+ui (enc) |
109
+ | `claude` | CLAUDE.md, settings.json (enc), plugins/installed_plugins.json, plugins/known_marketplaces.json, plugins/blocklist.json, commands/, skills/, agents/, .claude.json→mcpServers (enc) |
110
+ | `gemini` | skills/, settings.internal.json→security+model+general+ide (enc) |
111
+ | `codebuddy` | MEMORY.md (enc), CODEBUDDY.md, plugins/known_marketplaces.json, plugins/installed_plugins.json, skills/, mcp.json→mcpServers (enc), settings.json→enabledPlugins+hooks (enc) |
112
+ | `workbuddy` | MEMORY.md (enc), IDENTITY.md, SOUL.md, USER.md (enc), BOOTSTRAP.md, extensions/extensions.json, plugins/known_marketplaces.json, skills/, mcp.json→mcpServers (enc), settings.json→enabledPlugins+hooks (enc) |
113
+ | `cursor` | extensions/extensions.json, hooks.json, rules/, skills/, agents/, mcp.json→mcpServers (enc), cli-config.json→permissions+model+enabledPlugins+editor+approvalMode+sandbox+attribution+network+modelParameters (enc) |
114
+ | `codex` | MEMORY.md (enc), instructions.md, AGENTS.md, config.toml (enc), skills/, memories/ (enc), agents/ |
@@ -12,6 +12,50 @@
12
12
  npm install -g wangchuan
13
13
  ```
14
14
 
15
+ ## Upgrade
16
+
17
+ When user says "升级忘川" / "upgrade wangchuan":
18
+
19
+ **Step 1: Upgrade CLI.**
20
+ ```bash
21
+ npm update -g wangchuan
22
+ ```
23
+
24
+ **Step 2: Verify new version.**
25
+ ```bash
26
+ wangchuan --version
27
+ ```
28
+
29
+ **Step 3: Sync (reconciles profiles + pushes new files).**
30
+
31
+ After upgrade, the new version may include new/changed agent sync profiles (new syncDirs, syncFiles, jsonFields). The built-in `reconcileProfiles` mechanism automatically detects these changes when `sync` runs — it compares the built-in agent definitions against `config.json`, adds any missing entries, and saves the updated config. No manual config editing needed.
32
+
33
+ ```bash
34
+ wangchuan sync -y
35
+ ```
36
+
37
+ This single command:
38
+ 1. Auto-runs `reconcileProfiles` → detects new sync entries → updates `config.json`
39
+ 2. Pulls latest from cloud (current env branch)
40
+ 3. Discovers and pushes any newly-synced local files to cloud
41
+
42
+ **Step 4: Report results.**
43
+ Tell the user:
44
+ - New version number
45
+ - Any new sync entries added (visible in sync output as newly-discovered files)
46
+ - Files synced (pulled/pushed)
47
+ - Current environment name
48
+
49
+ **Step 5: Ensure watch daemon running.**
50
+ ```bash
51
+ pgrep -f 'wangchuan.*watch' >/dev/null 2>&1 || nohup wangchuan watch >/dev/null 2>&1 &
52
+ ```
53
+
54
+ **Complete upgrade flow:**
55
+ ```
56
+ npm update -g wangchuan → wangchuan --version → wangchuan sync -y → report → ensure watch
57
+ ```
58
+
15
59
  ## Initialization (when `~/.wangchuan/config.json` does not exist)
16
60
 
17
61
  **IMPORTANT: Interactive mode does NOT work in agent shell (non-TTY). Always pass flags explicitly.**