@probelabs/probe 0.6.0-rc242 → 0.6.0-rc246

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-rc242",
3
+ "version": "0.6.0-rc246",
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",
@@ -4765,12 +4765,19 @@ Convert your previous response content into actual JSON data that follows this s
4765
4765
  // Append DSL output buffer directly to response (bypasses LLM rewriting)
4766
4766
  if (this._outputBuffer && this._outputBuffer.items.length > 0 && !options._schemaFormatted) {
4767
4767
  const outputContent = this._outputBuffer.items.join('\n\n');
4768
- finalResult = (finalResult || '') + '\n\n' + outputContent;
4768
+ if (options.schema) {
4769
+ // Schema response — the finalResult is JSON. Wrap output in RAW_OUTPUT
4770
+ // delimiters so clients (visor, etc.) can extract and propagate the
4771
+ // content separately from the JSON.
4772
+ finalResult = (finalResult || '') + '\n<<<RAW_OUTPUT>>>\n' + outputContent + '\n<<<END_RAW_OUTPUT>>>';
4773
+ } else {
4774
+ finalResult = (finalResult || '') + '\n\n' + outputContent;
4775
+ }
4769
4776
  if (options.onStream) {
4770
4777
  options.onStream('\n\n' + outputContent);
4771
4778
  }
4772
4779
  if (this.debug) {
4773
- console.log(`[DEBUG] Appended ${this._outputBuffer.items.length} output buffer items (${outputContent.length} chars) to final result`);
4780
+ console.log(`[DEBUG] Appended ${this._outputBuffer.items.length} output buffer items (${outputContent.length} chars) to final result${options.schema ? ' (with RAW_OUTPUT delimiters)' : ''}`);
4774
4781
  }
4775
4782
  this._outputBuffer.items = [];
4776
4783
  }
@@ -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