@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@probelabs/probe",
3
- "version": "0.6.0-rc245",
3
+ "version": "0.6.0-rc247",
4
4
  "description": "Node.js wrapper for the probe code search tool",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -80,7 +80,7 @@
80
80
  "@anthropic-ai/claude-agent-sdk": "^0.1.46",
81
81
  "@modelcontextprotocol/sdk": "^1.0.0",
82
82
  "@nyariv/sandboxjs": "github:probelabs/SandboxJS",
83
- "@probelabs/maid": "^0.0.24",
83
+ "@probelabs/maid": "^0.0.25",
84
84
  "acorn": "^8.15.0",
85
85
  "acorn-walk": "^8.3.4",
86
86
  "adm-zip": "^0.5.16",
@@ -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;