colmugx/acp/agent/protocol does not have a README file

    AgentProtocolError

    pub(all) suberror AgentProtocolError {
    NotInitialized(method_name~ : String)
    AlreadyInitialized
    CapabilityDenied(method_name~ : String, capability~ : String)
    AuthenticationRequired(method_name~ : String)
    AuthenticationMethodNotAdvertised(method_id~ : String)
    AuthenticationNotRequired
    AlreadyAuthenticated
    NotAuthenticated
    InvalidEvent(reason~ : String)
    } derive(Eq,
    Debug
    )

    Explicit failures from protocol phase and capability gates.

    AgentAuthenticationState

    pub(all) enum AgentAuthenticationState {
    NotRequired
    AwaitingAuthentication
    Authenticated
    } derive(Eq,
    Debug
    )

    Authentication is explicit state, not an implicit capability fallback.

    AgentProtocolCommand

    pub(all) enum AgentProtocolCommand {
    SendInitialize(result~ :
    InitializeResult
    , accepted~ : Bool)
    DispatchRequest(
    AgentRequest
    )
    DispatchNotification(
    AgentNotification
    )
    Authenticate(method_id~ : String)
    Logout
    CancelSession(session_id~ : String)
    CancelRequest(request_id~ :
    RequestId
    )
    } derive(Eq,
    Debug
    )

    Commands emitted by the pure reducer for a runtime or endpoint adapter. The reducer never executes these commands.

    AgentProtocolConfig

    Immutable information an Agent endpoint advertises during initialization.

    Omitted and Null are preserved so that an endpoint can intentionally advertise that a capability or authentication list is unavailable. Gate checks treat both forms as unsupported.

    AgentProtocolEvent

    pub(all) enum AgentProtocolEvent {
    Request(
    AgentRequest
    )
    Notification(
    AgentNotification
    )
    AuthenticationSucceeded(method_id~ : String)
    LoggedOut
    } derive(Eq,
    Debug
    )

    Inputs accepted by the pure protocol reducer. Runtime effects are represented by commands and completion events; this type performs no I/O.

    AgentProtocolPhase

    pub(all) enum AgentProtocolPhase {
    AwaitingInitialize
    Initialized
    } derive(Eq,
    Debug
    )

    The phase of the Agent-side v1 protocol handshake.

    AgentProtocolStep

    pub(all) struct AgentProtocolStep {
    state : AgentProtocolState
    commands : Array[AgentProtocolCommand]
    } derive(Eq,
    Debug
    )

    State and commands produced by one reducer step.

    agent_protocol_reduce

    fn agent_protocol_reduce(state : AgentProtocolState, event : AgentProtocolEvent) -> AgentProtocolStep raise AgentProtocolError

    Reduce one typed Agent protocol event without performing any I/O.

    agent_protocol_state_new

    fn agent_protocol_state_new(config~ : AgentProtocolConfig) -> AgentProtocolState

    Construct a fresh state for one Agent endpoint.

    Source Files