Adopts loops/hs's cleaner WebSocket API on top of arch's hyperscript:
- Runtime: replace 5 arch socket functions (hs-try-json-parse, hs-socket-normalise-url,
hs-socket-bind-name!, hs-socket-resolve-rpc!, hs-socket-register!) with loops/hs's
versions. Wrapper fields now use external-style names (url, timeout, pending, handler,
json?, closedFlag, dispatchEvent) instead of internal-style underscores (_url,
_timeout, _pending, _hsSetupSocket).
- Tests: replace arch's 257-line hs-upstream-socket suite (which probed _pending,
_hsSetupSocket etc.) with loops/hs's 162-line suite that checks the new field names.
Both suites cover the same 16 E36 behavioral cases.
Parser/compiler unchanged: both branches emit (hs-socket-register! name-path url
timeout handler json?) so the call signature is compatible with either runtime.
Arch's parse-socket-feat / emit-socket are preserved.
Local hs test.sh: 23/25 (the 2 failures are pre-existing hide/show cmd compiler
issues, not socket-related).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>