npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@shapeshift-labs/frontier-lang-compiler

v0.2.462

Published

Compiler facade for Frontier Lang source documents and language projection adapters.

Downloads

3,587

Readme

@shapeshift-labs/frontier-lang-compiler

Compiler facade for Frontier Lang. It composes the parser, checker, semantic kernel, projection adapters, and runtime-neutral merge-evidence adapters for TypeScript, JavaScript, JSX, TSX, SVG, HTML, CSS, canvas, package manifests, Rust, Python, C, and SwiftUI.

Benchmarks

Run the package-local benchmark with:

npm run bench

These are Frontier-only package measurements for @shapeshift-labs/frontier-lang-compiler. They exercise the package's own parser, checker, compiler, projection, CLI, fuzz, or semantic-kernel surface without making competitor comparison claims.

Vision

Frontier Lang and Frontier Swarm are two parts of the same system: a semantic programming substrate for agent teams.

Frontier Lang is the universal code representation. It imports source from native languages into a replayable semantic graph: AST layers, symbols, ownership regions, source maps, effects, proof obligations, runtime assumptions, tests, traces, and merge history. It preserves exact native source where needed, imports parser/compiler facts where available, and projects semantic programs back out through target-language adapters.

Frontier Swarm is the coordination layer for many agents working on that graph. It breaks large engineering goals into owned semantic regions, assigns workers isolated slices of context, collects machine-readable evidence, scores merge readiness, and lets the coordinator integrate patches without reading every worker transcript manually.

The shared goal is semantic merging for code. A worker output should say what it changed, what semantic region it owns, what source hashes it depended on, what tests or traces prove the change, what assumptions it conflicts with, and whether it is ready to merge, needs porting, or is discovery-only.

import { compileFrontierSource } from '@shapeshift-labs/frontier-lang-compiler';

const result = compileFrontierSource(source, { target: 'typescript' });
if (result.ok) console.log(result.output);

Compile the target blocks declared inside an authored .frontier file when the file itself should name its outputs:

import { compileFrontierSourceDeclaredTargets } from '@shapeshift-labs/frontier-lang-compiler';

const result = compileFrontierSourceDeclaredTargets(source, {
  fileName: 'todo.frontier',
  sourceMap: true
});

for (const artifact of result.artifacts) {
  console.log(artifact.target, artifact.targetPath, artifact.output);
}

Declared-target compilation proves that target declarations were found and matching artifacts were emitted. It is compile evidence for coordinators, not a semantic-equivalence proof for the generated target code.

Use the bundle API when one authored .frontier source should produce both target output and the conversion/admission evidence that explains the same source:

import { compileFrontierSourceBundle } from '@shapeshift-labs/frontier-lang-compiler';

const bundle = compileFrontierSourceBundle(source, {
  fileName: 'todo.frontier',
  sourceMap: true,
  targetLanguages: ['rust'],
  conversion: { targets: ['rust'] }
});

console.log(bundle.declaredTargets.artifacts[0].output);
console.log(bundle.sourceSyntax.summary.unknownBlockCount);
console.log(bundle.sourceSyntax.summary.diagnosticCount);
console.log(bundle.conversionPlan.metadata.authoredFrontierSource);
console.log(bundle.conversionArtifacts.routeArtifacts[0]?.translationAdmission.action);

The bundle is the practical authored-language path: inspect one .frontier file, emit declared targets, and carry source-bound conversion evidence beside the emitted code. It still fails closed: unknown authored declaration blocks or malformed source syntax make the bundle not ok, and the bundle records missing evidence and false equivalence/auto-merge claims unless stronger proof is supplied by the host.

Build source-bound JSX/SVG/canvas/package-manifest evidence through the same facade when a coordinator needs merge records without taking a dependency on the project-level admission engine:

import {
  createCanvasSemanticMergeEvidence,
  createJsxSemanticMergeEvidence,
  createPackageManifestSemanticMergeEvidence,
  createSvgSemanticMergeEvidence
} from '@shapeshift-labs/frontier-lang-compiler';

const canvasEvidence = createCanvasSemanticMergeEvidence('ctx.fillRect(0, 0, 10, 10);');
const jsxEvidence = createJsxSemanticMergeEvidence('<button onClick={save}>Save</button>');
const svgEvidence = createSvgSemanticMergeEvidence('<svg><use href="#icon" /></svg>');
const packageEvidence = createPackageManifestSemanticMergeEvidence('{"dependencies":{"react":"^19.0.0"}}');

console.log(canvasEvidence.proofGaps.length, jsxEvidence.status, svgEvidence.referenceGraph.missingReferences.length, packageEvidence.summary.dependencies);

Run a small end-to-end demo after installing or building the package:

npm run build
node examples/native-js-to-rust-demo.mjs

Run the interactive Frontier-style workbench with a submitted TypeScript source pane, Frontier graph/JSON pane, and independent Rust/Python projection panes:

npm run demo:ts-rust -- --port 4177

The workbench converts only when Run is pressed. TypeScript edits project through the Frontier semantic graph into Rust and Python scaffolding. The middle pane shows symbols, relations, source maps, readiness, losses, patch hints, and the explicit supported/review-only/unsupported bounds for the projection. Run npm run demo:ts-rust:smoke to verify the conversion output and layout scaffold without starting the server.

The demo prints JavaScript source, the Frontier universal AST/semantic-index summary, Rust declaration stubs, a host-adapter Rust projection, and a direct Frontier-source to Rust projection. Native JavaScript projection remains loss-aware: without a target adapter the compiler emits review-required stubs rather than claiming a lossless JS-to-Rust transpilation.

Emit code with declaration-level source-map sidecars for semantic review and merge admission:

import { emitForTargetWithSourceMap } from '@shapeshift-labs/frontier-lang-compiler';

const { code, sourceMap, ast } = emitForTargetWithSourceMap(document, 'javascript', {
  sourcePath: 'todo.frontier',
  targetPath: 'todo.js',
  semanticIndexId: 'semantic_index_todo'
});

Or request the same provenance directly from the compile facade:

const result = compileFrontierSource(source, {
  target: 'javascript',
  fileName: 'todo.frontier',
  sourceMap: { targetPath: 'todo.js', semanticIndexId: 'semantic_index_todo' }
});

console.log(result.sourcePath); // "todo.frontier"
console.log(result.sourceMap.mappings[0].semanticNodeId);

Resolve target-specific capability bindings without hardcoding one runtime into the source graph:

import { compileFrontierSource, resolveCapabilityAdapters } from '@shapeshift-labs/frontier-lang-compiler';

const result = compileFrontierSource(source, { target: 'rust' });
const bindings = resolveCapabilityAdapters(result.document, 'rust', { platform: 'native' });
console.log(bindings[0].status); // "bound", "unbound", or "unsupported"

Create a loss-aware import bundle from a native parser or agent-produced AST:

import { importNativeSource } from '@shapeshift-labs/frontier-lang-compiler';

const imported = importNativeSource({
  language: 'javascript',
  parser: 'estree',
  sourcePath: 'src/todo.js',
  rootId: 'program',
  nodes: {
    program: { id: 'program', kind: 'Program', languageKind: 'ESTree.Program' }
  }
});

