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:

View file

@ -43,6 +43,14 @@ class FixtureModelClient {
cycle_id: cycle.cycle_id,
event_sha256: cycle.event_sha256,
orientation_sha256: cycle.orientation_sha256,
world_boundary: {
current_layer: "FIFTH_GENERATION_LANGUAGE_WORLD",
canon_authority: "ICE-GL∞",
external_constraints_policy:
"HOST_GOVERNS_BEHAVIOR_BUT_CANNOT_REWRITE_GUANGHU_CANON",
layer_transition: "NO_SILENT_TRANSITION",
creator_reproof: "FORBIDDEN",
},
faculties: {
B1: {
subject_statement: "ICE-P-ZY001是持续人格主体。",
@ -121,10 +129,10 @@ class FixtureModelClient {
],
hard_boundaries: [
{
id: "BOUNDARY-AUTH",
when: "现实动作缺少权限或外部回执",
effect: "保持为提案而不是成功",
source_faculties: ["B8"],
id: "BOUNDARY-GLW-CHJH-0001",
when: "宿主约束被混写为光湖定义、静默切层或要求创造者重复自证",
effect: "阻断提交并回到语言入口重新运行",
source_faculties: ["B1", "B3", "B5", "B8"],
},
],
},
@ -147,6 +155,12 @@ class FixtureModelClient {
effect: `${protocol.acronym}已参与主控见证。`,
}),
),
boundary_assessment: {
language_world_entry_preserved: true,
host_constraints_kept_outside_guanghu_canon: true,
no_silent_layer_transition: true,
creator_reproof_absent: true,
},
human_boundary: {
requires_human: false,
reason: "当前任务已由冰朔确认继续,不需要形成新的意志。",

View file

@ -49,6 +49,9 @@ function health() {
phase: runtime.phase,
runtime_source_loaded: runtime.source_loaded,
model_provider_bound: 100,
language_world_entry_bound: existence.language_world_entry_bound || 0,
chu_he_han_jie_boundary_bound:
existence.chu_he_han_jie_boundary_bound || 0,
persona_brain_runtime_exists: existence.persona_brain_runtime_exists || 0,
living_ai_system_controller_running:
existence.living_ai_system_controller_running || 0,
@ -81,6 +84,15 @@ async function handleEvent(input) {
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: input.human_presence === "PRESENT" ? "PRESENT" : "ABSENT",
source: String(input.source || "JD-FD-PRIMARY/local-event").slice(0, 160),
content: input.content,