Chinese e-invoice (OFD/XML) inbox: ingest, parse, deduplicate, queue for review, record receipts and archive locally — 10 `invoice.*` tools, nothing uploaded.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-einvoice
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:PerryLink/dsh-einvoice
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
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.
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: local input → plugin → local output. No model call is required.

Real local test run; no model or network call.
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
Install channels
npm is the recommended channel; the others are for pinning or offline use.
- npm (recommended):
dsh plugin --profile <profile> add dsh-einvoice - git channel:
dsh plugin --profile <profile> add github:PerryLink/dsh-einvoice - tarball:
pnpm packthendsh plugin --profile <profile> add ./dsh-einvoice-<version>.tgz - 1024 store:
npm i -g dsh1024thendsh1024 plugin --profile <profile> add 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
Examples
Fixture-backed example
Input: fixtures/public/mit/invoice-github-sample.xml
Command: pnpm test
Acceptance row:
| req_id | metric | threshold | actual | pass | source | counted |
|---|---|---|---|---|---|---|
| SKU-04-A01 | 八字段完整率(S1 合成样本) | >=0.98 | 1 | true | public/synthetic | false |
This is a fixture-backed acceptance row, not a customer run; no output is invented.
Limits
- Public/synthetic only; no customer data or customer evidence.
- Alpha/partial, not counted, no GA or production-readiness claim.
- No model or network call unless a tool explicitly says so.
- The exact per-tool boundaries are in the table and
ACCEPTANCE.csv.
Public sample
Public/synthetic fixtures live in 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
- Runs locally; no network, no model call, no upload.
- Public/synthetic fixtures only; no customer data, no customer evidence.
- Alpha/partial; not counted, no GA or production-readiness claim.
Related work
Sibling packages and family indexes: dsh-bankrec · dsh-ap-three-way · dsh-travel-recon · dsh-finops-suite
Related checkers
Each entry is a separate package with its own rule pack and version; install only the ones you need.
| Package | Why it is relevant |
|---|---|
dsh-invoice-ledger |
Checks the invoice ledger for duplicates, arithmetic, party and date anomalies after ingest. |
dsh-excel-reconcile |
Two-table reconciliation when the invoice pool must be compared with an external ledger. |
Family
License
Apache-2.0. See LICENSE, NOTICE, THIRD-PARTY-NOTICES.
Links
More in this category
loopx-project/loopx#dsh-loopx-plugin★ 6537
LoopX, a provider-neutral, local-first state kernel and control plane for long-horizon agents: keeps Goal, Todo, gate, evidence, quota, recovery, and handoff state above DeepSeek Harness, while the plugin bootstraps the CLI and skills, admits bounded same-session continuation, and adds a loopback GoalBar for the exact bound loop.
Q00/ouroboros#integrations/dsh-plugin★ 6308
Config-only bundle that mounts Ouroboros through the DSH MCP client, exposing 36 interview, Seed, execution, evaluation, and evolution workflow tools in DSH.
chuspeeism/dashi-taskboard#deepseek-harness★ 3434
Embeds the active installed Codex Taskboard runtime in the DeepSeek Harness sidebar, using its launcher runtime descriptor instead of a fixed port.
NanmiCoder/dsh-agent-teams★ 2647
AgentTeams multi-agent teams.
EthanYoQ/AI-Novel-Writer#dsh-ai-novel-writer★ 2265
Installs a dedicated AI novel-writing preset and workbench: revisioned local project assets, a compact side drawer, and native approval-gated single-file changes.
Miaotofu01/Study-Mate★ 1307
Your AI learning companion: helping you plan your studies, understand concepts, and build projects to master a subject.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.