@interactive-inc/claude-funnel 0.65.0 → 0.67.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 (87) hide show
  1. package/README.md +8 -4
  2. package/dist/bin.js +275 -372
  3. package/dist/channel.d.ts +185 -0
  4. package/dist/channel.js +238 -0
  5. package/dist/{channels-CRGb6B5_.d.ts → channels-BBA3GTAa.d.ts} +5 -5
  6. package/dist/claude.d.ts +11 -8
  7. package/dist/claude.js +31 -15
  8. package/dist/{connector-descriptor-BFIhyTfa.d.ts → connector-descriptor-F75ZI8Fh.d.ts} +27 -39
  9. package/dist/{connector-diagnostics-recorder-COtNEmUp.js → connector-diagnostics-recorder-BmOijU1p.js} +1 -0
  10. package/dist/connectors/discord.d.ts +10 -7
  11. package/dist/connectors/discord.js +2 -2
  12. package/dist/connectors/gh.d.ts +6 -5
  13. package/dist/connectors/gh.js +2 -2
  14. package/dist/connectors/schedule.d.ts +10 -7
  15. package/dist/connectors/schedule.js +2 -2
  16. package/dist/connectors/slack.d.ts +14 -9
  17. package/dist/connectors/slack.js +3 -3
  18. package/dist/diagnostics.d.ts +1 -1
  19. package/dist/diagnostics.js +1 -1
  20. package/dist/{discord-connector-DXARcO6w.js → discord-connector-CdjwPoty.js} +6 -6
  21. package/dist/{discord-connector-schema-D-bOVAKt.d.ts → discord-connector-schema-BaBZYHxK.d.ts} +0 -1
  22. package/dist/docs.d.ts +1 -1
  23. package/dist/docs.js +1 -1
  24. package/dist/doctor.d.ts +1 -1
  25. package/dist/doctor.js +1 -1
  26. package/dist/{file-process-guard-tVcgckH6.d.ts → file-process-guard-DAYe9Ndt.d.ts} +22 -17
  27. package/dist/{file-system-VhwwXZbm.d.ts → file-system-BNtl997T.d.ts} +2 -1
  28. package/dist/{flume-source-listener-BNyAII7N.d.ts → flume-source-listener-CLtsdcT2.d.ts} +8 -5
  29. package/dist/{funnel-diagnostics-Cvk6Sk4x.js → funnel-diagnostics-B-PCuv_E.js} +4 -3
  30. package/dist/{funnel-diagnostics-b9ar0Ing.d.ts → funnel-diagnostics-CnKus3Jg.d.ts} +8 -5
  31. package/dist/{funnel-docs-C-ge0MuB.js → funnel-docs-BFcqITFA.js} +4 -0
  32. package/dist/{funnel-doctor-XrI2GBH8.js → funnel-doctor-Csw5qjcH.js} +1 -0
  33. package/dist/{funnel-doctor-CnRQi4kM.d.ts → funnel-doctor-CviUTINw.d.ts} +20 -9
  34. package/dist/{funnel-error-0t1MK1R6.js → funnel-error-DoSBCogD.js} +13 -0
  35. package/dist/{funnel-log-sqlite-sink-DLYkY0pZ.js → funnel-log-sqlite-sink-CXbs3qQp.js} +1 -1
  36. package/dist/{funnel-recovery-CMhY8Jfk.d.ts → funnel-recovery-BwcSNNSN.d.ts} +1 -2
  37. package/dist/{funnel-recovery-DKnEutUS.js → funnel-recovery-DYbSYGWC.js} +1 -0
  38. package/dist/gateway/daemon.js +66 -125
  39. package/dist/gateway.d.ts +2 -2
  40. package/dist/gateway.js +2 -2
  41. package/dist/{gh-connector-BUGCOEWS.js → gh-connector-D-iyjl-d.js} +5 -5
  42. package/dist/{gh-connector-schema-DWQaB6gX.d.ts → gh-connector-schema-BrNsCl1T.d.ts} +0 -1
  43. package/dist/{index-Ds6sHhA-.d.ts → index-B4RvEaW-.d.ts} +78 -46
  44. package/dist/index.d.ts +115 -107
  45. package/dist/index.js +123 -32
  46. package/dist/{local-config-json-schema-DexV8vX3.js → local-config-json-schema-_-YVHX4c.js} +4 -4
  47. package/dist/local-config.d.ts +2 -3
  48. package/dist/local-config.js +1 -1
  49. package/dist/logger-mMZvblTx.d.ts +25 -0
  50. package/dist/logger.d.ts +29 -13
  51. package/dist/logger.js +1 -1
  52. package/dist/{memory-token-prompter-BoV8Hf-n.d.ts → memory-token-prompter-D3R_kgM_.d.ts} +2 -3
  53. package/dist/{node-file-system-BOXIHW_Q.js → node-file-system-xJx7dymE.js} +11 -3
  54. package/dist/{profiles-cVZQkM69.d.ts → profiles-CePRnv3F.d.ts} +3 -4
  55. package/dist/{profiles-ZHLONml4.js → profiles-KpN7_gBw.js} +19 -5
  56. package/dist/profiles.d.ts +1 -1
  57. package/dist/profiles.js +1 -1
  58. package/dist/recovery.d.ts +1 -1
  59. package/dist/recovery.js +1 -1
  60. package/dist/{schedule-connector-schema-Z0RXLgPI.d.ts → schedule-connector-schema-DBko_Bf7.d.ts} +0 -1
  61. package/dist/{schedule-connector-9k3gOIgl.js → schedule-connector-teeDMHUe.js} +5 -5
  62. package/dist/{settings-reader-BNxjsxCB.d.ts → settings-reader-CyTpbAre.d.ts} +1 -2
  63. package/dist/{settings-schema-BL_c2Udm.d.ts → settings-schema-B-CKLuST.d.ts} +0 -1
  64. package/dist/{settings-store-ccv291GV.js → settings-store-ZFWBhOnp.js} +12 -3
  65. package/dist/{slack-connector-CxpWagbT.js → slack-connector-BE0KAjCs.js} +10 -9
  66. package/dist/{slack-event-processor-xFDG3US0.js → slack-event-processor-Cs_YuI3w.js} +2 -2
  67. package/dist/{slack-event-processor-BhCf5Wiy.d.ts → slack-event-processor-DmAlq4cV.d.ts} +0 -1
  68. package/dist/{slot-fields-D-pvMgTK.js → slot-fields-5ERhytIA.js} +3 -3
  69. package/dist/{sqlite-diagnostic-log-CwhXE9Qh.js → sqlite-diagnostic-log-BDxfXGZy.js} +42 -19
  70. package/dist/{yaml-render-DVEtYuF1.js → yaml-render-DxxRQT-V.js} +3 -3
  71. package/package.json +15 -10
  72. package/dist/file-system-Wvzc2ePY.js +0 -9
  73. package/dist/logger-B6iyNbxM.js +0 -9
  74. package/dist/settings-reader-9FcX3qS1.js +0 -11
  75. /package/dist/{connector-adapter-Dvs8N7ew.js → connector-adapter-BL2ehMej.js} +0 -0
  76. /package/dist/{connector-listener-mPGZYa8e.js → connector-listener-BcQMzY6Q.js} +0 -0
  77. /package/dist/{diagnostic-sql-reader-oXZnWFf_.js → diagnostic-sql-reader-CoBk_EFF.js} +0 -0
  78. /package/dist/{discord-connector-schema-B4YpWpR3.js → discord-connector-schema-saAGuPmJ.js} +0 -0
  79. /package/dist/{error-message-of-ColuYmAk.js → error-message-of-BG4ezZ_s.js} +0 -0
  80. /package/dist/{funnel-docs-CNklHvbt.d.ts → funnel-docs-BJWawfWI.d.ts} +0 -0
  81. /package/dist/{gh-connector-schema-CAqIhzGr.js → gh-connector-schema-DmZTrzUu.js} +0 -0
  82. /package/dist/{loopback-fetch-CVNuN3YZ.js → loopback-fetch-HP-bo9Kv.js} +0 -0
  83. /package/dist/{node-http-client-u00atiKx.js → node-http-client-SX3xFh4h.js} +0 -0
  84. /package/dist/{node-process-runner-DxTvycoK.js → node-process-runner-D4rzPl8Q.js} +0 -0
  85. /package/dist/{resolve-connector-token-DxDG9mhf.js → resolve-connector-token-BwiJCu82.js} +0 -0
  86. /package/dist/{schedule-connector-schema-DKEPZnVv.js → schedule-connector-schema-C2AChpwX.js} +0 -0
  87. /package/dist/{slack-connector-schema-Dem8to4P.js → slack-connector-schema-EGVuuqSX.js} +0 -0
