My agentic slop goes here. Not intended for anyone else!
1(** Bot execution and lifecycle management *)
2
3type 'env t
4
5(** Create a bot runner *)
6val create :
7 env:'env ->
8 client:Zulip.Client.t ->
9 handler:Bot_handler.t ->
10 'env t
11
12(** Run the bot in real-time mode (using Zulip events API) *)
13val run_realtime : 'env t -> unit
14
15(** Run the bot in webhook mode (for use with bot server) *)
16val run_webhook : 'env t -> unit
17
18(** Process a single webhook event *)
19val handle_webhook :
20 'env t ->
21 webhook_data:Zulip.Error.json ->
22 (Bot_handler.Response.t option, Zulip.Error.t) result
23
24(** Gracefully shutdown the bot *)
25val shutdown : 'env t -> unit