@interactive-inc/claude-funnel 0.66.0 → 0.68.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 (97) hide show
  1. package/README.md +31 -6
  2. package/dist/bin.js +292 -383
  3. package/dist/channel.d.ts +76 -52
  4. package/dist/channel.js +82 -47
  5. package/dist/{channels-DR90RmUP.d.ts → channels-B0cifCfw.d.ts} +6 -6
  6. package/dist/claude.d.ts +11 -8
  7. package/dist/claude.js +31 -15
  8. package/dist/connector-descriptor-D4XtEsH8.d.ts +215 -0
  9. package/dist/{connector-diagnostics-recorder-COtNEmUp.js → connector-diagnostics-recorder-BmOijU1p.js} +1 -0
  10. package/dist/connectors/discord.d.ts +11 -8
  11. package/dist/connectors/discord.js +2 -2
  12. package/dist/connectors/gh.d.ts +7 -6
  13. package/dist/connectors/gh.js +2 -2
  14. package/dist/connectors/schedule.d.ts +21 -17
  15. package/dist/connectors/schedule.js +3 -3
  16. package/dist/connectors/slack.d.ts +15 -10
  17. package/dist/connectors/slack.js +3 -3
  18. package/dist/diagnostic-event-CxMM5Bl2.js +78 -0
  19. package/dist/diagnostic-log-BsAg5qZK.d.ts +186 -0
  20. package/dist/diagnostics.d.ts +2 -2
  21. package/dist/diagnostics.js +3 -2
  22. package/dist/{discord-connector-DXARcO6w.js → discord-connector-CAcWifJn.js} +6 -6
  23. package/dist/{discord-connector-schema-D1dyxhXk.d.ts → discord-connector-schema-BaBZYHxK.d.ts} +0 -1
  24. package/dist/docs.d.ts +1 -1
  25. package/dist/docs.js +1 -1
  26. package/dist/doctor.d.ts +1 -1
  27. package/dist/doctor.js +1 -1
  28. package/dist/event-log.d.ts +2 -0
  29. package/dist/event-log.js +3 -0
  30. package/dist/{file-process-guard-CiBwXjzm.d.ts → file-process-guard-D-QatrwL.d.ts} +22 -18
  31. package/dist/{file-system-DHgbuTFb.d.ts → file-system-BNtl997T.d.ts} +2 -1
  32. package/dist/{flume-source-listener-FzR5lGpL.d.ts → flume-source-listener-Ba8_1Mg-.d.ts} +9 -6
  33. package/dist/{funnel-diagnostics-Cvk6Sk4x.js → funnel-diagnostics-CAG7hJP0.js} +85 -141
  34. package/dist/{funnel-diagnostics-kbd27d7I.d.ts → funnel-diagnostics-CDrZznTB.d.ts} +18 -18
  35. package/dist/{funnel-docs-C-ge0MuB.js → funnel-docs-CI4hMkhq.js} +12 -3
  36. package/dist/{funnel-doctor-CVTNUtDn.d.ts → funnel-doctor-CY4S5cnz.d.ts} +20 -9
  37. package/dist/{funnel-doctor-XrI2GBH8.js → funnel-doctor-Csw5qjcH.js} +1 -0
  38. package/dist/{funnel-error-0t1MK1R6.js → funnel-error-DoSBCogD.js} +13 -0
  39. package/dist/{funnel-recovery-D8MkiTpk.d.ts → funnel-recovery-BwcSNNSN.d.ts} +1 -2
  40. package/dist/{funnel-recovery-DKnEutUS.js → funnel-recovery-DYbSYGWC.js} +1 -0
  41. package/dist/gateway/daemon.js +60 -139
  42. package/dist/gateway.d.ts +2 -3
  43. package/dist/gateway.js +2 -2
  44. package/dist/{gh-connector-BUGCOEWS.js → gh-connector-DMwI6zJA.js} +5 -5
  45. package/dist/{gh-connector-schema-BCHEqpUg.d.ts → gh-connector-schema-BrNsCl1T.d.ts} +0 -1
  46. package/dist/{index-BU1TtuFy.d.ts → index-fHrKn4jm.d.ts} +210 -40
  47. package/dist/index.d.ts +125 -115
  48. package/dist/index.js +242 -57
  49. package/dist/{local-config-json-schema-DexV8vX3.js → local-config-json-schema-_-YVHX4c.js} +4 -4
  50. package/dist/local-config.d.ts +2 -3
  51. package/dist/local-config.js +1 -1
  52. package/dist/logger.d.ts +17 -265
  53. package/dist/logger.js +6 -141
  54. package/dist/memory-event-log-BY8XjFzi.js +147 -0
  55. package/dist/{memory-token-prompter-D0kIdhar.d.ts → memory-token-prompter-B20tl_aU.d.ts} +2 -3
  56. package/dist/{node-file-system-BOXIHW_Q.js → node-file-system-xJx7dymE.js} +11 -3
  57. package/dist/{profiles-M24JrcOh.d.ts → profiles-CePRnv3F.d.ts} +3 -4
  58. package/dist/{profiles-ZHLONml4.js → profiles-KpN7_gBw.js} +19 -5
  59. package/dist/profiles.d.ts +1 -1
  60. package/dist/profiles.js +1 -1
  61. package/dist/recovery.d.ts +1 -1
  62. package/dist/recovery.js +1 -1
  63. package/dist/{schedule-connector-9k3gOIgl.js → schedule-connector-BXUOYgwZ.js} +63 -99
  64. package/dist/schedule-connector-schema-CNV8PgWX.js +137 -0
  65. package/dist/schedule-connector-schema-Tq5kJul-.d.ts +127 -0
  66. package/dist/{settings-reader-BnKIbmsD.d.ts → settings-reader-CyTpbAre.d.ts} +1 -2
  67. package/dist/{settings-schema-IShSMm5G.d.ts → settings-schema-B-CKLuST.d.ts} +0 -1
  68. package/dist/{settings-store-ccv291GV.js → settings-store-ZFWBhOnp.js} +12 -3
  69. package/dist/{slack-connector-CxpWagbT.js → slack-connector-CC3V2VXQ.js} +10 -9
  70. package/dist/{slack-event-processor-xFDG3US0.js → slack-event-processor-Cs_YuI3w.js} +2 -2
  71. package/dist/{slack-event-processor-BDTr62cN.d.ts → slack-event-processor-DmAlq4cV.d.ts} +0 -1
  72. package/dist/{slot-fields-D-pvMgTK.js → slot-fields-eCWizJqS.js} +4 -4
  73. package/dist/{sqlite-diagnostic-log-CwhXE9Qh.js → sqlite-diagnostic-log-Qs4cf9I_.js} +92 -100
  74. package/dist/sqlite-event-log-BYgCFMxC.d.ts +284 -0
  75. package/dist/{funnel-log-sqlite-sink-DLYkY0pZ.js → sqlite-event-log-eZuXKszJ.js} +53 -12
  76. package/dist/{yaml-render-DVEtYuF1.js → yaml-render-DxxRQT-V.js} +3 -3
  77. package/package.json +25 -10
  78. package/dist/broadcaster-DVNcw00K.d.ts +0 -138
  79. package/dist/connector-descriptor-CmyHlEiT.d.ts +0 -380
  80. package/dist/diagnostic-sql-reader-oXZnWFf_.js +0 -83
  81. package/dist/file-system-Wvzc2ePY.js +0 -9
  82. package/dist/logger-B6iyNbxM.js +0 -9
  83. package/dist/schedule-connector-schema-D7ZEKvit.d.ts +0 -49
  84. package/dist/schedule-connector-schema-DKEPZnVv.js +0 -31
  85. package/dist/settings-reader-9FcX3qS1.js +0 -11
  86. /package/dist/{connector-adapter-Dvs8N7ew.js → connector-adapter-BL2ehMej.js} +0 -0
  87. /package/dist/{connector-listener-mPGZYa8e.js → connector-listener-BcQMzY6Q.js} +0 -0
  88. /package/dist/{discord-connector-schema-B4YpWpR3.js → discord-connector-schema-saAGuPmJ.js} +0 -0
  89. /package/dist/{error-message-of-ColuYmAk.js → error-message-of-BG4ezZ_s.js} +0 -0
  90. /package/dist/{funnel-docs-Cd66sKyV.d.ts → funnel-docs-BJWawfWI.d.ts} +0 -0
  91. /package/dist/{gh-connector-schema-CAqIhzGr.js → gh-connector-schema-DmZTrzUu.js} +0 -0
  92. /package/dist/{logger-Bc_Ooypb.d.ts → logger-mMZvblTx.d.ts} +0 -0
  93. /package/dist/{loopback-fetch-CVNuN3YZ.js → loopback-fetch-HP-bo9Kv.js} +0 -0
  94. /package/dist/{node-http-client-u00atiKx.js → node-http-client-SX3xFh4h.js} +0 -0
  95. /package/dist/{node-process-runner-DxTvycoK.js → node-process-runner-D4rzPl8Q.js} +0 -0
  96. /package/dist/{resolve-connector-token-DxDG9mhf.js → resolve-connector-token-BwiJCu82.js} +0 -0
  97. /package/dist/{slack-connector-schema-Dem8to4P.js → slack-connector-schema-EGVuuqSX.js} +0 -0