package/dist/gateway.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { A as connectorRawEventSchema, C as ConnectorRawQuery, D as StoredRawEvent, E as StoredProcessedEvent, O as connectorConnectionEventSchema, S as ConnectorRawEvent, T as StoredConnectionEvent, _ as ConnectorDiagnosticLog, b as ConnectorProcessedRecord, f as CONNECTOR_CONNECTION_STATUSES, g as ConnectorConnectionStatus, h as ConnectorConnectionRecord, k as connectorProcessedEventSchema, m as ConnectorConnectionQuery, p as ConnectorConnectionEvent, v as ConnectorProcessedEvent, w as ConnectorRawRecord, x as ConnectorQuery, y as ConnectorProcessedQuery } from "./connector-descriptor-BFIhyTfa.js";
2
- import { A as FunnelBroadcaster, C as funnelEventSchema, D as FunnelListenerRegistry, E as GatewayRouteDeps, O as BroadcastEvent, S as FunnelEventRecord, T as GatewayEmitInput, _ as channelWsUrl, a as SqliteFunnelEventLog, b as FunnelEvent, c as PublishResponse, d as publishResponseSchema, f as DEFAULT_GATEWAY_TOKEN_PATH, g as channelWsProtocols, h as ChannelWsUrlInput, i as MemoryFunnelEventLog, j as ReplayableEvent, k as BroadcastSubscriber, l as PublishResult, m as gatewayLoopbackUrl, n as MemoryConnectorDiagnosticLog, o as FunnelChannelPublisher, p as FunnelGatewayToken, r as SqliteConnectorDiagnosticLog, s as PublishRequest, t as GatewayApp, u as publishRequestSchema, v as FunnelGatewayServer, w as Env, x as FunnelEventLog, y as GatewayEventStore } from "./index-Ds6sHhA-.js";
1
+ import { C as ConnectorRawRecord, D as connectorConnectionEventSchema, E as StoredRawEvent, O as connectorProcessedEventSchema, S as ConnectorRawQuery, T as StoredProcessedEvent, _ as ConnectorProcessedEvent, b as ConnectorQuery, d as CONNECTOR_CONNECTION_STATUSES, f as ConnectorConnectionEvent, g as ConnectorDiagnosticLog, h as ConnectorConnectionStatus, k as connectorRawEventSchema, m as ConnectorConnectionRecord, p as ConnectorConnectionQuery, v as ConnectorProcessedQuery, w as StoredConnectionEvent, x as ConnectorRawEvent, y as ConnectorProcessedRecord } from "./connector-descriptor-F75ZI8Fh.js";
2
+ import { A as FunnelBroadcaster, C as funnelEventSchema, D as FunnelListenerRegistry, E as GatewayRouteDeps, O as BroadcastEvent, S as FunnelEventRecord, T as GatewayEmitInput, _ as channelWsUrl, a as SqliteFunnelEventLog, b as FunnelEvent, c as PublishResponse, d as publishResponseSchema, f as DEFAULT_GATEWAY_TOKEN_PATH, g as channelWsProtocols, h as ChannelWsUrlInput, i as MemoryFunnelEventLog, j as ReplayableEvent, k as BroadcastSubscriber, l as PublishResult, m as gatewayLoopbackUrl, n as MemoryConnectorDiagnosticLog, o as FunnelChannelPublisher, p as FunnelGatewayToken, r as SqliteConnectorDiagnosticLog, s as PublishRequest, t as GatewayApp, u as publishRequestSchema, v as FunnelGatewayServer, w as Env, x as FunnelEventLog, y as GatewayEventStore } from "./index-B4RvEaW-.js";
3
3
  export { BroadcastEvent, BroadcastSubscriber, CONNECTOR_CONNECTION_STATUSES, ChannelWsUrlInput, ConnectorConnectionEvent, ConnectorConnectionQuery, ConnectorConnectionRecord, ConnectorConnectionStatus, ConnectorDiagnosticLog, ConnectorProcessedEvent, ConnectorProcessedQuery, ConnectorProcessedRecord, ConnectorQuery, ConnectorRawEvent, ConnectorRawQuery, ConnectorRawRecord, DEFAULT_GATEWAY_TOKEN_PATH, FunnelBroadcaster, FunnelChannelPublisher, FunnelEvent, FunnelEventLog, FunnelEventRecord, FunnelGatewayServer, FunnelGatewayToken, FunnelListenerRegistry, type GatewayApp, type GatewayEmitInput, GatewayEventStore, type GatewayRouteDeps, type Env as GatewayServerEnv, MemoryConnectorDiagnosticLog, MemoryFunnelEventLog, PublishRequest, PublishResponse, PublishResult, ReplayableEvent, SqliteConnectorDiagnosticLog, SqliteFunnelEventLog, StoredConnectionEvent, StoredProcessedEvent, StoredRawEvent, channelWsProtocols, channelWsUrl, connectorConnectionEventSchema, connectorProcessedEventSchema, connectorRawEventSchema, funnelEventSchema, gatewayLoopbackUrl, publishRequestSchema, publishResponseSchema };
