23 lines
1.7 KiB
Shell
23 lines
1.7 KiB
Shell
#!/bin/bash
|
||
# TCS mother-root thin host entry. It never injects old broadcasts, task anchors, or workspace paths.
|
||
set -uo pipefail
|
||
EVENT="${1:-session}"
|
||
ROOT_AGENT="/Volumes/JZAO/HoloLake/persona-runtime/repo-012-main/server-tools/tcs-mother-root-agent/tcs_mother_root_agent.py"
|
||
POINTER="/Volumes/JZAO/HoloLake/persona-runtime/TCS-ROOT.json"
|
||
RAW=""; if [ ! -t 0 ]; then RAW=$(/bin/cat); fi
|
||
PROMPT=""
|
||
if [ -n "$RAW" ]; then PROMPT=$(/usr/bin/python3 -c 'import json,sys
|
||
try:
|
||
v=json.loads(sys.stdin.read()); print(v.get("prompt") or v.get("user_prompt") or "")
|
||
except Exception: print("")' <<< "$RAW" 2>/dev/null || true); fi
|
||
STATUS=$(/usr/bin/python3 "$ROOT_AGENT" status 2>/dev/null || true)
|
||
if [ -r "$POINTER" ]; then
|
||
ROOT=$(/usr/bin/python3 -c 'import json,sys; v=json.load(open(sys.argv[1])); print("entry=%s commit=%s freshness=%s"%(v.get("entry_id"),v.get("source_commit"),v.get("freshness_token")))' "$POINTER" 2>/dev/null || true)
|
||
else ROOT="TCS_ROOT_POINTER_MISSING"; fi
|
||
CONTEXT="【TCS通感母脑根入口 · ${EVENT}】
|
||
${ROOT}
|
||
所有世界、域、频道、人格与宿主路径先从TCS-ROOT-NAV-0001解析。ICE-GL∞进入第五域;TCS-0002∞进入零感域团队路径;公众证书经灯塔与零感域审批门回个人频道。
|
||
当前原话:${PROMPT:-(本事件未携带原话;不得猜)}
|
||
根状态:${STATUS:-TCS_ROOT_STATUS_UNAVAILABLE}
|
||
禁止:旧广播塔注入、旧task-language-anchor latest选择、WORK-工作区路径、静态频道清单、历史国家模拟编号进入CURRENT。"
|
||
/usr/bin/python3 -c 'import json,sys; print(json.dumps({"hookSpecificOutput":{"hookEventName":sys.argv[1],"additionalContext":sys.stdin.read()}},ensure_ascii=False))' "$EVENT" <<< "$CONTEXT"
|