@hienlh/ppm 0.8.2 → 0.8.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.3] - 2026-03-23
4
+
5
+ ### Fixed
6
+ - **WSL timeout diagnostics**: Connection timeout error now detects WSL environment and suggests specific DNS/proxy troubleshooting steps
7
+ - **No-credentials warning**: Log warning when no account and no API key in env — helps diagnose why SDK subprocess hangs
8
+
3
9
  ## [0.8.2] - 2026-03-23
4
10
 
5
11
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hienlh/ppm",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "Personal Project Manager — mobile-first web IDE with AI assistance",
5
5
  "author": "hienlh",
6
6
  "license": "MIT",
@@ -553,6 +553,14 @@ export class ClaudeAgentSdkProvider implements AIProvider {
553
553
  yield { type: "account_info" as const, accountId: account.id, accountLabel: account.label ?? account.email ?? "Unknown" };
554
554
  }
555
555
  const queryEnv = this.buildQueryEnv(meta.projectPath, account);
556
+
557
+ // Pre-flight: warn if no credentials at all (avoids 2-minute silent timeout)
558
+ if (!account) {
559
+ const hasApiKey = !!(queryEnv.ANTHROPIC_API_KEY || queryEnv.CLAUDE_CODE_OAUTH_TOKEN);
560
+ if (!hasApiKey) {
561
+ console.warn(`[sdk] session=${sessionId} no account and no API key in env — Claude CLI will use its own auth (if any)`);
562
+ }
563
+ }
556
564
  console.log(`[sdk] query: session=${sessionId} sdkId=${sdkId} isFirst=${isFirstMessage} fork=${shouldFork} cwd=${effectiveCwd} platform=${process.platform} accountMode=${!!account} permissionMode=${permissionMode} isBypass=${isBypass}`);
557
565
 
558
566
  // TODO: Remove when TS SDK fixes Windows stdin pipe buffering (see queryDirectCli() JSDoc for tracking issues)
@@ -130,9 +130,14 @@ async function runStreamLoop(sessionId: string, providerId: string, content: str
130
130
  clearInterval(heartbeat);
131
131
  console.error(`[chat] session=${sessionId} SDK connection timeout after ${elapsed}s`);
132
132
  logSessionEvent(sessionId, "ERROR", `SDK connection timeout after ${elapsed}s — subprocess may have failed to start`);
133
+ const projectPath = entry?.projectPath ?? "";
134
+ const isWSL = projectPath.startsWith("/home/") || projectPath.startsWith("/mnt/");
135
+ const wslHint = isWSL
136
+ ? "\n\nWSL detected — this is likely a network issue. Try from your WSL terminal:\n curl -s https://api.anthropic.com\nIf that fails, check WSL DNS settings (/etc/resolv.conf) or proxy configuration."
137
+ : "";
133
138
  safeSend(sessionId, {
134
139
  type: "error",
135
- message: `Claude SDK failed to respond after ${elapsed}s. Check that "claude" CLI works in your terminal, or try: ppm start -f`,
140
+ message: `Claude SDK failed to respond after ${elapsed}s. The API may be unreachable from this machine.${wslHint}\n\nGeneral troubleshooting:\n• Check internet connectivity\n• Run \`claude\` in your terminal to verify it works\n• Try: ppm start -f`,
136
141
  });
137
142
  abortController.abort();
138
143
  return;