@bike4mind/cli 0.8.0 → 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 +464 -240
- package/dist/{store-B0ImnWR4.mjs → store-DLduYYGR.mjs} +14 -0
- package/dist/store-YhSkjsW4.mjs +3 -0
- package/dist/{tools-Dg1HL5PO.mjs → tools-B0Y_zziv.mjs} +78 -142
- package/dist/{updateChecker-Bbkc_8IL.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
|
/**
|
|
@@ -2268,6 +2277,15 @@ Remember: You are an autonomous AGENT. Act independently and solve problems proa
|
|
|
2268
2277
|
return this.toolCallCount;
|
|
2269
2278
|
}
|
|
2270
2279
|
/**
|
|
2280
|
+
* Get current iteration count.
|
|
2281
|
+
* Cheap accessor for hot paths (e.g., per-step event listeners) — prefer this
|
|
2282
|
+
* over `toCheckpoint().iteration`, which deep-clones messages, steps, and
|
|
2283
|
+
* confidence log on every call.
|
|
2284
|
+
*/
|
|
2285
|
+
getIteration() {
|
|
2286
|
+
return this.iterations;
|
|
2287
|
+
}
|
|
2288
|
+
/**
|
|
2271
2289
|
* Serialize the agent's current execution state for persistence.
|
|
2272
2290
|
*
|
|
2273
2291
|
* Call this after each iteration to create a durable checkpoint that can
|
|
@@ -3140,6 +3158,17 @@ CORE BEHAVIOR:
|
|
|
3140
3158
|
- Use conversation history: Reference previous exchanges to understand context
|
|
3141
3159
|
- Complete tasks fully: Don't just show what to do - actually do it
|
|
3142
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
|
+
|
|
3143
3172
|
FOR SOFTWARE ENGINEERING TASKS:
|
|
3144
3173
|
When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this sequence:
|
|
3145
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.
|
|
@@ -5091,6 +5120,18 @@ var OpenAIBackend = class {
|
|
|
5091
5120
|
if (options.tool_choice) parameters.tool_choice = options.tool_choice;
|
|
5092
5121
|
if (options.parallel_tool_calls !== void 0) parameters.parallel_tool_calls = options.parallel_tool_calls;
|
|
5093
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" };
|
|
5094
5135
|
const response = await withRetry(() => this._api.chat.completions.create(parameters, { signal: options.abortSignal }), {
|
|
5095
5136
|
maxRetries: 3,
|
|
5096
5137
|
initialDelayMs: 500,
|
|
@@ -5242,7 +5283,8 @@ var OpenAIBackend = class {
|
|
|
5242
5283
|
inputTokens: accumInputTokens + (response.usage?.prompt_tokens || 0),
|
|
5243
5284
|
outputTokens: accumOutputTokens + (response.usage?.completion_tokens || 0),
|
|
5244
5285
|
toolsUsed: toolsUsed.length > 0 ? toolsUsed : void 0,
|
|
5245
|
-
cacheStats
|
|
5286
|
+
cacheStats,
|
|
5287
|
+
...options.responseFormat?.type === "json_schema" ? { responseFormatMode: "native" } : {}
|
|
5246
5288
|
});
|
|
5247
5289
|
return;
|
|
5248
5290
|
}
|
|
@@ -5307,6 +5349,13 @@ var OpenAIBackend = class {
|
|
|
5307
5349
|
cacheStats = adapter.extractCacheStats(mockResponse, model);
|
|
5308
5350
|
if (cacheStats) logCacheStats(this.logger, cacheStats, { streaming: true });
|
|
5309
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
|
+
});
|
|
5310
5359
|
if (!isO1Model && func.length > 0) {
|
|
5311
5360
|
for (const tool of func) if (tool.name && tool.parameters) toolsUsed.push({
|
|
5312
5361
|
name: tool.name,
|
|
@@ -5484,129 +5533,6 @@ var OpenAIBackend = class {
|
|
|
5484
5533
|
}));
|
|
5485
5534
|
}
|
|
5486
5535
|
};
|
|
5487
|
-
var NotificationDeduplicator = class {
|
|
5488
|
-
errorGroups = /* @__PURE__ */ new Map();
|
|
5489
|
-
lowCreditTiers = {};
|
|
5490
|
-
ERROR_GROUPING_WINDOW_MS = 300 * 1e3;
|
|
5491
|
-
CLEANUP_INTERVAL_MS = 3600 * 1e3;
|
|
5492
|
-
LOW_CREDIT_RESET_INTERVAL_MS = 1440 * 60 * 1e3;
|
|
5493
|
-
constructor() {
|
|
5494
|
-
setInterval(() => this.cleanupOldEntries(), this.CLEANUP_INTERVAL_MS);
|
|
5495
|
-
}
|
|
5496
|
-
/**
|
|
5497
|
-
* Handle low credit notifications with tiered thresholds
|
|
5498
|
-
*/
|
|
5499
|
-
async handleLowCreditNotification(userId, username, email, currentCredits, organization, slackWebhookUrl) {
|
|
5500
|
-
if (!slackWebhookUrl) return;
|
|
5501
|
-
if (!this.lowCreditTiers[userId]) this.lowCreditTiers[userId] = {
|
|
5502
|
-
tier1000: false,
|
|
5503
|
-
tier300: false,
|
|
5504
|
-
tier0: false
|
|
5505
|
-
};
|
|
5506
|
-
const userTiers = this.lowCreditTiers[userId];
|
|
5507
|
-
let shouldNotify = false;
|
|
5508
|
-
let tierMessage = "";
|
|
5509
|
-
if (currentCredits <= 0 && !userTiers.tier0) {
|
|
5510
|
-
userTiers.tier0 = true;
|
|
5511
|
-
shouldNotify = true;
|
|
5512
|
-
tierMessage = "🚨 *CRITICAL* - User has run out of credits!";
|
|
5513
|
-
} else if (currentCredits <= 300 && !userTiers.tier300) {
|
|
5514
|
-
userTiers.tier300 = true;
|
|
5515
|
-
shouldNotify = true;
|
|
5516
|
-
tierMessage = "⚠️ *WARNING* - User credits critically low (≤300)";
|
|
5517
|
-
} else if (currentCredits <= 1e3 && !userTiers.tier1000) {
|
|
5518
|
-
userTiers.tier1000 = true;
|
|
5519
|
-
shouldNotify = true;
|
|
5520
|
-
tierMessage = "⚠️ *Low Credits Alert* - User credits below 1000";
|
|
5521
|
-
}
|
|
5522
|
-
if (shouldNotify) {
|
|
5523
|
-
await postMessageToSlack(slackWebhookUrl, `${tierMessage}\n*User:* ${username} (${email})\n*User ID:* ${userId}\n*Current Credits:* ${currentCredits}${organization ? `\n*Organization:* ${organization.name} (${organization.id})` : ""}`);
|
|
5524
|
-
Logger.info(`Sent tiered low credit notification for user ${userId} at ${currentCredits} credits`);
|
|
5525
|
-
}
|
|
5526
|
-
if (currentCredits > 1e3) {
|
|
5527
|
-
userTiers.tier1000 = false;
|
|
5528
|
-
userTiers.tier300 = false;
|
|
5529
|
-
userTiers.tier0 = false;
|
|
5530
|
-
} else if (currentCredits > 300) {
|
|
5531
|
-
userTiers.tier300 = false;
|
|
5532
|
-
userTiers.tier0 = false;
|
|
5533
|
-
} else if (currentCredits > 0) userTiers.tier0 = false;
|
|
5534
|
-
}
|
|
5535
|
-
/**
|
|
5536
|
-
* Handle error notifications with deduplication and grouping
|
|
5537
|
-
*/
|
|
5538
|
-
async handleErrorNotification(errorMessage, severity, metadata, logData, logEvent, stage, slackUrl) {
|
|
5539
|
-
const groupKey = `${severity}:${this.normalizeErrorMessage(errorMessage)}`;
|
|
5540
|
-
const now = /* @__PURE__ */ new Date();
|
|
5541
|
-
const existingEntry = this.errorGroups.get(groupKey);
|
|
5542
|
-
if (!existingEntry) {
|
|
5543
|
-
this.errorGroups.set(groupKey, {
|
|
5544
|
-
count: 1,
|
|
5545
|
-
firstOccurrence: now,
|
|
5546
|
-
lastOccurrence: now,
|
|
5547
|
-
lastNotificationSent: now
|
|
5548
|
-
});
|
|
5549
|
-
await this.sendErrorNotification(errorMessage, severity, metadata, logData, logEvent, stage, slackUrl, 1);
|
|
5550
|
-
} else {
|
|
5551
|
-
existingEntry.count++;
|
|
5552
|
-
existingEntry.lastOccurrence = now;
|
|
5553
|
-
if (now.getTime() - (existingEntry.lastNotificationSent?.getTime() || 0) >= this.ERROR_GROUPING_WINDOW_MS) {
|
|
5554
|
-
await this.sendErrorNotification(errorMessage, severity, metadata, logData, logEvent, stage, slackUrl, existingEntry.count, existingEntry.firstOccurrence, existingEntry.lastOccurrence);
|
|
5555
|
-
existingEntry.lastNotificationSent = now;
|
|
5556
|
-
}
|
|
5557
|
-
}
|
|
5558
|
-
}
|
|
5559
|
-
async sendErrorNotification(message, severity, metadata, logData, logEvent, stage, slackUrl, count, firstOccurrence, lastOccurrence) {
|
|
5560
|
-
const tags = Object.entries(metadata).map(([key, value]) => `\`${key}: ${value}\``).join(" ");
|
|
5561
|
-
const group = encodeURIComponent(logData.logGroup);
|
|
5562
|
-
const stream = encodeURIComponent(logData.logStream);
|
|
5563
|
-
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}`;
|
|
5564
|
-
let slackMessage;
|
|
5565
|
-
if (count === 1) slackMessage = `*${severity.toUpperCase()}* - ${message}\n\`env: ${stage}\` ${tags} [AWS](${url})`;
|
|
5566
|
-
else {
|
|
5567
|
-
const duration = lastOccurrence && firstOccurrence ? this.formatDuration(lastOccurrence.getTime() - firstOccurrence.getTime()) : "";
|
|
5568
|
-
slackMessage = `*${severity.toUpperCase()}* - ${message}\n\`count: ${count}\` \`duration: ${duration}\` \`env: ${stage}\` ${tags} [AWS](${url})`;
|
|
5569
|
-
}
|
|
5570
|
-
await postMessageToSlack(slackUrl, slackMessage);
|
|
5571
|
-
}
|
|
5572
|
-
normalizeErrorMessage(message) {
|
|
5573
|
-
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);
|
|
5574
|
-
}
|
|
5575
|
-
formatDuration(ms) {
|
|
5576
|
-
const seconds = Math.floor(ms / 1e3);
|
|
5577
|
-
const minutes = Math.floor(seconds / 60);
|
|
5578
|
-
const hours = Math.floor(minutes / 60);
|
|
5579
|
-
if (hours > 0) return `${hours}h ${minutes % 60}m`;
|
|
5580
|
-
if (minutes > 0) return `${minutes}m ${seconds % 60}s`;
|
|
5581
|
-
return `${seconds}s`;
|
|
5582
|
-
}
|
|
5583
|
-
cleanupOldEntries() {
|
|
5584
|
-
const cutoffTime = (/* @__PURE__ */ new Date()).getTime() - this.CLEANUP_INTERVAL_MS;
|
|
5585
|
-
for (const [key, entry] of Array.from(this.errorGroups.entries())) if (entry.lastOccurrence.getTime() < cutoffTime) this.errorGroups.delete(key);
|
|
5586
|
-
Logger.info(`Cleaned up old notification entries: ${this.errorGroups.size} error groups remaining`);
|
|
5587
|
-
}
|
|
5588
|
-
/**
|
|
5589
|
-
* Get current deduplication status (for monitoring)
|
|
5590
|
-
*/
|
|
5591
|
-
getStatus() {
|
|
5592
|
-
return {
|
|
5593
|
-
errorGroupsCount: this.errorGroups.size,
|
|
5594
|
-
lowCreditUsersTracked: Object.keys(this.lowCreditTiers).length
|
|
5595
|
-
};
|
|
5596
|
-
}
|
|
5597
|
-
};
|
|
5598
|
-
new NotificationDeduplicator();
|
|
5599
|
-
async function postMessageToSlack(slackWebhookUrl, message) {
|
|
5600
|
-
try {
|
|
5601
|
-
if (!slackWebhookUrl) {
|
|
5602
|
-
Logger.error("postMessageToSlack: Error posting message to Slack: slackWebhookUrl is not set");
|
|
5603
|
-
return;
|
|
5604
|
-
}
|
|
5605
|
-
await axios.post(slackWebhookUrl, { text: message }, { headers: { "Content-Type": "application/json" } });
|
|
5606
|
-
} catch (error) {
|
|
5607
|
-
Logger.error("Error posting message to Slack:", error);
|
|
5608
|
-
}
|
|
5609
|
-
}
|
|
5610
5536
|
BedrockEmbeddingModel.TITAN_TEXT_EMBEDDINGS_V2, BedrockEmbeddingModel.TITAN_TEXT_EMBEDDINGS_V2;
|
|
5611
5537
|
const OPENAI_EMBEDDING_MODEL_MAP = {
|
|
5612
5538
|
[OpenAIEmbeddingModel.TEXT_EMBEDDING_3_SMALL]: {
|
|
@@ -6723,6 +6649,10 @@ z.discriminatedUnion("type", [
|
|
|
6723
6649
|
createdAt: true,
|
|
6724
6650
|
updatedAt: true
|
|
6725
6651
|
}),
|
|
6652
|
+
SpeechToTextUsageTransaction.omit({
|
|
6653
|
+
createdAt: true,
|
|
6654
|
+
updatedAt: true
|
|
6655
|
+
}),
|
|
6726
6656
|
TransferCreditTransaction.omit({
|
|
6727
6657
|
createdAt: true,
|
|
6728
6658
|
updatedAt: true
|
|
@@ -6760,7 +6690,8 @@ z.object({
|
|
|
6760
6690
|
description: z.string().optional(),
|
|
6761
6691
|
billingContact: z.string().optional(),
|
|
6762
6692
|
currentCredits: z.coerce.number().optional(),
|
|
6763
|
-
systemPrompt: z.string().max(1e4).optional()
|
|
6693
|
+
systemPrompt: z.string().max(1e4).optional(),
|
|
6694
|
+
maxCreditsPerMember: z.number().positive().nullable().optional()
|
|
6764
6695
|
});
|
|
6765
6696
|
z.object({
|
|
6766
6697
|
id: z.string(),
|
|
@@ -6856,6 +6787,14 @@ z.object({
|
|
|
6856
6787
|
relativePath: z.string().optional()
|
|
6857
6788
|
});
|
|
6858
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
|
|
6859
6798
|
//#region ../../b4m-core/services/dist/llm/tools/implementation/websearch/index.mjs
|
|
6860
6799
|
async function serpApiSearch(adapters, query, num_results) {
|
|
6861
6800
|
const apiKey = await getSerperKey(adapters);
|
|
@@ -15060,14 +14999,6 @@ const generateMcpToolsFromCache = (serverName, cachedTools, callTool) => {
|
|
|
15060
14999
|
return result;
|
|
15061
15000
|
};
|
|
15062
15001
|
//#endregion
|
|
15063
|
-
//#region ../../b4m-core/services/dist/mfaService/utils.mjs
|
|
15064
|
-
const originalEmitWarning = process.emitWarning;
|
|
15065
|
-
process.emitWarning = (warning, name) => {
|
|
15066
|
-
if (name === "DeprecationWarning" && warning?.toString().includes("Buffer")) return;
|
|
15067
|
-
return originalEmitWarning.call(process, warning, name);
|
|
15068
|
-
};
|
|
15069
|
-
process.emitWarning = originalEmitWarning;
|
|
15070
|
-
//#endregion
|
|
15071
15002
|
//#region ../../b4m-core/services/dist/askUserQuestion-DyEMPAlD.mjs
|
|
15072
15003
|
let _showUserQuestion = null;
|
|
15073
15004
|
/**
|
|
@@ -15796,7 +15727,10 @@ z.object({
|
|
|
15796
15727
|
});
|
|
15797
15728
|
z.object({ userId: z.string() });
|
|
15798
15729
|
z.object({ userId: z.string() });
|
|
15799
|
-
z.object({
|
|
15730
|
+
z.object({
|
|
15731
|
+
targetUserId: z.string(),
|
|
15732
|
+
mfaToken: z.string()
|
|
15733
|
+
});
|
|
15800
15734
|
z.object({ key: z.string() });
|
|
15801
15735
|
z.object({
|
|
15802
15736
|
key: z.string(),
|
|
@@ -17027,7 +16961,9 @@ OpenAIImageGenerationInput.extend({
|
|
|
17027
16961
|
width: z.number().optional(),
|
|
17028
16962
|
height: z.number().optional(),
|
|
17029
16963
|
aspect_ratio: z.string().optional(),
|
|
17030
|
-
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()
|
|
17031
16967
|
});
|
|
17032
16968
|
z.object({
|
|
17033
16969
|
sessionId: z.string(),
|
|
@@ -19089,7 +19025,7 @@ function wrapToolWithPermission(tool, permissionManager, showPermissionPrompt, a
|
|
|
19089
19025
|
});
|
|
19090
19026
|
return result;
|
|
19091
19027
|
}
|
|
19092
|
-
const { useCliStore } = await import("./store-
|
|
19028
|
+
const { useCliStore } = await import("./store-YhSkjsW4.mjs");
|
|
19093
19029
|
const interactionMode = useCliStore.getState().interactionMode;
|
|
19094
19030
|
if (interactionMode === "plan" && !isReadOnlyTool(toolName) && !isWriteTargetingPlanFile(toolName, args)) {
|
|
19095
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.
|
|
122
|
-
"@bike4mind/common": "2.
|
|
123
|
-
"@bike4mind/mcp": "1.37.
|
|
124
|
-
"@bike4mind/services": "2.
|
|
125
|
-
"@bike4mind/utils": "2.
|
|
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