@bike4mind/cli 0.2.5-citables-display-web-search.17093 → 0.2.5-feat-cli-dynamic-model-fetching.17090

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-MVGLS65O.js";
4
+ } from "./chunk-WR6YZRQV.js";
5
5
  import "./chunk-PDX44BCA.js";
6
6
 
7
7
  // ../../b4m-core/packages/services/dist/src/notebookCurationService/artifactExtractor.js
@@ -7,11 +7,11 @@ import {
7
7
  getSettingsMap,
8
8
  getSettingsValue,
9
9
  secureParameters
10
- } from "./chunk-MV6KQD6A.js";
10
+ } from "./chunk-LYNNVNEC.js";
11
11
  import {
12
12
  KnowledgeType,
13
13
  SupportedFabFileMimeTypes
14
- } from "./chunk-MVGLS65O.js";
14
+ } from "./chunk-WR6YZRQV.js";
15
15
 
16
16
  // ../../b4m-core/packages/services/dist/src/fabFileService/create.js
17
17
  import { z } from "zod";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BadRequestError,
4
4
  secureParameters
5
- } from "./chunk-MV6KQD6A.js";
5
+ } from "./chunk-LYNNVNEC.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-MVGLS65O.js";
13
+ } from "./chunk-WR6YZRQV.js";
14
14
 
15
15
  // ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
16
16
  import { z } from "zod";
@@ -16,7 +16,7 @@ import {
16
16
  dayjsConfig_default,
17
17
  extractSnippetMeta,
18
18
  settingsMap
19
- } from "./chunk-MVGLS65O.js";
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";
@@ -6,12 +6,12 @@ import {
6
6
  getSettingsByNames,
7
7
  obfuscateApiKey,
8
8
  secureParameters
9
- } from "./chunk-MV6KQD6A.js";
9
+ } from "./chunk-LYNNVNEC.js";
10
10
  import {
11
11
  ApiKeyType,
12
12
  MementoTier,
13
13
  isSupportedEmbeddingModel
14
- } from "./chunk-MVGLS65O.js";
14
+ } from "./chunk-WR6YZRQV.js";
15
15
 
16
16
  // ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
17
17
  import { z } from "zod";
@@ -3745,35 +3745,6 @@ var ToolHealthSchema = z21.object({
3745
3745
  lastExecutionTime: z21.number().optional(),
3746
3746
  successRate: z21.number().optional()
3747
3747
  });
3748
- var CitableSourceSchema = z21.object({
3749
- /** Unique identifier - can be URL, UUID, or composite key */
3750
- id: z21.string(),
3751
- /** Source classification for UI rendering */
3752
- type: z21.enum(["web_url", "document", "dataset", "mcp"]),
3753
- /** Human-readable title/name */
3754
- title: z21.string(),
3755
- /** Navigation target (external URL, deep link, or hash route) */
3756
- url: z21.string().optional(),
3757
- /** Brief description or excerpt (1-2 sentences) */
3758
- description: z21.string().optional(),
3759
- /** ISO 8601 timestamp for freshness indication */
3760
- timestamp: z21.string().optional(),
3761
- /** Attribution for non-report sources */
3762
- author: z21.string().optional(),
3763
- /** Processing status for real-time updates */
3764
- status: z21.enum(["pending", "processing", "complete", "error"]).optional(),
3765
- /** Extensibility metadata */
3766
- metadata: z21.object({
3767
- sourceSystem: z21.string().optional(),
3768
- icon: z21.string().optional(),
3769
- tags: z21.array(z21.string()).optional(),
3770
- confidence: z21.number().optional(),
3771
- practiceAreas: z21.array(z21.string()).optional(),
3772
- chunkId: z21.string().optional(),
3773
- relevanceScore: z21.number().optional(),
3774
- fullContext: z21.string().optional()
3775
- }).passthrough().optional()
3776
- });
3777
3748
  var PromptMetaZodSchema = z21.object({
3778
3749
  model: PromptMetaModelSchema.optional(),
3779
3750
  tokenUsage: PromptMetaTokenUsageSchema.optional(),
@@ -3816,9 +3787,7 @@ var PromptMetaZodSchema = z21.object({
3816
3787
  failedSteps: z21.array(z21.string()).optional()
3817
3788
  }).optional(),
3818
3789
  // Phase 2: Tool health tracking
3819
- toolHealth: z21.array(ToolHealthSchema).optional(),
3820
- // Citable sources referenced in AI responses (from web_search, deep_research, RAG, MCP)
3821
- citables: z21.array(CitableSourceSchema).optional()
3790
+ toolHealth: z21.array(ToolHealthSchema).optional()
3822
3791
  });