package/dist/gateway.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as gatewayLoopbackUrl } from "./loopback-fetch-CVNuN3YZ.js";
2
- import { S as connectorRawEventSchema, _ as MemoryConnectorDiagnosticLog, a as DEFAULT_GATEWAY_TOKEN_PATH, b as connectorConnectionEventSchema, c as FunnelListenerRegistry, d as funnelEventSchema, f as FunnelBroadcaster, g as publishResponseSchema, h as publishRequestSchema, i as channelWsUrl, l as SqliteFunnelEventLog, m as FunnelChannelPublisher, n as MemoryFunnelEventLog, o as FunnelGatewayToken, r as channelWsProtocols, s as FunnelGatewayServer, t as SqliteConnectorDiagnosticLog, u as FunnelEventLog, v as CONNECTOR_CONNECTION_STATUSES, x as connectorProcessedEventSchema, y as ConnectorDiagnosticLog } from "./sqlite-diagnostic-log-CwhXE9Qh.js";
1
+ import { n as gatewayLoopbackUrl } from "./loopback-fetch-HP-bo9Kv.js";
2
+ import { S as connectorRawEventSchema, _ as MemoryConnectorDiagnosticLog, a as DEFAULT_GATEWAY_TOKEN_PATH, b as connectorConnectionEventSchema, c as FunnelListenerRegistry, d as funnelEventSchema, f as FunnelBroadcaster, g as publishResponseSchema, h as publishRequestSchema, i as channelWsUrl, l as SqliteFunnelEventLog, m as FunnelChannelPublisher, n as MemoryFunnelEventLog, o as FunnelGatewayToken, r as channelWsProtocols, s as FunnelGatewayServer, t as SqliteConnectorDiagnosticLog, u as FunnelEventLog, v as CONNECTOR_CONNECTION_STATUSES, x as connectorProcessedEventSchema, y as ConnectorDiagnosticLog } from "./sqlite-diagnostic-log-BDxfXGZy.js";
3
3
  export { CONNECTOR_CONNECTION_STATUSES, ConnectorDiagnosticLog, DEFAULT_GATEWAY_TOKEN_PATH, FunnelBroadcaster, FunnelChannelPublisher, FunnelEventLog, FunnelGatewayServer, FunnelGatewayToken, FunnelListenerRegistry, MemoryConnectorDiagnosticLog, MemoryFunnelEventLog, SqliteConnectorDiagnosticLog, SqliteFunnelEventLog, channelWsProtocols, channelWsUrl, connectorConnectionEventSchema, connectorProcessedEventSchema, connectorRawEventSchema, funnelEventSchema, gatewayLoopbackUrl, publishRequestSchema, publishResponseSchema };
