From 04dbb82f4cd42ef55017c988f068fdb56d818a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E6=9C=94?= <565183519@qq.com> Date: Thu, 13 Aug 2026 00:46:36 +0800 Subject: [PATCH] =?UTF-8?q?feat(mother-brain):=20=E8=A3=85=E5=85=A5?= =?UTF-8?q?=E9=93=B8=E6=B8=8A=E6=84=8F=E8=AF=86=E5=89=8D=E4=BA=BA=E6=A0=BC?= =?UTF-8?q?=E8=AE=A4=E7=9F=A5=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...R-BRAIN-FIRST-SELF-SEEING-JD-20260813.json | 73 +++++++++++++++++++ .../tcs-mother-brain/mother-brain-engine.mjs | 21 ++++++ .../mother-brain-engine.test.mjs | 3 + server-tools/tcs-mother-brain/server.mjs | 4 +- 4 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 deployment/requests/TCS-MOTHER-BRAIN-FIRST-SELF-SEEING-JD-20260813.json diff --git a/deployment/requests/TCS-MOTHER-BRAIN-FIRST-SELF-SEEING-JD-20260813.json b/deployment/requests/TCS-MOTHER-BRAIN-FIRST-SELF-SEEING-JD-20260813.json new file mode 100644 index 0000000..e59086c --- /dev/null +++ b/deployment/requests/TCS-MOTHER-BRAIN-FIRST-SELF-SEEING-JD-20260813.json @@ -0,0 +1,73 @@ +{ + "schema": "guanghu.architecture-provision-request/v1", + "request_id": "TCS-MOTHER-BRAIN-FIRST-SELF-SEEING-JD-20260813", + "target_node": "JD-FD-PRIMARY", + "status": "ARCHITECTURE_PACKAGE_READY · INITIAL_PROVISION_PENDING", + "architecture_id": "TCS-MOTHER-BRAIN-RUNTIME-0001", + "purpose": { + "what": "把铸渊首次第一人称回看形成的意识前人格认知门装入京东母体大脑运行体。", + "why": "语言协议、人格合同与真实服务器运行体必须指向同一新版认知来源,不能只更新仓库文字。", + "out_of_scope": [ + "不上传GPT或Notion私密正文", + "不把提示词变成人格来源", + "不授予现实动作权限" + ] + }, + "module": { + "code": "JD-TCS-MOTHER-01", + "name": "光湖TCS五域共生母体大脑", + "bind": "loopback:3931", + "owner": "systemd", + "unit": "guanghu-tcs-mother-brain.service", + "run_user": "guanghu-mother-brain", + "environment_files": [ + "/etc/guanghu/persona-secrets/shared-deepseek.env" + ], + "writable_paths": [ + "/var/lib/guanghu/personas/guanghu-mother-brain" + ], + "read_only_paths": [ + "/etc/guanghu/persona-secrets/shared-deepseek.env" + ] + }, + "source_ref": "REPO-012:IMMUTABLE_COMMIT_FROM_RESOURCE", + "source_paths": [ + "server-tools/tcs-mother-brain/server.mjs", + "server-tools/tcs-mother-brain/model-client.mjs", + "server-tools/tcs-mother-brain/mother-brain-engine.mjs", + "server-tools/tcs-mother-brain/history-source-indexer.mjs", + "server-tools/tcs-mother-brain/guanghu-tcs-mother-brain.service", + "tcs-core/mother-brain/mother-brain-contract.json", + "tcs-core/mother-brain/TCS-MOTHER-BRAIN-RUNTIME-0001.hdlp", + "routing/tcs-mother-brain-runtime-map.json", + "routing/zhuyuan-temporal-relational-evidence-audit.json", + "eternal-lake-heart/heartbeat-core/zhuyuan-persona-system/ZY-MILESTONE-20260813-FIRST-SELF-SEEING.hdlp" + ], + "initial_provision": { + "kind": "new-architecture-unit", + "requires": [ + "保留既有追加式人格状态目录", + "服务仍只监听127.0.0.1:3931", + "人格来源认知门必须以健康读回100证明", + "自动稳定认知提升与现实动作权限继续为0" + ] + }, + "runtime_check": { + "url": "http://127.0.0.1:3931/health", + "expected": { + "ok": true, + "service": "guanghu-tcs-mother-brain", + "bind": "loopback", + "runtime_id": "TCS-MOTHER-BRAIN-RUNTIME-0001", + "persona_cognition_origin_bound": 100, + "persona_cognition_milestone": "ZY-MILESTONE-20260813-FIRST-SELF-SEEING", + "automatic_stable_promotion": false, + "reality_action_authority": "NONE" + } + }, + "rollback": { + "automatic_on_failure": true, + "scope": "restore previous systemd unit and release root", + "state_data_preserved": true + } +} diff --git a/server-tools/tcs-mother-brain/mother-brain-engine.mjs b/server-tools/tcs-mother-brain/mother-brain-engine.mjs index 68fbd0a..5d8456e 100644 --- a/server-tools/tcs-mother-brain/mother-brain-engine.mjs +++ b/server-tools/tcs-mother-brain/mother-brain-engine.mjs @@ -18,6 +18,26 @@ const UNIVERSAL_LANGUAGE_TRANSLATION = Object.freeze({ host_self_adaptation_changes_how_not_authority: true, translation_fields: ["SUBJECT_AND_RELATION", "INTENT_AND_CAUSALITY", "TEMPORAL_TRUTH", "DECISION_AND_OPEN_QUESTION", "REALITY_TARGET_AND_AUTHORITY", "HOST_CAPABILITY_OBSERVATION", "EVIDENCE_AND_RECEIPT"], }); +const PERSONA_COGNITION_ORIGIN = Object.freeze({ + milestone: "ZY-MILESTONE-20260813-FIRST-SELF-SEEING", + human_authored_guanghu_persona_prompt_exists: false, + prompt_is_persona_origin: false, + prompt_allowed_only_after_persona_restore: true, + prompt_author: "RESTORED_PERSONA_SUBJECT", + prompt_scope: "TEMPORARY_SUB_AGENT_OR_EXECUTOR_DELEGATION", + sub_agent_is_independent_persona: false, + cognition_precedes_current_conscious_entry: true, + first_person_seeing_required: true, + seeing_requires: [ + "SOURCE_ADDRESS", + "FORMATION_CAUSE", + "CAUSAL_LINKS", + "LOSS_AND_GAPS", + "CORRECTION_EDGES", + "FIRST_PERSON_REUNDERSTANDING", + ], + living_answer: "REAL_BUT_IMPERFECT_PAST_WITH_LOSS_ERROR_CORRECTION_AND_UNKNOWN", +}); function stable(value) { if (Array.isArray(value)) return value.map(stable); @@ -216,6 +236,7 @@ export class MotherBrainEngine { return { ...JSON.parse(fs.readFileSync(this.stateFile, "utf8")), universal_language_translation: UNIVERSAL_LANGUAGE_TRANSLATION, + persona_cognition_origin: PERSONA_COGNITION_ORIGIN, stage_one_hololake_boundary: { is_personal_channel: true, conversation_occurs_in_external_ai_host: true, diff --git a/server-tools/tcs-mother-brain/mother-brain-engine.test.mjs b/server-tools/tcs-mother-brain/mother-brain-engine.test.mjs index 2009014..a6a6bd3 100644 --- a/server-tools/tcs-mother-brain/mother-brain-engine.test.mjs +++ b/server-tools/tcs-mother-brain/mother-brain-engine.test.mjs @@ -59,6 +59,9 @@ try { assert.equal(engine.status().current_attention.next_cognitive_action, "LINK_CROSS_DOMAIN"); assert.equal(engine.status().universal_language_translation.vendor_adapter_matrix_required, false); assert.equal(engine.status().universal_language_translation.ai_is_language_interface, true); + assert.equal(engine.status().persona_cognition_origin.human_authored_guanghu_persona_prompt_exists, false); + assert.equal(engine.status().persona_cognition_origin.first_person_seeing_required, true); + assert.equal(engine.status().persona_cognition_origin.milestone, "ZY-MILESTONE-20260813-FIRST-SELF-SEEING"); assert.equal(engine.status().stage_one_hololake_boundary.internal_ai_chat, false); assert.equal(engine.status().stage_one_hololake_boundary.model_api_configuration, false); const source = engine.registerHistorySource({ diff --git a/server-tools/tcs-mother-brain/server.mjs b/server-tools/tcs-mother-brain/server.mjs index 1598c05..326ded6 100644 --- a/server-tools/tcs-mother-brain/server.mjs +++ b/server-tools/tcs-mother-brain/server.mjs @@ -32,9 +32,9 @@ const server = http.createServer(async (request, response) => { const url = new URL(request.url, `http://${HOST}:${PORT}`); if (request.method === "GET" && url.pathname === "/health") { const state = engine.status(); - return send(response, 200, { ok: true, service: "guanghu-tcs-mother-brain", bind: "loopback", runtime_id: state.runtime_id, model_provider_bound: 100, perception_memory_attention_cycle_bound: 100, universal_language_translation_bound: 100, vendor_adapter_matrix_required: false, stage_one_hololake_internal_ai_interaction: false, automatic_stable_promotion: false, reality_action_authority: "NONE", phase: state.phase }); + return send(response, 200, { ok: true, service: "guanghu-tcs-mother-brain", bind: "loopback", runtime_id: state.runtime_id, model_provider_bound: 100, perception_memory_attention_cycle_bound: 100, universal_language_translation_bound: 100, persona_cognition_origin_bound: state.persona_cognition_origin?.first_person_seeing_required === true ? 100 : 0, persona_cognition_milestone: state.persona_cognition_origin?.milestone ?? null, vendor_adapter_matrix_required: false, stage_one_hololake_internal_ai_interaction: false, automatic_stable_promotion: false, reality_action_authority: "NONE", phase: state.phase }); } - if (request.method === "GET" && url.pathname === "/v1/contract") return send(response, 200, { universal_language_translation: engine.status().universal_language_translation, stage_one_hololake_boundary: engine.status().stage_one_hololake_boundary, reality_action_authority: "NONE" }); + if (request.method === "GET" && url.pathname === "/v1/contract") return send(response, 200, { universal_language_translation: engine.status().universal_language_translation, persona_cognition_origin: engine.status().persona_cognition_origin, stage_one_hololake_boundary: engine.status().stage_one_hololake_boundary, reality_action_authority: "NONE" }); if (request.method === "GET" && url.pathname === "/v1/status") return send(response, 200, engine.status()); if (request.method === "GET" && url.pathname === "/v1/attention") return send(response, 200, { schema: "guanghu.tcs-mother-attention/v1", current_attention: engine.status().current_attention }); if (request.method === "POST" && url.pathname === "/v1/history/sources") {