@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,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 { openSync } from "node:fs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region lib/engine/process/process-runner.ts
|
|
@@ -263,7 +263,6 @@ const ghNotificationSchema = z.object({
|
|
|
263
263
|
});
|
|
264
264
|
const ghNotificationsSchema = z.array(ghNotificationSchema);
|
|
265
265
|
const defaultProcess = new NodeFunnelProcessRunner();
|
|
266
|
-
const defaultLogger = new NodeFunnelLogger();
|
|
267
266
|
const MAX_SEEN = 1e4;
|
|
268
267
|
const KEEP_SEEN = 5e3;
|
|
269
268
|
var FunnelGhListener = class extends FunnelConnectorListener {
|
|
@@ -279,7 +278,7 @@ var FunnelGhListener = class extends FunnelConnectorListener {
|
|
|
279
278
|
super();
|
|
280
279
|
this.config = deps.config;
|
|
281
280
|
this.process = deps.process ?? defaultProcess;
|
|
282
|
-
this.logger = deps.logger
|
|
281
|
+
this.logger = deps.logger;
|
|
283
282
|
this.now = deps.now ?? (() => /* @__PURE__ */ new Date());
|
|
284
283
|
this.since = this.now().toISOString();
|
|
285
284
|
}
|
|
@@ -310,12 +309,12 @@ var FunnelGhListener = class extends FunnelConnectorListener {
|
|
|
310
309
|
`/notifications?${params}`
|
|
311
310
|
]);
|
|
312
311
|
if (result.exitCode !== 0) {
|
|
313
|
-
this.logger
|
|
312
|
+
this.logger?.error("gh poll failed", { stderr: result.stderr });
|
|
314
313
|
return;
|
|
315
314
|
}
|
|
316
315
|
const parsed = ghNotificationsSchema.safeParse(JSON.parse(result.stdout));
|
|
317
316
|
if (!parsed.success) {
|
|
318
|
-
this.logger
|
|
317
|
+
this.logger?.warn("gh response did not match schema", { error: parsed.error.message });
|
|
319
318
|
return;
|
|
320
319
|
}
|
|
321
320
|
const items = parsed.data;
|
|
@@ -346,7 +345,7 @@ var FunnelGhListener = class extends FunnelConnectorListener {
|
|
|
346
345
|
this.since = nextSince;
|
|
347
346
|
this.bootstrapped = true;
|
|
348
347
|
} catch (error) {
|
|
349
|
-
this.logger
|
|
348
|
+
this.logger?.error("gh poll error", { error: error instanceof Error ? error.message : String(error) });
|
|
350
349
|
}
|
|
351
350
|
}
|
|
352
351
|
};
|