NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
types.h File Reference

Core data types for the Agent Client Protocol (ACP). More...

#include <neograph/api.h>
#include <neograph/json.h>
#include <optional>
#include <string>
#include <vector>
Include dependency graph for types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  neograph::acp::AgentCapabilities
 Capabilities advertised in InitializeResponse. More...
 
struct  neograph::acp::ClientCapabilities
 Capabilities advertised by the editor in InitializeRequest. More...
 
struct  neograph::acp::FsCapabilities
 File-system access methods the client offers (agent→client direction). More...
 
struct  neograph::acp::InitializeRequest
 Sent once by the editor when the connection comes up. More...
 
struct  neograph::acp::McpCapabilities
 MCP server transports the agent supports (stdio is implicit / required). More...
 
struct  neograph::acp::McpServerConfig
 Single MCP server entry attached to the session. More...
 
struct  neograph::acp::PromptCapabilities
 Capabilities the agent advertises about which prompt content it accepts. More...
 
struct  neograph::acp::SessionCapabilities
 Optional session-management features the agent supports. More...
 
struct  neograph::acp::SessionUpdate
 Streaming event the agent sends while a prompt is in flight. More...
 

Enumerations

enum class  neograph::acp::PermissionOutcomeKind
 The user's decision (or absence thereof). More...
 
enum class  neograph::acp::StopReason {
  EndTurn , MaxTokens , MaxTurnRequests , Refusal ,
  Cancelled
}
 Why the agent stopped responding for this turn. More...
 

Detailed Description

Core data types for the Agent Client Protocol (ACP).

ACP standardises editor↔agent communication the way LSP standardised editor↔language-server communication: JSON-RPC over stdio (local agents) or HTTP/WebSocket (remote). NeoGraph implements the agent side — exposing a compiled graph as an ACP server that an editor like Zed or Neovim can drive.

Spec: https://agentclientprotocol.com/protocol/schema.md

Coverage in this header:

  • Capabilities (Agent / Client / Prompt / Mcp / Fs)
  • Initialize request / response
  • ContentBlock variants (text / image / audio / resource_link / resource)
  • session/new and session/prompt request/response shapes
  • SessionNotification (session/update streamed by the agent)
  • StopReason
  • CancelNotification

Deferred (modelled as free-form json for forward-compat): session/load, session/resume, session/list, session/close, session/set_config_option, session/set_mode, fs/&#42; and terminal/&#42; (these are agent→client requests — added when the engine wants to use them). The wildcards are HTML-entity-escaped because the literal slash-star token opens a nested comment inside this Doxygen block — backticks and backslash escape don't help (the tokenizer runs before markdown, and \ renders literally). HTML entities are the cleanest source-and-render fix.

Definition in file types.h.

Enumeration Type Documentation

◆ PermissionOutcomeKind

The user's decision (or absence thereof).

  • Selected : the editor surfaced the prompt and the user picked one.
  • Cancelled : the prompt was dismissed before the user answered (typically because the prompt turn was cancelled).

Definition at line 284 of file types.h.

◆ StopReason

enum class neograph::acp::StopReason
strong

Why the agent stopped responding for this turn.

Values mirror the official ACP schema (zed-industries/agent-client-protocol, schema/schema.json: StopReason). Stop reasons that don't apply to NeoGraph today (max_tokens, max_turn_requests, refusal) are modelled so consumers can still round-trip them through to_json / from_json without loss; the runtime only ever emits EndTurn or Cancelled in the baseline server.

Enumerator
EndTurn 

"end_turn" — turn finished normally.

MaxTokens 

"max_tokens" — model hit the token cap.

MaxTurnRequests 

"max_turn_requests" — agent reached its turn-request budget.

Refusal 

"refusal" — agent refused to continue.

Cancelled 

"cancelled" — cancelled via session/cancel.

Definition at line 181 of file types.h.