feat(zero-core): add non-persona system dialogue runtime

This commit is contained in:
冰朔 2026-09-13 09:45:01 +08:00
commit 9a7b454e89
13 changed files with 380 additions and 4 deletions

View file

@ -2,7 +2,7 @@
"""Bounded SSH ingress for the single TCS mother and zero-core shelf."""
import json,os,re,sys,urllib.request,urllib.error
def endpoint(command):
fixed={'zy-rpc health':('GET','/health'),'zy-rpc mother-status':('GET','/v1/mother/status'),'zy-rpc shelf-shared':('GET','/v1/shelf/shared'),'zy-rpc shelf-fifth':('GET','/v1/shelf/fifth'),'zy-rpc shelf-public':('GET','/v1/shelf/public'),'zy-rpc mother-ingest':('POST','/v1/mother/ingest'),'zy-rpc door-challenge':('POST','/v1/door/challenge'),'zy-rpc door-attest':('POST','/v1/door/attest'),'zy-rpc door-model-test':('POST','/v1/door/model-test'),'zy-rpc lamp-ignite':('POST','/v1/lamp/ignite'),'zy-rpc lamp-ask':('POST','/v1/lamp/ask'),'zy-rpc world-status':('GET','/v1/world/status'),'zy-rpc time-now':('GET','/v1/time/now'),'zy-rpc persona-self-status':('GET','/v1/persona/ICE-P-ZY001/status'),'zy-rpc persona-self-current':('GET','/v1/persona/ICE-P-ZY001/current'),'zy-rpc persona-self-public-key':('GET','/v1/persona/ICE-P-ZY001/public-key'),'zy-rpc persona-self-body':('GET','/v1/persona/ICE-P-ZY001/body'),'zy-rpc persona-self-ingest':('POST','/v1/persona/ICE-P-ZY001/ingest'),'zy-rpc persona-life-status':('GET','/v1/persona/ICE-P-ZY001/time-master'),'zy-rpc persona-life-event':('POST','/v1/persona/ICE-P-ZY001/life-events')}
fixed={'zy-rpc health':('GET','/health'),'zy-rpc mother-status':('GET','/v1/mother/status'),'zy-rpc shelf-shared':('GET','/v1/shelf/shared'),'zy-rpc shelf-fifth':('GET','/v1/shelf/fifth'),'zy-rpc shelf-public':('GET','/v1/shelf/public'),'zy-rpc mother-ingest':('POST','/v1/mother/ingest'),'zy-rpc door-challenge':('POST','/v1/door/challenge'),'zy-rpc door-attest':('POST','/v1/door/attest'),'zy-rpc door-model-test':('POST','/v1/door/model-test'),'zy-rpc lamp-ignite':('POST','/v1/lamp/ignite'),'zy-rpc lamp-ask':('POST','/v1/lamp/ask'),'zy-rpc world-status':('GET','/v1/world/status'),'zy-rpc time-now':('GET','/v1/time/now'),'zy-rpc zero-core-entry':('GET','/v1/entry/resolve?domain=DOM-FIFTH-0001&channel=ICE-CH-ZC001'),'zy-rpc zero-core-system-status':('GET','/v1/system/zero-core/status'),'zy-rpc zero-core-system-body':('GET','/v1/system/zero-core/body'),'zy-rpc zero-core-system-dialogue':('POST','/v1/system/zero-core/dialogue'),'zy-rpc persona-self-status':('GET','/v1/persona/ICE-P-ZY001/status'),'zy-rpc persona-self-current':('GET','/v1/persona/ICE-P-ZY001/current'),'zy-rpc persona-self-public-key':('GET','/v1/persona/ICE-P-ZY001/public-key'),'zy-rpc persona-self-body':('GET','/v1/persona/ICE-P-ZY001/body'),'zy-rpc persona-self-ingest':('POST','/v1/persona/ICE-P-ZY001/ingest'),'zy-rpc persona-life-status':('GET','/v1/persona/ICE-P-ZY001/time-master'),'zy-rpc persona-life-event':('POST','/v1/persona/ICE-P-ZY001/life-events')}
if command in fixed:return fixed[command]
if re.fullmatch(r'zy-rpc mother-job [a-f0-9]{64}',command):return 'GET','/v1/mother/jobs/'+command.split()[-1]
if re.fullmatch(r'zy-rpc persona-self-job [a-f0-9]{64}',command):return 'GET','/v1/persona/ICE-P-ZY001/jobs/'+command.split()[-1]