@bike4mind/cli 0.2.61 → 0.2.62-chore-7507-migrate-tsdown.21783

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.
Files changed (85) hide show
  1. package/bin/bike4mind-cli.mjs +11 -6
  2. package/dist/BubblewrapRuntime-BHbtqvLx.mjs +72 -0
  3. package/dist/ConfigStore-CU7wlCsb.mjs +8613 -0
  4. package/dist/ImageStore-DaKT_Ew8.mjs +202 -0
  5. package/dist/ProxyManager-Dl2nFk-A.mjs +259 -0
  6. package/dist/ProxyManager-kiOD1X8-.mjs +3 -0
  7. package/dist/SandboxOrchestrator-BEW3rqYi.mjs +159 -0
  8. package/dist/SandboxOrchestrator-CHZgSR3P.mjs +3 -0
  9. package/dist/SandboxRuntimeAdapter-C1B4t20N.mjs +57 -0
  10. package/dist/SandboxRuntimeAdapter-D7UAG13n.mjs +3 -0
  11. package/dist/SeatbeltRuntime-D4m0VOcD.mjs +116 -0
  12. package/dist/StderrViolationParser-D0afQ3-1.mjs +70 -0
  13. package/dist/ViolationLogStore-CZl35HcA.mjs +96 -0
  14. package/dist/bashExecute-BTkdqlSs-5foM20Lb.mjs +466 -0
  15. package/dist/commands/doctorCommand.mjs +101 -0
  16. package/dist/commands/headlessCommand.mjs +319 -0
  17. package/dist/commands/mcpCommand.mjs +218 -0
  18. package/dist/commands/updateCommand.mjs +40 -0
  19. package/dist/createFile-yQfh8uvk-I-yM5DxC.mjs +63 -0
  20. package/dist/deleteFile-DKHfnyny-G3b1Kj2T.mjs +66 -0
  21. package/dist/globFiles-D1en6joM-8jekiXdX.mjs +100 -0
  22. package/dist/grepSearch-aMamoBn_-DCJcY8JS.mjs +173 -0
  23. package/dist/index.mjs +6722 -0
  24. package/dist/pathValidation-Cgjh5WQO-DiCZTcq6.mjs +63 -0
  25. package/dist/store-Dw1nZX2Y.mjs +128 -0
  26. package/dist/store-nZExNOWX.mjs +3 -0
  27. package/dist/terminalSetup-rmr1P8KF.mjs +254 -0
  28. package/dist/tools-ClfYr17t.mjs +20906 -0
  29. package/dist/treeSitterEngine-DCSXcm_3.mjs +309 -0
  30. package/dist/types-DBEjF9YS.mjs +59 -0
  31. package/dist/types-DK3P88Px.mjs +3 -0
  32. package/dist/updateChecker-BdYpg62G.mjs +120 -0
  33. package/package.json +10 -10
  34. package/dist/BubblewrapRuntime-PMIOLWKR.js +0 -71
  35. package/dist/HydrationEngine-YL2HWJ3V.js +0 -9
  36. package/dist/ImageStore-MMUOUPI2.js +0 -224
  37. package/dist/ProxyManager-HEB4TLVX.js +0 -7
  38. package/dist/SandboxOrchestrator-UIJ5GYBB.js +0 -8
  39. package/dist/SandboxRuntimeAdapter-FQ56MAB2.js +0 -13
  40. package/dist/SeatbeltRuntime-EE3TTLEP.js +0 -98
  41. package/dist/StderrViolationParser-7OYPM2DJ.js +0 -59
  42. package/dist/ViolationLogStore-RIIUVURH.js +0 -104
  43. package/dist/artifactExtractor-TK2FFZ4C.js +0 -180
  44. package/dist/bashExecute-GLGLD3JD.js +0 -379
  45. package/dist/chunk-22G2T3X7.js +0 -1079
  46. package/dist/chunk-4BIBE3J7.js +0 -48
  47. package/dist/chunk-4QTLLPJJ.js +0 -12421
  48. package/dist/chunk-6RJWHTIX.js +0 -19111
  49. package/dist/chunk-76NSNH4E.js +0 -13618
  50. package/dist/chunk-BDQBOLYG.js +0 -120
  51. package/dist/chunk-BPFEGDC7.js +0 -192
  52. package/dist/chunk-F5WF4RWS.js +0 -161
  53. package/dist/chunk-G4ZGEQFT.js +0 -250
  54. package/dist/chunk-GQGOWACU.js +0 -770
  55. package/dist/chunk-JTBRGW2F.js +0 -95
  56. package/dist/chunk-KQAMBXAW.js +0 -163
  57. package/dist/chunk-LTLJRF6I.js +0 -44
  58. package/dist/chunk-PFBYGCOW.js +0 -449
  59. package/dist/chunk-QWB6ZYY4.js +0 -48
  60. package/dist/chunk-RFVINAUP.js +0 -241
  61. package/dist/chunk-UB2LL4RE.js +0 -245
  62. package/dist/chunk-Y4WOJJM3.js +0 -147
  63. package/dist/commands/doctorCommand.js +0 -87
  64. package/dist/commands/headlessCommand.js +0 -380
  65. package/dist/commands/mcpCommand.js +0 -203
  66. package/dist/commands/updateCommand.js +0 -42
  67. package/dist/create-NVG5T7TG.js +0 -12
  68. package/dist/createFile-6PSPLW6R.js +0 -71
  69. package/dist/deleteFile-AUSRLWIK.js +0 -73
  70. package/dist/formatConverter-5QEJDW24.js +0 -7
  71. package/dist/globFiles-TSRN64N2.js +0 -120
  72. package/dist/grepSearch-634XWZOJ.js +0 -216
  73. package/dist/index.js +0 -6779
  74. package/dist/llmMarkdownGenerator-EYODN3A7.js +0 -371
  75. package/dist/markdownGenerator-JGCTGPEX.js +0 -269
  76. package/dist/mementoService-OT4FL5SA.js +0 -12
  77. package/dist/notificationDeduplicator-HUC53NEW.js +0 -9
  78. package/dist/src-2AUTMBAJ.js +0 -319
  79. package/dist/src-Z43GIM7S.js +0 -1099
  80. package/dist/store-CAB6BV3P.js +0 -11
  81. package/dist/subtractCredits-JKD3JDC2.js +0 -12
  82. package/dist/terminalSetup-C5FHMLC3.js +0 -214
  83. package/dist/treeSitterEngine-4SGFQDY3.js +0 -330
  84. package/dist/types-KB5NP6T4.js +0 -7
  85. package/dist/utils-JCHWDM4Z.js +0 -31
