fix(kohaku): quiet kt stderr noise + richer live-execution detail#4
Merged
Conversation
kt-biome plugins (the PEV verifier and the OpenTelemetry exporter) log benign WARNING-level "plugin disabled / no-op" lines on every agent build: PEV verifier has no acceptance_criteria; plugin disabled opentelemetry packages not installed; plugin is no-op Switchyard captures kt's stderr and surfaces it as a failed turn's error_message + an always-saved diagnostics artifact, so this benign noise dominated the view (and repeated every turn). Pass `--log-level error` to `kt run` so only real errors reach stderr. Actual turn outcomes arrive on the stdout JSONL (`turn_end`), independent of the stderr log level, so no failure signal is lost. fake_kt now asserts the adapter always passes --log-level. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Map kt tool/subagent activity to `tool_call` items carrying the real tool name (derived from the kt job_id "<tool>_<shortid>"), the call arguments (path/content — shown via the card's Show-Input toggle, truncated when long), and the result — instead of the generic, content-less `command_execution` previously emitted (which rendered every tool as "Execute Command" with no content). The kt job_id is stable across start/done, so it's used as the item id and a tool's start (running, with args) merges with its later done/error (with the result) into one transitioning card. GUI live-execution card (RenderHelpers): - Headline falls back to the latest tool of ANY kind (not just shell commands), so non-command tool turns no longer read "暂无工具事件". - Adds a "已调用 N 个工具" summary count for non-command, non-edit tool calls. - Shows the LATEST 5 detail cards (was the first 5, which never scrolled to the newest activity) and notes how many earlier ones are folded. Co-Authored-By: Claude Opus 4.8 (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
Two follow-up fixes for the live display when KohakuTerrarium (
kt) is the core.1. Quiet kt stderr plugin noise (
d756f5b)kt-biome plugins (PEV verifier, OpenTelemetry exporter) log benign WARNING-level "plugin disabled / no-op" lines on every agent build:
Switchyard captures kt's stderr and surfaces it as a failed turn's
error_message+ an always-saved diagnostics artifact, so this noise dominated the view. The adapter now passes--log-level errortokt run; real turn outcomes arrive on the stdout JSONL (turn_end), independent of the stderr log level, so no failure signal is lost.fake_ktasserts the adapter always passes--log-level.2. Richer live-execution detail for kt tool activity (
4114914)kt tool/subagent activity was mapped to a generic, content-less
command_execution(every tool rendered as "Execute Command"). It now maps to atool_callcarrying the real tool name (from the ktjob_id<tool>_<shortid>), the call arguments (path/content — shown via the card's Show-Input toggle, truncated when long), and the result. The stablejob_idis the item id, so a tool's start (running, with args) and its done/error (with the result) merge into one transitioning card.GUI live-execution card:
Verification
cargo fmt --all -- --check,cargo clippy -p switchyard-provider-kohaku -p switchyard-tests --all-targets -- -D warnings(on Rust 1.96, matching CI),cargo test -p switchyard-provider-kohaku(14) +--test kohaku_integration(4), and the frontendnpm run buildall pass.🤖 Generated with Claude Code