Introduction¶
In DeepSeek Harness (DSH), enabling agents to read and write ERP data commonly involves hand-writing HTTP calls, stitching together sessions yourself, and splitting the document state machine (save, submit, audit) into multiple scripts. Kingdee Cloud Starry Sky (金蝶云星空) exposes a WebAPI, but field names, form IDs, login mechanisms, and public cloud policies are not intuitive, and secrets are not suitable for hardcoding into configuration files.
The community plugin dsh-kingdee (maintained by maxwell-feng) is introduced below. On the DSH side it provides a set of typed kingdee_* tools that, via the official WebAPI, perform queries, saves, submissions, audits, un-audits, views, and deletions of documents and master data, as well as BOS custom service invocations; it also ships the domain skill kingdee-bos, which documents field/enum/status conventions and the “data layer / platform plugin layer” boundary. The plugin is categorized as a network tool and currently has 0 GitHub stars.
What Is This¶
dsh-kingdee is a bridging plugin between Kingdee Cloud Starry Sky secondary development and DeepSeek Harness: agents invoke tenant WebAPIs through DSH tools instead of pasting account credentials into conversations. The README explicitly states its coverage is the data/service layer; server-side C# form/list plugins, UI layouts, and background events in the platform plugin layer must be completed in the BOS integrated development environment and cannot be reached via WebAPI. The kingdee-bos skill documentation explains this boundary.
It is implemented in pure TypeScript, ships a bilingual README/configuration documentation, and follows the DSH 0.2.1-rc.2 plugin display conventions (including icon.svg and Chinese/English manifest resources).
Core Features¶
Credentials and Connection¶
- credential-safe: Secrets are resolved through DSH’s credential mechanism into environment variable references; the configuration contains only reference names, not plaintext.
- Two login paths: Account set username/password goes through
AuthService.ValidateUser; third-party applications go throughAuthService.LoginByAppSecret(the README notes that public cloud tenants opened after 2022-11-29 typically require this mode). Both methods use the officialkdservice-sessionid(as both a request header and a Cookie) and do not fabricate authentication headers per business envelope; login results are determined byLoginResultType. - Version adaptation: Fully adapted for Kingdee Cloud Starry Sky V9.1 Enterprise Edition, with backward compatibility for V9.0 / V8.x; supports stable cursor pagination (
orderString,limit,startRow), flow by document number (numbers), and capabilities such asisAutoSubmitAndAudit(see the repository CONFIG/USAGE documents for details). - SSRF protection: Only http/https is allowed, with boundary validation of the host, blocking localhost, loopback, private networks, and reserved network segments.
Document State and Tool Surface¶
The README provides an out-of-the-box state machine: Create/Update → Submit → Audit → Un-audit. The following are the tools listed in the document’s Tools table and their main parameters (other capabilities follow the README feature descriptions; all names use the kingdee_* prefix):
| Tool | Description | Key Parameters |
|---|---|---|
kingdee_query |
ExecuteBillQuery, queries documents/master data |
formId, fieldKeys[], filter?, topCount?, organization? |
kingdee_query_business_data |
Structured query QueryBusinessData |
same as above |
kingdee_save |
Save (create/update) | formId, data, interaction? |
kingdee_batch_save |
Batch save | formId, records[], interaction? |
kingdee_submit |
Submit | formId, ids[], numbers? |
kingdee_unsubmit |
Unsubmit | formId, ids[] |
It also supports audit, un-audit, view, delete, and invoking BOS custom services; full parameters see the repository USAGE.md.
Offline Mock¶
When mock: true is configured, it switches to a local transport layer that returns preset Kingdee-style envelopes, making it easy to demo or run pipelines when no tenant is available. The settings card does not expose mock; it must be written in the configuration file, e.g.:
config:
mock: true
Installation and Activation¶
Add the bundle to a DSH profile and enable it (command from the official README):
# Add the bundle to a DSH profile and enable it
dsh plugin --profile web add dsh-kingdee
Correspondence with DSH versions (excerpted from the README): The plugin declares >=0.1.7-alpha.2 <0.3.0 on engines.dsh; 0.15.0 has been verified on DeepSeek Harness 0.2.1-rc.2 (typecheck/build passing, 15 unit tests passing; no joint debugging verification against a real tenant). The older 0.10.0 declares ^0.1.7-alpha.2 and will be rejected at load time on 0.2.x. On 0.2.x you can run dsh plugin --profile web add dsh-kingdee@0.15.0 to upgrade; the current version in package.json is 0.15.1.
CLI syntax note: Since DSH 0.2.1-alpha.1, --profile <name> must be written before subcommands such as add, remove, update, otherwise the flag will be forwarded to pnpm causing failure.
If a version is rejected, the Harness may prompt to use dsh plugin allow-version <package@version> --dsh-version <runtime> --accept-risk to record an exact version exemption; this is a risk confirmation, not a compatibility fix.
Typical Usage¶
1. Configure connection and authentication mode¶
Fill in the WebAPI base URL, acctId, and authentication mode in the Plugins → kingdee settings card (or cordis.yml).
2. Inject secrets (reference names, not plaintext)¶
Linux / macOS example:
export DSH_KINGDEE_USER=your_username
export DSH_KINGDEE_PASSWORD=your_password
# app mode: DSH_KINGDEE_USER is the integration user, and is required
export DSH_KINGDEE_APP_SECRET=your_app_secret
You can also write values in the DSH credential store or $DSH_HOME/.credentials.yaml; the configuration keeps only reference names. Persistence methods for each OS see INSTALL.md.
3. Drive queries with natural language¶
Describe the task to the agent, e.g.:
Query sales order number SO-20260701 on Kingdee Cloud.
The agent will load the kingdee-bos skill and invoke kingdee_query, e.g. formId=SAL_SaleOrder (subject to the actual form ID).
More complete configuration fields, upgrade, and uninstall steps see the repository CONFIG.md, INSTALL.md, UPDATE.md, UNINSTALL.md.
Use Cases and Notes¶
Who it’s for: Secondary developers who are already building agents in DSH and need to query/modify documents/master data per the Kingdee Cloud Starry Sky WebAPI specification, or invoke BOS custom services; when you want login sessions, pagination, and document flows encapsulated as stable tools rather than ad-hoc scripts.
Must know:
- The plugin accesses the WebAPI address you configured with the current DSH process permissions; before installing, review the source code and license yourself and confirm the tenant’s network policies and account permission scope.
- The community directory SkillHub plugin page and GitHub repository are published by the maintainer and have no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem follows “everything is a plugin”, and the directory site is an independent community index, not an official app store.
- The README already declares: no joint debugging verification against real tenants; before production use, complete authentication, form ID, and permission testing in your own environment.
Conclusion¶
dsh-kingdee wraps the Kingdee Cloud Starry Sky WebAPI into typed tools that DSH can orchestrate, combined with the kingdee-bos skill to constrain domain knowledge boundaries, making it suitable for credential-safe, auditable ERP data layer automation in the Harness.
- Directory page: https://www.skillhub.cn/plugins/maxwell-feng/dsh-kingdee
- Source code and documentation: https://github.com/maxwell-feng/dsh-kingdee