@interactive-inc/claude-funnel 0.31.0 → 0.33.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 +4 -4
- package/dist/bin.js +302 -302
- package/dist/gateway/daemon.js +165 -165
- package/dist/index.d.ts +12 -1
- package/dist/index.js +23 -13
- package/funnel.schema.json +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ Connector — a single attachment from a channel to an external source. Four typ
|
|
|
42
42
|
|
|
43
43
|
Profile sits on top of that model as a launch convenience, not part of it — you never need one to run an agent (`fnl claude --channel <name>` is enough). It is a saved launch preset bundling `{ path, channelId, options, env, resume }` so `fnl claude --profile cto` reproduces a known setup: which directory to launch from, which channel to bind, and the launch recipe (args prepended to the claude argv, env layered under the process, session reuse). A profile carries a stable uuid `id` (the unit the PID file and the resumable session key off, so renaming it strands neither); `name` is just the handle you type. The first profile in the list is the default. Because a profile already binds a channel, `--profile` and `--channel` cannot be combined.
|
|
44
44
|
|
|
45
|
-
The daemon is where all external connections live. It runs on port 9742, bound to loopback (`127.0.0.1`) only so it is never reachable off-box; set `FUNNEL_HOST=0.0.0.0` to expose it deliberately (every privileged endpoint still requires the bearer token regardless). It supervises connectors with auto-restart, broadcasts events to subscribed agent sessions over WebSocket, and serves the reply API that MCP calls. Starting or stopping an agent never starts or stops external connections.
|
|
45
|
+
The daemon is where all external connections live. It runs on port 9743 for `funnel` CLI launches (9742 for a gateway hosted programmatically, so the two never collide on one machine — `FUNNEL_PORT` overrides either), bound to loopback (`127.0.0.1`) only so it is never reachable off-box; set `FUNNEL_HOST=0.0.0.0` to expose it deliberately (every privileged endpoint still requires the bearer token regardless). It supervises connectors with auto-restart, broadcasts events to subscribed agent sessions over WebSocket, and serves the reply API that MCP calls. Starting or stopping an agent never starts or stops external connections.
|
|
46
46
|
|
|
47
47
|
The MCP layer is a thin bridge into the agent. It subscribes to the bound channel over WebSocket (the daemon does the work) and exposes one tool per callable connector so the agent can reply back out.
|
|
48
48
|
|
|
@@ -126,7 +126,7 @@ Or drop a `funnel.json` in the repo and `fnl claude` (no args) inside the repo w
|
|
|
126
126
|
|
|
127
127
|
`channels[]` is required and the first entry is the default. `fnl claude --channel review` picks one by name; `fnl claude` with no `--channel` uses the first.
|
|
128
128
|
|
|
129
|
-
A channel declares only transport — its `connectors` and delivery mode. The launch recipe lives on `profiles[]`: each profile binds to a channel by name and carries `options` (prepended to the claude argv before user-supplied CLI args, which still come last — use it for flags like `--brief`, `--agent <name>`, `--model <name>`), `env` (layered under the launched claude process — `process.env` from the launching shell wins on collision), and `resume`. `fnl claude
|
|
129
|
+
A channel declares only transport — its `connectors` and delivery mode. The launch recipe lives on `profiles[]`: each profile has a unique `name`, binds to a channel by name, and carries `options` (prepended to the claude argv before user-supplied CLI args, which still come last — use it for flags like `--brief`, `--agent <name>`, `--model <name>`), `env` (layered under the launched claude process — `process.env` from the launching shell wins on collision), and `resume`. A profile is launched by name with `fnl claude --profile <name>`; the channel never selects a profile on its own. Multiple profiles may bind the same channel — they are told apart by `name`.
|
|
130
130
|
|
|
131
131
|
The optional `connectors` array on a channel is the source of truth for that channel: missing connectors are created and connectors not declared are removed on launch. Connectors are matched by name. An absent `connectors` field leaves existing connectors alone.
|
|
132
132
|
|
|
@@ -274,7 +274,7 @@ ChannelSpec = { name, connectors? }
|
|
|
274
274
|
the matching Channel in ~/.funnel/projects/<id>/settings.json on launch. Connectors carry no
|
|
275
275
|
tokens; a token is set via the CLI or prompted on a TTY at launch and saved to that scoped settings.
|
|
276
276
|
|
|
277
|
-
ProfileSpec = { channel, options?, env?, resume? }
|
|
277
|
+
ProfileSpec = { name, channel, options?, env?, resume? }
|
|
278
278
|
launch recipe bound to a channel by name. applied inline on launch (the first spec bound to the
|
|
279
279
|
chosen channel — selected by its channel binding, not by name); not persisted into the global
|
|
280
280
|
profiles[] list.
|
|
@@ -319,7 +319,7 @@ Notes:
|
|
|
319
319
|
| Variable | Purpose |
|
|
320
320
|
| ---------------------- | --------------------------------------------------------------------------------------------- |
|
|
321
321
|
| `FUNNEL_CHANNEL_ID` | Injected into the child process by `fnl claude`; the funnel MCP uses it to subscribe. |
|
|
322
|
-
| `FUNNEL_PORT` |
|
|
322
|
+
| `FUNNEL_PORT` | Gateway port. Default 9743 for `funnel` CLI launches, 9742 for a programmatically hosted gateway. |
|
|
323
323
|
| `FUNNEL_GATEWAY_URL` | Daemon base URL used by MCP for both WS subscribe and HTTP reply (default `http://localhost:9742`). |
|
|
324
324
|
| `FUNNEL_GATEWAY_TOKEN` | Bearer token for the daemon HTTP / WS. Defaults to the contents of `~/.funnel/gateway.token`. |
|
|
325
325
|
|