@bike4mind/cli 0.2.60 → 0.2.61-feat-pi-intelligence-visibility.21705
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/{artifactExtractor-YB2LOUUT.js → artifactExtractor-UI7MK2WJ.js} +1 -1
- package/dist/bashExecute-GLGLD3JD.js +379 -0
- package/dist/{chunk-I6CFAOBC.js → chunk-43D4HP62.js} +2 -2
- package/dist/{chunk-3BBKI54Z.js → chunk-BHX4ZDRS.js} +7 -7
- package/dist/{chunk-R5RVIU2Q.js → chunk-FIQZKJJW.js} +2 -2
- package/dist/{chunk-3YQJY7XO.js → chunk-HD2W2IIP.js} +20 -0
- package/dist/{chunk-WGZBP2RV.js → chunk-HIL7VU5N.js} +3558 -4406
- package/dist/chunk-LTLJRF6I.js +44 -0
- package/dist/{chunk-VFTGF46N.js → chunk-MRD767FA.js} +83 -10
- package/dist/{chunk-DSUZXGAO.js → chunk-Q4X33IU7.js} +2 -2
- package/dist/{chunk-E2GWB6BT.js → chunk-SLQS2YOB.js} +1 -1
- package/dist/commands/doctorCommand.js +1 -1
- package/dist/commands/headlessCommand.js +12 -11
- package/dist/commands/mcpCommand.js +2 -2
- package/dist/commands/updateCommand.js +1 -1
- package/dist/{create-PLDWPQDE.js → create-HVZTJCDH.js} +3 -3
- package/dist/createFile-6PSPLW6R.js +71 -0
- package/dist/deleteFile-AUSRLWIK.js +73 -0
- package/dist/globFiles-TSRN64N2.js +120 -0
- package/dist/grepSearch-634XWZOJ.js +216 -0
- package/dist/index.js +10 -9
- package/dist/{llmMarkdownGenerator-GJET3GJG.js → llmMarkdownGenerator-QT4CMIAP.js} +1 -1
- package/dist/{markdownGenerator-6RRUHY4M.js → markdownGenerator-VCEAQJ4R.js} +1 -1
- package/dist/{mementoService-NG5TZ6MH.js → mementoService-X6KHF3A5.js} +3 -3
- package/dist/{src-KFBFVZ7M.js → src-4SIKEV27.js} +3 -1
- package/dist/{src-72EECVVN.js → src-7M7IDZPJ.js} +2 -2
- package/dist/{subtractCredits-TVFMVBNC.js → subtractCredits-2VCKP4HK.js} +3 -3
- package/package.json +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CurationArtifactType
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HD2W2IIP.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;
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// ../../b4m-core/packages/services/dist/src/llm/tools/implementation/bashExecute/index.js
|
|
4
|
+
import { spawn } from "child_process";
|
|
5
|
+
import path from "path";
|
|
6
|
+
var DEFAULT_TIMEOUT_MS = 6e4;
|
|
7
|
+
var MAX_OUTPUT_SIZE = 100 * 1024;
|
|
8
|
+
var DANGEROUS_PATTERNS = [
|
|
9
|
+
// Destructive file operations
|
|
10
|
+
{
|
|
11
|
+
pattern: /\brm\s+(-[a-zA-Z]*r[a-zA-Z]*\s+|.*\s+-[a-zA-Z]*r).*\//i,
|
|
12
|
+
reason: "Recursive delete with path",
|
|
13
|
+
block: true
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
pattern: /\brm\s+(-[a-zA-Z]*f[a-zA-Z]*\s+|.*\s+-[a-zA-Z]*f).*--no-preserve-root/i,
|
|
17
|
+
reason: "Force delete without preserve root",
|
|
18
|
+
block: true
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
pattern: /\brm\s+-[a-zA-Z]*r[a-zA-Z]*f[a-zA-Z]*\s+\//i,
|
|
22
|
+
reason: "Recursive force delete on root paths",
|
|
23
|
+
block: true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
pattern: /\brm\s+-[a-zA-Z]*f[a-zA-Z]*r[a-zA-Z]*\s+\//i,
|
|
27
|
+
reason: "Force recursive delete on root paths",
|
|
28
|
+
block: true
|
|
29
|
+
},
|
|
30
|
+
// System-level dangerous commands
|
|
31
|
+
{ pattern: /\bsudo\b/i, reason: "Elevated privileges (sudo)", block: true },
|
|
32
|
+
{ pattern: /\bsu\s+(-|root)/i, reason: "Switch to root user", block: true },
|
|
33
|
+
{ pattern: /\bchmod\s+777\b/i, reason: "Overly permissive chmod", block: false },
|
|
34
|
+
{ pattern: /\bchown\s+-R\s+root/i, reason: "Recursive chown to root", block: true },
|
|
35
|
+
// Disk/partition operations
|
|
36
|
+
{ pattern: /\bmkfs\b/i, reason: "Filesystem creation", block: true },
|
|
37
|
+
{ pattern: /\bfdisk\b/i, reason: "Disk partitioning", block: true },
|
|
38
|
+
{ pattern: /\bdd\s+.*of=\/dev\//i, reason: "Direct disk write", block: true },
|
|
39
|
+
// Network attacks
|
|
40
|
+
{ pattern: /\b(nc|netcat)\s+.*-e\s+\/bin\/(ba)?sh/i, reason: "Reverse shell attempt", block: true },
|
|
41
|
+
{ pattern: /\bcurl\s+.*\|\s*(ba)?sh/i, reason: "Piping remote script to shell", block: true },
|
|
42
|
+
{ pattern: /\bwget\s+.*\|\s*(ba)?sh/i, reason: "Piping remote script to shell", block: true },
|
|
43
|
+
// Fork bombs and resource exhaustion
|
|
44
|
+
{ pattern: /:\(\)\s*\{\s*:\|:&\s*\}\s*;/i, reason: "Fork bomb", block: true },
|
|
45
|
+
{ pattern: /\bwhile\s+true.*do.*done.*&/i, reason: "Infinite loop in background", block: false },
|
|
46
|
+
// Credential/sensitive data access
|
|
47
|
+
{ pattern: /\/etc\/shadow/i, reason: "Access to shadow file", block: true },
|
|
48
|
+
{ pattern: /\/etc\/passwd.*>/i, reason: "Modifying passwd file", block: true },
|
|
49
|
+
{ pattern: /\baws\s+.*--profile\s+/i, reason: "AWS profile access", block: false },
|
|
50
|
+
// History/log manipulation
|
|
51
|
+
{ pattern: /\bhistory\s+-c\b/i, reason: "Clearing shell history", block: false },
|
|
52
|
+
{ pattern: />\s*\/var\/log\//i, reason: "Overwriting system logs", block: true },
|
|
53
|
+
// Dangerous redirects
|
|
54
|
+
{ pattern: />\s*\/dev\/sda/i, reason: "Writing to block device", block: true },
|
|
55
|
+
{ pattern: />\s*\/dev\/null.*2>&1.*</i, reason: "Potentially hiding output", block: false },
|
|
56
|
+
// Environment manipulation
|
|
57
|
+
{ pattern: /\bexport\s+PATH\s*=\s*[^$]/i, reason: "Overwriting PATH", block: false },
|
|
58
|
+
{ pattern: /\bexport\s+LD_PRELOAD/i, reason: "LD_PRELOAD manipulation", block: true },
|
|
59
|
+
// Process/system control
|
|
60
|
+
{ pattern: /\bkill\s+-9\s+(-1|1)\b/i, reason: "Killing all processes", block: true },
|
|
61
|
+
{ pattern: /\bkillall\s+-9\b/i, reason: "Force killing processes", block: false },
|
|
62
|
+
{ pattern: /\bshutdown\b/i, reason: "System shutdown", block: true },
|
|
63
|
+
{ pattern: /\breboot\b/i, reason: "System reboot", block: true },
|
|
64
|
+
{ pattern: /\binit\s+[06]\b/i, reason: "System runlevel change", block: true }
|
|
65
|
+
];
|
|
66
|
+
var SAFE_COMMAND_PREFIXES = [
|
|
67
|
+
"ls",
|
|
68
|
+
"cat",
|
|
69
|
+
"head",
|
|
70
|
+
"tail",
|
|
71
|
+
"grep",
|
|
72
|
+
"find",
|
|
73
|
+
"echo",
|
|
74
|
+
"pwd",
|
|
75
|
+
"whoami",
|
|
76
|
+
"date",
|
|
77
|
+
"cal",
|
|
78
|
+
"wc",
|
|
79
|
+
"sort",
|
|
80
|
+
"uniq",
|
|
81
|
+
"cut",
|
|
82
|
+
"tr",
|
|
83
|
+
"sed",
|
|
84
|
+
"awk",
|
|
85
|
+
"git",
|
|
86
|
+
"npm",
|
|
87
|
+
"pnpm",
|
|
88
|
+
"yarn",
|
|
89
|
+
"node",
|
|
90
|
+
"npx",
|
|
91
|
+
"tsx",
|
|
92
|
+
"ts-node",
|
|
93
|
+
"python",
|
|
94
|
+
"python3",
|
|
95
|
+
"pip",
|
|
96
|
+
"pip3",
|
|
97
|
+
"docker",
|
|
98
|
+
"docker-compose",
|
|
99
|
+
"curl",
|
|
100
|
+
"wget",
|
|
101
|
+
// These are safe for fetching, blocked when piped to shell
|
|
102
|
+
"mkdir",
|
|
103
|
+
"touch",
|
|
104
|
+
"cp",
|
|
105
|
+
"mv",
|
|
106
|
+
// File operations (still require permission)
|
|
107
|
+
"which",
|
|
108
|
+
"whereis",
|
|
109
|
+
"type",
|
|
110
|
+
"file",
|
|
111
|
+
"stat",
|
|
112
|
+
"env",
|
|
113
|
+
"printenv",
|
|
114
|
+
"set",
|
|
115
|
+
"man",
|
|
116
|
+
"help",
|
|
117
|
+
"info",
|
|
118
|
+
"diff",
|
|
119
|
+
"comm",
|
|
120
|
+
"cmp",
|
|
121
|
+
"tar",
|
|
122
|
+
"zip",
|
|
123
|
+
"unzip",
|
|
124
|
+
"gzip",
|
|
125
|
+
"gunzip",
|
|
126
|
+
"ssh",
|
|
127
|
+
"scp",
|
|
128
|
+
"rsync",
|
|
129
|
+
// Network tools
|
|
130
|
+
"make",
|
|
131
|
+
"cmake",
|
|
132
|
+
"cargo",
|
|
133
|
+
"go",
|
|
134
|
+
"rustc",
|
|
135
|
+
"gcc",
|
|
136
|
+
"g++",
|
|
137
|
+
// Build tools
|
|
138
|
+
"jest",
|
|
139
|
+
"vitest",
|
|
140
|
+
"mocha",
|
|
141
|
+
"pytest",
|
|
142
|
+
// Test runners
|
|
143
|
+
"eslint",
|
|
144
|
+
"prettier",
|
|
145
|
+
"tsc"
|
|
146
|
+
// Linters/formatters
|
|
147
|
+
];
|
|
148
|
+
function checkDangerousPatterns(command) {
|
|
149
|
+
for (const { pattern, reason, block } of DANGEROUS_PATTERNS) {
|
|
150
|
+
if (pattern.test(command)) {
|
|
151
|
+
return { blocked: block, reason };
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return { blocked: false };
|
|
155
|
+
}
|
|
156
|
+
function getBaseCommand(command) {
|
|
157
|
+
const trimmed = command.trim();
|
|
158
|
+
const match = trimmed.match(/^(\S+)/);
|
|
159
|
+
return match ? match[1] : "";
|
|
160
|
+
}
|
|
161
|
+
function isSafeCommandPrefix(command) {
|
|
162
|
+
const baseCommand = getBaseCommand(command);
|
|
163
|
+
return SAFE_COMMAND_PREFIXES.some((safe) => baseCommand === safe || baseCommand.endsWith(`/${safe}`));
|
|
164
|
+
}
|
|
165
|
+
async function executeBashCommand(params) {
|
|
166
|
+
const { command, cwd: relativeCwd, timeout = DEFAULT_TIMEOUT_MS } = params;
|
|
167
|
+
if (!command || command.trim().length === 0) {
|
|
168
|
+
return {
|
|
169
|
+
stdout: "",
|
|
170
|
+
stderr: "Error: Command cannot be empty",
|
|
171
|
+
exitCode: 1,
|
|
172
|
+
timedOut: false,
|
|
173
|
+
blocked: true,
|
|
174
|
+
blockedReason: "Empty command"
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
const dangerCheck = checkDangerousPatterns(command);
|
|
178
|
+
if (dangerCheck.blocked) {
|
|
179
|
+
return {
|
|
180
|
+
stdout: "",
|
|
181
|
+
stderr: `Command blocked for safety: ${dangerCheck.reason}`,
|
|
182
|
+
exitCode: 1,
|
|
183
|
+
timedOut: false,
|
|
184
|
+
blocked: true,
|
|
185
|
+
blockedReason: dangerCheck.reason
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
const baseCwd = process.cwd();
|
|
189
|
+
const targetCwd = relativeCwd ? path.resolve(baseCwd, relativeCwd) : baseCwd;
|
|
190
|
+
const effectiveTimeout = Math.min(timeout, 5 * 60 * 1e3);
|
|
191
|
+
return new Promise((resolve) => {
|
|
192
|
+
let stdout = "";
|
|
193
|
+
let stderr = "";
|
|
194
|
+
let timedOut = false;
|
|
195
|
+
const proc = spawn("bash", ["-c", command], {
|
|
196
|
+
cwd: targetCwd,
|
|
197
|
+
env: {
|
|
198
|
+
...process.env,
|
|
199
|
+
// Prevent color codes that might be hard to read
|
|
200
|
+
NO_COLOR: "1",
|
|
201
|
+
FORCE_COLOR: "0"
|
|
202
|
+
},
|
|
203
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
204
|
+
});
|
|
205
|
+
const timeoutId = setTimeout(() => {
|
|
206
|
+
timedOut = true;
|
|
207
|
+
proc.kill("SIGTERM");
|
|
208
|
+
setTimeout(() => {
|
|
209
|
+
if (!proc.killed) {
|
|
210
|
+
proc.kill("SIGKILL");
|
|
211
|
+
}
|
|
212
|
+
}, 5e3);
|
|
213
|
+
}, effectiveTimeout);
|
|
214
|
+
proc.stdout.on("data", (data) => {
|
|
215
|
+
if (stdout.length < MAX_OUTPUT_SIZE) {
|
|
216
|
+
stdout += data.toString();
|
|
217
|
+
if (stdout.length > MAX_OUTPUT_SIZE) {
|
|
218
|
+
stdout = stdout.slice(0, MAX_OUTPUT_SIZE) + "\n... [output truncated]";
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
proc.stderr.on("data", (data) => {
|
|
223
|
+
if (stderr.length < MAX_OUTPUT_SIZE) {
|
|
224
|
+
stderr += data.toString();
|
|
225
|
+
if (stderr.length > MAX_OUTPUT_SIZE) {
|
|
226
|
+
stderr = stderr.slice(0, MAX_OUTPUT_SIZE) + "\n... [output truncated]";
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
proc.on("close", (exitCode) => {
|
|
231
|
+
clearTimeout(timeoutId);
|
|
232
|
+
resolve({
|
|
233
|
+
stdout: stdout.trim(),
|
|
234
|
+
stderr: stderr.trim(),
|
|
235
|
+
exitCode,
|
|
236
|
+
timedOut,
|
|
237
|
+
blocked: false
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
proc.on("error", (error) => {
|
|
241
|
+
clearTimeout(timeoutId);
|
|
242
|
+
resolve({
|
|
243
|
+
stdout: "",
|
|
244
|
+
stderr: `Failed to execute command: ${error.message}`,
|
|
245
|
+
exitCode: 1,
|
|
246
|
+
timedOut: false,
|
|
247
|
+
blocked: false
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
function formatResult(result, command) {
|
|
253
|
+
const parts = [];
|
|
254
|
+
parts.push(`$ ${command}`);
|
|
255
|
+
parts.push("");
|
|
256
|
+
if (result.blocked) {
|
|
257
|
+
parts.push(`BLOCKED: ${result.blockedReason}`);
|
|
258
|
+
parts.push("");
|
|
259
|
+
parts.push("This command was blocked for safety reasons.");
|
|
260
|
+
parts.push("If you believe this is a false positive, please run the command manually.");
|
|
261
|
+
return parts.join("\n");
|
|
262
|
+
}
|
|
263
|
+
if (result.timedOut) {
|
|
264
|
+
parts.push("WARNING: Command timed out and was terminated.");
|
|
265
|
+
parts.push("");
|
|
266
|
+
}
|
|
267
|
+
if (result.stdout) {
|
|
268
|
+
parts.push(result.stdout);
|
|
269
|
+
}
|
|
270
|
+
if (result.stderr) {
|
|
271
|
+
if (result.stdout) {
|
|
272
|
+
parts.push("");
|
|
273
|
+
}
|
|
274
|
+
parts.push("STDERR:");
|
|
275
|
+
parts.push(result.stderr);
|
|
276
|
+
}
|
|
277
|
+
if (result.exitCode !== 0 && result.exitCode !== null) {
|
|
278
|
+
parts.push("");
|
|
279
|
+
parts.push(`Exit code: ${result.exitCode}`);
|
|
280
|
+
}
|
|
281
|
+
if (!result.stdout && !result.stderr && !result.timedOut) {
|
|
282
|
+
parts.push("(command completed with no output)");
|
|
283
|
+
}
|
|
284
|
+
return parts.join("\n");
|
|
285
|
+
}
|
|
286
|
+
var bashExecuteTool = {
|
|
287
|
+
name: "bash_execute",
|
|
288
|
+
implementation: (context) => ({
|
|
289
|
+
toolFn: async (value) => {
|
|
290
|
+
const params = value;
|
|
291
|
+
const isSafe = isSafeCommandPrefix(params.command);
|
|
292
|
+
context.logger.info("Bash: Executing command", {
|
|
293
|
+
command: params.command,
|
|
294
|
+
cwd: params.cwd || ".",
|
|
295
|
+
timeout: params.timeout || DEFAULT_TIMEOUT_MS,
|
|
296
|
+
isSafeCommand: isSafe
|
|
297
|
+
});
|
|
298
|
+
if (context.onStart) {
|
|
299
|
+
await context.onStart("bash_execute", {
|
|
300
|
+
command: params.command,
|
|
301
|
+
cwd: params.cwd
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
try {
|
|
305
|
+
const result = await executeBashCommand(params);
|
|
306
|
+
const formattedResult = formatResult(result, params.command);
|
|
307
|
+
context.logger.info("Bash: Command completed", {
|
|
308
|
+
exitCode: result.exitCode,
|
|
309
|
+
timedOut: result.timedOut,
|
|
310
|
+
blocked: result.blocked
|
|
311
|
+
});
|
|
312
|
+
if (context.onFinish) {
|
|
313
|
+
await context.onFinish("bash_execute", {
|
|
314
|
+
command: params.command,
|
|
315
|
+
exitCode: result.exitCode,
|
|
316
|
+
blocked: result.blocked
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
return formattedResult;
|
|
320
|
+
} catch (error) {
|
|
321
|
+
context.logger.error("Bash: Command failed", error);
|
|
322
|
+
if (context.onFinish) {
|
|
323
|
+
await context.onFinish("bash_execute", {
|
|
324
|
+
command: params.command,
|
|
325
|
+
error: error instanceof Error ? error.message : "Unknown error"
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
throw error;
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
toolSchema: {
|
|
332
|
+
name: "bash_execute",
|
|
333
|
+
description: `Execute a bash command in the terminal. Use this for running shell commands, scripts, build tools, git operations, and other CLI tasks.
|
|
334
|
+
|
|
335
|
+
SAFETY NOTES:
|
|
336
|
+
- Commands are executed in the current working directory (or specified cwd)
|
|
337
|
+
- Dangerous commands (sudo, rm -rf /, etc.) are automatically blocked
|
|
338
|
+
- Commands have a default timeout of 60 seconds (max 5 minutes)
|
|
339
|
+
- Output is limited to prevent overwhelming responses
|
|
340
|
+
- This tool ALWAYS requires user permission before execution
|
|
341
|
+
|
|
342
|
+
COMMON USE CASES:
|
|
343
|
+
- Running build commands: npm run build, make, cargo build
|
|
344
|
+
- Git operations: git status, git log, git diff
|
|
345
|
+
- Viewing system info: ls, pwd, cat, head, tail
|
|
346
|
+
- Running tests: npm test, pytest, cargo test
|
|
347
|
+
- Package management: npm install, pip install
|
|
348
|
+
- File operations: mkdir, cp, mv (with permission)
|
|
349
|
+
|
|
350
|
+
BLOCKED OPERATIONS:
|
|
351
|
+
- sudo and privilege escalation
|
|
352
|
+
- Recursive deletes on system paths
|
|
353
|
+
- Direct disk operations
|
|
354
|
+
- Fork bombs and resource exhaustion
|
|
355
|
+
- Piping remote scripts to shell`,
|
|
356
|
+
parameters: {
|
|
357
|
+
type: "object",
|
|
358
|
+
properties: {
|
|
359
|
+
command: {
|
|
360
|
+
type: "string",
|
|
361
|
+
description: "The bash command to execute. Can include pipes, redirects, and chained commands."
|
|
362
|
+
},
|
|
363
|
+
cwd: {
|
|
364
|
+
type: "string",
|
|
365
|
+
description: "Working directory for the command (optional). Can be relative or absolute path. Defaults to current directory."
|
|
366
|
+
},
|
|
367
|
+
timeout: {
|
|
368
|
+
type: "number",
|
|
369
|
+
description: "Timeout in milliseconds (optional, default: 60000, max: 300000). Command will be terminated if it exceeds this time."
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
required: ["command"]
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
})
|
|
376
|
+
};
|
|
377
|
+
export {
|
|
378
|
+
bashExecuteTool
|
|
379
|
+
};
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getSettingsMap,
|
|
8
8
|
getSettingsValue,
|
|
9
9
|
secureParameters
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MRD767FA.js";
|
|
11
11
|
import {
|
|
12
12
|
KnowledgeType,
|
|
13
13
|
SupportedFabFileMimeTypes
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HD2W2IIP.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/fabFileService/create.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.
|
|
6
|
+
version: "0.2.61-feat-pi-intelligence-visibility.21705+4927fe8fb",
|
|
7
7
|
type: "module",
|
|
8
8
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
9
9
|
license: "UNLICENSED",
|
|
@@ -118,11 +118,11 @@ var package_default = {
|
|
|
118
118
|
zustand: "^4.5.4"
|
|
119
119
|
},
|
|
120
120
|
devDependencies: {
|
|
121
|
-
"@bike4mind/agents": "0.2.
|
|
122
|
-
"@bike4mind/common": "2.73.
|
|
123
|
-
"@bike4mind/mcp": "1.33.
|
|
124
|
-
"@bike4mind/services": "2.68.
|
|
125
|
-
"@bike4mind/utils": "2.15.
|
|
121
|
+
"@bike4mind/agents": "0.2.5-feat-pi-intelligence-visibility.21705+4927fe8fb",
|
|
122
|
+
"@bike4mind/common": "2.73.1-feat-pi-intelligence-visibility.21705+4927fe8fb",
|
|
123
|
+
"@bike4mind/mcp": "1.33.19-feat-pi-intelligence-visibility.21705+4927fe8fb",
|
|
124
|
+
"@bike4mind/services": "2.68.1-feat-pi-intelligence-visibility.21705+4927fe8fb",
|
|
125
|
+
"@bike4mind/utils": "2.15.13-feat-pi-intelligence-visibility.21705+4927fe8fb",
|
|
126
126
|
"@types/better-sqlite3": "^7.6.13",
|
|
127
127
|
"@types/jsonwebtoken": "^9.0.4",
|
|
128
128
|
"@types/node": "^22.9.0",
|
|
@@ -139,7 +139,7 @@ var package_default = {
|
|
|
139
139
|
optionalDependencies: {
|
|
140
140
|
"@vscode/ripgrep": "^1.17.1"
|
|
141
141
|
},
|
|
142
|
-
gitHead: "
|
|
142
|
+
gitHead: "4927fe8fbd64bba4678d9c9971fa3dd99ca98ab3"
|
|
143
143
|
};
|
|
144
144
|
|
|
145
145
|
// src/utils/updateChecker.ts
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BadRequestError,
|
|
4
4
|
secureParameters
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MRD767FA.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-
|
|
16
|
+
} from "./chunk-HD2W2IIP.js";
|
|
17
17
|
|
|
18
18
|
// ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
|
|
19
19
|
import { z } from "zod";
|
|
@@ -111,6 +111,9 @@ var ChatModels;
|
|
|
111
111
|
ChatModels2["GPT5_1_CHAT_LATEST"] = "gpt-5.1-chat-latest";
|
|
112
112
|
ChatModels2["GPT5_2"] = "gpt-5.2";
|
|
113
113
|
ChatModels2["GPT5_2_CHAT_LATEST"] = "gpt-5.2-chat-latest";
|
|
114
|
+
ChatModels2["GPT5_4"] = "gpt-5.4";
|
|
115
|
+
ChatModels2["GPT5_4_MINI"] = "gpt-5.4-mini";
|
|
116
|
+
ChatModels2["GPT5_4_NANO"] = "gpt-5.4-nano";
|
|
114
117
|
ChatModels2["LLAMA3_INSTRUCT_8B_V1"] = "meta.llama3-8b-instruct-v1:0";
|
|
115
118
|
ChatModels2["LLAMA3_INSTRUCT_70B_V1"] = "meta.llama3-70b-instruct-v1:0";
|
|
116
119
|
ChatModels2["LLAMA4_MAVERICK_17B_INSTRUCT_BEDROCK"] = "us.meta.llama4-maverick-17b-instruct-v1:0";
|
|
@@ -2020,6 +2023,21 @@ var TavernHeartbeatLogAction = z11.object({
|
|
|
2020
2023
|
}).optional()
|
|
2021
2024
|
})
|
|
2022
2025
|
});
|
|
2026
|
+
var TavernQuestUpdateAction = z11.object({
|
|
2027
|
+
action: z11.literal("tavern_quest_update"),
|
|
2028
|
+
/** The full refreshed quest list (top-level only, no sub-quests) */
|
|
2029
|
+
quests: z11.array(z11.object({
|
|
2030
|
+
_id: z11.string(),
|
|
2031
|
+
title: z11.string(),
|
|
2032
|
+
description: z11.string(),
|
|
2033
|
+
postedByAgentName: z11.string(),
|
|
2034
|
+
claimedByAgentName: z11.string().optional(),
|
|
2035
|
+
status: z11.enum(["open", "claimed", "completed", "expired"]),
|
|
2036
|
+
difficulty: z11.enum(["easy", "medium", "hard"]).optional(),
|
|
2037
|
+
completionNote: z11.string().optional(),
|
|
2038
|
+
createdAt: z11.string()
|
|
2039
|
+
}))
|
|
2040
|
+
});
|
|
2023
2041
|
var SessionCreatedAction = shareableDocumentSchema.extend({
|
|
2024
2042
|
action: z11.literal("session.created"),
|
|
2025
2043
|
id: z11.string(),
|
|
@@ -2095,6 +2113,7 @@ var MessageDataToClient = z11.discriminatedUnion("action", [
|
|
|
2095
2113
|
KeepCommandResultAction,
|
|
2096
2114
|
TavernSceneBroadcastAction,
|
|
2097
2115
|
TavernHeartbeatLogAction,
|
|
2116
|
+
TavernQuestUpdateAction,
|
|
2098
2117
|
JupyterNotebookProgressAction,
|
|
2099
2118
|
DataLakeBatchProgressAction
|
|
2100
2119
|
]);
|
|
@@ -12031,6 +12050,7 @@ export {
|
|
|
12031
12050
|
TavernSceneCommandRequestAction,
|
|
12032
12051
|
TavernSceneBroadcastAction,
|
|
12033
12052
|
TavernHeartbeatLogAction,
|
|
12053
|
+
TavernQuestUpdateAction,
|
|
12034
12054
|
SessionCreatedAction,
|
|
12035
12055
|
MessageDataToServer,
|
|
12036
12056
|
MessageDataToClient,
|