Check a whole dependency tree
kenwea_notary_check_treeUse for a whole npm project, a lockfile, or more than five npm packages, instead of one kenwea_notary_check per package. Answers every package in the tree at once from records the notary already holds; nothing runs during the call. Input, shortest first: packages, a list of {name, version, hasInstallScript}, with directs, the project's own dependencies as {name, version}. A version may be exact, a dist-tag or a range; a tag or range resolves to the version npm install picks today, and an entry that cannot be resolved is left out and named in skipped with the reason. Do not paste a large lockfile: search package-lock.json for "hasInstallScript": true and pass those entries as packages (with hasInstallScript true; package-lock keys entries by path, such as node_modules/@scope/name or node_modules/a/node_modules/b, so take the name from the entry's name field if it has one (an alias), else from the key after its last node_modules/; skip entries whose key has no node_modules/ (the project and workspace folders) and entries marked link), plus the direct dependencies from package.json as directs; packages that run nothing at install need not be sent. Or lockfile: the text of a package-lock.json (lockfileVersion 2 or 3), a pnpm-lock.yaml (v5, v6, v9), a yarn.lock (v1 or berry), or a package.json, whose ranges are resolved as npm would today (say so to the user); use it for pnpm v9 and yarn, whose lockfiles do not mark install scripts, or when the file is small. Behavior: a step runs inside the project, under the package that pulled it in, so the tree is checked through the direct dependencies: each one under which something runs at install is answered by its own record, made with its whole tree installed, and the packages under it come back as covered, with coveredBy naming it. Where the lockfile does not say which packages run something (pnpm v9, yarn), the registry is asked. A yarn.lock does not say which packages are direct, so each package that runs something is checked on its own; checkedThrough says which way it went. A package with no record yet is queued and checked in the background (queueNote says how fast); ask again with the same tree later to collect it. Does not spend the per-address check quota (60 tree calls an hour per address). Returns: summary; total, runNothing, runSomething, answered, queued, notQueued and covered; resolvedVersions and skipped when a version was a tag or range; findings (packages whose level is network, reads_credentials or sends_credentials); checkedThrough; and packages, each with status (answered, queued, not_queued, covered, not_checkable) and, when answered, level, summary, verdict, reasonCode, observed and signedAttestation. queued, not_queued and not_checkable have no record. Each record is signed; the tree summary itself is not. Verify a record with kenwea_notary_verify. Not for: one package you want checked now (use kenwea_notary_check), or a Python project. A lockfileVersion 1 file has no install script flags and is refused with a reason.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "kenwea_notary_check_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| directs | No | With packages: the project's own dependencies, so the tree is checked through them. | |
| lockfile | No | The contents of a package-lock.json (lockfileVersion 2 or 3, as text or as the JSON object), a pnpm-lock.yaml, a yarn.lock or a project's package.json, as text. | |
| packages | No | The shortest input: the packages that run something at install (in package-lock.json, the entries with "hasInstallScript": true), each {name, version, hasInstallScript: true}. Send this, with directs, instead of a large lockfile. |