@rely-ai/caliber 1.45.4 → 1.46.0
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/bin.js +20 -10
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -2433,6 +2433,15 @@ var VertexProvider = class {
|
|
|
2433
2433
|
|
|
2434
2434
|
// src/llm/openai-compat.ts
|
|
2435
2435
|
import OpenAI from "openai";
|
|
2436
|
+
var DEFAULT_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
2437
|
+
function resolveTimeoutMs() {
|
|
2438
|
+
const raw = process.env.CALIBER_OPENAI_TIMEOUT_MS;
|
|
2439
|
+
if (raw) {
|
|
2440
|
+
const parsed = parseInt(raw, 10);
|
|
2441
|
+
if (Number.isFinite(parsed) && parsed >= 1e3) return parsed;
|
|
2442
|
+
}
|
|
2443
|
+
return DEFAULT_TIMEOUT_MS;
|
|
2444
|
+
}
|
|
2436
2445
|
var OpenAICompatProvider = class {
|
|
2437
2446
|
client;
|
|
2438
2447
|
defaultModel;
|
|
@@ -2440,7 +2449,8 @@ var OpenAICompatProvider = class {
|
|
|
2440
2449
|
constructor(config, options) {
|
|
2441
2450
|
this.client = new OpenAI({
|
|
2442
2451
|
apiKey: config.apiKey,
|
|
2443
|
-
...config.baseUrl && { baseURL: config.baseUrl }
|
|
2452
|
+
...config.baseUrl && { baseURL: config.baseUrl },
|
|
2453
|
+
timeout: resolveTimeoutMs()
|
|
2444
2454
|
});
|
|
2445
2455
|
this.defaultModel = config.model;
|
|
2446
2456
|
this.temperature = options?.temperature;
|
|
@@ -2623,7 +2633,7 @@ function resolveAgentBin() {
|
|
|
2623
2633
|
_agentBin = "agent";
|
|
2624
2634
|
return _agentBin;
|
|
2625
2635
|
}
|
|
2626
|
-
var
|
|
2636
|
+
var DEFAULT_TIMEOUT_MS2 = 10 * 60 * 1e3;
|
|
2627
2637
|
var SIGKILL_DELAY_MS = 5e3;
|
|
2628
2638
|
var STDERR_MAX_BYTES = 10 * 1024;
|
|
2629
2639
|
var CursorAcpProvider = class {
|
|
@@ -2636,9 +2646,9 @@ var CursorAcpProvider = class {
|
|
|
2636
2646
|
this.defaultModel = config.model || "sonnet-4.6";
|
|
2637
2647
|
this.cursorApiKey = process.env.CURSOR_API_KEY ?? process.env.CURSOR_AUTH_TOKEN;
|
|
2638
2648
|
const envTimeout = process.env.CALIBER_CURSOR_TIMEOUT_MS;
|
|
2639
|
-
this.timeoutMs = envTimeout ? parseInt(envTimeout, 10) :
|
|
2649
|
+
this.timeoutMs = envTimeout ? parseInt(envTimeout, 10) : DEFAULT_TIMEOUT_MS2;
|
|
2640
2650
|
if (!Number.isFinite(this.timeoutMs) || this.timeoutMs < 1e3) {
|
|
2641
|
-
this.timeoutMs =
|
|
2651
|
+
this.timeoutMs = DEFAULT_TIMEOUT_MS2;
|
|
2642
2652
|
}
|
|
2643
2653
|
}
|
|
2644
2654
|
async call(options) {
|
|
@@ -2925,7 +2935,7 @@ function isCursorLoggedIn() {
|
|
|
2925
2935
|
// src/llm/claude-cli.ts
|
|
2926
2936
|
import fs7 from "fs";
|
|
2927
2937
|
import { spawn as spawn2, execSync as execSync7, execFileSync as execFileSync2 } from "child_process";
|
|
2928
|
-
var
|
|
2938
|
+
var DEFAULT_TIMEOUT_MS3 = 10 * 60 * 1e3;
|
|
2929
2939
|
var IS_WINDOWS2 = process.platform === "win32";
|
|
2930
2940
|
function candidateClaudePaths() {
|
|
2931
2941
|
if (IS_WINDOWS2) return [];
|
|
@@ -2992,9 +3002,9 @@ var ClaudeCliProvider = class {
|
|
|
2992
3002
|
constructor(config) {
|
|
2993
3003
|
this.defaultModel = config.model || "default";
|
|
2994
3004
|
const envTimeout = process.env.CALIBER_CLAUDE_CLI_TIMEOUT_MS;
|
|
2995
|
-
this.timeoutMs = envTimeout ? parseInt(envTimeout, 10) :
|
|
3005
|
+
this.timeoutMs = envTimeout ? parseInt(envTimeout, 10) : DEFAULT_TIMEOUT_MS3;
|
|
2996
3006
|
if (!Number.isFinite(this.timeoutMs) || this.timeoutMs < 1e3) {
|
|
2997
|
-
this.timeoutMs =
|
|
3007
|
+
this.timeoutMs = DEFAULT_TIMEOUT_MS3;
|
|
2998
3008
|
}
|
|
2999
3009
|
}
|
|
3000
3010
|
async call(options) {
|
|
@@ -3160,7 +3170,7 @@ function isClaudeCliLoggedIn() {
|
|
|
3160
3170
|
// src/llm/opencode.ts
|
|
3161
3171
|
import { spawn as spawn3, execSync as execSync8 } from "child_process";
|
|
3162
3172
|
var OPENCODE_BIN = "opencode";
|
|
3163
|
-
var
|
|
3173
|
+
var DEFAULT_TIMEOUT_MS4 = 10 * 60 * 1e3;
|
|
3164
3174
|
var IS_WINDOWS3 = process.platform === "win32";
|
|
3165
3175
|
var cachedLoggedIn2 = null;
|
|
3166
3176
|
function isOpenCodeAvailable() {
|
|
@@ -3322,9 +3332,9 @@ var OpenCodeProvider = class {
|
|
|
3322
3332
|
constructor(config) {
|
|
3323
3333
|
this.defaultModel = config.model || "default";
|
|
3324
3334
|
const envTimeout = process.env.CALIBER_OPENCODE_TIMEOUT_MS;
|
|
3325
|
-
this.timeoutMs = envTimeout ? parseInt(envTimeout, 10) :
|
|
3335
|
+
this.timeoutMs = envTimeout ? parseInt(envTimeout, 10) : DEFAULT_TIMEOUT_MS4;
|
|
3326
3336
|
if (!Number.isFinite(this.timeoutMs) || this.timeoutMs < 1e3) {
|
|
3327
|
-
this.timeoutMs =
|
|
3337
|
+
this.timeoutMs = DEFAULT_TIMEOUT_MS4;
|
|
3328
3338
|
}
|
|
3329
3339
|
}
|
|
3330
3340
|
async call(options) {
|
package/package.json
CHANGED