The I/O-free PE resource tree parser moves from src/artifacts/pe to src/domain/pe and reports malformed structure, decode budgets and cancellation through the domain parse failure algebra. artifactParseFailure in src/resources maps those onto artifact reader reasons at each provider's boundary, so native no longer imports artifacts. Fixes #11527
3.0 KiB
Implementation plan
Boundary and contract
Register deno-standalone in the existing artifact format owners:
src/artifacts/artifactFormats.ts, ArtifactEmbeddedFormatProbes.ts,
ArtifactReader.ts, ArtifactReaderAdmission.ts, inventory/classify.ts,
inventory/scanReader.ts and extraction/ArtifactExtraction.ts. Add the format
metadata and member roles to src/domain/artifactFormatMetadata.ts,
artifactGraph.ts, artifactInspection.ts and evidenceSubject.ts, and accept
the format in src/contracts/artifactToolContracts.ts. No new tool, provider or
bridge is added; the CLI and MCP changes are additive.
Split the layout into owners under src/artifacts/deno/, following Deno
cli/lib/standalone/binary.rs and virtual_fs.rs at 2.9.8 with libsui 0.16.4
section placement:
DenoStandaloneLocation.tsconfirms the carrier name before claiming a file. It reads ELF and note headers, walks PE resource directories to the named payload throughsrc/domain/pe/peResourceLayout.ts, and scans Intel trailers to the slice start so an enclosing app wins over a stored executable.DenoSectionLayout.tsparses metadata JSON, the virtual-filesystem header, specifier, redirect and remote tables, and the npm snapshot length.DenoVirtualFs.tswalks directories, files and symlinks into safe logical paths with indexed fallbacks, usingArtifactPathRegistry.conflictsinsrc/resources/ArtifactPaths.tsto avoid occupied paths.DenoStandaloneAdmission.tsbinds the located carrier to the admitted file.
src/artifacts/DenoStandaloneArtifactReader.ts projects members, metadata,
limitations and extraction regions through the existing stable artifact read and
safe output tree.
Incremental work and validation
- Define the format, member roles and contracts, preserving native inventory for files with no confirmed carrier.
- Implement carrier location for Mach-O, Intel trailer, ELF and PE, with duplicate-section checks that reject unequal lengths before hashing.
- Implement section parsing and the bounded virtual-filesystem walk with indexed path fallbacks and remote specifier encoding.
- Add the reader, inventory and extraction wiring with retained environment and CA limitations.
- Add synthetic layout, location, virtual-filesystem and reader tests, CLI acceptance, filesystem boundary and MCP boundary tests.
- Add
scripts/verify-deno-standalone.mjs(npm run verify:deno:standalone) for real Deno 2.9.8 host and cross-target compiles without execution. - Update the usage guide, CLI guide, limits, READMEs and skill references.
Effects and compatibility
Inventory reads existing local files only; nothing is executed, injected or
downloaded. A deno compile executable that inventoried as a native binary now
reports deno-standalone, and a damaged section keeps the native format. There
is no runtime override for the named ceilings. Deno is a fixture producer for
the verifier only and is not installed by REA.