Expand description
Db2 client: NetGet speaks DRDA to IBM Db2 or Apache Derby and the model decides what SQL to
run. See AGENTS.md beside this file.
Two tasks per connection, both registered with the client so stop_client ends them:
- the session owns the socket. It runs the handshake before
connectreturns, then executes one action at a time — the model’s, or one injected from the dashboard or MCP — as a DRDA request and its whole reply, and turns the reply into an event. - the turns task asks the model about each event and hands the actions it answers with
back to the session. Each event carries the number of model turns that led to it; past
MAX_FOLLOWUP_DEPTHthe model is not asked again.
Fail closed: a refused login fails connect and the model is never asked anything; an LLM
failure sends nothing; a reply this client cannot read, a timeout or a server that hangs up
ends the connection with an error rather than inventing a result.
Re-exports§
pub use actions::Db2ClientProtocol;
Modules§
- actions
- Db2 (DRDA) client: what the model is told and what it may do.
- wire
- DRDA in the requesting role: the Db2 client’s codec.
Structs§
- Conn
- One DRDA connection, after or during the handshake.
- Server
Info - What the server said about itself during the handshake.
Constants§
- DEFAULT_
AUTOCOMMIT - DEFAULT_
PORT - The port a remote address without one is given: Db2’s default instance port.
- DEFAULT_
PRODUCT_ ID - Apache Derby admits only product ids containing its own client’s
DNC; Db2 accepts any. - MAX_
FOLLOWUP_ DEPTH - How many model turns may follow from one another before the chain stops.
- REPLY_
TIMEOUT - How long a whole reply may take. A statement can wait on a lock (Derby’s default lock timeout is a minute), so this is generous; past it the connection is given up.
Functions§
Type Aliases§
- Done
- What one action produced: the event to raise.