@probelabs/probe 0.6.0-rc101 → 0.6.0-rc102

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.
@@ -384,7 +384,7 @@ Examples:
384
384
  </extract>
385
385
 
386
386
  <attempt_completion>
387
- <result>The configuration is loaded from src/config.js lines 15-25 which contains the database settings.</result>
387
+ The configuration is loaded from src/config.js lines 15-25 which contains the database settings.
388
388
  </attempt_completion>
389
389
 
390
390
  # Special Case: Quick Completion
@@ -411,7 +411,7 @@ I need to find code related to error handling in the search module. The most app
411
411
  6. Wait for the tool execution result, which will be provided in the next message (within a <tool_result> block).
412
412
  7. Analyze the tool result and decide the next step. If more tool calls are needed, repeat steps 2-6.
413
413
  8. If the task is fully complete and all previous steps were successful, use the \`<attempt_completion>\` tool to provide the final answer. This is the ONLY way to finish the task.
414
- 9. If you cannot proceed (e.g., missing information, invalid request), explain the issue clearly before using \`<attempt_completion>\` with an appropriate message in the \`<result>\` tag.
414
+ 9. If you cannot proceed (e.g., missing information, invalid request), use \`<attempt_completion>\` to explain the issue clearly with an appropriate message directly inside the tags.
415
415
  10. If your previous response was already correct and complete, you may use \`<attempt_complete>\` as a shorthand.
416
416
 
417
417
  Available Tools:
@@ -2246,13 +2246,19 @@ For GitHub-compatible mermaid diagrams, avoid single quotes and parentheses in n
2246
2246
 
2247
2247
  **Rules:**
2248
2248
  - NO single quotes in any node labels: 'text' \u2192 "text" or text
2249
- - NO parentheses in square brackets: [Text (detail)] \u2192 [Text - detail]
2249
+ - NO parentheses in square brackets: [Text (detail)] \u2192 [Text - detail]
2250
2250
  - NO complex expressions in diamonds: {a && b} \u2192 {condition}
2251
+ - NO HTML tags in node labels: [<pre>code</pre>] \u2192 ["code block"] or [Code Block]
2251
2252
  - USE single quotes for styles and classes: classDef highlight fill:'#ff9999'
2253
+ - CRITICAL: When using quotes in node labels, place them INSIDE the brackets: ["quoted text"], NOT [quoted text"]
2252
2254
 
2253
2255
  **Examples:**
2254
2256
  - \u2705 [Load Config] ["Run command"] {Valid?}
2257
+ - \u2705 ["depends_on: [generate-items]"] (correct quote placement)
2258
+ - \u2705 ["Code Block"] (clean text instead of HTML)
2255
2259
  - \u274C [Load (config)] [Run 'command'] {isValid('x')}
2260
+ - \u274C [depends_on: [generate-items"] (incorrect quote placement - quote ends inside bracket)
2261
+ - \u274C [<pre>depends_on: [generate-items]</pre>] (HTML tags in node labels)
2256
2262
 
2257
2263
  **Diagram Type Selection:**
2258
2264
 
@@ -5140,7 +5146,7 @@ Examples:
5140
5146
  </extract>
5141
5147
 
5142
5148
  <attempt_completion>
5143
- <result>The configuration is loaded from src/config.js lines 15-25 which contains the database settings.</result>
5149
+ The configuration is loaded from src/config.js lines 15-25 which contains the database settings.
5144
5150
  </attempt_completion>
5145
5151
 
5146
5152
  # Special Case: Quick Completion
@@ -5167,7 +5173,7 @@ I need to find code related to error handling in the search module. The most app
5167
5173
  6. Wait for the tool execution result, which will be provided in the next message (within a <tool_result> block).
5168
5174
  7. Analyze the tool result and decide the next step. If more tool calls are needed, repeat steps 2-6.
5169
5175
  8. If the task is fully complete and all previous steps were successful, use the \`<attempt_completion>\` tool to provide the final answer. This is the ONLY way to finish the task.
5170
- 9. If you cannot proceed (e.g., missing information, invalid request), explain the issue clearly before using \`<attempt_completion>\` with an appropriate message in the \`<result>\` tag.
5176
+ 9. If you cannot proceed (e.g., missing information, invalid request), use \`<attempt_completion>\` to explain the issue clearly with an appropriate message directly inside the tags.
5171
5177
  10. If your previous response was already correct and complete, you may use \`<attempt_complete>\` as a shorthand.
5172
5178
 
5173
5179
  Available Tools:
@@ -6084,6 +6090,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
6084
6090
  import {
6085
6091
  CallToolRequestSchema,
6086
6092
  ErrorCode as ErrorCode2,
6093
+ InitializeRequestSchema,
6087
6094
  ListToolsRequestSchema,
6088
6095
  McpError
6089
6096
  } from "@modelcontextprotocol/sdk/types.js";
@@ -6948,7 +6955,7 @@ var ProbeAgentMcpServer = class {
6948
6955
  constructor() {
6949
6956
  this.server = new Server(
6950
6957
  {
6951
- name: "@buger/probe-agent",
6958
+ name: "@probelabs/probe agent",
6952
6959
  version: "1.0.0"
6953
6960
  },
6954
6961
  {
@@ -6965,6 +6972,18 @@ var ProbeAgentMcpServer = class {
6965
6972
  });
6966
6973
  }
6967
6974
  setupToolHandlers() {
6975
+ this.server.setRequestHandler(InitializeRequestSchema, async (request) => {
6976
+ return {
6977
+ protocolVersion: "2024-11-05",
6978
+ capabilities: {
6979
+ tools: {}
6980
+ },
6981
+ serverInfo: {
6982
+ name: "@probelabs/probe agent",
6983
+ version: "1.0.0"
6984
+ }
6985
+ };
6986
+ });
6968
6987
  this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
6969
6988
  tools: [
6970
6989
  {
@@ -7386,7 +7405,12 @@ Please reformat your previous response to match this schema exactly. Only return
7386
7405
  }
7387
7406
  }
7388
7407
  }
7389
- console.log(result);
7408
+ const resultMatch = result.match(/<result>([\s\S]*?)<\/result>/);
7409
+ if (resultMatch) {
7410
+ console.log(resultMatch[1].trim());
7411
+ } else {
7412
+ console.log(result);
7413
+ }
7390
7414
  if (config.verbose) {
7391
7415
  const tokenUsage = agent.getTokenUsage();
7392
7416
  console.error(`
