Skip to content

fix: ship docs files that searchDocs reads at runtime - #445

Merged
jimhoyd merged 1 commit into
mainfrom
claude/beautiful-matsumoto-936528
Sep 22, 2026
Merged

jimhoyd merged 1 commit into
mainfrom
claude/beautiful-matsumoto-936528

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • agent-context.ts's searchDocs (used by urlcode docs search and the MCP search_docs tool) reads docs/AI-AUTHORING.md, docs/YAML-REFERENCE.md, docs/TOOLING.md and docs/FUNCTION-SECURITY.md from the package root, but package.json's files field never listed docs/, so every installed copy of @jimhoyd/urlcode threw "Required file or directory not found" instead of returning results.
  • Ship just those four files (not the rest of docs/, which would nearly triple the package size and blow scripts/package-audit.ts's release budgets), and raise the packed/unpacked/entry budgets to cover the real measured growth, including docs/README.md, which npm always includes once anything under docs/ is packed.
  • Added test/docs-search-package.test.ts, which packs and installs the real tarball and runs urlcode docs search against it, following the pattern test/llms-txt-links.test.ts used for the adjacent [Bug]: Packaged llms.txt contradicts store short-link support and links unshipped docs #439 fix.

Test plan

  • npm run typecheck
  • npm run lint
  • npm run check (docs + code checks)
  • npm test (724 tests, all passing)
  • npm run test:package (package-audit + package-smoke, both passing)

🤖 Generated with Claude Code

agent-context.ts's searchDocs (used by `urlcode docs search` and the
MCP search_docs tool) reads docs/AI-AUTHORING.md, docs/YAML-REFERENCE.md,
docs/TOOLING.md and docs/FUNCTION-SECURITY.md from the package root, but
package.json's "files" field never listed docs/, so every installed copy
of @jimhoyd/urlcode threw "Required file or directory not found" instead
of returning results.

Ship just those four files (not the rest of docs/, which would nearly
triple the package size and blow scripts/package-audit.ts's release
budgets) and raise the packed/unpacked/entry budgets to cover the real
measured growth, including docs/README.md, which npm always includes
once anything under docs/ is packed.

Added test/docs-search-package.test.ts, which packs and installs the
real tarball and runs `urlcode docs search` against it, following the
pattern test/llms-txt-links.test.ts used for the adjacent #439 fix.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@jimhoyd
jimhoyd force-pushed the claude/beautiful-matsumoto-936528 branch from 850fe8b to 9f6178a Compare September 22, 2026 13:40
@jimhoyd
jimhoyd merged commit e994127 into main Sep 22, 2026
60 checks passed
@jimhoyd
jimhoyd deleted the claude/beautiful-matsumoto-936528 branch September 22, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant