titan-agent 5.5.13 → 5.5.14
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 +1 -1
- package/dist/agent/swarm.js +0 -148
- package/dist/agent/swarm.js.map +0 -1
package/dist/agent/agent.js
CHANGED
|
@@ -14,7 +14,6 @@ import { heartbeat, clearSession, setStallHandler, setAutonomousMode } from "./s
|
|
|
14
14
|
import { routeModel } from "./costOptimizer.js";
|
|
15
15
|
import { getPlugins } from "../plugins/registry.js";
|
|
16
16
|
import { runAfterTurn } from "../plugins/contextEngine.js";
|
|
17
|
-
import { getSwarmRouterTools } from "./swarm.js";
|
|
18
17
|
import { shouldDeliberate, analyze, generatePlan, executePlan, handleApproval, getDeliberation, cancelDeliberation, formatPlanResults } from "./deliberation.js";
|
|
19
18
|
import { initGraph, addEpisode, getGraphContext } from "../memory/graph.js";
|
|
20
19
|
import { isAvailable as isBrainAvailable, selectTools as brainSelectTools, ensureLoaded as ensureBrainLoaded } from "./brain.js";
|
|
@@ -1101,20 +1100,16 @@ CRITICAL: Widgets are NOT files. Do NOT use write_file, edit_file, or any file t
|
|
|
1101
1100
|
logger.info(COMPONENT, `Cost router: ${config.agent.model} \u2192 ${activeModel} (${routingReason})`);
|
|
1102
1101
|
}
|
|
1103
1102
|
modelUsed = activeModel;
|
|
1104
|
-
|
|
1105
|
-
let activeTools = isKimiSwarm ? getSwarmRouterTools() : tools;
|
|
1106
|
-
if (isKimiSwarm) {
|
|
1107
|
-
logger.info(COMPONENT, `[Swarm] Intercepted kimi-k2.5 payload. Downgrading context from ${tools.length} to ${activeTools.length} router agents.`);
|
|
1108
|
-
}
|
|
1103
|
+
let activeTools = tools;
|
|
1109
1104
|
const SMALL_MODEL_PATTERNS = ["llama3.2", "llama3.1:8b", "phi", "gemma:2b", "qwen3.5:4b", "tinyllama", "dolphin3"];
|
|
1110
1105
|
const isSmallModel = SMALL_MODEL_PATTERNS.some((p) => activeModel.toLowerCase().includes(p));
|
|
1111
|
-
if (isSmallModel
|
|
1106
|
+
if (isSmallModel) {
|
|
1112
1107
|
const CORE_TOOL_NAMES = ["shell", "read_file", "write_file", "edit_file", "list_dir", "memory"];
|
|
1113
1108
|
const coreTools = activeTools.filter((t) => CORE_TOOL_NAMES.includes(t.function.name));
|
|
1114
1109
|
logger.info(COMPONENT, `[SmallModel] Reducing tools from ${activeTools.length} to ${coreTools.length} for ${activeModel}`);
|
|
1115
1110
|
activeTools = coreTools;
|
|
1116
1111
|
}
|
|
1117
|
-
if (!voiceFastPath && !
|
|
1112
|
+
if (!voiceFastPath && !isSmallModel && isBrainAvailable()) {
|
|
1118
1113
|
const brainFiltered = await brainSelectTools(message, activeTools);
|
|
1119
1114
|
if (brainFiltered.length > 0 && brainFiltered.length < activeTools.length) {
|
|
1120
1115
|
logger.info(COMPONENT, `[Brain] Filtered: ${activeTools.length} \u2192 ${brainFiltered.length} tools`);
|
|
@@ -1124,7 +1119,7 @@ CRITICAL: Widgets are NOT files. Do NOT use write_file, edit_file, or any file t
|
|
|
1124
1119
|
const toolSearchConfig = config.toolSearch;
|
|
1125
1120
|
const toolSearchEnabled = toolSearchConfig?.enabled ?? true;
|
|
1126
1121
|
const allToolsBackup = activeTools;
|
|
1127
|
-
if (pipelineEnsureTools.length > 0 && !(toolSearchEnabled && !
|
|
1122
|
+
if (pipelineEnsureTools.length > 0 && !(toolSearchEnabled && !isSmallModel && activeTools.length > 12)) {
|
|
1128
1123
|
const activeNames = new Set(activeTools.map((t) => t.function.name));
|
|
1129
1124
|
const missing = pipelineEnsureTools.filter((name) => !activeNames.has(name));
|
|
1130
1125
|
if (missing.length > 0) {
|
|
@@ -1135,7 +1130,7 @@ CRITICAL: Widgets are NOT files. Do NOT use write_file, edit_file, or any file t
|
|
|
1135
1130
|
}
|
|
1136
1131
|
}
|
|
1137
1132
|
}
|
|
1138
|
-
if (toolSearchEnabled && !
|
|
1133
|
+
if (toolSearchEnabled && !isSmallModel && activeTools.length > 12) {
|
|
1139
1134
|
const VOICE_CORE_TOOLS = ["shell", "web_search", "weather", "memory", "ha_control", "ha_devices", "ha_status", "ha_setup", "tool_search"];
|
|
1140
1135
|
const configCoreTools = toolSearchConfig?.coreTools;
|
|
1141
1136
|
const effectiveCoreTools = configCoreTools && configCoreTools.length > 0 ? configCoreTools : DEFAULT_CORE_TOOLS;
|
|
@@ -1213,7 +1208,6 @@ Synthesize these results into a coherent response for the user.`
|
|
|
1213
1208
|
reflectionEnabled,
|
|
1214
1209
|
reflectionInterval,
|
|
1215
1210
|
toolSearchEnabled,
|
|
1216
|
-
isKimiSwarm,
|
|
1217
1211
|
selfHealEnabled,
|
|
1218
1212
|
smartExitEnabled: pipelineSmartExit,
|
|
1219
1213
|
thinkingOverride: session.thinkingOverride,
|
|
@@ -1268,7 +1262,6 @@ Synthesize these results into a coherent response for the user.`
|
|
|
1268
1262
|
reflectionEnabled: false,
|
|
1269
1263
|
reflectionInterval: 99,
|
|
1270
1264
|
toolSearchEnabled,
|
|
1271
|
-
isKimiSwarm,
|
|
1272
1265
|
selfHealEnabled: false,
|
|
1273
1266
|
thinkingOverride: session.thinkingOverride
|
|
1274
1267
|
});
|