@moltium/core 0.1.5 → 0.1.6

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.js CHANGED
@@ -1003,6 +1003,16 @@ var Agent = class {
1003
1003
  }
1004
1004
  async initSocialAdapters() {
1005
1005
  const { social } = this.config;
1006
+ const configuredPlatforms = Object.keys(social).filter(
1007
+ (k) => social[k] && typeof social[k] === "object"
1008
+ );
1009
+ if (configuredPlatforms.length === 0) {
1010
+ logger4.warn("Social: No platforms configured. To post on startup, add a social platform to your config.");
1011
+ logger4.warn(' Code-based: Add a moltbook or twitter section to agent.config.ts under "social".');
1012
+ logger4.warn(' Markdown: Add a "### Moltbook" section under "## Social Platforms" in agent.md with "enabled: true".');
1013
+ return;
1014
+ }
1015
+ logger4.info(`Social: Found platforms in config: ${configuredPlatforms.join(", ")}`);
1006
1016
  if (social.moltbook?.enabled) {
1007
1017
  const baseUrl = social.moltbook.baseUrl || "https://www.moltbook.com/api/v1";
1008
1018
  if (!social.moltbook.apiKey || social.moltbook.apiKey === "your-moltbook-key-here") {
@@ -1021,7 +1031,7 @@ var Agent = class {
1021
1031
  }
1022
1032
  }
1023
1033
  } else if (social.moltbook) {
1024
- logger4.info("Moltbook: Configured but disabled (enabled: false)");
1034
+ logger4.warn('Moltbook: Present in config but disabled (enabled: false). Set "enabled: true" to activate.');
1025
1035
  }
1026
1036
  if (social.twitter?.enabled) {
1027
1037
  const creds = social.twitter.credentials;
@@ -1041,7 +1051,7 @@ var Agent = class {
1041
1051
  }
1042
1052
  }
1043
1053
  } else if (social.twitter) {
1044
- logger4.info("Twitter: Configured but disabled (enabled: false)");
1054
+ logger4.warn('Twitter: Present in config but disabled (enabled: false). Set "enabled: true" to activate.');
1045
1055
  }
1046
1056
  }
1047
1057
  async postStartupMessages() {
@@ -1240,8 +1250,10 @@ var MarkdownParser = class {
1240
1250
  for (const child of section.children) {
1241
1251
  const platform = child.title.toLowerCase();
1242
1252
  const fields = this.parseKeyValueLines(child.content);
1253
+ const enabled = fields["enabled"] === "true";
1254
+ delete fields["enabled"];
1243
1255
  social[platform] = {
1244
- enabled: fields["enabled"] === "true",
1256
+ enabled,
1245
1257
  ...fields
1246
1258
  };
1247
1259
  }