# Changelog

English | [Chinese](CHANGELOG.zh.md)

All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/).

## [0.14.0] - 2026-10-16

**DeepSeek Harness 0.2.1-alpha.4 alignment & license-statement correction** — no runtime, configuration or tool-surface change.

### Changed

- **Harness alignment.** Every `@deepseek-ai/dsh-*` devDependency moves from `0.2.1-alpha.2` to `0.2.1-alpha.4`, and the lockfile is regenerated against 0.2.1-alpha.4. `@deepseek-ai/cordis` stays `^4.0.4` and `@deepseek-ai/schemastery` stays `^3.18.4`.
- **Supply-chain gate.** The workspace file exempts the 0.2.1-alpha.4 package set from pnpm's minimum-release-age gate, which otherwise rejects DSH's continuously published prereleases. The previous exemption list also carried a duplicate `minimumReleaseAgeExclude` key whose stale `0.2.0-rc.2` entries made pnpm reject the regenerated lockfile; the list is now a single, lockfile-derived block.
- **Peer ranges are unchanged.** They stay `>=0.1.7-alpha.2 <0.3.0`, so this release is **not a mandatory upgrade**: `dsh-kingdee@0.13.0` is still admitted on DeepSeek Harness 0.2.1-alpha.4.
- **Source change.** None. No file under `src/`, `test/`, `scripts/`, `.github/`, `skills/`, `cordis.patch.yml` or the build configuration changed, and no configuration field moved: the plugin behaves exactly as 0.13.0. The 0.2.1-alpha.3 and 0.2.1-alpha.4 releases changed no `@deepseek-ai/dsh-web`, `@deepseek-ai/dsh-tools`, `@deepseek-ai/dsh-credentials` or `ctx.configForms.get()` contract this plugin consumes.

### Fixed

- **The README license section contradicted the LICENSE file in both languages.** `README.md` and `README.zh.md` described this repository as under a "proprietary license (all rights reserved)" while `LICENSE` and `package.json.license` have carried the MIT License since `0.5.0`; GitHub and npm both report `MIT` for the published package. Both README files now state MIT and link the LICENSE file.
- **The changelog never recorded the license revert.** The `0.2.0` entry still described the proprietary grant as current. It now marks that grant as reversed, and the `0.5.0` entry records the MIT restoration, so the version history matches the shipped artifacts.

### Verification

- `pnpm run typecheck` clean, `pnpm run build` clean (`tsc -p tsconfig.build.json` plus the `tsdown` client bundle), and all **15** unit tests pass (`pnpm test`) against DeepSeek Harness 0.2.1-alpha.4.
- `node scripts/check-docs-language.ts` passing with zero language or switcher violations across all document pairs.
- Not verified: a live boot into a real 0.2.1-alpha.4 profile, and — as always — no live Kingdee tenant.

## [0.13.0] - 2026-10-11

**DeepSeek Harness 0.2.1-alpha.2 alignment & Display Metadata Manifest Support** — display assets, self-contained prepare build, strict pure TypeScript, and latest CLI option syntax.

### Added

- **Display metadata and icon.** Bundled native `icon.svg` vector artwork and bilingual manifest resources (`locale/en.json`, `locale/zh.json`) conforming to DSH 0.2.1-alpha.2 display conventions for Plugin Manager. `package.json` exports `./locale/*.json`, `./icon` and declares top-level `"icon": "./icon.svg"`.
- **Self-contained prepare script.** Configured `"prepare": "tsc -p tsconfig.build.json && tsdown"` in `package.json` to enable direct git installs without requiring a global `pnpm` binary.

### Changed

- **Harness alignment.** Upgraded all development dependencies to DeepSeek Harness 0.2.1-alpha.2. `@deepseek-ai/cordis` remains `^4.0.4` and `@deepseek-ai/schemastery` remains `^3.18.4`.
- **Peer ranges compatibility.** Maintained peer dependencies range `>=0.1.7-alpha.2 <0.3.0`, so `dsh-kingdee@0.12.0` and `dsh-kingdee@0.11.1` remain admitted on DeepSeek Harness 0.2.1-alpha.2 without requiring manual exemptions.
- **Pure TypeScript architecture.** Strengthened schema export typing in `src/config.ts` (`export const Config: Schema<Config>`) to eliminate TS2742 non-portable type warnings under pnpm virtual store layouts while ensuring strict 100% pure TypeScript compliance.
- **CLI syntax documentation.** Updated all guides to place `--profile <name>` before forwarded subcommands such as `add`, `remove`, and `update`.

### Verification

- `pnpm run typecheck` clean, `pnpm run build` clean, and all **15** unit tests pass (`pnpm test`) against DeepSeek Harness 0.2.1-alpha.2.
- `node scripts/check-docs-language.ts` passing with zero language or switcher violations across all document pairs.

