@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
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,12 @@ import { n as FunnelConnectorAdapter, t as CallInput } from "./connector-adapter
|
|
|
2
2
|
import { n as discordConnectorSchema, t as DiscordConnectorConfig } from "./discord-connector-schema-Dww2I4zH.js";
|
|
3
3
|
import { n as FunnelConnectorListener, r as NotifyFn, t as FunnelLogger } from "./logger-CTlXs7z4.js";
|
|
4
4
|
import { a as FunnelProcessRunner, i as DetachOptions, n as ghConnectorSchema, o as RunOptions, r as AttachOptions, s as RunResult, t as GhConnectorConfig } from "./gh-connector-schema-BZFAS-p-.js";
|
|
5
|
-
import { a as
|
|
6
|
-
import {
|
|
5
|
+
import { a as FunnelFileSystem, c as ScheduleEntry, d as scheduleEntrySchema, i as FileStat, l as scheduleCatchupPolicySchema, n as ScheduleOnFired, o as ScheduleCatchupPolicy, s as ScheduleConnectorConfig, u as scheduleConnectorSchema } from "./schedule-listener-BPodvbld.js";
|
|
6
|
+
import { a as SlackProcessed, c as SlackRawEvent, i as FunnelSlackEventProcessor, l as SlackConnectorConfig, n as SlackOnAppCreated, o as SlackProcessedEmit, r as SlackPreprocessEvent, s as SlackProcessedSkip, u as slackConnectorSchema } from "./slack-listener-CHj6uMY-.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
|
-
import { Server, ServerWebSocket } from "bun";
|
|
9
8
|
import * as _$hono_factory0 from "hono/factory";
|
|
9
|
+
import { Hono } from "hono";
|
|
10
|
+
import { Server, ServerWebSocket } from "bun";
|
|
10
11
|
import * as _$hono_utils_http_status0 from "hono/utils/http-status";
|
|
11
12
|
import * as _$hono_hono_base0 from "hono/hono-base";
|
|
12
13
|
|
|
@@ -55,11 +56,20 @@ type ConnectorConfig = z.infer<typeof connectorConfigSchema>;
|
|
|
55
56
|
type ConnectorType = ConnectorConfig["type"];
|
|
56
57
|
//#endregion
|
|
57
58
|
//#region lib/connectors/connector-factory.d.ts
|
|
58
|
-
type
|
|
59
|
+
type SlackListenerOptions = {
|
|
60
|
+
onAppCreated?: SlackOnAppCreated;
|
|
61
|
+
preprocessEvent?: SlackPreprocessEvent;
|
|
62
|
+
};
|
|
63
|
+
type ScheduleListenerOptions = {
|
|
64
|
+
onFired?: ScheduleOnFired;
|
|
65
|
+
};
|
|
66
|
+
type Deps$15 = {
|
|
59
67
|
fs?: FunnelFileSystem;
|
|
60
68
|
process?: FunnelProcessRunner;
|
|
61
69
|
logger?: FunnelLogger;
|
|
62
|
-
dir?: string;
|
|
70
|
+
dir?: string; /** Per-listener hooks for the slack connector type. Threaded into every Slack listener built by this factory. */
|
|
71
|
+
slackListenerOptions?: SlackListenerOptions; /** Per-listener hooks for the schedule connector type. Threaded into every Schedule listener built by this factory. */
|
|
72
|
+
scheduleListenerOptions?: ScheduleListenerOptions;
|
|
63
73
|
};
|
|
64
74
|
/**
|
|
65
75
|
* Pure factory for per-type listeners and adapters. The factory has no CRUD
|
|
@@ -68,13 +78,19 @@ type Deps$12 = {
|
|
|
68
78
|
*
|
|
69
79
|
* `dir` is the funnel home (defaults to ~/.funnel); per-connector state files
|
|
70
80
|
* land at `<dir>/channels/<channel-id>/connectors/<connector-id>/state.json`.
|
|
81
|
+
*
|
|
82
|
+
* Host integrations can supply per-type listener hooks via
|
|
83
|
+
* `slackListenerOptions` / `scheduleListenerOptions` — e.g. to attach a
|
|
84
|
+
* Bolt `app.action` handler or to drop one-shot schedule entries on fire.
|
|
71
85
|
*/
|
|
72
86
|
declare class FunnelConnectorFactory {
|
|
73
87
|
private readonly fs;
|
|
74
88
|
private readonly process;
|
|
75
89
|
private readonly logger;
|
|
76
90
|
private readonly dir;
|
|
77
|
-
|
|
91
|
+
private readonly slackListenerOptions;
|
|
92
|
+
private readonly scheduleListenerOptions;
|
|
93
|
+
constructor(deps?: Deps$15);
|
|
78
94
|
createListener(channelId: string, config: ConnectorConfig): FunnelConnectorListener;
|
|
79
95
|
createAdapter(config: ConnectorConfig): FunnelConnectorAdapter | null;
|
|
80
96
|
connectorDir(channelId: string, connectorId: string): string;
|
|
@@ -252,7 +268,7 @@ declare abstract class FunnelSettingsReader {
|
|
|
252
268
|
}
|
|
253
269
|
//#endregion
|
|
254
270
|
//#region lib/engine/channels/channels.d.ts
|
|
255
|
-
type Deps$
|
|
271
|
+
type Deps$14 = {
|
|
256
272
|
store: FunnelSettingsReader;
|
|
257
273
|
factory: FunnelConnectorFactory;
|
|
258
274
|
profileChecker: ProfileChannelChecker;
|
|
@@ -295,7 +311,7 @@ declare class FunnelChannels {
|
|
|
295
311
|
private readonly profileChecker;
|
|
296
312
|
private readonly clock;
|
|
297
313
|
private readonly idGenerator;
|
|
298
|
-
constructor(deps: Deps$
|
|
314
|
+
constructor(deps: Deps$14);
|
|
299
315
|
list(): ChannelConfig[];
|
|
300
316
|
get(name: string): ChannelConfig | null;
|
|
301
317
|
getById(id: string): ChannelConfig | null;
|
|
@@ -339,13 +355,7 @@ declare class FunnelChannels {
|
|
|
339
355
|
listener: FunnelConnectorListener;
|
|
340
356
|
}[];
|
|
341
357
|
private requireChannel;
|
|
342
|
-
private requireConnector;
|
|
343
|
-
private requireSlackConnector;
|
|
344
|
-
private requireGhConnector;
|
|
345
|
-
private requireDiscordConnector;
|
|
346
|
-
private requireScheduleConnector;
|
|
347
358
|
private assertNoTokenCollision;
|
|
348
|
-
private tokensOf;
|
|
349
359
|
}
|
|
350
360
|
//#endregion
|
|
351
361
|
//#region lib/engine/claude/gateway-controller.d.ts
|
|
@@ -359,7 +369,7 @@ type GatewayController = {
|
|
|
359
369
|
//#region lib/engine/mcp/mcp.d.ts
|
|
360
370
|
declare const FUNNEL_MCP_COMMAND = "funnel";
|
|
361
371
|
declare const FUNNEL_MCP_NAME = "funnel";
|
|
362
|
-
type Deps$
|
|
372
|
+
type Deps$13 = {
|
|
363
373
|
fs?: FunnelFileSystem;
|
|
364
374
|
};
|
|
365
375
|
/**
|
|
@@ -369,7 +379,7 @@ type Deps$10 = {
|
|
|
369
379
|
*/
|
|
370
380
|
declare class FunnelMcp {
|
|
371
381
|
private readonly fs;
|
|
372
|
-
constructor(deps?: Deps$
|
|
382
|
+
constructor(deps?: Deps$13);
|
|
373
383
|
install(repoPath: string): void;
|
|
374
384
|
uninstall(repoPath: string): void;
|
|
375
385
|
findInstalledName(cwd: string): string | null;
|
|
@@ -385,9 +395,10 @@ type LaunchOptions = {
|
|
|
385
395
|
subAgent?: string;
|
|
386
396
|
userArgs?: string[];
|
|
387
397
|
profileName?: string; /** Forward `--brief` to claude on launch (enables the SendUserMessage tool). */
|
|
388
|
-
brief?: boolean;
|
|
398
|
+
brief?: boolean; /** Extra env vars merged under process.env (process.env wins on collision). */
|
|
399
|
+
extraEnv?: Record<string, string>;
|
|
389
400
|
};
|
|
390
|
-
type Deps$
|
|
401
|
+
type Deps$12 = {
|
|
391
402
|
channels: FunnelChannels;
|
|
392
403
|
mcp: FunnelMcp;
|
|
393
404
|
gateway: GatewayController;
|
|
@@ -410,7 +421,7 @@ declare class FunnelClaude {
|
|
|
410
421
|
private readonly fs;
|
|
411
422
|
private readonly logger;
|
|
412
423
|
private readonly pidDir;
|
|
413
|
-
constructor(deps: Deps$
|
|
424
|
+
constructor(deps: Deps$12);
|
|
414
425
|
launch(options: LaunchOptions): Promise<number>;
|
|
415
426
|
isRunning(profileName: string): boolean;
|
|
416
427
|
private pidPath;
|
|
@@ -423,6 +434,151 @@ declare class FunnelClaude {
|
|
|
423
434
|
private buildEnv;
|
|
424
435
|
}
|
|
425
436
|
//#endregion
|
|
437
|
+
//#region lib/engine/local-config/dotenv-reader.d.ts
|
|
438
|
+
type Deps$11 = {
|
|
439
|
+
fs: FunnelFileSystem;
|
|
440
|
+
};
|
|
441
|
+
/**
|
|
442
|
+
* Minimal `.env.local` parser. Supports `KEY=value` lines, blank lines, and
|
|
443
|
+
* `#` comments. Strips matching surrounding single or double quotes. No
|
|
444
|
+
* interpolation, no `export` prefix — anything fancier should live in a real
|
|
445
|
+
* env file loaded by the shell.
|
|
446
|
+
*/
|
|
447
|
+
declare class FunnelDotenvReader {
|
|
448
|
+
private readonly fs;
|
|
449
|
+
constructor(deps: Deps$11);
|
|
450
|
+
read(cwd: string): Record<string, string>;
|
|
451
|
+
}
|
|
452
|
+
//#endregion
|
|
453
|
+
//#region lib/engine/local-config/local-config-schema.d.ts
|
|
454
|
+
declare const connectorSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
455
|
+
type: z.ZodLiteral<"slack">;
|
|
456
|
+
name: z.ZodString;
|
|
457
|
+
botToken: z.ZodOptional<z.ZodString>;
|
|
458
|
+
appToken: z.ZodOptional<z.ZodString>;
|
|
459
|
+
env: z.ZodOptional<z.ZodObject<{
|
|
460
|
+
botToken: z.ZodOptional<z.ZodString>;
|
|
461
|
+
appToken: z.ZodOptional<z.ZodString>;
|
|
462
|
+
}, z.core.$strip>>;
|
|
463
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
464
|
+
type: z.ZodLiteral<"discord">;
|
|
465
|
+
name: z.ZodString;
|
|
466
|
+
botToken: z.ZodOptional<z.ZodString>;
|
|
467
|
+
env: z.ZodOptional<z.ZodObject<{
|
|
468
|
+
botToken: z.ZodOptional<z.ZodString>;
|
|
469
|
+
}, z.core.$strip>>;
|
|
470
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
471
|
+
type: z.ZodLiteral<"gh">;
|
|
472
|
+
name: z.ZodString;
|
|
473
|
+
pollInterval: z.ZodOptional<z.ZodNumber>;
|
|
474
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
475
|
+
type: z.ZodLiteral<"schedule">;
|
|
476
|
+
name: z.ZodString;
|
|
477
|
+
}, z.core.$strip>], "type">;
|
|
478
|
+
type ConnectorSpec = z.infer<typeof connectorSpecSchema>;
|
|
479
|
+
declare const localConfigSchema: z.ZodObject<{
|
|
480
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
481
|
+
channel: z.ZodString;
|
|
482
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
483
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
484
|
+
connectors: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
485
|
+
type: z.ZodLiteral<"slack">;
|
|
486
|
+
name: z.ZodString;
|
|
487
|
+
botToken: z.ZodOptional<z.ZodString>;
|
|
488
|
+
appToken: z.ZodOptional<z.ZodString>;
|
|
489
|
+
env: z.ZodOptional<z.ZodObject<{
|
|
490
|
+
botToken: z.ZodOptional<z.ZodString>;
|
|
491
|
+
appToken: z.ZodOptional<z.ZodString>;
|
|
492
|
+
}, z.core.$strip>>;
|
|
493
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
494
|
+
type: z.ZodLiteral<"discord">;
|
|
495
|
+
name: z.ZodString;
|
|
496
|
+
botToken: z.ZodOptional<z.ZodString>;
|
|
497
|
+
env: z.ZodOptional<z.ZodObject<{
|
|
498
|
+
botToken: z.ZodOptional<z.ZodString>;
|
|
499
|
+
}, z.core.$strip>>;
|
|
500
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
501
|
+
type: z.ZodLiteral<"gh">;
|
|
502
|
+
name: z.ZodString;
|
|
503
|
+
pollInterval: z.ZodOptional<z.ZodNumber>;
|
|
504
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
505
|
+
type: z.ZodLiteral<"schedule">;
|
|
506
|
+
name: z.ZodString;
|
|
507
|
+
}, z.core.$strip>], "type">>>;
|
|
508
|
+
}, z.core.$strip>;
|
|
509
|
+
type LocalConfig = z.infer<typeof localConfigSchema>;
|
|
510
|
+
declare const LOCAL_CONFIG_FILENAME = "funnel.json";
|
|
511
|
+
declare const LOCAL_ENV_FILENAME = ".env.local";
|
|
512
|
+
//#endregion
|
|
513
|
+
//#region lib/engine/local-config/local-config.d.ts
|
|
514
|
+
type Deps$10 = {
|
|
515
|
+
fs: FunnelFileSystem;
|
|
516
|
+
};
|
|
517
|
+
/**
|
|
518
|
+
* Reads `funnel.json` from a directory. Returns `null` when the file is
|
|
519
|
+
* absent so callers can fall through to other resolution paths (default
|
|
520
|
+
* profile, help). Throws on present-but-invalid files so misconfiguration
|
|
521
|
+
* surfaces loudly instead of silently launching the wrong channel.
|
|
522
|
+
*/
|
|
523
|
+
declare class FunnelLocalConfig {
|
|
524
|
+
private readonly fs;
|
|
525
|
+
constructor(deps: Deps$10);
|
|
526
|
+
read(cwd: string): LocalConfig | null;
|
|
527
|
+
}
|
|
528
|
+
//#endregion
|
|
529
|
+
//#region lib/engine/token-prompter/token-prompter.d.ts
|
|
530
|
+
/**
|
|
531
|
+
* Asks the user for a secret value on stdin. Used as a last resort when a
|
|
532
|
+
* funnel.json token field is absent and not present in `~/.funnel`. The Node
|
|
533
|
+
* implementation refuses to prompt when stdin is not a TTY so non-interactive
|
|
534
|
+
* launches (CI, agent spawning agent, daemons) fail fast instead of hanging.
|
|
535
|
+
*/
|
|
536
|
+
declare abstract class FunnelTokenPrompter {
|
|
537
|
+
abstract promptSecret(label: string): Promise<string>;
|
|
538
|
+
}
|
|
539
|
+
//#endregion
|
|
540
|
+
//#region lib/engine/local-config/local-config-sync.d.ts
|
|
541
|
+
type Deps$9 = {
|
|
542
|
+
channels: FunnelChannels;
|
|
543
|
+
dotenv: FunnelDotenvReader;
|
|
544
|
+
prompter: FunnelTokenPrompter;
|
|
545
|
+
env?: NodeJS.ProcessEnv;
|
|
546
|
+
};
|
|
547
|
+
/**
|
|
548
|
+
* Reconciles a `funnel.json` spec with `~/.funnel/settings.json`. The spec
|
|
549
|
+
* is the source of truth for the channel it declares:
|
|
550
|
+
*
|
|
551
|
+
* - missing channel → created
|
|
552
|
+
* - declared connector matched by name → tokens reconciled
|
|
553
|
+
* - declared connector matched by token in the same channel under a
|
|
554
|
+
* different name → renamed in place (then tokens reconciled)
|
|
555
|
+
* - declared connector with no match → added
|
|
556
|
+
* - any connector left in the channel that the spec did not touch → removed
|
|
557
|
+
*
|
|
558
|
+
* Removal only fires when funnel.json has a `connectors` field. An absent
|
|
559
|
+
* field means "do not manage connectors from here" and leaves everything in
|
|
560
|
+
* `~/.funnel` alone.
|
|
561
|
+
*/
|
|
562
|
+
declare class FunnelLocalConfigSync {
|
|
563
|
+
private readonly channels;
|
|
564
|
+
private readonly dotenv;
|
|
565
|
+
private readonly prompter;
|
|
566
|
+
private readonly env;
|
|
567
|
+
constructor(deps: Deps$9);
|
|
568
|
+
ensure(local: LocalConfig, cwd: string): Promise<void>;
|
|
569
|
+
private ensureConnector;
|
|
570
|
+
private ensureSlack;
|
|
571
|
+
private ensureDiscord;
|
|
572
|
+
private ensureGh;
|
|
573
|
+
private ensureSchedule;
|
|
574
|
+
private findExistingSlack;
|
|
575
|
+
private findExistingDiscord;
|
|
576
|
+
private findSlackByToken;
|
|
577
|
+
private findDiscordByToken;
|
|
578
|
+
private removeExtras;
|
|
579
|
+
private resolveField;
|
|
580
|
+
}
|
|
581
|
+
//#endregion
|
|
426
582
|
//#region lib/engine/profiles/profiles.d.ts
|
|
427
583
|
type Deps$8 = {
|
|
428
584
|
store: FunnelSettingsReader;
|
|
@@ -501,62 +657,6 @@ declare class FunnelChannelPublisher {
|
|
|
501
657
|
private authHeaders;
|
|
502
658
|
}
|
|
503
659
|
//#endregion
|
|
504
|
-
//#region lib/gateway/gateway.d.ts
|
|
505
|
-
type Deps$6 = {
|
|
506
|
-
process?: FunnelProcessRunner;
|
|
507
|
-
fs?: FunnelFileSystem;
|
|
508
|
-
clock?: FunnelClock;
|
|
509
|
-
dir?: string;
|
|
510
|
-
tmpDir?: string;
|
|
511
|
-
port?: number;
|
|
512
|
-
sleep?: (ms: number) => Promise<void>;
|
|
513
|
-
};
|
|
514
|
-
/**
|
|
515
|
-
* Manages the gateway daemon as a separate process via PID file.
|
|
516
|
-
* Use `start()` to spawn `bun daemon.ts` in the background and `stop()` to
|
|
517
|
-
* terminate it. For an in-process gateway, use `Funnel.gatewayServer` instead.
|
|
518
|
-
*/
|
|
519
|
-
declare class FunnelGateway {
|
|
520
|
-
private readonly process;
|
|
521
|
-
private readonly fs;
|
|
522
|
-
private readonly clock;
|
|
523
|
-
private readonly pidFile;
|
|
524
|
-
private readonly logDir;
|
|
525
|
-
private readonly gatewayLog;
|
|
526
|
-
private readonly tmpDir;
|
|
527
|
-
private readonly port;
|
|
528
|
-
private readonly sleep;
|
|
529
|
-
constructor(deps?: Deps$6);
|
|
530
|
-
isRunning(): boolean;
|
|
531
|
-
getStatus(): {
|
|
532
|
-
running: boolean;
|
|
533
|
-
pid: number | null;
|
|
534
|
-
port: number;
|
|
535
|
-
};
|
|
536
|
-
start(options?: {
|
|
537
|
-
caffeinate?: boolean;
|
|
538
|
-
}): Promise<boolean>;
|
|
539
|
-
buildStartCommand(gatewayScript: string, options?: {
|
|
540
|
-
caffeinate?: boolean;
|
|
541
|
-
}): string;
|
|
542
|
-
stop(): Promise<boolean>;
|
|
543
|
-
restart(options?: {
|
|
544
|
-
onlyIfRunning?: boolean;
|
|
545
|
-
caffeinate?: boolean;
|
|
546
|
-
}): Promise<{
|
|
547
|
-
ok: boolean;
|
|
548
|
-
wasRunning: boolean;
|
|
549
|
-
stopped: boolean;
|
|
550
|
-
started: boolean;
|
|
551
|
-
}>;
|
|
552
|
-
getLogDir(): string;
|
|
553
|
-
getGatewayLog(): string;
|
|
554
|
-
getPort(): number;
|
|
555
|
-
private readPid;
|
|
556
|
-
private removePid;
|
|
557
|
-
private isProcessAlive;
|
|
558
|
-
}
|
|
559
|
-
//#endregion
|
|
560
660
|
//#region lib/gateway/broadcaster.d.ts
|
|
561
661
|
type ClientData = {
|
|
562
662
|
/** Stable channel id (uuid) that the WS client subscribed to. */channel: string; /** Human-facing channel name resolved at upgrade time, kept for log readability. */
|
|
@@ -582,7 +682,7 @@ type BroadcastSubscriber = (event: ReplayableEvent) => void;
|
|
|
582
682
|
type ReplaySource = {
|
|
583
683
|
loadSince(since: number): ReplayableEvent[];
|
|
584
684
|
};
|
|
585
|
-
type Deps$
|
|
685
|
+
type Deps$6 = {
|
|
586
686
|
logger?: FunnelLogger;
|
|
587
687
|
maxBufferedBytes?: number;
|
|
588
688
|
now?: () => number; /** Number of recent events kept in the in-memory replay buffer. */
|
|
@@ -633,7 +733,7 @@ declare class FunnelBroadcaster {
|
|
|
633
733
|
private droppedSlowClients;
|
|
634
734
|
private lastBroadcastAt;
|
|
635
735
|
private latestOffset;
|
|
636
|
-
constructor(deps?: Deps$
|
|
736
|
+
constructor(deps?: Deps$6);
|
|
637
737
|
getMetrics(): BroadcasterMetrics;
|
|
638
738
|
/**
|
|
639
739
|
* Returns events with offset > since, filtered by the connector subscription
|
|
@@ -669,82 +769,6 @@ declare class FunnelBroadcaster {
|
|
|
669
769
|
seedLatestOffset(offset: number): void;
|
|
670
770
|
}
|
|
671
771
|
//#endregion
|
|
672
|
-
//#region lib/gateway/funnel-event-store.d.ts
|
|
673
|
-
/**
|
|
674
|
-
* Replayable event payload persisted by the gateway. Domain events the
|
|
675
|
-
* broadcaster emits to WS clients land here so reconnects across daemon
|
|
676
|
-
* restarts can be served from disk. System events (gateway start, channel
|
|
677
|
-
* connected, etc.) are routed to `FunnelLogger` instead — they never go
|
|
678
|
-
* through this store, which keeps the seq space clean for replay.
|
|
679
|
-
*/
|
|
680
|
-
declare const funnelEventSchema: z.ZodObject<{
|
|
681
|
-
type: z.ZodString;
|
|
682
|
-
content: z.ZodString;
|
|
683
|
-
channel_id: z.ZodNullable<z.ZodString>;
|
|
684
|
-
connector_id: z.ZodNullable<z.ZodString>;
|
|
685
|
-
meta: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
686
|
-
}, z.core.$strip>;
|
|
687
|
-
type FunnelEvent = z.infer<typeof funnelEventSchema>;
|
|
688
|
-
type Props$5 = {
|
|
689
|
-
/** SQLite database file path. Created on first write. ":memory:" for tests. */path: string; /** Override for tests. Defaults to `Date.now`. */
|
|
690
|
-
now?: () => number; /** Optional row cap. Pruned on every insert. */
|
|
691
|
-
maxRows?: number; /** Optional age cap in ms. Pruned on every insert. */
|
|
692
|
-
maxAgeMs?: number;
|
|
693
|
-
};
|
|
694
|
-
/**
|
|
695
|
-
* SQLite-backed event store. One indexed table holds every broadcaster
|
|
696
|
-
* event with `channel_id` and `connector_id` as dedicated columns, so
|
|
697
|
-
* per-channel and per-connector replay is an indexed range scan.
|
|
698
|
-
*
|
|
699
|
-
* Concurrency: `seq` is `INTEGER PRIMARY KEY`, so SQLite assigns it
|
|
700
|
-
* atomically. The broadcaster owns its own offset counter at runtime
|
|
701
|
-
* (seeded from `findMaxOffset()` at startup); each broadcaster event
|
|
702
|
-
* flows in here via `record()` with that pre-assigned offset, which the
|
|
703
|
-
* sink stores via `write()` — PK uniqueness catches double-emit bugs.
|
|
704
|
-
*
|
|
705
|
-
* System events (gateway lifecycle, channel connect/disconnect, etc.) do
|
|
706
|
-
* NOT go through this store. They are diagnostic only and live in
|
|
707
|
-
* `FunnelLogger`'s file so the seq space here stays exclusive to
|
|
708
|
-
* broadcaster traffic. This is what makes the broadcaster's seq seeding
|
|
709
|
-
* (`getMaxSeq()` at startup) correct without per-event coordination.
|
|
710
|
-
*/
|
|
711
|
-
declare class FunnelEventStore {
|
|
712
|
-
private readonly sink;
|
|
713
|
-
private readonly now;
|
|
714
|
-
constructor(props: Props$5);
|
|
715
|
-
/**
|
|
716
|
-
* Persist a broadcaster-driven event with its assigned offset. Caller
|
|
717
|
-
* (the gateway-server) supplies the offset from `broadcaster.broadcast()`
|
|
718
|
-
* so this store and the broadcaster's in-memory ring stay aligned.
|
|
719
|
-
*/
|
|
720
|
-
record(props: {
|
|
721
|
-
content: string;
|
|
722
|
-
channelId: string | null;
|
|
723
|
-
connectorId: string | null;
|
|
724
|
-
meta: Record<string, string> | null;
|
|
725
|
-
offset: number;
|
|
726
|
-
}): void;
|
|
727
|
-
/**
|
|
728
|
-
* Returns events with offset > since. Filtering by channel/connector is
|
|
729
|
-
* the broadcaster's responsibility (it knows the client's subscription),
|
|
730
|
-
* so this returns the full slice and lets the caller filter.
|
|
731
|
-
*/
|
|
732
|
-
loadSince(since: number): ReplayableEvent[];
|
|
733
|
-
/**
|
|
734
|
-
* Returns events for one channel (and optionally one connector). Used
|
|
735
|
-
* by the gateway logs CLI for scoped queries. Channel/connector filters
|
|
736
|
-
* are indexed columns, so this is an indexed range scan.
|
|
737
|
-
*/
|
|
738
|
-
loadForChannel(props: {
|
|
739
|
-
channelId: string;
|
|
740
|
-
connectorId?: string;
|
|
741
|
-
sinceSeq?: number;
|
|
742
|
-
limit?: number;
|
|
743
|
-
}): ReplayableEvent[];
|
|
744
|
-
findMaxOffset(): number;
|
|
745
|
-
close(): void;
|
|
746
|
-
}
|
|
747
|
-
//#endregion
|
|
748
772
|
//#region lib/gateway/listener-supervisor.d.ts
|
|
749
773
|
type ConnectorRegistry = {
|
|
750
774
|
listAllConnectors(): ChannelConnectorView[];
|
|
@@ -755,7 +779,7 @@ type ConnectorRegistry = {
|
|
|
755
779
|
} | null;
|
|
756
780
|
};
|
|
757
781
|
type SupervisorNotify = (channelName: string, connectorName: string, content: string, meta?: Record<string, string>) => Promise<void>;
|
|
758
|
-
type Deps$
|
|
782
|
+
type Deps$5 = {
|
|
759
783
|
channels: ConnectorRegistry;
|
|
760
784
|
notify: SupervisorNotify;
|
|
761
785
|
logger?: FunnelLogger;
|
|
@@ -800,7 +824,7 @@ declare class FunnelListenerSupervisor {
|
|
|
800
824
|
private readonly now;
|
|
801
825
|
private healthCheckTimer;
|
|
802
826
|
private healthCheckInFlight;
|
|
803
|
-
constructor(deps: Deps$
|
|
827
|
+
constructor(deps: Deps$5);
|
|
804
828
|
static keyOf(channelName: string, connectorName: string): string;
|
|
805
829
|
isRunning(channelName: string, connectorName: string): boolean;
|
|
806
830
|
list(): ListenerEntryStatus[];
|
|
@@ -827,6 +851,164 @@ declare class FunnelListenerSupervisor {
|
|
|
827
851
|
private recoverDead;
|
|
828
852
|
}
|
|
829
853
|
//#endregion
|
|
854
|
+
//#region lib/gateway/routes/route-deps.d.ts
|
|
855
|
+
type GatewayEmitInput = {
|
|
856
|
+
channel: string;
|
|
857
|
+
connector?: string;
|
|
858
|
+
content: string;
|
|
859
|
+
meta?: Record<string, string>;
|
|
860
|
+
};
|
|
861
|
+
type GatewayRouteDeps = {
|
|
862
|
+
selfPid: number;
|
|
863
|
+
broadcaster: FunnelBroadcaster;
|
|
864
|
+
supervisor: FunnelListenerSupervisor;
|
|
865
|
+
channels: FunnelChannels;
|
|
866
|
+
uptimeMs: () => number;
|
|
867
|
+
emit: (input: GatewayEmitInput) => {
|
|
868
|
+
offset: number;
|
|
869
|
+
};
|
|
870
|
+
};
|
|
871
|
+
//#endregion
|
|
872
|
+
//#region lib/gateway/factory.d.ts
|
|
873
|
+
type Env$1 = {
|
|
874
|
+
Variables: {
|
|
875
|
+
deps: GatewayRouteDeps;
|
|
876
|
+
};
|
|
877
|
+
};
|
|
878
|
+
//#endregion
|
|
879
|
+
//#region lib/gateway/gateway.d.ts
|
|
880
|
+
type Deps$4 = {
|
|
881
|
+
process?: FunnelProcessRunner;
|
|
882
|
+
fs?: FunnelFileSystem;
|
|
883
|
+
clock?: FunnelClock;
|
|
884
|
+
dir?: string;
|
|
885
|
+
tmpDir?: string;
|
|
886
|
+
port?: number;
|
|
887
|
+
sleep?: (ms: number) => Promise<void>;
|
|
888
|
+
};
|
|
889
|
+
/**
|
|
890
|
+
* Manages the gateway daemon as a separate process via PID file.
|
|
891
|
+
* Use `start()` to spawn `bun daemon.ts` in the background and `stop()` to
|
|
892
|
+
* terminate it. For an in-process gateway, use `Funnel.gatewayServer` instead.
|
|
893
|
+
*/
|
|
894
|
+
declare class FunnelGateway {
|
|
895
|
+
private readonly process;
|
|
896
|
+
private readonly fs;
|
|
897
|
+
private readonly clock;
|
|
898
|
+
private readonly dir;
|
|
899
|
+
private readonly pidFile;
|
|
900
|
+
private readonly logDir;
|
|
901
|
+
private readonly gatewayLog;
|
|
902
|
+
private readonly tmpDir;
|
|
903
|
+
private readonly port;
|
|
904
|
+
private readonly sleep;
|
|
905
|
+
constructor(deps?: Deps$4);
|
|
906
|
+
isRunning(): boolean;
|
|
907
|
+
getStatus(): {
|
|
908
|
+
running: boolean;
|
|
909
|
+
pid: number | null;
|
|
910
|
+
port: number;
|
|
911
|
+
};
|
|
912
|
+
start(options?: {
|
|
913
|
+
caffeinate?: boolean;
|
|
914
|
+
}): Promise<boolean>;
|
|
915
|
+
buildStartCommand(gatewayScript: string, options?: {
|
|
916
|
+
caffeinate?: boolean;
|
|
917
|
+
}): string;
|
|
918
|
+
stop(): Promise<boolean>;
|
|
919
|
+
restart(options?: {
|
|
920
|
+
onlyIfRunning?: boolean;
|
|
921
|
+
caffeinate?: boolean;
|
|
922
|
+
}): Promise<{
|
|
923
|
+
ok: boolean;
|
|
924
|
+
wasRunning: boolean;
|
|
925
|
+
stopped: boolean;
|
|
926
|
+
started: boolean;
|
|
927
|
+
}>;
|
|
928
|
+
getLogDir(): string;
|
|
929
|
+
getGatewayLog(): string;
|
|
930
|
+
getPort(): number;
|
|
931
|
+
private readPid;
|
|
932
|
+
private removePid;
|
|
933
|
+
private isProcessAlive;
|
|
934
|
+
}
|
|
935
|
+
//#endregion
|
|
936
|
+
//#region lib/gateway/funnel-event-store.d.ts
|
|
937
|
+
/**
|
|
938
|
+
* Replayable event payload persisted by the gateway. Domain events the
|
|
939
|
+
* broadcaster emits to WS clients land here so reconnects across daemon
|
|
940
|
+
* restarts can be served from disk. System events (gateway start, channel
|
|
941
|
+
* connected, etc.) are routed to `FunnelLogger` instead — they never go
|
|
942
|
+
* through this store, which keeps the seq space clean for replay.
|
|
943
|
+
*/
|
|
944
|
+
declare const funnelEventSchema: z.ZodObject<{
|
|
945
|
+
type: z.ZodString;
|
|
946
|
+
content: z.ZodString;
|
|
947
|
+
channel_id: z.ZodNullable<z.ZodString>;
|
|
948
|
+
connector_id: z.ZodNullable<z.ZodString>;
|
|
949
|
+
meta: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
950
|
+
}, z.core.$strip>;
|
|
951
|
+
type FunnelEvent = z.infer<typeof funnelEventSchema>;
|
|
952
|
+
type Props$6 = {
|
|
953
|
+
/** SQLite database file path. Created on first write. ":memory:" for tests. */path: string; /** Override for tests. Defaults to `Date.now`. */
|
|
954
|
+
now?: () => number; /** Optional row cap. Pruned on every insert. */
|
|
955
|
+
maxRows?: number; /** Optional age cap in ms. Pruned on every insert. */
|
|
956
|
+
maxAgeMs?: number;
|
|
957
|
+
};
|
|
958
|
+
/**
|
|
959
|
+
* SQLite-backed event store. One indexed table holds every broadcaster
|
|
960
|
+
* event with `channel_id` and `connector_id` as dedicated columns, so
|
|
961
|
+
* per-channel and per-connector replay is an indexed range scan.
|
|
962
|
+
*
|
|
963
|
+
* Concurrency: `seq` is `INTEGER PRIMARY KEY`, so SQLite assigns it
|
|
964
|
+
* atomically. The broadcaster owns its own offset counter at runtime
|
|
965
|
+
* (seeded from `findMaxOffset()` at startup); each broadcaster event
|
|
966
|
+
* flows in here via `record()` with that pre-assigned offset, which the
|
|
967
|
+
* sink stores via `write()` — PK uniqueness catches double-emit bugs.
|
|
968
|
+
*
|
|
969
|
+
* System events (gateway lifecycle, channel connect/disconnect, etc.) do
|
|
970
|
+
* NOT go through this store. They are diagnostic only and live in
|
|
971
|
+
* `FunnelLogger`'s file so the seq space here stays exclusive to
|
|
972
|
+
* broadcaster traffic. This is what makes the broadcaster's seq seeding
|
|
973
|
+
* (`getMaxSeq()` at startup) correct without per-event coordination.
|
|
974
|
+
*/
|
|
975
|
+
declare class FunnelEventStore {
|
|
976
|
+
private readonly sink;
|
|
977
|
+
private readonly now;
|
|
978
|
+
constructor(props: Props$6);
|
|
979
|
+
/**
|
|
980
|
+
* Persist a broadcaster-driven event with its assigned offset. Caller
|
|
981
|
+
* (the gateway-server) supplies the offset from `broadcaster.broadcast()`
|
|
982
|
+
* so this store and the broadcaster's in-memory ring stay aligned.
|
|
983
|
+
*/
|
|
984
|
+
record(props: {
|
|
985
|
+
content: string;
|
|
986
|
+
channelId: string | null;
|
|
987
|
+
connectorId: string | null;
|
|
988
|
+
meta: Record<string, string> | null;
|
|
989
|
+
offset: number;
|
|
990
|
+
}): void;
|
|
991
|
+
/**
|
|
992
|
+
* Returns events with offset > since. Filtering by channel/connector is
|
|
993
|
+
* the broadcaster's responsibility (it knows the client's subscription),
|
|
994
|
+
* so this returns the full slice and lets the caller filter.
|
|
995
|
+
*/
|
|
996
|
+
loadSince(since: number): ReplayableEvent[];
|
|
997
|
+
/**
|
|
998
|
+
* Returns events for one channel (and optionally one connector). Used
|
|
999
|
+
* by the gateway logs CLI for scoped queries. Channel/connector filters
|
|
1000
|
+
* are indexed columns, so this is an indexed range scan.
|
|
1001
|
+
*/
|
|
1002
|
+
loadForChannel(props: {
|
|
1003
|
+
channelId: string;
|
|
1004
|
+
connectorId?: string;
|
|
1005
|
+
sinceSeq?: number;
|
|
1006
|
+
limit?: number;
|
|
1007
|
+
}): ReplayableEvent[];
|
|
1008
|
+
findMaxOffset(): number;
|
|
1009
|
+
close(): void;
|
|
1010
|
+
}
|
|
1011
|
+
//#endregion
|
|
830
1012
|
//#region lib/gateway/gateway-server.d.ts
|
|
831
1013
|
type Deps$3 = {
|
|
832
1014
|
channels: FunnelChannels;
|
|
@@ -836,9 +1018,17 @@ type Deps$3 = {
|
|
|
836
1018
|
process?: FunnelProcessRunner;
|
|
837
1019
|
clock?: FunnelClock;
|
|
838
1020
|
logger?: FunnelLogger;
|
|
839
|
-
selfPid?: number;
|
|
1021
|
+
selfPid?: number; /** Funnel home dir, used to scope kill-competing to daemons rooted at the same dir. Defaults to FUNNEL_DIR. */
|
|
1022
|
+
dir?: string;
|
|
840
1023
|
killCompetingSlack?: boolean; /** Bearer token required for `/listeners*`, `/status`, and `/ws`. Empty string disables auth (tests only). */
|
|
841
1024
|
token?: string;
|
|
1025
|
+
/**
|
|
1026
|
+
* Additional hono app mounted before the built-in gateway routes.
|
|
1027
|
+
* Use to embed host-specific endpoints (e.g. an MCP route, custom `/api/*`).
|
|
1028
|
+
* Host routes are mounted first; built-in `/listeners`, `/status`,
|
|
1029
|
+
* `/channels`, `/health` are mounted after and take precedence on conflict.
|
|
1030
|
+
*/
|
|
1031
|
+
extraRoutes?: Hono<Env$1>;
|
|
842
1032
|
};
|
|
843
1033
|
type WsData = {
|
|
844
1034
|
/** Stable channel id (uuid) the client subscribed to. "" for tap-all clients. */channel: string; /** Resolved channel name (for log readability). null for tap-all or unknown. */
|
|
@@ -866,12 +1056,14 @@ declare class FunnelGatewayServer {
|
|
|
866
1056
|
private readonly process?;
|
|
867
1057
|
private readonly logger;
|
|
868
1058
|
private readonly selfPid;
|
|
1059
|
+
private readonly dir;
|
|
869
1060
|
private readonly killCompetingSlack;
|
|
870
1061
|
private readonly token;
|
|
871
1062
|
private readonly broadcaster;
|
|
872
1063
|
private readonly eventStore;
|
|
873
1064
|
private readonly supervisor;
|
|
874
1065
|
private readonly nowMs;
|
|
1066
|
+
private readonly extraRoutes;
|
|
875
1067
|
private startedAt;
|
|
876
1068
|
private server;
|
|
877
1069
|
constructor(deps: Deps$3);
|
|
@@ -1006,15 +1198,27 @@ declare class FunnelListenersClient {
|
|
|
1006
1198
|
}
|
|
1007
1199
|
//#endregion
|
|
1008
1200
|
//#region lib/funnel.d.ts
|
|
1009
|
-
type Props$
|
|
1201
|
+
type Props$5 = {
|
|
1010
1202
|
/** Settings persistence (channels with nested connectors / profiles). Defaults to a FunnelSettingsStore rooted at `dir`. */store?: FunnelSettingsReader; /** Filesystem boundary. Replace with MemoryFunnelFileSystem to sandbox all disk I/O. */
|
|
1011
1203
|
fs?: FunnelFileSystem; /** Process runner used by gateway / claude / gh listener. Replace with MemoryFunnelProcessRunner for tests. */
|
|
1012
1204
|
process?: FunnelProcessRunner; /** Logger flowed into every facet. Replace with MemoryFunnelLogger or NoopFunnelLogger to silence/inspect. */
|
|
1013
1205
|
logger?: FunnelLogger; /** Clock used by schedule listener, gh poll watermarks, and gateway timeouts. */
|
|
1014
1206
|
clock?: FunnelClock; /** ID generator for channel and connector ids. Use MemoryFunnelIdGenerator for deterministic tests. */
|
|
1015
|
-
idGenerator?: FunnelIdGenerator; /**
|
|
1207
|
+
idGenerator?: FunnelIdGenerator; /** Prompter used by FunnelLocalConfigSync when funnel.json omits a token. Defaults to a TTY-only stdin prompter. */
|
|
1208
|
+
tokenPrompter?: FunnelTokenPrompter; /** Funnel home directory (settings.json + per-channel/per-connector dirs). Defaults to ~/.funnel. */
|
|
1016
1209
|
dir?: string; /** Temp / runtime directory (gateway logs and PID adjacent files). Defaults to /tmp/funnel. */
|
|
1017
1210
|
tmpDir?: string;
|
|
1211
|
+
/**
|
|
1212
|
+
* Host integration hooks for Slack listeners — `onAppCreated` for attaching
|
|
1213
|
+
* Bolt `app.action` handlers, `preprocessEvent` for transforming/dropping
|
|
1214
|
+
* raw Slack events before the built-in processor sees them.
|
|
1215
|
+
*/
|
|
1216
|
+
slackListenerOptions?: SlackListenerOptions;
|
|
1217
|
+
/**
|
|
1218
|
+
* Host integration hooks for Schedule listeners — `onFired` is invoked after
|
|
1219
|
+
* each successful fire, useful for dropping one-shot entries.
|
|
1220
|
+
*/
|
|
1221
|
+
scheduleListenerOptions?: ScheduleListenerOptions;
|
|
1018
1222
|
};
|
|
1019
1223
|
/**
|
|
1020
1224
|
* Facade exposing every funnel facet as a getter.
|
|
@@ -1037,15 +1241,14 @@ type Props$4 = {
|
|
|
1037
1241
|
*/
|
|
1038
1242
|
declare class Funnel {
|
|
1039
1243
|
private readonly props;
|
|
1040
|
-
private readonly
|
|
1041
|
-
constructor(props?: Props$
|
|
1244
|
+
private readonly memos;
|
|
1245
|
+
constructor(props?: Props$5);
|
|
1042
1246
|
/**
|
|
1043
1247
|
* Sandboxed Funnel wired with in-memory implementations for every IO boundary.
|
|
1044
1248
|
* Touches no real disk, processes, wall-clock time, or UUIDs — safe for tests
|
|
1045
1249
|
* and ad-hoc experiments. Override individual fields by passing them in `props`.
|
|
1046
1250
|
*/
|
|
1047
|
-
static inMemory(props?: Props$
|
|
1048
|
-
private memo;
|
|
1251
|
+
static inMemory(props?: Props$5): Funnel;
|
|
1049
1252
|
/** Resolved on-disk paths the facade will read/write when methods are called. Pure compute, not memoized. */
|
|
1050
1253
|
get paths(): {
|
|
1051
1254
|
dir: string;
|
|
@@ -1070,6 +1273,14 @@ declare class Funnel {
|
|
|
1070
1273
|
get channels(): FunnelChannels;
|
|
1071
1274
|
/** Launch profiles (named presets for `fnl claude`: path + sub-agent + channel id). */
|
|
1072
1275
|
get profiles(): FunnelProfiles;
|
|
1276
|
+
/** Reads `funnel.json` from a cwd. `fnl claude` consults it before falling back to the default profile. */
|
|
1277
|
+
get localConfig(): FunnelLocalConfig;
|
|
1278
|
+
/** Parses `.env.local` from a cwd (used by sync to back $VAR references). */
|
|
1279
|
+
get dotenv(): FunnelDotenvReader;
|
|
1280
|
+
/** Secret prompter. Defaults to a TTY-only stdin reader; tests inject MemoryFunnelTokenPrompter. */
|
|
1281
|
+
get tokenPrompter(): FunnelTokenPrompter;
|
|
1282
|
+
/** Reconciles funnel.json's channel + connectors with `~/.funnel/settings.json` on launch. */
|
|
1283
|
+
get localConfigSync(): FunnelLocalConfigSync;
|
|
1073
1284
|
/** funnel MCP installer (writes/removes `.mcp.json` entries in target repos). */
|
|
1074
1285
|
get mcp(): FunnelMcp;
|
|
1075
1286
|
/** Launch Claude Code with a channel injected via env, MCP installed, gateway ensured. */
|
|
@@ -1100,6 +1311,13 @@ declare class Funnel {
|
|
|
1100
1311
|
logDir?: string;
|
|
1101
1312
|
killCompetingSlack?: boolean; /** Override the auth token. Defaults to the persisted gateway.token. Pass "" to disable auth (tests). */
|
|
1102
1313
|
token?: string;
|
|
1314
|
+
/**
|
|
1315
|
+
* Additional hono app mounted before the built-in gateway routes.
|
|
1316
|
+
* Use to embed host-specific endpoints (e.g. an MCP route, custom `/api/*`).
|
|
1317
|
+
* Host routes are mounted first; built-in `/listeners`, `/status`,
|
|
1318
|
+
* `/channels`, `/health` are mounted after and take precedence on conflict.
|
|
1319
|
+
*/
|
|
1320
|
+
extraRoutes?: Hono<Env$1>;
|
|
1103
1321
|
}): FunnelGatewayServer;
|
|
1104
1322
|
}
|
|
1105
1323
|
//#endregion
|
|
@@ -1112,6 +1330,15 @@ type ChannelServerOptions = {
|
|
|
1112
1330
|
};
|
|
1113
1331
|
declare const startChannelServer: (options?: ChannelServerOptions) => Promise<void>;
|
|
1114
1332
|
//#endregion
|
|
1333
|
+
//#region lib/engine/local-config/local-config-json-schema.d.ts
|
|
1334
|
+
/**
|
|
1335
|
+
* Generates the JSON Schema (draft 2020-12) for `funnel.json`. Useful for
|
|
1336
|
+
* `$schema` references in committed `funnel.json` files so editors can give
|
|
1337
|
+
* autocomplete and validation for channel / subAgent / env / connectors[]
|
|
1338
|
+
* without anyone hand-maintaining a separate schema.
|
|
1339
|
+
*/
|
|
1340
|
+
declare const funnelJsonSchema: () => Record<string, unknown>;
|
|
1341
|
+
//#endregion
|
|
1115
1342
|
//#region lib/engine/settings/settings-store.d.ts
|
|
1116
1343
|
declare const FUNNEL_DIR: string;
|
|
1117
1344
|
declare const SETTINGS_PATH: string;
|
|
@@ -1154,7 +1381,7 @@ declare class NodeFunnelFileSystem extends FunnelFileSystem {
|
|
|
1154
1381
|
}
|
|
1155
1382
|
//#endregion
|
|
1156
1383
|
//#region lib/engine/fs/memory-file-system.d.ts
|
|
1157
|
-
type Props$
|
|
1384
|
+
type Props$4 = {
|
|
1158
1385
|
dirs?: string[];
|
|
1159
1386
|
files?: Record<string, string>;
|
|
1160
1387
|
mtimes?: Record<string, number>;
|
|
@@ -1167,7 +1394,7 @@ declare class MemoryFunnelFileSystem extends FunnelFileSystem {
|
|
|
1167
1394
|
private readonly mtimes;
|
|
1168
1395
|
private readonly modes;
|
|
1169
1396
|
private readonly now;
|
|
1170
|
-
constructor(props?: Props$
|
|
1397
|
+
constructor(props?: Props$4);
|
|
1171
1398
|
existsSync(path: string): boolean;
|
|
1172
1399
|
readFileSync(path: string): string;
|
|
1173
1400
|
writeFileSync(path: string, data: string): void;
|
|
@@ -1239,14 +1466,14 @@ declare class MemoryFunnelProcessRunner extends FunnelProcessRunner {
|
|
|
1239
1466
|
}
|
|
1240
1467
|
//#endregion
|
|
1241
1468
|
//#region lib/engine/logger/node-logger.d.ts
|
|
1242
|
-
type Props$
|
|
1469
|
+
type Props$3 = {
|
|
1243
1470
|
file?: string;
|
|
1244
1471
|
now?: () => Date;
|
|
1245
1472
|
};
|
|
1246
1473
|
declare class NodeFunnelLogger extends FunnelLogger {
|
|
1247
1474
|
readonly file: string;
|
|
1248
1475
|
private readonly now;
|
|
1249
|
-
constructor(props?: Props$
|
|
1476
|
+
constructor(props?: Props$3);
|
|
1250
1477
|
info(message: string, meta?: Record<string, unknown>): void;
|
|
1251
1478
|
warn(message: string, meta?: Record<string, unknown>): void;
|
|
1252
1479
|
error(message: string, meta?: Record<string, unknown>): void;
|
|
@@ -1282,12 +1509,12 @@ declare class NodeFunnelClock extends FunnelClock {
|
|
|
1282
1509
|
}
|
|
1283
1510
|
//#endregion
|
|
1284
1511
|
//#region lib/engine/time/memory-clock.d.ts
|
|
1285
|
-
type Props$
|
|
1512
|
+
type Props$2 = {
|
|
1286
1513
|
start?: Date;
|
|
1287
1514
|
};
|
|
1288
1515
|
declare class MemoryFunnelClock extends FunnelClock {
|
|
1289
1516
|
private current;
|
|
1290
|
-
constructor(props?: Props$
|
|
1517
|
+
constructor(props?: Props$2);
|
|
1291
1518
|
now(): Date;
|
|
1292
1519
|
set(date: Date): void;
|
|
1293
1520
|
advance(ms: number): void;
|
|
@@ -1299,16 +1526,43 @@ declare class NodeFunnelIdGenerator extends FunnelIdGenerator {
|
|
|
1299
1526
|
}
|
|
1300
1527
|
//#endregion
|
|
1301
1528
|
//#region lib/engine/id/memory-id-generator.d.ts
|
|
1302
|
-
type Props = {
|
|
1529
|
+
type Props$1 = {
|
|
1303
1530
|
prefix?: string;
|
|
1304
1531
|
};
|
|
1305
1532
|
declare class MemoryFunnelIdGenerator extends FunnelIdGenerator {
|
|
1306
1533
|
private counter;
|
|
1307
1534
|
private readonly prefix;
|
|
1308
|
-
constructor(props?: Props);
|
|
1535
|
+
constructor(props?: Props$1);
|
|
1309
1536
|
generate(): string;
|
|
1310
1537
|
}
|
|
1311
1538
|
//#endregion
|
|
1539
|
+
//#region lib/engine/token-prompter/node-token-prompter.d.ts
|
|
1540
|
+
/**
|
|
1541
|
+
* Reads a secret from stdin in raw mode. Echoes a `*` per byte so the user
|
|
1542
|
+
* can see progress without exposing the token. Refuses to prompt when stdin
|
|
1543
|
+
* is not a TTY — callers should surface the resulting error with a hint
|
|
1544
|
+
* pointing at the corresponding env var or CLI command.
|
|
1545
|
+
*/
|
|
1546
|
+
declare class NodeFunnelTokenPrompter extends FunnelTokenPrompter {
|
|
1547
|
+
promptSecret(label: string): Promise<string>;
|
|
1548
|
+
private readSecret;
|
|
1549
|
+
}
|
|
1550
|
+
//#endregion
|
|
1551
|
+
//#region lib/engine/token-prompter/memory-token-prompter.d.ts
|
|
1552
|
+
type Props = {
|
|
1553
|
+
answers?: Record<string, string>;
|
|
1554
|
+
};
|
|
1555
|
+
/**
|
|
1556
|
+
* Pre-seeded answers keyed by prompt label. Tests configure the map up front;
|
|
1557
|
+
* unmapped labels throw so the test surfaces unexpected prompts loudly.
|
|
1558
|
+
*/
|
|
1559
|
+
declare class MemoryFunnelTokenPrompter extends FunnelTokenPrompter {
|
|
1560
|
+
private readonly answers;
|
|
1561
|
+
readonly asked: string[];
|
|
1562
|
+
constructor(props?: Props);
|
|
1563
|
+
promptSecret(label: string): Promise<string>;
|
|
1564
|
+
}
|
|
1565
|
+
//#endregion
|
|
1312
1566
|
//#region lib/cli/factory.d.ts
|
|
1313
1567
|
type Env = {
|
|
1314
1568
|
Variables: {
|
|
@@ -1359,7 +1613,7 @@ declare const createCliApp: (funnel: Funnel) => _$hono_hono_base0.HonoBase<Env,
|
|
|
1359
1613
|
channel?: string | undefined;
|
|
1360
1614
|
};
|
|
1361
1615
|
};
|
|
1362
|
-
output: "funnel claude — launch Claude Code\n\nusage:\n funnel claude launch
|
|
1616
|
+
output: "funnel claude — launch Claude Code\n\nusage:\n funnel claude launch using funnel.json in cwd, or the default profile\n funnel claude -p <name> launch a named profile\n funnel claude --profile <name> (long form)\n funnel claude --channel <name> raw launch (no profile, cwd = current dir)\n funnel claude [...] any other argument is forwarded to the claude CLI\n\nresolution order when no --profile / --channel is given:\n 1. ./funnel.json in the current directory\n 2. the default profile (first entry in fnl profiles)\n\nfunnel-specific options (everything else passes through to claude verbatim):\n -p, --profile profile name to launch\n --channel channel name (raw launch, ignored when --profile is given)\n -h, --help show this help\n\nPositional args, unknown short flags (e.g. -c, -r), and claude's own flags\n(--agent, --resume, --model, --print, --output-format ...) are all forwarded.\nOn launch the FUNNEL_CHANNEL_ID env var is set and MCP connects to the gateway.";
|
|
1363
1617
|
outputFormat: "text";
|
|
1364
1618
|
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1365
1619
|
};
|
|
@@ -2579,6 +2833,25 @@ ${string}`;
|
|
|
2579
2833
|
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2580
2834
|
};
|
|
2581
2835
|
};
|
|
2836
|
+
} & {
|
|
2837
|
+
"/schema": {
|
|
2838
|
+
$get: {
|
|
2839
|
+
input: {
|
|
2840
|
+
query: Record<string, never>;
|
|
2841
|
+
};
|
|
2842
|
+
output: string;
|
|
2843
|
+
outputFormat: "text";
|
|
2844
|
+
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2845
|
+
} | {
|
|
2846
|
+
input: {
|
|
2847
|
+
query: Record<string, never>;
|
|
2848
|
+
};
|
|
2849
|
+
output: `${string}
|
|
2850
|
+
`;
|
|
2851
|
+
outputFormat: "text";
|
|
2852
|
+
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2853
|
+
};
|
|
2854
|
+
};
|
|
2582
2855
|
} & {
|
|
2583
2856
|
"/status": {
|
|
2584
2857
|
$get: {
|
|
@@ -2631,7 +2904,7 @@ declare const app: _$hono_hono_base0.HonoBase<Env, {
|
|
|
2631
2904
|
channel?: string | undefined;
|
|
2632
2905
|
};
|
|
2633
2906
|
};
|
|
2634
|
-
output: "funnel claude — launch Claude Code\n\nusage:\n funnel claude launch
|
|
2907
|
+
output: "funnel claude — launch Claude Code\n\nusage:\n funnel claude launch using funnel.json in cwd, or the default profile\n funnel claude -p <name> launch a named profile\n funnel claude --profile <name> (long form)\n funnel claude --channel <name> raw launch (no profile, cwd = current dir)\n funnel claude [...] any other argument is forwarded to the claude CLI\n\nresolution order when no --profile / --channel is given:\n 1. ./funnel.json in the current directory\n 2. the default profile (first entry in fnl profiles)\n\nfunnel-specific options (everything else passes through to claude verbatim):\n -p, --profile profile name to launch\n --channel channel name (raw launch, ignored when --profile is given)\n -h, --help show this help\n\nPositional args, unknown short flags (e.g. -c, -r), and claude's own flags\n(--agent, --resume, --model, --print, --output-format ...) are all forwarded.\nOn launch the FUNNEL_CHANNEL_ID env var is set and MCP connects to the gateway.";
|
|
2635
2908
|
outputFormat: "text";
|
|
2636
2909
|
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2637
2910
|
};
|
|
@@ -3851,6 +4124,25 @@ ${string}`;
|
|
|
3851
4124
|
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3852
4125
|
};
|
|
3853
4126
|
};
|
|
4127
|
+
} & {
|
|
4128
|
+
"/schema": {
|
|
4129
|
+
$get: {
|
|
4130
|
+
input: {
|
|
4131
|
+
query: Record<string, never>;
|
|
4132
|
+
};
|
|
4133
|
+
output: string;
|
|
4134
|
+
outputFormat: "text";
|
|
4135
|
+
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
4136
|
+
} | {
|
|
4137
|
+
input: {
|
|
4138
|
+
query: Record<string, never>;
|
|
4139
|
+
};
|
|
4140
|
+
output: `${string}
|
|
4141
|
+
`;
|
|
4142
|
+
outputFormat: "text";
|
|
4143
|
+
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
4144
|
+
};
|
|
4145
|
+
};
|
|
3854
4146
|
} & {
|
|
3855
4147
|
"/status": {
|
|
3856
4148
|
$get: {
|
|
@@ -3885,4 +4177,4 @@ ${string}`;
|
|
|
3885
4177
|
//#region lib/tui/tui.d.ts
|
|
3886
4178
|
declare function launchTui(funnel: Funnel): Promise<void>;
|
|
3887
4179
|
//#endregion
|
|
3888
|
-
export { AttachOptions, BroadcastEvent, BroadcastSubscriber, ChannelConfig, ChannelConnectorView, ChannelDeliveryMode, ChannelServerOptions, ConnectorConfig, ConnectorType, DEFAULT_GATEWAY_TOKEN_PATH, DetachOptions, DiscordConnectorConfig, Env, FUNNEL_DIR, FUNNEL_MCP_COMMAND, FUNNEL_MCP_NAME, FileStat, Funnel, FunnelBroadcaster, FunnelChannelPublisher, FunnelChannels, FunnelClaude, FunnelClock, FunnelConnectorFactory, FunnelConnectorListener, FunnelEvent, FunnelEventStore, FunnelFileSystem, FunnelGateway, FunnelGatewayServer, FunnelGatewayToken, FunnelIdGenerator, FunnelListenerSupervisor, FunnelListenersClient, FunnelLogger, FunnelMcp, FunnelProcessRunner, FunnelProfiles, FunnelSettingsReader, FunnelSettingsStore, GhConnectorConfig, LaunchOptions, ListListenersResult, ListenerEntry, ListenerOpResult, LogEntry, MemoryFunnelClock, MemoryFunnelFileSystem, MemoryFunnelIdGenerator, MemoryFunnelLogger, MemoryFunnelProcessRunner, MemoryProcessCall, MemoryProcessHandler, MemoryProcessResponse, MemoryProcessSyncHandler, MockFunnelSettingsReader, NodeFunnelClock, NodeFunnelFileSystem, NodeFunnelIdGenerator, NodeFunnelLogger, NodeFunnelProcessRunner, NoopFunnelLogger, NotifyFn, ProfileConfig, PublishRequest, PublishResponse, PublishResult, ReplayableEvent, RunOptions, RunResult, SETTINGS_PATH, SETTINGS_VERSION, ScheduleCatchupPolicy,
|
|
4180
|
+
export { AttachOptions, BroadcastEvent, BroadcastSubscriber, ChannelConfig, ChannelConnectorView, ChannelDeliveryMode, ChannelServerOptions, ConnectorConfig, ConnectorSpec, ConnectorType, DEFAULT_GATEWAY_TOKEN_PATH, DetachOptions, DiscordConnectorConfig, Env, FUNNEL_DIR, FUNNEL_MCP_COMMAND, FUNNEL_MCP_NAME, FileStat, Funnel, FunnelBroadcaster, FunnelChannelPublisher, FunnelChannels, FunnelClaude, FunnelClock, FunnelConnectorFactory, FunnelConnectorListener, FunnelDotenvReader, FunnelEvent, FunnelEventStore, FunnelFileSystem, FunnelGateway, FunnelGatewayServer, FunnelGatewayToken, FunnelIdGenerator, FunnelListenerSupervisor, FunnelListenersClient, FunnelLocalConfig, FunnelLocalConfigSync, FunnelLogger, FunnelMcp, FunnelProcessRunner, FunnelProfiles, FunnelSettingsReader, FunnelSettingsStore, FunnelSlackEventProcessor, FunnelTokenPrompter, GhConnectorConfig, LOCAL_CONFIG_FILENAME, LOCAL_ENV_FILENAME, LaunchOptions, ListListenersResult, ListenerEntry, ListenerOpResult, LocalConfig, LogEntry, MemoryFunnelClock, MemoryFunnelFileSystem, MemoryFunnelIdGenerator, MemoryFunnelLogger, MemoryFunnelProcessRunner, MemoryFunnelTokenPrompter, MemoryProcessCall, MemoryProcessHandler, MemoryProcessResponse, MemoryProcessSyncHandler, MockFunnelSettingsReader, NodeFunnelClock, NodeFunnelFileSystem, NodeFunnelIdGenerator, NodeFunnelLogger, NodeFunnelProcessRunner, NodeFunnelTokenPrompter, NoopFunnelLogger, NotifyFn, ProfileConfig, PublishRequest, PublishResponse, PublishResult, ReplayableEvent, RunOptions, RunResult, SETTINGS_PATH, SETTINGS_VERSION, ScheduleCatchupPolicy, ScheduleConnectorConfig, ScheduleEntry, ScheduleListenerOptions, Settings, SlackConnectorConfig, SlackListenerOptions, SlackProcessed, SlackProcessedEmit, SlackProcessedSkip, SlackRawEvent, channelConfigSchema, channelDeliveryModeSchema, app as cliApp, connectorConfigSchema, connectorSpecSchema, createCliApp, createSettings, discordConnectorSchema, factory, funnelEventSchema, funnelJsonSchema, ghConnectorSchema, launchTui, localConfigSchema, profileConfigSchema, publishRequestSchema, publishResponseSchema, queryToCliArgs, scheduleCatchupPolicySchema, scheduleConnectorSchema, scheduleEntrySchema, settingsSchema, slackConnectorSchema, startChannelServer, toRequest };
|