@interactive-inc/claude-funnel 0.15.2 → 0.17.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/index.d.ts CHANGED
@@ -150,6 +150,8 @@ declare const channelConfigSchema: z.ZodObject<{
150
150
  fanout: "fanout";
151
151
  exclusive: "exclusive";
152
152
  }>>;
153
+ options: z.ZodDefault<z.ZodArray<z.ZodString>>;
154
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
153
155
  connectors: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
154
156
  id: z.ZodString;
155
157
  name: z.ZodString;
@@ -195,9 +197,7 @@ type ChannelConfig = z.infer<typeof channelConfigSchema>;
195
197
  declare const profileConfigSchema: z.ZodObject<{
196
198
  name: z.ZodString;
197
199
  path: z.ZodString;
198
- subAgent: z.ZodString;
199
200
  channelId: z.ZodString;
200
- brief: z.ZodOptional<z.ZodBoolean>;
201
201
  }, z.core.$strip>;
202
202
  type ProfileConfig = z.infer<typeof profileConfigSchema>;
203
203
  declare const SETTINGS_VERSION = 1;
@@ -210,6 +210,8 @@ declare const settingsSchema: z.ZodObject<{
210
210
  fanout: "fanout";
211
211
  exclusive: "exclusive";
212
212
  }>>;
213
+ options: z.ZodDefault<z.ZodArray<z.ZodString>>;
214
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
213
215
  connectors: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
214
216
  id: z.ZodString;
215
217
  name: z.ZodString;
@@ -254,9 +256,7 @@ declare const settingsSchema: z.ZodObject<{
254
256
  profiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
255
257
  name: z.ZodString;
256
258
  path: z.ZodString;
257
- subAgent: z.ZodString;
258
259
  channelId: z.ZodString;
259
- brief: z.ZodOptional<z.ZodBoolean>;
260
260
  }, z.core.$strip>>>;
261
261
  }, z.core.$strip>;
262
262
  type Settings = z.infer<typeof settingsSchema>;
