npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@openge/forge-repository-context

v2.0.4

Published

Deterministic repository context planning and validation primitives

Readme

@openge/forge-repository-context

Deterministic, model-free repository evidence for bounded code investigation.

Use it when a tool needs repeatable scoped candidates, verified source windows, or explicit relation evidence. When the exact file is known, use read directly if verified source is needed. Skip repository search in that case, and use other tools for IDE/LSP refactors, semantic translation, embeddings, or agent planning.

The runtime-neutral root exports corpus/search/investigation primitives. Node-only build, freshness verification, source reads, and CLI live under /node; TypeScript and C++ extractors use their adapter subpaths.

CLI: build, check, investigate, read. investigate defaults to the evidence view and 4 KiB pages; choose locate for metadata-only results or relations for explicit graph evidence. The evidence view measures the full JSON response and upgrades verified source ranges when they fit the requested byte budget. An explicit --scope is a hard search boundary. If every explicitly requested scope is absent from the indexed corpus, investigate returns status: "insufficient" with reason: "REQUESTED_SCOPE_MISSING"; treat that as terminal negative evidence for those scopes instead of broadening the search implicitly. Query text promotes a relative path to a hard scope only when it starts at an indexed root, uses an explicit ./ prefix, or names a file with an extension; ordinary slash-separated prose stays searchable text. Decoded Windows backslash query paths are recognized as relative paths. read defaults to 16 KiB. Follow nextCursor for more evidence entries; continuation binds the generation, request, budget, and evidence display strategy. Restart at page one after a strategy change. expansion identifies a larger available source range; expand identifies an entry whose body was cut by the byte budget. complete only means the selected body was delivered intact, while wholeFile means the full source file was delivered.

For multi-term evidence queries, candidate selection may include the top matching source body when symbol-name ranking omitted it, while preserving explicitly named symbol candidates. When a query names multiple directories, candidate selection keeps a result from each named directory within the candidate limit. The effective request scope also bounds source-body reads and hints. locate remains metadata-only and does not read source bodies.

SDK investigation results always include evidenceUnits; pass them to selectEvidence with a caller-supplied output cost model and byte budget. The array is empty when there is no evidence or includeEvidence is false. The CLI chooses complete evidence planning or bounded body clipping from the current results and budget, and accepts continuation cursors only for that strategy. Previous v4 evidence-policy cursors fail with CURSOR_MISMATCH; obtain a fresh first page.

current-verified rechecks source and semantic inputs. frozen requires an authorized @openge/forge-source-snapshot store plus explicit --snapshot-root, --snapshot-owner, and --snapshot-id; a mutable root or flag alone is not trusted.

The local index retains only the current generation after a successful build. Publication temporarily holds the previous generation and one complete candidate; the build lock protects publication and reclamation. Unchanged builds reuse identical files and reclaim historical generations. Exact reads of an evicted generation fail with GENERATION_NOT_AVAILABLE; restart from loadCurrentGeneration() and obtain fresh cursors. Already loaded generation objects remain complete in memory. loadCurrentGeneration() retries an eviction race at most twice. SDK builds accept an optional AbortSignal: cancellation before the pointer commit preserves the previous current, while a committed publication finishes cleanup. GENERATION_CLEANUP_FAILED means reclamation failed; current may already have advanced, so reload it before retrying. A subsequent build reclaims interrupted files before writing another candidate. A leftover .build-lock fails closed with LOCK_STATE_UNKNOWN; confirm the previous writer has exited before removing that lock. Cleanup never follows links or recursively removes foreign entries. These guarantees assume cooperating writers use the build lock; external mutation of store paths is unsupported.

Chinese and mixed text use deterministic lexical tokenization only. No translation, model, embedding, reranker, background service, or runtime network fallback is invoked.

See the full usage documentation.

Apache-2.0.