Skip to content

feat: full res live screenshots - #343

Merged
finalerock44 merged 12 commits into
devfrom
feat/live-full-screenshots
Nov 19, 2026
Merged

finalerock44 merged 12 commits into
devfrom
feat/live-full-screenshots

Conversation

@finalerock44

Copy link
Copy Markdown
Contributor

What & why

Type of change

  • fix — bug fix
  • feat — new feature
  • perf — performance improvement
  • refactor — code change that's neither a fix nor a feature
  • docs — documentation only
  • chore / ci / build / test — tooling, no user-facing change
  • Breaking change (title has ! or PR notes a BREAKING CHANGE:)

Checklist

  • PR title follows the Conventional Commits format (see comment above)
  • pnpm lint passes
  • pnpm typecheck passes
  • pnpm build passes
  • I have not bumped the version or edited CHANGELOG.md (the release workflow handles this)
  • I have signed the CLA (the bot will prompt on first contribution)
  • Docs / README.md / STYLE_GUIDE.md updated if behaviour or output changed

How to test

When several agents in one organization each drive a device session, one
could not tell its session from another's: a call without a session id took
the org's only open session, and `dcd device stop --all` stopped every one.

- A command that names no session takes yours (the API's
  `started_by.you`), never someone else's; with none of yours it lists who
  started each. An API that does not say whose a session is is read as
  before.
- `--force` on the commands that change a session (stop, install, launch,
  run, tap, type, swipe, press-key, open-link, set-location,
  request-human): the API refuses an agent changing a session someone else
  started (LIVE_NOT_YOURS, exit 2) unless it is given.
- `stop --all` stops your sessions and leaves the others, naming them;
  with `--force`, everyone's.
- `dcd mcp` names its process on its connection to the hosted tools
  (x-dcd-client-instance), so the sessions it starts read as its own and a
  call without a session id takes one of them.
- The session fields show who started it.
Flags and ids
- Every subcommand refuses a flag it does not define and names the one
  meant: `type --text ... --sensetive` typed the text in the clear and
  exited 0, and `--wiat` started a session without waiting.
- An id that can't be a session (`undefined`, `null`, a single word) is a
  usage error, never sent: a script's unset variable reached the API.
- An unknown subcommand under --json prints the device envelope, with the
  command meant (`press_key` is `press-key`).
- request-human takes --reason, so the session id may come first; a lone
  argument that is an open session's id is refused instead of being sent
  as the reason.

Waits
- A poll that fails on the way (a dropped connection, a proxy's 502, a
  rate limit) is asked again instead of ending the wait.
- `run` stops waiting when the session ends under the flow (exit 4), or
  once the session's time is over, and keeps the flow's command id in the
  error.
- `start --wait --json` names the session on stderr as soon as it exists.
- `status --wait` waits for the device and its app.

Flows
- `run flow.yaml` uploads a flow that uses other files with them, as the
  MCP bridge already did, and runs it by its path inside the bundle.
- With an entry, a bundle holds only the files that flow reaches, not every
  YAML file under the folder.
- Flows in `.maestro/` are found; other dot-folders are still skipped.
- A failed run shows the API's own wording of the failure and where it
  failed (file, line, command, and the runFlow lines that led there).

Output and input
- Action, launch, inspect, screenshot, logs and run print the session's
  warnings (idle timeout, crash, end of its time) after their result.
- Text from the device, the app or another client is printed without
  escape sequences or control characters.
- A failed action's message is fixed text: it never carries what was
  typed.
- Error answers keep retry_after_s, limit, spent and phase in the --json
  envelope; an HTML error page is cut to its title.
- logs takes --level and --grep, and says when the answer's size cap cut
  it, or when --follow missed lines.
- run takes --env-file, and type takes --text-stdin, so a secret can stay
  out of the shell history.
- `artifacts` with no id takes your most recent session, ended or not.
- An empty --app is refused, a build URL ending in .apk or .zip implies
  the platform, points may be written as 50%,80%, a cost shows its half
  cent, and status says a person has control once.
…ce tools are missing

- The bridge's `run` reads a flow, and the files it uses, only from
  inside the working directory the server was started in, and only
  .yaml/.yml files; a bundle refuses a file that is a link out of it. An
  agent's tool call is not the user typing a path.
- dcd_download_artifacts writes only inside the working directory and
  never replaces a file the server did not write. It writes files, so it
  is no longer annotated read-only (it stays in read-only mode: it changes
  nothing in the cloud).
- start_device takes app_path: the build is uploaded before the session
  starts, so no device time is spent on the upload.
- A directory's entry is sent with forward slashes, as the API takes it,
  also on Windows.
- When the device tools can't be listed (not signed in, or none for the
  account), the bridge lists load_device_tools, whose description says
  why, and a device tool called anyway says why too. An empty or failed
  listing is no longer kept, and the bridge sends tools/list_changed once
  the tools load.
…emetry

- --api-url and DCD_API_URL are checked before credentials are sent:
  plain http is refused except to this machine, a user name in the URL is
  refused, and a host outside devicecloud.dev is allowed with a warning on
  stderr.
- Telemetry drops the query, fragment and user info of every link in the
  command line and in error messages, so a signed build link given to
  `device start --app` or `device install` is not kept. Its events go to a
  hand-given API URL only when the command itself would use it.
The API can now hand back a PNG at the device's own resolution, as a
link, instead of the smaller JPEG frame: useful for baseline images and
detail a frame loses.

- dcd device screenshot --full downloads it (default
  <session>-<time>.png, or --output) and reports its size.
- Over dcd mcp, take_screenshot with full_size: true also takes path:
  the bridge downloads the linked PNG there, inside the working
  directory and never over a file it did not write. The link stays in
  the result, and a download that fails says why.
- An API or device too old for it answers LIVE_NOT_SUPPORTED.
A team's overage cap or a usage alert's hard stop refuses a device
session start with USAGE_LIMIT_EXCEEDED, as it refuses a test run.
dcd device exited 2 (failed) on it; it is a limit, so it now exits 3,
with the concurrency, spend and rate limits.

Also corrects screenshot --full's help: a device busy running a flow
can't take the screenshot, and the request fails after 30 seconds
rather than waiting for the flow to end.
@finalerock44 finalerock44 self-assigned this Nov 19, 2026
@finalerock44
finalerock44 added this pull request to stack #342 November 19, 2026 00:37
@finalerock44 finalerock44 changed the title Feat/live full screenshots feat: full res live screenshots Nov 19, 2026
@claude

claude Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

started_by.api_key_name is renamed key_name, here and in the API. It is
a key's label, such as "CI", never the key itself, but the old name
read as a secret to code scanning, which flagged printing it. Nothing
released sends or reads the old name.
…o fix/live-cli

# Conflicts:
#	src/utils/device-output.ts
dcd mcp held run's path and the artifact downloads to the working
directory, but app_path on start_device and install_app went straight
to the upload. An agent's call is not the user typing a path, so a call
naming any .apk, .app, .zip or .tar.gz on the machine uploaded it to
the team's storage. app_path is now resolved the way path is: inside
the working directory, links followed, or refused before anything is
uploaded.
Base automatically changed from fix/live-cli to dev November 19, 2026 11:45
@finalerock44
finalerock44 merged commit 1325da8 into dev Nov 19, 2026
8 checks passed
@finalerock44
finalerock44 deleted the feat/live-full-screenshots branch November 19, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant