KQ-2079 · COMMAND/UNPACKED

Command Unpacked

An approval card for a shell command an agent wants to run: the command first shows as one plain line, then its parts — program, flags, paths, arguments, operators — lift apart on springs.glide in a cascade and hairline stems draw down to tags that name each one, packed into staggered rows so no stem crosses a tag, with anything risky (a recursive delete, a write outside the project, running as administrator, piping into a shell) outlined in the risk colour. The part in focus is explained in plain words beneath as its outline slides on springs.snap. Tab walks the parts, Enter approves (twice for a risky command), Escape denies, and under 42rem the parts wrap and stack as a list with their explanations.

KQ-2079 · COMMAND/UNPACKED

Waylight · web app · build agent approval

Waylight build agent wants to run a command

Clearing stale caches before a clean build · 12 s ago

~/waylight/web

2 risks · recursive delete · outside the project

waiting · 2 risks · rm -rf outside project · waylight

Install

One command — the source lands in your repo. Or copy it from the Code tab.

$ pnpm dlx shadcn@latest add @kinetiq/command-unpacked

Props

partStyle
"chips" | "lines" | "boxes"
default "chips"
Tinted chips, plain text with a coloured underline per part, or hollow outlined boxes.
riskColor
string
default "var(--danger)"
Outline, stem, tag and callout colour for risky parts — any CSS colour.
accent
string
default "var(--accent-bright)"
Programs, the active outline and Approve — any CSS colour.
command
string
default defaultCommand
The command the agent wants to run; it is tokenised into parts (quotes respected) and explained.
cwd
string
default "~/waylight/web"
Where it would run; relative paths are resolved against it.
root
string
default cwd
The project root: paths that land outside it are flagged when they are deleted or written.
agent
{ name: string; task?: string; askedAt?: number }
default Waylight build agent
Who is asking, why, and when it asked in ms (12 s before now when left out).
programs
Record<string, CommandProgram>
default defaultCommandPrograms
What each known program does: gist, summary, flags, subcommands, flags that take values, what plain arguments mean, and whether it deletes or writes its paths.
annotations
Record<string, string>
default —
Explanations the agent gave for particular parts, keyed by the part's text; they replace the built-in ones.
rules
CommandRule[]
default defaultCommandRules
What counts as risky: id, label, level (danger or caution) and test(part, ctx) returning the reason or null.
policy
CommandPolicy | null
default null
A policy that blocks approval here: blocked, reason and source. Approve locks; Deny and Edit remain.
decision / defaultDecision
"pending" | "approved" | "denied"
default — / "pending"
The decision, controlled or initial.
onApprove
(command: string) => void
default —
Approve or Enter on a part — a second press when the command is risky and confirmRisky is on.
onDeny
(command: string) => void
default —
Deny or Escape.
onEditCommand
(command: string) => void
default —
The command was edited and saved; it is explained again.
onAllowSimilar
(pattern: string) => void
default —
A pattern chosen from Allow similar, offered only for the parts of the command with no risk.
unpacked / defaultUnpacked
boolean
default — / false
Whether the parts are lifted apart, controlled or initial.
onUnpackedChange
(unpacked: boolean) => void
default —
Fires from the Pack/Unpack toggle and from the automatic unpack.
trigger
"inView" | "mount" | "manual"
default "inView"
When the command first lifts apart by itself.
confirmRisky
boolean
default true
A risky command needs a second press within 4 seconds to approve.
now
number
default defaultCommandNow
The moment the "asked 12 s ago" time counts from, in ms.
label
string
default "Command approval"
The card's accessible name.
className
string
default —
Classes for the outer surface.