@interactive-inc/claude-funnel 0.24.0 → 0.25.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
@@ -151,9 +151,6 @@ declare const channelConfigSchema: z.ZodObject<{
151
151
  fanout: "fanout";
152
152
  exclusive: "exclusive";
153
153
  }>>;
154
- options: z.ZodDefault<z.ZodArray<z.ZodString>>;
155
- env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
156
- resume: z.ZodDefault<z.ZodBoolean>;
157
154
  connectors: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
158
155
  id: z.ZodString;
159
156
  name: z.ZodString;
@@ -201,6 +198,9 @@ declare const profileConfigSchema: z.ZodObject<{
201
198
  name: z.ZodString;
202
199
  path: z.ZodString;
203
200
  channelId: z.ZodString;
201
+ options: z.ZodDefault<z.ZodArray<z.ZodString>>;
202
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
203
+ resume: z.ZodDefault<z.ZodBoolean>;
204
204
  }, z.core.$strip>;
205
205
  type ProfileConfig = z.infer<typeof profileConfigSchema>;
206
206
  declare const SETTINGS_VERSION = 1;
@@ -213,9 +213,6 @@ declare const settingsSchema: z.ZodObject<{
213
213
  fanout: "fanout";
214
214
  exclusive: "exclusive";
215
215
  }>>;
216
- options: z.ZodDefault<z.ZodArray<z.ZodString>>;
217
- env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
218
- resume: z.ZodDefault<z.ZodBoolean>;
219
216
  connectors: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
220
217
  id: z.ZodString;
221
218
  name: z.ZodString;
@@ -262,6 +259,9 @@ declare const settingsSchema: z.ZodObject<{
262
259
  name: z.ZodString;
263
260
  path: z.ZodString;
264
261
  channelId: z.ZodString;
262
+ options: z.ZodDefault<z.ZodArray<z.ZodString>>;
263
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
264
+ resume: z.ZodDefault<z.ZodBoolean>;
265
265
  }, z.core.$strip>>>;
266
266
  }, z.core.$strip>;
267
267
  type Settings = z.infer<typeof settingsSchema>;
@@ -324,14 +324,8 @@ declare class FunnelChannels {
324
324
  add(input: {
325
325
  name: string;
326
326
  delivery?: ChannelDeliveryMode;
327
- options?: string[];
328
- env?: Record<string, string>;
329
- resume?: boolean;
330
327
  }): ChannelConfig;
331
328
  setDelivery(name: string, delivery: ChannelDeliveryMode): void;
332
- setResume(name: string, resume: boolean): void;
333
- setOptions(name: string, options: string[]): void;
334
- setEnv(name: string, env: Record<string, string>): void;
335
329
  remove(name: string): void;
336
330
  rename(oldName: string, newName: string): void;
337
331
  listConnectors(channelName: string): ConnectorConfig[];
@@ -447,7 +441,10 @@ type LaunchOptions = {
447
441
  channel: string;
448
442
  cwd?: string;
449
443
  userArgs?: string[];
450
- profileName?: string;
444
+ profileName?: string; /** Args prepended to the claude argv (typically a profile's recipe). Defaults to none. */
445
+ options?: string[]; /** Env vars layered under the launched claude process. process.env wins on collision. */
446
+ env?: Record<string, string>; /** Whether to inject a `--session-id`/`--resume` for the (channel, cwd). Defaults to true. */
447
+ resume?: boolean;
451
448
  /** Invoked synchronously after the child claude process has been spawned, with its PID.
452
449
  * Useful for hosts that need to register the spawned process before it exits
453
450
  * (e.g. multi-session registries that track per-claude liveness). */
@@ -559,9 +556,6 @@ declare const connectorSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
559
556
  type ConnectorSpec = z.infer<typeof connectorSpecSchema>;
560
557
  declare const channelSpecSchema: z.ZodObject<{
561
558
  name: z.ZodString;
562
- options: z.ZodOptional<z.ZodArray<z.ZodString>>;
563
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
564
- resume: z.ZodOptional<z.ZodBoolean>;
565
559
  connectors: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
566
560
  type: z.ZodLiteral<"slack">;
567
561
  name: z.ZodString;
@@ -589,13 +583,18 @@ declare const channelSpecSchema: z.ZodObject<{
589
583
  }, z.core.$strip>], "type">>>;
590
584
  }, z.core.$strip>;
591
585
  type ChannelSpec = z.infer<typeof channelSpecSchema>;
586
+ declare const profileSpecSchema: z.ZodObject<{
587
+ name: z.ZodString;
588
+ channel: z.ZodString;
589
+ options: z.ZodOptional<z.ZodArray<z.ZodString>>;
590
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
591
+ resume: z.ZodOptional<z.ZodBoolean>;
592
+ }, z.core.$strip>;
593
+ type ProfileSpec = z.infer<typeof profileSpecSchema>;
592
594
  declare const localConfigSchema: z.ZodObject<{
593
595
  $schema: z.ZodOptional<z.ZodString>;
594
596
  channels: z.ZodArray<z.ZodObject<{
595
597
  name: z.ZodString;
596
- options: z.ZodOptional<z.ZodArray<z.ZodString>>;
597
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
598
- resume: z.ZodOptional<z.ZodBoolean>;
599
598
  connectors: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
600
599
  type: z.ZodLiteral<"slack">;
601
600
  name: z.ZodString;
@@ -622,6 +621,13 @@ declare const localConfigSchema: z.ZodObject<{
622
621
  name: z.ZodString;
623
622
  }, z.core.$strip>], "type">>>;
624
623
  }, z.core.$strip>>;
624
+ profiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
625
+ name: z.ZodString;
626
+ channel: z.ZodString;
627
+ options: z.ZodOptional<z.ZodArray<z.ZodString>>;
628
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
629
+ resume: z.ZodOptional<z.ZodBoolean>;
630
+ }, z.core.$strip>>>;
625
631
  }, z.core.$strip>;
