Replies: 1 comment
|
Thanks for the detailed proposal — I verified every cited anchor against What actually makes tool cards durable is
|
|
Thanks for the detailed proposal — I verified every cited anchor against What actually makes tool cards durable is
|
Uh oh!
There was an error while loading. Please reload this page.
Problem
At commit
49a606bc,CommandDefinitionexposes onlyname,description,input,recordInput, andhandler(packages/interaction/commands/src/index.ts:55-70). Its durable result is limited to outcome, flat text, and an optional source-event reference (packages/interaction/commands/src/types.ts:28-35).Tools already have optional, pure, replay-safe
presentCallandpresentResulthooks (packages/core/tools/src/index.ts:263-295). Those hooks return provider-neutral call/result views, retain a generic fallback when absent, and can render durable structuredmetain every DSH UI.Plugin use case
A workspace-restore plugin exposes
/roller-restore <turn-end-seq>. Its result naturally contains separate lists of files written, files deleted, and failures with an operation and message. Today the command must flatten that report into headings and bullet text incommand/done, so every UI shows a text blob. A tool carrying the same data can present it as a structured card.Proposed API
Could
CommandDefinitiongain optionalpresentCall(rawInput)andpresentResult(rawInput, result)hooks with the same view types, generic fallbacks, and pure/replay-safe contract as tool presenters? ForpresentResult, the durable command result would also need optional JSON-safemeta(or an equivalent structured payload) mirroringToolResult.meta; otherwise a presenter must parse display text. Existing commands could omit all of these fields and retain their current rendering.This is only a presentation extension: it would not change command dispatch, handler semantics, model visibility, or the existing text fallback.
All reactions