@probelabs/probe 0.6.0-rc100

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.
Files changed (115) hide show
  1. package/README.md +583 -0
  2. package/bin/.gitkeep +0 -0
  3. package/bin/probe +158 -0
  4. package/bin/probe-binary +0 -0
  5. package/build/agent/ProbeAgent.d.ts +199 -0
  6. package/build/agent/ProbeAgent.js +1486 -0
  7. package/build/agent/acp/README.md +347 -0
  8. package/build/agent/acp/connection.js +237 -0
  9. package/build/agent/acp/connection.test.js +311 -0
  10. package/build/agent/acp/examples/simple-client.js +212 -0
  11. package/build/agent/acp/examples/tool-lifecycle.js +230 -0
  12. package/build/agent/acp/final-test.js +173 -0
  13. package/build/agent/acp/index.js +5 -0
  14. package/build/agent/acp/integration.test.js +385 -0
  15. package/build/agent/acp/manual-test.js +410 -0
  16. package/build/agent/acp/protocol-test.js +190 -0
  17. package/build/agent/acp/server.js +448 -0
  18. package/build/agent/acp/server.test.js +371 -0
  19. package/build/agent/acp/test-runner.js +216 -0
  20. package/build/agent/acp/test-utils/README.md +315 -0
  21. package/build/agent/acp/test-utils/acp-tester.js +484 -0
  22. package/build/agent/acp/test-utils/mock-acp-client.js +434 -0
  23. package/build/agent/acp/tools.js +368 -0
  24. package/build/agent/acp/tools.test.js +334 -0
  25. package/build/agent/acp/types.js +218 -0
  26. package/build/agent/acp/types.test.js +327 -0
  27. package/build/agent/appTracer.js +360 -0
  28. package/build/agent/fileSpanExporter.js +169 -0
  29. package/build/agent/index.js +7426 -0
  30. package/build/agent/mcp/client.js +338 -0
  31. package/build/agent/mcp/config.js +313 -0
  32. package/build/agent/mcp/index.js +64 -0
  33. package/build/agent/mcp/xmlBridge.js +371 -0
  34. package/build/agent/mockProvider.js +53 -0
  35. package/build/agent/probeTool.js +257 -0
  36. package/build/agent/schemaUtils.js +1726 -0
  37. package/build/agent/simpleTelemetry.js +267 -0
  38. package/build/agent/telemetry.js +225 -0
  39. package/build/agent/tokenCounter.js +395 -0
  40. package/build/agent/tools.js +163 -0
  41. package/build/cli.js +49 -0
  42. package/build/delegate.js +267 -0
  43. package/build/directory-resolver.js +237 -0
  44. package/build/downloader.js +750 -0
  45. package/build/extract.js +149 -0
  46. package/build/index.js +70 -0
  47. package/build/mcp/index.js +514 -0
  48. package/build/mcp/index.ts +608 -0
  49. package/build/query.js +116 -0
  50. package/build/search.js +247 -0
  51. package/build/tools/common.js +410 -0
  52. package/build/tools/index.js +40 -0
  53. package/build/tools/langchain.js +88 -0
  54. package/build/tools/system-message.js +121 -0
  55. package/build/tools/vercel.js +271 -0
  56. package/build/utils/file-lister.js +193 -0
  57. package/build/utils.js +128 -0
  58. package/cjs/agent/ProbeAgent.cjs +5829 -0
  59. package/cjs/index.cjs +6217 -0
  60. package/cjs/package.json +3 -0
  61. package/index.d.ts +401 -0
  62. package/package.json +114 -0
  63. package/scripts/postinstall.js +172 -0
  64. package/src/agent/ProbeAgent.d.ts +199 -0
  65. package/src/agent/ProbeAgent.js +1486 -0
  66. package/src/agent/acp/README.md +347 -0
  67. package/src/agent/acp/connection.js +237 -0
  68. package/src/agent/acp/connection.test.js +311 -0
  69. package/src/agent/acp/examples/simple-client.js +212 -0
  70. package/src/agent/acp/examples/tool-lifecycle.js +230 -0
  71. package/src/agent/acp/final-test.js +173 -0
  72. package/src/agent/acp/index.js +5 -0
  73. package/src/agent/acp/integration.test.js +385 -0
  74. package/src/agent/acp/manual-test.js +410 -0
  75. package/src/agent/acp/protocol-test.js +190 -0
  76. package/src/agent/acp/server.js +448 -0
  77. package/src/agent/acp/server.test.js +371 -0
  78. package/src/agent/acp/test-runner.js +216 -0
  79. package/src/agent/acp/test-utils/README.md +315 -0
  80. package/src/agent/acp/test-utils/acp-tester.js +484 -0
  81. package/src/agent/acp/test-utils/mock-acp-client.js +434 -0
  82. package/src/agent/acp/tools.js +368 -0
  83. package/src/agent/acp/tools.test.js +334 -0
  84. package/src/agent/acp/types.js +218 -0
  85. package/src/agent/acp/types.test.js +327 -0
  86. package/src/agent/appTracer.js +360 -0
  87. package/src/agent/fileSpanExporter.js +169 -0
  88. package/src/agent/index.js +813 -0
  89. package/src/agent/mcp/client.js +338 -0
  90. package/src/agent/mcp/config.js +313 -0
  91. package/src/agent/mcp/index.js +64 -0
  92. package/src/agent/mcp/xmlBridge.js +371 -0
  93. package/src/agent/mockProvider.js +53 -0
  94. package/src/agent/probeTool.js +257 -0
  95. package/src/agent/schemaUtils.js +1726 -0
  96. package/src/agent/simpleTelemetry.js +267 -0
  97. package/src/agent/telemetry.js +225 -0
  98. package/src/agent/tokenCounter.js +395 -0
  99. package/src/agent/tools.js +163 -0
  100. package/src/cli.js +49 -0
  101. package/src/delegate.js +267 -0
  102. package/src/directory-resolver.js +237 -0
  103. package/src/downloader.js +750 -0
  104. package/src/extract.js +149 -0
  105. package/src/index.js +70 -0
  106. package/src/mcp/index.ts +608 -0
  107. package/src/query.js +116 -0
  108. package/src/search.js +247 -0
  109. package/src/tools/common.js +410 -0
  110. package/src/tools/index.js +40 -0
  111. package/src/tools/langchain.js +88 -0
  112. package/src/tools/system-message.js +121 -0
  113. package/src/tools/vercel.js +271 -0
  114. package/src/utils/file-lister.js +193 -0
  115. package/src/utils.js +128 -0