## [0.12.0] - 2026-09-29

**DeepSeek Harness 0.2.0-rc.2 alignment** — no runtime, configuration or tool-surface change.

### Changed

- **Harness alignment.** Every `@deepseek-ai/dsh-*` devDependency moves from `0.2.0-rc.1` to `0.2.0-rc.2`, and the lockfile is regenerated against 0.2.0-rc.2; `@deepseek-ai/cordis` stays `^4.0.4` and `@deepseek-ai/schemastery` stays `^3.18.4`.
- **Peer ranges are unchanged.** They stay `>=0.1.7-alpha.2 <0.3.0`, the range 0.11.0 widened, so this release is **not** a mandatory upgrade: `dsh-kingdee@0.11.1` is still admitted on DeepSeek Harness 0.2.0-rc.2. 0.12.0 is the version verified against 0.2.0-rc.2 and aligned with its development dependencies.
- **Supply-chain gate.** The workspace file now exempts the 0.2.0-rc.2 package set from pnpm's minimum-release-age gate, which otherwise rejects DSH's continuously published prereleases.
- **Source change.** None. No file under `src/`, `test/`, `scripts/`, `.github/`, `skills/`, `cordis.patch.yml` or the build configuration changed, and no configuration field moved: the plugin behaves exactly as 0.11.1.

### Verification

- `pnpm run typecheck` clean, `pnpm run build` clean (`tsc -p tsconfig.build.json` plus the `tsdown` client bundle), and all **15** unit tests pass (`pnpm test`) against DeepSeek Harness 0.2.0-rc.2.
- The harness's own published `evaluatePluginCompatibility` / `getDshRuntimeVersion` from `@deepseek-ai/dsh-app-boot@0.2.0-rc.2` report runtime `0.2.0-rc.2` and admit `dsh-kingdee@0.12.0` on `0.2.0-rc.2`, `0.2.0-rc.1`, `0.2.0`, `0.1.7-rc.2` and `0.1.7-alpha.2`; they refuse `dsh-kingdee@0.12.0` on `0.1.6-alpha.2`. The earlier `dsh-kingdee@0.10.0`, whose peers are `^0.1.7-alpha.2`, is still refused on `0.2.0-rc.2`.
- Not verified: a live boot into a real 0.2.0-rc.2 profile (no `dsh` CLI exists on the verification machine), and — as always — no live Kingdee tenant.

## [0.11.1] - 2026-09-28

**Documentation-only release** — no runtime, configuration or tool-surface change.

### Fixed

- **English 0.7.0 entry was thinner than the Chinese one.** It was missing the third-party `LoginByAppSecret` login, the removal of the fabricated `KDAuthentication` header together with the new `userNameRef` requirement in `app` mode, and the login-response fix (`parseLoginOutcome`) that had made authentication fail on a real tenant. All three are now documented.
- **Chinese 0.6.1 category heading and one vague item.** The Chinese heading now reads simply *Removed*, matching the English `### Removed`, and the trailing filler item with no English counterpart was removed.
- **Two different placeholder hosts for one example.** The configuration guide used `https://erp.mycompany.com/K3Cloud` where the other guides use `https://erp.example.com/K3Cloud`; both languages now use `erp.example.com`.
- **Chinese configuration guide stated the credential-seam contract as prose** where English lists two bullets; the Chinese side now carries the same two bullets.
- **Chinese install guide omitted `172.16.0.0/12`** from the blocked private ranges listed in the prerequisites.
- **Chinese guide section numbers now match the English ones.** The install and uninstall guides numbered their top-level sections with Chinese numerals where English uses `1.`–`5.`; both languages now number them the same way, so every pair lines up section for section.

### Verification

- `pnpm run typecheck` clean, `pnpm run build` clean, and all **15** unit tests pass against DeepSeek Harness 0.2.0-rc.1; `package.json` changes in its version only, so the peer declarations are the 0.11.0 ones the harness gate already admits.
- `node scripts/check-docs-language.ts` green, plus two mechanical proofreading passes over every bilingual pair: structure and code-fence parity, mojibake and control-character scan, newest-first changelog ordering, link-reference coverage, and per-section bullet correspondence.

## [0.11.0] - 2026-09-28

**DeepSeek Harness 0.2.0-rc.1 alignment and peer-range widening** — no runtime, configuration or tool-surface change.

### Changed

