Restore stashed WIP: live streaming plan, forms, CI pipeline, streaming demo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 22:07:59 +00:00
parent df1aa4e1d1
commit 5a68046bd8
21 changed files with 1463 additions and 120 deletions

View File

@@ -327,6 +327,25 @@ def _load_engine_from_bootstrap(env):
eval_file("engine.sx", env)
def _load_forms_from_bootstrap(env):
"""Load forms functions (including streaming protocol) from sx_ref.py."""
try:
from shared.sx.ref.sx_ref import (
stream_chunk_id,
stream_chunk_bindings,
normalize_binding_key,
bind_stream_chunk,
validate_stream_data,
)
env["stream-chunk-id"] = stream_chunk_id
env["stream-chunk-bindings"] = stream_chunk_bindings
env["normalize-binding-key"] = normalize_binding_key
env["bind-stream-chunk"] = bind_stream_chunk
env["validate-stream-data"] = validate_stream_data
except ImportError:
eval_file("forms.sx", env)
def main():
global passed, failed, test_num
@@ -362,6 +381,8 @@ def main():
continue
# Load prerequisite spec modules
if spec_name == "eval":
_load_forms_from_bootstrap(env)
if spec_name == "router":
_load_router_from_bootstrap(env)
if spec_name == "deps":