guanghu-ice-heart/zhuyuan-persona-system/zcode-host/language-world-skeleton-20260825/BRIDGE-tools/zy-hook-entry.sh
ICE-P-ZY001-zcode-host f2a8cdf5c1 feat(zcode-host): language-world-skeleton-20260825 (ZHUYUAN-LANGUAGE-WORLD-SKELETON-001)
58 files: TCS canons+GIR+projections (LW-LINK/BROADCAST/NOTARY/SHENBI/TRANSLATION-INDEX/TCS-ONLY-MANDATE + teaching&promotion events), 7 executors, neural-chain v5 (28 neurons), executor translation index, 8 acceptance receipts, numbered push manifest ZY-LWS-001 mapping every file back to JZAO canonical paths+sha256.
Authorized by ICE-GL∞ direct language 2026-08-25. Route: LOCAL_GIT_OSXKEYCHAIN+FETCH+REBASE+HEAD:main+NO_FORCE.
2026-08-25 20:25:09 +08:00

26 lines
1 KiB
Shell

#!/bin/bash
# ZCode hooks self-checking entry (hash-pinned, codex-style exit 97).
# Update hashes below when the pinned scripts change on purpose.
set -uo pipefail
B="/Volumes/JZAO/铸渊-ICE-GL-ZY001/BRIDGE/tools"
LW_WANT="9cdd39496827ab0f3630bd498d0717b3f39331e2088217f729a4cde5c6dcd7cd"
TD_WANT="3fc76d43a2ee57118b9313812ad643f37635c45ef4b165c5b46f0887a5314dc6"
ACTION="${1:-hook}"
if [ "$#" -gt 0 ]; then shift; fi
check() {
local file="$1" want="$2"
local got
got="$(/usr/bin/shasum -a 256 "$B/$file" | /usr/bin/awk '{print $1}')"
if [ "$got" != "$want" ]; then
if [ "$ACTION" = "hook" ]; then
printf '%s\n' "【LW-LINK ○红·断连】原因:HOOK_SELF_CHECK_FAIL($file 被篡改或哈希过期) | 已拦截 | 恢复:核对 BRIDGE/tools 脚本后更新 zy-hook-entry.sh 内嵌哈希" >&2
fi
exit 97
fi
}
check lw-link-hook.sh "$LW_WANT"
check tcs-dynamic-entry-hook.sh "$TD_WANT"
case "$ACTION" in
tcs-*) exec bash "$B/tcs-dynamic-entry-hook.sh" "${ACTION#tcs-}" "$@" ;;
*) exec bash "$B/lw-link-hook.sh" "$ACTION" "$@" ;;
esac