mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
chore(dsh-plugin-browserskill): prepare the package for npm publishing
- @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).
This commit is contained in:
@@ -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.
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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;",
|
||||
|
||||
Generated
+4
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user