PerryLink DSH 领域插件alpha · public/synthetic · not GA

dsh-einvoice

Official repository. The only official repository of this package, maintained by PerryLink. Same-name repositories under other accounts are not affiliated. Apache-2.0.

npm CI License dsh-plugin docs Gitee dshfind DSH Market Node npm downloads

File-level Chinese e-invoice (OFD/XML) ingest, parse, dedup and local archive.

Status: alpha / public-synthetic / partial / not counted / not GA. No customer evidence, customer data, or production-readiness claim.

English · 简体中文 · Español · Português · हिन्दी

dsh plugin --profile <profile> add dsh-einvoice

⭐ If this helps, a star makes it easier for the next person to find it. Nothing is gated behind it.

Workflow diagram for dsh-einvoice: local input, plugin, local output.

Workflow: local input → plugin → local output. No model call is required.

Install

Install and verify:

dsh plugin --profile <profile> add dsh-einvoice
dsh --profile <profile> --dump-config | grep dsh-einvoice

Uninstall:

dsh plugin --profile <profile> remove dsh-einvoice

What it does

File-level Chinese e-invoice (OFD/XML) ingest, parse, dedup and local archive. Runs locally on DeepSeek Harness. The table below is the exact tool surface; the examples use the real command surface.

Input and output stay local; nothing is uploaded.

Tools

Tool names and descriptions are kept in English to match the runtime output.

Tool Purpose Risk
invoice.ingest Ingest one local OFD/XML, compute SHA-256, store the original, idempotent by bytes R1 local write
invoice.parse Parse old OFD Attachs/original_invoice.xml or 数电票 Tags/CustomTag.xml; return eight fields, lines, evidence and unknown fields R0
invoice.query Query the local pool by entity, period, lifecycle or text R0
invoice.dedup Group duplicates by invoice number or seller + date + total R0
invoice.review_queue Queue parsed invoices for manual local review; optional buyer-tax-id mismatch flags R1 local write
invoice.record_receipt Hash a local receipt, append it and move lifecycle; verification_source=local_receipt, tax_verified=false R1 local write
invoice.redlink Bind a negative red invoice to its blue invoice and store deltas R1 local write
invoice.archive Build a manifest + originals + receipts ZIP under the local archive directory R1 local write
invoice.check Verify manifest/member hashes, missing files and traversal R0
invoice.restore Restore a verified archive into the local restore root R1 local write

Quick start

dsh plugin --profile <profile> add dsh-einvoice
dsh --profile <profile> --dump-config | grep dsh-einvoice

Limits

Public sample

Public/synthetic fixtures live in test/fixtures/; ACCEPTANCE.csv records the public checks with counted=false.

Development

pnpm install --frozen-lockfile
pnpm build && pnpm lint && pnpm typecheck && pnpm test

Compatibility

Surface Status
Harness dsh >=0.2.1-rc.3 <0.3.0
Node >=24.9.0 <25
Platforms All; local files only
Data No network, no model call, no upload

Permissions & data

Related work

Sibling packages and family indexes: dsh-bankrec · dsh-ap-three-way · dsh-travel-recon · dsh-finops-suite

Family

DSH domain plugin family (15 packages + 2 suites)
Package npm
dsh-einvoice npm
dsh-docx-redline npm
dsh-policy-ledger npm
dsh-ghg npm
dsh-bankrec npm
dsh-ap-three-way npm
dsh-ifc-qto npm
dsh-qms-capa npm
dsh-legal-intake npm
dsh-legal-clause npm
dsh-freight-audit npm
dsh-hs-candidate npm
dsh-travel-recon npm
dsh-pim-lint npm
dsh-eval-pack npm
dsh-finops-suite npm
dsh-contract-suite npm

License

Apache-2.0. See LICENSE, NOTICE, THIRD-PARTY-NOTICES.