jackin-protocol
Shared wire-format contracts for the host CLI and jackin-capsule.
This crate holds serde types, constants, control messages, and shared terminal-handshake adapters that cross the host/container boundary. Keeping them here lets the host jackin binary and the in-container Capsule binary agree on socket paths, launch config shape, attach protocol messages, terminal defaults, and runtime commands without either side depending on the other's full implementation stack.
The crate should stay dependency-light and protocol-focused. Runtime behavior belongs in the host CLI or jackin-capsule; shared data contracts belong here.
Public API
Primary entry: (attach-protocol client frames). Related types:ClientFrame
ServerFrame— capsule→host attach framesClipboardImageError— typed clipboard image failure signal (wire payload remains a human-readable message;from_messageclassifies free-form host text)ClientMsg/ServerMsg— control-channel JSON framesTelemetryContext— validated W3C trace context propagated across host/Capsule control frameshost_terminal— the single OSC 10/11 default-color handshake and input-preservation adapter used by both attach clientsStatusSlot— semantic status-bar glance slot a usage quota window fills (session,daily,weekly,spend);dailycarries Amp Free'sN% remaining todayallowanceFocusedUsageView::is_refreshing_placeholder()— one machine predicate for the exact coldrefreshingplaceholder invariant, so host/Swift code never compares display stringsusage_broker— versioned, secret-free request/response records for host-owned usage refresh coordination, including opaque account capabilities, generation state, bounded wait requests, and sanitized failure categoriesUsageDetailPresentation/UsageDetailRow/UsagePresentationLine/UsageDetailRowKind— the shared Capsule-parity provider-detail card contract: fixed row order (focused, header, provider, account, status, updated, optional username/plan/auth,bucket:<i>per source bucket, optional detail), position-based bucket ids, and already-groupedleading/trailinglayout lines.display_labelequals the row's non-empty line fields joined with" · ". Built byjackin_usage::usage::usage_detail_presentation; the Capsule dialog and the Desktop Usage window render it verbatim.
#![deny(missing_docs)] is on; public surface is rustdoc-complete.