3823
3792
 
3824
3793
  // ../../b4m-core/packages/common/dist/src/schemas/analytics/events/ai.js
@@ -6090,7 +6059,6 @@ export {
6090
6059
  API_SERVICE_GROUPS,
6091
6060
  settingsMap,
6092
6061
  StringBooleanSchema,
6093
- CitableSourceSchema,
6094
6062
  PromptMetaZodSchema,
6095
6063
  AiEvents,
6096
6064
  ApiKeyEvents,
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  createFabFile,
4
4
  createFabFileSchema
5
- } from "./chunk-KXHWFSYD.js";
6
- import "./chunk-MV6KQD6A.js";
5
+ } from "./chunk-6AJODFPC.js";
6
+ import "./chunk-LYNNVNEC.js";
7
7
  import "./chunk-AMDXHL6S.js";
8
- import "./chunk-MVGLS65O.js";
8
+ import "./chunk-WR6YZRQV.js";
9
9
  import "./chunk-PDX44BCA.js";
10
10
  export {
11
11
  createFabFile,
package/dist/index.js CHANGED
@@ -4,9 +4,9 @@ import {
4
4
  getEffectiveApiKey,
5
5
  getOpenWeatherKey,
6
6
  getSerperKey
7
- } from "./chunk-4PHLXSN3.js";
8
- import "./chunk-2R6BM6L6.js";
9
- import "./chunk-KXHWFSYD.js";
7
+ } from "./chunk-WNBKV4FX.js";
8
+ import "./chunk-LEG2UM5Q.js";
9
+ import "./chunk-6AJODFPC.js";
10
10
  import {
11
11
  BFLImageService,
12
12
  BaseStorage,
@@ -15,7 +15,7 @@ import {
15
15
  OpenAIBackend,
16
16
  OpenAIImageService,
17
17
  XAIImageService
18
- } from "./chunk-MV6KQD6A.js";
18
+ } from "./chunk-LYNNVNEC.js";
19
19
  import {
20
20
  Logger
21
21
  } from "./chunk-AMDXHL6S.js";
@@ -73,7 +73,7 @@ import {
73
73
  XAI_IMAGE_MODELS,
74
74
  b4mLLMTools,
75
75
  getMcpProviderMetadata
76
- } from "./chunk-MVGLS65O.js";
76
+ } from "./chunk-WR6YZRQV.js";
77
77
  import {
78
78
  __require
79
79
  } from "./chunk-PDX44BCA.js";
@@ -685,103 +685,128 @@ var EXPORT_FORMAT_OPTIONS = [
685
685
  { label: "markdown", value: "markdown" },
686
686
  { label: "json", value: "json" }
687
687
  ];