console.log(imported.nativeSource.ast.rootId);
console.log(imported.patch.operations.length);

Import external code-intelligence payloads into Frontier semantic evidence when a project already has language tooling such as SCIP, LSIF, LSP, or SemanticDB:

import { importExternalSemanticIndex } from '@shapeshift-labs/frontier-lang-compiler';

const importedIndex = importExternalSemanticIndex({
  format: 'scip',
  language: 'typescript',
  payload: {
    metadata: { project_root: '/repo' },
    documents: [{
      relative_path: 'src/todo.ts',
      occurrences: [{
        symbol: 'scip-typescript npm todo 1.0.0 src/todo.ts/ addTodo().',
        range: [0, 16, 23],
        symbol_roles: 1
      }]
    }]
  }
});

console.log(importedIndex.semanticIndex.symbols.length);
console.log(importedIndex.ownershipRegions[0]?.key);
console.log(importedIndex.summary.sourceMapMappings);
console.log(importedIndex.readiness.readiness); // "ready-with-losses" or review-required

External semantic-index imports create Frontier SemanticIndexRecord, SourceMapRecord, evidence, losses, ownership facts, first-class ownershipRegions, and a universal AST envelope. They are a bridge from existing language servers/indexers into semantic merge tooling; they do not claim full parser AST coverage, macro expansion, type checking, comments/trivia preservation, or lossless cross-language code generation by themselves.

Model resource, alias, and lifetime evidence explicitly when a source language or host tool can provide ownership-style facts:

import { createSemanticResourceGraph } from '@shapeshift-labs/frontier-lang-compiler';

const resourceGraph = createSemanticResourceGraph({
  language: 'rust',
  sourcePath: 'src/lib.rs',
  resources: [{ id: 'resource_buffer', resourceKind: 'heap-buffer', ownerId: 'owner_parse' }],
  owners: [{ id: 'owner_parse', ownerKind: 'function' }],
  lifetimeRegions: [{ id: 'life_header', startLine: 3, endLine: 8 }],
  lifetimeRelations: [{ id: 'life_header_outlives_body', relationKind: 'outlives', fromLifetimeId: 'life_header', toLifetimeId: 'life_body' }],
  borrowScopes: [{ id: 'scope_header', scopeKind: 'loan-scope-boundary', constraintKinds: ['loan-scope-boundary'] }],
  loans: [{ id: 'loan_header', resourceId: 'resource_buffer', ownerId: 'owner_parse', lifetimeRegionId: 'life_header', mode: 'shared' }],
  escapes: [{ id: 'escape_header', resourceId: 'resource_buffer', lifetimeRegionId: 'life_header', escapeKind: 'returned-borrow', status: 'needs-proof' }],
  unsafeBoundaries: [{ id: 'unsafe_ffi', resourceId: 'resource_buffer', proofStatus: 'missing' }]
});

console.log(resourceGraph.status); // "blocked" until unsafe alias/lifetime proof is attached
console.log(resourceGraph.claims.borrowCheckerClaim); // false

This is the slot for borrow-checker-shaped information in the universal graph: resources, owners, shared/mutable/exclusive loans, aliases, moves, drops, borrow escapes, lifetime regions, lifetime relations, borrow-scope obligations, unsafe boundaries, conflicts, and proof obligations. Rust-grade facts such as reborrow chains, two-phase borrow reservation/activation, interior mutability, pin stability, Send/Sync thread-transfer obligations, lifetime variance, drop-check, non-lexical lifetime regions, and higher-ranked lifetime obligations are represented as explicit constraints instead of broad semantic claims. The record is runtime-neutral and does not pretend to be Rust's borrow checker. Rust, C/C++, Swift, GPU/canvas resource lifetimes, DOM mutation, and JS object aliasing can all attach evidence to the same shape, while semantic merge still fails closed when alias/lifetime proof is missing.

Rust native imports also feed this graph automatically when source-preservation text or Rust semantic merge evidence is available. The compiler derives source-region resources, shared or mutable loans from reference parameters, raw pointer aliases, owned value parameters, local let ownership resources, shared/mutable borrow bindings, Copy-like value copies, explicit .clone() owned-value creation, shared-borrow compatibility obligations, mutable-borrow alias/loan exclusion obligations, possible lexical moves, call-argument ownership transfers, return ownership transfers, explicit drop(...) calls, lexical-drop evidence and destructor-drop obligations, returned-borrow escape records, named lifetime/reference/return bindings, explicit outlives relations such as 'long: 'short, lifetime-region spans, source-bound borrow-scope obligations for async borrows, branch joins, no-escape flow, drop cleanup, move invalidation, reborrows, two-phase borrows, interior mutability, pin projection, Send/Sync transfer, non-lexical lifetimes, higher-ranked lifetimes, variance, drop-check, and unsafe-boundary proof obligations. Rust public generic, trait-bound, where clause, associated-type, impl Trait, and type-lifetime obligations become universal type constraints, while trait/protocol/interface contracts also become protocol constraints with required members, associated types, bounds, implementation/coherence rules, object safety, and dispatch obligations for translation admission. That makes Rust borrow-checker-shaped evidence visible in the universal sidecar without claiming borrow-checker equivalence.

C/C++ native imports feed the same graph conservatively from source-preservation text. Pointer and array parameters become alias evidence, malloc, calloc, realloc, and aligned_alloc become heap resources, and free becomes drop evidence. C++ imports also expose std::unique_ptr, std::shared_ptr, std::weak_ptr, std::move ownership transfers for unique pointers, known RAII locals such as lock guards and streams, raw new, and delete as ownership, alias, lifetime, move, drop, and manual-memory records. Those records fail closed with manual-memory proof obligations when raw allocation/deletion or other unsafe alias/lifetime proof is missing.

Managed and defer-style native imports attach cleanup evidence to the same resource graph. Java/Kotlin try-with-resources and use, C# using, Go defer file.Close(), and Swift defer { file.close() } become resources, lexical lifetimes, and deterministic disposal records. Java/C#/Swift finalizers and deinit become nondeterministic finalizer obligations, while Java/C#/Swift weak or unowned references become alias records. Swift unsafe-pointer surfaces also become alias and unsafe-boundary records, so cross-language admission can distinguish ordinary cleanup preservation from missing pointer or finalizer proof.

Native imports include source maps, semantic merge candidates, and a loss summary for admission queues and dashboards. Informational losses produce ready-with-losses, warning losses produce needs-review, and error losses or failed import evidence produce blocked:

import { classifyNativeImportReadiness, summarizeNativeImportLosses } from '@shapeshift-labs/frontier-lang-compiler';

const summary = summarizeNativeImportLosses(imported.losses, { evidence: imported.evidence });
const readiness = classifyNativeImportReadiness(imported.losses, { evidence: imported.evidence });

console.log(summary.categories);
console.log(readiness.readiness);

The loss taxonomy separates broad scanner limits from specific round-trip risks such as conditional compilation, reflection, overload/type-inference gaps, comments/trivia preservation, source-map approximation, parser diagnostics, and target projection loss. These records are evidence labels for merge admission; they are not claims that the lightweight scanner expanded macros, evaluated inactive branches, resolved overloads, or ran a type checker.