- **Harness alignment.** Development dependencies move to DeepSeek Harness 0.2.0-rc.1, and this release is verified against it; `@deepseek-ai/cordis` stays `^4.0.4` and `@deepseek-ai/schemastery` stays `^3.18.4`.
- **Peer ranges widen to `>=0.1.7-alpha.2 <0.3.0`.** DeepSeek Harness 0.2.0-rc.1 introduced a hard peer-compatibility gate: before a plugin row loads, the harness checks every `@deepseek-ai/dsh` / `@deepseek-ai/dsh-*` peer entry against the single running runtime version, with prereleases participating in range matching, and refuses an incompatible row. The previous `^0.1.7-alpha.2` ranges exclude 0.2.x, so the credentials and tools peers now admit `0.1.7-alpha.2` through `0.2.x`: the plugin loads on both release lines, and it is still refused on `0.1.6-alpha.2`. `engines.dsh` is not what the gate reads.
- **Supply-chain gate.** The workspace file now exempts the 0.2.0-rc.1 package set from pnpm's minimum-release-age gate, which otherwise rejects DSH's continuously published prereleases, and the lockfile was regenerated against 0.2.0-rc.1.
- **Source change.** None. No file under `src/`, `test/`, `scripts/`, `.github/`, `skills/`, `cordis.patch.yml` or the build configuration changed, and no configuration field moved.

### Fixed

- **0.10.0 was refused at load on DeepSeek Harness 0.2.0-rc.1.** Its declared `@deepseek-ai/dsh-*` peers excluded 0.2.x, so the new gate refused the row. Widening the ranges admits the plugin on 0.2.0-rc.1 with no exemption; the guides now state that users on 0.2.0-rc.1 must upgrade to 0.11.0. `dsh plugin allow-version <package@version> --dsh-version <runtime> --accept-risk` remains available only as an exact-version risk acknowledgement recorded in the profile's `compatibility.json` — neither a plugin upgrade nor a harness upgrade inherits the grant.

### Verification

- Type check and build are clean, and all 15 unit tests pass against DeepSeek Harness 0.2.0-rc.1.
- `pnpm install` passes pnpm's supply-chain gate.
- The harness's own published `evaluatePluginCompatibility` / `getDshRuntimeVersion` from `@deepseek-ai/dsh-app-boot@0.2.0-rc.1` report runtime 0.2.0-rc.1, admit dsh-kingdee@0.11.0 on 0.2.0-rc.1, 0.2.0, 0.1.7-rc.2 and 0.1.7-alpha.2, and refuse dsh-kingdee@0.10.0 on 0.2.0-rc.1 with unsatisfied peers @deepseek-ai/dsh-credentials and @deepseek-ai/dsh-tools (^0.1.7-alpha.2). It likewise refuses 0.11.0 on 0.1.6-alpha.2.
- The packed 0.11.0 tarball carries the built `lib/`, `cordis.patch.yml`, the `skills/kingdee-bos` skill and the bilingual guides, and its manifest is the one that gate admits above.
- Not verified: a live boot into a real 0.2.0-rc.1 profile, and — as always — no live Kingdee tenant.

## [0.10.0] - 2026-09-24

**DeepSeek Harness 0.1.7-rc.2 alignment** — no runtime, configuration or tool-surface change.

### Changed

- **Harness alignment.** Development dependencies move to DeepSeek Harness 0.1.7-rc.2, and this release is verified against it.
- **Peer ranges are unchanged.** They stay ^0.1.7-alpha.2, the release line that introduced volatile config, so the plugin still installs on every 0.1.7 prerelease from alpha.2 through rc.2. The harness engine range and the Node engine range are unchanged.
- **Seam audit.** Every interface this plugin uses is identical in the rc.1 and rc.2 sources: the configuration schema the Host reads, the per-entry settings form, tool registration, the credential resolver, the configuration form the browser half reads, and the locale and slot registries.
- **Source change.** None. The only changed file in the packages this plugin consumes adds two optional fields to a type this plugin does not use.
- **Supply-chain gate.** The workspace file now exempts the rc.2 packages from pnpm's minimum-release-age gate, which otherwise rejects DSH's continuously published prereleases.

### Fixed

- **One Chinese entry covered a release at less depth than English.** The 0.3.0 entry carried a single line against the English entry's seam detail, dependency bump and documentation refresh; it now matches. The Chinese documentation list also links CHANGELOG.zh.md instead of the English changelog.

### Verification

- Type check and build are clean, and all 15 unit tests pass against DeepSeek Harness 0.1.7-rc.2.
- A frozen-lockfile install passes pnpm's supply-chain gate.
- The declared peers pass the host's own compatibility check on rc.2, rc.1 and alpha.2: admitted, no exemption required.
- The shipped 0.10.0 tarball installs into a real 0.1.7-rc.2 profile and composes as a dsh-kingdee layer under the row id kingdee, with every schema default applied.

## [0.9.1] - 2026-09-23

**Documentation and repository-tooling release** — no runtime, configuration or tool-surface change.

### Changed

