AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 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]].