# Agent Miner Tools – npm Install Preflight

> Agent Miner Tools – npm Install Preflight is a paid API for AI agents from agent-api-production.tim1712.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns current npm registry facts about a package (latest version, deprecation, Node.js compatibility, license, downloads, maintainers) before an agent installs it.

## Facts

- Endpoint: POST https://agent-api-production.tim1712.workers.dev/v1/npm/install-preflight
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-miner-tools-npm-install-preflight-04e2e355
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TYgMrbF9p5blH2XJxBRdY

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent-miner-tools-npm-install-preflight-04e2e355 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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).

## Request schema (JSON Schema)

```json
{
 "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
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-miner-tools-npm-install-preflight-04e2e355/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-api-production.tim1712.workers.dev](https://www.zero.xyz/host/agent-api-production.tim1712.workers.dev/llms.txt)
