@interactive-inc/claude-funnel 0.59.0 → 0.60.0
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 +9 -3
- package/dist/bin.js +524 -449
- package/dist/channels-2g_BU1N0.d.ts +174 -0
- package/dist/claude.d.ts +9 -5
- package/dist/claude.js +54 -17
- package/dist/{diagnostic-log-Cb3v8P7p.d.ts → connector-descriptor-6SXJoszo.d.ts} +158 -2
- package/dist/connectors/discord.d.ts +30 -4
- package/dist/connectors/discord.js +2 -2
- package/dist/connectors/gh.d.ts +21 -5
- package/dist/connectors/gh.js +3 -3
- package/dist/connectors/schedule.d.ts +124 -2
- package/dist/connectors/schedule.js +3 -3
- package/dist/connectors/slack.d.ts +149 -5
- package/dist/connectors/slack.js +2 -2
- package/dist/{diagnostic-sql-reader-CzYgZpq2.js → diagnostic-sql-reader-C9zR-Csp.js} +5 -5
- package/dist/diagnostics.d.ts +1 -1
- package/dist/diagnostics.js +1 -1
- package/dist/{discord-listener-CKsZGTnH.js → discord-connector-BL36yvbL.js} +60 -37
- package/dist/docs.d.ts +1 -1
- package/dist/docs.js +1 -1
- package/dist/doctor.d.ts +1 -1
- package/dist/doctor.js +1 -1
- package/dist/error-message-of-Byi4y0Uf.js +9 -0
- package/dist/{file-process-guard-B3IFCj_G.d.ts → file-process-guard-DOlCr4GF.d.ts} +5 -6
- package/dist/{funnel-diagnostics-BpKYrMSu.js → funnel-diagnostics-CSiJmPlZ.js} +19 -2
- package/dist/{funnel-diagnostics-K-wON25Y.d.ts → funnel-diagnostics-DpXOsCty.d.ts} +3 -3
- package/dist/{funnel-docs-ng5K8w4j.js → funnel-docs-BxXZ9Ksx.js} +76 -3
- package/dist/{funnel-docs-DYBs1-H_.d.ts → funnel-docs-CNklHvbt.d.ts} +1 -1
- package/dist/{funnel-doctor-vxO96TCA.d.ts → funnel-doctor-CZf_0Luq.d.ts} +2 -2
- package/dist/{funnel-recovery-COExL9MD.d.ts → funnel-recovery-DnLrdWO9.d.ts} +1 -1
- package/dist/gateway/daemon.js +282 -209
- package/dist/gateway-base-url-Dy4Ykuoh.js +14 -0
- package/dist/gateway.d.ts +2 -2
- package/dist/gateway.js +2 -2
- package/dist/{gh-listener-Dsx6AmhH.js → gh-connector-DpiixfQZ.js} +53 -5
- package/dist/gh-connector-schema-Rzwc1c1N.js +12 -0
- package/dist/http-client-oICicjuO.d.ts +18 -0
- package/dist/index-CgY8NdMz.d.ts +1057 -0
- package/dist/index.d.ts +1558 -17
- package/dist/index.js +383 -342
- package/dist/{local-config-json-schema-DE1zkMcb.js → local-config-json-schema-JyLqOQNX.js} +9 -5
- package/dist/local-config-sync-Dh1Croqe.d.ts +169 -0
- package/dist/local-config.d.ts +2 -2
- package/dist/local-config.js +2 -2
- package/dist/logger.js +1 -1
- package/dist/{memory-diagnostic-log-5LzwJ_F7.js → memory-diagnostic-log-CI60kNfB.js} +33 -18
- package/dist/{memory-token-prompter-BlFwK9k7.d.ts → memory-token-prompter-B4sjyaAq.d.ts} +2 -2
- package/dist/{memory-token-prompter-C7vREzCL.js → memory-token-prompter-CZde7e6y.js} +1 -1
- package/dist/{node-file-system-BcrmWN9I.js → node-file-system-Blr8pAir.js} +1 -1
- package/dist/node-http-client-lowp60Oa.js +25 -0
- package/dist/{gh-connector-schema-DUcZgN2Q.js → node-process-runner-DxTvycoK.js} +35 -13
- package/dist/{profiles-g2qGVOWv.d.ts → profiles-Cy5wXQ0L.d.ts} +3 -3
- package/dist/{profiles-MnXvYfZF.js → profiles-DSzTeKQw.js} +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/profiles.js +1 -1
- package/dist/recovery.d.ts +1 -1
- package/dist/recovery.js +1 -1
- package/dist/{schedule-listener-DP9Jhc6U.js → schedule-connector-L4uzg5M8.js} +109 -9
- package/dist/{settings-reader-DPwqOVUm.d.ts → settings-reader-BIFB_j2f.d.ts} +1 -1
- package/dist/settings-schema-D1xcOqRu.d.ts +78 -0
- package/dist/{gateway-base-url-6foMXfFf.js → settings-store-CUKSeTXC.js} +27 -29
- package/dist/{slack-listener-C4wlZaOq.js → slack-connector-DQIFPdBF.js} +67 -12
- package/dist/slot-fields-CMoRpwuy.js +45 -0
- package/dist/{yaml-render-C9Hhjk-0.js → yaml-render-qW34NlYz.js} +43 -10
- package/package.json +1 -1
- package/dist/connector-adapter-DGacCppE.d.ts +0 -25
- package/dist/discord-connector-schema-CQyfDkLD.d.ts +0 -39
- package/dist/gh-connector-schema-CZzwzvqY.d.ts +0 -14
- package/dist/index-Conbxl5O.d.ts +0 -3595
- package/dist/local-config-sync--f739oCJ.d.ts +0 -401
- package/dist/process-runner-Cx5O_fTf.d.ts +0 -49
- package/dist/resolve-connector-token-CczqG_Ig.js +0 -22
- package/dist/schedule-listener-DoMPjHZj.d.ts +0 -112
- package/dist/settings-schema-1hh11jnN.d.ts +0 -152
- package/dist/slack-listener-Dj9NFbAJ.d.ts +0 -136
- /package/dist/{connector-adapter-qwXLjQId.js → connector-adapter-DU9Rvyec.js} +0 -0
- /package/dist/{connector-listener-CpHBecCj.js → connector-listener-DR3aKOuK.js} +0 -0
- /package/dist/{file-system-PWKKU7lA.js → file-system-Wvzc2ePY.js} +0 -0
- /package/dist/{file-system-DxpnnUVb.d.ts → file-system-o51IsM0W.d.ts} +0 -0
- /package/dist/{funnel-doctor-CApCezTq.js → funnel-doctor-DiJCjHsg.js} +0 -0
- /package/dist/{funnel-log-sqlite-sink-B_5_4ybn.js → funnel-log-sqlite-sink-kqJbx2H7.js} +0 -0
- /package/dist/{funnel-recovery-D9CxD5Zs.js → funnel-recovery-BFdPjL6Z.js} +0 -0
- /package/dist/{logger-BP6SisKt.js → logger-B6iyNbxM.js} +0 -0
- /package/dist/{schedule-connector-schema-B_xO5z5B.js → schedule-connector-schema-CfyuMCMh.js} +0 -0
- /package/dist/{settings-reader-DPqrpV7s.js → settings-reader-CtQ-Ix8_.js} +0 -0
package/dist/index-Conbxl5O.d.ts
DELETED
|
@@ -1,3595 +0,0 @@
|
|
|
1
|
-
import { a as Settings } from "./settings-schema-1hh11jnN.js";
|
|
2
|
-
import { n as FunnelClaude, t as FileProcessGuard } from "./file-process-guard-B3IFCj_G.js";
|
|
3
|
-
import { n as FunnelIdGenerator, t as FunnelSettingsReader } from "./settings-reader-DPwqOVUm.js";
|
|
4
|
-
import { S as FunnelLogger, b as FunnelConnectorListener, c as ConnectorProcessedQuery, f as ConnectorRawQuery, g as StoredRawEvent, h as StoredProcessedEvent, i as ConnectorConnectionRecord, l as ConnectorProcessedRecord, m as StoredConnectionEvent, o as ConnectorDiagnosticLog, p as ConnectorRawRecord, r as ConnectorConnectionQuery } from "./diagnostic-log-Cb3v8P7p.js";
|
|
5
|
-
import { a as RunOptions, i as ProcessSnapshot, n as DetachOptions, o as RunResult, r as FunnelProcessRunner, t as AttachOptions } from "./process-runner-Cx5O_fTf.js";
|
|
6
|
-
import { n as FunnelFileSystem, t as FileStat } from "./file-system-DxpnnUVb.js";
|
|
7
|
-
import { t as FunnelProfiles } from "./profiles-g2qGVOWv.js";
|
|
8
|
-
import { a as ChannelConnectorView, d as ConnectorConfig, i as FunnelTokenPrompter, l as ScheduleListenerOptions, m as FunnelLocalConfig, n as FunnelLocalConfigSync, o as FunnelChannels, s as FunnelClock, u as SlackListenerOptions } from "./local-config-sync--f739oCJ.js";
|
|
9
|
-
import { c as FunnelDiagnostics } from "./funnel-diagnostics-K-wON25Y.js";
|
|
10
|
-
import { n as FunnelDocs } from "./funnel-docs-DYBs1-H_.js";
|
|
11
|
-
import { t as FunnelRecovery } from "./funnel-recovery-COExL9MD.js";
|
|
12
|
-
import { r as FunnelDoctor } from "./funnel-doctor-vxO96TCA.js";
|
|
13
|
-
import { a as HttpResponse, i as HttpRequest, r as FunnelHttpClient } from "./discord-connector-schema-CQyfDkLD.js";
|
|
14
|
-
import { hc } from "hono/client";
|
|
15
|
-
import * as _$zod from "zod";
|
|
16
|
-
import { z } from "zod";
|
|
17
|
-
import * as _$hono_factory0 from "hono/factory";
|
|
18
|
-
import { Hono } from "hono";
|
|
19
|
-
import { Server, ServerWebSocket } from "bun";
|
|
20
|
-
import * as _$hono_utils_http_status0 from "hono/utils/http-status";
|
|
21
|
-
import * as _$hono_hono_base0 from "hono/hono-base";
|
|
22
|
-
import * as _$hono_utils_types0 from "hono/utils/types";
|
|
23
|
-
|
|
24
|
-
//#region lib/engine/error/on-funnel-error.d.ts
|
|
25
|
-
/**
|
|
26
|
-
* Host integration hook called when Funnel catches an exception that would
|
|
27
|
-
* otherwise be silently swallowed (subscriber throw, listener start failure,
|
|
28
|
-
* MCP forward failure, etc.). Pass `Sentry.captureException` from the host to
|
|
29
|
-
* pipe these into your error reporter. Defaults to a no-op when omitted.
|
|
30
|
-
*
|
|
31
|
-
* `context` carries the component name and any extra metadata the caller had
|
|
32
|
-
* at the catch site (channel / connector / subscriber id when available).
|
|
33
|
-
*/
|
|
34
|
-
type OnFunnelError = (error: Error, context?: Record<string, unknown>) => void;
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region lib/gateway/broadcaster.d.ts
|
|
37
|
-
type ClientData = {
|
|
38
|
-
/** Stable channel id (uuid) that the WS client subscribed to. */channel: string; /** Human-facing channel name resolved at upgrade time, kept for log readability. */
|
|
39
|
-
channelName?: string | null; /** Connector names belonging to that channel. */
|
|
40
|
-
connectors: string[]; /** Routing mode resolved from channel config at upgrade time. Defaults to fanout. */
|
|
41
|
-
delivery?: "fanout" | "exclusive";
|
|
42
|
-
/**
|
|
43
|
-
* Opaque per-client id declared at upgrade time (`?id=<subscriberId>`). When an
|
|
44
|
-
* event carries `meta.target`, only the client whose `subscriberId` equals it
|
|
45
|
-
* receives the event among that channel's regular subscribers. Targeted delivery
|
|
46
|
-
* is how a publisher addresses one specific instance (e.g. a single agent
|
|
47
|
-
* session) without every subscriber having to receive and discard it.
|
|
48
|
-
*/
|
|
49
|
-
subscriberId?: string;
|
|
50
|
-
};
|
|
51
|
-
type BroadcastEvent = {
|
|
52
|
-
content: string;
|
|
53
|
-
meta?: Record<string, string>;
|
|
54
|
-
};
|
|
55
|
-
type ReplayableEvent = BroadcastEvent & {
|
|
56
|
-
offset: number;
|
|
57
|
-
};
|
|
58
|
-
type BroadcastSubscriber = (event: ReplayableEvent) => void;
|
|
59
|
-
/**
|
|
60
|
-
* Optional persistent replay source. Wired in by the gateway-server with a
|
|
61
|
-
* `FunnelEventLog` (SQLite-backed by default) so reconnects across daemon
|
|
62
|
-
* restarts can recover events older than the in-memory buffer via an indexed
|
|
63
|
-
* `seq > since` range scan.
|
|
64
|
-
*/
|
|
65
|
-
type ReplaySource = {
|
|
66
|
-
loadSince(since: number): ReplayableEvent[];
|
|
67
|
-
};
|
|
68
|
-
type Deps$8 = {
|
|
69
|
-
logger?: FunnelLogger; /** Host hook for surfacing subscriber-throw exceptions. Defaults to no-op. */
|
|
70
|
-
onError?: OnFunnelError;
|
|
71
|
-
maxBufferedBytes?: number;
|
|
72
|
-
now?: () => number; /** Number of recent events kept in the in-memory replay buffer. */
|
|
73
|
-
replayBufferSize?: number; /** Hard byte cap on replay buffer payloads. Older events are evicted FIFO until under this cap. */
|
|
74
|
-
replayBufferMaxBytes?: number; /** Persistent replay source consulted when the in-memory buffer cannot satisfy `since`. */
|
|
75
|
-
persistentReplay?: ReplaySource;
|
|
76
|
-
};
|
|
77
|
-
type BroadcasterMetrics = {
|
|
78
|
-
clients: number;
|
|
79
|
-
subscribers: number;
|
|
80
|
-
eventsBroadcast: number;
|
|
81
|
-
droppedSlowClients: number;
|
|
82
|
-
lastBroadcastAt: string | null; /** Latest emitted offset. Clients can `?since=<offset>` to ask for events strictly after this point. */
|
|
83
|
-
latestOffset: number; /** Oldest offset still held in the replay buffer. Older values cannot be replayed and trigger a full resync. */
|
|
84
|
-
oldestReplayableOffset: number | null;
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* In-process pub/sub for connector events.
|
|
88
|
-
*
|
|
89
|
-
* Two outbound paths:
|
|
90
|
-
* - WS clients connected via the gateway's `/ws` endpoint, scoped per channel
|
|
91
|
-
* - In-process subscribers registered via `subscribe()` (programmable API)
|
|
92
|
-
*
|
|
93
|
-
* Backpressure: if a WS client's `bufferedAmount` exceeds `maxBufferedBytes`
|
|
94
|
-
* (default 1 MiB), the client is closed with code 1009 and dropped from the
|
|
95
|
-
* registry to keep one slow consumer from blocking the daemon.
|
|
96
|
-
*
|
|
97
|
-
* Replay: every emitted event gets a strictly increasing `offset`. The latest
|
|
98
|
-
* `replayBufferSize` events are kept in memory; reconnecting WS clients can
|
|
99
|
-
* pass `?since=<offset>` and the broadcaster resends matching events before
|
|
100
|
-
* resuming the live stream. The in-memory ring covers short reconnects;
|
|
101
|
-
* older history is served from the event log wired in as `persistentReplay`.
|
|
102
|
-
*/
|
|
103
|
-
declare class FunnelBroadcaster {
|
|
104
|
-
private readonly clients;
|
|
105
|
-
private readonly subscribers;
|
|
106
|
-
private readonly logger;
|
|
107
|
-
private readonly onError;
|
|
108
|
-
private readonly maxBufferedBytes;
|
|
109
|
-
private readonly now;
|
|
110
|
-
private readonly replayBufferSize;
|
|
111
|
-
private readonly replayBufferMaxBytes;
|
|
112
|
-
private readonly replayBuffer;
|
|
113
|
-
private readonly persistentReplay;
|
|
114
|
-
private readonly exclusiveCursor;
|
|
115
|
-
private replayBufferBytes;
|
|
116
|
-
private eventsBroadcast;
|
|
117
|
-
private droppedSlowClients;
|
|
118
|
-
private lastBroadcastAt;
|
|
119
|
-
private latestOffset;
|
|
120
|
-
constructor(deps?: Deps$8);
|
|
121
|
-
getMetrics(): BroadcasterMetrics;
|
|
122
|
-
/**
|
|
123
|
-
* Returns events with offset > since, filtered by the connector subscription
|
|
124
|
-
* rules of `data`. Used at WS upgrade time when the client passes `?since=<offset>`.
|
|
125
|
-
*
|
|
126
|
-
* Two-tier lookup:
|
|
127
|
-
* 1. The in-memory ring buffer (covers short reconnects, last `replayBufferSize` events).
|
|
128
|
-
* 2. If `since` predates the oldest in-memory entry and a persistent replay source
|
|
129
|
-
* is wired in (SQLite by default), the gap is filled from it. This covers reconnects
|
|
130
|
-
* across daemon restarts where the in-memory buffer was lost.
|
|
131
|
-
*
|
|
132
|
-
* Result is sorted ascending by offset and de-duplicated against the in-memory buffer.
|
|
133
|
-
*/
|
|
134
|
-
replaySince(since: number, data: ClientData): ReplayableEvent[];
|
|
135
|
-
private matchesClient;
|
|
136
|
-
/**
|
|
137
|
-
* Returns the list of WS clients that should receive `event`. For each per-channel group:
|
|
138
|
-
* - fanout → every matching client receives
|
|
139
|
-
* - exclusive → exactly one client receives, picked round-robin per channel
|
|
140
|
-
*
|
|
141
|
-
* `meta.target` narrows the recipient set via `matchesClient`: only the subscriber
|
|
142
|
-
* whose `subscriberId` equals `target` receives a targeted event.
|
|
143
|
-
*/
|
|
144
|
-
private pickRecipients;
|
|
145
|
-
addClient(ws: ServerWebSocket<unknown>, data: ClientData): void;
|
|
146
|
-
removeClient(ws: ServerWebSocket<unknown>): void;
|
|
147
|
-
getClientCount(): number;
|
|
148
|
-
listChannels(): {
|
|
149
|
-
channel: string;
|
|
150
|
-
connectors: string[];
|
|
151
|
-
}[];
|
|
152
|
-
subscribe(handler: BroadcastSubscriber): () => void;
|
|
153
|
-
broadcast(content: string, meta?: Record<string, string>): ReplayableEvent;
|
|
154
|
-
/** Forward-seed the offset counter (used at startup from the persisted event store). */
|
|
155
|
-
seedLatestOffset(offset: number): void;
|
|
156
|
-
}
|
|
157
|
-
//#endregion
|
|
158
|
-
//#region lib/gateway/listener-supervisor.d.ts
|
|
159
|
-
type ConnectorRegistry = {
|
|
160
|
-
listAllConnectors(): ChannelConnectorView[];
|
|
161
|
-
createListener(channelName: string, connectorName: string): {
|
|
162
|
-
config: ConnectorConfig;
|
|
163
|
-
channelId: string;
|
|
164
|
-
listener: FunnelConnectorListener;
|
|
165
|
-
} | null;
|
|
166
|
-
};
|
|
167
|
-
type SupervisorNotify = (channelName: string, connectorName: string, content: string, meta?: Record<string, string>) => Promise<void>;
|
|
168
|
-
type Deps$7 = {
|
|
169
|
-
channels: ConnectorRegistry;
|
|
170
|
-
notify: SupervisorNotify;
|
|
171
|
-
logger?: FunnelLogger; /** Host hook for surfacing listener lifecycle exceptions. Defaults to no-op. */
|
|
172
|
-
onError?: OnFunnelError;
|
|
173
|
-
healthCheckIntervalMs?: number;
|
|
174
|
-
maxBackoffMs?: number;
|
|
175
|
-
/** Per-listener timeout for `start()`. A listener that hangs beyond this is
|
|
176
|
-
* treated as a startup failure — it won't block other listeners or the
|
|
177
|
-
* health-check loop. Defaults to 30 seconds. */
|
|
178
|
-
startTimeoutMs?: number;
|
|
179
|
-
sleep?: (ms: number) => Promise<void>;
|
|
180
|
-
now?: () => number;
|
|
181
|
-
};
|
|
182
|
-
type ListenerEntryStatus = {
|
|
183
|
-
channelName: string;
|
|
184
|
-
channelId: string;
|
|
185
|
-
name: string;
|
|
186
|
-
type: ConnectorConfig["type"];
|
|
187
|
-
alive: boolean;
|
|
188
|
-
events: number;
|
|
189
|
-
errors: number;
|
|
190
|
-
failureCount: number;
|
|
191
|
-
lastEventAt: string | null;
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* Owns the running listener instances and their lifecycle.
|
|
195
|
-
*
|
|
196
|
-
* Lives in the gateway process and is the only place that calls
|
|
197
|
-
* `listener.start()` / `listener.stop()`. Each entry is keyed by
|
|
198
|
-
* `${channelName}/${connectorName}` so the same connector name can exist in
|
|
199
|
-
* multiple channels without colliding.
|
|
200
|
-
*
|
|
201
|
-
* Periodically polls each running listener's `isAlive()` and auto-restarts
|
|
202
|
-
* dead listeners with exponential backoff (1s, 2s, 4s, ... capped). Resets
|
|
203
|
-
* the backoff counter on successful restart.
|
|
204
|
-
*/
|
|
205
|
-
declare class FunnelListenerSupervisor {
|
|
206
|
-
private readonly channels;
|
|
207
|
-
private readonly notify;
|
|
208
|
-
private readonly logger;
|
|
209
|
-
private readonly onError;
|
|
210
|
-
private readonly running;
|
|
211
|
-
private readonly failureCounts;
|
|
212
|
-
private readonly stats;
|
|
213
|
-
private readonly healthCheckIntervalMs;
|
|
214
|
-
private readonly maxBackoffMs;
|
|
215
|
-
private readonly startTimeoutMs;
|
|
216
|
-
private readonly sleep;
|
|
217
|
-
private readonly now;
|
|
218
|
-
private healthCheckTimer;
|
|
219
|
-
private healthCheckInFlight;
|
|
220
|
-
/** Connectors that failed initial start — retried by the health check. */
|
|
221
|
-
private readonly pendingRetry;
|
|
222
|
-
constructor(deps: Deps$7);
|
|
223
|
-
static keyOf(channelName: string, connectorName: string): string;
|
|
224
|
-
isRunning(channelName: string, connectorName: string): boolean;
|
|
225
|
-
list(): ListenerEntryStatus[];
|
|
226
|
-
start(channelName: string, connectorName: string): Promise<{
|
|
227
|
-
ok: boolean;
|
|
228
|
-
reason?: string;
|
|
229
|
-
}>;
|
|
230
|
-
stop(channelName: string, connectorName: string): Promise<{
|
|
231
|
-
ok: boolean;
|
|
232
|
-
reason?: string;
|
|
233
|
-
}>;
|
|
234
|
-
restart(channelName: string, connectorName: string): Promise<{
|
|
235
|
-
ok: boolean;
|
|
236
|
-
reason?: string;
|
|
237
|
-
}>;
|
|
238
|
-
startAll(): Promise<void>;
|
|
239
|
-
stopAll(): Promise<void>;
|
|
240
|
-
private ensureStats;
|
|
241
|
-
private recordEvent;
|
|
242
|
-
private recordError;
|
|
243
|
-
private startHealthCheck;
|
|
244
|
-
private stopHealthCheck;
|
|
245
|
-
/** Run one health-check pass synchronously. Test-only seam. */
|
|
246
|
-
runHealthCheckForTest(): Promise<void>;
|
|
247
|
-
private runHealthCheck;
|
|
248
|
-
private recoverDead;
|
|
249
|
-
}
|
|
250
|
-
//#endregion
|
|
251
|
-
//#region lib/gateway/routes/route-deps.d.ts
|
|
252
|
-
type GatewayEmitInput = {
|
|
253
|
-
channel: string;
|
|
254
|
-
connector?: string;
|
|
255
|
-
content: string;
|
|
256
|
-
meta?: Record<string, string>;
|
|
257
|
-
};
|
|
258
|
-
type GatewayRouteDeps = {
|
|
259
|
-
selfPid: number;
|
|
260
|
-
/** Funnel home dir this daemon is rooted at. Lets a probe tell whether the
|
|
261
|
-
* daemon answering on a shared port belongs to the expected repo/scope. */
|
|
262
|
-
dir: string;
|
|
263
|
-
broadcaster: FunnelBroadcaster;
|
|
264
|
-
supervisor: FunnelListenerSupervisor;
|
|
265
|
-
channels: FunnelChannels;
|
|
266
|
-
uptimeMs: () => number;
|
|
267
|
-
emit: (input: GatewayEmitInput) => {
|
|
268
|
-
offset: number;
|
|
269
|
-
};
|
|
270
|
-
};
|
|
271
|
-
//#endregion
|
|
272
|
-
//#region lib/gateway/factory.d.ts
|
|
273
|
-
type Env$1 = {
|
|
274
|
-
Variables: {
|
|
275
|
-
deps: GatewayRouteDeps;
|
|
276
|
-
};
|
|
277
|
-
};
|
|
278
|
-
//#endregion
|
|
279
|
-
//#region lib/gateway/event-log/event-log.d.ts
|
|
280
|
-
/**
|
|
281
|
-
* Replayable event payload persisted by the gateway. Domain events the
|
|
282
|
-
* broadcaster emits to WS clients land here so reconnects across daemon
|
|
283
|
-
* restarts can be served from disk. System events (gateway start, channel
|
|
284
|
-
* connected, etc.) are routed to `FunnelLogger` instead — they never go
|
|
285
|
-
* through this log, which keeps the offset space clean for replay.
|
|
286
|
-
*/
|
|
287
|
-
declare const funnelEventSchema: z.ZodObject<{
|
|
288
|
-
type: z.ZodString;
|
|
289
|
-
content: z.ZodString;
|
|
290
|
-
channel_id: z.ZodNullable<z.ZodString>;
|
|
291
|
-
connector_id: z.ZodNullable<z.ZodString>;
|
|
292
|
-
meta: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
293
|
-
}, z.core.$strip>;
|
|
294
|
-
type FunnelEvent = z.infer<typeof funnelEventSchema>;
|
|
295
|
-
/** One broadcast event to persist, carrying the offset the broadcaster assigned. */
|
|
296
|
-
type FunnelEventRecord = {
|
|
297
|
-
content: string;
|
|
298
|
-
channelId: string | null;
|
|
299
|
-
connectorId: string | null;
|
|
300
|
-
meta: Record<string, string> | null;
|
|
301
|
-
offset: number;
|
|
302
|
-
};
|
|
303
|
-
/**
|
|
304
|
-
* Durable, append-only log of broadcaster events keyed by the offset the
|
|
305
|
-
* broadcaster assigns. The gateway persists every domain event here, and
|
|
306
|
-
* across restarts it both seeds the broadcaster's offset counter
|
|
307
|
-
* (`findMaxOffset`) and serves reconnect replay (`loadSince`) from it.
|
|
308
|
-
*
|
|
309
|
-
* `loadSince` is the only method the broadcaster itself needs, which makes
|
|
310
|
-
* any implementation assignable to the broadcaster's narrow `ReplaySource`.
|
|
311
|
-
*
|
|
312
|
-
* Implementations:
|
|
313
|
-
* - `SqliteFunnelEventLog` — the default; durable across daemon restarts.
|
|
314
|
-
* - `MemoryFunnelEventLog` — an in-process double for tests and embedders
|
|
315
|
-
* that do not need durability (replay is lost when the process exits).
|
|
316
|
-
*/
|
|
317
|
-
declare abstract class FunnelEventLog {
|
|
318
|
-
abstract record(record: FunnelEventRecord): void;
|
|
319
|
-
abstract loadSince(since: number): ReplayableEvent[];
|
|
320
|
-
abstract findMaxOffset(): number;
|
|
321
|
-
/** Drop every stored event and reclaim the file. The broadcaster's in-memory
|
|
322
|
-
* offset counter is unaffected, so offsets keep increasing after a clear. */
|
|
323
|
-
abstract clear(): void;
|
|
324
|
-
abstract close(): void;
|
|
325
|
-
}
|
|
326
|
-
//#endregion
|
|
327
|
-
//#region lib/gateway/gateway-server.d.ts
|
|
328
|
-
/**
|
|
329
|
-
* Where the gateway's durable replay log lives. The two ways to specify it are
|
|
330
|
-
* mutually exclusive — modeled as a union so you can't pass both (the old shape
|
|
331
|
-
* silently ignored `dbPath` when `eventLog` was also given).
|
|
332
|
-
*
|
|
333
|
-
* - omit both → SQLite at the default path (`<os.tmpdir()>/funnel/events.db`)
|
|
334
|
-
* - `dbPath` → SQLite at a custom path (parent dir created on demand)
|
|
335
|
-
* - `eventLog` → bring your own `FunnelEventLog` (e.g. `MemoryFunnelEventLog`)
|
|
336
|
-
*/
|
|
337
|
-
type GatewayEventStore = {
|
|
338
|
-
dbPath?: string;
|
|
339
|
-
eventLog?: undefined;
|
|
340
|
-
} | {
|
|
341
|
-
dbPath?: undefined;
|
|
342
|
-
eventLog: FunnelEventLog;
|
|
343
|
-
};
|
|
344
|
-
type Deps$6 = GatewayEventStore & {
|
|
345
|
-
channels: FunnelChannels;
|
|
346
|
-
port?: number; /** Bind address for `Bun.serve`. Defaults to `127.0.0.1` (loopback only). Set to `0.0.0.0` to expose on the network. */
|
|
347
|
-
hostname?: string;
|
|
348
|
-
process?: FunnelProcessRunner;
|
|
349
|
-
clock?: FunnelClock;
|
|
350
|
-
logger?: FunnelLogger; /** Host hook for surfacing internal exceptions (broadcaster / supervisor). Defaults to no-op. */
|
|
351
|
-
onError?: OnFunnelError;
|
|
352
|
-
selfPid?: number; /** Funnel home dir, used to scope kill-competing to daemons rooted at the same dir. Defaults to FUNNEL_DIR. */
|
|
353
|
-
dir?: string;
|
|
354
|
-
killCompetingSlack?: boolean; /** Bearer token required for `/listeners*`, `/status`, and `/ws`. Empty string disables auth (tests only). */
|
|
355
|
-
token?: string;
|
|
356
|
-
/**
|
|
357
|
-
* Permit binding a non-loopback hostname without a token. Off by default:
|
|
358
|
-
* `start()` throws when `hostname` is reachable off-box and `token` is empty,
|
|
359
|
-
* because every privileged endpoint would then be open to the network. Set
|
|
360
|
-
* this only when you've deliberately fronted the gateway with your own auth.
|
|
361
|
-
*/
|
|
362
|
-
allowInsecureHost?: boolean;
|
|
363
|
-
/**
|
|
364
|
-
* Additional hono app mounted before the built-in gateway routes.
|
|
365
|
-
* Use to embed host-specific endpoints (e.g. an MCP route, custom `/api/*`).
|
|
366
|
-
* Host routes are mounted first; built-in `/listeners`, `/status`,
|
|
367
|
-
* `/channels`, `/health` are mounted after and take precedence on conflict.
|
|
368
|
-
*/
|
|
369
|
-
extraRoutes?: Hono<Env$1>;
|
|
370
|
-
};
|
|
371
|
-
type WsData = {
|
|
372
|
-
/** Stable channel id (uuid) the client subscribed to. */channel: string; /** Resolved channel name (for log readability). null for unknown. */
|
|
373
|
-
channelName: string | null; /** Connector names belonging to that channel. */
|
|
374
|
-
connectors: string[]; /** Routing mode for this channel; resolved at upgrade time from settings. */
|
|
375
|
-
delivery: "fanout" | "exclusive"; /** Opaque client id from `?id=<subscriberId>`; lets publishers target this client via `meta.target`. */
|
|
376
|
-
subscriberId?: string; /** Replay any events with offset strictly greater than this on open, then resume the live stream. */
|
|
377
|
-
since?: number;
|
|
378
|
-
};
|
|
379
|
-
/**
|
|
380
|
-
* In-process gateway: runs `Bun.serve` (HTTP + WebSocket /ws), boots connector
|
|
381
|
-
* listeners through `FunnelListenerSupervisor`, fans events out via
|
|
382
|
-
* `FunnelBroadcaster`, and persists them via a `FunnelEventLog` (SQLite by default).
|
|
383
|
-
* System events (gateway lifecycle, connect/disconnect) flow to `FunnelLogger`
|
|
384
|
-
* instead — keeping the SQLite seq space exclusive to broadcaster traffic so
|
|
385
|
-
* the broadcaster's offset counter and `getMaxSeq()` stay aligned without
|
|
386
|
-
* per-event coordination. Exposes `/listeners` HTTP for runtime
|
|
387
|
-
* start/stop/restart of individual connectors.
|
|
388
|
-
*/
|
|
389
|
-
declare class FunnelGatewayServer {
|
|
390
|
-
private readonly channels;
|
|
391
|
-
private readonly port;
|
|
392
|
-
private readonly hostname;
|
|
393
|
-
private readonly dbPath;
|
|
394
|
-
private readonly process?;
|
|
395
|
-
private readonly logger;
|
|
396
|
-
private readonly onError;
|
|
397
|
-
private readonly selfPid;
|
|
398
|
-
private readonly dir;
|
|
399
|
-
private readonly killCompetingSlack;
|
|
400
|
-
private readonly token;
|
|
401
|
-
private readonly allowInsecureHost;
|
|
402
|
-
private readonly broadcaster;
|
|
403
|
-
private readonly eventLog;
|
|
404
|
-
private readonly supervisor;
|
|
405
|
-
private readonly nowMs;
|
|
406
|
-
private readonly extraRoutes;
|
|
407
|
-
private startedAt;
|
|
408
|
-
private server;
|
|
409
|
-
constructor(deps: Deps$6);
|
|
410
|
-
start(): Promise<Server<WsData>>;
|
|
411
|
-
stop(): Promise<void>;
|
|
412
|
-
getStatus(): {
|
|
413
|
-
clients: number;
|
|
414
|
-
channels: {
|
|
415
|
-
channel: string;
|
|
416
|
-
connectors: string[];
|
|
417
|
-
}[];
|
|
418
|
-
};
|
|
419
|
-
getBroadcaster(): FunnelBroadcaster;
|
|
420
|
-
getSupervisor(): FunnelListenerSupervisor;
|
|
421
|
-
getEventLog(): FunnelEventLog;
|
|
422
|
-
/**
|
|
423
|
-
* Register an in-process observer for every broadcast event. Fires after
|
|
424
|
-
* the event is fanned out to WS clients and recorded in the event log.
|
|
425
|
-
* Returns an unsubscribe function. Only meaningful in-process (embedded
|
|
426
|
-
* hosts / `new Funnel(...)` running their own gateway-server); a separate
|
|
427
|
-
* daemon process cannot be observed this way — use a WS client for that.
|
|
428
|
-
*/
|
|
429
|
-
onEvent(handler: BroadcastSubscriber): () => void;
|
|
430
|
-
private handleFetch;
|
|
431
|
-
private handleWsOpen;
|
|
432
|
-
private handleWsClose;
|
|
433
|
-
private logServerStarted;
|
|
434
|
-
private buildApp;
|
|
435
|
-
/**
|
|
436
|
-
* Reads the bearer token from the WebSocket upgrade request. Accepts:
|
|
437
|
-
* - `Sec-WebSocket-Protocol: funnel.token.<value>` (preferred — header, never logged in URLs)
|
|
438
|
-
* - `Authorization: Bearer <value>` (also header-based)
|
|
439
|
-
* Returns true on a constant-time match against the daemon token.
|
|
440
|
-
*/
|
|
441
|
-
private tokenMatchesUpgrade;
|
|
442
|
-
private resolveChannel;
|
|
443
|
-
private killCompetingSlackIfNeeded;
|
|
444
|
-
private bootListeners;
|
|
445
|
-
/**
|
|
446
|
-
* Broadcast `content` to subscribers of `channel`, persisting the event in
|
|
447
|
-
* the SQLite store and stamping `meta.channel{,Id}` / `meta.connector{,Id}`
|
|
448
|
-
* when they resolve. Used by both the connector-listener path (via the
|
|
449
|
-
* supervisor's `notify` callback) and the public `/channels/:channel/publish`
|
|
450
|
-
* route. Returns the assigned event offset.
|
|
451
|
-
*/
|
|
452
|
-
emit(input: {
|
|
453
|
-
channel: string;
|
|
454
|
-
connector?: string;
|
|
455
|
-
content: string;
|
|
456
|
-
meta?: Record<string, string>;
|
|
457
|
-
}): {
|
|
458
|
-
offset: number;
|
|
459
|
-
};
|
|
460
|
-
private lookupChannelId;
|
|
461
|
-
private lookupConnectorId;
|
|
462
|
-
}
|
|
463
|
-
//#endregion
|
|
464
|
-
//#region lib/gateway/channel-ws-url.d.ts
|
|
465
|
-
/**
|
|
466
|
-
* Builds the WebSocket URL a client uses to subscribe to a gateway channel.
|
|
467
|
-
*
|
|
468
|
-
* The gateway's `/ws` upgrade handler reads three query params — `channel`
|
|
469
|
-
* (required), `id` (the subscriber id for targeted delivery), and `since`
|
|
470
|
-
* (replay offset). Forgetting `channel=` silently drops the subscription
|
|
471
|
-
* (the broadcaster never matches the client), which has caused outages when
|
|
472
|
-
* callers hand-built the URL with string concatenation. This builder makes
|
|
473
|
-
* `channel` a required field, so the mistake becomes a compile error.
|
|
474
|
-
*
|
|
475
|
-
* `subscriberId` enables targeted delivery: events carrying `meta.target=<id>`
|
|
476
|
-
* reach only this client. Omit it to receive the channel's fanout.
|
|
477
|
-
*
|
|
478
|
-
* Pair with `channelWsProtocols()` to authenticate the upgrade when the
|
|
479
|
-
* gateway requires a token.
|
|
480
|
-
*/
|
|
481
|
-
type ChannelWsUrlInput = {
|
|
482
|
-
/** Base WS endpoint, e.g. `ws://localhost:9743/ws`. Existing query is preserved. */base: string; /** Channel name to subscribe to. Required — the broadcaster filters by it. */
|
|
483
|
-
channel: string; /** Opaque subscriber id for targeted delivery (`meta.target=<id>`). Omit for fanout. */
|
|
484
|
-
subscriberId?: string; /** Replay from this event offset (inclusive). Omit to receive only new events. */
|
|
485
|
-
since?: number;
|
|
486
|
-
};
|
|
487
|
-
declare function channelWsUrl(input: ChannelWsUrlInput): string;
|
|
488
|
-
/**
|
|
489
|
-
* Builds the `Sec-WebSocket-Protocol` values that authenticate a gateway WS
|
|
490
|
-
* upgrade. Browser `WebSocket` cannot set an `Authorization` header, so the
|
|
491
|
-
* gateway also accepts the token as a `funnel.token.<token>` subprotocol.
|
|
492
|
-
* Returns an empty array when no token is given (auth disabled / loopback).
|
|
493
|
-
*
|
|
494
|
-
* Usage: `new WebSocket(channelWsUrl({ base, channel }), channelWsProtocols(token))`
|
|
495
|
-
*/
|
|
496
|
-
declare function channelWsProtocols(token?: string | null): string[];
|
|
497
|
-
//#endregion
|
|
498
|
-
//#region lib/gateway/gateway-base-url.d.ts
|
|
499
|
-
/**
|
|
500
|
-
* The HTTP base URL of a gateway daemon on the loopback interface. The daemon
|
|
501
|
-
* always binds 127.0.0.1 for its management API (only the WS `/ws` endpoint is
|
|
502
|
-
* ever exposed off-box), so every in-process HTTP client — publisher, listeners
|
|
503
|
-
* client, MCP channel server — talks to it here. Centralizing the construction
|
|
504
|
-
* keeps the host/port shape in one place instead of re-spelling
|
|
505
|
-
* `http://127.0.0.1:${port}` at each call site.
|
|
506
|
-
*/
|
|
507
|
-
declare function gatewayLoopbackUrl(port: number): string;
|
|
508
|
-
//#endregion
|
|
509
|
-
//#region lib/gateway/gateway-token.d.ts
|
|
510
|
-
type Deps$5 = {
|
|
511
|
-
fs?: FunnelFileSystem;
|
|
512
|
-
dir?: string;
|
|
513
|
-
generate?: () => string;
|
|
514
|
-
};
|
|
515
|
-
/**
|
|
516
|
-
* Reads / generates the gateway daemon token used to authenticate
|
|
517
|
-
* `/listeners*`, `/status`, and `/ws` connections.
|
|
518
|
-
*
|
|
519
|
-
* Token file: `<dir>/gateway.token` (default `~/.funnel/gateway.token`),
|
|
520
|
-
* written with mode 0600. Clients on the same machine as the daemon read
|
|
521
|
-
* the file directly; the token never leaves the user's home directory.
|
|
522
|
-
*/
|
|
523
|
-
declare class FunnelGatewayToken {
|
|
524
|
-
private readonly fs;
|
|
525
|
-
private readonly path;
|
|
526
|
-
private readonly generate;
|
|
527
|
-
constructor(deps?: Deps$5);
|
|
528
|
-
read(): string | null;
|
|
529
|
-
/**
|
|
530
|
-
* Returns the existing token or, if missing, generates one and writes it with mode 0600.
|
|
531
|
-
*
|
|
532
|
-
* NOTE: not atomic — two concurrent `ensure()` calls (e.g., `fnl gateway start` racing
|
|
533
|
-
* itself before the PID lock is acquired) could each generate independent tokens. The
|
|
534
|
-
* gateway PID file makes this practically a non-issue; if you need stronger guarantees,
|
|
535
|
-
* take a file lock around this call externally.
|
|
536
|
-
*/
|
|
537
|
-
ensure(): string;
|
|
538
|
-
getPath(): string;
|
|
539
|
-
}
|
|
540
|
-
declare const DEFAULT_GATEWAY_TOKEN_PATH: string;
|
|
541
|
-
//#endregion
|
|
542
|
-
//#region lib/gateway/publish-schema.d.ts
|
|
543
|
-
/**
|
|
544
|
-
* Shared schema for `POST /channels/:channel/publish` — used by both the
|
|
545
|
-
* gateway route handler (input validation) and the CLI / programmable client
|
|
546
|
-
* (request shape). The route resolves `channel` from the path; this body
|
|
547
|
-
* covers everything else.
|
|
548
|
-
*/
|
|
549
|
-
declare const publishRequestSchema: z.ZodObject<{
|
|
550
|
-
content: z.ZodString;
|
|
551
|
-
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
552
|
-
connector: z.ZodOptional<z.ZodString>;
|
|
553
|
-
target: z.ZodOptional<z.ZodString>;
|
|
554
|
-
}, z.core.$strip>;
|
|
555
|
-
type PublishRequest = z.infer<typeof publishRequestSchema>;
|
|
556
|
-
declare const publishResponseSchema: z.ZodObject<{
|
|
557
|
-
ok: z.ZodLiteral<true>;
|
|
558
|
-
offset: z.ZodNumber;
|
|
559
|
-
}, z.core.$strip>;
|
|
560
|
-
type PublishResponse = z.infer<typeof publishResponseSchema>;
|
|
561
|
-
type PublishResult = {
|
|
562
|
-
state: "ok";
|
|
563
|
-
offset: number;
|
|
564
|
-
} | {
|
|
565
|
-
state: "offline";
|
|
566
|
-
} | {
|
|
567
|
-
state: "error";
|
|
568
|
-
reason: string;
|
|
569
|
-
};
|
|
570
|
-
//#endregion
|
|
571
|
-
//#region lib/gateway/channel-publisher.d.ts
|
|
572
|
-
type Deps$4 = {
|
|
573
|
-
port: number;
|
|
574
|
-
isDaemonRunning: () => boolean; /** Returns the daemon's gateway token, or null if unavailable. Sent as `Authorization: Bearer`. */
|
|
575
|
-
getToken?: () => string | null;
|
|
576
|
-
};
|
|
577
|
-
/**
|
|
578
|
-
* HTTP client for `POST /channels/:channel/publish` on a running gateway
|
|
579
|
-
* daemon. Returns `{ state: "offline" }` when the daemon isn't up so callers
|
|
580
|
-
* can branch without exceptions, mirroring `FunnelListenersClient`.
|
|
581
|
-
*/
|
|
582
|
-
declare class FunnelChannelPublisher {
|
|
583
|
-
private readonly port;
|
|
584
|
-
private readonly isDaemonRunning;
|
|
585
|
-
private readonly getToken;
|
|
586
|
-
constructor(deps: Deps$4);
|
|
587
|
-
publish(channelName: string, request: PublishRequest): Promise<PublishResult>;
|
|
588
|
-
private authHeaders;
|
|
589
|
-
}
|
|
590
|
-
//#endregion
|
|
591
|
-
//#region lib/gateway/event-log/sqlite-event-log.d.ts
|
|
592
|
-
type Props$6 = {
|
|
593
|
-
/** SQLite database file path. Created on first write. ":memory:" for tests. */path: string; /** Override for tests. Defaults to `Date.now`. */
|
|
594
|
-
now?: () => number; /** Surfaces a failed persist (PK collision, disk-full, locked WAL). Silent if absent. */
|
|
595
|
-
logger?: FunnelLogger; /** Optional row cap. Pruned on every insert. */
|
|
596
|
-
maxRows?: number; /** Optional age cap in ms. Pruned on every insert. */
|
|
597
|
-
maxAgeMs?: number; /** Optional on-disk byte cap. Checked periodically; on overflow the oldest rows are dropped toward targetBytes and the file is VACUUMed. */
|
|
598
|
-
maxBytes?: number; /** Shrink target when maxBytes is exceeded. Defaults to maxBytes/4. */
|
|
599
|
-
targetBytes?: number;
|
|
600
|
-
};
|
|
601
|
-
/**
|
|
602
|
-
* SQLite-backed `FunnelEventLog`. One indexed table holds every broadcaster
|
|
603
|
-
* event with `channel_id` and `connector_id` as dedicated columns, so
|
|
604
|
-
* per-channel and per-connector replay is an indexed range scan.
|
|
605
|
-
*
|
|
606
|
-
* Concurrency: `seq` is `INTEGER PRIMARY KEY`, so SQLite assigns it
|
|
607
|
-
* atomically. The broadcaster owns its own offset counter at runtime
|
|
608
|
-
* (seeded from `findMaxOffset()` at startup); each broadcaster event
|
|
609
|
-
* flows in here via `record()` with that pre-assigned offset, which the
|
|
610
|
-
* sink stores via `write()` — PK uniqueness catches double-emit bugs.
|
|
611
|
-
*
|
|
612
|
-
* System events (gateway lifecycle, channel connect/disconnect, etc.) do
|
|
613
|
-
* NOT go through this store. They are diagnostic only and live in
|
|
614
|
-
* `FunnelLogger`'s file so the seq space here stays exclusive to
|
|
615
|
-
* broadcaster traffic. This is what makes the broadcaster's seq seeding
|
|
616
|
-
* (`getMaxSeq()` at startup) correct without per-event coordination.
|
|
617
|
-
*/
|
|
618
|
-
declare class SqliteFunnelEventLog extends FunnelEventLog {
|
|
619
|
-
private readonly sink;
|
|
620
|
-
private readonly now;
|
|
621
|
-
private readonly logger;
|
|
622
|
-
constructor(props: Props$6);
|
|
623
|
-
/**
|
|
624
|
-
* Persist a broadcaster-driven event with its assigned offset. Caller
|
|
625
|
-
* (the gateway-server) supplies the offset from `broadcaster.broadcast()`
|
|
626
|
-
* so this store and the broadcaster's in-memory ring stay aligned.
|
|
627
|
-
*/
|
|
628
|
-
record(record: FunnelEventRecord): void;
|
|
629
|
-
/**
|
|
630
|
-
* Returns events with offset > since. Filtering by channel/connector is
|
|
631
|
-
* the broadcaster's responsibility (it knows the client's subscription),
|
|
632
|
-
* so this returns the full slice and lets the caller filter.
|
|
633
|
-
*/
|
|
634
|
-
loadSince(since: number): ReplayableEvent[];
|
|
635
|
-
/**
|
|
636
|
-
* Returns events for one channel (and optionally one connector). Used
|
|
637
|
-
* by the gateway logs CLI for scoped queries. Channel/connector filters
|
|
638
|
-
* are indexed columns, so this is an indexed range scan.
|
|
639
|
-
*/
|
|
640
|
-
loadForChannel(props: {
|
|
641
|
-
channelId: string;
|
|
642
|
-
connectorId?: string;
|
|
643
|
-
sinceSeq?: number;
|
|
644
|
-
limit?: number;
|
|
645
|
-
}): ReplayableEvent[];
|
|
646
|
-
findMaxOffset(): number;
|
|
647
|
-
clear(): void;
|
|
648
|
-
close(): void;
|
|
649
|
-
}
|
|
650
|
-
//#endregion
|
|
651
|
-
//#region lib/gateway/event-log/memory-event-log.d.ts
|
|
652
|
-
/**
|
|
653
|
-
* In-process `FunnelEventLog` backed by a plain array. Used by tests and by
|
|
654
|
-
* embedders that do not need durability — replay works within the process
|
|
655
|
-
* lifetime but is lost when the process exits. Unlike the SQLite log it does
|
|
656
|
-
* not truncate content or prune, so it is not meant for unbounded production
|
|
657
|
-
* traffic.
|
|
658
|
-
*/
|
|
659
|
-
declare class MemoryFunnelEventLog extends FunnelEventLog {
|
|
660
|
-
private readonly events;
|
|
661
|
-
constructor();
|
|
662
|
-
record(record: FunnelEventRecord): void;
|
|
663
|
-
loadSince(since: number): ReplayableEvent[];
|
|
664
|
-
findMaxOffset(): number;
|
|
665
|
-
clear(): void;
|
|
666
|
-
close(): void;
|
|
667
|
-
}
|
|
668
|
-
//#endregion
|
|
669
|
-
//#region lib/gateway/diagnostic-log/sqlite-diagnostic-log.d.ts
|
|
670
|
-
type Props$5 = {
|
|
671
|
-
/** SQLite file for the raw (pre-filter) table. ":memory:" for tests. */rawPath: string; /** SQLite file for the processed (verdict) table. ":memory:" for tests. */
|
|
672
|
-
processedPath: string; /** SQLite file for the connection (lifecycle) table. ":memory:" for tests. */
|
|
673
|
-
connectionPath: string;
|
|
674
|
-
now?: () => number; /** Row cap for the processed and connection tables. Pruned on every insert. */
|
|
675
|
-
maxRows?: number;
|
|
676
|
-
/**
|
|
677
|
-
* Row cap for the raw table specifically. Raw rows can each hold up to
|
|
678
|
-
* `RAW_PAYLOAD_CAP` bytes, so they want a tighter cap than the small
|
|
679
|
-
* processed/connection verdict rows. Defaults to `maxRows` when unset.
|
|
680
|
-
*/
|
|
681
|
-
rawMaxRows?: number; /** Age cap in ms for all tables — bounds how long untouched payloads (with PII) live. Pruned on every insert. */
|
|
682
|
-
maxAgeMs?: number; /** When set, `insert()` errors (disk full, WAL lock) are logged instead of silently dropped. */
|
|
683
|
-
logger?: FunnelLogger;
|
|
684
|
-
};
|
|
685
|
-
/**
|
|
686
|
-
* Default `ConnectorDiagnosticLog`: three independent `FunnelLogSqliteSink`s, one
|
|
687
|
-
* per table (raw / processed / connection), in separate files. Each sink
|
|
688
|
-
* indexes the columns its queries filter on — `event_id` / `connector_id` /
|
|
689
|
-
* `channel_id` for raw, plus `outcome` for processed and `status` for
|
|
690
|
-
* connection — so those lookups are indexed scans (`type` is a fixed column
|
|
691
|
-
* the sink extracts separately, not an index, so filtering by it is a scan).
|
|
692
|
-
*
|
|
693
|
-
* The raw table offloads any payload over `RAW_PAYLOAD_CAP`: rather than
|
|
694
|
-
* truncating mid-string (which yields unparseable JSON), it replaces the
|
|
695
|
-
* body with a small JSON object that keeps the diagnostic essentials and
|
|
696
|
-
* records the dropped size under `_funnel_oversized`. Every stored payload
|
|
697
|
-
* therefore stays valid JSON.
|
|
698
|
-
*/
|
|
699
|
-
declare class SqliteConnectorDiagnosticLog extends ConnectorDiagnosticLog {
|
|
700
|
-
private readonly raw;
|
|
701
|
-
private readonly processed;
|
|
702
|
-
private readonly connection;
|
|
703
|
-
private readonly now;
|
|
704
|
-
private readonly logger;
|
|
705
|
-
constructor(props: Props$5);
|
|
706
|
-
recordRaw(record: ConnectorRawRecord): void;
|
|
707
|
-
recordProcessed(record: ConnectorProcessedRecord): void;
|
|
708
|
-
recordConnection(record: ConnectorConnectionRecord): void;
|
|
709
|
-
private report;
|
|
710
|
-
queryRaw(query: ConnectorRawQuery): StoredRawEvent[];
|
|
711
|
-
queryProcessed(query: ConnectorProcessedQuery): StoredProcessedEvent[];
|
|
712
|
-
queryConnection(query: ConnectorConnectionQuery): StoredConnectionEvent[];
|
|
713
|
-
clear(): void;
|
|
714
|
-
close(): void;
|
|
715
|
-
}
|
|
716
|
-
//#endregion
|
|
717
|
-
//#region lib/gateway/diagnostic-log/memory-diagnostic-log.d.ts
|
|
718
|
-
/**
|
|
719
|
-
* In-process `ConnectorDiagnosticLog` backed by one array per table. Used by tests
|
|
720
|
-
* and embedders that do not need durability. Like the SQLite log it keeps
|
|
721
|
-
* `seq` per-table (each array's 1-based position) and returns the most recent
|
|
722
|
-
* `limit` rows oldest-first; unlike it, it never prunes and never offloads
|
|
723
|
-
* oversized payloads — it keeps whatever the caller hands it, which is fine
|
|
724
|
-
* for the bounded volumes a test produces. Payload-validity is therefore a
|
|
725
|
-
* SQLite-only guarantee; do not write a test that leans on this double
|
|
726
|
-
* rejecting a malformed payload.
|
|
727
|
-
*/
|
|
728
|
-
declare class MemoryConnectorDiagnosticLog extends ConnectorDiagnosticLog {
|
|
729
|
-
private readonly now;
|
|
730
|
-
private readonly raws;
|
|
731
|
-
private readonly processeds;
|
|
732
|
-
private readonly connections;
|
|
733
|
-
constructor(now?: () => number);
|
|
734
|
-
recordRaw(record: ConnectorRawRecord): void;
|
|
735
|
-
recordProcessed(record: ConnectorProcessedRecord): void;
|
|
736
|
-
recordConnection(record: ConnectorConnectionRecord): void;
|
|
737
|
-
queryRaw(query: ConnectorRawQuery): StoredRawEvent[];
|
|
738
|
-
queryProcessed(query: ConnectorProcessedQuery): StoredProcessedEvent[];
|
|
739
|
-
queryConnection(query: ConnectorConnectionQuery): StoredConnectionEvent[];
|
|
740
|
-
clear(): void;
|
|
741
|
-
close(): void;
|
|
742
|
-
}
|
|
743
|
-
//#endregion
|
|
744
|
-
//#region lib/gateway/gateway.d.ts
|
|
745
|
-
type Deps$3 = {
|
|
746
|
-
process?: FunnelProcessRunner;
|
|
747
|
-
fs?: FunnelFileSystem;
|
|
748
|
-
clock?: FunnelClock;
|
|
749
|
-
dir?: string;
|
|
750
|
-
tmpDir?: string;
|
|
751
|
-
port?: number;
|
|
752
|
-
sleep?: (ms: number) => Promise<void>;
|
|
753
|
-
};
|
|
754
|
-
/**
|
|
755
|
-
* Manages the gateway daemon as a separate process via PID file.
|
|
756
|
-
* Use `start()` to spawn `bun daemon.ts` in the background and `stop()` to
|
|
757
|
-
* terminate it. For an in-process gateway, use `Funnel.gatewayServer` instead.
|
|
758
|
-
*/
|
|
759
|
-
declare class FunnelGateway {
|
|
760
|
-
private readonly process;
|
|
761
|
-
private readonly fs;
|
|
762
|
-
private readonly clock;
|
|
763
|
-
private readonly dir;
|
|
764
|
-
private readonly pidFile;
|
|
765
|
-
private readonly gatewayLog;
|
|
766
|
-
private readonly tmpDir;
|
|
767
|
-
private readonly port;
|
|
768
|
-
private readonly sleep;
|
|
769
|
-
constructor(deps?: Deps$3);
|
|
770
|
-
isRunning(): boolean;
|
|
771
|
-
getStatus(): {
|
|
772
|
-
running: boolean;
|
|
773
|
-
pid: number | null;
|
|
774
|
-
port: number;
|
|
775
|
-
};
|
|
776
|
-
start(options?: {
|
|
777
|
-
caffeinate?: boolean;
|
|
778
|
-
}): Promise<boolean>;
|
|
779
|
-
buildStartCommand(gatewayScript: string, options?: {
|
|
780
|
-
caffeinate?: boolean;
|
|
781
|
-
}): string[];
|
|
782
|
-
stop(): Promise<boolean>;
|
|
783
|
-
restart(options?: {
|
|
784
|
-
onlyIfRunning?: boolean;
|
|
785
|
-
caffeinate?: boolean;
|
|
786
|
-
}): Promise<{
|
|
787
|
-
ok: boolean;
|
|
788
|
-
wasRunning: boolean;
|
|
789
|
-
stopped: boolean;
|
|
790
|
-
started: boolean;
|
|
791
|
-
}>;
|
|
792
|
-
getGatewayLog(): string;
|
|
793
|
-
getPort(): number;
|
|
794
|
-
private readPid;
|
|
795
|
-
private removePid;
|
|
796
|
-
private isProcessAlive;
|
|
797
|
-
}
|
|
798
|
-
//#endregion
|
|
799
|
-
//#region lib/gateway/listeners-client.d.ts
|
|
800
|
-
type Deps$2 = {
|
|
801
|
-
port: number;
|
|
802
|
-
isDaemonRunning: () => boolean; /** Returns the daemon's gateway token, or null if unavailable. Sent as `Authorization: Bearer`. */
|
|
803
|
-
getToken?: () => string | null;
|
|
804
|
-
};
|
|
805
|
-
declare const listenerEntrySchema: z.ZodObject<{
|
|
806
|
-
channelName: z.ZodString;
|
|
807
|
-
channelId: z.ZodString;
|
|
808
|
-
name: z.ZodString;
|
|
809
|
-
type: z.ZodString;
|
|
810
|
-
alive: z.ZodBoolean;
|
|
811
|
-
}, z.core.$strip>;
|
|
812
|
-
type ListenerEntry = z.infer<typeof listenerEntrySchema>;
|
|
813
|
-
type ListenerOpResult = {
|
|
814
|
-
state: "ok";
|
|
815
|
-
} | {
|
|
816
|
-
state: "offline";
|
|
817
|
-
} | {
|
|
818
|
-
state: "error";
|
|
819
|
-
reason: string;
|
|
820
|
-
};
|
|
821
|
-
type ListListenersResult = {
|
|
822
|
-
state: "ok";
|
|
823
|
-
listeners: ListenerEntry[];
|
|
824
|
-
} | {
|
|
825
|
-
state: "offline";
|
|
826
|
-
} | {
|
|
827
|
-
state: "error";
|
|
828
|
-
reason: string;
|
|
829
|
-
};
|
|
830
|
-
/**
|
|
831
|
-
* HTTP client for listener operations on a running gateway daemon.
|
|
832
|
-
*
|
|
833
|
-
* Returns `{ state: "offline" }` when the daemon isn't running so callers
|
|
834
|
-
* (CLI hot-reload paths) can treat that as a no-op without parsing strings.
|
|
835
|
-
* Pair this with `FunnelGateway` (process control) for the full picture.
|
|
836
|
-
*/
|
|
837
|
-
declare class FunnelListenersClient {
|
|
838
|
-
private readonly port;
|
|
839
|
-
private readonly isDaemonRunning;
|
|
840
|
-
private readonly getToken;
|
|
841
|
-
constructor(deps: Deps$2);
|
|
842
|
-
list(): Promise<ListListenersResult>;
|
|
843
|
-
start(channelName: string, connectorName: string): Promise<ListenerOpResult>;
|
|
844
|
-
stop(channelName: string, connectorName: string): Promise<ListenerOpResult>;
|
|
845
|
-
restart(channelName: string, connectorName: string): Promise<ListenerOpResult>;
|
|
846
|
-
private path;
|
|
847
|
-
private authHeaders;
|
|
848
|
-
private call;
|
|
849
|
-
}
|
|
850
|
-
//#endregion
|
|
851
|
-
//#region lib/funnel.d.ts
|
|
852
|
-
type Props$4 = {
|
|
853
|
-
/** 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. */
|
|
854
|
-
fs?: FunnelFileSystem; /** Process runner used by gateway / claude / gh listener. Replace with MemoryFunnelProcessRunner for tests. */
|
|
855
|
-
process?: FunnelProcessRunner; /** Logger flowed into every facet. Replace with MemoryFunnelLogger or NoopFunnelLogger to silence/inspect. */
|
|
856
|
-
logger?: FunnelLogger; /** Clock used by schedule listener, gh poll watermarks, and gateway timeouts. */
|
|
857
|
-
clock?: FunnelClock; /** ID generator for channel and connector ids. Use MemoryFunnelIdGenerator for deterministic tests. */
|
|
858
|
-
idGenerator?: FunnelIdGenerator; /** Funnel home directory (settings.json + per-channel/per-connector dirs). Defaults to ~/.funnel. */
|
|
859
|
-
dir?: string; /** Temp / runtime directory (gateway logs and PID adjacent files). Defaults to `<os.tmpdir()>/funnel`. */
|
|
860
|
-
tmpDir?: string;
|
|
861
|
-
/**
|
|
862
|
-
* Host integration hooks for Slack listeners — `onAppCreated` for attaching
|
|
863
|
-
* Bolt `app.action` handlers, `preprocessEvent` for transforming/dropping
|
|
864
|
-
* raw Slack events before the built-in processor sees them.
|
|
865
|
-
*/
|
|
866
|
-
slackListenerOptions?: SlackListenerOptions;
|
|
867
|
-
/**
|
|
868
|
-
* Host integration hooks for Schedule listeners — `onFired` is invoked after
|
|
869
|
-
* each successful fire, useful for dropping one-shot entries.
|
|
870
|
-
*/
|
|
871
|
-
scheduleListenerOptions?: ScheduleListenerOptions;
|
|
872
|
-
/**
|
|
873
|
-
* Diagnostic log of inbound connector traffic (raw events before filtering
|
|
874
|
-
* and the processor's verdict after). Threaded into listeners that record
|
|
875
|
-
* it. Only the gateway daemon injects a `SqliteConnectorDiagnosticLog`; everywhere
|
|
876
|
-
* else this stays absent and recording is a no-op.
|
|
877
|
-
*/
|
|
878
|
-
diagnosticLog?: ConnectorDiagnosticLog;
|
|
879
|
-
/**
|
|
880
|
-
* Called when Funnel catches an exception that would otherwise be silently
|
|
881
|
-
* swallowed (subscriber throw, listener start/stop failure, etc.). Pass
|
|
882
|
-
* `Sentry.captureException` from the host to surface these. Defaults to no-op.
|
|
883
|
-
*/
|
|
884
|
-
onError?: OnFunnelError;
|
|
885
|
-
/**
|
|
886
|
-
* Gateway daemon port. Passed directly to FunnelGateway so hosts can override
|
|
887
|
-
* the default (9742) without setting FUNNEL_PORT in the environment.
|
|
888
|
-
*/
|
|
889
|
-
port?: number;
|
|
890
|
-
/**
|
|
891
|
-
* Token prompter used by FunnelLocalConfigSync when funnel.json omits a token.
|
|
892
|
-
* Defaults to a TTY-only stdin prompter. Inject MemoryFunnelTokenPrompter in tests.
|
|
893
|
-
*/
|
|
894
|
-
tokenPrompter?: FunnelTokenPrompter;
|
|
895
|
-
};
|
|
896
|
-
/**
|
|
897
|
-
* Options for `Funnel.gatewayServer()`. The event store is a union (`dbPath`
|
|
898
|
-
* xor `eventLog`) so the two storage modes can't be mixed.
|
|
899
|
-
*/
|
|
900
|
-
type GatewayServerOptions = GatewayEventStore & {
|
|
901
|
-
port?: number;
|
|
902
|
-
hostname?: string;
|
|
903
|
-
killCompetingSlack?: boolean;
|
|
904
|
-
token?: string; /** Permit a non-loopback `hostname` without a token. See FunnelGatewayServer. */
|
|
905
|
-
allowInsecureHost?: boolean;
|
|
906
|
-
extraRoutes?: Hono<Env$1>;
|
|
907
|
-
};
|
|
908
|
-
/**
|
|
909
|
-
* Facade that wires every funnel facet together and exposes the public surface.
|
|
910
|
-
*
|
|
911
|
-
* All side-effecting boundaries (filesystem, process, logger, clock, id, paths)
|
|
912
|
-
* are injected via Props — passing memory implementations gives a fully sandboxed
|
|
913
|
-
* Funnel that touches no real disk, processes, or wall-clock time.
|
|
914
|
-
*
|
|
915
|
-
* Fully immutable: all fields are resolved in the constructor and frozen.
|
|
916
|
-
* No lazy initialisation — every dependency is wired at construction time.
|
|
917
|
-
*
|
|
918
|
-
* @example
|
|
919
|
-
* ```ts
|
|
920
|
-
* const funnel = new Funnel({})
|
|
921
|
-
* const channel = funnel.channels.add({ name: "inbox" })
|
|
922
|
-
* funnel.channels.addConnector("inbox", { type: "slack", name: "ops", botToken, appToken })
|
|
923
|
-
* await funnel.gatewayServer({ port: 9742 }).start()
|
|
924
|
-
* ```
|
|
925
|
-
*/
|
|
926
|
-
declare class Funnel {
|
|
927
|
-
readonly paths: {
|
|
928
|
-
dir: string;
|
|
929
|
-
tmpDir: string;
|
|
930
|
-
settings: string;
|
|
931
|
-
};
|
|
932
|
-
readonly channels: FunnelChannels;
|
|
933
|
-
readonly gateway: FunnelGateway;
|
|
934
|
-
readonly gatewayToken: FunnelGatewayToken;
|
|
935
|
-
readonly publisher: FunnelChannelPublisher;
|
|
936
|
-
readonly listeners: FunnelListenersClient;
|
|
937
|
-
readonly claude: FunnelClaude;
|
|
938
|
-
readonly profiles: FunnelProfiles;
|
|
939
|
-
readonly localConfig: FunnelLocalConfig;
|
|
940
|
-
readonly localConfigSync: FunnelLocalConfigSync;
|
|
941
|
-
readonly diagnostics: FunnelDiagnostics;
|
|
942
|
-
readonly recovery: FunnelRecovery;
|
|
943
|
-
readonly doctor: FunnelDoctor;
|
|
944
|
-
readonly docs: FunnelDocs;
|
|
945
|
-
private readonly fs;
|
|
946
|
-
private readonly process;
|
|
947
|
-
private readonly logger;
|
|
948
|
-
private readonly clock;
|
|
949
|
-
private readonly onError;
|
|
950
|
-
constructor(props?: Props$4);
|
|
951
|
-
/**
|
|
952
|
-
* Sandboxed Funnel wired with in-memory implementations for every IO boundary.
|
|
953
|
-
* Touches no real disk, processes, wall-clock time, or UUIDs — safe for tests
|
|
954
|
-
* and ad-hoc experiments. Override individual fields by passing them in `props`.
|
|
955
|
-
*/
|
|
956
|
-
static inMemory(props?: Props$4): Funnel;
|
|
957
|
-
/**
|
|
958
|
-
* In-process gateway server. Unlike `gateway.start()` (which spawns a daemon),
|
|
959
|
-
* this returns a class that runs `Bun.serve` + listeners inside the current process —
|
|
960
|
-
* useful for tests, embedding, or custom hosts.
|
|
961
|
-
*/
|
|
962
|
-
gatewayServer(options?: GatewayServerOptions): FunnelGatewayServer;
|
|
963
|
-
/**
|
|
964
|
-
* Create a ProcessGuard scoped to this Funnel's home directory.
|
|
965
|
-
* Useful for hosts that need to check or manage singleton PID files
|
|
966
|
-
* independently of FunnelClaude (e.g. checking if a named profile is running).
|
|
967
|
-
*/
|
|
968
|
-
createProcessGuard(): FileProcessGuard;
|
|
969
|
-
/**
|
|
970
|
-
* Run the gateway daemon in the foreground (tied to this terminal).
|
|
971
|
-
* For background daemon management, use `funnel.gateway.start()` instead.
|
|
972
|
-
*/
|
|
973
|
-
runGatewayForeground(options?: {
|
|
974
|
-
caffeinate?: boolean;
|
|
975
|
-
}): Promise<number>;
|
|
976
|
-
gatewayClient(): ReturnType<typeof hc<GatewayApp>>;
|
|
977
|
-
}
|
|
978
|
-
//#endregion
|
|
979
|
-
//#region lib/engine/settings/settings-store.d.ts
|
|
980
|
-
/**
|
|
981
|
-
* Resolves the funnel home dir. Defaults to `~/.funnel`, overridable via
|
|
982
|
-
* `FUNNEL_DIR` so a funnel.json-scoped launch can point everything (settings,
|
|
983
|
-
* gateway pid/token, claude pids) at a repo-local `<repo>/.funnel` and never
|
|
984
|
-
* touch the global home. Read at call time, not module load, so a daemon
|
|
985
|
-
* spawned with the env set resolves the override.
|
|
986
|
-
*/
|
|
987
|
-
declare function resolveFunnelDir(): string;
|
|
988
|
-
declare const DEFAULT_GATEWAY_PORT = 9742;
|
|
989
|
-
/**
|
|
990
|
-
* Resolves the gateway port. Defaults to 9742 — the port a programmatically
|
|
991
|
-
* hosted gateway (`new Funnel().gatewayServer()`) uses. The `funnel` CLI entry
|
|
992
|
-
* sets `FUNNEL_PORT` to a distinct default so a CLI launch never collides with
|
|
993
|
-
* an embedding app's gateway on 9742. Read at call time so a daemon spawned
|
|
994
|
-
* with the env set resolves the override.
|
|
995
|
-
*/
|
|
996
|
-
declare function resolveFunnelPort(): number;
|
|
997
|
-
declare const FUNNEL_DIR: string;
|
|
998
|
-
declare const SETTINGS_PATH: string;
|
|
999
|
-
type Deps$1 = {
|
|
1000
|
-
path?: string;
|
|
1001
|
-
fs?: FunnelFileSystem;
|
|
1002
|
-
idGenerator?: FunnelIdGenerator;
|
|
1003
|
-
};
|
|
1004
|
-
declare class FunnelSettingsStore extends FunnelSettingsReader {
|
|
1005
|
-
private readonly path;
|
|
1006
|
-
private readonly fs;
|
|
1007
|
-
private readonly idGenerator;
|
|
1008
|
-
constructor(deps?: Deps$1);
|
|
1009
|
-
read(): Settings;
|
|
1010
|
-
private looksLikeLegacy;
|
|
1011
|
-
/**
|
|
1012
|
-
* Non-destructive migration for profiles written before `id` existed. Mints a
|
|
1013
|
-
* uuid for each profile lacking one and returns whether anything was minted, so
|
|
1014
|
-
* `read` can persist it immediately — a profile id must be STABLE across reads,
|
|
1015
|
-
* otherwise `setSessionId` (a second read) sees a different id and can't match
|
|
1016
|
-
* the one the launch used. Mutates `parsed` in place (freshly JSON-parsed).
|
|
1017
|
-
*/
|
|
1018
|
-
private backfillProfileIds;
|
|
1019
|
-
write(settings: Settings): void;
|
|
1020
|
-
}
|
|
1021
|
-
//#endregion
|
|
1022
|
-
//#region lib/engine/settings/mock-settings-reader.d.ts
|
|
1023
|
-
declare const createSettings: (partial?: Partial<Settings>) => Settings;
|
|
1024
|
-
declare class MockFunnelSettingsReader extends FunnelSettingsReader {
|
|
1025
|
-
private state;
|
|
1026
|
-
constructor(initial?: Partial<Settings>);
|
|
1027
|
-
read(): Settings;
|
|
1028
|
-
write(settings: Settings): void;
|
|
1029
|
-
}
|
|
1030
|
-
//#endregion
|
|
1031
|
-
//#region lib/engine/fs/node-file-system.d.ts
|
|
1032
|
-
declare class NodeFunnelFileSystem extends FunnelFileSystem {
|
|
1033
|
-
constructor();
|
|
1034
|
-
existsSync(path: string): boolean;
|
|
1035
|
-
readFileSync(path: string): string;
|
|
1036
|
-
writeFileSync(path: string, data: string): void;
|
|
1037
|
-
writeSecretFileSync(path: string, data: string): void;
|
|
1038
|
-
appendFileSync(path: string, data: string): void;
|
|
1039
|
-
unlink(path: string): void;
|
|
1040
|
-
mkdirSync(path: string, options?: {
|
|
1041
|
-
recursive?: boolean;
|
|
1042
|
-
}): void;
|
|
1043
|
-
readdirSync(path: string): string[];
|
|
1044
|
-
statSync(path: string): FileStat;
|
|
1045
|
-
}
|
|
1046
|
-
//#endregion
|
|
1047
|
-
//#region lib/engine/fs/memory-file-system.d.ts
|
|
1048
|
-
type Props$3 = {
|
|
1049
|
-
dirs?: string[];
|
|
1050
|
-
files?: Record<string, string>;
|
|
1051
|
-
mtimes?: Record<string, number>;
|
|
1052
|
-
modes?: Record<string, number>;
|
|
1053
|
-
now?: () => number;
|
|
1054
|
-
};
|
|
1055
|
-
declare class MemoryFunnelFileSystem extends FunnelFileSystem {
|
|
1056
|
-
private readonly dirs;
|
|
1057
|
-
private readonly files;
|
|
1058
|
-
private readonly mtimes;
|
|
1059
|
-
private readonly modes;
|
|
1060
|
-
private readonly now;
|
|
1061
|
-
constructor(props?: Props$3);
|
|
1062
|
-
existsSync(path: string): boolean;
|
|
1063
|
-
readFileSync(path: string): string;
|
|
1064
|
-
writeFileSync(path: string, data: string): void;
|
|
1065
|
-
writeSecretFileSync(path: string, data: string): void;
|
|
1066
|
-
appendFileSync(path: string, data: string): void;
|
|
1067
|
-
unlink(path: string): void;
|
|
1068
|
-
mkdirSync(path: string, options?: {
|
|
1069
|
-
recursive?: boolean;
|
|
1070
|
-
}): void;
|
|
1071
|
-
readdirSync(path: string): string[];
|
|
1072
|
-
statSync(path: string): FileStat;
|
|
1073
|
-
setMtime(path: string, mtimeMs: number): void;
|
|
1074
|
-
setMode(path: string, mode: number): void;
|
|
1075
|
-
private touch;
|
|
1076
|
-
}
|
|
1077
|
-
//#endregion
|
|
1078
|
-
//#region lib/engine/process/node-process-runner.d.ts
|
|
1079
|
-
declare class NodeFunnelProcessRunner extends FunnelProcessRunner {
|
|
1080
|
-
constructor();
|
|
1081
|
-
runSync(command: string[]): RunResult;
|
|
1082
|
-
run(command: string[], options?: RunOptions): Promise<RunResult>;
|
|
1083
|
-
attach(command: string[], options?: AttachOptions): Promise<number>;
|
|
1084
|
-
detach(command: string[], options?: DetachOptions): void;
|
|
1085
|
-
kill(pid: number, signal?: string): void;
|
|
1086
|
-
isAlive(pid: number): boolean;
|
|
1087
|
-
listProcessesContaining(marker: string): ProcessSnapshot[];
|
|
1088
|
-
private isAlivePosix;
|
|
1089
|
-
private isAliveWindows;
|
|
1090
|
-
private listProcessesContainingPosix;
|
|
1091
|
-
private listProcessesContainingWindows;
|
|
1092
|
-
}
|
|
1093
|
-
//#endregion
|
|
1094
|
-
//#region lib/engine/process/memory-process-runner.d.ts
|
|
1095
|
-
type MemoryProcessResponse = {
|
|
1096
|
-
exitCode?: number;
|
|
1097
|
-
stdout?: string;
|
|
1098
|
-
stderr?: string;
|
|
1099
|
-
};
|
|
1100
|
-
type MemoryProcessHandler = (command: string[]) => MemoryProcessResponse | Promise<MemoryProcessResponse>;
|
|
1101
|
-
type MemoryProcessSyncHandler = (command: string[]) => MemoryProcessResponse;
|
|
1102
|
-
type MemoryProcessCall = {
|
|
1103
|
-
kind: "run";
|
|
1104
|
-
command: string[];
|
|
1105
|
-
options: RunOptions;
|
|
1106
|
-
} | {
|
|
1107
|
-
kind: "runSync";
|
|
1108
|
-
command: string[];
|
|
1109
|
-
} | {
|
|
1110
|
-
kind: "attach";
|
|
1111
|
-
command: string[];
|
|
1112
|
-
options: AttachOptions;
|
|
1113
|
-
} | {
|
|
1114
|
-
kind: "detach";
|
|
1115
|
-
command: string[];
|
|
1116
|
-
options: DetachOptions;
|
|
1117
|
-
} | {
|
|
1118
|
-
kind: "kill";
|
|
1119
|
-
command: string[];
|
|
1120
|
-
};
|
|
1121
|
-
type AliveStub = (pid: number) => boolean;
|
|
1122
|
-
type ProcessListStub = (marker: string) => ProcessSnapshot[];
|
|
1123
|
-
declare class MemoryFunnelProcessRunner extends FunnelProcessRunner {
|
|
1124
|
-
readonly calls: MemoryProcessCall[];
|
|
1125
|
-
readonly killed: {
|
|
1126
|
-
pid: number;
|
|
1127
|
-
signal: string;
|
|
1128
|
-
}[];
|
|
1129
|
-
private handler;
|
|
1130
|
-
private syncHandler;
|
|
1131
|
-
private aliveStub;
|
|
1132
|
-
private listStub;
|
|
1133
|
-
on(handler: MemoryProcessHandler): this;
|
|
1134
|
-
onSync(handler: MemoryProcessSyncHandler): this;
|
|
1135
|
-
onIsAlive(stub: AliveStub): this;
|
|
1136
|
-
onListProcessesContaining(stub: ProcessListStub): this;
|
|
1137
|
-
run(command: string[], options?: RunOptions): Promise<RunResult>;
|
|
1138
|
-
runSync(command: string[]): RunResult;
|
|
1139
|
-
attach(command: string[], options?: AttachOptions): Promise<number>;
|
|
1140
|
-
detach(command: string[], options?: DetachOptions): void;
|
|
1141
|
-
kill(pid: number, signal?: string): void;
|
|
1142
|
-
isAlive(pid: number): boolean;
|
|
1143
|
-
listProcessesContaining(marker: string): ProcessSnapshot[];
|
|
1144
|
-
}
|
|
1145
|
-
//#endregion
|
|
1146
|
-
//#region lib/engine/logger/node-logger.d.ts
|
|
1147
|
-
type Props$2 = {
|
|
1148
|
-
file?: string;
|
|
1149
|
-
now?: () => Date;
|
|
1150
|
-
};
|
|
1151
|
-
declare class NodeFunnelLogger extends FunnelLogger {
|
|
1152
|
-
readonly file: string;
|
|
1153
|
-
private readonly now;
|
|
1154
|
-
constructor(props?: Props$2);
|
|
1155
|
-
info(message: string, meta?: Record<string, unknown>): void;
|
|
1156
|
-
warn(message: string, meta?: Record<string, unknown>): void;
|
|
1157
|
-
error(message: string, meta?: Record<string, unknown>): void;
|
|
1158
|
-
private write;
|
|
1159
|
-
}
|
|
1160
|
-
//#endregion
|
|
1161
|
-
//#region lib/engine/logger/memory-logger.d.ts
|
|
1162
|
-
type LogEntry = {
|
|
1163
|
-
level: "info" | "warn" | "error";
|
|
1164
|
-
message: string;
|
|
1165
|
-
meta?: Record<string, unknown>;
|
|
1166
|
-
};
|
|
1167
|
-
declare class MemoryFunnelLogger extends FunnelLogger {
|
|
1168
|
-
readonly file: null;
|
|
1169
|
-
readonly entries: LogEntry[];
|
|
1170
|
-
info(message: string, meta?: Record<string, unknown>): void;
|
|
1171
|
-
warn(message: string, meta?: Record<string, unknown>): void;
|
|
1172
|
-
error(message: string, meta?: Record<string, unknown>): void;
|
|
1173
|
-
clear(): void;
|
|
1174
|
-
}
|
|
1175
|
-
//#endregion
|
|
1176
|
-
//#region lib/engine/logger/noop-logger.d.ts
|
|
1177
|
-
declare class NoopFunnelLogger extends FunnelLogger {
|
|
1178
|
-
readonly file: null;
|
|
1179
|
-
info(): void;
|
|
1180
|
-
warn(): void;
|
|
1181
|
-
error(): void;
|
|
1182
|
-
}
|
|
1183
|
-
//#endregion
|
|
1184
|
-
//#region lib/engine/time/node-clock.d.ts
|
|
1185
|
-
declare class NodeFunnelClock extends FunnelClock {
|
|
1186
|
-
now(): Date;
|
|
1187
|
-
}
|
|
1188
|
-
//#endregion
|
|
1189
|
-
//#region lib/engine/time/memory-clock.d.ts
|
|
1190
|
-
type Props$1 = {
|
|
1191
|
-
start?: Date;
|
|
1192
|
-
};
|
|
1193
|
-
declare class MemoryFunnelClock extends FunnelClock {
|
|
1194
|
-
private current;
|
|
1195
|
-
constructor(props?: Props$1);
|
|
1196
|
-
now(): Date;
|
|
1197
|
-
set(date: Date): void;
|
|
1198
|
-
advance(ms: number): void;
|
|
1199
|
-
}
|
|
1200
|
-
//#endregion
|
|
1201
|
-
//#region lib/engine/id/node-id-generator.d.ts
|
|
1202
|
-
declare class NodeFunnelIdGenerator extends FunnelIdGenerator {
|
|
1203
|
-
generate(): string;
|
|
1204
|
-
}
|
|
1205
|
-
//#endregion
|
|
1206
|
-
//#region lib/engine/id/memory-id-generator.d.ts
|
|
1207
|
-
type Props = {
|
|
1208
|
-
prefix?: string;
|
|
1209
|
-
};
|
|
1210
|
-
declare class MemoryFunnelIdGenerator extends FunnelIdGenerator {
|
|
1211
|
-
private counter;
|
|
1212
|
-
private readonly prefix;
|
|
1213
|
-
constructor(props?: Props);
|
|
1214
|
-
generate(): string;
|
|
1215
|
-
}
|
|
1216
|
-
//#endregion
|
|
1217
|
-
//#region lib/engine/http/node-http-client.d.ts
|
|
1218
|
-
declare class NodeFunnelHttpClient extends FunnelHttpClient {
|
|
1219
|
-
constructor();
|
|
1220
|
-
fetch(request: HttpRequest): Promise<HttpResponse>;
|
|
1221
|
-
}
|
|
1222
|
-
//#endregion
|
|
1223
|
-
//#region lib/engine/http/memory-http-client.d.ts
|
|
1224
|
-
type MemoryHttpResponse = {
|
|
1225
|
-
status?: number;
|
|
1226
|
-
body?: string;
|
|
1227
|
-
};
|
|
1228
|
-
type MemoryHttpHandler = (request: HttpRequest) => MemoryHttpResponse | Promise<MemoryHttpResponse>;
|
|
1229
|
-
declare class MemoryFunnelHttpClient extends FunnelHttpClient {
|
|
1230
|
-
readonly calls: HttpRequest[];
|
|
1231
|
-
private handler;
|
|
1232
|
-
on(handler: MemoryHttpHandler): this;
|
|
1233
|
-
fetch(request: HttpRequest): Promise<HttpResponse>;
|
|
1234
|
-
}
|
|
1235
|
-
//#endregion
|
|
1236
|
-
//#region lib/gateway/service-routes.d.ts
|
|
1237
|
-
type Deps = {
|
|
1238
|
-
diagnostics: FunnelDiagnostics;
|
|
1239
|
-
doctor: FunnelDoctor; /** Bearer token to gate every endpoint. Empty string disables auth (tests only). */
|
|
1240
|
-
token: string;
|
|
1241
|
-
};
|
|
1242
|
-
/**
|
|
1243
|
-
* Mountable Hono app that exposes the service layer (`FunnelDiagnostics` +
|
|
1244
|
-
* `FunnelDoctor`) over loopback HTTP. The MCP server, which lives in a
|
|
1245
|
-
* different process, calls these endpoints to drive the autonomous
|
|
1246
|
-
* troubleshooting loop. The CLI bypasses HTTP and calls the same services
|
|
1247
|
-
* directly through the in-process funnel facade, so CLI and MCP share one
|
|
1248
|
-
* code path.
|
|
1249
|
-
*/
|
|
1250
|
-
declare const buildServiceRoutes: (deps: Deps) => Hono<Env$1>;
|
|
1251
|
-
//#endregion
|
|
1252
|
-
//#region lib/cli/factory.d.ts
|
|
1253
|
-
type Env = {
|
|
1254
|
-
Bindings: {
|
|
1255
|
-
funnel: Funnel;
|
|
1256
|
-
claude: FunnelClaude;
|
|
1257
|
-
profiles: FunnelProfiles;
|
|
1258
|
-
localConfig: FunnelLocalConfig;
|
|
1259
|
-
localConfigSync: FunnelLocalConfigSync;
|
|
1260
|
-
};
|
|
1261
|
-
};
|
|
1262
|
-
declare const factory: _$hono_factory0.Factory<Env, string>;
|
|
1263
|
-
//#endregion
|
|
1264
|
-
//#region lib/cli/router/to-request.d.ts
|
|
1265
|
-
declare const toRequest: (args: string[]) => {
|
|
1266
|
-
method: string;
|
|
1267
|
-
path: string;
|
|
1268
|
-
url: string;
|
|
1269
|
-
};
|
|
1270
|
-
//#endregion
|
|
1271
|
-
//#region lib/cli/router/query-to-cli-args.d.ts
|
|
1272
|
-
declare const queryToCliArgs: (url: string, reservedKeys?: string[]) => string[];
|
|
1273
|
-
//#endregion
|
|
1274
|
-
//#region lib/cli/routes/index.d.ts
|
|
1275
|
-
declare const routes: _$hono_hono_base0.HonoBase<Env, {
|
|
1276
|
-
"/claude": {
|
|
1277
|
-
$get: {
|
|
1278
|
-
input: {
|
|
1279
|
-
query: {
|
|
1280
|
-
[x: string]: string | string[];
|
|
1281
|
-
profile?: string | undefined;
|
|
1282
|
-
channel?: string | undefined;
|
|
1283
|
-
};
|
|
1284
|
-
};
|
|
1285
|
-
output: _$zod.ZodSafeParseError<{
|
|
1286
|
-
[x: string]: unknown;
|
|
1287
|
-
profile?: string | undefined;
|
|
1288
|
-
channel?: string | undefined;
|
|
1289
|
-
}>;
|
|
1290
|
-
outputFormat: "json";
|
|
1291
|
-
status: 400;
|
|
1292
|
-
} | {
|
|
1293
|
-
input: {
|
|
1294
|
-
query: {
|
|
1295
|
-
[x: string]: string | string[];
|
|
1296
|
-
profile?: string | undefined;
|
|
1297
|
-
channel?: string | undefined;
|
|
1298
|
-
};
|
|
1299
|
-
};
|
|
1300
|
-
output: "funnel claude — launch Claude Code\n\nusage:\n funnel claude launch the first channel from funnel.json, or the default profile\n funnel claude --channel <name> with funnel.json: select that channel; without: raw launch\n funnel claude -p <name> launch a named profile\n funnel claude --profile <name> (long form)\n funnel claude [...] any other argument is forwarded to the claude CLI\n\nresolution order:\n 1. --help print this help\n 2. --profile <name> named profile (ignores funnel.json)\n 3. ./funnel.json in the current directory + --channel selects (or first wins)\n 4. --channel <name> with no funnel.json → raw launch using an existing settings.json channel\n 5. 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 (selects from funnel.json, or raw-launches if no funnel.json)\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.\n\nsee also:\n fnl docs claude full resolution order, side effects, double-launch guard\n fnl docs mcp what the MCP server exposes once Claude is up\n fnl docs debugging the diagnose → recover → verify loop\n\nprogrammable: funnel.claude.launch({ profileId | channelId, options, env, resume })";
|
|
1301
|
-
outputFormat: "text";
|
|
1302
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1303
|
-
};
|
|
1304
|
-
};
|
|
1305
|
-
} & {
|
|
1306
|
-
"/channels": {
|
|
1307
|
-
$get: {
|
|
1308
|
-
input: {};
|
|
1309
|
-
output: string;
|
|
1310
|
-
outputFormat: "text";
|
|
1311
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1312
|
-
};
|
|
1313
|
-
};
|
|
1314
|
-
} & {
|
|
1315
|
-
"/channels/add": {
|
|
1316
|
-
$post: {
|
|
1317
|
-
input: {};
|
|
1318
|
-
output: "funnel channels add — add a channel\n\nusage: funnel channels add <name> [--delivery fanout|exclusive]\n\noptions:\n --delivery routing mode (default fanout):\n fanout every connected client receives every event\n exclusive each event delivered to exactly one client (round-robin)\n\nA channel is a named event stream. After creating it, add connectors\n(Slack, Discord, GitHub, schedule) to feed events into it, then connect\nClaude Code clients to consume them.\n\nexamples:\n funnel channels add production\n funnel channels add ci-events --delivery exclusive\n\nsee also: funnel channels, funnel channels <name> connectors add";
|
|
1319
|
-
outputFormat: "text";
|
|
1320
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1321
|
-
};
|
|
1322
|
-
};
|
|
1323
|
-
} & {
|
|
1324
|
-
"/channels/add/:channel": {
|
|
1325
|
-
$post: {
|
|
1326
|
-
input: {
|
|
1327
|
-
param: {
|
|
1328
|
-
channel: string;
|
|
1329
|
-
};
|
|
1330
|
-
} & {
|
|
1331
|
-
query: {
|
|
1332
|
-
delivery?: "fanout" | "exclusive" | undefined;
|
|
1333
|
-
};
|
|
1334
|
-
};
|
|
1335
|
-
output: _$zod.ZodSafeParseError<{
|
|
1336
|
-
channel: string;
|
|
1337
|
-
}>;
|
|
1338
|
-
outputFormat: "json";
|
|
1339
|
-
status: 400;
|
|
1340
|
-
} | {
|
|
1341
|
-
input: {
|
|
1342
|
-
param: {
|
|
1343
|
-
channel: string;
|
|
1344
|
-
};
|
|
1345
|
-
} & {
|
|
1346
|
-
query: {
|
|
1347
|
-
delivery?: "fanout" | "exclusive" | undefined;
|
|
1348
|
-
};
|
|
1349
|
-
};
|
|
1350
|
-
output: _$zod.ZodSafeParseError<{
|
|
1351
|
-
delivery?: "fanout" | "exclusive" | undefined;
|
|
1352
|
-
}>;
|
|
1353
|
-
outputFormat: "json";
|
|
1354
|
-
status: 400;
|
|
1355
|
-
} | {
|
|
1356
|
-
input: {
|
|
1357
|
-
param: {
|
|
1358
|
-
channel: string;
|
|
1359
|
-
};
|
|
1360
|
-
} & {
|
|
1361
|
-
query: {
|
|
1362
|
-
delivery?: "fanout" | "exclusive" | undefined;
|
|
1363
|
-
};
|
|
1364
|
-
};
|
|
1365
|
-
output: `added channel "${string}" (id: ${string})`;
|
|
1366
|
-
outputFormat: "text";
|
|
1367
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1368
|
-
};
|
|
1369
|
-
};
|
|
1370
|
-
} & {
|
|
1371
|
-
"/channels/remove": {
|
|
1372
|
-
$post: {
|
|
1373
|
-
input: {};
|
|
1374
|
-
output: "funnel channels remove — remove a channel and all its connectors\n\nusage: funnel channels remove <name>\n\nThe channel, its connectors, and their schedules are deleted from the\nconfiguration file. The gateway drops the channel on the next reload.\nNo external resources (Slack apps, Discord bots, etc.) are touched.\n\nexamples:\n funnel channels remove staging\n\nsee also: funnel channels, funnel channels add";
|
|
1375
|
-
outputFormat: "text";
|
|
1376
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1377
|
-
};
|
|
1378
|
-
};
|
|
1379
|
-
} & {
|
|
1380
|
-
"/channels/remove/:channel": {
|
|
1381
|
-
$post: {
|
|
1382
|
-
input: {
|
|
1383
|
-
param: {
|
|
1384
|
-
channel: string;
|
|
1385
|
-
};
|
|
1386
|
-
} & {
|
|
1387
|
-
query: Record<string, never>;
|
|
1388
|
-
};
|
|
1389
|
-
output: _$zod.ZodSafeParseError<{
|
|
1390
|
-
channel: string;
|
|
1391
|
-
}>;
|
|
1392
|
-
outputFormat: "json";
|
|
1393
|
-
status: 400;
|
|
1394
|
-
} | {
|
|
1395
|
-
input: {
|
|
1396
|
-
param: {
|
|
1397
|
-
channel: string;
|
|
1398
|
-
};
|
|
1399
|
-
} & {
|
|
1400
|
-
query: Record<string, never>;
|
|
1401
|
-
};
|
|
1402
|
-
output: _$zod.ZodSafeParseError<Record<string, never>>;
|
|
1403
|
-
outputFormat: "json";
|
|
1404
|
-
status: 400;
|
|
1405
|
-
} | {
|
|
1406
|
-
input: {
|
|
1407
|
-
param: {
|
|
1408
|
-
channel: string;
|
|
1409
|
-
};
|
|
1410
|
-
} & {
|
|
1411
|
-
query: Record<string, never>;
|
|
1412
|
-
};
|
|
1413
|
-
output: `removed channel "${string}"`;
|
|
1414
|
-
outputFormat: "text";
|
|
1415
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1416
|
-
};
|
|
1417
|
-
};
|
|
1418
|
-
} & {
|
|
1419
|
-
"/channels/rename/:channel/:newName": {
|
|
1420
|
-
$post: {
|
|
1421
|
-
input: {
|
|
1422
|
-
param: {
|
|
1423
|
-
channel: string;
|
|
1424
|
-
newName: string;
|
|
1425
|
-
};
|
|
1426
|
-
} & {
|
|
1427
|
-
query: Record<string, never>;
|
|
1428
|
-
};
|
|
1429
|
-
output: _$zod.ZodSafeParseError<{
|
|
1430
|
-
channel: string;
|
|
1431
|
-
newName: string;
|
|
1432
|
-
}>;
|
|
1433
|
-
outputFormat: "json";
|
|
1434
|
-
status: 400;
|
|
1435
|
-
} | {
|
|
1436
|
-
input: {
|
|
1437
|
-
param: {
|
|
1438
|
-
channel: string;
|
|
1439
|
-
newName: string;
|
|
1440
|
-
};
|
|
1441
|
-
} & {
|
|
1442
|
-
query: Record<string, never>;
|
|
1443
|
-
};
|
|
1444
|
-
output: _$zod.ZodSafeParseError<Record<string, never>>;
|
|
1445
|
-
outputFormat: "json";
|
|
1446
|
-
status: 400;
|
|
1447
|
-
} | {
|
|
1448
|
-
input: {
|
|
1449
|
-
param: {
|
|
1450
|
-
channel: string;
|
|
1451
|
-
newName: string;
|
|
1452
|
-
};
|
|
1453
|
-
} & {
|
|
1454
|
-
query: Record<string, never>;
|
|
1455
|
-
};
|
|
1456
|
-
output: `renamed channel "${string}" to "${string}"`;
|
|
1457
|
-
outputFormat: "text";
|
|
1458
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1459
|
-
};
|
|
1460
|
-
};
|
|
1461
|
-
} & {
|
|
1462
|
-
"/channels/:channel/rename/:newName": {
|
|
1463
|
-
$post: {
|
|
1464
|
-
input: {
|
|
1465
|
-
param: {
|
|
1466
|
-
channel: string;
|
|
1467
|
-
newName: string;
|
|
1468
|
-
};
|
|
1469
|
-
} & {
|
|
1470
|
-
query: Record<string, never>;
|
|
1471
|
-
};
|
|
1472
|
-
output: _$zod.ZodSafeParseError<{
|
|
1473
|
-
channel: string;
|
|
1474
|
-
newName: string;
|
|
1475
|
-
}>;
|
|
1476
|
-
outputFormat: "json";
|
|
1477
|
-
status: 400;
|
|
1478
|
-
} | {
|
|
1479
|
-
input: {
|
|
1480
|
-
param: {
|
|
1481
|
-
channel: string;
|
|
1482
|
-
newName: string;
|
|
1483
|
-
};
|
|
1484
|
-
} & {
|
|
1485
|
-
query: Record<string, never>;
|
|
1486
|
-
};
|
|
1487
|
-
output: _$zod.ZodSafeParseError<Record<string, never>>;
|
|
1488
|
-
outputFormat: "json";
|
|
1489
|
-
status: 400;
|
|
1490
|
-
} | {
|
|
1491
|
-
input: {
|
|
1492
|
-
param: {
|
|
1493
|
-
channel: string;
|
|
1494
|
-
newName: string;
|
|
1495
|
-
};
|
|
1496
|
-
} & {
|
|
1497
|
-
query: Record<string, never>;
|
|
1498
|
-
};
|
|
1499
|
-
output: `renamed channel "${string}" to "${string}"`;
|
|
1500
|
-
outputFormat: "text";
|
|
1501
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1502
|
-
};
|
|
1503
|
-
};
|
|
1504
|
-
} & {
|
|
1505
|
-
"/channels/rename": {
|
|
1506
|
-
$post: {
|
|
1507
|
-
input: {};
|
|
1508
|
-
output: "funnel channels rename — rename a channel\n\nusage:\n funnel channels rename <old> <new>\n funnel channels <old> rename <new>\n\nRenames the channel in the configuration file. Connectors, schedules,\nand delivery mode are preserved. The gateway picks up the new name on\nthe next reload.\n\nexamples:\n funnel channels rename staging production\n funnel channels staging rename production\n\nsee also: funnel channels, funnel channels <name>";
|
|
1509
|
-
outputFormat: "text";
|
|
1510
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1511
|
-
};
|
|
1512
|
-
};
|
|
1513
|
-
} & {
|
|
1514
|
-
"/channels/:channel/rename": {
|
|
1515
|
-
$post: {
|
|
1516
|
-
input: {
|
|
1517
|
-
param: {
|
|
1518
|
-
channel: string;
|
|
1519
|
-
};
|
|
1520
|
-
};
|
|
1521
|
-
output: "funnel channels rename — rename a channel\n\nusage:\n funnel channels rename <old> <new>\n funnel channels <old> rename <new>";
|
|
1522
|
-
outputFormat: "text";
|
|
1523
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1524
|
-
};
|
|
1525
|
-
};
|
|
1526
|
-
} & {
|
|
1527
|
-
"/channels/:channel/set/delivery/:mode": {
|
|
1528
|
-
$post: {
|
|
1529
|
-
input: {
|
|
1530
|
-
param: {
|
|
1531
|
-
channel: string;
|
|
1532
|
-
mode: "fanout" | "exclusive";
|
|
1533
|
-
};
|
|
1534
|
-
};
|
|
1535
|
-
output: _$zod.ZodSafeParseError<{
|
|
1536
|
-
channel: string;
|
|
1537
|
-
mode: "fanout" | "exclusive";
|
|
1538
|
-
}>;
|
|
1539
|
-
outputFormat: "json";
|
|
1540
|
-
status: 400;
|
|
1541
|
-
} | {
|
|
1542
|
-
input: {
|
|
1543
|
-
param: {
|
|
1544
|
-
channel: string;
|
|
1545
|
-
mode: "fanout" | "exclusive";
|
|
1546
|
-
};
|
|
1547
|
-
};
|
|
1548
|
-
output: `channel "${string}" delivery set to fanout` | `channel "${string}" delivery set to exclusive`;
|
|
1549
|
-
outputFormat: "text";
|
|
1550
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1551
|
-
};
|
|
1552
|
-
};
|
|
1553
|
-
} & {
|
|
1554
|
-
"/channels/publish": {
|
|
1555
|
-
$post: {
|
|
1556
|
-
input: {};
|
|
1557
|
-
output: "funnel channels <channel> publish — push arbitrary content into a channel\n\nusage: funnel channels <channel> publish --content=\"<text>\" [--connector=<name>] [--meta-<key>=<value> ...]\n\noptions:\n --content Required. The event body delivered to subscribers.\n --connector Optional. Stamp the event with a connector name (resolved to id when found).\n --meta-<key> Optional. Repeatable. Added to meta. Example: --meta-source=cron";
|
|
1558
|
-
outputFormat: "text";
|
|
1559
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1560
|
-
};
|
|
1561
|
-
};
|
|
1562
|
-
} & {
|
|
1563
|
-
"/channels/:channel/publish": {
|
|
1564
|
-
$post: {
|
|
1565
|
-
input: {
|
|
1566
|
-
param: {
|
|
1567
|
-
channel: string;
|
|
1568
|
-
};
|
|
1569
|
-
} & {
|
|
1570
|
-
query: {
|
|
1571
|
-
[x: string]: string | string[];
|
|
1572
|
-
content: string | string[];
|
|
1573
|
-
connector?: string | undefined;
|
|
1574
|
-
};
|
|
1575
|
-
};
|
|
1576
|
-
output: _$zod.ZodSafeParseError<{
|
|
1577
|
-
channel: string;
|
|
1578
|
-
}>;
|
|
1579
|
-
outputFormat: "json";
|
|
1580
|
-
status: 400;
|
|
1581
|
-
} | {
|
|
1582
|
-
input: {
|
|
1583
|
-
param: {
|
|
1584
|
-
channel: string;
|
|
1585
|
-
};
|
|
1586
|
-
} & {
|
|
1587
|
-
query: {
|
|
1588
|
-
[x: string]: string | string[];
|
|
1589
|
-
content: string | string[];
|
|
1590
|
-
connector?: string | undefined;
|
|
1591
|
-
};
|
|
1592
|
-
};
|
|
1593
|
-
output: _$zod.ZodSafeParseError<{
|
|
1594
|
-
[x: string]: unknown;
|
|
1595
|
-
content: string;
|
|
1596
|
-
connector?: string | undefined;
|
|
1597
|
-
}>;
|
|
1598
|
-
outputFormat: "json";
|
|
1599
|
-
status: 400;
|
|
1600
|
-
} | {
|
|
1601
|
-
input: {
|
|
1602
|
-
param: {
|
|
1603
|
-
channel: string;
|
|
1604
|
-
};
|
|
1605
|
-
} & {
|
|
1606
|
-
query: {
|
|
1607
|
-
[x: string]: string | string[];
|
|
1608
|
-
content: string | string[];
|
|
1609
|
-
connector?: string | undefined;
|
|
1610
|
-
};
|
|
1611
|
-
};
|
|
1612
|
-
output: `published (offset=${number})`;
|
|
1613
|
-
outputFormat: "text";
|
|
1614
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1615
|
-
};
|
|
1616
|
-
};
|
|
1617
|
-
} & {
|
|
1618
|
-
"/channels/:channel/validate": {
|
|
1619
|
-
$get: {
|
|
1620
|
-
input: {
|
|
1621
|
-
param: {
|
|
1622
|
-
channel: string;
|
|
1623
|
-
};
|
|
1624
|
-
} & {
|
|
1625
|
-
query: Record<string, never>;
|
|
1626
|
-
};
|
|
1627
|
-
output: string;
|
|
1628
|
-
outputFormat: "text";
|
|
1629
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1630
|
-
} | {
|
|
1631
|
-
input: {
|
|
1632
|
-
param: {
|
|
1633
|
-
channel: string;
|
|
1634
|
-
};
|
|
1635
|
-
} & {
|
|
1636
|
-
query: Record<string, never>;
|
|
1637
|
-
};
|
|
1638
|
-
output: _$zod.ZodSafeParseError<{
|
|
1639
|
-
channel: string;
|
|
1640
|
-
}>;
|
|
1641
|
-
outputFormat: "json";
|
|
1642
|
-
status: 400;
|
|
1643
|
-
} | {
|
|
1644
|
-
input: {
|
|
1645
|
-
param: {
|
|
1646
|
-
channel: string;
|
|
1647
|
-
};
|
|
1648
|
-
} & {
|
|
1649
|
-
query: Record<string, never>;
|
|
1650
|
-
};
|
|
1651
|
-
output: _$zod.ZodSafeParseError<Record<string, never>>;
|
|
1652
|
-
outputFormat: "json";
|
|
1653
|
-
status: 400;
|
|
1654
|
-
};
|
|
1655
|
-
};
|
|
1656
|
-
} & {
|
|
1657
|
-
"/channels/validate": {
|
|
1658
|
-
$get: {
|
|
1659
|
-
input: {};
|
|
1660
|
-
output: "funnel channels <channel> validate — check connector configuration\n\nusage: funnel channels <channel> validate [--json]\n\noptions:\n --json output as JSON\n\nChecks that each connector has the required tokens and fields set.\nDoes not make any network calls — static config check only.\n\nexamples:\n funnel channels open-karte validate\n funnel channels open-karte validate --json";
|
|
1661
|
-
outputFormat: "text";
|
|
1662
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1663
|
-
};
|
|
1664
|
-
};
|
|
1665
|
-
} & {
|
|
1666
|
-
"/channels/:channel": {
|
|
1667
|
-
$get: {
|
|
1668
|
-
input: {
|
|
1669
|
-
param: {
|
|
1670
|
-
channel: string;
|
|
1671
|
-
};
|
|
1672
|
-
};
|
|
1673
|
-
output: string;
|
|
1674
|
-
outputFormat: "text";
|
|
1675
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1676
|
-
} | {
|
|
1677
|
-
input: {
|
|
1678
|
-
param: {
|
|
1679
|
-
channel: string;
|
|
1680
|
-
};
|
|
1681
|
-
};
|
|
1682
|
-
output: _$zod.ZodSafeParseError<{
|
|
1683
|
-
channel: string;
|
|
1684
|
-
}>;
|
|
1685
|
-
outputFormat: "json";
|
|
1686
|
-
status: 400;
|
|
1687
|
-
};
|
|
1688
|
-
};
|
|
1689
|
-
} & {
|
|
1690
|
-
"/channels/:channel/connectors": {
|
|
1691
|
-
$get: {
|
|
1692
|
-
input: {
|
|
1693
|
-
param: {
|
|
1694
|
-
channel: string;
|
|
1695
|
-
};
|
|
1696
|
-
};
|
|
1697
|
-
output: string;
|
|
1698
|
-
outputFormat: "text";
|
|
1699
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1700
|
-
} | {
|
|
1701
|
-
input: {
|
|
1702
|
-
param: {
|
|
1703
|
-
channel: string;
|
|
1704
|
-
};
|
|
1705
|
-
};
|
|
1706
|
-
output: _$zod.ZodSafeParseError<{
|
|
1707
|
-
channel: string;
|
|
1708
|
-
}>;
|
|
1709
|
-
outputFormat: "json";
|
|
1710
|
-
status: 400;
|
|
1711
|
-
};
|
|
1712
|
-
};
|
|
1713
|
-
} & {
|
|
1714
|
-
"/channels/:channel/connectors/add": {
|
|
1715
|
-
$post: {
|
|
1716
|
-
input: {
|
|
1717
|
-
param: {
|
|
1718
|
-
channel: string;
|
|
1719
|
-
};
|
|
1720
|
-
};
|
|
1721
|
-
output: "funnel channels <channel> connectors add <name> — add a connector to a channel\n\nusage:\n funnel channels <channel> connectors add <name> --type=slack --bot-token=xoxb-... --app-token=xapp-...\n funnel channels <channel> connectors add <name> --type=gh [--poll-interval=60]\n funnel channels <channel> connectors add <name> --type=discord --bot-token=...\n funnel channels <channel> connectors add <name> --type=schedule\n\nconnector types:\n slack Slack Socket Mode (requires bot-token + app-token)\n gh GitHub webhook polling\n discord Discord bot gateway\n schedule cron / one-shot timer (no external service)\n\nToken uniqueness is enforced across all channels — the same bot-token\ncannot appear in two connectors.\n\nexamples:\n funnel channels prod connectors add main-slack --type=slack --bot-token=xoxb-... --app-token=xapp-...\n funnel channels ci connectors add gh-events --type=gh --poll-interval=30\n funnel channels alerts connectors add daily --type=schedule\n\nsee also: funnel channels <channel> connectors, funnel channels <channel> connectors remove";
|
|
1722
|
-
outputFormat: "text";
|
|
1723
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1724
|
-
};
|
|
1725
|
-
};
|
|
1726
|
-
} & {
|
|
1727
|
-
"/channels/:channel/connectors/add/:connector": {
|
|
1728
|
-
$post: {
|
|
1729
|
-
input: {
|
|
1730
|
-
param: {
|
|
1731
|
-
channel: string;
|
|
1732
|
-
connector: string;
|
|
1733
|
-
};
|
|
1734
|
-
} & {
|
|
1735
|
-
query: {
|
|
1736
|
-
type: string | string[];
|
|
1737
|
-
"bot-token": string | string[];
|
|
1738
|
-
"app-token": string | string[];
|
|
1739
|
-
} | {
|
|
1740
|
-
type: string | string[];
|
|
1741
|
-
"poll-interval"?: string | string[] | undefined;
|
|
1742
|
-
} | {
|
|
1743
|
-
type: string | string[];
|
|
1744
|
-
"bot-token": string | string[];
|
|
1745
|
-
} | {
|
|
1746
|
-
type: string | string[];
|
|
1747
|
-
};
|
|
1748
|
-
};
|
|
1749
|
-
output: _$zod.ZodSafeParseError<{
|
|
1750
|
-
channel: string;
|
|
1751
|
-
connector: string;
|
|
1752
|
-
}>;
|
|
1753
|
-
outputFormat: "json";
|
|
1754
|
-
status: 400;
|
|
1755
|
-
} | {
|
|
1756
|
-
input: {
|
|
1757
|
-
param: {
|
|
1758
|
-
channel: string;
|
|
1759
|
-
connector: string;
|
|
1760
|
-
};
|
|
1761
|
-
} & {
|
|
1762
|
-
query: {
|
|
1763
|
-
type: string | string[];
|
|
1764
|
-
"bot-token": string | string[];
|
|
1765
|
-
"app-token": string | string[];
|
|
1766
|
-
} | {
|
|
1767
|
-
type: string | string[];
|
|
1768
|
-
"poll-interval"?: string | string[] | undefined;
|
|
1769
|
-
} | {
|
|
1770
|
-
type: string | string[];
|
|
1771
|
-
"bot-token": string | string[];
|
|
1772
|
-
} | {
|
|
1773
|
-
type: string | string[];
|
|
1774
|
-
};
|
|
1775
|
-
};
|
|
1776
|
-
output: _$zod.ZodSafeParseError<{
|
|
1777
|
-
type: "slack";
|
|
1778
|
-
"bot-token": string;
|
|
1779
|
-
"app-token": string;
|
|
1780
|
-
} | {
|
|
1781
|
-
type: "gh";
|
|
1782
|
-
"poll-interval"?: number | undefined;
|
|
1783
|
-
} | {
|
|
1784
|
-
type: "discord";
|
|
1785
|
-
"bot-token": string;
|
|
1786
|
-
} | {
|
|
1787
|
-
type: "schedule";
|
|
1788
|
-
}>;
|
|
1789
|
-
outputFormat: "json";
|
|
1790
|
-
status: 400;
|
|
1791
|
-
} | {
|
|
1792
|
-
input: {
|
|
1793
|
-
param: {
|
|
1794
|
-
channel: string;
|
|
1795
|
-
connector: string;
|
|
1796
|
-
};
|
|
1797
|
-
} & {
|
|
1798
|
-
query: {
|
|
1799
|
-
type: string | string[];
|
|
1800
|
-
"bot-token": string | string[];
|
|
1801
|
-
"app-token": string | string[];
|
|
1802
|
-
} | {
|
|
1803
|
-
type: string | string[];
|
|
1804
|
-
"poll-interval"?: string | string[] | undefined;
|
|
1805
|
-
} | {
|
|
1806
|
-
type: string | string[];
|
|
1807
|
-
"bot-token": string | string[];
|
|
1808
|
-
} | {
|
|
1809
|
-
type: string | string[];
|
|
1810
|
-
};
|
|
1811
|
-
};
|
|
1812
|
-
output: `added slack connector "${string}" to channel "${string}"`;
|
|
1813
|
-
outputFormat: "text";
|
|
1814
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1815
|
-
} | {
|
|
1816
|
-
input: {
|
|
1817
|
-
param: {
|
|
1818
|
-
channel: string;
|
|
1819
|
-
connector: string;
|
|
1820
|
-
};
|
|
1821
|
-
} & {
|
|
1822
|
-
query: {
|
|
1823
|
-
type: string | string[];
|
|
1824
|
-
"bot-token": string | string[];
|
|
1825
|
-
"app-token": string | string[];
|
|
1826
|
-
} | {
|
|
1827
|
-
type: string | string[];
|
|
1828
|
-
"poll-interval"?: string | string[] | undefined;
|
|
1829
|
-
} | {
|
|
1830
|
-
type: string | string[];
|
|
1831
|
-
"bot-token": string | string[];
|
|
1832
|
-
} | {
|
|
1833
|
-
type: string | string[];
|
|
1834
|
-
};
|
|
1835
|
-
};
|
|
1836
|
-
output: `added gh connector "${string}" to channel "${string}"`;
|
|
1837
|
-
outputFormat: "text";
|
|
1838
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1839
|
-
} | {
|
|
1840
|
-
input: {
|
|
1841
|
-
param: {
|
|
1842
|
-
channel: string;
|
|
1843
|
-
connector: string;
|
|
1844
|
-
};
|
|
1845
|
-
} & {
|
|
1846
|
-
query: {
|
|
1847
|
-
type: string | string[];
|
|
1848
|
-
"bot-token": string | string[];
|
|
1849
|
-
"app-token": string | string[];
|
|
1850
|
-
} | {
|
|
1851
|
-
type: string | string[];
|
|
1852
|
-
"poll-interval"?: string | string[] | undefined;
|
|
1853
|
-
} | {
|
|
1854
|
-
type: string | string[];
|
|
1855
|
-
"bot-token": string | string[];
|
|
1856
|
-
} | {
|
|
1857
|
-
type: string | string[];
|
|
1858
|
-
};
|
|
1859
|
-
};
|
|
1860
|
-
output: `added discord connector "${string}" to channel "${string}"`;
|
|
1861
|
-
outputFormat: "text";
|
|
1862
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1863
|
-
} | {
|
|
1864
|
-
input: {
|
|
1865
|
-
param: {
|
|
1866
|
-
channel: string;
|
|
1867
|
-
connector: string;
|
|
1868
|
-
};
|
|
1869
|
-
} & {
|
|
1870
|
-
query: {
|
|
1871
|
-
type: string | string[];
|
|
1872
|
-
"bot-token": string | string[];
|
|
1873
|
-
"app-token": string | string[];
|
|
1874
|
-
} | {
|
|
1875
|
-
type: string | string[];
|
|
1876
|
-
"poll-interval"?: string | string[] | undefined;
|
|
1877
|
-
} | {
|
|
1878
|
-
type: string | string[];
|
|
1879
|
-
"bot-token": string | string[];
|
|
1880
|
-
} | {
|
|
1881
|
-
type: string | string[];
|
|
1882
|
-
};
|
|
1883
|
-
};
|
|
1884
|
-
output: `added schedule connector "${string}" to channel "${string}"`;
|
|
1885
|
-
outputFormat: "text";
|
|
1886
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1887
|
-
};
|
|
1888
|
-
};
|
|
1889
|
-
} & {
|
|
1890
|
-
"/channels/:channel/connectors/remove": {
|
|
1891
|
-
$post: {
|
|
1892
|
-
input: {
|
|
1893
|
-
param: {
|
|
1894
|
-
channel: string;
|
|
1895
|
-
};
|
|
1896
|
-
};
|
|
1897
|
-
output: "funnel channels <channel> connectors remove <connector> — remove a connector\n\nusage: funnel channels <channel> connectors remove <connector>\n\nRemoves the connector from the channel configuration. The gateway drops\nit on the next reload. No external resources (Slack apps, Discord bots,\nGitHub webhooks) are touched.\n\nexamples:\n funnel channels production connectors remove slack-main\n\nsee also: funnel channels <channel> connectors, funnel channels <channel> connectors add";
|
|
1898
|
-
outputFormat: "text";
|
|
1899
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1900
|
-
};
|
|
1901
|
-
};
|
|
1902
|
-
} & {
|
|
1903
|
-
"/channels/:channel/connectors/remove/:connector": {
|
|
1904
|
-
$post: {
|
|
1905
|
-
input: {
|
|
1906
|
-
param: {
|
|
1907
|
-
channel: string;
|
|
1908
|
-
connector: string;
|
|
1909
|
-
};
|
|
1910
|
-
} & {
|
|
1911
|
-
query: Record<string, never>;
|
|
1912
|
-
};
|
|
1913
|
-
output: _$zod.ZodSafeParseError<{
|
|
1914
|
-
channel: string;
|
|
1915
|
-
connector: string;
|
|
1916
|
-
}>;
|
|
1917
|
-
outputFormat: "json";
|
|
1918
|
-
status: 400;
|
|
1919
|
-
} | {
|
|
1920
|
-
input: {
|
|
1921
|
-
param: {
|
|
1922
|
-
channel: string;
|
|
1923
|
-
connector: string;
|
|
1924
|
-
};
|
|
1925
|
-
} & {
|
|
1926
|
-
query: Record<string, never>;
|
|
1927
|
-
};
|
|
1928
|
-
output: _$zod.ZodSafeParseError<Record<string, never>>;
|
|
1929
|
-
outputFormat: "json";
|
|
1930
|
-
status: 400;
|
|
1931
|
-
} | {
|
|
1932
|
-
input: {
|
|
1933
|
-
param: {
|
|
1934
|
-
channel: string;
|
|
1935
|
-
connector: string;
|
|
1936
|
-
};
|
|
1937
|
-
} & {
|
|
1938
|
-
query: Record<string, never>;
|
|
1939
|
-
};
|
|
1940
|
-
output: `removed connector "${string}" from channel "${string}"`;
|
|
1941
|
-
outputFormat: "text";
|
|
1942
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1943
|
-
};
|
|
1944
|
-
};
|
|
1945
|
-
} & {
|
|
1946
|
-
"/channels/:channel/connectors/set": {
|
|
1947
|
-
$post: {
|
|
1948
|
-
input: {
|
|
1949
|
-
param: {
|
|
1950
|
-
channel: string;
|
|
1951
|
-
};
|
|
1952
|
-
};
|
|
1953
|
-
output: "funnel channels <channel> connectors set <connector> — update connector fields\n\nusage:\n funnel channels <ch> connectors set <conn> [--bot-token=...] [--app-token=...] # slack\n funnel channels <ch> connectors set <conn> [--bot-token=...] # discord\n funnel channels <ch> connectors set <conn> [--poll-interval=N] # gh";
|
|
1954
|
-
outputFormat: "text";
|
|
1955
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
1956
|
-
};
|
|
1957
|
-
};
|
|
1958
|
-
} & {
|
|
1959
|
-
"/channels/:channel/connectors/set/:connector": {
|
|
1960
|
-
$post: {
|
|
1961
|
-
input: {
|
|
1962
|
-
param: {
|
|
1963
|
-
channel: string;
|
|
1964
|
-
connector: string;
|
|
1965
|
-
};
|
|
1966
|
-
} & {
|
|
1967
|
-
query: {
|
|
1968
|
-
[x: string]: string | string[];
|
|
1969
|
-
"bot-token"?: string | undefined;
|
|
1970
|
-
"app-token"?: string | undefined;
|
|
1971
|
-
"poll-interval"?: string | string[] | undefined;
|
|
1972
|
-
};
|
|
1973
|
-
};
|
|
1974
|
-
output: _$zod.ZodSafeParseError<{
|
|
1975
|
-
channel: string;
|
|
1976
|
-
connector: string;
|
|
1977
|
-
}>;
|
|
1978
|
-
outputFormat: "json";
|
|
1979
|
-
status: 400;
|
|
1980
|
-
} | {
|
|
1981
|
-
input: {
|
|
1982
|
-
param: {
|
|
1983
|
-
channel: string;
|
|
1984
|
-
connector: string;
|
|
1985
|
-
};
|
|
1986
|
-
} & {
|
|
1987
|
-
query: {
|
|
1988
|
-
[x: string]: string | string[];
|
|
1989
|
-
"bot-token"?: string | undefined;
|
|
1990
|
-
"app-token"?: string | undefined;
|
|
1991
|
-
"poll-interval"?: string | string[] | undefined;
|
|
1992
|
-
};
|
|
1993
|
-
};
|
|
1994
|
-
output: _$zod.ZodSafeParseError<{
|
|
1995
|
-
[x: string]: unknown;
|
|
1996
|
-
"bot-token"?: string | undefined;
|
|
1997
|
-
"app-token"?: string | undefined;
|
|
1998
|
-
"poll-interval"?: number | undefined;
|
|
1999
|
-
}>;
|
|
2000
|
-
outputFormat: "json";
|
|
2001
|
-
status: 400;
|
|
2002
|
-
} | {
|
|
2003
|
-
input: {
|
|
2004
|
-
param: {
|
|
2005
|
-
channel: string;
|
|
2006
|
-
connector: string;
|
|
2007
|
-
};
|
|
2008
|
-
} & {
|
|
2009
|
-
query: {
|
|
2010
|
-
[x: string]: string | string[];
|
|
2011
|
-
"bot-token"?: string | undefined;
|
|
2012
|
-
"app-token"?: string | undefined;
|
|
2013
|
-
"poll-interval"?: string | string[] | undefined;
|
|
2014
|
-
};
|
|
2015
|
-
};
|
|
2016
|
-
output: `updated connector "${string}" in channel "${string}"`;
|
|
2017
|
-
outputFormat: "text";
|
|
2018
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2019
|
-
};
|
|
2020
|
-
};
|
|
2021
|
-
} & {
|
|
2022
|
-
"/channels/:channel/connectors/rename/:connector/:newName": {
|
|
2023
|
-
$post: {
|
|
2024
|
-
input: {
|
|
2025
|
-
param: {
|
|
2026
|
-
channel: string;
|
|
2027
|
-
connector: string;
|
|
2028
|
-
newName: string;
|
|
2029
|
-
};
|
|
2030
|
-
} & {
|
|
2031
|
-
query: Record<string, never>;
|
|
2032
|
-
};
|
|
2033
|
-
output: _$zod.ZodSafeParseError<{
|
|
2034
|
-
channel: string;
|
|
2035
|
-
connector: string;
|
|
2036
|
-
newName: string;
|
|
2037
|
-
}>;
|
|
2038
|
-
outputFormat: "json";
|
|
2039
|
-
status: 400;
|
|
2040
|
-
} | {
|
|
2041
|
-
input: {
|
|
2042
|
-
param: {
|
|
2043
|
-
channel: string;
|
|
2044
|
-
connector: string;
|
|
2045
|
-
newName: string;
|
|
2046
|
-
};
|
|
2047
|
-
} & {
|
|
2048
|
-
query: Record<string, never>;
|
|
2049
|
-
};
|
|
2050
|
-
output: _$zod.ZodSafeParseError<Record<string, never>>;
|
|
2051
|
-
outputFormat: "json";
|
|
2052
|
-
status: 400;
|
|
2053
|
-
} | {
|
|
2054
|
-
input: {
|
|
2055
|
-
param: {
|
|
2056
|
-
channel: string;
|
|
2057
|
-
connector: string;
|
|
2058
|
-
newName: string;
|
|
2059
|
-
};
|
|
2060
|
-
} & {
|
|
2061
|
-
query: Record<string, never>;
|
|
2062
|
-
};
|
|
2063
|
-
output: `renamed connector "${string}" to "${string}"`;
|
|
2064
|
-
outputFormat: "text";
|
|
2065
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2066
|
-
};
|
|
2067
|
-
};
|
|
2068
|
-
} & {
|
|
2069
|
-
"/channels/:channel/connectors/:connector/rename/:newName": {
|
|
2070
|
-
$post: {
|
|
2071
|
-
input: {
|
|
2072
|
-
param: {
|
|
2073
|
-
channel: string;
|
|
2074
|
-
connector: string;
|
|
2075
|
-
newName: string;
|
|
2076
|
-
};
|
|
2077
|
-
} & {
|
|
2078
|
-
query: Record<string, never>;
|
|
2079
|
-
};
|
|
2080
|
-
output: _$zod.ZodSafeParseError<{
|
|
2081
|
-
channel: string;
|
|
2082
|
-
connector: string;
|
|
2083
|
-
newName: string;
|
|
2084
|
-
}>;
|
|
2085
|
-
outputFormat: "json";
|
|
2086
|
-
status: 400;
|
|
2087
|
-
} | {
|
|
2088
|
-
input: {
|
|
2089
|
-
param: {
|
|
2090
|
-
channel: string;
|
|
2091
|
-
connector: string;
|
|
2092
|
-
newName: string;
|
|
2093
|
-
};
|
|
2094
|
-
} & {
|
|
2095
|
-
query: Record<string, never>;
|
|
2096
|
-
};
|
|
2097
|
-
output: _$zod.ZodSafeParseError<Record<string, never>>;
|
|
2098
|
-
outputFormat: "json";
|
|
2099
|
-
status: 400;
|
|
2100
|
-
} | {
|
|
2101
|
-
input: {
|
|
2102
|
-
param: {
|
|
2103
|
-
channel: string;
|
|
2104
|
-
connector: string;
|
|
2105
|
-
newName: string;
|
|
2106
|
-
};
|
|
2107
|
-
} & {
|
|
2108
|
-
query: Record<string, never>;
|
|
2109
|
-
};
|
|
2110
|
-
output: `renamed connector "${string}" to "${string}"`;
|
|
2111
|
-
outputFormat: "text";
|
|
2112
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2113
|
-
};
|
|
2114
|
-
};
|
|
2115
|
-
} & {
|
|
2116
|
-
"/channels/:channel/connectors/rename": {
|
|
2117
|
-
$post: {
|
|
2118
|
-
input: {
|
|
2119
|
-
param: {
|
|
2120
|
-
channel: string;
|
|
2121
|
-
};
|
|
2122
|
-
};
|
|
2123
|
-
output: "funnel channels <channel> connectors rename <old> <new> — rename a connector\n\nusage: funnel channels <channel> connectors rename <old> <new>\n\nRenames the connector in the configuration file. Tokens, type, and\nschedules are preserved. The gateway picks up the new name on the\nnext reload.\n\nexamples:\n funnel channels production connectors rename slack-1 slack-main\n\nsee also: funnel channels <channel> connectors";
|
|
2124
|
-
outputFormat: "text";
|
|
2125
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2126
|
-
};
|
|
2127
|
-
};
|
|
2128
|
-
} & {
|
|
2129
|
-
"/channels/:channel/connectors/:connector/rename": {
|
|
2130
|
-
$post: {
|
|
2131
|
-
input: {
|
|
2132
|
-
param: {
|
|
2133
|
-
channel: string;
|
|
2134
|
-
} & {
|
|
2135
|
-
connector: string;
|
|
2136
|
-
};
|
|
2137
|
-
};
|
|
2138
|
-
output: "funnel channels <channel> connectors rename <connector> <new-name>\n\nusage: funnel channels <channel> connectors rename <connector> <new-name>";
|
|
2139
|
-
outputFormat: "text";
|
|
2140
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2141
|
-
};
|
|
2142
|
-
};
|
|
2143
|
-
} & {
|
|
2144
|
-
"/channels/:channel/connectors/:connector/request": {
|
|
2145
|
-
$post: {
|
|
2146
|
-
input: {
|
|
2147
|
-
param: {
|
|
2148
|
-
channel: string;
|
|
2149
|
-
connector: string;
|
|
2150
|
-
};
|
|
2151
|
-
} & {
|
|
2152
|
-
query: {
|
|
2153
|
-
[x: string]: string | string[];
|
|
2154
|
-
method: string | string[];
|
|
2155
|
-
path?: string | undefined;
|
|
2156
|
-
};
|
|
2157
|
-
};
|
|
2158
|
-
output: string;
|
|
2159
|
-
outputFormat: "text";
|
|
2160
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2161
|
-
} | {
|
|
2162
|
-
input: {
|
|
2163
|
-
param: {
|
|
2164
|
-
channel: string;
|
|
2165
|
-
connector: string;
|
|
2166
|
-
};
|
|
2167
|
-
} & {
|
|
2168
|
-
query: {
|
|
2169
|
-
[x: string]: string | string[];
|
|
2170
|
-
method: string | string[];
|
|
2171
|
-
path?: string | undefined;
|
|
2172
|
-
};
|
|
2173
|
-
};
|
|
2174
|
-
output: _$zod.ZodSafeParseError<{
|
|
2175
|
-
channel: string;
|
|
2176
|
-
connector: string;
|
|
2177
|
-
}>;
|
|
2178
|
-
outputFormat: "json";
|
|
2179
|
-
status: 400;
|
|
2180
|
-
} | {
|
|
2181
|
-
input: {
|
|
2182
|
-
param: {
|
|
2183
|
-
channel: string;
|
|
2184
|
-
connector: string;
|
|
2185
|
-
};
|
|
2186
|
-
} & {
|
|
2187
|
-
query: {
|
|
2188
|
-
[x: string]: string | string[];
|
|
2189
|
-
method: string | string[];
|
|
2190
|
-
path?: string | undefined;
|
|
2191
|
-
};
|
|
2192
|
-
};
|
|
2193
|
-
output: _$zod.ZodSafeParseError<{
|
|
2194
|
-
[x: string]: unknown;
|
|
2195
|
-
method: string;
|
|
2196
|
-
path?: string | undefined;
|
|
2197
|
-
}>;
|
|
2198
|
-
outputFormat: "json";
|
|
2199
|
-
status: 400;
|
|
2200
|
-
};
|
|
2201
|
-
};
|
|
2202
|
-
} & {
|
|
2203
|
-
"/channels/:channel/connectors/:connector": {
|
|
2204
|
-
$get: {
|
|
2205
|
-
input: {
|
|
2206
|
-
param: {
|
|
2207
|
-
channel: string;
|
|
2208
|
-
connector: string;
|
|
2209
|
-
};
|
|
2210
|
-
};
|
|
2211
|
-
output: string;
|
|
2212
|
-
outputFormat: "text";
|
|
2213
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2214
|
-
} | {
|
|
2215
|
-
input: {
|
|
2216
|
-
param: {
|
|
2217
|
-
channel: string;
|
|
2218
|
-
connector: string;
|
|
2219
|
-
};
|
|
2220
|
-
};
|
|
2221
|
-
output: _$zod.ZodSafeParseError<{
|
|
2222
|
-
channel: string;
|
|
2223
|
-
connector: string;
|
|
2224
|
-
}>;
|
|
2225
|
-
outputFormat: "json";
|
|
2226
|
-
status: 400;
|
|
2227
|
-
};
|
|
2228
|
-
};
|
|
2229
|
-
} & {
|
|
2230
|
-
"/channels/:channel/connectors/:connector/schedules": {
|
|
2231
|
-
$get: {
|
|
2232
|
-
input: {
|
|
2233
|
-
param: {
|
|
2234
|
-
channel: string;
|
|
2235
|
-
connector: string;
|
|
2236
|
-
};
|
|
2237
|
-
};
|
|
2238
|
-
output: string;
|
|
2239
|
-
outputFormat: "text";
|
|
2240
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2241
|
-
} | {
|
|
2242
|
-
input: {
|
|
2243
|
-
param: {
|
|
2244
|
-
channel: string;
|
|
2245
|
-
connector: string;
|
|
2246
|
-
};
|
|
2247
|
-
};
|
|
2248
|
-
output: _$zod.ZodSafeParseError<{
|
|
2249
|
-
channel: string;
|
|
2250
|
-
connector: string;
|
|
2251
|
-
}>;
|
|
2252
|
-
outputFormat: "json";
|
|
2253
|
-
status: 400;
|
|
2254
|
-
};
|
|
2255
|
-
};
|
|
2256
|
-
} & {
|
|
2257
|
-
"/channels/:channel/connectors/:connector/schedules/add": {
|
|
2258
|
-
$post: {
|
|
2259
|
-
input: {
|
|
2260
|
-
param: {
|
|
2261
|
-
channel: string;
|
|
2262
|
-
} & {
|
|
2263
|
-
connector: string;
|
|
2264
|
-
};
|
|
2265
|
-
};
|
|
2266
|
-
output: "funnel channels <ch> connectors <conn> schedules add <id> — add a schedule entry\n\nusage: funnel channels <ch> connectors <conn> schedules add <id> --cron=\"*/5 * * * *\" --prompt=\"...\" [--enabled=true] [--catchup-policy=latest|all|skip]";
|
|
2267
|
-
outputFormat: "text";
|
|
2268
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2269
|
-
};
|
|
2270
|
-
};
|
|
2271
|
-
} & {
|
|
2272
|
-
"/channels/:channel/connectors/:connector/schedules/add/:id": {
|
|
2273
|
-
$post: {
|
|
2274
|
-
input: {
|
|
2275
|
-
param: {
|
|
2276
|
-
channel: string;
|
|
2277
|
-
connector: string;
|
|
2278
|
-
id: string;
|
|
2279
|
-
};
|
|
2280
|
-
} & {
|
|
2281
|
-
query: {
|
|
2282
|
-
cron: string;
|
|
2283
|
-
prompt: string;
|
|
2284
|
-
enabled?: "true" | "false" | undefined;
|
|
2285
|
-
"catchup-policy"?: "latest" | "all" | "skip" | undefined;
|
|
2286
|
-
};
|
|
2287
|
-
};
|
|
2288
|
-
output: _$zod.ZodSafeParseError<{
|
|
2289
|
-
channel: string;
|
|
2290
|
-
connector: string;
|
|
2291
|
-
id: string;
|
|
2292
|
-
}>;
|
|
2293
|
-
outputFormat: "json";
|
|
2294
|
-
status: 400;
|
|
2295
|
-
} | {
|
|
2296
|
-
input: {
|
|
2297
|
-
param: {
|
|
2298
|
-
channel: string;
|
|
2299
|
-
connector: string;
|
|
2300
|
-
id: string;
|
|
2301
|
-
};
|
|
2302
|
-
} & {
|
|
2303
|
-
query: {
|
|
2304
|
-
cron: string;
|
|
2305
|
-
prompt: string;
|
|
2306
|
-
enabled?: "true" | "false" | undefined;
|
|
2307
|
-
"catchup-policy"?: "latest" | "all" | "skip" | undefined;
|
|
2308
|
-
};
|
|
2309
|
-
};
|
|
2310
|
-
output: _$zod.ZodSafeParseError<{
|
|
2311
|
-
cron: string;
|
|
2312
|
-
prompt: string;
|
|
2313
|
-
enabled?: "true" | "false" | undefined;
|
|
2314
|
-
"catchup-policy"?: "latest" | "all" | "skip" | undefined;
|
|
2315
|
-
}>;
|
|
2316
|
-
outputFormat: "json";
|
|
2317
|
-
status: 400;
|
|
2318
|
-
} | {
|
|
2319
|
-
input: {
|
|
2320
|
-
param: {
|
|
2321
|
-
channel: string;
|
|
2322
|
-
connector: string;
|
|
2323
|
-
id: string;
|
|
2324
|
-
};
|
|
2325
|
-
} & {
|
|
2326
|
-
query: {
|
|
2327
|
-
cron: string;
|
|
2328
|
-
prompt: string;
|
|
2329
|
-
enabled?: "true" | "false" | undefined;
|
|
2330
|
-
"catchup-policy"?: "latest" | "all" | "skip" | undefined;
|
|
2331
|
-
};
|
|
2332
|
-
};
|
|
2333
|
-
output: `added schedule entry "${string}"`;
|
|
2334
|
-
outputFormat: "text";
|
|
2335
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2336
|
-
};
|
|
2337
|
-
};
|
|
2338
|
-
} & {
|
|
2339
|
-
"/channels/:channel/connectors/:connector/schedules/remove": {
|
|
2340
|
-
$post: {
|
|
2341
|
-
input: {
|
|
2342
|
-
param: {
|
|
2343
|
-
channel: string;
|
|
2344
|
-
} & {
|
|
2345
|
-
connector: string;
|
|
2346
|
-
};
|
|
2347
|
-
};
|
|
2348
|
-
output: "funnel channels <ch> connectors <conn> schedules remove <id>\n\nusage: funnel channels <ch> connectors <conn> schedules remove <id>";
|
|
2349
|
-
outputFormat: "text";
|
|
2350
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2351
|
-
};
|
|
2352
|
-
};
|
|
2353
|
-
} & {
|
|
2354
|
-
"/channels/:channel/connectors/:connector/schedules/remove/:id": {
|
|
2355
|
-
$post: {
|
|
2356
|
-
input: {
|
|
2357
|
-
param: {
|
|
2358
|
-
channel: string;
|
|
2359
|
-
connector: string;
|
|
2360
|
-
id: string;
|
|
2361
|
-
};
|
|
2362
|
-
} & {
|
|
2363
|
-
query: Record<string, never>;
|
|
2364
|
-
};
|
|
2365
|
-
output: _$zod.ZodSafeParseError<{
|
|
2366
|
-
channel: string;
|
|
2367
|
-
connector: string;
|
|
2368
|
-
id: string;
|
|
2369
|
-
}>;
|
|
2370
|
-
outputFormat: "json";
|
|
2371
|
-
status: 400;
|
|
2372
|
-
} | {
|
|
2373
|
-
input: {
|
|
2374
|
-
param: {
|
|
2375
|
-
channel: string;
|
|
2376
|
-
connector: string;
|
|
2377
|
-
id: string;
|
|
2378
|
-
};
|
|
2379
|
-
} & {
|
|
2380
|
-
query: Record<string, never>;
|
|
2381
|
-
};
|
|
2382
|
-
output: _$zod.ZodSafeParseError<Record<string, never>>;
|
|
2383
|
-
outputFormat: "json";
|
|
2384
|
-
status: 400;
|
|
2385
|
-
} | {
|
|
2386
|
-
input: {
|
|
2387
|
-
param: {
|
|
2388
|
-
channel: string;
|
|
2389
|
-
connector: string;
|
|
2390
|
-
id: string;
|
|
2391
|
-
};
|
|
2392
|
-
} & {
|
|
2393
|
-
query: Record<string, never>;
|
|
2394
|
-
};
|
|
2395
|
-
output: `removed schedule entry "${string}"`;
|
|
2396
|
-
outputFormat: "text";
|
|
2397
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2398
|
-
};
|
|
2399
|
-
};
|
|
2400
|
-
} & {
|
|
2401
|
-
"/profiles": {
|
|
2402
|
-
$get: {
|
|
2403
|
-
input: {};
|
|
2404
|
-
output: string;
|
|
2405
|
-
outputFormat: "text";
|
|
2406
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2407
|
-
};
|
|
2408
|
-
};
|
|
2409
|
-
} & {
|
|
2410
|
-
"/profiles/add": {
|
|
2411
|
-
$post: {
|
|
2412
|
-
input: {};
|
|
2413
|
-
output: "funnel profiles add — add a profile\n\nusage: funnel profiles add <name> --path <path> --channel <channel-name> [recipe]\n\noptions:\n --path working directory passed to claude as cwd\n --channel channel name (resolved to channel id internally)\n --agent sub-agent name, prepended to the launch argv as --agent <name>\n --options extra launch argv as one whitespace-split string (e.g. \"--brief\")\n --env env vars layered under the process, as \"KEY=VAL,KEY2=VAL2\"\n --no-resume start a fresh claude session every launch (default resumes)\n\nThe launch recipe (--agent / --options / --env / --resume) lives on the\nprofile; the channel only declares transport (connectors / delivery).";
|
|
2414
|
-
outputFormat: "text";
|
|
2415
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2416
|
-
};
|
|
2417
|
-
};
|
|
2418
|
-
} & {
|
|
2419
|
-
"/profiles/add/:profile": {
|
|
2420
|
-
$post: {
|
|
2421
|
-
input: {
|
|
2422
|
-
param: {
|
|
2423
|
-
profile: string;
|
|
2424
|
-
};
|
|
2425
|
-
} & {
|
|
2426
|
-
query: {
|
|
2427
|
-
path: string;
|
|
2428
|
-
channel: string;
|
|
2429
|
-
agent?: string | undefined;
|
|
2430
|
-
options?: string | undefined;
|
|
2431
|
-
env?: string | undefined;
|
|
2432
|
-
resume?: string | undefined;
|
|
2433
|
-
"no-resume"?: string | undefined;
|
|
2434
|
-
};
|
|
2435
|
-
};
|
|
2436
|
-
output: _$zod.ZodSafeParseError<{
|
|
2437
|
-
profile: string;
|
|
2438
|
-
}>;
|
|
2439
|
-
outputFormat: "json";
|
|
2440
|
-
status: 400;
|
|
2441
|
-
} | {
|
|
2442
|
-
input: {
|
|
2443
|
-
param: {
|
|
2444
|
-
profile: string;
|
|
2445
|
-
};
|
|
2446
|
-
} & {
|
|
2447
|
-
query: {
|
|
2448
|
-
path: string;
|
|
2449
|
-
channel: string;
|
|
2450
|
-
agent?: string | undefined;
|
|
2451
|
-
options?: string | undefined;
|
|
2452
|
-
env?: string | undefined;
|
|
2453
|
-
resume?: string | undefined;
|
|
2454
|
-
"no-resume"?: string | undefined;
|
|
2455
|
-
};
|
|
2456
|
-
};
|
|
2457
|
-
output: _$zod.ZodSafeParseError<{
|
|
2458
|
-
path: string;
|
|
2459
|
-
channel: string;
|
|
2460
|
-
agent?: string | undefined;
|
|
2461
|
-
options?: string | undefined;
|
|
2462
|
-
env?: string | undefined;
|
|
2463
|
-
resume?: string | undefined;
|
|
2464
|
-
"no-resume"?: string | undefined;
|
|
2465
|
-
}>;
|
|
2466
|
-
outputFormat: "json";
|
|
2467
|
-
status: 400;
|
|
2468
|
-
} | {
|
|
2469
|
-
input: {
|
|
2470
|
-
param: {
|
|
2471
|
-
profile: string;
|
|
2472
|
-
};
|
|
2473
|
-
} & {
|
|
2474
|
-
query: {
|
|
2475
|
-
path: string;
|
|
2476
|
-
channel: string;
|
|
2477
|
-
agent?: string | undefined;
|
|
2478
|
-
options?: string | undefined;
|
|
2479
|
-
env?: string | undefined;
|
|
2480
|
-
resume?: string | undefined;
|
|
2481
|
-
"no-resume"?: string | undefined;
|
|
2482
|
-
};
|
|
2483
|
-
};
|
|
2484
|
-
output: `added profile "${string}"`;
|
|
2485
|
-
outputFormat: "text";
|
|
2486
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2487
|
-
};
|
|
2488
|
-
};
|
|
2489
|
-
} & {
|
|
2490
|
-
"/profiles/set": {
|
|
2491
|
-
$post: {
|
|
2492
|
-
input: {};
|
|
2493
|
-
output: "funnel profiles <name> set — update a profile\n\nusage: funnel profiles <name> set [--path <path>] [--channel <channel-name>] [recipe]\n\noptions:\n --path working directory passed to claude as cwd\n --channel channel name (resolved to channel id internally)\n --agent sub-agent name, prepended to the launch argv as --agent <name>\n --options extra launch argv as one whitespace-split string (e.g. \"--brief\")\n --env env vars layered under the process, as \"KEY=VAL,KEY2=VAL2\"\n --resume / --no-resume toggle claude session reuse\n\nOnly the flags you pass are changed; --agent and --options together replace\nthe profile's whole options list.";
|
|
2494
|
-
outputFormat: "text";
|
|
2495
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2496
|
-
};
|
|
2497
|
-
};
|
|
2498
|
-
} & {
|
|
2499
|
-
"/profiles/set/:profile": {
|
|
2500
|
-
$post: {
|
|
2501
|
-
input: {
|
|
2502
|
-
param: {
|
|
2503
|
-
profile: string;
|
|
2504
|
-
};
|
|
2505
|
-
} & {
|
|
2506
|
-
query: {
|
|
2507
|
-
path?: string | undefined;
|
|
2508
|
-
channel?: string | undefined;
|
|
2509
|
-
agent?: string | undefined;
|
|
2510
|
-
options?: string | undefined;
|
|
2511
|
-
env?: string | undefined;
|
|
2512
|
-
resume?: string | undefined;
|
|
2513
|
-
"no-resume"?: string | undefined;
|
|
2514
|
-
};
|
|
2515
|
-
};
|
|
2516
|
-
output: _$zod.ZodSafeParseError<{
|
|
2517
|
-
profile: string;
|
|
2518
|
-
}>;
|
|
2519
|
-
outputFormat: "json";
|
|
2520
|
-
status: 400;
|
|
2521
|
-
} | {
|
|
2522
|
-
input: {
|
|
2523
|
-
param: {
|
|
2524
|
-
profile: string;
|
|
2525
|
-
};
|
|
2526
|
-
} & {
|
|
2527
|
-
query: {
|
|
2528
|
-
path?: string | undefined;
|
|
2529
|
-
channel?: string | undefined;
|
|
2530
|
-
agent?: string | undefined;
|
|
2531
|
-
options?: string | undefined;
|
|
2532
|
-
env?: string | undefined;
|
|
2533
|
-
resume?: string | undefined;
|
|
2534
|
-
"no-resume"?: string | undefined;
|
|
2535
|
-
};
|
|
2536
|
-
};
|
|
2537
|
-
output: _$zod.ZodSafeParseError<{
|
|
2538
|
-
path?: string | undefined;
|
|
2539
|
-
channel?: string | undefined;
|
|
2540
|
-
agent?: string | undefined;
|
|
2541
|
-
options?: string | undefined;
|
|
2542
|
-
env?: string | undefined;
|
|
2543
|
-
resume?: string | undefined;
|
|
2544
|
-
"no-resume"?: string | undefined;
|
|
2545
|
-
}>;
|
|
2546
|
-
outputFormat: "json";
|
|
2547
|
-
status: 400;
|
|
2548
|
-
} | {
|
|
2549
|
-
input: {
|
|
2550
|
-
param: {
|
|
2551
|
-
profile: string;
|
|
2552
|
-
};
|
|
2553
|
-
} & {
|
|
2554
|
-
query: {
|
|
2555
|
-
path?: string | undefined;
|
|
2556
|
-
channel?: string | undefined;
|
|
2557
|
-
agent?: string | undefined;
|
|
2558
|
-
options?: string | undefined;
|
|
2559
|
-
env?: string | undefined;
|
|
2560
|
-
resume?: string | undefined;
|
|
2561
|
-
"no-resume"?: string | undefined;
|
|
2562
|
-
};
|
|
2563
|
-
};
|
|
2564
|
-
output: `updated profile "${string}"`;
|
|
2565
|
-
outputFormat: "text";
|
|
2566
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2567
|
-
};
|
|
2568
|
-
};
|
|
2569
|
-
} & {
|
|
2570
|
-
"/profiles/remove": {
|
|
2571
|
-
$post: {
|
|
2572
|
-
input: {};
|
|
2573
|
-
output: "funnel profiles remove — remove a profile\n\nusage: funnel profiles remove <name>";
|
|
2574
|
-
outputFormat: "text";
|
|
2575
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2576
|
-
};
|
|
2577
|
-
};
|
|
2578
|
-
} & {
|
|
2579
|
-
"/profiles/remove/:profile": {
|
|
2580
|
-
$post: {
|
|
2581
|
-
input: {
|
|
2582
|
-
param: {
|
|
2583
|
-
profile: string;
|
|
2584
|
-
};
|
|
2585
|
-
} & {
|
|
2586
|
-
query: Record<string, never>;
|
|
2587
|
-
};
|
|
2588
|
-
output: _$zod.ZodSafeParseError<{
|
|
2589
|
-
profile: string;
|
|
2590
|
-
}>;
|
|
2591
|
-
outputFormat: "json";
|
|
2592
|
-
status: 400;
|
|
2593
|
-
} | {
|
|
2594
|
-
input: {
|
|
2595
|
-
param: {
|
|
2596
|
-
profile: string;
|
|
2597
|
-
};
|
|
2598
|
-
} & {
|
|
2599
|
-
query: Record<string, never>;
|
|
2600
|
-
};
|
|
2601
|
-
output: _$zod.ZodSafeParseError<Record<string, never>>;
|
|
2602
|
-
outputFormat: "json";
|
|
2603
|
-
status: 400;
|
|
2604
|
-
} | {
|
|
2605
|
-
input: {
|
|
2606
|
-
param: {
|
|
2607
|
-
profile: string;
|
|
2608
|
-
};
|
|
2609
|
-
} & {
|
|
2610
|
-
query: Record<string, never>;
|
|
2611
|
-
};
|
|
2612
|
-
output: `removed profile "${string}"`;
|
|
2613
|
-
outputFormat: "text";
|
|
2614
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2615
|
-
};
|
|
2616
|
-
};
|
|
2617
|
-
} & {
|
|
2618
|
-
"/profiles/rename/:profile/:newName": {
|
|
2619
|
-
$post: {
|
|
2620
|
-
input: {
|
|
2621
|
-
param: {
|
|
2622
|
-
profile: string;
|
|
2623
|
-
newName: string;
|
|
2624
|
-
};
|
|
2625
|
-
} & {
|
|
2626
|
-
query: Record<string, never>;
|
|
2627
|
-
};
|
|
2628
|
-
output: _$zod.ZodSafeParseError<{
|
|
2629
|
-
profile: string;
|
|
2630
|
-
newName: string;
|
|
2631
|
-
}>;
|
|
2632
|
-
outputFormat: "json";
|
|
2633
|
-
status: 400;
|
|
2634
|
-
} | {
|
|
2635
|
-
input: {
|
|
2636
|
-
param: {
|
|
2637
|
-
profile: string;
|
|
2638
|
-
newName: string;
|
|
2639
|
-
};
|
|
2640
|
-
} & {
|
|
2641
|
-
query: Record<string, never>;
|
|
2642
|
-
};
|
|
2643
|
-
output: _$zod.ZodSafeParseError<Record<string, never>>;
|
|
2644
|
-
outputFormat: "json";
|
|
2645
|
-
status: 400;
|
|
2646
|
-
} | {
|
|
2647
|
-
input: {
|
|
2648
|
-
param: {
|
|
2649
|
-
profile: string;
|
|
2650
|
-
newName: string;
|
|
2651
|
-
};
|
|
2652
|
-
} & {
|
|
2653
|
-
query: Record<string, never>;
|
|
2654
|
-
};
|
|
2655
|
-
output: `renamed profile "${string}" to "${string}"`;
|
|
2656
|
-
outputFormat: "text";
|
|
2657
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2658
|
-
};
|
|
2659
|
-
};
|
|
2660
|
-
} & {
|
|
2661
|
-
"/profiles/:profile/rename/:newName": {
|
|
2662
|
-
$post: {
|
|
2663
|
-
input: {
|
|
2664
|
-
param: {
|
|
2665
|
-
profile: string;
|
|
2666
|
-
newName: string;
|
|
2667
|
-
};
|
|
2668
|
-
} & {
|
|
2669
|
-
query: Record<string, never>;
|
|
2670
|
-
};
|
|
2671
|
-
output: _$zod.ZodSafeParseError<{
|
|
2672
|
-
profile: string;
|
|
2673
|
-
newName: string;
|
|
2674
|
-
}>;
|
|
2675
|
-
outputFormat: "json";
|
|
2676
|
-
status: 400;
|
|
2677
|
-
} | {
|
|
2678
|
-
input: {
|
|
2679
|
-
param: {
|
|
2680
|
-
profile: string;
|
|
2681
|
-
newName: string;
|
|
2682
|
-
};
|
|
2683
|
-
} & {
|
|
2684
|
-
query: Record<string, never>;
|
|
2685
|
-
};
|
|
2686
|
-
output: _$zod.ZodSafeParseError<Record<string, never>>;
|
|
2687
|
-
outputFormat: "json";
|
|
2688
|
-
status: 400;
|
|
2689
|
-
} | {
|
|
2690
|
-
input: {
|
|
2691
|
-
param: {
|
|
2692
|
-
profile: string;
|
|
2693
|
-
newName: string;
|
|
2694
|
-
};
|
|
2695
|
-
} & {
|
|
2696
|
-
query: Record<string, never>;
|
|
2697
|
-
};
|
|
2698
|
-
output: `renamed profile "${string}" to "${string}"`;
|
|
2699
|
-
outputFormat: "text";
|
|
2700
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2701
|
-
};
|
|
2702
|
-
};
|
|
2703
|
-
} & {
|
|
2704
|
-
"/profiles/rename": {
|
|
2705
|
-
$post: {
|
|
2706
|
-
input: {};
|
|
2707
|
-
output: "funnel profiles rename — rename a profile\n\nusage:\n funnel profiles rename <old> <new>\n funnel profiles <old> rename <new>";
|
|
2708
|
-
outputFormat: "text";
|
|
2709
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2710
|
-
};
|
|
2711
|
-
};
|
|
2712
|
-
} & {
|
|
2713
|
-
"/profiles/:profile/rename": {
|
|
2714
|
-
$post: {
|
|
2715
|
-
input: {
|
|
2716
|
-
param: {
|
|
2717
|
-
profile: string;
|
|
2718
|
-
};
|
|
2719
|
-
};
|
|
2720
|
-
output: "funnel profiles rename — rename a profile\n\nusage:\n funnel profiles rename <old> <new>\n funnel profiles <old> rename <new>";
|
|
2721
|
-
outputFormat: "text";
|
|
2722
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2723
|
-
};
|
|
2724
|
-
};
|
|
2725
|
-
} & {
|
|
2726
|
-
"/profiles/:profile/as-default": {
|
|
2727
|
-
$post: {
|
|
2728
|
-
input: {
|
|
2729
|
-
param: {
|
|
2730
|
-
profile: string;
|
|
2731
|
-
};
|
|
2732
|
-
};
|
|
2733
|
-
output: _$zod.ZodSafeParseError<{
|
|
2734
|
-
profile: string;
|
|
2735
|
-
}>;
|
|
2736
|
-
outputFormat: "json";
|
|
2737
|
-
status: 400;
|
|
2738
|
-
} | {
|
|
2739
|
-
input: {
|
|
2740
|
-
param: {
|
|
2741
|
-
profile: string;
|
|
2742
|
-
};
|
|
2743
|
-
};
|
|
2744
|
-
output: `profile "${string}" is now the default`;
|
|
2745
|
-
outputFormat: "text";
|
|
2746
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2747
|
-
};
|
|
2748
|
-
};
|
|
2749
|
-
} & {
|
|
2750
|
-
"/profiles/:profile/run": {
|
|
2751
|
-
$get: {
|
|
2752
|
-
input: {
|
|
2753
|
-
param: {
|
|
2754
|
-
profile: string;
|
|
2755
|
-
};
|
|
2756
|
-
} & {
|
|
2757
|
-
query: {
|
|
2758
|
-
[x: string]: string | string[];
|
|
2759
|
-
};
|
|
2760
|
-
};
|
|
2761
|
-
output: _$zod.ZodSafeParseError<{
|
|
2762
|
-
profile: string;
|
|
2763
|
-
}>;
|
|
2764
|
-
outputFormat: "json";
|
|
2765
|
-
status: 400;
|
|
2766
|
-
} | {
|
|
2767
|
-
input: {
|
|
2768
|
-
param: {
|
|
2769
|
-
profile: string;
|
|
2770
|
-
};
|
|
2771
|
-
} & {
|
|
2772
|
-
query: {
|
|
2773
|
-
[x: string]: string | string[];
|
|
2774
|
-
};
|
|
2775
|
-
};
|
|
2776
|
-
output: _$zod.ZodSafeParseError<{
|
|
2777
|
-
[x: string]: unknown;
|
|
2778
|
-
}>;
|
|
2779
|
-
outputFormat: "json";
|
|
2780
|
-
status: 400;
|
|
2781
|
-
} | {
|
|
2782
|
-
input: {
|
|
2783
|
-
param: {
|
|
2784
|
-
profile: string;
|
|
2785
|
-
};
|
|
2786
|
-
} & {
|
|
2787
|
-
query: {
|
|
2788
|
-
[x: string]: string | string[];
|
|
2789
|
-
};
|
|
2790
|
-
};
|
|
2791
|
-
output: Promise<never>;
|
|
2792
|
-
outputFormat: "json";
|
|
2793
|
-
status: _$hono_utils_http_status0.StatusCode;
|
|
2794
|
-
};
|
|
2795
|
-
};
|
|
2796
|
-
} & {
|
|
2797
|
-
"/profiles/:profile": {
|
|
2798
|
-
$get: {
|
|
2799
|
-
input: {
|
|
2800
|
-
param: {
|
|
2801
|
-
profile: string;
|
|
2802
|
-
};
|
|
2803
|
-
} & {
|
|
2804
|
-
query: {
|
|
2805
|
-
[x: string]: string | string[];
|
|
2806
|
-
};
|
|
2807
|
-
};
|
|
2808
|
-
output: _$zod.ZodSafeParseError<{
|
|
2809
|
-
profile: string;
|
|
2810
|
-
}>;
|
|
2811
|
-
outputFormat: "json";
|
|
2812
|
-
status: 400;
|
|
2813
|
-
} | {
|
|
2814
|
-
input: {
|
|
2815
|
-
param: {
|
|
2816
|
-
profile: string;
|
|
2817
|
-
};
|
|
2818
|
-
} & {
|
|
2819
|
-
query: {
|
|
2820
|
-
[x: string]: string | string[];
|
|
2821
|
-
};
|
|
2822
|
-
};
|
|
2823
|
-
output: _$zod.ZodSafeParseError<{
|
|
2824
|
-
[x: string]: unknown;
|
|
2825
|
-
}>;
|
|
2826
|
-
outputFormat: "json";
|
|
2827
|
-
status: 400;
|
|
2828
|
-
} | {
|
|
2829
|
-
input: {
|
|
2830
|
-
param: {
|
|
2831
|
-
profile: string;
|
|
2832
|
-
};
|
|
2833
|
-
} & {
|
|
2834
|
-
query: {
|
|
2835
|
-
[x: string]: string | string[];
|
|
2836
|
-
};
|
|
2837
|
-
};
|
|
2838
|
-
output: Promise<never>;
|
|
2839
|
-
outputFormat: "json";
|
|
2840
|
-
status: _$hono_utils_http_status0.StatusCode;
|
|
2841
|
-
};
|
|
2842
|
-
};
|
|
2843
|
-
} & {
|
|
2844
|
-
"/gateway": {
|
|
2845
|
-
$get: {
|
|
2846
|
-
input: {};
|
|
2847
|
-
output: string;
|
|
2848
|
-
outputFormat: "text";
|
|
2849
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2850
|
-
};
|
|
2851
|
-
};
|
|
2852
|
-
} & {
|
|
2853
|
-
"/gateway/status": {
|
|
2854
|
-
$get: {
|
|
2855
|
-
input: {};
|
|
2856
|
-
output: string;
|
|
2857
|
-
outputFormat: "text";
|
|
2858
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2859
|
-
};
|
|
2860
|
-
};
|
|
2861
|
-
} & {
|
|
2862
|
-
"/gateway/start": {
|
|
2863
|
-
$get: {
|
|
2864
|
-
input: {
|
|
2865
|
-
query: {
|
|
2866
|
-
"no-caffeine"?: string | undefined;
|
|
2867
|
-
};
|
|
2868
|
-
};
|
|
2869
|
-
output: _$zod.ZodSafeParseError<{
|
|
2870
|
-
"no-caffeine"?: string | undefined;
|
|
2871
|
-
}>;
|
|
2872
|
-
outputFormat: "json";
|
|
2873
|
-
status: 400;
|
|
2874
|
-
} | {
|
|
2875
|
-
input: {
|
|
2876
|
-
query: {
|
|
2877
|
-
"no-caffeine"?: string | undefined;
|
|
2878
|
-
};
|
|
2879
|
-
};
|
|
2880
|
-
output: "funnel gateway: already running (pid null)" | `funnel gateway: already running (pid ${number})`;
|
|
2881
|
-
outputFormat: "text";
|
|
2882
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2883
|
-
} | {
|
|
2884
|
-
input: {
|
|
2885
|
-
query: {
|
|
2886
|
-
"no-caffeine"?: string | undefined;
|
|
2887
|
-
};
|
|
2888
|
-
};
|
|
2889
|
-
output: "funnel gateway: started";
|
|
2890
|
-
outputFormat: "text";
|
|
2891
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2892
|
-
};
|
|
2893
|
-
};
|
|
2894
|
-
} & {
|
|
2895
|
-
"/gateway/stop": {
|
|
2896
|
-
$get: {
|
|
2897
|
-
input: {};
|
|
2898
|
-
output: "funnel gateway: no running process";
|
|
2899
|
-
outputFormat: "text";
|
|
2900
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2901
|
-
} | {
|
|
2902
|
-
input: {};
|
|
2903
|
-
output: "funnel gateway: stopped";
|
|
2904
|
-
outputFormat: "text";
|
|
2905
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2906
|
-
};
|
|
2907
|
-
};
|
|
2908
|
-
} & {
|
|
2909
|
-
"/gateway/restart": {
|
|
2910
|
-
$get: {
|
|
2911
|
-
input: {
|
|
2912
|
-
query: {
|
|
2913
|
-
"no-caffeine"?: string | undefined;
|
|
2914
|
-
};
|
|
2915
|
-
};
|
|
2916
|
-
output: string;
|
|
2917
|
-
outputFormat: "text";
|
|
2918
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2919
|
-
} | {
|
|
2920
|
-
input: {
|
|
2921
|
-
query: {
|
|
2922
|
-
"no-caffeine"?: string | undefined;
|
|
2923
|
-
};
|
|
2924
|
-
};
|
|
2925
|
-
output: _$zod.ZodSafeParseError<{
|
|
2926
|
-
"no-caffeine"?: string | undefined;
|
|
2927
|
-
}>;
|
|
2928
|
-
outputFormat: "json";
|
|
2929
|
-
status: 400;
|
|
2930
|
-
};
|
|
2931
|
-
};
|
|
2932
|
-
} & {
|
|
2933
|
-
"/gateway/run": {
|
|
2934
|
-
$get: {
|
|
2935
|
-
input: {
|
|
2936
|
-
query: {
|
|
2937
|
-
"no-caffeine"?: string | undefined;
|
|
2938
|
-
};
|
|
2939
|
-
};
|
|
2940
|
-
output: Promise<never>;
|
|
2941
|
-
outputFormat: "json";
|
|
2942
|
-
status: _$hono_utils_http_status0.StatusCode;
|
|
2943
|
-
} | {
|
|
2944
|
-
input: {
|
|
2945
|
-
query: {
|
|
2946
|
-
"no-caffeine"?: string | undefined;
|
|
2947
|
-
};
|
|
2948
|
-
};
|
|
2949
|
-
output: _$zod.ZodSafeParseError<{
|
|
2950
|
-
"no-caffeine"?: string | undefined;
|
|
2951
|
-
}>;
|
|
2952
|
-
outputFormat: "json";
|
|
2953
|
-
status: 400;
|
|
2954
|
-
};
|
|
2955
|
-
};
|
|
2956
|
-
} & {
|
|
2957
|
-
"/gateway/logs": {
|
|
2958
|
-
$get: {
|
|
2959
|
-
input: {
|
|
2960
|
-
query: {
|
|
2961
|
-
n?: string | undefined;
|
|
2962
|
-
format?: "json" | "plain" | undefined;
|
|
2963
|
-
};
|
|
2964
|
-
};
|
|
2965
|
-
output: _$zod.ZodSafeParseError<{
|
|
2966
|
-
n?: string | undefined;
|
|
2967
|
-
format?: "json" | "plain" | undefined;
|
|
2968
|
-
}>;
|
|
2969
|
-
outputFormat: "json";
|
|
2970
|
-
status: 400;
|
|
2971
|
-
} | {
|
|
2972
|
-
input: {
|
|
2973
|
-
query: {
|
|
2974
|
-
n?: string | undefined;
|
|
2975
|
-
format?: "json" | "plain" | undefined;
|
|
2976
|
-
};
|
|
2977
|
-
};
|
|
2978
|
-
output: "no logs";
|
|
2979
|
-
outputFormat: "text";
|
|
2980
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2981
|
-
};
|
|
2982
|
-
};
|
|
2983
|
-
} & {
|
|
2984
|
-
"/gateway/sql": {
|
|
2985
|
-
$get: {
|
|
2986
|
-
input: {
|
|
2987
|
-
query: {
|
|
2988
|
-
query?: string | undefined;
|
|
2989
|
-
preset?: string | undefined;
|
|
2990
|
-
channel?: string | undefined;
|
|
2991
|
-
limit?: string | undefined;
|
|
2992
|
-
};
|
|
2993
|
-
};
|
|
2994
|
-
output: string;
|
|
2995
|
-
outputFormat: "text";
|
|
2996
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
2997
|
-
} | {
|
|
2998
|
-
input: {
|
|
2999
|
-
query: {
|
|
3000
|
-
query?: string | undefined;
|
|
3001
|
-
preset?: string | undefined;
|
|
3002
|
-
channel?: string | undefined;
|
|
3003
|
-
limit?: string | undefined;
|
|
3004
|
-
};
|
|
3005
|
-
};
|
|
3006
|
-
output: _$zod.ZodSafeParseError<{
|
|
3007
|
-
query?: string | undefined;
|
|
3008
|
-
preset?: string | undefined;
|
|
3009
|
-
channel?: string | undefined;
|
|
3010
|
-
limit?: string | undefined;
|
|
3011
|
-
}>;
|
|
3012
|
-
outputFormat: "json";
|
|
3013
|
-
status: 400;
|
|
3014
|
-
};
|
|
3015
|
-
};
|
|
3016
|
-
} & {
|
|
3017
|
-
"/gateway/listeners": {
|
|
3018
|
-
$get: {
|
|
3019
|
-
input: {};
|
|
3020
|
-
output: string;
|
|
3021
|
-
outputFormat: "text";
|
|
3022
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3023
|
-
};
|
|
3024
|
-
};
|
|
3025
|
-
} & {
|
|
3026
|
-
"/debug": {
|
|
3027
|
-
$get: {
|
|
3028
|
-
input: {
|
|
3029
|
-
query: {
|
|
3030
|
-
channel?: string | undefined;
|
|
3031
|
-
all?: "" | "true" | "false" | undefined;
|
|
3032
|
-
limit?: string | undefined;
|
|
3033
|
-
};
|
|
3034
|
-
};
|
|
3035
|
-
output: string;
|
|
3036
|
-
outputFormat: "text";
|
|
3037
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3038
|
-
} | {
|
|
3039
|
-
input: {
|
|
3040
|
-
query: {
|
|
3041
|
-
channel?: string | undefined;
|
|
3042
|
-
all?: "" | "true" | "false" | undefined;
|
|
3043
|
-
limit?: string | undefined;
|
|
3044
|
-
};
|
|
3045
|
-
};
|
|
3046
|
-
output: _$zod.ZodSafeParseError<{
|
|
3047
|
-
channel?: string | undefined;
|
|
3048
|
-
all?: "" | "true" | "false" | undefined;
|
|
3049
|
-
limit?: string | undefined;
|
|
3050
|
-
}>;
|
|
3051
|
-
outputFormat: "json";
|
|
3052
|
-
status: 400;
|
|
3053
|
-
};
|
|
3054
|
-
};
|
|
3055
|
-
} & {
|
|
3056
|
-
"/debug/events": {
|
|
3057
|
-
$get: {
|
|
3058
|
-
input: {
|
|
3059
|
-
query: {
|
|
3060
|
-
channel?: string | undefined;
|
|
3061
|
-
limit?: string | undefined;
|
|
3062
|
-
};
|
|
3063
|
-
};
|
|
3064
|
-
output: string;
|
|
3065
|
-
outputFormat: "text";
|
|
3066
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3067
|
-
} | {
|
|
3068
|
-
input: {
|
|
3069
|
-
query: {
|
|
3070
|
-
channel?: string | undefined;
|
|
3071
|
-
limit?: string | undefined;
|
|
3072
|
-
};
|
|
3073
|
-
};
|
|
3074
|
-
output: _$zod.ZodSafeParseError<{
|
|
3075
|
-
channel?: string | undefined;
|
|
3076
|
-
limit?: string | undefined;
|
|
3077
|
-
}>;
|
|
3078
|
-
outputFormat: "json";
|
|
3079
|
-
status: 400;
|
|
3080
|
-
};
|
|
3081
|
-
};
|
|
3082
|
-
} & {
|
|
3083
|
-
"/debug/dropped": {
|
|
3084
|
-
$get: {
|
|
3085
|
-
input: {
|
|
3086
|
-
query: {
|
|
3087
|
-
channel?: string | undefined;
|
|
3088
|
-
limit?: string | undefined;
|
|
3089
|
-
};
|
|
3090
|
-
};
|
|
3091
|
-
output: string;
|
|
3092
|
-
outputFormat: "text";
|
|
3093
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3094
|
-
} | {
|
|
3095
|
-
input: {
|
|
3096
|
-
query: {
|
|
3097
|
-
channel?: string | undefined;
|
|
3098
|
-
limit?: string | undefined;
|
|
3099
|
-
};
|
|
3100
|
-
};
|
|
3101
|
-
output: _$zod.ZodSafeParseError<{
|
|
3102
|
-
channel?: string | undefined;
|
|
3103
|
-
limit?: string | undefined;
|
|
3104
|
-
}>;
|
|
3105
|
-
outputFormat: "json";
|
|
3106
|
-
status: 400;
|
|
3107
|
-
};
|
|
3108
|
-
};
|
|
3109
|
-
} & {
|
|
3110
|
-
"/debug/errors": {
|
|
3111
|
-
$get: {
|
|
3112
|
-
input: {
|
|
3113
|
-
query: {
|
|
3114
|
-
channel?: string | undefined;
|
|
3115
|
-
limit?: string | undefined;
|
|
3116
|
-
};
|
|
3117
|
-
};
|
|
3118
|
-
output: string;
|
|
3119
|
-
outputFormat: "text";
|
|
3120
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3121
|
-
} | {
|
|
3122
|
-
input: {
|
|
3123
|
-
query: {
|
|
3124
|
-
channel?: string | undefined;
|
|
3125
|
-
limit?: string | undefined;
|
|
3126
|
-
};
|
|
3127
|
-
};
|
|
3128
|
-
output: _$zod.ZodSafeParseError<{
|
|
3129
|
-
channel?: string | undefined;
|
|
3130
|
-
limit?: string | undefined;
|
|
3131
|
-
}>;
|
|
3132
|
-
outputFormat: "json";
|
|
3133
|
-
status: 400;
|
|
3134
|
-
};
|
|
3135
|
-
};
|
|
3136
|
-
} & {
|
|
3137
|
-
"/debug/replay": {
|
|
3138
|
-
$get: {
|
|
3139
|
-
input: {
|
|
3140
|
-
query: {
|
|
3141
|
-
channel?: string | undefined;
|
|
3142
|
-
seq?: string | undefined;
|
|
3143
|
-
};
|
|
3144
|
-
};
|
|
3145
|
-
output: string;
|
|
3146
|
-
outputFormat: "text";
|
|
3147
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3148
|
-
} | {
|
|
3149
|
-
input: {
|
|
3150
|
-
query: {
|
|
3151
|
-
channel?: string | undefined;
|
|
3152
|
-
seq?: string | undefined;
|
|
3153
|
-
};
|
|
3154
|
-
};
|
|
3155
|
-
output: _$zod.ZodSafeParseError<{
|
|
3156
|
-
channel?: string | undefined;
|
|
3157
|
-
seq?: string | undefined;
|
|
3158
|
-
}>;
|
|
3159
|
-
outputFormat: "json";
|
|
3160
|
-
status: 400;
|
|
3161
|
-
};
|
|
3162
|
-
};
|
|
3163
|
-
} & {
|
|
3164
|
-
"/docs": {
|
|
3165
|
-
$get: {
|
|
3166
|
-
input: {};
|
|
3167
|
-
output: string;
|
|
3168
|
-
outputFormat: "text";
|
|
3169
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3170
|
-
};
|
|
3171
|
-
};
|
|
3172
|
-
} & {
|
|
3173
|
-
"/docs/:topic": {
|
|
3174
|
-
$get: {
|
|
3175
|
-
input: {
|
|
3176
|
-
param: {
|
|
3177
|
-
topic: string;
|
|
3178
|
-
};
|
|
3179
|
-
};
|
|
3180
|
-
output: string;
|
|
3181
|
-
outputFormat: "text";
|
|
3182
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3183
|
-
} | {
|
|
3184
|
-
input: {
|
|
3185
|
-
param: {
|
|
3186
|
-
topic: string;
|
|
3187
|
-
};
|
|
3188
|
-
};
|
|
3189
|
-
output: _$zod.ZodSafeParseError<{
|
|
3190
|
-
topic: string;
|
|
3191
|
-
}>;
|
|
3192
|
-
outputFormat: "json";
|
|
3193
|
-
status: 400;
|
|
3194
|
-
};
|
|
3195
|
-
};
|
|
3196
|
-
} & {
|
|
3197
|
-
"/doctor": {
|
|
3198
|
-
$get: {
|
|
3199
|
-
input: {
|
|
3200
|
-
query: {
|
|
3201
|
-
fix?: "" | "true" | "false" | undefined;
|
|
3202
|
-
aggressive?: "" | "true" | "false" | undefined;
|
|
3203
|
-
};
|
|
3204
|
-
};
|
|
3205
|
-
output: string;
|
|
3206
|
-
outputFormat: "text";
|
|
3207
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3208
|
-
} | {
|
|
3209
|
-
input: {
|
|
3210
|
-
query: {
|
|
3211
|
-
fix?: "" | "true" | "false" | undefined;
|
|
3212
|
-
aggressive?: "" | "true" | "false" | undefined;
|
|
3213
|
-
};
|
|
3214
|
-
};
|
|
3215
|
-
output: _$zod.ZodSafeParseError<{
|
|
3216
|
-
fix?: "" | "true" | "false" | undefined;
|
|
3217
|
-
aggressive?: "" | "true" | "false" | undefined;
|
|
3218
|
-
}>;
|
|
3219
|
-
outputFormat: "json";
|
|
3220
|
-
status: 400;
|
|
3221
|
-
};
|
|
3222
|
-
};
|
|
3223
|
-
} & {
|
|
3224
|
-
"/schema": {
|
|
3225
|
-
$get: {
|
|
3226
|
-
input: {};
|
|
3227
|
-
output: `${string}
|
|
3228
|
-
`;
|
|
3229
|
-
outputFormat: "text";
|
|
3230
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3231
|
-
};
|
|
3232
|
-
};
|
|
3233
|
-
} & {
|
|
3234
|
-
"/status": {
|
|
3235
|
-
$get: {
|
|
3236
|
-
input: {
|
|
3237
|
-
query: {
|
|
3238
|
-
watch?: "" | "true" | "false" | undefined;
|
|
3239
|
-
interval?: string | undefined;
|
|
3240
|
-
};
|
|
3241
|
-
};
|
|
3242
|
-
output: string;
|
|
3243
|
-
outputFormat: "text";
|
|
3244
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3245
|
-
} | {
|
|
3246
|
-
input: {
|
|
3247
|
-
query: {
|
|
3248
|
-
watch?: "" | "true" | "false" | undefined;
|
|
3249
|
-
interval?: string | undefined;
|
|
3250
|
-
};
|
|
3251
|
-
};
|
|
3252
|
-
output: _$zod.ZodSafeParseError<{
|
|
3253
|
-
watch?: "" | "true" | "false" | undefined;
|
|
3254
|
-
interval?: string | undefined;
|
|
3255
|
-
}>;
|
|
3256
|
-
outputFormat: "json";
|
|
3257
|
-
status: 400;
|
|
3258
|
-
};
|
|
3259
|
-
};
|
|
3260
|
-
} & {
|
|
3261
|
-
"/update": {
|
|
3262
|
-
$get: {
|
|
3263
|
-
input: {};
|
|
3264
|
-
output: "updated @interactive-inc/claude-funnel";
|
|
3265
|
-
outputFormat: "text";
|
|
3266
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3267
|
-
};
|
|
3268
|
-
};
|
|
3269
|
-
}, "/", "/update">;
|
|
3270
|
-
type CliApp = typeof routes;
|
|
3271
|
-
//#endregion
|
|
3272
|
-
//#region lib/gateway/routes/index.d.ts
|
|
3273
|
-
/**
|
|
3274
|
-
* Top-level Hono app for the gateway daemon. Mounts every HTTP endpoint flat
|
|
3275
|
-
* (the WebSocket /ws upgrade is handled directly by `Bun.serve`). Deps come
|
|
3276
|
-
* from the `deps` variable set by `FunnelGatewayServer`'s middleware — same
|
|
3277
|
-
* shape as CLI's `c.var.funnel`.
|
|
3278
|
-
*/
|
|
3279
|
-
type GatewayApp = ReturnType<typeof buildGatewayRoutes>;
|
|
3280
|
-
declare function buildGatewayRoutes(): _$hono_hono_base0.HonoBase<Env$1, {
|
|
3281
|
-
"/health": {
|
|
3282
|
-
$get: {
|
|
3283
|
-
input: {};
|
|
3284
|
-
output: {
|
|
3285
|
-
ok: true;
|
|
3286
|
-
pid: number;
|
|
3287
|
-
funnelDir: string;
|
|
3288
|
-
clients: number;
|
|
3289
|
-
listeners: {
|
|
3290
|
-
channelName: string;
|
|
3291
|
-
channelId: string;
|
|
3292
|
-
name: string;
|
|
3293
|
-
type: ConnectorConfig["type"];
|
|
3294
|
-
alive: boolean;
|
|
3295
|
-
events: number;
|
|
3296
|
-
errors: number;
|
|
3297
|
-
failureCount: number;
|
|
3298
|
-
lastEventAt: string | null;
|
|
3299
|
-
}[];
|
|
3300
|
-
};
|
|
3301
|
-
outputFormat: "json";
|
|
3302
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3303
|
-
};
|
|
3304
|
-
};
|
|
3305
|
-
} & {
|
|
3306
|
-
"/status": {
|
|
3307
|
-
$get: {
|
|
3308
|
-
input: {};
|
|
3309
|
-
output: {
|
|
3310
|
-
ok: true;
|
|
3311
|
-
pid: number;
|
|
3312
|
-
funnelDir: string;
|
|
3313
|
-
uptimeMs: number;
|
|
3314
|
-
clients: {
|
|
3315
|
-
channel: string;
|
|
3316
|
-
connectors: string[];
|
|
3317
|
-
}[];
|
|
3318
|
-
listeners: {
|
|
3319
|
-
channelName: string;
|
|
3320
|
-
channelId: string;
|
|
3321
|
-
name: string;
|
|
3322
|
-
type: ConnectorConfig["type"];
|
|
3323
|
-
alive: boolean;
|
|
3324
|
-
events: number;
|
|
3325
|
-
errors: number;
|
|
3326
|
-
failureCount: number;
|
|
3327
|
-
lastEventAt: string | null;
|
|
3328
|
-
}[];
|
|
3329
|
-
broadcaster: {
|
|
3330
|
-
clients: number;
|
|
3331
|
-
subscribers: number;
|
|
3332
|
-
eventsBroadcast: number;
|
|
3333
|
-
droppedSlowClients: number;
|
|
3334
|
-
lastBroadcastAt: string | null;
|
|
3335
|
-
latestOffset: number;
|
|
3336
|
-
oldestReplayableOffset: number | null;
|
|
3337
|
-
};
|
|
3338
|
-
};
|
|
3339
|
-
outputFormat: "json";
|
|
3340
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3341
|
-
};
|
|
3342
|
-
};
|
|
3343
|
-
} & {
|
|
3344
|
-
"/debug": {
|
|
3345
|
-
$get: {
|
|
3346
|
-
input: {};
|
|
3347
|
-
output: {
|
|
3348
|
-
pid: number;
|
|
3349
|
-
uptimeMs: number;
|
|
3350
|
-
eventsBroadcast: number;
|
|
3351
|
-
channels: {
|
|
3352
|
-
id: string;
|
|
3353
|
-
name: string;
|
|
3354
|
-
connectors: string[];
|
|
3355
|
-
listener: {
|
|
3356
|
-
alive: boolean;
|
|
3357
|
-
events: number;
|
|
3358
|
-
errors: number;
|
|
3359
|
-
lastEventAt: string | null;
|
|
3360
|
-
} | null;
|
|
3361
|
-
claudeClients: number;
|
|
3362
|
-
recentEvents: {
|
|
3363
|
-
seq: number | null;
|
|
3364
|
-
ts: number | null;
|
|
3365
|
-
type: string;
|
|
3366
|
-
outcome: string;
|
|
3367
|
-
payload: string | null;
|
|
3368
|
-
payloadParsed: {
|
|
3369
|
-
[x: string]: _$hono_utils_types0.JSONValue;
|
|
3370
|
-
} | null;
|
|
3371
|
-
preview: string | null;
|
|
3372
|
-
}[];
|
|
3373
|
-
connectionErrors: {
|
|
3374
|
-
ts: number | null;
|
|
3375
|
-
type: string;
|
|
3376
|
-
status: string;
|
|
3377
|
-
detail: string | null;
|
|
3378
|
-
}[];
|
|
3379
|
-
diagnosis: {
|
|
3380
|
-
status: "ok" | "warn" | "error";
|
|
3381
|
-
message: string;
|
|
3382
|
-
nextActions: string[];
|
|
3383
|
-
rootCause: string | null;
|
|
3384
|
-
};
|
|
3385
|
-
}[];
|
|
3386
|
-
};
|
|
3387
|
-
outputFormat: "json";
|
|
3388
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3389
|
-
};
|
|
3390
|
-
};
|
|
3391
|
-
} & {
|
|
3392
|
-
"/listeners": {
|
|
3393
|
-
$get: {
|
|
3394
|
-
input: {};
|
|
3395
|
-
output: {
|
|
3396
|
-
listeners: {
|
|
3397
|
-
channelName: string;
|
|
3398
|
-
channelId: string;
|
|
3399
|
-
name: string;
|
|
3400
|
-
type: ConnectorConfig["type"];
|
|
3401
|
-
alive: boolean;
|
|
3402
|
-
events: number;
|
|
3403
|
-
errors: number;
|
|
3404
|
-
failureCount: number;
|
|
3405
|
-
lastEventAt: string | null;
|
|
3406
|
-
}[];
|
|
3407
|
-
};
|
|
3408
|
-
outputFormat: "json";
|
|
3409
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3410
|
-
};
|
|
3411
|
-
};
|
|
3412
|
-
} & {
|
|
3413
|
-
"/listeners/:channel/:connector/start": {
|
|
3414
|
-
$post: {
|
|
3415
|
-
input: {
|
|
3416
|
-
param: {
|
|
3417
|
-
channel: string;
|
|
3418
|
-
connector: string;
|
|
3419
|
-
};
|
|
3420
|
-
};
|
|
3421
|
-
output: {
|
|
3422
|
-
ok: boolean;
|
|
3423
|
-
reason: string;
|
|
3424
|
-
};
|
|
3425
|
-
outputFormat: "json";
|
|
3426
|
-
status: 400;
|
|
3427
|
-
} | {
|
|
3428
|
-
input: {
|
|
3429
|
-
param: {
|
|
3430
|
-
channel: string;
|
|
3431
|
-
connector: string;
|
|
3432
|
-
};
|
|
3433
|
-
};
|
|
3434
|
-
output: {
|
|
3435
|
-
ok: boolean;
|
|
3436
|
-
reason?: string | undefined;
|
|
3437
|
-
};
|
|
3438
|
-
outputFormat: "json";
|
|
3439
|
-
status: 200 | 400;
|
|
3440
|
-
};
|
|
3441
|
-
};
|
|
3442
|
-
} & {
|
|
3443
|
-
"/listeners/:channel/:connector": {
|
|
3444
|
-
$delete: {
|
|
3445
|
-
input: {
|
|
3446
|
-
param: {
|
|
3447
|
-
channel: string;
|
|
3448
|
-
connector: string;
|
|
3449
|
-
};
|
|
3450
|
-
};
|
|
3451
|
-
output: {
|
|
3452
|
-
ok: boolean;
|
|
3453
|
-
reason: string;
|
|
3454
|
-
};
|
|
3455
|
-
outputFormat: "json";
|
|
3456
|
-
status: 400;
|
|
3457
|
-
} | {
|
|
3458
|
-
input: {
|
|
3459
|
-
param: {
|
|
3460
|
-
channel: string;
|
|
3461
|
-
connector: string;
|
|
3462
|
-
};
|
|
3463
|
-
};
|
|
3464
|
-
output: {
|
|
3465
|
-
ok: boolean;
|
|
3466
|
-
reason?: string | undefined;
|
|
3467
|
-
};
|
|
3468
|
-
outputFormat: "json";
|
|
3469
|
-
status: 200 | 400;
|
|
3470
|
-
};
|
|
3471
|
-
};
|
|
3472
|
-
} & {
|
|
3473
|
-
"/listeners/:channel/:connector/restart": {
|
|
3474
|
-
$post: {
|
|
3475
|
-
input: {
|
|
3476
|
-
param: {
|
|
3477
|
-
channel: string;
|
|
3478
|
-
connector: string;
|
|
3479
|
-
};
|
|
3480
|
-
};
|
|
3481
|
-
output: {
|
|
3482
|
-
ok: boolean;
|
|
3483
|
-
reason: string;
|
|
3484
|
-
};
|
|
3485
|
-
outputFormat: "json";
|
|
3486
|
-
status: 400;
|
|
3487
|
-
} | {
|
|
3488
|
-
input: {
|
|
3489
|
-
param: {
|
|
3490
|
-
channel: string;
|
|
3491
|
-
connector: string;
|
|
3492
|
-
};
|
|
3493
|
-
};
|
|
3494
|
-
output: {
|
|
3495
|
-
ok: boolean;
|
|
3496
|
-
reason?: string | undefined;
|
|
3497
|
-
};
|
|
3498
|
-
outputFormat: "json";
|
|
3499
|
-
status: 200 | 400;
|
|
3500
|
-
};
|
|
3501
|
-
};
|
|
3502
|
-
} & {
|
|
3503
|
-
"/channels/:channel/connectors/:connector/call": {
|
|
3504
|
-
$post: {
|
|
3505
|
-
input: {
|
|
3506
|
-
param: {
|
|
3507
|
-
channel: string;
|
|
3508
|
-
connector: string;
|
|
3509
|
-
};
|
|
3510
|
-
};
|
|
3511
|
-
output: {
|
|
3512
|
-
ok: boolean;
|
|
3513
|
-
reason: string;
|
|
3514
|
-
};
|
|
3515
|
-
outputFormat: "json";
|
|
3516
|
-
status: 400;
|
|
3517
|
-
} | {
|
|
3518
|
-
input: {
|
|
3519
|
-
param: {
|
|
3520
|
-
channel: string;
|
|
3521
|
-
connector: string;
|
|
3522
|
-
};
|
|
3523
|
-
};
|
|
3524
|
-
output: {
|
|
3525
|
-
ok: true;
|
|
3526
|
-
result: _$hono_utils_types0.JSONValue;
|
|
3527
|
-
};
|
|
3528
|
-
outputFormat: "json";
|
|
3529
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3530
|
-
};
|
|
3531
|
-
};
|
|
3532
|
-
} & {
|
|
3533
|
-
"/channels/:channel/publish": {
|
|
3534
|
-
$post: {
|
|
3535
|
-
input: {
|
|
3536
|
-
param: {
|
|
3537
|
-
channel: string;
|
|
3538
|
-
};
|
|
3539
|
-
} & {
|
|
3540
|
-
json: {
|
|
3541
|
-
content: string;
|
|
3542
|
-
meta?: Record<string, string> | undefined;
|
|
3543
|
-
connector?: string | undefined;
|
|
3544
|
-
target?: string | undefined;
|
|
3545
|
-
};
|
|
3546
|
-
};
|
|
3547
|
-
output: {
|
|
3548
|
-
ok: boolean;
|
|
3549
|
-
reason: string;
|
|
3550
|
-
};
|
|
3551
|
-
outputFormat: "json";
|
|
3552
|
-
status: 400;
|
|
3553
|
-
} | {
|
|
3554
|
-
input: {
|
|
3555
|
-
param: {
|
|
3556
|
-
channel: string;
|
|
3557
|
-
};
|
|
3558
|
-
} & {
|
|
3559
|
-
json: {
|
|
3560
|
-
content: string;
|
|
3561
|
-
meta?: Record<string, string> | undefined;
|
|
3562
|
-
connector?: string | undefined;
|
|
3563
|
-
target?: string | undefined;
|
|
3564
|
-
};
|
|
3565
|
-
};
|
|
3566
|
-
output: {
|
|
3567
|
-
ok: boolean;
|
|
3568
|
-
reason: string;
|
|
3569
|
-
};
|
|
3570
|
-
outputFormat: "json";
|
|
3571
|
-
status: 400;
|
|
3572
|
-
} | {
|
|
3573
|
-
input: {
|
|
3574
|
-
param: {
|
|
3575
|
-
channel: string;
|
|
3576
|
-
};
|
|
3577
|
-
} & {
|
|
3578
|
-
json: {
|
|
3579
|
-
content: string;
|
|
3580
|
-
meta?: Record<string, string> | undefined;
|
|
3581
|
-
connector?: string | undefined;
|
|
3582
|
-
target?: string | undefined;
|
|
3583
|
-
};
|
|
3584
|
-
};
|
|
3585
|
-
output: {
|
|
3586
|
-
ok: true;
|
|
3587
|
-
offset: number;
|
|
3588
|
-
};
|
|
3589
|
-
outputFormat: "json";
|
|
3590
|
-
status: _$hono_utils_http_status0.ContentfulStatusCode;
|
|
3591
|
-
};
|
|
3592
|
-
};
|
|
3593
|
-
}, "/", "/channels/:channel/publish">;
|
|
3594
|
-
//#endregion
|
|
3595
|
-
export { PublishResult as $, NodeFunnelFileSystem as A, GatewayServerOptions as B, MemoryProcessCall as C, ProcessListStub as D, MemoryProcessSyncHandler as E, FunnelSettingsStore as F, FunnelGateway as G, ListListenersResult as H, SETTINGS_PATH as I, MemoryFunnelEventLog as J, MemoryConnectorDiagnosticLog as K, resolveFunnelDir as L, createSettings as M, DEFAULT_GATEWAY_PORT as N, NodeFunnelProcessRunner as O, FUNNEL_DIR as P, PublishResponse as Q, resolveFunnelPort as R, MemoryFunnelProcessRunner as S, OnFunnelError as St, MemoryProcessResponse as T, ListenerEntry as U, FunnelListenersClient as V, ListenerOpResult as W, FunnelChannelPublisher as X, SqliteFunnelEventLog as Y, PublishRequest as Z, NoopFunnelLogger as _, FunnelListenerSupervisor as _t, toRequest as a, ChannelWsUrlInput as at, NodeFunnelLogger as b, FunnelBroadcaster as bt, buildServiceRoutes as c, FunnelGatewayServer as ct, MemoryHttpResponse as d, FunnelEventLog as dt, publishRequestSchema as et, NodeFunnelHttpClient as f, FunnelEventRecord as ft, NodeFunnelClock as g, GatewayRouteDeps as gt, MemoryFunnelClock as h, GatewayEmitInput as ht, queryToCliArgs as i, gatewayLoopbackUrl as it, MockFunnelSettingsReader as j, MemoryFunnelFileSystem as k, MemoryFunnelHttpClient as l, GatewayEventStore as lt, NodeFunnelIdGenerator as m, Env$1 as mt, CliApp as n, DEFAULT_GATEWAY_TOKEN_PATH as nt, Env as o, channelWsProtocols as ot, MemoryFunnelIdGenerator as p, funnelEventSchema as pt, SqliteConnectorDiagnosticLog as q, routes as r, FunnelGatewayToken as rt, factory as s, channelWsUrl as st, GatewayApp as t, publishResponseSchema as tt, MemoryHttpHandler as u, FunnelEvent as ut, LogEntry as v, BroadcastEvent as vt, MemoryProcessHandler as w, AliveStub as x, ReplayableEvent as xt, MemoryFunnelLogger as y, BroadcastSubscriber as yt, Funnel as z };
|