@bike4mind/cli 0.2.30-subagent-delegation.19187 → 0.2.30

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.
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  HydrationEngine,
4
4
  createHydrationEngine
5
- } from "./chunk-GQGOWACU.js";
5
+ } from "./chunk-RUI6HNLO.js";
6
6
  export {
7
7
  HydrationEngine,
8
8
  createHydrationEngine
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CurationArtifactType
4
- } from "./chunk-HHCCCOKK.js";
4
+ } from "./chunk-T4VPCTBM.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;
@@ -7,6 +7,7 @@ import {
7
7
  ModelBackend,
8
8
  OpenAIEmbeddingModel,
9
9
  PermissionDeniedError,
10
+ REASONING_SUPPORTED_MODELS,
10
11
  SpeechToTextModels,
11
12
  SupportedFabFileMimeTypes,
12
13
  VIDEO_SIZE_CONSTRAINTS,
@@ -15,7 +16,7 @@ import {
15
16
  dayjsConfig_default,
16
17
  extractSnippetMeta,
17
18
  settingsMap
18
- } from "./chunk-HHCCCOKK.js";
19
+ } from "./chunk-T4VPCTBM.js";
19
20
  import {
20
21
  Logger
21
22
  } from "./chunk-OCYRD7D6.js";
@@ -2492,7 +2493,13 @@ var AnthropicBackend = class {
2492
2493
  const rawTools = options.tools;
2493
2494
  const normalizedTools = Array.isArray(rawTools) ? rawTools : rawTools ? [rawTools] : void 0;
2494
2495
  options.tools = normalizedTools;
2495
- const system = this.consolidateSystemMessages(messages);
2496
+ let system = this.consolidateSystemMessages(messages);
2497
+ if (system) {
2498
+ system += `
2499
+ IMPORTANT! Only when someone asks, remember that you are specifically the ${model} model.`;
2500
+ } else {
2501
+ system = `IMPORTANT! Only when someone asks, remember that you are specifically the ${model} model.`;
2502
+ }
2496
2503
  let filteredMessages = ensureToolPairingIntegrity(this.filterRelevantMessages(messages), this.logger);
2497
2504
  const countToolBlocks = (msgs) => {
2498
2505
  let useCount = 0;
@@ -3851,7 +3858,10 @@ var AnthropicBedrockBackend = class extends BaseBedrockBackend {
3851
3858
  }
3852
3859
  return { ...m, content: "" };
3853
3860
  }).filter((m) => m.content !== "" && (Array.isArray(m.content) ? m.content.length > 0 : true));
3854
- const systemMessage = messages.filter((m) => m.role === "system" && m.content).map((m) => typeof m.content === "string" ? m.content : JSON.stringify(m.content)).join("\n");
3861
+ let systemMessage = messages.filter((m) => m.role === "system" && m.content).map((m) => typeof m.content === "string" ? m.content : JSON.stringify(m.content)).join("\n");
3862
+ const modelIdentity = `IMPORTANT! Only when someone asks, remember that you are specifically the ${model} model.`;
3863
+ systemMessage = systemMessage ? `${systemMessage}
3864
+ ${modelIdentity}` : modelIdentity;
3855
3865
  console.log(`[AnthropicBedrockBackend] Preparing payload for model: ${model}`);
3856
3866
  const hasVendorPrefix = model.includes(":") || model.startsWith("global.") || model.startsWith("us.");
3857
3867
  const modelId = hasVendorPrefix ? model : `anthropic.${model}`;
@@ -5912,12 +5922,12 @@ var GPT5_MODELS = [
5912
5922
  var GPT5_1_MODELS = [ChatModels.GPT5_1, ChatModels.GPT5_1_CHAT_LATEST];
5913
5923
  var GPT5_2_MODELS = [ChatModels.GPT5_2, ChatModels.GPT5_2_CHAT_LATEST];
5914
5924
  var effortMap = {
5915
- simple: "minimal",
5925
+ simple: "low",
5916
5926
  contextual: "low",
5917
5927
  complex: "medium"
5918
5928
  };
5919
5929
  var effortMap_GPT5_1_2 = {
5920
- simple: "none",
5930
+ simple: "low",
5921
5931
  contextual: "low",
5922
5932
  complex: "medium"
5923
5933
  };
@@ -6567,20 +6577,20 @@ var OpenAIBackend = class {
6567
6577
  stream: true,
6568
6578
  ...options.maxTokens && { max_completion_tokens: options.maxTokens }
6569
6579
  });
