@interactive-inc/claude-funnel 0.63.0 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +141 -141
- package/dist/{channels-B8RQPrVq.d.ts → channels-CRGb6B5_.d.ts} +1 -1
- package/dist/claude.d.ts +2 -2
- package/dist/claude.js +1 -1
- package/dist/{connector-descriptor-ClEEbuW3.d.ts → connector-descriptor-BFIhyTfa.d.ts} +1 -1
- package/dist/connectors/discord.d.ts +2 -2
- package/dist/connectors/gh.d.ts +2 -2
- package/dist/connectors/schedule.d.ts +1 -1
- package/dist/connectors/slack.d.ts +43 -9
- package/dist/connectors/slack.js +1 -1
- package/dist/{file-process-guard-DGHxALfI.d.ts → file-process-guard-tVcgckH6.d.ts} +1 -1
- package/dist/{flume-source-listener-Dim5szHG.d.ts → flume-source-listener-BNyAII7N.d.ts} +1 -1
- package/dist/gateway/daemon.js +24 -24
- package/dist/gateway.d.ts +2 -2
- package/dist/{index-DxRikYmu.d.ts → index-Ds6sHhA-.d.ts} +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/local-config.d.ts +1 -1
- package/dist/{memory-token-prompter-DP_YV9xX.d.ts → memory-token-prompter-BoV8Hf-n.d.ts} +1 -1
- package/dist/{slack-connector-BU86fIge.js → slack-connector-CxpWagbT.js} +35 -6
- package/package.json +1 -1
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-
|
|
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-
|
|
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";
|
|
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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
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
2
|
import { n as FunnelFileSystem } from "./file-system-VhwwXZbm.js";
|
|
3
|
-
import { n as ChannelConnectorView, r as FunnelChannels } from "./channels-
|
|
3
|
+
import { n as ChannelConnectorView, r as FunnelChannels } from "./channels-CRGb6B5_.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { Hono } from "hono";
|
|
6
6
|
import { ServerWebSocket } from "bun";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as Settings, c as profileConfigSchema, i as SETTINGS_VERSION, l as settingsSchema, n as ChannelDeliveryMode, o as channelConfigSchema, r as ProfileConfig, s as channelDeliveryModeSchema, t as ChannelConfig } from "./settings-schema-BL_c2Udm.js";
|
|
2
|
-
import { n as FunnelClaude, t as FunnelFileProcessGuard } from "./file-process-guard-
|
|
2
|
+
import { n as FunnelClaude, t as FunnelFileProcessGuard } from "./file-process-guard-tVcgckH6.js";
|
|
3
3
|
import { n as FunnelIdGenerator, t as FunnelSettingsReader } from "./settings-reader-BNxjsxCB.js";
|
|
4
|
-
import { A as connectorRawEventSchema, B as FunnelProcessRunner, C as ConnectorRawQuery, D as StoredRawEvent, E as StoredProcessedEvent, F as JsonValue, H as RunOptions, I as BaseConnectorConfig, L as baseConnectorConfigSchema, M as NotifyFn, N as CallInput, O as connectorConnectionEventSchema, P as FunnelConnectorAdapter, R as AttachOptions, S as ConnectorRawEvent, T as StoredConnectionEvent, U as RunResult, V as ProcessSnapshot, W as FunnelLogger, _ as ConnectorDiagnosticLog, a as ConnectorOperation, b as ConnectorProcessedRecord, c as FunnelClock, d as HttpResponse, f as CONNECTOR_CONNECTION_STATUSES, g as ConnectorConnectionStatus, h as ConnectorConnectionRecord, i as ConnectorListenerDeps, j as FunnelConnectorListener, k as connectorProcessedEventSchema, l as FunnelHttpClient, m as ConnectorConnectionQuery, n as ConnectorBuildContext, o as ConnectorOperationContext, p as ConnectorConnectionEvent, r as ConnectorDescriptor, s as ConnectorUpdateContext, t as ConnectorAdapterDeps, u as HttpRequest, v as ConnectorProcessedEvent, w as ConnectorRawRecord, x as ConnectorQuery, y as ConnectorProcessedQuery, z as DetachOptions } from "./connector-descriptor-
|
|
4
|
+
import { A as connectorRawEventSchema, B as FunnelProcessRunner, C as ConnectorRawQuery, D as StoredRawEvent, E as StoredProcessedEvent, F as JsonValue, H as RunOptions, I as BaseConnectorConfig, L as baseConnectorConfigSchema, M as NotifyFn, N as CallInput, O as connectorConnectionEventSchema, P as FunnelConnectorAdapter, R as AttachOptions, S as ConnectorRawEvent, T as StoredConnectionEvent, U as RunResult, V as ProcessSnapshot, W as FunnelLogger, _ as ConnectorDiagnosticLog, a as ConnectorOperation, b as ConnectorProcessedRecord, c as FunnelClock, d as HttpResponse, f as CONNECTOR_CONNECTION_STATUSES, g as ConnectorConnectionStatus, h as ConnectorConnectionRecord, i as ConnectorListenerDeps, j as FunnelConnectorListener, k as connectorProcessedEventSchema, l as FunnelHttpClient, m as ConnectorConnectionQuery, n as ConnectorBuildContext, o as ConnectorOperationContext, p as ConnectorConnectionEvent, r as ConnectorDescriptor, s as ConnectorUpdateContext, t as ConnectorAdapterDeps, u as HttpRequest, v as ConnectorProcessedEvent, w as ConnectorRawRecord, x as ConnectorQuery, y as ConnectorProcessedQuery, z as DetachOptions } from "./connector-descriptor-BFIhyTfa.js";
|
|
5
5
|
import { n as FunnelFileSystem, t as FileStat } from "./file-system-VhwwXZbm.js";
|
|
6
6
|
import { t as FunnelProfiles } from "./profiles-cVZQkM69.js";
|
|
7
7
|
import { a as DiagnosticsGatewayProbe, c as FunnelDiagnostics, d as DiagnosticEvent, f as previewOf, g as ConnectorDiagnosticSqlReader, 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";
|
|
@@ -12,9 +12,9 @@ import { n as discordConnectorSchema, t as DiscordConnectorConfig } from "./disc
|
|
|
12
12
|
import { n as ghConnectorSchema, t as GhConnectorConfig } from "./gh-connector-schema-DWQaB6gX.js";
|
|
13
13
|
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";
|
|
14
14
|
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";
|
|
15
|
-
import { i as FunnelConnectorRegistry, n as ChannelConnectorView, r as FunnelChannels, t as AddConnectorInput } from "./channels-
|
|
16
|
-
import { A as FunnelBroadcaster, C as funnelEventSchema, D as FunnelListenerRegistry, E as GatewayRouteDeps, M as OnFunnelError, 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$1, x as FunnelEventLog, y as GatewayEventStore } from "./index-
|
|
17
|
-
import { i as FunnelLocalConfigSync, n as NodeFunnelTokenPrompter, o as FunnelTokenPrompter, s as FunnelLocalConfig, t as MemoryFunnelTokenPrompter } from "./memory-token-prompter-
|
|
15
|
+
import { i as FunnelConnectorRegistry, n as ChannelConnectorView, r as FunnelChannels, t as AddConnectorInput } from "./channels-CRGb6B5_.js";
|
|
16
|
+
import { A as FunnelBroadcaster, C as funnelEventSchema, D as FunnelListenerRegistry, E as GatewayRouteDeps, M as OnFunnelError, 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$1, x as FunnelEventLog, y as GatewayEventStore } from "./index-Ds6sHhA-.js";
|
|
17
|
+
import { i as FunnelLocalConfigSync, n as NodeFunnelTokenPrompter, o as FunnelTokenPrompter, s as FunnelLocalConfig, t as MemoryFunnelTokenPrompter } from "./memory-token-prompter-BoV8Hf-n.js";
|
|
18
18
|
import { hc } from "hono/client";
|
|
19
19
|
import { z } from "zod";
|
|
20
20
|
import * as _$hono_factory0 from "hono/factory";
|
package/dist/local-config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as FunnelFileSystem } from "./file-system-VhwwXZbm.js";
|
|
2
|
-
import { a as LocalConfigSyncResult, c as ChannelSpec, d as LocalConfig, f as ProfileSpec, g as profileSpecSchema, h as localConfigSchema, i as FunnelLocalConfigSync, l as ConnectorSpec, m as connectorSpecSchema, n as NodeFunnelTokenPrompter, o as FunnelTokenPrompter, p as channelSpecSchema, r as ConnectorSyncOutcome, s as FunnelLocalConfig, t as MemoryFunnelTokenPrompter, u as LOCAL_CONFIG_FILENAME } from "./memory-token-prompter-
|
|
2
|
+
import { a as LocalConfigSyncResult, c as ChannelSpec, d as LocalConfig, f as ProfileSpec, g as profileSpecSchema, h as localConfigSchema, i as FunnelLocalConfigSync, l as ConnectorSpec, m as connectorSpecSchema, n as NodeFunnelTokenPrompter, o as FunnelTokenPrompter, p as channelSpecSchema, r as ConnectorSyncOutcome, s as FunnelLocalConfig, t as MemoryFunnelTokenPrompter, u as LOCAL_CONFIG_FILENAME } from "./memory-token-prompter-BoV8Hf-n.js";
|
|
3
3
|
|
|
4
4
|
//#region lib/services/local-config/local-config-json-schema.d.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as FunnelFileSystem } from "./file-system-VhwwXZbm.js";
|
|
2
|
-
import { r as FunnelChannels } from "./channels-
|
|
2
|
+
import { r as FunnelChannels } from "./channels-CRGb6B5_.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region lib/services/local-config/local-config-schema.d.ts
|
|
@@ -119,6 +119,7 @@ var FunnelFlumeSlackListener = class extends FunnelFlumeSourceListener {
|
|
|
119
119
|
http;
|
|
120
120
|
signal;
|
|
121
121
|
preprocessEvent;
|
|
122
|
+
onInteractive;
|
|
122
123
|
processor = null;
|
|
123
124
|
botToken = "";
|
|
124
125
|
constructor(deps) {
|
|
@@ -135,6 +136,7 @@ var FunnelFlumeSlackListener = class extends FunnelFlumeSourceListener {
|
|
|
135
136
|
this.http = deps.http ?? new NodeFunnelHttpClient();
|
|
136
137
|
this.signal = deps.signal;
|
|
137
138
|
this.preprocessEvent = deps.preprocessEvent;
|
|
139
|
+
this.onInteractive = deps.onInteractive;
|
|
138
140
|
}
|
|
139
141
|
async start(notify) {
|
|
140
142
|
this.diagnostics.recordConnection("started", "");
|
|
@@ -187,6 +189,24 @@ var FunnelFlumeSlackListener = class extends FunnelFlumeSourceListener {
|
|
|
187
189
|
onStop() {
|
|
188
190
|
this.processor = null;
|
|
189
191
|
}
|
|
192
|
+
async handleInteractive(payload) {
|
|
193
|
+
const eventId = crypto.randomUUID();
|
|
194
|
+
const rawJson = JSON.stringify(payload);
|
|
195
|
+
this.diagnostics.recordRaw(eventId, rawJson);
|
|
196
|
+
if (!this.onInteractive) {
|
|
197
|
+
this.diagnostics.recordProcessed(eventId, "skip:no-interactive-handler", "");
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
const subtype = typeof payload.type === "string" ? payload.type : "unknown";
|
|
201
|
+
try {
|
|
202
|
+
await this.onInteractive(payload);
|
|
203
|
+
this.diagnostics.recordProcessed(eventId, `interactive:${subtype}`, "");
|
|
204
|
+
} catch (error) {
|
|
205
|
+
const message = errorMessageOf(error);
|
|
206
|
+
this.diagnostics.recordProcessed(eventId, `interactive-error:${subtype}`, message);
|
|
207
|
+
this.logger?.error(`slack interactive handler error (${subtype})`, { error: message });
|
|
208
|
+
}
|
|
209
|
+
}
|
|
190
210
|
async callAuthTest() {
|
|
191
211
|
let text;
|
|
192
212
|
try {
|
|
@@ -211,6 +231,10 @@ var FunnelFlumeSlackListener = class extends FunnelFlumeSourceListener {
|
|
|
211
231
|
}
|
|
212
232
|
async handleEvent(event, notify) {
|
|
213
233
|
if (!this.processor) return;
|
|
234
|
+
if (event.type === "interactive") {
|
|
235
|
+
await this.handleInteractive(event.data);
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
214
238
|
const rawEvent = event.data.event;
|
|
215
239
|
if (!isSlackRawEvent(rawEvent)) {
|
|
216
240
|
const skipId = crypto.randomUUID();
|
|
@@ -296,11 +320,15 @@ const parseSlackResponse = (text) => {
|
|
|
296
320
|
* `new Funnel({ connectors: [...] })` to enable the type.
|
|
297
321
|
*
|
|
298
322
|
* The listener is backed by `@interactive-inc/flume`'s `FlumeSlackSource`
|
|
299
|
-
* (raw Socket Mode WebSocket).
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
323
|
+
* (raw Socket Mode WebSocket). Both the `events_api` envelope (messages,
|
|
324
|
+
* mentions, reactions, …) and the `interactive` envelope (block actions,
|
|
325
|
+
* view submissions, message actions, shortcuts) are delivered — the former
|
|
326
|
+
* runs through the funnel processor and emits notifications, the latter is
|
|
327
|
+
* handed to the optional `onInteractive` host hook (funnel auto-acks the
|
|
328
|
+
* envelope, so the host can respond via the Slack web API at its leisure).
|
|
329
|
+
* Slash commands (`slash_commands` envelope) and Bolt's middleware chain
|
|
330
|
+
* have no equivalent here yet — wire those via the Slack HTTP endpoints if
|
|
331
|
+
* needed.
|
|
304
332
|
*/
|
|
305
333
|
const slackConnector = (options = {}) => ({
|
|
306
334
|
type: "slack",
|
|
@@ -313,7 +341,8 @@ const slackConnector = (options = {}) => ({
|
|
|
313
341
|
diagnosticLog: deps.diagnosticLog,
|
|
314
342
|
http: deps.http,
|
|
315
343
|
signal: deps.signal,
|
|
316
|
-
preprocessEvent: options.preprocessEvent
|
|
344
|
+
preprocessEvent: options.preprocessEvent,
|
|
345
|
+
onInteractive: options.onInteractive
|
|
317
346
|
});
|
|
318
347
|
},
|
|
319
348
|
createAdapter(config, deps) {
|
package/package.json
CHANGED