Xihl Editor v0.3 · macOS ARM64
XIHL / Editor

Native .dna import

Xihl can independently read a limited SnapGene binary subset without SnapGene software, an account, a service, an SDK or Python. Every native import requires explicit consent to possible scientific information loss. Keep the original .dna; the imported record is an editable copy of the supported current state. This is not lossless SnapGene compatibility or a .dna writer.

In Projects / Files, choose Import sequence… and select the file. The preview lists every ancillary packet omitted, with its type, byte offset and size where available. Undecoded packets are identified as possibly containing scientific data. Choose Import with these omissions to publish the record, or cancel to keep the current document. Replacing a dirty project still uses the ordinary save guard. If the source changes while confirmation is open, import fails and must be reviewed again. Parsing/copying runs off the frame thread.

Save the supported result as GenBank or save the project. Native sources and destinations containing a native binary cookie remain read-only, including renamed containers. FASTA/EMBL output of a record carrying native import limitations is refused because it would discard these limitations. Managed copy imports retain the original bytes under inputs; link imports retain the external original path. Standalone imports leave the original in place. No original is renamed or deleted.

Supported subset and explicit refusals

Headless and MCP

dna-cli inspect --input mock.dna --allow-lossy-dna true
dna-cli export --input mock.dna --allow-lossy-dna true --record-index 0 --format genbank --output imported.gb
dna-cli project-import --project project.json --input mock.dna --allow-lossy-dna true --mode copy --expected-revision REV --update

sequence-export supports the same opt-in. Without it, native input fails with packet-loss details and no mutation. warnings are returned by inspect/export and project import; sequence-export returns them inside result. MCP exposes the same boolean allow-lossy-dna option through its existing command adapter and existing filesystem/write grants. Discovery schemas enumerate it. Stdin remains bounded UTF-8 FASTA; it does not become a binary transport. Other direct analysis commands retain strict native refusal: use the imported project/GenBank record through their existing input contracts.

Persistence and interoperability limits

Projects preserve the supported record and import warnings using existing qualifiers/provenance; no manifest schema migration is needed. Warnings include the SHA-256 of the original raw binary file. They are import disclosures, not a reconstruction of SnapGene's editing history.

GenBank export retains repeated label qualifiers and writes JSON-escaped COMMENT Xihl-DNA-import: entries for the limitations. Standard GenBank locations cannot distinguish unspecified strand from forward strand, so the exporter also writes COMMENT Xihl-unknown-strands: containing zero-based feature indices. The editable label uses the existing authoritative first export slot; remaining qualifier values keep their relative order, including additional label values. Xihl restores those strands and warnings on reopen, rejecting out-of-range or complement-conflicting indices. Other readers may ignore these comment extensions and interpret an unspecified strand as forward. Ordinary GenBank files without the markers keep their existing behavior. GenBank feature IDs normalize through the existing importer; projects preserve the original assigned feature IDs.

Resource limits

Native inputs are capped before whole-file allocation at 4 MiB, with at most 128 packets and 100,000 bases. XML packets are capped at 2 MiB, depth 8 and 100,000 nodes; at most 32 attributes per element, 100 bytes per attribute key, and 64 KiB per text/attribute value. Features are capped at 4,096, retained segments at 16,384 and source qualifier values at 32,768. These are refusal limits, not benchmark claims. DTDs, custom entities, CDATA and processing instructions are refused; predefined/numeric XML references are decoded without network access. Cancelled, malformed and refused imports do not replace the open document. Current actual evidence is limited to the tested files and host described above. Cancellation never publishes a record. If a managed copy completed just before cancellation, a complete unregistered input may remain in the workspace for recovery; the original and existing document remain intact.