Skip to content

Add typed TypeScript daemon client#218

Merged
thymikee merged 7 commits intomainfrom
codex/typed-daemon-client
Mar 14, 2026
Merged

Add typed TypeScript daemon client#218
thymikee merged 7 commits intomainfrom
codex/typed-daemon-client

Conversation

@thymikee
Copy link
Contributor

Summary

Add a published typed TypeScript client for core daemon operations and route the covered CLI commands through that client.
Keep scope within the daemon client/CLI/session handler surface; touched files: 12.
Simplify the initial implementation by returning device identifiers directly from open, removing the extra session_list round-trip, extracting client-backed CLI handling into its own module, and excluding test declarations from the package build.

Validation

  • pnpm typecheck
  • node --test src/__tests__/client.test.ts src/__tests__/cli-diagnostics.test.ts src/daemon/handlers/__tests__/session.test.ts
  • pnpm test:smoke
  • pnpm build

Known gap: pnpm test:unit still hits the pre-existing pending-promise failure in src/daemon/__tests__/http-server.test.ts.

@github-actions
Copy link

github-actions bot commented Mar 13, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstackincubator.github.io/agent-device/pr-preview/pr-218/

Built to branch gh-pages at 2026-03-13 19:07 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8e9b8cc0a6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +108 to +112
app: positionals[0],
url: positionals[1],
activity: flags.activity,
relaunch: flags.relaunch,
...buildSelectionOptions(flags),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Propagate save-script/no-record flags for open

open is documented to accept --save-script (and still inherits global --no-record), but this client-backed branch only forwards app/url/activity/relaunch plus selection fields, so those recording flags are silently dropped before the daemon request. In practice, open <app> --save-script will not enable session script capture (the session handler gates recording on req.flags.saveScript), and --no-record cannot suppress logging for this path.

Useful? React with 👍 / 👎.

}

if (command === 'screenshot') {
const result = await client.capture.screenshot({ path: positionals[0] });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve --out when routing screenshot through client

The screenshot command supports --out (src/utils/command-schema.ts), but this call only forwards the positional path, so agent-device screenshot --out <path> loses the requested destination when routed through the typed client. That changes existing CLI behavior for scripted runs that rely on --out to control artifact location.

Useful? React with 👍 / 👎.

@thymikee thymikee force-pushed the codex/typed-daemon-client branch from 5d7ec1a to ff3ba4a Compare March 13, 2026 18:15
@thymikee thymikee force-pushed the codex/typed-daemon-client branch from ff3ba4a to 9721d47 Compare March 13, 2026 18:40
@thymikee thymikee merged commit 34b9579 into main Mar 14, 2026
7 checks passed
@thymikee thymikee deleted the codex/typed-daemon-client branch March 14, 2026 13:19
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