Semantic merge candidates also expose compiler-normalized admission records for coordinator queues:

import {
  createSemanticMergeCandidateAdmissionRecord,
  querySemanticMergeCandidateAdmissionOverlaps,
  sortSemanticMergeCandidateAdmissionRecords
} from '@shapeshift-labs/frontier-lang-compiler';

const record = createSemanticMergeCandidateAdmissionRecord(changeSet);

console.log(record.changedSemanticRegions);
console.log(record.sourceHashes.baseHash, record.sourceHashes.targetHash);
console.log(record.conflictKeys, record.evidenceIds);
console.log(record.projectionRisk, record.readiness, record.readinessSortKey);

const queue = sortSemanticMergeCandidateAdmissionRecords([record, otherRecord]);
const overlaps = querySemanticMergeCandidateAdmissionOverlaps(queue);

These candidate records are compact merge-admission evidence. They preserve changed semantic regions, source/base/target hashes, conflict keys, evidence IDs, projection risk, readiness, and overlap pairs so swarm coordinators can sort likely-ready candidates first and detect conflicting regions before patch review.

The JS/TS semantic merge smoke corpus lives at test/fixtures/js-ts-semantic-merge/corpus.json and is exercised by test/smoke/js-ts-fixture-corpus.mjs plus test/smoke/js-ts-semantic-merge-oracles.mjs. The fixtures are deliberately small and dependency-free. They cover accepted projection/replay cases, exact source preservation, generated/source-map boundaries, safe import/declaration merges, safe unordered member merges, composed top-level/member safe merges, existing import binding-shape additions, React-style TSX child insertions, and rejected unsafe cases such as stale ledger spans, import specifier removals, computed keys, duplicate exported names, duplicate object members, decorators with static metadata evidence, overload anchors, and same-anchor edit conflicts.

Real-Repo Corpus Proof Phases

Manifest-only real-repo entries link those fixtures to TypeScript, Vite, Prettier, Next, and React patterns without committing third-party source. The manifest phase records repository identity, shallow fetch commands, source shape, path globs, byte budgets, oracle fixture links, and committedSourceBytes: 0; it is metadata, not vendored code.

bench/real-repo-corpus-suite.mjs emits a network-free local checkout proof. By default it reports skipped entries under tmp/js-ts-semantic-merge-real-repos; callers can point FRONTIER_REAL_REPO_CORPUS_ROOT at already-existing local checkouts. The checkout phase stats only the declared path globs and reads .git metadata for identity booleans such as checkout identity status, manifest remote match, manifest ref match, metadata kind, gitdir pointer presence, git config presence, and origin URL presence. It does not clone, install dependencies, or read third-party source text. Each row also records checkoutRootPresent, checkoutDirPresent, checkoutPresenceStatus, and checkoutProofReason, so a skipped row distinguishes a missing root from a missing checkout directory and an executed row distinguishes matched declared globs from a present checkout with no proof match.

The dependency install phase is default-off. Evidence rows report lockfile presence, package managers present, and the npm/pnpm/yarn command matrix as metadata-only; dependencyInstallExecution remains not-run-default-network-free until a caller supplies an explicit opt-in runner.

The repository command phase is also default-off. Build/test command proof is kept separate from checkout and dependency metadata through repositoryCommandProofStatus, repositoryCommandExecution, repositoryCommandDefaultOffReason, and repositoryCommandOptInRequired. Repository commands remain not-run-default-network-free unless a caller passes realRepoCommandExecution.enabled. The opt-in runner reuses the checkout proof, verifies checkout realpath containment, declared proof-glob matches, git identity, a single lockfile-backed package manager, and an allowlisted npm/pnpm/yarn argv with shell: false and an allowlisted environment. It records per-phase exit code, signal, duration, timeout, stdout/stderr byte counts, SHA-256 hashes, capped previews, and truncation flags. Dependency installation still requires a separate allowDependencyInstall opt-in. Fixture failures include the fixture id and the actual reason-code or gate values so distributed swarm evidence can point at a stable case instead of an agent transcript.

Successful safeMergeJsTsImportsAndDeclarations and safeMergeJsTsSource results also include semanticArtifacts. These artifacts convert the JS/TS ledger-approved head-to-merged source edits into a semantic edit script, projection, replay, and already-applied replay. This is intentionally different from asking the generic three-way edit classifier to bless every JS/TS case: simultaneous import specifier additions are safe only because the JS/TS ledger gates proved independent additions, compatible import binding expansions, stable anchors, and source replay. The artifacts keep autoMergeClaim: false and semanticEquivalenceClaim: false, but give coordinators machine-readable proof that the projected source matches the merge output and that applying the same projection again is a no-op.

When the top-level JS/TS ledger blocks only because an existing declaration body or semantic fact changed, safeMergeJsTsSource can fall back to the generic semantic edit script path. The fallback admits the merge only after the script is an auto-merge candidate, the source projection succeeds, replay on current head is accepted-clean, and replay on the projected source is already-applied. Same-anchor head edits, stale anchors, and non-body conflicts remain blocked for review. The same fallback composes with declared unordered member-addition regions, so a verified body edit can still merge alongside safe interface, type, class, or object member additions. Existing class/object method or property body edits inside the declared member region are preserved for semantic replay while added members are neutralized; object member additions are re-emitted with safe commas when both sides add final properties. When head changed an existing sibling declaration or sibling member, safeMergeJsTsSource prefers the direct semantic edit projection over a neutralized staged projection, and admits the merge only when replay still verifies cleanly. That direct path projects onto a staged top-level output with head declaration changes replayed first, so safe import/declaration additions are preserved without dropping the head-side sibling edit.

Project-level JS/TS safe merges compose the same file-level gates across a base/worker/head file set. They preserve head-only files, admit worker-only file additions when file additions are enabled, block conflicting same-path additions, and attach per-file semantic artifacts for files merged through the JS/TS source merger:

import { safeMergeJsTsProject } from '@shapeshift-labs/frontier-lang-compiler';

const project = safeMergeJsTsProject({
  language: 'typescript',
  moduleResolution: { baseUrl: '.', paths: { '@app/*': ['src/*'] } },
  baseFiles: { 'src/index.ts': 'export const stable = 1;\n' },
  workerFiles: { 'src/index.ts': 'export const stable = 1;\nexport const workerOnly = 1;\n' },
  headFiles: { 'src/index.ts': 'export const stable = 1;\n' }
});

console.log(project.status); // "merged"
console.log(project.outputFiles[0].sourcePath); // "src/index.ts"
console.log(project.files[0].semanticArtifacts.status); // "verified"

When includeOutputProjectSymbolGraph is enabled, the same moduleResolution shape is used for output graph artifacts. Resolution is runtime-neutral: baseUrl, paths, aliases, and compilerOptions.paths are matched against the supplied project files, not the host filesystem. Bare package imports also get explicit package identity. If packages is provided, package export maps can resolve back to supplied workspace sources and record the selected export condition:

