@bike4mind/cli 0.2.21-fix-cli-subagent-model-alias-resolution.18205 → 0.2.21-fix-idle-timeout-error-message.18216
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/{chunk-HXWD4UGK.js → chunk-5HGFCD76.js} +103 -6
- package/dist/{chunk-NAIQUTDD.js → chunk-CY4U5QI6.js} +1 -1
- package/dist/{chunk-3NN5PD22.js → chunk-ODEZ5IPN.js} +1 -1
- package/dist/{chunk-4UPFBOWT.js → chunk-Y7KY6POM.js} +1 -1
- package/dist/{create-EZHKFCZQ.js → create-SJHBZJHC.js} +2 -2
- package/dist/index.js +11 -151
- package/dist/{mementoService-C34LNDCN.js → mementoService-JY62U4RB.js} +2 -2
- package/dist/{src-2ENQ4HWZ.js → src-QBISQZK4.js} +1 -1
- package/dist/{subtractCredits-5SDCKUXU.js → subtractCredits-SY4SXTIT.js} +2 -2
- package/package.json +6 -6
|
@@ -1949,6 +1949,7 @@ var TEMPERATURE_ONLY_MODELS = [
|
|
|
1949
1949
|
var INITIAL_TIMEOUT_MS = 3e4;
|
|
1950
1950
|
var DEFAULT_IDLE_TIMEOUT_MS = 9e4;
|
|
1951
1951
|
var THINKING_IDLE_TIMEOUT_MS = 18e4;
|
|
1952
|
+
var REQUEST_TIMEOUT_MS = 6e4;
|
|
1952
1953
|
var AnthropicBackend = class {
|
|
1953
1954
|
_api;
|
|
1954
1955
|
logger;
|
|
@@ -2291,7 +2292,15 @@ var AnthropicBackend = class {
|
|
|
2291
2292
|
const toolCallCount = options._internal?.toolCallCount ?? 0;
|
|
2292
2293
|
if (toolCallCount >= DEFAULT_MAX_TOOL_CALLS) {
|
|
2293
2294
|
this.logger.warn(`\u26A0\uFE0F Max tool calls limit (${DEFAULT_MAX_TOOL_CALLS}) reached. Disabling tools to prevent infinite loops.`);
|
|
2294
|
-
await this.complete(model, messages, {
|
|
2295
|
+
await this.complete(model, messages, {
|
|
2296
|
+
...options,
|
|
2297
|
+
tools: void 0,
|
|
2298
|
+
_internal: {
|
|
2299
|
+
...options._internal,
|
|
2300
|
+
// Preserve enableIdleTimeout, idleTimeoutMs
|
|
2301
|
+
toolCallCount: toolCallCount + 1
|
|
2302
|
+
}
|
|
2303
|
+
}, cb, toolsUsed);
|
|
2295
2304
|
return;
|
|
2296
2305
|
}
|
|
2297
2306
|
const rawTools = options.tools;
|
|
@@ -2366,8 +2375,44 @@ var AnthropicBackend = class {
|
|
|
2366
2375
|
const func = [];
|
|
2367
2376
|
if (options.stream) {
|
|
2368
2377
|
await new Promise(async (resolve, reject) => {
|
|
2378
|
+
const enableRequestTimeout = options._internal?.enableRequestTimeout ?? false;
|
|
2379
|
+
const requestAbortController = new AbortController();
|
|
2380
|
+
let requestTimeout;
|
|
2381
|
+
if (enableRequestTimeout) {
|
|
2382
|
+
requestTimeout = setTimeout(() => {
|
|
2383
|
+
this.logger.error("[AnthropicBackend] Request timeout - API call did not start streaming", {
|
|
2384
|
+
model,
|
|
2385
|
+
toolCount: options.tools?.length || 0,
|
|
2386
|
+
mcpToolCount: options.tools?.filter((t) => t._isMcpTool).length || 0,
|
|
2387
|
+
timeoutMs: REQUEST_TIMEOUT_MS
|
|
2388
|
+
});
|
|
2389
|
+
this.emitIdleTimeoutMetric(model, options.tools?.length || 0, 0).catch(() => {
|
|
2390
|
+
});
|
|
2391
|
+
requestAbortController.abort();
|
|
2392
|
+
}, REQUEST_TIMEOUT_MS);
|
|
2393
|
+
}
|
|
2394
|
+
const combinedSignal = enableRequestTimeout ? options.abortSignal ? AbortSignal.any([options.abortSignal, requestAbortController.signal]) : requestAbortController.signal : options.abortSignal;
|
|
2395
|
+
let isIdleTimeout = false;
|
|
2396
|
+
let idleTimeoutMsForError = 0;
|
|
2369
2397
|
try {
|
|
2370
|
-
const
|
|
2398
|
+
const payloadForSize = { ...apiParams, stream: true };
|
|
2399
|
+
const payloadSizeBytes = Buffer.byteLength(JSON.stringify(payloadForSize), "utf8");
|
|
2400
|
+
const toolsSizeBytes = apiParams.tools ? Buffer.byteLength(JSON.stringify(apiParams.tools), "utf8") : 0;
|
|
2401
|
+
const messagesSizeBytes = apiParams.messages ? Buffer.byteLength(JSON.stringify(apiParams.messages), "utf8") : 0;
|
|
2402
|
+
this.logger.info("[AnthropicBackend] API request payload diagnostics", {
|
|
2403
|
+
model,
|
|
2404
|
+
totalPayloadSizeKB: Math.round(payloadSizeBytes / 1024),
|
|
2405
|
+
toolsSizeKB: Math.round(toolsSizeBytes / 1024),
|
|
2406
|
+
messagesSizeKB: Math.round(messagesSizeBytes / 1024),
|
|
2407
|
+
toolCount: apiParams.tools?.length || 0,
|
|
2408
|
+
messageCount: apiParams.messages?.length || 0,
|
|
2409
|
+
mcpToolCount: options.tools?.filter((t) => t._isMcpTool).length || 0,
|
|
2410
|
+
hasThinking: !!apiParams.thinking,
|
|
2411
|
+
thinkingBudget: apiParams.thinking?.budget_tokens
|
|
2412
|
+
});
|
|
2413
|
+
const stream = await this._api.messages.create({ ...apiParams, stream: true }, { signal: combinedSignal });
|
|
2414
|
+
if (requestTimeout)
|
|
2415
|
+
clearTimeout(requestTimeout);
|
|
2371
2416
|
let isInThinkingBlock = false;
|
|
2372
2417
|
const collectedContent = [];
|
|
2373
2418
|
const enableIdleTimeout = options._internal?.enableIdleTimeout ?? false;
|
|
@@ -2383,6 +2428,8 @@ var AnthropicBackend = class {
|
|
|
2383
2428
|
clearTimeout(idleTimer);
|
|
2384
2429
|
const timeoutMs = eventCount === 0 ? INITIAL_TIMEOUT_MS : idleTimeoutMs;
|
|
2385
2430
|
idleTimer = setTimeout(() => {
|
|
2431
|
+
isIdleTimeout = true;
|
|
2432
|
+
idleTimeoutMsForError = timeoutMs;
|
|
2386
2433
|
this.logger.error("[AnthropicBackend] Stream idle timeout - no events received", {
|
|
2387
2434
|
model,
|
|
2388
2435
|
eventCount,
|
|
@@ -2492,10 +2539,28 @@ var AnthropicBackend = class {
|
|
|
2492
2539
|
}
|
|
2493
2540
|
resolve();
|
|
2494
2541
|
} catch (error) {
|
|
2542
|
+
if (requestTimeout)
|
|
2543
|
+
clearTimeout(requestTimeout);
|
|
2495
2544
|
const isAbortError = error instanceof Error && (error.message.includes("aborted") || error.message.includes("AbortError") || error.name === "AbortError");
|
|
2545
|
+
const isRequestTimeout = requestAbortController.signal.aborted;
|
|
2496
2546
|
if (isAbortError) {
|
|
2497
|
-
|
|
2498
|
-
|
|
2547
|
+
if (isRequestTimeout) {
|
|
2548
|
+
this.logger.error("[AnthropicBackend] Request aborted due to timeout", {
|
|
2549
|
+
model,
|
|
2550
|
+
toolCount: options.tools?.length || 0
|
|
2551
|
+
});
|
|
2552
|
+
reject(new Error(`Anthropic API request timeout after ${REQUEST_TIMEOUT_MS}ms - no streaming response received`));
|
|
2553
|
+
} else if (isIdleTimeout) {
|
|
2554
|
+
this.logger.error("[AnthropicBackend] Stream aborted due to idle timeout", {
|
|
2555
|
+
model,
|
|
2556
|
+
toolCount: options.tools?.length || 0,
|
|
2557
|
+
idleTimeoutMs: idleTimeoutMsForError
|
|
2558
|
+
});
|
|
2559
|
+
reject(new Error(`Anthropic API stream timeout - no response received within ${idleTimeoutMsForError / 1e3} seconds. The model may be overloaded or the request may be too complex.`));
|
|
2560
|
+
} else {
|
|
2561
|
+
this.logger.debug("Anthropic request was aborted (likely client disconnect)");
|
|
2562
|
+
resolve();
|
|
2563
|
+
}
|
|
2499
2564
|
} else {
|
|
2500
2565
|
reject(error);
|
|
2501
2566
|
}
|
|
@@ -2545,7 +2610,29 @@ var AnthropicBackend = class {
|
|
|
2545
2610
|
await cb(["\n\n"], { toolsUsed });
|
|
2546
2611
|
this.logger.debug(`[Tool Execution] Making recursive call with ${messages.length} messages`);
|
|
2547
2612
|
this.logger.debug(`[Tool Execution] Last few messages:`, JSON.stringify(messages.slice(-3), null, 2));
|
|
2548
|
-
|
|
2613
|
+
const hasMcpTool = func.some((tool) => {
|
|
2614
|
+
if (!tool?.name)
|
|
2615
|
+
return false;
|
|
2616
|
+
return options.tools?.find((t) => t.toolSchema.name === tool.name)?._isMcpTool;
|
|
2617
|
+
});
|
|
2618
|
+
if (hasMcpTool) {
|
|
2619
|
+
await this.complete(model, messages, {
|
|
2620
|
+
...options,
|
|
2621
|
+
_internal: {
|
|
2622
|
+
...options._internal,
|
|
2623
|
+
toolCallCount: toolCallCount + 1
|
|
2624
|
+
}
|
|
2625
|
+
}, cb, toolsUsed);
|
|
2626
|
+
} else {
|
|
2627
|
+
await this.complete(model, messages, {
|
|
2628
|
+
...options,
|
|
2629
|
+
tools: void 0,
|
|
2630
|
+
_internal: {
|
|
2631
|
+
...options._internal,
|
|
2632
|
+
toolCallCount: toolCallCount + 1
|
|
2633
|
+
}
|
|
2634
|
+
}, cb, toolsUsed);
|
|
2635
|
+
}
|
|
2549
2636
|
} else {
|
|
2550
2637
|
const thinkingBlocks = this.getThinkingBlocks();
|
|
2551
2638
|
this.logger.debug(`[Tool Execution] executeTools=false, passing tool calls to callback with ${thinkingBlocks?.length || 0} thinking blocks`);
|
|
@@ -2625,11 +2712,21 @@ var AnthropicBackend = class {
|
|
|
2625
2712
|
await this.complete(model, messages, {
|
|
2626
2713
|
...options,
|
|
2627
2714
|
_internal: {
|
|
2715
|
+
...options._internal,
|
|
2716
|
+
// Preserve enableIdleTimeout, idleTimeoutMs
|
|
2628
2717
|
toolCallCount: toolCallCount + 1
|
|
2629
2718
|
}
|
|
2630
2719
|
}, cb, toolsUsed);
|
|
2631
2720
|
} else {
|
|
2632
|
-
await this.complete(model, messages, {
|
|
2721
|
+
await this.complete(model, messages, {
|
|
2722
|
+
...options,
|
|
2723
|
+
tools: void 0,
|
|
2724
|
+
_internal: {
|
|
2725
|
+
...options._internal,
|
|
2726
|
+
// Preserve enableIdleTimeout, idleTimeoutMs
|
|
2727
|
+
toolCallCount: toolCallCount + 1
|
|
2728
|
+
}
|
|
2729
|
+
}, cb, toolsUsed);
|
|
2633
2730
|
}
|
|
2634
2731
|
} else {
|
|
2635
2732
|
const thinkingBlocks = this.getThinkingBlocks();
|
package/dist/index.js
CHANGED
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
getEffectiveApiKey,
|
|
5
5
|
getOpenWeatherKey,
|
|
6
6
|
getSerperKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CY4U5QI6.js";
|
|
8
8
|
import {
|
|
9
9
|
ConfigStore
|
|
10
10
|
} from "./chunk-VFQF2JIT.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-Y7KY6POM.js";
|
|
12
|
+
import "./chunk-ODEZ5IPN.js";
|
|
13
13
|
import {
|
|
14
14
|
BFLImageService,
|
|
15
15
|
BaseStorage,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
OpenAIBackend,
|
|
22
22
|
OpenAIImageService,
|
|
23
23
|
XAIImageService
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5HGFCD76.js";
|
|
25
25
|
import {
|
|
26
26
|
AiEvents,
|
|
27
27
|
ApiKeyEvents,
|
|
@@ -12262,7 +12262,7 @@ import { isAxiosError as isAxiosError2 } from "axios";
|
|
|
12262
12262
|
// package.json
|
|
12263
12263
|
var package_default = {
|
|
12264
12264
|
name: "@bike4mind/cli",
|
|
12265
|
-
version: "0.2.21-fix-
|
|
12265
|
+
version: "0.2.21-fix-idle-timeout-error-message.18216+cdd08f0ff",
|
|
12266
12266
|
type: "module",
|
|
12267
12267
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
12268
12268
|
license: "UNLICENSED",
|
|
@@ -12369,10 +12369,10 @@ var package_default = {
|
|
|
12369
12369
|
},
|
|
12370
12370
|
devDependencies: {
|
|
12371
12371
|
"@bike4mind/agents": "0.1.0",
|
|
12372
|
-
"@bike4mind/common": "2.45.1-fix-
|
|
12373
|
-
"@bike4mind/mcp": "1.25.1-fix-
|
|
12374
|
-
"@bike4mind/services": "2.43.1-fix-
|
|
12375
|
-
"@bike4mind/utils": "2.3.1-fix-
|
|
12372
|
+
"@bike4mind/common": "2.45.1-fix-idle-timeout-error-message.18216+cdd08f0ff",
|
|
12373
|
+
"@bike4mind/mcp": "1.25.1-fix-idle-timeout-error-message.18216+cdd08f0ff",
|
|
12374
|
+
"@bike4mind/services": "2.43.1-fix-idle-timeout-error-message.18216+cdd08f0ff",
|
|
12375
|
+
"@bike4mind/utils": "2.3.1-fix-idle-timeout-error-message.18216+cdd08f0ff",
|
|
12376
12376
|
"@types/better-sqlite3": "^7.6.13",
|
|
12377
12377
|
"@types/diff": "^5.0.9",
|
|
12378
12378
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -12389,7 +12389,7 @@ var package_default = {
|
|
|
12389
12389
|
optionalDependencies: {
|
|
12390
12390
|
"@vscode/ripgrep": "^1.17.0"
|
|
12391
12391
|
},
|
|
12392
|
-
gitHead: "
|
|
12392
|
+
gitHead: "cdd08f0ffac6ce70a4ffe8d3747a7da822ee0786"
|
|
12393
12393
|
};
|
|
12394
12394
|
|
|
12395
12395
|
// src/config/constants.ts
|
|
@@ -12623,139 +12623,6 @@ import fs13 from "fs/promises";
|
|
|
12623
12623
|
import path16 from "path";
|
|
12624
12624
|
import os3 from "os";
|
|
12625
12625
|
import matter2 from "gray-matter";
|
|
12626
|
-
var FULL_MODEL_ID_PREFIXES = [
|
|
12627
|
-
"claude-",
|
|
12628
|
-
"gpt-",
|
|
12629
|
-
"gemini-",
|
|
12630
|
-
"grok-",
|
|
12631
|
-
"meta.",
|
|
12632
|
-
"anthropic.",
|
|
12633
|
-
"us.anthropic.",
|
|
12634
|
-
"global.anthropic.",
|
|
12635
|
-
"amazon.",
|
|
12636
|
-
"ai21.",
|
|
12637
|
-
"deepseek",
|
|
12638
|
-
"whisper",
|
|
12639
|
-
"flux-",
|
|
12640
|
-
"sora-"
|
|
12641
|
-
];
|
|
12642
|
-
var MODEL_ALIASES = {
|
|
12643
|
-
// ===================
|
|
12644
|
-
// Anthropic/Claude Models
|
|
12645
|
-
// ===================
|
|
12646
|
-
// Short aliases (most common)
|
|
12647
|
-
opus: "claude-opus-4-5-20251101",
|
|
12648
|
-
sonnet: "claude-sonnet-4-5-20250929",
|
|
12649
|
-
haiku: "claude-3-5-haiku-20241022",
|
|
12650
|
-
// Claude-prefixed aliases
|
|
12651
|
-
"claude-opus": "claude-opus-4-5-20251101",
|
|
12652
|
-
"claude-sonnet": "claude-sonnet-4-5-20250929",
|
|
12653
|
-
"claude-haiku": "claude-3-5-haiku-20241022",
|
|
12654
|
-
// Version-specific Claude aliases
|
|
12655
|
-
"claude-4.5-opus": "claude-opus-4-5-20251101",
|
|
12656
|
-
"claude-4.5-sonnet": "claude-sonnet-4-5-20250929",
|
|
12657
|
-
"claude-4.5-haiku": "claude-haiku-4-5-20251001",
|
|
12658
|
-
"claude-4-opus": "claude-opus-4-20250514",
|
|
12659
|
-
"claude-4-sonnet": "claude-sonnet-4-20250514",
|
|
12660
|
-
"claude-4.1-opus": "claude-opus-4-1-20250805",
|
|
12661
|
-
"claude-3.7-sonnet": "claude-3-7-sonnet-20250219",
|
|
12662
|
-
"claude-3.5-sonnet": "claude-3-5-sonnet-20241022",
|
|
12663
|
-
"claude-3.5-haiku": "claude-3-5-haiku-20241022",
|
|
12664
|
-
"claude-3-opus": "claude-3-opus-20240229",
|
|
12665
|
-
// ===================
|
|
12666
|
-
// OpenAI Models
|
|
12667
|
-
// ===================
|
|
12668
|
-
// GPT-4 family
|
|
12669
|
-
"gpt-4": "gpt-4",
|
|
12670
|
-
"gpt-4o": "gpt-4o",
|
|
12671
|
-
"gpt-4o-mini": "gpt-4o-mini",
|
|
12672
|
-
"gpt-4-turbo": "gpt-4-turbo",
|
|
12673
|
-
"gpt-4.1": "gpt-4.1-2025-04-14",
|
|
12674
|
-
"gpt-4.1-mini": "gpt-4.1-mini-2025-04-14",
|
|
12675
|
-
"gpt-4.1-nano": "gpt-4.1-nano-2025-04-14",
|
|
12676
|
-
"gpt-4.5": "gpt-4.5-preview-2025-02-27",
|
|
12677
|
-
// GPT-5 family
|
|
12678
|
-
"gpt-5": "gpt-5",
|
|
12679
|
-
"gpt-5-mini": "gpt-5-mini",
|
|
12680
|
-
"gpt-5-nano": "gpt-5-nano",
|
|
12681
|
-
"gpt-5.1": "gpt-5.1",
|
|
12682
|
-
"gpt-5.2": "gpt-5.2",
|
|
12683
|
-
// OpenAI reasoning models (o-series)
|
|
12684
|
-
o1: "o1-2024-12-17",
|
|
12685
|
-
"o1-preview": "o1-preview-2024-09-12",
|
|
12686
|
-
"o1-mini": "o1-mini-2024-09-12",
|
|
12687
|
-
o3: "o3-2025-04-16",
|
|
12688
|
-
"o3-mini": "o3-mini-2025-01-31",
|
|
12689
|
-
"o4-mini": "o4-mini-2025-04-16",
|
|
12690
|
-
// ===================
|
|
12691
|
-
// Google Gemini Models
|
|
12692
|
-
// ===================
|
|
12693
|
-
gemini: "gemini-2.5-pro",
|
|
12694
|
-
"gemini-pro": "gemini-2.5-pro",
|
|
12695
|
-
"gemini-flash": "gemini-2.5-flash-preview-09-2025",
|
|
12696
|
-
"gemini-flash-lite": "gemini-2.5-flash-lite-preview-09-2025",
|
|
12697
|
-
// Gemini 3 (preview)
|
|
12698
|
-
"gemini-3": "gemini-3-pro-preview",
|
|
12699
|
-
"gemini-3-pro": "gemini-3-pro-preview",
|
|
12700
|
-
"gemini-3-flash": "gemini-3-flash-preview",
|
|
12701
|
-
// Gemini 2.5
|
|
12702
|
-
"gemini-2.5": "gemini-2.5-pro",
|
|
12703
|
-
"gemini-2.5-pro": "gemini-2.5-pro",
|
|
12704
|
-
"gemini-2.5-flash": "gemini-2.5-flash-preview-09-2025",
|
|
12705
|
-
// Gemini 2.0
|
|
12706
|
-
"gemini-2.0-flash": "gemini-2.0-flash-exp",
|
|
12707
|
-
// Gemini 1.5 (legacy)
|
|
12708
|
-
"gemini-1.5-pro": "gemini-1.5-pro",
|
|
12709
|
-
"gemini-1.5-flash": "gemini-1.5-flash",
|
|
12710
|
-
"gemini-1.5-flash-8b": "gemini-1.5-flash-8b",
|
|
12711
|
-
// ===================
|
|
12712
|
-
// xAI Grok Models
|
|
12713
|
-
// ===================
|
|
12714
|
-
grok: "grok-3",
|
|
12715
|
-
"grok-3": "grok-3",
|
|
12716
|
-
"grok-3-fast": "grok-3-fast",
|
|
12717
|
-
"grok-3-mini": "grok-3-mini",
|
|
12718
|
-
"grok-3-mini-fast": "grok-3-mini-fast",
|
|
12719
|
-
"grok-2": "grok-2-1212",
|
|
12720
|
-
"grok-2-vision": "grok-2-vision-1212",
|
|
12721
|
-
// ===================
|
|
12722
|
-
// DeepSeek Models
|
|
12723
|
-
// ===================
|
|
12724
|
-
deepseek: "deepseek-r1:latest",
|
|
12725
|
-
"deepseek-r1": "deepseek-r1:latest",
|
|
12726
|
-
// ===================
|
|
12727
|
-
// Llama Models (Ollama local)
|
|
12728
|
-
// ===================
|
|
12729
|
-
llama: "llama3.3",
|
|
12730
|
-
llama3: "llama3.3",
|
|
12731
|
-
"llama3.3": "llama3.3",
|
|
12732
|
-
tinyllama: "tinyllama"
|
|
12733
|
-
};
|
|
12734
|
-
function getAvailableModelAliases() {
|
|
12735
|
-
return Object.keys(MODEL_ALIASES).sort();
|
|
12736
|
-
}
|
|
12737
|
-
function resolveModelAlias(modelInput, agentName, filePath) {
|
|
12738
|
-
const normalizedInput = modelInput.toLowerCase();
|
|
12739
|
-
if (MODEL_ALIASES[normalizedInput]) {
|
|
12740
|
-
return { model: MODEL_ALIASES[normalizedInput], resolved: true };
|
|
12741
|
-
}
|
|
12742
|
-
const hasDatePattern = /\d{8}|\d{4}-\d{2}-\d{2}/.test(modelInput);
|
|
12743
|
-
const hasBedrockSuffix = modelInput.includes(":0");
|
|
12744
|
-
const hasKnownPrefix = FULL_MODEL_ID_PREFIXES.some((prefix) => modelInput.startsWith(prefix));
|
|
12745
|
-
if (hasDatePattern || hasBedrockSuffix || hasKnownPrefix) {
|
|
12746
|
-
return { model: modelInput, resolved: true };
|
|
12747
|
-
}
|
|
12748
|
-
const availableAliases = getAvailableModelAliases();
|
|
12749
|
-
const suggestions = availableAliases.filter((alias) => alias.includes(normalizedInput) || normalizedInput.includes(alias)).slice(0, 5);
|
|
12750
|
-
let warning = `Unknown model "${modelInput}" in agent "${agentName}" (${filePath}). Using inherited model instead.
|
|
12751
|
-
`;
|
|
12752
|
-
if (suggestions.length > 0) {
|
|
12753
|
-
warning += `Did you mean: ${suggestions.join(", ")}?
|
|
12754
|
-
`;
|
|
12755
|
-
}
|
|
12756
|
-
warning += `Available aliases: opus, sonnet, haiku, gpt-4o, gemini, grok, etc. Run with --verbose for full list.`;
|
|
12757
|
-
return { model: DEFAULT_AGENT_MODEL, resolved: false, warning };
|
|
12758
|
-
}
|
|
12759
12626
|
var AgentStore = class {
|
|
12760
12627
|
/**
|
|
12761
12628
|
* Creates a new AgentStore
|
|
@@ -12846,17 +12713,10 @@ var AgentStore = class {
|
|
|
12846
12713
|
const { data: frontmatter, content: body } = matter2(content);
|
|
12847
12714
|
const parsed = AgentFrontmatterSchema.parse(frontmatter);
|
|
12848
12715
|
const name = path16.basename(filePath, ".md");
|
|
12849
|
-
const modelInput = parsed.model || DEFAULT_AGENT_MODEL;
|
|
12850
|
-
const resolution = resolveModelAlias(modelInput, name, filePath);
|
|
12851
|
-
if (!resolution.resolved && resolution.warning) {
|
|
12852
|
-
console.warn(`
|
|
12853
|
-
\u26A0\uFE0F ${resolution.warning}
|
|
12854
|
-
`);
|
|
12855
|
-
}
|
|
12856
12716
|
return {
|
|
12857
12717
|
name,
|
|
12858
12718
|
description: parsed.description,
|
|
12859
|
-
model:
|
|
12719
|
+
model: parsed.model || DEFAULT_AGENT_MODEL,
|
|
12860
12720
|
systemPrompt: body.trim(),
|
|
12861
12721
|
allowedTools: parsed["allowed-tools"],
|
|
12862
12722
|
deniedTools: parsed["denied-tools"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.2.21-fix-
|
|
3
|
+
"version": "0.2.21-fix-idle-timeout-error-message.18216+cdd08f0ff",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -107,10 +107,10 @@
|
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@bike4mind/agents": "0.1.0",
|
|
110
|
-
"@bike4mind/common": "2.45.1-fix-
|
|
111
|
-
"@bike4mind/mcp": "1.25.1-fix-
|
|
112
|
-
"@bike4mind/services": "2.43.1-fix-
|
|
113
|
-
"@bike4mind/utils": "2.3.1-fix-
|
|
110
|
+
"@bike4mind/common": "2.45.1-fix-idle-timeout-error-message.18216+cdd08f0ff",
|
|
111
|
+
"@bike4mind/mcp": "1.25.1-fix-idle-timeout-error-message.18216+cdd08f0ff",
|
|
112
|
+
"@bike4mind/services": "2.43.1-fix-idle-timeout-error-message.18216+cdd08f0ff",
|
|
113
|
+
"@bike4mind/utils": "2.3.1-fix-idle-timeout-error-message.18216+cdd08f0ff",
|
|
114
114
|
"@types/better-sqlite3": "^7.6.13",
|
|
115
115
|
"@types/diff": "^5.0.9",
|
|
116
116
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"optionalDependencies": {
|
|
128
128
|
"@vscode/ripgrep": "^1.17.0"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "cdd08f0ffac6ce70a4ffe8d3747a7da822ee0786"
|
|
131
131
|
}
|