testdriverai 7.8.0-test.56 → 7.8.0-test.57

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "7.8.0-test.56",
3
+ "version": "7.8.0-test.57",
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",
@@ -237,24 +237,55 @@ PARAMS_EOF
237
237
  --output json)
238
238
  rm -f "$PARAMS_FILE"
239
239
  else
240
- echo "Installing @testdriverai/runner@${RUNNER_VERSION} via npm..."
240
+ echo "Installing @testdriverai/runner@${RUNNER_VERSION} via npm pack + extract..."
241
+
242
+ # Build SSM parameters JSON in a temp file (same approach as dev mode)
243
+ PARAMS_FILE=$(mktemp)
244
+ cat > "$PARAMS_FILE" << PARAMS_EOF
245
+ {
246
+ "commands": [
247
+ "Write-Host '=== Starting runner install (npm pack) ==='",
248
+ "Write-Host 'Stopping existing runner processes...'",
249
+ "Stop-ScheduledTask -TaskName RunTestDriverAgent -ErrorAction SilentlyContinue",
250
+ "Stop-Process -Name node -Force -ErrorAction SilentlyContinue",
251
+ "Start-Sleep -Seconds 2",
252
+ "Write-Host 'Current runner version:'",
253
+ "Get-Content 'C:\\\\testdriver\\\\sandbox-agent\\\\package.json' | ConvertFrom-Json | Select-Object -ExpandProperty version",
254
+ "Set-Location 'C:\\\\Windows\\\\Temp'",
255
+ "Write-Host 'Downloading @testdriverai/runner@${RUNNER_VERSION} via npm pack...'",
256
+ "npm pack @testdriverai/runner@${RUNNER_VERSION} 2>&1 | Write-Host",
257
+ "\$tarball = (Get-ChildItem 'C:\\\\Windows\\\\Temp\\\\testdriverai-runner-*.tgz' | Sort-Object LastWriteTime -Descending | Select-Object -First 1).FullName",
258
+ "Write-Host \"Downloaded tarball: \$tarball\"",
259
+ "Write-Host 'Extracting runner...'",
260
+ "tar -xzf \$tarball -C 'C:\\\\Windows\\\\Temp'",
261
+ "Write-Host 'New runner version in package:'",
262
+ "Get-Content 'C:\\\\Windows\\\\Temp\\\\package\\\\package.json' | ConvertFrom-Json | Select-Object -ExpandProperty version",
263
+ "Write-Host 'Clearing old lib folder...'",
264
+ "Remove-Item 'C:\\\\testdriver\\\\sandbox-agent\\\\lib' -Recurse -Force -ErrorAction SilentlyContinue",
265
+ "Write-Host 'Copying files to sandbox-agent...'",
266
+ "xcopy 'C:\\\\Windows\\\\Temp\\\\package\\\\*' 'C:\\\\testdriver\\\\sandbox-agent\\\\' /E /Y /I",
267
+ "Write-Host 'Runner version after copy:'",
268
+ "Get-Content 'C:\\\\testdriver\\\\sandbox-agent\\\\package.json' | ConvertFrom-Json | Select-Object -ExpandProperty version",
269
+ "Remove-Item 'C:\\\\Windows\\\\Temp\\\\package' -Recurse -Force -ErrorAction SilentlyContinue",
270
+ "Remove-Item \$tarball -Force -ErrorAction SilentlyContinue",
271
+ "Set-Location 'C:\\\\testdriver\\\\sandbox-agent'",
272
+ "Write-Host 'Installing npm dependencies...'",
273
+ "npm install --omit=dev 2>&1 | Write-Host",
274
+ "Write-Host 'Restarting RunTestDriverAgent scheduled task...'",
275
+ "Start-ScheduledTask -TaskName RunTestDriverAgent -ErrorAction SilentlyContinue",
276
+ "Write-Host '=== Runner install complete (npm pack) ==='"
277
+ ]
278
+ }
279
+ PARAMS_EOF
280
+
241
281
  INSTALL_CMD=$(aws ssm send-command \
242
282
  --region "$AWS_REGION" \
243
283
  --instance-ids "$INSTANCE_ID" \
244
284
  --document-name "AWS-RunPowerShellScript" \
245
- --parameters "commands=[
246
- \"Set-Location 'C:\\\\testdriver\\\\sandbox-agent'\",
247
- \"Write-Host 'Installing @testdriverai/runner@${RUNNER_VERSION}...'\",
248
- \"npm install @testdriverai/runner@${RUNNER_VERSION} --omit=dev 2>&1 | Write-Host\",
249
- \"Write-Host 'Stopping runner (config not yet provisioned)...'\",
250
- \"Stop-Process -Name node -Force -ErrorAction SilentlyContinue\",
251
- \"Stop-ScheduledTask -TaskName RunTestDriverAgent -ErrorAction SilentlyContinue\",
252
- \"Start-Sleep -Seconds 2\",
253
- \"Start-ScheduledTask -TaskName RunTestDriverAgent -ErrorAction SilentlyContinue\",
254
- \"Write-Host 'Runner install complete'\"
255
- ]" \
256
- --timeout-seconds 120 \
285
+ --parameters "file://$PARAMS_FILE" \
286
+ --timeout-seconds 180 \
257
287
  --output json)
288
+ rm -f "$PARAMS_FILE"
258
289
  fi
259
290
 
260
291
  INSTALL_CMD_ID=$(jq -r '.Command.CommandId' <<<"$INSTALL_CMD")