Skip to content

CollectOptions

PropertyTypeDescription
allowExec?booleanPermit subprocesses. Defaults to false: a library that shells out by default is a library that runs unknown code when pointed somewhere new. The interactive CLI opts in; quality detect does not.
discovery?DiscoveryMode | "auto""git" lists tracked plus untracked-but-not-ignored files (fast, respects .gitignore); "walk" walks the tree excluding well-known directories. "auto" picks git when the root is a repository and git is on the PATH. The resolved mode is recorded on the catalog because it changes which files are found.
exclude?string[]Skip these provider ids.
excludePaths?string[]Extra paths to skip, on top of the built-in list, in both discovery modes. A bare name matches any path segment at any depth (node_modules); a value containing a slash matches a root-relative path prefix, taking the whole tree beneath it (crates/mg/tests/mini-repo). Not glob syntax, and deliberately so — the same restraint ctx.files() patterns are held to. This is what a repository uses to say that a tree is DATA rather than project structure: a test-fixture repo, a vendored sample, a scratch directory. Those hold real manifests, so a detector is right to find them and right to report a broken one; they are simply not tasks anyone can run. Not the sibling of exclude, which takes runner ids.
execWithheldHint?stringAppended to the diagnostic on a runner withheld for want of execution. The library does not know what trust is; a CLI that resolved a trust gate passes the sentence it wants the user to read, and the catalog carries it into —json as well as onto the screen.
makeRunner?(binary) => AsyncCommandRunnerBuild the runner for a binary. Defaults to the real subprocess seam.
only?string[]Restrict to these provider ids.
probeObserver?(probe) => voidCalled once per provider that actually ran, with what the run measured and touched. Never called for a provider skipped for want of execution, which probed nothing; called for a provider that THREW, because the observer sees the truth and refusing to store a failure is the cache writer’s job, not this seam’s. This is the seam cache.ts rides on, and it is deliberately an option on the CALLER rather than a field on the provider contract. A provider must not know it is being cached — a provider that could observe its own timings could behave differently when watched — and a caller that never opts in pays nothing.
providers?RunnerProvider[]Defaults to builtinProviders. Pass your own to add or replace.
signal?AbortSignal-
which?(binary) => string | nullPATH lookup for a binary. Defaults to which() in which.ts, which walks PATH with node:fs — the published bin runs under node, where Bun.which does not exist. Tests inject this to control tool presence deterministically without touching the actual PATH.