@interactive-inc/claude-funnel 0.53.0 → 0.55.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.
Files changed (71) hide show
  1. package/README.md +3 -3
  2. package/dist/bin.js +1276 -520
  3. package/dist/claude.d.ts +22 -5
  4. package/dist/claude.js +455 -168
  5. package/dist/{connector-adapter-CePYBTgW.d.ts → connector-adapter-1PxjN-Uk.d.ts} +1 -1
  6. package/dist/{connector-adapter-D5Utumgz.js → connector-adapter-qwXLjQId.js} +1 -1
  7. package/dist/{connector-listener-DU54DN-f.js → connector-listener-CpHBecCj.js} +1 -1
  8. package/dist/connectors/discord.d.ts +6 -6
  9. package/dist/connectors/discord.js +2 -2
  10. package/dist/connectors/gh.d.ts +6 -6
  11. package/dist/connectors/gh.js +2 -2
  12. package/dist/connectors/schedule.d.ts +12 -2
  13. package/dist/connectors/schedule.js +2 -2
  14. package/dist/connectors/slack.d.ts +3 -3
  15. package/dist/connectors/slack.js +2 -2
  16. package/dist/{connector-diagnostic-log-yTOojKUR.d.ts → diagnostic-log-Bxe7Bbvw.d.ts} +2 -2
  17. package/dist/diagnostic-sql-reader-CzYgZpq2.js +83 -0
  18. package/dist/diagnostics.d.ts +2 -0
  19. package/dist/diagnostics.js +2 -0
  20. package/dist/{discord-connector-schema-CBDyGdOI.js → discord-connector-schema-B_N6IXLz.js} +1 -1
  21. package/dist/{discord-connector-schema-R0Uu-3ns.d.ts → discord-connector-schema-CPgcZkXh.d.ts} +1 -1
  22. package/dist/{discord-listener-_jSE3HsQ.js → discord-listener-C0MoKdQO.js} +6 -6
  23. package/dist/docs.d.ts +2 -0
  24. package/dist/docs.js +2 -0
  25. package/dist/doctor.d.ts +2 -0
  26. package/dist/doctor.js +2 -0
  27. package/dist/{file-process-guard-DMeLB6Zd.d.ts → file-process-guard-DI1742H5.d.ts} +5 -4
  28. package/dist/funnel-diagnostics-BpKYrMSu.js +300 -0
  29. package/dist/funnel-diagnostics-qWy5tPSq.d.ts +176 -0
  30. package/dist/funnel-docs-dXPokzr5.d.ts +18 -0
  31. package/dist/funnel-docs-ng5K8w4j.js +653 -0
  32. package/dist/funnel-doctor-BF3Rdgk0.d.ts +34 -0
  33. package/dist/funnel-doctor-CApCezTq.js +82 -0
  34. package/dist/funnel-recovery-BUBsu7WX.d.ts +101 -0
  35. package/dist/funnel-recovery-D9CxD5Zs.js +134 -0
  36. package/dist/gateway/daemon.js +810 -211
  37. package/dist/{gateway-base-url-ssk_He5G.js → gateway-base-url-6foMXfFf.js} +5 -5
  38. package/dist/gateway.d.ts +2 -2
  39. package/dist/gateway.js +2 -2
  40. package/dist/{gh-connector-schema-eoTtHbY6.d.ts → gh-connector-schema-CU1ojfIF.d.ts} +1 -1
  41. package/dist/{gh-connector-schema-o3Q1-ojL.js → gh-connector-schema-DUcZgN2Q.js} +1 -1
  42. package/dist/{gh-listener-DH-fClQm.js → gh-listener-Dsx6AmhH.js} +5 -5
  43. package/dist/{index-DF5VmCPJ.d.ts → index-CrngHrne.d.ts} +104 -607
  44. package/dist/index.d.ts +16 -11
  45. package/dist/index.js +508 -972
  46. package/dist/{local-config-json-schema-D8i-BogY.js → local-config-json-schema-DE1zkMcb.js} +12 -8
  47. package/dist/{local-config-sync-Cq39mT6p.d.ts → local-config-sync-B8b04LrZ.d.ts} +21 -16
  48. package/dist/local-config.d.ts +2 -2
  49. package/dist/local-config.js +2 -2
  50. package/dist/{memory-connector-diagnostic-log-COUWCsT_.js → memory-diagnostic-log-BZ1VD80X.js} +26 -95
  51. package/dist/{memory-token-prompter-CKV7VBM5.d.ts → memory-token-prompter-Lo3YRDzq.d.ts} +4 -4
  52. package/dist/{memory-token-prompter-Q7Snwsv2.js → memory-token-prompter-vBXxY20-.js} +2 -2
  53. package/dist/{profiles-f0mNmEyP.d.ts → profiles-EHTeCOqB.d.ts} +3 -2
  54. package/dist/profiles.d.ts +1 -1
  55. package/dist/profiles.js +1 -1
  56. package/dist/recovery.d.ts +2 -0
  57. package/dist/recovery.js +2 -0
  58. package/dist/{resolve-connector-token-BHmZLRrV.js → resolve-connector-token-CczqG_Ig.js} +1 -1
  59. package/dist/{schedule-connector-schema-iCI61gzU.js → schedule-connector-schema-B_xO5z5B.js} +1 -1
  60. package/dist/{schedule-listener-CUyUFFR1.d.ts → schedule-listener-DKh0hnkK.d.ts} +5 -5
  61. package/dist/{schedule-listener-ePAjians.js → schedule-listener-DP9Jhc6U.js} +14 -4
  62. package/dist/settings-reader-CBrgz01o.d.ts +18 -0
  63. package/dist/{settings-reader-BSU6JyvM.d.ts → settings-schema-zhnMIa8I.d.ts} +1 -16
  64. package/dist/{slack-connector-schema-BCNWluHM.js → slack-connector-schema-C1zEf4TG.js} +1 -1
  65. package/dist/{slack-listener-Bv5xI9gC.d.ts → slack-listener-COQA8wAZ.d.ts} +4 -4
  66. package/dist/{slack-listener-ClQuHhEF.js → slack-listener-DUKPcpJH.js} +7 -7
  67. package/dist/{mcp-QeNCBhOD.js → yaml-render-OhUN-qkS.js} +52 -34
  68. package/package.json +21 -1
  69. /package/dist/{file-system-BeOKXjlV.d.ts → file-system-Wub9Nto4.d.ts} +0 -0
  70. /package/dist/{process-runner-DfniuWVU.d.ts → process-runner-D5I_jhYQ.d.ts} +0 -0
  71. /package/dist/{profiles-wMRnjSid.js → profiles-MnXvYfZF.js} +0 -0
