@interactive-inc/claude-funnel 0.10.0 → 0.15.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/README.md +106 -56
- package/dist/bin.js +557 -530
- package/dist/connectors/schedule.d.ts +2 -49
- package/dist/connectors/schedule.js +1 -1
- package/dist/connectors/slack.d.ts +4 -48
- package/dist/connectors/slack.js +1 -1
- package/dist/gateway/daemon.js +213 -211
- package/dist/index.d.ts +465 -173
- package/dist/index.js +692 -154
- package/dist/{schedule-connector-schema-CkuIQ0JQ.js → schedule-connector-schema-FxP7LPlx.js} +11 -0
- package/dist/{file-system-Co60LrmR.d.ts → schedule-listener-BPodvbld.d.ts} +56 -1
- package/dist/{slack-connector-schema-Cd22WiHB.js → slack-connector-schema-B4hsf3AY.js} +10 -1
- package/dist/slack-listener-CHj6uMY-.d.ts +74 -0
- package/package.json +2 -6
- package/schemas/funnel.schema.json +144 -0
- package/dist/slack-connector-schema-D7zAHN8k.d.ts +0 -15
- package/lib/bin.ts +0 -3
- package/lib/cli/factory.ts +0 -10
- package/lib/cli/index.ts +0 -85
- package/lib/cli/router/query-to-cli-args.ts +0 -20
- package/lib/cli/router/to-request.ts +0 -113
- package/lib/cli/router/validator.ts +0 -27
- package/lib/cli/routes/channels.$channel.connectors.$connector.rename.$newName.ts +0 -27
- package/lib/cli/routes/channels.$channel.connectors.$connector.request.ts +0 -40
- package/lib/cli/routes/channels.$channel.connectors.$connector.schedules.add.$id.ts +0 -41
- package/lib/cli/routes/channels.$channel.connectors.$connector.schedules.remove.$id.ts +0 -22
- package/lib/cli/routes/channels.$channel.connectors.$connector.schedules.ts +0 -23
- package/lib/cli/routes/channels.$channel.connectors.$connector.ts +0 -26
- package/lib/cli/routes/channels.$channel.connectors.add.$connector.ts +0 -92
- package/lib/cli/routes/channels.$channel.connectors.remove.$connector.ts +0 -22
- package/lib/cli/routes/channels.$channel.connectors.set.$connector.ts +0 -63
- package/lib/cli/routes/channels.$channel.connectors.ts +0 -26
- package/lib/cli/routes/channels.$channel.publish.ts +0 -52
- package/lib/cli/routes/channels.$channel.rename.$newName.ts +0 -22
- package/lib/cli/routes/channels.$channel.set.delivery.$mode.ts +0 -34
- package/lib/cli/routes/channels.$channel.ts +0 -34
- package/lib/cli/routes/channels.add.$channel.ts +0 -33
- package/lib/cli/routes/channels.remove.$channel.ts +0 -20
- package/lib/cli/routes/channels.ts +0 -39
- package/lib/cli/routes/claude.ts +0 -70
- package/lib/cli/routes/gateway.listeners.ts +0 -41
- package/lib/cli/routes/gateway.logs.ts +0 -123
- package/lib/cli/routes/gateway.restart.ts +0 -50
- package/lib/cli/routes/gateway.run.ts +0 -41
- package/lib/cli/routes/gateway.start.ts +0 -50
- package/lib/cli/routes/gateway.status.ts +0 -19
- package/lib/cli/routes/gateway.stop.ts +0 -32
- package/lib/cli/routes/gateway.ts +0 -55
- package/lib/cli/routes/index.ts +0 -219
- package/lib/cli/routes/profiles.$profile.as-default.ts +0 -22
- package/lib/cli/routes/profiles.$profile.rename.$newName.ts +0 -22
- package/lib/cli/routes/profiles.$profile.run.ts +0 -36
- package/lib/cli/routes/profiles.add.$profile.ts +0 -49
- package/lib/cli/routes/profiles.remove.$profile.ts +0 -20
- package/lib/cli/routes/profiles.set.$profile.ts +0 -45
- package/lib/cli/routes/profiles.ts +0 -40
- package/lib/cli/routes/status.ts +0 -93
- package/lib/cli/routes/update.ts +0 -27
- package/lib/connectors/connector-adapter.ts +0 -9
- package/lib/connectors/connector-config-schema.ts +0 -16
- package/lib/connectors/connector-factory.ts +0 -94
- package/lib/connectors/connector-listener.ts +0 -20
- package/lib/connectors/discord-adapter.ts +0 -51
- package/lib/connectors/discord-connector-schema.ts +0 -12
- package/lib/connectors/discord-event-processor.ts +0 -48
- package/lib/connectors/discord-listener.ts +0 -111
- package/lib/connectors/discord.ts +0 -4
- package/lib/connectors/gh-adapter.ts +0 -48
- package/lib/connectors/gh-connector-schema.ts +0 -12
- package/lib/connectors/gh-listener.ts +0 -137
- package/lib/connectors/gh.ts +0 -3
- package/lib/connectors/match-cron.ts +0 -78
- package/lib/connectors/schedule-connector-schema.ts +0 -33
- package/lib/connectors/schedule-listener.ts +0 -207
- package/lib/connectors/schedule-state-store.ts +0 -54
- package/lib/connectors/schedule.ts +0 -4
- package/lib/connectors/slack-adapter.ts +0 -36
- package/lib/connectors/slack-connector-schema.ts +0 -13
- package/lib/connectors/slack-event-processor.ts +0 -97
- package/lib/connectors/slack-listener.ts +0 -97
- package/lib/connectors/slack.ts +0 -4
- package/lib/engine/channels/channels.ts +0 -520
- package/lib/engine/claude/claude.ts +0 -205
- package/lib/engine/claude/gateway-controller.ts +0 -4
- package/lib/engine/fs/file-system.ts +0 -23
- package/lib/engine/fs/memory-file-system.ts +0 -102
- package/lib/engine/fs/node-file-system.ts +0 -68
- package/lib/engine/http/http-client.ts +0 -17
- package/lib/engine/http/memory-http-client.ts +0 -36
- package/lib/engine/http/node-http-client.ts +0 -23
- package/lib/engine/id/id-generator.ts +0 -7
- package/lib/engine/id/memory-id-generator.ts +0 -20
- package/lib/engine/id/node-id-generator.ts +0 -7
- package/lib/engine/logger/logger.ts +0 -11
- package/lib/engine/logger/memory-logger.ts +0 -28
- package/lib/engine/logger/node-logger.ts +0 -49
- package/lib/engine/logger/noop-logger.ts +0 -9
- package/lib/engine/mcp/channel-server.ts +0 -123
- package/lib/engine/mcp/channel-subscriber.ts +0 -82
- package/lib/engine/mcp/mcp.ts +0 -126
- package/lib/engine/mcp/read-channel-connectors.ts +0 -34
- package/lib/engine/mcp/read-gateway-token.ts +0 -16
- package/lib/engine/mcp/usage-hint-for-type.ts +0 -15
- package/lib/engine/process/memory-process-runner.ts +0 -88
- package/lib/engine/process/node-process-runner.ts +0 -91
- package/lib/engine/process/process-runner.ts +0 -33
- package/lib/engine/profiles/profile-channel-checker.ts +0 -7
- package/lib/engine/profiles/profiles.ts +0 -126
- package/lib/engine/settings/mock-settings-reader.ts +0 -27
- package/lib/engine/settings/settings-reader.ts +0 -6
- package/lib/engine/settings/settings-schema.ts +0 -48
- package/lib/engine/settings/settings-store.ts +0 -110
- package/lib/engine/time/clock.ts +0 -15
- package/lib/engine/time/memory-clock.ts +0 -26
- package/lib/engine/time/node-clock.ts +0 -7
- package/lib/funnel.ts +0 -294
- package/lib/gateway/auth-middleware.ts +0 -44
- package/lib/gateway/broadcaster.ts +0 -319
- package/lib/gateway/channel-publisher.ts +0 -67
- package/lib/gateway/daemon.ts +0 -47
- package/lib/gateway/factory.ts +0 -10
- package/lib/gateway/funnel-event-store.ts +0 -155
- package/lib/gateway/gateway-server.ts +0 -426
- package/lib/gateway/gateway-token.ts +0 -79
- package/lib/gateway/gateway.ts +0 -209
- package/lib/gateway/kill-competing-slack-gateways.ts +0 -56
- package/lib/gateway/listener-supervisor.ts +0 -339
- package/lib/gateway/listeners-client.ts +0 -128
- package/lib/gateway/publish-schema.ts +0 -27
- package/lib/gateway/resolve-daemon-script.ts +0 -26
- package/lib/gateway/routes/channels.connectors.call.ts +0 -39
- package/lib/gateway/routes/channels.publish.ts +0 -44
- package/lib/gateway/routes/health.ts +0 -13
- package/lib/gateway/routes/index.ts +0 -26
- package/lib/gateway/routes/listeners.list.ts +0 -6
- package/lib/gateway/routes/listeners.restart.ts +0 -15
- package/lib/gateway/routes/listeners.start.ts +0 -15
- package/lib/gateway/routes/listeners.stop.ts +0 -15
- package/lib/gateway/routes/route-deps.ts +0 -19
- package/lib/gateway/routes/status.ts +0 -15
- package/lib/gateway/routes/validator.ts +0 -17
- package/lib/index.ts +0 -67
- package/lib/logger/leuco-human-file-writer.ts +0 -65
- package/lib/logger/leuco-human-logger.ts +0 -98
- package/lib/logger/leuco-human-record.ts +0 -16
- package/lib/logger/leuco-human-stdout-writer.ts +0 -26
- package/lib/logger/leuco-human-writer.ts +0 -14
- package/lib/logger/leuco-logger-memory-sink.ts +0 -67
- package/lib/logger/leuco-logger-record.ts +0 -13
- package/lib/logger/leuco-logger-sink.ts +0 -33
- package/lib/logger/leuco-logger-sqlite-sink.ts +0 -355
- package/lib/logger/leuco-logger.ts +0 -135
- package/lib/tui/app.tsx +0 -357
- package/lib/tui/components/add-row.tsx +0 -18
- package/lib/tui/components/brand.tsx +0 -27
- package/lib/tui/components/card.tsx +0 -44
- package/lib/tui/components/detail-bar.tsx +0 -46
- package/lib/tui/components/editable-field.tsx +0 -33
- package/lib/tui/components/empty-state.tsx +0 -11
- package/lib/tui/components/gateway-status.tsx +0 -66
- package/lib/tui/components/keymap.tsx +0 -29
- package/lib/tui/components/menu-item.tsx +0 -73
- package/lib/tui/components/menu.tsx +0 -26
- package/lib/tui/components/panel-header.tsx +0 -22
- package/lib/tui/components/readonly-field.tsx +0 -18
- package/lib/tui/components/section-header.tsx +0 -25
- package/lib/tui/components/selection-accent.tsx +0 -32
- package/lib/tui/components/session-item.tsx +0 -33
- package/lib/tui/components/session-list.tsx +0 -33
- package/lib/tui/components/ui/hascii/accordion-item.tsx +0 -88
- package/lib/tui/components/ui/hascii/accordion.tsx +0 -96
- package/lib/tui/components/ui/hascii/alert-dialog.tsx +0 -43
- package/lib/tui/components/ui/hascii/badge.tsx +0 -51
- package/lib/tui/components/ui/hascii/breadcrumb.tsx +0 -58
- package/lib/tui/components/ui/hascii/button.tsx +0 -194
- package/lib/tui/components/ui/hascii/card-content.tsx +0 -14
- package/lib/tui/components/ui/hascii/card-description.tsx +0 -13
- package/lib/tui/components/ui/hascii/card-footer.tsx +0 -14
- package/lib/tui/components/ui/hascii/card-header.tsx +0 -14
- package/lib/tui/components/ui/hascii/card-title.tsx +0 -13
- package/lib/tui/components/ui/hascii/card.tsx +0 -27
- package/lib/tui/components/ui/hascii/checkbox.tsx +0 -65
- package/lib/tui/components/ui/hascii/command.tsx +0 -159
- package/lib/tui/components/ui/hascii/dialog-content.tsx +0 -14
- package/lib/tui/components/ui/hascii/dialog-description.tsx +0 -13
- package/lib/tui/components/ui/hascii/dialog-footer.tsx +0 -14
- package/lib/tui/components/ui/hascii/dialog-header.tsx +0 -14
- package/lib/tui/components/ui/hascii/dialog-title.tsx +0 -13
- package/lib/tui/components/ui/hascii/dialog.tsx +0 -27
- package/lib/tui/components/ui/hascii/file-tree.tsx +0 -142
- package/lib/tui/components/ui/hascii/focus-group.tsx +0 -62
- package/lib/tui/components/ui/hascii/form-item.tsx +0 -43
- package/lib/tui/components/ui/hascii/input-otp.tsx +0 -86
- package/lib/tui/components/ui/hascii/input.tsx +0 -130
- package/lib/tui/components/ui/hascii/pagination.tsx +0 -105
- package/lib/tui/components/ui/hascii/progress.tsx +0 -28
- package/lib/tui/components/ui/hascii/select.tsx +0 -131
- package/lib/tui/components/ui/hascii/separator.tsx +0 -35
- package/lib/tui/components/ui/hascii/sidebar-content.tsx +0 -23
- package/lib/tui/components/ui/hascii/sidebar-header.tsx +0 -14
- package/lib/tui/components/ui/hascii/sidebar-menu-item.tsx +0 -67
- package/lib/tui/components/ui/hascii/sidebar.tsx +0 -24
- package/lib/tui/components/ui/hascii/skeleton.tsx +0 -60
- package/lib/tui/components/ui/hascii/slider.tsx +0 -91
- package/lib/tui/components/ui/hascii/snackbar.tsx +0 -75
- package/lib/tui/components/ui/hascii/sparkline.tsx +0 -53
- package/lib/tui/components/ui/hascii/spinner.tsx +0 -47
- package/lib/tui/components/ui/hascii/stepper.tsx +0 -54
- package/lib/tui/components/ui/hascii/switch.tsx +0 -66
- package/lib/tui/components/ui/hascii/table.tsx +0 -95
- package/lib/tui/components/ui/hascii/tabs.tsx +0 -59
- package/lib/tui/components/ui/hascii/toggle-group-item.tsx +0 -45
- package/lib/tui/components/ui/hascii/toggle-group.tsx +0 -99
- package/lib/tui/components/ui/hascii/tree.tsx +0 -104
- package/lib/tui/components/view-shell.tsx +0 -44
- package/lib/tui/filter-input.tsx +0 -33
- package/lib/tui/hooks/hascii/use-pressable.ts +0 -54
- package/lib/tui/parse-comma-list.ts +0 -14
- package/lib/tui/profile-launcher.tsx +0 -61
- package/lib/tui/scrollbar-options.ts +0 -19
- package/lib/tui/sidebar.tsx +0 -50
- package/lib/tui/theme.ts +0 -40
- package/lib/tui/tui.tsx +0 -20
- package/lib/tui/types.ts +0 -38
- package/lib/tui/unique-name.ts +0 -18
- package/lib/tui/use-event-stream.ts +0 -133
- package/lib/tui/use-snapshot.ts +0 -99
- package/lib/tui/utils/hascii/form-item-context.tsx +0 -23
- package/lib/tui/utils/hascii/input-focus-context.tsx +0 -31
- package/lib/tui/utils/hascii/theme-context.tsx +0 -26
- package/lib/tui/utils/hascii/theme.ts +0 -176
- package/lib/tui/views/channels-view.tsx +0 -108
- package/lib/tui/views/connectors-view.tsx +0 -164
- package/lib/tui/views/events-view.tsx +0 -160
- package/lib/tui/views/listeners-view.tsx +0 -80
- package/lib/tui/views/profiles-view.tsx +0 -152
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
export type SlackRawEvent = Record<string, unknown>
|
|
2
|
-
|
|
3
|
-
export type SlackProcessedSkip = { skip: true }
|
|
4
|
-
|
|
5
|
-
export type SlackProcessedEmit = {
|
|
6
|
-
skip: false
|
|
7
|
-
content: string
|
|
8
|
-
meta: Record<string, string>
|
|
9
|
-
shouldReact: boolean
|
|
10
|
-
channel: string
|
|
11
|
-
timestamp: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type SlackProcessed = SlackProcessedSkip | SlackProcessedEmit
|
|
15
|
-
|
|
16
|
-
const ALLOWED_EVENTS = new Set(["message", "app_mention"])
|
|
17
|
-
const ALLOWED_SUBTYPES = new Set<string | undefined>([
|
|
18
|
-
undefined,
|
|
19
|
-
"thread_broadcast",
|
|
20
|
-
"bot_message",
|
|
21
|
-
"file_share",
|
|
22
|
-
])
|
|
23
|
-
|
|
24
|
-
const DEDUP_WINDOW = 10_000
|
|
25
|
-
|
|
26
|
-
type Props = {
|
|
27
|
-
ownBotUserId: string
|
|
28
|
-
ownBotId: string
|
|
29
|
-
now?: () => number
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const getString = (event: SlackRawEvent, key: string): string | undefined => {
|
|
33
|
-
const value = event[key]
|
|
34
|
-
|
|
35
|
-
return typeof value === "string" ? value : undefined
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export class FunnelSlackEventProcessor {
|
|
39
|
-
private readonly ownBotUserId: string
|
|
40
|
-
private readonly ownBotId: string
|
|
41
|
-
private readonly now: () => number
|
|
42
|
-
private readonly dedup = new Map<string, number>()
|
|
43
|
-
|
|
44
|
-
constructor(props: Props) {
|
|
45
|
-
this.ownBotUserId = props.ownBotUserId
|
|
46
|
-
this.ownBotId = props.ownBotId
|
|
47
|
-
this.now = props.now ?? (() => Date.now())
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
process(event: SlackRawEvent): SlackProcessed {
|
|
51
|
-
const eventType = getString(event, "type")
|
|
52
|
-
|
|
53
|
-
if (!eventType || !ALLOWED_EVENTS.has(eventType)) return { skip: true }
|
|
54
|
-
|
|
55
|
-
const subtype = getString(event, "subtype")
|
|
56
|
-
|
|
57
|
-
if (!ALLOWED_SUBTYPES.has(subtype)) return { skip: true }
|
|
58
|
-
|
|
59
|
-
const channelId = getString(event, "channel") ?? ""
|
|
60
|
-
const eventTs = getString(event, "event_ts") ?? getString(event, "ts") ?? ""
|
|
61
|
-
const dedupKey = `${channelId}:${eventTs}`
|
|
62
|
-
const now = this.now()
|
|
63
|
-
|
|
64
|
-
if (this.dedup.has(dedupKey)) return { skip: true }
|
|
65
|
-
|
|
66
|
-
this.dedup.set(dedupKey, now)
|
|
67
|
-
|
|
68
|
-
for (const key of this.dedup.keys()) {
|
|
69
|
-
if ((this.dedup.get(key) ?? 0) < now - DEDUP_WINDOW) this.dedup.delete(key)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const userId = getString(event, "user")
|
|
73
|
-
const botId = getString(event, "bot_id")
|
|
74
|
-
|
|
75
|
-
if (userId === this.ownBotUserId) return { skip: true }
|
|
76
|
-
if (botId === this.ownBotId) return { skip: true }
|
|
77
|
-
|
|
78
|
-
const text = getString(event, "text") ?? ""
|
|
79
|
-
const mentioned = text.includes(`<@${this.ownBotUserId}>`)
|
|
80
|
-
const threadTs = getString(event, "thread_ts") ?? getString(event, "ts") ?? ""
|
|
81
|
-
|
|
82
|
-
return {
|
|
83
|
-
skip: false,
|
|
84
|
-
content: JSON.stringify(event),
|
|
85
|
-
meta: {
|
|
86
|
-
event_type: "slack",
|
|
87
|
-
channel_id: channelId,
|
|
88
|
-
user_id: userId ?? "",
|
|
89
|
-
mentioned: String(mentioned),
|
|
90
|
-
thread_ts: threadTs,
|
|
91
|
-
},
|
|
92
|
-
shouldReact: mentioned,
|
|
93
|
-
channel: channelId,
|
|
94
|
-
timestamp: getString(event, "ts") ?? "",
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { App, LogLevel } from "@slack/bolt"
|
|
2
|
-
import { z } from "zod"
|
|
3
|
-
import { FunnelConnectorListener, type NotifyFn } from "@/connectors/connector-listener"
|
|
4
|
-
import { FunnelSlackEventProcessor } from "@/connectors/slack-event-processor"
|
|
5
|
-
import { FunnelLogger } from "@/engine/logger/logger"
|
|
6
|
-
import { NodeFunnelLogger } from "@/engine/logger/node-logger"
|
|
7
|
-
import type { SlackConnectorConfig } from "@/connectors/slack-connector-schema"
|
|
8
|
-
|
|
9
|
-
const middlewareArgsSchema = z.object({
|
|
10
|
-
event: z.record(z.string(), z.unknown()).optional(),
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
type Deps = {
|
|
14
|
-
config: SlackConnectorConfig
|
|
15
|
-
logger?: FunnelLogger
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const defaultLogger = new NodeFunnelLogger()
|
|
19
|
-
|
|
20
|
-
export class FunnelSlackListener extends FunnelConnectorListener {
|
|
21
|
-
private readonly config: SlackConnectorConfig
|
|
22
|
-
private readonly logger: FunnelLogger
|
|
23
|
-
private app: App | null = null
|
|
24
|
-
|
|
25
|
-
constructor(deps: Deps) {
|
|
26
|
-
super()
|
|
27
|
-
this.config = deps.config
|
|
28
|
-
this.logger = deps.logger ?? defaultLogger
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
async start(notify: NotifyFn): Promise<void> {
|
|
32
|
-
const app = new App({
|
|
33
|
-
token: this.config.botToken,
|
|
34
|
-
appToken: this.config.appToken,
|
|
35
|
-
socketMode: true,
|
|
36
|
-
logLevel: LogLevel.ERROR,
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
const authResult = await app.client.auth.test({ token: this.config.botToken })
|
|
40
|
-
const processor = new FunnelSlackEventProcessor({
|
|
41
|
-
ownBotUserId: authResult.user_id ?? "",
|
|
42
|
-
ownBotId: authResult.bot_id ?? "",
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
app.use(async (args) => {
|
|
46
|
-
const parsed = middlewareArgsSchema.safeParse(args)
|
|
47
|
-
|
|
48
|
-
if (!parsed.success || !parsed.data.event) return
|
|
49
|
-
|
|
50
|
-
const result = processor.process(parsed.data.event)
|
|
51
|
-
|
|
52
|
-
if (result.skip) return
|
|
53
|
-
|
|
54
|
-
if (result.shouldReact) {
|
|
55
|
-
try {
|
|
56
|
-
await app.client.reactions.add({
|
|
57
|
-
token: this.config.botToken,
|
|
58
|
-
channel: result.channel,
|
|
59
|
-
timestamp: result.timestamp,
|
|
60
|
-
name: "eyes",
|
|
61
|
-
})
|
|
62
|
-
} catch {
|
|
63
|
-
// ignore
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
await notify(result.content, result.meta)
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
app.error(async (error) => {
|
|
71
|
-
this.logger.error("Slack error", {
|
|
72
|
-
error: error instanceof Error ? error.message : String(error),
|
|
73
|
-
})
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
await app.start()
|
|
77
|
-
this.app = app
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
async stop(): Promise<void> {
|
|
81
|
-
if (!this.app) return
|
|
82
|
-
|
|
83
|
-
try {
|
|
84
|
-
await this.app.stop()
|
|
85
|
-
} catch (error) {
|
|
86
|
-
this.logger.error("Slack stop error", {
|
|
87
|
-
error: error instanceof Error ? error.message : String(error),
|
|
88
|
-
})
|
|
89
|
-
} finally {
|
|
90
|
-
this.app = null
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
override isAlive(): boolean {
|
|
95
|
-
return this.app !== null
|
|
96
|
-
}
|
|
97
|
-
}
|
package/lib/connectors/slack.ts
DELETED