@fanchao8609/agent_brain_sync 1.9.0 → 1.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.
Files changed (2) hide show
  1. package/bin/abs.js +12 -2
  2. package/package.json +1 -1
package/bin/abs.js CHANGED
@@ -477,8 +477,18 @@ async function main() {
477
477
  ` 登记任务: abs todo add <id> --note "做什么"`,
478
478
  );
479
479
  }
480
- rejectExtra(rest2, `abs todo ${sub} <id>${action === 'done' ? ' [--as 落地|否决|仅方案]' : ' --note "…"'}`);
481
- if (!id) throw new Error(`✗ 缺 <id>\n 用法: abs todo ${sub} <id>${action === 'done' ? ' [--as 落地|否决|仅方案]' : ' --note "…"'}`);
480
+ // done 的结语:--note "结语" 或位置参数(`abs todo done X 验证: 全绿`)都收。
481
+ // 坑(2026-09-16 实测): --help 里写了 [结语文字] 但实现只读 --note,
482
+ // 位置参数被 rejectExtra 当多余参数拒掉 —— 文档与实现不一致。
483
+ const isDone = action === 'done';
484
+ const usage = `abs todo ${sub} <id>${isDone ? ' [--as 落地|否决|仅方案] [--note "结语"]' : ' --note "…"'}`;
485
+ if (isDone) {
486
+ const note = opts.note || (rest2.length ? rest2.join(' ') : undefined);
487
+ console.log(await cmdTask({ dir: opts.dir, action, id, section: opts.section, note, as: opts.as }));
488
+ break;
489
+ }
490
+ rejectExtra(rest2, usage);
491
+ if (!id) throw new Error(`✗ 缺 <id>\n 用法: ${usage}`);
482
492
  console.log(await cmdTask({ dir: opts.dir, action, id, section: opts.section, note: opts.note, as: opts.as }));
483
493
  break;
484
494
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fanchao8609/agent_brain_sync",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "agent-brain-sync: 跨会话 AI 编码记忆 — hook 纯触发 + CLI/MCP 读写 .brain markdown 图谱, 防并发写保护。",
5
5
  "type": "module",
6
6
  "license": "MIT",