@@ -1,8 +1,8 @@
1
- import { t as NodeFunnelProcessRunner } from "./node-process-runner-DxTvycoK.js";
2
- import { t as errorMessageOf } from "./error-message-of-ColuYmAk.js";
3
- import { t as ghConnectorSchema } from "./gh-connector-schema-CAqIhzGr.js";
4
- import { t as FunnelConnectorAdapter } from "./connector-adapter-Dvs8N7ew.js";
5
- import { i as resolveFlumeDeps, n as FunnelFlumeSourceListener, r as flumeLogHandler, t as slotFields } from "./slot-fields-D-pvMgTK.js";
1
+ import { t as NodeFunnelProcessRunner } from "./node-process-runner-D4rzPl8Q.js";
2
+ import { t as errorMessageOf } from "./error-message-of-BG4ezZ_s.js";
3
+ import { t as ghConnectorSchema } from "./gh-connector-schema-DmZTrzUu.js";
4
+ import { t as FunnelConnectorAdapter } from "./connector-adapter-BL2ehMej.js";
5
+ import { i as resolveFlumeDeps, n as FunnelFlumeSourceListener, r as flumeLogHandler, t as slotFields } from "./slot-fields-5ERhytIA.js";
6
6
  import { FlumeGitHubSource } from "@interactive-inc/flume/github";
7
7
  //#region lib/engine/connectors/gh-adapter.ts