@@ -510,5 +510,5 @@ class ProbeServer {
510
510
  console.error('Probe MCP server running on stdio');
511
511
  }
512
512
  }
513
- const server = new ProbeServer(cliConfig.timeout, cliConfig.format);
513
+ const server = new ProbeServer(cliConfig.timeout, cliConfig.format || 'outline-xml');
514
514
  server.run().catch(console.error);
@@ -604,5 +604,5 @@ class ProbeServer {
604
604
  }
605
605
  }
606
606
 
607
- const server = new ProbeServer(cliConfig.timeout, cliConfig.format);
607
+ const server = new ProbeServer(cliConfig.timeout, cliConfig.format || 'outline-xml');
608
608
  server.run().catch(console.error);
@@ -73,13 +73,19 @@ For GitHub-compatible mermaid diagrams, avoid single quotes and parentheses in n
73
73
 
74
74
  **Rules:**
75
75
  - NO single quotes in any node labels: 'text' → "text" or text
76
- - NO parentheses in square brackets: [Text (detail)] → [Text - detail]
76
+ - NO parentheses in square brackets: [Text (detail)] → [Text - detail]
77
77
  - NO complex expressions in diamonds: {a && b} → {condition}
78
+ - NO HTML tags in node labels: [<pre>code</pre>] → ["code block"] or [Code Block]
78
79
  - USE single quotes for styles and classes: classDef highlight fill:'#ff9999'
