v0.9.4 is live! — Read the latest technical documentation and migration guides.

docmd-assistant v0.1.11 brings critical stability and reliability enhancements to the multi-turn autonomous tool execution loop, context-grounded response synthesis, non-streaming JSON fallback parsing, and keyword-first search decomposing.

Key Features & Enhancements

Multi-Turn Autonomous Tool Loop Stabilization

The relay streaming and standard HTTP execution loops (runRelayStreamLoop and runRelayLoop) have been re-architected for deterministic multi-turn tool execution:

  • Original Query Preservation: The user’s original query is explicitly tracked and maintained in the conversation history across all intermediate tool executions, ensuring the synthesis turn grounds its answer on the true user intent.
  • Context-Grounded Synthesis Turn: When local tools (e.g. search_documentation) execute, the retrieved documentation chunks are cleanly formatted and injected into a dedicated synthesis turn that instructs the LLM to provide a direct, comprehensive Markdown answer with clickable links.
  • Tool-Calling Loop Termination: Tool definitions are explicitly deactivated during the final synthesis turn to eliminate infinite tool loops and force immediate text output.

HTTP Stream & JSON Parsing Resiliency

Eliminated intermittent “No response returned” errors when interacting with serverless or proxy relay backends:

  • Protocol Fallback: When a relay endpoint returns a standard JSON payload rather than a Server-Sent Events (text/event-stream) stream, the reader automatically falls back to full-body parsing.
  • Buffer Recovery: The stream parser includes secondary buffer flushing to ensure complete message assembly even if the network connection terminates abruptly.

Keyword-First Search Query Decomposition

  • Refined system prompt guidance and tool calling instructions to decompose natural language queries into targeted, high-precision search keywords (e.g., "install", "config", "cli") to maximize match accuracy on static site documentation indexes.

Enhanced Output Sanitizer Recovery

  • Hardened cleanAssistantReply and parseAssistantOutput to gracefully recover text if the model generates reasoning blocks (<think>) without separate markdown content, preventing empty bubbles from reaching the chat UI.

Upgrade

npm
pnpm
npm install docmd-assistant@0.1.11
pnpm add docmd-assistant@0.1.11