@bike4mind/cli 0.2.31-b4m-cli-undo-command.19493 → 0.2.31-b4m-cli-undo-command.19535

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/index.js CHANGED
@@ -1,22 +1,26 @@
1
1
  #!/usr/bin/env node
2
+ import "./chunk-GQGOWACU.js";
3
+ import "./chunk-F4PXVLZX.js";
4
+ import "./chunk-ERV5G6MX.js";
2
5
  import "./chunk-BPFEGDC7.js";
3
6
  import "./chunk-BDQBOLYG.js";
4
7
  import {
5
8
  getEffectiveApiKey,
6
9
  getOpenWeatherKey,
7
10
  getSerperKey
8
- } from "./chunk-T67NGQW6.js";
9
- import "./chunk-GQGOWACU.js";
11
+ } from "./chunk-JWJF6O4L.js";
10
12
  import {
11
13
  ConfigStore,
12
14
  logger
13
- } from "./chunk-LBTTUQJM.js";
15
+ } from "./chunk-32PKF3N7.js";
16
+ import {
17
+ checkForUpdate,
18
+ package_default
19
+ } from "./chunk-M2QCFHVX.js";
14
20
  import {
15
21
  selectActiveBackgroundAgents,
16
22
  useCliStore
17
23
  } from "./chunk-BYXFQJYT.js";
18
- import "./chunk-2LLA4MTN.js";
19
- import "./chunk-ZOWCX4MQ.js";
20
24
  import {
21
25
  BFLImageService,
22
26
  BaseStorage,
@@ -28,7 +32,7 @@ import {
28
32
  OpenAIBackend,
29
33
  OpenAIImageService,
30
34
  XAIImageService
31
- } from "./chunk-RI45VJW3.js";
35
+ } from "./chunk-3SPW5FYJ.js";
32
36
  import {
33
37
  AiEvents,
34
38
  ApiKeyEvents,
@@ -86,10 +90,10 @@ import {
86
90
  getMcpProviderMetadata,
87
91
  getViewById,
88
92
  resolveNavigationIntents
89
- } from "./chunk-GE7Q64MS.js";
93
+ } from "./chunk-NI22LIK3.js";
90
94
  import {
91
95
  Logger
92
- } from "./chunk-OCYRD7D6.js";
96
+ } from "./chunk-PFBYGCOW.js";
93
97
 
94
98
  // src/index.tsx
95
99
  import React21, { useState as useState10, useEffect as useEffect7, useCallback as useCallback2, useRef as useRef3 } from "react";
