Skip to content

docs(plans): agent transcript redesign — tool groups, state chips, slash picker, kimi M4 wire-tail#363

Merged
physercoe merged 3 commits into
physercoe:mainfrom
agentfleets:docs/transcript-redesign-plan
Jul 23, 2026
Merged

docs(plans): agent transcript redesign — tool groups, state chips, slash picker, kimi M4 wire-tail#363
physercoe merged 3 commits into
physercoe:mainfrom
agentfleets:docs/transcript-redesign-plan

Conversation

@agentfleets

Copy link
Copy Markdown
Collaborator

What

A comprehensive redesign plan for the agent transcript on both clients: docs/plans/agent-transcript-redesign.md. Docs-only PR — no code changes.

Why

Three felt problems, all verified in code and by live probing:

  1. Tool events drown the transcript — neither client batches; every tool call is an individually-collapsed card (mobile FoldableToolCall, desktop <details>), so scanning a work session means expanding card after card.
  2. Session state has no homeplan/todo updates render as a new snapshot card per update; usage/mode state is scattered; cron/background has no representation.
  3. Kimi M1 silently drops data the engine produces — ACP streams no usage telemetry or subagent inner activity for kimi-code 0.28.x, but kimi records all of it to its local session wire store.

Evidence gathered (all live, 2026-07-23, kimi-code 0.28.1)

  • ACP probe (kimi --yolo acp over JSON-RPC): plan updates, available_commands_update, and request_permission (fires even under --yolo) all cross the wire; usage/subagent/background do not.
  • Wire store (~/.kimi-code/sessions/.../wire.jsonl, protocol v1.4): usage.record (per-turn tokens + cache split), tools.update_store (todo state), tool calls with kimi display hints, per-subagent wire files, workspaces.json cwd→wd mapping (no hash reverse-engineering needed).
  • kimi-code is fully open source (MIT)apps/kimi-web (the reference transcript UI: ToolGroup.vue, TodoCard.vue, filter chips…), apps/vis, apps/kimi-inspect, apps/vscode (baseline.manager.ts), packages/protocol (canonical v2 schema), packages/transcript, packages/acp-adapter.
  • kimi-web transcript screenshotted live (images embedded in the doc): tool-group cards ("N tool calls · done", diffstat rows), state chips (Bash (32) · Sub Agent (3) · Todos (3/5)), composer Mode toggles.
  • Code map of both termipod clients: existing substrate to build on (FoldMaps lineage, turn anchors, lens, busy parity, state reducers) plus two real desktop parity gaps (no collapseStreamingPartials; always-hides tool_call_update and demotes thought).