@@ -0,0 +1,186 @@
1
+ import { z } from "zod";
2
+ //#region lib/engine/diagnostic-log/diagnostic-log.d.ts
3
+ /**
4
+ * Points in the listener's connection lifecycle. The single source of truth
5
+ * for the value set: the `status` column schema, the `ConnectorConnectionStatus`
6
+ * union, and the runtime Set used to narrow on read-back all derive from this
7
+ * array, so adding a status is a one-line change that cannot drift out of sync.
8
+ *
9
+ * started start() was called
10
+ * connected the socket opened and events can flow
11
+ * disconnected the socket was closed by a stop() call (a clean teardown)
12
+ * auth-failed the token was rejected before the socket opened
13
+ * stopped the listener was fully torn down (always follows a stop(),
14
+ * paired with the disconnected/error that preceded it)
15
+ * error start/stop threw, or Bolt surfaced an error frame — this is
16
+ * also where an unsolicited socket drop shows up when Bolt
17
+ * reports it (an `error` with no following `stopped` means the
18
+ * supervisor recycled the listener, not a clean stop)
19
+ *
20
+ * A connection row is independent of any single inbound event, so it carries
21
+ * no `eventId`. This is how "no notification arrived because the listener
22
+ * never connected (or dropped, or failed auth)" becomes visible: the
23
+ * raw/processed tables only hold events that *did* arrive.
24
+ */
25
+ declare const CONNECTOR_CONNECTION_STATUSES: readonly ["started", "connected", "disconnected", "auth-failed", "stopped", "error"];
26
+ type ConnectorConnectionStatus = (typeof CONNECTOR_CONNECTION_STATUSES)[number];
27
+ /**
28
+ * Rows stored in the diagnostic tables. Connector-agnostic on purpose: `type`
29
+ * carries the listener kind ("slack" | "discord" | "gh" | "schedule") so new
30
+ * connectors land in the same tables without a schema change. `event_id` is
31
+ * the correlation key the listener mints once per inbound event and stamps
32
+ * onto both the raw and processed rows, so the two are joinable even though
33
+ * they live in separate tables with independent `seq` counters.
34
+ *
35
+ * These schemas mirror the stored shape (snake_case columns) the way
36
+ * `FunnelEvent` does for the replay log; they exist for `z.infer` and to
37
+ * document the column set, not as a parse boundary.
38
+ */
39
+ declare const connectorRawEventSchema: z.ZodObject<{
40
+ event_id: z.ZodString;
41
+ type: z.ZodString;
42
+ connector_id: z.ZodNullable<z.ZodString>;
43
+ channel_id: z.ZodNullable<z.ZodString>;
44
+ payload: z.ZodString;
45
+ }, z.core.$strip>;
46
+ type ConnectorRawEvent = z.infer<typeof connectorRawEventSchema>;
47
+ declare const connectorProcessedEventSchema: z.ZodObject<{
48
+ event_id: z.ZodString;
49
+ type: z.ZodString;
50
+ connector_id: z.ZodNullable<z.ZodString>;
51
+ channel_id: z.ZodNullable<z.ZodString>;
52
+ outcome: z.ZodString;
53
+ payload: z.ZodString;
54
+ }, z.core.$strip>;
55
+ type ConnectorProcessedEvent = z.infer<typeof connectorProcessedEventSchema>;
56
+ declare const connectorConnectionEventSchema: z.ZodObject<{
57
+ type: z.ZodString;
58
+ connector_id: z.ZodNullable<z.ZodString>;
59
+ channel_id: z.ZodNullable<z.ZodString>;
60
+ status: z.ZodEnum<{
61
+ error: "error";
62
+ started: "started";
63
+ connected: "connected";
64
+ disconnected: "disconnected";
65
+ "auth-failed": "auth-failed";
66
+ stopped: "stopped";
67
+ }>;
68
+ detail: z.ZodString;
69
+ }, z.core.$strip>;
70
+ type ConnectorConnectionEvent = z.infer<typeof connectorConnectionEventSchema>;
71
+ /** The connector a row belongs to — the axis every diagnostic table shares. */
72
+ type ConnectorRef = {
73
+ type: string;
74
+ connectorId: string | null;
75
+ channelId: string | null;
76
+ };
77
+ /** A row tied to one inbound event, joinable to its twin by `eventId`. */
78
+ type ConnectorEventKeys = ConnectorRef & {
79
+ /** Correlation id shared by the raw and processed rows of the same inbound event. */
80
+ eventId: string;
81
+ };
82
+ /** One untouched inbound event to persist, before any processing. */
83
+ type ConnectorRawRecord = ConnectorEventKeys & {
84
+ /** The listener's untouched payload, already JSON-stringified by the caller. */
85
+ payload: string;
86
+ };
87
+ /** The processor's verdict for one inbound event. */
88
+ type ConnectorProcessedRecord = ConnectorEventKeys & {
89
+ /**
90
+ * "emitted" on successful delivery, "emitted:delivery-failed" when the
91
+ * downstream notify threw, or "skip:<reason>" when the processor dropped it.
92
+ */
93
+ outcome: string;
94
+ /**
95
+ * The delivered body (content + meta) for an emitted event. For a skipped
96
+ * event there is no body, so the listener records the event JSON here
97
+ * instead — keeping a skipped row self-describing rather than blank.
98
+ */
99
+ payload: string;
100
+ };
101
+ type ConnectorConnectionRecord = ConnectorRef & {
102
+ status: ConnectorConnectionStatus;
103
+ /** Free-form context (an error message, a reason) or "" when none. */
104
+ detail: string;
105
+ };
106
+ /**
107
+ * Filters every table query accepts — the read-side mirror of `ConnectorRef`.
108
+ * Each per-table query extends this with its own table's column, the same way
109
+ * each record extends `ConnectorRef`, so neither half of the file treats one
110
+ * table's shape as the base for the others.
111
+ */
112
+ type ConnectorQuery = {
113
+ type?: string;
114
+ connectorId?: string | null;
115
+ channelId?: string | null;
116
+ /** Match one table-local sequence number exactly. */
117
+ seq?: number;
118
+ /** Cap on returned rows. The most recent matching rows are returned, oldest first. */
119
+ limit?: number;
120
+ };
121
+ type ConnectorRawQuery = ConnectorQuery & {
122
+ eventId?: string;
123
+ };
124
+ type ConnectorProcessedQuery = ConnectorQuery & {
125
+ eventId?: string;
126
+ outcome?: string;
127
+ outcomePrefix?: string;
128
+ };
129
+ type ConnectorConnectionQuery = ConnectorQuery & {
130
+ status?: ConnectorConnectionStatus;
131
+ statuses?: ReadonlyArray<ConnectorConnectionStatus>;
132
+ };
133
+ /**
134
+ * A stored row, ascending by `seq`. `seq` is per-table (each table counts
135
+ * independently) and is for ordering within one table, not for correlating
136
+ * across them — use `eventId` to join raw and processed.
137
+ */
138
+ type StoredRawEvent = ConnectorRawRecord & {
139
+ seq: number;
140
+ ts: number;
141
+ };
142
+ type StoredProcessedEvent = ConnectorProcessedRecord & {
143
+ seq: number;
144
+ ts: number;
145
+ };
146
+ type StoredConnectionEvent = ConnectorConnectionRecord & {
147
+ seq: number;
148
+ ts: number;
149
+ };
150
+ /**
151
+ * Three-table diagnostic log of everything a connector listener does, so
152
+ * "why was there no notification?" is answerable whichever way it failed:
153
+ * - `raw` — every inbound event, before any filtering, with the listener's
154
+ * untouched payload (the Slack Bolt event, the GH webhook, …)
155
+ * - `processed` — the verdict for that event: `outcome` (emitted, or the
156
+ * reason it was dropped) and, when emitted, the body that was delivered.
157
+ * Shares an `eventId` with its raw row, so the two join into one story.
158
+ * - `connection` — the listener's lifecycle (started, connected, dropped,
159
+ * auth-failed, stopped, errored). This is the half the event tables can't
160
+ * show: an event that never arrived leaves no raw row, but a listener that
161
+ * never connected leaves a `connection` trail that says so.
162
+ *
163
+ * The three are physically separate (independent retention and payload-size
164
+ * policy) so a query never crosses them by accident and a huge raw payload
165
+ * never bloats the verdict or lifecycle trails. None flow to WS clients or the
166
+ * MCP channel — this is a separate store from `FunnelEventLog` (replay) and
167
+ * exists solely for debugging.
168
+ *
169
+ * Implementations:
170
+ * - `SqliteConnectorDiagnosticLog` — the default; survives daemon restarts,
171
+ * bounded by per-table row/age caps.
172
+ * - `MemoryConnectorDiagnosticLog` — an in-process double for tests.
173
+ */
174
+ declare abstract class ConnectorDiagnosticLog {
175
+ abstract recordRaw(record: ConnectorRawRecord): void;
176
+ abstract recordProcessed(record: ConnectorProcessedRecord): void;
177
+ abstract recordConnection(record: ConnectorConnectionRecord): void;
178
+ abstract queryRaw(query: ConnectorRawQuery): StoredRawEvent[];
179
+ abstract queryProcessed(query: ConnectorProcessedQuery): StoredProcessedEvent[];
180
+ abstract queryConnection(query: ConnectorConnectionQuery): StoredConnectionEvent[];
181
+ /** Drop every diagnostic row across all three tables and reclaim the files. */
182
+ abstract clear(): void;
183
+ abstract close(): void;
184
+ }
185
+ //#endregion
186
+ export { connectorConnectionEventSchema as _, ConnectorConnectionStatus as a, ConnectorProcessedQuery as c, ConnectorRawEvent as d, ConnectorRawQuery as f, StoredRawEvent as g, StoredProcessedEvent as h, ConnectorConnectionRecord as i, ConnectorProcessedRecord as l, StoredConnectionEvent as m, ConnectorConnectionEvent as n, ConnectorDiagnosticLog as o, ConnectorRawRecord as p, ConnectorConnectionQuery as r, ConnectorProcessedEvent as s, CONNECTOR_CONNECTION_STATUSES as t, ConnectorQuery as u, connectorProcessedEventSchema as v, connectorRawEventSchema as y };
@@ -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-kbd27d7I.js";
2
- export { ChannelDiagnosis, DiagnoseAllReport, DiagnosisStatus, DiagnosticConnectionError, DiagnosticEvent, DiagnosticsChannelSource, DiagnosticsGatewayProbe, DiagnosticsPublisher, DiagnosticsTokenReader, FunnelDiagnostics, ReplayResult, previewOf, queryRows, toDiagnosticConnectionError, toDiagnosticEvent };
1
+ import { _ as toDiagnosticConnectionError, a as DiagnosticsGatewayProbe, c as FunnelDiagnostics, d as DiagnosticEvent, f as diagnosticConnectionEventOf, g as queryRows, h as previewOf, i as DiagnosticsChannelSource, l as ReplayResult, m as diagnosticEventOfRaw, n as DiagnoseAllReport, o as DiagnosticsPublisher, p as diagnosticEventOfProcessed, r as DiagnosisStatus, s as DiagnosticsTokenReader, t as ChannelDiagnosis, u as DiagnosticConnectionError, v as toDiagnosticEvent } from "./funnel-diagnostics-CDrZznTB.js";
2
+ export { ChannelDiagnosis, DiagnoseAllReport, DiagnosisStatus, DiagnosticConnectionError, DiagnosticEvent, DiagnosticsChannelSource, DiagnosticsGatewayProbe, DiagnosticsPublisher, DiagnosticsTokenReader, FunnelDiagnostics, ReplayResult, diagnosticConnectionEventOf, diagnosticEventOfProcessed, diagnosticEventOfRaw, previewOf, queryRows, toDiagnosticConnectionError, toDiagnosticEvent };
@@ -1,2 +1,3 @@
1
- import { a as toDiagnosticEvent, i as toDiagnosticConnectionError, n as previewOf, r as queryRows, t as FunnelDiagnostics } from "./funnel-diagnostics-Cvk6Sk4x.js";
2
- export { FunnelDiagnostics, previewOf, queryRows, toDiagnosticConnectionError, toDiagnosticEvent };
1
+ import { a as queryRows, i as previewOf, n as diagnosticEventOfProcessed, o as toDiagnosticConnectionError, r as diagnosticEventOfRaw, s as toDiagnosticEvent, t as diagnosticConnectionEventOf } from "./diagnostic-event-CxMM5Bl2.js";
2
+ import { t as FunnelDiagnostics } from "./funnel-diagnostics-CAG7hJP0.js";
3
+ export { FunnelDiagnostics, diagnosticConnectionEventOf, diagnosticEventOfProcessed, diagnosticEventOfRaw, 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-eCWizJqS.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-Cd66sKyV.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-CI4hMkhq.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-CVTNUtDn.js";
1
+ import { n as DoctorReport, r as FunnelDoctor, t as DoctorFixMode } from "./funnel-doctor-CY4S5cnz.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 };
@@ -0,0 +1,2 @@
1
+ import { a as MemoryEventLogProps, c as EventLogValidator, d as EventLogEntry, i as MemoryEventLog, l as EventLogRelay, n as SqliteEventLogProps, o as EventLog, r as SqliteEventLogQuery, s as EventLogProps, t as SqliteEventLog, u as EventLogStore } from "./sqlite-event-log-BYgCFMxC.js";
2
+ export { EventLog, EventLogEntry, EventLogProps, EventLogRelay, EventLogStore, EventLogValidator, MemoryEventLog, MemoryEventLogProps, SqliteEventLog, SqliteEventLogProps, SqliteEventLogQuery };
@@ -0,0 +1,3 @@
1
+ import { t as SqliteEventLog } from "./sqlite-event-log-eZuXKszJ.js";
2
+ import { n as EventLog, t as MemoryEventLog } from "./memory-event-log-BY8XjFzi.js";
3
+ export { EventLog, MemoryEventLog, SqliteEventLog };
@@ -1,9 +1,8 @@
1
- import { t as FunnelLogger } from "./logger-Bc_Ooypb.js";
2
- import { n as FunnelFileSystem } from "./file-system-DHgbuTFb.js";
3
- import { t as ChannelConfig } from "./settings-schema-IShSMm5G.js";
4
- import { n as FunnelIdGenerator } from "./settings-reader-BnKIbmsD.js";
5
- import { z as FunnelProcessRunner } from "./connector-descriptor-CmyHlEiT.js";
6
-
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 { b as FunnelProcessRunner } from "./connector-descriptor-D4XtEsH8.js";
7
6
  //#region lib/engine/claude/channel-resolver.d.ts
8
7
  type ChannelResolver = {
9
8
  get(name: string): ChannelConfig | null;
@@ -26,15 +25,19 @@ type McpInstaller = {
26
25
  //#endregion
27
26
  //#region lib/engine/claude/process-guard.d.ts
28
27
  type ProcessGuard = {
29
- /** 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. */
30
- 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. */
31
33
  release(profileId: string): void;
32
34
  };
33
35
  //#endregion
34
36
  //#region lib/engine/claude/session-store.d.ts
35
37
  type SessionStore = {
36
38
  getSessionId(profileId: string): string | null;
37
- 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. */
38
41
  sessionFileExists(cwd: string, sessionId: string, env: Record<string, string>): boolean;
39
42
  };
40
43
  //#endregion
@@ -42,8 +45,10 @@ type SessionStore = {
42
45
  type LaunchCommon = {
43
46
  channel: string;
44
47
  cwd?: string;
45
- userArgs?: string[]; /** Args prepended to the claude argv (typically a profile's recipe). Defaults to none. */
46
- 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. */
47
52
  env?: Record<string, string>;
48
53
  /** Invoked synchronously after the child claude process has been spawned, with its PID.
49
54
  * Useful for hosts that need to register the spawned process before it exits
@@ -57,18 +62,17 @@ type LaunchCommon = {
57
62
  /**
58
63
  * A launch carries one of two targets, distinguished by `profileId`.
59
64
  *
60
- * - **profile launch** — has a stable `profileId` (uuid). Enforces singleton-ness
61
- * 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.
62
68
  * - **profile-less launch** — raw `--channel`. Never enforces singleton-ness and
63
69
  * always starts a fresh session, so `resume` is meaningless and disallowed.
64
70
  *
65
- * Modeling these as a union (rather than two independent optional fields) makes
66
- * `resume` without a `profileId` a compile error — previously it was silently
67
- * 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.
68
72
  */
69
73
  type LaunchTarget = {
70
- /** Stable id of the launching profile (uuid). Keys the singleton PID file
71
- * and the resumable session. */
74
+ /** Stable id of the launching profile. Keys the singleton PID file and
75
+ * the resumable session. */
72
76
  profileId: string;
73
77
  /** Inject `--session-id`/`--resume` for this profile (opt-in, default false).
74
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,7 +1,7 @@
1
- import { t as FunnelLogger } from "./logger-Bc_Ooypb.js";
2
- import { A as FunnelConnectorListener, g as ConnectorDiagnosticLog, h as ConnectorConnectionStatus } from "./connector-descriptor-CmyHlEiT.js";
1
+ import { t as FunnelLogger } from "./logger-mMZvblTx.js";
2
+ import { d as FunnelConnectorListener } from "./connector-descriptor-D4XtEsH8.js";
3
+ import { a as ConnectorConnectionStatus, o as ConnectorDiagnosticLog } from "./diagnostic-log-BsAg5qZK.js";
3
4
  import { FlumeEventHandler, FlumeLogHandler, FlumeReconnectOptions, FlumeRunning, FlumeRuntimeDeps, FlumeSource, FlumeStatus } from "@interactive-inc/flume";
4
-
5
5
  //#region lib/engine/connectors/connector-diagnostics-recorder.d.ts
6
6
  type Props$1 = {
7
7
  type: string;
@@ -24,15 +24,18 @@ declare class FunnelConnectorDiagnosticsRecorder {
24
24
  //#endregion
25
25
  //#region lib/engine/connectors/flume-source-listener.d.ts
26
26
  type Props = {
27
- /** Funnel connector type ("slack" / "discord" / "gh") — stamped onto diagnostic rows. */type: string;
27
+ /** Funnel connector type ("slack" / "discord" / "gh") — stamped onto diagnostic rows. */
28
+ type: string;
28
29
  connectorId: string;
29
30
  channelId: string | null;
30
31
  logger?: FunnelLogger;
31
32
  diagnosticLog?: ConnectorDiagnosticLog;
32
33
  };
33
34
  type RunStartOptions = {
34
- source: FlumeSource; /** Typed event handler — receives the source's events only (logs are routed separately). */
35
- onEvent: FlumeEventHandler; /** Optional log handler for everything the firehose emits (including status transitions). */
35
+ source: FlumeSource;
36
+ /** Typed event handler receives the source's events only (logs are routed separately). */
37
+ onEvent: FlumeEventHandler;
38
+ /** Optional log handler for everything the firehose emits (including status transitions). */
36
39
  onLog?: FlumeLogHandler;
37
40
  deps?: FlumeRuntimeDeps;
38
41
  /**