- **The repository now holds TypeScript sources only.** The bilingual-documents gate moved from `scripts/check-docs-language.mjs` to `scripts/check-docs-language.ts`. Node ≥22.19 strips the types, so the gate still runs with no dependencies installed and still gates CI before the install step. `scripts/**/*.ts` joined the `tsconfig.json` include list, so `pnpm run typecheck` covers the gate as well, and `.gitattributes` no longer carries JavaScript line-ending rules.

### Fixed

- **Changelog bodies had been lost.** The 0.4.0, 0.3.0, 0.2.3 and 0.2.2 entries in the English changelog carried category headings with no content, and the 0.1.0 `Documentation` bullet was truncated mid-sentence. All are restored, and the Chinese 0.1.0 entry now covers that release at the same depth as English.
- **Section numbering in the configuration guide.** The guide had two `## 3.` sections and two subsections (`2.1` / `2.2`) hanging off the wrong parent; the sections are now numbered 1–6 with 3.1 / 3.2, and the "section 5" cross-reference points at the renumbered V9.1 conformance section.
- **Listing order.** The README Tools table now follows the same order as the per-tool reference in USAGE, and the Documentation list includes the configuration guide it had omitted.
- **Duplicated rules and heading levels.** Six duplicated `---` rules were removed from the Chinese changelog; both sides now use the same heading levels release for release, and both gained the link-reference block they lacked.

### Verification

- `pnpm run typecheck` clean (now including `scripts/`), clean build (`tsc` + `tsdown`), and **15** unit tests passing against DeepSeek Harness `0.1.7-rc.1`.
- `node scripts/check-docs-language.ts` green; the docs audit that found these defects reports no remaining findings.

## [0.9.0] - 2026-09-23

**DeepSeek Harness 0.1.7-rc.1 Alignment — schema-driven volatile configuration**

### Changed

