diff --git a/.github/release-notes/v0.1.1.md b/.github/release-notes/v0.1.1.md new file mode 100644 index 0000000..4d27cf0 --- /dev/null +++ b/.github/release-notes/v0.1.1.md @@ -0,0 +1,36 @@ +## Highlights + +- DSH 0.2.2-rc.2 verified: every contract this plugin depends on — the keyed `tool.call.toolview` + slot declaration with its `ToolCallOwnerProps` and `ToolCallCommonProps` fields, the `ToolResultNode` + block fields, `useCodeHighlighter`, `languageForPath`, and the reused primitives and icons — is + unchanged between 0.2.2-rc.1 and 0.2.2-rc.2, so the 0.1.0 build already runs on the new release. +- `node scripts/contract.mjs` and the `ci` workflow now check three public DSH releases: + 0.2.2-rc.2, 0.2.2-rc.1 and 0.2.1-rc.5. +- `devDependencies` are pinned to 0.2.2-rc.2 (the release `npm`'s `next` tag points at), and + `pnpm-workspace.yaml` records pnpm 11's version-pinned supply-chain exemptions for those packages + so `pnpm install --frozen-lockfile` resolves them locally and in CI. + +## Breaking changes + +- None. `peerDependencies` and `engines.dsh` stay at `>=0.2.1-rc.5 <0.3.0-0`, a range that covers + 0.2.2-rc.2 and 0.2.2-rc.1 alike, so the plugin keeps installing on either Desktop build. +- No card behaviour changed: `dist/` is built from the same `src/` as 0.1.0. + +## Fixes + +- Nothing needed adapting in the implementation; this release re-verifies it against 0.2.2-rc.2 and + refreshes the pinned toolchain packages. + +## Compatibility + +- DSH 0.2.2-rc.2: contract-checked against its public npm packages; not verified in the GUI. +- DSH 0.2.2-rc.1: contract-checked; verified in the GUI. +- DSH 0.2.1-rc.5: contract-checked against its public npm packages; not verified in the GUI. +- Upstream changes that do not affect this plugin: primitives removed the `useAnchoredPosition` and + `AnchoredPositionOptions` exports and replaced the `Menu` `getAnchorRect` prop with `anchorRef` / + `anchorPoint`; the slots package added a `'hoc'` slot kind. The `window-drag-regions` migration does + not apply because the card renders inline in the chat rather than as an overlay over a draggable + header. +- Inherited DSH limits (unchanged): languages are chosen by file extension only, lines of 1000+ characters + stay plain, and unknown languages, diffs over 2000 rows and preparing/failed/stopped calls fall back + to the stock card. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 885af4d..7f6d18e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - run: pnpm run typecheck - run: pnpm run build - run: pnpm test - # Contract against the public npm packages of DSH 0.2.1-rc.5 and 0.2.2-rc.1. + # Contract against the public npm packages of DSH 0.2.2-rc.2, 0.2.2-rc.1 and 0.2.1-rc.5. - run: node scripts/contract.mjs - name: Reproducible build run: scripts/check-reproducible.sh diff --git a/README.md b/README.md index 66cb32d..04eea8b 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ Inherited from DSH, deliberately not worked around: detection, so an extension-less script such as `deploy` stays plain. - Lines of 1000 or more characters stay plain. +One row differs from the stock card on purpose: the collapsed `apply_patch` row shows only the +`+N −M` totals. Stock names the patched files there, and since DSH 0.2.2-rc.2 it links each file of a +multi-file patch individually; this card names the files once it is expanded instead. + Cases that render with the **stock card, unchanged**: - languages DSH does not map; @@ -47,10 +51,11 @@ Cases that render with the **stock card, unchanged**: | DSH | Status | |---|---| +| 0.2.2-rc.2 | Contract-checked against its public npm packages; not verified in the GUI | | 0.2.2-rc.1 | Contract-checked; verified in the GUI | | 0.2.1-rc.5 | Contract-checked against its public npm packages; not verified in the GUI | -`node scripts/contract.mjs` downloads the public packages of both releases from npm. It fails if +`node scripts/contract.mjs` downloads the public packages of all three releases from npm. It fails if `tool.call.toolview`, `useCodeHighlighter`, `languageForPath` or the reused primitives change shape. ## Develop diff --git a/package.json b/package.json index bf3fb6f..59bc583 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dsh-code-highlight", - "version": "0.1.0", + "version": "0.1.1", "description": "Syntax-highlighted diffs for edit / write / apply_patch tool cards in the DeepSeek Harness chat, using DSH's own highlighter.", "type": "module", "license": "MIT", @@ -66,12 +66,12 @@ }, "devDependencies": { "@deepseek-ai/cordis": "^4.1.0", - "@deepseek-ai/dsh-client-ui-chat": "0.2.2-rc.1", - "@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.1", - "@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.1", - "@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.1", - "@deepseek-ai/dsh-client-ui-tool": "0.2.2-rc.1", - "@deepseek-ai/dsh-util-code-language": "0.2.2-rc.1", + "@deepseek-ai/dsh-client-ui-chat": "0.2.2-rc.2", + "@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.2", + "@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.2", + "@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.2", + "@deepseek-ai/dsh-client-ui-tool": "0.2.2-rc.2", + "@deepseek-ai/dsh-util-code-language": "0.2.2-rc.2", "@testing-library/react": "^16.3.3", "@types/node": "^22.20.5", "@types/react": "~18.3.31", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2d99bb4..3ff05a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,23 +12,23 @@ importers: specifier: ^4.1.0 version: 4.1.0 '@deepseek-ai/dsh-client-ui-chat': - specifier: 0.2.2-rc.1 - version: 0.2.2-rc.1(@deepseek-ai/cordis@4.1.0) + specifier: 0.2.2-rc.2 + version: 0.2.2-rc.2(@deepseek-ai/cordis@4.1.0) '@deepseek-ai/dsh-client-ui-conversation': - specifier: 0.2.2-rc.1 - version: 0.2.2-rc.1(@deepseek-ai/cordis@4.1.0) + specifier: 0.2.2-rc.2 + version: 0.2.2-rc.2(@deepseek-ai/cordis@4.1.0) '@deepseek-ai/dsh-client-ui-primitives': - specifier: 0.2.2-rc.1 - version: 0.2.2-rc.1(@deepseek-ai/cordis@4.1.0) + specifier: 0.2.2-rc.2 + version: 0.2.2-rc.2(@deepseek-ai/cordis@4.1.0) '@deepseek-ai/dsh-client-ui-slots': - specifier: 0.2.2-rc.1 - version: 0.2.2-rc.1(@deepseek-ai/cordis@4.1.0) + specifier: 0.2.2-rc.2 + version: 0.2.2-rc.2(@deepseek-ai/cordis@4.1.0) '@deepseek-ai/dsh-client-ui-tool': - specifier: 0.2.2-rc.1 - version: 0.2.2-rc.1(@deepseek-ai/cordis@4.1.0) + specifier: 0.2.2-rc.2 + version: 0.2.2-rc.2(@deepseek-ai/cordis@4.1.0) '@deepseek-ai/dsh-util-code-language': - specifier: 0.2.2-rc.1 - version: 0.2.2-rc.1(@deepseek-ai/cordis@4.1.0) + specifier: 0.2.2-rc.2 + version: 0.2.2-rc.2(@deepseek-ai/cordis@4.1.0) '@testing-library/react': specifier: ^16.3.3 version: 16.3.3(@testing-library/dom@10.4.2)(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -89,33 +89,33 @@ packages: '@deepseek-ai/cosmokit@1.9.0': resolution: {integrity: sha512-5O1S53mZiJyZYcvxxD0Qv1EY7qFPSxbGyD8CbVK6gw7W9FvcXZj2YIX1ZkOqyQQ3Xt2rFkZDHJv0+V3Zmmp8CA==} - '@deepseek-ai/dsh-client-ui-chat@0.2.2-rc.1': - resolution: {integrity: sha512-xyPgqo3h9J2gxVLBhRH7kag1MDhqgjQJagP+TSHSISJ8afMG6GtsmTeyArU5ITZeu8luNuWdb5jMBKmsjPOTLw==} + '@deepseek-ai/dsh-client-ui-chat@0.2.2-rc.2': + resolution: {integrity: sha512-nsVoj3ddh4YVakbzREEl4N2BLm7Mzvg4yjk3lsw5hVRxFHckGsyd5OnxJAhfKEDagK721cy8LQ1v4Ep3m5M6pw==} peerDependencies: '@deepseek-ai/cordis': ~4.1.0 - '@deepseek-ai/dsh-client-ui-conversation@0.2.2-rc.1': - resolution: {integrity: sha512-bxxnfa7meTpRAm6ErErSkVWi/IBVNt7LGg2StoH85wknvIn0jVShg6wqPwCbei6myR0/C5u17CjiBoCqAvsviA==} + '@deepseek-ai/dsh-client-ui-conversation@0.2.2-rc.2': + resolution: {integrity: sha512-ysMRKsAH68YgHY80BZaO6nTmtpda60IH6lRyoIzRXPLDBKkXL9OjNeAdfRu4Q8fRyeqB7i/qnXTg5tU30Ot6xA==} peerDependencies: '@deepseek-ai/cordis': ~4.1.0 - '@deepseek-ai/dsh-client-ui-primitives@0.2.2-rc.1': - resolution: {integrity: sha512-6ZUYgZ6XYmh/twuwGzKPA4XH3RSODl4b1W4p1pqoFJ7xLn1EroEmA+E/sqa5Z2+JvFWxfPttsHTHkOyH8uK8Tg==} + '@deepseek-ai/dsh-client-ui-primitives@0.2.2-rc.2': + resolution: {integrity: sha512-MqN5XnG+0OVgGosP13RH2pCjAmPl56G9j5Bl/fR7fAe9fol1TxrBIjzlMC+c3Oa3Ao32GgYn+/qMPnugxqZceQ==} peerDependencies: '@deepseek-ai/cordis': ~4.1.0 - '@deepseek-ai/dsh-client-ui-slots@0.2.2-rc.1': - resolution: {integrity: sha512-asUGj3a5vSvUht/mBhFalFcad/YBwF9HWdY1XuIDZ7+Dx1mVrPPVG8JlIKnLZX51BnCNGr52VsjsJoErRaD3bg==} + '@deepseek-ai/dsh-client-ui-slots@0.2.2-rc.2': + resolution: {integrity: sha512-uOiuDbP8p4qmrACNBvvZqB5Dzhuh3ybpaRN3vUi/cMhdO5ibXyR0vBiv+Cu9RzcCHOv0Kn+PQjO7wCW2hKkiqg==} peerDependencies: '@deepseek-ai/cordis': ~4.1.0 - '@deepseek-ai/dsh-client-ui-tool@0.2.2-rc.1': - resolution: {integrity: sha512-3mKhYw9FCdaBoiVkxnDEpInhf97sHoLFyM8phGkLtoW/VJn/RxakejnGw3VQOS8mv3RI2O/x9+J4FPQ8Mj4vFQ==} + '@deepseek-ai/dsh-client-ui-tool@0.2.2-rc.2': + resolution: {integrity: sha512-Jp+OkCteRl1+yejYv+t/9Ou+rQloLFNAR5iFO5pZE6S+67GVNk1OjyDYOniMlML7RmCmXu5IR2ce9laKg+/AVQ==} peerDependencies: '@deepseek-ai/cordis': ~4.1.0 - '@deepseek-ai/dsh-util-code-language@0.2.2-rc.1': - resolution: {integrity: sha512-kVV4DspSt7ryQzoO65lI1yb5a7ViCYfT4KsZmeZfw9P0erlN+UmmNcqVtpeBLIP4faPHl328wWQnGsBPke+Zzg==} + '@deepseek-ai/dsh-util-code-language@0.2.2-rc.2': + resolution: {integrity: sha512-Iim36In3xhep/seCIyIhTwrZ/lE4heYRuhGbGs+/D6uq+huoqXlsDJiu/AHcuf9q+MyKboJFgcEPs5MqV1H1oQ==} peerDependencies: '@deepseek-ai/cordis': ~4.1.0 @@ -992,6 +992,7 @@ packages: tldts-core@7.4.20: resolution: {integrity: sha512-C630TWXZCZmLq0F2bW4QqwnaaxCQ/svpAqvJwnC4JvgEM5ohhBnGsEzTLSOXcN+xjz+kEaHS5uoWIw2klnqd0A==} + deprecated: Partial release, see https://github.com/remusao/tldts/issues/2735. Use >=7.4.22. tldts@7.4.19: resolution: {integrity: sha512-48dH6aSpQnpbzDUc4vIQZ1VjB8tkK+e8c1yx05/SZK+rkssgjEOlxDd/yU8/a4vGYQ9vRgJr9dwMq9TJ0b3X2Q==} @@ -1190,29 +1191,29 @@ snapshots: '@deepseek-ai/cosmokit@1.9.0': {} - '@deepseek-ai/dsh-client-ui-chat@0.2.2-rc.1(@deepseek-ai/cordis@4.1.0)': + '@deepseek-ai/dsh-client-ui-chat@0.2.2-rc.2(@deepseek-ai/cordis@4.1.0)': dependencies: '@deepseek-ai/cordis': 4.1.0 '@deepseek-ai/schemastery': 3.19.0 - '@deepseek-ai/dsh-client-ui-conversation@0.2.2-rc.1(@deepseek-ai/cordis@4.1.0)': + '@deepseek-ai/dsh-client-ui-conversation@0.2.2-rc.2(@deepseek-ai/cordis@4.1.0)': dependencies: '@deepseek-ai/cordis': 4.1.0 '@deepseek-ai/schemastery': 3.19.0 - '@deepseek-ai/dsh-client-ui-primitives@0.2.2-rc.1(@deepseek-ai/cordis@4.1.0)': + '@deepseek-ai/dsh-client-ui-primitives@0.2.2-rc.2(@deepseek-ai/cordis@4.1.0)': dependencies: '@deepseek-ai/cordis': 4.1.0 - '@deepseek-ai/dsh-client-ui-slots@0.2.2-rc.1(@deepseek-ai/cordis@4.1.0)': + '@deepseek-ai/dsh-client-ui-slots@0.2.2-rc.2(@deepseek-ai/cordis@4.1.0)': dependencies: '@deepseek-ai/cordis': 4.1.0 - '@deepseek-ai/dsh-client-ui-tool@0.2.2-rc.1(@deepseek-ai/cordis@4.1.0)': + '@deepseek-ai/dsh-client-ui-tool@0.2.2-rc.2(@deepseek-ai/cordis@4.1.0)': dependencies: '@deepseek-ai/cordis': 4.1.0 - '@deepseek-ai/dsh-util-code-language@0.2.2-rc.1(@deepseek-ai/cordis@4.1.0)': + '@deepseek-ai/dsh-util-code-language@0.2.2-rc.2(@deepseek-ai/cordis@4.1.0)': dependencies: '@deepseek-ai/cordis': 4.1.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index fee036f..7a754a9 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -5,3 +5,13 @@ packages: - . allowBuilds: esbuild: true +# rc.2 packages published 2026-11-12, inside pnpm's default 24h minimumReleaseAge +# window. Version-pinned exemptions let local and CI installs resolve the exact +# versions this plugin is contract-tested against; drop them once rc.2 ages out. +minimumReleaseAgeExclude: + - '@deepseek-ai/dsh-client-ui-chat@0.2.2-rc.2' + - '@deepseek-ai/dsh-client-ui-conversation@0.2.2-rc.2' + - '@deepseek-ai/dsh-client-ui-primitives@0.2.2-rc.2' + - '@deepseek-ai/dsh-client-ui-slots@0.2.2-rc.2' + - '@deepseek-ai/dsh-client-ui-tool@0.2.2-rc.2' + - '@deepseek-ai/dsh-util-code-language@0.2.2-rc.2' diff --git a/scripts/contract.mjs b/scripts/contract.mjs index d548ac4..d715aec 100644 --- a/scripts/contract.mjs +++ b/scripts/contract.mjs @@ -6,7 +6,7 @@ * `languageForPath`, …), the slot registry surface, and `languageForPath`'s * behaviour for the five target languages. Fails (exit 1) on any drift. * - * Usage: node scripts/contract.mjs [version ...] (default: 0.2.2-rc.1 0.2.1-rc.5) + * Usage: node scripts/contract.mjs [version ...] (default: 0.2.2-rc.2 0.2.2-rc.1 0.2.1-rc.5) */ import { execFileSync } from 'node:child_process' import { existsSync, mkdirSync, readFileSync } from 'node:fs' @@ -14,7 +14,7 @@ import { join } from 'node:path' import { tmpdir } from 'node:os' import { pathToFileURL } from 'node:url' -const versions = process.argv.slice(2).length > 0 ? process.argv.slice(2) : ['0.2.2-rc.1', '0.2.1-rc.5'] +const versions = process.argv.slice(2).length > 0 ? process.argv.slice(2) : ['0.2.2-rc.2', '0.2.2-rc.1', '0.2.1-rc.5'] const cache = join(tmpdir(), 'dsh-code-highlight-contract') const PACKAGES = ['dsh-client-ui-tool', 'dsh-client-ui-primitives', 'dsh-client-ui-slots', 'dsh-client-ui-conversation', 'dsh-util-code-language']