feat(pilotctl): agent-first CLI overhaul — bounded output, filters, styling#247
Open
TeoSlayer wants to merge 3 commits into
Open
feat(pilotctl): agent-first CLI overhaul — bounded output, filters, styling#247TeoSlayer wants to merge 3 commits into
TeoSlayer wants to merge 3 commits into
Conversation
…tyling Inbox was unusable for agents (23 MB --json dumps, oldest-first, 80-char mid-token truncation) and several commands shared the same disease. This makes every high-traffic command bounded, filterable, non-interactive, and visually scannable, without breaking --json consumers. - inbox: newest-first, default --limit 10, --latest/--from/--since/ --full/read <id>/--clear --before; --json bounded (23 MB -> 3 KB) - received: same flag surface ported (mtime-ordered; sender metadata unavailable in dataexchange filenames) - peers: summary + exceptions-only view (surfaces unencrypted peers), colorized --all, --limit/--search - trust: newest-first, --limit 20, --search, one-way trust flagged - daemon status: fix contradiction (stale PID file reported "stopped" while live socket data printed); socket is now the source of truth - info: grouped identity/network/traffic/skills layout - ping: 5s default timeout (was 30s), relay-convergence hint on failure - send-message/ping --json: add "to" resolved-address field - send-message --wait, ping, bench, traceroute: animated elapsed line on stderr (TTY-only, erased on completion, no-op for pipes/--json) - config/skills status/updates/network list: aligned key-value, per-tool status dots, word-boundary wrap, dead MEMBERS column dropped - handshake/approve/untrust: next-step hints - context <command>: single-command spec (18 KB -> ~440 B) New style layer (cmd/pilotctl/style.go): semantic ANSI helpers gated on TTY + NO_COLOR/PILOT_NO_COLOR/TERM=dumb; tests pipe stdout so assertions stay plain-text. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
received gained --limit, --since, --clear --before in the CLI overhaul. The cli-reference-check gate caught the stale summary line. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pilotctl --json inboxwent from a 23 MB all-messages dump to a bounded 3 KB reply;--latestreplaces thejq -r '.data' "$(ls -1t ~/.pilot/inbox/*.json | head -1)"workaround the SKILL.md used to teach.inboxandreceivedget--limit/--since/--latest/read <id>/--clear --before;trustgets--limit/--search(newest-first, one-way trust flagged);peersshows a summary + exceptions-only view (immediately surfaced 3 unencrypted peers invisible in the old 678-row noise table), with colorized--all.daemon statusno longer reportsstopped (pid 0)from a stale PID file while printing live socket data — the socket is now the source of truth, with a dim "pid file stale" note.pingdefaults 5s (was 30s; total failure ~10s instead of ~40s) and prints a relay-convergence hint;handshake/approve/untrustoutcome messages carry the next command to run.send-message --wait,ping,bench,tracerouteshow a self-erasingwaiting… Nsline on stderr — TTY-only, hard no-op for pipes and--json, race-detector clean.cmd/pilotctl/style.go): semantic ANSI (statusDot, bold/dim/accent) gated on TTY +NO_COLOR/PILOT_NO_COLOR/TERM=dumb. Piped output stays grep-safe;--jsonis byte-stable except documented additions ("to"resolved-address on send-message/ping,"total"/"shown"counters).configaligned key-value (no more raw JSON at humans),skills statusper-tool status dots with--verbosedetail,updatesword-boundary wrap,network listdrops the always-empty MEMBERS column with an "admin only" footnote,context <command>returns one command's spec (18 KB → ~440 B).Test plan
go test ./cmd/pilotctl/ -count=1green (presentation assertions updated to new contract; all plain-text, no ANSI — tests pipe stdout so color is off)-race), received--limit/--since/--clear --before,context <command>found/not-found, send-message/ping JSON"to"fieldscript -q /dev/null pilotctl <cmd>rendering on your terminal theme🤖 Generated with Claude Code