Skip to content

feat: discover cloud config during connect#488

Merged
thymikee merged 7 commits intomainfrom
feat/cloud-connect-discovery
Apr 30, 2026
Merged

feat: discover cloud config during connect#488
thymikee merged 7 commits intomainfrom
feat/cloud-connect-discovery

Conversation

@thymikee
Copy link
Copy Markdown
Contributor

@thymikee thymikee commented Apr 30, 2026

Summary

  • allow plain agent-device connect to resolve cloud auth, fetch a connection profile, and write a generated local remote config
  • keep generated profile files content-addressed so repeated plain connect calls are idempotent
  • move profile materialization into a focused cloud connection profile module while preserving explicit --remote-config support

Validation

  • pnpm exec oxfmt --write src/cli/cloud-connection-profile.ts src/cli/commands/connection.ts src/cli/commands/connection-runtime.ts src/cli/auth-session.ts src/cli/__tests__/auth-session.test.ts src/__tests__/remote-connection.test.ts src/utils/remote-config.ts
  • pnpm typecheck
  • pnpm lint
  • pnpm test -- src/cli/__tests__/auth-session.test.ts src/__tests__/remote-connection.test.ts
  • git diff --check

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

PR Preview Action v1.8.1

QR code for preview link

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

Built to branch gh-pages at 2026-04-30 20:13 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown

@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: ab32593978

ℹ️ 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 thread src/cli/commands/connection.ts Outdated
Comment on lines +33 to +35
const resolved = flags.remoteConfig
? resolveRemoteConnectFlags(flags)
: await resolveGeneratedCloudConnectFlags(flags, stateDir);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reuse prior auth instead of forcing a second device login

When --remote-config is omitted, this branch always calls resolveGeneratedCloudConnectFlags, which always calls loginWithDeviceAuth. In the normal CLI flow, resolveRemoteAuthForCli already runs before command dispatch (src/cli.ts) and may have just authenticated or refreshed a token based on daemonBaseUrl from env/config. The new unconditional login path can therefore trigger a second interactive auth (or fail in non-interactive shells) even when valid auth is already available, making connect without --remote-config unreliable for configured/automated environments.

Useful? React with 👍 / 👎.

@thymikee thymikee force-pushed the feat/cloud-connect-discovery branch from ab32593 to 8dd89ae Compare April 30, 2026 19:34
@thymikee thymikee force-pushed the feat/cloud-connect-discovery branch from 8dd89ae to 22f402b Compare April 30, 2026 19:43
@thymikee thymikee merged commit 7ea8d9e into main Apr 30, 2026
18 checks passed
@thymikee thymikee deleted the feat/cloud-connect-discovery branch April 30, 2026 20:16
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