@@ -2908,13 +2912,16 @@ var CheckpointStore = class {
2908
2912
  try {
2909
2913
  let hasChanges = false;
2910
2914
  for (const filePath of filePaths) {
2911
- const absolutePath = path6.resolve(this.projectDir, filePath);
2915
+ const absolutePath = this.validatePathWithinProject(filePath);
2912
2916
  const shadowPath = path6.join(this.shadowRepoDir, filePath);
2913
2917
  const shadowDir = path6.dirname(shadowPath);
2914
2918
  const absentMarkerPath = path6.join(shadowDir, `${path6.basename(filePath)}${ABSENT_MARKER}`);
2915
2919
  await fs5.mkdir(shadowDir, { recursive: true });
2916
2920
  if (existsSync4(absolutePath)) {
2917
- const stats = await fs5.stat(absolutePath);
2921
+ const stats = await fs5.lstat(absolutePath);
2922
+ if (stats.isSymbolicLink()) {
2923
+ continue;
2924
+ }
2918
2925
  if (stats.size > MAX_FILE_SIZE2) {
2919
2926
  continue;
2920
2927
  }
@@ -2991,7 +2998,7 @@ var CheckpointStore = class {
2991
2998
  throw new Error(`Checkpoint #${index} not found. Use /checkpoints to see available restore points.`);
2992
2999
  }
2993
3000
  for (const filePath of checkpoint.filePaths) {
2994
- const absolutePath = path6.resolve(this.projectDir, filePath);
3001
+ const absolutePath = this.validatePathWithinProject(filePath);
2995
3002
  try {
2996
3003
  const content = this.git("show", `${checkpoint.id}:${filePath}`);
2997
3004
  await fs5.mkdir(path6.dirname(absolutePath), { recursive: true });
@@ -3027,7 +3034,9 @@ var CheckpointStore = class {
3027
3034
  }
3028
3035
  const diffParts = [];
3029
3036
  for (const filePath of checkpoint.filePaths) {
3030
- const absolutePath = path6.resolve(this.projectDir, filePath);
3037
+ const absolutePath = this.validatePathWithinProject(filePath);
3038
+ const tmpCheckpoint = path6.join(this.shadowRepoDir, ".diff-a");
3039
+ const tmpCurrent = path6.join(this.shadowRepoDir, ".diff-b");
3031
3040
  try {
3032
3041
  let checkpointContent;
3033
3042
  try {
@@ -3042,8 +3051,6 @@ var CheckpointStore = class {
3042
3051
  if (checkpointContent === currentContent) {
3043
3052
  continue;
3044
3053
  }
3045
- const tmpCheckpoint = path6.join(this.shadowRepoDir, ".diff-a");
3046
- const tmpCurrent = path6.join(this.shadowRepoDir, ".diff-b");
3047
3054
  writeFileSync(tmpCheckpoint, checkpointContent, "utf-8");
3048
3055
  writeFileSync(tmpCurrent, currentContent, "utf-8");
3049
3056
  try {
@@ -3066,12 +3073,16 @@ ${output}`);
3066
3073
  }
3067
3074
  }
3068
3075
  }
3076
+ } catch {
3077
+ } finally {
3069
3078
  try {
3070
3079
  unlinkSync(tmpCheckpoint);
3080
+ } catch {
3081
+ }
3082
+ try {
3071
3083
  unlinkSync(tmpCurrent);
3072
3084
  } catch {
3073
3085
  }
3074
- } catch {
3075
3086
  }
3076
3087
  }
3077
3088
  return diffParts.join("\n");
@@ -3105,6 +3116,18 @@ ${output}`);
3105
3116
  }
3106
3117
  }
3107
3118
  // --- Private helpers ---
3119
+ /**
3120
+ * Validate that a file path resolves within the project directory.
3121
+ * Prevents path traversal attacks (e.g., ../../etc/passwd).
3122
+ */
3123
+ validatePathWithinProject(filePath) {
3124
+ const absolutePath = path6.resolve(this.projectDir, filePath);
3125
+ const normalizedProject = path6.resolve(this.projectDir) + path6.sep;
3126
+ if (!absolutePath.startsWith(normalizedProject) && absolutePath !== path6.resolve(this.projectDir)) {
3127
+ throw new Error(`Path traversal detected: ${filePath}`);
3128
+ }
3129
+ return absolutePath;
3130
+ }
3108
3131
  /**
3109
3132
  * Execute a git command in the shadow repo
3110
3133
  */
@@ -3220,7 +3243,7 @@ var AgentConfigSchema = z.union([
3220
3243
  type: z.string(),
3221
3244
  // Agent type name
3222
3245
  thoroughness: z.enum(["quick", "medium", "very_thorough"]).optional(),
3223
- config: z.record(z.unknown()).optional()
3246
+ config: z.record(z.string(), z.unknown()).optional()
3224
3247
  // Additional agent-specific config
3225
3248
  })
3226
3249
  ]);
@@ -3228,6 +3251,7 @@ var VALID_MODELS = ["opus", "sonnet", "haiku"];
3228
3251
  var FrontmatterSchema = z.object({
3229
3252
  // Display name for the skill (defaults to filename if not specified)
3230
3253
  name: z.string().optional(),
3254
+ // Command description
3231
3255
  description: flexibleString,
3232
3256
  "argument-hint": flexibleString,
3233
3257
  // Model override - validated against allowed values (opus, sonnet, haiku)
@@ -3235,16 +3259,16 @@ var FrontmatterSchema = z.object({
3235
3259
  // Agent integration fields
3236
3260
  agent: AgentConfigSchema.optional(),
3237
3261
  thoroughness: z.enum(["quick", "medium", "very_thorough"]).optional(),
3238
- variables: z.record(z.string()).optional(),
3262
+ variables: z.record(z.string(), z.string()).optional(),
3239
3263
  // Tool filtering - restrict which tools are available during skill execution
3240
3264
  "allowed-tools": flexibleStringArray,
3241
3265
  // Execution context: 'inline' (default) runs in main context, 'fork' runs in subagent
3242
- context: z.enum(["fork", "inline"]).default("inline"),
3266
+ context: z.enum(["fork", "inline"]).prefault("inline"),
3243
3267
  // Visibility controls
3244
3268
  /** When true, skill is hidden from AI's auto-loading in system prompt */
3245
- "disable-model-invocation": z.boolean().default(false),
3269
+ "disable-model-invocation": z.boolean().prefault(false),
3246
3270
  /** When false, skill is hidden from /commands menu but still callable */
3247
- "user-invocable": z.boolean().default(true),
3271
+ "user-invocable": z.boolean().prefault(true),
3248
3272
  // Lifecycle hooks
3249
3273
  hooks: HooksSchema
3250
3274
  });
@@ -4341,7 +4365,7 @@ var loginUserSchema = z5.object({
4341
4365
  colorDepth: z5.number(),
4342
4366
  pixelDepth: z5.number(),
4343
4367
  devicePixelRatio: z5.number(),
4344
- ip: z5.string().optional().default(""),
4368
+ ip: z5.string().optional().prefault(""),
4345
4369
  location: z5.string().optional()
4346
4370
  }).optional()
4347
4371
  });
@@ -4354,7 +4378,7 @@ import escapeRegExp from "lodash/escapeRegExp.js";
4354
4378
  import { randomUUID } from "crypto";
4355
4379
  import { z as z6 } from "zod";
4356
4380
  var forgotPasswordUserSchema = z6.object({
4357
- email: z6.string().email()
4381
+ email: z6.email()
4358
4382
  });
4359
4383
 
4360
4384
  // ../../b4m-core/packages/services/dist/src/userService/update.js
@@ -4402,7 +4426,7 @@ var sendFriendRequestSchema = z8.object({
4402
4426
  var adminUpdateUserSchema = updateUserSchema.extend({
4403
4427
  id: z9.string(),
4404
4428
  // Admins can directly update email addresses without verification
4405
- email: z9.string().email().optional(),
4429
+ email: z9.email().optional(),
4406
4430
  role: z9.string().optional().nullable(),
4407
4431
  isAdmin: z9.boolean().optional(),
4408
4432
  organizationId: z9.string().optional().nullable(),
@@ -4449,7 +4473,7 @@ var registerUserSchema = z11.object({
4449
4473
  colorDepth: z11.number(),
4450
4474
  pixelDepth: z11.number(),
4451
4475
  devicePixelRatio: z11.number(),
4452
- ip: z11.string().optional().default(""),
4476
+ ip: z11.string().optional().prefault(""),
4453
4477
  location: z11.string().optional()
4454
4478
  }).optional()
4455
4479
  });
@@ -4464,10 +4488,10 @@ var adminDeleteUserSchema = z12.object({
4464
4488
  import { z as z13 } from "zod";
4465
4489
  var searchUserCollectionSchema = z13.object({
4466
4490
  userId: z13.string(),
4467
- page: z13.coerce.number().optional().default(1),
4468
- limit: z13.coerce.number().optional().default(10),
4469
- search: z13.string().optional().default(""),
4470
- type: z13.nativeEnum(CollectionType).optional()
4491
+ page: z13.coerce.number().optional().prefault(1),
4492
+ limit: z13.coerce.number().optional().prefault(10),
4493
+ search: z13.string().optional().prefault(""),
4494
+ type: z13.enum(CollectionType).optional()
4471
4495
  });
4472
4496
 
4473
4497
  // ../../b4m-core/packages/services/dist/src/userService/recalculateUserStorage.js
@@ -4482,7 +4506,7 @@ var recalculateUserStorageSchema = z14.object({
4482
4506
  // ../../b4m-core/packages/services/dist/src/userService/listRecentActivities.js
4483
4507
  import { z as z15 } from "zod";
4484
4508
  var listRecentActivitiesSchema = z15.object({
4485
- coverage: z15.enum(["all", "important"]).default("important"),
4509
+ coverage: z15.enum(["all", "important"]).prefault("important"),
4486
4510
  userId: z15.string().optional()
4487
4511
  });
4488
4512
  var IMPORTANT_COUNTER_NAMES = [
@@ -4525,7 +4549,7 @@ import { randomUUID as randomUUID4 } from "crypto";
4525
4549
  import { z as z19 } from "zod";
4526
4550
  var requestEmailChangeSchema = z19.object({
4527
4551
  userId: z19.string(),
4528
- newEmail: z19.string().email(),
4552
+ newEmail: z19.email(),
4529
4553
  password: z19.string()
4530
4554
  });
4531
4555
 
@@ -4547,11 +4571,11 @@ import bcrypt5 from "bcryptjs";
4547
4571
  import { z as z22 } from "zod";
4548
4572
  var createUserApiKeySchema = z22.object({
4549
4573
  name: z22.string().min(1).max(100),
4550
- scopes: z22.array(z22.nativeEnum(ApiKeyScope)).min(1),
4574
+ scopes: z22.array(z22.enum(ApiKeyScope)).min(1),
4551
4575
  expiresAt: z22.date().optional(),
4552
4576
  rateLimit: z22.object({
4553
- requestsPerMinute: z22.number().min(1).max(1e3).default(60),
4554
- requestsPerDay: z22.number().min(1).max(1e4).default(1e3)
4577
+ requestsPerMinute: z22.number().min(1).max(1e3).prefault(60),
4578
+ requestsPerDay: z22.number().min(1).max(1e4).prefault(1e3)
4555
4579
  }).optional(),
4556
4580
  metadata: z22.object({
4557
4581
  clientIP: z22.string().optional(),
@@ -4740,8 +4764,8 @@ var generateDailyReportSchema = z26.object({
4740
4764
  import { z as z27 } from "zod";
4741
4765
  var incrementUserCounterSchema = z27.object({
4742
4766
  action: z27.string(),
4743
- increment: z27.coerce.number().default(1).optional(),
4744
- metadata: z27.record(z27.unknown()).optional()
4767
+ increment: z27.coerce.number().prefault(1).optional(),
4768
+ metadata: z27.record(z27.string(), z27.unknown()).optional()
4745
4769
  });
4746
4770
 
4747
4771
  // ../../b4m-core/packages/services/dist/src/countersService/sendSlackReport.js
@@ -4765,57 +4789,57 @@ import axios3 from "axios";
4765
4789
  import { z as z28 } from "zod";
4766
4790
  import last from "lodash/last.js";
4767
4791
  var epochDate = () => z28.preprocess((val) => new Date(Number(val) * 1e3), z28.date());
4768
- var openaiConversationSchema = z28.object({
4792
+ var openaiConversationSchema = z28.looseObject({
4769
4793
  id: z28.string(),
4770
4794
  title: z28.string(),
4771
4795
  create_time: epochDate(),
4772
4796
  update_time: epochDate().nullable(),
4773
4797
  mapping: z28.record(
4774
4798
  z28.string(),
4775
- z28.object({
4799
+ z28.looseObject({
4776
4800
  id: z28.string(),
4777
4801
  parent: z28.string().nullable(),
4778
4802
  children: z28.array(z28.string()),
4779
- message: z28.object({
4803
+ message: z28.looseObject({
4780
4804
  id: z28.string(),
4781
4805
  create_time: epochDate(),
4782
4806
  update_time: epochDate().nullable(),
4783
- author: z28.object({
4807
+ author: z28.looseObject({
4784
4808
  role: z28.string(),
4785
4809
  name: z28.string().nullable(),
4786
4810
  metadata: z28.any()
4787
4811
  // Accept any metadata structure
4788
- }).passthrough(),
4812
+ }),
4789
4813
  // Allow extra fields in author
4790
- content: z28.object({
4814
+ content: z28.looseObject({
4791
4815
  content_type: z28.string(),
4792
4816
  parts: z28.array(z28.any()).optional()
4793
4817
  // Accept any type in parts array (strings, objects, etc.)
4794
- }).passthrough(),
4818
+ }),
4795
4819
  // Allow extra fields in content
4796
4820
  status: z28.string(),
4797
4821
  end_turn: z28.boolean().nullable(),
4798
4822
  metadata: z28.any(),
4799
4823
  // Accept any metadata structure since it varies widely
4800
4824
  recipient: z28.string()
4801
- }).passthrough().nullable()
4802
- }).passthrough()
4825
+ }).nullable()
4826
+ })
4803
4827
  // Allow extra fields in mapping node
4804
4828
  )
4805
- }).passthrough();
4829
+ });
4806
4830
 
4807
4831
  // ../../b4m-core/packages/services/dist/src/importHistoryService/importClaudeHistory.js
4808
4832
  import { z as z29 } from "zod";
4809
- var claudeChatMessageSchema = z29.object({
4810
- uuid: z29.string().uuid(),
4833
+ var claudeChatMessageSchema = z29.looseObject({
4834
+ uuid: z29.uuid(),
4811
4835
  text: z29.string(),
4812
4836
  content: z29.array(
4813
- z29.object({
4837
+ z29.looseObject({
4814
4838
  type: z29.string(),
4815
4839
  // Accept any type: "text", "image", "tool_result", etc.
4816
4840
  text: z29.string().optional()
4817
4841
  // Make text optional since tool_result may not have it
4818
- }).passthrough()
4842
+ })
4819
4843
  // Allow all other fields
4820
4844
  ),
4821
4845
  sender: z29.enum(["human", "assistant"]),
@@ -4825,19 +4849,19 @@ var claudeChatMessageSchema = z29.object({
4825
4849
  // Accept any attachment structure
4826
4850
  files: z29.array(z29.any())
4827
4851
  // Accept any file structure
4828
- }).passthrough();
4829
- var claudeConversationSchema = z29.object({
4830
- uuid: z29.string().uuid(),
4852
+ });
4853
+ var claudeConversationSchema = z29.looseObject({
4854
+ uuid: z29.uuid(),
4831
4855
  name: z29.string(),
4832
4856
  summary: z29.string().optional(),
4833
4857
  // Summary field is optional
4834
4858
  created_at: z29.coerce.date(),
4835
4859
  updated_at: z29.coerce.date(),
4836
- account: z29.object({
4837
- uuid: z29.string().uuid()
4860
+ account: z29.looseObject({
4861
+ uuid: z29.uuid()
4838
4862
  }),
4839
4863
  chat_messages: z29.array(claudeChatMessageSchema)
4840
- }).passthrough();
4864
+ });
4841
4865
 
4842
4866
  // ../../b4m-core/packages/services/dist/src/importHistoryService/index.js
4843
4867
  var ImportSource;
@@ -4889,7 +4913,7 @@ var searchProjectsSchema = z34.object({
4889
4913
  search: z34.string().optional(),
4890
4914
  filters: z34.object({
4891
4915
  favorite: z34.coerce.boolean().optional(),
4892
- scope: z34.record(z34.any()).optional()
4916
+ scope: z34.record(z34.string(), z34.any()).optional()
4893
4917
  }).optional(),
4894
4918
  pagination: z34.object({
4895
4919
  page: z34.coerce.number().optional(),
@@ -4915,15 +4939,15 @@ var acceptInviteSchema = z35.object({
4915
4939
  import { z as z36 } from "zod";
4916
4940
  var cancelInviteSchema = z36.object({
4917
4941
  id: z36.string(),
4918
- type: z36.nativeEnum(InviteType),
4919
- email: z36.string().email().optional()
4942
+ type: z36.enum(InviteType),
4943
+ email: z36.email().optional()
4920
4944
  });
4921
4945
 
4922
4946
  // ../../b4m-core/packages/services/dist/src/sharingService/cancelOwnDocument.js
4923
4947
  import { z as z37 } from "zod";
4924
4948
  var cancelOwnDocumentInvitesSchema = z37.object({
4925
4949
  documentId: z37.string(),
4926
- type: z37.nativeEnum(InviteType)
4950
+ type: z37.enum(InviteType)
4927
4951
  });
4928
4952
 
4929
4953
  // ../../b4m-core/packages/services/dist/src/sharingService/create.js
@@ -4932,12 +4956,12 @@ var defaultExpiration = () => new Date((/* @__PURE__ */ new Date()).getFullYear(
4932
4956
  var DEFAULT_AVAILABLE = 1;
4933
4957
  var createInviteSchema = z38.object({
4934
4958
  id: z38.string(),
4935
- type: z38.nativeEnum(InviteType),
4936
- permissions: z38.array(z38.nativeEnum(Permission)),
4959
+ type: z38.enum(InviteType),
4960
+ permissions: z38.array(z38.enum(Permission)),
4937
4961
  recipients: z38.string().array().optional(),
4938
4962
  description: z38.string().optional(),
4939
- expiresAt: z38.date().optional().default(defaultExpiration()),
4940
- available: z38.number().optional().default(DEFAULT_AVAILABLE)
4963
+ expiresAt: z38.date().optional().prefault(defaultExpiration()),
4964
+ available: z38.number().optional().prefault(DEFAULT_AVAILABLE)
4941
4965
  });
4942
4966
 
4943
4967
  // ../../b4m-core/packages/services/dist/src/sharingService/get.js
@@ -4951,14 +4975,14 @@ var getInviteSchema = z39.object({
4951
4975
  import { z as z40 } from "zod";
4952
4976
  var listInviteByDocumentIdAndTypeSchema = z40.object({
4953
4977
  documentId: z40.string(),
4954
- type: z40.nativeEnum(InviteType)
4978
+ type: z40.enum(InviteType)
4955
4979
  });
4956
4980
 
4957
4981
  // ../../b4m-core/packages/services/dist/src/sharingService/listOwnPending.js
4958
4982
  import { z as z41 } from "zod";
4959
4983
  var listOwnPendingInvitesSchema = z41.object({
4960
- limit: z41.number().min(1).max(100).default(20),
4961
- page: z41.number().min(1).default(1)
4984
+ limit: z41.number().min(1).max(100).prefault(20),
4985
+ page: z41.number().min(1).prefault(1)
4962
4986
  });
4963
4987
 
4964
4988
  // ../../b4m-core/packages/services/dist/src/sharingService/refuse.js
@@ -4981,13 +5005,13 @@ import { z as z44 } from "zod";
4981
5005
  import uniq from "lodash/uniq.js";
4982
5006
  var addFilesProjectSchema = z44.object({
4983
5007
  projectId: z44.string().nonempty(),
4984
- fileIds: z44.array(z44.string().nonempty())
5008
+ fileIds: z44.tuple([z44.string()], z44.string())
4985
5009
  });
4986
5010
 
4987
5011
  // ../../b4m-core/packages/services/dist/src/projectService/addSessions.js
4988
5012
  var addSessionsProjectSchema = z45.object({
4989
5013
  projectId: z45.string().nonempty(),
4990
- sessionIds: z45.array(z45.string().nonempty())
5014
+ sessionIds: z45.tuple([z45.string()], z45.string())
4991
5015
  });
4992
5016
 
4993
5017
  // ../../b4m-core/packages/services/dist/src/projectService/get.js
@@ -5040,9 +5064,9 @@ var listProjectFilesSchema = z52.object({
5040
5064
  import { z as z53 } from "zod";
5041
5065
  var listProjectInvitesParamsSchema = z53.object({
5042
5066
  id: z53.string(),
5043
- statuses: z53.string().optional().default(""),
5044
- limit: z53.coerce.number().optional().default(10),
5045
- page: z53.coerce.number().optional().default(1)
5067
+ statuses: z53.string().optional().prefault(""),
5068
+ limit: z53.coerce.number().optional().prefault(10),
5069
+ page: z53.coerce.number().optional().prefault(1)
5046
5070
  });
5047
5071
 
5048
5072
  // ../../b4m-core/packages/services/dist/src/projectService/addSystemPrompts.js
@@ -5073,14 +5097,14 @@ import { z as z59 } from "zod";
5073
5097
  import { z as z57 } from "zod";
5074
5098
  var createFavoriteParametersSchema = z57.object({
5075
5099
  documentId: z57.string(),
5076
- documentType: z57.nativeEnum(FavoriteDocumentType)
5100
+ documentType: z57.enum(FavoriteDocumentType)
5077
5101
  });
5078
5102
 
5079
5103
  // ../../b4m-core/packages/services/dist/src/favoriteService/delete.js
5080
5104
  import { z as z58 } from "zod";
5081
5105
  var deleteFavoriteParametersSchema = z58.object({
5082
5106
  documentId: z58.string(),
5083
- documentType: z58.nativeEnum(FavoriteDocumentType)
5107
+ documentType: z58.enum(FavoriteDocumentType)
5084
5108
  });
5085
5109
 
5086
5110
  // ../../b4m-core/packages/services/dist/src/projectService/addFavorite.js
@@ -5187,18 +5211,18 @@ var searchSchema2 = z72.object({
5187
5211
  filters: z72.object({
5188
5212
  personal: z72.union([z72.enum(["true", "false"]).transform((val) => val === "true"), z72.boolean()]).optional(),
5189
5213
  userId: z72.string().optional()
5190
- }).default({}),
5214
+ }).prefault({}),
5191
5215
  pagination: z72.object({
5192
- page: z72.coerce.number().int().positive().default(1),
5193
- limit: z72.coerce.number().int().positive().max(100).default(10)
5194
- }).default({
5216
+ page: z72.coerce.number().int().positive().prefault(1),
5217
+ limit: z72.coerce.number().int().positive().max(100).prefault(10)
5218
+ }).prefault({
5195
5219
  page: 1,
5196
5220
  limit: 10
5197
5221
  }),
5198
5222
  orderBy: z72.object({
5199
- field: z72.enum(["name", "createdAt", "updatedAt"]).default("name"),
5200
- direction: z72.enum(["asc", "desc"]).default("asc")
5201
- }).default({
5223
+ field: z72.enum(["name", "createdAt", "updatedAt"]).prefault("name"),
5224
+ direction: z72.enum(["asc", "desc"]).prefault("asc")
5225
+ }).prefault({
5202
5226
  field: "name",
5203
5227
  direction: "asc"
5204
5228
  })
@@ -5233,8 +5257,8 @@ var getUsersSchema = z75.object({
5233
5257
  import { z as z76 } from "zod";
5234
5258
  var createSchema = z76.object({
5235
5259
  name: z76.string(),
5236
- personal: z76.boolean().default(false),
5237
- seats: z76.number().default(1),
5260
+ personal: z76.boolean().prefault(false),
5261
+ seats: z76.number().prefault(1),
5238
5262
  stripeCustomerId: z76.string().nullable(),
5239
5263
  billingOwnerId: z76.string().optional(),
5240
5264
  // Optional billing owner (defaults to user if not provided)
@@ -5286,10 +5310,10 @@ var organizationLeaveSchema = z81.object({
5286
5310
  import { z as z82 } from "zod";
5287
5311
  var createApiKeySchema = z82.object({
5288
5312
  apiKey: z82.string().min(6),
5289
- description: z82.string().optional().default(""),
5290
- isActive: z82.boolean().optional().default(true),
5291
- type: z82.nativeEnum(ApiKeyType),
5292
- expireDays: z82.number().min(1).max(365).default(90)
5313
+ description: z82.string().optional().prefault(""),
5314
+ isActive: z82.boolean().optional().prefault(true),
5315
+ type: z82.enum(ApiKeyType),
5316
+ expireDays: z82.number().min(1).max(365).prefault(90)
5293
5317
  // Default 90-day expiration
5294
5318
  });
5295
5319
 
@@ -5297,7 +5321,7 @@ var createApiKeySchema = z82.object({
5297
5321
  import { z as z83 } from "zod";
5298
5322
  var setApiKeySchema = z83.object({
5299
5323
  id: z83.string(),
5300
- type: z83.nativeEnum(ApiKeyType)
5324
+ type: z83.enum(ApiKeyType)
5301
5325
  });
5302
5326
 
5303
5327
  // ../../b4m-core/packages/services/dist/src/apiKeyService/delete.js
@@ -5327,7 +5351,7 @@ var updateFabFileSchema = z87.object({
5327
5351
  fileName: z87.string().optional(),
5328
5352
  mimeType: z87.string().optional(),
5329
5353
  fileContent: z87.string().optional(),
5330
- type: z87.nativeEnum(KnowledgeType).optional(),
5354
+ type: z87.enum(KnowledgeType).optional(),
5331
5355
  system: z87.boolean().optional(),
5332
5356
  systemPriority: z87.number().min(0).max(999).optional(),
5333
5357
  sessionId: z87.string().optional(),
@@ -5435,8 +5459,8 @@ var editFabFileSchema = z98.object({
5435
5459
  start: z98.number(),
5436
5460
  end: z98.number()
5437
5461
  }).optional(),
5438
- preserveFormatting: z98.boolean().optional().default(true),
5439
- applyImmediately: z98.boolean().optional().default(false)
5462
+ preserveFormatting: z98.boolean().optional().prefault(true),
5463
+ applyImmediately: z98.boolean().optional().prefault(false)
5440
5464
  });
5441
5465
 
5442
5466
  // ../../b4m-core/packages/services/dist/src/fabFileService/applyEdit.js
@@ -5446,7 +5470,7 @@ import { z as z99 } from "zod";
5446
5470
  var applyEditSchema = z99.object({
5447
5471
  id: z99.string(),
5448
5472
  modifiedContent: z99.string(),
5449
- createBackup: z99.boolean().optional().default(true)
5473
+ createBackup: z99.boolean().optional().prefault(true)
5450
5474
  });
5451
5475
 
5452
5476
  // ../../b4m-core/packages/services/dist/src/friendshipService/respondToFriendRequest.js
@@ -5957,8 +5981,8 @@ var researchTaskCreateSchema = z114.object({
5957
5981
  title: z114.string().max(100),
5958
5982
  description: z114.string().max(500),
5959
5983
  prompt: z114.string().max(500).optional(),
5960
- type: z114.nativeEnum(ResearchTaskType),
5961
- executionType: z114.nativeEnum(ResearchTaskExecutionType).default(ResearchTaskExecutionType.ON_DEMAND),
5984
+ type: z114.enum(ResearchTaskType),
5985
+ executionType: z114.enum(ResearchTaskExecutionType).prefault(ResearchTaskExecutionType.ON_DEMAND),
5962
5986
  fileTagId: z114.string().optional(),
5963
5987
  autoGeneratedTag: z114.object({
5964
5988
  name: z114.string(),
@@ -5967,13 +5991,13 @@ var researchTaskCreateSchema = z114.object({
5967
5991
  }).optional()
5968
5992
  });
5969
5993
  var researchTaskScrapeCreateSchema = researchTaskCreateSchema.extend({
5970
- urls: z114.array(z114.string().url()).min(1),
5994
+ urls: z114.array(z114.url()).min(1),
5971
5995
  canDiscoverLinks: z114.boolean()
5972
5996
  });
5973
5997
  var researchTaskPeriodicCreateSchema = researchTaskCreateSchema.extend({
5974
5998
  executionPeriodicStartAt: z114.coerce.date(),
5975
5999
  executionPeriodicEndAt: z114.coerce.date(),
5976
- executionPeriodicFrequency: z114.nativeEnum(ResearchTaskPeriodicFrequencyType)
6000
+ executionPeriodicFrequency: z114.enum(ResearchTaskPeriodicFrequencyType)
5977
6001
  });
5978
6002
  var researchTaskScheduledCreateSchema = researchTaskCreateSchema.extend({
5979
6003
  executionScheduledAt: z114.coerce.date()
@@ -6014,10 +6038,10 @@ var updateResearchTaskSchema = z117.object({
6014
6038
  id: z117.string(),
6015
6039
  title: z117.string(),
6016
6040
  description: z117.string(),
6017
- type: z117.nativeEnum(ResearchTaskType)
6041
+ type: z117.enum(ResearchTaskType)
6018
6042
  });
6019
6043
  var researchTaskScrapeUpdateSchema = updateResearchTaskSchema.extend({
6020
- urls: z117.array(z117.string().url()).min(1),
6044
+ urls: z117.array(z117.url()).min(1),
6021
6045
  canDiscoverLinks: z117.boolean()
6022
6046
  });
6023
6047
 
@@ -6103,7 +6127,7 @@ var tagCreateSchema = z126.object({
6103
6127
  icon: z126.string().optional(),
6104
6128
  description: z126.string().optional(),
6105
6129
  color: z126.string().optional(),
6106
- type: z126.nativeEnum(TagType)
6130
+ type: z126.enum(TagType)
6107
6131
  });
6108
6132
 
6109
6133
  // ../../b4m-core/packages/services/dist/src/tagService/update.js
@@ -6145,28 +6169,28 @@ var createArtifactSchema = z129.object({
6145
6169
  content: z129.string().min(1),
6146
6170
  projectId: z129.string().optional(),
6147
6171
  organizationId: z129.string().optional(),
6148
- visibility: z129.enum(["private", "project", "organization", "public"]).default("private"),
6149
- tags: z129.array(z129.string().max(50)).max(20).default([]),
6172
+ visibility: z129.enum(["private", "project", "organization", "public"]).prefault("private"),
6173
+ tags: z129.array(z129.string().max(50)).max(20).prefault([]),
6150
6174
  versionTag: z129.string().max(100).optional(),
6151
6175
  sourceQuestId: z129.string().optional(),
6152
6176
  sessionId: z129.string().optional(),
6153
6177
  parentArtifactId: z129.string().optional(),
6154
6178
  permissions: z129.object({
6155
- canRead: z129.array(z129.string()).default([]),
6156
- canWrite: z129.array(z129.string()).default([]),
6157
- canDelete: z129.array(z129.string()).default([]),
6158
- isPublic: z129.boolean().default(false),
6159
- inheritFromProject: z129.boolean().default(true)
6179
+ canRead: z129.array(z129.string()).prefault([]),
6180
+ canWrite: z129.array(z129.string()).prefault([]),
6181
+ canDelete: z129.array(z129.string()).prefault([]),
6182
+ isPublic: z129.boolean().prefault(false),
6183
+ inheritFromProject: z129.boolean().prefault(true)
6160
6184
  }).optional(),
6161
- metadata: z129.record(z129.unknown()).default({})
6185
+ metadata: z129.record(z129.string(), z129.unknown()).prefault({})
6162
6186
  });
6163
6187
 
6164
6188
  // ../../b4m-core/packages/services/dist/src/artifactService/get.js
6165
6189
  import { z as z130 } from "zod";
6166
6190
  var getArtifactSchema = z130.object({
6167
6191
  id: z130.string(),
6168
- includeContent: z130.boolean().default(false),
6169
- includeVersions: z130.boolean().default(false),
6192
+ includeContent: z130.boolean().prefault(false),
6193
+ includeVersions: z130.boolean().prefault(false),
6170
6194
  version: z130.number().optional()
6171
6195
  });
6172
6196
 
@@ -6180,11 +6204,11 @@ var listArtifactsSchema = z131.object({
6180
6204
  sessionId: z131.string().optional(),
6181
6205
  tags: z131.array(z131.string()).optional(),
6182
6206
  search: z131.string().optional(),
6183
- limit: z131.number().min(1).max(100).default(20),
6184
- offset: z131.number().min(0).default(0),
6185
- sortBy: z131.enum(["createdAt", "updatedAt", "title", "type"]).default("updatedAt"),
6186
- sortOrder: z131.enum(["asc", "desc"]).default("desc"),
6187
- includeDeleted: z131.boolean().default(false)
6207
+ limit: z131.number().min(1).max(100).prefault(20),
6208
+ offset: z131.number().min(0).prefault(0),
6209
+ sortBy: z131.enum(["createdAt", "updatedAt", "title", "type"]).prefault("updatedAt"),
6210
+ sortOrder: z131.enum(["asc", "desc"]).prefault("desc"),
6211
+ includeDeleted: z131.boolean().prefault(false)
6188
6212
  });
6189
6213
 
6190
6214
  // ../../b4m-core/packages/services/dist/src/artifactService/update.js
@@ -6205,7 +6229,7 @@ var updateArtifactSchema = z132.object({
6205
6229
  isPublic: z132.boolean().optional(),
6206
6230
  inheritFromProject: z132.boolean().optional()
6207
6231
  }).optional(),
6208
- metadata: z132.record(z132.unknown()).optional(),
6232
+ metadata: z132.record(z132.string(), z132.unknown()).optional(),
6209
6233
  changes: z132.array(z132.string()).optional(),
6210
6234
  changeDescription: z132.string().max(1e3).optional(),
6211
6235
  createNewVersion: z132.boolean().optional(),
@@ -6216,7 +6240,7 @@ var updateArtifactSchema = z132.object({
6216
6240
  import { z as z133 } from "zod";
6217
6241
  var deleteArtifactSchema = z133.object({
6218
6242
  id: z133.string(),
6219
- hardDelete: z133.boolean().default(false)
6243
+ hardDelete: z133.boolean().prefault(false)
6220
6244
  // For future implementation
6221
6245
  });
6222
6246
 
@@ -6226,14 +6250,14 @@ var questSchema = z134.object({
6226
6250
  id: z134.string(),
6227
6251
  title: z134.string().min(1).max(255),
6228
6252
  description: z134.string().max(MAX_DESCRIPTION_LENGTH),
6229
- status: z134.enum(["not_started", "in_progress", "completed", "blocked"]).default("not_started"),
6253
+ status: z134.enum(["not_started", "in_progress", "completed", "blocked"]).prefault("not_started"),
6230
6254
  order: z134.number().min(0),
6231
- dependencies: z134.array(z134.string()).default([]),
6255
+ dependencies: z134.array(z134.string()).prefault([]),
6232
6256
  estimatedTime: z134.string().optional()
6233
6257
  });
6234
6258
  var questResourceSchema = z134.object({
6235
6259
  title: z134.string().min(1).max(255),
6236
- url: z134.string().url(),
6260
+ url: z134.url(),
6237
6261
  type: z134.enum(["documentation", "tutorial", "reference", "example"])
6238
6262
  });
6239
6263
  var createQuestMasterSchema = z134.object({
@@ -6242,23 +6266,23 @@ var createQuestMasterSchema = z134.object({
6242
6266
  goal: z134.string().min(1).max(MAX_GOAL_LENGTH),
6243
6267
  complexity: z134.enum(["beginner", "intermediate", "advanced", "expert"]),
6244
6268
  estimatedTotalTime: z134.string().optional(),
6245
- prerequisites: z134.array(z134.string().max(200)).default([]),
6269
+ prerequisites: z134.array(z134.string().max(200)).prefault([]),
6246
6270
  quests: z134.array(questSchema).min(1),
6247
- resources: z134.array(questResourceSchema).default([]),
6271
+ resources: z134.array(questResourceSchema).prefault([]),
6248
6272
  projectId: z134.string().optional(),
6249
6273
  organizationId: z134.string().optional(),
6250
- visibility: z134.enum(["private", "project", "organization", "public"]).default("private"),
6251
- tags: z134.array(z134.string().max(MAX_TAG_LENGTH)).max(20).default([]),
6274
+ visibility: z134.enum(["private", "project", "organization", "public"]).prefault("private"),
6275
+ tags: z134.array(z134.string().max(MAX_TAG_LENGTH)).max(20).prefault([]),
6252
6276
  permissions: z134.object({
6253
- canRead: z134.array(z134.string()).default([]),
6254
- canWrite: z134.array(z134.string()).default([]),
6255
- canDelete: z134.array(z134.string()).default([]),
6256
- isPublic: z134.boolean().default(false),
6257
- inheritFromProject: z134.boolean().default(true)
6277
+ canRead: z134.array(z134.string()).prefault([]),
6278
+ canWrite: z134.array(z134.string()).prefault([]),
6279
+ canDelete: z134.array(z134.string()).prefault([]),
6280
+ isPublic: z134.boolean().prefault(false),
6281
+ inheritFromProject: z134.boolean().prefault(true)
6258
6282
  }).optional(),
6259
6283
  sourceQuestId: z134.string().optional(),
6260
6284
  sessionId: z134.string().optional(),
6261
- metadata: z134.record(z134.unknown()).default({})
6285
+ metadata: z134.record(z134.string(), z134.unknown()).prefault({})
6262
6286
  });
6263
6287
 
6264
6288
  // ../../b4m-core/packages/services/dist/src/questMasterService/updateQuestStatus.js
@@ -6326,20 +6350,20 @@ import { z as z137 } from "zod";
6326
6350
  var llmAnalysisResponseSchema = z137.object({
6327
6351
  summary: z137.string().min(1, "Summary cannot be empty"),
6328
6352
  entities: z137.object({
6329
- companies: z137.array(z137.string()).default([]),
6330
- people: z137.array(z137.string()).default([]),
6331
- products: z137.array(z137.string()).default([]),
6332
- technologies: z137.array(z137.string()).default([])
6353
+ companies: z137.array(z137.string()).prefault([]),
6354
+ people: z137.array(z137.string()).prefault([]),
6355
+ products: z137.array(z137.string()).prefault([]),
6356
+ technologies: z137.array(z137.string()).prefault([])
6333
6357
  }),
6334
6358
  sentiment: z137.enum(["positive", "neutral", "negative", "urgent"]),
6335
6359
  actionItems: z137.array(z137.object({
6336
6360
  description: z137.string(),
6337
6361
  deadline: z137.string().optional()
6338
6362
  // ISO date string from LLM
6339
- })).default([]),
6363
+ })).prefault([]),
6340
6364
  privacyRecommendation: z137.enum(["public", "team", "private"]),
6341
- embargoDetected: z137.boolean().default(false),
6342
- suggestedTags: z137.array(z137.string()).default([])
6365
+ embargoDetected: z137.boolean().prefault(false),
6366
+ suggestedTags: z137.array(z137.string()).prefault([])
6343
6367
  });
6344
6368
 
6345
6369
  // ../../b4m-core/packages/services/dist/src/llm/tools/ToolCacheManager.js
@@ -7537,8 +7561,8 @@ var editFileSchema = z138.object({
7537
7561
  start: z138.number().describe("Starting character position of the selection"),
7538
7562
  end: z138.number().describe("Ending character position of the selection")
7539
7563
  }).optional().describe("Optional selection range to edit within the file"),
7540
- preserveFormatting: z138.boolean().optional().default(true).describe("Whether to preserve the original formatting style"),
7541
- returnDiff: z138.boolean().optional().default(true).describe("Whether to return a diff of the changes")
7564
+ preserveFormatting: z138.boolean().optional().prefault(true).describe("Whether to preserve the original formatting style"),
7565
+ returnDiff: z138.boolean().optional().prefault(true).describe("Whether to return a diff of the changes")
7542
7566
  });
7543
7567
  function generateSimpleDiff(original, modified) {
7544
7568
  const differences = diffLines2(original, modified);
@@ -14563,10 +14587,10 @@ var ImageGenerationBodySchema = OpenAIImageGenerationInput.extend({
14563
14587
  userId: z141.string(),
14564
14588
  prompt: z141.string(),
14565
14589
  organizationId: z141.string().nullable().optional(),
14566
- safety_tolerance: z141.number().min(BFL_SAFETY_TOLERANCE.MIN).max(BFL_SAFETY_TOLERANCE.MAX).optional().default(BFL_SAFETY_TOLERANCE.DEFAULT),
14567
- prompt_upsampling: z141.boolean().optional().default(false),
14590
+ safety_tolerance: z141.number().min(BFL_SAFETY_TOLERANCE.MIN).max(BFL_SAFETY_TOLERANCE.MAX).optional().prefault(BFL_SAFETY_TOLERANCE.DEFAULT),
14591
+ prompt_upsampling: z141.boolean().optional().prefault(false),
14568
14592
  seed: z141.number().nullable().optional(),
14569
- output_format: z141.enum(["jpeg", "png"]).nullable().optional().default("png"),
14593
+ output_format: z141.enum(["jpeg", "png"]).nullable().optional().prefault("png"),
14570
14594
  width: z141.number().optional(),
14571
14595
  height: z141.number().optional(),
14572
14596
  aspect_ratio: z141.string().optional(),
@@ -14583,9 +14607,9 @@ var VideoGenerationBodySchema = z142.object({
14583
14607
  questId: z142.string(),
14584
14608
  userId: z142.string(),
14585
14609
  prompt: z142.string(),
14586
- model: z142.nativeEnum(VideoModels).default(VideoModels.SORA_2),
14587
- seconds: z142.union([z142.literal(4), z142.literal(8), z142.literal(12)]).default(4),
14588
- size: z142.enum(["720x1280", "1280x720", "1024x1792", "1792x1024"]).default(VIDEO_SIZE_CONSTRAINTS.SORA.defaultSize),
14610
+ model: z142.enum(VideoModels).prefault(VideoModels.SORA_2),
14611
+ seconds: z142.union([z142.literal(4), z142.literal(8), z142.literal(12)]).prefault(4),
14612
+ size: z142.enum(["720x1280", "1280x720", "1024x1792", "1792x1024"]).prefault(VIDEO_SIZE_CONSTRAINTS.SORA.defaultSize),
14589
14613
  organizationId: z142.string().nullable().optional()
14590
14614
  });
14591
14615
 
@@ -14601,10 +14625,10 @@ var ImageEditBodySchema = OpenAIImageGenerationInput.extend({
14601
14625
  userId: z143.string(),
14602
14626
  prompt: z143.string(),
14603
14627
  organizationId: z143.string().nullable().optional(),
14604
- safety_tolerance: z143.number().min(BFL_SAFETY_TOLERANCE.MIN).max(BFL_SAFETY_TOLERANCE.MAX).optional().default(BFL_SAFETY_TOLERANCE.DEFAULT),
14605
- prompt_upsampling: z143.boolean().optional().default(false),
14628
+ safety_tolerance: z143.number().min(BFL_SAFETY_TOLERANCE.MIN).max(BFL_SAFETY_TOLERANCE.MAX).optional().prefault(BFL_SAFETY_TOLERANCE.DEFAULT),
14629
+ prompt_upsampling: z143.boolean().optional().prefault(false),
14606
14630
  seed: z143.number().nullable().optional(),
14607
- output_format: z143.enum(["jpeg", "png"]).optional().default("png"),
14631
+ output_format: z143.enum(["jpeg", "png"]).optional().prefault("png"),
14608
14632
  width: z143.number().optional(),
14609
14633
  height: z143.number().optional(),
14610
14634
  aspect_ratio: z143.string().optional(),
@@ -14982,12 +15006,12 @@ var AgentFrontmatterSchema = z147.object({
14982
15006
  "denied-tools": z147.array(z147.string()).optional(),
14983
15007
  skills: z147.array(z147.string()).optional(),
14984
15008
  "max-iterations": z147.object({
14985
- quick: z147.number().int().positive().optional(),
14986
- medium: z147.number().int().positive().optional(),
14987
- very_thorough: z147.number().int().positive().optional()
15009
+ quick: z147.int().positive().optional(),
15010
+ medium: z147.int().positive().optional(),
15011
+ very_thorough: z147.int().positive().optional()
14988
15012
  }).optional(),
14989
15013
  "default-thoroughness": z147.enum(["quick", "medium", "very_thorough"]).optional(),
14990
- variables: z147.record(z147.string()).optional(),
15014
+ variables: z147.record(z147.string(), z147.string()).optional(),
14991
15015
  hooks: AgentHooksSchema
14992
15016
  });
14993
15017
  var DEFAULT_MAX_ITERATIONS = {
@@ -17361,147 +17385,6 @@ var ApiClient = class {
17361
17385
  // src/index.tsx
17362
17386
  import { isAxiosError as isAxiosError2 } from "axios";
17363
17387
 
17364
- // package.json
17365
- var package_default = {
17366
- name: "@bike4mind/cli",
17367
- version: "0.2.31-b4m-cli-undo-command.19493+44c80c9bc",
17368
- type: "module",
17369
- description: "Interactive CLI tool for Bike4Mind with ReAct agents",
17370
- license: "UNLICENSED",
17371
- author: "Bike4Mind",
17372
- repository: {
17373
- type: "git",
17374
- url: "git+https://github.com/bike4mind/lumina5.git"
17375
- },
17376
- homepage: "https://github.com/bike4mind/lumina5#readme",
17377
- bugs: "https://github.com/bike4mind/lumina5/issues",
17378
- publishConfig: {
17379
- access: "public"
17380
- },
17381
- keywords: [
17382
- "cli",
17383
- "ai",
17384
- "bike4mind",
17385
- "agent",
17386
- "mcp",
17387
- "react-agent"
17388
- ],
17389
- bin: {
17390
- b4m: "./bin/bike4mind-cli.mjs",
17391
- bike4mind: "./bin/bike4mind-cli.mjs"
17392
- },
17393
- files: [
17394
- "dist",
17395
- "bin"
17396
- ],
17397
- scripts: {
17398
- dev: "tsx src/index.tsx",
17399
- build: "tsup",
17400
- typecheck: "tsc --noEmit",
17401
- test: "vitest run",
17402
- "test:watch": "vitest",
17403
- start: "node dist/index.js",
17404
- prepublishOnly: "pnpm build",
17405
- postinstall: `node -e "try { require('better-sqlite3') } catch(e) { if(e.message.includes('bindings')) { console.log('\\n\u26A0\uFE0F Rebuilding better-sqlite3 native bindings...'); require('child_process').execSync('pnpm rebuild better-sqlite3', {stdio:'inherit'}) } }"`
17406
- },
17407
- dependencies: {
17408
- "@anthropic-ai/sdk": "^0.71.2",
17409
- "@aws-sdk/client-apigatewaymanagementapi": "3.654.0",
17410
- "@aws-sdk/client-bedrock-runtime": "3.654.0",
17411
- "@aws-sdk/client-cloudwatch": "3.654.0",
17412
- "@aws-sdk/client-lambda": "3.654.0",
17413
- "@aws-sdk/client-s3": "3.654.0",
17414
- "@aws-sdk/client-sqs": "3.654.0",
17415
- "@aws-sdk/client-transcribe": "3.654.0",
17416
- "@aws-sdk/credential-provider-node": "3.654.0",
17417
- "@aws-sdk/node-http-handler": "^3.374.0",
17418
- "@aws-sdk/s3-request-presigner": "3.654.0",
17419
- "@casl/ability": "^6.5.0",
17420
- "@google/genai": "^1.27.0",
17421
- "@google/generative-ai": "^0.21.0",
17422
- "@joplin/turndown-plugin-gfm": "^1.0.62",
17423
- "@mendable/firecrawl-js": "^1.29.3",
17424
- "@modelcontextprotocol/sdk": "1.20.1",
17425
- "@octokit/rest": "^22.0.0",
17426
- "@opensearch-project/opensearch": "2.11.0",
17427
- "async-mutex": "^0.5.0",
17428
- axios: "^1.13.2",
17429
- bcryptjs: "^2.4.3",
17430
- "better-sqlite3": "^12.5.0",
17431
- cheerio: "1.0.0-rc.12",
17432
- "cli-highlight": "^2.1.11",
17433
- "csv-parse": "^5.5.6",
17434
- dayjs: "^1.11.13",
17435
- diff: "^8.0.2",
17436
- dotenv: "^16.3.1",
17437
- "eventsource-parser": "^3.0.6",
17438
- "file-type": "^18.7.0",
17439
- "fuse.js": "^7.1.0",
17440
- glob: "^13.0.0",
17441
- "gray-matter": "^4.0.3",
17442
- ink: "^6.5.1",
17443
- "ink-select-input": "^6.2.0",
17444
- "ink-spinner": "^5.0.0",
17445
- "ink-text-input": "^6.0.0",
17446
- jsonwebtoken: "^9.0.2",
17447
- lodash: "^4.17.21",
17448
- mammoth: "^1.11.0",
17449
- marked: "^15.0.11",
17450
- mathjs: "^14.2.0",
17451
- "mime-types": "^2.1.35",
17452
- mongoose: "^8.8.3",
17453
- ollama: "^0.5.12",
17454
- open: "^11.0.0",
17455
- openai: "^6.18.0",
17456
- "p-limit": "^6.2.0",
17457
- picomatch: "^4.0.3",
17458
- qrcode: "^1.5.4",
17459
- react: "^19.2.3",
17460
- sharp: "^0.34.5",
17461
- speakeasy: "^2.0.0",
17462
- tiktoken: "^1.0.16",
17463
- "tree-sitter-wasms": "^0.1.13",
17464
- turndown: "^7.2.0",
17465
- unpdf: "^0.10.0",
17466
- uuid: "^9.0.1",
17467
- voyageai: "^0.0.4",
17468
- "web-tree-sitter": "0.25.10",
17469
- xlsx: "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
17470
- yargs: "^17.7.2",
17471
- yauzl: "^3.1.3",
17472
- zod: "^3.25.76",
17473
- "zod-validation-error": "^1.5.0",
17474
- zustand: "^4.5.4"
17475
- },
17476
- devDependencies: {
17477
- "@bike4mind/agents": "0.1.0",
17478
- "@bike4mind/common": "2.52.1-b4m-cli-undo-command.19493+44c80c9bc",
17479
- "@bike4mind/mcp": "1.31.1-b4m-cli-undo-command.19493+44c80c9bc",
17480
- "@bike4mind/services": "2.50.1-b4m-cli-undo-command.19493+44c80c9bc",
17481
- "@bike4mind/utils": "2.7.1-b4m-cli-undo-command.19493+44c80c9bc",
17482
- "@types/better-sqlite3": "^7.6.13",
17483
- "@types/diff": "^5.0.9",
17484
- "@types/jsonwebtoken": "^9.0.4",
17485
- "@types/node": "^22.9.0",
17486
- "@types/picomatch": "^4.0.2",
17487
- "@types/react": "^19.2.7",
17488
- "@types/uuid": "^9.0.7",
17489
- "@types/yargs": "^17.0.32",
17490
- fdir: "^6.5.0",
17491
- fzf: "^0.5.2",
17492
- ignore: "^7.0.5",
17493
- "ink-testing-library": "^4.0.0",
17494
- tsup: "^8.5.1",
17495
- tsx: "^4.21.0",
17496
- typescript: "^5.9.3",
17497
- vitest: "^3.2.4"
17498
- },
17499
- optionalDependencies: {
17500
- "@vscode/ripgrep": "^1.17.0"
17501
- },
17502
- gitHead: "44c80c9bcf8bf132a8b75c3635426a901adce99e"
17503
- };
17504
-
17505
17388
  // src/agents/toolFilter.ts
17506
17389
  function matchesToolPattern3(toolName, pattern) {
17507
17390
  const regexPattern = pattern.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*");
@@ -21453,6 +21336,19 @@ No usage data available for the last ${USAGE_DAYS} days.`);
21453
21336
  }
21454
21337
  );
21455
21338
  }
21339
+ try {
21340
+ const updateResult = await Promise.race([
21341
+ checkForUpdate(package_default.version),
21342
+ new Promise((resolve3) => setTimeout(() => resolve3(null), 3e3))
21343
+ ]);
21344
+ if (updateResult?.updateAvailable) {
21345
+ console.log(
21346
+ `\x1B[33m \u2B06 Update available: v${updateResult.currentVersion} \u2192 v${updateResult.latestVersion} (run: b4m update)\x1B[0m
21347
+ `
21348
+ );
21349
+ }
21350
+ } catch {
21351
+ }
21456
21352
  var isDevMode = import.meta.url.includes("/src/") || process.env.NODE_ENV === "development";
21457
21353
  if (isDevMode) {
21458
21354
  logger.debug("\u{1F527} Running in development mode (using TypeScript source)\n");