@probelabs/probe 0.6.0-rc187 → 0.6.0-rc189
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-rc189-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc189-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc189-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc189-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc189-x86_64-unknown-linux-musl.tar.gz +0 -0
- package/build/agent/ProbeAgent.js +3 -1
- package/build/agent/index.js +5 -1
- package/build/agent/schemaUtils.js +8 -0
- package/cjs/agent/ProbeAgent.cjs +5 -1
- package/cjs/index.cjs +5 -1
- package/package.json +1 -1
- package/src/agent/ProbeAgent.js +3 -1
- package/src/agent/schemaUtils.js +8 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2387,7 +2387,9 @@ When troubleshooting:
|
|
|
2387
2387
|
if (this.allowedTools.isEnabled('listFiles')) validTools.push('listFiles');
|
|
2388
2388
|
if (this.allowedTools.isEnabled('searchFiles')) validTools.push('searchFiles');
|
|
2389
2389
|
if (this.allowedTools.isEnabled('readImage')) validTools.push('readImage');
|
|
2390
|
-
|
|
2390
|
+
// Always allow attempt_completion - it's a completion signal, not a tool
|
|
2391
|
+
// This ensures agents can complete even when disableTools: true is set (fixes #333)
|
|
2392
|
+
validTools.push('attempt_completion');
|
|
2391
2393
|
|
|
2392
2394
|
// Edit tools (require both allowEdit flag AND allowedTools permission)
|
|
2393
2395
|
if (this.allowEdit && this.allowedTools.isEnabled('implement')) {
|
package/build/agent/index.js
CHANGED
|
@@ -54730,6 +54730,10 @@ function cleanSchemaResponse(response) {
|
|
|
54730
54730
|
return response;
|
|
54731
54731
|
}
|
|
54732
54732
|
const trimmed = response.trim();
|
|
54733
|
+
const resultWrapperMatch = trimmed.match(/^<result>\s*([\s\S]*?)\s*<\/result>$/);
|
|
54734
|
+
if (resultWrapperMatch) {
|
|
54735
|
+
return cleanSchemaResponse(resultWrapperMatch[1]);
|
|
54736
|
+
}
|
|
54733
54737
|
const jsonBlockMatch = trimmed.match(/```json\s*\n([\s\S]*?)\n```/);
|
|
54734
54738
|
if (jsonBlockMatch) {
|
|
54735
54739
|
return normalizeJsonQuotes(jsonBlockMatch[1].trim());
|
|
@@ -61143,7 +61147,7 @@ You are working with a repository located at: ${searchDirectory}
|
|
|
61143
61147
|
if (this.allowedTools.isEnabled("listFiles")) validTools.push("listFiles");
|
|
61144
61148
|
if (this.allowedTools.isEnabled("searchFiles")) validTools.push("searchFiles");
|
|
61145
61149
|
if (this.allowedTools.isEnabled("readImage")) validTools.push("readImage");
|
|
61146
|
-
|
|
61150
|
+
validTools.push("attempt_completion");
|
|
61147
61151
|
if (this.allowEdit && this.allowedTools.isEnabled("implement")) {
|
|
61148
61152
|
validTools.push("implement", "edit", "create");
|
|
61149
61153
|
}
|
|
@@ -253,6 +253,14 @@ export function cleanSchemaResponse(response) {
|
|
|
253
253
|
|
|
254
254
|
const trimmed = response.trim();
|
|
255
255
|
|
|
256
|
+
// Strip <result>...</result> wrapper if present (legacy XML format from some AI models)
|
|
257
|
+
// Some models like Google Gemini wrap JSON in <result> tags despite instructions not to
|
|
258
|
+
const resultWrapperMatch = trimmed.match(/^<result>\s*([\s\S]*?)\s*<\/result>$/);
|
|
259
|
+
if (resultWrapperMatch) {
|
|
260
|
+
// Recursively clean the inner content in case there are nested patterns
|
|
261
|
+
return cleanSchemaResponse(resultWrapperMatch[1]);
|
|
262
|
+
}
|
|
263
|
+
|
|
256
264
|
// First, look for JSON after code block markers - similar to mermaid extraction
|
|
257
265
|
// Try with json language specifier
|
|
258
266
|
const jsonBlockMatch = trimmed.match(/```json\s*\n([\s\S]*?)\n```/);
|
package/cjs/agent/ProbeAgent.cjs
CHANGED
|
@@ -81416,6 +81416,10 @@ function cleanSchemaResponse(response) {
|
|
|
81416
81416
|
return response;
|
|
81417
81417
|
}
|
|
81418
81418
|
const trimmed = response.trim();
|
|
81419
|
+
const resultWrapperMatch = trimmed.match(/^<result>\s*([\s\S]*?)\s*<\/result>$/);
|
|
81420
|
+
if (resultWrapperMatch) {
|
|
81421
|
+
return cleanSchemaResponse(resultWrapperMatch[1]);
|
|
81422
|
+
}
|
|
81419
81423
|
const jsonBlockMatch = trimmed.match(/```json\s*\n([\s\S]*?)\n```/);
|
|
81420
81424
|
if (jsonBlockMatch) {
|
|
81421
81425
|
return normalizeJsonQuotes(jsonBlockMatch[1].trim());
|
|
@@ -87828,7 +87832,7 @@ You are working with a repository located at: ${searchDirectory}
|
|
|
87828
87832
|
if (this.allowedTools.isEnabled("listFiles")) validTools.push("listFiles");
|
|
87829
87833
|
if (this.allowedTools.isEnabled("searchFiles")) validTools.push("searchFiles");
|
|
87830
87834
|
if (this.allowedTools.isEnabled("readImage")) validTools.push("readImage");
|
|
87831
|
-
|
|
87835
|
+
validTools.push("attempt_completion");
|
|
87832
87836
|
if (this.allowEdit && this.allowedTools.isEnabled("implement")) {
|
|
87833
87837
|
validTools.push("implement", "edit", "create");
|
|
87834
87838
|
}
|
package/cjs/index.cjs
CHANGED
|
@@ -79038,6 +79038,10 @@ function cleanSchemaResponse(response) {
|
|
|
79038
79038
|
return response;
|
|
79039
79039
|
}
|
|
79040
79040
|
const trimmed = response.trim();
|
|
79041
|
+
const resultWrapperMatch = trimmed.match(/^<result>\s*([\s\S]*?)\s*<\/result>$/);
|
|
79042
|
+
if (resultWrapperMatch) {
|
|
79043
|
+
return cleanSchemaResponse(resultWrapperMatch[1]);
|
|
79044
|
+
}
|
|
79041
79045
|
const jsonBlockMatch = trimmed.match(/```json\s*\n([\s\S]*?)\n```/);
|
|
79042
79046
|
if (jsonBlockMatch) {
|
|
79043
79047
|
return normalizeJsonQuotes(jsonBlockMatch[1].trim());
|
|
@@ -85450,7 +85454,7 @@ You are working with a repository located at: ${searchDirectory}
|
|
|
85450
85454
|
if (this.allowedTools.isEnabled("listFiles")) validTools.push("listFiles");
|
|
85451
85455
|
if (this.allowedTools.isEnabled("searchFiles")) validTools.push("searchFiles");
|
|
85452
85456
|
if (this.allowedTools.isEnabled("readImage")) validTools.push("readImage");
|
|
85453
|
-
|
|
85457
|
+
validTools.push("attempt_completion");
|
|
85454
85458
|
if (this.allowEdit && this.allowedTools.isEnabled("implement")) {
|
|
85455
85459
|
validTools.push("implement", "edit", "create");
|
|
85456
85460
|
}
|
package/package.json
CHANGED
package/src/agent/ProbeAgent.js
CHANGED
|
@@ -2387,7 +2387,9 @@ When troubleshooting:
|
|
|
2387
2387
|
if (this.allowedTools.isEnabled('listFiles')) validTools.push('listFiles');
|
|
2388
2388
|
if (this.allowedTools.isEnabled('searchFiles')) validTools.push('searchFiles');
|
|
2389
2389
|
if (this.allowedTools.isEnabled('readImage')) validTools.push('readImage');
|
|
2390
|
-
|
|
2390
|
+
// Always allow attempt_completion - it's a completion signal, not a tool
|
|
2391
|
+
// This ensures agents can complete even when disableTools: true is set (fixes #333)
|
|
2392
|
+
validTools.push('attempt_completion');
|
|
2391
2393
|
|
|
2392
2394
|
// Edit tools (require both allowEdit flag AND allowedTools permission)
|
|
2393
2395
|
if (this.allowEdit && this.allowedTools.isEnabled('implement')) {
|
package/src/agent/schemaUtils.js
CHANGED
|
@@ -253,6 +253,14 @@ export function cleanSchemaResponse(response) {
|
|
|
253
253
|
|
|
254
254
|
const trimmed = response.trim();
|
|
255
255
|
|
|
256
|
+
// Strip <result>...</result> wrapper if present (legacy XML format from some AI models)
|
|
257
|
+
// Some models like Google Gemini wrap JSON in <result> tags despite instructions not to
|
|
258
|
+
const resultWrapperMatch = trimmed.match(/^<result>\s*([\s\S]*?)\s*<\/result>$/);
|
|
259
|
+
if (resultWrapperMatch) {
|
|
260
|
+
// Recursively clean the inner content in case there are nested patterns
|
|
261
|
+
return cleanSchemaResponse(resultWrapperMatch[1]);
|
|
262
|
+
}
|
|
263
|
+
|
|
256
264
|
// First, look for JSON after code block markers - similar to mermaid extraction
|
|
257
265
|
// Try with json language specifier
|
|
258
266
|
const jsonBlockMatch = trimmed.match(/```json\s*\n([\s\S]*?)\n```/);
|