@@ -1,18 +1,23 @@
1
- import { n as FunnelIdGenerator, s as Settings, t as FunnelSettingsReader } from "./settings-reader-BSU6JyvM.js";
2
- import { n as FunnelClaude, t as FileProcessGuard } from "./file-process-guard-DMeLB6Zd.js";
3
- 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 "./connector-diagnostic-log-yTOojKUR.js";
4
- import { a as RunOptions, i as ProcessSnapshot, n as DetachOptions, o as RunResult, r as FunnelProcessRunner, t as AttachOptions } from "./process-runner-DfniuWVU.js";
5
- import { n as FunnelFileSystem, t as FileStat } from "./file-system-BeOKXjlV.js";
6
- import { t as FunnelProfiles } from "./profiles-f0mNmEyP.js";
7
- 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-Cq39mT6p.js";
1
+ import { a as Settings } from "./settings-schema-zhnMIa8I.js";
2
+ import { n as FunnelClaude, t as FileProcessGuard } from "./file-process-guard-DI1742H5.js";
3
+ import { n as FunnelIdGenerator, t as FunnelSettingsReader } from "./settings-reader-CBrgz01o.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-Bxe7Bbvw.js";
5
+ import { a as RunOptions, i as ProcessSnapshot, n as DetachOptions, o as RunResult, r as FunnelProcessRunner, t as AttachOptions } from "./process-runner-D5I_jhYQ.js";
6
+ import { n as FunnelFileSystem, t as FileStat } from "./file-system-Wub9Nto4.js";
7
+ import { t as FunnelProfiles } from "./profiles-EHTeCOqB.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-B8b04LrZ.js";
9
+ import { c as FunnelDiagnostics } from "./funnel-diagnostics-qWy5tPSq.js";
10
+ import { n as FunnelDocs } from "./funnel-docs-dXPokzr5.js";
11
+ import { t as FunnelRecovery } from "./funnel-recovery-BUBsu7WX.js";
12
+ import { r as FunnelDoctor } from "./funnel-doctor-BF3Rdgk0.js";
8
13
  import { hc } from "hono/client";
9
14
  import { z } from "zod";
10
15
  import * as _$hono_factory0 from "hono/factory";
11
- import { Server, ServerWebSocket } from "bun";
12
16
  import { Hono } from "hono";
17
+ import { Server, ServerWebSocket } from "bun";
13
18
  import * as _$hono_utils_http_status0 from "hono/utils/http-status";
14
- import * as _$hono_utils_types0 from "hono/utils/types";
15
19
  import * as _$hono_hono_base0 from "hono/hono-base";
20
+ import * as _$hono_utils_types0 from "hono/utils/types";
16
21
 
17
22
  //#region lib/engine/error/on-funnel-error.d.ts
18
23
  /**
@@ -58,7 +63,7 @@ type BroadcastSubscriber = (event: ReplayableEvent) => void;
58
63
  type ReplaySource = {
59
64
  loadSince(since: number): ReplayableEvent[];
60
65
  };
61
- type Deps$7 = {
66
+ type Deps$8 = {
62
67
  logger?: FunnelLogger; /** Host hook for surfacing subscriber-throw exceptions. Defaults to no-op. */
63
68
  onError?: OnFunnelError;
64
69
  maxBufferedBytes?: number;
