DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

wct-lab /

wct-lab/dsh-docchain

Verified

DeepSeek Harness Plugin of DocChain

★ 1 Stars2 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@f17a5ced

dsh-docchain

English | 中文

A DSH knowledge base and document conversion plugin bundling filename/content/metadata search, topic listing, bulk document upload, document-to-Markdown conversion, a multi-subagent deep-research workflow, and a knowledge-graph (Neo4j) layer — ontology inspection, read-only Cypher, and node/relation writes all go through the DocChain API (no Neo4j password needed): install once with plugin_manager install_bundle and it works on any machine — no manual copying into ~/.agents/skills required. Built on docchain.

Its configuration page goes beyond a single endpoint: it keeps a list of saved environments — each with its own address and its own credential — switches between them in one click, and pre-selects topics per environment, so a later request can say "search this topic" without naming an id.

Apart from deep-research-advanced (a pure instruction workflow with no script), every capability is also exposed as a native tool, executed in-process by the host instead of by shelling out to a script:

Tool What it does
docchain_doc_search Locate documents by doc_id / document-name keyword, list details, optionally read content (paged, resumable)
docchain_content_search Search document content by keyword; returns matching line numbers and content
docchain_filename_search Find documents whose filename matches keywords, within the given topics
docchain_topic_info List topics with pagination and a name-or-id keyword filter
docchain_meta_search Filter documents by custom metadata fields (string/number/time, AND / OR groups)
docchain_upload Upload a file, or a folder's top-level files, to a topic
docchain_image_search Image-to-image search with a local picture
docchain_image_describe Turn a document's images into text: describe each image and save a sidecar description markdown
doc2markdown Convert docx/doc/pdf/pptx/xlsx/images and more to Markdown
docchain_kg_schema Inspect a topic's ontology (entity types with attributes + relationship types), via the DocChain API
docchain_kg_cypher Run a read-only Cypher query on a topic's graph, via the DocChain API
docchain_kg_upsert_node Create or edit an ontology/entity node, via the DocChain API
docchain_kg_upsert_relation Create an ontology or entity relationship, via the DocChain API
docchain_kg_delete_node Delete a node (and its relationships), via the DocChain API
docchain_kg_delete_relation Delete a relationship, via the DocChain API
Skill Kind Description
docchain-filename-search SKILL.md + Node.js script Find documents whose filename matches keywords, within the given topics (tool: docchain_filename_search)
docchain-doc-search SKILL.md + Node.js script Locate documents by doc_id or document-name keyword, show their details, and optionally read a document's content (paged, resumable; tool: docchain_doc_search)
docchain-content-search SKILL.md + Node.js script Search document content by keyword; returns line numbers and content; or/and operators (tool: docchain_content_search)
docchain-meta-search SKILL.md + Node.js script Query documents by custom metadata fields (string/number/time, exact and range; tool: docchain_meta_search)
docchain-topic-info SKILL.md + Node.js script List docchain topics with pagination and a name-or-id keyword filter (tool: docchain_topic_info)
docchain-upload SKILL.md + Node.js script Upload a local file or a whole folder to a given docchain topic in bulk (tool: docchain_upload)
doc2markdown SKILL.md + Node.js script Convert docx/doc/pdf/pptx/xlsx/images and many more formats to Markdown via the docchain parsing service (tool: doc2markdown)
docchain-image-search SKILL.md + Node.js script Find similar images by example (tool: docchain_image_search)
docchain-image-describe SKILL.md + Node.js script Turn a document's images into text: describe each image (flowcharts come out as a plantuml sketch) and save a sidecar description markdown, leaving the main md untouched (tool: docchain_image_describe)
deep-research-advanced SKILL.md only Orchestrator-style multi-subagent deep research workflow (pure instructions, no scripts, no tool)
docchain-kg SKILL.md only DocChain knowledge graph: ontology/Cypher/writes all via the DocChain API (tools: docchain_kg_*)

Installation

The same package installs into either profile — pick the one that matches how you run DSH:

How you run DSH Command
Desktop app dsh plugin --profile desktop add github:wct-lab/dsh-docchain
dsh web dsh plugin --profile web add github:wct-lab/dsh-docchain

Restart DSH afterwards so the host and client halves reload. Or, from a local checkout:

plugin_manager install_bundle target=<absolute path to this directory>

Configuration (required)

