|
Longbridge OpenAPI C++ SDK
|
#include <types.hpp>
One event observed while streaming AgentContext::conversation_streamed or AgentContext::continue_conversation_streamed.
This mirrors the C layer's tagged-union lb_conversation_stream_event_t: kind tells you which one of the payload fields below is populated (all others are std::nullopt; when kind is Ping, none of them are). A plain discriminated struct is used here (rather than std::variant or a JSON library) since neither has any precedent elsewhere in this C++ binding, and this shape converts directly from the C tagged union.
| std::optional<AgentToolFinishedPayload> longbridge::agent::ConversationStreamEvent::agent_tool_finished |
Populated when kind is AgentToolFinished, the delegated Agent's run finishing
| std::optional<AgentToolProgressPayload> longbridge::agent::ConversationStreamEvent::agent_tool_progress |
Populated when kind is AgentToolProgress, the delegated Agent calling one of its own tools
| std::optional<AgentToolStartedPayload> longbridge::agent::ConversationStreamEvent::agent_tool_started |
| std::optional<ChatFinishedPayload> longbridge::agent::ConversationStreamEvent::chat_finished |
Populated when kind is ChatFinished, observed once all Message events for this round have been sent
| std::optional<ChatStartedPayload> longbridge::agent::ConversationStreamEvent::chat_started |
Populated when kind is ChatStarted
| std::optional<ChatTitleUpdatedPayload> longbridge::agent::ConversationStreamEvent::chat_title_updated |
Populated when kind is ChatTitleUpdated, the server auto-generating a short title for the conversation
| std::optional<ContextCompressFinishedPayload> longbridge::agent::ConversationStreamEvent::context_compress_finished |
Populated when kind is ContextCompressFinished, a context-compression pass finishing
| std::optional<ContextCompressStartedPayload> longbridge::agent::ConversationStreamEvent::context_compress_started |
Populated when kind is ContextCompressStarted, a context-compression pass starting
| std::optional<ConversationResponse> longbridge::agent::ConversationStreamEvent::human_interaction_required |
Populated when kind is HumanInteractionRequired, carrying the run's outcome for an interrupted run. Unlike workflow_finished, this is populated instead of (never alongside) workflow_finished for the same run
| ConversationStreamEventKind longbridge::agent::ConversationStreamEvent::kind |
Discriminant, tells you which field below is populated.
| std::optional<MessagePayload> longbridge::agent::ConversationStreamEvent::message |
Populated when kind is Message
| std::optional<NodeToolUseFinishedPayload> longbridge::agent::ConversationStreamEvent::node_tool_use_finished |
Populated when kind is NodeToolUseFinished, an ordinary tool call ending
| std::optional<NodeToolUseStartedPayload> longbridge::agent::ConversationStreamEvent::node_tool_use_started |
Populated when kind is NodeToolUseStarted, an ordinary tool call starting
| std::optional<std::string> longbridge::agent::ConversationStreamEvent::other_event |
Populated when kind is Other; the SSE envelope's event field (the event type name)
| std::optional<std::string> longbridge::agent::ConversationStreamEvent::other_json |
Populated when kind is Other; raw JSON of an event type not recognized by this SDK version
| std::optional<PlanChangedPayload> longbridge::agent::ConversationStreamEvent::plan_changed |
Populated when kind is PlanChanged, the Agent creating or updating its task plan
| std::optional<QueryMaskedPayload> longbridge::agent::ConversationStreamEvent::query_masked |
Populated when kind is QueryMasked, sensitive content in the user query having been masked before processing
| std::optional<SubagentFinishedPayload> longbridge::agent::ConversationStreamEvent::subagent_finished |
Populated when kind is SubagentFinished, the subagent finishing its sub-task
| std::optional<SubagentProgressPayload> longbridge::agent::ConversationStreamEvent::subagent_progress |
Populated when kind is SubagentProgress, the subagent calling one of its own tools
| std::optional<SubagentStartedPayload> longbridge::agent::ConversationStreamEvent::subagent_started |
Populated when kind is SubagentStarted, the Agent spawning a subagent to work on a sub-task
| std::optional<ThinkingFinishedPayload> longbridge::agent::ConversationStreamEvent::thinking_finished |
Populated when kind is ThinkingFinished, the reasoning phase ending
| std::optional<ThinkingStartedPayload> longbridge::agent::ConversationStreamEvent::thinking_started |
Populated when kind is ThinkingStarted, the Agent entering the reasoning phase
| std::optional<ConversationResponse> longbridge::agent::ConversationStreamEvent::workflow_finished |
Populated when kind is WorkflowFinished, carrying the run's outcome — not necessarily the last event of the stream, since the server may still emit a few more housekeeping events before actually closing the connection. Never populated for an interrupted run — see human_interaction_required for that case
| std::optional<WorkflowStartedPayload> longbridge::agent::ConversationStreamEvent::workflow_started |
Populated when kind is WorkflowStarted, observed right after ChatStarted on every run seen so far