@skj1724/oh-my-opencode 3.19.14 → 3.19.16
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/dist/cli/index.js +1 -1
- package/dist/index.js +31 -4
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -8467,7 +8467,7 @@ var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
|
8467
8467
|
// package.json
|
|
8468
8468
|
var package_default = {
|
|
8469
8469
|
name: "@skj1724/oh-my-opencode",
|
|
8470
|
-
version: "3.19.
|
|
8470
|
+
version: "3.19.16",
|
|
8471
8471
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
8472
8472
|
main: "dist/index.js",
|
|
8473
8473
|
types: "dist/index.d.ts",
|
package/dist/index.js
CHANGED
|
@@ -24666,17 +24666,32 @@ function extractErrorInfo(error) {
|
|
|
24666
24666
|
if (typeof error === "object" && error !== null) {
|
|
24667
24667
|
const obj = error;
|
|
24668
24668
|
const inner = obj.error ?? {};
|
|
24669
|
+
const data = obj.data ?? {};
|
|
24670
|
+
let message = inner.message ?? obj.message ?? data.message;
|
|
24671
|
+
if (!message && typeof data.responseBody === "string") {
|
|
24672
|
+
message = extractMessageFromResponseBody(data.responseBody);
|
|
24673
|
+
}
|
|
24674
|
+
message = message ?? String(error);
|
|
24669
24675
|
return {
|
|
24670
|
-
statusCode: obj.status ?? obj.statusCode ?? inner.status,
|
|
24676
|
+
statusCode: obj.status ?? obj.statusCode ?? data.statusCode ?? inner.status,
|
|
24671
24677
|
code: inner.code ?? obj.code,
|
|
24672
24678
|
type: inner.type ?? obj.type,
|
|
24673
|
-
message
|
|
24679
|
+
message,
|
|
24674
24680
|
status: inner.status ?? obj.status,
|
|
24675
|
-
headers: obj.headers
|
|
24681
|
+
headers: obj.headers ?? data.responseHeaders
|
|
24676
24682
|
};
|
|
24677
24683
|
}
|
|
24678
24684
|
return { message: String(error) };
|
|
24679
24685
|
}
|
|
24686
|
+
function extractMessageFromResponseBody(body) {
|
|
24687
|
+
try {
|
|
24688
|
+
const parsed = JSON.parse(body);
|
|
24689
|
+
if (typeof parsed === "object" && parsed !== null) {
|
|
24690
|
+
return parsed.error?.message ?? parsed.message;
|
|
24691
|
+
}
|
|
24692
|
+
} catch {}
|
|
24693
|
+
return;
|
|
24694
|
+
}
|
|
24680
24695
|
function parseRetryAfterMs(headers) {
|
|
24681
24696
|
if (!headers)
|
|
24682
24697
|
return;
|
|
@@ -24709,7 +24724,10 @@ function isZhipuQuotaCode(code) {
|
|
|
24709
24724
|
}
|
|
24710
24725
|
function isGenericQuotaMessage(message) {
|
|
24711
24726
|
const m = message.toLowerCase();
|
|
24712
|
-
|
|
24727
|
+
if (m.includes("per_minute") || m.includes("per minute") || m.includes("per_second") || m.includes("per second") || m.includes("per_day") || m.includes("per day")) {
|
|
24728
|
+
return false;
|
|
24729
|
+
}
|
|
24730
|
+
return m.includes("usage quota") || m.includes("quota exceeded") || m.includes("exceeded your quota") || m.includes("quota") && m.includes("exceeded") || m.includes("upgrade your plan") || m.includes("usage limit") || m.includes("available balance") || m.includes("enable usage from");
|
|
24713
24731
|
}
|
|
24714
24732
|
function isZhipuRateLimitCode(code) {
|
|
24715
24733
|
if (typeof code !== "number")
|
|
@@ -24842,6 +24860,15 @@ function classifyProviderError(error) {
|
|
|
24842
24860
|
reason: `Zhipu/GLM: ${quotaReasons[code] ?? "quota exceeded"}`
|
|
24843
24861
|
};
|
|
24844
24862
|
}
|
|
24863
|
+
if (isGenericQuotaMessage(message)) {
|
|
24864
|
+
return {
|
|
24865
|
+
category: "quota",
|
|
24866
|
+
retryable: false,
|
|
24867
|
+
shouldFallback: true,
|
|
24868
|
+
statusCode,
|
|
24869
|
+
reason: `Quota exceeded: ${message.substring(0, 100)}`
|
|
24870
|
+
};
|
|
24871
|
+
}
|
|
24845
24872
|
if (statusCode === 529 && type2 === "overloaded_error") {
|
|
24846
24873
|
return {
|
|
24847
24874
|
category: "overloaded",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skj1724/oh-my-opencode",
|
|
3
|
-
"version": "3.19.
|
|
3
|
+
"version": "3.19.16",
|
|
4
4
|
"description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|