No credentials ship in this package. Every script except doc2markdown (Node.js) needs a docchain service endpoint and an API key before it can run; doc2markdown (Node.js) works with neither — it falls back to the built-in default endpoint and uploads anonymously, while the same config chain can point it at a custom endpoint/key.

Field Meaning Required
docchain_url docchain service address, e.g. http://<host>:7100/llmdoc Yes
docchain_api_key API authentication key Yes

Four ways to provide them, in priority order (higher wins):

  1. Environment variables DOCCHAIN_URL and DOCCHAIN_API_KEY;
  2. per-skill config file <skill>/scripts/config.json;
  3. the plugin state file ~/.dsh/storages/docchain-config.json (written by the plugin config — see below);
  4. package-level skills/docchain_config.json (file-drop distribution fallback; the package ships only docchain_config.example.json as a template).

Environment variables outrank everything below them, including the environment selected on the plugin's configuration page — see Switching between environments.

Config file format (all JSON-based):

{
  "docchain_url": "http://<host>:7100/llmdoc",
  "docchain_api_key": "your-api-key-here"
}

All scripts need only Node.js. Invoke them from the skill's base directory as node scripts/<script>.js … (see each SKILL.md for parameters).

Plugin configuration (recommended)

The plugin ships a configuration page in the web client: in dsh web, open Plugins in the sidebar, find the dsh-docchain plugin, and use the configure control on its row. The page manages a list of environments; an address and a key are properties of an environment, so they are entered and edited inside its row — there are no separate top-level fields. The key itself goes to the credential store and is write-only: the page never echoes a stored value, only whether one is set.

The plugin follows the official credential pattern. Its Config schema declares:

Field Meaning
docchain_url Service endpoint used when no environment is active; volatile, kept in sync with the active environment by the page
docchain_api_key_ref Credential reference name for the key; default DOCCHAIN_API_KEY
docchain_api_key Fallback literal key (not recommended; the store wins over it)
docchain_environments Saved environments (JSON): per entry a name, URL, credential reference and its pre-selected topics; the active entry outranks docchain_url
neo4j_uri Neo4j Bolt endpoint, e.g. neo4j://<host>:17687; kept for future direct graph tools (currently unused)
neo4j_user Neo4j username, default neo4j
neo4j_password Neo4j password; kept for future direct graph tools (all graph tools currently use the API)
neo4j_database Neo4j database name, default neo4j

The key's value lives in the credential store ~/.dsh/.credentials.yaml (refs: section, owner-only permissions) — save it through the configuration page or edit the file directly; changes hot-reload. It can also come from the launch environment under the same variable name. On activation, whenever a stored credential changes, and whenever this row's settings are saved, the resolved values are mirrored into ~/.dsh/storages/docchain-config.json (permissions 0600): the file is a pure projection of the current resolution, so a cleared config entry disappears from it; the scripts read it on every run.

Key resolution order: credential store (launch env > stored file) > docchain_api_key row literal.

The reference name is configuration: leaving docchain_api_key_ref unconfigured is a supported state, not a broken one. The page reports no key and the scripts exit with a configuration error instead of falling back to another reference — a present-but-wrong key queries the wrong account silently, which is far harder to notice than a failure.

To change values, either:

  • use the configuration page on the Plugins page — add or edit an environment, including its address and key, or
  • save/update DOCCHAIN_API_KEY in the credential store — takes effect without touching this plugin, or
  • edit ~/.dsh/storages/docchain-config.json directly (takes effect on the next script run; the plugin rewrites it from the resolved config on activation and config changes — for durable overrides use env vars or a per-skill config.json), or
  • set docchain_url / docchain_api_key_ref / docchain_api_key in the plugin's config row (patch config / preset override) and re-activate the plugin.

Switching between environments

