Files
tutti/docs/plans/2026-07-19-agent-header-readonly-session-actions.md
agent-radar 2ed3415fb7
Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
源码快照 @ 2026-09-01 (source-only, 剔除非源码素材)
2026-09-01 20:17:27 +08:00

1.8 KiB

Agent Header Read-Only Session Actions

Goal

Let read-only host surfaces reuse the complete AgentGuiWorkbenchHeader while exposing only the session actions they can support. TSH Activity Center is the first consumer: it needs the canonical session title, Agent icon, copy-as-Markdown, copy-as-reference, and its host-owned close action, but it must not offer rename.

Design

  • AgentGuiWorkbenchHeader accepts an optional sessionMenuActions list.
  • Omitting the list preserves the existing rename and copy menu.
  • The shared menu renders only declared actions and emits separators only between visible action groups.
  • The existing agent-conversation entrypoint exports the pure transcript serializer so external read-only conversation surfaces can preserve AgentGUI's Markdown format without copying implementation.
  • Hosts retain ownership of canonical session/message loading, clipboard access, toasts, and window actions.
  • Workbench window-chrome selectors recognize the Header only when it occupies that window's header slot, so a complete Header embedded in another window's body cannot reclassify the outer window.

Invariants

  1. Existing AgentGUI headers keep their current menu when no capability list is supplied.
  2. A read-only host cannot expose rename when it declares only copy actions.
  3. Session identity comes from the host's canonical session projection; menu availability never changes the title.
  4. A nested Header does not alter its containing host window's rows, drag layer, or body offsets.

Verification

  • Shared menu component tests for default and copy-only action sets.
  • Agent GUI package typecheck and packed-surface validation.
  • TSH Activity Center tests for shared title, menu contents, Markdown copy, reference copy, and close behavior.