@testdriverai/agent 7.11.151-test → 7.11.152-test

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -110,6 +110,26 @@ class InitCommand extends BaseCommand {
110
110
  }
111
111
  }
112
112
 
113
+ // Key already provided via the environment: use it without prompting.
114
+ const envKey = process.env.TD_API_KEY && process.env.TD_API_KEY.trim();
115
+ if (envKey) {
116
+ console.log(chalk.gray("\n Using TD_API_KEY from environment...\n"));
117
+ return envKey;
118
+ }
119
+
120
+ // Non-interactive stdin (CI, agents, piped input): the prompts below would
121
+ // never get an answer (readline closes on EOF without resolving, so init
122
+ // silently exits before scaffolding). Skip auth and keep going.
123
+ if (!process.stdin.isTTY) {
124
+ console.log(
125
+ chalk.yellow(
126
+ "\n ⚠️ Non-interactive shell, skipping API key setup. Add it later to .env:\n",
127
+ ),
128
+ );
129
+ console.log(chalk.gray(" TD_API_KEY=your_api_key\n"));
130
+ return null;
131
+ }
132
+
113
133
  console.log(chalk.cyan(" Setting up your TestDriver API key...\n"));
114
134
 
115
135
  // Ask user how they want to authenticate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testdriverai/agent",
3
- "version": "7.11.151-test",
3
+ "version": "7.11.152-test",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "sdk.js",
6
6
  "types": "sdk.d.ts",