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

KitTerminalClient Knocks

~11 min · siblingkit, kit-terminal-client, waygate, watchfire, wire

Level 0Spark
0 XP0/36 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

Callers Knock With the Kit, Not With a Private Dialect

Sibling Kit ships a terminal client — KitTerminalClient — so family apps do not invent a second way to ask Smolder for a pane. Waygate already knocks with it when a folder wants a split. Watchfire already knocks with it when a host wants a seat. That is consume-the-kit, not retell-the-kit. This quest will not teach how the kit is vendored, how drift is checked, or how a pin moves. Those sentences belong to the kit's own quest. Here the product fact is: callers use that client, and they never add a raw input method beside it.

A private dialect per sibling is how the door grows four generic keyboards with four names. The kit client is the shared mouth. If a new family app needs a terminal, it takes the client, it does not take a screenshot of Waygate's call and mutate it. Mutation is how "open folder" quietly becomes "type this string," and the last lesson's refusal dies in a helper function.

Smolder Owns Sessions and the Wire; Callers Own Policy

The split of ownership is load-bearing. Smolder owns the sessions and the wire contract: which pane exists, which PTY, which receipt, which stable target ID. Callers own folder, host, and seat policy: which directory is this, which machine, which Anvil seat name. The client carries the caller's policy to the door. The door does not guess a folder from a window title, and the caller does not pick a PTY. Crossing that line is how Waygate starts caring about emulator state, or Smolder starts caring about Watchfire's host catalog.

Receipts travel back through the same client. The caller holds an ID it can mention later. It does not hold a file descriptor into someone else's PTY. If a sibling finds itself wanting to "just send a few bytes" after the launch, it has left policy and entered input, and the client should not grow a method for that. The human at the glass, or a draft outside the PTY, is the rest of this track.

Two Callers Already Prove the Shape

Waygate is a dual-pane file workbench. Its need is spatial: this folder, a new leaf, maybe next to the one I am looking at. Watchfire is fleet control. Its need is a seat on a host, named, not a pile of untitled shells. Both needs fit typed launches. Neither need is "type cd into whichever pane looks right." If a future sibling cannot state its need in folder-host-seat language, the answer is not a new verb on the client. The answer is a conversation at the plan gate about whether the need is a door need at all.

Keep the kit in one sentence and the door in another. The kit is plumbing the family already shares. The door is Smolder's product boundary: launches and receipts, no raw input, loopback only. Confusing those sentences is how a plumbing update gets blamed for a policy leak, or a policy leak gets hidden inside a plumbing update.

Callers knock with KitTerminalClient. Smolder owns sessions and the wire. Callers own folder, host, and seat. Nobody adds a raw input method, and this quest does not retell how the kit is shipped.

Code

The knock, as a typed launch, not as keystrokes·swift
// Conceptual shape of the shipped actor. Callers own policy.
// Real types: KitTerminalRequest / KitTerminalReceipt.
let request = KitTerminalRequest(
    caller: "cwkWaygate",
    action: .openDirectory,
    target: .init(host: "local", cwd: folder)
)
let client = try KitTerminalClient(caller: "cwkWaygate")
let receipt = try await client.submit(request)
// receipt names session and pane. Not a file descriptor.
// There is no send(bytes:to:). There is no pressEnter.

External links

Exercise

Pick Waygate or Watchfire. Write the launch you would send (folder / host / seat / target). Write the receipt you would expect back. Then write one method you are not allowed to add to the client, and one sentence naming who types instead (the human, or a later draft view).
Hint
If your launch contains a command string to be typed, you have already added the forbidden method in disguise. Policy is where and who. Input is what gets pressed.

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.