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

docmd-assistant v0.1.15 hardens LLM output sanitization, prevents accidental stripping of documentation JSON snippets and code blocks, and enforces strict tool registration gating during autonomous execution loops.

Key Features & Enhancements

Strict Tool Registration & Name Validation

  • Registered Tool Gating: Tool parser (parseAssistantOutput) and execution loops (DocmdAssistantEngine) now strictly validate tool names against registered tools (knownToolNames / this.tools).
  • Markdown JSON Codeblock Preservation: JSON objects containing a "name" property (such as package.json, configuration examples, or OpenAPI schemas) are preserved as documentation content rather than falsely parsed and stripped as tool calls.
  • Prose Keyword Protection: Hardened bracket and tag extraction to require explicit invocation formatting, preventing natural English sentences starting with Action:, Call:, or Tool: from being stripped from the response text.

Autonomous Loop Stability & Graceful Fallback

  • Unregistered Tool Prevention: Execution loops now filter tool calls to ensure only tools actually registered on the engine are executed, preventing “Tool not registered” loops.
  • Graceful Multi-Turn Termination: If the multi-turn autonomous execution loop reaches maxTurns (5), the engine safely returns the latest generated clean response text rather than falling back to an empty string.

Resolved Issues

  • AI Chat Response Stripping: Resolved an issue where documentation code snippets containing "name" caused the assistant to respond with "No response generated." after search retrieval.
  • Tool Parsing False Positives: Fixed accidental stripping of natural prose containing Action: or Tool: keywords.

Upgrade

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