@@ -318,8 +318,12 @@ declare class FunnelChannels {
318
318
  add(input: {
319
319
  name: string;
320
320
  delivery?: ChannelDeliveryMode;
321
+ options?: string[];
322
+ env?: Record<string, string>;
321
323
  }): ChannelConfig;
322
324
  setDelivery(name: string, delivery: ChannelDeliveryMode): void;
325
+ setOptions(name: string, options: string[]): void;
326
+ setEnv(name: string, env: Record<string, string>): void;
323
327
  remove(name: string): void;
324
328
  rename(oldName: string, newName: string): void;
325
329
  listConnectors(channelName: string): ConnectorConfig[];
@@ -392,11 +396,8 @@ declare class FunnelMcp {
392
396
  type LaunchOptions = {
393
397
  channel: string;
394
398
  cwd?: string;
395
- subAgent?: string;
396
399
  userArgs?: string[];
397
- profileName?: string; /** Forward `--brief` to claude on launch (enables the SendUserMessage tool). */
398
- brief?: boolean; /** Extra env vars merged under process.env (process.env wins on collision). */
399
- extraEnv?: Record<string, string>;
400
+ profileName?: string;
400
401
  };
401
402
  type Deps$12 = {
402
403
  channels: FunnelChannels;
@@ -476,9 +477,8 @@ declare const connectorSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
476
477
  name: z.ZodString;
477
478
  }, z.core.$strip>], "type">;
478
479
  type ConnectorSpec = z.infer<typeof connectorSpecSchema>;
479
- declare const localConfigSchema: z.ZodObject<{
480
- $schema: z.ZodOptional<z.ZodString>;
481
- channel: z.ZodString;
480
+ declare const channelSpecSchema: z.ZodObject<{
481
+ name: z.ZodString;
482
482
  options: z.ZodOptional<z.ZodArray<z.ZodString>>;
483
483
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
484
484
  connectors: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -506,6 +506,39 @@ declare const localConfigSchema: z.ZodObject<{
506
506
  name: z.ZodString;
507
507
  }, z.core.$strip>], "type">>>;
508
508
  }, z.core.$strip>;
509
+ type ChannelSpec = z.infer<typeof channelSpecSchema>;
510
+ declare const localConfigSchema: z.ZodObject<{
511
+ $schema: z.ZodOptional<z.ZodString>;
512
+ channels: z.ZodArray<z.ZodObject<{
513
+ name: z.ZodString;
514
+ options: z.ZodOptional<z.ZodArray<z.ZodString>>;
515
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
516
+ connectors: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
517
+ type: z.ZodLiteral<"slack">;
518
+ name: z.ZodString;
519
+ botToken: z.ZodOptional<z.ZodString>;
520
+ appToken: z.ZodOptional<z.ZodString>;
521
+ env: z.ZodOptional<z.ZodObject<{
522
+ botToken: z.ZodOptional<z.ZodString>;
523
+ appToken: z.ZodOptional<z.ZodString>;
524
+ }, z.core.$strip>>;
525
+ }, z.core.$strip>, z.ZodObject<{
526
+ type: z.ZodLiteral<"discord">;
527
+ name: z.ZodString;
528
+ botToken: z.ZodOptional<z.ZodString>;
529
+ env: z.ZodOptional<z.ZodObject<{
530
+ botToken: z.ZodOptional<z.ZodString>;
531
+ }, z.core.$strip>>;
532
+ }, z.core.$strip>, z.ZodObject<{
533
+ type: z.ZodLiteral<"gh">;
534
+ name: z.ZodString;
535
+ pollInterval: z.ZodOptional<z.ZodNumber>;
536
+ }, z.core.$strip>, z.ZodObject<{
537
+ type: z.ZodLiteral<"schedule">;
538
+ name: z.ZodString;
539
+ }, z.core.$strip>], "type">>>;
540
+ }, z.core.$strip>>;
541
+ }, z.core.$strip>;
509
542
  type LocalConfig = z.infer<typeof localConfigSchema>;
510
543
  declare const LOCAL_CONFIG_FILENAME = "funnel.json";
511
544
  declare const LOCAL_ENV_FILENAME = ".env.local";
@@ -545,8 +578,8 @@ type Deps$9 = {
545
578
  env?: NodeJS.ProcessEnv;
546
579
  };
547
580
  /**
548
- * Reconciles a `funnel.json` spec with `~/.funnel/settings.json`. The spec
549
- * is the source of truth for the channel it declares:
581
+ * Reconciles a single funnel.json channel spec with `~/.funnel/settings.json`.
582
+ * The spec is the source of truth for the channel it declares:
550
583
  *
551
584
  * - missing channel → created
552
585
  * - declared connector matched by name → tokens reconciled
@@ -555,9 +588,10 @@ type Deps$9 = {
555
588
  * - declared connector with no match → added
556
589
  * - any connector left in the channel that the spec did not touch → removed
557
590
  *
558
- * Removal only fires when funnel.json has a `connectors` field. An absent
559
- * field means "do not manage connectors from here" and leaves everything in
560
- * `~/.funnel` alone.
591
+ * Removal only fires when the channel spec has a `connectors` field. An
592
+ * absent field means "do not manage connectors from here" and leaves
593
+ * everything in `~/.funnel` alone. Other channels in funnel.json (not
594
+ * passed to this call) are untouched.
561
595
  */
562
596
  declare class FunnelLocalConfigSync {
563
597
  private readonly channels;
@@ -565,7 +599,7 @@ declare class FunnelLocalConfigSync {
565
599
  private readonly prompter;
566
600
  private readonly env;
567
601
  constructor(deps: Deps$9);
568
- ensure(local: LocalConfig, cwd: string): Promise<void>;
602
+ ensure(channel: ChannelSpec, cwd: string): Promise<void>;
569
603
  private ensureConnector;
570
604
  private ensureSlack;
571
605
  private ensureDiscord;
@@ -1613,7 +1647,7 @@ declare const createCliApp: (funnel: Funnel) => _$hono_hono_base0.HonoBase<Env,
1613
1647
  channel?: string | undefined;
1614
1648
  };
1615
1649
  };
