Repository navigation
MCP server and packaging (#66, Part 9) - #74
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 9.2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
76 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Part 9 of #66 (MCP server and packaging): better docs search, a fallback when project docs don't load, and no test files in the npm tarball.
searchDocsmatches the page path and the split words of CamelCase titles. A whole title or file-name word scores 30 (part of one 20), a page whose title words all appear in the query gets +50, and an exact match on the title or file name gets +100.date-pickernow returnsdate-and-time/date-pickerfirst (it wasdate-time-picker), and "Button props" puts Button above SubmitButton. Theonu_get_docclosest-match hint uses the same ranking.loadDocschecks the project docs before using them: the folder exists,index.jsonparses and has sections, and every listed page's.mdis there. If any check fails it writes a warning with the reason to stderr (console.error, never stdout) and loads the bundled docs. An emptyONU_DOCS_DIRcounts as unset. Tests can pass a newbundledoption to point at another bundled folder. README anddocs/guides/ai-assistants.mdmention the fallback.packages/onu/package.jsonfilesexcludes!src/**/*.test.*. The newscripts/check-pack.mjsrunspnpm pack --dry-run --json(the same file listpnpm publishuses) for each published package and fails if a test file would ship. It runs in CI after the Boost check and is listed in AGENTS.md.Skipped ([P] / device check)
Could not reproduce
Behaviour/API changes
loadDocstakes a newbundled?: stringoption. A project docs folder that fails to load no longer crashes the server: it falls back with a stderr warning.Verification
date-pickergavedate-time-picker;Button propsgavesubmit-button), 9.2 (ENOENT / SyntaxError thrown,source: "project"with a missing page,./index.jsonread forONU_DOCS_DIR=""), 9.3 (check-pack.mjslisted@javaabu/onu: src/styles/theme.test.ts).ONU_DOCS_DIR=/nope: 0 bytes on stdout, a warning and then "serving ... (194 pages, bundled)" on stderr.pnpm lint,pnpm format:check,pnpm typecheck: passpnpm --filter @javaabu/onu exec vitest run --maxWorkers=3: 197 files, 2858 passed, 1 skippedpnpm --filter @javaabu/onu-mcp test: 24 passednode scripts/check-docs.mjs: Docs OKpnpm build && pnpm --filter @javaabu/onu size: pass, no budget changesnode scripts/check-pack.mjs,node scripts/boost.mjs --check: pass🤖 Generated with Claude Code