把主線接進派工與注入(inkstone/ISEP#82)

- hooks.json     mainline-focus-guard 掛 Agent+Task(派工的兩個入口都要守);
                 SessionStart 多一條 `scripts/mainline refresh`(0.8s,不輪詢)
- hooks-inventory 54 支/71 條(當場數的)+補人話一列;順手修掉上一版重複的那一行,
                 並把「指向空氣」那格的假警報寫清楚(countdown-milestone-refresh 在 scripts/)
- TESTING        A16(24 條離線)+ A17(要網路的那半怎麼驗)
- plugin.json    描述數字對齊;版本不動,待總管定版
This commit is contained in:
2026-08-28 00:34:07 +00:00
parent 21971ea83e
commit 7871921741
6 changed files with 98 additions and 8 deletions
+11 -1
View File
@@ -147,7 +147,10 @@ def cmd_show(argv):
print("🎯 現在的主線:%s「%s」" % (ML.ref_of(ms), ms.get("title")))
desc = (ms.get("description") or "").strip()
if desc:
print(" 目標:" + desc.splitlines()[0].strip())
first = desc.splitlines()[0].strip()
# 只印第一行、最多 150 字:這是**一眼掃**的答案,不是 milestone 的全文。
# leo 一天看兩眼(白話鐵律),整段貼過來他就不會看。
print(" 目標:" + (first[:150] + "…" if len(first) > 150 else first))
print(" 期限:%s" % ML.due_phrase(ms))
print(" 進度:%d%d 張已關(%d%%" % (c, total, pct))
mem = sorted(ML.members(ms))
@@ -310,6 +313,13 @@ CMDS = {"show": cmd_show, "list": cmd_list, "set": cmd_set, "clear": cmd_clear,
"refresh": cmd_refresh, "adopt": cmd_adopt, "has": cmd_has}
if __name__ == "__main__":
# `mainline | head` 是很自然的用法,別讓它吐一段 BrokenPipe 的 traceback
# ——那會讓人以為這支壞了。
try:
import signal
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
except Exception:
pass
if len(sys.argv) < 2:
cmd_show([])
sys.exit(0)