@probelabs/probe 0.6.0-rc222 → 0.6.0-rc224
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/bin/binaries/probe-v0.6.0-rc224-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc224-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc224-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc224-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc224-x86_64-unknown-linux-musl.tar.gz +0 -0
- package/build/agent/acp/tools.js +12 -0
- package/build/agent/index.js +25 -4
- package/build/delegate.js +17 -0
- package/build/tools/common.js +7 -1
- package/build/tools/langchain.js +4 -2
- package/build/tools/vercel.js +3 -2
- package/cjs/agent/ProbeAgent.cjs +9121 -6717
- package/cjs/index.cjs +9125 -6719
- package/package.json +1 -1
- package/src/agent/acp/tools.js +12 -0
- package/src/delegate.js +17 -0
- package/src/tools/common.js +7 -1
- package/src/tools/langchain.js +4 -2
- package/src/tools/vercel.js +3 -2
- package/bin/binaries/probe-v0.6.0-rc222-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc222-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc222-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc222-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc222-x86_64-unknown-linux-musl.tar.gz +0 -0
package/package.json
CHANGED
package/src/agent/acp/tools.js
CHANGED
|
@@ -287,6 +287,18 @@ export class ACPToolManager {
|
|
|
287
287
|
allow_tests: {
|
|
288
288
|
type: 'boolean',
|
|
289
289
|
description: 'Include test files in results (default: true)'
|
|
290
|
+
},
|
|
291
|
+
exact: {
|
|
292
|
+
type: 'boolean',
|
|
293
|
+
description: 'Default (false) enables stemming and keyword splitting for exploratory search. Set true for precise symbol lookup where the query matches only the exact term. Use true when you know the exact symbol name.'
|
|
294
|
+
},
|
|
295
|
+
session: {
|
|
296
|
+
type: 'string',
|
|
297
|
+
description: 'Session ID for result caching and pagination. Pass the session ID from a previous search to get additional results (next page). Results already shown in a session are automatically excluded.'
|
|
298
|
+
},
|
|
299
|
+
nextPage: {
|
|
300
|
+
type: 'boolean',
|
|
301
|
+
description: 'Set to true when requesting the next page of results. Requires passing the same session ID from the previous search output.'
|
|
290
302
|
}
|
|
291
303
|
},
|
|
292
304
|
required: ['query']
|
package/src/delegate.js
CHANGED
|
@@ -385,6 +385,23 @@ export async function delegate({
|
|
|
385
385
|
throw new Error('Task parameter is required and must be a string');
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
+
// Support runtime timeout override via environment variables when timeout not explicitly passed
|
|
389
|
+
// This allows operators to configure delegation timeouts without code changes
|
|
390
|
+
// Priority: DELEGATION_TIMEOUT_MS (milliseconds) > DELEGATION_TIMEOUT_SECONDS > DELEGATION_TIMEOUT (seconds)
|
|
391
|
+
const hasExplicitTimeout = Object.prototype.hasOwnProperty.call(arguments?.[0] ?? {}, 'timeout');
|
|
392
|
+
if (!hasExplicitTimeout) {
|
|
393
|
+
const envTimeoutMs = parseInt(process.env.DELEGATION_TIMEOUT_MS || '', 10);
|
|
394
|
+
const envTimeoutSeconds = parseInt(
|
|
395
|
+
process.env.DELEGATION_TIMEOUT_SECONDS || process.env.DELEGATION_TIMEOUT || '',
|
|
396
|
+
10
|
|
397
|
+
);
|
|
398
|
+
if (!Number.isNaN(envTimeoutMs) && envTimeoutMs > 0) {
|
|
399
|
+
timeout = Math.max(1, Math.ceil(envTimeoutMs / 1000));
|
|
400
|
+
} else if (!Number.isNaN(envTimeoutSeconds) && envTimeoutSeconds > 0) {
|
|
401
|
+
timeout = Math.max(1, envTimeoutSeconds);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
388
405
|
// Use provided manager or fall back to default singleton
|
|
389
406
|
const manager = delegationManager || defaultDelegationManager;
|
|
390
407
|
|
package/src/tools/common.js
CHANGED
|
@@ -11,7 +11,10 @@ import { taskSchema } from '../agent/tasks/taskTool.js';
|
|
|
11
11
|
// Common schemas for tool parameters (used for internal execution after XML parsing)
|
|
12
12
|
export const searchSchema = z.object({
|
|
13
13
|
query: z.string().describe('Search query with Elasticsearch syntax. Use quotes for exact matches, AND/OR for boolean logic, - for negation.'),
|
|
14
|
-
path: z.string().optional().default('.').describe('Path to search in. For dependencies use "go:github.com/owner/repo", "js:package_name", or "rust:cargo_name" etc.')
|
|
14
|
+
path: z.string().optional().default('.').describe('Path to search in. For dependencies use "go:github.com/owner/repo", "js:package_name", or "rust:cargo_name" etc.'),
|
|
15
|
+
exact: z.boolean().optional().default(false).describe('Default (false) enables stemming and keyword splitting for exploratory search - "getUserData" matches "get", "user", "data", etc. Set true for precise symbol lookup where "getUserData" matches only "getUserData". Use true when you know the exact symbol name.'),
|
|
16
|
+
session: z.string().optional().describe('Session ID for result caching and pagination. Pass the session ID from a previous search to get additional results (next page). Results already shown in a session are automatically excluded. Omit for a fresh search.'),
|
|
17
|
+
nextPage: z.boolean().optional().default(false).describe('Set to true when requesting the next page of results. Requires passing the same session ID from the previous search output.')
|
|
15
18
|
});
|
|
16
19
|
|
|
17
20
|
export const querySchema = z.object({
|
|
@@ -130,6 +133,9 @@ You need to focus on main keywords when constructing the query, and always use e
|
|
|
130
133
|
Parameters:
|
|
131
134
|
- query: (required) Search query. Free-form questions are accepted, but for best results prefer Elasticsearch-style syntax with quotes for exact matches ("functionName"), AND/OR for boolean logic, - for negation, + for important terms.
|
|
132
135
|
- path: (optional, default: '.') Path to search in. All dependencies located in /dep folder, under language sub folders, like this: "/dep/go/github.com/owner/repo", "/dep/js/package_name", or "/dep/rust/cargo_name" etc.
|
|
136
|
+
- exact: (optional, default: false) Set to true for precise symbol lookup without stemming/tokenization. Use when you know the exact symbol name (e.g., "getUserData" matches only "getUserData", not "get", "user", "data").
|
|
137
|
+
- session: (optional) Session ID for pagination. Pass the session ID returned from a previous search to get the next page of results. Results already shown are automatically excluded.
|
|
138
|
+
- nextPage: (optional, default: false) Set to true when requesting the next page of results. Requires passing the same session ID from the previous search.
|
|
133
139
|
|
|
134
140
|
**Workflow:** Always start with search, then use extract for detailed context when needed.
|
|
135
141
|
|
package/src/tools/langchain.js
CHANGED
|
@@ -16,7 +16,7 @@ export function createSearchTool(options = {}) {
|
|
|
16
16
|
name: 'search',
|
|
17
17
|
description: searchDescription,
|
|
18
18
|
schema: searchSchema,
|
|
19
|
-
func: async ({ query: searchQuery, path, allow_tests, exact, maxResults, maxTokens = 20000, language }) => {
|
|
19
|
+
func: async ({ query: searchQuery, path, allow_tests, exact, maxResults, maxTokens = 20000, language, session, nextPage }) => {
|
|
20
20
|
try {
|
|
21
21
|
const results = await search({
|
|
22
22
|
query: searchQuery,
|
|
@@ -27,7 +27,9 @@ export function createSearchTool(options = {}) {
|
|
|
27
27
|
json: false,
|
|
28
28
|
maxResults,
|
|
29
29
|
maxTokens,
|
|
30
|
-
language
|
|
30
|
+
language,
|
|
31
|
+
session,
|
|
32
|
+
nextPage
|
|
31
33
|
});
|
|
32
34
|
|
|
33
35
|
return results;
|
package/src/tools/vercel.js
CHANGED
|
@@ -169,7 +169,7 @@ export const searchTool = (options = {}) => {
|
|
|
169
169
|
? `${searchDescription} (delegates code search to a subagent and returns extracted code blocks)`
|
|
170
170
|
: searchDescription,
|
|
171
171
|
inputSchema: searchSchema,
|
|
172
|
-
execute: async ({ query: searchQuery, path, allow_tests, exact, maxTokens: paramMaxTokens, language }) => {
|
|
172
|
+
execute: async ({ query: searchQuery, path, allow_tests, exact, maxTokens: paramMaxTokens, language, session, nextPage }) => {
|
|
173
173
|
// Use parameter maxTokens if provided, otherwise use the default
|
|
174
174
|
const effectiveMaxTokens = paramMaxTokens || maxTokens;
|
|
175
175
|
|
|
@@ -195,7 +195,8 @@ export const searchTool = (options = {}) => {
|
|
|
195
195
|
exact,
|
|
196
196
|
json: false,
|
|
197
197
|
maxTokens: effectiveMaxTokens,
|
|
198
|
-
session: sessionId, //
|
|
198
|
+
session: session || sessionId, // Use explicit session param, or fall back to options sessionId
|
|
199
|
+
nextPage, // Pass nextPage parameter for pagination
|
|
199
200
|
language // Pass language parameter if provided
|
|
200
201
|
};
|
|
201
202
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|