1616
- output: "funnel claude — launch Claude Code\n\nusage:\n funnel claude launch using funnel.json in cwd, or the default profile\n funnel claude -p <name> launch a named profile\n funnel claude --profile <name> (long form)\n funnel claude --channel <name> raw launch (no profile, cwd = current dir)\n funnel claude [...] any other argument is forwarded to the claude CLI\n\nresolution order when no --profile / --channel is given:\n 1. ./funnel.json in the current directory\n 2. the default profile (first entry in fnl profiles)\n\nfunnel-specific options (everything else passes through to claude verbatim):\n -p, --profile profile name to launch\n --channel channel name (raw launch, ignored when --profile is given)\n -h, --help show this help\n\nPositional args, unknown short flags (e.g. -c, -r), and claude's own flags\n(--agent, --resume, --model, --print, --output-format ...) are all forwarded.\nOn launch the FUNNEL_CHANNEL_ID env var is set and MCP connects to the gateway.";
1650
+ output: "funnel claude — launch Claude Code\n\nusage:\n funnel claude launch the first channel from funnel.json, or the default profile\n funnel claude --channel <name> with funnel.json: select that channel; without: raw launch\n funnel claude -p <name> launch a named profile\n funnel claude --profile <name> (long form)\n funnel claude [...] any other argument is forwarded to the claude CLI\n\nresolution order:\n 1. --help print this help\n 2. --profile <name> named profile (ignores funnel.json)\n 3. ./funnel.json in the current directory + --channel selects (or first wins)\n 4. --channel <name> with no funnel.json → raw launch using an existing settings.json channel\n 5. the default profile (first entry in fnl profiles)\n\nfunnel-specific options (everything else passes through to claude verbatim):\n -p, --profile profile name to launch\n --channel channel name (selects from funnel.json, or raw-launches if no funnel.json)\n -h, --help show this help\n\nPositional args, unknown short flags (e.g. -c, -r), and claude's own flags\n(--agent, --resume, --model, --print, --output-format ...) are all forwarded.\nOn launch the FUNNEL_CHANNEL_ID env var is set and MCP connects to the gateway.";
1617
1651
  outputFormat: "text";
1618
1652
  status: _$hono_utils_http_status0.ContentfulStatusCode;
1619
1653
  };
@@ -2375,10 +2409,8 @@ declare const createCliApp: (funnel: Funnel) => _$hono_hono_base0.HonoBase<Env,
2375
2409
  };
2376
2410
  } & {
2377
2411
  query: {
2378
- path: string | string[];
2379
- "sub-agent": string | string[];
2380
- channel: string | string[];
2381
- brief?: string | string[] | undefined;
2412
+ path: string;
2413
+ channel: string;
2382
2414
  };
2383
2415
  };
2384
2416
  output: string;
@@ -2391,10 +2423,8 @@ declare const createCliApp: (funnel: Funnel) => _$hono_hono_base0.HonoBase<Env,
2391
2423
  };
2392
2424
  } & {
2393
2425
  query: {
2394
- path: string | string[];
2395
- "sub-agent": string | string[];
2396
- channel: string | string[];
2397
- brief?: string | string[] | undefined;
2426
+ path: string;
2427
+ channel: string;
2398
2428
  };
2399
2429
  };
2400
2430
  output: `added profile "${string}"`;
@@ -2421,10 +2451,7 @@ declare const createCliApp: (funnel: Funnel) => _$hono_hono_base0.HonoBase<Env,
2421
2451
  } & {
2422
2452
  query: {
2423
2453
  path?: string | undefined;
2424
- "sub-agent"?: string | undefined;
2425
2454
  channel?: string | undefined;
2426
- brief?: string | string[] | undefined;
2427
- "no-brief"?: string | string[] | undefined;
2428
2455
  };
2429
2456
  };