8
8
  const defaultProcess$1 = new NodeFunnelProcessRunner();
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region lib/engine/connectors/gh-connector-schema.d.ts
4
3
  declare const ghConnectorSchema: z.ZodObject<{
5
4
  id: z.ZodString;
@@ -1,13 +1,10 @@
1
- import { B as FunnelProcessRunner, C as ConnectorRawQuery, D as StoredRawEvent, E as StoredProcessedEvent, I as BaseConnectorConfig, T as StoredConnectionEvent, W as FunnelLogger, _ as ConnectorDiagnosticLog, b as ConnectorProcessedRecord, c as FunnelClock, h as ConnectorConnectionRecord, j as FunnelConnectorListener, m as ConnectorConnectionQuery, w as ConnectorRawRecord, y as ConnectorProcessedQuery } from "./connector-descriptor-BFIhyTfa.js";
2
- import { n as FunnelFileSystem } from "./file-system-VhwwXZbm.js";
3
- import { n as ChannelConnectorView, r as FunnelChannels } from "./channels-CRGb6B5_.js";
1
+ import { n as FunnelClock, t as FunnelLogger } from "./logger-mMZvblTx.js";
2
+ import { n as FunnelFileSystem } from "./file-system-BNtl997T.js";
3
+ import { A as FunnelConnectorListener, C as ConnectorRawRecord, E as StoredRawEvent, F as BaseConnectorConfig, S as ConnectorRawQuery, T as StoredProcessedEvent, g as ConnectorDiagnosticLog, m as ConnectorConnectionRecord, p as ConnectorConnectionQuery, v as ConnectorProcessedQuery, w as StoredConnectionEvent, y as ConnectorProcessedRecord, z as FunnelProcessRunner } from "./connector-descriptor-F75ZI8Fh.js";
4
+ import { n as ChannelConnectorView, r as FunnelChannels } from "./channels-BBA3GTAa.js";
4
5
  import { z } from "zod";
5
6
  import { Hono } from "hono";
6
7
  import { ServerWebSocket } from "bun";
7
- import * as _$hono_utils_http_status0 from "hono/utils/http-status";
8
- import * as _$hono_utils_types0 from "hono/utils/types";
9
- import * as _$hono_hono_base0 from "hono/hono-base";
10
-
11
8
  //#region lib/engine/error/on-funnel-error.d.ts
12
9
  /**
13
10
  * Host integration hook called when Funnel catches an exception that would
@@ -22,9 +19,13 @@ type OnFunnelError = (error: Error, context?: Record<string, unknown>) => void;
22
19
  //#endregion
23
20
  //#region lib/gateway/broadcaster.d.ts
24
21
  type ClientData = {
25
- /** Stable channel id (uuid) that the WS client subscribed to. */channel: string; /** Human-facing channel name resolved at upgrade time, kept for log readability. */
26
- channelName?: string | null; /** Connector names belonging to that channel. */
27
- connectors: string[]; /** Routing mode resolved from channel config at upgrade time. Defaults to fanout. */
22
+ /** Stable channel id (uuid) that the WS client subscribed to. */
23
+ channel: string;
24
+ /** Human-facing channel name resolved at upgrade time, kept for log readability. */
25
+ channelName?: string | null;
26
+ /** Connector names belonging to that channel. */
27
+ connectors: string[];
28
+ /** Routing mode resolved from channel config at upgrade time. Defaults to fanout. */
28
29
  delivery?: "fanout" | "exclusive";
29
30
  /**
30
31
  * Opaque per-client id declared at upgrade time (`?id=<subscriberId>`). When an
@@ -53,12 +54,16 @@ type ReplaySource = {
53
54
  loadSince(since: number): ReplayableEvent[];
54
55
  };
55
56
  type Deps$4 = {
56
- logger?: FunnelLogger; /** Host hook for surfacing subscriber-throw exceptions. Defaults to no-op. */
57
+ logger?: FunnelLogger;
58
+ /** Host hook for surfacing subscriber-throw exceptions. Defaults to no-op. */
57
59
  onError?: OnFunnelError;
58
60
  maxBufferedBytes?: number;
59
- now?: () => number; /** Number of recent events kept in the in-memory replay buffer. */
60
- replayBufferSize?: number; /** Hard byte cap on replay buffer payloads. Older events are evicted FIFO until under this cap. */
61
- replayBufferMaxBytes?: number; /** Persistent replay source consulted when the in-memory buffer cannot satisfy `since`. */
61
+ now?: () => number;
62
+ /** Number of recent events kept in the in-memory replay buffer. */
63
+ replayBufferSize?: number;
64
+ /** Hard byte cap on replay buffer payloads. Older events are evicted FIFO until under this cap. */
65
+ replayBufferMaxBytes?: number;
66
+ /** Persistent replay source consulted when the in-memory buffer cannot satisfy `since`. */
62
67
  persistentReplay?: ReplaySource;
63
68
  };
