@bike4mind/cli 0.2.1-epic-lattice.17016 → 0.2.1-feat-cli-usage-command.17001
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-LFD46Z57.js → artifactExtractor-GXQ5YZF7.js} +1 -1
- package/dist/{chunk-FMXGH4KC.js → chunk-7R5QIZU3.js} +14 -6
- package/dist/{chunk-HHHI5KKC.js → chunk-F3ETXO5N.js} +2 -2
- package/dist/{chunk-GSXZOOWP.js → chunk-QXGU6KYI.js} +2 -2
- package/dist/{chunk-7JFN4F7V.js → chunk-U3GPYBTD.js} +2 -4
- package/dist/{chunk-ZMZK7YVU.js → chunk-WR6YZRQV.js} +187 -722
- package/dist/{create-H4NTHQFV.js → create-YUYXTEIS.js} +3 -3
- package/dist/index.js +125 -672
- package/dist/{llmMarkdownGenerator-MCARYCM6.js → llmMarkdownGenerator-4ZR3FLEQ.js} +1 -1
- package/dist/{markdownGenerator-SVLZNXRS.js → markdownGenerator-7WE7WKME.js} +1 -1
- package/dist/{mementoService-6AL37G2J.js → mementoService-2BDIT6PH.js} +3 -3
- package/dist/{src-4TOZJYKI.js → src-6J6LFPZ6.js} +1 -125
- package/dist/{src-5NAH3LYJ.js → src-VLP2EHKE.js} +2 -2
- package/dist/{subtractCredits-762T4S77.js → subtractCredits-AWVE6RYS.js} +3 -3
- package/package.json +6 -6
- package/dist/HydrationEngine-TIB3IU6D.js +0 -10
- package/dist/chunk-NHP3UPYU.js +0 -765
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BadRequestError,
|
|
4
4
|
secureParameters
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-U3GPYBTD.js";
|
|
6
6
|
import {
|
|
7
7
|
GenericCreditDeductTransaction,
|
|
8
8
|
ImageEditUsageTransaction,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
RealtimeVoiceUsageTransaction,
|
|
11
11
|
TextGenerationUsageTransaction,
|
|
12
12
|
TransferCreditTransaction
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WR6YZRQV.js";
|
|
14
14
|
|
|
15
15
|
// ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
|
|
16
16
|
import { z } from "zod";
|
|
@@ -22,12 +22,20 @@ var SubtractCreditsSchema = z.discriminatedUnion("type", [
|
|
|
22
22
|
ImageEditUsageTransaction.omit({ createdAt: true, updatedAt: true }),
|
|
23
23
|
TransferCreditTransaction.omit({ createdAt: true, updatedAt: true })
|
|
24
24
|
]);
|
|
25
|
-
async function subtractCredits(parameters, { db, creditHolderMethods }) {
|
|
25
|
+
async function subtractCredits(parameters, { db, creditHolderMethods, skipBalanceUpdate, currentCreditHolder }) {
|
|
26
26
|
const params = secureParameters(parameters, SubtractCreditsSchema);
|
|
27
27
|
const { ownerId, ownerType, credits, type, description, metadata } = params;
|
|
28
|
-
|
|
29
|
-
if (
|
|
30
|
-
|
|
28
|
+
let updatedEntity;
|
|
29
|
+
if (skipBalanceUpdate) {
|
|
30
|
+
if (!currentCreditHolder) {
|
|
31
|
+
throw new BadRequestError("currentCreditHolder is required when skipBalanceUpdate is true");
|
|
32
|
+
}
|
|
33
|
+
updatedEntity = currentCreditHolder;
|
|
34
|
+
} else {
|
|
35
|
+
updatedEntity = await creditHolderMethods.incrementCredits(ownerId, -credits);
|
|
36
|
+
if (!updatedEntity) {
|
|
37
|
+
throw new BadRequestError("Failed to update credits");
|
|
38
|
+
}
|
|
31
39
|
}
|
|
32
40
|
if (type === "generic_deduct") {
|
|
33
41
|
await db.creditTransactions.createTransaction("generic_deduct", {
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getSettingsMap,
|
|
8
8
|
getSettingsValue,
|
|
9
9
|
secureParameters
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-U3GPYBTD.js";
|
|
11
11
|
import {
|
|
12
12
|
KnowledgeType,
|
|
13
13
|
SupportedFabFileMimeTypes
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WR6YZRQV.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/fabFileService/create.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
getSettingsByNames,
|
|
7
7
|
obfuscateApiKey,
|
|
8
8
|
secureParameters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-U3GPYBTD.js";
|
|
10
10
|
import {
|
|
11
11
|
ApiKeyType,
|
|
12
12
|
MementoTier,
|
|
13
13
|
isSupportedEmbeddingModel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WR6YZRQV.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
dayjsConfig_default,
|
|
17
17
|
extractSnippetMeta,
|
|
18
18
|
settingsMap
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WR6YZRQV.js";
|
|
20
20
|
|
|
21
21
|
// ../../b4m-core/packages/utils/dist/src/storage/S3Storage.js
|
|
22
22
|
import { S3Client, PutObjectCommand, DeleteObjectCommand, GetObjectCommand, HeadObjectCommand } from "@aws-sdk/client-s3";
|
|
@@ -224,7 +224,7 @@ var ChoiceEndReason;
|
|
|
224
224
|
// ../../b4m-core/packages/utils/dist/src/llm/toolStreamingHelper.js
|
|
225
225
|
async function handleToolResultStreaming(toolName, toolResult, streamCallback) {
|
|
226
226
|
const resultString = toolResult.toString();
|
|
227
|
-
const shouldStream = toolName === "recharts" || resultString.includes("<artifact") || resultString.includes('type="application/vnd.ant.')
|
|
227
|
+
const shouldStream = toolName === "recharts" || resultString.includes("<artifact") || resultString.includes('type="application/vnd.ant.');
|
|
228
228
|
if (shouldStream) {
|
|
229
229
|
await streamCallback([resultString]);
|
|
230
230
|
}
|
|
@@ -9708,8 +9708,6 @@ function mapMimeTypeToArtifactType(mimeType) {
|
|
|
9708
9708
|
case ClaudeArtifactMimeTypes.MARKDOWN:
|
|
9709
9709
|
return "code";
|
|
9710
9710
|
// Treat markdown as code for now
|
|
9711
|
-
case ClaudeArtifactMimeTypes.LATTICE:
|
|
9712
|
-
return "lattice";
|
|
9713
9711
|
default:
|
|
9714
9712
|
if (mimeType.includes("javascript") || mimeType.includes("jsx")) {
|
|
9715
9713
|
return "react";
|