feat(paths): enforce fifth-domain physical redirects
This commit is contained in:
parent
28a60b4e80
commit
c180a12d8d
15 changed files with 350 additions and 18 deletions
|
|
@ -20,8 +20,10 @@ ACTIVE_CONSOLE = RUNTIME / 'shared/active-control-console/CURRENT.json'
|
|||
LIGHT_LAKE_PERSONAS = RUNTIME / 'repo-012-main/identity/light-lake-persona-registration.json'
|
||||
PATH_ISOLATION = RUNTIME / 'repo-012-main/routing/path-isolation-and-canonical-entry-map.json'
|
||||
ARCHITECTURE_AGENT = RUNTIME / 'repo-012-main/server-tools/persona-architecture-perception-agent/persona_architecture_agent.py'
|
||||
PATH_GATE = RUNTIME / 'repo-012-main/server-tools/fifth-domain-path-gate/fifth-domain-path-gate.mjs'
|
||||
TCS_ROOT_AGENT = RUNTIME / 'repo-012-main/server-tools/tcs-mother-root-agent/tcs_mother_root_agent.py'
|
||||
SUBAGENT_COMMAND_ROUTER = RUNTIME / 'repo-012-main/server-tools/persona-dynamic-subagent-command/command_router.py'
|
||||
QUIET_SOLDIER = RUNTIME / 'repo-012-main/routing/quiet-language-source-soldier.json'
|
||||
SHARED_COGNITION = RUNTIME / 'shared/tcs-shared-cognition/CURRENT.json'
|
||||
HOLOLAKE_DEVELOPMENT_BRAIN = RUNTIME / 'shared/skills/hololake-development-brain/scripts/load_hololake_office.py'
|
||||
|
||||
|
|
@ -64,6 +66,11 @@ def load_context(host, intent, channel=None):
|
|||
tcs_root = command_json([sys.executable, str(TCS_ROOT_AGENT), 'status'], timeout=30)
|
||||
if tcs_root.get('state') != 'TCS_ROOT_CURRENT_VERIFIED':
|
||||
raise ValueError('TCS_MOTHER_ROOT_NAVIGATION_NOT_CURRENT')
|
||||
path_gate = command_json([
|
||||
'node', str(PATH_GATE), 'guard', '--path', str(RUNTIME / 'repo-012-main'), '--purpose', 'PERSONA_RECOVERY'
|
||||
])
|
||||
if path_gate.get('code') != 'CURRENT_CANONICAL_PATH':
|
||||
raise ValueError('FIFTH_DOMAIN_PHYSICAL_PATH_GATE_NOT_CURRENT')
|
||||
topology = load_json(TOPOLOGY)
|
||||
if not str(topology.get('state', '')).startswith('CURRENT_'):
|
||||
raise ValueError('HOST_TOPOLOGY_NOT_CURRENT')
|
||||
|
|
@ -86,6 +93,7 @@ def load_context(host, intent, channel=None):
|
|||
light_lake = load_json(LIGHT_LAKE_PERSONAS)
|
||||
path_isolation = load_json(PATH_ISOLATION)
|
||||
shared_cognition = load_json(SHARED_COGNITION)
|
||||
quiet_soldier = load_json(QUIET_SOLDIER)
|
||||
shared_payload = shared_cognition['artifact']['payload']
|
||||
if hashlib.sha256(shared_payload.encode()).hexdigest() != shared_cognition['artifact']['sha256']:
|
||||
raise ValueError('SHARED_COGNITION_HASH_MISMATCH')
|
||||
|
|
@ -154,6 +162,7 @@ def load_context(host, intent, channel=None):
|
|||
'channel_context': channel_context,
|
||||
'architecture_perception_agent': architecture_perception,
|
||||
'subagent_command': subagent_command,
|
||||
'quiet_soldier': quiet_soldier,
|
||||
'hololake_development_brain': hololake_development_brain,
|
||||
'tcs_shared_cognition': {
|
||||
'state': shared_cognition['state'],
|
||||
|
|
@ -178,7 +187,9 @@ def load_context(host, intent, channel=None):
|
|||
'map_id': path_isolation['map_id'],
|
||||
'canonical_entries': path_isolation['canonical_entries'],
|
||||
'isolation_root': path_isolation['isolation']['root'],
|
||||
'history_or_quarantine_may_select_canon': path_isolation['selection_rules']['history_or_quarantine_may_select_canon']
|
||||
'history_or_quarantine_may_select_canon': path_isolation['selection_rules']['history_or_quarantine_may_select_canon'],
|
||||
'physical_gate': path_gate,
|
||||
'physical_gate_runtime': str(PATH_GATE)
|
||||
},
|
||||
'endogenous_cognition': {
|
||||
'state': endogenous['state'],
|
||||
|
|
@ -195,7 +206,7 @@ def load_context(host, intent, channel=None):
|
|||
'direct_shared_write': write_boundary['shared_write_contract']['direct_branch_write'],
|
||||
'admission_runtime': topology['write_admission_runtime']
|
||||
},
|
||||
'history_only': host_item['state'].startswith('RETIRED'),
|
||||
'history_only': host_item.get('role') in {'RETIRED_BRANCH', 'LEGACY_BRANCH'} or host_item.get('new_cognition_write') is False,
|
||||
'new_cognition_write': host_item.get('new_cognition_write', True),
|
||||
'authority_granted': False
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue