@tyhld/conductor 0.12.149 → 0.12.150
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/package.json +1 -1
- package/scripts/update-guard.sh +25 -9
package/package.json
CHANGED
package/scripts/update-guard.sh
CHANGED
|
@@ -1714,10 +1714,15 @@ has_sandbox = isinstance(shared.get("sandbox"), dict) or isinstance(local.get("s
|
|
|
1714
1714
|
# ADR-012 が否定した形そのものなので、この1件だけを同期モードにも乗せる。
|
|
1715
1715
|
# ★だから位置も ④ の先頭にする(この直後で同期モードを打ち切る=ほかの段に1バイトも触らない)。
|
|
1716
1716
|
#
|
|
1717
|
-
#
|
|
1718
|
-
#
|
|
1717
|
+
# ★足すのは2件だけ=報告の置き場($REPORT_STORE_SRC が出す物)と npm の控え(~/.npm/_cacache)。
|
|
1718
|
+
# 【npm の控えを足す理由(えふさん確定 2026-10-26・便 a3e93165)】以前は「部品の置き場(pnpm・npm の控え)は
|
|
1719
|
+
# 足さない」と決めていたが、npm の控えが許可に無いと職人の npm install が囲いで止まる
|
|
1720
|
+
# (mebukia 便 d395a0d6 で実発生)。この確定で npm の控えの部分だけを上書きした。
|
|
1721
|
+
# 字面は雛形(gen-managed-settings-template.py の ALLOW_WRITE_HOME)と同じ物で、試験が食い違いを見張る。
|
|
1722
|
+
# ★npm の記録(~/.npm/_logs)・~/.npm 全体・~/.npmrc は足さない(守る対象のまま)。
|
|
1723
|
+
# ★pnpm の置き場・/tmp/claude-1000 は今も【足さない】。
|
|
1719
1724
|
# それらは要るかの判断が別(雛形 gen-managed-settings-template.py の側に在る)で、
|
|
1720
|
-
#
|
|
1725
|
+
# ここで一緒に広げると、確定した2件を超える許可になる。
|
|
1721
1726
|
# ★sandbox セクションが「既に在る現場」だけを対象にする((3)・(3b) と同じ理由=ADR-004)。
|
|
1722
1727
|
# ★書く先は settings.local.json(②-b)。一覧は段をまたいで足し合わせになるので、ここに足せば効く。
|
|
1723
1728
|
# ★既存の allowWrite の行は1行も外さない・並べ替えない(不足分を後ろに足すだけ)。
|
|
@@ -1729,7 +1734,10 @@ def _allow_write_broken(data):
|
|
|
1729
1734
|
_f = _s.get("filesystem") if isinstance(_s, dict) else None
|
|
1730
1735
|
return isinstance(_f, dict) and "allowWrite" in _f and not isinstance(_f.get("allowWrite"), list)
|
|
1731
1736
|
|
|
1732
|
-
|
|
1737
|
+
#: npm の控え(★えふさん確定 2026-10-26。雛形の ALLOW_WRITE_HOME と同じ字面=試験が見張る)。
|
|
1738
|
+
NPM_CACHE_ALLOW = "~/.npm/_cacache"
|
|
1739
|
+
|
|
1740
|
+
if has_sandbox:
|
|
1733
1741
|
_lsb = local.get("sandbox")
|
|
1734
1742
|
_fs = _lsb.get("filesystem") if isinstance(_lsb, dict) else None
|
|
1735
1743
|
_has_allow = isinstance(_fs, dict) and "allowWrite" in _fs
|
|
@@ -1737,10 +1745,13 @@ if has_sandbox and report_store:
|
|
|
1737
1745
|
_broken_at = [p for p, d in ((dst_path, shared), (local_path, local)) if _allow_write_broken(d)]
|
|
1738
1746
|
if _broken_at:
|
|
1739
1747
|
print(f"[update-guard] ※ {_broken_at[0]}: sandbox.filesystem.allowWrite が一覧ではないので"
|
|
1740
|
-
f"
|
|
1748
|
+
f"報告の置き場・npm の控えは足しません(人の判断待ち)")
|
|
1741
1749
|
else:
|
|
1742
1750
|
_cur_allow = _fs.get("allowWrite") if _has_allow else []
|
|
1743
|
-
|
|
1751
|
+
# ★報告の置き場は正本を読めた機体だけ(読めなければ足さない)。npm の控えはそれと別に足す。
|
|
1752
|
+
_missing_store = [p for p in (report_store or []) if p not in _cur_allow]
|
|
1753
|
+
_missing_npm = [NPM_CACHE_ALLOW] if NPM_CACHE_ALLOW not in _cur_allow else []
|
|
1754
|
+
_missing_write = _missing_store + _missing_npm
|
|
1744
1755
|
if _missing_write:
|
|
1745
1756
|
if not isinstance(_lsb, dict):
|
|
1746
1757
|
_lsb = {}
|
|
@@ -1749,12 +1760,17 @@ if has_sandbox and report_store:
|
|
|
1749
1760
|
_fs = {}
|
|
1750
1761
|
_lsb["filesystem"] = _fs
|
|
1751
1762
|
_fs["allowWrite"] = list(_cur_allow) + _missing_write
|
|
1763
|
+
if _missing_store:
|
|
1764
|
+
changes.append(
|
|
1765
|
+
f"囲いの中でも書ける場所に報告の置き場を {len(_missing_store)} 件追記"
|
|
1766
|
+
f"({' / '.join(_missing_store)}。足さないと職人の報告が1件も残らない)")
|
|
1767
|
+
if _missing_npm:
|
|
1752
1768
|
changes.append(
|
|
1753
|
-
f"
|
|
1754
|
-
f"({
|
|
1769
|
+
f"囲いの中でも書ける場所に npm の控えを追記"
|
|
1770
|
+
f"({NPM_CACHE_ALLOW}。足さないと職人の npm install が囲いで止まる)")
|
|
1755
1771
|
|
|
1756
1772
|
# ★同期モード(無人・1時間ごと)はここで打ち切る。この先は権限ルールの整理=人が見ている時だけ。
|
|
1757
|
-
# ここまでで触ったのは、移行で移した守りと sandbox.filesystem.allowWrite
|
|
1773
|
+
# ここまでで触ったのは、移行で移した守りと sandbox.filesystem.allowWrite(報告の置き場・npm の控え)だけ。
|
|
1758
1774
|
if sync_only:
|
|
1759
1775
|
finish(changes)
|
|
1760
1776
|
|