Repository navigation
Added
llm_hosted_agentendpoint: the provider runs the tool and MCP loop. One request per message to OpenAI's Responses API (also Azure, xAI, etc) or Anthropic's Messages API with its MCP connector;mcp_serverslists the remote servers the model may call. The answer is the final text, or withanswer: fullthe whole response. A failed, incomplete or refused response fails its message. Amazon Bedrock Agents is not supported; Bedrock models work throughopenai_chatandllm_agent.llm_agentendpoint: mq-bridge runs the tool loop itself. Tools are endpoints that answer (tools) or the tools of MCP servers, over Streamable HTTP (url) or as a local process over stdio (command). Speaks the OpenAI Responses API, Anthropic Messages and Chat Completions (Ollama, vLLM, Groq, Bedrock, the Gemini and Cohere compatibility APIs). The history stays in the provider's format, so reasoning and thinking blocks go back unchanged. A failing tool answers the model with an error;max_roundsbounds the loop; the answer carriesllm_roundsand token counts. Featurellm-agent(rmcp 3.12 as MCP client), in the full plugin. The app's MCP server moves to rmcp 3.12 as well.Bridge: named instances for embedding applications. Routes, publishers, callers,refendpoints and in-process topics get their own namespace, so two parts of an application can use the same names. An optionalPolicyHookapproves every endpoint, nested ones included, before it is used, and an optionalAuditSinkreceives lifecycle events. This separates names and is not a security boundary. The top-level API is unchanged.- Applications can install their own sqlx drivers. SQL endpoints panicked if the application had already called
sqlx::any::install_drivers(). Callmq_bridge::endpoints::sqlx::use_host_sqlx_drivers()first, and mq-bridge leaves the drivers alone. - Delivery contract for built-in and plugin endpoints.
mq_bridge::test_utils::contract(featuretest-utils) runs one check catalog against any endpoint and reports every check as passed, failed or skipped. It adds parallel sends with rejects, reconnects, batch sizes, writes before a consumer exists, repeated open and close, payload fidelity, a large backlog and sink-only targets.scripts/contract.shruns it per broker and removes the containers. - Process scenarios for any endpoint. The CLI suite runs SIGTERM,
kill -9and broker restart scenarios against a plugin throughMQB_TEST_PLUGINandMQB_TEST_TARGET, and against anothermqbbuild throughMQB_TEST_BIN. StreamCaller: request/reply with a streamed answer. It sends a request to anopenai_chatorhttp_bulkendpoint withstream_toand reads that request's tokens. A reply always ends with one last token, a retried attempt does not end it, and dropping an unfinished reply cancels the request. One caller serves parallel requests under different correlation ids.StreamTokenreads and writes themqb.stream.*format.Publisher::blocking_sendsends from a plain OS thread and returns once the message was accepted.- Named outputs for blocking handlers.
ThreadedHandler::builderdeclares a handler'sPublishers, andctx.output(name)reads them. Unlikectx.emit, they add nocorrelation_id, so a cancel does not skip what they send. Topologywires routes up in one place. It starts them in declaration order, stops them in reverse or in an explicit order, cleans up after a failed start and names the failing route.stop()leaves a route alone that was deployed again since.diagram()shows each route with its handler's declared outputs.Route::handled_by(input, handler)declares a route that ends in its handler, without a placeholderEndpoint::null()output.http_bulkqueries log token usage. AtDEBUG, each non-streaming response with an OpenAI-styleusagelogsprompt_tokens,cached_tokensandcompletion_tokens.
Changed
sqlx: a${payload:x}integer above theBIGINTrange keeps every digit. It was bound as a float and silently rounded. It now binds as text, ascolumns: autoalready does. A query writing such a value into a PostgreSQLfloat8ornumericcolumn without a cast now fails with error42804; writeCAST(${payload:x} AS numeric)there.- The minimum Rust version is 1.91, up from 1.89: amq-protocol 10.8 and newer need it.
link-dynamic/full-dynamicneeds librdkafka 2.16.0 or newer. rdkafka-sys moves to 4.11 (bundled librdkafka 2.16.0), and its build script now probes pkg-config for librdkafka >= 2.16.0. A build against an older system or conda-forge librdkafka fails; update librdkafka there first. rdkafka itself stays at 0.39: 0.40 would force every crate that uses rdkafka next to mq-bridge to move as well, since only one librdkafka can be linked. A project whoseCargo.lockstill pins rdkafka-sys 4.10 fails to resolve ("failed to select a version forrdkafka-sys") when it upgrades mq-bridge; runcargo update -p rdkafka-sysfirst (likewisecargo update -p uuidfor apache-avro's uuid 1.29 floor), or plaincargo update. Also bumps async-nats 0.53, apache-avro 0.23 and omq-tokio 0.39. async-nats now refuses a server that offers no TLS whentls.requiredis set, before the handshake instead of during it. The re-exportmq_bridge::async_natsfollows: code that mixes it with its ownasync-nats = "0.52"must move to 0.53 as well.
Fixed
ThreadedHandlerno longer runs a queued message whose caller gave up. After a timeout or an aborted route, the message ran anyway and then again when it was redelivered.openai_chat: asystemprompt that names its own answer format no longer breaksmessages_per_request. The model followed that format instead of theanswersarray, so a bundle of 15 messages was split into 12 requests and could lose a message. A bundle now sends ajson_schemawith one numbered entry per input, and each entry's field isresult. A server that refuses the schema needs anotherresponse_formatinoptions, e.g.{ type: text }.openai_chat: a bundle keeps the answers it got. A response with missing entries used to be discarded and asked again in halves. Now only the missing messages are asked again.sledoutput anddeduplication: concurrent sends no longer hang. Concurrentflush_asynccalls deadlock in sled 0.34, so a route could stop for good without an error. The flush now runs on a blocking thread.ibmmqinput: a partly filled batch no longer stalls. An empty queue did not end the batch, so each remaining slot waitedwait_timeout_msagain. With the defaults, one message could take over 8 minutes to arrive. The batch now ends at the first empty wait.
What's Changed
- update deny.toml by @marcomq in #208
- Add sugar, add llm_agent and mcp, apply fixes by @marcomq in #209
See CHANGELOG.md for details.
Full Changelog: v1.6.2...v1.7.0