dsh-soul-forging 0.1.7 → 0.1.8
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/init-home +8 -4
- package/package.json +1 -1
- package/scripts/smoke.sh +1 -0
package/bin/init-home
CHANGED
|
@@ -54,12 +54,16 @@ fi
|
|
|
54
54
|
|
|
55
55
|
# 把铸魂清单标成 skip(memory-only 时),别每次开局催用户
|
|
56
56
|
if [ "$MODE" = "memory-only" ] && [ -f "$TARGET/BOOTSTRAP.md" ]; then
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
# 行尾可能有注释,所以匹配整行而不是 ^status: pending$
|
|
58
|
+
python3 - "$TARGET/BOOTSTRAP.md" <<'PY'
|
|
59
59
|
import re, sys
|
|
60
60
|
p = sys.argv[1]
|
|
61
|
-
|
|
62
|
-
open(p,
|
|
61
|
+
try:
|
|
62
|
+
s = open(p, encoding="utf-8").read()
|
|
63
|
+
except OSError:
|
|
64
|
+
sys.exit(0)
|
|
65
|
+
s = re.sub(r"^status:\s*\w+.*$", "status: skip", s, count=1, flags=re.M)
|
|
66
|
+
open(p, "w", encoding="utf-8").write(s)
|
|
63
67
|
PY
|
|
64
68
|
fi
|
|
65
69
|
|
package/package.json
CHANGED
package/scripts/smoke.sh
CHANGED
|
@@ -95,6 +95,7 @@ echo "== 5. 三种模式(不想改性格的人)=="
|
|
|
95
95
|
export MEMORY_DIR="$TMP/mem2"
|
|
96
96
|
"$BIN/soul-init" --memory-only >/dev/null 2>&1
|
|
97
97
|
[ ! -f "$MEMORY_DIR/SOUL.md" ] && ok "memory-only 不生成 SOUL.md" || bad "memory-only 还是生成了 SOUL"
|
|
98
|
+
grep -q "^status: skip" "$MEMORY_DIR/BOOTSTRAP.md" 2>/dev/null && ok "memory-only 把铸魂标成 skip" || bad "memory-only 铸魂还停在 pending(会反复催)"
|
|
98
99
|
"$BIN/soul-boot" --mode memory-only --list 2>&1 | grep -q "不注入(模式)" && ok "memory-only 不注入 SOUL" || bad "memory-only 仍在注入 SOUL"
|
|
99
100
|
# external:连 BOOTSTRAP 都不铺
|
|
100
101
|
MEMORY_DIR="$TMP/mem3" "$BIN/soul-init" --external >/dev/null 2>&1
|