ACPex.Schema.Connection.InitializeRequest (ACPex v0.1.0)
View SourceRequest sent by the client to initialize the ACP connection.
This is the first message sent by the client after spawning the agent process. It establishes the protocol version and exchanges capability information.
Required Fields
protocol_version
- The protocol version (integer, currently 1)
Optional Fields
client_capabilities
- Client capability information (map)meta
- Additional metadata (map)
Example
%ACPex.Schema.Connection.InitializeRequest{
protocol_version: 1,
client_capabilities: %{
"sessions" => %{"new" => true}
}
}
JSON Representation
The struct is encoded with camelCase keys for protocol compliance:
{
"protocolVersion": 1,
"clientCapabilities": {
"sessions": {"new": true}
}
}
Summary
Functions
Creates a changeset for validation.
Types
Functions
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Creates a changeset for validation.
Required Fields
protocol_version
- Must be present and must be an integer
Examples
iex> changeset(%InitializeRequest{}, %{"protocolVersion" => 1})
#Ecto.Changeset<valid?: true, ...>
iex> changeset(%InitializeRequest{}, %{})
#Ecto.Changeset<valid?: false, errors: [protocol_version: {"can't be blank", [validation: :required]}]>