@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.
@@ -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
  }
@@ -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) {
@@ -29786,6 +29805,7 @@ var init_executePlan = __esm({
29786
29805
  init_extract();
29787
29806
  init_delegate();
29788
29807
  init_esm5();
29808
+ init_bash();
29789
29809
  RAW_OUTPUT_START = "<<<RAW_OUTPUT>>>";
29790
29810
  RAW_OUTPUT_END = "<<<END_RAW_OUTPUT>>>";
29791
29811
  }
@@ -84874,12 +84894,16 @@ Convert your previous response content into actual JSON data that follows this s
84874
84894
  }
84875
84895
  if (this._outputBuffer && this._outputBuffer.items.length > 0 && !options._schemaFormatted) {
84876
84896
  const outputContent = this._outputBuffer.items.join("\n\n");
84877
- finalResult = (finalResult || "") + "\n\n" + outputContent;
84897
+ if (options.schema) {
84898
+ finalResult = (finalResult || "") + "\n<<<RAW_OUTPUT>>>\n" + outputContent + "\n<<<END_RAW_OUTPUT>>>";
84899
+ } else {
84900
+ finalResult = (finalResult || "") + "\n\n" + outputContent;
84901
+ }
84878
84902
  if (options.onStream) {
84879
84903
  options.onStream("\n\n" + outputContent);
84880
84904
  }
84881
84905
  if (this.debug) {
84882
- console.log(`[DEBUG] Appended ${this._outputBuffer.items.length} output buffer items (${outputContent.length} chars) to final result`);
84906
+ console.log(`[DEBUG] Appended ${this._outputBuffer.items.length} output buffer items (${outputContent.length} chars) to final result${options.schema ? " (with RAW_OUTPUT delimiters)" : ""}`);
84883
84907
  }
84884
84908
  this._outputBuffer.items = [];
84885
84909
  }
@@ -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
 
@@ -5978,6 +5978,8 @@ var init_EventStreamSerde = __esm({
5978
5978
  } else {
5979
5979
  serializer.write(eventSchema, event[unionMember]);
5980
5980
  }
5981
+ } else if (eventSchema.isUnitSchema()) {
5982
+ serializer.write(eventSchema, {});
5981
5983
  } else {
5982
5984
  throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");
5983
5985
  }
@@ -17504,7 +17506,7 @@ var require_package2 = __commonJS({
17504
17506
  module2.exports = {
17505
17507
  name: "@aws-sdk/client-bedrock-runtime",
17506
17508
  description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
17507
- version: "3.991.0",
17509
+ version: "3.992.0",
17508
17510
  scripts: {
17509
17511
  build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
17510
17512
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
@@ -17534,9 +17536,9 @@ var require_package2 = __commonJS({
17534
17536
  "@aws-sdk/middleware-user-agent": "^3.972.10",
17535
17537
  "@aws-sdk/middleware-websocket": "^3.972.6",
17536
17538
  "@aws-sdk/region-config-resolver": "^3.972.3",
17537
- "@aws-sdk/token-providers": "3.991.0",
17539
+ "@aws-sdk/token-providers": "3.992.0",
17538
17540
  "@aws-sdk/types": "^3.973.1",
17539
- "@aws-sdk/util-endpoints": "3.991.0",
17541
+ "@aws-sdk/util-endpoints": "3.992.0",
17540
17542
  "@aws-sdk/util-user-agent-browser": "^3.972.3",
17541
17543
  "@aws-sdk/util-user-agent-node": "^3.972.8",
17542
17544
  "@smithy/config-resolver": "^4.4.6",
@@ -24106,7 +24108,7 @@ var init_package2 = __esm({
24106
24108
  "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/nested-clients/package.json"() {
24107
24109
  package_default2 = {
24108
24110
  name: "@aws-sdk/nested-clients",
24109
- version: "3.991.0",
24111
+ version: "3.992.0",
24110
24112
  description: "Nested clients for AWS SDK packages.",
24111
24113
  main: "./dist-cjs/index.js",
24112
24114
  module: "./dist-es/index.js",
@@ -24142,7 +24144,7 @@ var init_package2 = __esm({
24142
24144
  "@aws-sdk/middleware-user-agent": "^3.972.10",
24143
24145
  "@aws-sdk/region-config-resolver": "^3.972.3",
24144
24146
  "@aws-sdk/types": "^3.973.1",
24145
- "@aws-sdk/util-endpoints": "3.991.0",
24147
+ "@aws-sdk/util-endpoints": "3.992.0",
24146
24148
  "@aws-sdk/util-user-agent-browser": "^3.972.3",
24147
24149
  "@aws-sdk/util-user-agent-node": "^3.972.8",
24148
24150
  "@smithy/config-resolver": "^4.4.6",
@@ -58510,6 +58512,25 @@ function buildToolImplementations(configOptions) {
58510
58512
  }
58511
58513
  }
58512
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
+ }
58513
58534
  return tools2;
58514
58535
  }
58515
58536
  function buildLLMCall(configOptions) {
@@ -59237,6 +59258,7 @@ var init_executePlan = __esm({
59237
59258
  init_extract();
59238
59259
  init_delegate();
59239
59260
  init_esm5();
59261
+ init_bash();
59240
59262
  RAW_OUTPUT_START = "<<<RAW_OUTPUT>>>";
59241
59263
  RAW_OUTPUT_END = "<<<END_RAW_OUTPUT>>>";
59242
59264
  }
@@ -113890,12 +113912,16 @@ Convert your previous response content into actual JSON data that follows this s
113890
113912
  }
113891
113913
  if (this._outputBuffer && this._outputBuffer.items.length > 0 && !options._schemaFormatted) {
113892
113914
  const outputContent = this._outputBuffer.items.join("\n\n");
113893
- finalResult = (finalResult || "") + "\n\n" + outputContent;
113915
+ if (options.schema) {
113916
+ finalResult = (finalResult || "") + "\n<<<RAW_OUTPUT>>>\n" + outputContent + "\n<<<END_RAW_OUTPUT>>>";
113917
+ } else {
113918
+ finalResult = (finalResult || "") + "\n\n" + outputContent;
113919
+ }
113894
113920
  if (options.onStream) {
113895
113921
  options.onStream("\n\n" + outputContent);
113896
113922
  }
113897
113923
  if (this.debug) {
113898
- console.log(`[DEBUG] Appended ${this._outputBuffer.items.length} output buffer items (${outputContent.length} chars) to final result`);
113924
+ console.log(`[DEBUG] Appended ${this._outputBuffer.items.length} output buffer items (${outputContent.length} chars) to final result${options.schema ? " (with RAW_OUTPUT delimiters)" : ""}`);
113899
113925
  }
113900
113926
  this._outputBuffer.items = [];
113901
113927
  }