Lockfile Inventory
Extract npm package-lock v2/v3 packages by sorted location, retaining versions, resolved sources, integrity/license strings and dev/optional/devOptional/link/install-script flags. No package installation, graph resolution or hash verification. Workspace names require a declared name; node_modules names can be inferred from location.
supply-chain · Operation ID: lockfile-inventory
Choose this operation when
- Read package locations and declared metadata without installing anything
- Retain nested copies and workspace links as separate locations
Outside this profile
- npm v1, Yarn, pnpm, Poetry or Cargo lockfiles
- Transitive dependency graph resolution, artifact retrieval or installation verification
Exact release references
Static JSON contract · Markdown reference · Fixed example response
Complete input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"document": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "JSON document: at most 100,000 UTF-8 serialized bytes per request, 12,000 nodes and 24 levels; consumed fields are type-checked; unconsumed fields are ignored, not standards-validated."
},
"includeRoot": {
"default": false,
"type": "boolean"
}
},
"required": [
"document"
],
"additionalProperties": false
}
Complete output-envelope schema
{
"type": "object",
"required": [
"operation",
"version",
"result",
"provenance"
],
"properties": {
"operation": {
"const": "lockfile-inventory",
"type": "string"
},
"version": {
"const": "0.29.0",
"type": "string"
},
"result": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"lockfileVersion": {
"anyOf": [
{
"type": "number",
"const": 2
},
{
"type": "number",
"const": 3
}
]
},
"packageCount": {
"type": "integer",
"minimum": 0,
"maximum": 500
},
"packages": {
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"maxLength": 1024
},
"name": {
"anyOf": [
{
"type": "string",
"maxLength": 2048
},
{
"type": "null"
}
]
},
"version": {
"anyOf": [
{
"type": "string",
"maxLength": 2048
},
{
"type": "null"
}
]
},
"resolved": {
"anyOf": [
{
"type": "string",
"maxLength": 2048
},
{
"type": "null"
}
]
},
"integrity": {
"anyOf": [
{
"type": "string",
"maxLength": 2048
},
{
"type": "null"
}
]
},
"license": {
"anyOf": [
{
"type": "string",
"maxLength": 2048
},
{
"type": "null"
}
]
},
"dev": {
"type": "boolean"
},
"optional": {
"type": "boolean"
},
"devOptional": {
"type": "boolean"
},
"link": {
"type": "boolean"
},
"inBundle": {
"type": "boolean"
},
"hasInstallScript": {
"type": "boolean"
}
},
"required": [
"location",
"name",
"version",
"resolved",
"integrity",
"license",
"dev",
"optional",
"devOptional",
"link",
"inBundle",
"hasInstallScript"
],
"additionalProperties": false
}
},
"scope": {
"type": "string",
"const": "npm package-lock v2/v3 packages table only; legacy dependencies ignored; absent boolean flags are false; link targets are not followed and hashes are not verified."
}
},
"required": [
"lockfileVersion",
"packageCount",
"packages",
"scope"
],
"additionalProperties": false
},
"provenance": {
"type": "object",
"required": [
"inputSha256",
"outputSha256",
"deterministic",
"externalRequests"
],
"properties": {
"inputSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"outputSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"deterministic": {
"const": true
},
"externalRequests": {
"const": 0
}
}
}
},
"additionalProperties": false
}
Fixed example
One accepted fixed example, not a custom-input trial. No operation runs when this static page is requested.
Example input
{
"document": {
"name": "edge-worker",
"lockfileVersion": 3,
"packages": {
"": {
"name": "edge-worker",
"version": "1.0.0"
},
"node_modules/worker-kit": {
"version": "1.2.0",
"resolved": "https://registry.example/worker-kit-1.2.0.tgz",
"license": "MIT",
"dev": true
}
}
},
"includeRoot": false
}
Example response
{
"operation": "lockfile-inventory",
"version": "0.29.0",
"result": {
"lockfileVersion": 3,
"packageCount": 1,
"packages": [
{
"location": "node_modules/worker-kit",
"name": "worker-kit",
"version": "1.2.0",
"resolved": "https://registry.example/worker-kit-1.2.0.tgz",
"integrity": null,
"license": "MIT",
"dev": true,
"optional": false,
"devOptional": false,
"link": false,
"inBundle": false,
"hasInstallScript": false
}
],
"scope": "npm package-lock v2/v3 packages table only; legacy dependencies ignored; absent boolean flags are false; link targets are not followed and hashes are not verified."
},
"provenance": {
"inputSha256": "44372e18b4f1fb63575b3659833ee08607dc747c5e42deb3df735da0985fee80",
"outputSha256": "b0104ed8c8a474575b7c231e15b166b1022bb87eb42a3f8e18782794e5e86b31",
"deterministic": true,
"externalRequests": 0
}
}
Bounds and precision
JavaScript IEEE-754 numbers; use strings for large integer IDs/exact decimals where the schema accepts strings. No lossless numeric parsing.
{
"global": {
"requestBytes": 131072,
"responseBytes": 524288,
"jsonDepth": 32,
"jsonNodes": 20000,
"requestsPerMinute": 60,
"paidAttemptsPerMinute": 20,
"idempotencyHours": 24
},
"operation": {
"inputBytes": 100000,
"jsonNodes": 12000,
"jsonDepth": 24,
"outputBytes": 300000,
"packageLocationsIncludingRoot": 500,
"locationCharacters": 1024
}
}
Complete schemas, descriptions and cross-field validation may impose additional limits.
Proposed price and protocol definitions
{
"unit": "one successful operation call",
"proposedNominalUsd": "0.005",
"sixDecimalTokenBaseUnits": "5000",
"subscription": false,
"includesPayerWalletOrNetworkFees": false,
"liveQuoteVerified": false,
"condition": "Actual SDK challenge is authoritative only within the caller's explicit authorization; configured six-decimal token peg is an operator assertion, not a conversion guarantee."
}
Protocol definitions: x402, mpp. MPP uses Tempo charge. Paid MCP execution is unsupported. All runtime readiness is not evaluated in this build.
API path templates, not endpoints on this documentation host
{
"x402": "/v1/x402/lockfile-inventory",
"mpp": "/v1/mpp/lockfile-inventory"
}
Required headers
{
"Content-Type": "application/json",
"Idempotency-Key": "random 16–128 character operation identifier"
}
Actual SDK challenge amount, asset, network, recipient and wallet costs must pass independent authorization. Preserve identical key, body, protocol and credential on retries; on PAYMENT_UNCERTAIN stop and reconcile.
Execution profile and provider conditions
{
"deterministic": true,
"externalRequests": 0,
"maxExternalRequests": 0,
"resultSnapshotPersisted": false,
"fixedExampleIsIllustrativeSnapshot": false,
"requiresPayment": true,
"supportsMcpExecution": false
}
Deterministic supplied-input operation with no external requests or stored request/result bodies. Payment infrastructure retains payment metadata and hashes.
Failure handling
- HTTP 400: Malformed JSON, missing/invalid idempotency key, or payment identifier mismatch Correct the request before payment
- HTTP 402: Payment challenge or rejected payment Use official protocol SDK; inspect payment outcome before another payment
- HTTP 409: Idempotency conflict, duplicate proof, or PAYMENT_UNCERTAIN Keep original key, body, and proof; reconcile uncertainty with operator; never blindly repay
- HTTP 413: Input or generated output too large Reduce input; no payment attempted for validation failure
- HTTP 415: Unsupported media type or compression Send uncompressed application/json
- HTTP 422: Schema or service-specific semantic validation failure Correct input using returned error code; no payment attempted
- HTTP 429: Request/payment-attempt rate exceeded Wait for rate limit window; preserve existing payment identity
- HTTP 503: Payment configuration/provider/state unavailable, or live DNS preparation failed before settlement Check readiness; DNS preparation failures may retry the identical key/body/credential only; uncertainty requires reconciliation
Declared requirements
Before any paid call, refresh the live operation contract and POST the complete bounded budgeted plan to the separate API's /preflight. Unknown requirements block selection; compatible preflight is not permission to spend.