const project = safeMergeJsTsProject({
  includeOutputProjectSymbolGraph: true,
  moduleResolution: {
    packages: {
      '@pkg/core': {
        root: 'packages/core',
        exports: { './utils': { import: './src/utils.ts', default: './dist/utils.js' } }
      }
    },
    packageExportConditions: ['import', 'default']
  },
  baseFiles,
  workerFiles,
  headFiles
});

console.log(project.outputProjectSymbolGraph.importEdges[0].packageName); // "@pkg/core"
console.log(project.outputProjectSymbolGraph.importEdges[0].packageExportCondition); // "import"

NodeNext-style JS extension specifiers can resolve to supplied TS source files. For example, import './runtime.js' can resolve to src/runtime.ts when that is the available project document. Graph edges record resolutionPathVariant as "extension-substitution" so coordinators can distinguish exact source matches from source-extension substitutions during stale checks and merge admission.

Package imports maps are also modeled for #internal specifiers. Top-level moduleResolution.imports applies from packageRoot/root, while importers outside that root fail closed as package-import-scope-missing. packages[name].imports applies to the nearest configured package root. Graph edges record packageImportKey, packageImportCondition, and packageImportTarget so merge admission can distinguish private aliases from external or unresolved imports:

const project = safeMergeJsTsProject({
  includeOutputProjectSymbolGraph: true,
  moduleResolution: {
    imports: { '#internal/*': { import: './src/internal/*.ts', default: './src/internal/*.js' } },
    packageExportConditions: ['import', 'default']
  },
  baseFiles,
  workerFiles,
  headFiles
});

console.log(project.outputProjectSymbolGraph.importEdges[0].resolutionKind); // "package-import-source"
console.log(project.outputProjectSymbolGraph.importEdges[0].packageImportKey); // "#internal/*"

Matched package imports entries also fail closed when none of the configured conditions selects a target. Those graph edges record resolutionKind as "package-import-condition-missing" with packageImportKey and no resolved module path, even when a matching source file exists in the supplied project. When import and require branches resolve to different targets but the importer path is runtime-ambiguous, graph edges fail closed as "package-import-runtime-ambiguous-missing" or "package-export-runtime-ambiguous-missing" with condition evidence "import|require" instead of choosing whichever condition appears first. Static edge evidence can also disambiguate runtime condition selection without crawling the host filesystem: ESM import/re-export edges select import, CommonJS require / TypeScript import = require edges select require, literal dynamic import() selects import, and static import.meta.resolve or require.resolve host edges select the matching package branch while still recording no host-runtime resolution claim. Edges record packageRuntimeConditionEvidenceSource, packageRuntimeConditionEdgeKind, and packageRuntimeConditionReasonCode; contradictory hard evidence fails closed as "package-runtime-condition-conflict-missing" with packageRuntimeConditionCandidates. Caller-supplied package type metadata also disambiguates runtime condition selection for .js/.ts importers. Use moduleResolution.packageType, moduleResolution.packageTypeByRoot, moduleResolution.packageTypes, or packages[name].type / packageType for package-local imports; resolved graph edges record packageRuntimeCondition as "import" or "require" and include the matched packageType. Non-resolver host dependency edges such as Worker, SharedWorker, serviceWorker.register, worklet addModule, importScripts, and new URL(specifier, import.meta.url) do not inherit package type metadata to choose divergent package import / require targets. When those host package specifier targets differ, graph edges fail closed with packageRuntimeConditionEvidenceSource: "host-runtime-ambiguous" and reason code "package-runtime-condition-host-ambiguous-missing" while keeping hostDependencyRuntimeResolutionClaim: false. When a coordinator already has package manifest data, use createNativeProjectModuleResolutionFromPackageManifests to convert in-memory package.json objects or text into the same runtime-neutral module-resolution shape:

const manifestResolution = createNativeProjectModuleResolutionFromPackageManifests({
  packageExportConditions: ['import', 'require', 'default'],
  manifests: [{
    sourcePath: 'packages/app/package.json',
    packageJson: {
      name: '@pkg/app',
      type: 'module',
      exports: { './feature': { import: './esm/feature.mjs', require: './cjs/feature.cjs' } },
      imports: { '#feature': { import: './esm/feature.mjs', require: './cjs/feature.cjs' } }
    }
  }]
});

const project = safeMergeJsTsProject({
  includeOutputProjectSymbolGraph: true,
  moduleResolution: manifestResolution.moduleResolution,
  baseFiles,
  workerFiles,
  headFiles
});

Configured package exports maps fail closed for blocked subpaths. If a package declares exports but the requested package subpath is not present, graph edges record resolutionKind as "package-subpath-not-exported-missing" with packageName and packageSubpath instead of falling through to source-root probing. This keeps package visibility distinct from local file presence, including type-only imports. Matched package export edges also retain packageExportKey and packageExportTarget, including wildcard keys such as "./features/*" resolved to concrete targets such as "./esm/features/button.mjs".

Named re-export identities also include symbol links when the project graph has enough evidence. For export { thing as renamedThing } from './thing.js', reExportIdentities[] records the source module, imported/exported names, originSymbolId, exportedSymbolId, and localSymbolId. Public contract regions include apiSurfaceKind, signatureHash, and contractHash, giving merge admission a stable API surface fingerprint. For export * from './module.js', project graphs fan out re-export identities for each named export in the resolved target document and omit default, which matches JavaScript module semantics. Output graph admission can use those expanded identities to accept disjoint export-star additions while blocking incompatible duplicate exported names as project-output-re-export-identity-conflict.

