Repository navigation
feat(device): add dcd device start, list, status, stop, install, launch and models - #231
Merged
Merged
Conversation
…ch and models
The first stages of the Agent Devices CLI (dcd plan 3.1 and 3.2).
- --json prints one envelope, {ok, session, data, error}, on success
and on failure.
- Exit codes: 0 ok, 1 usage, 2 failed, 3 limit, 4 session ended or
not found.
- The session id may be left out when exactly one session is open.
- start --app uploads a local build first; an https URL goes to the
API's install-from-URL.
- Progress goes to stderr, with no spinner unless at a terminal.
Hidden from dcd --help until the API reaches production.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018tQfgpTsA9UhcopKoDezUA
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
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.
What
The first
dcd devicecommands from the Agent Devices plan (dcddocs/device-v1-plan.md, stages 3.1 and 3.2):They call the new
/device/sessionsAPI.Rules that apply to every command
--jsonprints one object,{ ok, session, data, error }, on success and on failure.erroris{ code, message }, wherecodeis the API's machine code (LIVE_NOT_FOUND,LIVE_SPEND_CAP, …) or null.x-dcd-source: cliis sent on every call, so the session timeline shows where a command came from.Notes
start --app ./build.appuploads the build first, using the same upload code asdcd upload. An https URL is passed to the API's install-from-URL instead.installandlaunchtake one or two positionals. With one, a URL, a file or a build extension is read as the app, and a bundle id (it has a dot) as the app id.--idle-timeout: the idle timeout is fixed at 5 minutes.src/utils/envelope.ts, but that file is the binary encryption envelope. The JSON envelope is in a newsrc/utils/device-output.ts.dcd deviceis hidden fromdcd --helpuntil the API is in production. The/device/sessionsroutes are only on dcd'sfeature/agent-devicesbranch so far. Plan Phase 8 unhides it.Next
Stacked PRs will follow: inspect, screenshot, run, logs and open (3.3), the
dcd livealias (3.4), artifacts (5.3) and thedcd mcpbridge (4.4).Tests
test/unit/device-command.test.ts(17 tests) covers the exit-code mapping, the default-session rule, the envelope on success and failure, the request bodies, and the positional heuristics.pnpm lint,pnpm typecheck,pnpm test:unit(372 passing) andpnpm buildpass.🤖 Generated with Claude Code
https://claude.ai/code/session_018tQfgpTsA9UhcopKoDezUA