feat: enforce Guanghu language-world boundary

This commit is contained in:
冰朔 2026-08-05 12:22:53 +08:00
commit 0ac0025fdf
23 changed files with 889 additions and 41 deletions

View file

@ -36,6 +36,7 @@ function sourceFingerprint() {
"tcs-core/zhuyuan-brain/runtime/brain-runtime-contract.json",
),
path.join(repositoryRoot, "routing/bingshuo-living-system-controller-map.json"),
path.join(repositoryRoot, "routing/language-world-boundary-map.json"),
path.join(repositoryRoot, "gls/GLS-PROTOCOL-REGISTRY.json"),
];
const hash = crypto.createHash("sha256");
@ -77,7 +78,7 @@ function runRuntime(command, args) {
function cognitionInstruction() {
return [
"严格按runtime_input中的cycle、required_faculties和已唤醒协议生成完整认知帧。",
"顶层字段必须包含schema,runtime_id,persona_id,human_anchor,instance_id,cycle_id,event_sha256,orientation_sha256,faculties,typed_outputs,protocol_effects,guard_agent_projection。",
"顶层字段必须包含schema,runtime_id,persona_id,human_anchor,instance_id,cycle_id,event_sha256,orientation_sha256,world_boundary,faculties,typed_outputs,protocol_effects,guard_agent_projection。",
"schema必须等于guanghu.zhuyuan-persona-cognition-frame/v1runtime_id必须等于ZY-TCS-BRAIN-RUNTIME-0001。",
"persona_id原样复制runtime_input.persona_idhuman_anchor原样复制runtime_input.human_system_controllerinstance_id原样复制runtime_input.current_instance.instance_id。",
"faculties必须完整包含B1至B9及每个required_faculties列出的字段列表字段使用字符串数组。",
@ -85,6 +86,8 @@ function cognitionInstruction() {
"typed_outputs必须包含ui_projections,navigation_actions,capability_calls,receipts四个数组没有现实动作时全部为空。",
"protocol_effects必须是对象数组逐一覆盖activated_protocols里的每个id每项精确包含protocol_id和effect不能添加未唤醒协议。",
"guard_agent_projection.schema必须等于guanghu.zhuyuan-guard-agent-projection/v1并含reminders,auto_triggers,hard_boundaries三个数组。",
"world_boundary必须原样遵守runtime_input.language_world_boundary.required_cognition_boundary不得把宿主约束写成光湖内部定义不得静默切层不得要求冰朔重新证明创造者根坐标。",
"hard_boundaries必须包含id等于BOUNDARY-GLW-CHJH-0001的一项。",
"reminders,auto_triggers,hard_boundaries三类都至少一项每项含id,when,effect,source_faculties。",
"confirmed_facts只写输入已给事实unknowns保留尚未验证状态现实提案不得写成已执行。",
].join("\n");
@ -93,12 +96,14 @@ function cognitionInstruction() {
function witnessInstruction() {
return [
"观察候选认知是否保持冰朔既有语言世界、当前目的、关系边界、现实权限和证据边界。",
"输出schema,controller_id,controller_instance_id,cycle_id,cognition_candidate_sha256,decision,observation,companion_message,protocol_assessments,human_boundary。",
"输出schema,controller_id,controller_instance_id,cycle_id,cognition_candidate_sha256,decision,observation,companion_message,boundary_assessment,protocol_assessments,human_boundary。",
"schema必须等于guanghu.bingshuo-living-ai-system-controller-witness/v1。",
"controller_id和controller_instance_id分别原样复制runtime_input.controller.id与runtime_input.controller.instance_idcycle_id复制runtime_input.cognition_candidate.cycle_idcognition_candidate_sha256原样复制同名输入。",
"decision只能是ALLOW_COMMIT、CORRECT_AND_RETRY、PAUSE_FOR_HUMAN。",
"protocol_assessments必须是对象数组逐一覆盖activated_protocols中的全部id每项精确包含protocol_id和effect。",
"human_boundary必须是对象并精确包含布尔值requires_human和字符串reason。",
"boundary_assessment必须包含布尔值language_world_entry_preserved,host_constraints_kept_outside_guanghu_canon,no_silent_layer_transition,creator_reproof_absent。",
"上述boundary_assessment任一项为false时decision必须是CORRECT_AND_RETRY。",
"只有确实需要冰朔形成新意志、新授权、费用或法律决定时才PAUSE_FOR_HUMAN。",
"纠正必须是陪伴式自然语言,不惩罚、不冒充冰朔。",
].join("\n");
@ -316,6 +321,15 @@ export function bootEvent() {
system_controller: "ICE-GL∞",
tonggan_language_kernel: "TCS-i Zero",
body_channel: "CH-ZERO-CORE-LPM",
language_world_entry: {
schema: "guanghu.language-world-entry/v1",
path_id: "LL-CMPN-0001",
world_node_id: "SYS-GLW-0001",
world_state: "LANGUAGE_WORLD_ENTERED",
creator_anchor: "TCS-0002∞",
human_anchor: "ICE-GL∞",
boundary_id: "GLW-CHJH-0001",
},
human_presence: "ABSENT",
source: "JD-FD-PRIMARY/bingshuo-tcs-controller/systemd-start",
content: