Pre-flight a proposed dependency set
const url = 'https://api.pkgplease.com/api/v1/policy/example/plan';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"proposed":{"additionalProperty":"example"},"baseline":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pkgplease.com/api/v1/policy/example/plan \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "proposed": { "additionalProperty": "example" }, "baseline": { "additionalProperty": "example" } }'Backs the MCP plan_dependencies tool. Diffs proposed against the optional baseline and evaluates only the added and changed entries through the shared evaluator (evaluatePackage), the same code path as check and the registry install. Unchanged entries, and entries in the baseline but absent from proposed (removals), are counted in unchanged and never evaluated; with no baseline every entry is added. A changed entry is never steered: a steer on a changed entry is reported as allow, with no steer field. Blocks and approvals still apply to changed entries. Read-only — it never creates an approval — and records exactly one audit event (mcp.plan_dependencies) per call. Unscored entries are queued for scoring at their resolved version. Each entry is rendered by token type exactly as check renders it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”One of the org's configured registry types (npm is the one in active use).
Request Bodyrequired
Section titled “Request Bodyrequired”object
Package name to version spec — what package.json will contain. At most 100 entries.
object
Package name to version spec — what package.json contains now.
object
Examplegenerated
{ "proposed": { "additionalProperty": "example" }, "baseline": { "additionalProperty": "example" }}Responses
Section titled “Responses”One decision per added or changed entry, plus the overall rollup
object
The most severe entry decision (block > needs-approval > warn > steer > endorse > allow); allow when there are no entries. Entries in not_evaluated do not contribute.
object
Present only on a block.
The pack id that produced the decision
As in check.
object
Session-token responses only.
Session-token responses only, as in check.
object
The version the spec resolves to
False when no fresh score exists yet; scoring has been queued.
Present only on a steer — the org's endorsed cohort peer.
object
Entries the evaluator could not evaluate. They never appear in entries.
object
Entries identical to the baseline
Example
{ "decision": "allow", "entries": [ { "change": "added", "decision": "allow", "block_class": "security", "remediation": { "type": "version" } } ], "not_evaluated": [ { "reason": "non-registry-spec" } ]}Missing or non-object proposed
object
Examplegenerated
{ "error": "example"}