@interactive-inc/claude-funnel 0.59.1 → 0.60.1
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/README.md +9 -3
- package/dist/bin.js +549 -487
- package/dist/channels-2g_BU1N0.d.ts +174 -0
- package/dist/claude.d.ts +9 -5
- package/dist/claude.js +54 -17
- package/dist/{diagnostic-log-Cb3v8P7p.d.ts → connector-descriptor-6SXJoszo.d.ts} +158 -2
- package/dist/connectors/discord.d.ts +30 -4
- package/dist/connectors/discord.js +2 -2
- package/dist/connectors/gh.d.ts +21 -5
- package/dist/connectors/gh.js +3 -3
- package/dist/connectors/schedule.d.ts +124 -2
- package/dist/connectors/schedule.js +3 -3
- package/dist/connectors/slack.d.ts +149 -5
- package/dist/connectors/slack.js +2 -2
- package/dist/{diagnostic-sql-reader-CzYgZpq2.js → diagnostic-sql-reader-C9zR-Csp.js} +5 -5
- package/dist/diagnostics.d.ts +1 -1
- package/dist/diagnostics.js +1 -1
- package/dist/{discord-listener-CKsZGTnH.js → discord-connector-BL36yvbL.js} +60 -37
- package/dist/docs.d.ts +1 -1
- package/dist/docs.js +1 -1
- package/dist/doctor.d.ts +1 -1
- package/dist/doctor.js +1 -1
- package/dist/error-message-of-Byi4y0Uf.js +9 -0
- package/dist/{file-process-guard-JhFpmHYo.d.ts → file-process-guard-C_PLxfUX.d.ts} +6 -5
- package/dist/{funnel-diagnostics-BpKYrMSu.js → funnel-diagnostics-CSiJmPlZ.js} +19 -2
- package/dist/{funnel-diagnostics-K-wON25Y.d.ts → funnel-diagnostics-DpXOsCty.d.ts} +3 -3
- package/dist/{funnel-docs-ng5K8w4j.js → funnel-docs-BxXZ9Ksx.js} +76 -3
- package/dist/{funnel-docs-DYBs1-H_.d.ts → funnel-docs-CNklHvbt.d.ts} +1 -1
- package/dist/{funnel-doctor-vxO96TCA.d.ts → funnel-doctor-CZf_0Luq.d.ts} +2 -2
- package/dist/{funnel-recovery-COExL9MD.d.ts → funnel-recovery-DnLrdWO9.d.ts} +1 -1
- package/dist/gateway/daemon.js +326 -266
- package/dist/gateway-base-url-Dy4Ykuoh.js +14 -0
- package/dist/gateway.d.ts +2 -2
- package/dist/gateway.js +2 -2
- package/dist/{gh-listener-B2I4s8qh.js → gh-connector-DpiixfQZ.js} +53 -5
- package/dist/gh-connector-schema-Rzwc1c1N.js +12 -0
- package/dist/http-client-oICicjuO.d.ts +18 -0
- package/dist/index-CgY8NdMz.d.ts +1057 -0
- package/dist/index.d.ts +1558 -17
- package/dist/index.js +376 -343
- package/dist/{local-config-json-schema-DE1zkMcb.js → local-config-json-schema-JyLqOQNX.js} +9 -5
- package/dist/local-config-sync-Dh1Croqe.d.ts +169 -0
- package/dist/local-config.d.ts +2 -2
- package/dist/local-config.js +2 -2
- package/dist/logger.js +1 -1
- package/dist/{memory-diagnostic-log-B9Us7X05.js → memory-diagnostic-log-CI60kNfB.js} +33 -18
- package/dist/{memory-token-prompter-CcShtF8B.d.ts → memory-token-prompter-B4sjyaAq.d.ts} +2 -2
- package/dist/{memory-token-prompter-C7vREzCL.js → memory-token-prompter-CZde7e6y.js} +1 -1
- package/dist/{node-file-system-BcrmWN9I.js → node-file-system-Blr8pAir.js} +1 -1
- package/dist/node-http-client-lowp60Oa.js +25 -0
- package/dist/{gh-connector-schema-ClPLSYD9.js → node-process-runner-DxTvycoK.js} +1 -12
- package/dist/{profiles-g2qGVOWv.d.ts → profiles-Cy5wXQ0L.d.ts} +3 -3
- package/dist/{profiles-MnXvYfZF.js → profiles-DSzTeKQw.js} +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/profiles.js +1 -1
- package/dist/recovery.d.ts +1 -1
- package/dist/recovery.js +1 -1
- package/dist/{schedule-listener-DP9Jhc6U.js → schedule-connector-L4uzg5M8.js} +109 -9
- package/dist/{settings-reader-DPwqOVUm.d.ts → settings-reader-BIFB_j2f.d.ts} +1 -1
- package/dist/settings-schema-D1xcOqRu.d.ts +78 -0
- package/dist/{gateway-base-url-DxVjjDoW.js → settings-store-CUKSeTXC.js} +27 -29
- package/dist/{slack-listener-C4wlZaOq.js → slack-connector-DQIFPdBF.js} +67 -12
- package/dist/slot-fields-CMoRpwuy.js +45 -0
- package/dist/{yaml-render-cZu6CxkE.js → yaml-render-93pX7EF7.js} +7 -4
- package/package.json +1 -1
- package/dist/connector-adapter-DGacCppE.d.ts +0 -25
- package/dist/discord-connector-schema-CQyfDkLD.d.ts +0 -39
- package/dist/gh-connector-schema-CZzwzvqY.d.ts +0 -14
- package/dist/index-D7mjirUL.d.ts +0 -3602
- package/dist/local-config-sync-BGPAS9Be.d.ts +0 -401
- package/dist/process-runner-DIm1cy95.d.ts +0 -52
- package/dist/resolve-connector-token-CczqG_Ig.js +0 -22
- package/dist/schedule-listener-DoMPjHZj.d.ts +0 -112
- package/dist/settings-schema-1hh11jnN.d.ts +0 -152
- package/dist/slack-listener-Dj9NFbAJ.d.ts +0 -136
- /package/dist/{connector-adapter-qwXLjQId.js → connector-adapter-DU9Rvyec.js} +0 -0
- /package/dist/{connector-listener-CpHBecCj.js → connector-listener-DR3aKOuK.js} +0 -0
- /package/dist/{file-system-PWKKU7lA.js → file-system-Wvzc2ePY.js} +0 -0
- /package/dist/{file-system-DxpnnUVb.d.ts → file-system-o51IsM0W.d.ts} +0 -0
- /package/dist/{funnel-doctor-CApCezTq.js → funnel-doctor-DiJCjHsg.js} +0 -0
- /package/dist/{funnel-log-sqlite-sink-B_5_4ybn.js → funnel-log-sqlite-sink-kqJbx2H7.js} +0 -0
- /package/dist/{funnel-recovery-D9CxD5Zs.js → funnel-recovery-BFdPjL6Z.js} +0 -0
- /package/dist/{logger-BP6SisKt.js → logger-B6iyNbxM.js} +0 -0
- /package/dist/{schedule-connector-schema-B_xO5z5B.js → schedule-connector-schema-CfyuMCMh.js} +0 -0
- /package/dist/{settings-reader-DPqrpV7s.js → settings-reader-CtQ-Ix8_.js} +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region lib/engine/http/gateway-base-url.ts
|
|
2
|
+
/**
|
|
3
|
+
* The HTTP base URL of a gateway daemon on the loopback interface. The daemon
|
|
4
|
+
* always binds 127.0.0.1 for its management API (only the WS `/ws` endpoint is
|
|
5
|
+
* ever exposed off-box), so every in-process HTTP client — publisher, listeners
|
|
6
|
+
* client, MCP channel server — talks to it here. Centralizing the construction
|
|
7
|
+
* keeps the host/port shape in one place instead of re-spelling
|
|
8
|
+
* `http://127.0.0.1:${port}` at each call site.
|
|
9
|
+
*/
|
|
10
|
+
function gatewayLoopbackUrl(port) {
|
|
11
|
+
return `http://127.0.0.1:${port}`;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { gatewayLoopbackUrl as t };
|
package/dist/gateway.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { C as StoredRawEvent, E as connectorRawEventSchema, S as StoredProcessedEvent, T as connectorProcessedEventSchema, _ as ConnectorQuery, b as ConnectorRawRecord, c as CONNECTOR_CONNECTION_STATUSES, d as ConnectorConnectionRecord, f as ConnectorConnectionStatus, g as ConnectorProcessedRecord, h as ConnectorProcessedQuery, l as ConnectorConnectionEvent, m as ConnectorProcessedEvent, p as ConnectorDiagnosticLog, u as ConnectorConnectionQuery, v as ConnectorRawEvent, w as connectorConnectionEventSchema, x as StoredConnectionEvent, y as ConnectorRawQuery } from "./connector-descriptor-6SXJoszo.js";
|
|
2
|
+
import { A as FunnelBroadcaster, C as funnelEventSchema, D as FunnelListenerSupervisor, 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-CgY8NdMz.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, FunnelListenerSupervisor, type GatewayApp, type GatewayEmitInput, GatewayEventStore, type GatewayRouteDeps, type Env as GatewayServerEnv, MemoryConnectorDiagnosticLog, MemoryFunnelEventLog, PublishRequest, PublishResponse, PublishResult, ReplayableEvent, SqliteConnectorDiagnosticLog, SqliteFunnelEventLog, StoredConnectionEvent, StoredProcessedEvent, StoredRawEvent, channelWsProtocols, channelWsUrl, connectorConnectionEventSchema, connectorProcessedEventSchema, connectorRawEventSchema, funnelEventSchema, gatewayLoopbackUrl, publishRequestSchema, publishResponseSchema };
|
package/dist/gateway.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as gatewayLoopbackUrl } from "./gateway-base-url-
|
|
2
|
-
import { S as publishResponseSchema, _ as funnelEventSchema, a as connectorConnectionEventSchema, b as FunnelChannelPublisher, c as MemoryFunnelEventLog, d as DEFAULT_GATEWAY_TOKEN_PATH, f as FunnelGatewayToken, g as FunnelEventLog, h as SqliteFunnelEventLog, i as ConnectorDiagnosticLog, l as channelWsProtocols, m as FunnelListenerSupervisor, n as SqliteConnectorDiagnosticLog, o as connectorProcessedEventSchema, p as FunnelGatewayServer, r as CONNECTOR_CONNECTION_STATUSES, s as connectorRawEventSchema, t as MemoryConnectorDiagnosticLog, u as channelWsUrl, v as FunnelBroadcaster, x as publishRequestSchema } from "./memory-diagnostic-log-
|
|
1
|
+
import { t as gatewayLoopbackUrl } from "./gateway-base-url-Dy4Ykuoh.js";
|
|
2
|
+
import { S as publishResponseSchema, _ as funnelEventSchema, a as connectorConnectionEventSchema, b as FunnelChannelPublisher, c as MemoryFunnelEventLog, d as DEFAULT_GATEWAY_TOKEN_PATH, f as FunnelGatewayToken, g as FunnelEventLog, h as SqliteFunnelEventLog, i as ConnectorDiagnosticLog, l as channelWsProtocols, m as FunnelListenerSupervisor, n as SqliteConnectorDiagnosticLog, o as connectorProcessedEventSchema, p as FunnelGatewayServer, r as CONNECTOR_CONNECTION_STATUSES, s as connectorRawEventSchema, t as MemoryConnectorDiagnosticLog, u as channelWsUrl, v as FunnelBroadcaster, x as publishRequestSchema } from "./memory-diagnostic-log-CI60kNfB.js";
|
|
3
3
|
export { CONNECTOR_CONNECTION_STATUSES, ConnectorDiagnosticLog, DEFAULT_GATEWAY_TOKEN_PATH, FunnelBroadcaster, FunnelChannelPublisher, FunnelEventLog, FunnelGatewayServer, FunnelGatewayToken, FunnelListenerSupervisor, MemoryConnectorDiagnosticLog, MemoryFunnelEventLog, SqliteConnectorDiagnosticLog, SqliteFunnelEventLog, channelWsProtocols, channelWsUrl, connectorConnectionEventSchema, connectorProcessedEventSchema, connectorRawEventSchema, funnelEventSchema, gatewayLoopbackUrl, publishRequestSchema, publishResponseSchema };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
1
|
+
import { t as NodeFunnelProcessRunner } from "./node-process-runner-DxTvycoK.js";
|
|
2
|
+
import { t as ghConnectorSchema } from "./gh-connector-schema-Rzwc1c1N.js";
|
|
3
|
+
import { t as FunnelConnectorAdapter } from "./connector-adapter-DU9Rvyec.js";
|
|
4
|
+
import { t as FunnelConnectorListener } from "./connector-listener-DR3aKOuK.js";
|
|
5
|
+
import { t as errorMessageOf } from "./error-message-of-Byi4y0Uf.js";
|
|
4
6
|
import { z } from "zod";
|
|
5
7
|
//#region lib/engine/connectors/gh-adapter.ts
|
|
6
8
|
const defaultProcess$1 = new NodeFunnelProcessRunner();
|
|
@@ -142,7 +144,8 @@ var FunnelGhListener = class extends FunnelConnectorListener {
|
|
|
142
144
|
this.since = nextSince;
|
|
143
145
|
this.bootstrapped = true;
|
|
144
146
|
} catch (error) {
|
|
145
|
-
this.
|
|
147
|
+
this.recordConnection("error", errorMessageOf(error));
|
|
148
|
+
this.logger?.error("gh poll error", { error: errorMessageOf(error) });
|
|
146
149
|
}
|
|
147
150
|
}
|
|
148
151
|
recordRaw(eventId, item) {
|
|
@@ -175,4 +178,49 @@ var FunnelGhListener = class extends FunnelConnectorListener {
|
|
|
175
178
|
}
|
|
176
179
|
};
|
|
177
180
|
//#endregion
|
|
178
|
-
|
|
181
|
+
//#region lib/engine/connectors/gh-connector.ts
|
|
182
|
+
/**
|
|
183
|
+
* GitHub connector descriptor. Pass `ghConnector()` to
|
|
184
|
+
* `new Funnel({ connectors: [...] })` to enable the type.
|
|
185
|
+
*/
|
|
186
|
+
const ghConnector = () => ({
|
|
187
|
+
type: "gh",
|
|
188
|
+
toolExposed: true,
|
|
189
|
+
createListener(config, deps) {
|
|
190
|
+
return new FunnelGhListener({
|
|
191
|
+
config: ghConnectorSchema.parse(config),
|
|
192
|
+
channelId: deps.channelId,
|
|
193
|
+
process: deps.process,
|
|
194
|
+
logger: deps.logger,
|
|
195
|
+
diagnosticLog: deps.diagnosticLog
|
|
196
|
+
});
|
|
197
|
+
},
|
|
198
|
+
createAdapter(config, deps) {
|
|
199
|
+
ghConnectorSchema.parse(config);
|
|
200
|
+
return new FunnelGhAdapter({ process: deps.process });
|
|
201
|
+
},
|
|
202
|
+
secretTokens() {
|
|
203
|
+
return [];
|
|
204
|
+
},
|
|
205
|
+
buildConfig(input, context) {
|
|
206
|
+
return ghConnectorSchema.parse({
|
|
207
|
+
id: context.id,
|
|
208
|
+
type: "gh",
|
|
209
|
+
name: input.name,
|
|
210
|
+
...typeof input.pollInterval === "number" ? { pollInterval: input.pollInterval } : {},
|
|
211
|
+
createdAt: context.now,
|
|
212
|
+
updatedAt: context.now
|
|
213
|
+
});
|
|
214
|
+
},
|
|
215
|
+
applyUpdate(config, fields, context) {
|
|
216
|
+
const current = ghConnectorSchema.parse(config);
|
|
217
|
+
return ghConnectorSchema.parse({
|
|
218
|
+
...current,
|
|
219
|
+
...typeof fields.pollInterval === "number" ? { pollInterval: fields.pollInterval } : {},
|
|
220
|
+
updatedAt: context.now
|
|
221
|
+
});
|
|
222
|
+
},
|
|
223
|
+
operations: {}
|
|
224
|
+
});
|
|
225
|
+
//#endregion
|
|
226
|
+
export { FunnelGhListener as n, FunnelGhAdapter as r, ghConnector as t };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region lib/engine/connectors/gh-connector-schema.ts
|
|
3
|
+
const ghConnectorSchema = z.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
name: z.string(),
|
|
6
|
+
type: z.literal("gh"),
|
|
7
|
+
pollInterval: z.number().int().positive().optional(),
|
|
8
|
+
createdAt: z.string().datetime().optional(),
|
|
9
|
+
updatedAt: z.string().datetime().optional()
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { ghConnectorSchema as t };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region lib/engine/http/http-client.d.ts
|
|
2
|
+
type HttpRequest = {
|
|
3
|
+
method: string;
|
|
4
|
+
url: string;
|
|
5
|
+
headers?: Record<string, string>;
|
|
6
|
+
body?: string;
|
|
7
|
+
};
|
|
8
|
+
type HttpResponse = {
|
|
9
|
+
status: number;
|
|
10
|
+
ok: boolean;
|
|
11
|
+
text(): Promise<string>;
|
|
12
|
+
json(): Promise<unknown>;
|
|
13
|
+
};
|
|
14
|
+
declare abstract class FunnelHttpClient {
|
|
15
|
+
abstract fetch(request: HttpRequest): Promise<HttpResponse>;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { HttpRequest as n, HttpResponse as r, FunnelHttpClient as t };
|