@interactive-inc/claude-funnel 0.57.0 → 0.58.1

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.
Files changed (49) hide show
  1. package/dist/bin.js +258 -219
  2. package/dist/claude.d.ts +5 -5
  3. package/dist/claude.js +2 -2
  4. package/dist/{connector-adapter-1PxjN-Uk.d.ts → connector-adapter-DGacCppE.d.ts} +1 -1
  5. package/dist/connectors/discord.d.ts +3 -20
  6. package/dist/connectors/discord.js +1 -1
  7. package/dist/connectors/gh.d.ts +4 -4
  8. package/dist/connectors/schedule.d.ts +1 -1
  9. package/dist/connectors/slack.d.ts +2 -2
  10. package/dist/connectors/slack.js +1 -1
  11. package/dist/diagnostics.d.ts +1 -1
  12. package/dist/{discord-connector-schema-CPgcZkXh.d.ts → discord-connector-schema-CQyfDkLD.d.ts} +18 -1
  13. package/dist/{discord-listener-C0MoKdQO.js → discord-listener-CKsZGTnH.js} +1 -1
  14. package/dist/docs.d.ts +1 -1
  15. package/dist/doctor.d.ts +1 -1
  16. package/dist/{file-process-guard-DI1742H5.d.ts → file-process-guard-B3IFCj_G.d.ts} +5 -5
  17. package/dist/{funnel-diagnostics-qWy5tPSq.d.ts → funnel-diagnostics-K-wON25Y.d.ts} +1 -1
  18. package/dist/{funnel-doctor-BF3Rdgk0.d.ts → funnel-doctor-vxO96TCA.d.ts} +2 -2
  19. package/dist/funnel-log-sqlite-sink-B_5_4ybn.js +301 -0
  20. package/dist/{funnel-recovery-BUBsu7WX.d.ts → funnel-recovery-COExL9MD.d.ts} +1 -1
  21. package/dist/gateway/daemon.js +196 -196
  22. package/dist/gateway.d.ts +2 -2
  23. package/dist/gateway.js +1 -1
  24. package/dist/{index-DEeCwhk2.d.ts → index-B9iyugar.d.ts} +49 -14
  25. package/dist/index.d.ts +17 -16
  26. package/dist/index.js +76 -11
  27. package/dist/{local-config-sync-E_t5_fjw.d.ts → local-config-sync--f739oCJ.d.ts} +8 -8
  28. package/dist/local-config.d.ts +2 -2
  29. package/dist/local-config.js +1 -1
  30. package/dist/logger.d.ts +384 -0
  31. package/dist/logger.js +281 -0
  32. package/dist/{memory-diagnostic-log-BbFVqDzz.js → memory-diagnostic-log-5LzwJ_F7.js} +110 -323
  33. package/dist/{memory-token-prompter-DpCC1_Dn.d.ts → memory-token-prompter-BlFwK9k7.d.ts} +2 -2
  34. package/dist/{profiles-EHTeCOqB.d.ts → profiles-g2qGVOWv.d.ts} +3 -3
  35. package/dist/profiles.d.ts +1 -1
  36. package/dist/recovery.d.ts +1 -1
  37. package/dist/{schedule-listener-DKh0hnkK.d.ts → schedule-listener-DoMPjHZj.d.ts} +2 -2
  38. package/dist/{settings-reader-CBrgz01o.d.ts → settings-reader-DPwqOVUm.d.ts} +1 -1
  39. package/dist/{slack-listener-BDyBqatt.js → slack-listener-C4wlZaOq.js} +18 -5
  40. package/dist/{slack-listener-DFlAzMc7.d.ts → slack-listener-Dj9NFbAJ.d.ts} +2 -1
  41. package/dist/{yaml-render-OhUN-qkS.js → yaml-render-C9Hhjk-0.js} +1 -1
  42. package/package.json +6 -1
  43. /package/dist/{diagnostic-log-Bxe7Bbvw.d.ts → diagnostic-log-Cb3v8P7p.d.ts} +0 -0
  44. /package/dist/{file-system-Wub9Nto4.d.ts → file-system-DxpnnUVb.d.ts} +0 -0
  45. /package/dist/{funnel-docs-dXPokzr5.d.ts → funnel-docs-DYBs1-H_.d.ts} +0 -0
  46. /package/dist/{gh-connector-schema-CU1ojfIF.d.ts → gh-connector-schema-CZzwzvqY.d.ts} +0 -0
  47. /package/dist/{memory-token-prompter-vBXxY20-.js → memory-token-prompter-C7vREzCL.js} +0 -0
  48. /package/dist/{process-runner-D5I_jhYQ.d.ts → process-runner-Cx5O_fTf.d.ts} +0 -0
  49. /package/dist/{settings-schema-zhnMIa8I.d.ts → settings-schema-1hh11jnN.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { a as Settings } from "./settings-schema-zhnMIa8I.js";
1
+ import { a as Settings } from "./settings-schema-1hh11jnN.js";
2
2
 
3
3
  //#region lib/engine/id/id-generator.d.ts
4
4
  /**
@@ -3,7 +3,7 @@ import { t as resolveConnectorToken } from "./resolve-connector-token-CczqG_Ig.j
3
3
  import { t as FunnelConnectorListener } from "./connector-listener-CpHBecCj.js";
4
4
  import { z } from "zod";
5
5
  import { WebClient } from "@slack/web-api";
6
- import { App, LogLevel } from "@slack/bolt";
6
+ import { App, LogLevel, SocketModeReceiver } from "@slack/bolt";
7
7
  //#region lib/engine/connectors/slack-adapter.ts
8
8
  const toRecord = (value) => {
9
9
  const result = {};
@@ -272,6 +272,7 @@ var FunnelSlackListener = class extends FunnelConnectorListener {
272
272
  onAppCreated;
273
273
  preprocessEvent;
274
274
  app = null;
275
+ connected = false;
275
276
  constructor(deps) {
276
277
  super();
277
278
  this.config = deps.config;
@@ -290,15 +291,25 @@ var FunnelSlackListener = class extends FunnelConnectorListener {
290
291
  env: this.env,
291
292
  label: `${this.config.name}.botToken`
292
293
  });
293
- const app = new App({
294
- token: botToken,
294
+ const receiver = new SocketModeReceiver({
295
295
  appToken: resolveConnectorToken({
296
296
  literal: this.config.appToken,
297
297
  envVar: this.config.appTokenEnv,
298
298
  env: this.env,
299
299
  label: `${this.config.name}.appToken`
300
300
  }),
301
- socketMode: true,
301
+ logLevel: LogLevel.ERROR,
302
+ autoReconnectEnabled: false
303
+ });
304
+ receiver.client.on("connected", () => {
305
+ this.connected = true;
306
+ });
307
+ receiver.client.on("disconnected", () => {
308
+ this.connected = false;
309
+ });
310
+ const app = new App({
311
+ token: botToken,
312
+ receiver,
302
313
  logLevel: LogLevel.ERROR
303
314
  });
304
315
  let authResult;
@@ -362,6 +373,7 @@ var FunnelSlackListener = class extends FunnelConnectorListener {
362
373
  throw error;
363
374
  }
364
375
  this.app = app;
376
+ this.connected = true;
365
377
  this.recordConnection("connected", "");
366
378
  }
367
379
  async stop() {
@@ -374,11 +386,12 @@ var FunnelSlackListener = class extends FunnelConnectorListener {
374
386
  this.logger?.error("Slack stop error", { error: messageOf(error) });
375
387
  } finally {
376
388
  this.app = null;
389
+ this.connected = false;
377
390
  this.recordConnection("stopped", "");
378
391
  }
379
392
  }
380
393
  isAlive() {
381
- return this.app !== null;
394
+ return this.app !== null && this.connected;
382
395
  }
383
396
  recordRaw(eventId, event) {
384
397
  this.diagnosticLog?.recordRaw({
@@ -1,4 +1,4 @@
1
- import { S as FunnelLogger, b as FunnelConnectorListener, o as ConnectorDiagnosticLog, x as NotifyFn } from "./diagnostic-log-Bxe7Bbvw.js";
1
+ import { S as FunnelLogger, b as FunnelConnectorListener, o as ConnectorDiagnosticLog, x as NotifyFn } from "./diagnostic-log-Cb3v8P7p.js";
2
2
  import { z } from "zod";
3
3
  import { App } from "@slack/bolt";
4
4
 
@@ -123,6 +123,7 @@ declare class FunnelSlackListener extends FunnelConnectorListener {
123
123
  private readonly onAppCreated;
124
124
  private readonly preprocessEvent;
125
125
  private app;
126
+ private connected;
126
127
  constructor(deps: Deps);
127
128
  start(notify: NotifyFn): Promise<void>;
128
129
  stop(): Promise<void>;
@@ -43,7 +43,7 @@ var FunnelClaude = class {
43
43
  }
44
44
  if (!this.gateway.isRunning()) {
45
45
  this.logger?.info(`starting gateway automatically`);
46
- await this.gateway.start();
46
+ if (!await this.gateway.start()) throw new Error(`gateway failed to start on port ${resolveFunnelPort()}; another funnel daemon (a different repo/scope) may already hold it. See 'fnl gateway logs' and 'ps -o pid,args= | grep funnel-gateway'.`);
47
47
  }
48
48
  if (options.profileId) this.guard.acquire(options.profileId);
49
49
  const session = (options.resume ?? false) && options.profileId ? this.resolveSession(options.profileId, cwd, options.userArgs ?? [], options.env ?? {}) : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interactive-inc/claude-funnel",
3
- "version": "0.57.0",
3
+ "version": "0.58.1",
4
4
  "description": "Hub CLI that routes external events (Slack / GitHub / Discord) to Claude Code agents through subscription channels over MCP.",
5
5
  "keywords": [
6
6
  "bun",
@@ -102,6 +102,11 @@
102
102
  "import": "./dist/connectors/schedule.js",
103
103
  "default": "./dist/connectors/schedule.js"
104
104
  },
105
+ "./logger": {
106
+ "types": "./dist/logger.d.ts",
107
+ "import": "./dist/logger.js",
108
+ "default": "./dist/logger.js"
109
+ },
105
110
  "./bin": "./dist/bin.js",
106
111
  "./package.json": "./package.json"
107
112
  },