@fanchao8609/agent_brain_sync 1.28.2 → 1.28.3

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.
package/bin/abs.js CHANGED
@@ -122,14 +122,17 @@ async function refreshHosts(yes) {
122
122
  return;
123
123
  }
124
124
  if (freshEntry !== resolveBinPath()) console.log(` 用新装的副本执行: ${freshEntry}`);
125
- // --all:update 的语义是「把升好的版本铺到所有已装宿主」,不能二次弹窗重选。
126
- // 旧代码调 runInstall({agent: undefined}) 在 TTY 下会弹菜单,回车只装 pi ——
127
- // 另装过 omp / Claude Code 的机器升级后那几个宿主永远不刷新(2026-11-07 实报)。
128
- const args = ['install', '--all'];
125
+ // 宿主选择交给新副本的交互菜单:**默认勾 pi,其余多选**(2026-11-07 用户定)。
126
+ // 不传 --yes —— 传了等于「不问、只装 pi」,另装过 omp / Claude Code 的机器
127
+ // 那几个宿主升级后永远不刷新(实报)。
128
+ // 也不用 --all —— 那会往没在用的宿主配置里写条目,与「默认只装 pi、
129
+ // 其余 opt-in」的既定策略相反。
130
+ const args = ['install'];
131
+ // 已是非交互场景(update --yes、脚本、CI)时不模拟菜单,交给 pickAgents 走默认 pi。
129
132
  if (yes) args.push('--yes');
130
133
  const code = await runInherit(process.execPath, [freshEntry, ...args]);
131
134
  if (code !== 0) {
132
- console.error(`\n✗ 刷新宿主失败(退出码 ${code})。手动重跑:node ${freshEntry} install --all`);
135
+ console.error(`\n✗ 刷新宿主失败(退出码 ${code})。手动重跑:node ${freshEntry} install`);
133
136
  process.exit(1);
134
137
  }
135
138
  console.log('\n完成。重启宿主(pi / omp / opencode / claude-code / codex)后新 hook 生效。');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fanchao8609/agent_brain_sync",
3
- "version": "1.28.2",
3
+ "version": "1.28.3",
4
4
  "description": "agent-brain-sync: 跨会话 AI 编码记忆 — hook 纯触发 + CLI/MCP 读写 .brain markdown 图谱, 防并发写保护。",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/install.js CHANGED
@@ -1017,7 +1017,12 @@ const INSTALLERS = {
1017
1017
  };
1018
1018
 
1019
1019
  export function installSummary() {
1020
- return HOSTS.map((h) => ` ${h.key.padEnd(12)} ${h.label}`).join('\n');
1020
+ // 标出默认项,否则用户看不出「回车 = 只装 pi」到底装哪个(2026-11-07 用户要求:
1021
+ // 默认勾 pi,其余多选)。
1022
+ return HOSTS.map((h) => {
1023
+ const mark = h.key === DEFAULT_AGENT ? ' ← 默认(回车只装这个,要多个请用逗号列出)' : '';
1024
+ return ` ${h.key.padEnd(12)} ${h.label}${mark}`;
1025
+ }).join('\n');
1021
1026
  }
1022
1027
 
1023
1028
  export async function runInstall({ agent, all = false, mcp = true, skill = true, yes = false } = {}) {