The configuration page keeps a list of saved environments, so pointing the skills at another docchain service no longer means retyping a URL and a key.

  • The page shows one row with the environment currently in force. Open it to see the list: pick another, add one, or edit / delete an entry.
  • Picking an entry takes effect immediately — no Save press, no restart.
  • Each environment stores its own URL and its own credential reference, so switching back never asks for the key again. Keys stay in the credential store and are only ever written, never read back.
  • The page manages environments only: an address and a key are properties of an environment, edited inside its row — there is no separate pair of fields to keep in sync. With nothing saved the row reads "no environment selected", and the legacy docchain_url / docchain_api_key_ref values remain the fallback (editable in the profile's cordis.patch.yml).
  • Deleting an entry also deletes its credential — unless another environment still uses the same reference, or it is the row's own fallback reference. The entry in force cannot be deleted; switch away first.

Where the data lives:

What Where
The environment list (name, URL, credential reference, selected topics) config.docchain_environments in the profile's cordis.patch.yml
Each environment's key refs: in ~/.dsh/.credentials.yaml, under DOCCHAIN_API_KEY__<ID>
The values in force — URL, key, and the active environment's topics as docchain_topic_ids / docchain_topic_names ~/.dsh/storages/docchain-config.json, rewritten on every switch

Two limits worth knowing:

  • An environment variable wins. Every skill script reads DOCCHAIN_URL / DOCCHAIN_API_KEY before the projection file, so a value exported at launch silently outranks whatever the page selects. Do not set them if you want the page to be authoritative.
  • Two browser tabs editing the same row: the last save wins.

Topics

Each environment can also pre-select up to 10 topics, so a later request can say "search this topic" without naming an ID.

  • The topic list comes from the active environment: one keyword box that the service matches against both the topic id and the name (substring, case-insensitive — a full id or a full name narrows it to one row), plus paging. Each row shows the topic_id and the name.
  • The browser never holds the API key, so the page asks the host's same-origin route GET /plugin/dsh-docchain/topics and the host queries the service on its behalf.
  • Selections are stored per environment (topics inside its entry), so switching environments switches the topic set with it.
  • While at least one topic is selected, the host injects the active environment and those topic_ids into the agent's prompt. The agent then uses them when the user says "the current topic" or omits topic_ids; with nothing selected nothing is injected.
  • The service URL must be the API base, not a browser landing page: a /login?redirect=… address makes the list fail. Such an environment is marked with ⚠ in the list.

Two limits: a topic deleted on the server stays in the selection (it is a name snapshot, and using it later will fail), and the route is reachable by any local process that can open the port — it reads the active environment's topic names and never returns a credential.

How it works

The bundle inserts one Host plugin (dsh-docchain). At activation it registers a skill provider on ctx.skills that serves every <skills>/<name>/SKILL.md directory in this package:

  • Catalog entries come from each SKILL.md frontmatter (name, description); bodies are re-read on every load.
  • The provider rank is 450 — project roots (.dsh/skills = 100, project .agents/skills = 200), runtime registrations (250) and customSkillDirs (300) keep precedence, as does ~/.dsh/skills (400); the bundle outranks ~/.agents/skills (500) and the bundled root (600). In practice: same-name copies in ~/.agents/skills are shadowed by this bundle; delete them there if you want a single source.
  • Two optional services carry the configuration page: the host registers GET /plugin/dsh-docchain/topics on the web server (the browser never holds the API key, so the host queries the active environment on its behalf), and a prompt section that describes the active environment and its selected topics. A profile without those services still gets the skill provider and the projection file.
  • Neither the topic route nor the prompt section caches state of its own: both read the live row config on every call, so switching an environment or a topic reaches the scripts and the next model step without a restart.

Native tools

Every script-backed capability is registered as a DSH tool, so the model calls it directly and the host executes it in-process — no shell step.

Tool Key arguments
docchain_doc_search doc_ids or keyword (exactly one); content: true reads content (single id only); offset / max_lines page through it
docchain_content_search keywords required; at least one of doc_ids / topic_ids; operator is or or and
docchain_filename_search keywords and topic_ids both required (filename search inside those topics only)
docchain_topic_info page / size / keyword, all optional
docchain_meta_search conditions as [{field, op, value}] (AND), or_groups (OR inside, AND across); list_fields: true lists fields
docchain_upload path + topic_id required; mode is file or folder (top level only)
docchain_image_search image required; omitted topic_ids falls back to the page's selected topics; all scans everything
docchain_image_describe doc_ids processes directly; keyword alone returns candidates only; read returns an already-generated description md; list_models lists usable vision models; batches of >1 need confirm
doc2markdown file_path required; action is convert or check; md_only exports a single md
docchain_kg_schema topic_id required; ontology_type is ontology or dg_ontology
docchain_kg_cypher topic_id + cypher required; read-only (MATCH/CALL/SHOW…RETURN), auto-LIMIT when absent
docchain_kg_upsert_node topic_id + node_type (ontology/entity) required; ontology needs entity_name, entity needs ontology_id_list; doc_ids links documents
docchain_kg_upsert_relation topic_id + relation_type + source + target required; entity relations also need ontology_id
docchain_kg_delete_node topic_id + entity_id required (removes its relationships too)
docchain_kg_delete_relation topic_id + relation_id required

Tools and scripts share one implementation: the host requires the script modules and calls their exported compute functions, so a tool result cannot drift from a node scripts/... run. Registration goes through ctx.inject(["tools"]), so a host without the tool registry keeps the skills, the projection file and the configuration page — it just has no tools.

Failures return { ok: false, error, message } with the same error values as the scripts: CONFIG / NO_RESULTS / NOT_FOUND / NO_PERMISSION / SERVER_ERROR. doc2markdown adds PENDING for "still converting, call check later". Arguments are arrays or objects (doc_ids: [1, 2]), never comma-joined strings.

docchain_upload, docchain_image_describe and the convert action of doc2markdown are marked non-concurrency-safe (one writes to the knowledge base, one is a long job, the other is a long pipeline); the search tools may run in parallel.

Skills

docchain-filename-search — find documents by filename within given topics

Locate documents by filename keywords within the specified topics.

How to use it — describe the filename keywords you are looking for. You must specify the topic ID(s); this skill searches only inside those topics.

Division of labour with docchain-doc-search: to search filenames across all topics, or to locate by doc_id or read a document's content, use docchain-doc-search. This skill is "scoped to topics + filename only".

Examples:

  • "Find documents whose filename contains 'contract' in topic 112"
  • "Search for documents with 'purchase' or 'agreement' in topics 1 and 10"

docchain-doc-search — locate by doc_id / document name and read content

Find out "which document is this" by doc_id or by a document-name keyword, and list its details (name, topic, pages, size, state). When needed, read a document's content in pages (resume with next_offset). Use it for "what document is id X", "which documents have a name containing XX", or "read me the content of a document".

How to use it — give one or more document IDs, or a document-name keyword (--keyword searches filenames across all topics); to read content, pass a single document ID with --content.

Unlike docchain-filename-search, this searches filenames across all topics and can resolve by doc_id or read content; to look up a filename only within a specific topic, use docchain-filename-search. Unlike docchain-content-search, this locates the document itself by id / name rather than grepping keywords inside its content.

Examples:

  • "What is document 125672?"
  • "What are documents 125672 and 125755?"
  • "Find documents whose name contains 'evaluation standard'"
  • "Read the beginning of document 125755"

docchain-content-search — search document content

Search keywords inside document content; returns the matching line numbers and content. Supports or and and operators.

How to use it — specify the search scope and keywords. You must provide at least one of doc_ids or topic_ids.

Examples:

  • "Search for 'contract' in document 123"
  • "Search for content containing both 'API' and 'interface' in topics 1 and 2"

docchain-meta-search — query by metadata fields

Filter documents by custom metadata field conditions — string, number, and time types with exact and range operators.

How to use it — describe the filter conditions. You must specify topic ID(s) or document ID(s).

Examples:

  • "Find documents in topic 112 whose metadata author is Zhang San"
  • "Find contracts in topic 113 whose amount field is greater than 1000"

docchain-topic-info — list topics

Lists the topics in a docchain system with pagination, optionally filtered by a name keyword. Often a first step before other skills: get the topic IDs, then search or upload within a topic.

How to use it — just ask what topics exist; optionally give a page number, page size, or a name keyword.

Examples:

  • "What topics are there?"
  • "Show page 2 of the topic list, 10 per page"
  • "Find topics whose name contains 'test'"

docchain-upload — bulk document upload

Uploads a single local file or a whole folder to a given docchain topic, one file at a time, with progress and success/failure counts. Folder scans cover top-level files only (non-recursive).

How to use it — provide the file/folder path and the target topic ID (--topic_id is required).

Examples:

  • "Upload ./report.pdf to topic 123"
  • "Bulk-upload the documents in ./docs to topic 456"

doc2markdown — convert documents to Markdown

Uploads a document (docx, doc, pdf, ppt, xlsx, images, epub, mobi and many more) to the docchain parsing service and downloads the converted Markdown next to the source file — either a single .md file (--md) or a package with images and tables.

How to use it — point it at a file path, e.g. "read the content of ./report.pdf" or "convert 合同.docx to Markdown".

Examples:

  • "Summarize the content of /path/to/report.pdf"
  • "Convert 合同.docx to a single Markdown file"

The service URL and API key follow the same config chain as the search scripts, but both are optional: without configuration the built-in default (https://lab.hjcloud.com/llmdoc) is used with anonymous upload.

docchain-image-search — find similar images

Uploads one local image to the active environment and returns similar pictures found in the documents — the pictures themselves, plus their topic (id and name), document name and similarity score. Matched images are downloaded to a temp directory so they can be shown in the conversation.

How to use it — attach a photo or screenshot and ask. The docchain API has no global image search, so the search is scoped to topics: by default the topics selected on the configuration page, or --topic_ids for others, or --all to walk every topic.

  • "Which document is this screenshot from?"
  • "Find images like this one"

Things worth knowing:

  • score is the service's visual similarity (0–1; an identical image scores 1), not the assistant's judgement. Read it as a ranking, not an absolute verdict — a low score does not by itself mean "unrelated".
  • Availability is per topic: image vectors are built one topic at a time, so a topic that was never vectorized answers every query with an empty list (observed: on the same instance, topics with vectors match and topics without return nothing). The script says so instead of pretending the library has nothing.
  • A few images make the service answer HTTP 500 (that picture cannot be processed); the script reports it per topic instead of failing silently.
  • --all walks every topic — slow and request-heavy (thousands of queries). Prefer the selected topics when you know them.

docchain-image-describe — turn a document's images into text

Reads the document's main markdown, hands each image to a multimodal model, inserts <!-- image-desc: … --> directly above every image, and saves the result as that document's sidecar description markdown.

Flowcharts and architecture diagrams take a different route: the model answers with a node/edge graph, and the script renders it as a plantuml sketch block placed where the description would be. The model never writes PlantUML itself — syntax is generated by the script, so the block is always valid — while photos, screenshots, line charts and tables keep the Chinese description.

The main markdown is never touched: descriptions live in a separate file, read back with GET /v1/doc/read?doc_id=<id>&read_format=image_description_md. Normal reading behaviour is therefore unchanged, and a chat agent reads the sidecar only when it needs the picture semantics.

How to use it:

  • "Turn every image in 125755 into text"
  • "Find documents named like…, I'll pick one" (keyword alone returns candidates only and processes nothing)
  • "Is 125755's description ready?" (read: true)
  • "Which vision models can this machine use?" (list_models: true)

Things worth knowing:

  • Time: descriptions target information density (avg ~350–400 characters), so one image takes ~8–12 s. A structure image costs 3 calls (classify + read + judge) and takes ~25–50 s; a description image costs 2 (classify + describe). Nine images measured 1–4 minutes (the gateway varies a lot). A document is processed in one pass by default; max_images is only for capping cost — it cannot tell you whether the descriptions are any good, and splitting the work in two makes the user pick a vision model twice.
  • Classify first: every image is first asked one question — structure or description — and is only allowed to answer a single word. The criterion is whether the connector lines carry the information: lines present and removing them loses the relationships → structure; layout infographics that rely on colour blocks / columns / side labels, or parallel lists whose boxes are not connected → description (even when there are many boxes). diagram.structured / diagram.as_prose report the two counts, diagram.suspect counts images classified as description that answered with graph data and were re-asked once, and diagram.annotation_guard counts images classified as structure whose node labels looked like layout annotations and were demoted back to a description.
  • Same output shape for both kinds: structure images become a plantuml block, everything else becomes a Chinese description comment. Either way the original image is no longer embedded — it becomes a single [原图](url) link you can click to compare.
  • Suspect re-check: only when an image was classified as description but its answer contained the graph signature "nodes": (it clearly saw a structure) is it re-asked with the structure prompt; if that yields a graph, the image is promoted to a sketch. Deliberately not done for every image, to avoid paying an extra call each time. Measured: 0 triggers across 14 images in two documents.
  • Two-pass reading: structure images are read once by model and once by judge_model. The second pass does two things: (1) drop only edges whose direction is contradicted by the other read, keeping everything else; (2) compare the node sets and report how many labels the judge saw but the primary did not as diagram.missing_from_primary — a warning only, never auto-added, because the judge can hallucinate departments too and merging them would manufacture new errors. Set docchain_vision_judge_model to an empty string to disable the second pass and halve the calls.
  • Limits: at most 80 nodes / 140 edges per sketch; only content rendering beyond 6000 characters is trimmed. These are blow-up guards, not editorial ones — an ordinary org chart (40–60 boxes) is no longer trimmed at all. The reason is what the output is for: the sketch is code the chat assistant reads, so dropping one node means it will never know that department exists (a real 41-node org chart was once cut to 24, losing 13 teams without a trace). Should trimming still trigger, the dropped count is reported as diagram.trimmed and a DIAGRAM_TRIMMED warning is added.
  • Inferred edges are dotted: numeric labels on the chart (1, 2, …) are treated as noise and dropped; to keep the trunk connected, a dropped node's predecessor is wired straight to its successor — a connection the original image does not contain. Such edges render as dotted ..>, are counted in diagram.speculated, and raise a DIAGRAM_SPECULATED warning. Only solid arrows are relationships the image actually shows.
  • Missing nodes are reported: diagram.missing_from_primary counts labels the judge read but the primary missed. Anything above 0 raises a DIAGRAM_MISSING warning and means the sketch may be under-drawing — a blank is far harder to notice than an extra line.
  • Truncated names are recorded: labels over 28 characters get shortened (observed: 「郑州开发一团队」→「郑州开发一团」). The count lands in diagram.labels_truncated and a DIAGRAM_LABEL_TRUNCATED warning lists the original alongside the shortened form.
  • Every box must be listed: the prompt asks the model to count the boxes first and report that number as boxCount before listing nodes, and it no longer caps the node count (it used to say "no more than 20", contradicting the 80-node limit in code — which made the model under-read on purpose). The fan-out limit also went from 8 to 40: an org chart is by nature one centre with twenty-odd parallel departments, and 8 threw away every edge and node past the ninth.
  • Under-reading is detected and re-asked: when the model's own boxCount exceeds the nodes it actually listed, it has admitted a gap, so the tool asks once more with the target count spelled out. Counts land in diagram.under_read / under_read_fixed with a DIAGRAM_UNDER_READ warning.
  • Trustworthy range: simple trees up to 8 nodes are reliable. Above that, check three things — whether a side box got flattened into a peer child, whether nodes are missing at the end of a row, and whether any subtree floats without a parent. For long images stitched from several trees, prefer diagram: "off" (plain descriptions).
  • Layout-infographic guard: even when an image is classified as structure, if ≥3 and ≥25% of the "node labels" look like layout annotations (containing :,。;、 or a · separator), the sketch is dropped and the image falls back to a description (counted as diagram.annotation_guard). An ellipsis … is not evidence — it is merely the mark left by truncating a long name, and using it wrongly demoted a normal org chart.
  • Stacking cleanup: any pre-existing image-desc comments in the main md are stripped before this run's output is written, so one image never shows both an old comment and a new sketch.
  • Noise rules: 1–2 digit ordinals, pure symbols and L×/N×/×N repeat counts are dropped, while 4096 / 224×224×3 (real layer widths and sizes) are kept; nodes with the same label and identical neighbours are merged (a same-label chain like 512→512→512 is not).
  • Sketch, not a redraw: all structure images are drawn as labelled boxes and arrows, laid out top-to-bottom (the reading column is narrow; left-to-right always got clipped). A sequence diagram is not rendered as a proper participant/message sequence. If the graph is unusable a single plain-description call is made first (diagram.prose_retry) before the image is reported as failed.
  • Precision over verbosity: proper nouns, field names, units, numbers and formulas are copied verbatim, while pure decoration (rounded corners, line styles, fills) and repeated clauses are dropped — measured 57% shorter than the "full fidelity" prompt, with more information rather than less.
  • Length: one description is capped at 2000 characters by default (docchain_vision_max_desc_chars). Overlong results are first compressed by the model (names/numbers/formulas kept, modifiers dropped); only what still overflows is cut at a sentence boundary. Three counters tell the story: compressed (went through compression), truncated (still cut), incomplete (hit max_tokens, content stops mid-sentence) — only a non-zero truncated/incomplete means information was lost.
  • Concurrency: 8 is the measured sweet spot; from 12 the gateway answers 429, and 3/4 are actually slower (gateway batching).
  • Idempotency: each run rebuilds from the clean main md, so markers never accumulate — but model output varies, so two runs are not byte-identical.
  • Size: 185 images produce roughly a 1.4 MB description markdown; above 400 images the result carries a LARGE_PAYLOAD warning.
  • Descriptions are model readings: dense tables and formulas can be misread — check the original image for critical numbers.

Vision model configuration: the image-description model follows the model you pick in the chat, and the tool has no model argument — nothing can silently substitute one. If your chat model cannot read images, the tool pauses and asks you to pick a vision model from the gateway list; that pick applies to this call only and never changes your chat model. The fields below are the fallback used when no chat model can be resolved. Defaults to https://lab.iwhalecloud.com/gpt-proxy/v1, keyed by the IWHALE_API_KEY credential. To change endpoint or length cap, edit these fields (the configuration page does not render inputs for them):

docchain_vision_url: https://lab.iwhalecloud.com/gpt-proxy/v1
docchain_vision_model: doubao-seed-2.0-pro         # fallback only: used when no chat model resolves
docchain_vision_candidates: doubao-seed-2.0-pro,g-doubao-seed-2.1-pro,qwen3-vl-plus,glm-5v-turbo,g-gpt-5.6-sol
                                                  # comma-separated, best first. Order comes from a measured
                                                  # benchmark (5 models x 6 real org charts x 2 runs each):
                                                  # both doubao models were 6/6, qwen3-vl-plus scored 0 on
                                                  # two-row peer charts, and glm-5v-turbo misclassifies
                                                  # simple fan-outs as prose. The first usable one is the
                                                  # fallback primary; the judge is the first usable one that
                                                  # differs from the primary (reading with the same model twice
                                                  # gives no second opinion). Shipped in this plugin's own
                                                  # cordis.patch.yml, so a fresh install already has it.
docchain_vision_judge_model:                      # leave empty to let the candidate list choose the judge.
                                                  # Set it explicitly to "" to read once (no judge).
docchain_vision_fallback_model: g-deepseek-v4-flash   # used once when the primary model is unavailable
docchain_vision_key_ref: IWHALE_API_KEY               # credential reference name
docchain_vision_max_desc_chars: 1200                  # per-description character cap
docchain_vision_diagram: on                           # structure diagrams as plantuml sketches; "off" = descriptions only

The CLI uses VISION_BASE_URL / VISION_MODEL / VISION_JUDGE_MODEL / VISION_FALLBACK_MODEL / VISION_API_KEY / VISION_MAX_DESC_CHARS / VISION_DIAGRAM instead. Use list_models to see which vision models your key can actually reach.

Bring your own model service: point docchain_vision_url + docchain_vision_key_ref at your own OpenAI-compatible gateway (Volcengine Ark, Alibaba Bailian, self-hosted vLLM all work). The model list adapts to your gateway:

  • If the gateway returns an is_vision field, that field is authoritative.
  • If it does not (Davinci/Doubao official, Alibaba, and OpenAI /v1/models only return ids), models are recognised by name (vision, vl, gpt-4o, doubao-2.x, …).
  • When none of the built-in candidate names exist on your gateway, the list follows your gateway's own order instead of offering models you cannot call.

When no vision model is reachable (for example a DeepSeek account, which only has text models), the tool does not open a picker; it fails fast with:

当前没有可使用的视觉模型,请更换 API key 选择可使用的视觉模型。

That avoids making the user pick something that cannot work.

deep-research-advanced — multi-subagent deep research

A ReAct orchestrator-style deep-research workflow (pure instructions, no scripts): the main agent probes the topic, splits independent sub-tasks and dispatches them to parallel subagents; each subagent iterates on retrieval, close reading and deduction and returns a sub-report with its reasoning chain; the main agent cross-validates, reviews and enforces at least two global loops before deciding to stop. The final report is logic-closed, traceable and low-hallucination.

When to use — complex, open-ended questions that need external evidence and logical deduction: industry analysis, market research, competitive analysis, policy interpretation, technology research, trend forecasting. Do not use it for simple Q&A or basic computation.

Uninstall

Removing the bundle unregisters the provider and its skills:

dsh plugin remove dsh-docchain

(or plugin_manager remove_bundle).

Uninstalling does not clean up what this plugin wrote: ~/.dsh/storages/docchain-config.json and any DOCCHAIN_API_KEY__* entries in ~/.dsh/.credentials.yaml stay behind and must be removed by hand.

—/ 5

No ratings yet

Verified DSH bundle

Commit f17a5ced1a24

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout