@probelabs/probe 0.6.0-rc56 → 0.6.0-rc58
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.
- package/README.md +55 -0
- package/bin/probe +0 -0
- package/bin/probe-binary +0 -0
- package/build/agent/ProbeAgent.js +722 -0
- package/build/agent/acp/README.md +347 -0
- package/build/agent/acp/connection.js +237 -0
- package/build/agent/acp/connection.test.js +307 -0
- package/build/agent/acp/examples/simple-client.js +212 -0
- package/build/agent/acp/examples/tool-lifecycle.js +230 -0
- package/build/agent/acp/final-test.js +173 -0
- package/build/agent/acp/index.js +5 -0
- package/build/agent/acp/integration.test.js +386 -0
- package/build/agent/acp/manual-test.js +410 -0
- package/build/agent/acp/protocol-test.js +190 -0
- package/build/agent/acp/server.js +448 -0
- package/build/agent/acp/server.test.js +373 -0
- package/build/agent/acp/test-runner.js +216 -0
- package/build/agent/acp/test-utils/README.md +315 -0
- package/build/agent/acp/test-utils/acp-tester.js +484 -0
- package/build/agent/acp/test-utils/mock-acp-client.js +434 -0
- package/build/agent/acp/tools.js +342 -0
- package/build/agent/acp/tools.test.js +305 -0
- package/build/agent/acp/types.js +218 -0
- package/build/agent/acp/types.test.js +327 -0
- package/build/agent/appTracer.js +256 -0
- package/build/agent/fileSpanExporter.js +169 -0
- package/build/agent/index.js +3881 -0
- package/build/agent/probeTool.js +248 -0
- package/build/agent/schemaUtils.js +107 -0
- package/build/agent/simpleTelemetry.js +231 -0
- package/build/agent/telemetry.js +225 -0
- package/build/agent/tokenCounter.js +376 -0
- package/build/agent/tools.js +146 -0
- package/build/cli.js +49 -0
- package/build/downloader.js +661 -0
- package/build/extract.js +149 -0
- package/build/index.js +58 -0
- package/build/query.js +116 -0
- package/build/search.js +239 -0
- package/build/tools/common.js +224 -0
- package/build/tools/index.js +36 -0
- package/build/tools/langchain.js +88 -0
- package/build/tools/system-message.js +69 -0
- package/build/tools/vercel.js +215 -0
- package/build/utils/file-lister.js +193 -0
- package/build/utils.js +120 -0
- package/package.json +25 -8
- package/scripts/postinstall.js +40 -20
- package/src/agent/ProbeAgent.js +722 -0
- package/src/agent/acp/README.md +347 -0
- package/src/agent/acp/connection.js +237 -0
- package/src/agent/acp/connection.test.js +307 -0
- package/src/agent/acp/examples/simple-client.js +212 -0
- package/src/agent/acp/examples/tool-lifecycle.js +230 -0
- package/src/agent/acp/final-test.js +173 -0
- package/src/agent/acp/index.js +5 -0
- package/src/agent/acp/integration.test.js +386 -0
- package/src/agent/acp/manual-test.js +410 -0
- package/src/agent/acp/protocol-test.js +190 -0
- package/src/agent/acp/server.js +448 -0
- package/src/agent/acp/server.test.js +373 -0
- package/src/agent/acp/test-runner.js +216 -0
- package/src/agent/acp/test-utils/README.md +315 -0
- package/src/agent/acp/test-utils/acp-tester.js +484 -0
- package/src/agent/acp/test-utils/mock-acp-client.js +434 -0
- package/src/agent/acp/tools.js +342 -0
- package/src/agent/acp/tools.test.js +305 -0
- package/src/agent/acp/types.js +218 -0
- package/src/agent/acp/types.test.js +327 -0
- package/src/agent/appTracer.js +256 -0
- package/src/agent/fileSpanExporter.js +169 -0
- package/src/agent/index.js +548 -0
- package/src/agent/probeTool.js +248 -0
- package/src/agent/schemaUtils.js +107 -0
- package/src/agent/simpleTelemetry.js +231 -0
- package/src/agent/telemetry.js +225 -0
- package/src/agent/tokenCounter.js +376 -0
- package/src/agent/tools.js +146 -0
- package/src/downloader.js +135 -45
- package/src/extract.js +12 -10
- package/src/index.js +3 -0
- package/src/query.js +12 -8
- package/src/search.js +19 -15
package/README.md
CHANGED
|
@@ -77,6 +77,61 @@ probe mcp
|
|
|
77
77
|
|
|
78
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
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
|
+
|
|
80
135
|
### Using as an MCP Server
|
|
81
136
|
|
|
82
137
|
Probe includes a built-in MCP (Model Context Protocol) server for integration with AI assistants:
|
package/bin/probe
CHANGED
|
Binary file
|
package/bin/probe-binary
ADDED
|
Binary file
|