
ZhiDian Workbench for Hermes Agent
ZhiDian Workbench brings deterministic, offline-first document redline diffing, spreadsheet anomaly auditing, bilingual dry-run workspace organization, and an optional loopback bridge to the Windows ZhiDian Desktop Workbench directly into Hermes Agent.
- Pure Python 3.11+ standard library — zero external runtime dependencies, zero binaries, zero model weights; works on Linux, macOS, and Windows.
- Strictly read-only — never creates, moves, renames, or deletes files on disk.
- Defense-in-depth safety — enforces Hermes
agent.file_safetyalongside strictworkspace_rootrealpathcontainment, NT/UNC rejection, 16 MiB file caps, and bounded XML/ZIP decompression.
Tools Provided
| Tool | Purpose | Supported Inputs | Mode |
|---|---|---|---|
zhidian_diff_compare | Clause/line redline diff with legal & financial risk flagging (amounts, percentages, deadlines, indemnity/penalty/liability terms). | .txt, .md, .csv, .docx | Offline, read-only |
zhidian_sheet_inspect | Spreadsheet profiler: sheet names, row/col counts, numeric stats (sum, min, max, mean, median, stdev), formula counts, duplicate rows, formula errors, and Z-score outliers. | .csv, .tsv, .xlsx | Offline, read-only |
zhidian_organize_plan | Dry-run 9-category bilingual (en / zh) file classification and collision-safe move preview inside workspace_root. | Any folder inside workspace_root | Offline, read-only dry-run |
zhidian_desktop_bridge | Optional loopback-only (127.0.0.1) query to a locally running Windows ZhiDian Desktop (list_referents, identify_screen_layer, list_active_files). | Windows ZhiDian Desktop (optional) | Loopback HTTP, read-only |
Installation & Configuration
hermes plugins install misakamikotoghr-5205/hermes-zhidian-workbench
hermes plugins enable zhidian-workbench
Optional plugin settings under plugins.entries.zhidian-workbench.settings:
plugins:
entries:
zhidian-workbench:
settings:
workspace_root: "./workspace"
desktop_bridge_port: 47600
locale: "en"
| Setting | Type | Default | Description |
|---|---|---|---|
workspace_root | string | "" (current working directory) | Hard containment boundary for all filesystem inspection tools. |
desktop_bridge_port | integer | 47600 | Optional loopback TCP port (127.0.0.1) for a locally running Windows ZhiDian Desktop. |
locale | string | "en" | Category folder labels for zhidian_organize_plan ("en" or "zh"). |
Optional Windows Desktop Bridge
The three offline tools require no credentials and no network access. To optionally connect to a locally running Windows ZhiDian Desktop:
- Open Settings -> MCP in ZhiDian Desktop and copy its local Bearer token.
- Set
desktop_bridge_portto your local ZhiDian Desktop listener and store its token in the plugin'sdesktop_tokensecret field. Hermes readsZHIDIAN_MCP_TOKENfrom your active profile. The port is controlled through the plugin settings. - Invoke
zhidian_desktop_bridgewithaction: "list_referents","identify_screen_layer", or"list_active_files".
Usage Examples
// zhidian_diff_compare
{"left_path": "./workspace/contracts/msa-v1.docx", "right_path": "./workspace/contracts/msa-v2.docx"}
// zhidian_sheet_inspect
{"path": "./workspace/finance/q4-ledger.xlsx", "max_sample_rows": 5}
// zhidian_organize_plan
{"directory": "./workspace/inbox", "locale": "en", "recursive": false}
// zhidian_desktop_bridge
{"action": "identify_screen_layer", "handle": "latest"}
Security & Disclosures (Catalog Rule 13)
- Local read-only filesystem inspection:
zhidian_diff_compare,zhidian_sheet_inspect, andzhidian_organize_planread only user-specified paths insideworkspace_root, guarded byagent.file_safety(get_read_block_error,get_write_denied_error), strictos.path.realpathcontainment, pre-resolution rejection of.., NT/device prefixes (\\.\,\\?\,\??\), and UNC shares (\\host\share), plus a 16 MiB file cap and 32 MiB XML decompression cap. - Zero writes, shell commands, or background processes: No tool writes or moves files, spawns subprocesses, starts background tasks, registers hooks/middleware, or overrides Hermes core.
- Zero telemetry and no self-updater: Zero external network calls, zero analytics, no self-updating code.
- Optional loopback-only HTTP bridge (
127.0.0.1):zhidian_desktop_bridgeopens a 2-second loopback HTTP request strictly when the user setsZHIDIAN_MCP_TOKENvia Hermes secret storage (agent.secret_scope.get_secret). It never reads external credential files from disk and verifies unauthenticatedGET /healthreturns{"ok": true, "name": "zhidian"}before sending anyAuthorizationheader.
Full 7-Studio Windows Desktop Workbench
For the full offline desktop suite (7 strict-CSP studios + occluded Z-order spatial computer use with 24 px mouse kill-switch), visit ZhiDian-Open.
License
Licensed under the Apache License 2.0.
README from the reviewed commit 4cb9b57; it updates when the author re-pins.
misakamikotoghr-5205