Add doctl agents configs commands (MARSOHS-741) - #1905
Open
nveerdixit wants to merge 48 commits into
Open
Conversation
doctl agent attach connected but printed nothing: the harness-api SSE
stream emits the SPI canonical event envelope (type/data/timestamp/
tenant_id, dot-separated event names) while vendored godo decoded
kind/payload/at/team_id, so every event fell through renderEvent.
- godo HostedAgentEvent: decode the SPI wire via UnmarshalJSON and switch
the HostedAgentEventKind constants to the dot-separated SPI names.
- godo ErrorResponse: also read the nested {"error":{code,message}}
envelope so failed calls show the server's reason, not a bare status.
- agents: align event payload structs/rendering and HITL tracking to the
SPI data shapes, and acknowledge each submit with its run id so the
agent's startup latency isn't mistaken for a hang (which caused
duplicate submits).
- tests for the wire decode, rendering, nested-error surfacing, and ack.
The vendored godo edits mirror the fix being upstreamed to
digitalocean/godo and are in-tree until godo is re-vendored.
Co-authored-by: Cursor <cursoragent@cursor.com>
…endlier attach/start errors
…igitalocean#1866) * displayers: drop SandboxID column from hosted-agent session output * add vendor files --------- Co-authored-by: SSharma-10 <shivanisharma@digitalocean.com>
Vendors glamour and its transitive deps (chroma, goldmark, bluemonday, etc.) and bumps lipgloss/termenv so `doctl agents` can render the agent's markdown replies with syntax-highlighted code blocks. Also re-syncs the pinned godo vendor tree (adds Session.SandboxID). Co-authored-by: Cursor <cursoragent@cursor.com>
Buffer the agent's token stream and render each turn as markdown with syntax-highlighted code blocks. Collapse HITL prompts to a compact, color-coded approve/reject/defer menu that shows the command awaiting approval, arrow-key selectable in a TTY. Correlate multiple pending HITLs to their tool calls via a FIFO queue so no approval line is blank. Co-authored-by: Cursor <cursoragent@cursor.com>
…ean#1881) * MARSOHS-340: fail agents attach fast on a terminal session doctl agents attach fetched the session via GetSession but never checked its status, so attaching to a destroyed/failed/destroying session printed "Connected to ..." and only failed once the user typed something and SendInput came back 404. This complements the harness-api server-side fix (MARSOHS-340) which now rejects the stream subscribe itself, but the CLI still showed a stale prompt instead of exiting. Add a check right after GetSession succeeds: if the session is in a terminal status (destroying/destroyed/failed), fail immediately with a clear message instead of printing the banner and entering the interactive loop. Reuses the existing isTerminalSessionStatus helper. * MARSOHS-340: add test coverage for attach terminal-session rejection Covers destroyed/destroying/failed statuses erroring immediately with "cannot be attached" plus the humanized status, and pins the SESSION_STATUS_ -> lowercase mapping in humanSessionStatus.
* m0 - first draft * m2 + tests * comment updated * fix pr comments: update agentproxy to use new facade creation for connections and improve event loop handling
Bump godo via replace to the HostedAgents+Origin tip (includes NestedError for harness-api envelopes). Document server-side sim/eval list omission; add Origin column without client-side filters or --origin flags.
Wrap godo Agent Configs list/get/create/delete and list sessions-by-config. Vendors godo tip from nveerdixit/godo@cf5f607 until the upstream PR lands. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
Local test evidence (MARSOHS-741)Against local harness-api UnitCLI smoke (
|
This was referenced Aug 10, 2026
Slot list is name-only now that harness-api no longer returns configured. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
Follow-up: credential display is slot names only (no configured/missing suffix), matching harness-api. |
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
doctl agents configs {list,get,create,delete,sessions}wrapping godo Agent Configsnveerdixit/godo@cf5f607(Add Hosted Agents Agent Configs client (MARSOHS-741) godo#1079) until that PR mergesTest plan
go test ./commands/ ./commands/displayers/ -count=1 -run 'Agents|ParseSecret|HostedAgent'http://127.0.0.1:8080(see MARSOHS-741)Notes
Made with Cursor