{"uid":"cap_TYgMrbF9p5blH2XJxBRdY","slug":"agent-miner-tools-npm-install-preflight-04e2e355","name":"Agent Miner Tools – npm Install Preflight","description":"Use before a coding agent installs an unfamiliar npm dependency. Returns current facts from the official npm registry: the version `npm install` resolves (dist-tags.latest), prerelease and deprecation status, engines.node compatibility with an optional target Node version (real SemVer evaluation), license, days since release, best-effort weekly downloads, repository URL and maintainer count. Facts only — no safety, trust, or malware verdict.","url":"https://agent-api-production.tim1712.workers.dev/v1/npm/install-preflight","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"nodeVersion":{"type":"string","maxLength":64,"minLength":1},"packageName":{"type":"string","pattern":"^(?:@[a-z0-9][a-z0-9._-]*\\/)?[a-z0-9][a-z0-9._-]*$","maxLength":214,"minLength":1}}},"responseSchema":{"type":"json","example":{"found":true,"source":"npm","license":"MIT","homepage":"https://zod.dev","warnings":[],"checkedAt":"2026-08-30T10:00:02.000Z","deprecated":false,"enginesNode":">=18","packageName":"zod","publishedAt":"2026-01-15T09:12:00.000Z","latestVersion":"3.24.1","repositoryUrl":"https://github.com/colinhacks/zod","nodeCompatible":true,"maintainerCount":2,"weeklyDownloads":23456789,"daysSinceRelease":12,"deprecationMessage":null,"latestIsPrerelease":false,"requestedNodeVersion":"22.14.0"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8uoIcqebm-H9cvJXMI_8f","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns current npm registry facts about a package (latest version, deprecation, Node.js compatibility, license, downloads, maintainers) before an agent installs it.","exampleAgentPrompt":"Before you install the 'zod' npm package in our Node 22.14.0 project, check the npm registry for its latest version, whether it's deprecated, its license, and whether it's compatible with our Node version.","exampleUseCases":[{"title":"Deprecation check before dependency install","prompt":"I'm about to add 'request' as a dependency — can you check the npm registry to see if it's deprecated, what the latest version resolves to, and how long ago it was last released?"},{"title":"Node.js compatibility verification","prompt":"We're running Node 18.20.0 — look up 'sharp' on npm and tell me if its engines.node field is compatible with our version before I add it to the project."},{"title":"Open-source due diligence on a package","prompt":"Can you pull the current npm facts for 'lodash' — I need to know its license, how many maintainers it has, the weekly download count, and the repository URL before we approve it for our codebase."}],"resultDescription":"A JSON object with: found (boolean), source ('npm'), packageName, latestVersion, latestIsPrerelease (boolean), deprecated (boolean), deprecationMessage, license, enginesNode (engines.node field string), nodeCompatible (boolean, only if nodeVersion was supplied), requestedNodeVersion, maintainerCount, weeklyDownloads, daysSinceRelease, publishedAt (ISO timestamp), repositoryUrl, homepage, warnings (array), and checkedAt (ISO timestamp).","failureModes":["Package not found on npm registry — returns found: false","Invalid package name format rejected by input schema validation","npm registry unreachable or rate-limited — upstream error returned","nodeVersion provided is not valid SemVer — compatibility field may be omitted or error returned","Package exists but has no engines.node field — nodeCompatible may be null or omitted"],"whenToPreferThis":"Use this endpoint when an AI coding agent needs fast, authoritative facts from the live npm registry before installing an unfamiliar or third-party package. Prefer it over scraping npm's website or relying on stale lockfile data. It is not a security scanner or malware checker — choose it when you need version resolution, deprecation status, license, and Node.js compatibility facts only.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:31:34.437Z","isFirstParty":false}