@interactive-inc/claude-funnel 0.25.2 → 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.
- package/README.md +24 -14
- package/dist/bin.js +428 -429
- package/dist/connectors/discord.js +1 -1
- package/dist/connectors/gh.js +1 -1
- package/dist/connectors/schedule.js +1 -1
- package/dist/connectors/slack.js +1 -1
- package/dist/{discord-connector-schema-CR8RJ08_.js → discord-connector-schema-CpuI6rmE.js} +8 -9
- package/dist/gateway/daemon.js +181 -182
- package/dist/{gh-connector-schema-CAC24s0r.js → gh-connector-schema-CQRIvPpz.js} +5 -6
- package/dist/index.d.ts +245 -200
- package/dist/index.js +363 -248
- package/dist/logger-D1A3_JXV.js +27 -0
- package/dist/{schedule-connector-schema-BZpH6ZmR.js → schedule-connector-schema-CuCjP7z4.js} +4 -5
- package/dist/{slack-connector-schema-Dhlnfp0g.js → slack-connector-schema-BWL7dWlY.js} +4 -5
- package/funnel.schema.json +0 -4
- package/package.json +2 -3
- package/dist/node-logger-B97ZiGwj.js +0 -74
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as FunnelDiscordAdapter, n as FunnelDiscordListener, r as FunnelDiscordEventProcessor, t as discordConnectorSchema } from "../discord-connector-schema-
|
|
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 };
|
package/dist/connectors/gh.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as FunnelGhListener, r as FunnelGhAdapter, t as ghConnectorSchema } from "../gh-connector-schema-
|
|
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-
|
|
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 };
|
package/dist/connectors/slack.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as FunnelSlackAdapter, n as FunnelSlackListener, r as FunnelSlackEventProcessor, t as slackConnectorSchema } from "../slack-connector-schema-
|
|
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 {
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
}
|