@hienlh/ppm 0.5.9 → 0.5.10

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,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.10] - 2026-03-18
4
+
5
+ ### Added
6
+ - **SDK diagnostic logging** — logs `claude --version` output, auth env var status (SET/unset) before each query; helps identify why SDK hangs on Windows
7
+
3
8
  ## [0.5.9] - 2026-03-18
4
9
 
5
10
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hienlh/ppm",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "description": "Personal Project Manager — mobile-first web IDE with AI assistance",
5
5
  "module": "src/index.ts",
6
6
  "type": "module",
@@ -354,6 +354,26 @@ export class ClaudeAgentSdkProvider implements AIProvider {
354
354
  console.log(`[sdk] claude CLI: ${claudePath || "(not found in PATH)"}`);
355
355
  } catch { console.log("[sdk] claude CLI: check failed"); }
356
356
 
357
+ // Quick CLI version check — verify the binary actually runs from this process
358
+ try {
359
+ const verProc = Bun.spawnSync({
360
+ cmd: ["claude", "--version"],
361
+ stdout: "pipe", stderr: "pipe",
362
+ cwd: effectiveCwd,
363
+ });
364
+ console.log(`[sdk] claude --version: exit=${verProc.exitCode} out="${verProc.stdout.toString().trim().slice(0, 100)}"`);
365
+ if (verProc.exitCode !== 0) {
366
+ console.error(`[sdk] claude --version stderr: ${verProc.stderr.toString().trim().slice(0, 300)}`);
367
+ }
368
+ } catch (e) {
369
+ console.error(`[sdk] claude --version failed: ${(e as Error).message}`);
370
+ }
371
+
372
+ // Log env keys relevant to SDK auth (values redacted)
373
+ const authKeys = ["ANTHROPIC_API_KEY", "CLAUDE_CODE_USE_BEDROCK", "CLAUDE_CODE_USE_VERTEX", "CLAUDE_CODE_USE_FOUNDRY"];
374
+ const envStatus = authKeys.map(k => `${k}=${process.env[k] ? "SET" : "unset"}`).join(" ");
375
+ console.log(`[sdk] env auth: ${envStatus}`);
376
+
357
377
  let lastPartialText = "";
358
378
  /** Number of tool_use blocks pending results (top-level tools only, not subagent children) */
359
379
  let pendingToolCount = 0;