NNRP/1 Quick Start
From a host-integration perspective, the minimal working path is:
- Establish a reliable byte-stream connection and complete
CLIENT_HELLO / SERVER_HELLO_ACK. - Create a session with
SESSION_OPEN / SESSION_OPEN_ACK, including the default profile, schema, and budget window. - Send
FRAME_SUBMITor another submit-class message to create an operation inside that session. - Run a result pump in parallel and keep receiving
RESULT_PUSH / RESULT_DROP / RESULT_HINT / FLOW_UPDATE. - Adjust your sending behavior according to result state and
FLOW_UPDATE.
The three most common mistakes are:
- Treating NNRP as synchronous: the correct integration runs three paths in parallel—a loop that sends work, a loop that reads results, and a path that processes
FLOW_UPDATEand other control messages. - Confusing session and operation: a session is a persistent context container (like a conversation), an operation is a single task inside it. Sessions are opened once; operations are submitted many times.
- Skipping profile/schema binding: payload field layouts are defined by the profile and schema, not by any language runtime's private conventions. Guessing at byte offsets is unreliable.
Minimum host requirements:
- Keep a send loop and a result-reading loop that run independently without blocking each other.
- Record each session's
profile_id / schema_id / schema_versionso schema mismatches are easy to diagnose. - Handle the four visible result types:
partial(intermediate, safe to display),terminal(final frame),drop(discarded),degraded(lower-quality output). - Apply
FLOW_UPDATEat the right scope—connection-level updates affect all sessions, session-level ones affect only that session.