@bike4mind/cli 0.2.62-fixed-temp-models.21767 → 0.2.62
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-ZXKH2SA3.js → artifactExtractor-R7DIP2XO.js} +1 -1
- package/dist/{chunk-XOV422DJ.js → chunk-2J4HB7EB.js} +2 -2
- package/dist/{chunk-ZXHNBXZL.js → chunk-EO2Y5GFY.js} +32 -2
- package/dist/{chunk-YRCH2BAR.js → chunk-J6ZBI6TI.js} +1 -1
- package/dist/{chunk-GPAJBA5P.js → chunk-JW3JRHH7.js} +2 -2
- package/dist/{chunk-HMUDPSDV.js → chunk-MNBT2VFX.js} +4 -4
- package/dist/{chunk-746QXO4D.js → chunk-PJFESKK6.js} +2 -2
- package/dist/{chunk-7H6I3UDQ.js → chunk-VJLPCIK2.js} +7 -7
- package/dist/{chunk-RSVU2SJD.js → chunk-Y7K4HI6L.js} +2 -2
- package/dist/commands/doctorCommand.js +1 -1
- package/dist/commands/headlessCommand.js +7 -7
- package/dist/commands/mcpCommand.js +2 -2
- package/dist/commands/updateCommand.js +1 -1
- package/dist/{create-IEESF6VK.js → create-4Q7IAG7H.js} +3 -3
- package/dist/index.js +8 -8
- package/dist/{llmMarkdownGenerator-B3J57PZH.js → llmMarkdownGenerator-Z6NB26TT.js} +1 -1
- package/dist/{markdownGenerator-5U5MF7EE.js → markdownGenerator-SK2ZQQL4.js} +1 -1
- package/dist/{mementoService-5UJD3C3U.js → mementoService-5VAXTB4G.js} +3 -3
- package/dist/{src-4ZSHLR6G.js → src-ISX322I7.js} +1 -1
- package/dist/{src-Z6ICUYTJ.js → src-NYW3P73W.js} +2 -2
- package/dist/{subtractCredits-CFRTDJ5T.js → subtractCredits-ZDMCQ6R5.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-JW3JRHH7.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;
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
getSettingsByNames,
|
|
7
7
|
obfuscateApiKey,
|
|
8
8
|
secureParameters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EO2Y5GFY.js";
|
|
10
10
|
import {
|
|
11
11
|
ApiKeyType,
|
|
12
12
|
MementoTier,
|
|
13
13
|
isSupportedEmbeddingModel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JW3JRHH7.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
isGPTImageModel,
|
|
23
23
|
isModelDeprecated,
|
|
24
24
|
settingsMap
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-JW3JRHH7.js";
|
|
26
26
|
|
|
27
27
|
// ../../b4m-core/packages/utils/dist/src/storage/S3Storage.js
|
|
28
28
|
import { S3Client, PutObjectCommand, DeleteObjectCommand, GetObjectCommand, HeadObjectCommand } from "@aws-sdk/client-s3";
|
|
@@ -1090,10 +1090,12 @@ var MIME_TO_EXT = {
|
|
|
1090
1090
|
};
|
|
1091
1091
|
|
|
1092
1092
|
// ../../b4m-core/packages/utils/dist/src/llm/utils.js
|
|
1093
|
+
import { Jimp } from "jimp";
|
|
1093
1094
|
var INFINITE_VALUE = 14;
|
|
1094
1095
|
var MAX_FILE_SIZE = 6e3;
|
|
1095
1096
|
var PREVIEW_CHUNK = 700;
|
|
1096
1097
|
var CHARS_PER_TOKEN = 3.5;
|
|
1098
|
+
var MAX_IMAGE_DIMENSION_PX = 2e3;
|
|
1097
1099
|
var EMBEDDING_TOKEN_LIMITS = {
|
|
1098
1100
|
MAX_EMBEDDING_TOKENS: 8e3,
|
|
1099
1101
|
// Conservative limit under 8192
|
|
@@ -1408,6 +1410,33 @@ async function cosineSearch(file, userPromptVector, { db, logger }) {
|
|
|
1408
1410
|
}).filter((result) => result !== null);
|
|
1409
1411
|
return searchResults.sort((a, b) => b.score - a.score).slice(0, 3);
|
|
1410
1412
|
}
|
|
1413
|
+
var JIMP_SUPPORTED_MIMES = /* @__PURE__ */ new Set([
|
|
1414
|
+
"image/bmp",
|
|
1415
|
+
"image/x-ms-bmp",
|
|
1416
|
+
"image/gif",
|
|
1417
|
+
"image/jpeg",
|
|
1418
|
+
"image/png",
|
|
1419
|
+
"image/tiff"
|
|
1420
|
+
]);
|
|
1421
|
+
async function ensureImageWithinDimensionLimit(imageBuffer, maxDimension = MAX_IMAGE_DIMENSION_PX, logger) {
|
|
1422
|
+
try {
|
|
1423
|
+
const image = await Jimp.read(imageBuffer);
|
|
1424
|
+
const { width, height } = image.bitmap;
|
|
1425
|
+
if (width <= maxDimension && height <= maxDimension) {
|
|
1426
|
+
return imageBuffer;
|
|
1427
|
+
}
|
|
1428
|
+
const scale = maxDimension / Math.max(width, height);
|
|
1429
|
+
const newWidth = Math.floor(width * scale);
|
|
1430
|
+
const newHeight = Math.floor(height * scale);
|
|
1431
|
+
logger?.info(`[ensureImageWithinDimensionLimit] Resizing from ${width}x${height} to ${newWidth}x${newHeight}`);
|
|
1432
|
+
const resized = image.resize({ w: newWidth, h: newHeight });
|
|
1433
|
+
const outputMime = image.mime && JIMP_SUPPORTED_MIMES.has(image.mime) ? image.mime : "image/png";
|
|
1434
|
+
return Buffer.from(await resized.getBuffer(outputMime));
|
|
1435
|
+
} catch (error) {
|
|
1436
|
+
logger?.warn(`[ensureImageWithinDimensionLimit] Failed to resize image, using original: ${error}`);
|
|
1437
|
+
return imageBuffer;
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1411
1440
|
async function processFabFilesServer(embeddingFactory, fabFiles, userPrompt, maxTokens, modelInfo, sendStatusUpdate, { logger, storage, db }, progressCallback) {
|
|
1412
1441
|
if (!fabFiles || fabFiles.length === 0) {
|
|
1413
1442
|
return { userMessages: [], errorMessages: [] };
|
|
@@ -1483,7 +1512,8 @@ When referencing this file, use the exact filename "${file.fileName}" \u2014 do
|
|
|
1483
1512
|
});
|
|
1484
1513
|
return;
|
|
1485
1514
|
}
|
|
1486
|
-
const
|
|
1515
|
+
const rawImageBuffer = await storage.download(file.filePath);
|
|
1516
|
+
const imageBuffer = await ensureImageWithinDimensionLimit(rawImageBuffer, MAX_IMAGE_DIMENSION_PX, logger);
|
|
1487
1517
|
const imageData = imageBuffer.toString("base64");
|
|
1488
1518
|
const { mime: actualMimeType } = await getFileType(imageBuffer, file.fileName, file.mimeType);
|
|
1489
1519
|
imageContent.push({
|
|
@@ -6253,7 +6253,7 @@ var CreateDataLakeRequestInput = z28.object({
|
|
|
6253
6253
|
slug: z28.string().min(2).max(60).regex(slugRegex, 'Slug must be lowercase alphanumeric with hyphens (e.g. "my-data-lake")'),
|
|
6254
6254
|
description: z28.string().max(2e3).optional(),
|
|
6255
6255
|
fileTagPrefix: z28.string().min(2).max(30).refine((s) => s.endsWith(":"), 'Tag prefix must end with ":" (e.g. "acme:")'),
|
|
6256
|
-
requiredUserTag: z28.string().max(100).optional(),
|
|
6256
|
+
requiredUserTag: z28.string().min(1).max(100).optional(),
|
|
6257
6257
|
organizationId: z28.string().optional()
|
|
6258
6258
|
});
|
|
6259
6259
|
var UpdateDataLakeRequestInput = z28.object({
|
|
@@ -6364,7 +6364,7 @@ function getAccessibleDataLakes(userTags, dynamicDataLakes) {
|
|
|
6364
6364
|
} else {
|
|
6365
6365
|
allLakes = DATA_LAKES;
|
|
6366
6366
|
}
|
|
6367
|
-
return allLakes.filter((dl) => normalizedUserTags.includes(dl.requiredUserTag.toLowerCase()));
|
|
6367
|
+
return allLakes.filter((dl) => !dl.requiredUserTag || normalizedUserTags.includes(dl.requiredUserTag.toLowerCase()));
|
|
6368
6368
|
}
|
|
6369
6369
|
function getDataLakeTags(userTags, dynamicDataLakes) {
|
|
6370
6370
|
return getAccessibleDataLakes(userTags, dynamicDataLakes).map((dl) => dl.datalakeTag);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getOpenWeatherKey,
|
|
5
5
|
getSerperKey,
|
|
6
6
|
getWolframAlphaKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2J4HB7EB.js";
|
|
8
8
|
import {
|
|
9
9
|
assertPathAllowed,
|
|
10
10
|
isPathAllowed
|
|
@@ -20,14 +20,14 @@ import {
|
|
|
20
20
|
OpenAIBackend,
|
|
21
21
|
OpenAIImageService,
|
|
22
22
|
XAIImageService
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EO2Y5GFY.js";
|
|
24
24
|
import {
|
|
25
25
|
Logger
|
|
26
26
|
} from "./chunk-PFBYGCOW.js";
|
|
27
27
|
import {
|
|
28
28
|
ConfigStore,
|
|
29
29
|
logger
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-J6ZBI6TI.js";
|
|
31
31
|
import {
|
|
32
32
|
ALERT_THRESHOLDS,
|
|
33
33
|
AiEvents,
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
getViewById,
|
|
89
89
|
resolveNavigationIntents,
|
|
90
90
|
sanitizeTelemetryError
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-JW3JRHH7.js";
|
|
92
92
|
|
|
93
93
|
// src/utils/fileSearch.ts
|
|
94
94
|
import * as fs from "fs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BadRequestError,
|
|
4
4
|
secureParameters
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EO2Y5GFY.js";
|
|
6
6
|
import {
|
|
7
7
|
CompletionApiUsageTransaction,
|
|
8
8
|
GenericCreditDeductTransaction,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
ToolUsageTransaction,
|
|
14
14
|
TransferCreditTransaction,
|
|
15
15
|
VideoGenerationUsageTransaction
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JW3JRHH7.js";
|
|
17
17
|
|
|
18
18
|
// ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
|
|
19
19
|
import { z } from "zod";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@bike4mind/cli",
|
|
6
|
-
version: "0.2.62
|
|
6
|
+
version: "0.2.62",
|
|
7
7
|
type: "module",
|
|
8
8
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
9
9
|
license: "UNLICENSED",
|
|
@@ -118,11 +118,11 @@ var package_default = {
|
|
|
118
118
|
zustand: "^4.5.4"
|
|
119
119
|
},
|
|
120
120
|
devDependencies: {
|
|
121
|
-
"@bike4mind/agents": "0.
|
|
122
|
-
"@bike4mind/common": "2.
|
|
123
|
-
"@bike4mind/mcp": "1.33.20
|
|
124
|
-
"@bike4mind/services": "2.68.2
|
|
125
|
-
"@bike4mind/utils": "2.16.1
|
|
121
|
+
"@bike4mind/agents": "0.4.0",
|
|
122
|
+
"@bike4mind/common": "2.75.0",
|
|
123
|
+
"@bike4mind/mcp": "1.33.20",
|
|
124
|
+
"@bike4mind/services": "2.68.2",
|
|
125
|
+
"@bike4mind/utils": "2.16.1",
|
|
126
126
|
"@types/better-sqlite3": "^7.6.13",
|
|
127
127
|
"@types/jsonwebtoken": "^9.0.4",
|
|
128
128
|
"@types/node": "^22.9.0",
|
|
@@ -139,7 +139,7 @@ var package_default = {
|
|
|
139
139
|
optionalDependencies: {
|
|
140
140
|
"@vscode/ripgrep": "^1.17.1"
|
|
141
141
|
},
|
|
142
|
-
gitHead: "
|
|
142
|
+
gitHead: "faae6cba90cc104961ee4dbef74dbe51d599b9dc"
|
|
143
143
|
};
|
|
144
144
|
|
|
145
145
|
// src/utils/updateChecker.ts
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getSettingsMap,
|
|
8
8
|
getSettingsValue,
|
|
9
9
|
secureParameters
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EO2Y5GFY.js";
|
|
11
11
|
import {
|
|
12
12
|
KnowledgeType,
|
|
13
13
|
SupportedFabFileMimeTypes
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JW3JRHH7.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/fabFileService/create.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -36,21 +36,21 @@ import {
|
|
|
36
36
|
isReadOnlyTool,
|
|
37
37
|
loadContextFiles,
|
|
38
38
|
setWebSocketToolExecutor
|
|
39
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-MNBT2VFX.js";
|
|
40
40
|
import "../chunk-BDQBOLYG.js";
|
|
41
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-2J4HB7EB.js";
|
|
42
42
|
import "../chunk-GQGOWACU.js";
|
|
43
43
|
import "../chunk-LTLJRF6I.js";
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import "../chunk-
|
|
44
|
+
import "../chunk-PJFESKK6.js";
|
|
45
|
+
import "../chunk-Y7K4HI6L.js";
|
|
46
|
+
import "../chunk-EO2Y5GFY.js";
|
|
47
47
|
import "../chunk-PFBYGCOW.js";
|
|
48
48
|
import "../chunk-BPFEGDC7.js";
|
|
49
49
|
import {
|
|
50
50
|
ConfigStore,
|
|
51
51
|
logger
|
|
52
|
-
} from "../chunk-
|
|
53
|
-
import "../chunk-
|
|
52
|
+
} from "../chunk-J6ZBI6TI.js";
|
|
53
|
+
import "../chunk-JW3JRHH7.js";
|
|
54
54
|
import {
|
|
55
55
|
DEFAULT_SANDBOX_CONFIG
|
|
56
56
|
} from "../chunk-4BIBE3J7.js";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createFabFile,
|
|
4
4
|
createFabFileSchema
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-Y7K4HI6L.js";
|
|
6
|
+
import "./chunk-EO2Y5GFY.js";
|
|
7
7
|
import "./chunk-PFBYGCOW.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-JW3JRHH7.js";
|
|
9
9
|
export {
|
|
10
10
|
createFabFile,
|
|
11
11
|
createFabFileSchema
|
package/dist/index.js
CHANGED
|
@@ -48,26 +48,26 @@ import {
|
|
|
48
48
|
setWebSocketToolExecutor,
|
|
49
49
|
substituteArguments,
|
|
50
50
|
warmFileCache
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-MNBT2VFX.js";
|
|
52
52
|
import "./chunk-BDQBOLYG.js";
|
|
53
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-2J4HB7EB.js";
|
|
54
54
|
import "./chunk-GQGOWACU.js";
|
|
55
55
|
import "./chunk-LTLJRF6I.js";
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-PJFESKK6.js";
|
|
57
|
+
import "./chunk-Y7K4HI6L.js";
|
|
58
58
|
import {
|
|
59
59
|
OllamaBackend
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-EO2Y5GFY.js";
|
|
61
61
|
import "./chunk-PFBYGCOW.js";
|
|
62
62
|
import "./chunk-BPFEGDC7.js";
|
|
63
63
|
import {
|
|
64
64
|
ConfigStore,
|
|
65
65
|
logger
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-J6ZBI6TI.js";
|
|
67
67
|
import {
|
|
68
68
|
checkForUpdate,
|
|
69
69
|
package_default
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-VJLPCIK2.js";
|
|
71
71
|
import {
|
|
72
72
|
selectActiveBackgroundAgents,
|
|
73
73
|
useCliStore
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
ChatModels,
|
|
78
78
|
validateJupyterKernelName,
|
|
79
79
|
validateNotebookPath
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-JW3JRHH7.js";
|
|
81
81
|
import "./chunk-4BIBE3J7.js";
|
|
82
82
|
|
|
83
83
|
// src/index.tsx
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
findMostSimilarMemento,
|
|
4
4
|
getRelevantMementos
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-2J4HB7EB.js";
|
|
6
|
+
import "./chunk-EO2Y5GFY.js";
|
|
7
7
|
import "./chunk-PFBYGCOW.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-JW3JRHH7.js";
|
|
9
9
|
export {
|
|
10
10
|
findMostSimilarMemento,
|
|
11
11
|
getRelevantMementos
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
validateUrlForFetch,
|
|
147
147
|
warmUpSettingsCache,
|
|
148
148
|
withRetry
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-EO2Y5GFY.js";
|
|
150
150
|
import {
|
|
151
151
|
Logger,
|
|
152
152
|
NotificationDeduplicator,
|
|
@@ -159,7 +159,7 @@ import {
|
|
|
159
159
|
buildRateLimitLogEntry,
|
|
160
160
|
isNearLimit,
|
|
161
161
|
parseRateLimitHeaders
|
|
162
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-JW3JRHH7.js";
|
|
163
163
|
export {
|
|
164
164
|
AIVideoService,
|
|
165
165
|
AWSBackend,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
SubtractCreditsSchema,
|
|
4
4
|
subtractCredits
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-PJFESKK6.js";
|
|
6
|
+
import "./chunk-EO2Y5GFY.js";
|
|
7
7
|
import "./chunk-PFBYGCOW.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-JW3JRHH7.js";
|
|
9
9
|
export {
|
|
10
10
|
SubtractCreditsSchema,
|
|
11
11
|
subtractCredits
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.2.62
|
|
3
|
+
"version": "0.2.62",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -115,11 +115,11 @@
|
|
|
115
115
|
"zustand": "^4.5.4"
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
|
-
"@bike4mind/agents": "0.
|
|
119
|
-
"@bike4mind/common": "2.
|
|
120
|
-
"@bike4mind/mcp": "1.33.20
|
|
121
|
-
"@bike4mind/services": "2.68.2
|
|
122
|
-
"@bike4mind/utils": "2.16.1
|
|
118
|
+
"@bike4mind/agents": "0.4.0",
|
|
119
|
+
"@bike4mind/common": "2.75.0",
|
|
120
|
+
"@bike4mind/mcp": "1.33.20",
|
|
121
|
+
"@bike4mind/services": "2.68.2",
|
|
122
|
+
"@bike4mind/utils": "2.16.1",
|
|
123
123
|
"@types/better-sqlite3": "^7.6.13",
|
|
124
124
|
"@types/jsonwebtoken": "^9.0.4",
|
|
125
125
|
"@types/node": "^22.9.0",
|
|
@@ -136,5 +136,5 @@
|
|
|
136
136
|
"optionalDependencies": {
|
|
137
137
|
"@vscode/ripgrep": "^1.17.1"
|
|
138
138
|
},
|
|
139
|
-
"gitHead": "
|
|
139
|
+
"gitHead": "faae6cba90cc104961ee4dbef74dbe51d599b9dc"
|
|
140
140
|
}
|