@bike4mind/cli 0.2.37 → 0.2.38-docs-clawdbot-comparison-analysis.20242

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-EY65E4W4.js";
4
+ } from "./chunk-DF2SGZ6Z.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;
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BadRequestError,
4
4
  secureParameters
5
- } from "./chunk-5YLGNW2B.js";
5
+ } from "./chunk-Q3TLK7O5.js";
6
6
  import {
7
7
  CompletionApiUsageTransaction,
8
8
  GenericCreditDeductTransaction,
@@ -13,7 +13,7 @@ import {
13
13
  ToolUsageTransaction,
14
14
  TransferCreditTransaction,
15
15
  VideoGenerationUsageTransaction
16
- } from "./chunk-EY65E4W4.js";
16
+ } from "./chunk-DF2SGZ6Z.js";
17
17
 
18
18
  // ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
19
19
  import { z } from "zod";
@@ -7,11 +7,11 @@ import {
7
7
  getSettingsMap,
8
8
  getSettingsValue,
9
9
  secureParameters
10
- } from "./chunk-5YLGNW2B.js";
10
+ } from "./chunk-Q3TLK7O5.js";
11
11
  import {
12
12
  KnowledgeType,
13
13
  SupportedFabFileMimeTypes
14
- } from "./chunk-EY65E4W4.js";
14
+ } from "./chunk-DF2SGZ6Z.js";
15
15
 
16
16
  // ../../b4m-core/packages/services/dist/src/fabFileService/create.js
17
17
  import { z } from "zod";
@@ -641,6 +641,7 @@ var CollectionType;
641
641
  CollectionType2["PROJECT"] = "project";
642
642
  CollectionType2["AI_IMAGE"] = "ai_image";
643
643
  })(CollectionType || (CollectionType = {}));
644
+ var ROTATABLE_INTEGRATIONS = ["github", "atlassian", "slack"];
644
645
 
645
646
  // ../../b4m-core/packages/common/dist/src/types/entities/UserApiKeyTypes.js
646
647
  var ApiKeyScope;
@@ -1130,6 +1131,17 @@ var JiraWebhookDeliveryStatus;
1130
1131
  JiraWebhookDeliveryStatus2["Pending"] = "pending";
1131
1132
  })(JiraWebhookDeliveryStatus || (JiraWebhookDeliveryStatus = {}));
1132
1133
 
1134
+ // ../../b4m-core/packages/common/dist/src/types/entities/SystemPromptTypes.js
1135
+ var AdminSystemPromptCategory;
1136
+ (function(AdminSystemPromptCategory2) {
1137
+ AdminSystemPromptCategory2["SYSTEM"] = "system";
1138
+ AdminSystemPromptCategory2["ADMIN"] = "admin";
1139
+ AdminSystemPromptCategory2["AUTOMATION"] = "automation";
1140
+ AdminSystemPromptCategory2["VOICE"] = "voice";
1141
+ AdminSystemPromptCategory2["QUANTUM"] = "quantum";
1142
+ AdminSystemPromptCategory2["SALES_INTELLIGENCE"] = "sales_intelligence";
1143
+ })(AdminSystemPromptCategory || (AdminSystemPromptCategory = {}));
1144
+
1133
1145
  // ../../b4m-core/packages/common/dist/src/types/common.js
1134
1146
  var SupportedFabFileMimeTypes;
