CodeSampleX

Beispiel

devtools-protocol 0.0.1413902

Verifiziertes Beispiel für npm devtools-protocol 0.0.1413902. Der Vertrag lief auf node 22 · linux alpine/x64 · docker und bestand.

sha256:5cd7e438957012c27ae522846d0fd40bffe63652b4f5bcc207403e2b5a9207b5

Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen. Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen. MIT-0

Ausführungsbelege

Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.

Beleggrundlage
Signierter Vertrag bestanden
Verifizierungsbelege
2
Signaturschlüssel, die es gebaut haben
1
Deklarierte Umgebung linux 24 · ubuntu · glibc 2.39 x64 npm

Umgebungen der Verifizierungsläufe

Umgebung Contract Stufen Lauf
node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5…
2026-08-23
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-08

Fall

HOW
Ziel
verify pkg:npm/devtools-protocol@0.0.1413902
Pakete
Erstellt
2026-08-23T15:47:29Z

Contract

  1. devtools-protocol package.json declares type definitions entry point types/protocol.d.ts and version 0.0.1413902
  2. devtools-protocol types/protocol.d.ts declares Protocol namespace with Page, Network, DOM, and Runtime domain namespaces
  3. devtools-protocol types/protocol.d.ts declares Page.NavigateRequest, Network.Request, DOM.Node, and Runtime.RemoteObject interfaces
  4. devtools-protocol types/protocol-mapping.d.ts declares ProtocolMapping namespace with Events and Commands interfaces
  5. devtools-protocol types/protocol-proxy-api.d.ts declares ProtocolProxyApi namespace with ProtocolApi and domain API interfaces
  6. devtools-protocol json/browser_protocol.json and json/js_protocol.json schemas define domain definitions and types

Dateien

  • PROMPT.md
  • csx.json
  • package-lock.json
  • package.json
  • spec.json
  • test/contract.mjs

Quellartefakt herunterladen (tar.gz)

Quelltext

PROMPT.md
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 pkg:npm/devtools-protocol@0.0.1413902
Kind: HOW

Use EXACTLY these public packages and versions:
  - pkg:npm/devtools-protocol@0.0.1413902

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.
csx.json
{"case":{"caseId":"case:sha256:ecfa62c8398f3776734c727c204a3a80a000cfa7cf706f813924eeca80ba1cdc","contract":["devtools-protocol package.json declares type definitions entry point types/protocol.d.ts and version 0.0.1413902","devtools-protocol types/protocol.d.ts declares Protocol namespace with Page, Network, DOM, and Runtime domain namespaces","devtools-protocol types/protocol.d.ts declares Page.NavigateRequest, Network.Request, DOM.Node, and Runtime.RemoteObject interfaces","devtools-protocol types/protocol-mapping.d.ts declares ProtocolMapping namespace with Events and Commands interfaces","devtools-protocol types/protocol-proxy-api.d.ts declares ProtocolProxyApi namespace with ProtocolApi and domain API interfaces","devtools-protocol json/browser_protocol.json and json/js_protocol.json schemas define domain definitions and types"],"goal":"verify pkg:npm/devtools-protocol@0.0.1413902","kind":"HOW","packages":["pkg:npm/devtools-protocol@0.0.1413902"],"schemaVersion":1},"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/devtools-protocol@0.0.1413902"],"schemaVersion":1,"subject":"pkg:npm/devtools-protocol@0.0.1413902","verifierAdapter":"node-typescript@1"}
package-lock.json
{
  "name": "sample-devtools-protocol",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "sample-devtools-protocol",
      "version": "1.0.0",
      "license": "MIT-0",
      "dependencies": {
        "devtools-protocol": "0.0.1413902"
      }
    },
    "node_modules/devtools-protocol": {
      "version": "0.0.1413902",
      "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1413902.tgz",
      "integrity": "sha512-yRtvFD8Oyk7C9Os3GmnFZLu53yAfsnyw1s+mLmHHUK0GQEc9zthHWvS1r67Zqzm5t7v56PILHIVZ7kmFMaL2yQ==",
      "license": "BSD-3-Clause"
    }
  }
}
package.json
{
  "name": "sample-devtools-protocol",
  "version": "1.0.0",
  "type": "module",
  "private": true,
  "license": "MIT-0",
  "dependencies": {
    "devtools-protocol": "0.0.1413902"
  }
}
spec.json
{
  "schemaVersion": 1,
  "goal": "verify pkg:npm/devtools-protocol@0.0.1413902",
  "kind": "HOW",
  "packages": [
    "pkg:npm/devtools-protocol@0.0.1413902"
  ]
}
test/contract.mjs
import assert from "node:assert/strict";
import fs from "node:fs";
import { createRequire } from "node:module";

