feat(persona): add isolated baby cognition and time runtimes

This commit is contained in:
冰朔 2026-09-13 01:13:06 +08:00
commit 4dcc43bab5
26 changed files with 869 additions and 56 deletions

View file

@ -6,6 +6,11 @@ def endpoint(command):
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]
dynamic=re.fullmatch(r'zy-rpc persona-(status|current|public-key|body|time|ingest|life-event) (ICE-(?:P|BB)-[A-Z0-9-]+)',command)
if dynamic:
action,persona=dynamic.groups();mapping={'status':('GET','status'),'current':('GET','current'),'public-key':('GET','public-key'),'body':('GET','body'),'time':('GET','time-master'),'ingest':('POST','ingest'),'life-event':('POST','life-events')};method,suffix=mapping[action];return method,f'/v1/persona/{persona}/{suffix}'
job=re.fullmatch(r'zy-rpc persona-job (ICE-(?:P|BB)-[A-Z0-9-]+) ([a-f0-9]{64})',command)
if job:return 'GET',f'/v1/persona/{job.group(1)}/jobs/{job.group(2)}'
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():