@probelabs/probe 0.6.0-rc163 → 0.6.0-rc164
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/build/agent/ProbeAgent.js +2 -16
- package/build/agent/index.js +2 -23
- package/build/agent/schemaUtils.js +1 -7
- package/cjs/agent/ProbeAgent.cjs +2 -23
- package/cjs/index.cjs +2 -23
- package/package.json +1 -1
- package/src/agent/ProbeAgent.js +2 -16
- package/src/agent/schemaUtils.js +1 -7
|
@@ -2009,21 +2009,8 @@ When troubleshooting:
|
|
|
2009
2009
|
// Add assistant response and ask for tool usage
|
|
2010
2010
|
currentMessages.push({ role: 'assistant', content: assistantResponseContent });
|
|
2011
2011
|
|
|
2012
|
-
//
|
|
2013
|
-
|
|
2014
|
-
if (options.schema) { // Apply for ANY schema, not just JSON schemas
|
|
2015
|
-
// When schema is provided, use the same instructions as initial message
|
|
2016
|
-
reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
2017
|
-
|
|
2018
|
-
Remember: Use proper XML format with BOTH opening and closing tags:
|
|
2019
|
-
|
|
2020
|
-
<tool_name>
|
|
2021
|
-
<parameter>value</parameter>
|
|
2022
|
-
</tool_name>
|
|
2023
|
-
` + generateSchemaInstructions(options.schema, { debug: this.debug }).trim();
|
|
2024
|
-
} else {
|
|
2025
|
-
// Standard reminder without schema
|
|
2026
|
-
reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
2012
|
+
// Standard reminder - schema was already provided in initial message
|
|
2013
|
+
const reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
2027
2014
|
|
|
2028
2015
|
Remember: Use proper XML format with BOTH opening and closing tags:
|
|
2029
2016
|
|
|
@@ -2035,7 +2022,6 @@ Or for quick completion if your previous response was already correct and comple
|
|
|
2035
2022
|
<attempt_complete>
|
|
2036
2023
|
|
|
2037
2024
|
IMPORTANT: When using <attempt_complete>, this must be the ONLY content in your response. No additional text, explanations, or other content should be included. This tag signals to reuse your previous response as the final answer.`;
|
|
2038
|
-
}
|
|
2039
2025
|
|
|
2040
2026
|
currentMessages.push({
|
|
2041
2027
|
role: 'user',
|
package/build/agent/index.js
CHANGED
|
@@ -54315,15 +54315,6 @@ function generateSchemaInstructions(schema, options = {}) {
|
|
|
54315
54315
|
instructions += `${JSON.stringify(parsedSchema, null, 2)}
|
|
54316
54316
|
|
|
54317
54317
|
`;
|
|
54318
|
-
const exampleObj = generateExampleFromSchema(parsedSchema, { debug });
|
|
54319
|
-
if (exampleObj) {
|
|
54320
|
-
instructions += `Example:
|
|
54321
|
-
<attempt_completion>
|
|
54322
|
-
${JSON.stringify(exampleObj, null, 2)}
|
|
54323
|
-
</attempt_completion>
|
|
54324
|
-
|
|
54325
|
-
`;
|
|
54326
|
-
}
|
|
54327
54318
|
} catch (e) {
|
|
54328
54319
|
if (debug) {
|
|
54329
54320
|
console.error("[DEBUG] generateSchemaInstructions: Failed to parse schema:", e.message);
|
|
@@ -54332,7 +54323,7 @@ ${JSON.stringify(exampleObj, null, 2)}
|
|
|
54332
54323
|
|
|
54333
54324
|
`;
|
|
54334
54325
|
}
|
|
54335
|
-
instructions += "Your response inside attempt_completion must be ONLY valid JSON - no plain text, no explanations, no markdown.";
|
|
54326
|
+
instructions += "Your response inside attempt_completion must be ONLY valid JSON - no plain text, no explanations, no markdown.\n\nIMPORTANT: First complete the requested analysis/task thoroughly, then provide your final answer in the JSON format above.";
|
|
54336
54327
|
return instructions;
|
|
54337
54328
|
}
|
|
54338
54329
|
function enforceNoAdditionalProperties(schema) {
|
|
@@ -58791,18 +58782,7 @@ Error: Unknown tool '${toolName}'. Available tools: ${allAvailableTools.join(",
|
|
|
58791
58782
|
break;
|
|
58792
58783
|
}
|
|
58793
58784
|
currentMessages.push({ role: "assistant", content: assistantResponseContent });
|
|
58794
|
-
|
|
58795
|
-
if (options.schema) {
|
|
58796
|
-
reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
58797
|
-
|
|
58798
|
-
Remember: Use proper XML format with BOTH opening and closing tags:
|
|
58799
|
-
|
|
58800
|
-
<tool_name>
|
|
58801
|
-
<parameter>value</parameter>
|
|
58802
|
-
</tool_name>
|
|
58803
|
-
` + generateSchemaInstructions(options.schema, { debug: this.debug }).trim();
|
|
58804
|
-
} else {
|
|
58805
|
-
reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
58785
|
+
const reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
58806
58786
|
|
|
58807
58787
|
Remember: Use proper XML format with BOTH opening and closing tags:
|
|
58808
58788
|
|
|
@@ -58814,7 +58794,6 @@ Or for quick completion if your previous response was already correct and comple
|
|
|
58814
58794
|
<attempt_complete>
|
|
58815
58795
|
|
|
58816
58796
|
IMPORTANT: When using <attempt_complete>, this must be the ONLY content in your response. No additional text, explanations, or other content should be included. This tag signals to reuse your previous response as the final answer.`;
|
|
58817
|
-
}
|
|
58818
58797
|
currentMessages.push({
|
|
58819
58798
|
role: "user",
|
|
58820
58799
|
content: reminderContent
|
|
@@ -63,12 +63,6 @@ export function generateSchemaInstructions(schema, options = {}) {
|
|
|
63
63
|
try {
|
|
64
64
|
const parsedSchema = typeof schema === 'string' ? JSON.parse(schema) : schema;
|
|
65
65
|
instructions += `${JSON.stringify(parsedSchema, null, 2)}\n\n`;
|
|
66
|
-
|
|
67
|
-
// Generate example using helper function
|
|
68
|
-
const exampleObj = generateExampleFromSchema(parsedSchema, { debug });
|
|
69
|
-
if (exampleObj) {
|
|
70
|
-
instructions += `Example:\n<attempt_completion>\n${JSON.stringify(exampleObj, null, 2)}\n</attempt_completion>\n\n`;
|
|
71
|
-
}
|
|
72
66
|
} catch (e) {
|
|
73
67
|
if (debug) {
|
|
74
68
|
console.error('[DEBUG] generateSchemaInstructions: Failed to parse schema:', e.message);
|
|
@@ -76,7 +70,7 @@ export function generateSchemaInstructions(schema, options = {}) {
|
|
|
76
70
|
instructions += `${schema}\n\n`;
|
|
77
71
|
}
|
|
78
72
|
|
|
79
|
-
instructions += 'Your response inside attempt_completion must be ONLY valid JSON - no plain text, no explanations, no markdown.';
|
|
73
|
+
instructions += 'Your response inside attempt_completion must be ONLY valid JSON - no plain text, no explanations, no markdown.\n\nIMPORTANT: First complete the requested analysis/task thoroughly, then provide your final answer in the JSON format above.';
|
|
80
74
|
|
|
81
75
|
return instructions;
|
|
82
76
|
}
|
package/cjs/agent/ProbeAgent.cjs
CHANGED
|
@@ -79995,15 +79995,6 @@ function generateSchemaInstructions(schema, options = {}) {
|
|
|
79995
79995
|
instructions += `${JSON.stringify(parsedSchema, null, 2)}
|
|
79996
79996
|
|
|
79997
79997
|
`;
|
|
79998
|
-
const exampleObj = generateExampleFromSchema(parsedSchema, { debug });
|
|
79999
|
-
if (exampleObj) {
|
|
80000
|
-
instructions += `Example:
|
|
80001
|
-
<attempt_completion>
|
|
80002
|
-
${JSON.stringify(exampleObj, null, 2)}
|
|
80003
|
-
</attempt_completion>
|
|
80004
|
-
|
|
80005
|
-
`;
|
|
80006
|
-
}
|
|
80007
79998
|
} catch (e3) {
|
|
80008
79999
|
if (debug) {
|
|
80009
80000
|
console.error("[DEBUG] generateSchemaInstructions: Failed to parse schema:", e3.message);
|
|
@@ -80012,7 +80003,7 @@ ${JSON.stringify(exampleObj, null, 2)}
|
|
|
80012
80003
|
|
|
80013
80004
|
`;
|
|
80014
80005
|
}
|
|
80015
|
-
instructions += "Your response inside attempt_completion must be ONLY valid JSON - no plain text, no explanations, no markdown.";
|
|
80006
|
+
instructions += "Your response inside attempt_completion must be ONLY valid JSON - no plain text, no explanations, no markdown.\n\nIMPORTANT: First complete the requested analysis/task thoroughly, then provide your final answer in the JSON format above.";
|
|
80016
80007
|
return instructions;
|
|
80017
80008
|
}
|
|
80018
80009
|
function enforceNoAdditionalProperties(schema) {
|
|
@@ -84471,18 +84462,7 @@ Error: Unknown tool '${toolName}'. Available tools: ${allAvailableTools.join(",
|
|
|
84471
84462
|
break;
|
|
84472
84463
|
}
|
|
84473
84464
|
currentMessages.push({ role: "assistant", content: assistantResponseContent });
|
|
84474
|
-
|
|
84475
|
-
if (options.schema) {
|
|
84476
|
-
reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
84477
|
-
|
|
84478
|
-
Remember: Use proper XML format with BOTH opening and closing tags:
|
|
84479
|
-
|
|
84480
|
-
<tool_name>
|
|
84481
|
-
<parameter>value</parameter>
|
|
84482
|
-
</tool_name>
|
|
84483
|
-
` + generateSchemaInstructions(options.schema, { debug: this.debug }).trim();
|
|
84484
|
-
} else {
|
|
84485
|
-
reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
84465
|
+
const reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
84486
84466
|
|
|
84487
84467
|
Remember: Use proper XML format with BOTH opening and closing tags:
|
|
84488
84468
|
|
|
@@ -84494,7 +84474,6 @@ Or for quick completion if your previous response was already correct and comple
|
|
|
84494
84474
|
<attempt_complete>
|
|
84495
84475
|
|
|
84496
84476
|
IMPORTANT: When using <attempt_complete>, this must be the ONLY content in your response. No additional text, explanations, or other content should be included. This tag signals to reuse your previous response as the final answer.`;
|
|
84497
|
-
}
|
|
84498
84477
|
currentMessages.push({
|
|
84499
84478
|
role: "user",
|
|
84500
84479
|
content: reminderContent
|
package/cjs/index.cjs
CHANGED
|
@@ -77737,15 +77737,6 @@ function generateSchemaInstructions(schema, options = {}) {
|
|
|
77737
77737
|
instructions += `${JSON.stringify(parsedSchema, null, 2)}
|
|
77738
77738
|
|
|
77739
77739
|
`;
|
|
77740
|
-
const exampleObj = generateExampleFromSchema(parsedSchema, { debug });
|
|
77741
|
-
if (exampleObj) {
|
|
77742
|
-
instructions += `Example:
|
|
77743
|
-
<attempt_completion>
|
|
77744
|
-
${JSON.stringify(exampleObj, null, 2)}
|
|
77745
|
-
</attempt_completion>
|
|
77746
|
-
|
|
77747
|
-
`;
|
|
77748
|
-
}
|
|
77749
77740
|
} catch (e3) {
|
|
77750
77741
|
if (debug) {
|
|
77751
77742
|
console.error("[DEBUG] generateSchemaInstructions: Failed to parse schema:", e3.message);
|
|
@@ -77754,7 +77745,7 @@ ${JSON.stringify(exampleObj, null, 2)}
|
|
|
77754
77745
|
|
|
77755
77746
|
`;
|
|
77756
77747
|
}
|
|
77757
|
-
instructions += "Your response inside attempt_completion must be ONLY valid JSON - no plain text, no explanations, no markdown.";
|
|
77748
|
+
instructions += "Your response inside attempt_completion must be ONLY valid JSON - no plain text, no explanations, no markdown.\n\nIMPORTANT: First complete the requested analysis/task thoroughly, then provide your final answer in the JSON format above.";
|
|
77758
77749
|
return instructions;
|
|
77759
77750
|
}
|
|
77760
77751
|
function enforceNoAdditionalProperties(schema) {
|
|
@@ -82213,18 +82204,7 @@ Error: Unknown tool '${toolName}'. Available tools: ${allAvailableTools.join(",
|
|
|
82213
82204
|
break;
|
|
82214
82205
|
}
|
|
82215
82206
|
currentMessages.push({ role: "assistant", content: assistantResponseContent });
|
|
82216
|
-
|
|
82217
|
-
if (options.schema) {
|
|
82218
|
-
reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
82219
|
-
|
|
82220
|
-
Remember: Use proper XML format with BOTH opening and closing tags:
|
|
82221
|
-
|
|
82222
|
-
<tool_name>
|
|
82223
|
-
<parameter>value</parameter>
|
|
82224
|
-
</tool_name>
|
|
82225
|
-
` + generateSchemaInstructions(options.schema, { debug: this.debug }).trim();
|
|
82226
|
-
} else {
|
|
82227
|
-
reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
82207
|
+
const reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
82228
82208
|
|
|
82229
82209
|
Remember: Use proper XML format with BOTH opening and closing tags:
|
|
82230
82210
|
|
|
@@ -82236,7 +82216,6 @@ Or for quick completion if your previous response was already correct and comple
|
|
|
82236
82216
|
<attempt_complete>
|
|
82237
82217
|
|
|
82238
82218
|
IMPORTANT: When using <attempt_complete>, this must be the ONLY content in your response. No additional text, explanations, or other content should be included. This tag signals to reuse your previous response as the final answer.`;
|
|
82239
|
-
}
|
|
82240
82219
|
currentMessages.push({
|
|
82241
82220
|
role: "user",
|
|
82242
82221
|
content: reminderContent
|
package/package.json
CHANGED
package/src/agent/ProbeAgent.js
CHANGED
|
@@ -2009,21 +2009,8 @@ When troubleshooting:
|
|
|
2009
2009
|
// Add assistant response and ask for tool usage
|
|
2010
2010
|
currentMessages.push({ role: 'assistant', content: assistantResponseContent });
|
|
2011
2011
|
|
|
2012
|
-
//
|
|
2013
|
-
|
|
2014
|
-
if (options.schema) { // Apply for ANY schema, not just JSON schemas
|
|
2015
|
-
// When schema is provided, use the same instructions as initial message
|
|
2016
|
-
reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
2017
|
-
|
|
2018
|
-
Remember: Use proper XML format with BOTH opening and closing tags:
|
|
2019
|
-
|
|
2020
|
-
<tool_name>
|
|
2021
|
-
<parameter>value</parameter>
|
|
2022
|
-
</tool_name>
|
|
2023
|
-
` + generateSchemaInstructions(options.schema, { debug: this.debug }).trim();
|
|
2024
|
-
} else {
|
|
2025
|
-
// Standard reminder without schema
|
|
2026
|
-
reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
2012
|
+
// Standard reminder - schema was already provided in initial message
|
|
2013
|
+
const reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
2027
2014
|
|
|
2028
2015
|
Remember: Use proper XML format with BOTH opening and closing tags:
|
|
2029
2016
|
|
|
@@ -2035,7 +2022,6 @@ Or for quick completion if your previous response was already correct and comple
|
|
|
2035
2022
|
<attempt_complete>
|
|
2036
2023
|
|
|
2037
2024
|
IMPORTANT: When using <attempt_complete>, this must be the ONLY content in your response. No additional text, explanations, or other content should be included. This tag signals to reuse your previous response as the final answer.`;
|
|
2038
|
-
}
|
|
2039
2025
|
|
|
2040
2026
|
currentMessages.push({
|
|
2041
2027
|
role: 'user',
|
package/src/agent/schemaUtils.js
CHANGED
|
@@ -63,12 +63,6 @@ export function generateSchemaInstructions(schema, options = {}) {
|
|
|
63
63
|
try {
|
|
64
64
|
const parsedSchema = typeof schema === 'string' ? JSON.parse(schema) : schema;
|
|
65
65
|
instructions += `${JSON.stringify(parsedSchema, null, 2)}\n\n`;
|
|
66
|
-
|
|
67
|
-
// Generate example using helper function
|
|
68
|
-
const exampleObj = generateExampleFromSchema(parsedSchema, { debug });
|
|
69
|
-
if (exampleObj) {
|
|
70
|
-
instructions += `Example:\n<attempt_completion>\n${JSON.stringify(exampleObj, null, 2)}\n</attempt_completion>\n\n`;
|
|
71
|
-
}
|
|
72
66
|
} catch (e) {
|
|
73
67
|
if (debug) {
|
|
74
68
|
console.error('[DEBUG] generateSchemaInstructions: Failed to parse schema:', e.message);
|
|
@@ -76,7 +70,7 @@ export function generateSchemaInstructions(schema, options = {}) {
|
|
|
76
70
|
instructions += `${schema}\n\n`;
|
|
77
71
|
}
|
|
78
72
|
|
|
79
|
-
instructions += 'Your response inside attempt_completion must be ONLY valid JSON - no plain text, no explanations, no markdown.';
|
|
73
|
+
instructions += 'Your response inside attempt_completion must be ONLY valid JSON - no plain text, no explanations, no markdown.\n\nIMPORTANT: First complete the requested analysis/task thoroughly, then provide your final answer in the JSON format above.';
|
|
80
74
|
|
|
81
75
|
return instructions;
|
|
82
76
|
}
|