mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
feat(dsh-plugin-browserskill): publish the BSK skill through ctx.skills
The plugin exposed only tools; the BrowserSkill agent skill never reached the harness's <available_skills> catalog. Register it as an embedded runtime skill (progressive disclosure: catalog entry resident, body on skill-tool invocation) via the official ctx.skills seam — silent no-op when the composition lacks it. Content is build-time assembled so there is one source of truth: skill/prelude.md (committed, dsh-specific: tool<->CLI map, owned-session semantics, plugin-only overrides) + the canonical repo-root skill/SKILL.md verbatim (the same file crates/bsk-cli/build.rs mirrors; frontmatter stripped, name/description supplied by the registration). Generated into src/skill-content.generated.ts (gitignored) — registration and every pre-step snapshot are pure in-memory reads: no disk, no process, no daemon. Scripts: build:skill chained into build/test/typecheck (same pattern as build:css); biome excludes the generated artifacts. Tests: +3 (catalog content, in-memory weight, silent degradation). 116/116 green.
This commit is contained in:
@@ -34,10 +34,11 @@
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node scripts/build-client-css.mjs && tsdown",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "pnpm run build:css && vitest run",
|
||||
"build:css": "node scripts/build-client-css.mjs"
|
||||
"build": "node scripts/build-client-css.mjs && node scripts/build-skill-content.mjs && tsdown",
|
||||
"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"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "^4.0.1",
|
||||
|
||||
Reference in New Issue
Block a user