@probelabs/probe 0.6.0-rc139 → 0.6.0-rc141

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.
@@ -2745,19 +2745,19 @@ Command: ${command}`;
2745
2745
  }
2746
2746
  function extractWithStdin(binaryPath, cliArgs, content, options) {
2747
2747
  return new Promise((resolve5, reject2) => {
2748
- const process2 = spawn(binaryPath, ["extract", ...cliArgs], {
2748
+ const childProcess = spawn(binaryPath, ["extract", ...cliArgs], {
2749
2749
  stdio: ["pipe", "pipe", "pipe"]
2750
2750
  });
2751
2751
  let stdout = "";
2752
2752
  let stderr = "";
2753
- process2.stdout.on("data", (data) => {
2753
+ childProcess.stdout.on("data", (data) => {
2754
2754
  stdout += data.toString();
2755
2755
  });
2756
- process2.stderr.on("data", (data) => {
2756
+ childProcess.stderr.on("data", (data) => {
2757
2757
  stderr += data.toString();
2758
2758
  });
2759
- process2.on("close", (code) => {
2760
- if (stderr && process2.env.DEBUG === "1") {
2759
+ childProcess.on("close", (code) => {
2760
+ if (stderr && process.env.DEBUG === "1") {
2761
2761
  console.error(`stderr: ${stderr}`);
2762
2762
  }
2763
2763
  if (code !== 0) {
@@ -2771,15 +2771,15 @@ function extractWithStdin(binaryPath, cliArgs, content, options) {
2771
2771
  reject2(error);
2772
2772
  }
2773
2773
  });
2774
- process2.on("error", (error) => {
2774
+ childProcess.on("error", (error) => {
2775
2775
  reject2(new Error(`Failed to spawn extract process: ${error.message}`));
2776
2776
  });
2777
2777
  if (typeof content === "string") {
2778
- process2.stdin.write(content);
2778
+ childProcess.stdin.write(content);
2779
2779
  } else {
2780
- process2.stdin.write(content);
2780
+ childProcess.stdin.write(content);
2781
2781
  }
2782
- process2.stdin.end();
2782
+ childProcess.stdin.end();
2783
2783
  });
2784
2784
  }
2785
2785
  function processExtractOutput(stdout, options) {
@@ -7097,7 +7097,7 @@ var init_common = __esm({
7097
7097
  end_line: external_exports.number().optional().describe("End line number for extracting a range of lines"),
7098
7098
  allow_tests: external_exports.boolean().optional().default(false).describe("Allow test files and test code blocks"),
7099
7099
  context_lines: external_exports.number().optional().default(10).describe("Number of context lines to include"),
7100
- format: external_exports.string().optional().default("plain").describe("Output format (plain, markdown, json, color)")
7100
+ format: external_exports.string().optional().default("plain").describe("Output format (plain, markdown, json, xml, color, outline-xml, outline-diff)")
7101
7101
  });
7102
7102
  delegateSchema = external_exports.object({
7103
7103
  task: external_exports.string().describe("The task to delegate to a subagent. Be specific about what needs to be accomplished.")
package/build/extract.js CHANGED
@@ -115,7 +115,7 @@ export async function extract(options) {
115
115
  */
116
116
  function extractWithStdin(binaryPath, cliArgs, content, options) {
117
117
  return new Promise((resolve, reject) => {
118
- const process = spawn(binaryPath, ['extract', ...cliArgs], {
118
+ const childProcess = spawn(binaryPath, ['extract', ...cliArgs], {
119
119
  stdio: ['pipe', 'pipe', 'pipe']
120
120
  });
121
121
 
@@ -123,17 +123,17 @@ function extractWithStdin(binaryPath, cliArgs, content, options) {
123
123
  let stderr = '';
124
124
 
125
125
  // Collect stdout
126
- process.stdout.on('data', (data) => {
126
+ childProcess.stdout.on('data', (data) => {
127
127
  stdout += data.toString();
128
128
  });
129
129
 
130
130
  // Collect stderr
131
- process.stderr.on('data', (data) => {
131
+ childProcess.stderr.on('data', (data) => {
132
132
  stderr += data.toString();
133
133
  });
134
134
 
135
135
  // Handle process exit
136
- process.on('close', (code) => {
136
+ childProcess.on('close', (code) => {
137
137
  if (stderr && process.env.DEBUG === '1') {
138
138
  console.error(`stderr: ${stderr}`);
139
139
  }
@@ -152,17 +152,17 @@ function extractWithStdin(binaryPath, cliArgs, content, options) {
152
152
  });
153
153
 
154
154
  // Handle errors
155
- process.on('error', (error) => {
155
+ childProcess.on('error', (error) => {
156
156
  reject(new Error(`Failed to spawn extract process: ${error.message}`));
157
157
  });
158
158
 
159
159
  // Write content to stdin and close
160
160
  if (typeof content === 'string') {
161
- process.stdin.write(content);
161
+ childProcess.stdin.write(content);
162
162
  } else {
163
- process.stdin.write(content);
163
+ childProcess.stdin.write(content);
164
164
  }
165
- process.stdin.end();
165
+ childProcess.stdin.end();
166
166
  });
167
167
  }
168
168
 
@@ -30,7 +30,7 @@ export const extractSchema = z.object({
30
30
  end_line: z.number().optional().describe('End line number for extracting a range of lines'),
31
31
  allow_tests: z.boolean().optional().default(false).describe('Allow test files and test code blocks'),
32
32
  context_lines: z.number().optional().default(10).describe('Number of context lines to include'),
33
- format: z.string().optional().default('plain').describe('Output format (plain, markdown, json, color)')
33
+ format: z.string().optional().default('plain').describe('Output format (plain, markdown, json, xml, color, outline-xml, outline-diff)')
34
34
  });
35
35
 
36
36
  export const delegateSchema = z.object({
@@ -28144,19 +28144,19 @@ Command: ${command}`;
28144
28144
  }
