@dp-bohrium/widget-cli 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as resolveWidgetProjects, l as compileAuthorManifest, n as scaffoldDshWidget, r as buildWidgetPackage, s as checkWidgetProject, t as auditDshPlugin } from "./dsh-DbOeoKFJ.mjs";
1
+ import { c as resolveWidgetProjects, l as compileAuthorManifest, n as scaffoldDshWidget, r as buildWidgetPackage, s as checkWidgetProject, t as auditDshPlugin } from "./dsh-BvnlfCRX.mjs";
2
2
  //#region src/core.mjs
3
3
  /** Validate a community template before registering it in a custom CLI. */
4
4
  function defineWidgetTemplate(template) {
@@ -95,9 +95,9 @@ function collectReferencedFileIds(request) {
95
95
  return referenced;
96
96
  }
97
97
  //#endregion
98
- //#region ../widget-sdk/dist/runtime-DVFTv55x.js
98
+ //#region ../widget-sdk/dist/runtime-D7KxTtdu.js
99
99
  /** 从当前安装的 SDK package.json 读取版本,插件作者不需要重复填写。 */
100
- const WIDGET_SDK_VERSION = "0.5.0";
100
+ const WIDGET_SDK_VERSION = "0.6.0";
101
101
  //#endregion
102
102
  //#region ../widget-sdk/dist/index.js
103
103
  function compiledContribution(contribution) {
@@ -11438,9 +11438,9 @@ function activate(context: WidgetContext) {
11438
11438
 
11439
11439
  export { activate };
11440
11440
  `;
11441
- function projectFiles({ name, displayName, data, source = panelSource, capabilities, placement, sdkVersion, contractsVersion }) {
11441
+ function projectFiles({ name, displayName, data, source = panelSource, capabilities, placement, sdkVersion }) {
11442
11442
  const manifest = {
11443
- $schema: "@dp-bohrium/widget-contracts/schemas/widget-plugin-manifest.schema.json",
11443
+ $schema: "@dp-bohrium/widget-sdk/schemas/widget-plugin-manifest.schema.json",
11444
11444
  name,
11445
11445
  version: "0.1.0",
11446
11446
  displayName,
@@ -11517,10 +11517,13 @@ function projectFiles({ name, displayName, data, source = panelSource, capabilit
11517
11517
  name: `@dp-bohrium/${name}`,
11518
11518
  private: true,
11519
11519
  type: "module",
11520
- scripts: { build: "tsc --noEmit && tsdown && node scripts/rename-iife.mjs" },
11520
+ scripts: {
11521
+ build: "tsc --noEmit && tsdown && node scripts/rename-iife.mjs",
11522
+ check: "bohr-widget check .",
11523
+ "widget:pack": "bohr-widget pack ."
11524
+ },
11521
11525
  dependencies: { "@dp-bohrium/widget-sdk": sdkVersion },
11522
11526
  devDependencies: {
11523
- "@dp-bohrium/widget-contracts": contractsVersion,
11524
11527
  tsdown: "0.22.14",
11525
11528
  typescript: "5.9.3"
11526
11529
  }
@@ -11577,7 +11580,6 @@ const DSH_RECIPES = [
11577
11580
  mode: "replace"
11578
11581
  } },
11579
11582
  sdkVersion: options.sdkVersion,
11580
- contractsVersion: options.contractsVersion,
11581
11583
  data: {
11582
11584
  source: "dsh-better-sidebar",
11583
11585
  behavior: "session-scoped right rail replacement shell",
@@ -11603,7 +11605,6 @@ const DSH_RECIPES = [
11603
11605
  name: "dsh-tool-calculator-widget",
11604
11606
  displayName: "DSH Calculator · Bohrium Widget",
11605
11607
  sdkVersion: options.sdkVersion,
11606
- contractsVersion: options.contractsVersion,
11607
11608
  data: {
11608
11609
  source: "@deepseek-ai/dsh-tool-calculator",
11609
11610
  behavior: "safe expression evaluation",
@@ -11629,7 +11630,6 @@ const DSH_RECIPES = [
11629
11630
  name: "dsh-plugin-academic-writing-widget",
11630
11631
  displayName: "Academic Writing · Bohrium Widget",
11631
11632
  sdkVersion: options.sdkVersion,
11632
- contractsVersion: options.contractsVersion,
11633
11633
  data: {
11634
11634
  source: "dsh-plugin-academic-writing",
11635
11635
  behavior: "outline/title/abstract/citation/checklist",
@@ -11650,7 +11650,6 @@ const DSH_RECIPES = [
11650
11650
  name: "dsh-academic-research-widget",
11651
11651
  displayName: "Academic Research · Bohrium Widget",
11652
11652
  sdkVersion: options.sdkVersion,
11653
- contractsVersion: options.contractsVersion,
11654
11653
  data: {
11655
11654
  source: "@onpeople/dsh-academic-research",
11656
11655
  behavior: "Crossref/OpenAlex evidence records",
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # @dp-bohrium/widget-cli
2
2
 
3
- > Widget 工程的本地创建、校验、开发、构建和打包工具;可由 Bohr CLI 桥接或调度。
3
+ > Widget 工程的本地创建、迁移、校验、开发、构建和打包工具;可由 Bohr CLI 桥接或调度。
4
4
 
5
5
  要求 Node.js >=20。CLI 发布包固定 SDK/compiler、contracts/Schema、校验器和模板,
6
6
  提供文档站地址,不再内置 skills。生成工程仍安装自己的精确版本依赖。
@@ -20,7 +20,7 @@ pnpm exec bohr-widget --version --json
20
20
  `migrate dsh --help`。`-v` / `--version` 等价于 `version`,`--version --json` 等价于 `version --json`。
21
21
  帮助仅输出本地文本,不执行所选命令或联网获取文档。npm 的全局帮助用
22
22
  `npx --no-install bohr-widget --help`,其他命令同样替换前缀;未安装时可用
23
- `pnpm dlx @dp-bohrium/widget-cli --help` 查看入口。
23
+ 新工程优先用 `pnpm dlx @dp-bohrium/widget-sdk --help`;本包入口在兼容期保持可用。
24
24
 
25
25
  ## Agent 入口
26
26
 
@@ -31,6 +31,10 @@ pnpm exec bohr-widget --version --json
31
31
  - [完整文档](https://dev.dp.tech/bohrium-widget-sdk/llms-full.txt): 文档站自动生成的全文。
32
32
  - 自闭环范围:本包负责本地工程闭环;上传、平台预览、版本发布和 Agent 绑定不在本包内执行。
33
33
 
34
+ ## 准备迁移候选
35
+
36
+ 保留已有源码、跨 profile 升级或准备候选工程时,先读[准备迁移候选](https://dev.dp.tech/bohrium-widget-sdk/guides/migration),由该指南维护准备、应用与验收边界。
37
+
34
38
  ## 本地闭环
35
39
 
36
40
  - `integration --json`: `interfaceVersion=2`,返回固定 profile、执行器位置、
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dp-bohrium/widget-cli",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Bohrium Widget 插件工程的创建、校验、开发和打包工具。",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -52,8 +52,8 @@
52
52
  "tsdown": "0.22.14",
53
53
  "typescript": "5.9.3",
54
54
  "@dp-bohrium/widget-contract-testing": "0.1.0-alpha.0",
55
- "@dp-bohrium/widget-contracts": "0.5.0",
56
- "@dp-bohrium/widget-sdk": "0.5.0"
55
+ "@dp-bohrium/widget-contracts": "0.6.0",
56
+ "@dp-bohrium/widget-sdk": "0.6.0"
57
57
  },
58
58
  "sideEffects": false,
59
59
  "scripts": {