626
632
  type LocalConfig = z.infer<typeof localConfigSchema>;
627
633
  declare const LOCAL_CONFIG_FILENAME = "funnel.json";
@@ -714,9 +720,10 @@ type Deps$8 = {
714
720
  };
715
721
  /**
716
722
  * Named launch presets for `fnl claude`. Each profile bundles a working
717
- * directory, a sub-agent name, and the channel id its Claude instance will
718
- * subscribe to. Implements ProfileChannelChecker so FunnelChannels can refuse
719
- * to remove a channel that is still referenced.
723
+ * directory, the channel id its Claude instance subscribes to, and the launch
724
+ * recipe (`options` prepended to the claude argv, `env` layered under the
725
+ * process, `resume` toggling session reuse). Implements ProfileChannelChecker
726
+ * so FunnelChannels can refuse to remove a channel that is still referenced.
720
727
  *
721
728
  * The first entry in the persisted array is treated as the default profile;
722
729
  * `asDefault` reorders the array to put a named profile first.
@@ -730,7 +737,14 @@ declare class FunnelProfiles {
730
737
  list(): ProfileConfig[];
731
738
  get(name: string): ProfileConfig | null;
732
739
  getDefault(): ProfileConfig | null;
733
- add(config: ProfileConfig): void;
740
+ add(input: {
741
+ name: string;
742
+ path: string;
743
+ channelId: string;
744
+ options?: string[];
745
+ env?: Record<string, string>;
746
+ resume?: boolean;
747
+ }): void;
734
748
  remove(name: string): void;
735
749
  rename(oldName: string, newName: string): void;
736
750
  asDefault(name: string): void;
@@ -1480,8 +1494,8 @@ declare const startChannelServer: (options?: ChannelServerOptions) => Promise<vo
1480
1494
  /**
1481
1495
  * Generates the JSON Schema (draft 2020-12) for `funnel.json`. Useful for
1482
1496
  * `$schema` references in committed `funnel.json` files so editors can give
1483
- * autocomplete and validation for channel / subAgent / env / connectors[]
1484
- * without anyone hand-maintaining a separate schema.
1497
+ * autocomplete and validation for channels[] (transport) and profiles[]
1498
+ * (launch recipe) without anyone hand-maintaining a separate schema.
1485
1499
  */
1486
1500
  declare const funnelJsonSchema: () => Record<string, unknown>;
1487
1501
  //#endregion
@@ -2537,6 +2551,11 @@ declare const createCliApp: (funnel: Funnel) => _$hono_hono_base0.HonoBase<Env,
2537
2551
  query: {
2538
2552
  path: string;
2539
2553
  channel: string;
2554
+ agent?: string | undefined;
2555
+ options?: string | undefined;
2556
+ env?: string | undefined;
2557
+ resume?: string | undefined;
2558
+ "no-resume"?: string | undefined;
2540
2559
  };
2541
2560
  };
2542
2561
  output: string;
@@ -2551,6 +2570,11 @@ declare const createCliApp: (funnel: Funnel) => _$hono_hono_base0.HonoBase<Env,
2551
2570
  query: {
2552
2571
  path: string;
2553
2572
  channel: string;
2573
+ agent?: string | undefined;
2574
+ options?: string | undefined;
2575
+ env?: string | undefined;
2576
+ resume?: string | undefined;
2577
+ "no-resume"?: string | undefined;
2554
2578
  };
2555
2579
  };
2556
2580
  output: `added profile "${string}"`;
@@ -2578,6 +2602,11 @@ declare const createCliApp: (funnel: Funnel) => _$hono_hono_base0.HonoBase<Env,
2578
2602
  query: {
2579
2603
  path?: string | undefined;
2580
2604
  channel?: string | undefined;
2605
+ agent?: string | undefined;
2606
+ options?: string | undefined;
2607
+ env?: string | undefined;
2608
+ resume?: string | undefined;
2609
+ "no-resume"?: string | undefined;
2581
2610
  };
2582
2611
  };
2583
2612
  output: string;
