@hienlh/ppm 0.8.3 → 0.8.5
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 +12 -0
- package/package.json +1 -1
- package/src/providers/claude-agent-sdk.ts +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.8.5] - 2026-03-23
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- **Diagnostic error messages for project-specific failures**: When SDK returns `assistant error: unknown`, error now includes project path and exact `claude` CLI command to run for diagnosis
|
|
7
|
+
- **Full SDK event dump on error**: Log complete assistant message JSON for debugging (visible in server logs)
|
|
8
|
+
- **Removed broken session retry**: Retry-as-fresh-session didn't help since fresh sessions also fail for the same project — removed to avoid masking the real error
|
|
9
|
+
|
|
10
|
+
## [0.8.4] - 2026-03-23
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Poisoned session auto-recovery**: When resuming an existing SDK session fails with an assistant error (e.g. `unknown`), automatically retry as a fresh session instead of hanging for minutes — fixes projects stuck on a bad session
|
|
14
|
+
|
|
3
15
|
## [0.8.3] - 2026-03-23
|
|
4
16
|
|
|
5
17
|
### Fixed
|
package/package.json
CHANGED
|
@@ -799,16 +799,18 @@ export class ClaudeAgentSdkProvider implements AIProvider {
|
|
|
799
799
|
// SDK assistant messages can carry an error field for auth/billing/rate-limit failures
|
|
800
800
|
const assistantError = (msg as any).error as string | undefined;
|
|
801
801
|
if (assistantError) {
|
|
802
|
+
// Dump full SDK message for debugging
|
|
803
|
+
console.error(`[sdk] session=${sessionId} cwd=${effectiveCwd} assistant error: ${assistantError} (isFirst=${isFirstMessage} retry=${retryCount})`);
|
|
804
|
+
console.error(`[sdk] assistant message dump: ${JSON.stringify(msg).slice(0, 2000)}`);
|
|
802
805
|
const errorHints: Record<string, string> = {
|
|
803
806
|
authentication_failed: "API authentication failed. Check your account credentials in Settings → Accounts.",
|
|
804
807
|
billing_error: "Billing error on this account. Check your subscription status.",
|
|
805
808
|
rate_limit: "Rate limited by the API. Please wait and try again.",
|
|
806
809
|
invalid_request: "Invalid request sent to the API.",
|
|
807
810
|
server_error: "Anthropic API server error. Try again shortly.",
|
|
808
|
-
unknown:
|
|
811
|
+
unknown: `API error in project "${effectiveCwd}". Debug: run \`cd ${effectiveCwd} && claude -p "hi"\` in your terminal. If that also fails, the issue is Claude CLI auth or project config (.claude/ folder). Try: 1) \`claude login\`, 2) Remove .claude/settings.local.json, 3) Create a new chat session.`,
|
|
809
812
|
};
|
|
810
813
|
const hint = errorHints[assistantError] ?? `API error: ${assistantError}`;
|
|
811
|
-
console.error(`[sdk] session=${sessionId} assistant error: ${assistantError}`);
|
|
812
814
|
yield { type: "error", message: hint };
|
|
813
815
|
}
|
|
814
816
|
const content = (msg as any).message?.content;
|
|
@@ -987,7 +989,7 @@ export class ClaudeAgentSdkProvider implements AIProvider {
|
|
|
987
989
|
} // end retryLoop
|
|
988
990
|
} catch (e) {
|
|
989
991
|
const msg = (e as Error).message ?? String(e);
|
|
990
|
-
console.error(`[sdk] error: ${msg}`);
|
|
992
|
+
console.error(`[sdk] session=${sessionId} cwd=${meta.projectPath} error: ${msg}`);
|
|
991
993
|
if (msg.includes("abort") || msg.includes("closed")) {
|
|
992
994
|
// User-initiated abort or WS closed — nothing to report
|
|
993
995
|
} else if (!isFirstMessage && msg.includes("exited with code")) {
|