@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
@@ -1,19 +1,6 @@
1
- import { n as FunnelFileSystem } from "./file-system-VhwwXZbm.js";
1
+ import { n as FunnelClock, t as FunnelLogger } from "./logger-mMZvblTx.js";
2
+ import { n as FunnelFileSystem } from "./file-system-BNtl997T.js";
2
3
  import { z } from "zod";
3
-
4
- //#region lib/engine/logger/logger.d.ts
5
- /**
6
- * Structured logger with three levels and an optional log-file path.
7
- * Defaults to NodeFunnelLogger (appends to `<os.tmpdir()>/funnel/funnel.log`);
8
- * MemoryFunnelLogger captures entries in memory and NoopFunnelLogger silences output.
9
- */
10
- declare abstract class FunnelLogger {
11
- abstract info(message: string, meta?: Record<string, unknown>): void;
12
- abstract warn(message: string, meta?: Record<string, unknown>): void;
13
- abstract error(message: string, meta?: Record<string, unknown>): void;
14
- abstract readonly file: string | null;
15
- }
16
- //#endregion
17
4
  //#region lib/engine/process/process-runner.d.ts
18
5
  type RunOptions = {
19
6
  cwd?: string;
@@ -33,8 +20,10 @@ type AttachOptions = {
33
20
  onSpawned?: (pid: number) => void;
34
21
  };
35
22
  type DetachOptions = {
36
- env?: Record<string, string>; /** Append stdout to this file. Parent dir is the caller's responsibility. */
37
- stdoutFile?: string; /** Append stderr to this file. Parent dir is the caller's responsibility. */
23
+ env?: Record<string, string>;
24
+ /** Append stdout to this file. Parent dir is the caller's responsibility. */
25
+ stdoutFile?: string;
26
+ /** Append stderr to this file. Parent dir is the caller's responsibility. */
38
27
  stderrFile?: string;
39
28
  };
40
29
  type ProcessSnapshot = {
@@ -94,7 +83,8 @@ type JsonValue = string | number | boolean | null | JsonValue[] | {
94
83
  };
95
84
  type CallInput = {
96
85
  method: string;
97
- path: string; /** JSON request body. Omit for GET-like calls. */
86
+ path: string;
87
+ /** JSON request body. Omit for GET-like calls. */
98
88
  body?: JsonValue;
99
89
  };
100
90
  declare abstract class FunnelConnectorAdapter {
@@ -202,11 +192,13 @@ type ConnectorRef = {
202
192
  };
203
193
  /** A row tied to one inbound event, joinable to its twin by `eventId`. */
204
194
  type ConnectorEventKeys = ConnectorRef & {
205
- /** Correlation id shared by the raw and processed rows of the same inbound event. */eventId: string;
195
+ /** Correlation id shared by the raw and processed rows of the same inbound event. */
196
+ eventId: string;
206
197
  };
207
198
  /** One untouched inbound event to persist, before any processing. */
208
199
  type ConnectorRawRecord = ConnectorEventKeys & {
209
- /** The listener's untouched payload, already JSON-stringified by the caller. */payload: string;
200
+ /** The listener's untouched payload, already JSON-stringified by the caller. */
201
+ payload: string;
210
202
  };
211
203
  /** The processor's verdict for one inbound event. */
212
204
  type ConnectorProcessedRecord = ConnectorEventKeys & {
@@ -223,7 +215,8 @@ type ConnectorProcessedRecord = ConnectorEventKeys & {
223
215
  payload: string;
224
216
  };
225
217
  type ConnectorConnectionRecord = ConnectorRef & {
226
- status: ConnectorConnectionStatus; /** Free-form context (an error message, a reason) or "" when none. */
218
+ status: ConnectorConnectionStatus;
219
+ /** Free-form context (an error message, a reason) or "" when none. */
227
220
  detail: string;
228
221
  };
229
222
  /**
@@ -235,7 +228,8 @@ type ConnectorConnectionRecord = ConnectorRef & {
235
228
  type ConnectorQuery = {
236
229
  type?: string;
237
230
  connectorId?: string | null;
238
- channelId?: string | null; /** Cap on returned rows. The most recent matching rows are returned, oldest first. */
231
+ channelId?: string | null;
232
+ /** Cap on returned rows. The most recent matching rows are returned, oldest first. */
239
233
  limit?: number;
240
234
  };
241
235
  type ConnectorRawQuery = ConnectorQuery;
@@ -315,24 +309,15 @@ declare abstract class FunnelHttpClient {
315
309
  abstract fetch(request: HttpRequest): Promise<HttpResponse>;
316
310
  }
317
311
  //#endregion
318
- //#region lib/engine/time/clock.d.ts
319
- /**
320
- * Time boundary. Default NodeFunnelClock returns `new Date()`; MemoryFunnelClock
321
- * is settable and `advance(ms)`-able for deterministic schedule / timeout tests.
322
- */
323
- declare abstract class FunnelClock {
324
- abstract now(): Date;
325
- millis(): number;
326
- iso(): string;
327
- }
328
- //#endregion
329
312
  //#region lib/engine/connectors/connector-descriptor.d.ts
330
313
  /** Boundaries a listener needs, supplied by the registry at build time. */
331
314
  type ConnectorListenerDeps = {
332
315
  channelId: string;
333
316
  fs: FunnelFileSystem;
334
- process: FunnelProcessRunner; /** HTTP client for self-detection (Slack auth.test), reactions, and other listener-side REST calls. */
335
- http: FunnelHttpClient; /** Wall clock listeners that own a timer (schedule) read it from here so tests can inject a fake. */
317
+ process: FunnelProcessRunner;
318
+ /** HTTP client for self-detection (Slack auth.test), reactions, and other listener-side REST calls. */
319
+ http: FunnelHttpClient;
320
+ /** Wall clock — listeners that own a timer (schedule) read it from here so tests can inject a fake. */
336
321
  clock: FunnelClock;
337
322
  logger?: FunnelLogger;
338
323
  diagnosticLog?: ConnectorDiagnosticLog;
@@ -343,13 +328,15 @@ type ConnectorListenerDeps = {
343
328
  * a clean SIGTERM story wire `controller.signal` here and call
344
329
  * `controller.abort()` in their shutdown handler.
345
330
  */
346
- signal?: AbortSignal; /** Resolves the per-connector state directory (`<dir>/channels/<id>/connectors/<id>`). */
331
+ signal?: AbortSignal;
332
+ /** Resolves the per-connector state directory (`<dir>/channels/<id>/connectors/<id>`). */
347
333
  connectorDir: (channelId: string, connectorId: string) => string;
348
334
  };
349
335
  /** Boundaries an adapter needs. Adapters are channel-agnostic. */
350
336
  type ConnectorAdapterDeps = {
351
337
  fs: FunnelFileSystem;
352
- process: FunnelProcessRunner; /** HTTP client for outbound calls. Used by the Slack adapter, future REST adapters. */
338
+ process: FunnelProcessRunner;
339
+ /** HTTP client for outbound calls. Used by the Slack adapter, future REST adapters. */
353
340
  http: FunnelHttpClient;
354
341
  logger?: FunnelLogger;
355
342
  };
@@ -392,7 +379,8 @@ type ConnectorOperation = (props: {
392
379
  type ConnectorDescriptor = {
393
380
  type: string;
394
381
  createListener: (config: BaseConnectorConfig, deps: ConnectorListenerDeps) => FunnelConnectorListener;
395
- createAdapter: ((config: BaseConnectorConfig, deps: ConnectorAdapterDeps) => FunnelConnectorAdapter) | null; /** Whether the MCP channel server exposes this type as a callable tool. */
382
+ createAdapter: ((config: BaseConnectorConfig, deps: ConnectorAdapterDeps) => FunnelConnectorAdapter) | null;
383
+ /** Whether the MCP channel server exposes this type as a callable tool. */
396
384
  toolExposed: boolean;
397
385
  secretTokens: (config: BaseConnectorConfig) => string[];
398
386
  buildConfig: (input: Record<string, unknown>, context: ConnectorBuildContext) => BaseConnectorConfig;
@@ -400,4 +388,4 @@ type ConnectorDescriptor = {
400
388
  operations: Record<string, ConnectorOperation>;
401
389
  };
402
390
  //#endregion
403
- export { connectorRawEventSchema as A, FunnelProcessRunner as B, ConnectorRawQuery as C, StoredRawEvent as D, StoredProcessedEvent as E, JsonValue as F, RunOptions as H, BaseConnectorConfig as I, baseConnectorConfigSchema as L, NotifyFn as M, CallInput as N, connectorConnectionEventSchema as O, FunnelConnectorAdapter as P, AttachOptions as R, ConnectorRawEvent as S, StoredConnectionEvent as T, RunResult as U, ProcessSnapshot as V, FunnelLogger as W, ConnectorDiagnosticLog as _, ConnectorOperation as a, ConnectorProcessedRecord as b, FunnelClock as c, HttpResponse as d, CONNECTOR_CONNECTION_STATUSES as f, ConnectorConnectionStatus as g, ConnectorConnectionRecord as h, ConnectorListenerDeps as i, FunnelConnectorListener as j, connectorProcessedEventSchema as k, FunnelHttpClient as l, ConnectorConnectionQuery as m, ConnectorBuildContext as n, ConnectorOperationContext as o, ConnectorConnectionEvent as p, ConnectorDescriptor as r, ConnectorUpdateContext as s, ConnectorAdapterDeps as t, HttpRequest as u, ConnectorProcessedEvent as v, ConnectorRawRecord as w, ConnectorQuery as x, ConnectorProcessedQuery as y, DetachOptions as z };
391
+ export { FunnelConnectorListener as A, ProcessSnapshot as B, ConnectorRawRecord as C, connectorConnectionEventSchema as D, StoredRawEvent as E, BaseConnectorConfig as F, RunResult as H, baseConnectorConfigSchema as I, AttachOptions as L, CallInput as M, FunnelConnectorAdapter as N, connectorProcessedEventSchema as O, JsonValue as P, DetachOptions as R, ConnectorRawQuery as S, StoredProcessedEvent as T, RunOptions as V, ConnectorProcessedEvent as _, ConnectorOperation as a, ConnectorQuery as b, FunnelHttpClient as c, CONNECTOR_CONNECTION_STATUSES as d, ConnectorConnectionEvent as f, ConnectorDiagnosticLog as g, ConnectorConnectionStatus as h, ConnectorListenerDeps as i, NotifyFn as j, connectorRawEventSchema as k, HttpRequest as l, ConnectorConnectionRecord as m, ConnectorBuildContext as n, ConnectorOperationContext as o, ConnectorConnectionQuery as p, ConnectorDescriptor as r, ConnectorUpdateContext as s, ConnectorAdapterDeps as t, HttpResponse as u, ConnectorProcessedQuery as v, StoredConnectionEvent as w, ConnectorRawEvent as x, ConnectorProcessedRecord as y, FunnelProcessRunner as z };
@@ -5,6 +5,7 @@
5
5
  * fields. When no log is wired every call is a silent no-op.
6
6
  */
7
7
  var FunnelConnectorDiagnosticsRecorder = class {
8
+ props;
8
9
  constructor(props) {
9
10
  this.props = props;
10
11
  Object.freeze(this);
@@ -1,11 +1,12 @@
1
- import { M as NotifyFn, N as CallInput, P as FunnelConnectorAdapter, W as FunnelLogger, _ as ConnectorDiagnosticLog, l as FunnelHttpClient, r as ConnectorDescriptor } from "../connector-descriptor-BFIhyTfa.js";
2
- import { n as discordConnectorSchema, t as DiscordConnectorConfig } from "../discord-connector-schema-D-bOVAKt.js";
3
- import { t as FunnelFlumeSourceListener } from "../flume-source-listener-BNyAII7N.js";
1
+ import { t as FunnelLogger } from "../logger-mMZvblTx.js";
2
+ import { M as CallInput, N as FunnelConnectorAdapter, c as FunnelHttpClient, g as ConnectorDiagnosticLog, j as NotifyFn, r as ConnectorDescriptor } from "../connector-descriptor-F75ZI8Fh.js";
3
+ import { n as discordConnectorSchema, t as DiscordConnectorConfig } from "../discord-connector-schema-BaBZYHxK.js";
4
+ import { t as FunnelFlumeSourceListener } from "../flume-source-listener-CLtsdcT2.js";
4
5
  import { FlumeRuntimeDeps } from "@interactive-inc/flume";
5
-
6
6
  //#region lib/engine/connectors/discord-adapter.d.ts
7
7
  type Deps$1 = {
8
- config: DiscordConnectorConfig; /** Environment used to resolve a `botTokenEnv` reference. Defaults to process.env. */
8
+ config: DiscordConnectorConfig;
9
+ /** Environment used to resolve a `botTokenEnv` reference. Defaults to process.env. */
9
10
  env?: NodeJS.ProcessEnv;
10
11
  http?: FunnelHttpClient;
11
12
  };
@@ -78,8 +79,10 @@ type Deps = {
78
79
  env?: NodeJS.ProcessEnv;
79
80
  logger?: FunnelLogger;
80
81
  diagnosticLog?: ConnectorDiagnosticLog;
81
- flumeDeps?: Partial<FlumeRuntimeDeps>; /** Shutdown signal forwarded to the underlying Flume. */
82
- signal?: AbortSignal; /** See `DiscordConnectorOptions.eventTypes`. */
82
+ flumeDeps?: Partial<FlumeRuntimeDeps>;
83
+ /** Shutdown signal forwarded to the underlying Flume. */
84
+ signal?: AbortSignal;
85
+ /** See `DiscordConnectorOptions.eventTypes`. */
83
86
  eventTypes?: ReadonlyArray<string> | "all";
84
87
  };
85
88
  /**
@@ -1,3 +1,3 @@
1
- import { t as discordConnectorSchema } from "../discord-connector-schema-B4YpWpR3.js";
2
- import { i as FunnelDiscordAdapter, n as FunnelFlumeDiscordListener, r as FunnelDiscordEventProcessor, t as discordConnector } from "../discord-connector-DXARcO6w.js";
1
+ import { t as discordConnectorSchema } from "../discord-connector-schema-saAGuPmJ.js";
2
+ import { i as FunnelDiscordAdapter, n as FunnelFlumeDiscordListener, r as FunnelDiscordEventProcessor, t as discordConnector } from "../discord-connector-CdjwPoty.js";
3
3
  export { FunnelDiscordAdapter, FunnelDiscordEventProcessor, FunnelFlumeDiscordListener, discordConnector, discordConnectorSchema };
@@ -1,8 +1,8 @@
1
- import { B as FunnelProcessRunner, M as NotifyFn, N as CallInput, P as FunnelConnectorAdapter, W as FunnelLogger, _ as ConnectorDiagnosticLog, r as ConnectorDescriptor } from "../connector-descriptor-BFIhyTfa.js";
2
- import { t as FunnelFlumeSourceListener } from "../flume-source-listener-BNyAII7N.js";
3
- import { n as ghConnectorSchema, t as GhConnectorConfig } from "../gh-connector-schema-DWQaB6gX.js";
1
+ import { t as FunnelLogger } from "../logger-mMZvblTx.js";
2
+ import { M as CallInput, N as FunnelConnectorAdapter, g as ConnectorDiagnosticLog, j as NotifyFn, r as ConnectorDescriptor, z as FunnelProcessRunner } from "../connector-descriptor-F75ZI8Fh.js";
3
+ import { t as FunnelFlumeSourceListener } from "../flume-source-listener-CLtsdcT2.js";
4
+ import { n as ghConnectorSchema, t as GhConnectorConfig } from "../gh-connector-schema-BrNsCl1T.js";
4
5
  import { FlumeRuntimeDeps } from "@interactive-inc/flume";
5
-
6
6
  //#region lib/engine/connectors/gh-adapter.d.ts
7
7
  type Deps$1 = {
8
8
  process?: FunnelProcessRunner;
@@ -33,7 +33,8 @@ type Deps = {
33
33
  process?: FunnelProcessRunner;
34
34
  logger?: FunnelLogger;
35
35
  diagnosticLog?: ConnectorDiagnosticLog;
36
- flumeDeps?: Partial<FlumeRuntimeDeps>; /** Shutdown signal forwarded to the underlying Flume. */
36
+ flumeDeps?: Partial<FlumeRuntimeDeps>;
37
+ /** Shutdown signal forwarded to the underlying Flume. */
37
38
  signal?: AbortSignal;
38
39
  };
39
40
  /**
@@ -1,3 +1,3 @@
1
- import { t as ghConnectorSchema } from "../gh-connector-schema-CAqIhzGr.js";
2
- import { n as FunnelFlumeGhListener, r as FunnelGhAdapter, t as ghConnector } from "../gh-connector-BUGCOEWS.js";
1
+ import { t as ghConnectorSchema } from "../gh-connector-schema-DmZTrzUu.js";
2
+ import { n as FunnelFlumeGhListener, r as FunnelGhAdapter, t as ghConnector } from "../gh-connector-D-iyjl-d.js";
3
3
  export { FunnelFlumeGhListener, FunnelGhAdapter, ghConnector, ghConnectorSchema };
@@ -1,7 +1,7 @@
1
- import { M as NotifyFn, W as FunnelLogger, _ as ConnectorDiagnosticLog, j as FunnelConnectorListener, r as ConnectorDescriptor } from "../connector-descriptor-BFIhyTfa.js";
2
- import { n as FunnelFileSystem } from "../file-system-VhwwXZbm.js";
3
- import { a as scheduleConnectorSchema, i as scheduleCatchupPolicySchema, n as ScheduleConnectorConfig, o as scheduleEntrySchema, r as ScheduleEntry, t as ScheduleCatchupPolicy } from "../schedule-connector-schema-Z0RXLgPI.js";
4
-
1
+ import { t as FunnelLogger } from "../logger-mMZvblTx.js";
2
+ import { n as FunnelFileSystem } from "../file-system-BNtl997T.js";
3
+ import { A as FunnelConnectorListener, g as ConnectorDiagnosticLog, j as NotifyFn, r as ConnectorDescriptor } from "../connector-descriptor-F75ZI8Fh.js";
4
+ import { a as scheduleConnectorSchema, i as scheduleCatchupPolicySchema, n as ScheduleConnectorConfig, o as scheduleEntrySchema, r as ScheduleEntry, t as ScheduleCatchupPolicy } from "../schedule-connector-schema-DBko_Bf7.js";
5
5
  //#region lib/engine/connectors/match-cron.d.ts
6
6
  /**
7
7
  * Returns true when `date` (local time) satisfies a 5-field cron expression.
@@ -38,9 +38,11 @@ declare class FunnelScheduleStateStore {
38
38
  type ScheduleOnFired = (entry: ScheduleEntry, firedAt: Date) => void | Promise<void>;
39
39
  type Deps = {
40
40
  config: ScheduleConnectorConfig;
41
- lastFiredStore: FunnelScheduleStateStore; /** Funnel channel uuid this connector lives under; stamped onto diagnostic-log rows. */
41
+ lastFiredStore: FunnelScheduleStateStore;
42
+ /** Funnel channel uuid this connector lives under; stamped onto diagnostic-log rows. */
42
43
  channelId?: string;
43
- logger?: FunnelLogger; /** Diagnostic log of fired entries and lifecycle. No-op when absent. */
44
+ logger?: FunnelLogger;
45
+ /** Diagnostic log of fired entries and lifecycle. No-op when absent. */
44
46
  diagnosticLog?: ConnectorDiagnosticLog;
45
47
  now?: () => Date;
46
48
  /**
@@ -76,7 +78,8 @@ declare class FunnelScheduleListener extends FunnelConnectorListener {
76
78
  //#endregion
77
79
  //#region lib/engine/connectors/schedule-connector.d.ts
78
80
  type ScheduleConnectorOptions = {
79
- /** Invoked after a schedule entry fires successfully — e.g. to drop one-shot entries. */onFired?: ScheduleOnFired;
81
+ /** Invoked after a schedule entry fires successfully — e.g. to drop one-shot entries. */
82
+ onFired?: ScheduleOnFired;
80
83
  };
81
84
  /**
82
85
  * Schedule connector descriptor. Pass `scheduleConnector()` to
@@ -1,3 +1,3 @@
1
- import { n as scheduleConnectorSchema, r as scheduleEntrySchema, t as scheduleCatchupPolicySchema } from "../schedule-connector-schema-DKEPZnVv.js";
2
- import { i as matchCron, n as FunnelScheduleListener, r as FunnelScheduleStateStore, t as scheduleConnector } from "../schedule-connector-9k3gOIgl.js";
1
+ import { n as scheduleConnectorSchema, r as scheduleEntrySchema, t as scheduleCatchupPolicySchema } from "../schedule-connector-schema-C2AChpwX.js";
2
+ import { i as matchCron, n as FunnelScheduleListener, r as FunnelScheduleStateStore, t as scheduleConnector } from "../schedule-connector-teeDMHUe.js";
3
3
  export { FunnelScheduleListener, FunnelScheduleStateStore, matchCron, scheduleCatchupPolicySchema, scheduleConnector, scheduleConnectorSchema, scheduleEntrySchema };
@@ -1,12 +1,13 @@
1
- import { M as NotifyFn, N as CallInput, P as FunnelConnectorAdapter, W as FunnelLogger, _ as ConnectorDiagnosticLog, l as FunnelHttpClient, r as ConnectorDescriptor } from "../connector-descriptor-BFIhyTfa.js";
2
- import { t as FunnelFlumeSourceListener } from "../flume-source-listener-BNyAII7N.js";
3
- import { a as SlackRawEvent, c as SlackMessageEvent, d as slackConnectorSchema, i as SlackProcessedSkip, l as SlackReactionEvent, n as SlackProcessed, o as SlackSkipReason, r as SlackProcessedEmit, s as SlackEvent, t as FunnelSlackEventProcessor, u as SlackConnectorConfig } from "../slack-event-processor-BhCf5Wiy.js";
1
+ import { t as FunnelLogger } from "../logger-mMZvblTx.js";
2
+ import { M as CallInput, N as FunnelConnectorAdapter, c as FunnelHttpClient, g as ConnectorDiagnosticLog, j as NotifyFn, r as ConnectorDescriptor } from "../connector-descriptor-F75ZI8Fh.js";
3
+ import { t as FunnelFlumeSourceListener } from "../flume-source-listener-CLtsdcT2.js";
4
+ import { a as SlackRawEvent, c as SlackMessageEvent, d as slackConnectorSchema, i as SlackProcessedSkip, l as SlackReactionEvent, n as SlackProcessed, o as SlackSkipReason, r as SlackProcessedEmit, s as SlackEvent, t as FunnelSlackEventProcessor, u as SlackConnectorConfig } from "../slack-event-processor-DmAlq4cV.js";
4
5
  import { FlumeRuntimeDeps } from "@interactive-inc/flume";
5
-
6
6
  //#region lib/engine/connectors/slack-adapter.d.ts
7
7
  type Deps$1 = {
8
8
  config: SlackConnectorConfig;
9
- env?: NodeJS.ProcessEnv; /** HTTP client injection — defaults to `NodeFunnelHttpClient`. Tests inject `MemoryFunnelHttpClient`. */
9
+ env?: NodeJS.ProcessEnv;
10
+ /** HTTP client injection — defaults to `NodeFunnelHttpClient`. Tests inject `MemoryFunnelHttpClient`. */
10
11
  http?: FunnelHttpClient;
11
12
  };
12
13
  /**
@@ -72,10 +73,14 @@ type Deps = {
72
73
  env?: NodeJS.ProcessEnv;
73
74
  logger?: FunnelLogger;
74
75
  diagnosticLog?: ConnectorDiagnosticLog;
75
- flumeDeps?: Partial<FlumeRuntimeDeps>; /** HTTP client for `auth.test` and `reactions.add`. Defaults to NodeFunnelHttpClient. */
76
- http?: FunnelHttpClient; /** Shutdown signal forwarded to the underlying Flume. */
77
- signal?: AbortSignal; /** See `SlackPreprocessEvent`. Default: identity (no preprocessing). */
78
- preprocessEvent?: SlackPreprocessEvent; /** See `SlackInteractiveHandler`. Default: drop interactive envelopes silently. */
76
+ flumeDeps?: Partial<FlumeRuntimeDeps>;
77
+ /** HTTP client for `auth.test` and `reactions.add`. Defaults to NodeFunnelHttpClient. */
78
+ http?: FunnelHttpClient;
79
+ /** Shutdown signal forwarded to the underlying Flume. */
80
+ signal?: AbortSignal;
81
+ /** See `SlackPreprocessEvent`. Default: identity (no preprocessing). */
82
+ preprocessEvent?: SlackPreprocessEvent;
83
+ /** See `SlackInteractiveHandler`. Default: drop interactive envelopes silently. */
79
84
  onInteractive?: SlackInteractiveHandler;
80
85
  };
81
86
  /**
@@ -1,4 +1,4 @@
1
- import { t as slackConnectorSchema } from "../slack-connector-schema-Dem8to4P.js";
2
- import { t as FunnelSlackEventProcessor } from "../slack-event-processor-xFDG3US0.js";
3
- import { n as FunnelFlumeSlackListener, r as FunnelSlackAdapter, t as slackConnector } from "../slack-connector-CxpWagbT.js";
1
+ import { t as slackConnectorSchema } from "../slack-connector-schema-EGVuuqSX.js";
2
+ import { t as FunnelSlackEventProcessor } from "../slack-event-processor-Cs_YuI3w.js";
3
+ import { n as FunnelFlumeSlackListener, r as FunnelSlackAdapter, t as slackConnector } from "../slack-connector-BE0KAjCs.js";
4
4
  export { FunnelFlumeSlackListener, FunnelSlackAdapter, FunnelSlackEventProcessor, slackConnector, slackConnectorSchema };
@@ -1,2 +1,2 @@
1
- import { a as DiagnosticsGatewayProbe, c as FunnelDiagnostics, d as DiagnosticEvent, f as previewOf, h as toDiagnosticEvent, i as DiagnosticsChannelSource, l as ReplayResult, m as toDiagnosticConnectionError, n as DiagnoseAllReport, o as DiagnosticsPublisher, p as queryRows, r as DiagnosisStatus, s as DiagnosticsTokenReader, t as ChannelDiagnosis, u as DiagnosticConnectionError } from "./funnel-diagnostics-b9ar0Ing.js";
1
+ import { a as DiagnosticsGatewayProbe, c as FunnelDiagnostics, d as DiagnosticEvent, f as previewOf, h as toDiagnosticEvent, i as DiagnosticsChannelSource, l as ReplayResult, m as toDiagnosticConnectionError, n as DiagnoseAllReport, o as DiagnosticsPublisher, p as queryRows, r as DiagnosisStatus, s as DiagnosticsTokenReader, t as ChannelDiagnosis, u as DiagnosticConnectionError } from "./funnel-diagnostics-CnKus3Jg.js";
2
2
  export { ChannelDiagnosis, DiagnoseAllReport, DiagnosisStatus, DiagnosticConnectionError, DiagnosticEvent, DiagnosticsChannelSource, DiagnosticsGatewayProbe, DiagnosticsPublisher, DiagnosticsTokenReader, FunnelDiagnostics, ReplayResult, previewOf, queryRows, toDiagnosticConnectionError, toDiagnosticEvent };
@@ -1,2 +1,2 @@
1
- import { a as toDiagnosticEvent, i as toDiagnosticConnectionError, n as previewOf, r as queryRows, t as FunnelDiagnostics } from "./funnel-diagnostics-Cvk6Sk4x.js";
1
+ import { a as toDiagnosticEvent, i as toDiagnosticConnectionError, n as previewOf, r as queryRows, t as FunnelDiagnostics } from "./funnel-diagnostics-B-PCuv_E.js";
2
2
  export { FunnelDiagnostics, previewOf, queryRows, toDiagnosticConnectionError, toDiagnosticEvent };
@@ -1,9 +1,9 @@
1
- import { t as NodeFunnelHttpClient } from "./node-http-client-u00atiKx.js";
2
- import { t as errorMessageOf } from "./error-message-of-ColuYmAk.js";
3
- import { t as discordConnectorSchema } from "./discord-connector-schema-B4YpWpR3.js";
4
- import { t as FunnelConnectorAdapter } from "./connector-adapter-Dvs8N7ew.js";
5
- import { t as resolveConnectorToken } from "./resolve-connector-token-DxDG9mhf.js";
6
- import { i as resolveFlumeDeps, n as FunnelFlumeSourceListener, r as flumeLogHandler, t as slotFields } from "./slot-fields-D-pvMgTK.js";
1
+ import { t as NodeFunnelHttpClient } from "./node-http-client-SX3xFh4h.js";
2
+ import { t as errorMessageOf } from "./error-message-of-BG4ezZ_s.js";
3
+ import { t as discordConnectorSchema } from "./discord-connector-schema-saAGuPmJ.js";
4
+ import { t as FunnelConnectorAdapter } from "./connector-adapter-BL2ehMej.js";
5
+ import { t as resolveConnectorToken } from "./resolve-connector-token-BwiJCu82.js";
6
+ import { i as resolveFlumeDeps, n as FunnelFlumeSourceListener, r as flumeLogHandler, t as slotFields } from "./slot-fields-5ERhytIA.js";
7
7
  import { FlumeDiscordGatewayIntents, FlumeDiscordSource } from "@interactive-inc/flume/discord";
8
8
  //#region lib/engine/connectors/discord-adapter.ts
9
9
  const DISCORD_API_BASE = "https://discord.com/api/v10";
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region lib/engine/connectors/discord-connector-schema.d.ts
4
3
  /**
5
4
  * Like slack, a discord connector holds either a literal `botToken` or a
package/dist/docs.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as FunnelDocs, t as DocsTopicListing } from "./funnel-docs-CNklHvbt.js";
1
+ import { n as FunnelDocs, t as DocsTopicListing } from "./funnel-docs-BJWawfWI.js";
2
2
  export { DocsTopicListing, FunnelDocs };
package/dist/docs.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as FunnelDocs } from "./funnel-docs-C-ge0MuB.js";
1
+ import { t as FunnelDocs } from "./funnel-docs-BFcqITFA.js";
2
2
  export { FunnelDocs };
package/dist/doctor.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as DoctorReport, r as FunnelDoctor, t as DoctorFixMode } from "./funnel-doctor-CnRQi4kM.js";
1
+ import { n as DoctorReport, r as FunnelDoctor, t as DoctorFixMode } from "./funnel-doctor-CviUTINw.js";
2
2
  export { DoctorFixMode, DoctorReport, FunnelDoctor };
package/dist/doctor.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as FunnelDoctor } from "./funnel-doctor-XrI2GBH8.js";
1
+ import { t as FunnelDoctor } from "./funnel-doctor-Csw5qjcH.js";
2
2
  export { FunnelDoctor };
@@ -1,8 +1,8 @@
1
- import { t as ChannelConfig } from "./settings-schema-BL_c2Udm.js";
2
- import { n as FunnelIdGenerator } from "./settings-reader-BNxjsxCB.js";
3
- import { B as FunnelProcessRunner, W as FunnelLogger } from "./connector-descriptor-BFIhyTfa.js";
4
- import { n as FunnelFileSystem } from "./file-system-VhwwXZbm.js";
5
-
1
+ import { t as FunnelLogger } from "./logger-mMZvblTx.js";
2
+ import { n as FunnelFileSystem } from "./file-system-BNtl997T.js";
3
+ import { t as ChannelConfig } from "./settings-schema-B-CKLuST.js";
4
+ import { n as FunnelIdGenerator } from "./settings-reader-CyTpbAre.js";
5
+ import { z as FunnelProcessRunner } from "./connector-descriptor-F75ZI8Fh.js";
6
6
  //#region lib/engine/claude/channel-resolver.d.ts
7
7
  type ChannelResolver = {
8
8
  get(name: string): ChannelConfig | null;
@@ -25,15 +25,19 @@ type McpInstaller = {
25
25
  //#endregion
26
26
  //#region lib/engine/claude/process-guard.d.ts
27
27
  type ProcessGuard = {
28
- /** Returns true if a live process is already registered for this profile. */isRunning(profileId: string): boolean; /** Writes the PID file and registers an exit hook to clean it up. */
29
- acquire(profileId: string): void; /** Removes the PID file. */
28
+ /** Returns true if a live process is already registered for this profile. */
29
+ isRunning(profileId: string): boolean;
30
+ /** Writes the PID file and registers an exit hook to clean it up. */
31
+ acquire(profileId: string): void;
32
+ /** Removes the PID file. */
30
33
  release(profileId: string): void;
31
34
  };
32
35
  //#endregion
33
36
  //#region lib/engine/claude/session-store.d.ts
34
37
  type SessionStore = {
35
38
  getSessionId(profileId: string): string | null;
36
- setSessionId(profileId: string, sessionId: string): void; /** Returns true when the session jsonl exists on disk and is non-empty. */
39
+ setSessionId(profileId: string, sessionId: string): void;
40
+ /** Returns true when the session jsonl exists on disk and is non-empty. */
37
41
  sessionFileExists(cwd: string, sessionId: string, env: Record<string, string>): boolean;
38
42
  };
39
43
  //#endregion
@@ -41,8 +45,10 @@ type SessionStore = {
41
45
  type LaunchCommon = {
42
46
  channel: string;
43
47
  cwd?: string;
44
- userArgs?: string[]; /** Args prepended to the claude argv (typically a profile's recipe). Defaults to none. */
45
- options?: string[]; /** Env vars layered under the launched claude process. process.env wins on collision. */
48
+ userArgs?: string[];
49
+ /** Args prepended to the claude argv (typically a profile's recipe). Defaults to none. */
50
+ options?: string[];
51
+ /** Env vars layered under the launched claude process. process.env wins on collision. */
46
52
  env?: Record<string, string>;
47
53
  /** Invoked synchronously after the child claude process has been spawned, with its PID.
48
54
  * Useful for hosts that need to register the spawned process before it exits
@@ -56,18 +62,17 @@ type LaunchCommon = {
56
62
  /**
57
63
  * A launch carries one of two targets, distinguished by `profileId`.
58
64
  *
59
- * - **profile launch** — has a stable `profileId` (uuid). Enforces singleton-ness
60
- * via the PID file and may opt into `resume` to reuse the profile's session.
65
+ * - **profile launch** — has a stable `profileId` (a global uuid or a
66
+ * deterministic repo-local id). Enforces singleton-ness via the PID file and
67
+ * may opt into `resume` to reuse the profile's session.
61
68
  * - **profile-less launch** — raw `--channel`. Never enforces singleton-ness and
62
69
  * always starts a fresh session, so `resume` is meaningless and disallowed.
63
70
  *
64
- * Modeling these as a union (rather than two independent optional fields) makes
65
- * `resume` without a `profileId` a compile error — previously it was silently
66
- * ignored, which masked real bugs (a profile resume that never took effect).
71
+ * Modeling these as a union makes `resume` without a profile id a compile error.
67
72
  */
68
73
  type LaunchTarget = {
69
- /** Stable id of the launching profile (uuid). Keys the singleton PID file
70
- * and the resumable session. */
74
+ /** Stable id of the launching profile. Keys the singleton PID file and
75
+ * the resumable session. */
71
76
  profileId: string;
72
77
  /** Inject `--session-id`/`--resume` for this profile (opt-in, default false).
73
78
  * The persisted session is owned by the profile (by id). */
@@ -1,6 +1,7 @@
1
1
  //#region lib/engine/fs/file-system.d.ts
2
2
  type FileStat = {
3
- mtimeMs: number; /** POSIX mode bits (e.g. 0o600). `null` when the underlying FS does not expose mode. */
3
+ mtimeMs: number;
4
+ /** POSIX mode bits (e.g. 0o600). `null` when the underlying FS does not expose mode. */
4
5
  mode: number | null;
5
6
  };
6
7
  /**
@@ -1,6 +1,6 @@
1
- import { W as FunnelLogger, _ as ConnectorDiagnosticLog, g as ConnectorConnectionStatus, j as FunnelConnectorListener } from "./connector-descriptor-BFIhyTfa.js";
1
+ import { t as FunnelLogger } from "./logger-mMZvblTx.js";
2
+ import { A as FunnelConnectorListener, g as ConnectorDiagnosticLog, h as ConnectorConnectionStatus } from "./connector-descriptor-F75ZI8Fh.js";
2
3
  import { FlumeEventHandler, FlumeLogHandler, FlumeReconnectOptions, FlumeRunning, FlumeRuntimeDeps, FlumeSource, FlumeStatus } from "@interactive-inc/flume";
3
-
4
4
  //#region lib/engine/connectors/connector-diagnostics-recorder.d.ts
5
5
  type Props$1 = {
6
6
  type: string;
@@ -23,15 +23,18 @@ declare class FunnelConnectorDiagnosticsRecorder {
23
23
  //#endregion
24
24
  //#region lib/engine/connectors/flume-source-listener.d.ts
25
25
  type Props = {
26
- /** Funnel connector type ("slack" / "discord" / "gh") — stamped onto diagnostic rows. */type: string;
26
+ /** Funnel connector type ("slack" / "discord" / "gh") — stamped onto diagnostic rows. */
27
+ type: string;
27
28
  connectorId: string;
28
29
  channelId: string | null;
29
30
  logger?: FunnelLogger;
30
31
  diagnosticLog?: ConnectorDiagnosticLog;
31
32
  };
32
33
  type RunStartOptions = {
33
- source: FlumeSource; /** Typed event handler — receives the source's events only (logs are routed separately). */
34
- onEvent: FlumeEventHandler; /** Optional log handler for everything the firehose emits (including status transitions). */
34
+ source: FlumeSource;
35
+ /** Typed event handler receives the source's events only (logs are routed separately). */
36
+ onEvent: FlumeEventHandler;
37
+ /** Optional log handler for everything the firehose emits (including status transitions). */
35
38
  onLog?: FlumeLogHandler;
36
39
  deps?: FlumeRuntimeDeps;
37
40
  /**
@@ -1,6 +1,6 @@
1
- import { n as gatewayLoopbackUrl, t as loopbackFetch } from "./loopback-fetch-CVNuN3YZ.js";
2
- import { t as errorMessageOf } from "./error-message-of-ColuYmAk.js";
3
- import { t as ConnectorDiagnosticSqlReader } from "./diagnostic-sql-reader-oXZnWFf_.js";
1
+ import { n as gatewayLoopbackUrl, t as loopbackFetch } from "./loopback-fetch-HP-bo9Kv.js";
2
+ import { t as errorMessageOf } from "./error-message-of-BG4ezZ_s.js";
3
+ import { t as ConnectorDiagnosticSqlReader } from "./diagnostic-sql-reader-CoBk_EFF.js";
4
4
  import { join } from "node:path";
5
5
  import { existsSync, readFileSync } from "node:fs";
6
6
  //#region lib/services/diagnostics/diagnostic-event.ts
@@ -164,6 +164,7 @@ const diagnoseSlackEventSubscriptionGap = (report) => {
164
164
  * mutation; pair with FunnelRecovery for self-healing actions.
165
165
  */
166
166
  var FunnelDiagnostics = class {
167
+ props;
167
168
  constructor(props) {
168
169
  this.props = props;
169
170
  Object.freeze(this);
@@ -1,9 +1,11 @@
1
- import { t as ChannelConfig } from "./settings-schema-BL_c2Udm.js";
2
-
1
+ import { t as ChannelConfig } from "./settings-schema-B-CKLuST.js";
3
2
  //#region lib/engine/diagnostic-log/diagnostic-sql-reader.d.ts
4
3
  type Props$1 = {
5
- /** SQLite file holding the raw (pre-filter) table. */rawPath: string; /** SQLite file holding the processed (verdict) table. */
6
- processedPath: string; /** SQLite file holding the connection (lifecycle) table. */
4
+ /** SQLite file holding the raw (pre-filter) table. */
5
+ rawPath: string;
6
+ /** SQLite file holding the processed (verdict) table. */
7
+ processedPath: string;
8
+ /** SQLite file holding the connection (lifecycle) table. */
7
9
  connectionPath: string;
8
10
  };
9
11
  type Row = Record<string, unknown>;
@@ -111,7 +113,8 @@ type ChannelDiagnosis = {
111
113
  * but the probe failed (auth refused, fetch error, non-OK response).
112
114
  */
113
115
  statusError: string | null;
114
- }; /** Connectors declared in settings for this channel. */
116
+ };
117
+ /** Connectors declared in settings for this channel. */
115
118
  configuredConnectors: number;
116
119
  listeners: Array<{
117
120
  name: string;
@@ -378,6 +378,10 @@ what funnel never writes to funnel.json:
378
378
 
379
379
  ~/.funnel/projects/<id>/settings.json per-repo, set via CLI or TTY prompt
380
380
 
381
+ When a profile declares resume: true, its generated Claude session id lives
382
+ in ~/.funnel/projects/<id>/claude/local-sessions.json. The id is runtime
383
+ state and is never written to the committed funnel.json.
384
+
381
385
  how it is read:
382
386
 
383
387
  All CLI commands check for funnel.json in cwd. If found, FUNNEL_DIR is
@@ -6,6 +6,7 @@
6
6
  * logic (which fixes to attempt, in what order, when to escalate) lives here.
7
7
  */
8
8
  var FunnelDoctor = class {
9
+ props;
9
10
  constructor(props) {
10
11
  this.props = props;
11
12
  Object.freeze(this);
@@ -1,18 +1,29 @@
1
- import { c as FunnelDiagnostics, n as DiagnoseAllReport, t as ChannelDiagnosis } from "./funnel-diagnostics-b9ar0Ing.js";
2
- import { n as RecoveryAction, t as FunnelRecovery } from "./funnel-recovery-CMhY8Jfk.js";
3
-
1
+ import { c as FunnelDiagnostics, n as DiagnoseAllReport, t as ChannelDiagnosis } from "./funnel-diagnostics-CnKus3Jg.js";
2
+ import { n as RecoveryAction, t as FunnelRecovery } from "./funnel-recovery-BwcSNNSN.js";
4
3
  //#region lib/services/doctor/funnel-doctor.d.ts
5
4
  type Props = {
6
5
  diagnostics: FunnelDiagnostics;
7
6
  recovery: FunnelRecovery;
8
7
  };
9
- type DoctorFixMode = /** No mutations. Run diagnoseAll and report what would be fixed. */"off" /** Apply only idempotent, low-risk fixes — start the gateway, restart dead listeners. */ | "safe" /** Add high-impact fixes — full gateway restart when partial fixes are insufficient. */ | "aggressive";
8
+ type DoctorFixMode =
9
+ /** No mutations. Run diagnoseAll and report what would be fixed. */
10
+ "off" |
11
+ /** Apply only idempotent, low-risk fixes — start the gateway, restart dead listeners. */
12
+ "safe" |
13
+ /** Add high-impact fixes — full gateway restart when partial fixes are insufficient. */
14
+ "aggressive";
10
15
  type DoctorReport = {
11
- /** "ok" if every channel is healthy after the run; "warn" if anything is still off; "error" if a fix step itself failed. */status: "ok" | "warn" | "error"; /** Human-readable summary suitable for stdout. */
12
- message: string; /** Aggregated diagnosis after any fix pass. */
13
- after: DiagnoseAllReport; /** Diagnosis before fixing, only included when fix mode is not "off". */
14
- before: DiagnoseAllReport | null; /** Each recovery action that ran during the fix pass. */
15
- appliedActions: RecoveryAction[]; /** Channels still unhealthy after the fix pass (or all unhealthy channels when fix is off). */
16
+ /** "ok" if every channel is healthy after the run; "warn" if anything is still off; "error" if a fix step itself failed. */
17
+ status: "ok" | "warn" | "error";
18
+ /** Human-readable summary suitable for stdout. */
19
+ message: string;
20
+ /** Aggregated diagnosis after any fix pass. */
21
+ after: DiagnoseAllReport;
22
+ /** Diagnosis before fixing, only included when fix mode is not "off". */
23
+ before: DiagnoseAllReport | null;
24
+ /** Each recovery action that ran during the fix pass. */
25
+ appliedActions: RecoveryAction[];
26
+ /** Channels still unhealthy after the fix pass (or all unhealthy channels when fix is off). */
16
27
  remainingIssues: Array<{
17
28
  channel: string;
18
29
  diagnosis: ChannelDiagnosis["diagnosis"];