Skip to content
C.W.K.
Stream
Lesson 03 of 04 · published

client/1 Is a Versioned Pipe

~12 min · client/1, jsonl, stdio

Level 0Cold Stick
0 XP0/41 lessons0/14 achievements
0/100 XP to next level100 XP to go0% complete

JSONL Over Stdio, Not a Hidden RPC

The host and the engine speak client/1: versioned JSON lines on standard streams. Hello negotiates the verb classes from the previous track — protocol, required, optional. Typed submission admission distinguishes start, steer, and rejection before work begins. A command the pair did not agree on does not become a lucky side effect.

The envelope grows by named capabilities, so an older client and a newer engine can still pair. Required missing names refuse the pair and print the name. Optional missing names disable a control. Native bindings and the engine list are generated from one schema so a hand-written third copy cannot drift.

A pipe you can replay is a protocol. A private memory map between Swift and Python is a rumor.

Native Authority Stays Native

Permission answers, file panels, and the model selector are native. The renderer may draw a card. It may not decide. Brain list and select ride the same pipe as turns, so a graphical switch is the same recorded transition a terminal /brain would append. There is no second roster in the window. If a graphical switch cannot be replayed from the notebook as the same kind of line a terminal command would append, it is not a switch. It is a costume.

Code

A hello that can refuse by name·json
{
  "v": 1,
  "type": "command",
  "id": "hello-1",
  "session_id": null,
  "record_seq": 0,
  "payload": {
    "name": "hello",
    "required": ["turn.submit", "session.resume", "session.fork", "session.undo"]
  }
}

External links

Exercise

Write the smallest hello that must refuse: the client requires a verb the engine does not have. The refusal text should contain the verb. If your design only logs 'incompatible,' it is not typed.
Hint
The name is the product. A code without a name is a shrug.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.