80
+ - CRITICAL: When using quotes in node labels, place them INSIDE the brackets: ["quoted text"], NOT [quoted text"]
79
81
 
80
82
  **Examples:**
81
83
  - ✅ [Load Config] ["Run command"] {Valid?}
84
+ - ✅ ["depends_on: [generate-items]"] (correct quote placement)
85
+ - ✅ ["Code Block"] (clean text instead of HTML)
82
86
  - ❌ [Load (config)] [Run 'command'] {isValid('x')}
87
+ - ❌ [depends_on: [generate-items"] (incorrect quote placement - quote ends inside bracket)
88
+ - ❌ [<pre>depends_on: [generate-items]</pre>] (HTML tags in node labels)
83
89
 
84
90
  **Diagram Type Selection:**
85
91
 
@@ -2268,13 +2268,19 @@ For GitHub-compatible mermaid diagrams, avoid single quotes and parentheses in n
2268
2268
 
2269
2269
  **Rules:**
2270
2270
  - NO single quotes in any node labels: 'text' \u2192 "text" or text
2271
- - NO parentheses in square brackets: [Text (detail)] \u2192 [Text - detail]
2271
+ - NO parentheses in square brackets: [Text (detail)] \u2192 [Text - detail]
2272
2272
  - NO complex expressions in diamonds: {a && b} \u2192 {condition}
2273
+ - NO HTML tags in node labels: [<pre>code</pre>] \u2192 ["code block"] or [Code Block]
2273
2274
  - USE single quotes for styles and classes: classDef highlight fill:'#ff9999'
2275
+ - CRITICAL: When using quotes in node labels, place them INSIDE the brackets: ["quoted text"], NOT [quoted text"]
2274
2276
 
2275
2277
  **Examples:**
2276
2278
  - \u2705 [Load Config] ["Run command"] {Valid?}
2279
+ - \u2705 ["depends_on: [generate-items]"] (correct quote placement)
2280
+ - \u2705 ["Code Block"] (clean text instead of HTML)
2277
2281
  - \u274C [Load (config)] [Run 'command'] {isValid('x')}
2282
+ - \u274C [depends_on: [generate-items"] (incorrect quote placement - quote ends inside bracket)
2283
+ - \u274C [<pre>depends_on: [generate-items]</pre>] (HTML tags in node labels)
2278
2284
 
2279
2285
  **Diagram Type Selection:**
2280
2286
 
@@ -4888,7 +4894,7 @@ Examples:
4888
4894
  </extract>
4889
4895
 
4890
4896
  <attempt_completion>
4891
- <result>The configuration is loaded from src/config.js lines 15-25 which contains the database settings.</result>
4897
+ The configuration is loaded from src/config.js lines 15-25 which contains the database settings.
4892
4898
  </attempt_completion>
4893
4899
 
4894
4900
  # Special Case: Quick Completion
@@ -4915,7 +4921,7 @@ I need to find code related to error handling in the search module. The most app
4915
4921
  6. Wait for the tool execution result, which will be provided in the next message (within a <tool_result> block).
4916
4922
  7. Analyze the tool result and decide the next step. If more tool calls are needed, repeat steps 2-6.
4917
4923
  8. If the task is fully complete and all previous steps were successful, use the \`<attempt_completion>\` tool to provide the final answer. This is the ONLY way to finish the task.
4918
- 9. If you cannot proceed (e.g., missing information, invalid request), explain the issue clearly before using \`<attempt_completion>\` with an appropriate message in the \`<result>\` tag.
4924
+ 9. If you cannot proceed (e.g., missing information, invalid request), use \`<attempt_completion>\` to explain the issue clearly with an appropriate message directly inside the tags.
4919
4925
  10. If your previous response was already correct and complete, you may use \`<attempt_complete>\` as a shorthand.
4920
4926
 
4921
4927
  Available Tools:
package/cjs/index.cjs CHANGED
@@ -2040,13 +2040,19 @@ For GitHub-compatible mermaid diagrams, avoid single quotes and parentheses in n
2040
2040
 
2041
2041
  **Rules:**
2042
2042
  - NO single quotes in any node labels: 'text' \u2192 "text" or text
2043
- - NO parentheses in square brackets: [Text (detail)] \u2192 [Text - detail]
2043
+ - NO parentheses in square brackets: [Text (detail)] \u2192 [Text - detail]
2044
2044
  - NO complex expressions in diamonds: {a && b} \u2192 {condition}
2045
+ - NO HTML tags in node labels: [<pre>code</pre>] \u2192 ["code block"] or [Code Block]
2045
2046
  - USE single quotes for styles and classes: classDef highlight fill:'#ff9999'
2047
+ - CRITICAL: When using quotes in node labels, place them INSIDE the brackets: ["quoted text"], NOT [quoted text"]
2046
2048
 
2047
2049
  **Examples:**
2048
2050
  - \u2705 [Load Config] ["Run command"] {Valid?}
2051
+ - \u2705 ["depends_on: [generate-items]"] (correct quote placement)
2052
+ - \u2705 ["Code Block"] (clean text instead of HTML)
2049
2053
  - \u274C [Load (config)] [Run 'command'] {isValid('x')}
2054
+ - \u274C [depends_on: [generate-items"] (incorrect quote placement - quote ends inside bracket)
2055
+ - \u274C [<pre>depends_on: [generate-items]</pre>] (HTML tags in node labels)
2050
2056
 
2051
2057
  **Diagram Type Selection:**
2052
2058
 
@@ -4974,7 +4980,7 @@ Examples:
4974
4980
  </extract>
4975
4981
 
4976
4982
  <attempt_completion>
4977
- <result>The configuration is loaded from src/config.js lines 15-25 which contains the database settings.</result>
4983
+ The configuration is loaded from src/config.js lines 15-25 which contains the database settings.
4978
4984
  </attempt_completion>
4979
4985
 
4980
4986
  # Special Case: Quick Completion
@@ -5001,7 +5007,7 @@ I need to find code related to error handling in the search module. The most app
5001
5007
  6. Wait for the tool execution result, which will be provided in the next message (within a <tool_result> block).
5002
5008
  7. Analyze the tool result and decide the next step. If more tool calls are needed, repeat steps 2-6.
5003
5009
  8. If the task is fully complete and all previous steps were successful, use the \`<attempt_completion>\` tool to provide the final answer. This is the ONLY way to finish the task.
5004
- 9. If you cannot proceed (e.g., missing information, invalid request), explain the issue clearly before using \`<attempt_completion>\` with an appropriate message in the \`<result>\` tag.
5010
+ 9. If you cannot proceed (e.g., missing information, invalid request), use \`<attempt_completion>\` to explain the issue clearly with an appropriate message directly inside the tags.
5005
5011
  10. If your previous response was already correct and complete, you may use \`<attempt_complete>\` as a shorthand.
5006
5012
 
5007
5013
  Available Tools:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@probelabs/probe",
3
- "version": "0.6.0-rc101",
3
+ "version": "0.6.0-rc102",
4
4
  "description": "Node.js wrapper for the probe code search tool",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -384,7 +384,7 @@ Examples:
384
384
  </extract>
385
385
 
386
386
  <attempt_completion>
387
- <result>The configuration is loaded from src/config.js lines 15-25 which contains the database settings.</result>
387
+ The configuration is loaded from src/config.js lines 15-25 which contains the database settings.
388
388
  </attempt_completion>
389
389
 
390
390
  # Special Case: Quick Completion
@@ -411,7 +411,7 @@ I need to find code related to error handling in the search module. The most app
411
411
  6. Wait for the tool execution result, which will be provided in the next message (within a <tool_result> block).
412
412
  7. Analyze the tool result and decide the next step. If more tool calls are needed, repeat steps 2-6.
413
413
  8. If the task is fully complete and all previous steps were successful, use the \`<attempt_completion>\` tool to provide the final answer. This is the ONLY way to finish the task.
414
- 9. If you cannot proceed (e.g., missing information, invalid request), explain the issue clearly before using \`<attempt_completion>\` with an appropriate message in the \`<result>\` tag.
414
+ 9. If you cannot proceed (e.g., missing information, invalid request), use \`<attempt_completion>\` to explain the issue clearly with an appropriate message directly inside the tags.
415
415
  10. If your previous response was already correct and complete, you may use \`<attempt_complete>\` as a shorthand.
416
416
 
417
417
  Available Tools:
@@ -4,6 +4,7 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
4
4
  import {
5
5
  CallToolRequestSchema,
6
6
  ErrorCode,
7
+ InitializeRequestSchema,
7
8
  ListToolsRequestSchema,
8
9
  McpError,
9
10
  } from '@modelcontextprotocol/sdk/types.js';
@@ -255,7 +256,7 @@ class ProbeAgentMcpServer {
255
256
  constructor() {
256
257
  this.server = new Server(
257
258
  {
258
- name: '@buger/probe-agent',
259
+ name: '@probelabs/probe agent',
259
260
  version: '1.0.0',
260
261
  },
261
262
  {
@@ -274,6 +275,20 @@ class ProbeAgentMcpServer {
274
275
  }
275
276
 
276
277
  setupToolHandlers() {
278
+ // Handle MCP initialize request
279
+ this.server.setRequestHandler(InitializeRequestSchema, async (request) => {
280
+ return {
281
+ protocolVersion: '2024-11-05',
282
+ capabilities: {
283
+ tools: {},
284
+ },
285
+ serverInfo: {
286
+ name: '@probelabs/probe agent',
287
+ version: '1.0.0',
288
+ },
289
+ };
290
+ });
291
+
277
292
  this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
278
293
  tools: [
279
294
  {
@@ -763,8 +778,13 @@ async function main() {
763
778
  }
764
779
  }
765
780
 
766
- // Output the result
767
- console.log(result);
781
+ // Output the result (strip <result> tags if present for cleaner CLI output)
782
+ const resultMatch = result.match(/<result>([\s\S]*?)<\/result>/);
783
+ if (resultMatch) {
784
+ console.log(resultMatch[1].trim());
785
+ } else {
786
+ console.log(result);
787
+ }
768
788
 
769
789
  // Show token usage in verbose mode
770
790
  if (config.verbose) {
@@ -810,4 +830,4 @@ process.on('unhandledRejection', (reason, promise) => {
810
830
  main().catch((error) => {
811
831
  console.error('Fatal error:', error);
812
832
  process.exit(1);
813
- });
833
+ });
package/src/mcp/index.ts CHANGED
@@ -604,5 +604,5 @@ class ProbeServer {
604
604
  }
605
605
  }
606
606
 
607
- const server = new ProbeServer(cliConfig.timeout, cliConfig.format);
607
+ const server = new ProbeServer(cliConfig.timeout, cliConfig.format || 'outline-xml');
608
608
  server.run().catch(console.error);
@@ -73,13 +73,19 @@ For GitHub-compatible mermaid diagrams, avoid single quotes and parentheses in n
73
73
 
74
74
  **Rules:**
75
75
  - NO single quotes in any node labels: 'text' → "text" or text
76
- - NO parentheses in square brackets: [Text (detail)] → [Text - detail]
76
+ - NO parentheses in square brackets: [Text (detail)] → [Text - detail]
77
77
  - NO complex expressions in diamonds: {a && b} → {condition}
78
+ - NO HTML tags in node labels: [<pre>code</pre>] → ["code block"] or [Code Block]
78
79
  - USE single quotes for styles and classes: classDef highlight fill:'#ff9999'
80
+ - CRITICAL: When using quotes in node labels, place them INSIDE the brackets: ["quoted text"], NOT [quoted text"]
79
81
 
80
82
  **Examples:**
81
83
  - ✅ [Load Config] ["Run command"] {Valid?}
84
+ - ✅ ["depends_on: [generate-items]"] (correct quote placement)
85
+ - ✅ ["Code Block"] (clean text instead of HTML)
82
86
  - ❌ [Load (config)] [Run 'command'] {isValid('x')}
87
+ - ❌ [depends_on: [generate-items"] (incorrect quote placement - quote ends inside bracket)
88
+ - ❌ [<pre>depends_on: [generate-items]</pre>] (HTML tags in node labels)
83
89
 
84
90
  **Diagram Type Selection:**
85
91