2430
2457
  output: string;
@@ -2438,10 +2465,7 @@ declare const createCliApp: (funnel: Funnel) => _$hono_hono_base0.HonoBase<Env,
2438
2465
  } & {
2439
2466
  query: {
2440
2467
  path?: string | undefined;
2441
- "sub-agent"?: string | undefined;
2442
2468
  channel?: string | undefined;
2443
- brief?: string | string[] | undefined;
2444
- "no-brief"?: string | string[] | undefined;
2445
2469
  };
2446
2470
  };
2447
2471
  output: `updated profile "${string}"`;
@@ -2904,7 +2928,7 @@ declare const app: _$hono_hono_base0.HonoBase<Env, {
2904
2928
  channel?: string | undefined;
2905
2929
  };
2906
2930
  };
2907
- output: "funnel claude — launch Claude Code\n\nusage:\n funnel claude launch using funnel.json in cwd, or the default profile\n funnel claude -p <name> launch a named profile\n funnel claude --profile <name> (long form)\n funnel claude --channel <name> raw launch (no profile, cwd = current dir)\n funnel claude [...] any other argument is forwarded to the claude CLI\n\nresolution order when no --profile / --channel is given:\n 1. ./funnel.json in the current directory\n 2. the default profile (first entry in fnl profiles)\n\nfunnel-specific options (everything else passes through to claude verbatim):\n -p, --profile profile name to launch\n --channel channel name (raw launch, ignored when --profile is given)\n -h, --help show this help\n\nPositional args, unknown short flags (e.g. -c, -r), and claude's own flags\n(--agent, --resume, --model, --print, --output-format ...) are all forwarded.\nOn launch the FUNNEL_CHANNEL_ID env var is set and MCP connects to the gateway.";
2931
+ output: "funnel claude — launch Claude Code\n\nusage:\n funnel claude launch the first channel from funnel.json, or the default profile\n funnel claude --channel <name> with funnel.json: select that channel; without: raw launch\n funnel claude -p <name> launch a named profile\n funnel claude --profile <name> (long form)\n funnel claude [...] any other argument is forwarded to the claude CLI\n\nresolution order:\n 1. --help print this help\n 2. --profile <name> named profile (ignores funnel.json)\n 3. ./funnel.json in the current directory + --channel selects (or first wins)\n 4. --channel <name> with no funnel.json → raw launch using an existing settings.json channel\n 5. the default profile (first entry in fnl profiles)\n\nfunnel-specific options (everything else passes through to claude verbatim):\n -p, --profile profile name to launch\n --channel channel name (selects from funnel.json, or raw-launches if no funnel.json)\n -h, --help show this help\n\nPositional args, unknown short flags (e.g. -c, -r), and claude's own flags\n(--agent, --resume, --model, --print, --output-format ...) are all forwarded.\nOn launch the FUNNEL_CHANNEL_ID env var is set and MCP connects to the gateway.";
2908
2932
  outputFormat: "text";
2909
2933
  status: _$hono_utils_http_status0.ContentfulStatusCode;
2910
2934
  };
@@ -3666,10 +3690,8 @@ declare const app: _$hono_hono_base0.HonoBase<Env, {
3666
3690
  };
3667
3691
  } & {
3668
3692
  query: {
3669
- path: string | string[];
3670
- "sub-agent": string | string[];
3671
- channel: string | string[];
3672
- brief?: string | string[] | undefined;
3693
+ path: string;
3694
+ channel: string;
3673
3695
  };
3674
3696
  };
3675
3697
  output: string;
@@ -3682,10 +3704,8 @@ declare const app: _$hono_hono_base0.HonoBase<Env, {
3682
3704
  };
