Files
ISEP/docs/permissions-allow.json
isep-hand 65120a1c65 雲端要拿得到票、主線與通知:白名單住 ISEP、主線檔隨 repo 走、leo21c 讀放寫擋(inkstone/ISEP#130)
- docs/permissions-allow.json + scripts/settings-allow-sync:四個 Gitea 正門工具的權限白名單一份,
  setup script 裝完 plugin 寫一次、SessionStart 每次再對一次(只加不減、冪等)
- hooks/lib/mainline.py/scripts/mainline:家目錄沒主線就讀 InkStoneCo/system-dev/mainline.json;
  set/adopt/clear 兩份一起寫,refresh 只寫家目錄
- hooks/leo21c-write-guard.sh:唯讀 -d(tr/cut/sort…)先剪掉再判、notify_leo trigger 放行
  (與 prod-write-guard 同一份白名單)、改法段改印 09-02 起的 youlin 子網域;補第一支測試(26 條)
- prod-write-guard/main-and-prod-push-guard/kbdb-live-exam:認得 youlin 新子網域 arcrun-yuga3bse
- scripts/ticket:收件 repo 寫 inkstone/ISEP 不再 404(org 寫錯當場講)
- scripts/isep-notify:有 TELEGRAM_BOT_TOKEN/TELEGRAM_CHAT_ID 先走 Bot API 直送(雲端唯一通的路)
- 測試:A31–A35 共 79 條;README/plugin.json/hooks-inventory 數字實數(61 支、85 條、53 支腳本)

假設(記在這裡等 review):權限規則的形狀沿用 leo 09-07 親手加、實測有效的那四條;
「分類器真的不擋」要雲端一趟 run 的 permission_denials 才驗得到,本 PR 驗不了。
版本:待總管定版(plugin.json 仍 0.22.0)。

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTZ9QtvjY7MNxjfQbexAm7
2026-09-07 01:17:15 +00:00

30 lines
2.0 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"_what": "Claude Code 權限白名單(permissions.allow)的唯一清單——本機與雲端都從這裡讀,不各養一份(inkstone/ISEP#130",
"_why": [
"leo 09-07 親手把四個 Gitea 正門工具(ticketmainlinegate-okgitea-pr-merge)加進本機 InkStoneCo/.claude/settings.jsonauto mode 的分類器才不擋。",
"雲端 session 沒有那四條,同樣的動作照樣被擋(09-04 progress-guard run logpermission_denials=6)。",
"薄殼 repoGitHub)要 D20 開閘才推得動 ⇒ 白名單住 ISEP`scripts/settings-allow-sync` 開工時寫進那台機器的 ~/.claude/settings.json。",
"以後加規則只改這個檔、出一版,雲端下一趟就有。"
],
"_rules": [
"開頭的 `~` 由 settings-allow-sync 換成那台機器的家目錄(本機 /Users/…、雲端 /root),其餘一字不改。",
"只放「正門工具」:每一條都要說得出它是哪支腳本的哪種呼叫形狀。不放 Bash(python3 *) 這種整類放行。",
"同一支工具幾種呼叫形狀就幾條(快取路徑/$CLAUDE_PLUGIN_ROOT/相對路徑)——權限規則是逐條完全比對,形狀差一個字就落在規則之外(scripts/gate-ok 檔頭記過這一課)。"
],
"allow": [
"Bash(python3 ~/.claude/plugins/cache/inkstone/isep/*/scripts/ticket *)",
"Bash(python3 \"$CLAUDE_PLUGIN_ROOT/scripts/ticket\" *)",
"Bash(python3 \"$CLAUDE_PLUGIN_ROOT\"/scripts/ticket *)",
"Bash(python3 scripts/ticket *)",
"Bash(python3 ~/.claude/plugins/cache/inkstone/isep/*/scripts/mainline *)",
"Bash(python3 \"$CLAUDE_PLUGIN_ROOT/scripts/mainline\" *)",
"Bash(python3 \"$CLAUDE_PLUGIN_ROOT\"/scripts/mainline *)",
"Bash(python3 scripts/mainline *)",
"Bash(bash ~/.claude/plugins/cache/inkstone/isep/*/scripts/gate-ok *)",
"Bash(bash \"$CLAUDE_PLUGIN_ROOT/scripts/gate-ok\" *)",
"Bash(bash \"$CLAUDE_PLUGIN_ROOT\"/scripts/gate-ok *)",
"Bash(bash scripts/gate-ok *)",
"Bash(bash scripts/gitea-pr-merge.sh *)"
]
}