6570
- let reasoningEffort;
6571
- if (options.reasoningEffort) {
6572
- reasoningEffort = options.reasoningEffort;
6573
- this.logger.debug(`Using explicit reasoning effort: ${reasoningEffort}`);
6574
- } else if (options.complexity && effortMap[options.complexity]) {
6575
- reasoningEffort = isGPT5_1Model || isGPT5_2Model ? effortMap_GPT5_1_2[options.complexity] : effortMap[options.complexity];
6576
- this.logger.debug(`Auto-classified reasoning effort from complexity '${options.complexity}': ${reasoningEffort}`);
6577
- }
6578
- if (reasoningEffort) {
6579
- Object.assign(parameters, {
6580
- reasoning: {
6581
- effort: reasoningEffort
6582
- }
6583
- });
6580
+ if (REASONING_SUPPORTED_MODELS.has(model)) {
6581
+ let reasoningEffort;
6582
+ if (options.reasoningEffort) {
6583
+ reasoningEffort = options.reasoningEffort;
6584
+ this.logger.debug(`Using explicit reasoning effort: ${reasoningEffort}`);
6585
+ } else if (options.complexity && effortMap[options.complexity]) {
6586
+ reasoningEffort = isGPT5_1Model || isGPT5_2Model ? effortMap_GPT5_1_2[options.complexity] : effortMap[options.complexity];
6587
+ this.logger.debug(`Auto-classified reasoning effort from complexity '${options.complexity}': ${reasoningEffort}`);
6588
+ }
6589
+ if (reasoningEffort) {
6590
+ Object.assign(parameters, {
6591
+ reasoning_effort: reasoningEffort
6592
+ });
6593
+ }
6584
6594
  }
6585
6595
  } else {
6586
6596
  const useStreaming = options.stream && (!options.n || options.n === 1);
@@ -49,7 +49,16 @@ var useCliStore = create((set) => ({
49
49
  // Input state (for Ctrl+C clearing)
50
50
  inputValue: "",
51
51
  setInputValue: (value) => set({ inputValue: value }),
52
- clearInput: () => set({ inputValue: "" }),
52
+ clearInput: () => set({ inputValue: "", pastedContent: null, pastedLineCount: 0 }),
53
+ // Paste state
54
+ pastedContent: null,
55
+ pastedLineCount: 0,
56
+ setPastedContent: (content, lineCount) => set({
57
+ pastedContent: content,
58
+ pastedLineCount: lineCount,
59
+ inputValue: content
60
+ }),
61
+ clearPaste: () => set({ pastedContent: null, pastedLineCount: 0, inputValue: "" }),
53
62
  // Permission prompt queue
54
63
  permissionPrompt: null,
55
64
  permissionQueue: [],
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BadRequestError,
4
4
  secureParameters
5
- } from "./chunk-LCUAB2XL.js";
5
+ } from "./chunk-BQAPZP5Y.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-HHCCCOKK.js";
15
+ } from "./chunk-T4VPCTBM.js";
16
16
 
17
17
  // ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
18
18
  import { z } from "zod";
@@ -595,13 +595,12 @@ var HydrationEngine = class {
595
595
  return numericInputs[0] / numericInputs[1];
596
596
  case "ABS":
597
597
  return numericInputs.length > 0 ? Math.abs(numericInputs[0]) : 0;
598
- case "ROUND": {
598
+ case "ROUND":
599
599
  if (numericInputs.length === 0)
600
600
  return 0;
601
601
  const decimals = numericInputs[1] ?? 0;
602
602
  const factor = Math.pow(10, decimals);
603
603
  return Math.round(numericInputs[0] * factor) / factor;
604
- }
605
604
  case "FLOOR":
606
605
  return numericInputs.length > 0 ? Math.floor(numericInputs[0]) : 0;
607
606
  case "CEIL":
@@ -625,13 +624,12 @@ var HydrationEngine = class {
625
624
  return numericInputs.length > 0 ? Math.max(...numericInputs) : 0;
626
625
  case "COUNT":
627
626
  return inputs.filter((v) => v !== null).length;
628
- case "MEDIAN": {
627
+ case "MEDIAN":
629
628
  if (numericInputs.length === 0)
630
629
  return 0;
631
630
  const sorted = [...numericInputs].sort((a, b) => a - b);
632
631
  const mid = Math.floor(sorted.length / 2);
633
632
  return sorted.length % 2 === 0 ? (sorted[mid - 1] + sorted[mid]) / 2 : sorted[mid];
634
- }
635
633
  // Logical
636
634
  case "IF":
637
635
  return inputs[0] ? inputs[1] : inputs[2];
@@ -651,14 +649,13 @@ var HydrationEngine = class {
651
649
  return inputs.length >= 2 && inputs[0] >= inputs[1];
652
650
  case "LESS_THAN_OR_EQUAL":
653
651
  return inputs.length >= 2 && inputs[0] <= inputs[1];
654
- case "BETWEEN": {
652
+ case "BETWEEN":
655
653
  if (inputs.length < 3)
656
654
  return false;
657
655
  const val = inputs[0];
658
656
  const min = inputs[1];
659
657
  const max = inputs[2];
660
658
  return val >= min && val <= max;
661
- }
662
659
  // Financial
663
660
  case "PERCENT_OF":
664
661
  if (numericInputs.length < 2 || numericInputs[1] === 0)
@@ -717,12 +714,11 @@ var HydrationEngine = class {
717
714
  case "REFERENCE":
718
715
  return inputs[0];
719
716
  // Pass through
720
- case "LOOKUP": {
717
+ case "LOOKUP":
721
718
  if (inputs.length < 2)
722
719
  return null;
723
720
  const index = inputs[0];
724
721
  return inputs[Math.min(index + 1, inputs.length - 1)];
725
- }
726
722
  default:
727
723
  context.errors.push({
728
724
  type: "INVALID_OPERATION",