@bike4mind/cli 0.2.64-worktree-refactor-extract-search-query-builders.21815 → 0.2.64

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 +6 -6
  2. package/dist/BubblewrapRuntime-BHbtqvLx.mjs +72 -0
  3. package/dist/ConfigStore-CllM6jOf.mjs +8614 -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-C6M5aW8W.mjs +20907 -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-Cu9dkHxV.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-R7DIP2XO.js +0 -180
  44. package/dist/bashExecute-GLGLD3JD.js +0 -379
  45. package/dist/chunk-4BIBE3J7.js +0 -48
  46. package/dist/chunk-5LZS5CVJ.js +0 -161
  47. package/dist/chunk-BDQBOLYG.js +0 -120
  48. package/dist/chunk-BPFEGDC7.js +0 -192
  49. package/dist/chunk-EPIYC3LA.js +0 -13770
  50. package/dist/chunk-G4ZGEQFT.js +0 -250
  51. package/dist/chunk-GQGOWACU.js +0 -770
  52. package/dist/chunk-J6ZBI6TI.js +0 -1079
  53. package/dist/chunk-JW3JRHH7.js +0 -12433
  54. package/dist/chunk-KQAMBXAW.js +0 -163
  55. package/dist/chunk-KUVV2NAB.js +0 -19125
  56. package/dist/chunk-LTLJRF6I.js +0 -44
  57. package/dist/chunk-PFBYGCOW.js +0 -449
  58. package/dist/chunk-QWB6ZYY4.js +0 -48
  59. package/dist/chunk-SGPRXN4C.js +0 -245
  60. package/dist/chunk-UZUHPHZC.js +0 -95
  61. package/dist/chunk-WBE7SQUB.js +0 -241
  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-C4VEEEYR.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-Z6NB26TT.js +0 -371
  75. package/dist/markdownGenerator-SK2ZQQL4.js +0 -269
  76. package/dist/mementoService-N4IM6QAC.js +0 -12
  77. package/dist/notificationDeduplicator-HUC53NEW.js +0 -9
  78. package/dist/src-F4KZCAA2.js +0 -319
  79. package/dist/src-ISX322I7.js +0 -1101
  80. package/dist/store-CAB6BV3P.js +0 -11
  81. package/dist/subtractCredits-D4KEM6VU.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
@@ -149,7 +149,7 @@ if (argv['ollama-host']) {
149
149
  }
150
150
 
151
151
  // Auto-detect environment: prefer production mode when dist exists
152
- const distPath = join(__dirname, '../dist/index.js');
152
+ const distPath = join(__dirname, '../dist/index.mjs');
153
153
  const srcPath = join(__dirname, '../src/index.tsx');
154
154
  const hasSource = existsSync(srcPath);
155
155
  const hasDist = existsSync(distPath);
@@ -176,7 +176,7 @@ if (argv.prompt !== undefined) {
176
176
  const module = await import('../src/commands/headlessCommand.ts');
177
177
  handleHeadlessCommand = module.handleHeadlessCommand;
178
178
  } else {
179
- const module = await import('../dist/commands/headlessCommand.js');
179
+ const module = await import('../dist/commands/headlessCommand.mjs');
180
180
  handleHeadlessCommand = module.handleHeadlessCommand;
181
181
  }
182
182
 
@@ -211,7 +211,7 @@ if (argv._[0] === 'mcp') {
211
211
  handleMcpCommand = module.handleMcpCommand;
212
212
  } else {
213
213
  // Production: import compiled JavaScript
214
- const module = await import('../dist/commands/mcpCommand.js');
214
+ const module = await import('../dist/commands/mcpCommand.mjs');
215
215
  handleMcpCommand = module.handleMcpCommand;
216
216
  }
217
217
 
@@ -234,7 +234,7 @@ if (argv._[0] === 'update') {
234
234
  const module = await import('../src/commands/updateCommand.ts');
235
235
  handleUpdateCommand = module.handleUpdateCommand;
236
236
  } else {
237
- const module = await import('../dist/commands/updateCommand.js');
237
+ const module = await import('../dist/commands/updateCommand.mjs');
238
238
  handleUpdateCommand = module.handleUpdateCommand;
239
239
  }
240
240
 
@@ -257,7 +257,7 @@ if (argv._[0] === 'doctor') {
257
257
  const module = await import('../src/commands/doctorCommand.ts');
258
258
  handleDoctorCommand = module.handleDoctorCommand;
259
259
  } else {
260
- const module = await import('../dist/commands/doctorCommand.js');
260
+ const module = await import('../dist/commands/doctorCommand.mjs');
261
261
  handleDoctorCommand = module.handleDoctorCommand;
262
262
  }
263
263
 
@@ -287,7 +287,7 @@ if (isDev) {
287
287
  } else {
288
288
  // Production: run compiled JavaScript
289
289
  try {
290
- await import(join(__dirname, '../dist/index.js'));
290
+ await import(join(__dirname, '../dist/index.mjs'));
291
291
  } catch (error) {
292
292
  console.error('Failed to start CLI:', error);
293
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 };