Repository navigation
Render plugin views and run their controls from the CLI (DEP-7248) - #608
Closed
robstolarz wants to merge 5 commits into
Closed
robstolarz wants to merge 5 commits into
robstolarz wants to merge 5 commits into
Conversation
Watch, create and attach now ask for the "cli" view kind and print each plugin view under a rule whenever its rev changes, sanitised and clipped to the terminal width. `depot agent session action` runs a view's button, select or form through InvokeViewAction, with a confirmation prompt for confirm and danger controls. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 47e4af8. Configure here.
There was a problem hiding this comment.
Stale comment
Risk: medium. Left a non-blocking comment: Cursor Bugbot reported 1 unresolved potential issue (views can stay hidden after a stream break), so this PR is not approved. Human review is needed and no reviewers were assigned.
Sent by Cursor Approval Agent: Pull Request Router and Approver
A cut partial no longer continues and prints whole when it finishes, so it should not hold views back. Part of DEP-7248. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
This was referenced Oct 3, 2026
…checks Typing the command is the confirmation, and the server already validates select options and form inputs, so the CLI forwards values as given. Also drops dead decode guards (per-block decode, depth cap, table caps) and the second views dedupe in the renderer. DEP-7248 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
A value that matches no control now reaches the server, which rejects it, instead of being replaced by the first form's own value. DEP-7248 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
This was referenced Oct 3, 2026
Contributor
Author
|
Superseded by #613 in the per-feature Depot agents stack (DEP-7247). Closing. |
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.



CLI side of plugin views (DEP-7248). Stacked on #606.
session watch,createandattachnow sendclient {name:"cli", blocks:1, view_kinds:["cli"]}and print each plugin view under a── plugin: title ──rule whenever its rev changes.text (url)(https only, never OSC 8), images as[image: alt], and unknown blocks as theiraltor "1 item not shown". Each view is capped at 40 lines.kinds.cli.compactandkinds.cli.keysare honoured.--views full|compact|nonepicks the mode.depot agent session action <session> <plugin>/<view> <action-or-key>callsInvokeViewActionwith oneclient_request_idacross retries. Selects take--valueand forms take--field; the server validates both.ViewClient,PluginCall,views_json = 20,InvokeViewAction).Test plan
go test ./pkg/cmd/agent/covers the todos fixture, every block type, the 40-line cap, compact mode, key fallback, hostile strings (CSI, OSC 52/8, C1, bidi, zero-width) in every field, rev-change printing, the client sent on GetSession and WatchSession, and action resolution, forms, selects and retry ids.depot agent session watch <id>shows the plan view, anddepot agent session action <id> todos/plan 1queues the call and the view updates.Stack and decisions made without Rob
Stack (each PR is based on the one it names):
depot agent sessioncommandsDecisions made without Rob:
session action, next tosession attach, not a top-levelagent action.COLUMNS, then 80.kinds.cli.keysfall back to numbers. A key that matches no control gets its own chip line.--value.--valueis missing.--valuematches no control for an action, the first control for that action is used and the value is sent as given, so the server rejects a typo. With no--value, the first control is used unless controls for that action carry different values.views_jsonprints one note and doesn't end the watch.session action.🤖 Generated with Claude Code
https://claude.ai/code/session_01NdhqP6oGqJMRJLwBU5Zepm
Note
Medium Risk
Introduces a new agent RPC that queues plugin actions on live sessions; risk is mitigated by server-side validation, CLI sanitisation, and broad tests, but wrong controls still affect sandbox plugin behavior.
Overview
Adds CLI support for DEP-7248 plugin views: while watching, creating, or attaching to a session, the CLI advertises a
cliViewClient, receivesviews_json, and prints plugin UIs (full, compact, or none via--views).Rendering maps the block vocabulary to terminal lines with width clipping, optional styling, numbered/
kinds.clikeys on controls, and aggressive sanitisation of untrusted plugin text (no escape sequences or misleading links).Interaction is a new
depot agent session action <session> <plugin>/<view> <key-or-action>that loads the current view, resolves the control (including--valuefor selects and--fieldfor forms), and callsInvokeViewActionwith retried, idempotentclient_request_ids. Watch output hints at this command when controls are shown.The agent proto/connect stubs gain
ViewClient,PluginCall,views_jsonon get/watch responses, and theInvokeViewActionRPC.Reviewed by Cursor Bugbot for commit 44b7a93. Bugbot is set up for automated code reviews on this repo. Configure here.