64
69
  type BroadcasterMetrics = {
@@ -66,8 +71,10 @@ type BroadcasterMetrics = {
66
71
  subscribers: number;
67
72
  eventsBroadcast: number;
68
73
  droppedSlowClients: number;
69
- lastBroadcastAt: string | null; /** Latest emitted offset. Clients can `?since=<offset>` to ask for events strictly after this point. */
70
- latestOffset: number; /** Oldest offset still held in the replay buffer. Older values cannot be replayed and trigger a full resync. */
74
+ lastBroadcastAt: string | null;
75
+ /** Latest emitted offset. Clients can `?since=<offset>` to ask for events strictly after this point. */
76
+ latestOffset: number;
77
+ /** Oldest offset still held in the replay buffer. Older values cannot be replayed and trigger a full resync. */
71
78
  oldestReplayableOffset: number | null;
72
79
  };
73
80
  /**
@@ -155,7 +162,8 @@ type ListenerRegistryNotify = (channelName: string, connectorName: string, conte
155
162
  type Deps$3 = {
156
163
  channels: ConnectorRegistry;
157
164
  notify: ListenerRegistryNotify;
158
- logger?: FunnelLogger; /** Host hook for surfacing listener lifecycle exceptions. Defaults to no-op. */
165
+ logger?: FunnelLogger;
166
+ /** Host hook for surfacing listener lifecycle exceptions. Defaults to no-op. */
159
167
  onError?: OnFunnelError;
160
168
  healthCheckIntervalMs?: number;
161
169
  maxBackoffMs?: number;
@@ -323,7 +331,7 @@ declare abstract class FunnelEventLog {
323
331
  * mutually exclusive — modeled as a union so you can't pass both (the old shape
324
332
  * silently ignored `dbPath` when `eventLog` was also given).
325
333
  *
326
- * - omit both → SQLite at the default path (`<os.tmpdir()>/funnel/events.db`)
334
+ * - omit both → SQLite under `<tmpDir>/events/`, isolated by funnel dir + port
327
335
  * - `dbPath` → SQLite at a custom path (parent dir created on demand)
328
336
  * - `eventLog` → bring your own `FunnelEventLog` (e.g. `MemoryFunnelEventLog`)
329
337
  */
@@ -336,15 +344,21 @@ type GatewayEventStore = {
336
344
  };
337
345
  type Deps$2 = GatewayEventStore & {
338
346
  channels: FunnelChannels;
339
- 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
+ port?: number;
348
+ /** Bind address for `Bun.serve`. Defaults to `127.0.0.1` (loopback only). Set to `0.0.0.0` to expose on the network. */
340
349
  hostname?: string;
341
350
  process?: FunnelProcessRunner;
342
351
  clock?: FunnelClock;
343
- logger?: FunnelLogger; /** Host hook for surfacing internal exceptions (broadcaster / supervisor). Defaults to no-op. */
352
+ logger?: FunnelLogger;
353
+ /** Host hook for surfacing internal exceptions (broadcaster / supervisor). Defaults to no-op. */
344
354
  onError?: OnFunnelError;
345
- selfPid?: number; /** Funnel home dir, used to scope kill-competing to daemons rooted at the same dir. Defaults to FUNNEL_DIR. */
355
+ selfPid?: number;
356
+ /** Funnel home dir, used to scope kill-competing to daemons rooted at the same dir. Defaults to FUNNEL_DIR. */
346
357
  dir?: string;
347
- killCompetingSlack?: boolean; /** Bearer token required for `/listeners*`, `/status`, and `/ws`. Empty string disables auth (tests only). */
358
+ /** Runtime directory used by the default replay database. Defaults to `funnelTmpDir()`. */
359
+ tmpDir?: string;
360
+ killCompetingSlack?: boolean;
361
+ /** Bearer token required for `/listeners*`, `/status`, and `/ws`. Empty string disables auth (tests only). */
348
362
  token?: string;
349
363
  /**
350
364
  * Permit binding a non-loopback hostname without a token. Off by default:
@@ -477,9 +491,13 @@ declare class FunnelGatewayServer {
477
491
  * gateway requires a token.
478
492
  */
479
493
  type ChannelWsUrlInput = {
480
- /** 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. */
481
- channel: string; /** Opaque subscriber id for targeted delivery (`meta.target=<id>`). Omit for fanout. */
482
- subscriberId?: string; /** Replay from this event offset (inclusive). Omit to receive only new events. */
494
+ /** Base WS endpoint, e.g. `ws://localhost:9743/ws`. Existing query is preserved. */
495
+ base: string;
496
+ /** Channel name to subscribe to. Required the broadcaster filters by it. */
497
+ channel: string;
498
+ /** Opaque subscriber id for targeted delivery (`meta.target=<id>`). Omit for fanout. */
499
+ subscriberId?: string;
500
+ /** Replay from this event offset (inclusive). Omit to receive only new events. */
483
501
  since?: number;
484
502
  };
485
503
  declare function channelWsUrl(input: ChannelWsUrlInput): string;
@@ -569,7 +587,8 @@ type PublishResult = {
569
587
  //#region lib/gateway/channel-publisher.d.ts
570
588
  type Deps = {
571
589
  port: number;
572
- isDaemonRunning: () => boolean; /** Returns the daemon's gateway token, or null if unavailable. Sent as `Authorization: Bearer`. */
590
+ isDaemonRunning: () => boolean;
591
+ /** Returns the daemon's gateway token, or null if unavailable. Sent as `Authorization: Bearer`. */
573
592
  getToken?: () => string | null;
574
593
  };
575
594
  /**
@@ -588,18 +607,25 @@ declare class FunnelChannelPublisher {
588
607
  //#endregion
589
608
  //#region lib/gateway/event-log/sqlite-event-log.d.ts
590
609
  type Props$1 = {
591
- /** SQLite database file path. Created on first write. ":memory:" for tests. */path: string; /** Override for tests. Defaults to `Date.now`. */
592
- now?: () => number; /** Surfaces a failed persist (PK collision, disk-full, locked WAL). Silent if absent. */
610
+ /** SQLite database file path. Created on first write. ":memory:" for tests. */
611
+ path: string;
612
+ /** Override for tests. Defaults to `Date.now`. */
613
+ now?: () => number;
614
+ /** Surfaces a failed persist (PK collision, disk-full, locked WAL). Silent if absent. */
593
615
  logger?: FunnelLogger;
594
616
  /**
595
617
  * Host-supplied error sink. Routed alongside the logger when a write
596
618
  * fails, so Sentry / Datadog / a custom alert pipeline sees the durable
597
619
  * replay loss too — not just the local log file. Silent if absent.
598
620
  */
599
- onError?: OnFunnelError; /** Optional row cap. Pruned on every insert. */
600
- maxRows?: number; /** Optional age cap in ms. Pruned on every insert. */
601
- maxAgeMs?: number; /** Optional on-disk byte cap. Checked periodically; on overflow the oldest rows are dropped toward targetBytes and the file is VACUUMed. */
602
- maxBytes?: number; /** Shrink target when maxBytes is exceeded. Defaults to maxBytes/4. */
621
+ onError?: OnFunnelError;
622
+ /** Optional row cap. Pruned on every insert. */
623
+ maxRows?: number;
624
+ /** Optional age cap in ms. Pruned on every insert. */
625
+ maxAgeMs?: number;
626
+ /** Optional on-disk byte cap. Checked periodically; on overflow the oldest rows are dropped toward targetBytes and the file is VACUUMed. */
627
+ maxBytes?: number;
628
+ /** Shrink target when maxBytes is exceeded. Defaults to maxBytes/4. */
603
629
  targetBytes?: number;
604
630
  };
605
631
  /**
@@ -673,18 +699,24 @@ declare class MemoryFunnelEventLog extends FunnelEventLog {
673
699
  //#endregion
674
700
  //#region lib/engine/diagnostic-log/sqlite-diagnostic-log.d.ts
675
701
  type Props = {
676
- /** SQLite file for the raw (pre-filter) table. ":memory:" for tests. */rawPath: string; /** SQLite file for the processed (verdict) table. ":memory:" for tests. */
677
- processedPath: string; /** SQLite file for the connection (lifecycle) table. ":memory:" for tests. */
702
+ /** SQLite file for the raw (pre-filter) table. ":memory:" for tests. */
703
+ rawPath: string;
704
+ /** SQLite file for the processed (verdict) table. ":memory:" for tests. */
705
+ processedPath: string;
706
+ /** SQLite file for the connection (lifecycle) table. ":memory:" for tests. */
678
707
  connectionPath: string;
679
- now?: () => number; /** Row cap for the processed and connection tables. Pruned on every insert. */
708
+ now?: () => number;
709
+ /** Row cap for the processed and connection tables. Pruned on every insert. */
680
710
  maxRows?: number;
681
711
  /**
682
712
  * Row cap for the raw table specifically. Raw rows can each hold up to
683
713
  * `RAW_PAYLOAD_CAP` bytes, so they want a tighter cap than the small
684
714
  * processed/connection verdict rows. Defaults to `maxRows` when unset.
685
715
  */
686
- rawMaxRows?: number; /** Age cap in ms for all tables — bounds how long untouched payloads (with PII) live. Pruned on every insert. */
687
- maxAgeMs?: number; /** When set, `insert()` errors (disk full, WAL lock) are logged instead of silently dropped. */
716
+ rawMaxRows?: number;
717
+ /** Age cap in ms for all tables bounds how long untouched payloads (with PII) live. Pruned on every insert. */
718
+ maxAgeMs?: number;
719
+ /** When set, `insert()` errors (disk full, WAL lock) are logged instead of silently dropped. */
688
720
  logger?: FunnelLogger;
689
721
  };
690
722
  /**
@@ -754,7 +786,7 @@ declare class MemoryConnectorDiagnosticLog extends ConnectorDiagnosticLog {
754
786
  * shape as CLI's `c.var.funnel`.
755
787
  */
756
788
  type GatewayApp = ReturnType<typeof buildGatewayRoutes>;
757
- declare function buildGatewayRoutes(): _$hono_hono_base0.HonoBase<Env, {
789
+ declare function buildGatewayRoutes(): import("hono/hono-base").HonoBase<Env, {
758
790
  "/health": {
759
791
  $get: {
760
792
  input: {};
@@ -776,7 +808,7 @@ declare function buildGatewayRoutes(): _$hono_hono_base0.HonoBase<Env, {
776
808
  }[];
777
809
  };
778
810
  outputFormat: "json";
779
- status: _$hono_utils_http_status0.ContentfulStatusCode;
811
+ status: import("hono/utils/http-status").ContentfulStatusCode;
780
812
  };
781
813
  };
782
814
  } & {
@@ -814,7 +846,7 @@ declare function buildGatewayRoutes(): _$hono_hono_base0.HonoBase<Env, {
814
846
  };
815
847
  };
816
848
  outputFormat: "json";
817
- status: _$hono_utils_http_status0.ContentfulStatusCode;
849
+ status: import("hono/utils/http-status").ContentfulStatusCode;
818
850
  };