3683
3705
  } & {
3684
3706
  query: {
3685
- path: string | string[];
3686
- "sub-agent": string | string[];
3687
- channel: string | string[];
3688
- brief?: string | string[] | undefined;
3707
+ path: string;
3708
+ channel: string;
3689
3709
  };
3690
3710
  };
3691
3711
  output: `added profile "${string}"`;
@@ -3712,10 +3732,7 @@ declare const app: _$hono_hono_base0.HonoBase<Env, {
3712
3732
  } & {
3713
3733
  query: {
3714
3734
  path?: string | undefined;
3715
- "sub-agent"?: string | undefined;
3716
3735
  channel?: string | undefined;
3717
- brief?: string | string[] | undefined;
3718
- "no-brief"?: string | string[] | undefined;
3719
3736
  };
3720
3737
  };
3721
3738
  output: string;
@@ -3729,10 +3746,7 @@ declare const app: _$hono_hono_base0.HonoBase<Env, {
3729
3746
  } & {
3730
3747
  query: {
3731
3748
  path?: string | undefined;
3732
- "sub-agent"?: string | undefined;
3733
3749
  channel?: string | undefined;
3734
- brief?: string | string[] | undefined;
3735
- "no-brief"?: string | string[] | undefined;
3736
3750
  };
3737
3751
  };
3738
3752
  output: `updated profile "${string}"`;
