Local Doc Guardian
Quick start
Use the fixed entry point only:
scripts\run.ps1 "C:\path\to\document.pdf" --redact
Do not call client.py, server.py, or model files directly.
Workflows
Inspect a document
scripts\run.ps1 "C:\path\to\document.png"
Inspect and create a redacted copy
scripts\run.ps1 "C:\path\to\document.pdf" --redact
Return machine-readable JSON
scripts\run.ps1 "C:\path\to\document.pdf" --redact --format json
Check or stop the resident service
scripts\run.ps1 --health
scripts\run.ps1 --shutdown
Interpreting the reply
The reply contains:
风险等级: high, medium, low, or none.发现数量: validated findings grouped by severity and type.报告路径: Markdown and JSON reports with masked values only.脱敏副本: present only when--redactis requested.耗时: local processing time in milliseconds.
Failure handling
- Exit
1: invalid input, unsupported file, or inference failure. - Exit
2: local service communication failure. - Exit
3: first-run setup is still in progress; rerun with--continue. - Never upload the input or fall back to a cloud OCR service.
- If a result is uncertain, report it as requiring manual review; do not claim a file is safe merely because no pattern matched.
Important
- The first call creates an isolated environment and may take several minutes.
- All environments, models, caches, logs, and outputs stay under this skill directory.
- Input files are capped at 50 MiB, policy JSON at 1 MiB, and PDFs at 100 pages with per-page and aggregate render budgets.
- Pass
--min-confidence 0.0..1.0when a workflow needs a stricter or more permissive per-request OCR threshold. - Reports never include complete detected secrets or identity numbers.
- Redaction creates a new file and never overwrites the source.
微信扫一扫