Evaluate an exact dependency change in project context
evaluate_dependency_changeCALL immediately before adding or upgrading an npm dependency. Answers "is this exact version safe to take on" from registry metadata, advisory deltas, provenance, license, and repository evidence, and returns blockers, warnings, a recommendation, and a verification plan. Example: {"dependency":"lodash","to_version":"4.17.21"}. Only dependency is required — omit to_version to evaluate the latest published version, exactly as npm install <pkg> would. to_version also accepts a dist-tag ("latest") or a SemVer range ("^4.17.0"); it resolves to one exact version, reported back in change.to_version. Everything RepoPilot can infer is inferred, and every default, repair, and resolution is listed in input_adjustments. Evaluates only; never installs or edits anything.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| intent | No | Optional free text describing why you are making this change. Advisory only; it changes no verdict. | |
| project | No | Optional, source-free facts about the project you are changing. Supplying it adds Node/peer/license compatibility and a command-level verification plan. Omit it entirely and compatibility comes back "unknown" - read that as not checked, never as no problem found. Every field is optional; anything missing is defaulted and reported in input_adjustments, never rejected. Never send source code. | |
| dependency | Yes | A STRING: the npm package name on its own, with no version and no surrounding object — "lodash", "@types/node". Not {"name":...}, not {"lodash":"^4.17.0"}, not a list. The version goes in to_version, the currently installed one in from_version. | |
| to_version | No | A STRING: the version you intend to install — an exact version ("4.18.1"), a dist-tag ("latest"), or a SemVer range ("^4.17.0"). Quote it even when it looks numeric ("19", not 19). Omit to evaluate the latest published version. | |
| from_version | No | The version currently installed, or omitted when adding a new dependency. Supplying it produces a before/after advisory comparison. | |
| policy_profile | No | Named team dependency policy. Strict requires provenance and denies package install hooks. Must be spelled exactly — a near-miss spelling is rejected rather than guessed, because reading it wrong would answer under a policy you did not ask for. | balanced |
| dependency_type | No | Where the dependency goes, in THESE words: "runtime" for a dependencies entry, "development" for devDependencies. The manifest and CLI spellings ("dev", "devDependencies", "--save-dev", "prod") are mapped onto these and reported in input_adjustments. | runtime |
| package_manager | No | Optional. Only affects the commands and lockfile named in the verification plan. Inferred from project.lockfile_path when you send a project snapshot, and assumed to be npm otherwise. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | Yes | ||
| agent | Yes | ||
| status | Yes | ||
| schema_version | Yes |