package/README.md ADDED
@@ -0,0 +1,583 @@
1
+ # @probelabs/probe
2
+
3
+ A Node.js wrapper for the [probe](https://github.com/probelabs/probe) code search tool.
4
+
5
+ ## Installation
6
+
7
+ ### Local Installation
8
+
9
+ ```bash
10
+ npm install @probelabs/probe
11
+ ```
12
+
13
+ ### Global Installation
14
+
15
+ ```bash
16
+ npm install -g @probelabs/probe
17
+ ```
18
+
19
+ During installation, the package will automatically download the appropriate probe binary for your platform.
20
+
21
+ ## Features
22
+
23
+ - **Search Code**: Search for patterns in your codebase using Elasticsearch-like query syntax
24
+ - **Query Code**: Find specific code structures using tree-sitter patterns
25
+ - **Extract Code**: Extract code blocks from files based on file paths and line numbers
26
+ - **AI Tools Integration**: Ready-to-use tools for Vercel AI SDK, LangChain, and other AI frameworks
27
+ - **System Message**: Default system message for AI assistants with instructions on using probe tools
28
+ - **Cross-Platform**: Works on Windows, macOS, and Linux
29
+ - **Automatic Binary Management**: Automatically downloads and manages the probe binary
30
+ - **Direct CLI Access**: Use the probe binary directly from the command line when installed globally
31
+ - **MCP Server**: Built-in Model Context Protocol server for AI assistant integration
32
+
33
+ ## Usage
34
+
35
+ ### Using as a Node.js Library
36
+
37
+ ```javascript
38
+ import { search, query, extract } from '@probelabs/probe';
39
+
40
+ // Search for code
41
+ const searchResults = await search({
42
+ path: '/path/to/your/project',
43
+ query: 'function',
44
+ maxResults: 10
45
+ });
46
+
47
+ // Query for specific code structures
48
+ const queryResults = await query({
49
+ path: '/path/to/your/project',
50
+ pattern: 'function $NAME($$$PARAMS) $$$BODY',
51
+ language: 'javascript'
52
+ });
53
+
54
+ // Extract code blocks
55
+ const extractResults = await extract({
56
+ files: ['/path/to/your/project/src/main.js:42']
57
+ });
58
+ ```
59
+
60
+ ### Using as a Command-Line Tool
61
+
62
+ When installed globally, the `probe` command will be available directly from the command line:
63
+
64
+ ```bash
65
+ # Search for code
66
+ probe search "function" /path/to/your/project
67
+
68
+ # Query for specific code structures
69
+ probe query "function $NAME($$$PARAMS) $$$BODY" /path/to/your/project
70
+
71
+ # Extract code blocks
72
+ probe extract /path/to/your/project/src/main.js:42
73
+
74
+ # Run MCP server for AI assistant integration
75
+ probe mcp
76
+ ```
77
+
78
+ The package installs the actual probe binary, not a JavaScript wrapper, so you get the full native performance and all features of the original probe CLI.
79
+
80
+ ### Using ProbeAgent (AI-Powered Code Assistant)
81
+
82
+ ProbeAgent provides a high-level AI-powered interface for interacting with your codebase:
83
+
84
+ ```javascript
85
+ import { ProbeAgent } from '@buger/probe';
86
+
87
+ // Create an AI agent for your project
88
+ const agent = new ProbeAgent({
89
+ sessionId: 'my-session', // Optional: for conversation continuity
90
+ path: '/path/to/your/project',
91
+ provider: 'anthropic', // or 'openai', 'google'
92
+ model: 'claude-3-5-sonnet-20241022', // Optional: override model
93
+ allowEdit: false, // Optional: enable code modification
94
+ debug: true // Optional: enable debug logging
95
+ });
96
+
97
+ // Ask questions about your codebase
98
+ const answer = await agent.answer("How does authentication work in this codebase?");
99
+ console.log(answer);
100
+
101
+ // The agent maintains conversation history automatically
102
+ const followUp = await agent.answer("Can you show me the login implementation?");
103
+ console.log(followUp);
104
+
105
+ // Get token usage statistics
106
+ const usage = agent.getTokenUsage();
107
+ console.log(`Used ${usage.total} tokens total`);
108
+
109
+ // Clear conversation history if needed
110
+ agent.history = [];
111
+ ```
112
+
113
+ **Environment Variables:**
114
+ ```bash
115
+ # Set your API key for the chosen provider
116
+ export ANTHROPIC_API_KEY=your_anthropic_key
117
+ export OPENAI_API_KEY=your_openai_key
118
+ export GOOGLE_API_KEY=your_google_key
119
+
120
+ # Optional: Force a specific provider
121
+ export FORCE_PROVIDER=anthropic
122
+
123
+ # Optional: Override model name
124
+ export MODEL_NAME=claude-3-5-sonnet-20241022
125
+ ```
126
+
127
+ **ProbeAgent Features:**
128
+ - **Multi-turn conversations** with automatic history management
129
+ - **Code search integration** - Uses probe's search capabilities transparently
130
+ - **Multiple AI providers** - Supports Anthropic Claude, OpenAI GPT, Google Gemini
131
+ - **Session management** - Maintain conversation context across calls
132
+ - **Token tracking** - Monitor usage and costs
133
+ - **Configurable personas** - Engineer, architect, code-review, and more
134
+
135
+ ### Using as an MCP Server
136
+
137
+ Probe includes a built-in MCP (Model Context Protocol) server for integration with AI assistants:
138
+
139
+ ```bash
140
+ # Start the MCP server
141
+ probe mcp
142
+
143
+ # With custom timeout
144
+ probe mcp --timeout 60
145
+ ```
146
+
147
+ Add to your AI assistant's MCP configuration:
148
+
149
+ ```json
150
+ {
151
+ "mcpServers": {
152
+ "probe": {
153
+ "command": "npx",
154
+ "args": ["-y", "@probelabs/probe", "mcp"]
155
+ }
156
+ }
157
+ }
158
+ ```
159
+
160
+ ## API Reference
161
+
162
+ ### Search
163
+
164
+ ```javascript
165
+ import { search } from '@probelabs/probe';
166
+
167
+ const results = await search({
168
+ path: '/path/to/your/project',
169
+ query: 'function',
170
+ // Optional parameters
171
+ filesOnly: false,
172
+ ignore: ['node_modules', 'dist'],
173
+ excludeFilenames: false,
174
+ reranker: 'hybrid',
175
+ frequencySearch: true,
176
+ maxResults: 10,
177
+ maxBytes: 1000000,
178
+ maxTokens: 40000,
179
+ allowTests: false,
180
+ noMerge: false,
181
+ mergeThreshold: 5,
182
+ json: false,
183
+ binaryOptions: {
184
+ forceDownload: false,
185
+ version: '1.0.0'
186
+ }
187
+ });
188
+ ```
189
+
190
+ #### Parameters
191
+
192
+ - `path` (required): Path to search in
193
+ - `query` (required): Search query or queries (string or array of strings)
194
+ - `filesOnly`: Only output file paths
195
+ - `ignore`: Patterns to ignore (array of strings)
196
+ - `excludeFilenames`: Exclude filenames from search
197
+ - `reranker`: Reranking method ('hybrid', 'hybrid2', 'bm25', 'tfidf')
198
+ - `frequencySearch`: Use frequency-based search
199
+ - `maxResults`: Maximum number of results
200
+ - `maxBytes`: Maximum bytes to return
201
+ - `maxTokens`: Maximum tokens to return
202
+ - `allowTests`: Include test files
203
+ - `noMerge`: Don't merge adjacent blocks
204
+ - `mergeThreshold`: Merge threshold
205
+ - `json`: Return results as parsed JSON instead of string
206
+ - `binaryOptions`: Options for getting the binary
207
+ - `forceDownload`: Force download even if binary exists
208
+ - `version`: Specific version to download
209
+
210
+ ### Query
211
+
212
+ ```javascript
213
+ import { query } from '@probelabs/probe';
214
+
215
+ const results = await query({
216
+ path: '/path/to/your/project',
217
+ pattern: 'function $NAME($$$PARAMS) $$$BODY',
218
+ // Optional parameters
219
+ language: 'javascript',
220
+ ignore: ['node_modules', 'dist'],
221
+ allowTests: false,
222
+ maxResults: 10,
223
+ format: 'markdown',
224
+ json: false,
225
+ binaryOptions: {
226
+ forceDownload: false,
227
+ version: '1.0.0'
228
+ }
229
+ });
230
+ ```
231
+
232
+ #### Parameters
233
+
234
+ - `path` (required): Path to search in
235
+ - `pattern` (required): The ast-grep pattern to search for
236
+ - `language`: Programming language to search in
237
+ - `ignore`: Patterns to ignore (array of strings)
238
+ - `allowTests`: Include test files
239
+ - `maxResults`: Maximum number of results
240
+ - `format`: Output format ('markdown', 'plain', 'json', 'color')
241
+ - `json`: Return results as parsed JSON instead of string
242
+ - `binaryOptions`: Options for getting the binary
243
+ - `forceDownload`: Force download even if binary exists
244
+ - `version`: Specific version to download
245
+
246
+ ### Extract
247
+
248
+ ```javascript
249
+ import { extract } from '@probelabs/probe';
250
+
251
+ const results = await extract({
252
+ files: [
253
+ '/path/to/your/project/src/main.js',
254
+ '/path/to/your/project/src/utils.js:42' // Extract from line 42
255
+ ],
256
+ // Optional parameters
257
+ allowTests: false,
258
+ contextLines: 2,
259
+ format: 'markdown',
260
+ json: false,
261
+ binaryOptions: {
262
+ forceDownload: false,
263
+ version: '1.0.0'
264
+ }
265
+ });
266
+ ```
267
+
268
+ #### Parameters
269
+
270
+ - `files` (required): Files to extract from (can include line numbers with colon, e.g., "/path/to/file.rs:10")
271
+ - `allowTests`: Include test files
272
+ - `contextLines`: Number of context lines to include
273
+ - `format`: Output format ('markdown', 'plain', 'json')
274
+ - `json`: Return results as parsed JSON instead of string
275
+ - `binaryOptions`: Options for getting the binary
276
+ - `forceDownload`: Force download even if binary exists
277
+ - `version`: Specific version to download
278
+
279
+ ### Binary Management
280
+
281
+ ```javascript
282
+ import { getBinaryPath, setBinaryPath } from '@probelabs/probe';
283
+
284
+ // Get the path to the probe binary
285
+ const binaryPath = await getBinaryPath({
286
+ forceDownload: false,
287
+ version: '1.0.0'
288
+ });
289
+
290
+ // Manually set the path to the probe binary
291
+ setBinaryPath('/path/to/probe/binary');
292
+ ```
293
+
294
+ ### AI Tools
295
+
296
+ ```javascript
297
+ import { tools } from '@probelabs/probe';
298
+
299
+ // Vercel AI SDK tools
300
+ const { searchTool, queryTool, extractTool } = tools;
301
+
302
+ // LangChain tools
303
+ const searchLangChainTool = tools.createSearchTool();
304
+ const queryLangChainTool = tools.createQueryTool();
305
+ const extractLangChainTool = tools.createExtractTool();
306
+ // Access schemas
307
+ const { searchSchema, querySchema, extractSchema } = tools;
308
+
309
+ // Access default system message
310
+ const systemMessage = tools.DEFAULT_SYSTEM_MESSAGE;
311
+ ```
312
+
313
+ #### Vercel AI SDK Tools
314
+
315
+ - `searchTool`: Tool for searching code using Elasticsearch-like query syntax
316
+ - `queryTool`: Tool for searching code using tree-sitter patterns
317
+ - `extractTool`: Tool for extracting code blocks from files
318
+
319
+ #### LangChain Tools
320
+
321
+ - `createSearchTool()`: Creates a tool for searching code using Elasticsearch-like query syntax
322
+ - `createQueryTool()`: Creates a tool for searching code using tree-sitter patterns
323
+ - `createExtractTool()`: Creates a tool for extracting code blocks from files
324
+
325
+ #### Schemas
326
+
327
+ - `searchSchema`: Zod schema for search tool parameters
328
+ - `querySchema`: Zod schema for query tool parameters
329
+ - `extractSchema`: Zod schema for extract tool parameters
330
+
331
+ #### System Message
332
+
333
+ - `DEFAULT_SYSTEM_MESSAGE`: Default system message for AI assistants with instructions on how to use the probe tools
334
+ - `extractSchema`: Zod schema for extract tool parameters
335
+
336
+ ## Examples
337
+
338
+ ### Basic Search Example
339
+
340
+ ```javascript
341
+ import { search } from '@probelabs/probe';
342
+
343
+ async function basicSearchExample() {
344
+ try {
345
+ const results = await search({
346
+ path: '/path/to/your/project',
347
+ query: 'function',
348
+ maxResults: 5
349
+ });
350
+
351
+ console.log('Search results:');
352
+ console.log(results);
353
+ } catch (error) {
354
+ console.error('Search error:', error);
355
+ }
356
+ }
357
+ ```
358
+
359
+ ### Advanced Search with Multiple Options
360
+
361
+ ```javascript
362
+ import { search } from '@probelabs/probe';
363
+
364
+ async function advancedSearchExample() {
365
+ try {
366
+ const results = await search({
367
+ path: '/path/to/your/project',
368
+ query: 'config AND (parse OR tokenize)',
369
+ ignore: ['node_modules', 'dist'],
370
+ reranker: 'hybrid',
371
+ frequencySearch: true,
372
+ maxResults: 10,
373
+ maxTokens: 20000,
374
+ allowTests: false
375
+ });
376
+
377
+ console.log('Advanced search results:');
378
+ console.log(results);
379
+ } catch (error) {
380
+ console.error('Advanced search error:', error);
381
+ }
382
+ }
383
+ ```
384
+
385
+ ### Query for Specific Code Structures
386
+
387
+ ```javascript
388
+ import { query } from '@probelabs/probe';
389
+
390
+ async function queryExample() {
391
+ try {
392
+ // Find all JavaScript functions
393
+ const jsResults = await query({
394
+ path: '/path/to/your/project',
395
+ pattern: 'function $NAME($$$PARAMS) $$$BODY',
396
+ language: 'javascript',
397
+ maxResults: 5
398
+ });
399
+
400
+ console.log('JavaScript functions:');
401
+ console.log(jsResults);
402
+
403
+ // Find all Rust structs
404
+ const rustResults = await query({
405
+ path: '/path/to/your/project',
406
+ pattern: 'struct $NAME $$$BODY',
407
+ language: 'rust',
408
+ maxResults: 5
409
+ });
410
+
411
+ console.log('Rust structs:');
412
+ console.log(rustResults);
413
+ } catch (error) {
414
+ console.error('Query error:', error);
415
+ }
416
+ }
417
+ ```
418
+
419
+ ### Extract Code Blocks
420
+
421
+ ```javascript
422
+ import { extract } from '@probelabs/probe';
423
+
424
+ async function extractExample() {
425
+ try {
426
+ const results = await extract({
427
+ files: [
428
+ '/path/to/your/project/src/main.js',
429
+ '/path/to/your/project/src/utils.js:42' // Extract from line 42
430
+ ],
431
+ contextLines: 2,
432
+ format: 'markdown'
433
+ });
434
+
435
+ console.log('Extracted code:');
436
+ console.log(results);
437
+ } catch (error) {
438
+ console.error('Extract error:', error);
439
+ }
440
+ }
441
+ ```
442
+
443
+ ## How It Works
444
+
445
+ When you install this package:
446
+
447
+ 1. A placeholder binary is included in the package
448
+ 2. During installation, the postinstall script downloads the actual probe binary for your platform
449
+ 3. The placeholder is replaced with the actual binary
450
+ 4. When installed globally, npm creates a symlink to this binary in your system path
451
+
452
+ This approach ensures that you get the actual native binary, not a JavaScript wrapper, providing full performance and all features of the original probe CLI.
453
+
454
+ ## AI Tools Integration
455
+
456
+ The package provides built-in tools for integrating with AI SDKs like Vercel AI SDK and LangChain, allowing you to use probe's powerful code search capabilities in AI applications.
457
+
458
+ ### Using with Vercel AI SDK
459
+
460
+ ```javascript
461
+ import { generateText } from 'ai';
462
+ import { tools } from '@probelabs/probe';
463
+
464
+ // Use the pre-built tools with Vercel AI SDK
465
+ async function chatWithAI(userMessage) {
466
+ const result = await generateText({
467
+ model: provider(modelName),
468
+ messages: [{ role: 'user', content: userMessage }],
469
+ system: "You are a code intelligence assistant. Use the provided tools to search and analyze code.",
470
+ tools: {
471
+ search: tools.searchTool,
472
+ query: tools.queryTool,
473
+ extract: tools.extractTool
474
+ },
475
+ maxSteps: 15,
476
+ temperature: 0.7
477
+ });
478
+
479
+ return result.text;
480
+ }
481
+ ```
482
+
483
+ ### Using with LangChain
484
+
485
+ ```javascript
486
+ import { ChatOpenAI } from '@langchain/openai';
487
+ import { tools } from '@probelabs/probe';
488
+
489
+ // Create the LangChain tools
490
+ const searchTool = tools.createSearchTool();
491
+ const queryTool = tools.createQueryTool();
492
+ const extractTool = tools.createExtractTool();
493
+
494
+ // Create a ChatOpenAI instance with tools
495
+ const model = new ChatOpenAI({
496
+ modelName: "gpt-4o",
497
+ temperature: 0.7
498
+ }).withTools([searchTool, queryTool, extractTool]);
499
+
500
+ // Use the model with tools
501
+ async function chatWithAI(userMessage) {
502
+ const result = await model.invoke([
503
+ { role: "system", content: "You are a code intelligence assistant. Use the provided tools to search and analyze code." },
504
+ { role: "user", content: userMessage }
505
+ ]);
506
+
507
+ return result.content;
508
+ }
509
+ ```
510
+
511
+ ### Using the Default System Message
512
+
513
+ The package provides a default system message that you can use with your AI assistants:
514
+
515
+ ```javascript
516
+ import { tools } from '@probelabs/probe';
517
+
518
+ // Use the default system message in your AI application
519
+ const systemMessage = tools.DEFAULT_SYSTEM_MESSAGE;
520
+
521
+ // Example with Vercel AI SDK
522
+ const result = await generateText({
523
+ model: provider(modelName),
524
+ messages: [{ role: 'user', content: userMessage }],
525
+ system: tools.DEFAULT_SYSTEM_MESSAGE,
526
+ tools: {
527
+ search: tools.searchTool,
528
+ query: tools.queryTool,
529
+ extract: tools.extractTool
530
+ }
531
+ });
532
+ ```
533
+
534
+ The default system message provides instructions for AI assistants on how to use the probe tools effectively, including search query formatting, tool execution sequence, and best practices.
535
+
536
+ ## License
537
+
538
+ ISC
539
+
540
+ ## Migration from @probelabs/probe-mcp
541
+
542
+ If you're migrating from the standalone `@probelabs/probe-mcp` package, `probe mcp` is a drop-in replacement:
543
+
544
+ **Old usage:**
545
+ ```bash
546
+ npx @probelabs/probe-mcp
547
+ # or
548
+ probe-mcp --timeout 60
549
+ ```
550
+
551
+ **New usage (drop-in replacement):**
552
+ ```bash
553
+ probe mcp
554
+ # or
555
+ probe mcp --timeout 60
556
+ ```
557
+
558
+ **MCP Configuration:**
559
+ ```json
560
+ // Old configuration
561
+ {
562
+ "mcpServers": {
563
+ "probe": {
564
+ "command": "npx",
565
+ "args": ["-y", "@probelabs/probe-mcp"]
566
+ }
567
+ }
568
+ }
569
+
570
+ // New configuration (drop-in replacement)
571
+ {
572
+ "mcpServers": {
573
+ "probe": {
574
+ "command": "npx",
575
+ "args": ["-y", "@probelabs/probe", "mcp"]
576
+ }
577
+ }
578
+ }
579
+ ```
580
+
581
+ ## Related Projects
582
+
583
+ - [probe](https://github.com/probelabs/probe) - The core probe code search tool
package/bin/.gitkeep ADDED
File without changes