docmd-assistant v0.1.17 makes the assistant engine fully universal and site-agnostic, adds targeted version and subproject search filtering, introduces token-economy content capping for large documentation pages, strengthens context window boundaries, and improves network error resilience.
Key Features & Enhancements
Universal & Site-Agnostic System Prompt
- Authentic Knowledge Discovery: Replaced hardcoded configuration assumptions with a universal, site-agnostic prompt. Rather than presuming specific configuration schemas, the assistant dynamically discovers and grounds its answers using available tools (
search_documentation,read_documentation_page). This ensures it functions naturally across any documentation website, personal blog, or technical guide. - Consistent Assistant Identity: Preserves the core “docmd assistant” persona as a helpful AI guide dedicated to the site, answering within the boundaries of available content.
Version & Project Filtered Search
- Targeted Version Filtering: Extended the
search_documentationtool schema with optionalversion(e.g."0.9.0","0.8.0","latest") andprojectparameters, allowing multi-version and multi-project doc sites to target specific archives directly. - Custom Delegate Passthrough: Custom search providers passed to
createStandardToolsnow receive(query, project, version)arguments for granular index querying.
Smart Content Capping & Context Window Safeguards
- DOM Reader Token Economy: Added an 8,000-character ceiling with a clean continuation indicator (
...[content capped for token economy]) inread_documentation_page. This protects LLM context limits from oversized API specifications while retaining essential explanatory text and code examples. - Context Window Safeguard Floor: Configured a 1,000-character minimum floor on
contextWindowoptions, preventing accidental micro-truncation from discarding retrieved documentation context.
Resilient Network Error Handling
- Actionable Network Messages: Intercepts low-level browser network failures (
Failed to fetch,Load failed) in both streaming and non-streaming modes and returns clear, user-friendly diagnostics. - Clean Abort Handling: Gracefully handles cancelled requests and
AbortErrorwithout polluting runtime logs.
Resolved Issues
- Universal Retrieval: Resolved an issue where hardcoded configuration rules in the default prompt caused the assistant to assume
docmd.config.jsonstructures instead of dynamically retrieving the current site’s documented configuration. - Version Query Precision: Fixed an issue where versioned queries (e.g. asking for specific historical release notes) could not constrain search scope to a designated version bucket.
Upgrade
npm
pnpm
npm install docmd-assistant@0.1.17
pnpm add docmd-assistant@0.1.17