@bike4mind/cli 0.2.29-subagent-delegation.18906 → 0.2.29
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/HydrationEngine-WGYKF46H.js +9 -0
- package/dist/{artifactExtractor-P6HJHLX3.js → artifactExtractor-4SBIE5OK.js} +1 -1
- package/dist/{chunk-XTJDV3TC.js → chunk-22VR7SKO.js} +2 -2
- package/dist/{chunk-SA634LPQ.js → chunk-5J4RL57F.js} +5 -9
- package/dist/chunk-RUI6HNLO.js +766 -0
- package/dist/{chunk-WKJ6QNRZ.js → chunk-TNFZP7FG.js} +1025 -202
- package/dist/{chunk-TKZJAHDN.js → chunk-UYN4HMRF.js} +2 -2
- package/dist/{chunk-HZNRFX2D.js → chunk-YQWFK5O2.js} +2 -2
- package/dist/{create-KVBSZB62.js → create-DCHG36CP.js} +3 -3
- package/dist/index.js +859 -213
- package/dist/{llmMarkdownGenerator-VSE57EX6.js → llmMarkdownGenerator-6MQKVOWW.js} +1 -1
- package/dist/{markdownGenerator-XWEXPIBL.js → markdownGenerator-4GDO3PTY.js} +1 -1
- package/dist/{mementoService-RYFJCSTB.js → mementoService-WDQFLLRV.js} +3 -3
- package/dist/{src-E6RPPN4X.js → src-DVEE3PS5.js} +9 -2
- package/dist/{src-BLBELFWF.js → src-ZAT7QMNA.js} +153 -1
- package/dist/{subtractCredits-BXCLZQVK.js → subtractCredits-LE54FRKC.js} +3 -3
- package/package.json +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CurationArtifactType
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TNFZP7FG.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-5J4RL57F.js";
|
|
10
10
|
import {
|
|
11
11
|
ApiKeyType,
|
|
12
12
|
MementoTier,
|
|
13
13
|
isSupportedEmbeddingModel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TNFZP7FG.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
dayjsConfig_default,
|
|
16
16
|
extractSnippetMeta,
|
|
17
17
|
settingsMap
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TNFZP7FG.js";
|
|
19
19
|
import {
|
|
20
20
|
Logger
|
|
21
21
|
} from "./chunk-OCYRD7D6.js";
|
|
@@ -227,7 +227,7 @@ var ChoiceEndReason;
|
|
|
227
227
|
// ../../b4m-core/packages/utils/dist/src/llm/toolStreamingHelper.js
|
|
228
228
|
async function handleToolResultStreaming(toolName, toolResult, streamCallback) {
|
|
229
229
|
const resultString = toolResult.toString();
|
|
230
|
-
const shouldStream = toolName === "recharts" || resultString.includes("<artifact") || resultString.includes('type="application/vnd.ant.');
|
|
230
|
+
const shouldStream = toolName === "recharts" || resultString.includes("<artifact") || resultString.includes('type="application/vnd.ant.') || resultString.includes('type="application/vnd.b4m.');
|
|
231
231
|
if (shouldStream) {
|
|
232
232
|
await streamCallback([resultString]);
|
|
233
233
|
}
|
|
@@ -1132,7 +1132,7 @@ async function calculateTotalTokenLength(messages, { estimateOnly = false, token
|
|
|
1132
1132
|
concatenatedContent += message.role;
|
|
1133
1133
|
if (Array.isArray(message.content)) {
|
|
1134
1134
|
message.content.forEach((obj) => {
|
|
1135
|
-
if (obj.type === "image") {
|
|
1135
|
+
if (obj.type === "image" || obj.type === "image_url") {
|
|
1136
1136
|
imageTokenCount += 1600;
|
|
1137
1137
|
} else {
|
|
1138
1138
|
concatenatedContent += JSON.stringify(obj);
|
|
@@ -2800,7 +2800,6 @@ var AnthropicBackend = class {
|
|
|
2800
2800
|
});
|
|
2801
2801
|
}
|
|
2802
2802
|
if (options.executeTools !== false) {
|
|
2803
|
-
const savedAssistantContent = [...this.lastAssistantContent];
|
|
2804
2803
|
for (const tool of func) {
|
|
2805
2804
|
if (!tool || !tool.name)
|
|
2806
2805
|
continue;
|
|
@@ -2821,7 +2820,6 @@ var AnthropicBackend = class {
|
|
|
2821
2820
|
try {
|
|
2822
2821
|
const parsedParams = JSON.parse(parameters);
|
|
2823
2822
|
const result = await toolFn(parsedParams);
|
|
2824
|
-
this.lastAssistantContent = [...savedAssistantContent];
|
|
2825
2823
|
const resultStr = result.toString();
|
|
2826
2824
|
const toolDuration = Date.now() - toolStartTime;
|
|
2827
2825
|
this.logger.info("[Tool Execution] Tool completed successfully", {
|
|
@@ -2842,7 +2840,6 @@ var AnthropicBackend = class {
|
|
|
2842
2840
|
const toolId = id || `tool_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
2843
2841
|
this.pushToolMessages(messages, { id: toolId, name, parameters }, resultStr);
|
|
2844
2842
|
} catch (error) {
|
|
2845
|
-
this.lastAssistantContent = [...savedAssistantContent];
|
|
2846
2843
|
const toolDuration = Date.now() - toolStartTime;
|
|
2847
2844
|
if (error instanceof PermissionDeniedError) {
|
|
2848
2845
|
throw error;
|
|
@@ -2949,7 +2946,6 @@ var AnthropicBackend = class {
|
|
|
2949
2946
|
messageCountBefore: messages.length
|
|
2950
2947
|
});
|
|
2951
2948
|
if (options.executeTools !== false) {
|
|
2952
|
-
const savedAssistantContent = [...this.lastAssistantContent];
|
|
2953
2949
|
for (const tool of func) {
|
|
2954
2950
|
if (!tool || !tool.name)
|
|
2955
2951
|
continue;
|
|
@@ -2970,7 +2966,6 @@ var AnthropicBackend = class {
|
|
|
2970
2966
|
try {
|
|
2971
2967
|
const parsedParams = JSON.parse(parameters);
|
|
2972
2968
|
const result = await toolFn(parsedParams);
|
|
2973
|
-
this.lastAssistantContent = [...savedAssistantContent];
|
|
2974
2969
|
const resultStr = result.toString();
|
|
2975
2970
|
const toolDuration = Date.now() - toolStartTime;
|
|
2976
2971
|
this.logger.info("[Tool Execution] Tool completed successfully (non-streaming)", {
|
|
@@ -2987,7 +2982,6 @@ var AnthropicBackend = class {
|
|
|
2987
2982
|
const toolId = id || `tool_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
2988
2983
|
this.pushToolMessages(messages, { id: toolId, name, parameters }, resultStr);
|
|
2989
2984
|
} catch (error) {
|
|
2990
|
-
this.lastAssistantContent = [...savedAssistantContent];
|
|
2991
2985
|
const toolDuration = Date.now() - toolStartTime;
|
|
2992
2986
|
if (error instanceof PermissionDeniedError) {
|
|
2993
2987
|
throw error;
|
|
@@ -11287,6 +11281,8 @@ function mapMimeTypeToArtifactType(mimeType) {
|
|
|
11287
11281
|
case ClaudeArtifactMimeTypes.MARKDOWN:
|
|
11288
11282
|
return "code";
|
|
11289
11283
|
// Treat markdown as code for now
|
|
11284
|
+
case ClaudeArtifactMimeTypes.LATTICE:
|
|
11285
|
+
return "lattice";
|
|
11290
11286
|
default:
|
|
11291
11287
|
if (mimeType.includes("javascript") || mimeType.includes("jsx")) {
|
|
11292
11288
|
return "react";
|