@kody-ade/kody-engine-lite 0.1.128 → 0.1.129

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.
Files changed (2) hide show
  1. package/dist/bin/cli.js +38 -10
  2. package/package.json +1 -1
package/dist/bin/cli.js CHANGED
@@ -3745,23 +3745,51 @@ function getBrowserToolGuidance(stageName, taskDir) {
3745
3745
  ### Dev Server Setup (REQUIRED before browsing)
3746
3746
  You MUST start the dev server before using any browser navigation tools:
3747
3747
  \`\`\`bash
3748
- # Start the dev server in the background
3749
- ${devServer.command} &
3750
- # Wait for it to be ready (look for "${devServer.readyPattern}" in output)
3751
- sleep 5
3748
+ # Start the dev server in the background with output redirected to a log file
3749
+ nohup ${devServer.command} > /tmp/dev-server.log 2>&1 &
3750
+ DEV_PID=$!
3751
+
3752
+ # Wait up to ${devServer.readyTimeout}s for the server to be ready
3753
+ for i in $(seq 1 ${devServer.readyTimeout}); do
3754
+ if curl -s -o /dev/null -w "%{http_code}" ${devServer.url} 2>/dev/null | grep -qE "^[23]"; then
3755
+ echo "Dev server is ready"
3756
+ break
3757
+ fi
3758
+ if ! kill -0 $DEV_PID 2>/dev/null; then
3759
+ echo "Dev server process died. Last 20 lines:"
3760
+ tail -20 /tmp/dev-server.log
3761
+ break
3762
+ fi
3763
+ sleep 1
3764
+ done
3752
3765
  \`\`\`
3753
3766
  The dev server URL is: ${devServer.url}
3754
- After you are done browsing, kill the dev server: \`kill %1 2>/dev/null || true\`` : `
3767
+ If the dev server fails to start (e.g. DB connection issues), skip browser verification and proceed with code-only changes. Do NOT hang waiting for it.
3768
+ After you are done browsing, kill the dev server: \`kill $DEV_PID 2>/dev/null || true\`` : `
3755
3769
  ### Dev Server Setup (REQUIRED before browsing)
3756
3770
  You MUST start the project's dev server before using any browser navigation tools.
3757
3771
  Check package.json for the dev command (usually \`pnpm dev\` or \`npm run dev\`).
3758
3772
  \`\`\`bash
3759
- # Start the dev server in the background
3760
- pnpm dev &
3761
- # Wait for it to be ready
3762
- sleep 5
3773
+ # Start the dev server in the background with output redirected
3774
+ nohup pnpm dev > /tmp/dev-server.log 2>&1 &
3775
+ DEV_PID=$!
3776
+
3777
+ # Wait up to 30s for the server to be ready
3778
+ for i in $(seq 1 30); do
3779
+ if curl -s -o /dev/null -w "%{http_code}" http://localhost:3000 2>/dev/null | grep -qE "^[23]"; then
3780
+ echo "Dev server is ready"
3781
+ break
3782
+ fi
3783
+ if ! kill -0 $DEV_PID 2>/dev/null; then
3784
+ echo "Dev server process died. Last 20 lines:"
3785
+ tail -20 /tmp/dev-server.log
3786
+ break
3787
+ fi
3788
+ sleep 1
3789
+ done
3763
3790
  \`\`\`
3764
- After you are done browsing, kill the dev server: \`kill %1 2>/dev/null || true\``;
3791
+ If the dev server fails to start (e.g. DB connection issues), skip browser verification and proceed with code-only changes. Do NOT hang waiting for it.
3792
+ After you are done browsing, kill the dev server: \`kill $DEV_PID 2>/dev/null || true\``;
3765
3793
  if (stageName === "build" || stageName === "review-fix") {
3766
3794
  return `## Browser Visual Verification (MANDATORY for UI tasks)
3767
3795
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine-lite",
3
- "version": "0.1.128",
3
+ "version": "0.1.129",
4
4
  "description": "Autonomous SDLC pipeline: Kody orchestration + Claude Code + LiteLLM",
5
5
  "license": "MIT",
6
6
  "type": "module",