Repository navigation
agents: accept the harness key and agent: sandbox for bare sandboxes - #2046
Conversation
A bare sandbox was spelled agent: none, which reads as a missing value rather than a choice. doctl now generates agent: sandbox, accepts both spellings everywhere it checks for a bare sandbox, warns on none during validation, and treats both AGENT_KIND_NONE and AGENT_KIND_SANDBOX as a session with no agent. MARSOHS-1808 Co-authored-by: Cursor <cursoragent@cursor.com>
The API now treats agent: none and agent: sandbox as equal spellings of a bare sandbox and stores new ones as AGENT_KIND_SANDBOX. doctl goes back to generating agent: none, drops the deprecation warning on none, and keeps accepting both spellings and both agent kinds. MARSOHS-1808 Co-authored-by: Cursor <cursoragent@cursor.com>
The API now names the flat manifest key harness, with agent as its original name. doctl validates, routes and detects bare sandboxes from either key, reports a manifest that sets both, and names the key the author wrote in errors. Generated manifests keep writing agent so they still work against an API from before the rename. MARSOHS-1808 Co-authored-by: Cursor <cursoragent@cursor.com>
|
The description says switching the generator and |
Thanks @kerickson-dot for looking at it - we will want to lead with |
Manifests doctl builds for --harness and --template now write harness instead of agent, and the create, config create and validate help lead with harness, noting agent as its original name. This build needs an API that accepts the harness key; release it after that ships. MARSOHS-1808 Co-authored-by: Cursor <cursoragent@cursor.com>
MARSOHS-1808
What
The API now accepts
agent: sandboxas an equal spelling ofagent: nonefor a session with no agent in it, and stores new bare sandboxes asAGENT_KIND_SANDBOXinstead ofAGENT_KIND_NONE. The API also renames the flat manifest key fromagenttoharness, withagentkept as its original name. doctl now generates and documentsharness: none, accepts either key and both spellings, and recognizes both agent kinds.--harness,--template sandbox, or a lone--template) writeharness:instead ofagent:, and thecreate,config createandvalidatehelp lead withharness, notingagentas its original name.--harness noneand--harness sandboxare refused with the existing pointer to--template sandbox, andlaunchrefuses a manifest with either.noneandsandboxwith no warning.harnesskey: validation, bare-sandbox detection and the OpenAI-agents path readharnessoragent. A manifest that sets both is an error (set "harness" or "agent", not both), a missing key reports"harness"as required, and adapter errors name the key the author wrote.AGENT_KIND_NONEandAGENT_KIND_SANDBOXas a bare sandbox (ready card, startup wording) and displays both asNone. godo has no constant for the new value yet, sohostedAgentKindSandboxis defined locally incommands/agents_run.go.Release order
This build must ship after the server accepts the
harnesskey. A server from before the rename rejectsharnessas an unknown field, so everycreatethat builds its manifest (--harness,--template) would fail with a 400; hand-writtenagent:manifests would still work.Why it matters for released versions
Released doctl does not know
AGENT_KIND_SANDBOX. Once the server writes it, released doctl shows a new bare sandbox with the managed-agent ready card (labelagent, offeringlaunch). This build fixes that, so it should ship close to the server change.Testing
go test ./commands/: all tests touched here pass.TestRegistryLogin,TestRegistryLogoutandTestRefreshExpiredOAuthTokenfail identically on an unmodifiedmaincheckout on this machine.create --template sandboxgeneratedagent: none(before the generator switch;--dry-runnow printsharness: none), the session was stored asAGENT_KIND_SANDBOX, the ready card showedAgent Nonewith the exec, upload, download and port-forward steps, andexecran in the guest.harnesskey:validateacceptedharness: noneand rejected a file with both keys;create --specwithharness: noneand--promptwas refused before any session existed; without--promptit created a readyAGENT_KIND_SANDBOXsession.