@interactive-inc/claude-funnel 0.15.1 → 0.16.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 CHANGED
@@ -54,11 +54,21 @@ The MCP layer is a thin bridge into the agent. It subscribes to the bound channe
54
54
 
55
55
  ## Install
56
56
 
57
+ Per-repo (recommended for getting started — no global install, version pinned by the repo's lock file):
58
+
59
+ ```bash
60
+ bun add -D @interactive-inc/claude-funnel
61
+ bunx funnel claude # or `bunx funnel <any subcommand>`
62
+ ```
63
+
64
+ Global (one CLI for every repo you touch):
65
+
57
66
  ```bash
58
67
  bun add -g @interactive-inc/claude-funnel
68
+ funnel claude # or the `fnl` shorthand
59
69
  ```
60
70
 
61
- The published package ships the built `dist/`, so `bun add -g` makes `funnel` / `fnl` available immediately — no post-install step.
71
+ The published package ships the built `dist/`, so either install makes `funnel` / `fnl` available immediately — no post-install step. The rest of the README uses `fnl` for brevity; swap in `bunx funnel` if you went the per-repo route.
62
72
 
63
73
  ## Quick start
64
74
 
@@ -85,34 +95,43 @@ Or drop a `funnel.json` in the repo and `fnl claude` (no args) inside the repo w
85
95
 
86
96
  ```json
87
97
  {
88
- "$schema": "https://interactive-inc.github.io/open-claude-funnel/funnel.schema.json",
89
- "channel": "ops",
90
- "options": ["--brief", "--agent", "cto"],
98
+ "$schema": "./node_modules/@interactive-inc/claude-funnel/funnel.schema.json",
99
+ "options": ["--brief"],
91
100
  "env": {
92
101
  "ANTHROPIC_MODEL": "claude-sonnet-4-6"
93
102
  },
94
- "connectors": [
103
+ "channels": [
104
+ {
105
+ "name": "ops",
106
+ "options": ["--agent", "pm"],
107
+ "connectors": [
108
+ {
109
+ "type": "slack",
110
+ "name": "my-slack",
111
+ "env": {
112
+ "botToken": "SLACK_BOT_TOKEN",
113
+ "appToken": "SLACK_APP_TOKEN"
114
+ }
115
+ }
116
+ ]
117
+ },
95
118
  {
96
- "type": "slack",
97
- "name": "my-slack",
98
- "env": {
99
- "botToken": "SLACK_BOT_TOKEN",
100
- "appToken": "SLACK_APP_TOKEN"
101
- }
119
+ "name": "review",
120
+ "options": ["--agent", "reviewer"]
102
121
  }
103
122
  ]
104
123
  }
105
124
  ```
106
125
 
107
- Only `channel` is required.
126
+ `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.
108
127
 
109
- The optional `options` array is prepended to the claude argv on every launch, before any args the user types after `fnl claude`. Use it for repo-wide claude flags (e.g. `--brief`, `--agent <name>`, `--model <name>`). User-supplied CLI args appear later in the argv so they still win on collision.
128
+ The optional top-level `options` array is shared by every channel and prepended to each channel's own `options` (and both appear before user-supplied CLI args, which still come last). Use it for flags that should apply repo-wide (e.g. `--brief`). Per-channel `options` add channel-specific flags (e.g. a different `--agent`).
110
129
 
111
- The optional top-level `env` is a `Record<string, string>` of environment variables to layer under the claude process. `process.env` from the launching shell wins on collision, so funnel.json sets defaults that the user can still override one-off via the shell.
130
+ The optional top-level `env` is a `Record<string, string>` of environment variables shared by every channel; each channel's own `env` shallow-merges on top. `process.env` from the launching shell wins overall, so funnel.json sets defaults that the user can still override one-off via the shell.
112
131
 
113
132
  The optional `connectors` array is treated as the source of truth for the declared channel: missing connectors are created, an existing connector that the spec references by token (not by name) is renamed in place, and connectors not declared in the spec are removed on launch. An absent `connectors` field leaves `~/.funnel` alone.
114
133
 
115
- The optional top-level `$schema` points at the hosted JSON Schema (`https://interactive-inc.github.io/open-claude-funnel/funnel.schema.json`) so editors can validate and autocomplete the file. Local alternatives: the file ships in the npm package at `node_modules/@interactive-inc/claude-funnel/schemas/funnel.schema.json`, or generate one in-repo with `fnl schema > funnel.schema.json` and reference it via `./funnel.schema.json`.
134
+ The optional top-level `$schema` points at the JSON Schema so editors can validate and autocomplete the file. The recommended reference for repos with a local install is `./node_modules/@interactive-inc/claude-funnel/funnel.schema.json` it works without a network round-trip and editors do not need to prompt for trust. The same file is also published at `https://interactive-inc.github.io/open-claude-funnel/funnel.schema.json` (editors usually require explicit trust on first use), and `fnl schema > funnel.schema.json` regenerates a local copy on demand.
116
135
 
117
136
  Each token field resolves in this order:
118
137
 
@@ -178,9 +197,9 @@ fnl profiles <name> as-default move to the front of the list
178
197
  fnl profiles rename <old> <new>
179
198
  fnl profiles remove <name>
180
199
 
181
- fnl claude launch using ./funnel.json, or the default profile
182
- fnl claude --profile <name> launch a named profile
183
- fnl claude --channel <name> raw launch (no profile, cwd = current dir)
200
+ fnl claude launch the first channel from ./funnel.json, or the default profile
201
+ fnl claude --channel <name> with funnel.json: pick that channel; without: raw launch
202
+ fnl claude --profile <name> launch a named profile (ignores funnel.json)
184
203
  fnl claude [...] positionals and any flag other than -p / --profile / --channel
185
204
  (e.g. --agent, --resume, -c, --model) pass through to claude
186
205
  fnl mcp run as an MCP server (invoked from .mcp.json)
@@ -240,12 +259,16 @@ Connector =
240
259
  Profile = { name, path, subAgent, channelId }
241
260
  named launch preset; the first profile in the list is the default
242
261
 
243
- LocalConfig = { channel, options?, env?, connectors? }
244
- per-repo file (funnel.json) checked by `fnl claude` when no --profile / --channel is given
245
- options[] is prepended to claude argv (user CLI args override); env merges under process.env;
246
- connectors[] declares connectors to materialize on launch (each token field accepts a literal,
247
- an env-var reference at `env.<field>` resolved from process.env and ./.env.local, or omission
248
- for a TTY prompt persisted to ~/.funnel)
262
+ LocalConfig = { options?, env?, channels: ChannelSpec[] }
263
+ per-repo file (funnel.json). channels[] required; first entry is default, --channel selects.
264
+ Top-level options/env are shared defaults merged into each channel.
265
+
266
+ ChannelSpec = { name, options?, env?, connectors? }
267
+ options[] is appended to the shared options (user CLI args still come last); env shallow-merges
268
+ on top of the shared env (process.env wins overall); connectors[] declares connectors to
269
+ materialize on launch (each token field accepts a literal, an env-var reference at
270
+ `env.<field>` resolved from process.env and ./.env.local, or omission for a TTY prompt
271
+ persisted to ~/.funnel)
249
272
 
250
273
  Settings = { channels[], profiles[] } → ~/.funnel/settings.json
251
274
  ```