@interactive-inc/claude-funnel 0.8.1 → 0.10.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 +179 -80
- package/dist/bin.js +726 -658
- package/dist/connector-adapter-CXB-q_XC.d.ts +11 -0
- package/dist/connector-adapter-D5Utumgz.js +4 -0
- package/dist/connectors/discord.d.ts +76 -0
- package/dist/connectors/discord.js +2 -0
- package/dist/connectors/gh.d.ts +38 -0
- package/dist/connectors/gh.js +2 -0
- package/dist/connectors/schedule.d.ts +53 -0
- package/dist/connectors/schedule.js +2 -0
- package/dist/connectors/slack.d.ts +34 -0
- package/dist/connectors/slack.js +2 -0
- package/dist/discord-connector-schema-Dww2I4zH.d.ts +14 -0
- package/dist/discord-connector-schema-ygf5Df-2.js +173 -0
- package/dist/file-system-Co60LrmR.d.ts +74 -0
- package/dist/gateway/daemon.js +233 -183
- package/dist/gh-connector-schema-2ml29MBC.js +218 -0
- package/dist/gh-connector-schema-BZFAS-p-.d.ts +45 -0
- package/dist/index.d.ts +3881 -36
- package/dist/index.js +6217 -3483
- package/dist/logger-CTlXs7z4.d.ts +33 -0
- package/dist/node-logger-DQz_BGOD.js +61 -0
- package/dist/schedule-connector-schema-CkuIQ0JQ.js +325 -0
- package/dist/slack-connector-schema-Cd22WiHB.js +153 -0
- package/dist/slack-event-processor-CS-bAit9.d.ts +43 -0
- package/package.json +34 -28
- package/dist/cli/factory.d.ts +0 -7
- package/dist/cli/router/query-to-cli-args.d.ts +0 -1
- package/dist/cli/router/to-request.d.ts +0 -5
- package/dist/cli/router/validator.d.ts +0 -5
- package/dist/cli/routes/channels.$channel.connectors.$connector.d.ts +0 -42
- package/dist/cli/routes/channels.$channel.connectors.$connector.rename.$newName.d.ts +0 -46
- package/dist/cli/routes/channels.$channel.connectors.$connector.request.d.ts +0 -54
- package/dist/cli/routes/channels.$channel.connectors.$connector.schedules.add.$id.d.ts +0 -66
- package/dist/cli/routes/channels.$channel.connectors.$connector.schedules.d.ts +0 -42
- package/dist/cli/routes/channels.$channel.connectors.$connector.schedules.remove.$id.d.ts +0 -46
- package/dist/cli/routes/channels.$channel.connectors.add.$connector.d.ts +0 -90
- package/dist/cli/routes/channels.$channel.connectors.d.ts +0 -38
- package/dist/cli/routes/channels.$channel.connectors.remove.$connector.d.ts +0 -42
- package/dist/cli/routes/channels.$channel.connectors.set.$connector.d.ts +0 -62
- package/dist/cli/routes/channels.$channel.d.ts +0 -38
- package/dist/cli/routes/channels.$channel.rename.$newName.d.ts +0 -42
- package/dist/cli/routes/channels.$channel.set.delivery.$mode.d.ts +0 -28
- package/dist/cli/routes/channels.add.$channel.d.ts +0 -46
- package/dist/cli/routes/channels.d.ts +0 -16
- package/dist/cli/routes/channels.remove.$channel.d.ts +0 -38
- package/dist/cli/routes/claude.d.ts +0 -32
- package/dist/cli/routes/gateway.d.ts +0 -20
- package/dist/cli/routes/gateway.listeners.d.ts +0 -17
- package/dist/cli/routes/gateway.logs.d.ts +0 -24
- package/dist/cli/routes/gateway.restart.d.ts +0 -24
- package/dist/cli/routes/gateway.run.d.ts +0 -24
- package/dist/cli/routes/gateway.start.d.ts +0 -24
- package/dist/cli/routes/gateway.status.d.ts +0 -13
- package/dist/cli/routes/gateway.stop.d.ts +0 -16
- package/dist/cli/routes/index.d.ts +0 -1222
- package/dist/cli/routes/profiles.$profile.as-default.d.ts +0 -38
- package/dist/cli/routes/profiles.$profile.rename.$newName.d.ts +0 -42
- package/dist/cli/routes/profiles.$profile.run.d.ts +0 -46
- package/dist/cli/routes/profiles.add.$profile.d.ts +0 -54
- package/dist/cli/routes/profiles.d.ts +0 -16
- package/dist/cli/routes/profiles.remove.$profile.d.ts +0 -38
- package/dist/cli/routes/profiles.set.$profile.d.ts +0 -54
- package/dist/cli/routes/status.d.ts +0 -16
- package/dist/cli/routes/update.d.ts +0 -16
- package/dist/connectors/connector-adapter.d.ts +0 -8
- package/dist/connectors/connector-config-schema.d.ts +0 -43
- package/dist/connectors/connector-factory.d.ts +0 -32
- package/dist/connectors/connector-listener.d.ts +0 -17
- package/dist/connectors/discord-adapter.d.ts +0 -14
- package/dist/connectors/discord-connector-schema.d.ts +0 -10
- package/dist/connectors/discord-event-processor.d.ts +0 -26
- package/dist/connectors/discord-listener.d.ts +0 -17
- package/dist/connectors/gh-adapter.d.ts +0 -11
- package/dist/connectors/gh-connector-schema.d.ts +0 -10
- package/dist/connectors/gh-listener.d.ts +0 -26
- package/dist/connectors/match-cron.d.ts +0 -1
- package/dist/connectors/schedule-connector-schema.d.ts +0 -45
- package/dist/connectors/schedule-listener.d.ts +0 -30
- package/dist/connectors/schedule-state-store.d.ts +0 -19
- package/dist/connectors/slack-adapter.d.ts +0 -15
- package/dist/connectors/slack-connector-schema.d.ts +0 -11
- package/dist/connectors/slack-event-processor.d.ts +0 -27
- package/dist/connectors/slack-listener.d.ts +0 -17
- package/dist/engine/channels/channels.d.ts +0 -106
- package/dist/engine/claude/claude.d.ts +0 -49
- package/dist/engine/claude/gateway-controller.d.ts +0 -6
- package/dist/engine/fs/file-system.d.ts +0 -24
- package/dist/engine/fs/memory-file-system.d.ts +0 -31
- package/dist/engine/fs/node-file-system.d.ts +0 -15
- package/dist/engine/http/http-client.d.ts +0 -15
- package/dist/engine/http/memory-http-client.d.ts +0 -12
- package/dist/engine/http/node-http-client.d.ts +0 -5
- package/dist/engine/id/id-generator.d.ts +0 -7
- package/dist/engine/id/memory-id-generator.d.ts +0 -11
- package/dist/engine/id/node-id-generator.d.ts +0 -4
- package/dist/engine/logger/logger.d.ts +0 -11
- package/dist/engine/logger/memory-logger.d.ts +0 -14
- package/dist/engine/logger/node-logger.d.ts +0 -15
- package/dist/engine/logger/noop-logger.d.ts +0 -7
- package/dist/engine/mcp/channel-server.d.ts +0 -1
- package/dist/engine/mcp/mcp.d.ts +0 -22
- package/dist/engine/process/memory-process-runner.d.ts +0 -43
- package/dist/engine/process/node-process-runner.d.ts +0 -9
- package/dist/engine/process/process-runner.d.ts +0 -29
- package/dist/engine/profiles/profile-channel-checker.d.ts +0 -7
- package/dist/engine/profiles/profiles.d.ts +0 -31
- package/dist/engine/settings/mock-settings-reader.d.ts +0 -9
- package/dist/engine/settings/settings-reader.d.ts +0 -5
- package/dist/engine/settings/settings-schema.d.ts +0 -132
- package/dist/engine/settings/settings-store.d.ts +0 -18
- package/dist/engine/time/clock.d.ts +0 -9
- package/dist/engine/time/memory-clock.d.ts +0 -12
- package/dist/engine/time/node-clock.d.ts +0 -4
- package/dist/funnel.d.ts +0 -95
- package/dist/gateway/auth-middleware.d.ts +0 -14
- package/dist/gateway/broadcaster.d.ts +0 -122
- package/dist/gateway/daemon.d.ts +0 -2
- package/dist/gateway/factory.d.ts +0 -7
- package/dist/gateway/funnel-event-store.d.ts +0 -81
- package/dist/gateway/gateway-server.d.ts +0 -94
- package/dist/gateway/gateway-token.d.ts +0 -33
- package/dist/gateway/gateway.d.ts +0 -58
- package/dist/gateway/kill-competing-slack-gateways.d.ts +0 -9
- package/dist/gateway/listener-supervisor.d.ts +0 -85
- package/dist/gateway/listeners-client.d.ts +0 -53
- package/dist/gateway/resolve-daemon-script.d.ts +0 -11
- package/dist/gateway/routes/channels.connectors.call.d.ts +0 -41
- package/dist/gateway/routes/health.d.ts +0 -17
- package/dist/gateway/routes/index.d.ts +0 -209
- package/dist/gateway/routes/listeners.list.d.ts +0 -14
- package/dist/gateway/routes/listeners.restart.d.ts +0 -34
- package/dist/gateway/routes/listeners.start.d.ts +0 -34
- package/dist/gateway/routes/listeners.stop.d.ts +0 -34
- package/dist/gateway/routes/route-deps.d.ts +0 -10
- package/dist/gateway/routes/status.d.ts +0 -30
- package/dist/gateway/routes/validator.d.ts +0 -19
- package/dist/logger/leuco-human-file-writer.d.ts +0 -33
- package/dist/logger/leuco-human-logger.d.ts +0 -46
- package/dist/logger/leuco-human-record.d.ts +0 -15
- package/dist/logger/leuco-human-stdout-writer.d.ts +0 -20
- package/dist/logger/leuco-human-writer.d.ts +0 -13
- package/dist/logger/leuco-logger-memory-sink.d.ts +0 -33
- package/dist/logger/leuco-logger-record.d.ts +0 -13
- package/dist/logger/leuco-logger-sink.d.ts +0 -34
- package/dist/logger/leuco-logger-sqlite-sink.d.ts +0 -102
- package/dist/logger/leuco-logger.d.ts +0 -56
- package/lib/bin.ts +0 -78
- package/lib/cli/factory.ts +0 -10
- package/lib/cli/router/query-to-cli-args.ts +0 -20
- package/lib/cli/router/to-request.ts +0 -112
- 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.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 -69
- 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 -202
- 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 -46
- package/lib/cli/routes/profiles.remove.$profile.ts +0 -20
- package/lib/cli/routes/profiles.set.$profile.ts +0 -46
- 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/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/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/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/engine/channels/channels.ts +0 -520
- package/lib/engine/claude/claude.ts +0 -199
- 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 -204
- package/lib/engine/mcp/mcp.ts +0 -126
- 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 -46
- 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 -187
- package/lib/gateway/auth-middleware.ts +0 -44
- package/lib/gateway/broadcaster.ts +0 -319
- 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 -414
- 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/resolve-daemon-script.ts +0 -26
- package/lib/gateway/routes/channels.connectors.call.ts +0 -39
- package/lib/gateway/routes/health.ts +0 -13
- package/lib/gateway/routes/index.ts +0 -24
- 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 -11
- package/lib/gateway/routes/status.ts +0 -15
- package/lib/gateway/routes/validator.ts +0 -17
- package/lib/index.ts +0 -52
- 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,58 +0,0 @@
|
|
|
1
|
-
import { FunnelFileSystem } from "../engine/fs/file-system";
|
|
2
|
-
import { FunnelProcessRunner } from "../engine/process/process-runner";
|
|
3
|
-
import { FunnelClock } from "../engine/time/clock";
|
|
4
|
-
type Deps = {
|
|
5
|
-
process?: FunnelProcessRunner;
|
|
6
|
-
fs?: FunnelFileSystem;
|
|
7
|
-
clock?: FunnelClock;
|
|
8
|
-
dir?: string;
|
|
9
|
-
tmpDir?: string;
|
|
10
|
-
port?: number;
|
|
11
|
-
sleep?: (ms: number) => Promise<void>;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Manages the gateway daemon as a separate process via PID file.
|
|
15
|
-
* Use `start()` to spawn `bun daemon.ts` in the background and `stop()` to
|
|
16
|
-
* terminate it. For an in-process gateway, use `Funnel.gatewayServer` instead.
|
|
17
|
-
*/
|
|
18
|
-
export declare class FunnelGateway {
|
|
19
|
-
private readonly process;
|
|
20
|
-
private readonly fs;
|
|
21
|
-
private readonly clock;
|
|
22
|
-
private readonly pidFile;
|
|
23
|
-
private readonly logDir;
|
|
24
|
-
private readonly gatewayLog;
|
|
25
|
-
private readonly tmpDir;
|
|
26
|
-
private readonly port;
|
|
27
|
-
private readonly sleep;
|
|
28
|
-
constructor(deps?: Deps);
|
|
29
|
-
isRunning(): boolean;
|
|
30
|
-
getStatus(): {
|
|
31
|
-
running: boolean;
|
|
32
|
-
pid: number | null;
|
|
33
|
-
port: number;
|
|
34
|
-
};
|
|
35
|
-
start(options?: {
|
|
36
|
-
caffeinate?: boolean;
|
|
37
|
-
}): Promise<boolean>;
|
|
38
|
-
buildStartCommand(gatewayScript: string, options?: {
|
|
39
|
-
caffeinate?: boolean;
|
|
40
|
-
}): string;
|
|
41
|
-
stop(): Promise<boolean>;
|
|
42
|
-
restart(options?: {
|
|
43
|
-
onlyIfRunning?: boolean;
|
|
44
|
-
caffeinate?: boolean;
|
|
45
|
-
}): Promise<{
|
|
46
|
-
ok: boolean;
|
|
47
|
-
wasRunning: boolean;
|
|
48
|
-
stopped: boolean;
|
|
49
|
-
started: boolean;
|
|
50
|
-
}>;
|
|
51
|
-
getLogDir(): string;
|
|
52
|
-
getGatewayLog(): string;
|
|
53
|
-
getPort(): number;
|
|
54
|
-
private readPid;
|
|
55
|
-
private removePid;
|
|
56
|
-
private isProcessAlive;
|
|
57
|
-
}
|
|
58
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FunnelLogger } from "../engine/logger/logger";
|
|
2
|
-
import { FunnelProcessRunner } from "../engine/process/process-runner";
|
|
3
|
-
type Props = {
|
|
4
|
-
selfPid: number;
|
|
5
|
-
process?: FunnelProcessRunner;
|
|
6
|
-
logger?: FunnelLogger;
|
|
7
|
-
};
|
|
8
|
-
export declare const killCompetingSlackGateways: (props: Props) => Promise<number[]>;
|
|
9
|
-
export {};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { ConnectorConfig } from "../connectors/connector-config-schema";
|
|
2
|
-
import type { FunnelConnectorListener } from "../connectors/connector-listener";
|
|
3
|
-
import type { ChannelConnectorView } from "../engine/channels/channels";
|
|
4
|
-
import { FunnelLogger } from "../engine/logger/logger";
|
|
5
|
-
type ConnectorRegistry = {
|
|
6
|
-
listAllConnectors(): ChannelConnectorView[];
|
|
7
|
-
createListener(channelName: string, connectorName: string): {
|
|
8
|
-
config: ConnectorConfig;
|
|
9
|
-
channelId: string;
|
|
10
|
-
listener: FunnelConnectorListener;
|
|
11
|
-
} | null;
|
|
12
|
-
};
|
|
13
|
-
type SupervisorNotify = (channelName: string, connectorName: string, content: string, meta?: Record<string, string>) => Promise<void>;
|
|
14
|
-
type Deps = {
|
|
15
|
-
channels: ConnectorRegistry;
|
|
16
|
-
notify: SupervisorNotify;
|
|
17
|
-
logger?: FunnelLogger;
|
|
18
|
-
healthCheckIntervalMs?: number;
|
|
19
|
-
maxBackoffMs?: number;
|
|
20
|
-
sleep?: (ms: number) => Promise<void>;
|
|
21
|
-
now?: () => number;
|
|
22
|
-
};
|
|
23
|
-
type ListenerEntryStatus = {
|
|
24
|
-
channelName: string;
|
|
25
|
-
channelId: string;
|
|
26
|
-
name: string;
|
|
27
|
-
type: ConnectorConfig["type"];
|
|
28
|
-
alive: boolean;
|
|
29
|
-
events: number;
|
|
30
|
-
errors: number;
|
|
31
|
-
failureCount: number;
|
|
32
|
-
lastEventAt: string | null;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Owns the running listener instances and their lifecycle.
|
|
36
|
-
*
|
|
37
|
-
* Lives in the gateway process and is the only place that calls
|
|
38
|
-
* `listener.start()` / `listener.stop()`. Each entry is keyed by
|
|
39
|
-
* `${channelName}/${connectorName}` so the same connector name can exist in
|
|
40
|
-
* multiple channels without colliding.
|
|
41
|
-
*
|
|
42
|
-
* Periodically polls each running listener's `isAlive()` and auto-restarts
|
|
43
|
-
* dead listeners with exponential backoff (1s, 2s, 4s, ... capped). Resets
|
|
44
|
-
* the backoff counter on successful restart.
|
|
45
|
-
*/
|
|
46
|
-
export declare class FunnelListenerSupervisor {
|
|
47
|
-
private readonly channels;
|
|
48
|
-
private readonly notify;
|
|
49
|
-
private readonly logger;
|
|
50
|
-
private readonly running;
|
|
51
|
-
private readonly failureCounts;
|
|
52
|
-
private readonly stats;
|
|
53
|
-
private readonly healthCheckIntervalMs;
|
|
54
|
-
private readonly maxBackoffMs;
|
|
55
|
-
private readonly sleep;
|
|
56
|
-
private readonly now;
|
|
57
|
-
private healthCheckTimer;
|
|
58
|
-
private healthCheckInFlight;
|
|
59
|
-
constructor(deps: Deps);
|
|
60
|
-
static keyOf(channelName: string, connectorName: string): string;
|
|
61
|
-
isRunning(channelName: string, connectorName: string): boolean;
|
|
62
|
-
list(): ListenerEntryStatus[];
|
|
63
|
-
start(channelName: string, connectorName: string): Promise<{
|
|
64
|
-
ok: boolean;
|
|
65
|
-
reason?: string;
|
|
66
|
-
}>;
|
|
67
|
-
stop(channelName: string, connectorName: string): Promise<{
|
|
68
|
-
ok: boolean;
|
|
69
|
-
reason?: string;
|
|
70
|
-
}>;
|
|
71
|
-
restart(channelName: string, connectorName: string): Promise<{
|
|
72
|
-
ok: boolean;
|
|
73
|
-
reason?: string;
|
|
74
|
-
}>;
|
|
75
|
-
startAll(): Promise<void>;
|
|
76
|
-
stopAll(): Promise<void>;
|
|
77
|
-
private ensureStats;
|
|
78
|
-
private recordEvent;
|
|
79
|
-
private recordError;
|
|
80
|
-
private startHealthCheck;
|
|
81
|
-
private stopHealthCheck;
|
|
82
|
-
private runHealthCheck;
|
|
83
|
-
private recoverDead;
|
|
84
|
-
}
|
|
85
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
type Deps = {
|
|
3
|
-
port: number;
|
|
4
|
-
isDaemonRunning: () => boolean;
|
|
5
|
-
/** Returns the daemon's gateway token, or null if unavailable. Sent as `Authorization: Bearer`. */
|
|
6
|
-
getToken?: () => string | null;
|
|
7
|
-
};
|
|
8
|
-
declare const listenerEntrySchema: z.ZodObject<{
|
|
9
|
-
channelName: z.ZodString;
|
|
10
|
-
channelId: z.ZodString;
|
|
11
|
-
name: z.ZodString;
|
|
12
|
-
type: z.ZodString;
|
|
13
|
-
alive: z.ZodBoolean;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
export type ListenerEntry = z.infer<typeof listenerEntrySchema>;
|
|
16
|
-
export type ListenerOpResult = {
|
|
17
|
-
state: "ok";
|
|
18
|
-
} | {
|
|
19
|
-
state: "offline";
|
|
20
|
-
} | {
|
|
21
|
-
state: "error";
|
|
22
|
-
reason: string;
|
|
23
|
-
};
|
|
24
|
-
export type ListListenersResult = {
|
|
25
|
-
state: "ok";
|
|
26
|
-
listeners: ListenerEntry[];
|
|
27
|
-
} | {
|
|
28
|
-
state: "offline";
|
|
29
|
-
} | {
|
|
30
|
-
state: "error";
|
|
31
|
-
reason: string;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* HTTP client for listener operations on a running gateway daemon.
|
|
35
|
-
*
|
|
36
|
-
* Returns `{ state: "offline" }` when the daemon isn't running so callers
|
|
37
|
-
* (CLI hot-reload paths) can treat that as a no-op without parsing strings.
|
|
38
|
-
* Pair this with `FunnelGateway` (process control) for the full picture.
|
|
39
|
-
*/
|
|
40
|
-
export declare class FunnelListenersClient {
|
|
41
|
-
private readonly port;
|
|
42
|
-
private readonly isDaemonRunning;
|
|
43
|
-
private readonly getToken;
|
|
44
|
-
constructor(deps: Deps);
|
|
45
|
-
list(): Promise<ListListenersResult>;
|
|
46
|
-
start(channelName: string, connectorName: string): Promise<ListenerOpResult>;
|
|
47
|
-
stop(channelName: string, connectorName: string): Promise<ListenerOpResult>;
|
|
48
|
-
restart(channelName: string, connectorName: string): Promise<ListenerOpResult>;
|
|
49
|
-
private path;
|
|
50
|
-
private authHeaders;
|
|
51
|
-
private call;
|
|
52
|
-
}
|
|
53
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Locate the daemon entry script. Works in both dev (running from source)
|
|
3
|
-
* and built mode (bundled into dist/bin.js with daemon at dist/gateway/daemon.js).
|
|
4
|
-
*
|
|
5
|
-
* The candidates cover:
|
|
6
|
-
* 1. dev: this helper lives at lib/gateway/, so daemon.ts is its sibling
|
|
7
|
-
* 2. built sibling: dist/gateway/daemon.js if the helper itself ends up at dist/gateway/
|
|
8
|
-
* 3. bundled: when this helper is inlined into dist/bin.js, import.meta.dir is dist/,
|
|
9
|
-
* and daemon.js lives at dist/gateway/daemon.js
|
|
10
|
-
*/
|
|
11
|
-
export declare const resolveDaemonScript: () => string;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* POST /channels/:channel/connectors/:connector/call
|
|
3
|
-
*
|
|
4
|
-
* Generic adapter call. Used by the funnel MCP server (running in the Claude
|
|
5
|
-
* Code process) to send replies/reactions/etc. without spawning a CLI
|
|
6
|
-
* subprocess. Mirrors the CLI's `funnel channels <c> connectors <conn> request
|
|
7
|
-
* --method=...` but with a structured JSON body and no shell.
|
|
8
|
-
*/
|
|
9
|
-
export declare const channelsConnectorsCallHandler: [import("hono/types").H<import("hono").Env, string, {
|
|
10
|
-
in: {
|
|
11
|
-
param: {
|
|
12
|
-
channel: string;
|
|
13
|
-
connector: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
out: {
|
|
17
|
-
param: {
|
|
18
|
-
channel: string;
|
|
19
|
-
connector: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}, import("hono").TypedResponse<{
|
|
23
|
-
ok: boolean;
|
|
24
|
-
reason: string;
|
|
25
|
-
}, 400, "json">>, import("hono/types").H<import("../factory").Env, string, {
|
|
26
|
-
in: {
|
|
27
|
-
param: {
|
|
28
|
-
channel: string;
|
|
29
|
-
connector: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
out: {
|
|
33
|
-
param: {
|
|
34
|
-
channel: string;
|
|
35
|
-
connector: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
}, Promise<Response & import("hono").TypedResponse<{
|
|
39
|
-
ok: true;
|
|
40
|
-
result: import("hono/utils/types").JSONValue;
|
|
41
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">>>];
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/** GET /health — liveness + listener registry snapshot. */
|
|
2
|
-
export declare const healthHandler: [import("hono/types").H<import("../factory").Env, string, {}, Response & import("hono").TypedResponse<{
|
|
3
|
-
ok: true;
|
|
4
|
-
pid: number;
|
|
5
|
-
clients: number;
|
|
6
|
-
listeners: {
|
|
7
|
-
channelName: string;
|
|
8
|
-
channelId: string;
|
|
9
|
-
name: string;
|
|
10
|
-
type: import("../..").ConnectorConfig["type"];
|
|
11
|
-
alive: boolean;
|
|
12
|
-
events: number;
|
|
13
|
-
errors: number;
|
|
14
|
-
failureCount: number;
|
|
15
|
-
lastEventAt: string | null;
|
|
16
|
-
}[];
|
|
17
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">>];
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Top-level Hono app for the gateway daemon. Mounts every HTTP endpoint flat
|
|
3
|
-
* (the WebSocket /ws upgrade is handled directly by `Bun.serve`). Deps come
|
|
4
|
-
* from the `deps` variable set by `FunnelGatewayServer`'s middleware — same
|
|
5
|
-
* shape as CLI's `c.var.funnel`.
|
|
6
|
-
*/
|
|
7
|
-
export declare const gatewayRoutes: import("hono/hono-base").HonoBase<import("../factory").Env, {
|
|
8
|
-
"/health": {
|
|
9
|
-
$get: {
|
|
10
|
-
input: {};
|
|
11
|
-
output: {
|
|
12
|
-
ok: true;
|
|
13
|
-
pid: number;
|
|
14
|
-
clients: number;
|
|
15
|
-
listeners: {
|
|
16
|
-
channelName: string;
|
|
17
|
-
channelId: string;
|
|
18
|
-
name: string;
|
|
19
|
-
type: import("../..").ConnectorConfig["type"];
|
|
20
|
-
alive: boolean;
|
|
21
|
-
events: number;
|
|
22
|
-
errors: number;
|
|
23
|
-
failureCount: number;
|
|
24
|
-
lastEventAt: string | null;
|
|
25
|
-
}[];
|
|
26
|
-
};
|
|
27
|
-
outputFormat: "json";
|
|
28
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
} & {
|
|
32
|
-
"/status": {
|
|
33
|
-
$get: {
|
|
34
|
-
input: {};
|
|
35
|
-
output: {
|
|
36
|
-
ok: true;
|
|
37
|
-
pid: number;
|
|
38
|
-
uptimeMs: number;
|
|
39
|
-
clients: {
|
|
40
|
-
channel: string;
|
|
41
|
-
connectors: string[];
|
|
42
|
-
}[];
|
|
43
|
-
listeners: {
|
|
44
|
-
channelName: string;
|
|
45
|
-
channelId: string;
|
|
46
|
-
name: string;
|
|
47
|
-
type: import("../..").ConnectorConfig["type"];
|
|
48
|
-
alive: boolean;
|
|
49
|
-
events: number;
|
|
50
|
-
errors: number;
|
|
51
|
-
failureCount: number;
|
|
52
|
-
lastEventAt: string | null;
|
|
53
|
-
}[];
|
|
54
|
-
broadcaster: {
|
|
55
|
-
clients: number;
|
|
56
|
-
subscribers: number;
|
|
57
|
-
eventsBroadcast: number;
|
|
58
|
-
droppedSlowClients: number;
|
|
59
|
-
lastBroadcastAt: string | null;
|
|
60
|
-
latestOffset: number;
|
|
61
|
-
oldestReplayableOffset: number | null;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
outputFormat: "json";
|
|
65
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
} & {
|
|
69
|
-
"/listeners": {
|
|
70
|
-
$get: {
|
|
71
|
-
input: {};
|
|
72
|
-
output: {
|
|
73
|
-
listeners: {
|
|
74
|
-
channelName: string;
|
|
75
|
-
channelId: string;
|
|
76
|
-
name: string;
|
|
77
|
-
type: import("../..").ConnectorConfig["type"];
|
|
78
|
-
alive: boolean;
|
|
79
|
-
events: number;
|
|
80
|
-
errors: number;
|
|
81
|
-
failureCount: number;
|
|
82
|
-
lastEventAt: string | null;
|
|
83
|
-
}[];
|
|
84
|
-
};
|
|
85
|
-
outputFormat: "json";
|
|
86
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
} & {
|
|
90
|
-
"/listeners/:channel/:connector/start": {
|
|
91
|
-
$post: {
|
|
92
|
-
input: {
|
|
93
|
-
param: {
|
|
94
|
-
channel: string;
|
|
95
|
-
connector: string;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
output: {
|
|
99
|
-
ok: boolean;
|
|
100
|
-
reason: string;
|
|
101
|
-
};
|
|
102
|
-
outputFormat: "json";
|
|
103
|
-
status: 400;
|
|
104
|
-
} | {
|
|
105
|
-
input: {
|
|
106
|
-
param: {
|
|
107
|
-
channel: string;
|
|
108
|
-
connector: string;
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
output: {
|
|
112
|
-
ok: boolean;
|
|
113
|
-
reason?: string | undefined;
|
|
114
|
-
};
|
|
115
|
-
outputFormat: "json";
|
|
116
|
-
status: 200 | 400;
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
} & {
|
|
120
|
-
"/listeners/:channel/:connector": {
|
|
121
|
-
$delete: {
|
|
122
|
-
input: {
|
|
123
|
-
param: {
|
|
124
|
-
channel: string;
|
|
125
|
-
connector: string;
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
output: {
|
|
129
|
-
ok: boolean;
|
|
130
|
-
reason: string;
|
|
131
|
-
};
|
|
132
|
-
outputFormat: "json";
|
|
133
|
-
status: 400;
|
|
134
|
-
} | {
|
|
135
|
-
input: {
|
|
136
|
-
param: {
|
|
137
|
-
channel: string;
|
|
138
|
-
connector: string;
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
output: {
|
|
142
|
-
ok: boolean;
|
|
143
|
-
reason?: string | undefined;
|
|
144
|
-
};
|
|
145
|
-
outputFormat: "json";
|
|
146
|
-
status: 200 | 400;
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
} & {
|
|
150
|
-
"/listeners/:channel/:connector/restart": {
|
|
151
|
-
$post: {
|
|
152
|
-
input: {
|
|
153
|
-
param: {
|
|
154
|
-
channel: string;
|
|
155
|
-
connector: string;
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
output: {
|
|
159
|
-
ok: boolean;
|
|
160
|
-
reason: string;
|
|
161
|
-
};
|
|
162
|
-
outputFormat: "json";
|
|
163
|
-
status: 400;
|
|
164
|
-
} | {
|
|
165
|
-
input: {
|
|
166
|
-
param: {
|
|
167
|
-
channel: string;
|
|
168
|
-
connector: string;
|
|
169
|
-
};
|
|
170
|
-
};
|
|
171
|
-
output: {
|
|
172
|
-
ok: boolean;
|
|
173
|
-
reason?: string | undefined;
|
|
174
|
-
};
|
|
175
|
-
outputFormat: "json";
|
|
176
|
-
status: 200 | 400;
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
} & {
|
|
180
|
-
"/channels/:channel/connectors/:connector/call": {
|
|
181
|
-
$post: {
|
|
182
|
-
input: {
|
|
183
|
-
param: {
|
|
184
|
-
channel: string;
|
|
185
|
-
connector: string;
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
output: {
|
|
189
|
-
ok: boolean;
|
|
190
|
-
reason: string;
|
|
191
|
-
};
|
|
192
|
-
outputFormat: "json";
|
|
193
|
-
status: 400;
|
|
194
|
-
} | {
|
|
195
|
-
input: {
|
|
196
|
-
param: {
|
|
197
|
-
channel: string;
|
|
198
|
-
connector: string;
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
output: {
|
|
202
|
-
ok: true;
|
|
203
|
-
result: import("hono/utils/types").JSONValue;
|
|
204
|
-
};
|
|
205
|
-
outputFormat: "json";
|
|
206
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
}, "/", "/channels/:channel/connectors/:connector/call">;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/** GET /listeners — running connector listeners with alive/dead status. */
|
|
2
|
-
export declare const listenersListHandler: [import("hono/types").H<import("../factory").Env, string, {}, Response & import("hono").TypedResponse<{
|
|
3
|
-
listeners: {
|
|
4
|
-
channelName: string;
|
|
5
|
-
channelId: string;
|
|
6
|
-
name: string;
|
|
7
|
-
type: import("../..").ConnectorConfig["type"];
|
|
8
|
-
alive: boolean;
|
|
9
|
-
events: number;
|
|
10
|
-
errors: number;
|
|
11
|
-
failureCount: number;
|
|
12
|
-
lastEventAt: string | null;
|
|
13
|
-
}[];
|
|
14
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">>];
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/** POST /listeners/:channel/:connector/restart — stop + start a connector listener. */
|
|
2
|
-
export declare const listenersRestartHandler: [import("hono/types").H<import("hono").Env, string, {
|
|
3
|
-
in: {
|
|
4
|
-
param: {
|
|
5
|
-
channel: string;
|
|
6
|
-
connector: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
out: {
|
|
10
|
-
param: {
|
|
11
|
-
channel: string;
|
|
12
|
-
connector: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
}, import("hono").TypedResponse<{
|
|
16
|
-
ok: boolean;
|
|
17
|
-
reason: string;
|
|
18
|
-
}, 400, "json">>, import("hono/types").H<import("../factory").Env, string, {
|
|
19
|
-
in: {
|
|
20
|
-
param: {
|
|
21
|
-
channel: string;
|
|
22
|
-
connector: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
out: {
|
|
26
|
-
param: {
|
|
27
|
-
channel: string;
|
|
28
|
-
connector: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
}, Promise<Response & import("hono").TypedResponse<{
|
|
32
|
-
ok: boolean;
|
|
33
|
-
reason?: string | undefined;
|
|
34
|
-
}, 200 | 400, "json">>>];
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/** POST /listeners/:channel/:connector/start — start a connector listener. */
|
|
2
|
-
export declare const listenersStartHandler: [import("hono/types").H<import("hono").Env, string, {
|
|
3
|
-
in: {
|
|
4
|
-
param: {
|
|
5
|
-
channel: string;
|
|
6
|
-
connector: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
out: {
|
|
10
|
-
param: {
|
|
11
|
-
channel: string;
|
|
12
|
-
connector: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
}, import("hono").TypedResponse<{
|
|
16
|
-
ok: boolean;
|
|
17
|
-
reason: string;
|
|
18
|
-
}, 400, "json">>, import("hono/types").H<import("../factory").Env, string, {
|
|
19
|
-
in: {
|
|
20
|
-
param: {
|
|
21
|
-
channel: string;
|
|
22
|
-
connector: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
out: {
|
|
26
|
-
param: {
|
|
27
|
-
channel: string;
|
|
28
|
-
connector: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
}, Promise<Response & import("hono").TypedResponse<{
|
|
32
|
-
ok: boolean;
|
|
33
|
-
reason?: string | undefined;
|
|
34
|
-
}, 200 | 400, "json">>>];
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/** DELETE /listeners/:channel/:connector — stop a connector listener. */
|
|
2
|
-
export declare const listenersStopHandler: [import("hono/types").H<import("hono").Env, string, {
|
|
3
|
-
in: {
|
|
4
|
-
param: {
|
|
5
|
-
channel: string;
|
|
6
|
-
connector: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
out: {
|
|
10
|
-
param: {
|
|
11
|
-
channel: string;
|
|
12
|
-
connector: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
}, import("hono").TypedResponse<{
|
|
16
|
-
ok: boolean;
|
|
17
|
-
reason: string;
|
|
18
|
-
}, 400, "json">>, import("hono/types").H<import("../factory").Env, string, {
|
|
19
|
-
in: {
|
|
20
|
-
param: {
|
|
21
|
-
channel: string;
|
|
22
|
-
connector: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
out: {
|
|
26
|
-
param: {
|
|
27
|
-
channel: string;
|
|
28
|
-
connector: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
}, Promise<Response & import("hono").TypedResponse<{
|
|
32
|
-
ok: boolean;
|
|
33
|
-
reason?: string | undefined;
|
|
34
|
-
}, 200 | 400, "json">>>];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { FunnelChannels } from "../../engine/channels/channels";
|
|
2
|
-
import type { FunnelBroadcaster } from "../broadcaster";
|
|
3
|
-
import type { FunnelListenerSupervisor } from "../listener-supervisor";
|
|
4
|
-
export type GatewayRouteDeps = {
|
|
5
|
-
selfPid: number;
|
|
6
|
-
broadcaster: FunnelBroadcaster;
|
|
7
|
-
supervisor: FunnelListenerSupervisor;
|
|
8
|
-
channels: FunnelChannels;
|
|
9
|
-
uptimeMs: () => number;
|
|
10
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/** GET /status — listener registry, connected channels, and broadcaster metrics. */
|
|
2
|
-
export declare const statusHandler: [import("hono/types").H<import("../factory").Env, string, {}, Response & import("hono").TypedResponse<{
|
|
3
|
-
ok: true;
|
|
4
|
-
pid: number;
|
|
5
|
-
uptimeMs: number;
|
|
6
|
-
clients: {
|
|
7
|
-
channel: string;
|
|
8
|
-
connectors: string[];
|
|
9
|
-
}[];
|
|
10
|
-
listeners: {
|
|
11
|
-
channelName: string;
|
|
12
|
-
channelId: string;
|
|
13
|
-
name: string;
|
|
14
|
-
type: import("../..").ConnectorConfig["type"];
|
|
15
|
-
alive: boolean;
|
|
16
|
-
events: number;
|
|
17
|
-
errors: number;
|
|
18
|
-
failureCount: number;
|
|
19
|
-
lastEventAt: string | null;
|
|
20
|
-
}[];
|
|
21
|
-
broadcaster: {
|
|
22
|
-
clients: number;
|
|
23
|
-
subscribers: number;
|
|
24
|
-
eventsBroadcast: number;
|
|
25
|
-
droppedSlowClients: number;
|
|
26
|
-
lastBroadcastAt: string | null;
|
|
27
|
-
latestOffset: number;
|
|
28
|
-
oldestReplayableOffset: number | null;
|
|
29
|
-
};
|
|
30
|
-
}, import("hono/utils/http-status").ContentfulStatusCode, "json">>];
|