const require = createRequire(import.meta.url);

// 1. devtools-protocol package.json declares type definitions entry point types/protocol.d.ts and version 0.0.1413902
const pkgJson = require("devtools-protocol/package.json");
assert.equal(pkgJson.name, "devtools-protocol");
assert.equal(pkgJson.version, "0.0.1413902");
assert.equal(pkgJson.types, "types/protocol.d.ts");

// 2. devtools-protocol types/protocol.d.ts declares Protocol namespace with Page, Network, DOM, and Runtime domain namespaces
const protocolDtsPath = require.resolve("devtools-protocol/types/protocol.d.ts");
assert.ok(fs.existsSync(protocolDtsPath));
const protocolDts = fs.readFileSync(protocolDtsPath, "utf8");

assert.ok(protocolDts.includes("export namespace Protocol {"));
assert.ok(protocolDts.includes("export namespace Page {"));
assert.ok(protocolDts.includes("export namespace Network {"));
assert.ok(protocolDts.includes("export namespace DOM {"));
assert.ok(protocolDts.includes("export namespace Runtime {"));

// 3. devtools-protocol types/protocol.d.ts declares Page.NavigateRequest, Network.Request, DOM.Node, and Runtime.RemoteObject interfaces
assert.ok(protocolDts.includes("export interface NavigateRequest {"));
assert.ok(protocolDts.includes("url: string;"));
assert.ok(protocolDts.includes("export interface Request {"));
assert.ok(protocolDts.includes("export interface Node {"));
assert.ok(protocolDts.includes("nodeId: NodeId;"));
assert.ok(protocolDts.includes("export interface RemoteObject {"));
assert.ok(protocolDts.includes("type: (\x27object\x27 | \x27function\x27 | \x27undefined\x27 | \x27string\x27 | \x27number\x27 | \x27boolean\x27 | \x27symbol\x27 | \x27bigint\x27);"));

// 4. devtools-protocol types/protocol-mapping.d.ts declares ProtocolMapping namespace with Events and Commands interfaces
const mappingDtsPath = require.resolve("devtools-protocol/types/protocol-mapping.d.ts");
assert.ok(fs.existsSync(mappingDtsPath));
const mappingDts = fs.readFileSync(mappingDtsPath, "utf8");

assert.ok(mappingDts.includes("export namespace ProtocolMapping {"));
assert.ok(mappingDts.includes("export interface Events {"));
assert.ok(mappingDts.includes("export interface Commands {"));
assert.ok(mappingDts.includes("\x27Page.navigate\x27: {"));
assert.ok(mappingDts.includes("paramsType: [Protocol.Page.NavigateRequest];"));

// 5. devtools-protocol types/protocol-proxy-api.d.ts declares ProtocolProxyApi namespace with ProtocolApi and domain API interfaces
const proxyDtsPath = require.resolve("devtools-protocol/types/protocol-proxy-api.d.ts");
assert.ok(fs.existsSync(proxyDtsPath));
const proxyDts = fs.readFileSync(proxyDtsPath, "utf8");

assert.ok(proxyDts.includes("export namespace ProtocolProxyApi {"));
assert.ok(proxyDts.includes("export interface ProtocolApi {"));
assert.ok(proxyDts.includes("Page: PageApi;"));
assert.ok(proxyDts.includes("Network: NetworkApi;"));
assert.ok(proxyDts.includes("export interface PageApi {"));
assert.ok(proxyDts.includes("navigate(params: Protocol.Page.NavigateRequest): Promise<Protocol.Page.NavigateResponse>;"));

// 6. devtools-protocol json/browser_protocol.json and json/js_protocol.json schemas define domain definitions and types
const browserProtocolPath = require.resolve("devtools-protocol/json/browser_protocol.json");
assert.ok(fs.existsSync(browserProtocolPath));
const browserProtocol = JSON.parse(fs.readFileSync(browserProtocolPath, "utf8"));
assert.ok(Array.isArray(browserProtocol.domains));
assert.ok(browserProtocol.domains.some(d => d.domain === "Page"));
assert.ok(browserProtocol.domains.some(d => d.domain === "Network"));
assert.ok(browserProtocol.domains.some(d => d.domain === "DOM"));

const jsProtocolPath = require.resolve("devtools-protocol/json/js_protocol.json");
assert.ok(fs.existsSync(jsProtocolPath));
const jsProtocol = JSON.parse(fs.readFileSync(jsProtocolPath, "utf8"));
assert.ok(Array.isArray(jsProtocol.domains));
assert.ok(jsProtocol.domains.some(d => d.domain === "Runtime"));
assert.ok(jsProtocol.domains.some(d => d.domain === "Debugger"));

console.log("All contract tests passed.");

Ursprungs-Seeder

anonym