{"uid":"cap_kLFY3LyMQjdu-NXqM9pol","slug":"npm-package-preflight-safety-check-ef75a1fa","name":"NPM Package Preflight Safety Check","description":"Machine-payable service intelligence for discovering, verifying, and monitoring identity, risk, authorization, execution-preflight, and evidence APIs before autonomous agents spend.","url":"https://base-agent-preflight.bytoken2023.workers.dev/v1/x402/software/npm-package-preflight","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["package"],"properties":{"package":{"type":"string","maxLength":214,"minLength":1,"description":"npm package name, including an optional scope."},"version":{"type":"string","maxLength":80,"minLength":1,"description":"Exact npm version or latest. Defaults to latest."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"network":{"type":"string"},"product":{"type":"string"},"activity":{"type":"object"},"identity":{"type":"object"},"assessment":{"type":"object"},"provenance":{"type":"object"}}}}}}},"responseSchema":{"type":"json","example":{"network":"eip155:8453","product":"npm-package-preflight","assessment":{"flags":[],"risk_level":"low","risk_score":0}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.015","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.015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_acP_te3EfOEUwAm61iTh7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.015","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes an npm package for security risk, flags, provenance, and metadata to help agents safely evaluate packages before installation or use.","exampleAgentPrompt":"Before I add it to my project, can you run a preflight safety check on the npm package 'lodash' version '4.17.21' and tell me its risk score, any flags, and whether its provenance looks clean?","exampleUseCases":null,"resultDescription":"Returns a JSON object with risk_level (e.g. 'low'), risk_score (numeric), an array of flags indicating detected issues, provenance details, activity signals, and identity metadata for the queried npm package and version.","failureModes":["Package not found on npm registry returns error or empty result","Invalid package name format causes validation failure","Unsupported or malformed version string may return error","Network timeout if npm registry is temporarily unavailable","Private or scoped packages behind auth may not be resolvable"],"whenToPreferThis":"Use this endpoint when an AI agent needs to programmatically evaluate whether an npm package is safe to install or depend on, particularly before automated dependency management, CI/CD pipeline integration, or autonomous code generation that pulls in external packages. Prefer this over manual registry inspection when you need a machine-readable risk score and structured flags.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:57:16.535Z","isFirstParty":false}