@linkdesk/contracts 0.1.56 → 0.1.57

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.
Files changed (2) hide show
  1. package/linkdesk.d.ts +11 -0
  2. package/package.json +1 -1
package/linkdesk.d.ts CHANGED
@@ -2720,6 +2720,17 @@ export interface PluginInstallPrepared {
2720
2720
  planId: string;
2721
2721
  /** 壳算出的确认计划(来源/发布者/版本/哈希/风险唯一来源,⛔ 市场不许自造) */
2722
2722
  plan: PluginConfirmPlan;
2723
+ /**
2724
+ * 这张卡**该由谁画**(2026-11-25 用户拍板「风险分档」)。
2725
+ *
2726
+ * - `host`:含**需要现场授权**的项(首装 / 来源变更 / 降级 / 未信任来源)⇒ 必须壳画。
2727
+ * 理由:这几类正是「用户只能靠卡上那几行判断」的场景;市场自绘时用户看到的内容
2728
+ * 不再有壳背书(市场完全可以画一张假卡再 commit)。壳是唯一不撒谎的见证者。
2729
+ * - `market`:用户**已经预授权过**的低风险项(官方同源更新 / 已信任来源但你把开关关了)⇒ 市场可画。
2730
+ * 市场必须遵守:`host` ⇒ 丢弃本计划、改调 `requestInstall`/`requestUpdateBatch`(壳默认卡)。
2731
+ * ⚠️ 契约只能「告知」不能「强制」——恶意市场可以无视它自己画;信任边界仍靠来源信任与安装闸。
2732
+ */
2733
+ cardOwner: "host" | "market";
2723
2734
  /**
2724
2735
  * 直接可渲染的载荷(labels + plan + policy + reqs)——市场自绘卡**原样喂**给
2725
2736
  * `@linkdesk/ui` 的 `buildInstallVM` / `buildBatchVM` 即可,⛔ 不用自己拼文案或事实。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linkdesk/contracts",
3
- "version": "0.1.56",
3
+ "version": "0.1.57",
4
4
  "description": "LinkDesk 插件契约类型——window.linkdesk.* 全量类型定义(E5.8 契约生成产物)。第三方插件作者唯一合法类型消费路径。",
5
5
  "type": "module",
6
6
  "types": "./linkdesk.d.ts",