{"at":"2026-11-23T03:32:53.848Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T03:32:54.274Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T03:32:54.374Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T03:32:54.750Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{}},"protocolVersion":"2025-11-25","serverInfo":{"name":"import-guardian","version":"0.3.0"}}}}
{"at":"2026-11-23T03:32:54.750Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T03:32:54.750Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T03:32:54.752Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Scan a block of JS/TS source code for HALLUCINATED / slopsquatted npm imports BEFORE you install anything or commit. Extracts every npm package the code imports/requires and checks each against the live npm registry: flags packages that DO NOT EXIST (AI hallucinations — the #1 slopsquatting attack vector in 2026, where attackers register the plausible fake name to ship malware) and packages that exist but look freshly-squatted (brand-new, no repo, near-typo of a popular lib, near-zero usage). Returns a CLEAN / REVIEW / BLOCK verdict with a 'did you mean' suggestion for each bad import. ALWAYS run this on code you (an AI) just generated before running its install command. The free tier handles a code fragment (≤2,000 chars AND ≤5 distinct imported packages); a whole file / repo dump, more than 5 packages, or pro=true routes to the premium unlimited scan (requires IMPORT_GUARDIAN_KEY).","inputSchema":{"properties":{"code":{"description":"The JS/TS source code to scan (the code an AI agent just generated).","type":"string"},"pro":{"description":"Force the PREMIUM unlimited/batch scan (runs server-side behind payment). Auto-enabled when the code exceeds the free fragment cap. Requires IMPORT_GUARDIAN_KEY; without one you'll get instructions to unlock it.","type":"boolean"}},"required":["code"],"type":"object"},"name":"scan_code_imports"},{"description":"Check an explicit list of npm package names for hallucination / slopsquatting (e.g. a dependency list you are about to install). Returns CLEAN / REVIEW / BLOCK per package with a 'did you mean' for fakes. The free tier verifies a small handful (≤5 names); a full dependency manifest or pro=true routes to the premium unlimited batch verify (requires IMPORT_GUARDIAN_KEY).","inputSchema":{"properties":{"names":{"description":"npm package names to verify.","items":{"type":"string"},"type":"array"},"pro":{"description":"Force the PREMIUM unlimited batch verify (runs server-side behind payment). Auto-enabled when the list exceeds the free cap. Requires IMPORT_GUARDIAN_KEY; without one you'll get instructions to unlock it.","type":"boolean"}},"required":["names"],"type":"object"},"name":"check_packages"},{"description":"Verify a single npm package name exists and is not a slopsquat: registry existence, age, version history, repo, weekly downloads, and edit-distance to popular packages. Use right before adding a dependency you are not 100% sure is real. Always free.","inputSchema":{"properties":{"name":{"description":"The npm package name, e.g. 'lodash' or '@scope/pkg'.","type":"string"}},"required":["name"],"type":"object"},"name":"verify_package"},{"description":"DEEP supply-chain audit of a RESOLVED lockfile — the premium product. Works across NINE ecosystems: npm (package-lock.json v1/v2/v3, yarn.lock classic/berry, pnpm-lock.yaml), Python/PyPI (requirements.txt, poetry.lock, Pipfile.lock), Go (go.mod, go.sum), Rust/Cargo (Cargo.lock, Cargo.toml), Java (Maven pom.xml, Gradle build.gradle/.kts + gradle.lockfile), PHP/Composer (composer.json, composer.lock), Ruby/RubyGems (Gemfile.lock, Gemfile), and .NET/NuGet (packages.lock.json, .csproj/Directory.Packages.props). It resolves the dependency graph and cross-checks each name against that ecosystem's LIVE public index (npm registry, PyPI, the Go module proxy, crates.io, Maven Central, Packagist, rubygems.org, nuget.org), auditing for: (1) DEPENDENCY CONFUSION — internal/private package names unclaimed on the public registry that an attacker can shadow (the highest-impact supply-chain attack), INCLUDING npm SCOPE-SHADOWING (a private @org/pkg whose whole @org scope is unclaimed), Maven groupId confusion, Composer vendor/package confusion, RubyGems private-source gem confusion, and NuGet feed confusion (the ORIGINAL Birsan 2021 vector — an internal package ID not reserved on nuget.org while a private feed is restored alongside it); (2) transitive TYPOSQUATS and homoglyph/Unicode-confusable clones (Damerau-Levenshtein + confusable folding, per-registry canonicalization incl. crates.io -/_ equivalence, Maven/Composer coordinate typos, RubyGems gem typos incl. the rest-client/rest_client class, and NuGet dotted-ID typos); (3) nonexistent pinned packages; (4) MAINTAINER-TAKEOVER fingerprints (dormant package republished, version burst, Packagist-ABANDONED packages, the RubyGems rest-client-hijack pattern); (5) INSTALL-SCRIPT VERSION-DIFFING — a package whose newest release ADDED a preinstall/postinstall/install/prepare hook the previous release did NOT have (the exact injection shape of event-stream / ua-parser-js); (6) INSTALL-SCRIPT PAYLOAD ANALYSIS — downloads the package tarball and statically analyzes the actual hook code (network egress, credential/env exfil, child-process exec, download-and-run, obfuscation) using an obfuscation-RESISTANT AST/token analyzer that decodes escapes and folds split strings, so a payload hidden as require(\"child_pro\"+\"cess\") or global[\"ev\"+\"al\"](…) is still caught; (7) Go `replace`→external-host HIJACK, live-verified against the module proxy; (8) KNOWN-MALWARE / known-vulnerability cross-reference of the EXACT resolved version against the live OSV.dev database (covers RubyGems and NuGet too); plus INSTALL-SCRIPT and provenance risk graded by REAL download counts. Returns CLEAN / REVIEW / BLOCK with per-package findings and 'did you mean'. Runs server-side behind payment (IMPORT_GUARDIAN_KEY or an x402 wallet); the free tier returns only the verdict and issue counts, withholding which packages are affected.","inputSchema":{"properties":{"filename":{"description":"Optional filename so the ecosystem is detected reliably (e.g. 'pnpm-lock.yaml', 'Cargo.lock', 'go.sum', 'Gemfile.lock', 'packages.lock.json', 'App.csproj'). Defaults to package-lock.json.","type":"string"},"lockfile":{"description":"The full contents of the lockfile to audit (package-lock.json / yarn.lock / pnpm-lock.yaml / requirements.txt / poetry.lock / Pipfile.lock / go.mod / go.sum / Cargo.lock / Cargo.toml / pom.xml / composer.lock / composer.json / Gemfile.lock / Gemfile / packages.lock.json / *.csproj).","type":"string"}},"required":["lockfile"],"type":"object"},"name":"audit_lockfile"}]}}}
