Kingdee Business Portal DSH Local Plugin

Introduction

DeepSeek Harness (DSH) extends its sidebar capabilities through plugins to meet localized business integration needs. Existing integration solutions often rely on public internet services or administrator privileges, requiring company provisioning, public network access, and posing risks of account sharing or centralized management. The local plugin model eliminates these constraints.

Plugin Overview

littlebeaverstudio/kingdee-portal is a local Kingdee Business Portal DSH plugin. It opens the full Kingdee Business Portal in the DSH left sidebar, using your own Kingdee Cloud Galaxy account for login. The portal listens only on localhost, connects directly to your own Kingdee server for data retrieval, requires no administrator to provision a company instance, no public internet service, and embeds no integrated accounts.

The plugin is maintained by LittleBeaverStudio and categorized as a client. It currently has 0 stars.

Core Capabilities

The plugin starts a Python service on 127.0.0.1:8985 locally, and the sidebar embeds the full page via iframe. What data can be retrieved is entirely determined by Kingdee’s permission system. The portal does not switch accounts or provide fallbacks.

Four Dashboards

Four dashboards are provided: Expense Reimbursement, Financial Health & Risk, Sales & Collections Performance, and Cash Flow. Each dashboard supports organization filtering, drill-down, trend display, and CSV export.

Write Operation Controls

Expense processing and Invoice Cloud are optional features; write operations are disabled by default. The master switch for write operations can be enabled via the configuration item enable_write_ops.

Installation & Activation

Prerequisites: Python 3.10+, Node.js + pnpm, and a working DSH client. Verified on Windows + DSH Desktop.

git clone https://github.com/LittleBeaverStudio/kingdee-portal.git
cd kingdee-portal
python -m pip install -r requirements.txt

Configuration (optional): The repository provides portal_config.example.json. It can run without copying (the program automatically falls back to the example configuration). Copy it when you need to change the port, session duration, etc.:

cp portal_config.example.json portal_config.json

Attach the plugin to your DSH profile (using desktop as an example; replace the path with your own clone directory):

dsh plugin --profile desktop add "link:D:/kingdee-portal/dsh-plugin"

Equivalent manual approach — edit ~/.dsh/profiles/desktop/package.json:

{
  "dependencies": {
    "@littlebeaverstudio/kingdee-portal": "link:D:/kingdee-portal/dsh-plugin"
  },
  "dsh": {
    "profile": {
      "bundles": ["@deepseek-ai/dsh-base", "@littlebeaverstudio/kingdee-portal"]
    }
  }
}

The bundles array retains existing entries; you only need to append @littlebeaverstudio/kingdee-portal. Then restart DSH, and “Kingdee Portal” will appear in the left navigation. The first click will automatically start the local service (approximately 1–3 seconds).

Compatibility & Updates

The plugin has been verified on DSH Desktop (Windows). Sidebar injection depends on @deepseek-ai/dsh-client-ui-sidebar-right and @deepseek-ai/dsh-client-locale. If your DSH version is too old and lacks the above built-in packages, dsh plugin add may report missing dependencies. It is recommended to upgrade to a version that includes these two packages before installing.

To update the plugin:

cd <clone directory>
git pull
dsh plugin --profile desktop update "@littlebeaverstudio/kingdee-portal"

If you installed using the github: method, simply re-run dsh plugin --profile desktop add github:LittleBeaverStudio/kingdee-portal to overwrite. Restart DSH after updating.

Using Without DSH

Without installing DSH, you can still use this plugin:

python -X utf8 scripts/serve_local.py --port 8985 --no-warmup

Open http://127.0.0.1:8985 in your browser. Enter the company name, Kingdee server address, account, and password; for multi-account environments, select or enter the accounting set in “Connection Settings”. Single-account environments are detected automatically.

Configuration Reference

Item Default Description
host / port 127.0.0.1 / 8985 Listens on loopback only
allow_http / block_private_network false / true Server address requires HTTPS by default, and private network addresses are rejected
allow_local_embedding false Only DSH local mode allows embedding per policy; non-local mode does not inherit
enable_write_ops false Master switch for expense processing write operations
warmup_auto / debug false / false Background warmup and debugging are disabled
expense_skill_dir empty Optional; can also be set via environment variable PORTAL_EXPENSE_SKILL_DIR

Do not commit your portal_config.json (containing server address and accounting set) or credentials into the repository. In the example configuration, server_url, acct_name, and scheme_id are all empty.

Privacy & Data

The portal listens only on 127.0.0.1. Credentials exist only in memory, and no business data is uploaded to the author or any third party.

Data Stored Where Retention External Transmission
Kingdee credentials Flask process memory only Cleared on service restart Never
Session token Browser sessionStorage Expires when the page session ends Never
Runtime state state.db / state.key Local .portal-state-dsh/ or ~/.kingdee-portal/ Until manually deleted Never
Invoice Cloud authorization Local, isolated per company Until manually deleted Only when calling your configured Invoice Cloud API
Dashboard business data Process memory + local cache Session end / cache expiry Communicates only with your own Kingdee server

What the plugin does: credentials in memory only, runtime data stays local, background tasks are cleaned up on logout, write operations disabled by default.

What the plugin does NOT do: no telemetry / analytics / crash reporting, no uploading of credentials or business data, no third-party analytics SDK, no built-in integrated accounts.

Testing & Release Checks

Pre-release checks and tests:

python -X utf8 scripts/check_public.py
python -m unittest discover -s tests -p 'test_*.py' -v

check_public.py scans for real company names, secrets, runtime state, audit logs, and absolute paths on development machines. Anything outside the release whitelist should not enter the public repository. Browser regression scripts are in tests/ui_*.py, using synthetic data without connecting to a real Kingdee instance. The real Kingdee login flow has been verified locally; first-time installation on other machines, real Invoice Cloud uploads, and full-role permissions have not yet been verified.

Directory Structure

Path Purpose
dsh-plugin/ DSH plugin (Host process management + sidebar client + patch + i18n)
app.py / store.py Flask service and local session, task, and configuration storage
metrics_*.py Data retrieval logic for the four dashboards
portal_actions.py / vendor/helpers/ Expense processing, Invoice Cloud (partially from kingdee-data-exporter)
static/ templates/ Frontend
scripts/ Local service entry point and release checks

License

The original code in this project is under the LittleBeaverStudio Non-Resale License 1.0: free for personal and internal enterprise use; resale is prohibited. Some code is adapted from kingdee-data-exporter, including parts of vendor/helpers/ and the KDS request and decoding implementation in financial_reports.py; these portions remain subject to the accompanying Non-Resale License. The complete release package contains code under different licenses; please comply with the respective terms when using or redistributing.

Use Cases & Notes

Suitable for users who want to view Kingdee business data directly in the DSH left sidebar, use their own permission system, and do not rely on public internet or administrator provisioning. The plugin runs with the current DSH process privileges. It is recommended to review the source code and license before installation.

Conclusion

The local Kingdee Business Portal DSH plugin opens the full Kingdee Business Portal in the DSH left sidebar, using your own Kingdee Cloud Galaxy account. Data remains on your local machine.

  • Directory page: https://www.skillhub.cn/plugins/LittleBeaverStudio/kingdee-portal
  • GitHub: https://github.com/LittleBeaverStudio/kingdee-portal
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye