diff --git a/.github/workflows/copilot-sdk-ci.yml b/.github/workflows/copilot-sdk-ci.yml index a3fc4aa2c8..0388558a8a 100644 --- a/.github/workflows/copilot-sdk-ci.yml +++ b/.github/workflows/copilot-sdk-ci.yml @@ -98,8 +98,8 @@ jobs: } EOF - # Run the client - DEBUG=copilot-client cat /tmp/test/config.json | node dist/cli.js + # Run the client (using index.js which exports main()) + DEBUG=copilot-client cat /tmp/test/config.json | node -e "import('./dist/index.js').then(m => m.main())" # Verify event log was created if [ ! -f /tmp/test/events.jsonl ]; then diff --git a/copilot-client/test-local.sh b/copilot-client/test-local.sh index 01e6036005..b84ad62b2e 100755 --- a/copilot-client/test-local.sh +++ b/copilot-client/test-local.sh @@ -53,7 +53,7 @@ cat /tmp/copilot-client-test/config.json # Run the client with debug logging echo "" echo "Running copilot-client..." -DEBUG=copilot-client cat /tmp/copilot-client-test/config.json | node dist/cli.js +DEBUG=copilot-client cat /tmp/copilot-client-test/config.json | node -e "import('./dist/index.js').then(m => m.main())" # Check results echo ""