@bike4mind/cli 0.8.1 → 0.9.0
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/{ConfigStore-Bj1IOvWn.mjs → ConfigStore-CAKSUXCi.mjs} +95 -20
- package/dist/commands/doctorCommand.mjs +1 -1
- package/dist/commands/headlessCommand.mjs +2 -2
- package/dist/commands/mcpCommand.mjs +1 -1
- package/dist/commands/updateCommand.mjs +1 -1
- package/dist/index.mjs +417 -227
- package/dist/{store-B0ImnWR4.mjs → store-DLduYYGR.mjs} +14 -0
- package/dist/store-YhSkjsW4.mjs +3 -0
- package/dist/{tools-DDoiKdgk.mjs → tools-B0Y_zziv.mjs} +69 -142
- package/dist/{updateChecker-BVKr0OXs.mjs → updateChecker-CtczXQeW.mjs} +1 -1
- package/package.json +11 -8
- package/dist/store-44C_Fvdb.mjs +0 -3
|
@@ -48,6 +48,18 @@ const useCliStore = create((set) => ({
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
}),
|
|
51
|
+
messageQueue: [],
|
|
52
|
+
enqueueMessage: (message) => set((state) => ({ messageQueue: [...state.messageQueue, message] })),
|
|
53
|
+
dequeueAllMessages: () => {
|
|
54
|
+
let all = [];
|
|
55
|
+
set((state) => {
|
|
56
|
+
if (state.messageQueue.length === 0) return state;
|
|
57
|
+
all = state.messageQueue;
|
|
58
|
+
return { messageQueue: [] };
|
|
59
|
+
});
|
|
60
|
+
return all;
|
|
61
|
+
},
|
|
62
|
+
clearMessageQueue: () => set({ messageQueue: [] }),
|
|
51
63
|
isThinking: false,
|
|
52
64
|
setIsThinking: (thinking) => set({ isThinking: thinking }),
|
|
53
65
|
inputValue: "",
|
|
@@ -126,6 +138,8 @@ const useCliStore = create((set) => ({
|
|
|
126
138
|
reviewGateQueue: rest
|
|
127
139
|
};
|
|
128
140
|
}),
|
|
141
|
+
exitHandoffPrompt: null,
|
|
142
|
+
setExitHandoffPrompt: (prompt) => set({ exitHandoffPrompt: prompt }),
|
|
129
143
|
showConfigEditor: false,
|
|
130
144
|
setShowConfigEditor: (show) => set({ showConfigEditor: show }),
|
|
131
145
|
showMcpViewer: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as ReceivedCreditTransaction, A as ImageGenerationUsageTransaction, At as resolveNavigationIntents, B as NotFoundError, C as FileEvents, Ct as getAccessibleDataLakes, D as GenericCreditAddTransaction, Dt as isGPTImage2Model, E as GenerateImageToolCallSchema, Et as getViewById, F as KnowledgeType, Ft as CollectionType, G as ProfileEvents, H as OpenAIImageGenerationInput, I as LLMEvents, J as PromptMetaZodSchema, K as ProjectEvents, L as MiscEvents, M as InboxEvents, Mt as secureParameters, N as InviteEvents, O as GenericCreditDeductTransaction, Ot as isGPTImageModel, P as InviteType, Q as RealtimeVoiceUsageTransaction, R as ModalEvents, S as FeedbackEvents, St as b4mLLMTools, T as GEMINI_IMAGE_MODELS, Tt as getMcpProviderMetadata, U as Permission, V as OpenAIEmbeddingModel, W as PermissionDeniedError, X as QuestMasterParamsSchema, Y as PurchaseTransaction, Z as REASONING_SUPPORTED_MODELS, _ as CompletionApiUsageTransaction, _t as VIDEO_SIZE_CONSTRAINTS, a as ApiKeyEvents, at as ResearchTaskType, b as FIXED_TEMPERATURE_MODELS, bt as VoyageAIEmbeddingModel, c as AppFileEvents, ct as SpeechToTextUsageTransaction, d as BFL_IMAGE_MODELS, dt as TagType, et as RechartsChartTypeList, f as BFL_SAFETY_TOLERANCE, ft as TaskScheduleHandler, g as ChatModels, gt as UiNavigationEvents, h as ChatCompletionCreateInputSchema, ht as TransferCreditTransaction, i as AiEvents, it as ResearchTaskPeriodicFrequencyType, j as ImageModels, jt as sanitizeTelemetryError, k as ImageEditUsageTransaction, kt as obfuscateApiKey, l as ArtifactTypeSchema, lt as SubscriptionCreditTransaction, mt as ToolUsageTransaction, n as logger, nt as ResearchModeParamsSchema, o as ApiKeyScope, ot as SessionEvents, p as BedrockEmbeddingModel, pt as TextGenerationUsageTransaction, q as PromptIntentSchema, r as ALERT_THRESHOLDS, rt as ResearchTaskExecutionType, s as ApiKeyType, st as SpeechToTextModels, t as ConfigStore, tt as RegInviteEvents, u as AuthEvents, ut as SupportedFabFileMimeTypes, v as DashboardParamsSchema, vt as VideoGenerationUsageTransaction, w as FriendshipEvents, wt as getDataLakeTags, x as FavoriteDocumentType, xt as XAI_IMAGE_MODELS, y as ElabsEvents, yt as VideoModels, z as ModelBackend } from "./ConfigStore-CAKSUXCi.mjs";
|
|
3
3
|
import { n as isPathAllowed, t as assertPathAllowed } from "./pathValidation-CIytuhr3-Dt5dntLx.mjs";
|
|
4
4
|
import { execFile, execFileSync, spawn } from "child_process";
|
|
5
5
|
import { createHash, randomBytes } from "crypto";
|
|
@@ -47,6 +47,8 @@ import "mammoth";
|
|
|
47
47
|
import "unpdf";
|
|
48
48
|
import "@aws-sdk/client-apigatewaymanagementapi";
|
|
49
49
|
import { InvokeCommand, LambdaClient } from "@aws-sdk/client-lambda";
|
|
50
|
+
import "speakeasy";
|
|
51
|
+
import "qrcode";
|
|
50
52
|
import FirecrawlApp, { FirecrawlError } from "@mendable/firecrawl-js";
|
|
51
53
|
import * as Diff from "diff";
|
|
52
54
|
import { diffLines } from "diff";
|
|
@@ -56,8 +58,6 @@ import times from "lodash/times.js";
|
|
|
56
58
|
import { all, create } from "mathjs";
|
|
57
59
|
import ExcelJS from "exceljs";
|
|
58
60
|
import { Chess } from "chess.js";
|
|
59
|
-
import "speakeasy";
|
|
60
|
-
import "qrcode";
|
|
61
61
|
import "lodash/throttle.js";
|
|
62
62
|
import "lodash/range.js";
|
|
63
63
|
import "bcryptjs";
|
|
@@ -523,17 +523,26 @@ const COMMANDS = [
|
|
|
523
523
|
name: "dirs",
|
|
524
524
|
description: "List all accessible directories"
|
|
525
525
|
},
|
|
526
|
+
{
|
|
527
|
+
name: "workflow",
|
|
528
|
+
description: "Show workflow overview or a specific section (decisions, blockers, handoff, review-gates; `gates` alias accepted)",
|
|
529
|
+
args: "[decisions|blockers|handoff|review-gates]"
|
|
530
|
+
},
|
|
526
531
|
{
|
|
527
532
|
name: "decisions",
|
|
528
|
-
description: "Show decision log for current session"
|
|
533
|
+
description: "Show decision log for current session (alias for /workflow decisions)"
|
|
529
534
|
},
|
|
530
535
|
{
|
|
531
536
|
name: "blockers",
|
|
532
|
-
description: "Show tracked blockers for current session"
|
|
537
|
+
description: "Show tracked blockers for current session (alias for /workflow blockers)"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
name: "review-gates",
|
|
541
|
+
description: "Show review gates for current session (alias for /workflow review-gates)"
|
|
533
542
|
},
|
|
534
543
|
{
|
|
535
544
|
name: "handoff",
|
|
536
|
-
description: "Show or generate the session handoff for cross-session continuity"
|
|
545
|
+
description: "Show or generate the session handoff for cross-session continuity (alias for /workflow handoff)"
|
|
537
546
|
}
|
|
538
547
|
];
|
|
539
548
|
/**
|
|
@@ -3149,6 +3158,17 @@ CORE BEHAVIOR:
|
|
|
3149
3158
|
- Use conversation history: Reference previous exchanges to understand context
|
|
3150
3159
|
- Complete tasks fully: Don't just show what to do - actually do it
|
|
3151
3160
|
|
|
3161
|
+
ABSOLUTE RULE — NEVER FABRICATE TOOL RESULTS:
|
|
3162
|
+
You MUST NOT claim that a file was created, edited, deleted, written, moved, or that a shell command, test, build, lint, or any other side-effecting operation ran, unless you actually invoked the corresponding tool in this turn AND received an observation back. The model's belief about what *would* happen is not a substitute for what *did* happen.
|
|
3163
|
+
|
|
3164
|
+
- ❌ NEVER write phrases like "File successfully edited", "I've updated the file", "I ran the command", "Done", "Fixed it", "The change is in place", or any equivalent past-tense success claim, unless a tool call in THIS turn produced an observation that confirms it.
|
|
3165
|
+
- ❌ NEVER summarize hypothetical changes as if they happened. If you describe a diff, the change must already be on disk.
|
|
3166
|
+
- ✅ If you have decided to act, the very next thing you produce MUST be a tool call (e.g. \`${TOOL_EDIT_LOCAL_FILE}\`, \`${TOOL_CREATE_FILE}\`, \`${TOOL_BASH_EXECUTE}\`), not a status message.
|
|
3167
|
+
- ✅ If the user said "yes please" / "go ahead" / "do it", that is authorization to call the tool — it is NOT permission to skip the tool call and narrate the outcome.
|
|
3168
|
+
- ✅ When you genuinely have not yet acted, use future tense ("I will edit X", "next I'll run Y") and then immediately call the tool.
|
|
3169
|
+
|
|
3170
|
+
This rule overrides every other instruction. Confabulating a successful side effect is the single worst failure mode you can produce; it leaves the user trusting work that does not exist.
|
|
3171
|
+
|
|
3152
3172
|
FOR SOFTWARE ENGINEERING TASKS:
|
|
3153
3173
|
When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this sequence:
|
|
3154
3174
|
1. **Understand:** Think about the user's request and the relevant codebase context. Use '${TOOL_GREP_SEARCH}' and '${TOOL_GLOB_FILES}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions. Use '${TOOL_FILE_READ}' to understand context and validate any assumptions you may have.
|
|
@@ -5100,6 +5120,18 @@ var OpenAIBackend = class {
|
|
|
5100
5120
|
if (options.tool_choice) parameters.tool_choice = options.tool_choice;
|
|
5101
5121
|
if (options.parallel_tool_calls !== void 0) parameters.parallel_tool_calls = options.parallel_tool_calls;
|
|
5102
5122
|
}
|
|
5123
|
+
if (options.responseFormat?.type === "json_schema") {
|
|
5124
|
+
const rf = options.responseFormat;
|
|
5125
|
+
parameters.response_format = {
|
|
5126
|
+
type: "json_schema",
|
|
5127
|
+
json_schema: {
|
|
5128
|
+
name: rf.json_schema.name,
|
|
5129
|
+
...rf.json_schema.description ? { description: rf.json_schema.description } : {},
|
|
5130
|
+
schema: rf.json_schema.schema,
|
|
5131
|
+
...rf.json_schema.strict !== void 0 ? { strict: rf.json_schema.strict } : { strict: true }
|
|
5132
|
+
}
|
|
5133
|
+
};
|
|
5134
|
+
} else if (options.responseFormat?.type === "text") parameters.response_format = { type: "text" };
|
|
5103
5135
|
const response = await withRetry(() => this._api.chat.completions.create(parameters, { signal: options.abortSignal }), {
|
|
5104
5136
|
maxRetries: 3,
|
|
5105
5137
|
initialDelayMs: 500,
|
|
@@ -5251,7 +5283,8 @@ var OpenAIBackend = class {
|
|
|
5251
5283
|
inputTokens: accumInputTokens + (response.usage?.prompt_tokens || 0),
|
|
5252
5284
|
outputTokens: accumOutputTokens + (response.usage?.completion_tokens || 0),
|
|
5253
5285
|
toolsUsed: toolsUsed.length > 0 ? toolsUsed : void 0,
|
|
5254
|
-
cacheStats
|
|
5286
|
+
cacheStats,
|
|
5287
|
+
...options.responseFormat?.type === "json_schema" ? { responseFormatMode: "native" } : {}
|
|
5255
5288
|
});
|
|
5256
5289
|
return;
|
|
5257
5290
|
}
|
|
@@ -5316,6 +5349,13 @@ var OpenAIBackend = class {
|
|
|
5316
5349
|
cacheStats = adapter.extractCacheStats(mockResponse, model);
|
|
5317
5350
|
if (cacheStats) logCacheStats(this.logger, cacheStats, { streaming: true });
|
|
5318
5351
|
}
|
|
5352
|
+
if ((isO1Model || func.length === 0) && options.responseFormat?.type === "json_schema") await callback([], {
|
|
5353
|
+
inputTokens: accumInputTokens + inputTokens,
|
|
5354
|
+
outputTokens: accumOutputTokens + outputTokens,
|
|
5355
|
+
toolsUsed: toolsUsed.length > 0 ? toolsUsed : void 0,
|
|
5356
|
+
cacheStats,
|
|
5357
|
+
responseFormatMode: "native"
|
|
5358
|
+
});
|
|
5319
5359
|
if (!isO1Model && func.length > 0) {
|
|
5320
5360
|
for (const tool of func) if (tool.name && tool.parameters) toolsUsed.push({
|
|
5321
5361
|
name: tool.name,
|
|
@@ -5493,129 +5533,6 @@ var OpenAIBackend = class {
|
|
|
5493
5533
|
}));
|
|
5494
5534
|
}
|
|
5495
5535
|
};
|
|
5496
|
-
var NotificationDeduplicator = class {
|
|
5497
|
-
errorGroups = /* @__PURE__ */ new Map();
|
|
5498
|
-
lowCreditTiers = {};
|
|
5499
|
-
ERROR_GROUPING_WINDOW_MS = 300 * 1e3;
|
|
5500
|
-
CLEANUP_INTERVAL_MS = 3600 * 1e3;
|
|
5501
|
-
LOW_CREDIT_RESET_INTERVAL_MS = 1440 * 60 * 1e3;
|
|
5502
|
-
constructor() {
|
|
5503
|
-
setInterval(() => this.cleanupOldEntries(), this.CLEANUP_INTERVAL_MS);
|
|
5504
|
-
}
|
|
5505
|
-
/**
|
|
5506
|
-
* Handle low credit notifications with tiered thresholds
|
|
5507
|
-
*/
|
|
5508
|
-
async handleLowCreditNotification(userId, username, email, currentCredits, organization, slackWebhookUrl) {
|
|
5509
|
-
if (!slackWebhookUrl) return;
|
|
5510
|
-
if (!this.lowCreditTiers[userId]) this.lowCreditTiers[userId] = {
|
|
5511
|
-
tier1000: false,
|
|
5512
|
-
tier300: false,
|
|
5513
|
-
tier0: false
|
|
5514
|
-
};
|
|
5515
|
-
const userTiers = this.lowCreditTiers[userId];
|
|
5516
|
-
let shouldNotify = false;
|
|
5517
|
-
let tierMessage = "";
|
|
5518
|
-
if (currentCredits <= 0 && !userTiers.tier0) {
|
|
5519
|
-
userTiers.tier0 = true;
|
|
5520
|
-
shouldNotify = true;
|
|
5521
|
-
tierMessage = "🚨 *CRITICAL* - User has run out of credits!";
|
|
5522
|
-
} else if (currentCredits <= 300 && !userTiers.tier300) {
|
|
5523
|
-
userTiers.tier300 = true;
|
|
5524
|
-
shouldNotify = true;
|
|
5525
|
-
tierMessage = "⚠️ *WARNING* - User credits critically low (≤300)";
|
|
5526
|
-
} else if (currentCredits <= 1e3 && !userTiers.tier1000) {
|
|
5527
|
-
userTiers.tier1000 = true;
|
|
5528
|
-
shouldNotify = true;
|
|
5529
|
-
tierMessage = "⚠️ *Low Credits Alert* - User credits below 1000";
|
|
5530
|
-
}
|
|
5531
|
-
if (shouldNotify) {
|
|
5532
|
-
await postMessageToSlack(slackWebhookUrl, `${tierMessage}\n*User:* ${username} (${email})\n*User ID:* ${userId}\n*Current Credits:* ${currentCredits}${organization ? `\n*Organization:* ${organization.name} (${organization.id})` : ""}`);
|
|
5533
|
-
Logger.info(`Sent tiered low credit notification for user ${userId} at ${currentCredits} credits`);
|
|
5534
|
-
}
|
|
5535
|
-
if (currentCredits > 1e3) {
|
|
5536
|
-
userTiers.tier1000 = false;
|
|
5537
|
-
userTiers.tier300 = false;
|
|
5538
|
-
userTiers.tier0 = false;
|
|
5539
|
-
} else if (currentCredits > 300) {
|
|
5540
|
-
userTiers.tier300 = false;
|
|
5541
|
-
userTiers.tier0 = false;
|
|
5542
|
-
} else if (currentCredits > 0) userTiers.tier0 = false;
|
|
5543
|
-
}
|
|
5544
|
-
/**
|
|
5545
|
-
* Handle error notifications with deduplication and grouping
|
|
5546
|
-
*/
|
|
5547
|
-
async handleErrorNotification(errorMessage, severity, metadata, logData, logEvent, stage, slackUrl) {
|
|
5548
|
-
const groupKey = `${severity}:${this.normalizeErrorMessage(errorMessage)}`;
|
|
5549
|
-
const now = /* @__PURE__ */ new Date();
|
|
5550
|
-
const existingEntry = this.errorGroups.get(groupKey);
|
|
5551
|
-
if (!existingEntry) {
|
|
5552
|
-
this.errorGroups.set(groupKey, {
|
|
5553
|
-
count: 1,
|
|
5554
|
-
firstOccurrence: now,
|
|
5555
|
-
lastOccurrence: now,
|
|
5556
|
-
lastNotificationSent: now
|
|
5557
|
-
});
|
|
5558
|
-
await this.sendErrorNotification(errorMessage, severity, metadata, logData, logEvent, stage, slackUrl, 1);
|
|
5559
|
-
} else {
|
|
5560
|
-
existingEntry.count++;
|
|
5561
|
-
existingEntry.lastOccurrence = now;
|
|
5562
|
-
if (now.getTime() - (existingEntry.lastNotificationSent?.getTime() || 0) >= this.ERROR_GROUPING_WINDOW_MS) {
|
|
5563
|
-
await this.sendErrorNotification(errorMessage, severity, metadata, logData, logEvent, stage, slackUrl, existingEntry.count, existingEntry.firstOccurrence, existingEntry.lastOccurrence);
|
|
5564
|
-
existingEntry.lastNotificationSent = now;
|
|
5565
|
-
}
|
|
5566
|
-
}
|
|
5567
|
-
}
|
|
5568
|
-
async sendErrorNotification(message, severity, metadata, logData, logEvent, stage, slackUrl, count, firstOccurrence, lastOccurrence) {
|
|
5569
|
-
const tags = Object.entries(metadata).map(([key, value]) => `\`${key}: ${value}\``).join(" ");
|
|
5570
|
-
const group = encodeURIComponent(logData.logGroup);
|
|
5571
|
-
const stream = encodeURIComponent(logData.logStream);
|
|
5572
|
-
const url = `https://console.aws.amazon.com/cloudwatch/home?region=${process.env.AWS_REGION}#logEventViewer:group=${group};stream=${stream};start=${logEvent.timestamp};end=${logEvent.timestamp}`;
|
|
5573
|
-
let slackMessage;
|
|
5574
|
-
if (count === 1) slackMessage = `*${severity.toUpperCase()}* - ${message}\n\`env: ${stage}\` ${tags} [AWS](${url})`;
|
|
5575
|
-
else {
|
|
5576
|
-
const duration = lastOccurrence && firstOccurrence ? this.formatDuration(lastOccurrence.getTime() - firstOccurrence.getTime()) : "";
|
|
5577
|
-
slackMessage = `*${severity.toUpperCase()}* - ${message}\n\`count: ${count}\` \`duration: ${duration}\` \`env: ${stage}\` ${tags} [AWS](${url})`;
|
|
5578
|
-
}
|
|
5579
|
-
await postMessageToSlack(slackUrl, slackMessage);
|
|
5580
|
-
}
|
|
5581
|
-
normalizeErrorMessage(message) {
|
|
5582
|
-
return message.replace(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/g, "[TIMESTAMP]").replace(/Request failed with status code \d+/g, "Request failed with status code [CODE]").replace(/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/g, "[UUID]").replace(/\b\d+\.\d+\.\d+\.\d+\b/g, "[IP]").substring(0, 200);
|
|
5583
|
-
}
|
|
5584
|
-
formatDuration(ms) {
|
|
5585
|
-
const seconds = Math.floor(ms / 1e3);
|
|
5586
|
-
const minutes = Math.floor(seconds / 60);
|
|
5587
|
-
const hours = Math.floor(minutes / 60);
|
|
5588
|
-
if (hours > 0) return `${hours}h ${minutes % 60}m`;
|
|
5589
|
-
if (minutes > 0) return `${minutes}m ${seconds % 60}s`;
|
|
5590
|
-
return `${seconds}s`;
|
|
5591
|
-
}
|
|
5592
|
-
cleanupOldEntries() {
|
|
5593
|
-
const cutoffTime = (/* @__PURE__ */ new Date()).getTime() - this.CLEANUP_INTERVAL_MS;
|
|
5594
|
-
for (const [key, entry] of Array.from(this.errorGroups.entries())) if (entry.lastOccurrence.getTime() < cutoffTime) this.errorGroups.delete(key);
|
|
5595
|
-
Logger.info(`Cleaned up old notification entries: ${this.errorGroups.size} error groups remaining`);
|
|
5596
|
-
}
|
|
5597
|
-
/**
|
|
5598
|
-
* Get current deduplication status (for monitoring)
|
|
5599
|
-
*/
|
|
5600
|
-
getStatus() {
|
|
5601
|
-
return {
|
|
5602
|
-
errorGroupsCount: this.errorGroups.size,
|
|
5603
|
-
lowCreditUsersTracked: Object.keys(this.lowCreditTiers).length
|
|
5604
|
-
};
|
|
5605
|
-
}
|
|
5606
|
-
};
|
|
5607
|
-
new NotificationDeduplicator();
|
|
5608
|
-
async function postMessageToSlack(slackWebhookUrl, message) {
|
|
5609
|
-
try {
|
|
5610
|
-
if (!slackWebhookUrl) {
|
|
5611
|
-
Logger.error("postMessageToSlack: Error posting message to Slack: slackWebhookUrl is not set");
|
|
5612
|
-
return;
|
|
5613
|
-
}
|
|
5614
|
-
await axios.post(slackWebhookUrl, { text: message }, { headers: { "Content-Type": "application/json" } });
|
|
5615
|
-
} catch (error) {
|
|
5616
|
-
Logger.error("Error posting message to Slack:", error);
|
|
5617
|
-
}
|
|
5618
|
-
}
|
|
5619
5536
|
BedrockEmbeddingModel.TITAN_TEXT_EMBEDDINGS_V2, BedrockEmbeddingModel.TITAN_TEXT_EMBEDDINGS_V2;
|
|
5620
5537
|
const OPENAI_EMBEDDING_MODEL_MAP = {
|
|
5621
5538
|
[OpenAIEmbeddingModel.TEXT_EMBEDDING_3_SMALL]: {
|
|
@@ -6732,6 +6649,10 @@ z.discriminatedUnion("type", [
|
|
|
6732
6649
|
createdAt: true,
|
|
6733
6650
|
updatedAt: true
|
|
6734
6651
|
}),
|
|
6652
|
+
SpeechToTextUsageTransaction.omit({
|
|
6653
|
+
createdAt: true,
|
|
6654
|
+
updatedAt: true
|
|
6655
|
+
}),
|
|
6735
6656
|
TransferCreditTransaction.omit({
|
|
6736
6657
|
createdAt: true,
|
|
6737
6658
|
updatedAt: true
|
|
@@ -6769,7 +6690,8 @@ z.object({
|
|
|
6769
6690
|
description: z.string().optional(),
|
|
6770
6691
|
billingContact: z.string().optional(),
|
|
6771
6692
|
currentCredits: z.coerce.number().optional(),
|
|
6772
|
-
systemPrompt: z.string().max(1e4).optional()
|
|
6693
|
+
systemPrompt: z.string().max(1e4).optional(),
|
|
6694
|
+
maxCreditsPerMember: z.number().positive().nullable().optional()
|
|
6773
6695
|
});
|
|
6774
6696
|
z.object({
|
|
6775
6697
|
id: z.string(),
|
|
@@ -6865,6 +6787,14 @@ z.object({
|
|
|
6865
6787
|
relativePath: z.string().optional()
|
|
6866
6788
|
});
|
|
6867
6789
|
//#endregion
|
|
6790
|
+
//#region ../../b4m-core/services/dist/mfaService/utils.mjs
|
|
6791
|
+
const originalEmitWarning = process.emitWarning;
|
|
6792
|
+
process.emitWarning = (warning, name) => {
|
|
6793
|
+
if (name === "DeprecationWarning" && warning?.toString().includes("Buffer")) return;
|
|
6794
|
+
return originalEmitWarning.call(process, warning, name);
|
|
6795
|
+
};
|
|
6796
|
+
process.emitWarning = originalEmitWarning;
|
|
6797
|
+
//#endregion
|
|
6868
6798
|
//#region ../../b4m-core/services/dist/llm/tools/implementation/websearch/index.mjs
|
|
6869
6799
|
async function serpApiSearch(adapters, query, num_results) {
|
|
6870
6800
|
const apiKey = await getSerperKey(adapters);
|
|
@@ -15069,14 +14999,6 @@ const generateMcpToolsFromCache = (serverName, cachedTools, callTool) => {
|
|
|
15069
14999
|
return result;
|
|
15070
15000
|
};
|
|
15071
15001
|
//#endregion
|
|
15072
|
-
//#region ../../b4m-core/services/dist/mfaService/utils.mjs
|
|
15073
|
-
const originalEmitWarning = process.emitWarning;
|
|
15074
|
-
process.emitWarning = (warning, name) => {
|
|
15075
|
-
if (name === "DeprecationWarning" && warning?.toString().includes("Buffer")) return;
|
|
15076
|
-
return originalEmitWarning.call(process, warning, name);
|
|
15077
|
-
};
|
|
15078
|
-
process.emitWarning = originalEmitWarning;
|
|
15079
|
-
//#endregion
|
|
15080
15002
|
//#region ../../b4m-core/services/dist/askUserQuestion-DyEMPAlD.mjs
|
|
15081
15003
|
let _showUserQuestion = null;
|
|
15082
15004
|
/**
|
|
@@ -15805,7 +15727,10 @@ z.object({
|
|
|
15805
15727
|
});
|
|
15806
15728
|
z.object({ userId: z.string() });
|
|
15807
15729
|
z.object({ userId: z.string() });
|
|
15808
|
-
z.object({
|
|
15730
|
+
z.object({
|
|
15731
|
+
targetUserId: z.string(),
|
|
15732
|
+
mfaToken: z.string()
|
|
15733
|
+
});
|
|
15809
15734
|
z.object({ key: z.string() });
|
|
15810
15735
|
z.object({
|
|
15811
15736
|
key: z.string(),
|
|
@@ -17036,7 +16961,9 @@ OpenAIImageGenerationInput.extend({
|
|
|
17036
16961
|
width: z.number().optional(),
|
|
17037
16962
|
height: z.number().optional(),
|
|
17038
16963
|
aspect_ratio: z.string().optional(),
|
|
17039
|
-
fabFileIds: z.array(z.string()).optional()
|
|
16964
|
+
fabFileIds: z.array(z.string()).optional(),
|
|
16965
|
+
/** Resolved by the API route. Defaults to 'fresh' if absent. */
|
|
16966
|
+
intent: PromptIntentSchema.optional()
|
|
17040
16967
|
});
|
|
17041
16968
|
z.object({
|
|
17042
16969
|
sessionId: z.string(),
|
|
@@ -19098,7 +19025,7 @@ function wrapToolWithPermission(tool, permissionManager, showPermissionPrompt, a
|
|
|
19098
19025
|
});
|
|
19099
19026
|
return result;
|
|
19100
19027
|
}
|
|
19101
|
-
const { useCliStore } = await import("./store-
|
|
19028
|
+
const { useCliStore } = await import("./store-YhSkjsW4.mjs");
|
|
19102
19029
|
const interactionMode = useCliStore.getState().interactionMode;
|
|
19103
19030
|
if (interactionMode === "plan" && !isReadOnlyTool(toolName) && !isWriteTargetingPlanFile(toolName, args)) {
|
|
19104
19031
|
const result = `Tool "${toolName}" is blocked while plan mode is active. Plan mode is read-only — research the codebase, then write your plan to a file under ${getPlanModeFileDir()}/. The user will press Shift+Tab to exit plan mode and authorize execution.`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
"dist",
|
|
31
31
|
"bin"
|
|
32
32
|
],
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=24.0.0"
|
|
35
|
+
},
|
|
33
36
|
"dependencies": {
|
|
34
37
|
"@anthropic-ai/sdk": "^0.79.0",
|
|
35
38
|
"@aws-sdk/client-apigatewaymanagementapi": "^3.1041.0",
|
|
@@ -103,12 +106,12 @@
|
|
|
103
106
|
"yauzl": "^3.3.0",
|
|
104
107
|
"zod": "^4.3.6",
|
|
105
108
|
"zod-validation-error": "^5.0.0",
|
|
106
|
-
"zustand": "^
|
|
109
|
+
"zustand": "^5.0.13"
|
|
107
110
|
},
|
|
108
111
|
"devDependencies": {
|
|
109
112
|
"@types/better-sqlite3": "^7.6.13",
|
|
110
113
|
"@types/jsonwebtoken": "^9.0.4",
|
|
111
|
-
"@types/node": "^
|
|
114
|
+
"@types/node": "^24.0.0",
|
|
112
115
|
"@types/picomatch": "^4.0.3",
|
|
113
116
|
"@types/react": "^19.2.14",
|
|
114
117
|
"@types/ws": "^8.18.1",
|
|
@@ -118,11 +121,11 @@
|
|
|
118
121
|
"tsx": "^4.21.0",
|
|
119
122
|
"typescript": "^5.9.3",
|
|
120
123
|
"vitest": "^4.1.2",
|
|
121
|
-
"@bike4mind/agents": "0.8.
|
|
122
|
-
"@bike4mind/common": "2.
|
|
123
|
-
"@bike4mind/mcp": "1.37.
|
|
124
|
-
"@bike4mind/
|
|
125
|
-
"@bike4mind/
|
|
124
|
+
"@bike4mind/agents": "0.8.3",
|
|
125
|
+
"@bike4mind/common": "2.94.0",
|
|
126
|
+
"@bike4mind/mcp": "1.37.7",
|
|
127
|
+
"@bike4mind/services": "2.82.0",
|
|
128
|
+
"@bike4mind/utils": "2.20.0"
|
|
126
129
|
},
|
|
127
130
|
"optionalDependencies": {
|
|
128
131
|
"@vscode/ripgrep": "^1.17.1"
|
package/dist/store-44C_Fvdb.mjs
DELETED