@@ -2592,6 +2621,11 @@ declare const createCliApp: (funnel: Funnel) => _$hono_hono_base0.HonoBase<Env,
2592
2621
  query: {
2593
2622
  path?: string | undefined;
2594
2623
  channel?: string | undefined;
2624
+ agent?: string | undefined;
2625
+ options?: string | undefined;
2626
+ env?: string | undefined;
2627
+ resume?: string | undefined;
2628
+ "no-resume"?: string | undefined;
2595
2629
  };
2596
2630
  };
2597
2631
  output: `updated profile "${string}"`;
@@ -3818,6 +3852,11 @@ declare const app: _$hono_hono_base0.HonoBase<Env, {
3818
3852
  query: {
3819
3853
  path: string;
3820
3854
  channel: string;
3855
+ agent?: string | undefined;
3856
+ options?: string | undefined;
3857
+ env?: string | undefined;
3858
+ resume?: string | undefined;
3859
+ "no-resume"?: string | undefined;
3821
3860
  };
3822
3861
  };
3823
3862
  output: string;
@@ -3832,6 +3871,11 @@ declare const app: _$hono_hono_base0.HonoBase<Env, {
3832
3871
  query: {
3833
3872
  path: string;
3834
3873
  channel: string;
3874
+ agent?: string | undefined;
3875
+ options?: string | undefined;
3876
+ env?: string | undefined;
3877
+ resume?: string | undefined;
3878
+ "no-resume"?: string | undefined;
3835
3879
  };
3836
3880
  };
3837
3881
  output: `added profile "${string}"`;
@@ -3859,6 +3903,11 @@ declare const app: _$hono_hono_base0.HonoBase<Env, {
3859
3903
  query: {
3860
3904
  path?: string | undefined;
3861
3905
  channel?: string | undefined;
3906
+ agent?: string | undefined;
3907
+ options?: string | undefined;
3908
+ env?: string | undefined;
3909
+ resume?: string | undefined;
3910
+ "no-resume"?: string | undefined;
3862
3911
  };
3863
3912
  };
3864
3913
  output: string;
@@ -3873,6 +3922,11 @@ declare const app: _$hono_hono_base0.HonoBase<Env, {
3873
3922
  query: {
3874
3923
  path?: string | undefined;
3875
3924
  channel?: string | undefined;
3925
+ agent?: string | undefined;
3926
+ options?: string | undefined;
3927
+ env?: string | undefined;
3928
+ resume?: string | undefined;
3929
+ "no-resume"?: string | undefined;
3876
3930
  };
3877
3931
  };
3878
3932
  output: `updated profile "${string}"`;
@@ -4317,4 +4371,4 @@ ${string}`;
4317
4371
  //#region lib/tui/tui.d.ts
4318
4372
  declare function launchTui(funnel: Funnel): Promise<void>;
4319
4373
  //#endregion
4320
- export { AliveStub, AttachOptions, BroadcastEvent, BroadcastSubscriber, ChannelConfig, ChannelConnectorView, ChannelDeliveryMode, ChannelServerOptions, ChannelSpec, ConnectorConfig, ConnectorSpec, ConnectorSyncOutcome, 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, FunnelSessions, 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, LocalConfigSyncResult, LogEntry, MemoryFunnelClock, MemoryFunnelFileSystem, MemoryFunnelIdGenerator, MemoryFunnelLogger, MemoryFunnelProcessRunner, MemoryFunnelTokenPrompter, MemoryProcessCall, MemoryProcessHandler, MemoryProcessResponse, MemoryProcessSyncHandler, MockFunnelSettingsReader, NodeFunnelClock, NodeFunnelFileSystem, NodeFunnelIdGenerator, NodeFunnelLogger, NodeFunnelProcessRunner, NodeFunnelTokenPrompter, NoopFunnelLogger, NotifyFn, OnFunnelError, ProcessListStub, ProcessSnapshot, 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 };
4374
+ export { AliveStub, AttachOptions, BroadcastEvent, BroadcastSubscriber, ChannelConfig, ChannelConnectorView, ChannelDeliveryMode, ChannelServerOptions, ChannelSpec, ConnectorConfig, ConnectorSpec, ConnectorSyncOutcome, 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, FunnelSessions, 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, LocalConfigSyncResult, LogEntry, MemoryFunnelClock, MemoryFunnelFileSystem, MemoryFunnelIdGenerator, MemoryFunnelLogger, MemoryFunnelProcessRunner, MemoryFunnelTokenPrompter, MemoryProcessCall, MemoryProcessHandler, MemoryProcessResponse, MemoryProcessSyncHandler, MockFunnelSettingsReader, NodeFunnelClock, NodeFunnelFileSystem, NodeFunnelIdGenerator, NodeFunnelLogger, NodeFunnelProcessRunner, NodeFunnelTokenPrompter, NoopFunnelLogger, NotifyFn, OnFunnelError, ProcessListStub, ProcessSnapshot, ProfileConfig, ProfileSpec, 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, profileSpecSchema, publishRequestSchema, publishResponseSchema, queryToCliArgs, scheduleCatchupPolicySchema, scheduleConnectorSchema, scheduleEntrySchema, settingsSchema, slackConnectorSchema, startChannelServer, toRequest };