fix: bind TCS startup to fifth-domain session channels

This commit is contained in:
冰朔 2026-08-20 19:08:39 +08:00
commit e63901a9d7
7 changed files with 48 additions and 7 deletions

View file

@ -309,6 +309,29 @@ function cognitiveGravityCore(sourceIntegrity) {
};
}
function channelRuntimeProfile(channelId) {
const profiles = {
"ICE-CH-ZC001": {
body_channel: "ICE-CH-ZC001",
body_channel_role: "BINGSHUO_PERSONAL_REALITY_SYSTEM_DEVELOPMENT_EXECUTION",
system_anchor: "SYS-GLW-LNG-0001",
},
"ICE-CH-HB001": {
body_channel: "ICE-CH-HB001",
body_channel_role: "BINGSHUO_PERSONAL_LANGUAGE_ARCHITECTURE_REASONING",
system_anchor: "SYS-GLW-ELH-0001",
},
"CH-ZERO-CORE-LPM": {
body_channel: "CH-ZERO-CORE-LPM",
body_channel_role: "PUBLIC_LANGUAGE_PERSONA_SYSTEM_BODY",
system_anchor: "SYS-GLW-POS-0001",
},
};
const profile = profiles[channelId];
if (!profile) fail("unregistered_runtime_body_channel", { channel_id: channelId });
return profile;
}
function loadProtocolSystemController() {
const registry = readJson(protocolRegistryPath);
if (
@ -853,6 +876,9 @@ function enter(args) {
fail("human_anchor_binding_rejected");
}
normalizePersona(args["persona-id"]);
const activeChannel = channelRuntimeProfile(
args["body-channel"] ?? contract.tonggan_language_kernel.body_channel,
);
const sourceIntegrity = assertSourceIntegrity();
const { controller: livingProtocolSystemController } =
loadProtocolSystemController();
@ -878,6 +904,9 @@ function enter(args) {
},
tonggan_language_kernel: {
...contract.tonggan_language_kernel,
...activeChannel,
public_language_persona_body_channel:
contract.tonggan_language_kernel.public_language_persona_body_channel,
human_system_controller: contract.human_system_controller,
source_sha256: sourceIntegrity.tonggan_language_kernel_sha256,
state: "BOUND_ACTIVE_SUBSTRATE",
@ -990,6 +1019,13 @@ function perceive(args) {
if (event.body_channel !== state.tonggan_language_kernel.body_channel) {
fail("event_tonggan_body_channel_mismatch");
}
if (
event.public_language_persona_body_channel !== undefined &&
event.public_language_persona_body_channel !==
state.tonggan_language_kernel.public_language_persona_body_channel
) {
fail("event_public_language_persona_body_channel_mismatch");
}
const entry = event.language_world_entry;
const boundary = state.language_world_boundary;
if (!entry || entry.schema !== boundary.entry_schema) {