@elizaos/plugin-farcaster 1.0.0-beta.14 → 1.0.0-beta.17

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
@@ -4716,6 +4716,15 @@ var FarcasterInteractionManager = class {
4716
4716
  prompt: shouldRespondPrompt
4717
4717
  });
4718
4718
  const responseActions = (response.match(/(?:RESPOND|IGNORE|STOP)/g) || ["IGNORE"])[0];
4719
+ if (responseActions !== "RESPOND") {
4720
+ logger2.info(`Not responding to cast based on shouldRespond decision: ${responseActions}`);
4721
+ try {
4722
+ await this.runtime.createMemory(memory, "messages");
4723
+ } catch (error) {
4724
+ logger2.error("Error creating ignoredmemory", error);
4725
+ }
4726
+ return;
4727
+ }
4719
4728
  const callback = standardCastHandlerCallback({
4720
4729
  client: this.client,
4721
4730
  runtime: this.runtime,
@@ -4870,7 +4879,7 @@ function hasFarcasterEnabled(runtime) {
4870
4879
  return fid && neynarSignerUuid && neynarApiKey;
4871
4880
  }
4872
4881
  function validateFarcasterConfig(runtime) {
4873
- const fid = Number.parseInt(runtime.getSetting("FARCASTER_FID"));
4882
+ const fid = Number.parseInt(runtime.getSetting("FARCASTER_FID") || process.env.FARCASTER_FID);
4874
4883
  try {
4875
4884
  const farcasterConfig = {
4876
4885
  FARCASTER_DRY_RUN: runtime.getSetting("FARCASTER_DRY_RUN") || parseBooleanFromText(process.env.FARCASTER_DRY_RUN || "false"),
@@ -4907,7 +4916,6 @@ function validateFarcasterConfig(runtime) {
4907
4916
  FARCASTER_NEYNAR_API_KEY: runtime.getSetting("FARCASTER_NEYNAR_API_KEY") || process.env.FARCASTER_NEYNAR_API_KEY,
4908
4917
  FARCASTER_HUB_URL: runtime.getSetting("FARCASTER_HUB_URL") || process.env.FARCASTER_HUB_URL || "hub.pinata.cloud"
4909
4918
  };
4910
- console.log("farcasterConfig", JSON.stringify(farcasterConfig, null, 2));
4911
4919
  const config = FarcasterConfigSchema.parse(farcasterConfig);
4912
4920
  const isDryRun = config.FARCASTER_DRY_RUN;
4913
4921
  logger5.log("Farcaster Client Configuration:");