@interactive-inc/claude-funnel 0.25.1 → 0.26.0

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.
@@ -1,2 +1,2 @@
1
- import { i as FunnelDiscordAdapter, n as FunnelDiscordListener, r as FunnelDiscordEventProcessor, t as discordConnectorSchema } from "../discord-connector-schema-CR8RJ08_.js";
1
+ import { i as FunnelDiscordAdapter, n as FunnelDiscordListener, r as FunnelDiscordEventProcessor, t as discordConnectorSchema } from "../discord-connector-schema-CpuI6rmE.js";
2
2
  export { FunnelDiscordAdapter, FunnelDiscordEventProcessor, FunnelDiscordListener, discordConnectorSchema };
@@ -1,2 +1,2 @@
1
- import { n as FunnelGhListener, r as FunnelGhAdapter, t as ghConnectorSchema } from "../gh-connector-schema-CAC24s0r.js";
1
+ import { n as FunnelGhListener, r as FunnelGhAdapter, t as ghConnectorSchema } from "../gh-connector-schema-CQRIvPpz.js";
2
2
  export { FunnelGhAdapter, FunnelGhListener, ghConnectorSchema };
@@ -1,2 +1,2 @@
1
- import { a as ScheduleStateStore, c as matchCron, i as FunnelScheduleListener, n as scheduleConnectorSchema, r as scheduleEntrySchema, t as scheduleCatchupPolicySchema } from "../schedule-connector-schema-BZpH6ZmR.js";
1
+ import { a as ScheduleStateStore, c as matchCron, i as FunnelScheduleListener, n as scheduleConnectorSchema, r as scheduleEntrySchema, t as scheduleCatchupPolicySchema } from "../schedule-connector-schema-CuCjP7z4.js";
2
2
  export { FunnelScheduleListener, ScheduleStateStore, matchCron, scheduleCatchupPolicySchema, scheduleConnectorSchema, scheduleEntrySchema };
@@ -1,2 +1,2 @@
1
- import { i as FunnelSlackAdapter, n as FunnelSlackListener, r as FunnelSlackEventProcessor, t as slackConnectorSchema } from "../slack-connector-schema-B0NyhxqQ.js";
1
+ import { i as FunnelSlackAdapter, n as FunnelSlackListener, r as FunnelSlackEventProcessor, t as slackConnectorSchema } from "../slack-connector-schema-BWL7dWlY.js";
2
2
  export { FunnelSlackAdapter, FunnelSlackEventProcessor, FunnelSlackListener, slackConnectorSchema };
@@ -1,5 +1,5 @@
1
1
  import { t as FunnelConnectorAdapter } from "./connector-adapter-D5Utumgz.js";
2
- import { i as FunnelConnectorListener, t as NodeFunnelLogger } from "./node-logger-B97ZiGwj.js";
2
+ import { n as FunnelConnectorListener } from "./logger-D1A3_JXV.js";
3
3
  import { Client, GatewayIntentBits, Partials } from "discord.js";
4
4
  import { z } from "zod";
5
5
  //#region lib/engine/http/http-client.ts
@@ -82,7 +82,6 @@ var FunnelDiscordEventProcessor = class {
82
82
  };
83
83
  //#endregion
84
84
  //#region lib/connectors/discord-listener.ts
85
- const defaultLogger = new NodeFunnelLogger();
86
85
  var FunnelDiscordListener = class extends FunnelConnectorListener {
87
86
  config;
88
87
  logger;
@@ -90,7 +89,7 @@ var FunnelDiscordListener = class extends FunnelConnectorListener {
90
89
  constructor(deps) {
91
90
  super();
92
91
  this.config = deps.config;
93
- this.logger = deps.logger ?? defaultLogger;
92
+ this.logger = deps.logger;
94
93
  }
95
94
  async start(notify) {
96
95
  const client = new Client({
@@ -105,7 +104,7 @@ var FunnelDiscordListener = class extends FunnelConnectorListener {
105
104
  client.on("messageCreate", async (message) => {
106
105
  const ownUserId = client.user?.id ?? "";
107
106
  const mentionedUserIds = [...message.mentions.users.keys()];
108
- this.logger.info("discord messageCreate", {
107
+ this.logger?.info("discord messageCreate", {
109
108
  author: message.author.id,
110
109
  authorIsBot: String(message.author.bot),
111
110
  channelId: message.channelId,
@@ -123,24 +122,24 @@ var FunnelDiscordListener = class extends FunnelConnectorListener {
123
122
  raw: message.toJSON()
124
123
  });
125
124
  if (result.skip) {
126
- this.logger.info("discord skip", { reason: "bot author" });
125
+ this.logger?.info("discord skip", { reason: "bot author" });
127
126
  return;
128
127
  }
129
128
  try {
130
129
  await notify(result.content, result.meta);
131
130
  } catch (error) {
132
- this.logger.error("discord notify error", { error: error instanceof Error ? error.message : String(error) });
131
+ this.logger?.error("discord notify error", { error: error instanceof Error ? error.message : String(error) });
133
132
  }
134
133
  });
135
134
  client.on("ready", (readyClient) => {
136
- this.logger.info("discord ready", {
135
+ this.logger?.info("discord ready", {
137
136
  userId: readyClient.user.id,
138
137
  tag: readyClient.user.tag,
139
138
  guilds: String(readyClient.guilds.cache.size)
140
139
  });
141
140
  });
142
141
  client.on("error", (error) => {
143
- this.logger.error("discord client error", { error: error instanceof Error ? error.message : String(error) });
142
+ this.logger?.error("discord client error", { error: error instanceof Error ? error.message : String(error) });
144
143
  });
145
144
  await client.login(this.config.botToken);
146
145
  this.client = client;
@@ -150,7 +149,7 @@ var FunnelDiscordListener = class extends FunnelConnectorListener {
150
149
  try {
151
150
  await this.client.destroy();
152
151
  } catch (error) {
153
- this.logger.error("discord stop error", { error: error instanceof Error ? error.message : String(error) });
152
+ this.logger?.error("discord stop error", { error: error instanceof Error ? error.message : String(error) });
154
153
  } finally {
155
154
  this.client = null;
156
155
  }