@probelabs/probe 0.6.0-rc242 → 0.6.0-rc245

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
  }
@@ -84874,12 +84874,16 @@ Convert your previous response content into actual JSON data that follows this s
84874
84874
  }
84875
84875
  if (this._outputBuffer && this._outputBuffer.items.length > 0 && !options._schemaFormatted) {
84876
84876
  const outputContent = this._outputBuffer.items.join("\n\n");
84877
- finalResult = (finalResult || "") + "\n\n" + outputContent;
84877
+ if (options.schema) {
84878
+ finalResult = (finalResult || "") + "\n<<<RAW_OUTPUT>>>\n" + outputContent + "\n<<<END_RAW_OUTPUT>>>";
84879
+ } else {
84880
+ finalResult = (finalResult || "") + "\n\n" + outputContent;
84881
+ }
84878
84882
  if (options.onStream) {
84879
84883
  options.onStream("\n\n" + outputContent);
84880
84884
  }
84881
84885
  if (this.debug) {
84882
- console.log(`[DEBUG] Appended ${this._outputBuffer.items.length} output buffer items (${outputContent.length} chars) to final result`);
84886
+ console.log(`[DEBUG] Appended ${this._outputBuffer.items.length} output buffer items (${outputContent.length} chars) to final result${options.schema ? " (with RAW_OUTPUT delimiters)" : ""}`);
84883
84887
  }
84884
84888
  this._outputBuffer.items = [];
84885
84889
  }
@@ -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",
@@ -113890,12 +113892,16 @@ Convert your previous response content into actual JSON data that follows this s
113890
113892
  }
113891
113893
  if (this._outputBuffer && this._outputBuffer.items.length > 0 && !options._schemaFormatted) {
113892
113894
  const outputContent = this._outputBuffer.items.join("\n\n");
113893
- finalResult = (finalResult || "") + "\n\n" + outputContent;
113895
+ if (options.schema) {
113896
+ finalResult = (finalResult || "") + "\n<<<RAW_OUTPUT>>>\n" + outputContent + "\n<<<END_RAW_OUTPUT>>>";
113897
+ } else {
113898
+ finalResult = (finalResult || "") + "\n\n" + outputContent;
113899
+ }
113894
113900
  if (options.onStream) {
113895
113901
  options.onStream("\n\n" + outputContent);
113896
113902
  }
113897
113903
  if (this.debug) {
113898
- console.log(`[DEBUG] Appended ${this._outputBuffer.items.length} output buffer items (${outputContent.length} chars) to final result`);
113904
+ console.log(`[DEBUG] Appended ${this._outputBuffer.items.length} output buffer items (${outputContent.length} chars) to final result${options.schema ? " (with RAW_OUTPUT delimiters)" : ""}`);
113899
113905
  }
113900
113906
  this._outputBuffer.items = [];
113901
113907
  }
package/cjs/index.cjs CHANGED
@@ -7835,6 +7835,8 @@ var init_EventStreamSerde = __esm({
7835
7835
  } else {
7836
7836
  serializer.write(eventSchema, event[unionMember]);
7837
7837
  }
7838
+ } else if (eventSchema.isUnitSchema()) {
7839
+ serializer.write(eventSchema, {});
7838
7840
  } else {
7839
7841
  throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");
7840
7842
  }
@@ -19361,7 +19363,7 @@ var require_package2 = __commonJS({
19361
19363
  module2.exports = {
19362
19364
  name: "@aws-sdk/client-bedrock-runtime",
19363
19365
  description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
19364
- version: "3.991.0",
19366
+ version: "3.992.0",
19365
19367
  scripts: {
19366
19368
  build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
19367
19369
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
@@ -19391,9 +19393,9 @@ var require_package2 = __commonJS({
19391
19393
  "@aws-sdk/middleware-user-agent": "^3.972.10",
19392
19394
  "@aws-sdk/middleware-websocket": "^3.972.6",
19393
19395
  "@aws-sdk/region-config-resolver": "^3.972.3",
19394
- "@aws-sdk/token-providers": "3.991.0",
19396
+ "@aws-sdk/token-providers": "3.992.0",
19395
19397
  "@aws-sdk/types": "^3.973.1",
19396
- "@aws-sdk/util-endpoints": "3.991.0",
19398
+ "@aws-sdk/util-endpoints": "3.992.0",
19397
19399
  "@aws-sdk/util-user-agent-browser": "^3.972.3",
19398
19400
  "@aws-sdk/util-user-agent-node": "^3.972.8",
19399
19401
  "@smithy/config-resolver": "^4.4.6",
@@ -25963,7 +25965,7 @@ var init_package2 = __esm({
25963
25965
  "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/nested-clients/package.json"() {
25964
25966
  package_default2 = {
25965
25967
  name: "@aws-sdk/nested-clients",
25966
- version: "3.991.0",
25968
+ version: "3.992.0",
25967
25969
  description: "Nested clients for AWS SDK packages.",
25968
25970
  main: "./dist-cjs/index.js",
25969
25971
  module: "./dist-es/index.js",
@@ -25999,7 +26001,7 @@ var init_package2 = __esm({
25999
26001
  "@aws-sdk/middleware-user-agent": "^3.972.10",
26000
26002
  "@aws-sdk/region-config-resolver": "^3.972.3",
26001
26003
  "@aws-sdk/types": "^3.973.1",
26002
- "@aws-sdk/util-endpoints": "3.991.0",
26004
+ "@aws-sdk/util-endpoints": "3.992.0",
26003
26005
  "@aws-sdk/util-user-agent-browser": "^3.972.3",
26004
26006
  "@aws-sdk/util-user-agent-node": "^3.972.8",
26005
26007
  "@smithy/config-resolver": "^4.4.6",
@@ -110612,12 +110614,16 @@ Convert your previous response content into actual JSON data that follows this s
110612
110614
  }
110613
110615
  if (this._outputBuffer && this._outputBuffer.items.length > 0 && !options._schemaFormatted) {
110614
110616
  const outputContent = this._outputBuffer.items.join("\n\n");
110615
- finalResult = (finalResult || "") + "\n\n" + outputContent;
110617
+ if (options.schema) {
110618
+ finalResult = (finalResult || "") + "\n<<<RAW_OUTPUT>>>\n" + outputContent + "\n<<<END_RAW_OUTPUT>>>";
110619
+ } else {
110620
+ finalResult = (finalResult || "") + "\n\n" + outputContent;
110621
+ }
110616
110622
  if (options.onStream) {
110617
110623
  options.onStream("\n\n" + outputContent);
110618
110624
  }
110619
110625
  if (this.debug) {
110620
- console.log(`[DEBUG] Appended ${this._outputBuffer.items.length} output buffer items (${outputContent.length} chars) to final result`);
110626
+ console.log(`[DEBUG] Appended ${this._outputBuffer.items.length} output buffer items (${outputContent.length} chars) to final result${options.schema ? " (with RAW_OUTPUT delimiters)" : ""}`);
110621
110627
  }
110622
110628
  this._outputBuffer.items = [];
110623
110629
  }
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-rc245",
4
4
  "description": "Node.js wrapper for the probe code search tool",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -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
  }