From 51df868008c6e6161a579173210fdbc687b4f4ec Mon Sep 17 00:00:00 2001 From: BB-fat <1056871944@qq.com> Date: Fri, 14 Aug 2026 17:13:48 +0000 Subject: [PATCH] chore(dsh-plugin-browserskill): prepare the package for npm publishing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - @browser-skill/ui and @remixicon/react move to devDependencies (the client bundle inlines both; the host face never imports them — verified). - Drop private, add license: MIT, ship the repo-root MIT LICENSE in files. - peerDependencies: add the runtime-required @deepseek-ai/schemastery, and the previously dangling meta entries @deepseek-ai/dsh-attachment and @deepseek-ai/dsh-llm (optional, matching actual type-level use). - prepack runs the full build; npm pack now yields exactly 7 files (lib/index.mjs, lib/index.d.mts, lib/client.cjs, cordis.patch.yml, README.md, LICENSE, package.json). - publint clean: the client face ships as lib/client.cjs (CJS extension in a type:module package); add lint:publint script. Built declarations pass a NodeNext consumer typecheck (strict, skipLibCheck false). --- packages/dsh-plugin-browserskill/LICENSE | 21 +++++++++++++++++++ packages/dsh-plugin-browserskill/package.json | 20 +++++++++++------- .../dsh-plugin-browserskill/tsdown.config.ts | 4 ++-- pnpm-lock.yaml | 9 ++++---- 4 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 packages/dsh-plugin-browserskill/LICENSE diff --git a/packages/dsh-plugin-browserskill/LICENSE b/packages/dsh-plugin-browserskill/LICENSE new file mode 100644 index 0000000..0d72eb2 --- /dev/null +++ b/packages/dsh-plugin-browserskill/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Tencent + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/dsh-plugin-browserskill/package.json b/packages/dsh-plugin-browserskill/package.json index 8d8398f..4b1ce5e 100644 --- a/packages/dsh-plugin-browserskill/package.json +++ b/packages/dsh-plugin-browserskill/package.json @@ -2,7 +2,6 @@ "name": "dsh-plugin-browserskill", "description": "DeepSeek Harness tool plugin that exposes BrowserSkill (bsk) browser automation to the model", "version": "0.1.0", - "private": true, "type": "module", "main": "lib/index.mjs", "types": "lib/index.d.mts", @@ -12,13 +11,14 @@ "default": "./lib/index.mjs" }, "./client": { - "default": "./lib/client.js" + "default": "./lib/client.cjs" }, "./package.json": "./package.json" }, "files": [ "lib", - "cordis.patch.yml" + "cordis.patch.yml", + "LICENSE" ], "dsh": { "bundle": { @@ -38,15 +38,20 @@ "typecheck": "pnpm run build:skill && tsc --noEmit", "test": "pnpm run build:css && pnpm run build:skill && vitest run", "build:css": "node scripts/build-client-css.mjs", - "build:skill": "node scripts/build-skill-content.mjs" + "build:skill": "node scripts/build-skill-content.mjs", + "prepack": "pnpm run build", + "lint:publint": "publint" }, "peerDependencies": { "@deepseek-ai/cordis": "^4.0.1", + "@deepseek-ai/dsh-attachment": "^0.1.0-rc.6", "@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6", "@deepseek-ai/dsh-client-ui-attachment": "^0.1.0-rc.6", "@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.6", "@deepseek-ai/dsh-client-ui-tool": "^0.1.0-rc.6", + "@deepseek-ai/dsh-llm": "^0.1.0-rc.6", "@deepseek-ai/dsh-tools": "^0.1.0-rc.6", + "@deepseek-ai/schemastery": "^3.18.1", "react": "^18.2.0" }, "peerDependenciesMeta": { @@ -98,10 +103,9 @@ "tailwindcss": "^4.3.3", "tsdown": "^0.22.14", "typescript": "^5.8.0", - "vitest": "^4.1.6" - }, - "dependencies": { + "vitest": "^4.1.6", "@browser-skill/ui": "workspace:*", "@remixicon/react": "^4.9.0" - } + }, + "license": "MIT" } diff --git a/packages/dsh-plugin-browserskill/tsdown.config.ts b/packages/dsh-plugin-browserskill/tsdown.config.ts index bc82a03..9fcce3f 100644 --- a/packages/dsh-plugin-browserskill/tsdown.config.ts +++ b/packages/dsh-plugin-browserskill/tsdown.config.ts @@ -6,7 +6,7 @@ import { defineConfig, type UserConfig } from "tsdown"; /** * Two build faces of the dual-face package: * - host: the Cordis tool plugin (lib/index.mjs, ESM, dsh packages external); - * - client: the Web UI bundle (lib/client.js) in dsh's closure-factory shape — + * - client: the Web UI bundle (lib/client.cjs, CJS in a type:module package) in dsh's closure-factory shape — * the artifact registers itself through `window.__ModuleLoader__.load`, with * platform modules resolved from the loader's frozen module table and every * other dependency inlined. Mirrors deepseek-harness `packages/client/tsdown.client.ts`. @@ -108,7 +108,7 @@ const client: UserConfig = { }, ], outputOptions: { - entryFileNames: "client.js", + entryFileNames: "client.cjs", banner: `window.__ModuleLoader__.load({ id: ${JSON.stringify(CLIENT_ID)}, factory: (require) => {`, footer: "return module.exports; } });", intro: "var module = { exports: {} }; var exports = module.exports;", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 24bbf78..d3ce398 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -83,14 +83,10 @@ importers: version: 0.20.26(@types/node@25.8.0)(jiti@2.7.0)(rolldown@1.2.4)(rollup@4.60.4) packages/dsh-plugin-browserskill: - dependencies: + devDependencies: '@browser-skill/ui': specifier: workspace:* version: link:../ui - '@remixicon/react': - specifier: ^4.9.0 - version: 4.9.0(react@18.3.1) - devDependencies: '@deepseek-ai/cordis': specifier: ^4.0.1 version: 4.0.1(@deepseek-ai/cordis-plugin-include@1.0.6)(@deepseek-ai/cordis-plugin-loader@1.0.2) @@ -124,6 +120,9 @@ importers: '@deepseek-ai/schemastery': specifier: ^3.18.1 version: 3.18.1 + '@remixicon/react': + specifier: ^4.9.0 + version: 4.9.0(react@18.3.1) '@tailwindcss/cli': specifier: ^4.3.3 version: 4.3.3