fix(runtime-host,ui,cli): name live tool calls on compact and collapsed rows - #3376
Open
me2seeks wants to merge 1 commit into
Open
fix(runtime-host,ui,cli): name live tool calls on compact and collapsed rows#3376me2seeks wants to merge 1 commit into
me2seeks wants to merge 1 commit into
Conversation
…ed rows
Collapsed tool rows (Desktop) and compact rows (TUI) rendered name-only
for the whole live window: Runtime Host live tool_start frames omit args
entirely, and durable args arrive only with the turn-end transcript
reconcile. Desktop rows stayed empty even after that, because the
collapsed target only consumed the ExploreAgent-only intent field.
- core: formatToolInvocationLine learns task_create/task_update/GoalSet/
AskUserQuestion lines; new projectToolArgsPreview builds a bounded,
redacted, whitelist-shaped args subset for the wire.
- runtime-host: live tool_start frames carry intent (pass-through) and
argsPreview; strict decoder accepts and bounds both; compatibility
epoch 30 (older clients reject unknown keys).
- ui: collapsed row and group header fall back to the invocation line
(args ?? argsPreview), first line, hard-capped at 120 chars.
- cli: compact rows consume argsPreview live; the 'no output'
placeholder now only appears when the row cannot name the call; empty
args objects no longer render as 'input: {}' noise.
Closes apache#3336, closes apache#3338.
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.
Closes #3336. Closes #3338.
Problem
Collapsed tool rows on Desktop and compact rows on the TUI rendered name-only —
● Bash,● Task Create— with no hint of what the call does. Two distinct causes, one shared root:tool_startframes omitargsentirely (lean-channel decision from feat(cli): add Runtime Host-backed TUI sessions #2308), and durable args arrive only with the turn-end transcript reconcile. So during the one window a user actually watches, neither surface can name the call.item.intent, whichdescribeToolIntentproduces solely forExploreAgent— every other tool rendered● Nameforever.What changes
@maka/coreformatToolInvocationLinegains per-tool lines fortask_create(first subject + count),task_update(subject /id → status),GoalSet(condition),AskUserQuestion(first question + count). NewprojectToolArgsPreview(toolName, args)builds a bounded, redacted, whitelist-shaped args subset for the live wire (never file bodies or option payloads; sensitive keys dropped structurally; every string throughredactSecrets; per-string 240 chars, whole preview 2 KB).tool_startframes carry optionalintent(pass-through, 512 B) andargsPreview(≤8 KB). The strict decoder accepts and bounds both.RUNTIME_HOST_COMPATIBILITY_EPOCHbumped 29 → 30: older clients reject unknown keys on this event and would tear the connection down.@maka/ui)intent ?? firstLine(formatToolInvocationLine(args ?? argsPreview)), hard-capped at 120 chars. Works live (preview), after settle (full args), and on history replay (persisted args) — history needs no wire change.packages/cli)argsPreviewwhile live (turn-end reconcile still replaces it with durable full args). The dim(no output)placeholder now appears only when the row cannot name the call —● Bash $ git add -Ano longer carries the disclaimer. Empty args objects no longer render asinput: {}noise.formatToolInvocationLinestays client-side, so each surface formats in its own locale; the host ships data, not text.Verification
@maka/core585/585 — incl. new invocation-line cases (task/goal/question/ScheduledTask) andprojectToolArgsPreview(whitelist shape, secret redaction, sensitive-key drop, bounds, count fidelity viatasksTotal, WriteStdininputPreviewshape).@maka/runtime-host1038/1038 — incl. livetool_startprojection (intent + bounded preview, never full args), strict-decoder accept/reject cases, client projector pass-through.@maka/ui189/189 — incl. collapsed-target suite: args-derived line, intent precedence, liveargsPreview, task subject, 120-char cap, redaction.packages/cli339/339 — incl. live quiet-Bash row from the preview,task_createsubject row,no outputkept only for un-nameable rows.tool-args-redaction-contract(secrets in command strings never reach the collapsed row or the wire preview).npm run typecheck(all workspaces),biome lint/format, andknip(desktop, ui) clean.Notes / follow-ups
(no output)annotation remains for rows that genuinely cannot name the call; counts (5 matches,3 lines, exit codes) are untouched.