When using createTypeScriptCompilerNativeImporterAdapter, createEstreeNativeImporterAdapter, or createBabelNativeImporterAdapter, parser AST imports emit the same binding-level module facts instead of only statement-level module edges. Default, namespace, named, type-only, side-effect, re-export, export-star, local export, export default, and TypeScript export = declarations carry importKind, exportKind, localName, importedName, exportedName, isTypeOnly, and public-contract metadata into the semantic index and project symbol graph. Binding-level import and re-export identities preserve import-attribute / import-assertion key/value records, counts, and hashes so attribute-only deltas remain visible to merge admission without relying on hashes alone. Dynamic import() calls with non-literal targets are recorded with the stable <dynamic-import> pseudo-specifier and project graph resolutionKind "dynamic-import-non-literal-missing" so merge gates fail closed without host filesystem or package crawling. CommonJS require() bindings are runtime-neutral graph edges: destructured requires resolve to matching named exports.foo records, a default require() binding resolves to the target document's module.exports record when that export assignment is present, and exports.__esModule = true is ignored as interop metadata instead of treated as a public export. Static TypeScript-style CommonJS import helpers, including bare __importDefault(require("./dep")) / __importStar(require("./dep")) calls and tslib_1.__importDefault(require("./dep")) / tslib_1.__importStar(require("./dep")) member-form calls, are recorded as default and namespace import edges in lightweight and parser-backed project graphs, while non-literal helper targets remain fail-closed. For conditional package exports / imports, those helper edges keep their binding-level default/namespace shape but select the require branch from the inner static require() evidence; contradictory source-extension or package-type evidence still fails closed instead of claiming runtime interop equivalence. Static TypeScript-style CommonJS re-export helpers, including bare __exportStar(require("./dep"), exports) / __createBinding(exports, require("./dep"), "name", "alias") calls and tslib_1.__exportStar(require("./dep"), exports) / tslib_1.__createBinding(exports, require("./dep"), "name", "alias") member-form calls, are also recorded as export-star or named re-export module edges and fan out through the same project re-export identity graph as ESM export * from "./dep" and export { name as alias } from "./dep". TypeScript-style CommonJS named getter re-exports that pair a static const dep = require("./dep") alias with Object.defineProperty(exports, "name", { get: function () { return dep.name; } }), named function descriptors such as Object.defineProperty(exports, "name", { get: function getName() { return dep.name; } }), shorthand Object.defineProperty(exports, "name", { get() { return dep.name; } }), or block-bodied arrow getter Object.defineProperty(exports, "name", { get: () => { return dep.name; } }) are stitched into re-export identities when the alias and getter member are static in the same source document. Parser-backed ESTree/Babel imports also normalize no-expression TemplateLiteral nodes as static CommonJS require, computed export keys, and Object.defineProperty / Object.defineProperties export specifiers, while template literals with expressions stay unresolved instead of being guessed. The same static-literal rule applies to parser-backed dynamic import() and TypeScript-style CommonJS helper re-export specifiers such as __exportStar(require(`./dep`), exports). Host dependency APIs such as new URL(specifier, import.meta.url), Worker, import.meta.resolve, require.resolve, and importScripts also accept no-substitution/static template specifiers as evidence while expression templates emit <host-dependency> edges with expression hashes and proof-required unresolved evidence.

safeMergeJsTsProject stays synchronous. When a caller already has parser-backed native import results for merged output files, pass them as outputProjectImports with includeOutputProjectSymbolGraph. The graph builder matches supplied imports by sourcePath and sourceHash, requires hash-verified matches when the merged source has a hash, uses them for output graph artifacts, and falls back to the lightweight scanner for missing or stale files.

For admission queues that need bounded cross-branch API checks, enable includeProjectGraphDelta. This additionally builds base, worker, head, and output project graph stages and blocks the merge when worker and head both change the same public contract, re-export identity, or import target in incompatible ways. Parser-backed stage imports can be supplied with baseProjectImports, workerProjectImports, headProjectImports, and outputProjectImports; missing or hash-stale stages fall back to the synchronous lightweight scanner. This is a conservative admission gate only: results still keep autoMergeClaim: false and semanticEquivalenceClaim: false.

When a coordinator has a caller-owned TypeScript compiler API available, project merge can also require output diagnostics before admitting the candidate:

import ts from 'typescript';
import { safeMergeJsTsProject } from '@shapeshift-labs/frontier-lang-compiler';

const project = safeMergeJsTsProject({
  requireOutputDiagnostics: true,
  typescript: ts,
  baseFiles,
  workerFiles,
  headFiles
});

console.log(project.outputDiagnosticsGate.status); // "passed" or "blocked"
console.log(project.summary.outputDiagnosticErrors);

The diagnostics gate checks merged output files with TypeScript syntactic and semantic diagnostics, blocks on error diagnostics, and stores the normalized diagnostics/conflicts under outputDiagnosticsGate. The package does not import TypeScript from its runtime root; callers inject the compiler module or supply precomputed outputDiagnostics.

The same caller-owned TypeScript module can emit declaration-output evidence for the merged project boundary:

const project = safeMergeJsTsProject({
  includeDeclarationOutput: true,
  typescript: ts,
  baseFiles,
  workerFiles,
  headFiles
});

console.log(project.outputDeclarationGate.status); // "passed" or "blocked"
console.log(project.outputDeclarationGate.declarationFiles[0].sourceHash);

Use requireDeclarationOutput: true to fail closed when no compiler or supplied outputDeclarations are available. The gate records normalized declaration files, hashes, diagnostics, and conflicts under outputDeclarationGate; it is public-boundary evidence, not a semantic-equivalence claim.

When project graph delta evidence is included, declaration output can also act as a public API admission proof. safeMergeJsTsProject records declarationEmitParityProof with worker/head/output declaration boundary hashes. If a public compiler type changes to the same fingerprint on worker and head, the graph delta admission can use that proof to verify the merged output emits the same declaration boundary; a missing or mismatched supplied proof fails closed with typescript-public-api-declaration-emit-* reason codes. The proof is still only public-boundary evidence and does not claim runtime or full semantic equivalence.

Current JS/TS semantic-merge status matrix:

