You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a0ac012
Browse filesBrowse the repository at this point in the historyBrowse files
fix(providers): read each provider's credentials once and load the fingerprint lazily
- The fingerprint hashes the exact values each provider's own reader uses
(BrowserStack values as read, Limrun values trimmed), so a credential that
differs only in whitespace cannot pass as the daemon's.
- providers.ts is a leaf again: it holds the BrowserStack variable names and
their non-throwing reader; the throwing require moves next to its consumers.
- The client loads the fingerprint module only for a local lease_allocate,
keeping both eager-closure budgets.
- Provider lookup uses a Map, so inherited object keys are not providers.
- A daemon without a provider's credentials records none and says so in the
refusal; the hint gives the exact stop command once.
- Document that a daemon with an HTTP auth hook treats every caller as remote.
- Tests: exact-value hashing, inherited keys, a reachable no-credentials case,
and a startup-level test that the daemon compares against its own env.
Copy file name to clipboardExpand all lines: src/commands/schema/cli-help.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -667,7 +667,7 @@ Rules:
667
667
Use agent-device proxy for direct tunnel access to a Mac you control. Expose the printed proxy URL through cloudflared/ngrok, then run agent-device connect proxy with the tunnel URL and printed token before normal commands.
668
668
Use Limrun, BrowserStack, and AWS Device Farm through local provider profiles; they do not accept a remote agent-device daemon URL.
669
669
Device cloud credentials must be available before the command starts. Limrun uses LIMRUN_API_KEY, or the LIM_*_INSTANCE_* variables for an existing instance. BrowserStack uses BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY. AWS Device Farm uses the AWS CLI credential chain, including CI-provided AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY/AWS_SESSION_TOKEN, AWS profiles, or web identity role variables.
670
-
A local daemon keeps the Limrun and BrowserStack credentials it started with. When the shell holds different ones, the first command that allocates a lease refuses with reason provider-credentials-changed; run agent-device daemon stop with the same --state-dir, then rerun it. A shell that sets none of them uses the daemon's.
670
+
A local daemon keeps the Limrun and BrowserStack credentials it started with. When the shell holds different ones, the first command that allocates a lease refuses with reason provider-credentials-changed; run agent-device daemon stop with the same --state-dir, then rerun the command. A shell that sets none of them uses the daemon's. A daemon with an HTTP auth hook serves remote callers and does not compare.
671
671
Direct-provider connect performs read-only provider calls and saves active connection state only after verification succeeds. It never creates a device, instance, App Automate session, or AWS remote access session.
672
672
connect without --session always creates a fresh remote session and prints that session in its next-step commands. Concurrent callers must pass the returned --session on every command; the ambient active connection is only a single-workflow convenience.
673
673
To replace an existing connection, pass its returned session explicitly with --session <name> --force. --force without --session creates another fresh session and does not release or overwrite an unrelated active connection.
`The running daemon holds different ${provider} credentials than this shell.`,
291
+
current
292
+
? `The running daemon holds different ${provider} credentials than this shell.`
293
+
: `The running daemon was started without the ${provider} credentials this shell holds.`,
291
294
{
292
295
reason: 'provider-credentials-changed',
293
296
provider,
294
-
hint: `The daemon was started with different credentials than this shell. Stop it (agent-device daemon stop --state-dir ${shellQuoteIfNeeded(daemon.stateDir)}), then rerun the command so a daemon starts with the current environment.`,
297
+
hint: `Stop it with agent-device daemon stop --state-dir ${shellQuoteIfNeeded(daemon.stateDir)}, then rerun the command so a new daemon starts with this shell's environment.`,
0 commit comments