@bike4mind/cli 0.2.31-feat-dynamic-agent-creation.19590 → 0.2.31-feat-python-playground.19625

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CurationArtifactType
4
- } from "./chunk-PLA2VBQW.js";
4
+ } from "./chunk-EEGKRFVP.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;
@@ -16,7 +16,7 @@ import {
16
16
  dayjsConfig_default,
17
17
  extractSnippetMeta,
18
18
  settingsMap
19
- } from "./chunk-PLA2VBQW.js";
19
+ } from "./chunk-EEGKRFVP.js";
20
20
  import {
21
21
  Logger
22
22
  } from "./chunk-PFBYGCOW.js";
@@ -3097,8 +3097,25 @@ IMPORTANT! Only when someone asks, remember that you are specifically the ${mode
3097
3097
  return;
3098
3098
  }
3099
3099
  } else {
3100
+ this.logger.info("[AnthropicBackend] Non-streaming request", {
3101
+ model,
3102
+ hasThinking: !!apiParams.thinking,
3103
+ thinkingBudget: apiParams.thinking?.budget_tokens,
3104
+ maxTokens: apiParams.max_tokens,
3105
+ temperature: apiParams.temperature,
3106
+ isThinkingEnabled: this.isThinkingEnabled
3107
+ });
3100
3108
  const response = await this._api.messages.create(apiParams, { signal: options.abortSignal });
3101
3109
  const streamedText = [];
3110
+ const contentTypes = "content" in response && Array.isArray(response.content) ? response.content.map((c) => c.type || (c.text ? "text" : "unknown")) : [];
3111
+ this.logger.info("[AnthropicBackend] Non-streaming response received", {
3112
+ model,
3113
+ stopReason: response.stop_reason,
3114
+ contentBlockCount: contentTypes.length,
3115
+ contentTypes: contentTypes.join(","),
3116
+ inputTokens: response.usage?.input_tokens,
3117
+ outputTokens: response.usage?.output_tokens
3118
+ });
3102
3119
  if ("content" in response && Array.isArray(response.content)) {
3103
3120
  if (this.isThinkingEnabled) {
3104
3121
  this.lastAssistantContent = response.content;
@@ -3107,12 +3124,21 @@ IMPORTANT! Only when someone asks, remember that you are specifically the ${mode
3107
3124
  const content = response.content[i];
3108
3125
  if ("text" in content) {
3109
3126
  streamedText.push(content.text);
3127
+ this.logger.debug("[AnthropicBackend] Text block extracted", {
3128
+ blockIndex: i,
3129
+ textLength: content.text.length
3130
+ });
3110
3131
  } else if ("type" in content) {
3111
3132
  if (content.type === "tool_use") {
3112
3133
  func[i] ||= {};
3113
3134
  func[i].name = content.name;
3114
3135
  func[i].id = content.id;
3115
3136
  func[i].parameters = JSON.stringify(content.input || {});
3137
+ } else if (content.type === "thinking") {
3138
+ this.logger.warn("[AnthropicBackend] Unexpected thinking block in response", {
3139
+ blockIndex: i,
3140
+ thinkingLength: content.thinking?.length || 0
3141
+ });
3116
3142
  }
3117
3143
  }
3118
3144
  }
@@ -4132,8 +4158,6 @@ ${modelIdentity}` : modelIdentity;
4132
4158
  topP: options.topP
4133
4159
  }
4134
4160
  }, null, 2)}`);
4135
- const bodyStr = JSON.stringify(body);
4136
- console.log(`[AnthropicBedrockBackend] Request body: ${bodyStr.substring(0, 1e3)}${bodyStr.length > 1e3 ? "..." : ""}`);
4137
4161
  return {
4138
4162
  modelId,
4139
4163
  contentType: "application/json",
@@ -4191,7 +4215,30 @@ ${modelIdentity}` : modelIdentity;
4191
4215
  translateChunk(model, chunk) {
4192
4216
  try {
4193
4217
  const response = chunk;
4218
+ const contentTypes = response.content.map((c) => c.type);
4219
+ const thinkingBlocks = response.content.filter((c) => c.type === "thinking");
4220
+ console.log(`[AnthropicBedrockBackend] Response received:`, {
4221
+ model,
4222
+ stopReason: response.stop_reason,
4223
+ contentBlockCount: response.content.length,
4224
+ contentTypes: contentTypes.join(","),
4225
+ hasThinkingBlocks: thinkingBlocks.length > 0,
4226
+ thinkingBlockCount: thinkingBlocks.length,
4227
+ inputTokens: response.usage?.input_tokens,
4228
+ outputTokens: response.usage?.output_tokens
4229
+ });
4230
+ if (thinkingBlocks.length > 0) {
4231
+ console.warn(`[AnthropicBedrockBackend] Unexpected thinking blocks in response`, {
4232
+ thinkingBlockCount: thinkingBlocks.length,
4233
+ thinkingLengths: thinkingBlocks.map((b) => b.thinking?.length || 0)
4234
+ });
4235
+ }
4194
4236
  const textContent = response.content.filter((item) => item.type === "text").map((item) => item.text || "").join("");
4237
+ console.log(`[AnthropicBedrockBackend] Text extracted:`, {
4238
+ textLength: textContent.length,
4239
+ textPreview: textContent.substring(0, 200),
4240
+ endsWithCloseBrace: textContent.trim().endsWith("}")
4241
+ });
4195
4242
  const toolUseBlocks = response.content.filter((item) => item.type === "tool_use");
4196
4243
  let choice;
4197
4244
  if (toolUseBlocks.length > 0) {
@@ -330,8 +330,7 @@ var CliConfigSchema = z.object({
330
330
  theme: z.enum(["light", "dark"]),
331
331
  exportFormat: z.enum(["markdown", "json"]),
332
332
  maxIterations: z.number().nullable().prefault(10),
333
- enableSkillTool: z.boolean().optional().prefault(true),
334
- enableDynamicAgentCreation: z.boolean().optional().prefault(false)
333
+ enableSkillTool: z.boolean().optional().prefault(true)
335
334
  }),
336
335
  tools: z.object({
337
336
  enabled: z.array(z.string()),
@@ -355,8 +354,7 @@ var ProjectConfigSchema = z.object({
355
354
  autoCompact: z.boolean().optional(),
356
355
  theme: z.enum(["light", "dark"]).optional(),
357
356
  exportFormat: z.enum(["markdown", "json"]).optional(),
358
- enableSkillTool: z.boolean().optional(),
359
- enableDynamicAgentCreation: z.boolean().optional()
357
+ enableSkillTool: z.boolean().optional()
360
358
  }).optional()
361
359
  });
362
360
  var ProjectLocalConfigSchema = z.object({
@@ -372,8 +370,7 @@ var ProjectLocalConfigSchema = z.object({
372
370
  autoCompact: z.boolean().optional(),
373
371
  theme: z.enum(["light", "dark"]).optional(),
374
372
  exportFormat: z.enum(["markdown", "json"]).optional(),
375
- enableSkillTool: z.boolean().optional(),
376
- enableDynamicAgentCreation: z.boolean().optional()
373
+ enableSkillTool: z.boolean().optional()
377
374
  }).optional(),
378
375
  mcpServers: McpServersSchema.optional()
379
376
  });
@@ -394,8 +391,7 @@ var DEFAULT_CONFIG = {
394
391
  theme: "dark",
395
392
  exportFormat: "markdown",
396
393
  maxIterations: 10,
397
- enableSkillTool: true,
398
- enableDynamicAgentCreation: false
394
+ enableSkillTool: true
399
395
  },
400
396
  tools: {
401
397
  enabled: [],
@@ -483,6 +483,15 @@ var LatticeArtifactSchema = ArtifactSchema.extend({
483
483
  lastComputedAt: z6.date().optional()
484
484
  })
485
485
  });
486
+ var PythonArtifactSchema = ArtifactSchema.extend({
487
+ type: z6.literal("python"),
488
+ metadata: ArtifactMetadataSchema.extend({
489
+ packages: z6.array(z6.string()).default([]),
490
+ hasOutput: z6.boolean().default(false),
491
+ executionState: z6.enum(["idle", "running", "completed", "error"]).optional(),
492
+ lastExecutionTime: z6.number().optional()
493
+ })
494
+ });
486
495
  var MermaidChartMetadataSchema = z6.object({
487
496
  chartType: z6.enum([
488
497
  "flowchart",
@@ -517,7 +526,8 @@ var ClaudeArtifactMimeTypes = {
517
526
  RECHARTS: "application/vnd.ant.recharts",
518
527
  CODE: "application/vnd.ant.code",
519
528
  MARKDOWN: "text/markdown",
520
- LATTICE: "application/vnd.b4m.lattice"
529
+ LATTICE: "application/vnd.b4m.lattice",
530
+ PYTHON: "application/vnd.ant.python"
521
531
  };
522
532
 
523
533
  // ../../b4m-core/packages/common/dist/src/types/entities/AppFileTypes.js
@@ -9119,6 +9129,16 @@ var MermaidArtifactV2Schema = BaseArtifactSchema.extend({
9119
9129
  description: z28.string().optional()
9120
9130
  })
9121
9131
  });
9132
+ var PythonArtifactV2Schema = BaseArtifactSchema.extend({
9133
+ type: z28.literal("python"),
9134
+ content: z28.string(),
9135
+ metadata: EnhancedArtifactMetadataSchema.extend({
9136
+ packages: z28.array(z28.string()).default([]),
9137
+ hasOutput: z28.boolean().default(false),
9138
+ executionState: z28.enum(["idle", "running", "completed", "error"]).optional(),
9139
+ lastExecutionTime: z28.number().optional()
9140
+ })
9141
+ });
9122
9142
  var ArtifactStatuses;
9123
9143
  (function(ArtifactStatuses2) {
9124
9144
  ArtifactStatuses2["DRAFT"] = "draft";
@@ -9142,6 +9162,9 @@ var validateSvgArtifactV2 = (data) => {
9142
9162
  var validateMermaidArtifactV2 = (data) => {
9143
9163
  return MermaidArtifactV2Schema.parse(data);
9144
9164
  };
9165
+ var validatePythonArtifactV2 = (data) => {
9166
+ return PythonArtifactV2Schema.parse(data);
9167
+ };
9145
9168
 
9146
9169
  // ../../b4m-core/packages/common/dist/src/schemas/questmaster.js
9147
9170
  import { z as z29 } from "zod";
@@ -10184,6 +10207,7 @@ export {
10184
10207
  MermaidArtifactSchema,
10185
10208
  RechartsArtifactSchema,
10186
10209
  LatticeArtifactSchema,
10210
+ PythonArtifactSchema,
10187
10211
  MermaidChartMetadataSchema,
10188
10212
  ChatHistoryItemWithArtifactsSchema,
10189
10213
  ArtifactOperationSchema,
@@ -10532,12 +10556,14 @@ export {
10532
10556
  HtmlArtifactV2Schema,
10533
10557
  SvgArtifactV2Schema,
10534
10558
  MermaidArtifactV2Schema,
10559
+ PythonArtifactV2Schema,
10535
10560
  ArtifactStatuses,
10536
10561
  validateBaseArtifact,
10537
10562
  validateReactArtifactV2,
10538
10563
  validateHtmlArtifactV2,
10539
10564
  validateSvgArtifactV2,
10540
10565
  validateMermaidArtifactV2,
10566
+ validatePythonArtifactV2,
10541
10567
  QuestStatusSchema,
10542
10568
  QuestSchema,
10543
10569
  QuestResourceSchema,
@@ -6,12 +6,12 @@ import {
6
6
  getSettingsByNames,
7
7
  obfuscateApiKey,
8
8
  secureParameters
9
- } from "./chunk-PV6PZFPC.js";
9
+ } from "./chunk-2PXPXXDN.js";
10
10
  import {
11
11
  ApiKeyType,
12
12
  MementoTier,
13
13
  isSupportedEmbeddingModel
14
- } from "./chunk-PLA2VBQW.js";
14
+ } from "./chunk-EEGKRFVP.js";
15
15
 
16
16
  // ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
17
17
  import { z } from "zod";
@@ -7,11 +7,11 @@ import {
7
7
  getSettingsMap,
8
8
  getSettingsValue,
9
9
  secureParameters
10
- } from "./chunk-PV6PZFPC.js";
10
+ } from "./chunk-2PXPXXDN.js";
11
11
  import {
12
12
  KnowledgeType,
13
13
  SupportedFabFileMimeTypes
14
- } from "./chunk-PLA2VBQW.js";
14
+ } from "./chunk-EEGKRFVP.js";
15
15
 
16
16
  // ../../b4m-core/packages/services/dist/src/fabFileService/create.js
17
17
  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.31-feat-dynamic-agent-creation.19590+9c079d1b9",
6
+ version: "0.2.31-feat-python-playground.19625+2188a6ca0",
7
7
  type: "module",
8
8
  description: "Interactive CLI tool for Bike4Mind with ReAct agents",
9
9
  license: "UNLICENSED",
@@ -114,10 +114,10 @@ var package_default = {
114
114
  },
115
115
  devDependencies: {
116
116
  "@bike4mind/agents": "0.1.0",
117
- "@bike4mind/common": "2.52.1-feat-dynamic-agent-creation.19590+9c079d1b9",
118
- "@bike4mind/mcp": "1.31.1-feat-dynamic-agent-creation.19590+9c079d1b9",
119
- "@bike4mind/services": "2.50.1-feat-dynamic-agent-creation.19590+9c079d1b9",
120
- "@bike4mind/utils": "2.7.1-feat-dynamic-agent-creation.19590+9c079d1b9",
117
+ "@bike4mind/common": "2.52.1-feat-python-playground.19625+2188a6ca0",
118
+ "@bike4mind/mcp": "1.31.1-feat-python-playground.19625+2188a6ca0",
119
+ "@bike4mind/services": "2.50.1-feat-python-playground.19625+2188a6ca0",
120
+ "@bike4mind/utils": "2.7.1-feat-python-playground.19625+2188a6ca0",
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: "9c079d1b9d432c7f79b1f2d40fe1be2dbd4c3dab"
141
+ gitHead: "2188a6ca0657db95ea8770071ddb90cc84b8b601"
142
142
  };
143
143
 
144
144
  // src/utils/updateChecker.ts
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BadRequestError,
4
4
  secureParameters
5
- } from "./chunk-PV6PZFPC.js";
5
+ } from "./chunk-2PXPXXDN.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-PLA2VBQW.js";
15
+ } from "./chunk-EEGKRFVP.js";
16
16
 
17
17
  // ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
18
18
  import { z } from "zod";
@@ -3,7 +3,7 @@ import {
3
3
  fetchLatestVersion,
4
4
  forceCheckForUpdate,
5
5
  package_default
6
- } from "../chunk-HNT6CPNA.js";
6
+ } from "../chunk-S3S2FV2N.js";
7
7
 
8
8
  // src/commands/doctorCommand.ts
9
9
  import { execSync } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigStore
4
- } from "../chunk-ZS65NK25.js";
4
+ } from "../chunk-32PKF3N7.js";
5
5
 
6
6
  // src/commands/mcpCommand.ts
7
7
  async function handleMcpCommand(subcommand, argv) {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  forceCheckForUpdate,
4
4
  package_default
5
- } from "../chunk-HNT6CPNA.js";
5
+ } from "../chunk-S3S2FV2N.js";
6
6
 
7
7
  // src/commands/updateCommand.ts
8
8
  import { execSync } from "child_process";
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  createFabFile,
4
4
  createFabFileSchema
5
- } from "./chunk-S6AUIWWB.js";
6
- import "./chunk-PV6PZFPC.js";
7
- import "./chunk-PLA2VBQW.js";
5
+ } from "./chunk-RTD3GUAP.js";
6
+ import "./chunk-2PXPXXDN.js";
7
+ import "./chunk-EEGKRFVP.js";
8
8
  import "./chunk-PFBYGCOW.js";
9
9
  export {
10
10
  createFabFile,