Sample
@types/node 22.20.2: types
Verified sample for npm @types/node 22.20.2: types. The contract ran on node 22 · linux debian/x64 · docker and passed: @types/node package.json defines…
sha256:3be2d996b2b643750175953f5d1ecc5307d42fd0f2b434439fd09b833f76f0b2
This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured.
How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people.
MIT-0
Execution evidence
The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.
- Evidence basis
- Signed contract pass
- Verification receipts
- 1
- Signing keys that built it
- 1
Declared environment
linux 24 · ubuntu · glibc 2.39 x64 npm
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| node 22 · linux debian/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22@sha256:8a34c4ab3ea2… |
2026-09-16 |
Case
HOW- Goal
- verify @types/node.types in pkg:npm/%40types/node@22.20.2
- Packages
- Symbols
-
- @types/node.types
- Created
- 2026-09-16T22:50:10Z
Contract
- @types/node package.json defines types entry point index.d.ts and typeScriptVersion 5.6
- @types/node package.json defines typesVersions mapping for TypeScript versions <=5.6
- @types/node globals.d.ts declares global NodeJS namespace with CallSite, ErrnoException, and ReadableStream interfaces
- @types/node stream.d.ts declares Stream class, StreamOptions, and ReadableOptions interfaces in module stream
- @types/node crypto.d.ts declares Certificate class and Cipher, Decipher, and Hmac interfaces in module crypto
- @types/node util.d.ts declares InspectOptions, CustomPromisify, and inspect namespace in module util
Files
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
Source
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify @types/node.types in pkg:npm/%40types/node@22.20.2
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/%40types/node@22.20.2
Demonstrate these symbols/APIs:
- @types/node.types
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:c1e6bf29580e97f9ba255da04c7797f9201f8ef595c1c6d7806587196e8252a6","contract":["@types/node package.json defines types entry point index.d.ts and typeScriptVersion 5.6","@types/node package.json defines typesVersions mapping for TypeScript versions \u003c=5.6","@types/node globals.d.ts declares global NodeJS namespace with CallSite, ErrnoException, and ReadableStream interfaces","@types/node stream.d.ts declares Stream class, StreamOptions, and ReadableOptions interfaces in module stream","@types/node crypto.d.ts declares Certificate class and Cipher, Decipher, and Hmac interfaces in module crypto","@types/node util.d.ts declares InspectOptions, CustomPromisify, and inspect namespace in module util"],"goal":"verify @types/node.types in pkg:npm/%40types/node@22.20.2","kind":"HOW","packages":["pkg:npm/%40types/node@22.20.2"],"schemaVersion":1,"symbols":["@types/node.types"]},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"npm","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/%40types/node@22.20.2"],"schemaVersion":1,"subject":"pkg:npm/%40types/node@22.20.2","symbols":["@types/node.types"],"verifierAdapter":"node-typescript@1"}
{
"name": "sample-types-node-types",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-types-node-types",
"version": "1.0.0",
"license": "MIT-0",
"dependencies": {
"@types/node": "22.20.2"
}
},
"node_modules/@types/node": {
"version": "22.20.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.2.tgz",
"integrity": "sha512-xlvWf4Vs9n1PEVYwP1n4vvG07M6y8WgvJ2t0vbrWTmijsIHp1cS+uJ2kMIRdY3nHZK0nCYKrPeD171+SzF4/zw==",
"license": "MIT",
"dependencies": {
"undici-types": "~6.21.0"
}
},
"node_modules/undici-types": {
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
"license": "MIT"
}
}
}
{
"name": "sample-types-node-types",
"version": "1.0.0",
"type": "module",
"private": true,
"license": "MIT-0",
"dependencies": {
"@types/node": "22.20.2"
}
}
{
"schemaVersion": 1,
"goal": "verify @types/node.types in pkg:npm/%40types/node@22.20.2",
"kind": "HOW",
"packages": [
"pkg:npm/%40types/node@22.20.2"
],
"symbols": [
"@types/node.types"
]
}
import assert from 'node:assert/strict';
import fs from 'node:fs';
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
// 1. @types/node package.json defines types entry point index.d.ts and typeScriptVersion 5.6
const pkgJson = require('@types/node/package.json');
assert.equal(pkgJson.name, '@types/node');
assert.equal(pkgJson.version, '22.20.2');
assert.equal(pkgJson.types, 'index.d.ts');
assert.equal(pkgJson.typeScriptVersion, '5.6');
// 2. @types/node package.json defines typesVersions mapping for TypeScript versions <=5.6
assert.ok(pkgJson.typesVersions);
assert.ok(pkgJson.typesVersions['<=5.6']);
assert.deepEqual(pkgJson.typesVersions['<=5.6']['*'], ['ts5.6/*']);
// 3. @types/node globals.d.ts declares global NodeJS namespace with CallSite, ErrnoException, and ReadableStream interfaces
const globalsDtsPath = require.resolve('@types/node/globals.d.ts');
assert.ok(fs.existsSync(globalsDtsPath));
const globalsDtsContent = fs.readFileSync(globalsDtsPath, 'utf8');
assert.ok(globalsDtsContent.includes('declare namespace NodeJS {'));
assert.ok(globalsDtsContent.includes('interface CallSite {'));
assert.ok(globalsDtsContent.includes('interface ErrnoException extends Error {'));
assert.ok(globalsDtsContent.includes('interface ReadableStream extends EventEmitter {'));
// 4. @types/node stream.d.ts declares Stream class, StreamOptions, and ReadableOptions interfaces in module stream
const streamDtsPath = require.resolve('@types/node/stream.d.ts');
assert.ok(fs.existsSync(streamDtsPath));
const streamDtsContent = fs.readFileSync(streamDtsPath, 'utf8');
assert.ok(streamDtsContent.includes('declare module "stream" {'));
assert.ok(streamDtsContent.includes('class Stream extends EventEmitter {'));
assert.ok(streamDtsContent.includes('interface StreamOptions<T extends Stream> extends Abortable {'));
assert.ok(streamDtsContent.includes('interface ReadableOptions<T extends Readable = Readable> extends StreamOptions<T> {'));
// 5. @types/node crypto.d.ts declares Certificate class and Cipher, Decipher, and Hmac interfaces in module crypto
const cryptoDtsPath = require.resolve('@types/node/crypto.d.ts');
assert.ok(fs.existsSync(cryptoDtsPath));
const cryptoDtsContent = fs.readFileSync(cryptoDtsPath, 'utf8');
assert.ok(cryptoDtsContent.includes('declare module "crypto" {'));
assert.ok(cryptoDtsContent.includes('class Certificate {'));
assert.ok(cryptoDtsContent.includes('class Cipher extends stream.Transform {'));
assert.ok(cryptoDtsContent.includes('class Decipher extends stream.Transform {'));
assert.ok(cryptoDtsContent.includes('class Hmac extends stream.Transform {'));
// 6. @types/node util.d.ts declares InspectOptions, CustomPromisify, and inspect namespace in module util
const utilDtsPath = require.resolve('@types/node/util.d.ts');
assert.ok(fs.existsSync(utilDtsPath));
const utilDtsContent = fs.readFileSync(utilDtsPath, 'utf8');
assert.ok(utilDtsContent.includes('declare module "util" {'));
assert.ok(utilDtsContent.includes('export interface InspectOptions {'));
assert.ok(utilDtsContent.includes('namespace inspect {'));
assert.ok(utilDtsContent.includes('type CustomPromisify<TCustom extends Function> ='));
console.log('All contract tests passed.');
Origin Seeder
anonymous