Part of #1805. Depends on #1806.
Goal
Add a protocol-only package for the pinned Core Remote Coding v1 contract, with exact framing, IDs, errors, and initialization behavior and no dependency on the Newt runtime.
Scope
- Add minimal typed request, response, notification, server-request, and error envelopes generated from or continuously checked against the pinned schema.
- Implement newline-delimited app-server framing, including omission of the standard JSON-RPC
jsonrpc member.
- Preserve every request-ID form admitted by the pinned contract.
- Implement the connection state machine: reject traffic before
initialize, accept one initialization, process initialized, and match the reference behavior for reinitialization.
- Honor the pinned client capability fields, including exact notification opt-outs and experimental opt-in behavior when present.
- Return reference-compatible parse, invalid-request, method-not-found, invalid-params, and internal errors.
- Bound frame sizes and reject malformed or unsupported variants without panics.
- Keep the supported Rust types deliberately smaller than the upstream universe; unsupported surface remains explicit in the compatibility matrix.
Acceptance criteria
- Every golden fixture round-trips where the reference round-trips.
- Emitted frames validate against the pinned generated schema and never contain a
jsonrpc member.
- Pre-initialize, initialize, initialized, duplicate-initialize, unknown-method, bad-ID, and invalid-params tests match the normalized reference traces.
- Experimental descriptors are rejected unless the client opted in and the profile implements them.
- Property/fuzz tests cannot panic or allocate without the configured bound on arbitrary input.
- The package has no dependency on
newt-core, inference, tools, TUI, ACP, MCP, Agent Mesh, or Agent Bridle.
Out of scope
- Transport processes or sockets.
- Thread/turn behavior.
- Newt extension methods.
- Inventing a protocol version field that the upstream handshake does not define.
Part of #1805. Depends on #1806.
Goal
Add a protocol-only package for the pinned Core Remote Coding v1 contract, with exact framing, IDs, errors, and initialization behavior and no dependency on the Newt runtime.
Scope
jsonrpcmember.initialize, accept one initialization, processinitialized, and match the reference behavior for reinitialization.Acceptance criteria
jsonrpcmember.newt-core, inference, tools, TUI, ACP, MCP, Agent Mesh, or Agent Bridle.Out of scope