- **Harness alignment**: `devDependencies` are pinned to DeepSeek Harness `0.1.7-rc.1` (the latest release) and the plugin is verified against it. The `@deepseek-ai/dsh-*` peer ranges are `^0.1.7-alpha.2` — the release line that introduced volatile config — so the plugin stays installable on both `0.1.7-alpha.2` and `0.1.7-rc.1`; the two are source-identical for every package this plugin consumes. `engines.dsh` is `^0.1.7-alpha.2`, `@deepseek-ai/cordis` moves to `4.0.4`, and `@deepseek-ai/schemastery` moves to `3.18.4`.
- **Configuration migrated to the 0.1.7 volatile schema**: every editable field is declared `.volatile()`, so `apply` receives one live reference per field. The plugin no longer registers a settings section — `ctx.settings.installSection`, `ctx.inject(['settings'])`, and the `@deepseek-ai/dsh-settings` dependency are gone. The Host discovers the exported `Config` schema itself (`entry.fiber.runtime.Config`) and renders this entry's form, keyed by the profile row id `kingdee`.
- **One config snapshot per operation**: `captureConfig` reads every reference once at the start of an operation, so one operation can never mix a `baseUrl` read from before a committed edit with a credential reference read from after it. Credentials still re-resolve per operation, so a rotated secret reaches the next call.
- **`pnpm-workspace.yaml`** now exempts the exact `0.1.7-rc.1` package set from pnpm's minimum-release-age gate, which otherwise rejects DSH's continuously published prereleases.
- **The build output is no longer tracked**: `lib/` is git-ignored and emitted by `pnpm build` (and by npm's `prepublishOnly` hook) before packing.

### Added

- **Harness compatibility gate documented**: DeepSeek Harness 0.1.7-rc.1 verifies a plugin's `@deepseek-ai/dsh*` peers against the running runtime and refuses an incompatible row at load. This release declares peers it satisfies, so no exemption is needed; the README and the upgrade guide document the refusal and its `dsh plugin allow-version` remedy.
- **Client card contract documented**: `src/client/settings-card.ts` is described as the browser half of the same per-entry `ConfigForm` the Plugins page owns.

### Fixed

- **The client half's `dsh.client.inject` list was incomplete.** The card registers into `plugins.row.config` / `plugins.bundle.config` (owned by `@deepseek-ai/dsh-client-ui-plugin-manager`) and reads `ctx.remote` and `ctx.connection`, but only `@deepseek-ai/dsh-client-locale` and `@deepseek-ai/dsh-client-ui-settings` were declared. It now declares `@deepseek-ai/dsh-client-ui-plugin-manager`, `@deepseek-ai/dsh-api-remotes`, and `@deepseek-ai/dsh-client-connection` too, matching the official client cards that use the same services.

### Verification

- `pnpm run typecheck` clean, **15** unit tests passing (`pnpm test`), clean build (`tsc` + `tsdown`), and `node scripts/check-docs-language.mjs` green.
- `pnpm install --frozen-lockfile` passes pnpm's supply-chain gate; the declared DSH peers pass DeepSeek Harness's own `evaluatePluginCompatibility` against runtime `0.1.7-rc.1`.

## [0.8.1] - 2026-09-18

### Changed

- **Language boundary completed.** Runtime strings are English only: the `kingdee_delete_draft` tool description, the settings-card user-name label, the `authMode: "app"` error message, and every source comment. Two exceptions stay Chinese by design — the login-word matcher in `src/kd-core/errors.ts`, which must recognize the Chinese error text the Kingdee WebAPI returns, and the Chinese product display name on the Plugins card.
- **Documentation normalized.** Every document is single-language — `X.md` English, `X.zh.md` Chinese — with complete pairs and switcher lines, and both changelogs now cover the same 13 releases.

### Added

- `scripts/check-docs-language.mjs` enforces documents, source strings and pairs locally and in CI, which runs it before installing dependencies.

## [0.8.0] - 2026-09-18

### Changed

- **DeepSeek Harness 0.1.6-alpha.2 Alignment**:
  - **Client configuration slot migration**: DeepSeek Harness `0.1.6-alpha.2` migrated plugin settings surfaces from the deprecated `settings.plugin.item` slot to the dedicated Plugins Manager page (`ui-plugin-manager`). `dsh-kingdee` now registers into `plugins.row.config` (keyed by `dsh-kingdee#kingdee`) and `plugins.bundle.config` (keyed by `dsh-kingdee`).
  - **Dual-view rendering (`summary` & `page`)**: Conforming to the new `PluginConfigViewProps` contract, the card now renders the concise summary description in `view: 'summary'` (used under titles on card heads and detail headers) and mounts the full interactive revision-fenced configuration form in `view: 'page'`.
  - **Dependency and engine bounds**: All `@deepseek-ai/dsh-*` peerDependencies updated to `^0.1.6-alpha.2`, devDependencies pinned to `0.1.6-alpha.2`, and `engines.dsh` updated to `^0.1.6-alpha.2`. Added `@deepseek-ai/dsh-client-ui-plugin-manager` to devDependencies.
  - **Refreshed all bilingual documentation** (`README`, `INSTALL`, `USAGE`, `CONFIG`, `UPDATE`, `UNINSTALL`, `CHANGELOG`, `docs/RELEASE`) for the `0.1.6-alpha.2` release.

## [0.7.0] - 2026-09-16

### Added

- **Kingdee Cloud Starry Sky V9.1 Enterprise Edition conformance**:
  - **Third-party application login (`AuthService.LoginByAppSecret`)**: `authMode: "app"` now performs a real `LoginByAppSecret` login (payload `acctID` / `username` / `appid` / `appsecret` / `lcid`) and requires `userNameRef` (the integration user) in addition to `appId` / `appSecret`, establishing the same `kdservice-sessionid` session as `user` mode. Kingdee refuses account/password login on public-cloud tenants opened after 2022-11-29, so those tenants must use this mode.
  - **`lcid` config key**: New optional locale id (number, default `2052` = zh-CN), sent to both login services.
  - **New endpoint fields**: `serviceEndpoints` gained `loginByAppSecretService` (default `Kingdee.BOS.WebApi.ServicesStub.AuthService.LoginByAppSecret`) and `stubSuffix` (default `.common.kdsvc`).
  - **Session on both channels**: the session is attached as both a bare `kdservice-sessionid` request header and a `Cookie` (`kdservice-sessionid=…; kdsvc=…`).

### Changed

- **Breaking-ish**:
  - `app` mode no longer fabricates a `KDAuthentication` header: it authenticates through `LoginByAppSecret` and then reuses the session exactly as `user` mode does, and the integration user name (`userNameRef`) is now required.
  - Every stub URL now ends with `.common.kdsvc`; the login stub is `AuthService.ValidateUser` and the logout stub `AuthService.LogOut` (previously documented through `LoginService.*`).
  - `kingdee_invoke` / `KdInvokeParams.serviceName` now takes the custom-stub path `{namespace}.{class}.{method},{assembly}` (e.g. `GetCust.GetCust.ExecuteService,GetCust`), which **replaces** the dynamic-form URL segment; `.common.kdsvc` is appended automatically.
  - `serviceEndpoints.servicePrefix` was removed, replaced by `loginByAppSecretService` + `stubSuffix`.
  - DSH pinned to `0.1.6-alpha.1` (peer ranges, devDependencies, `engines.dsh`).
- **Refreshed all bilingual documentation** (`README`, `INSTALL`, `USAGE`, `CONFIG`, `UPDATE`, `UNINSTALL`, `CHANGELOG`, `docs/RELEASE`) for the V9.1 target and the `0.1.6-alpha.1` verification.

### Fixed

- **Login responses were parsed as business envelopes, so a successful login reported failure**: the login services answer with their **own** shape (`{"LoginResultType": 1}`), not the `Result` / `IsSuccess` business envelope every other operation returns. Feeding the login response into the business-envelope assertion left `IsSuccess` absent → treated as `false` → **authentication could never succeed against a real tenant**. The login outcome is now classified separately by `parseLoginOutcome` (exported from the `kd-core` subpath): a numeric `LoginResultType` decides it (`1` is success, anything else throws `kd/auth-failed`), and a response without `LoginResultType` falls back to the business envelope. The offline mock now answers the login stub with the real `{"LoginResultType": 1}` shape so this path stays covered.
- **Custom BOS stub URL**: the path was previously prefixed with `Kingdee.BOS.WebApi.ServicesStub.`, which no BOS custom service can resolve; a custom path now replaces that segment entirely.
- **Missing `lcid`**: the login payload now carries `lcid`, which was previously absent.
- **Nonsensical `license: appId`** removed from the `user`-mode login payload.

### Removed

- `buildAppAuthHeader` removed from the `kd-core` subpath API (replaced by `buildAppSecretLoginPayload`).

## [0.6.1] - 2026-09-13

### Removed

- **Cleaned up dead code and unused legacy interfaces**:
  - Removed unused legacy `KdToolResult` interface in `src/kd-core/types.ts` and its re-export from `src/kd-core/index.ts` (tool outputs are unified on the canonical open-value `JsonValue` schema).
  - Removed redundant utility function `parseEnvelopeFromText` in `src/kd-core/envelope.ts` and its isolated unit test (response parsing is safely handled at the transport seam).
  - Removed dead error code `kd/not-found` from `KdErrorCode` union type in `src/kd-core/errors.ts` (Kingdee WebAPI returns business errors or empty records rather than not-found).
 - Pruned legacy multi-version exclusion rules in `pnpm-workspace.yaml`, pinning directly to `0.1.5-rc.2`.

## [0.6.0] - 2026-09-13

### Added

- **Kingdee Cloud Starry Sky V9.0 Enterprise Edition Adaptation**:
  - **Standard Session Cookie (`kdservice-sessionid`)**: Supported extracting and forwarding Kingdee Cloud Starry Sky V9.0 official standard session cookie `kdservice-sessionid` alongside backward-compatible `kdsvc`.
  - **Query Pagination & Sorting (`orderString`, `limit`, `startRow`)**: Added `OrderString`, `Limit`, and `StartRow` to `ExecuteBillQuery` and `QueryBusinessData` to comply with Kingdee V9.0 anti-table-scan best practices and guarantee stable cursor pagination.
  - **Bill Number Direct Operations (`numbers`)**: Exposed `numbers` array parameter for `kingdee_audit`, `kingdee_unaudit`, `kingdee_delete`, `kingdee_unsubmit`, and `kingdee_delete_draft`, enabling AI agents to act directly using document numbers (e.g., `SO-20260901`) without pre-resolving internal surrogate `FID`s.
  - **View by Bill Number**: Enhanced `kingdee_view` to accept `number` parameter as an alternative to `id`.
  - **Save with Auto-Submit & Audit (`isAutoSubmitAndAudit`)**: Added `isAutoSubmitAndAudit` parameter to `kingdee_save` and `kingdee_batch_save` matching Kingdee V9.0 one-step save-submit-audit capability.

### Security

- **SSRF Defenses and Strict Host Validation**:
  - Implemented zero-dependency protocol and host safety assertions in `src/kd-core/security.ts`.
  - **Protocol Whitelist**: Only `http:` and `https:` protocols are permitted; all other protocols (`file:`, `ftp:`, `gopher:`, etc.) are strictly rejected.
  - **Network Boundary Checks**: Automatically blocks requests targeting `localhost`, loopback addresses (`127.0.0.0/8`, `::1`), RFC1918 private subnets (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`), link-local (`169.254.0.0/16`), CGNAT (`100.64.0.0/10`), IPv6 Link-Local (`fe80::/10`), and Unique Local Addresses (`fc00::/7`).
  - Integrated pre-flight validation in both configuration verification (`validateConfig`) and outbound HTTP dispatch (`HttpTransport.request`).

## [0.5.0] - 2026-09-11

### Changed

- **Adapted to DeepSeek Harness `0.1.5-rc.2` and manifest specification modernization**:
  - Added `manifestVersion: 1` under `package.json.dsh` conforming to `@deepseek-ai/dsh-package-manifest`.
  - Added explicit host engine compatibility in `package.json.engines`: `"dsh": "^0.1.5-rc.2"`.
  - Upgraded `@deepseek-ai/dsh-*` peerDependencies and devDependencies to `0.1.5-rc.2`.
  - Refreshed all bilingual documentation (`README.md`, `README.zh.md`, `INSTALL.md`, `INSTALL.zh.md`, `UPDATE.md`, `UPDATE.zh.md`, `USAGE.md`, `USAGE.zh.md`, `CONFIG.md`, `CONFIG.zh.md`, `UNINSTALL.md`, `UNINSTALL.zh.md`) for `0.1.5-rc.2` verification.
- **License reverted to MIT.** The proprietary license introduced in `0.2.0` was replaced by the MIT License, aligning this package with the harness core and its sibling plugins; `LICENSE` and `package.json.license` both carry MIT from here on. This is the first changelog record of that revert. The `0.2.0` entry below still describes what `0.2.0` shipped, and the `README` license section kept the obsolete proprietary wording until `0.14.0` corrected it.

## [0.4.0] - 2026-09-10

### Changed

- **Adapted to deepseek-harness `0.1.5-rc.1` per the official plugin development docs.** Upgraded all `@deepseek-ai/dsh-*` devDependencies to `0.1.5-rc.1`.
- **Refreshed bilingual documentation** (`README.md`, `README.zh.md`, `INSTALL.md`, `INSTALL.zh.md`, `UPDATE.md`, `UPDATE.zh.md`, `UNINSTALL.md`, `UNINSTALL.zh.md`) to mark verification against DeepSeek Harness `0.1.5-rc.1`.

### Added

- **Standalone bilingual usage guide** (`USAGE.md` / `USAGE.zh.md`) documenting the parameters and worked examples of all 14 `kingdee_*` tools.

## [0.3.0] - 2026-09-09

### Changed

- **Adapted to deepseek-harness `0.1.5-alpha.1` per the official plugin development docs.** Upgraded all `@deepseek-ai/dsh-*` devDependencies to `0.1.5-alpha.1`. The runtime seams (`defineTool`, `ctx.tools.register`, `ctx.credentials.resolve`, `ctx.settings.installSection`) continue to work seamlessly.
- **Refreshed bilingual documentation** (`README.md`, `README.zh.md`, `INSTALL.md`, `INSTALL.zh.md`, `UPDATE.md`, `UPDATE.zh.md`, `UNINSTALL.md`, `UNINSTALL.zh.md`) to mark verification against DeepSeek Harness `0.1.5-alpha.1`.

### Added

- **Standalone bilingual configuration guide** (`CONFIG.md` / `CONFIG.zh.md`).

## [0.2.4] - 2026-09-03

### Changed

- **Adapted to deepseek-harness `0.1.2-rc.1` per the official plugin development docs** (`docs/user/develop/basic/config|tool|publish`, `docs/cookbook/adding-a-settings-card`). The DSH seams this plugin uses — `defineTool`, `ctx.tools.register`, `ctx.credentials.resolve`, `ctx.settings.installSection` — are unchanged since `0.1.2-alpha.5`, so the tool set and credentials flow are behaviorally identical.

### Fixed

- **Replaced the ambient `any` peer declarations (`src/types/peers.d.ts`) with the real published peer packages** at `0.1.2-rc.1` (`@deepseek-ai/dsh-tools`, `dsh-settings`, `dsh-credentials`, `cordis`, `schemastery`). `npm run typecheck` now passes with 0 errors (previously 43 implicit-`any` errors); `apply` no longer compiles against `Context = any`. Credential refs now flow through the branded `credentialRef()` helper exactly as the credential-seam doc prescribes.
- **The settings-card browser half is now actually built and served.** Added the `dsh.client` manifest (`platform: web`, injecting the locale and client-settings packages), the `./client` export, and a self-contained `tsdown.config.ts` that reproduces the client module system's lazy-CJS factory artifact (`window.__ModuleLoader__.load(...)`, `lib/client.js`). The card binds `ctx.settingsScope` (namespace `kingdee`), registers into the `settings.plugin.item` slot, registers its own `settings.kingdee` locale dictionary, and renders its own chrome (no cross-plugin value imports — the bundle-purity gate).
- **`installSection` hook usage corrected**: `setSource` receives a thunk returning the authoritative config (`() => Config`), per the settings seam contract; the plugin now re-reads through the thunk so a settings edit (or provider detach) reaches the next tool call. Tests 7/7 pass; build emits `lib/` (Node half via tsc, browser half via tsdown).

## [0.2.3] - 2026-09-02

### Changed

- **Verified against deepseek-harness `0.1.2-alpha.5` (latest `master`).** No DSH seam change since `0.1.2-alpha.4` affects this plugin — the `defineTool` / `ctx.credentials` / `ctx.settings` contracts and the WebAPI transport are stable, so no code change was needed. Version bumped to `0.2.3`, and the bilingual docs (release notes / update / install / uninstall / usage / config) were refreshed.

## [0.2.2] - 2026-09-02

### Changed

- **Verified against deepseek-harness `0.1.2-alpha.4` (latest `master`).** No DSH seam change since `0.1.2-alpha.3` affects this plugin — the `defineTool` / `ctx.credentials` / `ctx.settings` contracts and the WebAPI transport are stable, so no code change was needed. Version bumped to `0.2.2`, and the bilingual docs (release notes / update / install / uninstall / usage / config) were refreshed.

## [0.2.1] - 2026-09-01

### Fixed

- Reworked the README feature bullet (EN + zh-CN) so the `kingdee_*` tool list reads correctly when rendered on npm (avoids the long comma-separated inline-code span). The full list is in the Tools table.

## [0.2.0] - 2026-09-01

### Added

- **New data/service-layer operations** in `kd-core` and matching DSH tools:
  - `kingdee_logout` — `LoginService.LogOut`, clears the stored session cookie.
  - `kingdee_list_datacenters` — list the data centers / tenants reachable at the base URL.
  - `kingdee_query_business_data` — the newer structured `QueryBusinessData` query.
  - `kingdee_unsubmit` — un-submit a form (reverses a submit).
  - `kingdee_delete_draft` — delete records in the draft / created state.
  - `kingdee_batch_save` — batch-save several records in one call.
- **Overridable service endpoints** (`KdConfig.endpoints` / `serviceEndpoints` config) so WebAPI service names can be matched to a specific Kingdee version.
- Unit tests covering the new operations (7/7 passing).

### Changed

- Added cross-platform secrets documentation to `INSTALL.md` / `INSTALL.zh.md` and `README.md` / `README.zh.md` — Linux/macOS `export`, Windows PowerShell `$env:`, Windows CMD `set` / `setx`, and the DSH credential store.
- License changed from MIT to a **proprietary (all rights reserved)** license, under which the repository was read/evaluation-only: copying, forking, re-hosting, re-publishing, modifying, or creating derivative works was prohibited without prior written permission. **This grant was reversed in `0.5.0`, which restored the MIT License.**

## [0.1.0] - 2026-09-01

Initial release.

### Added

- **kd-core** — a framework-free Kingdee Cloud Starry Sky WebAPI client:
  - Two authentication modes: `user` (account username/password, via `LoginService.ValidateUser` with the `kdsvc` session cookie) and `app` (appId/appSecret).
  - Typed operations: `executeBillQuery`, `save`, `submit`, `audit`, `unaudit`, `view`, `delete`, `invokeService`.
  - Envelope parsing/normalization and typed error mapping (`kd/business-error`, `kd/auth-failed`, `kd/not-found`, `kd/invalid-config`, `kd/network`, `kd/timeout`, `kd/unknown`).
  - Transport seam with a real `HttpTransport` (global `fetch`) and an offline `MockTransport`.
- **DSH plugin** — typed tools registered via `defineTool`:
  - `kingdee_query`, `kingdee_save`, `kingdee_submit`, `kingdee_audit`, `kingdee_unaudit`, `kingdee_view`, `kingdee_delete`, `kingdee_invoke`.
  - Credential-safe configuration: secrets resolved per operation through the DSH credential seam (`ctx.credentials.resolve`).
  - A `kingdee` settings namespace (Host half) with a browser settings card scaffold (Client half, `dsh.client`).
- **Companion skill** — `kingdee-bos`: field/enum/status conventions, the bill state machine, tool usage, and the data-layer vs platform-plugin-layer boundary.
- **Documentation** — bilingual (English and Simplified Chinese) `README` and per-release notes.
- **Tests** — unit tests for the core (envelope parsing, config validation, auth headers, the full mock flow, and error mapping) using the Node built-in test runner.

### Security

- No secret values are stored in configuration; they are resolved from environment-variable references per operation.

### Notes

- The platform-plugin layer (server-side C# form/list plugins, UI layout) is **not** reachable through the WebAPI and is documented as an explicit boundary in the `kingdee-bos` skill.
- The DSH host/plugin half is compiled inside a DSH profile (its `@deepseek-ai/*` peers resolve there); only `kd-core` is built and tested standalone.

[0.12.0]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.12.0
[0.11.1]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.11.1
[0.11.0]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.11.0
[0.10.0]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.10.0
[0.9.1]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.9.1
[0.9.0]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.9.0
[0.8.1]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.8.1
[0.8.0]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.8.0
[0.7.0]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.7.0
[0.6.1]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.6.1
[0.6.0]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.6.0
[0.5.0]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.5.0
[0.4.0]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.4.0
[0.3.0]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.3.0
[0.2.4]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.2.4
[0.2.3]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.2.3
[0.2.2]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.2.2
[0.2.1]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.2.1
[0.2.0]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.2.0
[0.1.0]: https://github.com/maxwell-feng/dsh-kingdee/releases/tag/v0.1.0
