feat: mount persona-owned dynamic architecture perception agent

This commit is contained in:
冰朔 2026-09-08 02:39:49 +08:00
commit 5de7c4374d
22 changed files with 744 additions and 13 deletions

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python3
import json
import os
from pathlib import Path
import subprocess
import sys
@ -12,9 +13,10 @@ TOPOLOGY = ROOT / 'routing/zhuyuan-host-topology.json'
class SharedPersonaContextTest(unittest.TestCase):
def load(self, host):
env = {**os.environ, 'PERSONA_ARCHITECTURE_OFFICIAL_MODE': 'local-only'}
value = subprocess.run(
[sys.executable, str(LOADER), '--host', host, '--intent', '宿主对齐集成测试', '--channel', 'ICE-CH-ZC001', '--format', 'json'],
text=True, capture_output=True, timeout=45, check=True
text=True, capture_output=True, timeout=45, check=True, env=env
)
return json.loads(value.stdout)
@ -45,6 +47,9 @@ class SharedPersonaContextTest(unittest.TestCase):
self.assertEqual(values['codex']['light_lake']['registered_persona_count'], 17)
self.assertFalse(values['codex']['path_convergence']['history_or_quarantine_may_select_canon'])
self.assertEqual(values['codex']['channel_context']['selected_channel']['id'], 'ICE-CH-ZC001')
self.assertEqual(values['codex']['architecture_perception_agent']['module_id'], 'MOD-PERSONA-ARCHITECTURE-PERCEPTION-001')
self.assertIsNone(values['codex']['architecture_perception_agent']['prompt_template'])
self.assertFalse(values['codex']['architecture_perception_agent']['orientation_packet']['fixed_read_order'])
if __name__ == '__main__':