@interactive-inc/claude-funnel 0.52.0 → 0.53.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/README.md +22 -0
- package/dist/bin.js +269 -269
- package/dist/claude.d.ts +3 -3
- package/dist/claude.js +6 -6
- package/dist/connector-adapter-CePYBTgW.d.ts +25 -0
- package/dist/connectors/discord.d.ts +1 -1
- package/dist/connectors/gh.d.ts +1 -1
- package/dist/connectors/slack.d.ts +1 -1
- package/dist/{file-process-guard-BgrVHe9I.d.ts → file-process-guard-DMeLB6Zd.d.ts} +26 -11
- package/dist/gateway/daemon.js +169 -169
- package/dist/{settings-store-D2XSXTyt.js → gateway-base-url-ssk_He5G.js} +14 -1
- package/dist/gateway.d.ts +2 -2
- package/dist/gateway.js +3 -2
- package/dist/{index-NFs2jzCa.d.ts → index-DF5VmCPJ.d.ts} +88 -17
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/{local-config-json-schema-8IHjS4Q7.js → local-config-json-schema-D8i-BogY.js} +24 -2
- package/dist/{local-config-sync-BdsrDZOu.d.ts → local-config-sync-Cq39mT6p.d.ts} +26 -11
- package/dist/local-config.d.ts +2 -2
- package/dist/local-config.js +2 -2
- package/dist/{mcp-Dr-nIBwN.js → mcp-QeNCBhOD.js} +1 -1
- package/dist/{memory-connector-diagnostic-log-CrW1ltLM.js → memory-connector-diagnostic-log-COUWCsT_.js} +37 -6
- package/dist/{memory-token-prompter-B5FFCsGP.d.ts → memory-token-prompter-CKV7VBM5.d.ts} +1 -1
- package/dist/{memory-token-prompter-CLerGsgM.js → memory-token-prompter-Q7Snwsv2.js} +1 -1
- package/package.json +1 -1
- package/dist/connector-adapter-DKgsVuMH.d.ts +0 -11
package/dist/claude.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as ProcessGuard, c as ChannelResolver, i as SessionStore, n as FunnelClaude, o as McpInstaller, r as LaunchOptions, s as GatewayController, t as FileProcessGuard } from "./file-process-guard-
|
|
1
|
+
import { a as ProcessGuard, c as ChannelResolver, i as SessionStore, n as FunnelClaude, o as McpInstaller, r as LaunchOptions, s as GatewayController, t as FileProcessGuard } from "./file-process-guard-DMeLB6Zd.js";
|
|
2
2
|
import { n as FunnelFileSystem } from "./file-system-BeOKXjlV.js";
|
|
3
3
|
import { t as FunnelProfiles } from "./profiles-f0mNmEyP.js";
|
|
4
|
-
import { C as profileSpecSchema, S as localConfigSchema, _ as LOCAL_CONFIG_FILENAME, b as channelSpecSchema, g as ConnectorSpec, h as ChannelSpec, i as FunnelTokenPrompter, m as FunnelLocalConfig, n as FunnelLocalConfigSync, r as LocalConfigSyncResult, t as ConnectorSyncOutcome, v as LocalConfig, x as connectorSpecSchema, y as ProfileSpec } from "./local-config-sync-
|
|
5
|
-
import { i as funnelJsonSchema, n as NodeFunnelTokenPrompter, r as FunnelLocalConfigWriter, t as MemoryFunnelTokenPrompter } from "./memory-token-prompter-
|
|
4
|
+
import { C as profileSpecSchema, S as localConfigSchema, _ as LOCAL_CONFIG_FILENAME, b as channelSpecSchema, g as ConnectorSpec, h as ChannelSpec, i as FunnelTokenPrompter, m as FunnelLocalConfig, n as FunnelLocalConfigSync, r as LocalConfigSyncResult, t as ConnectorSyncOutcome, v as LocalConfig, x as connectorSpecSchema, y as ProfileSpec } from "./local-config-sync-Cq39mT6p.js";
|
|
5
|
+
import { i as funnelJsonSchema, n as NodeFunnelTokenPrompter, r as FunnelLocalConfigWriter, t as MemoryFunnelTokenPrompter } from "./memory-token-prompter-CKV7VBM5.js";
|
|
6
6
|
|
|
7
7
|
//#region lib/engine/mcp/mcp.d.ts
|
|
8
8
|
declare const FUNNEL_MCP_COMMAND = "bun";
|
package/dist/claude.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as FileProcessGuard, i as FunnelMcp, n as FUNNEL_MCP_COMMAND, o as FunnelClaude, r as FUNNEL_MCP_NAME, t as FUNNEL_MCP_ARGS } from "./mcp-
|
|
3
|
-
import { a as FunnelLocalConfig, c as connectorSpecSchema, i as FunnelTokenPrompter, l as localConfigSchema, n as NodeFunnelTokenPrompter, o as LOCAL_CONFIG_FILENAME, r as FunnelLocalConfigSync, s as channelSpecSchema, t as funnelJsonSchema, u as profileSpecSchema } from "./local-config-json-schema-
|
|
1
|
+
import { f as settingsSchema, s as resolveFunnelPort, t as gatewayLoopbackUrl } from "./gateway-base-url-ssk_He5G.js";
|
|
2
|
+
import { a as FileProcessGuard, i as FunnelMcp, n as FUNNEL_MCP_COMMAND, o as FunnelClaude, r as FUNNEL_MCP_NAME, t as FUNNEL_MCP_ARGS } from "./mcp-QeNCBhOD.js";
|
|
3
|
+
import { a as FunnelLocalConfig, c as connectorSpecSchema, i as FunnelTokenPrompter, l as localConfigSchema, n as NodeFunnelTokenPrompter, o as LOCAL_CONFIG_FILENAME, r as FunnelLocalConfigSync, s as channelSpecSchema, t as funnelJsonSchema, u as profileSpecSchema } from "./local-config-json-schema-D8i-BogY.js";
|
|
4
4
|
import { t as FunnelProfiles } from "./profiles-wMRnjSid.js";
|
|
5
|
-
import { n as FunnelLocalConfigWriter, t as MemoryFunnelTokenPrompter } from "./memory-token-prompter-
|
|
5
|
+
import { n as FunnelLocalConfigWriter, t as MemoryFunnelTokenPrompter } from "./memory-token-prompter-Q7Snwsv2.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { existsSync, readFileSync } from "node:fs";
|
|
8
8
|
import { homedir } from "node:os";
|
|
@@ -140,7 +140,7 @@ const readAllChannels = (dir) => {
|
|
|
140
140
|
};
|
|
141
141
|
const startChannelServer = async (options = {}) => {
|
|
142
142
|
const dir = options.dir ?? DEFAULT_FUNNEL_DIR;
|
|
143
|
-
const gatewayBaseUrl = options.gatewayUrl ?? process.env.FUNNEL_GATEWAY_URL ??
|
|
143
|
+
const gatewayBaseUrl = options.gatewayUrl ?? process.env.FUNNEL_GATEWAY_URL ?? gatewayLoopbackUrl(resolveFunnelPort());
|
|
144
144
|
const gatewayWsUrl = `${gatewayBaseUrl.replace(/^http/, "ws")}/ws`;
|
|
145
145
|
const channelId = options.channelId ?? process.env.FUNNEL_CHANNEL_ID;
|
|
146
146
|
const channel = channelId ? readChannelConnectors(dir, channelId) : null;
|
|
@@ -243,7 +243,7 @@ const startChannelServer = async (options = {}) => {
|
|
|
243
243
|
const args = request.params.arguments ?? {};
|
|
244
244
|
const method = typeof args.method === "string" ? args.method : "";
|
|
245
245
|
const path = typeof args.path === "string" ? args.path : "";
|
|
246
|
-
const body = args.body
|
|
246
|
+
const body = args.body;
|
|
247
247
|
if (!method || !path) throw new Error("`method` and `path` are required");
|
|
248
248
|
const url = `${gatewayBaseUrl}/channels/${encodeURIComponent(channel.channelName)}/connectors/${encodeURIComponent(toolName)}/call`;
|
|
249
249
|
const headers = { "content-type": "application/json" };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region lib/connectors/connector-adapter.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* A JSON-serializable value. Connector call bodies are sent to external APIs as
|
|
4
|
+
* JSON, so the body must be representable as JSON — `JsonValue` says exactly
|
|
5
|
+
* that, replacing a bare `unknown` that let non-serializable values (functions,
|
|
6
|
+
* symbols, class instances) slip through to `JSON.stringify`.
|
|
7
|
+
*/
|
|
8
|
+
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
9
|
+
[key: string]: JsonValue;
|
|
10
|
+
};
|
|
11
|
+
type CallInput = {
|
|
12
|
+
method: string;
|
|
13
|
+
path: string; /** JSON request body. Omit for GET-like calls. */
|
|
14
|
+
body?: JsonValue;
|
|
15
|
+
};
|
|
16
|
+
declare abstract class FunnelConnectorAdapter {
|
|
17
|
+
/**
|
|
18
|
+
* Dispatches one Claude → external call. The response is the external API's
|
|
19
|
+
* raw payload, typed `unknown` because its shape is the provider's concern —
|
|
20
|
+
* the caller (Claude, via MCP) interprets it.
|
|
21
|
+
*/
|
|
22
|
+
abstract call(input: CallInput): Promise<unknown>;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { FunnelConnectorAdapter as n, CallInput as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as FunnelLogger, b as FunnelConnectorListener, o as ConnectorDiagnosticLog, x as NotifyFn } from "../connector-diagnostic-log-yTOojKUR.js";
|
|
2
|
-
import { n as FunnelConnectorAdapter, t as CallInput } from "../connector-adapter-
|
|
2
|
+
import { n as FunnelConnectorAdapter, t as CallInput } from "../connector-adapter-CePYBTgW.js";
|
|
3
3
|
import { n as discordConnectorSchema, t as DiscordConnectorConfig } from "../discord-connector-schema-R0Uu-3ns.js";
|
|
4
4
|
|
|
5
5
|
//#region lib/engine/http/http-client.d.ts
|
package/dist/connectors/gh.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as FunnelLogger, b as FunnelConnectorListener, o as ConnectorDiagnosticLog, x as NotifyFn } from "../connector-diagnostic-log-yTOojKUR.js";
|
|
2
2
|
import { r as FunnelProcessRunner } from "../process-runner-DfniuWVU.js";
|
|
3
|
-
import { n as FunnelConnectorAdapter, t as CallInput } from "../connector-adapter-
|
|
3
|
+
import { n as FunnelConnectorAdapter, t as CallInput } from "../connector-adapter-CePYBTgW.js";
|
|
4
4
|
import { n as ghConnectorSchema, t as GhConnectorConfig } from "../gh-connector-schema-eoTtHbY6.js";
|
|
5
5
|
|
|
6
6
|
//#region lib/connectors/gh-adapter.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as FunnelConnectorAdapter, t as CallInput } from "../connector-adapter-
|
|
1
|
+
import { n as FunnelConnectorAdapter, t as CallInput } from "../connector-adapter-CePYBTgW.js";
|
|
2
2
|
import { a as slackConnectorSchema, c as SlackProcessedEmit, d as SlackSkipReason, i as SlackConnectorConfig, l as SlackProcessedSkip, n as SlackOnAppCreated, o as FunnelSlackEventProcessor, r as SlackPreprocessEvent, s as SlackProcessed, t as FunnelSlackListener, u as SlackRawEvent } from "../slack-listener-Bv5xI9gC.js";
|
|
3
3
|
|
|
4
4
|
//#region lib/connectors/slack-adapter.d.ts
|
|
@@ -38,21 +38,12 @@ type SessionStore = {
|
|
|
38
38
|
};
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region lib/engine/claude/claude.d.ts
|
|
41
|
-
type
|
|
41
|
+
type LaunchCommon = {
|
|
42
42
|
channel: string;
|
|
43
43
|
cwd?: string;
|
|
44
|
-
userArgs?: string[];
|
|
45
|
-
/** Stable id of the launching profile (uuid). Keys the singleton PID file and
|
|
46
|
-
* the resumable session. Absent for a profile-less launch (raw `--channel`),
|
|
47
|
-
* which never enforces singleton-ness and never resumes. */
|
|
48
|
-
profileId?: string; /** Args prepended to the claude argv (typically a profile's recipe). Defaults to none. */
|
|
44
|
+
userArgs?: string[]; /** Args prepended to the claude argv (typically a profile's recipe). Defaults to none. */
|
|
49
45
|
options?: string[]; /** Env vars layered under the launched claude process. process.env wins on collision. */
|
|
50
46
|
env?: Record<string, string>;
|
|
51
|
-
/** Whether to inject a `--session-id`/`--resume` for this profile.
|
|
52
|
-
* Defaults to false: resuming is opt-in and only meaningful for a profile,
|
|
53
|
-
* since the persisted session is owned by the profile (by id). A launch
|
|
54
|
-
* without a profile always starts a fresh session regardless of this flag. */
|
|
55
|
-
resume?: boolean;
|
|
56
47
|
/** Invoked synchronously after the child claude process has been spawned, with its PID.
|
|
57
48
|
* Useful for hosts that need to register the spawned process before it exits
|
|
58
49
|
* (e.g. multi-session registries that track per-claude liveness). */
|
|
@@ -62,6 +53,30 @@ type LaunchOptions = {
|
|
|
62
53
|
* does not need the funnel binary as an MCP endpoint. */
|
|
63
54
|
installMcp?: boolean;
|
|
64
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* A launch carries one of two targets, distinguished by `profileId`.
|
|
58
|
+
*
|
|
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.
|
|
61
|
+
* - **profile-less launch** — raw `--channel`. Never enforces singleton-ness and
|
|
62
|
+
* always starts a fresh session, so `resume` is meaningless and disallowed.
|
|
63
|
+
*
|
|
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).
|
|
67
|
+
*/
|
|
68
|
+
type LaunchTarget = {
|
|
69
|
+
/** Stable id of the launching profile (uuid). Keys the singleton PID file
|
|
70
|
+
* and the resumable session. */
|
|
71
|
+
profileId: string;
|
|
72
|
+
/** Inject `--session-id`/`--resume` for this profile (opt-in, default false).
|
|
73
|
+
* The persisted session is owned by the profile (by id). */
|
|
74
|
+
resume?: boolean;
|
|
75
|
+
} | {
|
|
76
|
+
profileId?: undefined;
|
|
77
|
+
resume?: undefined;
|
|
78
|
+
};
|
|
79
|
+
type LaunchOptions = LaunchCommon & LaunchTarget;
|
|
65
80
|
type Deps$1 = {
|
|
66
81
|
channels: ChannelResolver;
|
|
67
82
|
mcp: McpInstaller;
|