@skj1724/oh-my-opencode 3.19.8 → 3.19.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/dist/cli/index.js +2 -1
- package/dist/config/schema.d.ts +2 -0
- package/dist/index.js +25 -1
- 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.10",
|
|
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",
|
|
@@ -25213,6 +25213,7 @@ var GitMasterConfigSchema = exports_external.object({
|
|
|
25213
25213
|
var RuntimeFallbackConfigSchema = exports_external.object({
|
|
25214
25214
|
enabled: exports_external.boolean().default(true),
|
|
25215
25215
|
max_attempts: exports_external.number().min(0).default(3),
|
|
25216
|
+
max_retries_before_fallback: exports_external.number().min(0).default(2),
|
|
25216
25217
|
initial_delay_ms: exports_external.number().min(0).default(2000),
|
|
25217
25218
|
backoff_factor: exports_external.number().min(1).default(2),
|
|
25218
25219
|
max_delay_ms: exports_external.number().min(0).default(30000),
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -1156,6 +1156,7 @@ export declare const GitMasterConfigSchema: z.ZodObject<{
|
|
|
1156
1156
|
export declare const RuntimeFallbackConfigSchema: z.ZodObject<{
|
|
1157
1157
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1158
1158
|
max_attempts: z.ZodDefault<z.ZodNumber>;
|
|
1159
|
+
max_retries_before_fallback: z.ZodDefault<z.ZodNumber>;
|
|
1159
1160
|
initial_delay_ms: z.ZodDefault<z.ZodNumber>;
|
|
1160
1161
|
backoff_factor: z.ZodDefault<z.ZodNumber>;
|
|
1161
1162
|
max_delay_ms: z.ZodDefault<z.ZodNumber>;
|
|
@@ -2117,6 +2118,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
2117
2118
|
runtime_fallback: z.ZodOptional<z.ZodObject<{
|
|
2118
2119
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2119
2120
|
max_attempts: z.ZodDefault<z.ZodNumber>;
|
|
2121
|
+
max_retries_before_fallback: z.ZodDefault<z.ZodNumber>;
|
|
2120
2122
|
initial_delay_ms: z.ZodDefault<z.ZodNumber>;
|
|
2121
2123
|
backoff_factor: z.ZodDefault<z.ZodNumber>;
|
|
2122
2124
|
max_delay_ms: z.ZodDefault<z.ZodNumber>;
|
package/dist/index.js
CHANGED
|
@@ -24707,6 +24707,10 @@ function isZhipuQuotaCode(code) {
|
|
|
24707
24707
|
return false;
|
|
24708
24708
|
return [1113, 1304, 1308, 1309].includes(code);
|
|
24709
24709
|
}
|
|
24710
|
+
function isGenericQuotaMessage(message) {
|
|
24711
|
+
const m = message.toLowerCase();
|
|
24712
|
+
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");
|
|
24713
|
+
}
|
|
24710
24714
|
function isZhipuRateLimitCode(code) {
|
|
24711
24715
|
if (typeof code !== "number")
|
|
24712
24716
|
return false;
|
|
@@ -24907,6 +24911,15 @@ function classifyProviderError(error) {
|
|
|
24907
24911
|
};
|
|
24908
24912
|
}
|
|
24909
24913
|
if (statusCode === 429) {
|
|
24914
|
+
if (isGenericQuotaMessage(message)) {
|
|
24915
|
+
return {
|
|
24916
|
+
category: "quota",
|
|
24917
|
+
retryable: false,
|
|
24918
|
+
shouldFallback: true,
|
|
24919
|
+
statusCode,
|
|
24920
|
+
reason: `Quota exceeded: ${message.substring(0, 100)}`
|
|
24921
|
+
};
|
|
24922
|
+
}
|
|
24910
24923
|
return {
|
|
24911
24924
|
category: "rate_limit",
|
|
24912
24925
|
retryable: true,
|
|
@@ -24916,6 +24929,15 @@ function classifyProviderError(error) {
|
|
|
24916
24929
|
reason: "Rate limit exceeded (generic 429)"
|
|
24917
24930
|
};
|
|
24918
24931
|
}
|
|
24932
|
+
if (isGenericQuotaMessage(message)) {
|
|
24933
|
+
return {
|
|
24934
|
+
category: "quota",
|
|
24935
|
+
retryable: false,
|
|
24936
|
+
shouldFallback: true,
|
|
24937
|
+
statusCode,
|
|
24938
|
+
reason: `Quota exceeded: ${message.substring(0, 100)}`
|
|
24939
|
+
};
|
|
24940
|
+
}
|
|
24919
24941
|
return {
|
|
24920
24942
|
category: "unknown",
|
|
24921
24943
|
retryable: false,
|
|
@@ -24979,6 +25001,7 @@ function createRuntimeFallbackHook(ctx, options) {
|
|
|
24979
25001
|
const config = options?.config ?? {
|
|
24980
25002
|
enabled: true,
|
|
24981
25003
|
max_attempts: 3,
|
|
25004
|
+
max_retries_before_fallback: 2,
|
|
24982
25005
|
initial_delay_ms: DEFAULT_RETRY_CONFIG.initial_delay_ms,
|
|
24983
25006
|
backoff_factor: DEFAULT_RETRY_CONFIG.backoff_factor,
|
|
24984
25007
|
max_delay_ms: DEFAULT_RETRY_CONFIG.max_delay_ms,
|
|
@@ -25020,7 +25043,7 @@ function createRuntimeFallbackHook(ctx, options) {
|
|
|
25020
25043
|
if (classification.category === "rate_limit") {
|
|
25021
25044
|
const state2 = retryStates.get(sessionID) ?? { attempt: 0, lastAttemptTime: Date.now() };
|
|
25022
25045
|
const decision = calculateRetryDelay(state2.attempt, config, classification.retryAfterMs);
|
|
25023
|
-
if (decision.retryable) {
|
|
25046
|
+
if (decision.retryable && state2.attempt < config.max_retries_before_fallback) {
|
|
25024
25047
|
retryStates.set(sessionID, {
|
|
25025
25048
|
attempt: state2.attempt + 1,
|
|
25026
25049
|
lastAttemptTime: Date.now()
|
|
@@ -64068,6 +64091,7 @@ var GitMasterConfigSchema = exports_external2.object({
|
|
|
64068
64091
|
var RuntimeFallbackConfigSchema = exports_external2.object({
|
|
64069
64092
|
enabled: exports_external2.boolean().default(true),
|
|
64070
64093
|
max_attempts: exports_external2.number().min(0).default(3),
|
|
64094
|
+
max_retries_before_fallback: exports_external2.number().min(0).default(2),
|
|
64071
64095
|
initial_delay_ms: exports_external2.number().min(0).default(2000),
|
|
64072
64096
|
backoff_factor: exports_external2.number().min(1).default(2),
|
|
64073
64097
|
max_delay_ms: exports_external2.number().min(0).default(30000),
|
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.10",
|
|
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",
|