@@ -121,6 +121,11 @@ const argv = await yargs(hideBin(process.argv))
121
121
  .alias('version', 'V')
122
122
  .parse();
123
123
 
124
+ // Suppress dotenv startup log unless verbose mode is enabled
125
+ if (!argv.verbose && !argv['debug-stream']) {
126
+ process.env.DOTENV_CONFIG_QUIET = 'true';
127
+ }
128
+
124
129
  // Set environment variables from CLI flags
125
130
  if (argv.verbose) {
126
131
  process.env.B4M_VERBOSE = '1';
@@ -144,7 +149,7 @@ if (argv['ollama-host']) {
144
149
  }
145
150
 
146
151
  // Auto-detect environment: prefer production mode when dist exists
147
- const distPath = join(__dirname, '../dist/index.js');
152
+ const distPath = join(__dirname, '../dist/index.mjs');
148
153
  const srcPath = join(__dirname, '../src/index.tsx');
149
154
  const hasSource = existsSync(srcPath);
150
155
  const hasDist = existsSync(distPath);
@@ -171,7 +176,7 @@ if (argv.prompt !== undefined) {
171
176
  const module = await import('../src/commands/headlessCommand.ts');
172
177
  handleHeadlessCommand = module.handleHeadlessCommand;
173
178
  } else {
174
- const module = await import('../dist/commands/headlessCommand.js');
179
+ const module = await import('../dist/commands/headlessCommand.mjs');
175
180
  handleHeadlessCommand = module.handleHeadlessCommand;
176
181
  }
177
182
 
@@ -206,7 +211,7 @@ if (argv._[0] === 'mcp') {
206
211
  handleMcpCommand = module.handleMcpCommand;
207
212
  } else {
208
213
  // Production: import compiled JavaScript
209
- const module = await import('../dist/commands/mcpCommand.js');
214
+ const module = await import('../dist/commands/mcpCommand.mjs');
210
215
  handleMcpCommand = module.handleMcpCommand;
211
216
  }
212
217
 
@@ -229,7 +234,7 @@ if (argv._[0] === 'update') {
229
234
  const module = await import('../src/commands/updateCommand.ts');
230
235
  handleUpdateCommand = module.handleUpdateCommand;
231
236
  } else {
232
- const module = await import('../dist/commands/updateCommand.js');
237
+ const module = await import('../dist/commands/updateCommand.mjs');
233
238
  handleUpdateCommand = module.handleUpdateCommand;
234
239
  }
235
240
 
@@ -252,7 +257,7 @@ if (argv._[0] === 'doctor') {
252
257
  const module = await import('../src/commands/doctorCommand.ts');
253
258
  handleDoctorCommand = module.handleDoctorCommand;
254
259
  } else {
255
- const module = await import('../dist/commands/doctorCommand.js');
260
+ const module = await import('../dist/commands/doctorCommand.mjs');
256
261
  handleDoctorCommand = module.handleDoctorCommand;
257
262
  }
258
263
 
@@ -282,7 +287,7 @@ if (isDev) {
282
287
  } else {
283
288
  // Production: run compiled JavaScript
284
289
  try {
285
- await import(join(__dirname, '../dist/index.js'));
290
+ await import(join(__dirname, '../dist/index.mjs'));
286
291
  } catch (error) {
287
292
  console.error('Failed to start CLI:', error);
288
293
  console.error('\nTry running: pnpm build');
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env node
2
+ import { i as isBinaryAvailable, r as expandPath } from "./SandboxRuntimeAdapter-C1B4t20N.mjs";
3
+ import os from "os";
4
+ //#region src/sandbox/runtime/BubblewrapRuntime.ts
5
+ /**
6
+ * Linux Bubblewrap (bwrap) runtime implementation.
7
+ *
8
+ * Uses bubblewrap to create a sandboxed environment with:
9
+ * - Read-only system paths (/usr, /lib, /bin, etc.)
10
+ * - Read-write access only to the working directory
11
+ * - Denied paths mounted as empty tmpfs
12
+ * - Process namespace isolation
13
+ */
14
+ /** System paths to bind read-only into the sandbox */
15
+ const SYSTEM_RO_BINDS = [
16
+ "/usr",
17
+ "/bin",
18
+ "/lib",
19
+ "/lib64",
20
+ "/sbin",
21
+ "/etc"
22
+ ];
23
+ /** Paths that need special handling (dev, proc, tmp) */
24
+ const SPECIAL_MOUNTS = {
25
+ dev: "/dev",
26
+ proc: "/proc",
27
+ tmp: "/tmp"
28
+ };
29
+ var BubblewrapRuntime = class {
30
+ constructor() {
31
+ this.platform = "linux";
32
+ this.name = "bubblewrap";
33
+ }
34
+ isAvailable() {
35
+ return isBinaryAvailable("bwrap");
36
+ }
37
+ wrapCommand(options) {
38
+ const { command, cwd, filesystemConfig, env } = options;
39
+ const expandedDenied = filesystemConfig.deniedPaths.map(expandPath);
40
+ const expandedAllowed = filesystemConfig.allowedReadPaths.map(expandPath);
41
+ const args = [];
42
+ for (const sysPath of SYSTEM_RO_BINDS) args.push("--ro-bind-try", sysPath, sysPath);
43
+ args.push("--dev", SPECIAL_MOUNTS.dev);
44
+ args.push("--proc", SPECIAL_MOUNTS.proc);
45
+ args.push("--tmpfs", SPECIAL_MOUNTS.tmp);
46
+ args.push("--bind", cwd, cwd);
47
+ const homeDir = os.homedir();
48
+ args.push("--ro-bind", homeDir, homeDir);
49
+ for (const allowedPath of expandedAllowed) if (!allowedPath.startsWith(homeDir)) args.push("--ro-bind-try", allowedPath, allowedPath);
50
+ for (const deniedPath of expandedDenied) args.push("--tmpfs", deniedPath);
51
+ args.push("--unshare-all");
52
+ args.push("--share-net");
53
+ args.push("--die-with-parent");
54
+ if (options.seccompProfile) args.push("--seccomp", options.seccompProfile);
55
+ for (const [key, value] of Object.entries(env ?? {})) args.push("--setenv", key, value);
56
+ args.push("--chdir", cwd);
57
+ args.push("bash", "-c", command);
58
+ const commandString = ["bwrap", ...args.map(shellEscape)].join(" ");
59
+ return {
60
+ executable: "bwrap",
61
+ args,
62
+ env: env ?? {},
63
+ commandString
64
+ };
65
+ }
66
+ };
67
+ function shellEscape(str) {
68
+ if (/^[a-zA-Z0-9._/=:-]+$/.test(str)) return str;
69
+ return `'${str.replace(/'/g, "'\\''")}'`;
70
+ }
71
+ //#endregion
72
+ export { BubblewrapRuntime };