@@ -4177,4 +4191,4 @@ ${string}`;
4177
4191
  //#region lib/tui/tui.d.ts
4178
4192
  declare function launchTui(funnel: Funnel): Promise<void>;
4179
4193
  //#endregion
4180
- export { AttachOptions, BroadcastEvent, BroadcastSubscriber, ChannelConfig, ChannelConnectorView, ChannelDeliveryMode, ChannelServerOptions, ConnectorConfig, ConnectorSpec, ConnectorType, DEFAULT_GATEWAY_TOKEN_PATH, DetachOptions, DiscordConnectorConfig, Env, FUNNEL_DIR, FUNNEL_MCP_COMMAND, FUNNEL_MCP_NAME, FileStat, Funnel, FunnelBroadcaster, FunnelChannelPublisher, FunnelChannels, FunnelClaude, FunnelClock, FunnelConnectorFactory, FunnelConnectorListener, FunnelDotenvReader, FunnelEvent, FunnelEventStore, FunnelFileSystem, FunnelGateway, FunnelGatewayServer, FunnelGatewayToken, FunnelIdGenerator, FunnelListenerSupervisor, FunnelListenersClient, FunnelLocalConfig, FunnelLocalConfigSync, FunnelLogger, FunnelMcp, FunnelProcessRunner, FunnelProfiles, FunnelSettingsReader, FunnelSettingsStore, FunnelSlackEventProcessor, FunnelTokenPrompter, GhConnectorConfig, LOCAL_CONFIG_FILENAME, LOCAL_ENV_FILENAME, LaunchOptions, ListListenersResult, ListenerEntry, ListenerOpResult, LocalConfig, LogEntry, MemoryFunnelClock, MemoryFunnelFileSystem, MemoryFunnelIdGenerator, MemoryFunnelLogger, MemoryFunnelProcessRunner, MemoryFunnelTokenPrompter, MemoryProcessCall, MemoryProcessHandler, MemoryProcessResponse, MemoryProcessSyncHandler, MockFunnelSettingsReader, NodeFunnelClock, NodeFunnelFileSystem, NodeFunnelIdGenerator, NodeFunnelLogger, NodeFunnelProcessRunner, NodeFunnelTokenPrompter, NoopFunnelLogger, NotifyFn, ProfileConfig, PublishRequest, PublishResponse, PublishResult, ReplayableEvent, RunOptions, RunResult, SETTINGS_PATH, SETTINGS_VERSION, ScheduleCatchupPolicy, ScheduleConnectorConfig, ScheduleEntry, ScheduleListenerOptions, Settings, SlackConnectorConfig, SlackListenerOptions, SlackProcessed, SlackProcessedEmit, SlackProcessedSkip, SlackRawEvent, channelConfigSchema, channelDeliveryModeSchema, app as cliApp, connectorConfigSchema, connectorSpecSchema, createCliApp, createSettings, discordConnectorSchema, factory, funnelEventSchema, funnelJsonSchema, ghConnectorSchema, launchTui, localConfigSchema, profileConfigSchema, publishRequestSchema, publishResponseSchema, queryToCliArgs, scheduleCatchupPolicySchema, scheduleConnectorSchema, scheduleEntrySchema, settingsSchema, slackConnectorSchema, startChannelServer, toRequest };
4194
+ export { AttachOptions, BroadcastEvent, BroadcastSubscriber, ChannelConfig, ChannelConnectorView, ChannelDeliveryMode, ChannelServerOptions, ChannelSpec, ConnectorConfig, ConnectorSpec, ConnectorType, DEFAULT_GATEWAY_TOKEN_PATH, DetachOptions, DiscordConnectorConfig, Env, FUNNEL_DIR, FUNNEL_MCP_COMMAND, FUNNEL_MCP_NAME, FileStat, Funnel, FunnelBroadcaster, FunnelChannelPublisher, FunnelChannels, FunnelClaude, FunnelClock, FunnelConnectorFactory, FunnelConnectorListener, FunnelDotenvReader, FunnelEvent, FunnelEventStore, FunnelFileSystem, FunnelGateway, FunnelGatewayServer, FunnelGatewayToken, FunnelIdGenerator, FunnelListenerSupervisor, FunnelListenersClient, FunnelLocalConfig, FunnelLocalConfigSync, FunnelLogger, FunnelMcp, FunnelProcessRunner, FunnelProfiles, FunnelSettingsReader, FunnelSettingsStore, FunnelSlackEventProcessor, FunnelTokenPrompter, type GatewayEmitInput, type GatewayRouteDeps, type Env$1 as GatewayServerEnv, GhConnectorConfig, LOCAL_CONFIG_FILENAME, LOCAL_ENV_FILENAME, LaunchOptions, ListListenersResult, ListenerEntry, ListenerOpResult, LocalConfig, LogEntry, MemoryFunnelClock, MemoryFunnelFileSystem, MemoryFunnelIdGenerator, MemoryFunnelLogger, MemoryFunnelProcessRunner, MemoryFunnelTokenPrompter, MemoryProcessCall, MemoryProcessHandler, MemoryProcessResponse, MemoryProcessSyncHandler, MockFunnelSettingsReader, NodeFunnelClock, NodeFunnelFileSystem, NodeFunnelIdGenerator, NodeFunnelLogger, NodeFunnelProcessRunner, NodeFunnelTokenPrompter, NoopFunnelLogger, NotifyFn, ProfileConfig, PublishRequest, PublishResponse, PublishResult, ReplayableEvent, RunOptions, RunResult, SETTINGS_PATH, SETTINGS_VERSION, ScheduleCatchupPolicy, ScheduleConnectorConfig, ScheduleEntry, ScheduleListenerOptions, Settings, SlackConnectorConfig, SlackListenerOptions, SlackProcessed, SlackProcessedEmit, SlackProcessedSkip, SlackRawEvent, channelConfigSchema, channelDeliveryModeSchema, channelSpecSchema, app as cliApp, connectorConfigSchema, connectorSpecSchema, createCliApp, createSettings, discordConnectorSchema, factory, funnelEventSchema, funnelJsonSchema, ghConnectorSchema, launchTui, localConfigSchema, profileConfigSchema, publishRequestSchema, publishResponseSchema, queryToCliArgs, scheduleCatchupPolicySchema, scheduleConnectorSchema, scheduleEntrySchema, settingsSchema, slackConnectorSchema, startChannelServer, toRequest };