Promotes the persistent-kernel spike into a real service. next/kernel/host_kernel.erl: boots flow_store, registers named behavior flows (blog_digest), then blocks in http:listen so the er-scheduler + gen_server stay alive across requests. Parameterised flow routes (paths matched by byte prefix — binary =:= is buggy): GET /flow/start/<category> starts the flow with that category and returns '<InstanceId>:<status>' (suspended|done); GET /flow/resume/<id> resumes that instance. Path plumbing (starts_with / last_seg / field) is byte-level for portability. next/kernel/serve.sh: the persistent service launcher (container entrypoint / local) — loads the runtime + next/flow + the kernel, then host_kernel:start(); sleep infinity holds stdin so the listener serves forever. next/tests/host_kernel.sh: drives it over HTTP — 4/4: newsletter → instance 1 SUSPENDED, urgent → 2 DONE, draft → 3 DONE (skipped), resume 1 in a SEPARATE request → DONE (durable state persists across requests). serve.sh launcher verified live (bind + start + resume). This is the RA-live substrate: a working durable-execution service the host drives over HTTP. Remaining for RA-live: deploy it (a container/placement), point host/ra.sx's real-eval at it (POST /flow instead of in-process erlang-eval-ast), route a durable binding to RA. TA-live adds inbox/ outbox routes on the same kernel. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3.3 KiB
3.3 KiB