open-agents-ai 0.182.0 → 0.184.0
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/dist/index.js +24 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25872,6 +25872,30 @@ ${top.map((t) => `- ${t.name}: ${t.desc}`).join("\n")}`
|
|
|
25872
25872
|
});
|
|
25873
25873
|
}
|
|
25874
25874
|
}
|
|
25875
|
+
if (turn === 0 && (turnTier === "small" || turnTier === "medium")) {
|
|
25876
|
+
const taskGoal = this._taskState.goal || "";
|
|
25877
|
+
const hasMultiplePremises = (taskGoal.match(/\band\b|\bthen\b|\bif\b|\bbecause\b|\bsince\b|\bgiven\b/gi) || []).length >= 3;
|
|
25878
|
+
const hasConditionalLogic = (taskGoal.match(/\bif\b.*\bthen\b|\bwhen\b.*\bshould\b|\bassuming\b/gi) || []).length >= 1;
|
|
25879
|
+
const hasMultiStepRequirement = taskGoal.length > 200 && (taskGoal.match(/\d\./g) || []).length >= 2;
|
|
25880
|
+
const isAnalysisTask = (taskGoal.match(/\banalyze\b|\baudit\b|\breview\b|\bdiagnose\b|\binvestigate\b|\bcompare\b|\bevaluate\b/gi) || []).length >= 1;
|
|
25881
|
+
if (hasMultiplePremises || hasConditionalLogic || hasMultiStepRequirement || isAnalysisTask) {
|
|
25882
|
+
messages.push({
|
|
25883
|
+
role: "system",
|
|
25884
|
+
content: [
|
|
25885
|
+
"[Structured Reasoning Guide]",
|
|
25886
|
+
"This task requires multi-step reasoning. Follow this structure:",
|
|
25887
|
+
"",
|
|
25888
|
+
"1. DECOMPOSE: List the sub-questions this task requires, from simplest to most complex.",
|
|
25889
|
+
"2. For each sub-question:",
|
|
25890
|
+
" a. State what you KNOW (verified from evidence/tool output)",
|
|
25891
|
+
" b. State what you ASSUME (hypotheses not yet confirmed)",
|
|
25892
|
+
" c. Derive your conclusion using ONLY verified facts",
|
|
25893
|
+
"3. If a tool result contradicts your earlier reasoning, UPDATE your conclusions \u2014 don't ignore new evidence.",
|
|
25894
|
+
"4. Before your final answer, verify: does each conclusion follow from the evidence?"
|
|
25895
|
+
].join("\n")
|
|
25896
|
+
});
|
|
25897
|
+
}
|
|
25898
|
+
}
|
|
25875
25899
|
const turnBudget = turnTier === "small" ? 5 : turnTier === "medium" ? 8 : 0;
|
|
25876
25900
|
if (turnBudget > 0 && turn > 0 && turn % turnBudget === 0) {
|
|
25877
25901
|
const repetitionRatio = this.detectRepetition(toolCallLog);
|
package/package.json
CHANGED