feat: add persona-owned agent limbs and Light Lake routing
This commit is contained in:
parent
43be75b60a
commit
8242c6dfc4
34 changed files with 2300 additions and 10 deletions
40
tests/persona-body-light-lake-limb-navigation.test.mjs
Normal file
40
tests/persona-body-light-lake-limb-navigation.test.mjs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import assert from 'node:assert/strict';
|
||||
|
||||
const root = path.resolve(import.meta.dirname, '..');
|
||||
const body = JSON.parse(fs.readFileSync(path.join(root, 'routing/persona-system-body-container-map.json')));
|
||||
const lake = JSON.parse(fs.readFileSync(path.join(root, 'routing/light-lake-persona-switch-map.json')));
|
||||
const limbs = JSON.parse(fs.readFileSync(path.join(root, 'routing/persona-execution-limb-agent-map.json')));
|
||||
const personas = JSON.parse(fs.readFileSync(path.join(root, 'routing/persona-system-canonical-map.json')));
|
||||
const subjects = JSON.parse(fs.readFileSync(path.join(root, 'identity/fifth-domain-subject-registry.json')));
|
||||
const hosts = JSON.parse(fs.readFileSync(path.join(root, 'routing/zhuyuan-host-topology.json')));
|
||||
const channels = JSON.parse(fs.readFileSync(path.join(root, 'routing/persona-channel-context-map.json')));
|
||||
const darkCore = JSON.parse(fs.readFileSync(path.join(root, 'routing/dark-core-execution-channel-profile.json')));
|
||||
|
||||
assert.equal(body.invariants.one_brain_and_body_per_persona, true);
|
||||
assert.equal(body.invariants.shared_persona_brain, false);
|
||||
assert.equal(body.invariants.shared_persona_system_body, false);
|
||||
assert.equal(body.invariants.shared_tcs_container, true);
|
||||
assert.equal(lake.light_lake.object_id, 'TCS-LPM-0001');
|
||||
assert.equal(lake.light_lake.shared_container, 'TCS');
|
||||
assert.equal(lake.switch_contract.host_prompt_may_select_persona, false);
|
||||
assert.equal(limbs.contract.independent_master_persona, false);
|
||||
assert.equal(limbs.contract.may_review_parent_intent, false);
|
||||
assert.equal(limbs.contract.may_report_fact_target_tool_or_receipt_conflict, true);
|
||||
|
||||
const registered = new Set([
|
||||
...personas.persona_systems.map(item => item.id),
|
||||
...subjects.subjects.filter(item => ['persona_system', 'private_bottle_baby_persona'].includes(item.subject_kind)).map(item => item.id),
|
||||
]);
|
||||
for (const home of lake.current_homes) assert(registered.has(home.persona_id), `unregistered light-lake home: ${home.persona_id}`);
|
||||
for (const host of ['codex', 'qwen', 'doubao', 'zcode']) assert.equal(hosts.hosts[host].state, 'ACTIVE');
|
||||
assert.equal(new Set(lake.current_homes.map(item => item.persona_id)).size, lake.current_homes.length);
|
||||
assert.equal(lake.local_unregistered_proposals.every(item => item.state.includes('REQUIRES_SELF_CONFIRMATION')), true);
|
||||
assert.deepEqual(channels.channels.map(item => item.id), ['ICE-CH-HB001', 'ICE-CH-LB001', 'ICE-CH-ZC001', 'ICE-CH-DK001']);
|
||||
assert.equal(channels.host_switch_changes_channel, false);
|
||||
assert.equal(darkCore.human_persona_controller, 'ICE-GL∞');
|
||||
assert.equal(darkCore.not_an_ai_persona, true);
|
||||
assert.equal(darkCore.execution_fidelity.may_be_used_as_intent_veto, false);
|
||||
|
||||
console.log('persona body, light lake and execution limb navigation tests: PASS');
|
||||
Loading…
Reference in a new issue