titan-agent 5.5.13 → 5.5.15
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/agent/agent.js +5 -12
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/agentLoop.js +3 -28
- package/dist/agent/agentLoop.js.map +1 -1
- package/dist/providers/ollama.js +2 -2
- package/dist/providers/ollama.js.map +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/constants.js.map +1 -1
- package/docs/VISIONARY-IDEAS-2026-05-07.md +163 -0
- package/package.json +5 -5
- package/dist/agent/swarm.js +0 -148
- package/dist/agent/swarm.js.map +0 -1
package/dist/agent/agentLoop.js
CHANGED
|
@@ -43,7 +43,6 @@ function pushSteer(sessionId, message) {
|
|
|
43
43
|
return true;
|
|
44
44
|
}
|
|
45
45
|
import { recordToolUsage } from "./userProfile.js";
|
|
46
|
-
import { runSubAgent } from "./swarm.js";
|
|
47
46
|
import { compressToolResult, recordStep, getProgressSummary } from "./trajectoryCompressor.js";
|
|
48
47
|
import { verifyFileWrite } from "./autoVerify.js";
|
|
49
48
|
import logger from "../utils/logger.js";
|
|
@@ -1040,33 +1039,9 @@ ${gateText}` : gateText;
|
|
|
1040
1039
|
logger.info(COMPONENT, `Executing ${pendingToolCalls.length} tool call(s)`);
|
|
1041
1040
|
let toolResults = [];
|
|
1042
1041
|
try {
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
const domainMatch = tc.function.name.match(/delegate_to_(.*)_agent/);
|
|
1047
|
-
const domain = domainMatch ? domainMatch[1] : "file";
|
|
1048
|
-
let args;
|
|
1049
|
-
try {
|
|
1050
|
-
args = JSON.parse(tc.function.arguments);
|
|
1051
|
-
} catch {
|
|
1052
|
-
args = { instruction: "" };
|
|
1053
|
-
}
|
|
1054
|
-
const startMs = Date.now();
|
|
1055
|
-
const resultString = await runSubAgent(domain, args.instruction, activeModel);
|
|
1056
|
-
toolResults.push({
|
|
1057
|
-
toolCallId: tc.id,
|
|
1058
|
-
name: tc.function.name,
|
|
1059
|
-
content: resultString,
|
|
1060
|
-
success: !resultString.includes("Error"),
|
|
1061
|
-
durationMs: Date.now() - startMs
|
|
1062
|
-
});
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
} else {
|
|
1066
|
-
const toolExecStart = Date.now();
|
|
1067
|
-
toolResults = await executeTools(pendingToolCalls, ctx.channel);
|
|
1068
|
-
fireSpan(traceCtx, "tool_execution", Date.now() - toolExecStart, { round: String(round), tools: pendingToolCalls.map((t) => t.function.name).join(",") });
|
|
1069
|
-
}
|
|
1042
|
+
const toolExecStart = Date.now();
|
|
1043
|
+
toolResults = await executeTools(pendingToolCalls, ctx.channel);
|
|
1044
|
+
fireSpan(traceCtx, "tool_execution", Date.now() - toolExecStart, { round: String(round), tools: pendingToolCalls.map((t) => t.function.name).join(",") });
|
|
1070
1045
|
} catch (err) {
|
|
1071
1046
|
logger.error(COMPONENT, `Tool execution error: ${err.message}`);
|
|
1072
1047
|
result.content = "An error occurred while executing tools. Please try again.";
|