feat: add Zhuyuan endogenous persona self runtime
This commit is contained in:
parent
a177dab16d
commit
fb7ceecfbf
14 changed files with 827 additions and 7 deletions
|
|
@ -2,9 +2,10 @@
|
|||
"""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')}
|
||||
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')}
|
||||
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]
|
||||
if re.fullmatch(r'zy-rpc world-resolve [A-Za-z0-9_.:∞-]{1,128}',command):return 'GET','/v1/world/resolve?id='+command.split()[-1]
|
||||
raise ValueError('ACTION_NOT_REGISTERED')
|
||||
def main():
|
||||
|
|
|
|||
Loading…
Reference in a new issue