@linkdesk/contracts 0.1.44 → 0.1.46

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 +194 -15
  2. package/package.json +1 -1
package/linkdesk.d.ts CHANGED
@@ -106,6 +106,8 @@ export type LinkDeskConfigurationContribution = [
106
106
  string,
107
107
  {
108
108
  title: string;
109
+ /** 04 内置配置组图标(2026-11-18): group icon = **IconRegistry shared-icon name** (host defaults `app.group-*`; third-party plugins may reference their own contributes.icons name). Optional; absent = nav row renders text only. */
110
+ icon?: string;
109
111
  /** (P-3 decision A): one-line subtitle under the section's main title (optional; undeclared = not rendered, zero intrusion) */
110
112
  subtitle?: string;
111
113
  /** (P-3 decision A): one-line small text under each group heading — key = the group's original text (optional, zero intrusion) */
@@ -894,7 +896,7 @@ export interface CreatableViewMeta {
894
896
  pluginId: string;
895
897
  label: string;
896
898
  icon?: string;
897
- iconSource?: "codicon" | "svg" | "url" | "lucide"; // union identical to plugin.schema.json iconSource (contract generation source)
899
+ iconSource?: "codicon" | "svg" | "url" | "lucide" | "shared"; // union identical to plugin.schema.json iconSource (contract generation source)
898
900
  }
899
901
  /** Bottom panel view metadata — serialized from the panel view registry */
900
902
  export interface PanelViewMeta {
@@ -981,14 +983,6 @@ export interface PoolStatusBarItem {
981
983
  /** Leading divider — shell StatusBar render semantics (every item except the first in the left zone; except the first within a group in the right zone) */
982
984
  dividerBefore?: boolean;
983
985
  }
984
- /**
985
- * a row for an install job — the **only** row shape of the panel's "In progress / Waiting to install" two sections (dossier 18 §5 I.4).
986
- *
987
- * **Why the results area is not here**: install terminal states (success / failure / installed but missing dependencies) are announced by the existing toasts
988
- * (success = the sole outlet of the lifecycle consumer; failure = the settle failure toast with [Retry], see 73h/73e);
989
- * the results area is still grouped by source (`NotifGroup`). Job rows appear only in the two sections "not yet resulted" —
990
- * one install is always visible in exactly one place, never "installed twice".
991
- */
992
986
  export interface NotifJobRow {
993
987
  /** Row key — jobId (**not** the display name: same-named plugins must stay distinguishable, dossier 18 §7 73d row). */
994
988
  id: string;
@@ -1132,6 +1126,31 @@ export type PoolCommandHints = Record<string, {
1132
1126
  title: string;
1133
1127
  keybinding?: string;
1134
1128
  }>;
1129
+ /** 轻 Toast 栈条目——壳 store `presentation:"toast"` 条目的 DTO(TransientToast 池侧哑渲染)。
1130
+ * 与面板 DTO(NotifItem)同源异面:一条条目只进一个面(2026-11-19 改判)。 */
1131
+ export interface ToastStackItem {
1132
+ id: string;
1133
+ key?: string;
1134
+ message: string;
1135
+ severity: "info" | "success" | "warning";
1136
+ /** 动作(最多 1 个)——command/args 由**池**执行(插件命令注册在池;未注册 → 点击只关闭 B10) */
1137
+ action?: {
1138
+ title: string;
1139
+ command?: string;
1140
+ args?: unknown[];
1141
+ };
1142
+ /** false = 隐藏 severity 图标(01 契约 §2 icon 形参);缺省/true = 恒显 */
1143
+ icon?: boolean;
1144
+ /** 到期时间戳(epoch ms)——池侧计时真相(B21 hover 暂停 / B34 最小化继续都按 time-based 判定;
1145
+ * 池侧 interval 比对 now 与本值,过期即经 dismissToastItem 回壳删条目)。壳侧已按同 key 合并/上限 3 裁剪。 */
1146
+ expiresAt: number;
1147
+ }
1148
+ /** 轻 Toast 栈 DTO——挂在 PoolLayout 顶层与 statusBar.notif 同帧推送(壳想池画)。空数组 = 无在显条目 */
1149
+ export interface ToastStackLayout {
1150
+ items: ToastStackItem[];
1151
+ /** × 按钮文案(壳 t("关闭")——显示文本铁律) */
1152
+ dismissLabel?: string;
1153
+ }
1135
1154
  export interface PoolLayout {
1136
1155
  version: 2;
1137
1156
  titleBar: TitleBarLayout;
@@ -1159,6 +1178,8 @@ export interface PoolLayout {
1159
1178
  hintEnabled?: boolean;
1160
1179
  /** 04 "hover hint system" piece 1: command table — source of the automatic copy and shortcuts for `data-hint-command`. Window-agnostic ⇒ always pushed. */
1161
1180
  commands?: PoolCommandHints;
1181
+ /** 轻 Toast 栈(2026-11-19 改判恢复)——主窗随 statusBar 同策略推;缺省 = 池不渲染 */
1182
+ toastStack?: ToastStackLayout;
1162
1183
  }
1163
1184
  /**
1164
1185
  * per-window tab list — produced by **the same serializer** (`serializeGroups`) as the layout tree pushed to the pool,
@@ -1312,6 +1333,49 @@ export interface NotificationHandle {
1312
1333
  /** Cancel — closes directly, no completion toast */
1313
1334
  cancel(): Promise<void>;
1314
1335
  }
1336
+ /** Light-toast action (toasts.show options.action, 01 contract §2) — the **serializable subset**: pool→shell IPC cannot carry closures,
1337
+ * so the click path is `command`/`args` only (shell executeCommand). The `onClick` slot of the 01 §2 table is the **in-shell same-process** face
1338
+ * (direct pushToast callers); it has no physical carrier on this cross-process surface. Unknown command → click just closes (02 B10, no error). */
1339
+ export interface ToastShowAction {
1340
+ /** Button label — final display text, resolved by the producer (display-text iron rule) */
1341
+ title: string;
1342
+ /** Command id run on click — executeCommand(command, ...args); unregistered → click just closes (B10) */
1343
+ command?: string;
1344
+ /** ...args passed through to the command handler */
1345
+ args?: unknown[];
1346
+ }
1347
+ /** toasts.show options (01 contract §2 verbatim, minus the in-shell-only onClick slot — see ToastShowAction) */
1348
+ export interface ToastShowOptions {
1349
+ /** 必填 — one-liner; >2 visual lines ⇒ auto-degrades to the panel (caller does not decide) */
1350
+ message: string;
1351
+ /** 去重键 — same key updates the existing entry (B16) instead of adding one; omitted = a new entry each call */
1352
+ key?: string;
1353
+ /** 缺省 info; ⚠️ error not accepted — auto-degrades to the panel (caller passes it anyway, routing decides) */
1354
+ severity?: "info" | "success" | "warning";
1355
+ /** 最多 1 个;>1 ⇒ panel(B9)。轻提示的常见形态是无动作 */
1356
+ action?: ToastShowAction;
1357
+ /** ms,缺省 3000,夹取 [1500,10000](B15);≥8000 ⇒ 面板(B14) */
1358
+ ttl?: number;
1359
+ /** 缺省 true 恒显 severity 图标;显式 false 隐藏(语义由文案承载) */
1360
+ icon?: boolean;
1361
+ /**
1362
+ * 生产者身份(notifications.show 的 source 同款约定)——轻 Toast 不进面板分组,
1363
+ * 但 02 表 B20「插件卸载 → 其来源条目立即清除」的**来源键**由此而来;缺省归「其他」桶。
1364
+ * ⚠️ 01 契约 §2 表未列此字段(立档时序),此处为 B20 判据的机械前置——与 notifications.source 同形。
1365
+ */
1366
+ source?: string;
1367
+ }
1368
+ /** Light-toast presentation — which surface the entry actually landed on (2026-11-19 改判: one store, two presentations) */
1369
+ export type ToastPresentation = "toast" | "panel";
1370
+ /** Light-toast handle — update/dismiss route back to the same entry; presentation reports where it actually landed */
1371
+ export interface ToastHandle {
1372
+ /** 更新同一条目文案(toast 呈现时 TTL 重置;panel 呈现时原位改写) */
1373
+ update(message: string): Promise<void>;
1374
+ /** 立即关闭 */
1375
+ dismiss(): Promise<void>;
1376
+ /** 只读:实际落在了哪个面 — 排障与断言用(⛔ 调用方预判降级的那把尺不给他用) */
1377
+ readonly presentation: ToastPresentation;
1378
+ }
1315
1379
  /** A menu item declared by a plugin in plugin.json—either a command or a submenu, never both */
1316
1380
  export type ManifestMenuItem = string | {
1317
1381
  command: string;
@@ -1619,6 +1683,17 @@ export interface UiAPI {
1619
1683
  */
1620
1684
  subscribe(cb: () => void): () => void;
1621
1685
  };
1686
+ /**
1687
+ * 轻 Toast(TransientToast)——2026-11-19 用户授权改判恢复的第二呈现面(同一 store、不同名、不同角落)。
1688
+ * 分工判据(00 §二):**Toast 是「路过」,面板是「留存」**——短、轻、无动作/1 动作的一句话走这里;
1689
+ * 错误/需决策/进度/长文本仍走 `notifications`(自动降级路由,调用方不预判)。
1690
+ * 🔴 ⛔ 不用已删的顶层单数 `toast` 旧名(死面,名字带历史包袱);⛔ 第二个 store(与 notifications 同一后端队列)。
1691
+ */
1692
+ toasts: {
1693
+ /** Raises a light toast — returns a handle (update/dismiss/presentation). Degradation rules are pure-function
1694
+ * routed on the shell (01 §3): error / >1 action / >96 visual units / ttl ≥8000 / >2 explicit lines ⇒ panel. */
1695
+ show(options: ToastShowOptions): Promise<ToastHandle>;
1696
+ };
1622
1697
  /** Menus — declarative read/write for plugins */
1623
1698
  menu: {
1624
1699
  registerItems(menuId: string, pluginId: string, items: ManifestMenuItem[]): Promise<void>;
@@ -1843,6 +1918,12 @@ export interface EnvInfo {
1843
1918
  pluginDataDir?: string;
1844
1919
  pluginCacheDir?: string;
1845
1920
  pluginExportsDir?: string;
1921
+ /**
1922
+ * R4-1.3(I21·正典 09 §三·补3):机器指纹——MachineGuid+主板序列 sha256 前 16 位(主进程组装)。
1923
+ * 稳定性:两输入均为装机/出厂即定值(OS 安装时生成的 MachineGuid + 主板烧录序列),重启/换端口不变。
1924
+ * 消费方 = 许可验签的机器绑定比对(作者 kit `sign-license --machine` 决定绑不绑)。
1925
+ */
1926
+ machineFingerprint?: string;
1846
1927
  }
1847
1928
  /** IPC search:searchFiles payload—the wire subset of FileSearcher.SearchOptions (no signal) */
1848
1929
  export interface SearchWireOptions {
@@ -2113,7 +2194,9 @@ export interface PluginManifest {
2113
2194
  name: string;
2114
2195
  version: string;
2115
2196
  icon?: string;
2116
- iconSource?: "codicon" | "svg" | "url" | "lucide";
2197
+ /** 🔴 "shared"(04 内置配置组图标 2026-11-18):按名引用 IconRegistry 共享图标(contributes.icons
2198
+ * 登记面或宿主默认项)——渲染需调用方注入 sharedIcons 快照(PluginIcon 同名 prop)。 */
2199
+ iconSource?: "codicon" | "svg" | "url" | "lucide" | "shared";
2117
2200
  /** Marketplace display art (cover art, archive 14's dual-icon model ) — relative path of an svg asset, may be drawn elaborately and complex
2118
2201
  * (semantically separate from icon's "monochrome small UI icon": the shell's icon bar/tab bar read only icon). Omitted → the marketplace falls back to icon.
2119
2202
  * Convention: value = a relative path into package resources (e.g. "resources/cover.svg"); iconSource omitted → inferred as a linkdesk:// path. */
@@ -2297,6 +2380,16 @@ export interface PluginInstallRequestOpts {
2297
2380
  displayName?: string;
2298
2381
  /** Job origin — row = one user action (user, default); dependencies dragged in by a plugin (dependency) hide inside that row */
2299
2382
  origin?: "user" | "dependency";
2383
+ /**
2384
+ * R4-1.3(I21/壳侧·正典 09 §三·补3):目录条目的 pricing 声明随行——**声明进数据层、裁决进壳**。
2385
+ * 调用方(市场插件)把它读到的条目 pricing 原样带上;壳安装门见 model 存在即查壳侧权益(licenses),
2386
+ * 无有效许可 ⇒ licenseRequired 拦下。缺省/不带 = 免费(现状行为零变更)。
2387
+ * ⚠️ v1 边界(09「边界与代价」自认):无服务器 ⇒ 调用方可不带 ⇒ 深度对抗强制留 B3——本门保证的是
2388
+ * 官方面不漏门 + 权益与门都在壳(市场被整体替换也绕不过门的存在)。
2389
+ */
2390
+ pricing?: {
2391
+ model?: string;
2392
+ };
2300
2393
  /**
2301
2394
  * dependency resolution catalog — when passed, **missing** dependencies in this plugin's `requires` are
2302
2395
  * auto-installed first by the shell **within the same install job** (inline recursion, no second slot — dependency resolution reuses updateCheck against this catalog for the latest direct link).
@@ -2317,8 +2410,11 @@ export interface PluginInstallResult {
2317
2410
  version?: string;
2318
2411
  needRestart?: boolean;
2319
2412
  error?: string;
2413
+ /** R4-1.3(I21/壳侧·正典 09 §三·补3):安装门拦下——**不是失败是缺许可**。true = 该条目声明了
2414
+ * pricing.model 而壳侧权益存储无有效许可(消费方据此开许可弹窗,⛔ 不走失败红字分支)。 */
2415
+ licenseRequired?: boolean;
2320
2416
  /** (archive 18 §V I.6-7): the third terminal state — **installed but missing dependencies** (it is installed, shows in the list, but is unusable).
2321
- * When true, success is also true (the files really did land on disk), but consumers **must not render it as "✓ installed"** — that would be lying.
2417
+ * When true, success is also true (the files really did land on disk), but consumers **must not** render it as "✓ installed" — that would be lying.
2322
2418
  * The job row shows "installed but missing dependencies: {name}". */
2323
2419
  parked?: boolean;
2324
2420
  /** the user clicked "Cancel install" on the panel — **not a failure** (`success` being false just means "the install did not happen").
@@ -2326,6 +2422,26 @@ export interface PluginInstallResult {
2326
2422
  * reporting the error again would weaponize the user's own decision against them. The job row is **removed entirely** by the queue side (no ✗ rendered). */
2327
2423
  cancelled?: boolean;
2328
2424
  }
2425
+ /** R4-1.2(I16·正典 09 §三·补2):本地安装失败回执 reason——五类封闭集合 */
2426
+ export type PluginLocalInstallReason = "bad-manifest" | "unsafe-id" | "core-forbidden" | "exists" | "io";
2427
+ /**
2428
+ * R4-1.2(I16·正典 09 §三·补2):`pluginManager.installFromDirectory(path)` 回执。
2429
+ * 输入 = 含 plugin.json 的单插件文件夹,或 .linkdesk-plugin 离线包(解压走包安装流同一路);
2430
+ * 落盘 = {userData}/plugins/<pluginId>(用户安装家,与网络安装同路:账本 → 注册 → lifecycle,⛔ 不旁路)。
2431
+ * `reason` 封闭五类(09 正典):bad-manifest=plugin.json 缺失/不可解析/缺 version;unsafe-id=pluginId
2432
+ * 形状不合法(SAFE_PLUGIN_ID)或撞宿主伪身份;core-forbidden=本地不得自封内置;exists=同 id 已装
2433
+ * (调用方确认覆盖——先卸载再装);io=复制/解压/磁盘失败。成功面附带 version/parked/needRestart 透传。
2434
+ */
2435
+ export interface PluginLocalInstallResult {
2436
+ ok: boolean;
2437
+ pluginId?: string;
2438
+ version?: string;
2439
+ reason?: PluginLocalInstallReason;
2440
+ /** loadInstalledPlugin needRestart 透传(同会话曾加载过 ⇒ 池缓存旧 bundle) */
2441
+ needRestart?: boolean;
2442
+ /** 已落盘但缺依赖(loadPlugin park)透传——文件在、不可用 */
2443
+ parked?: boolean;
2444
+ }
2329
2445
  /** Disabled/uninstalled list entry — the serialized shape of loader getDisabledPluginInfo/getUninstalledPluginInfo (a further subset of PluginListSubset)
2330
2446
  * the core flag passes through — list() EXCLUDES disabled plugins; the disabled-state detail page's uninstall button honors "no uninstall button on the detail page for core:true"
2331
2447
  * and core can only be obtained here (read from the cached manifest; a purely additive optional field, zero regression).
@@ -2344,7 +2460,8 @@ export interface PluginInfoEntry {
2344
2460
  updatable?: boolean;
2345
2461
  /** small UI icon (Type-1 silhouette for icon-bar plugins / Type-2 identity art for the rest) */
2346
2462
  icon?: string;
2347
- iconSource?: "codicon" | "svg" | "url" | "lucide";
2463
+ /** 🔴 "shared"(04 内置配置组图标 2026-11-18):按名引用 IconRegistry 共享图标——渲染需注入 sharedIcons 快照 */
2464
+ iconSource?: "codicon" | "svg" | "url" | "lucide" | "shared";
2348
2465
  /** plugin identity color art (Type-2) — first candidate for row/detail display positions */
2349
2466
  marketIcon?: string;
2350
2467
  marketIconSource?: "codicon" | "svg" | "url" | "lucide";
@@ -2421,8 +2538,16 @@ export interface PluginsAPI {
2421
2538
  enable(id: string): Promise<unknown>;
2422
2539
  disable(id: string): Promise<unknown>;
2423
2540
  uninstall(id: string): Promise<unknown>;
2424
- /** opts carries the requester-side identity (pluginId/displayName/origin) — job table dedup + job row display name */
2541
+ /** opts carries the requester-side identity (pluginId/displayName/origin) — job table dedup + job row display name.
2542
+ * R4-1.3: opts.pricing 随行(目录条目声明)——壳安装门见 model 存在即查权益,无 ⇒ licenseRequired 拦下。 */
2425
2543
  install(path: string, opts?: PluginInstallRequestOpts): Promise<PluginInstallResult>;
2544
+ /**
2545
+ * R4-1.2(I16·正典 09 §三·补2):本地安装——含 plugin.json 的单插件文件夹或 .linkdesk-plugin 离线包,
2546
+ * 复制进 {userData}/plugins/<pluginId> → 账本 → 注册 → lifecycle(与网络安装同一路,⛔ 不旁路)。
2547
+ * 五类回执见 PluginLocalInstallReason;同 id 已装回 `reason:"exists"`(覆盖 = 调用方先卸载再装)。
2548
+ * 拒 core:true(本地不得自封内置)。⛔ 不做多插件目录(09 v2 再议)。
2549
+ */
2550
+ installFromDirectory?(path: string, opts?: PluginInstallRequestOpts): Promise<PluginLocalInstallResult>;
2426
2551
  /** (1.2-5): the explicit name for the url/.linkdesk-plugin package install flow (installPlugin routing alias; identical on both the shell and pool preloads — the pool proxies via plugins:call). Progress goes through the plugin:installProgress channel */
2427
2552
  installWithProgress?(path: string, opts?: PluginInstallRequestOpts): Promise<PluginInstallResult>;
2428
2553
  reinstall(id: string): Promise<unknown>;
@@ -2442,6 +2567,51 @@ export interface PluginsAPI {
2442
2567
  notifyManifestChanged?(): void;
2443
2568
  };
2444
2569
  }
2570
+ /** 验签失败原因——封闭集合(消费方照原因出文案;⛔ reason 存在时 valid 恒 false) */
2571
+ export type LicenseVerifyFailureReason = "bad-key-format" // 密钥串不是 v1.<payload>.<sig> 形状 / payload 非 JSON / 缺 pluginId
2572
+ | "bad-public-key" // publicKey 解不出 Ed25519 公钥(作者块字段缺失或损坏)
2573
+ | "bad-signature" // 签名对不上(密钥被改/公钥不是签发者)
2574
+ | "expired" // 载荷 exp 已过
2575
+ | "machine-mismatch"; // 载荷绑机器 ≠ 本机指纹
2576
+
2577
+ /**
2578
+ * licenses.verify 回执——valid=true 时壳已把权益写入壳侧存储(licenses.json);
2579
+ * valid=false 时 failureReason 必带、pluginId/exp 尽力回带(解出多少带多少)。
2580
+ */
2581
+ export interface LicenseVerifyResult {
2582
+ valid: boolean;
2583
+ pluginId?: string;
2584
+ exp?: number;
2585
+ /** 载荷带 machine = 签发者绑了机器(记录留痕用) */
2586
+ machineBound?: boolean;
2587
+ failureReason?: LicenseVerifyFailureReason;
2588
+ }
2589
+ /** 权益记录——壳侧 licenses.json 一条(09 §三·补3:权益记录住壳,市场被整体替换仍在) */
2590
+ export interface LicenseEntitlement {
2591
+ pluginId: string;
2592
+ /** 载荷 exp 透传(undefined = 永久)——临期/过期徽标与安装门失效判定都读它 */
2593
+ exp?: number;
2594
+ /** 验签时载荷是否绑机器(留痕;本机指纹不落盘明文存——记录只记「绑没绑」) */
2595
+ machineBound?: boolean;
2596
+ /** 验签通过时刻 ISO */
2597
+ verifiedAt: string;
2598
+ }
2599
+ /** Licenses namespace surfaces — 壳 preload 直答主进程;池插件经 plugins:call 代理同面 */
2600
+ export interface LicensesAPI {
2601
+ licenses: {
2602
+ /**
2603
+ * 验签并入库——key = 作者 kit 签发的许可密钥;publicKey = 目录作者块 `authors/<id>.json` 的
2604
+ * `publicKey` 字段(市场插件已拉取作者块——壳无目录上下文,公钥经调用随行;这是 09 `verify(key)`
2605
+ * 一参速记的实现展开,理由:壳不拉目录,公钥只能由唯一读者——市场——喂入)。
2606
+ * valid=true 时壳侧已写权益(幂等:重复验同密钥 = 刷新 verifiedAt)。
2607
+ */
2608
+ verify(key: string, publicKey: string): Promise<LicenseVerifyResult>;
2609
+ /** 全量权益——市场「已购未安装」分区与临期/过期徽标的数据源(⛔ v1 不做集中管理列表 UI——用户拍板) */
2610
+ list(): Promise<LicenseEntitlement[]>;
2611
+ /** 移除某插件的权益记录(用户主动清除;安装门随即重新拦) */
2612
+ remove(pluginId: string): Promise<void>;
2613
+ };
2614
+ }
2445
2615
  /**
2446
2616
  * Bridge request envelope contract—
2447
2617
  *
@@ -3093,7 +3263,7 @@ export interface UpdateAPI {
3093
3263
  * cross-composed from 15 namespace domain interfaces (interface→type intersection;
3094
3264
  * index access such as LinkDeskAPI["pool"]/["configuration"] keeps the consumer contract unchanged).
3095
3265
  */
3096
- export type LinkDeskAPI = CommandsAPI & AppearanceAPI & StorageAPI & TabsAPI & KeybindingsAPI & UiAPI & DataAPI & WorkspaceAPI & EditorAPI & PluginsAPI & ShellAPI & PanelAPI & SettingsAPI & FactorySlotsAPI & AppAPI & UpdateAPI;
3266
+ export type LinkDeskAPI = CommandsAPI & AppearanceAPI & StorageAPI & TabsAPI & KeybindingsAPI & UiAPI & DataAPI & WorkspaceAPI & EditorAPI & PluginsAPI & LicensesAPI & ShellAPI & PanelAPI & SettingsAPI & FactorySlotsAPI & AppAPI & UpdateAPI;
3097
3267
  /**
3098
3268
  * 🔥 Canonical vocabulary for settings control hints (`uiHint`) — the single vocabulary between host declarations and the rendering layer (criterion B).
3099
3269
  *
@@ -3119,6 +3289,15 @@ export type SettingsUiHint = "themePicker" | "select" | "accentSource" | "slider
3119
3289
  * `statusCommand`/`actionCommand` can coexist with **any** primary control (rendering `[primary control][companion button][companion read-only]`).
3120
3290
  */
3121
3291
  export type SettingsRenderHint = "readonly" | "action" | "color";
3292
+ /** 许可密钥签名载荷——kit `sign-license`(棒 11)签什么、壳就验什么(09 正典三字段,⛔ 不私加必填项) */
3293
+ export interface LicenseKeyPayload {
3294
+ /** 授权目标插件——payload 自描述(verify 只吃 key 也能知道为谁授权) */
3295
+ pluginId: string;
3296
+ /** 机器指纹(`env.machineFingerprint`,sha256 前 16 位)——可选:不带 = 不绑机器 */
3297
+ machine?: string;
3298
+ /** 过期时刻(unix 秒)——可选:不带 = 永久 */
3299
+ exp?: number;
3300
+ }
3122
3301
  /**
3123
3302
  * "Open with" request — the sole input shape of the shell command `SHELL_COMMANDS.openWith`.
3124
3303
  * Give at least one of `uri` and `ext`: the context-menu/editor entry provides `uri` (the shell computes `ext`); the settings page's "open by type" entry provides only `ext`.
@@ -3155,7 +3334,7 @@ export interface OpenWithHandler {
3155
3334
  /** Icon manifest subset — produced by the shell with the shared helper `pickIdentityArt()` (same source as the settings page/tab bar) */
3156
3335
  manifest?: {
3157
3336
  icon?: string;
3158
- iconSource?: "codicon" | "svg" | "url" | "lucide";
3337
+ iconSource?: "codicon" | "svg" | "url" | "lucide" | "shared";
3159
3338
  };
3160
3339
  /** Whether this handler is the current default */
3161
3340
  isDefault: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linkdesk/contracts",
3
- "version": "0.1.44",
3
+ "version": "0.1.46",
4
4
  "description": "LinkDesk 插件契约类型——window.linkdesk.* 全量类型定义(E5.8 契约生成产物)。第三方插件作者唯一合法类型消费路径。",
5
5
  "type": "module",
6
6
  "types": "./linkdesk.d.ts",