@probelabs/probe 0.6.0-rc245 → 0.6.0-rc247

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.
@@ -29060,6 +29060,25 @@ function buildToolImplementations(configOptions) {
29060
29060
  }
29061
29061
  }
29062
29062
  };
29063
+ if (configOptions.enableBash) {
29064
+ const bashToolInstance = bashTool({
29065
+ bashConfig: configOptions.bashConfig || {},
29066
+ debug: configOptions.debug || false,
29067
+ cwd,
29068
+ allowedFolders: configOptions.allowedFolders || [],
29069
+ workspaceRoot: configOptions.workspaceRoot || cwd,
29070
+ tracer: configOptions.tracer || null
29071
+ });
29072
+ tools2.bash = {
29073
+ execute: async (params) => {
29074
+ try {
29075
+ return await bashToolInstance.execute(params);
29076
+ } catch (e) {
29077
+ return `Bash error: ${e.message}`;
29078
+ }
29079
+ }
29080
+ };
29081
+ }
29063
29082
  return tools2;
29064
29083
  }
29065
29084
  function buildLLMCall(configOptions) {
@@ -29327,6 +29346,7 @@ ${RAW_OUTPUT_END}`;
29327
29346
  output += `
29328
29347
 
29329
29348
  [The above raw output (${rawContent.length} chars) will be passed directly to the final response. Do NOT repeat, summarize, or modify it.]`;
29349
+ outputBuffer.items = [];
29330
29350
  }
29331
29351
  return output;
29332
29352
  }
@@ -29786,6 +29806,7 @@ var init_executePlan = __esm({
29786
29806
  init_extract();
29787
29807
  init_delegate();
29788
29808
  init_esm5();
29809
+ init_bash();
29789
29810
  RAW_OUTPUT_START = "<<<RAW_OUTPUT>>>";
29790
29811
  RAW_OUTPUT_END = "<<<END_RAW_OUTPUT>>>";
29791
29812
  }
@@ -13,6 +13,7 @@ import { query } from '../query.js';
13
13
  import { extract } from '../extract.js';
14
14
  import { delegate } from '../delegate.js';
15
15
  import { glob } from 'glob';
16
+ import { bashTool } from './bash.js';
16
17
 
17
18
  export { executePlanSchema };
18
19
 
@@ -156,6 +157,27 @@ function buildToolImplementations(configOptions) {
156
157
  },
157
158
  };
158
159
 
160
+ // Add bash tool if enabled
161
+ if (configOptions.enableBash) {
162
+ const bashToolInstance = bashTool({
163
+ bashConfig: configOptions.bashConfig || {},
164
+ debug: configOptions.debug || false,
165
+ cwd: cwd,
166
+ allowedFolders: configOptions.allowedFolders || [],
167
+ workspaceRoot: configOptions.workspaceRoot || cwd,
168
+ tracer: configOptions.tracer || null,
169
+ });
170
+ tools.bash = {
171
+ execute: async (params) => {
172
+ try {
173
+ return await bashToolInstance.execute(params);
174
+ } catch (e) {
175
+ return `Bash error: ${e.message}`;
176
+ }
177
+ },
178
+ };
179
+ }
180
+
159
181
  return tools;
160
182
  }
161
183
 
@@ -503,6 +525,9 @@ function formatSuccess(result, description, attempt, outputBuffer) {
503
525
  const rawContent = outputBuffer.items.join('\n');
504
526
  output += `\n\n${RAW_OUTPUT_START}\n${rawContent}\n${RAW_OUTPUT_END}`;
505
527
  output += `\n\n[The above raw output (${rawContent.length} chars) will be passed directly to the final response. Do NOT repeat, summarize, or modify it.]`;
528
+ // Clear the buffer after reading to prevent re-wrapping on subsequent execute_plan calls
529
+ // Without this, extractRawOutputBlocks pushes content back to buffer, causing exponential duplication
530
+ outputBuffer.items = [];
506
531
  }
507
532
 
508
533
  return output;
@@ -58512,6 +58512,25 @@ function buildToolImplementations(configOptions) {
58512
58512
  }
58513
58513
  }
58514
58514
  };
58515
+ if (configOptions.enableBash) {
58516
+ const bashToolInstance = bashTool({
58517
+ bashConfig: configOptions.bashConfig || {},
58518
+ debug: configOptions.debug || false,
58519
+ cwd,
58520
+ allowedFolders: configOptions.allowedFolders || [],
58521
+ workspaceRoot: configOptions.workspaceRoot || cwd,
58522
+ tracer: configOptions.tracer || null
58523
+ });
58524
+ tools2.bash = {
58525
+ execute: async (params) => {
58526
+ try {
58527
+ return await bashToolInstance.execute(params);
58528
+ } catch (e5) {
58529
+ return `Bash error: ${e5.message}`;
58530
+ }
58531
+ }
58532
+ };
58533
+ }
58515
58534
  return tools2;
58516
58535
  }
58517
58536
  function buildLLMCall(configOptions) {
@@ -58779,6 +58798,7 @@ ${RAW_OUTPUT_END}`;
58779
58798
  output += `
58780
58799
 
58781
58800
  [The above raw output (${rawContent.length} chars) will be passed directly to the final response. Do NOT repeat, summarize, or modify it.]`;
58801
+ outputBuffer.items = [];
58782
58802
  }
58783
58803
  return output;
58784
58804
  }
@@ -59239,6 +59259,7 @@ var init_executePlan = __esm({
59239
59259
  init_extract();
59240
59260
  init_delegate();
59241
59261
  init_esm5();
59262
+ init_bash();
59242
59263
  RAW_OUTPUT_START = "<<<RAW_OUTPUT>>>";
59243
59264
  RAW_OUTPUT_END = "<<<END_RAW_OUTPUT>>>";
59244
59265
  }