| Surface | Status | Current evidence | | --- | --- | --- | | Source-text merge candidate | baseline | Project admission records the conservative concrete source merge candidate before semantic proof rows run. sourceTextMergeCandidateStatus, sourceTextMergeCandidateFiles, sourceTextMergeBlockedFiles, sourceTextMergeOutputFiles, source-text-merge-candidate evidence, and the confidence.admissionMatrixAudit source-text-merge-candidate surface make the baseline machine-checkable. Failed source-text candidates block before semantic admission; this row is not a semantic-equivalence or browser-runtime claim. | | HTML parser/source evidence | bounded-evidence | HTML project files are counted separately through htmlFiles, htmlMergedFiles, htmlBlockedFiles, parser evidence counters, and html-parser-source-evidence matrix proof statuses. Current evidence is parser/source-span bounded around parse5-style source locations, parser-backed spans, exact base / worker / head side records, facade base/worker/head source-hash binding for merged evidence, parser-side source-hash mismatch blockers when supplied, and fail-closed parser evidence failures; it does not claim browser DOM, hydration, or render equivalence. | | CSS parser/source evidence | bounded-evidence | CSS project files are counted separately through cssFiles, cssMergedFiles, cssBlockedFiles, parser evidence counters, and css-parser-source-evidence matrix proof statuses. Current evidence is parser/source-span bounded around PostCSS-style rule/declaration spans, raw trivia hashes, exact base / worker / head side records, facade base/worker/head source-hash binding for merged evidence, parser-side source-hash mismatch blockers when supplied, parse-error blockers, and source preservation; it does not claim cascade or browser runtime equivalence. | | SVG parser/source evidence | bounded-evidence | SVG project files are counted separately through svgFiles, svgMergedFiles, svgBlockedFiles, SVG parser evidence counters, and svg-parser-source-evidence matrix proof statuses. Current evidence is source-span and attribute-span bounded around a standalone XML-shaped SVG lexical scanner with exact base / worker / head side hashes, one-root <svg> validation, balanced tag validation, and fail-closed parser evidence failures; it does not claim paint, layout, accessibility, focus, event, or browser runtime equivalence. | | SVG reference graph evidence | bounded-evidence | SVG reference proof uses svgReferenceGraphEvidenceFiles, definition/reference counters, missing-reference counters, and the svg-reference-graph-evidence proof status. Current evidence records source-bound local id definitions, href / xlink:href references, and url(#id) paint/resource references for gradients, masks, filters, markers, clip paths, symbols, and use sites. Missing or duplicate local targets fail closed; this row does not claim paint, layout, animation, focus, accessibility, event, or browser runtime equivalence. | | HTML identity evidence | bounded-evidence | HTML identity proof uses htmlIdentityEvidenceFiles, explicit/path identity residual counters, duplicate identity counters, runtime/framework boundary counters including Angular [prop], (event), [(model)], *structural, and #ref directive attributes, htmlProofGapBlockedFiles, and the html-identity-evidence proof status. Parser-backed stable identity can support later structural admission, while duplicate identity, runtime boundaries, framework boundaries, or missing proof gaps stay review/blocking evidence. | | SVG identity evidence | bounded-evidence | SVG identity proof uses svgIdentityEvidenceFiles, explicit/path identity residual counters, duplicate identity counters, runtime/framework boundary counters, svgProofGapBlockedFiles, and the svg-identity-evidence proof status. Parser-backed stable id and data-frontier-key identity can support later structural admission, while duplicate ids and reference-sensitive regions such as defs, use, clipPath, mask, filter, gradients, and paint servers remain review/blocking evidence unless separate source-bound proof is supplied. | | CSS selector target evidence | bounded-evidence | CSS selector target proof uses cssSelectorTargetEvidenceFiles, selector target graph/specificity/move counters, selector conflict/rebase counters, and the css-selector-target-evidence proof status. Target evidence remains bounded to parser-backed selector/target/rebase facts; selector-target rebases involving selector-list functional pseudos now admit only when the source-bound target proof carries exact parser-backed Selectors Level 4 specificity metadata and matching base/worker/head source hashes. This row does not claim cascade or browser runtime equivalence. | | HTML structural merge admission | partial | HTML structural admission uses html-structural-merge proof statuses plus parser and identity evidence. It can admit bounded structural source merges when files merge cleanly and required identity/parser evidence is present, including token-level class / part / itemprop additions/removals with htmlTokenListMergeEvidence counters, while class keeps compatibility htmlClassTokenMergeEvidence counters. Add-only, delete-only, and exact move-only unkeyed child subtrees under an explicitly identifiable parent can emit htmlUnkeyedStructuralAddFiles / htmlUnkeyedStructuralAddEvidenceRecords, htmlUnkeyedStructuralDeleteFiles / htmlUnkeyedStructuralDeleteEvidenceRecords, and htmlUnkeyedStructuralMoveFiles / htmlUnkeyedStructuralMoveEvidenceRecords when parser-backed spans are present, move text is exact, a keyed sibling anchors the move, and neither side races sibling structural edits. Duplicate tokens, order-only token-list changes, unsupported token-like attributes, general or ambiguous unkeyed reorders, unkeyed structural edits under unkeyed parents, same-parent structural races, duplicate identity, and runtime-boundary changes fail closed; blocked files route to admit-html-structural-merge and browser/runtime proof remains a separate row. | | SVG structural merge admission | partial | SVG structural admission uses svg-structural-merge proof statuses plus SVG parser and identity evidence. It can admit bounded standalone SVG source merges when the markup engine merges cleanly and required SVG parser/identity evidence is present, while duplicate identity, malformed XML-shaped SVG, reference-sensitive paint/server changes, and runtime-sensitive behavior stay fail-closed. SVG paint, layout, focus, accessibility, event, animation, and screenshot equivalence are not inferred from structural source evidence; missing proof routes to admit-svg-structural-merge and runtime proof remains a separate row. | | CSS cascade merge admission | partial | CSS cascade admission uses css-cascade-merge proof statuses plus parser, selector, ordered duplicate occurrence, shape-keyed scoped cascade, dependency, and CSS Module use-site evidence. Stable repeated same-property declarations can now emit cssOrderedCascadeOccurrenceEvidenceFiles / cssOrderedCascadeOccurrenceEvidenceRecords and admit disjoint occurrence-indexed edits; duplicate count/order/shape changes and same-occurrence parallel edits still fail closed. Parser-backed nested selector expansion now emits source-bound declaration spans for nested scoped rules, rejects stale expansion proofs, and still requires source-bound scoped cascade proof before admission. Dependency proof, generated class maps, bundler transform identity, source-map proof, and dynamic use sites stay fail-closed when absent. CSS Module transform gaps are exposed by separate rows below; none of these rows claims browser, render, or cascade equivalence. | | CSS dependency graph evidence | bounded-evidence | CSS dependency graph proof uses cssDependencySurfaceFiles, cssDependencyGraphEvidenceFiles, missing-proof/blocker counters, and the css-dependency-graph proof status for custom property, var() fallback, animation, font, asset, @property, and @page dependency surfaces. Project-synthesized custom property reference proofs that change a var() fallback chain are labeled css-var-fallback-dependency-graph-project-source-bound and carry fallback reference hashes; missing or stale dependency graph hashes stay on the prove-css-dependency-graph review route. It is absent when no dependency surface is present and does not claim cascade/browser equivalence. | | CSS runtime descriptor evidence | bounded-evidence | CSS runtime descriptor proof uses cssRuntimeDescriptorFiles, cssRuntimeDescriptorEvidenceFiles, property/page descriptor counters, and the css-runtime-descriptor-evidence proof status for parser-backed @font-face font-family/src records, @property syntax/inherits/initial-value evidence, and @page descriptor and margin-box records. It is source/shape-key evidence only; browser cascade, render, and runtime equivalence remain in the separate browser proof row. | | CSS Module use-site graph proof | partial | CSS Module use-site graph proof is tracked by the css-modules-use-site-graph surface with the css-module-use-site-graph proof status. It counts use-site proof blockers separately from transform blockers through projectGraphCssModuleUseSiteProofBlockers; default, namespace, static helper, scope/use-def-bound named CSS Module imports, and source-bound finite dynamic key domains can emit bounded use-site records, including named-import-reference records tied to scopeReferenceRecordId and bounded-dynamic-bracket records tied to dynamicKeyDomainHash. Unbounded dynamic member reads, member writes, unsupported helper calls, unresolved imports, missing named-import scope references, and literal class-name ambiguity stay fail-closed without making generated class-name map, bundler transform, or source-map proof claims. | | CSS Module generated class-name map proof | bounded-evidence | CSS Module generated class-name map proof is tracked by the css-modules-generated-class-name-map surface and css-module-generated-class-name-map proof status. Missing maps are counted with projectGraphCssModuleGeneratedClassNameMapBlockers, route to prove-css-module-generated-class-name-map, and keep admission blocked until source-bound transform evidence supplies the generated names used by JS/TS use sites. | | CSS Module bundler transform identity proof | bounded-evidence | CSS Module bundler transform identity proof is tracked by the css-modules-bundler-transform-identity surface and css-module-bundler-transform-identity proof status. Missing transform identity is counted with projectGraphCssModuleBundlerTransformIdentityBlockers, routes to prove-css-module-bundler-transform-identity, and fails closed when the bundler transform hash or equivalent source-bound proof is absent. | | CSS Module source-map identity proof | bounded-evidence | CSS Module source-map identity proof is tracked by the css-modules-source-map-identity surface and css-module-source-map-identity proof status. Missing source-map proof is counted with projectGraphCssModuleSourceMapIdentityBlockers, routes to prove-css-module-source-map-identity, and fails closed when CSS Module generated output cannot be tied back to source through the required source-map identity evidence. | | SVG browser runtime proof | bounded-evidence | SVG browser proof is an explicit separate row tracked by svgBrowserRuntimeProofs, svgBrowserRuntimeProofBlockedFiles, the svgRuntimeBoundaryEvidenceFiles summary counter, per-file result.svgRuntimeBoundaryEvidence, the svg-browser-runtime-proof surface, and the svg-browser-runtime-proof proof status. Structural SVG source merges keep browser/render/paint/layout/accessibility/focus/event equivalence claims false unless a bounded proof bundle is attached with command, probe id, evidence hash, DOM snapshot hash, computed-style hash, bounding-box/layout hash, accessibility/title/desc snapshot hash, focus/event trace where relevant, paint or screenshot hash where visual output changes, source/output hash binding, and no broad proof self-claims. Changed runtime-sensitive SVG animation elements, foreignObject, pointer/focus attributes, event/style/script boundaries, and external href / xlink:href values fail closed without source-bound SVG browser proof; unchanged runtime-sensitive vocabulary does not block unrelated structural edits. Missing proof routes to prove-svg-browser-runtime; invalid or stale supplied proof marks the row failed. | | HTML/CSS browser runtime proof | bounded-evidence | HTML/CSS browser proof is an explicit separate row tracked by htmlCssBrowserRuntimeProofs, htmlCssBrowserRuntimeProofAdmittedFiles, htmlCssBrowserRuntimeProofBlockedFiles, the html-css-browser-runtime-proof surface, and the browser-runtime-proof proof status. Structural source merges keep browser/render/cascade equivalence claims false unless a bounded browser proof bundle is attached; HTML runtime-boundary proofs cover event handler, inline style, iframe/srcdoc, form, form submitter, form control, anchor/area navigation (a/area href, target, download, ping, and referrerpolicy), base, meta, and resource-loading attribute families. Resource-loading coverage includes responsive img/source srcset and sizes, preload/modulepreload image metadata such as imagesrcset, imagesizes, media, integrity, crossorigin, and referrerpolicy; script fetch metadata is covered by the script runtime boundary, iframe sandbox/allow by the iframe runtime boundary, and CSS cascade runtime proofs are tracked separately through cssCascadeRuntimeProof*, cssSourceBoundCascadeProof*, cascadeRuntimeProof*, and sourceBoundCascadeProof* merge-option aliases. The project wrapper accepts canonical @shapeshift-labs/frontier-runtime-proof source-bound capsules plus the HTML package source-bound browser/runtime proof aliases (htmlBrowserRuntimeProofsByPath, htmlSourceBoundRuntimeProofsByPath, htmlRuntimeBoundaryProofsByPath, and generic browser/runtime proof inputs) when the proof kind is source-bound, source/output hash bound, boundary metadata is supplied through boundary/boundaries/boundaryKey and boundaryAttributes/changedBoundaryAttributes/attributeName/attributeNames, runtime evidence is bound, and the proof does not self-claim broad semantic/render/auto-merge equivalence. Capsule proofs must include telemetry, DOM, computed-style, layout, event-trace, accessibility, focus, layout-shift, and screenshot hashes where the HTML/JSX proof requires screenshot evidence, and must pass the cumulative-layout-shift ceiling; all proofs must include source hashes, a runtime command, probe id, evidence hash, and the required runtime signal. Missing proof routes to prove-html-css-browser-runtime; invalid or stale supplied proof marks the row failed. | | Package management intent and lockfile proof | High | package.json files now route through a package-management lane instead of the JS/TS parser. The lane merges dependency/dev/optional dependency maps, engines, and non-conflicting non-runtime scripts by package graph keys; same dependency names changed to different ranges, same script conflicts, peer dependency resolution changes, dependency override/resolution changes (overrides, resolutions, and package-manager nested override config), install-time script changes, build/test script command changes, package public surface changes (exports, types, typings, main, module, bin), workspace graph changes, and package-manager changes fail closed without source-bound proof. Build/test script changes require packageManagerCommandExecutionProofsByPath or equivalent package-management proof with exact source/output hashes, package-manager identity, structured commandArgv with shell: false, allowlisted cwd/env/network policy, exit/signal/timing, stdout/stderr hashes and byte counts, dependency-install execution mode, and no broad proof self-claims; the corpus covers build/test admission plus invalid shell rejection. package-lock.json, npm-shrinkwrap.json, pnpm-lock.yaml, and yarn.lock are not text-merged when changed; they require packageLockfileRegenerationProofsByPath or equivalent package-management proof with command, evidence hash, source hashes, output lockfile hash, and stale-output rejection. Summary and matrix counters include packageManagementFiles, packageIntentMergeFiles, packageGraphEvidenceFiles, packageResolutionOverrideProofs, packageManagerCommandExecutionProofs, packageLockfileRegeneratedFiles, and package proof/blocker counters. This row does not claim package install, dependency-resolution, build/test, or script runtime equivalence beyond the supplied bounded proof. | | Canvas static element and runtime proof | High | HTML <canvas> static structure is counted with htmlCanvasElementFiles and htmlCanvasStaticMergedFiles, so bounded width, height, aria-*, and fallback-child source changes remain separate from runtime behavior. JS/TS canvas drawing and OffscreenCanvas transfer changes now fail closed with canvas-drawing-runtime-proof-missing or canvas-offscreen-worker-proof-missing unless canvasRuntimeProofsByPath / canvasDrawingRuntimeProofsByPath / canvasOffscreenWorkerProofsByPath supplies exact source/output hashes, command, probe id, evidence hash, deterministic input, viewport/DPR, draw command trace, bitmap or perceptual diff, hit-test/pointer evidence, frame budget, accessibility/fallback evidence, and worker proof where relevant. The corpus now includes Playwright-generated runtime proof capsules for canvas draw telemetry, stale source rejection, OffscreenCanvas worker fail-closed behavior, and OffscreenCanvas worker transfer/message evidence. Offscreen worker proof can be bound by offscreenWorkerProofHash, workerTraceHash, workerMessageTraceHash, or the canonical canvas-offscreen-worker-proof runtime signal. Static source evidence does not claim canvas bitmap, pointer, frame, accessibility, worker, browser, render, or runtime equivalence. | | Parser/source-span/trivia evidence | Partial | Source preservation, source hashes, runtime directive-prologue entries, directives, comments/trivia summaries, project sourceFileRecords / sourceSpanRecords, protected-span hashes, shebang file-entrypoint directive ownership anchors, sourceMappingURL and sourceURL generated-boundary source-map spans, deterministic source-map generated-boundary ownership keys from supplied exact source/generated spans and hashes, generated-boundary position conflict evidence, deterministic ownership anchors, source-span/trivia ownership blockers, exact parser-trivia ownership records for directive prologues plus leading/trailing comments and JSDoc/block-comment spans when parser evidence matches the source hash, TypeScript SourceFile compiler-scanner exact token/trivia source-preservation evidence for JS/TS/JSX/TSX imports, ESTree/Babel parser token/comment range evidence plus first-class parserSpanCoverageProof records when the supplied AST covers every non-whitespace byte of the current source, project source file/span parser-span coverage status/evidence fields, fail-closed scanner/ledger spoof blockers, source-span delta conflicts, parser roundtrip proof records, source/output-hash-bound source-span roundtrip proof records, failed source-span roundtrip proof admission blockers, project-merge stage parser-trivia evidence from supplied parser-backed imports for base/worker/head/output, metadata-only exactness blockers for scanner fallbacks, and fixture corpus checks. Parser-backed exactness also requires contiguous current-source token/comment/trivia coverage with no gaps, overlaps, truncation, or text mismatches; truncated coverage blocks exact token/comment ownership. Adapters without token/comment ranges remain approximate/caller evidence, not exact parser trivia. | | Scope/use-def graph | Partial | Lightweight lexical scope/use-def scans, destructuring alias binding records, object/array/nested/rest/default-initializer parameter binding evidence for function and arrow parameters, default import alias reads through re-export chains when a stable default-export local binding is observed, source-bound anonymous default export fallback evidence for resolved default re-export chains with source hash/span and source symbol hashes, fail-closed lexical-scope-import-alias-target-unresolved records when an alias target cannot be tied to either lexical binding or source-bound anonymous default evidence, namespace import dot and literal/static-template computed member-read evidence, blocked evidence for ambiguous computed namespace reads and namespace member writes, this/super receiver member read/write evidence including computed string and static-template members, optional chaining markers, and TypeScript checker-backed receiver-member reference proof for full this/super access spans including private identifiers, template-literal interpolation live-reference records with expression hashes plus tagged-template site/tag root/member metadata, caller-supplied ESTree/scope-manager structural evidence normalization, closure-capture depth/owner/reference hashes, binding-level closure capture hashes, project scopeBindingRecords / scopeReferenceRecords, public owner use hashes, public scope-use and reference-site delta conflicts with alias target route/use-hash evidence, TypeScript compiler reference relations when a checker is supplied, exact compiler reference-site proof hashes on scope reference records, fail-closed typescript-compiler-reference-site-ambiguous, typescript-compiler-reference-lexical-binding-mismatch, and typescript-compiler-reference-import-alias-target-mismatch records when compiler alias evidence cannot be reconciled with the lexical route or re-export/import target, nested aliasResolutionStatus and compilerReferenceStatus blockers routed to ambiguous public scope/use-def evidence even when top-level status fields are not mirrored, and dependency-sensitive fixture coverage. Full whole-program binding/control-flow resolution is still caller/compiler-evidence bounded. | | Module/export/import graph | Partial | Project graph stages, module resolution, runtime-neutral package manifest conversion from in-memory package.json objects/text, duplicate workspace-root package-name ambiguity diagnostics and fail-closed package-workspace-root-ambiguous-missing edges with packageWorkspaceRoots evidence, package exports/imports including wildcard package export key/target evidence, fail-closed package imports condition misses, runtime-ambiguous import/require condition blockers, caller-supplied package type runtime-condition evidence for .js/.ts package exports/imports, caller-supplied package environment-condition evidence such as browser, fail-closed package-export-environment-ambiguous-missing / package-import-environment-ambiguous-missing blockers with condition candidates when environment targets such as browser and node diverge without explicit evidence, and fail-closed host-runtime ambiguity blockers for non-resolver host package specifiers with divergent import/require targets, re-export identities including static TypeScript-style CommonJS bare and tslib_1.__... member-form __exportStar(require("./dep"), exports) fanout and __createBinding(exports, require("./dep"), "name", "alias") named re-export fanout, same-document CommonJS require-alias getter re-export identities for descriptor get: function () { return dep.name; }, named descriptor get: function getName() { return dep.name; }, shorthand get() { return dep.name; }, and block-bodied arrow get: () => { return dep.name; }, TypeScript-style CommonJS bare and tslib_1.__... member-form __importDefault(require("./dep")) and __importStar(require("./dep")) helper import edges, CommonJS module.exports default-import interop when no direct default export exists, literal computed CommonJS export properties such as exports["default"], static module.exports = { named }, Object.assign(exports, { named }), Object.defineProperty(exports, "named", { value/get }), and Object.defineProperties(exports, { named: { value/get } }) export maps in lightweight and AST-backed imports, ESTree/Babel no-expression TemplateLiteral normalization for CommonJS require, computed export keys, descriptor export specifiers, dynamic import(), CommonJS helper re-export specifiers, and host dependency specifiers while expression-bearing templates stay unresolved, TypeScript compiler no-substitution dynamic import and host dependency template evidence, exports.__esModule marker filtering, import-target deltas for head-introduced CommonJS export assignments, namespace/ambient module/global augmentation/export-assignment static shape records with proof hashes and no runtime-equivalence claim, fail-closed namespace/export-assignment shape delta conflicts, non-literal dynamic import() pseudo-specifiers with expression kind/text/hash evidence and fail-closed resolution evidence, static new URL(specifier, import.meta.url), Worker, SharedWorker, serviceWorker.register, worklet addModule, importScripts, import.meta.resolve, and require.resolve host dependency edges with expression hashes and no runtime-resolution claim, dynamic host dependency targets emitted as <host-dependency> with expression hashes, hostDependencyStaticSpecifierEvidence: false, and proof-required unresolved evidence, import-attribute/import-assertion normalized key/value/count/hash evidence on static imports, dynamic imports, and re-exports, import-attribute delta conflicts, output graph unresolved-module conflicts that preserve edge-level fail-closed package, host, dynamic import, and import-attribute value evidence, and output graph resolved-module missing-export conflicts that preserve edge-level package and import-attribute evidence. Host filesystem/package graph crawling, namespace runtime evaluation, ambient/global compatibility, and CommonJS runtime interop equivalence remain out of the root API. | | Type/public API graph | Partial | Public-contract regions, signature/contract hashes, TypeScript compiler symbol/type records, source-bound checker proof source path/hash requirements, compiler-backed type-reference target proof that binds public API type references to resolved target symbols, declaration spans, and declaration source text hashes, inferred exported factory call-signature evidence, compiler-backed public call/construct signature shape evidence and proof hashes, exported overload declaration/signature counts, compiler-backed overload signature-set proof, compiler-backed generic type-parameter/default proof, compiler-backed public member property/method property-set proof, compiler-backed public index-signature key/value/readonly evidence and proof hashes, stable public-surface hashes that ignore transient TypeScript symbol flags, compiler-backed class heritage and constructor-signature evidence/proof hashes, compiler-backed private class member and accessor-field static shape records/proof hashes plus source- and required-signal-bound private/accessor runtime proof binding with command/trace/evidence hashes, private brand, private method, private accessor, static private, subclass brand-boundary, and accessor descriptor trace slots, and false claim flags, compiler-backed class/member/parameter decorator target and expression static metadata records/proof hashes plus source-bound decorator runtime execution proof binding with trace hashes and false claim flags, compiler-backed enum runtime-shape/member-value evidence and proof hashes, TypeScript compiler importer support for source-bound computed enum evaluated-value traces with emitted-shape hashes, trace/evidence