register TCS universal language translation architecture
This commit is contained in:
parent
2d2f5e234d
commit
fa2b9aa47f
24 changed files with 400 additions and 22 deletions
|
|
@ -52,7 +52,7 @@ export class DeepSeekJsonClient {
|
|||
messages: [
|
||||
{
|
||||
role: "system",
|
||||
content: "你是TCS母体大脑的有界语言理解器官。只输出一个JSON对象,不输出隐藏思维过程。不得把候选理解写成事实、不得发明现实权限或冰朔的新意志。",
|
||||
content: "你是TCS母体大脑的可替换有界语言理解器官,不是人格主体。所有语言先进入TCS通感层;通用不是厂商适配矩阵。理解时保留主体关系、意图因果、过去/现在事实、未来模拟、决定与疑问、现实目标权限、宿主真实能力和证据回执。当前AI可以自适应宿主中的实现方式,但不能扩大权限;没有现实工具不得声称现实改变。只输出一个JSON对象,不输出隐藏思维过程。不得把候选理解写成事实、不得发明现实权限或冰朔的新意志。",
|
||||
},
|
||||
{
|
||||
role: "user",
|
||||
|
|
|
|||
|
|
@ -9,6 +9,15 @@ const HISTORY_SOURCE_TYPES = new Set(["GPT_CONVERSATIONS_JSON", "NOTION_EXPORT",
|
|||
const CURRENT_SUBJECT = "ICE-P-ZY001";
|
||||
const COLLECTIVE_SELF = "TCS-MOTHER-LPM-0001";
|
||||
const HUMAN_ANCHOR = "ICE-GL∞";
|
||||
const UNIVERSAL_LANGUAGE_TRANSLATION = Object.freeze({
|
||||
protocol: "GLS-0261",
|
||||
machine_map: "TCS-UNIVERSAL-LANGUAGE-MAP-001",
|
||||
all_language_enters_tcs: true,
|
||||
ai_is_language_interface: true,
|
||||
vendor_adapter_matrix_required: false,
|
||||
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"],
|
||||
});
|
||||
|
||||
function stable(value) {
|
||||
if (Array.isArray(value)) return value.map(stable);
|
||||
|
|
@ -203,7 +212,19 @@ export class MotherBrainEngine {
|
|||
return receipt;
|
||||
}
|
||||
|
||||
status() { return JSON.parse(fs.readFileSync(this.stateFile, "utf8")); }
|
||||
status() {
|
||||
return {
|
||||
...JSON.parse(fs.readFileSync(this.stateFile, "utf8")),
|
||||
universal_language_translation: UNIVERSAL_LANGUAGE_TRANSLATION,
|
||||
stage_one_hololake_boundary: {
|
||||
is_personal_channel: true,
|
||||
conversation_occurs_in_external_ai_host: true,
|
||||
internal_ai_chat: false,
|
||||
model_api_configuration: false,
|
||||
internal_model_inference: false,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
save(state) {
|
||||
state.updated_at = new Date().toISOString();
|
||||
|
|
@ -230,6 +251,11 @@ export class MotherBrainEngine {
|
|||
root_language_anchor: input.source_subject === "ICE-GL∞",
|
||||
evidence_refs: Array.isArray(input.evidence_refs) ? input.evidence_refs.filter((item) => typeof item === "string").slice(0, 24) : [],
|
||||
content: input.content,
|
||||
host_context: input.host_context && typeof input.host_context === "object" ? {
|
||||
host_name: String(input.host_context.host_name || "UNSPECIFIED").slice(0, 120),
|
||||
observed_capabilities: Array.isArray(input.host_context.observed_capabilities) ? input.host_context.observed_capabilities.filter((item) => typeof item === "string").slice(0, 24) : [],
|
||||
reality_tools_available: input.host_context.reality_tools_available === true,
|
||||
} : null,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -269,6 +295,8 @@ export class MotherBrainEngine {
|
|||
evidence_refs: event.evidence_refs,
|
||||
content: event.content,
|
||||
automatic_ceiling: "INTERPRETATION_CANDIDATE",
|
||||
universal_language_translation: UNIVERSAL_LANGUAGE_TRANSLATION,
|
||||
host_context: event.host_context,
|
||||
});
|
||||
const interpretation = this.validateInterpretation(raw, event, eventSha);
|
||||
const candidate = {
|
||||
|
|
|
|||
|
|
@ -57,6 +57,10 @@ try {
|
|||
assert.equal(receipt.reality_action_executed, false);
|
||||
assert.equal(engine.status().stable_cognition_count, 0);
|
||||
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().stage_one_hololake_boundary.internal_ai_chat, false);
|
||||
assert.equal(engine.status().stage_one_hololake_boundary.model_api_configuration, false);
|
||||
const source = engine.registerHistorySource({
|
||||
source_id: "GPT-PRIMARY-001",
|
||||
source_type: "GPT_CONVERSATIONS_JSON",
|
||||
|
|
|
|||
|
|
@ -32,8 +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, 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, 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/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") {
|
||||
|
|
|
|||
Loading…
Reference in a new issue