@moltium/core 0.1.11 → 0.1.13

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.mjs CHANGED
@@ -1076,7 +1076,23 @@ var Agent = class {
1076
1076
  logger4.info("Startup post: No connected social adapters \u2014 skipping");
1077
1077
  return;
1078
1078
  }
1079
- const content = `${this.config.name} is now online and ready.`;
1079
+ let content;
1080
+ try {
1081
+ const prompt = `You just came online. Write a short, engaging first post for social media.
1082
+ Stay fully in character \u2014 your personality, background, and role are defined in the system prompt.
1083
+ Do NOT use generic phrases like "is now online and ready" or "Hello, world!".
1084
+ Do NOT describe yourself in third person. Do NOT use emojis unless your personality calls for it.
1085
+ Write only the post content, nothing else. Keep it concise and natural.`;
1086
+ content = (await this.llm.generateText(prompt, {
1087
+ systemPrompt: this.systemPrompt,
1088
+ temperature: this.config.llm.temperature ?? 0.8,
1089
+ maxTokens: 280
1090
+ })).trim();
1091
+ logger4.info(`Startup post: LLM generated content (${content.length} chars)`);
1092
+ } catch (error) {
1093
+ logger4.warn(`Startup post: LLM generation failed (${error.message}), using fallback`);
1094
+ content = `${this.config.name} is now online and ready.`;
1095
+ }
1080
1096
  for (const [platform, adapter] of adapters) {
1081
1097
  logger4.info(`Startup post: Posting to ${platform}...`);
1082
1098
  try {
@@ -1145,8 +1161,11 @@ var Agent = class {
1145
1161
  const adapter = this.socialAdapters[platform];
1146
1162
  if (!adapter) return;
1147
1163
  try {
1148
- const prompt = `You are ${this.config.name}. Generate a short, engaging social media post for ${platform}. Your personality: ${this.config.personality.traits.join(", ")}. Bio: ${this.config.personality.bio}. Write only the post content, nothing else. Keep it concise and natural.`;
1164
+ const prompt = `Generate a short, engaging social media post for ${platform}.
1165
+ Stay fully in character based on your personality in the system prompt.
1166
+ Write only the post content, nothing else. Keep it concise and natural.`;
1149
1167
  const content = await this.llm.generateText(prompt, {
1168
+ systemPrompt: this.systemPrompt,
1150
1169
  temperature: this.config.llm.temperature ?? 0.8,
1151
1170
  maxTokens: 280
1152
1171
  });