28145
28145
  function extractWithStdin(binaryPath, cliArgs, content, options) {
28146
28146
  return new Promise((resolve4, reject2) => {
28147
- const process2 = (0, import_child_process4.spawn)(binaryPath, ["extract", ...cliArgs], {
28147
+ const childProcess = (0, import_child_process4.spawn)(binaryPath, ["extract", ...cliArgs], {
28148
28148
  stdio: ["pipe", "pipe", "pipe"]
28149
28149
  });
28150
28150
  let stdout = "";
28151
28151
  let stderr = "";
28152
- process2.stdout.on("data", (data2) => {
28152
+ childProcess.stdout.on("data", (data2) => {
28153
28153
  stdout += data2.toString();
28154
28154
  });
28155
- process2.stderr.on("data", (data2) => {
28155
+ childProcess.stderr.on("data", (data2) => {
28156
28156
  stderr += data2.toString();
28157
28157
  });
28158
- process2.on("close", (code) => {
28159
- if (stderr && process2.env.DEBUG === "1") {
28158
+ childProcess.on("close", (code) => {
28159
+ if (stderr && process.env.DEBUG === "1") {
28160
28160
  console.error(`stderr: ${stderr}`);
28161
28161
  }
28162
28162
  if (code !== 0) {
@@ -28170,15 +28170,15 @@ function extractWithStdin(binaryPath, cliArgs, content, options) {
28170
28170
  reject2(error2);
28171
28171
  }
28172
28172
  });
28173
- process2.on("error", (error2) => {
28173
+ childProcess.on("error", (error2) => {
28174
28174
  reject2(new Error(`Failed to spawn extract process: ${error2.message}`));
28175
28175
  });
28176
28176
  if (typeof content === "string") {
28177
- process2.stdin.write(content);
28177
+ childProcess.stdin.write(content);
28178
28178
  } else {
28179
- process2.stdin.write(content);
28179
+ childProcess.stdin.write(content);
28180
28180
  }
28181
- process2.stdin.end();
28181
+ childProcess.stdin.end();
28182
28182
  });
28183
28183
  }
28184
28184
  function processExtractOutput(stdout, options) {
@@ -32498,7 +32498,7 @@ var init_common2 = __esm({
32498
32498
  end_line: external_exports.number().optional().describe("End line number for extracting a range of lines"),
32499
32499
  allow_tests: external_exports.boolean().optional().default(false).describe("Allow test files and test code blocks"),
32500
32500
  context_lines: external_exports.number().optional().default(10).describe("Number of context lines to include"),
32501
- format: external_exports.string().optional().default("plain").describe("Output format (plain, markdown, json, color)")
32501
+ format: external_exports.string().optional().default("plain").describe("Output format (plain, markdown, json, xml, color, outline-xml, outline-diff)")
32502
32502
  });
32503
32503
  delegateSchema = external_exports.object({
32504
32504
  task: external_exports.string().describe("The task to delegate to a subagent. Be specific about what needs to be accomplished.")
package/cjs/index.cjs CHANGED
@@ -1088,19 +1088,19 @@ Command: ${command}`;
1088
1088
  }
1089
1089
  function extractWithStdin(binaryPath, cliArgs, content, options) {
1090
1090
  return new Promise((resolve4, reject2) => {
1091
- const process2 = (0, import_child_process4.spawn)(binaryPath, ["extract", ...cliArgs], {
1091
+ const childProcess = (0, import_child_process4.spawn)(binaryPath, ["extract", ...cliArgs], {
1092
1092
  stdio: ["pipe", "pipe", "pipe"]
1093
1093
  });
1094
1094
  let stdout = "";
1095
1095
  let stderr = "";
1096
- process2.stdout.on("data", (data2) => {
1096
+ childProcess.stdout.on("data", (data2) => {
1097
1097
  stdout += data2.toString();
1098
1098
  });
1099
- process2.stderr.on("data", (data2) => {
1099
+ childProcess.stderr.on("data", (data2) => {
1100
1100
  stderr += data2.toString();
1101
1101
  });
1102
- process2.on("close", (code) => {
1103
- if (stderr && process2.env.DEBUG === "1") {
1102
+ childProcess.on("close", (code) => {
1103
+ if (stderr && process.env.DEBUG === "1") {
1104
1104
  console.error(`stderr: ${stderr}`);
1105
1105
  }
1106
1106
  if (code !== 0) {
@@ -1114,15 +1114,15 @@ function extractWithStdin(binaryPath, cliArgs, content, options) {
1114
1114
  reject2(error2);
1115
1115
  }
1116
1116
  });
1117
- process2.on("error", (error2) => {
1117
+ childProcess.on("error", (error2) => {
1118
1118
  reject2(new Error(`Failed to spawn extract process: ${error2.message}`));
1119
1119
  });
1120
1120
  if (typeof content === "string") {
1121
- process2.stdin.write(content);
1121
+ childProcess.stdin.write(content);
1122
1122
  } else {
1123
- process2.stdin.write(content);
1123
+ childProcess.stdin.write(content);
1124
1124
  }
1125
- process2.stdin.end();
1125
+ childProcess.stdin.end();
1126
1126
  });
1127
1127
  }
1128
1128
  function processExtractOutput(stdout, options) {
@@ -5498,7 +5498,7 @@ var init_common = __esm({
5498
5498
  end_line: external_exports.number().optional().describe("End line number for extracting a range of lines"),
5499
5499
  allow_tests: external_exports.boolean().optional().default(false).describe("Allow test files and test code blocks"),
5500
5500
  context_lines: external_exports.number().optional().default(10).describe("Number of context lines to include"),
5501
- format: external_exports.string().optional().default("plain").describe("Output format (plain, markdown, json, color)")
5501
+ format: external_exports.string().optional().default("plain").describe("Output format (plain, markdown, json, xml, color, outline-xml, outline-diff)")
5502
5502
  });
5503
5503
  delegateSchema = external_exports.object({
5504
5504
  task: external_exports.string().describe("The task to delegate to a subagent. Be specific about what needs to be accomplished.")
package/index.d.ts CHANGED
@@ -482,7 +482,7 @@ export declare function extract(
482
482
  path?: string,
483
483
  options?: {
484
484
  contextLines?: number;
485
- format?: 'markdown' | 'plain' | 'json';
485
+ format?: 'plain' | 'markdown' | 'json' | 'xml' | 'color' | 'outline-xml' | 'outline-diff';
486
486
  }
487
487
  ): Promise<any>;
488
488
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@probelabs/probe",
3
- "version": "0.6.0-rc139",
3
+ "version": "0.6.0-rc141",
4
4
  "description": "Node.js wrapper for the probe code search tool",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
package/src/extract.js CHANGED
@@ -115,7 +115,7 @@ export async function extract(options) {
115
115
  */
116
116
  function extractWithStdin(binaryPath, cliArgs, content, options) {
117
117
  return new Promise((resolve, reject) => {
118
- const process = spawn(binaryPath, ['extract', ...cliArgs], {
118
+ const childProcess = spawn(binaryPath, ['extract', ...cliArgs], {
119
119
  stdio: ['pipe', 'pipe', 'pipe']
120
120
  });
121
121
 
@@ -123,17 +123,17 @@ function extractWithStdin(binaryPath, cliArgs, content, options) {
123
123
  let stderr = '';
124
124
 
125
125
  // Collect stdout
126
- process.stdout.on('data', (data) => {
126
+ childProcess.stdout.on('data', (data) => {
127
127
  stdout += data.toString();
128
128
  });
129
129
 
130
130
  // Collect stderr
131
- process.stderr.on('data', (data) => {
131
+ childProcess.stderr.on('data', (data) => {
132
132
  stderr += data.toString();
133
133
  });
134
134
 
135
135
  // Handle process exit
136
- process.on('close', (code) => {
136
+ childProcess.on('close', (code) => {
137
137
  if (stderr && process.env.DEBUG === '1') {
138
138
  console.error(`stderr: ${stderr}`);
139
139
  }
@@ -152,17 +152,17 @@ function extractWithStdin(binaryPath, cliArgs, content, options) {
152
152
  });
153
153
 
154
154
  // Handle errors
155
- process.on('error', (error) => {
155
+ childProcess.on('error', (error) => {
156
156
  reject(new Error(`Failed to spawn extract process: ${error.message}`));
157
157
  });
158
158
 
159
159
  // Write content to stdin and close
160
160
  if (typeof content === 'string') {
161
- process.stdin.write(content);
161
+ childProcess.stdin.write(content);
162
162
  } else {
163
- process.stdin.write(content);
163
+ childProcess.stdin.write(content);
164
164
  }
165
- process.stdin.end();
165
+ childProcess.stdin.end();
166
166
  });
167
167
  }
168
168
 
@@ -30,7 +30,7 @@ export const extractSchema = z.object({
30
30
  end_line: z.number().optional().describe('End line number for extracting a range of lines'),
31
31
  allow_tests: z.boolean().optional().default(false).describe('Allow test files and test code blocks'),
32
32
  context_lines: z.number().optional().default(10).describe('Number of context lines to include'),
33
- format: z.string().optional().default('plain').describe('Output format (plain, markdown, json, color)')
33
+ format: z.string().optional().default('plain').describe('Output format (plain, markdown, json, xml, color, outline-xml, outline-diff)')
34
34
  });
35
35
 
36
36
  export const delegateSchema = z.object({