@@ -110,7 +115,7 @@ declare class FunnelBroadcaster {
110
115
  private droppedSlowClients;
111
116
  private lastBroadcastAt;
112
117
  private latestOffset;
113
- constructor(deps?: Deps$7);
118
+ constructor(deps?: Deps$8);
114
119
  getMetrics(): BroadcasterMetrics;
115
120
  /**
116
121
  * Returns events with offset > since, filtered by the connector subscription
@@ -158,7 +163,7 @@ type ConnectorRegistry = {
158
163
  } | null;
159
164
  };
160
165
  type SupervisorNotify = (channelName: string, connectorName: string, content: string, meta?: Record<string, string>) => Promise<void>;
161
- type Deps$6 = {
166
+ type Deps$7 = {
162
167
  channels: ConnectorRegistry;
163
168
  notify: SupervisorNotify;
164
169
  logger?: FunnelLogger; /** Host hook for surfacing listener lifecycle exceptions. Defaults to no-op. */
@@ -205,7 +210,7 @@ declare class FunnelListenerSupervisor {
205
210
  private readonly now;
206
211
  private healthCheckTimer;
207
212
  private healthCheckInFlight;
208
- constructor(deps: Deps$6);
213
+ constructor(deps: Deps$7);
209
214
  static keyOf(channelName: string, connectorName: string): string;
210
215
  isRunning(channelName: string, connectorName: string): boolean;
211
216
  list(): ListenerEntryStatus[];
@@ -257,7 +262,7 @@ type Env$1 = {
257
262
  };
258
263
  };
259
264
  //#endregion
260
- //#region lib/gateway/funnel-event-log.d.ts
265
+ //#region lib/gateway/event-log/event-log.d.ts
261
266
  /**
262
267
  * Replayable event payload persisted by the gateway. Domain events the
263
268
  * broadcaster emits to WS clients land here so reconnects across daemon
@@ -322,7 +327,7 @@ type GatewayEventStore = {
322
327
  dbPath?: undefined;
323
328
  eventLog: FunnelEventLog;
324
329
  };
325
- type Deps$5 = GatewayEventStore & {
330
+ type Deps$6 = GatewayEventStore & {
326
331
  channels: FunnelChannels;
327
332
  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. */
328
333
  hostname?: string;
@@ -387,7 +392,7 @@ declare class FunnelGatewayServer {
387
392
  private readonly extraRoutes;
388
393
  private startedAt;
389
394
  private server;
390
- constructor(deps: Deps$5);
395
+ constructor(deps: Deps$6);
391
396
  start(): Promise<Server<WsData>>;
392
397
  stop(): Promise<void>;
393
398
  getStatus(): {
@@ -487,7 +492,7 @@ declare function channelWsProtocols(token?: string | null): string[];
487
492
  declare function gatewayLoopbackUrl(port: number): string;
488
493
  //#endregion
489
494
  //#region lib/gateway/gateway-token.d.ts
490
- type Deps$4 = {
495
+ type Deps$5 = {
491
496
  fs?: FunnelFileSystem;
492
497
  dir?: string;
493
498
  generate?: () => string;
@@ -504,7 +509,7 @@ declare class FunnelGatewayToken {
504
509
  private readonly fs;
505
510
  private readonly path;
506
511
  private readonly generate;
507
- constructor(deps?: Deps$4);
512
+ constructor(deps?: Deps$5);
508
513
  read(): string | null;
509
514
  /**
510
515
  * Returns the existing token or, if missing, generates one and writes it with mode 0600.
@@ -549,7 +554,7 @@ type PublishResult = {
549
554
  };
550
555
  //#endregion
551
556
  //#region lib/gateway/channel-publisher.d.ts
552
- type Deps$3 = {
557
+ type Deps$4 = {
553
558
  port: number;
554
559
  isDaemonRunning: () => boolean; /** Returns the daemon's gateway token, or null if unavailable. Sent as `Authorization: Bearer`. */
555
560
  getToken?: () => string | null;
@@ -563,15 +568,16 @@ declare class FunnelChannelPublisher {
563
568
  private readonly port;
564
569
  private readonly isDaemonRunning;
565
570
  private readonly getToken;
566
- constructor(deps: Deps$3);
571
+ constructor(deps: Deps$4);
567
572
  publish(channelName: string, request: PublishRequest): Promise<PublishResult>;
568
573
  private authHeaders;
569
574
  }
570
575
  //#endregion
571
- //#region lib/gateway/sqlite-funnel-event-log.d.ts
572
- type Props$7 = {
576
+ //#region lib/gateway/event-log/sqlite-event-log.d.ts
577
+ type Props$6 = {
573
578
  /** SQLite database file path. Created on first write. ":memory:" for tests. */path: string; /** Override for tests. Defaults to `Date.now`. */
574
- now?: () => number; /** Optional row cap. Pruned on every insert. */
579
+ now?: () => number; /** Surfaces a failed persist (PK collision, disk-full, locked WAL). Silent if absent. */
580
+ logger?: FunnelLogger; /** Optional row cap. Pruned on every insert. */
575
581
  maxRows?: number; /** Optional age cap in ms. Pruned on every insert. */
576
582
  maxAgeMs?: number; /** Optional on-disk byte cap. Checked periodically; on overflow the oldest rows are dropped toward targetBytes and the file is VACUUMed. */
577
583
  maxBytes?: number; /** Shrink target when maxBytes is exceeded. Defaults to maxBytes/4. */
@@ -597,7 +603,8 @@ type Props$7 = {
597
603
  declare class SqliteFunnelEventLog extends FunnelEventLog {
598
604
  private readonly sink;
599
605
  private readonly now;
600
- constructor(props: Props$7);
606
+ private readonly logger;
607
+ constructor(props: Props$6);
601
608
  /**
602
609
  * Persist a broadcaster-driven event with its assigned offset. Caller
603
610
  * (the gateway-server) supplies the offset from `broadcaster.broadcast()`
@@ -626,7 +633,7 @@ declare class SqliteFunnelEventLog extends FunnelEventLog {
626
633
  close(): void;
627
634
  }
628
635
  //#endregion
629
- //#region lib/gateway/memory-funnel-event-log.d.ts
636
+ //#region lib/gateway/event-log/memory-event-log.d.ts
630
637
  /**
631
638
  * In-process `FunnelEventLog` backed by a plain array. Used by tests and by
632
639
  * embedders that do not need durability — replay works within the process
@@ -644,8 +651,8 @@ declare class MemoryFunnelEventLog extends FunnelEventLog {
644
651
  close(): void;
645
652
  }
646
653
  //#endregion
647
- //#region lib/gateway/sqlite-connector-diagnostic-log.d.ts
648
- type Props$6 = {
654
+ //#region lib/gateway/diagnostic-log/sqlite-diagnostic-log.d.ts
655
+ type Props$5 = {
649
656
  /** SQLite file for the raw (pre-filter) table. ":memory:" for tests. */rawPath: string; /** SQLite file for the processed (verdict) table. ":memory:" for tests. */
650
657
  processedPath: string; /** SQLite file for the connection (lifecycle) table. ":memory:" for tests. */
651
658
  connectionPath: string;
@@ -680,7 +687,7 @@ declare class SqliteConnectorDiagnosticLog extends ConnectorDiagnosticLog {
680
687
  private readonly connection;
681
688
  private readonly now;
682
689
  private readonly logger;
683
- constructor(props: Props$6);
690
+ constructor(props: Props$5);
684
691
  recordRaw(record: ConnectorRawRecord): void;
685
692
  recordProcessed(record: ConnectorProcessedRecord): void;
686
693
  recordConnection(record: ConnectorConnectionRecord): void;
@@ -692,7 +699,7 @@ declare class SqliteConnectorDiagnosticLog extends ConnectorDiagnosticLog {
692
699
  close(): void;
693
700
  }
694
701
  //#endregion
695
- //#region lib/gateway/memory-connector-diagnostic-log.d.ts
702
+ //#region lib/gateway/diagnostic-log/memory-diagnostic-log.d.ts
696
703
  /**
697
704
  * In-process `ConnectorDiagnosticLog` backed by one array per table. Used by tests
698
705
  * and embedders that do not need durability. Like the SQLite log it keeps
@@ -720,7 +727,7 @@ declare class MemoryConnectorDiagnosticLog extends ConnectorDiagnosticLog {
720
727
  }
721
728
  //#endregion
722
729
  //#region lib/gateway/gateway.d.ts
723
- type Deps$2 = {
730
+ type Deps$3 = {
724
731
  process?: FunnelProcessRunner;
725
732
  fs?: FunnelFileSystem;
726
733
  clock?: FunnelClock;
@@ -744,7 +751,7 @@ declare class FunnelGateway {
744
751
  private readonly tmpDir;
745
752
  private readonly port;
746
753
  private readonly sleep;
747
- constructor(deps?: Deps$2);
754
+ constructor(deps?: Deps$3);
748
755
  isRunning(): boolean;
749
756
  getStatus(): {
750
757
  running: boolean;
@@ -775,7 +782,7 @@ declare class FunnelGateway {
775
782
  }
776
783
  //#endregion
777
784
  //#region lib/gateway/listeners-client.d.ts
778
- type Deps$1 = {
785
+ type Deps$2 = {
779
786
  port: number;
780
787
  isDaemonRunning: () => boolean; /** Returns the daemon's gateway token, or null if unavailable. Sent as `Authorization: Bearer`. */
781
788
  getToken?: () => string | null;
@@ -816,7 +823,7 @@ declare class FunnelListenersClient {
816
823
  private readonly port;
817
824
  private readonly isDaemonRunning;
818
825
  private readonly getToken;
819
- constructor(deps: Deps$1);
826
+ constructor(deps: Deps$2);
820
827
  list(): Promise<ListListenersResult>;
821
828
  start(channelName: string, connectorName: string): Promise<ListenerOpResult>;
822
829
  stop(channelName: string, connectorName: string): Promise<ListenerOpResult>;
@@ -826,36 +833,8 @@ declare class FunnelListenersClient {
826
833
  private call;
827
834
  }
828
835
  //#endregion
829
- //#region lib/gateway/funnel-debug.d.ts
830
- type FunnelDebugReport = {
831
- gateway: {
832
- running: boolean;
833
- pid: number | null;
834
- port: number | null;
835
- uptimeMs: number | null;
836
- };
837
- channels: Array<{
838
- name: string;
839
- connectors: string[];
840
- listener: {
841
- alive: boolean;
842
- events: number;
843
- errors: number;
844
- lastEventAt: string | null;
845
- } | null;
846
- claudeConnected: boolean;
847
- claudeClientCount: number;
848
- }>;
849
- recentEvents: Array<{
850
- ts: number;
851
- outcome: string;
852
- payload: string | null;
853
- preview: string | null;
854
- }> | null;
855
- };
856
- //#endregion
857
836
  //#region lib/funnel.d.ts
858
- type Props$5 = {
837
+ type Props$4 = {
859
838
  /** 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. */
860
839
  fs?: FunnelFileSystem; /** Process runner used by gateway / claude / gh listener. Replace with MemoryFunnelProcessRunner for tests. */
861
840
  process?: FunnelProcessRunner; /** Logger flowed into every facet. Replace with MemoryFunnelLogger or NoopFunnelLogger to silence/inspect. */
@@ -944,18 +923,22 @@ declare class Funnel {
944
923
  readonly profiles: FunnelProfiles;
945
924
  readonly localConfig: FunnelLocalConfig;
946
925
  readonly localConfigSync: FunnelLocalConfigSync;
926
+ readonly diagnostics: FunnelDiagnostics;
927
+ readonly recovery: FunnelRecovery;
928
+ readonly doctor: FunnelDoctor;
929
+ readonly docs: FunnelDocs;
947
930
  private readonly fs;
948
931
  private readonly process;
949
932
  private readonly logger;
950
933
  private readonly clock;
951
934
  private readonly onError;
952
- constructor(props?: Props$5);
935
+ constructor(props?: Props$4);
953
936
  /**
954
937
  * Sandboxed Funnel wired with in-memory implementations for every IO boundary.
955
938
  * Touches no real disk, processes, wall-clock time, or UUIDs — safe for tests
956
939
  * and ad-hoc experiments. Override individual fields by passing them in `props`.
957
940
  */
958
- static inMemory(props?: Props$5): Funnel;
941
+ static inMemory(props?: Props$4): Funnel;
959
942
  /**
960
943
  * In-process gateway server. Unlike `gateway.start()` (which spawns a daemon),
961
944
  * this returns a class that runs `Bun.serve` + listeners inside the current process —
@@ -975,7 +958,6 @@ declare class Funnel {
975
958
  runGatewayForeground(options?: {
976
959
  caffeinate?: boolean;
977
960
  }): Promise<number>;
978
- debug(channelName?: string): Promise<FunnelDebugReport>;
979
961
  gatewayClient(): ReturnType<typeof hc<GatewayApp>>;
980
962
  }
981
963
  //#endregion
@@ -999,7 +981,7 @@ declare const DEFAULT_GATEWAY_PORT = 9742;
999
981
  declare function resolveFunnelPort(): number;
1000
982
  declare const FUNNEL_DIR: string;
1001
983
  declare const SETTINGS_PATH: string;
1002
- type Deps = {
984
+ type Deps$1 = {
1003
985
  path?: string;
1004
986
  fs?: FunnelFileSystem;
1005
987
  idGenerator?: FunnelIdGenerator;
@@ -1008,7 +990,7 @@ declare class FunnelSettingsStore extends FunnelSettingsReader {
1008
990
  private readonly path;
1009
991
  private readonly fs;
1010
992
  private readonly idGenerator;
1011
- constructor(deps?: Deps);
993
+ constructor(deps?: Deps$1);
1012
994
  read(): Settings;
1013
995
  private looksLikeLegacy;
1014
996
  /**
@@ -1048,7 +1030,7 @@ declare class NodeFunnelFileSystem extends FunnelFileSystem {
1048
1030
  }
1049
1031
  //#endregion
1050
1032
  //#region lib/engine/fs/memory-file-system.d.ts
1051
- type Props$4 = {
1033
+ type Props$3 = {
1052
1034
  dirs?: string[];
1053
1035
  files?: Record<string, string>;
1054
1036
  mtimes?: Record<string, number>;
@@ -1061,7 +1043,7 @@ declare class MemoryFunnelFileSystem extends FunnelFileSystem {
1061
1043
  private readonly mtimes;
1062
1044
  private readonly modes;
1063
1045
  private readonly now;
1064
- constructor(props?: Props$4);
1046
+ constructor(props?: Props$3);
1065
1047
  existsSync(path: string): boolean;
1066
1048
  readFileSync(path: string): string;
1067
1049
  writeFileSync(path: string, data: string): void;
@@ -1147,14 +1129,14 @@ declare class MemoryFunnelProcessRunner extends FunnelProcessRunner {
1147
1129
  }
1148
1130
  //#endregion
1149
1131
  //#region lib/engine/logger/node-logger.d.ts
1150
- type Props$3 = {
1132
+ type Props$2 = {
1151
1133
  file?: string;
1152
1134
  now?: () => Date;
1153
1135
  };
1154
1136
  declare class NodeFunnelLogger extends FunnelLogger {
1155
1137
  readonly file: string;
1156
1138
  private readonly now;
1157
- constructor(props?: Props$3);
1139
+ constructor(props?: Props$2);
1158
1140
  info(message: string, meta?: Record<string, unknown>): void;
1159
1141
  warn(message: string, meta?: Record<string, unknown>): void;
1160
1142
  error(message: string, meta?: Record<string, unknown>): void;
@@ -1190,12 +1172,12 @@ declare class NodeFunnelClock extends FunnelClock {
1190
1172
  }
1191
1173
  //#endregion
1192
1174
  //#region lib/engine/time/memory-clock.d.ts
1193
- type Props$2 = {
1175
+ type Props$1 = {
1194
1176
  start?: Date;
1195
1177
  };
1196
1178
  declare class MemoryFunnelClock extends FunnelClock {
1197
1179
  private current;
1198
- constructor(props?: Props$2);
1180
+ constructor(props?: Props$1);
1199
1181
  now(): Date;
1200
1182
  set(date: Date): void;
1201
1183
  advance(ms: number): void;
@@ -1207,48 +1189,31 @@ declare class NodeFunnelIdGenerator extends FunnelIdGenerator {
1207
1189
  }
1208
1190
  //#endregion
1209
1191
  //#region lib/engine/id/memory-id-generator.d.ts
1210
- type Props$1 = {
1192
+ type Props = {
1211
1193
  prefix?: string;
1212
1194
  };
1213
1195
  declare class MemoryFunnelIdGenerator extends FunnelIdGenerator {
1214
1196
  private counter;
1215
1197
  private readonly prefix;
1216
- constructor(props?: Props$1);
1198
+ constructor(props?: Props);
1217
1199
  generate(): string;
1218
1200
  }
1219
1201
  //#endregion
1220
- //#region lib/gateway/connector-diagnostic-sql-reader.d.ts
1221
- type Props = {
1222
- /** SQLite file holding the raw (pre-filter) table. */rawPath: string; /** SQLite file holding the processed (verdict) table. */
1223
- processedPath: string; /** SQLite file holding the connection (lifecycle) table. */
1224
- connectionPath: string;
1202
+ //#region lib/gateway/service-routes.d.ts
1203
+ type Deps = {
1204
+ diagnostics: FunnelDiagnostics;
1205
+ doctor: FunnelDoctor; /** Bearer token to gate every endpoint. Empty string disables auth (tests only). */
1206
+ token: string;
1225
1207
  };
1226
- type Row = Record<string, unknown>;
1227
1208
  /**
1228
- * Read-only SQL surface over the three diagnostic tables, for Claude to query
1229
- * the log with arbitrary `SELECT`s. It opens all files read-only and exposes
1230
- * three views `raw`, `processed`, `connection` that hide the storage
1231
- * details (the physical table is `leuco_log` and each row's columns live
1232
- * inside a JSON `event` blob): the views surface the columns as plain fields,
1233
- * with `payload` already pulled out of the nested JSON.
1234
- *
1235
- * The tables are separate files. `raw` and `processed` share an `event_id`,
1236
- * so a `JOIN` answers "the event arrived, but what verdict did it get?";
1237
- * `connection` answers the other half — "did the listener ever connect at
1238
- * all?". Writes are impossible: the connection is read-only and `query`
1239
- * rejects anything but a single `SELECT`.
1209
+ * Mountable Hono app that exposes the service layer (`FunnelDiagnostics` +
1210
+ * `FunnelDoctor`) over loopback HTTP. The MCP server, which lives in a
1211
+ * different process, calls these endpoints to drive the autonomous
1212
+ * troubleshooting loop. The CLI bypasses HTTP and calls the same services
1213
+ * directly through the in-process funnel facade, so CLI and MCP share one
1214
+ * code path.
1240
1215
  */
1241
- declare class ConnectorDiagnosticSqlReader {
1242
- private readonly db;
1243
- constructor(props: Props);
1244
- /**
1245
- * Run one read-only `SELECT` and return the rows. Returns an `Error` (rather
1246
- * than throwing) for a non-SELECT statement or a SQL error, so the caller
1247
- * can surface the message without a stack trace.
1248
- */
1249
- query(sql: string, params?: (string | number | null)[]): Row[] | Error;
1250
- close(): void;
1251
- }
1216
+ declare const buildServiceRoutes: (deps: Deps) => Hono<Env$1>;
1252
1217
  //#endregion
1253
1218
  //#region lib/cli/factory.d.ts
1254
1219
  type Env = {
@@ -1294,7 +1259,7 @@ declare const routes: _$hono_hono_base0.HonoBase<Env, {
1294
1259
  channel?: string | undefined;
1295
1260
  };
1296
1261
  };
1297
- 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.";
1262
+ 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 })";
1298
1263
  outputFormat: "text";
1299
1264
  status: _$hono_utils_http_status0.ContentfulStatusCode;
1300
1265
  };
@@ -1303,31 +1268,11 @@ declare const routes: _$hono_hono_base0.HonoBase<Env, {
1303
1268
  "/channels": {
1304
1269
  $get: {
1305
1270
  input: {
1306
- query: {
1307
- json?: "" | "true" | "false" | undefined;
1308
- };
1271
+ query: Record<string, never>;
1309
1272
  };
1310
1273
  output: string;
1311
1274
  outputFormat: "text";
1312
1275
  status: _$hono_utils_http_status0.ContentfulStatusCode;
1313
- } | {
1314
- input: {
1315
- query: {
1316
- json?: "" | "true" | "false" | undefined;
1317
- };
1318
- };
1319
- output: {
1320
- id: string;
1321
- name: string;
1322
- delivery: "fanout" | "exclusive";
1323
- connectors: {
1324
- id: string;
1325
- name: string;
1326
- type: "discord" | "schedule" | "slack" | "gh";
1327
- }[];
1328
- }[];
1329
- outputFormat: "json";
1330
- status: _$hono_utils_http_status0.ContentfulStatusCode;
1331
1276
  };
1332
1277
  };
1333
1278
  } & {
@@ -1557,34 +1502,11 @@ declare const routes: _$hono_hono_base0.HonoBase<Env, {
1557
1502
  channel: string;
1558
1503
  };
1559
1504
  } & {
1560
- query: {
1561
- json?: "" | "true" | "false" | undefined;
1562
- };
1505
+ query: Record<string, never>;
1563
1506
  };
1564
1507
  output: string;
1565
1508
  outputFormat: "text";
1566
1509
  status: _$hono_utils_http_status0.ContentfulStatusCode;
1567
- } | {
1568
- input: {
1569
- param: {
1570
- channel: string;
1571
- };
1572
- } & {
1573
- query: {
1574
- json?: "" | "true" | "false" | undefined;
1575
- };
1576
- };
1577
- output: {
1578
- channel: string;
1579
- valid: boolean;
1580
- issues: {
1581
- connector: string;
1582
- field: string;
1583
- message: string;
1584
- }[];
1585
- };
1586
- outputFormat: "json";
1587
- status: _$hono_utils_http_status0.ContentfulStatusCode;
1588
1510
  };
1589
1511
  };
1590
1512
  } & {
@@ -1955,6 +1877,7 @@ declare const routes: _$hono_hono_base0.HonoBase<Env, {
1955
1877
  query: {
1956
1878
  [x: string]: string | string[];
1957
1879
  method: string | string[];
1880
+ path?: string | undefined;
1958
1881
  };
1959
1882
  };
1960
1883
  output: string;
@@ -2020,9 +1943,9 @@ declare const routes: _$hono_hono_base0.HonoBase<Env, {
2020
1943
  };
2021
1944
  } & {
2022
1945
  query: {
2023
- cron: string | string[];
2024
- prompt: string | string[];
2025
- enabled?: string | string[] | undefined;
1946
+ cron: string;
1947
+ prompt: string;
1948
+ enabled?: "true" | "false" | undefined;
2026
1949
  "catchup-policy"?: "latest" | "all" | "skip" | undefined;
2027
1950
  };
2028
1951
  };
@@ -2038,9 +1961,9 @@ declare const routes: _$hono_hono_base0.HonoBase<Env, {
2038
1961
  };
2039
1962
  } & {
2040
1963
  query: {
2041
- cron: string | string[];
2042
- prompt: string | string[];
2043
- enabled?: string | string[] | undefined;
1964
+ cron: string;
1965
+ prompt: string;
1966
+ enabled?: "true" | "false" | undefined;
2044
1967
  "catchup-policy"?: "latest" | "all" | "skip" | undefined;
2045
1968
  };
2046
1969
  };
@@ -2419,25 +2342,11 @@ declare const routes: _$hono_hono_base0.HonoBase<Env, {
2419
2342
  "/gateway/status": {
2420
2343
  $get: {
2421
2344
  input: {
2422
- query: {
2423
- json?: "" | "true" | "false" | undefined;
2424
- };
2345
+ query: Record<string, never>;
2425
2346
  };
2426
2347
  output: string;
2427
2348
  outputFormat: "text";
2428
2349
  status: _$hono_utils_http_status0.ContentfulStatusCode;
2429
- } | {
2430
- input: {
2431
- query: {
2432
- json?: "" | "true" | "false" | undefined;
2433
- };
2434
- };
2435
- output: {
2436
- running: true;
2437
- port: number;
2438
- };
2439
- outputFormat: "json";
2440
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2441
2350
  };
2442
2351
  };
2443
2352
  } & {
@@ -2580,21 +2489,6 @@ declare const routes: _$hono_hono_base0.HonoBase<Env, {
2580
2489
  output: string;
2581
2490
  outputFormat: "text";
2582
2491
  status: _$hono_utils_http_status0.ContentfulStatusCode;
2583
- } | {
2584
- input: {
2585
- query: Record<string, never>;
2586
- };
2587
- output: "funnel gateway: no running listeners";
2588
- outputFormat: "text";
2589
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2590
- } | {
2591
- input: {
2592
- query: Record<string, never>;
2593
- };
2594
- output: `funnel gateway: running listeners
2595
- ${string}`;
2596
- outputFormat: "text";
2597
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2598
2492
  };
2599
2493
  };
2600
2494
  } & {
@@ -2604,180 +2498,12 @@ ${string}`;
2604
2498
  query: {
2605
2499
  channel?: string | undefined;
2606
2500
  all?: "" | "true" | "false" | undefined;
2607
- json?: "" | "true" | "false" | undefined;
2608
2501
  limit?: string | undefined;
2609
2502
  };
2610
2503
  };
2611
2504
  output: string;
2612
2505
  outputFormat: "text";
2613
2506
  status: _$hono_utils_http_status0.ContentfulStatusCode;
2614
- } | {
2615
- input: {
2616
- query: {
2617
- channel?: string | undefined;
2618
- all?: "" | "true" | "false" | undefined;
2619
- json?: "" | "true" | "false" | undefined;
2620
- limit?: string | undefined;
2621
- };
2622
- };
2623
- output: {
2624
- error: string;
2625
- nextAction: string;
2626
- };
2627
- outputFormat: "json";
2628
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2629
- } | {
2630
- input: {
2631
- query: {
2632
- channel?: string | undefined;
2633
- all?: "" | "true" | "false" | undefined;
2634
- json?: "" | "true" | "false" | undefined;
2635
- limit?: string | undefined;
2636
- };
2637
- };
2638
- output: {
2639
- summary: {
2640
- total: number;
2641
- ok: number;
2642
- warn: number;
2643
- error: number;
2644
- criticalChannels: string[];
2645
- warnChannels: string[];
2646
- suggestedActions: string[];
2647
- };
2648
- channels: {
2649
- channel: string;
2650
- gateway: {
2651
- running: boolean;
2652
- pid: number | null;
2653
- port: number | null;
2654
- uptimeMs: number | null;
2655
- };
2656
- listeners: {
2657
- name: string;
2658
- type: string;
2659
- alive: boolean;
2660
- events: number;
2661
- errors: number;
2662
- lastEventAt: string | null;
2663
- }[];
2664
- claudeClients: number;
2665
- channelId: string;
2666
- recentEvents: {
2667
- seq: number | null;
2668
- ts: number | null;
2669
- type: string;
2670
- outcome: string;
2671
- eventId: string | null;
2672
- payload: string | null;
2673
- payloadParsed: {
2674
- [x: string]: _$hono_utils_types0.JSONValue;
2675
- } | null;
2676
- preview: string | null;
2677
- }[];
2678
- connectionErrors: {
2679
- seq: number | null;
2680
- ts: number | null;
2681
- type: string;
2682
- status: string;
2683
- detail: string | null;
2684
- }[];
2685
- diagnosis: {
2686
- status: "ok" | "warn" | "error";
2687
- message: string;
2688
- nextActions: string[];
2689
- rootCause: string | null;
2690
- };
2691
- }[];
2692
- };
2693
- outputFormat: "json";
2694
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2695
- } | {
2696
- input: {
2697
- query: {
2698
- channel?: string | undefined;
2699
- all?: "" | "true" | "false" | undefined;
2700
- json?: "" | "true" | "false" | undefined;
2701
- limit?: string | undefined;
2702
- };
2703
- };
2704
- output: {
2705
- error: string;
2706
- availableChannels: string[];
2707
- };
2708
- outputFormat: "json";
2709
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2710
- } | {
2711
- input: {
2712
- query: {
2713
- channel?: string | undefined;
2714
- all?: "" | "true" | "false" | undefined;
2715
- json?: "" | "true" | "false" | undefined;
2716
- limit?: string | undefined;
2717
- };
2718
- };
2719
- output: {
2720
- error: string;
2721
- channels: string[];
2722
- hint: string;
2723
- };
2724
- outputFormat: "json";
2725
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2726
- } | {
2727
- input: {
2728
- query: {
2729
- channel?: string | undefined;
2730
- all?: "" | "true" | "false" | undefined;
2731
- json?: "" | "true" | "false" | undefined;
2732
- limit?: string | undefined;
2733
- };
2734
- };
2735
- output: {
2736
- channel: string;
2737
- gateway: {
2738
- running: boolean;
2739
- pid: number | null;
2740
- port: number | null;
2741
- uptimeMs: number | null;
2742
- };
2743
- listeners: {
2744
- name: string;
2745
- type: string;
2746
- alive: boolean;
2747
- events: number;
2748
- errors: number;
2749
- lastEventAt: string | null;
2750
- }[];
2751
- claudeClients: number;
2752
- channelId: string;
2753
- recentEvents: {
2754
- seq: number | null;
2755
- ts: number | null;
2756
- type: string;
2757
- outcome: string;
2758
- eventId: string | null;
2759
- payload: string | null;
2760
- payloadParsed: {
2761
- [x: string]: _$hono_utils_types0.JSONValue;
2762
- } | null;
2763
- preview: string | null;
2764
- }[];
2765
- connectionErrors: {
2766
- seq: number | null;
2767
- ts: number | null;
2768
- type: string;
2769
- status: string;
2770
- detail: string | null;
2771
- }[];
2772
- diagnosis: {
2773
- status: "ok" | "warn" | "error";
2774
- message: string;
2775
- nextActions: string[];
2776
- rootCause: string | null;
2777
- };
2778
- };
2779
- outputFormat: "json";
2780
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2781
2507
  };
2782
2508
  };
2783
2509
  } & {
@@ -2787,62 +2513,11 @@ ${string}`;
2787
2513
  query: {
2788
2514
  channel?: string | undefined;
2789
2515
  limit?: string | undefined;
2790
- json?: "" | "true" | "false" | undefined;
2791
2516
  };
2792
2517
  };
2793
2518
  output: string;
2794
2519
  outputFormat: "text";
2795
2520
  status: _$hono_utils_http_status0.ContentfulStatusCode;
2796
- } | {
2797
- input: {
2798
- query: {
2799
- channel?: string | undefined;
2800
- limit?: string | undefined;
2801
- json?: "" | "true" | "false" | undefined;
2802
- };
2803
- };
2804
- output: {
2805
- error: string;
2806
- availableChannels: string[];
2807
- };
2808
- outputFormat: "json";
2809
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2810
- } | {
2811
- input: {
2812
- query: {
2813
- channel?: string | undefined;
2814
- limit?: string | undefined;
2815
- json?: "" | "true" | "false" | undefined;
2816
- };
2817
- };
2818
- output: {
2819
- error: string;
2820
- channels: string[];
2821
- };
2822
- outputFormat: "json";
2823
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2824
- } | {
2825
- input: {
2826
- query: {
2827
- channel?: string | undefined;
2828
- limit?: string | undefined;
2829
- json?: "" | "true" | "false" | undefined;
2830
- };
2831
- };
2832
- output: {
2833
- seq: number | null;
2834
- ts: number | null;
2835
- type: string;
2836
- outcome: string;
2837
- eventId: string | null;
2838
- payload: string | null;
2839
- payloadParsed: {
2840
- [x: string]: _$hono_utils_types0.JSONValue;
2841
- } | null;
2842
- preview: string | null;
2843
- }[];
2844
- outputFormat: "json";
2845
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2846
2521
  };
2847
2522
  };
2848
2523
  } & {
@@ -2852,62 +2527,11 @@ ${string}`;
2852
2527
  query: {
2853
2528
  channel?: string | undefined;
2854
2529
  limit?: string | undefined;
2855
- json?: "" | "true" | "false" | undefined;
2856
2530
  };
2857
2531
  };
2858
2532
  output: string;
2859
2533
  outputFormat: "text";
2860
2534
  status: _$hono_utils_http_status0.ContentfulStatusCode;
2861
- } | {
2862
- input: {
2863
- query: {
2864
- channel?: string | undefined;
2865
- limit?: string | undefined;
2866
- json?: "" | "true" | "false" | undefined;
2867
- };
2868
- };
2869
- output: {
2870
- seq: number | null;
2871
- ts: number | null;
2872
- type: string;
2873
- outcome: string;
2874
- eventId: string | null;
2875
- payload: string | null;
2876
- payloadParsed: {
2877
- [x: string]: _$hono_utils_types0.JSONValue;
2878
- } | null;
2879
- preview: string | null;
2880
- }[];
2881
- outputFormat: "json";
2882
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2883
- } | {
2884
- input: {
2885
- query: {
2886
- channel?: string | undefined;
2887
- limit?: string | undefined;
2888
- json?: "" | "true" | "false" | undefined;
2889
- };
2890
- };
2891
- output: {
2892
- error: string;
2893
- availableChannels: string[];
2894
- };
2895
- outputFormat: "json";
2896
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2897
- } | {
2898
- input: {
2899
- query: {
2900
- channel?: string | undefined;
2901
- limit?: string | undefined;
2902
- json?: "" | "true" | "false" | undefined;
2903
- };
2904
- };
2905
- output: {
2906
- error: string;
2907
- channels: string[];
2908
- };
2909
- outputFormat: "json";
2910
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2911
2535
  };
2912
2536
  };
2913
2537
  } & {
@@ -2917,57 +2541,11 @@ ${string}`;
2917
2541
  query: {
2918
2542
  channel?: string | undefined;
2919
2543
  limit?: string | undefined;
2920
- json?: "" | "true" | "false" | undefined;
2921
2544
  };
2922
2545
  };
2923
2546
  output: string;
2924
2547
  outputFormat: "text";
2925
2548
  status: _$hono_utils_http_status0.ContentfulStatusCode;
2926
- } | {
2927
- input: {
2928
- query: {
2929
- channel?: string | undefined;
2930
- limit?: string | undefined;
2931
- json?: "" | "true" | "false" | undefined;
2932
- };
2933
- };
2934
- output: {
2935
- error: string;
2936
- availableChannels: string[];
2937
- };
2938
- outputFormat: "json";
2939
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2940
- } | {
2941
- input: {
2942
- query: {
2943
- channel?: string | undefined;
2944
- limit?: string | undefined;
2945
- json?: "" | "true" | "false" | undefined;
2946
- };
2947
- };
2948
- output: {
2949
- error: string;
2950
- channels: string[];
2951
- };
2952
- outputFormat: "json";
2953
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2954
- } | {
2955
- input: {
2956
- query: {
2957
- channel?: string | undefined;
2958
- limit?: string | undefined;
2959
- json?: "" | "true" | "false" | undefined;
2960
- };
2961
- };
2962
- output: {
2963
- seq: number | null;
2964
- ts: number | null;
2965
- type: string;
2966
- status: string;
2967
- detail: string | null;
2968
- }[];
2969
- outputFormat: "json";
2970
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2971
2549
  };
2972
2550
  };
2973
2551
  } & {
@@ -2977,128 +2555,47 @@ ${string}`;
2977
2555
  query: {
2978
2556
  channel?: string | undefined;
2979
2557
  seq?: string | undefined;
2980
- json?: "" | "true" | "false" | undefined;
2981
2558
  };
2982
2559
  };
2983
2560
  output: string;
2984
2561
  outputFormat: "text";
2985
2562
  status: _$hono_utils_http_status0.ContentfulStatusCode;
2986
- } | {
2987
- input: {
2988
- query: {
2989
- channel?: string | undefined;
2990
- seq?: string | undefined;
2991
- json?: "" | "true" | "false" | undefined;
2992
- };
2993
- };
2994
- output: `error: ${string}`;
2995
- outputFormat: "text";
2996
- status: _$hono_utils_http_status0.ContentfulStatusCode;
2997
- } | {
2998
- input: {
2999
- query: {
3000
- channel?: string | undefined;
3001
- seq?: string | undefined;
3002
- json?: "" | "true" | "false" | undefined;
3003
- };
3004
- };
3005
- output: `channel not found: ${string}`;
3006
- outputFormat: "text";
3007
- status: _$hono_utils_http_status0.ContentfulStatusCode;
3008
- } | {
3009
- input: {
3010
- query: {
3011
- channel?: string | undefined;
3012
- seq?: string | undefined;
3013
- json?: "" | "true" | "false" | undefined;
3014
- };
3015
- };
3016
- output: "no diagnostic store yet (start the gateway first)";
3017
- outputFormat: "text";
3018
- status: _$hono_utils_http_status0.ContentfulStatusCode;
3019
- } | {
3020
- input: {
3021
- query: {
3022
- channel?: string | undefined;
3023
- seq?: string | undefined;
3024
- json?: "" | "true" | "false" | undefined;
3025
- };
3026
- };
3027
- output: `multiple channels \u2014 specify one with --channel:
3028
- ${string}`;
3029
- outputFormat: "text";
3030
- status: _$hono_utils_http_status0.ContentfulStatusCode;
3031
- } | {
3032
- input: {
3033
- query: {
3034
- channel?: string | undefined;
3035
- seq?: string | undefined;
3036
- json?: "" | "true" | "false" | undefined;
3037
- };
3038
- };
3039
- output: "no channels configured";
3040
- outputFormat: "text";
3041
- status: _$hono_utils_http_status0.ContentfulStatusCode;
3042
- } | {
3043
- input: {
3044
- query: {
3045
- channel?: string | undefined;
3046
- seq?: string | undefined;
3047
- json?: "" | "true" | "false" | undefined;
3048
- };
3049
- };
3050
- output: {
3051
- error: string;
3052
- };
3053
- outputFormat: "json";
3054
- status: _$hono_utils_http_status0.ContentfulStatusCode;
3055
- } | {
2563
+ };
2564
+ };
2565
+ } & {
2566
+ "/docs": {
2567
+ $get: {
3056
2568
  input: {
3057
- query: {
3058
- channel?: string | undefined;
3059
- seq?: string | undefined;
3060
- json?: "" | "true" | "false" | undefined;
3061
- };
2569
+ query: Record<string, never>;
3062
2570
  };
3063
- output: "no matching event found";
2571
+ output: string;
3064
2572
  outputFormat: "text";
3065
2573
  status: _$hono_utils_http_status0.ContentfulStatusCode;
3066
- } | {
2574
+ };
2575
+ };
2576
+ } & {
2577
+ "/docs/:topic": {
2578
+ $get: {
3067
2579
  input: {
3068
- query: {
3069
- channel?: string | undefined;
3070
- seq?: string | undefined;
3071
- json?: "" | "true" | "false" | undefined;
2580
+ param: {
2581
+ topic: string;
3072
2582
  };
3073
2583
  };
3074
- output: "event has no payload to replay";
2584
+ output: string;
3075
2585
  outputFormat: "text";
3076
2586
  status: _$hono_utils_http_status0.ContentfulStatusCode;
3077
- } | {
3078
- input: {
3079
- query: {
3080
- channel?: string | undefined;
3081
- seq?: string | undefined;
3082
- json?: "" | "true" | "false" | undefined;
3083
- };
3084
- };
3085
- output: {
3086
- replayed: true;
3087
- seq: number | null;
3088
- offset: number;
3089
- preview: string | null;
3090
- };
3091
- outputFormat: "json";
3092
- status: _$hono_utils_http_status0.ContentfulStatusCode;
3093
- } | {
2587
+ };
2588
+ };
2589
+ } & {
2590
+ "/doctor": {
2591
+ $get: {
3094
2592
  input: {
3095
2593
  query: {
3096
- channel?: string | undefined;
3097
- seq?: string | undefined;
3098
- json?: "" | "true" | "false" | undefined;
2594
+ fix?: "" | "true" | "false" | undefined;
2595
+ aggressive?: "" | "true" | "false" | undefined;
3099
2596
  };
3100
2597
  };
3101
- output: `replayed seq=${number} \u2192 offset=${number}${string}` | `replayed seq=? \u2192 offset=${number}${string}`;
2598
+ output: string;
3102
2599
  outputFormat: "text";
3103
2600
  status: _$hono_utils_http_status0.ContentfulStatusCode;
3104
2601
  };
@@ -3478,4 +2975,4 @@ declare function buildGatewayRoutes(): _$hono_hono_base0.HonoBase<Env$1, {
3478
2975
  };
3479
2976
  }, "/", "/channels/:channel/publish">;
3480
2977
  //#endregion
3481
- export { DEFAULT_GATEWAY_TOKEN_PATH as $, FUNNEL_DIR as A, ListenerEntry as B, ProcessListStub as C, MockFunnelSettingsReader as D, NodeFunnelFileSystem as E, Funnel as F, MemoryFunnelEventLog as G, FunnelGateway as H, GatewayServerOptions as I, PublishRequest as J, SqliteFunnelEventLog as K, FunnelDebugReport as L, SETTINGS_PATH as M, resolveFunnelDir as N, createSettings as O, resolveFunnelPort as P, publishResponseSchema as Q, FunnelListenersClient as R, MemoryProcessSyncHandler as S, MemoryFunnelFileSystem as T, MemoryConnectorDiagnosticLog as U, ListenerOpResult as V, SqliteConnectorDiagnosticLog as W, PublishResult as X, PublishResponse as Y, publishRequestSchema as Z, AliveStub as _, FunnelBroadcaster as _t, toRequest as a, FunnelGatewayServer as at, MemoryProcessHandler as b, ConnectorDiagnosticSqlReader as c, FunnelEventLog as ct, MemoryFunnelClock as d, Env$1 as dt, FunnelGatewayToken as et, NodeFunnelClock as f, GatewayEmitInput as ft, NodeFunnelLogger as g, BroadcastSubscriber as gt, MemoryFunnelLogger as h, BroadcastEvent as ht, queryToCliArgs as i, channelWsUrl as it, FunnelSettingsStore as j, DEFAULT_GATEWAY_PORT as k, MemoryFunnelIdGenerator as l, FunnelEventRecord as lt, LogEntry as m, FunnelListenerSupervisor as mt, CliApp as n, ChannelWsUrlInput as nt, Env as o, GatewayEventStore as ot, NoopFunnelLogger as p, GatewayRouteDeps as pt, FunnelChannelPublisher as q, routes as r, channelWsProtocols as rt, factory as s, FunnelEvent as st, GatewayApp as t, gatewayLoopbackUrl as tt, NodeFunnelIdGenerator as u, funnelEventSchema as ut, MemoryFunnelProcessRunner as v, ReplayableEvent as vt, NodeFunnelProcessRunner as w, MemoryProcessResponse as x, MemoryProcessCall as y, OnFunnelError as yt, ListListenersResult as z };
2978
+ export { FunnelGatewayToken as $, FUNNEL_DIR as A, ListenerOpResult as B, ProcessListStub as C, MockFunnelSettingsReader as D, NodeFunnelFileSystem as E, Funnel as F, SqliteFunnelEventLog as G, MemoryConnectorDiagnosticLog as H, GatewayServerOptions as I, PublishResponse as J, FunnelChannelPublisher as K, FunnelListenersClient as L, SETTINGS_PATH as M, resolveFunnelDir as N, createSettings as O, resolveFunnelPort as P, DEFAULT_GATEWAY_TOKEN_PATH as Q, ListListenersResult as R, MemoryProcessSyncHandler as S, MemoryFunnelFileSystem as T, SqliteConnectorDiagnosticLog as U, FunnelGateway as V, MemoryFunnelEventLog as W, publishRequestSchema as X, PublishResult as Y, publishResponseSchema as Z, AliveStub as _, ReplayableEvent as _t, toRequest as a, GatewayEventStore as at, MemoryProcessHandler as b, buildServiceRoutes as c, FunnelEventRecord as ct, MemoryFunnelClock as d, GatewayEmitInput as dt, gatewayLoopbackUrl as et, NodeFunnelClock as f, GatewayRouteDeps as ft, NodeFunnelLogger as g, FunnelBroadcaster as gt, MemoryFunnelLogger as h, BroadcastSubscriber as ht, queryToCliArgs as i, FunnelGatewayServer as it, FunnelSettingsStore as j, DEFAULT_GATEWAY_PORT as k, MemoryFunnelIdGenerator as l, funnelEventSchema as lt, LogEntry as m, BroadcastEvent as mt, CliApp as n, channelWsProtocols as nt, Env as o, FunnelEvent as ot, NoopFunnelLogger as p, FunnelListenerSupervisor as pt, PublishRequest as q, routes as r, channelWsUrl as rt, factory as s, FunnelEventLog as st, GatewayApp as t, ChannelWsUrlInput as tt, NodeFunnelIdGenerator as u, Env$1 as ut, MemoryFunnelProcessRunner as v, OnFunnelError as vt, NodeFunnelProcessRunner as w, MemoryProcessResponse as x, MemoryProcessCall as y, ListenerEntry as z };