1135
1147
  (function(SupportedFabFileMimeTypes2) {
@@ -1588,6 +1600,35 @@ var CliToolResponseAction = z10.object({
1588
1600
  content: z10.unknown().optional(),
1589
1601
  error: z10.string().optional()
1590
1602
  });
1603
+ var KeepCommandRequestAction = z10.object({
1604
+ action: z10.literal("keep_command_request"),
1605
+ accessToken: z10.string().optional(),
1606
+ commandType: z10.enum(["read_file", "list_directory", "run_tool"]),
1607
+ params: z10.record(z10.string(), z10.unknown()),
1608
+ requestId: z10.string()
1609
+ });
1610
+ var KeepCommandAction = z10.object({
1611
+ action: z10.literal("keep_command"),
1612
+ commandType: z10.enum(["read_file", "list_directory", "run_tool"]),
1613
+ params: z10.record(z10.string(), z10.unknown()),
1614
+ requestId: z10.string(),
1615
+ originConnectionId: z10.string()
1616
+ });
1617
+ var KeepCommandResponseAction = z10.object({
1618
+ action: z10.literal("keep_command_response"),
1619
+ requestId: z10.string(),
1620
+ originConnectionId: z10.string(),
1621
+ success: z10.boolean(),
1622
+ result: z10.unknown().optional(),
1623
+ error: z10.string().optional()
1624
+ });
1625
+ var KeepCommandResultAction = z10.object({
1626
+ action: z10.literal("keep_command_result"),
1627
+ requestId: z10.string(),
1628
+ success: z10.boolean(),
1629
+ result: z10.unknown().optional(),
1630
+ error: z10.string().optional()
1631
+ });
1591
1632
  var SessionCreatedAction = shareableDocumentSchema.extend({
1592
1633
  action: z10.literal("session.created"),
1593
1634
  id: z10.string(),
@@ -1624,7 +1665,9 @@ var MessageDataToServer = z10.discriminatedUnion("action", [
1624
1665
  VoiceSessionSendTranscriptAction,
1625
1666
  VoiceSessionEndedAction,
1626
1667
  CliCompletionRequestAction,
1627
- CliToolRequestAction
1668
+ CliToolRequestAction,
1669
+ KeepCommandRequestAction,
1670
+ KeepCommandResponseAction
1628
1671
  ]);
1629
1672
  var MessageDataToClient = z10.discriminatedUnion("action", [
1630
1673
  DataSubscriptionUpdateAction,
@@ -1654,7 +1697,9 @@ var MessageDataToClient = z10.discriminatedUnion("action", [
1654
1697
  CliCompletionChunkAction,
1655
1698
  CliCompletionDoneAction,
1656
1699
  CliCompletionErrorAction,
1657
- CliToolResponseAction
1700
+ CliToolResponseAction,
1701
+ KeepCommandAction,
1702
+ KeepCommandResultAction
1658
1703
  ]);
1659
1704
 
1660
1705
  // ../../b4m-core/packages/common/dist/src/schemas/cliCompletions.js
@@ -2429,7 +2474,9 @@ var VALID_USER_TAGS = [
2429
2474
  "Customers",
2430
2475
  "customers",
2431
2476
  "Customer (GenAI)",
2432
- "sharing"
2477
+ "sharing",
2478
+ "Opti",
2479
+ "opti"
2433
2480
  ];
2434
2481
  var UserTagSchema = z19.enum(VALID_USER_TAGS);
2435
2482
  var AuthStrategy;
@@ -2855,6 +2902,8 @@ var LIVEOPS_TRIAGE_VALIDATION_LIMITS = {
2855
2902
  // Processing limits
2856
2903
  maxErrorsPerRun: { min: 1, max: 100, default: 50 },
2857
2904
  regressionLookbackDays: { min: 7, max: 180, default: 30 },
2905
+ regressionGracePeriodHours: { min: 1, max: 168, default: 48 },
2906
+ // 1 hour to 1 week, default 48 hours
2858
2907
  // Prompt template
2859
2908
  promptTemplate: { min: 50, max: 1e4 }
2860
2909
  };
@@ -2884,6 +2933,7 @@ var LiveopsTriageConfigSchema = z21.object({
2884
2933
  // Processing configuration
2885
2934
  maxErrorsPerRun: z21.number().min(LT.maxErrorsPerRun.min).max(LT.maxErrorsPerRun.max).default(LT.maxErrorsPerRun.default),
2886
2935
  regressionLookbackDays: z21.number().min(LT.regressionLookbackDays.min).max(LT.regressionLookbackDays.max).default(LT.regressionLookbackDays.default),
2936
+ regressionGracePeriodHours: z21.number().min(LT.regressionGracePeriodHours.min).max(LT.regressionGracePeriodHours.max).default(LT.regressionGracePeriodHours.default),
2887
2937
  autoCreateIssues: z21.boolean().default(false),
2888
2938
  // Custom prompt template (optional)
2889
2939
  promptTemplate: z21.string().min(LT.promptTemplate.min, `Prompt template must be at least ${LT.promptTemplate.min} characters`).max(LT.promptTemplate.max, `Prompt template cannot exceed ${LT.promptTemplate.max.toLocaleString()} characters`).trim().optional(),
@@ -4325,6 +4375,7 @@ var settingsMap = {
4325
4375
  timeoutMs: 6e4,
4326
4376
  maxErrorsPerRun: 50,
4327
4377
  regressionLookbackDays: 30,
4378
+ regressionGracePeriodHours: 48,
4328
4379
  autoCreateIssues: false
4329
4380
  },
4330
4381
  description: "Configuration for automated LiveOps triage system. Fetches error alerts from Slack, triages by priority using LLM, and creates GitHub issues automatically.",
@@ -5345,7 +5396,7 @@ var safeParseLatticeRule = (data) => {
5345
5396
  };
5346
5397
 
5347
5398
  // ../../b4m-core/packages/common/dist/src/constants/user.js
5348
- var PREDEFINED_USER_TAGS = ["Developer", "Analyst", "Customer"];
5399
+ var PREDEFINED_USER_TAGS = ["Developer", "Analyst", "Customer", "Opti"];
5349
5400
  var isPredefinedTag = (tag) => {
5350
5401
  return PREDEFINED_USER_TAGS.includes(tag);
5351
5402
  };
@@ -5353,6 +5404,31 @@ var getPredefinedTags = () => {
5353
5404
  return PREDEFINED_USER_TAGS;
5354
5405
  };
5355
5406
 
5407
+ // ../../b4m-core/packages/common/dist/src/constants/dataLakes.js
5408
+ var DATA_LAKES = [
5409
+ {
5410
+ id: "ionq-sales",
5411
+ name: "IonQ Sales Intelligence",
5412
+ requiredUserTag: "Opti",
5413
+ fileTagPrefix: "ionq:",
5414
+ datalakeTag: "datalake:ionq-sales"
5415
+ },
5416
+ {
5417
+ id: "opti-knowledge",
5418
+ name: "Optimization Knowledge Base",
5419
+ requiredUserTag: "Opti",
5420
+ fileTagPrefix: "opti:",
5421
+ datalakeTag: "datalake:opti-knowledge"
5422
+ }
5423
+ ];
5424
+ function getAccessibleDataLakes(userTags) {
5425
+ const normalizedUserTags = userTags.map((tag) => tag.toLowerCase());
5426
+ return DATA_LAKES.filter((dl) => normalizedUserTags.includes(dl.requiredUserTag.toLowerCase()));
5427
+ }
5428
+ function getDataLakeTags(userTags) {
5429
+ return getAccessibleDataLakes(userTags).map((dl) => dl.datalakeTag);
5430
+ }
5431
+
5356
5432
  // ../../b4m-core/packages/common/dist/src/llm.js
5357
5433
  import { z as z26 } from "zod";
5358
5434
  var DashboardParamsSchema = z26.object({
@@ -5780,6 +5856,7 @@ var LinkedInApi = class {
5780
5856
  };
5781
5857
 
5782
5858
  // ../../b4m-core/packages/common/dist/src/rateLimitHeaders.js
5859
+ var RATE_LIMIT_INTEGRATIONS = ["github", "jira", "confluence", "slack"];
5783
5860
  function getHeader(headers, name) {
5784
5861
  if (!headers || typeof headers !== "object")
5785
5862
  return null;
@@ -5828,16 +5905,24 @@ function parseRateLimitHeaders(headers) {
5828
5905
  }
5829
5906
  }
5830
5907
  let usagePercent = null;
5831
- if (limit !== null && limit > 0 && remaining !== null) {
5908
+ if (limit !== null && limit > 0 && remaining !== null && remaining >= 0) {
5832
5909
  usagePercent = Math.round((limit - remaining) / limit * 100);
5833
5910
  }
5834
5911
  return { limit, remaining, resetAt, retryAfterMs, usagePercent };
5835
5912
  }
5913
+ function hasRateLimitInfo(info) {
5914
+ return info.limit !== null || info.remaining !== null || info.retryAfterMs !== null;
5915
+ }
5836
5916
  function isNearLimit(info, thresholdPercent = 80) {
5837
5917
  if (info.usagePercent === null)
5838
5918
  return false;
5839
5919
  return info.usagePercent >= thresholdPercent;
5840
5920
  }
5921
+ function normalizeEndpoint(endpoint) {
5922
+ if (!endpoint || !endpoint.includes("/"))
5923
+ return endpoint;
5924
+ return endpoint.replace(/\/[A-Z][A-Z0-9]+-\d+/g, "/{key}").replace(/\/\d+/g, "/{id}").replace(/\/repos\/[^/]+\/[^/]+/, "/repos/{owner}/{repo}");
5925
+ }
5841
5926
  function buildRateLimitLogEntry(integration, endpoint, info, wasThrottled = false) {
5842
5927
  return {
5843
5928
  type: wasThrottled ? "RATE_LIMIT_ERROR" : "RATE_LIMIT",
@@ -6108,16 +6193,17 @@ var ConfluenceApi = class {
6108
6193
  body: options.body ? JSON.stringify(options.body) : void 0
6109
6194
  });
6110
6195
  const rateLimitInfo = parseRateLimitHeaders(response.headers);
6111
- if (rateLimitInfo.remaining !== null) {
6196
+ if (hasRateLimitInfo(rateLimitInfo)) {
6112
6197
  const logEntry = buildRateLimitLogEntry("confluence", path, rateLimitInfo);
6113
6198
  console.error(JSON.stringify(logEntry));
6114
- }
6115
- if (isNearLimit(rateLimitInfo)) {
6116
- console.error(`[Confluence] Rate limit warning: ${rateLimitInfo.usagePercent}% used (${rateLimitInfo.remaining}/${rateLimitInfo.limit} remaining)`);
6199
+ if (isNearLimit(rateLimitInfo)) {
6200
+ console.error(`[Confluence] Rate limit warning: ${rateLimitInfo.usagePercent}% used (${rateLimitInfo.remaining}/${rateLimitInfo.limit} remaining)`);
6201
+ }
6117
6202
  }
6118
6203
  if (response.status === 429 && (options._retryCount ?? 0) < 1) {
6119
6204
  const retryAfterMs = rateLimitInfo.retryAfterMs ?? 5e3;
6120
- const delayMs = Math.min(retryAfterMs, 1e4);
6205
+ const jitterMs = Math.floor(Math.random() * 1e3);
6206
+ const delayMs = Math.min(retryAfterMs + jitterMs, 1e4);
6121
6207
  const logEntry = buildRateLimitLogEntry("confluence", path, rateLimitInfo, true);
6122
6208
  console.error(JSON.stringify(logEntry));
6123
6209
  console.error(`[Confluence] Rate limited on ${path}, retrying after ${delayMs}ms`);
@@ -8327,16 +8413,17 @@ var JiraApi = class {
8327
8413
  body: options.body ? JSON.stringify(options.body) : void 0
8328
8414
  });
8329
8415
  const rateLimitInfo = parseRateLimitHeaders(response.headers);
8330
- if (rateLimitInfo.remaining !== null) {
8416
+ if (hasRateLimitInfo(rateLimitInfo)) {
8331
8417
  const logEntry = buildRateLimitLogEntry("jira", path, rateLimitInfo);
8332
8418
  console.error(JSON.stringify(logEntry));
8333
- }
8334
- if (isNearLimit(rateLimitInfo)) {
8335
- console.error(`[Jira] Rate limit warning: ${rateLimitInfo.usagePercent}% used (${rateLimitInfo.remaining}/${rateLimitInfo.limit} remaining)`);
8419
+ if (isNearLimit(rateLimitInfo)) {
8420
+ console.error(`[Jira] Rate limit warning: ${rateLimitInfo.usagePercent}% used (${rateLimitInfo.remaining}/${rateLimitInfo.limit} remaining)`);
8421
+ }
8336
8422
  }
8337
8423
  if (response.status === 429 && (options._retryCount ?? 0) < 1) {
8338
8424
  const retryAfterMs = rateLimitInfo.retryAfterMs ?? 5e3;
8339
- const delayMs = Math.min(retryAfterMs, 1e4);
8425
+ const jitterMs = Math.floor(Math.random() * 1e3);
8426
+ const delayMs = Math.min(retryAfterMs + jitterMs, 1e4);
8340
8427
  const logEntry = buildRateLimitLogEntry("jira", path, rateLimitInfo, true);
8341
8428
  console.error(JSON.stringify(logEntry));
8342
8429
  console.error(`[Jira] Rate limited on ${path}, retrying after ${delayMs}ms`);
@@ -10418,6 +10505,7 @@ export {
10418
10505
  shareableDocumentSchema,
10419
10506
  DefaultLLMParams,
10420
10507
  CollectionType,
10508
+ ROTATABLE_INTEGRATIONS,
10421
10509
  ApiKeyScope,
10422
10510
  ApiKeyStatus,
10423
10511
  MementoTier,
@@ -10473,6 +10561,7 @@ export {
10473
10561
  WebhookAuditStatus,
10474
10562
  COMMON_JIRA_WEBHOOK_EVENTS,
10475
10563
  JiraWebhookDeliveryStatus,
10564
+ AdminSystemPromptCategory,
10476
10565
  SupportedFabFileMimeTypes,
10477
10566
  REASONING_EFFORT_LABELS,
10478
10567
  REASONING_EFFORT_DESCRIPTIONS,
@@ -10511,6 +10600,10 @@ export {
10511
10600
  CliCompletionDoneAction,
10512
10601
  CliCompletionErrorAction,
10513
10602
  CliToolResponseAction,
10603
+ KeepCommandRequestAction,
10604
+ KeepCommandAction,
10605
+ KeepCommandResponseAction,
10606
+ KeepCommandResultAction,
10514
10607
  SessionCreatedAction,
10515
10608
  MessageDataToServer,
10516
10609
  MessageDataToClient,
@@ -10670,6 +10763,9 @@ export {
10670
10763
  PREDEFINED_USER_TAGS,
10671
10764
  isPredefinedTag,
10672
10765
  getPredefinedTags,
10766
+ DATA_LAKES,
10767
+ getAccessibleDataLakes,
10768
+ getDataLakeTags,
10673
10769
  DashboardParamsSchema,
10674
10770
  QuestMasterParamsSchema,
10675
10771
  ResearchModeConfigurationSchema,
@@ -10693,8 +10789,11 @@ export {
10693
10789
  extractSnippetMeta,
10694
10790
  searchSchema,
10695
10791
  LinkedInApi,
10792
+ RATE_LIMIT_INTEGRATIONS,
10696
10793
  parseRateLimitHeaders,
10794
+ hasRateLimitInfo,
10697
10795
  isNearLimit,
10796
+ normalizeEndpoint,
10698
10797
  buildRateLimitLogEntry,
10699
10798
  RESTRICTION_OPERATIONS,
10700
10799
  RESTRICTION_SUBJECT_TYPES,
@@ -6,12 +6,12 @@ import {
6
6
  getSettingsByNames,
7
7
  obfuscateApiKey,
8
8
  secureParameters
9
- } from "./chunk-5YLGNW2B.js";
9
+ } from "./chunk-Q3TLK7O5.js";
10
10
  import {
11
11
  ApiKeyType,
12
12
  MementoTier,
13
13
  isSupportedEmbeddingModel
14
- } from "./chunk-EY65E4W4.js";
14
+ } from "./chunk-DF2SGZ6Z.js";
15
15
 
16
16
  // ../../b4m-core/packages/services/dist/src/apiKeyService/get.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.37",
6
+ version: "0.2.38-docs-clawdbot-comparison-analysis.20242+f8dcf1ee7",
7
7
  type: "module",
8
8
  description: "Interactive CLI tool for Bike4Mind with ReAct agents",
9
9
  license: "UNLICENSED",
@@ -108,6 +108,7 @@ var package_default = {
108
108
  uuid: "^9.0.1",
109
109
  voyageai: "^0.0.4",
110
110
  "web-tree-sitter": "0.25.10",
111
+ ws: "^8.19.0",
111
112
  xlsx: "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
112
113
  yargs: "^17.7.2",
113
114
  yauzl: "^3.1.3",
@@ -117,10 +118,10 @@ var package_default = {
117
118
  },
118
119
  devDependencies: {
119
120
  "@bike4mind/agents": "0.1.0",
120
- "@bike4mind/common": "2.58.0",
121
- "@bike4mind/mcp": "1.32.5",
122
- "@bike4mind/services": "2.54.1",
123
- "@bike4mind/utils": "2.11.0",
121
+ "@bike4mind/common": "2.58.1-docs-clawdbot-comparison-analysis.20242+f8dcf1ee7",
122
+ "@bike4mind/mcp": "1.32.6-docs-clawdbot-comparison-analysis.20242+f8dcf1ee7",
123
+ "@bike4mind/services": "2.54.2-docs-clawdbot-comparison-analysis.20242+f8dcf1ee7",
124
+ "@bike4mind/utils": "2.11.1-docs-clawdbot-comparison-analysis.20242+f8dcf1ee7",
124
125
  "@types/better-sqlite3": "^7.6.13",
125
126
  "@types/diff": "^5.0.9",
126
127
  "@types/jsonwebtoken": "^9.0.4",
@@ -128,6 +129,7 @@ var package_default = {
128
129
  "@types/picomatch": "^4.0.2",
129
130
  "@types/react": "^19.2.7",
130
131
  "@types/uuid": "^9.0.7",
132
+ "@types/ws": "^8.18.1",
131
133
  "@types/yargs": "^17.0.32",
132
134
  "ink-testing-library": "^4.0.0",
133
135
  tsup: "^8.5.1",
@@ -138,7 +140,7 @@ var package_default = {
138
140
  optionalDependencies: {
139
141
  "@vscode/ripgrep": "^1.17.0"
140
142
  },
141
- gitHead: "474cb1d4152b065eb696701af0f8c20fb8daed57"
143
+ gitHead: "f8dcf1ee7bb87ee38b6ce61bb780d566af00eea0"
142
144
  };
143
145
 
144
146
  // src/utils/updateChecker.ts