- Rust 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
serve now refuses, before opening anything, a frame under 8192 bytes, fewer connections than max(sum of caller slots, 8), and a caller payload bound outside 4096..=frame-4096 (the base daemon's validate, unchanged). A provider result larger than frame-4096 becomes a typed result_size failure before it is recorded, so a retry replays deliverable bytes. A payload over a caller's bound is refused Policy on the wire instead of dropping the connection. The orphan capacity helpers are deleted; the accept loop takes its connection source so a test can present a non-loopback peer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
| crates/model-connector | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
ModelConnector
The connector kit for GameCult minds: one typed, encrypted, replay-safe contract between a caller that needs a model turn and a daemon that holds the provider credential, so no project wires its own provider calls.
Status: the model-connector crate is live. No connector binary exists yet
(the Claude connector is first, then an OpenAI-compatible one).
Entry points
Crate crates/model-connector:
src/contract.rs- the v2 wire contract:ProviderRequest,TransportInvocation,TransportResult,TransportReceipt,Refusal, and the canonical byte and digest functions that bind a result to its request.src/envelope.rs- the AES-256-GCMTransportEnvelope, its identity-binding AAD, and the length-prefixed framing.src/client.rs-ConnectorClient, the one-request caller side.src/service.rs(featuredaemon) -TransportService: caller admission, durable replay (a retried request is answered byte-identically and the provider runs once), in-flight and capacity refusals.src/serve.rs(featuredaemon) -serve(), the loopback accept loop, over theProviderBackendtrait. A connector binary implementsProviderBackendfor its provider and callsserve; the kit names no provider.
The default feature set compiles contract, envelope and client only. Schema ids are
still gamecult.codex.*.v2; renaming them changes the wire and belongs to a later
contract version.
Verify
cargo test --locked --workspace
cargo test --locked --workspace --features model-connector/daemon
tests/wire_parity_v2.rs pins the kit byte-for-byte to CodexConnector fd7cec4 in both
directions (it fetches that revision as a dev-dependency).
Provenance and license
AGPL-3.0-only. See LICENSE.
The contract, envelope, client, replay service and serve loop were lifted from CodexConnector at fd7cec4, formerly PolyForm Noncommercial. Its sole copyright holder relicensed the lifted material as AGPL-3.0-only for this repository.