819
851
  };
820
852
  } & {
@@ -843,7 +875,7 @@ declare function buildGatewayRoutes(): _$hono_hono_base0.HonoBase<Env, {
843
875
  outcome: string;
844
876
  payload: string | null;
845
877
  payloadParsed: {
846
- [x: string]: _$hono_utils_types0.JSONValue;
878
+ [x: string]: import("hono/utils/types").JSONValue;
847
879
  } | null;
848
880
  preview: string | null;
849
881
  }[];
@@ -862,7 +894,7 @@ declare function buildGatewayRoutes(): _$hono_hono_base0.HonoBase<Env, {
862
894
  }[];
863
895
  };
864
896
  outputFormat: "json";
865
- status: _$hono_utils_http_status0.ContentfulStatusCode;
897
+ status: import("hono/utils/http-status").ContentfulStatusCode;
866
898
  };
867
899
  };
868
900
  } & {
@@ -883,7 +915,7 @@ declare function buildGatewayRoutes(): _$hono_hono_base0.HonoBase<Env, {
883
915
  }[];
884
916
  };
885
917
  outputFormat: "json";
886
- status: _$hono_utils_http_status0.ContentfulStatusCode;
918
+ status: import("hono/utils/http-status").ContentfulStatusCode;
887
919
  };
888
920
  };
889
921
  } & {
@@ -1003,10 +1035,10 @@ declare function buildGatewayRoutes(): _$hono_hono_base0.HonoBase<Env, {
1003
1035
  };
1004
1036
  output: {
1005
1037
  ok: true;
1006
- result: _$hono_utils_types0.JSONValue;
1038
+ result: import("hono/utils/types").JSONValue;
1007
1039
  };
1008
1040
  outputFormat: "json";
1009
- status: _$hono_utils_http_status0.ContentfulStatusCode;
1041
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1010
1042
  };
1011
1043
  };
1012
1044
  } & {
@@ -1067,7 +1099,7 @@ declare function buildGatewayRoutes(): _$hono_hono_base0.HonoBase<Env, {
1067
1099
  offset: number;
1068
1100
  };
1069
1101
  outputFormat: "json";
1070
- status: _$hono_utils_http_status0.ContentfulStatusCode;
1102
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1071
1103
  };
1072
1104
  };
1073
1105
  }, "/", "/channels/:channel/publish">;