titan-agent 5.5.23 → 5.5.25

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.
@@ -1074,6 +1074,12 @@ CRITICAL: Widgets are NOT files. Do NOT use write_file, edit_file, or any file t
1074
1074
  }
1075
1075
  } catch {
1076
1076
  }
1077
+ const { resolveActivePersona: __resolvePersona } = await import("./personaProfiles.js");
1078
+ const earlyPersona = __resolvePersona({ channel });
1079
+ if (earlyPersona?.systemPromptAppendix) {
1080
+ enrichedSystemPrompt += earlyPersona.systemPromptAppendix;
1081
+ logger.info(COMPONENT, `[Persona:${earlyPersona.id}] system prompt appendix injected`);
1082
+ }
1077
1083
  const messages = [
1078
1084
  { role: "system", content: enrichedSystemPrompt },
1079
1085
  ...historyMessages
@@ -1101,6 +1107,14 @@ CRITICAL: Widgets are NOT files. Do NOT use write_file, edit_file, or any file t
1101
1107
  }
1102
1108
  modelUsed = activeModel;
1103
1109
  let activeTools = tools;
1110
+ if (earlyPersona) {
1111
+ const { applyPersonaToolFilter } = await import("./personaProfiles.js");
1112
+ const before = activeTools.length;
1113
+ activeTools = applyPersonaToolFilter(activeTools, earlyPersona);
1114
+ if (activeTools.length !== before) {
1115
+ logger.info(COMPONENT, `[Persona:${earlyPersona.id}] tools ${before} \u2192 ${activeTools.length}`);
1116
+ }
1117
+ }
1104
1118
  const SMALL_MODEL_PATTERNS = ["llama3.2", "llama3.1:8b", "phi", "gemma:2b", "qwen3.5:4b", "tinyllama", "dolphin3"];
1105
1119
  const isSmallModel = SMALL_MODEL_PATTERNS.some((p) => activeModel.toLowerCase().includes(p));
1106
1120
  if (isSmallModel) {