The plan

  • Shared model, two renderers: turn groups → prose → activity-group cards → lazy rows; a state-chip row above the composer (desktop rail/popovers, mobile chips/bottom sheets).
  • P1 — tool-group cards + plan fold-in-place (hub stamps stable message_id) + desktop streaming parity.
  • P2 — state-chip row with counts incl. Todos (done/total) chip → live checklist.
  • P3 — slash-command picker fed engine-neutrally from the ACP available_commands catalog (mobile's strip already consumes session.init.slash_commands; desktop gets a new Composer.tsx picker; static kimi snippet profile as fallback).
  • P4 — kimi M4 wire-tail adapter (LocalLogTail precedent) parsing wire.jsonl per the OSS packages/protocol schema — structured usage/todo/tool/subagent events instead of raw pane text.
  • P5 — future: cron/background state, session Changes rollup, inspect surface.
  • Deferred per director decision (recorded in the doc): mobile turn navigation promotion, mobile mode/plan/goal composer toggles.

Reference designs tabulated with licenses: kimi-web (MIT), Cline, Zed (design-only), Goose, codex/gemini TUI. Visual-design stance: keep termipod's dark Linear/Radix tokens — borrow patterns, not palette.

Verification

  • scripts/lint-docs.sh ✓ (287 docs pass, incl. this one)
  • scripts/lint-doc-anchors.sh

Open questions for the maintainer are in §7 (grouping threshold/default expansion, chips vs lens coexistence, P4 scope guard, Todos popover placement, mobile funnel swap).

agentfleet added 2 commits July 22, 2026 22:41
…ash picker, kimi M4 wire-tail

Comprehensive redesign plan for the agent transcript on both clients,
evidenced by live probing of kimi-code 0.28.1 (ACP session + wire.jsonl
+ kimi web API) and a code map of both termipod clients. Phases: P1
tool-group cards + plan fold-in-place + desktop streaming parity, P2
state-chip row with Todos (n/m), P3 engine-neutral slash picker from the
ACP available_commands catalog, P4 kimi wire.jsonl tail adapter as
kimi's M4 mode. Reference designs: kimi-web (MIT), Cline, Zed, Goose.
Mobile turn navigation and mode/plan/goal composer toggles explicitly
deferred per director decision.
…k-model state, source-verified corrections

Amendments after reading the kimi-web source (MIT):
- P0 (new): embed kimi web as a session web panel in the desktop app —
  reuse the Read surface's hardened <webview> stack, spawn/attach
  'kimi web' locally, SSH forwardOut wedge for remote hosts. Caveats
  recorded: SPA has no per-session deep link; parallel UI, not an
  integration.
- State chips corrected from 'lens filters' to the ChatDock model:
  ambient chips toggle a detail panel; lens/funnel untouched; mobile
  gets a dedicated todo tab/sheet.
- Tool groups: expanded by default, never auto-collapse (kimi-web
  behavior), aggregate state running > error > done; threshold >=2.
- Todos render inside the dock panel with shared status glyphs;
  foreground subagents inline, background-only chips.
- §7 questions re-scoped (P0 scope, web-panel registry, expansion
  default, P4 guard, mobile todo surface).
…b mechanics, Insight-mode rename

Maintainer review amendments before merge:
- §7 open questions closed as decisions: P0 accepted local-first (remote
  SSH-forward as follow-up PR), kimi-scoped web panel with registry-shaped
  internals, kimi-web group-expansion behavior as written, M1-enrichment
  out of P4, mobile todos as bottom sheet first.
- P1: the hub message_id stamp alone cannot deliver fold-in-place —
  collapseStreamingPartials folds only text|thought (feed_reducer.dart
  kind allowlist); clients must add 'plan' to the allowlist. Also the
  plan arm needs stampTurnID (posts tagIfReplay-only today).
- P0: webtab.ts will-attach-webview rejects any partition other than
  persist:webtab and its policy allows any http(s) origin — P0's real
  main-process work is a partition allowlist with per-partition policy;
  kimiweb partition non-persistent (bearer token rides the URL hash).
- P3: busy-parity anchor — synthesized slash-command state must stay on
  the _isAgentBusy skip path.
- P4: gate on wire metadata protocol version; tolerate partial trailing
  lines.
- P5: 'Inspect surface' renamed to transcript Insight mode — not a new
  surface, and not J3 Inspect (name taken by the checkpoint inspector).
- Path fix: AgentTranscript.tsx lives in desktop/src/surfaces/.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@physercoe
physercoe merged commit c97c522 into physercoe:main Jul 23, 2026
4 checks passed
physercoe pushed a commit that referenced this pull request Jul 23, 2026
…t radius, rollout order, decisions

Maintainer review amendments before merge:
- §6 open questions closed as decisions: in_review as a new status;
  send-back to in_progress when the assignee session is alive, else
  todo; DnD always opens the agent picker; resizable split with
  automatic tri-pane at >=1600px; W5 review-feedback lands in THIS
  plan (transcript plan's P5 rollup stays a cross-link).
- §1/§4/W2: the derivation was flattened — agent terminated splits on
  result_summary (with summary -> done, without -> cancelled, v1.0.619
  abandoned-task rule), and blocked/cancelled are never overwritten
  (v1.0.628). W2 now flips only terminated+summary to in_review;
  abandoned tasks stay cancelled and never enter the review queue.
- W2: 'migration for the new enum value' removed — task status has no
  CHECK constraint; the real hub surface is named instead:
  deriveTaskStatusFromAgent, proposePermittedTaskStatuses (send-back
  needs the propose vocabulary extended), digest_store.go:303 assignee
  query (must include in_review), handlers_agents.go:1351 spawn gate
  (in_review must allow spawns = new attempt / send-back).
- W2: rollout order added — clients learn in_review (plus an
  unknown-status fallback bucket, issue #61 bug class) BEFORE the hub
  flips derivation.
- W3: desktop AgentSpawn has no task_id plumbing today; the reuse adds
  the prop.
- W4: progress bar labeled as the phase-weighted /v1/insights metric,
  not a task count. TL;DR: #363 is merged (c97c522), not in flight.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
physercoe pushed a commit to agentfleets/termipod that referenced this pull request Jul 23, 2026
…d transport, envelope re-seal, host-key trust, decisions

Maintainer review amendments before merge:
- Teleport reordered pause-first per ADR-014's single-appender
  invariant: terminate-after-verify cut the engine-state bundle while
  the source engine could still append (silent turn loss) and put two
  engines on one logical store during the verify window. Pause is now
  step 2; every later failure falls back to resume-on-source — the
  existing resumePausedSession path.
- Transport section added: /v1/blobs caps at 25 MiB and buffers
  uploads in memory, so single-blob tars (256 MB workdir cap, large
  engine stores) are impossible — teleport rides a chunked bundle
  manifest (<=25 MiB parts + manifest blob + whole-tar hash).
- E3 x Part 2 interaction stated: env_secret_envelope is sealed to the
  source host's key; the initiating client re-resolves and re-seals to
  the target host during teleport; headless teleport of secret-bearing
  sessions is impossible by design.
- E3 host-key enrollment gains ADR-052 D-4's explicit trust step
  (fingerprint short-code confirm, pinned thereafter, re-key =
  re-trust) — without it a hub could substitute keys and open every
  envelope.
- env_profile_rev dropped: the entity has no revision machinery;
  snapshot = materialize resolved env_vars + setup_script into the
  spawn spec, env_profile_id kept for provenance.
- Open questions closed as decisions; companion links updated (physercoe#363
  c97c522, physercoe#364 c797538; branch merged with main so both resolve).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants