Skip to main content

plexus_substrate/activations/interactive/
mod.rs

1//! Interactive activation module - demonstrates bidirectional communication
2//!
3//! This activation showcases how to use `StandardBidirChannel` for interactive
4//! workflows with confirmations, prompts, and selection menus.
5//!
6//! # Examples
7//!
8//! ## Using the wizard method
9//!
10//! The wizard method demonstrates a multi-step interactive flow:
11//!
12//! ```text
13//! Client                              Server (wizard method)
14//!   |                                       |
15//!   |<--- WizardEvent::Started ------------|
16//!   |                                       |
17//!   |<--- Request: prompt("name") ---------|
18//!   |---- Response: "my-project" --------->|
19//!   |                                       |
20//!   |<--- WizardEvent::NameCollected ------|
21//!   |                                       |
22//!   |<--- Request: select("template") -----|
23//!   |---- Response: ["minimal"] ---------->|
24//!   |                                       |
25//!   |<--- WizardEvent::TemplateSelected ---|
26//!   |                                       |
27//!   |<--- Request: confirm("Create?") -----|
28//!   |---- Response: true ----------------->|
29//!   |                                       |
30//!   |<--- WizardEvent::Created ------------|
31//!   |<--- WizardEvent::Done ---------------|
32//! ```
33//!
34//! ## MCP Transport Flow
35//!
36//! Over MCP, bidirectional requests work as follows:
37//!
38//! 1. Server sends logging notification with type="request"
39//! 2. Client receives the request data
40//! 3. Client calls `_plexus_respond` tool with request_id and response
41//! 4. Server continues execution with the response
42
43mod activation;
44mod types;
45
46pub use activation::Interactive;
47pub use types::{ConfirmEvent, DeleteEvent, WizardEvent};