@bike4mind/cli 0.2.32 → 0.2.33-chore-5822-replace-deprecated-node-http-handler.19843
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/{artifactExtractor-RYUIMC5D.js → artifactExtractor-RDISRG3L.js} +1 -1
- package/dist/{chunk-74UKS7VY.js → chunk-4CSNU5HR.js} +7 -7
- package/dist/{chunk-2EHXPCA7.js → chunk-CHZRJCRO.js} +2 -2
- package/dist/{chunk-BYXFQJYT.js → chunk-G2LYCVZJ.js} +16 -0
- package/dist/{chunk-QHCGCQ72.js → chunk-I5EHZ4OG.js} +24 -6
- package/dist/{chunk-RPIEKKLZ.js → chunk-PVTWVKQE.js} +2 -2
- package/dist/{chunk-ORRROOHQ.js → chunk-XH4U37SN.js} +2 -2
- package/dist/{chunk-32PKF3N7.js → chunk-YRTLWZV6.js} +4 -1
- package/dist/{chunk-ZOM2E3PC.js → chunk-ZH3AH7U2.js} +50 -143
- package/dist/commands/doctorCommand.js +1 -1
- package/dist/commands/mcpCommand.js +2 -1
- package/dist/commands/updateCommand.js +1 -1
- package/dist/{create-BT3CXRUU.js → create-KXXYF4E2.js} +3 -3
- package/dist/index.js +516 -216
- package/dist/{llmMarkdownGenerator-6OOBQEVD.js → llmMarkdownGenerator-5TXQGZ72.js} +1 -1
- package/dist/{markdownGenerator-GQVNEMMH.js → markdownGenerator-DMQU4VBM.js} +1 -1
- package/dist/{mementoService-WTBF5FL5.js → mementoService-MWF6F3YR.js} +3 -3
- package/dist/{src-4VYAJBH3.js → src-HLXF7YYW.js} +1 -1
- package/dist/{src-GIZDQW3O.js → src-VYBV5W37.js} +2 -2
- package/dist/{store-K5MB3SE7.js → store-X5LEOSGZ.js} +1 -1
- package/dist/{subtractCredits-4V4LSJD4.js → subtractCredits-EXDDX7JJ.js} +3 -3
- package/package.json +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CurationArtifactType
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-I5EHZ4OG.js";
|
|
5
5
|
|
|
6
6
|
// ../../b4m-core/packages/services/dist/src/notebookCurationService/artifactExtractor.js
|
|
7
7
|
var ARTIFACT_TAG_REGEX = /<artifact\s+(.*?)>([\s\S]*?)<\/artifact>/gi;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@bike4mind/cli",
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.33-chore-5822-replace-deprecated-node-http-handler.19843+cdabb9037",
|
|
7
7
|
type: "module",
|
|
8
8
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
9
9
|
license: "UNLICENSED",
|
|
@@ -53,7 +53,6 @@ var package_default = {
|
|
|
53
53
|
"@aws-sdk/client-sqs": "3.654.0",
|
|
54
54
|
"@aws-sdk/client-transcribe": "3.654.0",
|
|
55
55
|
"@aws-sdk/credential-provider-node": "3.654.0",
|
|
56
|
-
"@aws-sdk/node-http-handler": "^3.374.0",
|
|
57
56
|
"@aws-sdk/s3-request-presigner": "3.654.0",
|
|
58
57
|
"@casl/ability": "^6.5.0",
|
|
59
58
|
"@google/genai": "^1.27.0",
|
|
@@ -63,6 +62,7 @@ var package_default = {
|
|
|
63
62
|
"@modelcontextprotocol/sdk": "1.26.0",
|
|
64
63
|
"@octokit/rest": "^22.0.0",
|
|
65
64
|
"@opensearch-project/opensearch": "2.11.0",
|
|
65
|
+
"@smithy/node-http-handler": "^4.4.10",
|
|
66
66
|
"async-mutex": "^0.5.0",
|
|
67
67
|
axios: "^1.13.2",
|
|
68
68
|
bcryptjs: "^2.4.3",
|
|
@@ -114,10 +114,10 @@ var package_default = {
|
|
|
114
114
|
},
|
|
115
115
|
devDependencies: {
|
|
116
116
|
"@bike4mind/agents": "0.1.0",
|
|
117
|
-
"@bike4mind/common": "2.54.
|
|
118
|
-
"@bike4mind/mcp": "1.32.
|
|
119
|
-
"@bike4mind/services": "2.51.
|
|
120
|
-
"@bike4mind/utils": "2.8.
|
|
117
|
+
"@bike4mind/common": "2.54.1-chore-5822-replace-deprecated-node-http-handler.19843+cdabb9037",
|
|
118
|
+
"@bike4mind/mcp": "1.32.2-chore-5822-replace-deprecated-node-http-handler.19843+cdabb9037",
|
|
119
|
+
"@bike4mind/services": "2.51.2-chore-5822-replace-deprecated-node-http-handler.19843+cdabb9037",
|
|
120
|
+
"@bike4mind/utils": "2.8.2-chore-5822-replace-deprecated-node-http-handler.19843+cdabb9037",
|
|
121
121
|
"@types/better-sqlite3": "^7.6.13",
|
|
122
122
|
"@types/diff": "^5.0.9",
|
|
123
123
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -138,7 +138,7 @@ var package_default = {
|
|
|
138
138
|
optionalDependencies: {
|
|
139
139
|
"@vscode/ripgrep": "^1.17.0"
|
|
140
140
|
},
|
|
141
|
-
gitHead: "
|
|
141
|
+
gitHead: "cdabb9037548e13097add811283194e00b0e5b4c"
|
|
142
142
|
};
|
|
143
143
|
|
|
144
144
|
// src/utils/updateChecker.ts
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getSettingsMap,
|
|
8
8
|
getSettingsValue,
|
|
9
9
|
secureParameters
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZH3AH7U2.js";
|
|
11
11
|
import {
|
|
12
12
|
KnowledgeType,
|
|
13
13
|
SupportedFabFileMimeTypes
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-I5EHZ4OG.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/fabFileService/create.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -75,6 +75,22 @@ var useCliStore = create((set) => ({
|
|
|
75
75
|
permissionQueue: rest
|
|
76
76
|
};
|
|
77
77
|
}),
|
|
78
|
+
// User question prompt queue
|
|
79
|
+
userQuestionPrompt: null,
|
|
80
|
+
userQuestionQueue: [],
|
|
81
|
+
enqueueUserQuestionPrompt: (prompt) => set((state) => {
|
|
82
|
+
if (!state.userQuestionPrompt) {
|
|
83
|
+
return { userQuestionPrompt: prompt };
|
|
84
|
+
}
|
|
85
|
+
return { userQuestionQueue: [...state.userQuestionQueue, prompt] };
|
|
86
|
+
}),
|
|
87
|
+
dequeueUserQuestionPrompt: () => set((state) => {
|
|
88
|
+
const [next, ...rest] = state.userQuestionQueue;
|
|
89
|
+
return {
|
|
90
|
+
userQuestionPrompt: next ?? null,
|
|
91
|
+
userQuestionQueue: rest
|
|
92
|
+
};
|
|
93
|
+
}),
|
|
78
94
|
// Config editor
|
|
79
95
|
showConfigEditor: false,
|
|
80
96
|
setShowConfigEditor: (show) => set({ showConfigEditor: show }),
|
|
@@ -133,7 +133,7 @@ var ChatModels;
|
|
|
133
133
|
ChatModels2["CLAUDE_4_5_SONNET_BEDROCK"] = "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
134
134
|
ChatModels2["CLAUDE_4_5_HAIKU_BEDROCK"] = "us.anthropic.claude-haiku-4-5-20251001-v1:0";
|
|
135
135
|
ChatModels2["CLAUDE_4_5_OPUS_BEDROCK"] = "global.anthropic.claude-opus-4-5-20251101-v1:0";
|
|
136
|
-
ChatModels2["CLAUDE_4_6_SONNET_BEDROCK"] = "anthropic.claude-sonnet-4-6";
|
|
136
|
+
ChatModels2["CLAUDE_4_6_SONNET_BEDROCK"] = "global.anthropic.claude-sonnet-4-6";
|
|
137
137
|
ChatModels2["CLAUDE_4_6_OPUS_BEDROCK"] = "global.anthropic.claude-opus-4-6-v1";
|
|
138
138
|
ChatModels2["CLAUDE_3_OPUS"] = "claude-3-opus-20240229";
|
|
139
139
|
ChatModels2["CLAUDE_3_5_HAIKU_ANTHROPIC"] = "claude-3-5-haiku-20241022";
|
|
@@ -181,11 +181,8 @@ var REASONING_SUPPORTED_MODELS = /* @__PURE__ */ new Set([
|
|
|
181
181
|
ChatModels.GPT5,
|
|
182
182
|
ChatModels.GPT5_MINI,
|
|
183
183
|
ChatModels.GPT5_NANO,
|
|
184
|
-
ChatModels.GPT5_CHAT_LATEST,
|
|
185
184
|
ChatModels.GPT5_1,
|
|
186
|
-
ChatModels.
|
|
187
|
-
ChatModels.GPT5_2,
|
|
188
|
-
ChatModels.GPT5_2_CHAT_LATEST
|
|
185
|
+
ChatModels.GPT5_2
|
|
189
186
|
]);
|
|
190
187
|
var SpeechToTextModels;
|
|
191
188
|
(function(SpeechToTextModels2) {
|
|
@@ -2826,7 +2823,11 @@ var LIVEOPS_TRIAGE_VALIDATION_LIMITS = {
|
|
|
2826
2823
|
maxTokens: { min: 100, max: 1e4, default: 1e3 },
|
|
2827
2824
|
// Max 180000ms (3 min) to leave 2-minute buffer for post-LLM operations within 5-min Lambda timeout
|
|
2828
2825
|
timeoutMs: { min: 3e4, max: 18e4, default: 6e4 },
|
|
2826
|
+
// Schedule configuration
|
|
2827
|
+
runIntervalHours: { options: [6, 12, 24], default: 12 },
|
|
2829
2828
|
// Processing limits
|
|
2829
|
+
// Note: lookbackHours is derived from runIntervalHours for scheduled runs,
|
|
2830
|
+
// but can be overridden for manual "Run Now" invocations
|
|
2830
2831
|
lookbackHours: { min: 1, max: 168, default: 24 },
|
|
2831
2832
|
maxErrorsPerRun: { min: 1, max: 100, default: 50 },
|
|
2832
2833
|
regressionLookbackDays: { min: 7, max: 180, default: 30 },
|
|
@@ -2845,12 +2846,20 @@ var LiveopsTriageConfigSchema = z21.object({
|
|
|
2845
2846
|
// Output channel - where summaries are posted (defaults to slackChannelId if not set)
|
|
2846
2847
|
githubOwner: z21.string(),
|
|
2847
2848
|
githubRepo: z21.string(),
|
|
2849
|
+
// Schedule configuration
|
|
2850
|
+
runIntervalHours: z21.number().refine((v) => LT.runIntervalHours.options.includes(v), {
|
|
2851
|
+
message: `Run interval must be one of: ${LT.runIntervalHours.options.join(", ")} hours`
|
|
2852
|
+
}).default(LT.runIntervalHours.default),
|
|
2853
|
+
postWhenNoErrors: z21.boolean().default(true),
|
|
2854
|
+
// Post "all clear" message when no errors found
|
|
2848
2855
|
// Model configuration
|
|
2849
2856
|
modelId: z21.string(),
|
|
2850
2857
|
temperature: z21.number().min(LT.temperature.min).max(LT.temperature.max).default(LT.temperature.default),
|
|
2851
2858
|
maxTokens: z21.number().min(LT.maxTokens.min).max(LT.maxTokens.max).default(LT.maxTokens.default),
|
|
2852
2859
|
timeoutMs: z21.number().min(LT.timeoutMs.min).max(LT.timeoutMs.max).default(LT.timeoutMs.default),
|
|
2853
2860
|
// Processing configuration
|
|
2861
|
+
// Note: lookbackHours is derived from runIntervalHours for scheduled/dry runs,
|
|
2862
|
+
// but can be overridden for manual "Run Now" invocations via the dialog
|
|
2854
2863
|
lookbackHours: z21.number().min(LT.lookbackHours.min).max(LT.lookbackHours.max).default(LT.lookbackHours.default),
|
|
2855
2864
|
maxErrorsPerRun: z21.number().min(LT.maxErrorsPerRun.min).max(LT.maxErrorsPerRun.max).default(LT.maxErrorsPerRun.default),
|
|
2856
2865
|
regressionLookbackDays: z21.number().min(LT.regressionLookbackDays.min).max(LT.regressionLookbackDays.max).default(LT.regressionLookbackDays.default),
|
|
@@ -2897,7 +2906,14 @@ var TriageResultSchema = z21.object({
|
|
|
2897
2906
|
}).nullable().default(null),
|
|
2898
2907
|
isRecurring: z21.boolean(),
|
|
2899
2908
|
occurrenceCount: z21.number().int().min(TRL.occurrenceCount.min).max(TRL.occurrenceCount.max),
|
|
2900
|
-
isRegression: z21.boolean().default(false)
|
|
2909
|
+
isRegression: z21.boolean().default(false),
|
|
2910
|
+
// Details of the closed issue this error is regressing from (only when isRegression=true)
|
|
2911
|
+
matchedClosedIssue: z21.object({
|
|
2912
|
+
issueNumber: z21.number().int().min(1),
|
|
2913
|
+
title: z21.string().min(1).max(TRL.matchesExisting.title.max),
|
|
2914
|
+
closedAt: z21.string()
|
|
2915
|
+
// ISO date string
|
|
2916
|
+
}).nullable().optional()
|
|
2901
2917
|
});
|
|
2902
2918
|
var TriageSummarySchema = z21.object({
|
|
2903
2919
|
totalAlerts: z21.number().int().min(0),
|
|
@@ -4264,6 +4280,8 @@ var settingsMap = {
|
|
|
4264
4280
|
slackChannelId: "",
|
|
4265
4281
|
githubOwner: "",
|
|
4266
4282
|
githubRepo: "",
|
|
4283
|
+
runIntervalHours: 12,
|
|
4284
|
+
postWhenNoErrors: true,
|
|
4267
4285
|
modelId: "",
|
|
4268
4286
|
temperature: 0.3,
|
|
4269
4287
|
maxTokens: 1e3,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BadRequestError,
|
|
4
4
|
secureParameters
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZH3AH7U2.js";
|
|
6
6
|
import {
|
|
7
7
|
CompletionApiUsageTransaction,
|
|
8
8
|
GenericCreditDeductTransaction,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
TextGenerationUsageTransaction,
|
|
13
13
|
TransferCreditTransaction,
|
|
14
14
|
VideoGenerationUsageTransaction
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-I5EHZ4OG.js";
|
|
16
16
|
|
|
17
17
|
// ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
|
|
18
18
|
import { z } from "zod";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
getSettingsByNames,
|
|
7
7
|
obfuscateApiKey,
|
|
8
8
|
secureParameters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZH3AH7U2.js";
|
|
10
10
|
import {
|
|
11
11
|
ApiKeyType,
|
|
12
12
|
MementoTier,
|
|
13
13
|
isSupportedEmbeddingModel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-I5EHZ4OG.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
ChatModels
|
|
4
|
+
} from "./chunk-I5EHZ4OG.js";
|
|
2
5
|
|
|
3
6
|
// src/utils/Logger.ts
|
|
4
7
|
import fs from "fs/promises";
|
|
@@ -377,7 +380,7 @@ var ProjectLocalConfigSchema = z.object({
|
|
|
377
380
|
var DEFAULT_CONFIG = {
|
|
378
381
|
version: "0.1.0",
|
|
379
382
|
userId: uuidv4(),
|
|
380
|
-
defaultModel:
|
|
383
|
+
defaultModel: ChatModels.CLAUDE_4_5_SONNET,
|
|
381
384
|
toolApiKeys: {
|
|
382
385
|
openweather: void 0,
|
|
383
386
|
serper: void 0
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
dayjsConfig_default,
|
|
17
17
|
extractSnippetMeta,
|
|
18
18
|
settingsMap
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-I5EHZ4OG.js";
|
|
20
20
|
import {
|
|
21
21
|
Logger
|
|
22
22
|
} from "./chunk-PFBYGCOW.js";
|
|
@@ -34,7 +34,7 @@ import fs from "fs";
|
|
|
34
34
|
import { Readable } from "stream";
|
|
35
35
|
import mime from "mime-types";
|
|
36
36
|
import { fileTypeFromBuffer } from "file-type";
|
|
37
|
-
import { NodeHttpHandler } from "@
|
|
37
|
+
import { NodeHttpHandler } from "@smithy/node-http-handler";
|
|
38
38
|
import { Agent } from "https";
|
|
39
39
|
var S3Storage = class extends BaseStorage {
|
|
40
40
|
bucketName;
|
|
@@ -3054,38 +3054,20 @@ IMPORTANT! Only when someone asks, remember that you are specifically the ${mode
|
|
|
3054
3054
|
}
|
|
3055
3055
|
}
|
|
3056
3056
|
await cb(["\n\n"], { toolsUsed });
|
|
3057
|
-
const hasMcpTool = func.some((tool) => {
|
|
3058
|
-
if (!tool?.name)
|
|
3059
|
-
return false;
|
|
3060
|
-
return options.tools?.find((t) => t.toolSchema.name === tool.name)?._isMcpTool;
|
|
3061
|
-
});
|
|
3062
3057
|
this.logger.info("[Tool Execution] Making recursive call after tool execution", {
|
|
3063
3058
|
model,
|
|
3064
3059
|
toolCallIteration: toolCallCount + 1,
|
|
3065
3060
|
messageCountAfter: messages.length,
|
|
3066
3061
|
toolsExecuted: func.filter((t) => t?.name).map((t) => t.name),
|
|
3067
|
-
hasMcpTool,
|
|
3068
|
-
willKeepTools: hasMcpTool,
|
|
3069
3062
|
totalToolsUsed: toolsUsed.length
|
|
3070
3063
|
});
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
_internal
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
}, cb, toolsUsed);
|
|
3079
|
-
} else {
|
|
3080
|
-
await this.complete(model, messages, {
|
|
3081
|
-
...options,
|
|
3082
|
-
tools: void 0,
|
|
3083
|
-
_internal: {
|
|
3084
|
-
...options._internal,
|
|
3085
|
-
toolCallCount: toolCallCount + 1
|
|
3086
|
-
}
|
|
3087
|
-
}, cb, toolsUsed);
|
|
3088
|
-
}
|
|
3064
|
+
await this.complete(model, messages, {
|
|
3065
|
+
...options,
|
|
3066
|
+
_internal: {
|
|
3067
|
+
...options._internal,
|
|
3068
|
+
toolCallCount: toolCallCount + 1
|
|
3069
|
+
}
|
|
3070
|
+
}, cb, toolsUsed);
|
|
3089
3071
|
} else {
|
|
3090
3072
|
const thinkingBlocks = this.getThinkingBlocks();
|
|
3091
3073
|
this.logger.debug(`[Tool Execution] executeTools=false, passing tool calls to callback with ${thinkingBlocks?.length || 0} thinking blocks`);
|
|
@@ -3204,41 +3186,22 @@ IMPORTANT! Only when someone asks, remember that you are specifically the ${mode
|
|
|
3204
3186
|
});
|
|
3205
3187
|
}
|
|
3206
3188
|
}
|
|
3207
|
-
const hasMcpTool = func.some((tool) => {
|
|
3208
|
-
if (!tool?.name)
|
|
3209
|
-
return false;
|
|
3210
|
-
return options.tools?.find((t) => t.toolSchema.name === tool.name)?._isMcpTool;
|
|
3211
|
-
});
|
|
3212
3189
|
this.logger.info("[Tool Execution] Making recursive call after tool execution (non-streaming)", {
|
|
3213
3190
|
model,
|
|
3214
3191
|
toolCallIteration: toolCallCount + 1,
|
|
3215
3192
|
messageCountAfter: messages.length,
|
|
3216
3193
|
toolsExecuted: func.filter((t) => t?.name).map((t) => t.name),
|
|
3217
|
-
hasMcpTool,
|
|
3218
|
-
willKeepTools: hasMcpTool,
|
|
3219
3194
|
totalToolsUsed: toolsUsed.length
|
|
3220
3195
|
});
|
|
3221
3196
|
await cb(["\n\n"], { toolsUsed });
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
_internal
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
}, cb, toolsUsed);
|
|
3231
|
-
} else {
|
|
3232
|
-
await this.complete(model, messages, {
|
|
3233
|
-
...options,
|
|
3234
|
-
tools: void 0,
|
|
3235
|
-
_internal: {
|
|
3236
|
-
...options._internal,
|
|
3237
|
-
// Preserve enableIdleTimeout, idleTimeoutMs
|
|
3238
|
-
toolCallCount: toolCallCount + 1
|
|
3239
|
-
}
|
|
3240
|
-
}, cb, toolsUsed);
|
|
3241
|
-
}
|
|
3197
|
+
await this.complete(model, messages, {
|
|
3198
|
+
...options,
|
|
3199
|
+
_internal: {
|
|
3200
|
+
...options._internal,
|
|
3201
|
+
// Preserve enableIdleTimeout, idleTimeoutMs
|
|
3202
|
+
toolCallCount: toolCallCount + 1
|
|
3203
|
+
}
|
|
3204
|
+
}, cb, toolsUsed);
|
|
3242
3205
|
} else {
|
|
3243
3206
|
const thinkingBlocks = this.getThinkingBlocks();
|
|
3244
3207
|
this.logger.debug(`[Tool Execution] executeTools=false, passing tool calls to callback with ${thinkingBlocks?.length || 0} thinking blocks`);
|
|
@@ -4082,7 +4045,7 @@ var AnthropicBedrockBackend = class extends BaseBedrockBackend {
|
|
|
4082
4045
|
const modelIdentity = `IMPORTANT! Only when someone asks, remember that you are specifically the ${model} model.`;
|
|
4083
4046
|
systemMessage = systemMessage ? `${systemMessage}
|
|
4084
4047
|
${modelIdentity}` : modelIdentity;
|
|
4085
|
-
const hasVendorPrefix = model.includes(":") || model.startsWith("global.") || model.startsWith("us.");
|
|
4048
|
+
const hasVendorPrefix = model.includes(":") || model.startsWith("global.") || model.startsWith("us.") || model.startsWith("anthropic.");
|
|
4086
4049
|
const modelId = hasVendorPrefix ? model : `anthropic.${model}`;
|
|
4087
4050
|
const maxTokens = typeof options.maxTokens === "number" ? options.maxTokens : 4096;
|
|
4088
4051
|
const body = {
|
|
@@ -6411,7 +6374,7 @@ var OpenAIBackend = class {
|
|
|
6411
6374
|
},
|
|
6412
6375
|
supportsVision: true,
|
|
6413
6376
|
supportsImageVariation: false,
|
|
6414
|
-
supportsTools:
|
|
6377
|
+
supportsTools: true,
|
|
6415
6378
|
logoFile: "OpenAI_Logo.svg",
|
|
6416
6379
|
rank: 1,
|
|
6417
6380
|
trainingCutoff: "2024-09-30",
|
|
@@ -6457,7 +6420,7 @@ var OpenAIBackend = class {
|
|
|
6457
6420
|
},
|
|
6458
6421
|
supportsVision: true,
|
|
6459
6422
|
supportsImageVariation: false,
|
|
6460
|
-
supportsTools:
|
|
6423
|
+
supportsTools: true,
|
|
6461
6424
|
logoFile: "OpenAI_Logo.svg",
|
|
6462
6425
|
rank: 1,
|
|
6463
6426
|
trainingCutoff: "2024-09-30",
|
|
@@ -6547,12 +6510,12 @@ var OpenAIBackend = class {
|
|
|
6547
6510
|
},
|
|
6548
6511
|
supportsVision: true,
|
|
6549
6512
|
supportsImageVariation: false,
|
|
6550
|
-
supportsTools:
|
|
6513
|
+
supportsTools: true,
|
|
6551
6514
|
logoFile: "OpenAI_Logo.svg",
|
|
6552
6515
|
rank: 3,
|
|
6553
6516
|
trainingCutoff: "2024-09-30",
|
|
6554
6517
|
releaseDate: "2025-08-07",
|
|
6555
|
-
description: "Continuously updated GPT-5
|
|
6518
|
+
description: "Continuously updated GPT-5 chat model with advanced conversational abilities and vision support, ideal for dynamic, real-time applications."
|
|
6556
6519
|
},
|
|
6557
6520
|
{
|
|
6558
6521
|
id: ChatModels.GPT4o,
|
|
@@ -7000,29 +6963,13 @@ var OpenAIBackend = class {
|
|
|
7000
6963
|
}
|
|
7001
6964
|
}
|
|
7002
6965
|
}
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
...options,
|
|
7011
|
-
_internal: {
|
|
7012
|
-
...options._internal,
|
|
7013
|
-
toolCallCount: toolCallCount + 1
|
|
7014
|
-
}
|
|
7015
|
-
}, callback, toolsUsed);
|
|
7016
|
-
} else {
|
|
7017
|
-
await this.complete(model, messages, {
|
|
7018
|
-
...options,
|
|
7019
|
-
tools: void 0,
|
|
7020
|
-
_internal: {
|
|
7021
|
-
...options._internal,
|
|
7022
|
-
toolCallCount: toolCallCount + 1
|
|
7023
|
-
}
|
|
7024
|
-
}, callback, toolsUsed);
|
|
7025
|
-
}
|
|
6966
|
+
await this.complete(model, messages, {
|
|
6967
|
+
...options,
|
|
6968
|
+
_internal: {
|
|
6969
|
+
...options._internal,
|
|
6970
|
+
toolCallCount: toolCallCount + 1
|
|
6971
|
+
}
|
|
6972
|
+
}, callback, toolsUsed);
|
|
7026
6973
|
} else {
|
|
7027
6974
|
this.logger.debug(`[Tool Execution] executeTools=false, passing tool calls to callback`);
|
|
7028
6975
|
await callback([null], {
|
|
@@ -7395,25 +7342,13 @@ var XAIBackend = class {
|
|
|
7395
7342
|
name: toolCall.function.name,
|
|
7396
7343
|
parameters: toolCall.function.arguments
|
|
7397
7344
|
}, result.toString());
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
...options,
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
}
|
|
7406
|
-
}, callback, toolsUsed);
|
|
7407
|
-
} else {
|
|
7408
|
-
await this.complete(model, messages, {
|
|
7409
|
-
...options,
|
|
7410
|
-
tools: void 0,
|
|
7411
|
-
_internal: {
|
|
7412
|
-
...options._internal,
|
|
7413
|
-
toolCallCount: toolCallCount + 1
|
|
7414
|
-
}
|
|
7415
|
-
}, callback, toolsUsed);
|
|
7416
|
-
}
|
|
7345
|
+
await this.complete(model, messages, {
|
|
7346
|
+
...options,
|
|
7347
|
+
_internal: {
|
|
7348
|
+
...options._internal,
|
|
7349
|
+
toolCallCount: toolCallCount + 1
|
|
7350
|
+
}
|
|
7351
|
+
}, callback, toolsUsed);
|
|
7417
7352
|
return;
|
|
7418
7353
|
} catch (error) {
|
|
7419
7354
|
if (error instanceof PermissionDeniedError) {
|
|
@@ -7425,25 +7360,13 @@ var XAIBackend = class {
|
|
|
7425
7360
|
name: toolCall.function.name,
|
|
7426
7361
|
parameters: toolCall.function.arguments
|
|
7427
7362
|
}, `Error: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
...options,
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
}
|
|
7436
|
-
}, callback, toolsUsed);
|
|
7437
|
-
} else {
|
|
7438
|
-
await this.complete(model, messages, {
|
|
7439
|
-
...options,
|
|
7440
|
-
tools: void 0,
|
|
7441
|
-
_internal: {
|
|
7442
|
-
...options._internal,
|
|
7443
|
-
toolCallCount: toolCallCount + 1
|
|
7444
|
-
}
|
|
7445
|
-
}, callback, toolsUsed);
|
|
7446
|
-
}
|
|
7363
|
+
await this.complete(model, messages, {
|
|
7364
|
+
...options,
|
|
7365
|
+
_internal: {
|
|
7366
|
+
...options._internal,
|
|
7367
|
+
toolCallCount: toolCallCount + 1
|
|
7368
|
+
}
|
|
7369
|
+
}, callback, toolsUsed);
|
|
7447
7370
|
return;
|
|
7448
7371
|
}
|
|
7449
7372
|
}
|
|
@@ -7554,29 +7477,13 @@ var XAIBackend = class {
|
|
|
7554
7477
|
}
|
|
7555
7478
|
}
|
|
7556
7479
|
}
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
...options,
|
|
7565
|
-
_internal: {
|
|
7566
|
-
...options._internal,
|
|
7567
|
-
toolCallCount: toolCallCount + 1
|
|
7568
|
-
}
|
|
7569
|
-
}, callback, toolsUsed);
|
|
7570
|
-
} else {
|
|
7571
|
-
await this.complete(model, messages, {
|
|
7572
|
-
...options,
|
|
7573
|
-
tools: void 0,
|
|
7574
|
-
_internal: {
|
|
7575
|
-
...options._internal,
|
|
7576
|
-
toolCallCount: toolCallCount + 1
|
|
7577
|
-
}
|
|
7578
|
-
}, callback, toolsUsed);
|
|
7579
|
-
}
|
|
7480
|
+
await this.complete(model, messages, {
|
|
7481
|
+
...options,
|
|
7482
|
+
_internal: {
|
|
7483
|
+
...options._internal,
|
|
7484
|
+
toolCallCount: toolCallCount + 1
|
|
7485
|
+
}
|
|
7486
|
+
}, callback, toolsUsed);
|
|
7580
7487
|
} else {
|
|
7581
7488
|
this.logger.debug(`[Tool Execution] executeTools=false, passing tool calls to callback`);
|
|
7582
7489
|
await callback([null], {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createFabFile,
|
|
4
4
|
createFabFileSchema
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-CHZRJCRO.js";
|
|
6
|
+
import "./chunk-ZH3AH7U2.js";
|
|
7
|
+
import "./chunk-I5EHZ4OG.js";
|
|
8
8
|
import "./chunk-PFBYGCOW.js";
|
|
9
9
|
export {
|
|
10
10
|
createFabFile,
|