AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
WebSocket (RFC 6455) for chez-http-server, in Chez Scheme
Translation pending
Developer toolsScheme · ShellGitHub @Kiyomi-Computation-SystemsOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗WebSocket (RFC 6455) for [[https://github.com/Kiyomi-Computation-Systems/chez-http-server][chez-http-server]], the HTTP/1.1 server for Chez Scheme.
#+begin_quote ✨ AI Disclosure: LLMs are used extensively in the planning and development of this project. #+end_quote
** Features
No compression and no client: this library is for servers. The API may change in any release before 1.0. [[file:CHANGELOG.md][CHANGELOG.md]] lists what each release changes.
** Quick start
#+begin_src scheme (import (rnrs) (http-server) (websocket))
(serve (lambda (request) (if (string=? (request-path request) "/echo") (websocket-accept request (lambda (ws) (let loop () (websocket-send! ws (websocket-receive ws)) (loop)))) (make-response 404 #f '() (string->utf8 "not found\n"))))) #+end_src
Save it as echo.sps, start it with make run PROGRAM=echo.sps, and connect
a client such as websocat ws://127.0.0.1:8080/echo: each line you send comes
back. How a handler reads, writes and closes is in [[file:docs/handlers.md][docs/handlers.md]], and
the rest of the documentation starts at [[file:docs/README.md][docs/README.md]], also published at
[[https://kiyomi-computation-systems.github.io/chez-websocket/][kiyomi-computation-systems.github.io/chez-websocket]].
** Build and test
Prerequisites:
The one dependency, chez-http-server, is a git submodule under vendor/,
pinned at a release tag. It carries its own pins: chez-libuv, chez-httparse
(with byte-machine), uriparse, and chez-srfi for the tests.
#+begin_src sh git clone https://github.com/Kiyomi-Computation-Systems/chez-websocket.git cd chez-websocket make build # clones the pins, builds the chez-libuv shim, assembles the library path make test # runs every tests/test-*.sps #+end_src
Clone without --recursive: make submodules, which make build runs, clones
what the build needs and not the server's own test clients. make help lists
every target; make check-pins verifies the server sits at its pin, and each
pin it carries where the server records it.
make site renders docs/ into build/site/, the pages GitHub Pages
publishes for each release. It needs the system cmark-gfm library (brew
install cmark-gfm or apt install cmark-gfm); make check-site fails on a
broken link or anchor.
** Autobahn
make autobahn runs Autobahn|Testsuite's fuzzing client in Docker against
[[file:tests/autobahn/echo.sps][tests/autobahn/echo.sps]], and fails if any case's verdict differs from
[[file:tests/autobahn/verdicts.txt][tests/autobahn/verdicts.txt]], better or worse. Autobahn's image is built for
amd64, so Docker emulates it on other machines. On Linux the echo server runs
on your machine. On macOS and Windows, whose Docker Desktop has no host
network, it runs in a Linux container beside Autobahn: make echo-image builds
it, the first time in about four minutes, and make docker-smoke checks it
starts and stops.
** Configuration
Every limit has a default and a CHEZ_WS_ environment override, read once as
your program starts — see [[file:docs/configuration.md][docs/configuration.md]]. The server's own CHEZ_HTTP_
variables still apply.
** Handlers
How a handler takes a WebSocket, what the handshake refuses, how to read, write and close, what each close means, and how to choose subprotocols, origins and limits of its own — see [[file:docs/handlers.md][docs/handlers.md]].
** Examples
[[file:examples/README.org][examples/]] holds small servers to run and talk to from your browser: an
echo, a chat room, and a clock that sends a tick each second. Start one with
make run PROGRAM=examples/echo.sps and open http://127.0.0.1:8080/.
** Contributing
[[file:CONTRIBUTING.md][CONTRIBUTING.md]] says how to set up, which checks a pull request must pass, and the house rules.
** Security
Report a vulnerability privately; [[file:SECURITY.md][SECURITY.md]] says how.
** License
© [[https://kiyomicomputation.systems/][Kiyomi Computation Systems LLC]]. Licensed under BSD 3-Clause — see [[file:LICENSE][LICENSE]].