titan-agent 5.3.2 → 5.4.1

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.
Files changed (48) hide show
  1. package/dist/agent/agent.js +11 -1
  2. package/dist/agent/agent.js.map +1 -1
  3. package/dist/agent/agentLoop.js +36 -1
  4. package/dist/agent/agentLoop.js.map +1 -1
  5. package/dist/agent/session.js +106 -5
  6. package/dist/agent/session.js.map +1 -1
  7. package/dist/agent/subAgent.js +62 -1
  8. package/dist/agent/subAgent.js.map +1 -1
  9. package/dist/config/config.js +30 -8
  10. package/dist/config/config.js.map +1 -1
  11. package/dist/config/schema.js +25 -2
  12. package/dist/config/schema.js.map +1 -1
  13. package/dist/gateway/server.js +32 -1
  14. package/dist/gateway/server.js.map +1 -1
  15. package/dist/memory/graph.js +49 -15
  16. package/dist/memory/graph.js.map +1 -1
  17. package/dist/memory/index.js +192 -0
  18. package/dist/memory/index.js.map +1 -0
  19. package/dist/memory/memory.js +1 -0
  20. package/dist/memory/memory.js.map +1 -1
  21. package/dist/mesh/transport.js +60 -8
  22. package/dist/mesh/transport.js.map +1 -1
  23. package/dist/providers/anthropic.js +3 -2
  24. package/dist/providers/anthropic.js.map +1 -1
  25. package/dist/providers/base.js.map +1 -1
  26. package/dist/providers/google.js +94 -20
  27. package/dist/providers/google.js.map +1 -1
  28. package/dist/providers/modelCapabilities.js +59 -0
  29. package/dist/providers/modelCapabilities.js.map +1 -0
  30. package/dist/providers/ollama.js +3 -2
  31. package/dist/providers/ollama.js.map +1 -1
  32. package/dist/providers/openai.js +4 -3
  33. package/dist/providers/openai.js.map +1 -1
  34. package/dist/providers/openai_compat.js +3 -2
  35. package/dist/providers/openai_compat.js.map +1 -1
  36. package/dist/providers/router.js +63 -21
  37. package/dist/providers/router.js.map +1 -1
  38. package/dist/safety/fabricationGuard.js +140 -0
  39. package/dist/safety/fabricationGuard.js.map +1 -0
  40. package/dist/skills/builtin/gepa.js +23 -1
  41. package/dist/skills/builtin/gepa.js.map +1 -1
  42. package/dist/skills/builtin/model_trainer.js +31 -4
  43. package/dist/skills/builtin/model_trainer.js.map +1 -1
  44. package/dist/skills/builtin/self_improve.js +50 -2
  45. package/dist/skills/builtin/self_improve.js.map +1 -1
  46. package/dist/utils/constants.js +2 -2
  47. package/dist/utils/constants.js.map +1 -1
  48. package/package.json +1 -1
@@ -1028,7 +1028,17 @@ Do NOT just describe it \u2014 actually create the widget on the canvas.`;
1028
1028
  taskEnforcementActive = true;
1029
1029
  }
1030
1030
  if (/\b(?:create|add|make|build|spawn|generate|get|fetch|find|search|show|display|give me|want|need)\b.{0,60}\b(?:widget|panel|canvas|gallery|clock|timer|chart|graph|map|calendar|todo|list|counter|dashboard)\b/i.test(message) && !taskEnforcementActive) {
1031
- systemPrompt += "\n\nWhen the user asks for a widget or panel on the canvas, you MUST call gallery_search FIRST to find a matching template. If a template matches, call gallery_get to fetch its source, then emit it through the _____react gate. Do NOT describe or summarize the widget \u2014 actually call the tools and emit the code.";
1031
+ systemPrompt += `
1032
+
1033
+ The user wants a widget on the canvas. You CAN create it yourself \u2014 you do NOT need the user to share files or an existing project. Your job is to BUILD the widget, not ask for files.
1034
+
1035
+ MANDATORY steps:
1036
+ 1. Call gallery_search with the user's intent (e.g. "weather widget").
1037
+ 2. If a template matches (score >= 6), call gallery_get with its id and fill placeholders.
1038
+ 3. Emit the returned source through the _____react gate.
1039
+ 4. If no template matches, write the React component yourself and emit it through _____react.
1040
+
1041
+ Do NOT describe the widget, do NOT ask the user for files, do NOT say "I don't see an existing canvas" \u2014 just CREATE it.`;
1032
1042
  taskEnforcementActive = true;
1033
1043
  }
1034
1044
  if (channel === "deliberation" && !taskEnforcementActive) {