@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.
- package/dist/bin.js +258 -219
- package/dist/claude.d.ts +5 -5
- package/dist/claude.js +2 -2
- package/dist/{connector-adapter-1PxjN-Uk.d.ts → connector-adapter-DGacCppE.d.ts} +1 -1
- package/dist/connectors/discord.d.ts +3 -20
- package/dist/connectors/discord.js +1 -1
- package/dist/connectors/gh.d.ts +4 -4
- package/dist/connectors/schedule.d.ts +1 -1
- package/dist/connectors/slack.d.ts +2 -2
- package/dist/connectors/slack.js +1 -1
- package/dist/diagnostics.d.ts +1 -1
- package/dist/{discord-connector-schema-CPgcZkXh.d.ts → discord-connector-schema-CQyfDkLD.d.ts} +18 -1
- package/dist/{discord-listener-C0MoKdQO.js → discord-listener-CKsZGTnH.js} +1 -1
- package/dist/docs.d.ts +1 -1
- package/dist/doctor.d.ts +1 -1
- package/dist/{file-process-guard-DI1742H5.d.ts → file-process-guard-B3IFCj_G.d.ts} +5 -5
- package/dist/{funnel-diagnostics-qWy5tPSq.d.ts → funnel-diagnostics-K-wON25Y.d.ts} +1 -1
- package/dist/{funnel-doctor-BF3Rdgk0.d.ts → funnel-doctor-vxO96TCA.d.ts} +2 -2
- package/dist/funnel-log-sqlite-sink-B_5_4ybn.js +301 -0
- package/dist/{funnel-recovery-BUBsu7WX.d.ts → funnel-recovery-COExL9MD.d.ts} +1 -1
- package/dist/gateway/daemon.js +196 -196
- package/dist/gateway.d.ts +2 -2
- package/dist/gateway.js +1 -1
- package/dist/{index-DEeCwhk2.d.ts → index-B9iyugar.d.ts} +49 -14
- package/dist/index.d.ts +17 -16
- package/dist/index.js +76 -11
- package/dist/{local-config-sync-E_t5_fjw.d.ts → local-config-sync--f739oCJ.d.ts} +8 -8
- package/dist/local-config.d.ts +2 -2
- package/dist/local-config.js +1 -1
- package/dist/logger.d.ts +384 -0
- package/dist/logger.js +281 -0
- package/dist/{memory-diagnostic-log-BbFVqDzz.js → memory-diagnostic-log-5LzwJ_F7.js} +110 -323
- package/dist/{memory-token-prompter-DpCC1_Dn.d.ts → memory-token-prompter-BlFwK9k7.d.ts} +2 -2
- package/dist/{profiles-EHTeCOqB.d.ts → profiles-g2qGVOWv.d.ts} +3 -3
- package/dist/profiles.d.ts +1 -1
- package/dist/recovery.d.ts +1 -1
- package/dist/{schedule-listener-DKh0hnkK.d.ts → schedule-listener-DoMPjHZj.d.ts} +2 -2
- package/dist/{settings-reader-CBrgz01o.d.ts → settings-reader-DPwqOVUm.d.ts} +1 -1
- package/dist/{slack-listener-BDyBqatt.js → slack-listener-C4wlZaOq.js} +18 -5
- package/dist/{slack-listener-DFlAzMc7.d.ts → slack-listener-Dj9NFbAJ.d.ts} +2 -1
- package/dist/{yaml-render-OhUN-qkS.js → yaml-render-C9Hhjk-0.js} +1 -1
- package/package.json +6 -1
- /package/dist/{diagnostic-log-Bxe7Bbvw.d.ts → diagnostic-log-Cb3v8P7p.d.ts} +0 -0
- /package/dist/{file-system-Wub9Nto4.d.ts → file-system-DxpnnUVb.d.ts} +0 -0
- /package/dist/{funnel-docs-dXPokzr5.d.ts → funnel-docs-DYBs1-H_.d.ts} +0 -0
- /package/dist/{gh-connector-schema-CU1ojfIF.d.ts → gh-connector-schema-CZzwzvqY.d.ts} +0 -0
- /package/dist/{memory-token-prompter-vBXxY20-.js → memory-token-prompter-C7vREzCL.js} +0 -0
- /package/dist/{process-runner-D5I_jhYQ.d.ts → process-runner-Cx5O_fTf.d.ts} +0 -0
- /package/dist/{settings-schema-zhnMIa8I.d.ts → settings-schema-1hh11jnN.d.ts} +0 -0
|
@@ -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
|
|
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
|
-
|
|
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-
|
|
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.
|
|
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
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|