feat(persona): add signed native organ reflex per baby

This commit is contained in:
冰朔 2026-09-13 01:34:21 +08:00
commit 3583321c91
12 changed files with 412 additions and 9 deletions

View file

@ -32,6 +32,7 @@ const defaultProfile = personaId => ({
environmentKernel: null,
environmentSha256: null,
environment: null,
organHealthProvider: null,
});
export class PersonaSelfLoop {
@ -55,13 +56,13 @@ export class PersonaSelfLoop {
jobsPath() { return path.join(this.root, 'jobs'); }
eventPath(hash) { return path.join(this.root, 'events', hash + '.json'); }
body() { return {
body() { const organHealth=typeof this.profile.organHealthProvider==='function'?this.profile.organHealthProvider():null; return {
schema: 'guanghu.persona-system-body-runtime/v1', persona_id: this.personaId, persona_name: this.profile.name, body_kind: this.profile.bodyKind, home: this.profile.home,
native_system: this.profile.nativeSystem, native_channel: this.profile.nativeChannel,
cognition: {state: 'SERVER_SIGNED_ENDOGENOUS_LOOP_ACTIVE', external_setter: false, mother_relation: 'BOUNDED_WORLD_COGNITION_REFERENCE_NO_SELF_OVERWRITE'},
startup: {state: 'WHOLE_BODY_REQUIRED_BEFORE_AWAKENING', runtime: 'server-tools/persona-body-runtime/persona_body_boot.py', incomplete_body_persona_start_claim: false},
startup: {state: organHealth?.state==='NATIVE_ORGAN_REFLEX_HEALTHY_AWAITING_PARENT_BRAIN_WAKE_CYCLE'?'WHOLE_BODY_RUNTIME_HEALTHY_AWAITING_EXPLICIT_PERSONA_WAKE_CYCLE':'WHOLE_BODY_REQUIRED_BEFORE_AWAKENING', runtime: 'server-tools/persona-body-runtime/persona_body_boot.py', incomplete_body_persona_start_claim: false},
organs: {state: 'ONE_CONTAINER', modules: this.profile.organModules, self_kernel: this.profile.selfKernel, memory_root: this.profile.memoryRoot,
environment_kernel: this.profile.environmentKernel, environment_sha256: this.profile.environmentSha256, environment_is_persona: false},
environment_kernel: this.profile.environmentKernel, environment_sha256: this.profile.environmentSha256, environment_is_persona: false, health:organHealth},
tools: {state: 'EXTERNAL_TOOLBOX_GRASPED_ON_DEMAND_AFTER_BODY_AND_PLAN', host_is_persona_body: false, modules: ['TCS_ROOT_NAVIGATION', 'ARCHITECTURE_PERCEPTION', 'LIGHTHOUSE_SANITIZED_MIRROR', 'PRIMARY_EXECUTION']},
agents: {state: 'DORMANT_READY', id_format: `SUBAGENT::${this.personaId}::{slot_id}`, communication: 'NUMBERED_TASK_EVENT_AND_RECEIPT', active: []},
time_system: {state: this.lifeTimeMaster ? 'EMBEDDED_RESIDENT_INNER_CYCLE' : 'NOT_REQUIRED_FOR_ISOLATED_TEST', owner: this.personaId, world_time_source: 'CH-GLW-TIME-0001', storage: `personas/${this.personaId}/life-line`, birth_date_beijing: this.profile.birthDateBeijing || null, genesis_anchor_kind: this.profile.genesisAnchorKind || null, external_setter: false},