688
- var CONFIG_ITEMS = [
689
- {
690
- key: "maxIterations",
691
- label: "Max Iterations",
692
- type: "select",
693
- options: MAX_ITERATIONS_OPTIONS,
694
- getValue: (config) => config.preferences.maxIterations,
695
- setValue: (config, value) => ({
696
- ...config,
697
- preferences: {
698
- ...config.preferences,
699
- maxIterations: value
700
- }
701
- })
702
- },
703
- {
704
- key: "maxTokens",
705
- label: "Max Tokens",
706
- type: "number",
707
- min: 256,
708
- max: 128e3,
709
- step: 256,
710
- getValue: (config) => config.preferences.maxTokens,
711
- setValue: (config, value) => ({
712
- ...config,
713
- preferences: {
714
- ...config.preferences,
715
- maxTokens: value
716
- }
717
- })
718
- },
719
- {
720
- key: "temperature",
721
- label: "Temperature",
722
- type: "number",
723
- min: 0,
724
- max: 2,
725
- step: 0.1,
726
- getValue: (config) => config.preferences.temperature,
727
- setValue: (config, value) => ({
728
- ...config,
729
- preferences: {
730
- ...config.preferences,
731
- temperature: value
732
- }
733
- })
734
- },
735
- {
736
- key: "autoSave",
737
- label: "Auto Save",
738
- type: "boolean",
739
- getValue: (config) => config.preferences.autoSave,
740
- setValue: (config, value) => ({
741
- ...config,
742
- preferences: {
743
- ...config.preferences,
744
- autoSave: value
745
- }
746
- })
747
- },
748
- {
749
- key: "theme",
750
- label: "Theme",
751
- type: "select",
752
- options: THEME_OPTIONS,
753
- getValue: (config) => config.preferences.theme,
754
- setValue: (config, value) => ({
755
- ...config,
756
- preferences: {
757
- ...config.preferences,
758
- theme: value
759
- }
760
- })
761
- },
762
- {
763
- key: "exportFormat",
764
- label: "Export Format",
765
- type: "select",
766
- options: EXPORT_FORMAT_OPTIONS,
767
- getValue: (config) => config.preferences.exportFormat,
768
- setValue: (config, value) => ({
769
- ...config,
770
- preferences: {
771
- ...config.preferences,
772
- exportFormat: value
773
- }
774
- })
688
+ function buildConfigItems(availableModels) {
689
+ const modelOptions = availableModels.map((model) => ({
690
+ label: model.name,
691
+ value: model.id
692
+ }));
693
+ const items = [];
694
+ if (modelOptions.length > 0) {
695
+ items.push({
696
+ key: "model",
697
+ label: "Model",
698
+ type: "select",
699
+ options: modelOptions,
700
+ getValue: (config) => {
701
+ const modelExists = modelOptions.some((opt) => opt.value === config.defaultModel);
702
+ return modelExists ? config.defaultModel : modelOptions[0]?.value ?? config.defaultModel;
703
+ },
704
+ setValue: (config, value) => ({
705
+ ...config,
706
+ defaultModel: value
707
+ })
708
+ });
775
709
  }
776
- ];
777
- function ConfigEditor({ config, onSave, onClose }) {
710
+ items.push(
711
+ {
712
+ key: "maxIterations",
713
+ label: "Max Iterations",
714
+ type: "select",
715
+ options: MAX_ITERATIONS_OPTIONS,
716
+ getValue: (config) => config.preferences.maxIterations,
717
+ setValue: (config, value) => ({
718
+ ...config,
719
+ preferences: {
720
+ ...config.preferences,
721
+ maxIterations: value
722
+ }
723
+ })
724
+ },
725
+ {
726
+ key: "maxTokens",
727
+ label: "Max Tokens",
728
+ type: "number",
729
+ min: 256,
730
+ max: 128e3,
731
+ step: 256,
732
+ getValue: (config) => config.preferences.maxTokens,
733
+ setValue: (config, value) => ({
734
+ ...config,
735
+ preferences: {
736
+ ...config.preferences,
737
+ maxTokens: value
738
+ }
739
+ })
740
+ },
741
+ {
742
+ key: "temperature",
743
+ label: "Temperature",
744
+ type: "number",
745
+ min: 0,
746
+ max: 2,
747
+ step: 0.1,
748
+ getValue: (config) => config.preferences.temperature,
749
+ setValue: (config, value) => ({
750
+ ...config,
751
+ preferences: {
752
+ ...config.preferences,
753
+ temperature: value
754
+ }
755
+ })
756
+ },
757
+ {
758
+ key: "autoSave",
759
+ label: "Auto Save",
760
+ type: "boolean",
761
+ getValue: (config) => config.preferences.autoSave,
762
+ setValue: (config, value) => ({
763
+ ...config,
764
+ preferences: {
765
+ ...config.preferences,
766
+ autoSave: value
767
+ }
768
+ })
769
+ },
770
+ {
771
+ key: "theme",
772
+ label: "Theme",
773
+ type: "select",
774
+ options: THEME_OPTIONS,
775
+ getValue: (config) => config.preferences.theme,
776
+ setValue: (config, value) => ({
777
+ ...config,
778
+ preferences: {
779
+ ...config.preferences,
780
+ theme: value
781
+ }
782
+ })
783
+ },
784
+ {
785
+ key: "exportFormat",
786
+ label: "Export Format",
787
+ type: "select",
788
+ options: EXPORT_FORMAT_OPTIONS,
789
+ getValue: (config) => config.preferences.exportFormat,
790
+ setValue: (config, value) => ({
791
+ ...config,
792
+ preferences: {
793
+ ...config.preferences,
794
+ exportFormat: value
795
+ }
796
+ })
797
+ }
798
+ );
799
+ return items;
800
+ }
801
+ function ConfigEditor({ config, availableModels, onSave, onClose }) {
778
802
  const [selectedIndex, setSelectedIndex] = useState2(0);
779
803
  const [editedConfig, setEditedConfig] = useState2(config);
780
804
  const [saveError, setSaveError] = useState2(null);
781
805
  const [isSaving, setIsSaving] = useState2(false);
806
+ const configItems = useMemo2(() => buildConfigItems(availableModels), [availableModels]);
782
807
  const hasChanges = useMemo2(() => {
783
- return JSON.stringify(config.preferences) !== JSON.stringify(editedConfig.preferences);
784
- }, [config.preferences, editedConfig.preferences]);
808
+ return JSON.stringify(config.preferences) !== JSON.stringify(editedConfig.preferences) || config.defaultModel !== editedConfig.defaultModel;
809
+ }, [config.preferences, editedConfig.preferences, config.defaultModel, editedConfig.defaultModel]);
785
810
  const handleSaveAndClose = async () => {
786
811
  if (hasChanges) {
787
812
  try {
@@ -798,13 +823,13 @@ function ConfigEditor({ config, onSave, onClose }) {
798
823
  onClose();
799
824
  };
800
825
  useInput2((input, key) => {
801
- const currentItem = CONFIG_ITEMS[selectedIndex];
826
+ const currentItem = configItems[selectedIndex];
802
827
  if (key.upArrow) {
803
- setSelectedIndex((prev) => prev > 0 ? prev - 1 : CONFIG_ITEMS.length - 1);
828
+ setSelectedIndex((prev) => prev > 0 ? prev - 1 : configItems.length - 1);
804
829
  return;
805
830
  }
806
831
  if (key.downArrow) {
807
- setSelectedIndex((prev) => prev < CONFIG_ITEMS.length - 1 ? prev + 1 : 0);
832
+ setSelectedIndex((prev) => prev < configItems.length - 1 ? prev + 1 : 0);
808
833
  return;
809
834
  }
810
835
  if ((key.escape || input === "q") && !isSaving) {
@@ -862,7 +887,7 @@ function ConfigEditor({ config, onSave, onClose }) {
862
887
  }
863
888
  return String(value);
864
889
  };
865
- return /* @__PURE__ */ React8.createElement(Box8, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 2, paddingY: 1, marginY: 1 }, /* @__PURE__ */ React8.createElement(Box8, { justifyContent: "space-between", marginBottom: 1 }, /* @__PURE__ */ React8.createElement(Text7, { bold: true, color: "cyan" }, "Settings"), isSaving ? /* @__PURE__ */ React8.createElement(Text7, { color: "yellow" }, "Saving...") : hasChanges ? /* @__PURE__ */ React8.createElement(Text7, { dimColor: true, color: "yellow" }, "(unsaved changes)") : null), saveError && /* @__PURE__ */ React8.createElement(Box8, { marginBottom: 1 }, /* @__PURE__ */ React8.createElement(Text7, { color: "red" }, "Error: ", saveError)), /* @__PURE__ */ React8.createElement(Box8, { flexDirection: "column", marginBottom: 1 }, CONFIG_ITEMS.map((item, index) => {
890
+ return /* @__PURE__ */ React8.createElement(Box8, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 2, paddingY: 1, marginY: 1 }, /* @__PURE__ */ React8.createElement(Box8, { justifyContent: "space-between", marginBottom: 1 }, /* @__PURE__ */ React8.createElement(Text7, { bold: true, color: "cyan" }, "Settings"), isSaving ? /* @__PURE__ */ React8.createElement(Text7, { color: "yellow" }, "Saving...") : hasChanges ? /* @__PURE__ */ React8.createElement(Text7, { dimColor: true, color: "yellow" }, "(unsaved changes)") : null), saveError && /* @__PURE__ */ React8.createElement(Box8, { marginBottom: 1 }, /* @__PURE__ */ React8.createElement(Text7, { color: "red" }, "Error: ", saveError)), /* @__PURE__ */ React8.createElement(Box8, { flexDirection: "column", marginBottom: 1 }, configItems.map((item, index) => {
866
891
  const isSelected = index === selectedIndex;
867
892
  const value = item.getValue(editedConfig);
868
893
  const displayValue = formatValue(item, value);
@@ -992,6 +1017,7 @@ function App({
992
1017
  onPermissionResponse,
993
1018
  commandHistory = [],
994
1019
  config,
1020
+ availableModels = [],
995
1021
  onSaveConfig
996
1022
  }) {
997
1023
  const messages = useCliStore((state) => state.session?.messages || []);
@@ -1033,7 +1059,15 @@ ${errorBlock}`;
1033
1059
  },
1034
1060
  [onMessage, onCommand, setIsThinking]
1035
1061
  );
1036
- return /* @__PURE__ */ React9.createElement(Box9, { flexDirection: "column" }, /* @__PURE__ */ React9.createElement(StatusBar, { sessionName, model: currentModel, tokenUsage: totalTokens }), showConfigEditor && config && onSaveConfig ? /* @__PURE__ */ React9.createElement(Box9, { flexDirection: "column", paddingX: 1 }, /* @__PURE__ */ React9.createElement(ConfigEditor, { config, onSave: onSaveConfig, onClose: () => setShowConfigEditor(false) })) : permissionPrompt ? /* @__PURE__ */ React9.createElement(Box9, { flexDirection: "column", paddingX: 1 }, /* @__PURE__ */ React9.createElement(
1062
+ return /* @__PURE__ */ React9.createElement(Box9, { flexDirection: "column" }, /* @__PURE__ */ React9.createElement(StatusBar, { sessionName, model: currentModel, tokenUsage: totalTokens }), showConfigEditor && config && onSaveConfig ? /* @__PURE__ */ React9.createElement(Box9, { flexDirection: "column", paddingX: 1 }, /* @__PURE__ */ React9.createElement(
1063
+ ConfigEditor,
1064
+ {
1065
+ config,
1066
+ availableModels,
1067
+ onSave: onSaveConfig,
1068
+ onClose: () => setShowConfigEditor(false)
1069
+ }
1070
+ )) : permissionPrompt ? /* @__PURE__ */ React9.createElement(Box9, { flexDirection: "column", paddingX: 1 }, /* @__PURE__ */ React9.createElement(
1037
1071
  PermissionPrompt,
1038
1072
  {
1039
1073
  toolName: permissionPrompt.toolName,
@@ -4471,30 +4505,13 @@ async function performWebSearch(adapters, params) {
4471
4505
  link: result.link,
4472
4506
  snippet: result.snippet
4473
4507
  })) || [];
4474
- const citables = results.map((result, index) => ({
4475
- id: result.link,
4476
- // Use URL as unique identifier
4477
- type: "web_url",
4478
- title: result.title,
4479
- url: result.link,
4480
- description: result.snippet,
4481
- timestamp: (/* @__PURE__ */ new Date()).toISOString(),
4482
- status: "complete",
4483
- metadata: {
4484
- sourceSystem: "web_search",
4485
- relevanceScore: 1 - index * 0.1,
4486
- // Higher relevance for earlier results
4487
- fullContext: result.snippet
4488
- }
4489
- }));
4490
4508
  const formattedResults = results.map((result, index) => `${index + 1}. **${result.title}**
4491
4509
  ${result.snippet}
4492
4510
  Source: [${new URL(result.link).hostname}](${result.link})
4493
4511
  `).join("\n");
4494
- const formattedOutput = formattedResults ? `Here's what I found from searching the web:
4512
+ return formattedResults ? `Here's what I found from searching the web:
4495
4513
 
4496
4514
  ${formattedResults}` : "No results found from web search.";
4497
- return { formattedResults: formattedOutput, citables };
4498
4515
  } catch (error) {
4499
4516
  console.error("\u274C WebSearch Tool: Error during search:", error);
4500
4517
  throw error;
@@ -4505,18 +4522,7 @@ var webSearchTool = {
4505
4522
  implementation: (context) => ({
4506
4523
  toolFn: async (value) => {
4507
4524
  const params = value;
4508
- const { formattedResults, citables } = await performWebSearch({ db: context.db }, params);
4509
- if (citables.length > 0) {
4510
- await context.statusUpdate({
4511
- // Store citables in promptMeta - statusUpdate will Object.assign this
4512
- // The receiving code needs to handle merging promptMeta.citables
4513
- promptMeta: {
4514
- citables
4515
- }
4516
- }, "Web search complete");
4517
- console.log(`\u{1F4DA} WebSearch Tool: Stored ${citables.length} citables`);
4518
- }
4519
- return formattedResults;
4525
+ return performWebSearch({ db: context.db }, params);
4520
4526
  },
4521
4527
  toolSchema: {
4522
4528
  name: "web_search",
@@ -9243,9 +9249,40 @@ var ServerLlmBackend = class {
9243
9249
  }
9244
9250
  /**
9245
9251
  * Get available models from server
9246
- * For now, returns hardcoded list of supported models
9252
+ * Fetches from /api/models and filters for CLI-compatible models
9253
+ * Falls back to hardcoded list if API fails
9247
9254
  */
9248
9255
  async getModelInfo() {
9256
+ try {
9257
+ logger.debug("[ServerLlmBackend] Fetching models from /api/models");
9258
+ const response = await this.apiClient.get("/api/models");
9259
+ if (!response || typeof response !== "object" || !Array.isArray(response.models)) {
9260
+ logger.warn("[ServerLlmBackend] Invalid API response format, using fallback models");
9261
+ logger.info("\u26A0\uFE0F Using fallback model list (API returned invalid format)");
9262
+ return this.getFallbackModels();
9263
+ }
9264
+ const filteredModels = response.models.filter((model) => model.type === "text" && model.supportsTools === true);
9265
+ logger.debug(`[ServerLlmBackend] Fetched ${filteredModels.length} CLI-compatible models`);
9266
+ if (filteredModels.length === 0) {
9267
+ logger.warn("[ServerLlmBackend] No CLI-compatible models found from API, using fallback");
9268
+ logger.info("\u26A0\uFE0F Using fallback model list (no CLI-compatible models available)");
9269
+ return this.getFallbackModels();
9270
+ }
9271
+ logger.info(`\u{1F4CB} Loaded ${filteredModels.length} models from server`);
9272
+ return filteredModels;
9273
+ } catch (error) {
9274
+ logger.warn(
9275
+ `[ServerLlmBackend] Failed to fetch models from API, using fallback: ${error instanceof Error ? error.message : String(error)}`
9276
+ );
9277
+ logger.info("\u26A0\uFE0F Using fallback model list (API unavailable)");
9278
+ return this.getFallbackModels();
9279
+ }
9280
+ }
9281
+ /**
9282
+ * Fallback models when API is unavailable
9283
+ * Returns hardcoded list of commonly supported models
9284
+ */
9285
+ getFallbackModels() {
9249
9286
  return [
9250
9287
  {
9251
9288
  id: "claude-sonnet-4-5-20250929",
@@ -9430,7 +9467,7 @@ import { isAxiosError as isAxiosError2 } from "axios";
9430
9467
  // package.json
9431
9468
  var package_default = {
9432
9469
  name: "@bike4mind/cli",
9433
- version: "0.2.5-citables-display-web-search.17093+01315691b",
9470
+ version: "0.2.5-feat-cli-dynamic-model-fetching.17090+9a474f275",
9434
9471
  type: "module",
9435
9472
  description: "Interactive CLI tool for Bike4Mind with ReAct agents",
9436
9473
  license: "UNLICENSED",
@@ -9532,10 +9569,10 @@ var package_default = {
9532
9569
  },
9533
9570
  devDependencies: {
9534
9571
  "@bike4mind/agents": "0.1.0",
9535
- "@bike4mind/common": "2.37.1-citables-display-web-search.17093+01315691b",
9536
- "@bike4mind/mcp": "1.19.6-citables-display-web-search.17093+01315691b",
9537
- "@bike4mind/services": "2.32.2-citables-display-web-search.17093+01315691b",
9538
- "@bike4mind/utils": "2.1.1-citables-display-web-search.17093+01315691b",
9572
+ "@bike4mind/common": "2.37.1-feat-cli-dynamic-model-fetching.17090+9a474f275",
9573
+ "@bike4mind/mcp": "1.19.6-feat-cli-dynamic-model-fetching.17090+9a474f275",
9574
+ "@bike4mind/services": "2.32.2-feat-cli-dynamic-model-fetching.17090+9a474f275",
9575
+ "@bike4mind/utils": "2.1.1-feat-cli-dynamic-model-fetching.17090+9a474f275",
9539
9576
  "@types/diff": "^5.0.9",
9540
9577
  "@types/jsonwebtoken": "^9.0.4",
9541
9578
  "@types/node": "^22.9.0",
@@ -9547,7 +9584,7 @@ var package_default = {
9547
9584
  typescript: "^5.9.3",
9548
9585
  vitest: "^3.2.4"
9549
9586
  },
9550
- gitHead: "01315691bda21256368539f634c17c96cafe413b"
9587
+ gitHead: "9a474f27597e2e7625a73e2dc0436ae1e4f5d84e"
9551
9588
  };
9552
9589
 
9553
9590
  // src/config/constants.ts
@@ -9830,8 +9867,10 @@ Remember: Use context from previous messages to understand follow-up questions.`
9830
9867
  agent,
9831
9868
  mcpManager,
9832
9869
  permissionManager,
9833
- config
9870
+ config,
9834
9871
  // Store config for synchronous access
9872
+ availableModels: models
9873
+ // Store models for ConfigEditor
9835
9874
  }));
9836
9875
  setStoreSession(newSession);
9837
9876
  setIsInitialized(true);
@@ -10267,6 +10306,7 @@ No usage data available for the last ${USAGE_DAYS} days.`);
10267
10306
  onCommand: handleCommand,
10268
10307
  commandHistory,
10269
10308
  config: state.config,
10309
+ availableModels: state.availableModels,
10270
10310
  onSaveConfig: handleSaveConfig,
10271
10311
  onPermissionResponse: (response) => {
10272
10312
  if (state.permissionPrompt) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CurationArtifactType
4
- } from "./chunk-MVGLS65O.js";
4
+ } from "./chunk-WR6YZRQV.js";
5
5
  import "./chunk-PDX44BCA.js";
6
6
 
7
7
  // ../../b4m-core/packages/services/dist/src/notebookCurationService/llmMarkdownGenerator.js
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CurationArtifactType
4
- } from "./chunk-MVGLS65O.js";
4
+ } from "./chunk-WR6YZRQV.js";
5
5
  import "./chunk-PDX44BCA.js";
6
6
 
7
7
  // ../../b4m-core/packages/services/dist/src/notebookCurationService/markdownGenerator.js
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  findMostSimilarMemento,
4
4
  getRelevantMementos
5
- } from "./chunk-4PHLXSN3.js";
6
- import "./chunk-MV6KQD6A.js";
5
+ } from "./chunk-WNBKV4FX.js";
6
+ import "./chunk-LYNNVNEC.js";
7
7
  import "./chunk-AMDXHL6S.js";
8
- import "./chunk-MVGLS65O.js";
8
+ import "./chunk-WR6YZRQV.js";
9
9
  import "./chunk-PDX44BCA.js";
10
10
  export {
11
11
  findMostSimilarMemento,
@@ -120,7 +120,7 @@ import {
120
120
  validateMermaidSyntax,
121
121
  warmUpSettingsCache,
122
122
  withRetry
123
- } from "./chunk-MV6KQD6A.js";
123
+ } from "./chunk-LYNNVNEC.js";
124
124
  import {
125
125
  Logger,
126
126
  NotificationDeduplicator,
@@ -129,7 +129,7 @@ import {
129
129
  postLowCreditsNotificationToSlack,
130
130
  postMessageToSlack
131
131
  } from "./chunk-AMDXHL6S.js";
132
- import "./chunk-MVGLS65O.js";
132
+ import "./chunk-WR6YZRQV.js";
133
133
  import "./chunk-PDX44BCA.js";
134
134
  export {
135
135
  AWSBackend,
@@ -37,7 +37,6 @@ import {
37
37
  ChatCompletionInvokeParamsSchema,
38
38
  ChatHistoryItemWithArtifactsSchema,
39
39
  ChatModels,
40
- CitableSourceSchema,
41
40
  ClaudeArtifactMimeTypes,
42
41
  CollectionType,
43
42
  CompletionRequestSchema,
@@ -292,7 +291,7 @@ import {
292
291
  validateQuestMasterArtifactV2,
293
292
  validateReactArtifactV2,
294
293
  validateSvgArtifactV2
295
- } from "./chunk-MVGLS65O.js";
294
+ } from "./chunk-WR6YZRQV.js";
296
295
  import "./chunk-PDX44BCA.js";
297
296
  export {
298
297
  ALL_IMAGE_MODELS,
@@ -332,7 +331,6 @@ export {
332
331
  ChatCompletionInvokeParamsSchema,
333
332
  ChatHistoryItemWithArtifactsSchema,
334
333
  ChatModels,
335
- CitableSourceSchema,
336
334
  ClaudeArtifactMimeTypes,
337
335
  CollectionType,
338
336
  CompletionRequestSchema,
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  SubtractCreditsSchema,
4
4
  subtractCredits
5
- } from "./chunk-2R6BM6L6.js";
6
- import "./chunk-MV6KQD6A.js";
5
+ } from "./chunk-LEG2UM5Q.js";
6
+ import "./chunk-LYNNVNEC.js";
7
7
  import "./chunk-AMDXHL6S.js";
8
- import "./chunk-MVGLS65O.js";
8
+ import "./chunk-WR6YZRQV.js";
9
9
  import "./chunk-PDX44BCA.js";
10
10
  export {
11
11
  SubtractCreditsSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bike4mind/cli",
3
- "version": "0.2.5-citables-display-web-search.17093+01315691b",
3
+ "version": "0.2.5-feat-cli-dynamic-model-fetching.17090+9a474f275",
4
4
  "type": "module",
5
5
  "description": "Interactive CLI tool for Bike4Mind with ReAct agents",
6
6
  "license": "UNLICENSED",
@@ -102,10 +102,10 @@
102
102
  },
103
103
  "devDependencies": {
104
104
  "@bike4mind/agents": "0.1.0",
105
- "@bike4mind/common": "2.37.1-citables-display-web-search.17093+01315691b",
106
- "@bike4mind/mcp": "1.19.6-citables-display-web-search.17093+01315691b",
107
- "@bike4mind/services": "2.32.2-citables-display-web-search.17093+01315691b",
108
- "@bike4mind/utils": "2.1.1-citables-display-web-search.17093+01315691b",
105
+ "@bike4mind/common": "2.37.1-feat-cli-dynamic-model-fetching.17090+9a474f275",
106
+ "@bike4mind/mcp": "1.19.6-feat-cli-dynamic-model-fetching.17090+9a474f275",
107
+ "@bike4mind/services": "2.32.2-feat-cli-dynamic-model-fetching.17090+9a474f275",
108
+ "@bike4mind/utils": "2.1.1-feat-cli-dynamic-model-fetching.17090+9a474f275",
109
109
  "@types/diff": "^5.0.9",
110
110
  "@types/jsonwebtoken": "^9.0.4",
111
111
  "@types/node": "^22.9.0",
@@ -117,5 +117,5 @@
117
117
  "typescript": "^5.9.3",
118
118
  "vitest": "^3.2.4"
119
119
  },
120
- "gitHead": "01315691bda21256368539f634c17c96cafe413b"
120
+ "gitHead": "9a474f27597e2e7625a73e2dc0436ae1e4f5d84e"
121
121
  }