@skj1724/oh-my-opencode 3.19.8 → 3.19.9
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 +16 -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.9",
|
|
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;
|
|
@@ -24916,6 +24920,15 @@ function classifyProviderError(error) {
|
|
|
24916
24920
|
reason: "Rate limit exceeded (generic 429)"
|
|
24917
24921
|
};
|
|
24918
24922
|
}
|
|
24923
|
+
if (isGenericQuotaMessage(message)) {
|
|
24924
|
+
return {
|
|
24925
|
+
category: "quota",
|
|
24926
|
+
retryable: false,
|
|
24927
|
+
shouldFallback: true,
|
|
24928
|
+
statusCode,
|
|
24929
|
+
reason: `Quota exceeded: ${message.substring(0, 100)}`
|
|
24930
|
+
};
|
|
24931
|
+
}
|
|
24919
24932
|
return {
|
|
24920
24933
|
category: "unknown",
|
|
24921
24934
|
retryable: false,
|
|
@@ -24979,6 +24992,7 @@ function createRuntimeFallbackHook(ctx, options) {
|
|
|
24979
24992
|
const config = options?.config ?? {
|
|
24980
24993
|
enabled: true,
|
|
24981
24994
|
max_attempts: 3,
|
|
24995
|
+
max_retries_before_fallback: 2,
|
|
24982
24996
|
initial_delay_ms: DEFAULT_RETRY_CONFIG.initial_delay_ms,
|
|
24983
24997
|
backoff_factor: DEFAULT_RETRY_CONFIG.backoff_factor,
|
|
24984
24998
|
max_delay_ms: DEFAULT_RETRY_CONFIG.max_delay_ms,
|
|
@@ -25020,7 +25034,7 @@ function createRuntimeFallbackHook(ctx, options) {
|
|
|
25020
25034
|
if (classification.category === "rate_limit") {
|
|
25021
25035
|
const state2 = retryStates.get(sessionID) ?? { attempt: 0, lastAttemptTime: Date.now() };
|
|
25022
25036
|
const decision = calculateRetryDelay(state2.attempt, config, classification.retryAfterMs);
|
|
25023
|
-
if (decision.retryable) {
|
|
25037
|
+
if (decision.retryable && state2.attempt < config.max_retries_before_fallback) {
|
|
25024
25038
|
retryStates.set(sessionID, {
|
|
25025
25039
|
attempt: state2.attempt + 1,
|
|
25026
25040
|
lastAttemptTime: Date.now()
|
|
@@ -64068,6 +64082,7 @@ var GitMasterConfigSchema = exports_external2.object({
|
|
|
64068
64082
|
var RuntimeFallbackConfigSchema = exports_external2.object({
|
|
64069
64083
|
enabled: exports_external2.boolean().default(true),
|
|
64070
64084
|
max_attempts: exports_external2.number().min(0).default(3),
|
|
64085
|
+
max_retries_before_fallback: exports_external2.number().min(0).default(2),
|
|
64071
64086
|
initial_delay_ms: exports_external2.number().min(0).default(2000),
|
|
64072
64087
|
backoff_factor: exports_external2.number().min(1).default(2),
|
|
64073
64088
|
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.9",
|
|
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",
|