@webskill/sdk 0.8.0 → 0.10.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.
Files changed (35) hide show
  1. package/dist/agent.d.ts +2 -2
  2. package/dist/agent.js +6 -2
  3. package/dist/browser.d.ts +5 -3
  4. package/dist/browser.js +35 -13
  5. package/dist/{catalogComponents-DfxxfUvn-D55Gbb2l.js → catalogComponents-DTcYfpLQ-CcoOaz-Z.js} +1946 -976
  6. package/dist/{dist-CJqQsIm9.js → dist-1OFC-zax.js} +7 -5
  7. package/dist/{dist-DmI5SBBF.js → dist-BViUeszk.js} +393 -44
  8. package/dist/{dist-59XlqDuv.js → dist-Bev6i6Ip.js} +10 -2
  9. package/dist/{eventTypes-g1BXL6x5-CibcOftR.js → eventTypes-s2uwAcLG-Go3l_dUe.js} +13 -2
  10. package/dist/governance.d.ts +37 -6
  11. package/dist/governance.js +53 -15
  12. package/dist/{index-P9J2LTfU.d.ts → index-B0QPLWPZ.d.ts} +6 -2
  13. package/dist/{index-fLskQfAS.d.ts → index-BF4E1a9j.d.ts} +10 -3
  14. package/dist/{index-K-eewlGL.d.ts → index-DtFdMKBX.d.ts} +69 -7
  15. package/dist/index.d.ts +11 -3
  16. package/dist/index.js +13 -4
  17. package/dist/mcp.d.ts +23 -3
  18. package/dist/mcp.js +70 -25
  19. package/dist/{memoryArtifactStore-52Zn9npI-upv5OWYf.js → memoryArtifactStore-52Zn9npI-LbCQaqyx.js} +1 -1
  20. package/dist/node.d.ts +3 -3
  21. package/dist/node.js +6 -6
  22. package/dist/{openUiLibrary-DURlAxjk-CU6AzfSW.js → openUiLibrary-CIrV--Ad-B8zG_91e.js} +3 -3
  23. package/dist/{skillVersionStore-Bl-ElD45-gRfSaAby.d.ts → skillVersionStore-D-qHk9ZE-DBsYYCWn.d.ts} +13 -5
  24. package/dist/{testing-BCUO5gZR.js → testing-WPTyXQYt.js} +28 -5
  25. package/dist/testing.d.ts +1 -1
  26. package/dist/testing.js +2 -2
  27. package/dist/{types-B3n0cMZu-BdcqQ35O.d.ts → types-CrRcT-LM-DZAp8sWv.d.ts} +44 -3
  28. package/dist/ui-react.d.ts +17 -2
  29. package/dist/ui-react.js +123 -39
  30. package/dist/ui-vue.d.ts +1 -1
  31. package/dist/ui-vue.js +1 -1
  32. package/dist/ui.d.ts +3 -3
  33. package/dist/ui.js +2 -2
  34. package/dist/{webskillLitCatalog-DwTwSBFt-DiXXpNZA.js → webskillLitCatalog-BJrphK0y-SGmRXaaO.js} +2 -2
  35. package/package.json +1 -1
@@ -329,6 +329,14 @@ declare class MemoryFS implements FileSystemProvider {
329
329
  }
330
330
  //#endregion
331
331
  //#region src/fs/atomicWrite.d.ts
332
+ /**
333
+ * 原子写的临时文件名后缀模式;列举/打包侧据此排除中断残留(0.9.0 分册 11)。
334
+ * 单一来源:不要在别处手写正则(AC-G10),复制正则必然漂移。
335
+ * @stable
336
+ */
337
+ declare const ATOMIC_TMP_SUFFIX_PATTERN: RegExp;
338
+ /** 该路径是否是 atomicWriteText 留下的临时文件 */
339
+ declare const isAtomicTempPath: (path: string) => boolean;
332
340
  /**
333
341
  * 原子写文本:先写临时文件再 rename(进程崩溃不留下半写文件;lockfile 等账本场景)。
334
342
  * 原子性强弱取决于 provider 的 rename 实现:NodeFS/MemoryFS 为真 rename;
@@ -621,18 +629,34 @@ declare function escapeXml(text: string): string;
621
629
  declare function renderAvailableSkillsXml(catalog: SkillCatalog): string;
622
630
  declare const xmlRenderer: CatalogRenderer;
623
631
  //#endregion
624
- //#region ../runtime/dist/types-B3n0cMZu.d.ts
632
+ //#region ../runtime/dist/types-CrRcT-LM.d.ts
625
633
  //#region src/llm/streamTypes.d.ts
626
634
  /** 流式 LLM 事件(OpenAI SSE / Vercel fullStream 统一映射) */
627
635
  type LlmStreamEvent = {
628
636
  type: 'text-delta';
629
637
  delta: string;
638
+ } | {
639
+ /**
640
+ * 思考增量(Anthropic thinking_delta / OpenAI 兼容 reasoning_content /
641
+ * Vercel reasoning-delta 统一映射)。模型不产出思考时一个事件也没有——
642
+ * 消费方据「有没有收到」决定要不要渲染思考区,不做空壳入口。
643
+ */
644
+ type: 'thinking-delta';
645
+ delta: string;
630
646
  } | {
631
647
  type: 'tool-calls';
632
648
  toolCalls: LlmToolCall[];
633
- } | {
649
+ } |
650
+ /**
651
+ * 流收尾。`usage`(0.10.0 UI-UX5 #47):本次调用的 token 用量,
652
+ * 各家适配层在末段汇总后随 done 下发(Anthropic message_start/message_delta、
653
+ * OpenAI include_usage 末段 chunk、Vercel finish 的 totalUsage 统一映射);
654
+ * 上游不回报时缺省——消费方据「有没有」决定要不要展示,不显示假数据。
655
+ */
656
+ {
634
657
  type: 'done';
635
658
  content?: string;
659
+ usage?: LlmTokenUsage;
636
660
  };
637
661
  //#endregion
638
662
  //#region src/llm/types.d.ts
@@ -673,9 +697,26 @@ interface LlmToolCall {
673
697
  /** 流式拼接后的 arguments 不是合法 JSON 时的错误描述;设置时 arguments 不可信 */
674
698
  argumentsParseError?: string;
675
699
  }
700
+ /**
701
+ * 一次模型调用的 token 用量(0.10.0 UI-UX5 #47)。
702
+ * 上游不回报 usage 时整个字段缺省——不填 0 冒充「已知为零」,
703
+ * 消费方据「有没有」决定要不要展示,不显示假数据。
704
+ * @stable
705
+ */
706
+ interface LlmTokenUsage {
707
+ inputTokens: number;
708
+ outputTokens: number;
709
+ }
676
710
  interface LlmResponse {
677
711
  content?: LlmContentPart[];
678
712
  toolCalls?: LlmToolCall[];
713
+ /**
714
+ * 本轮模型产出的思考正文(Anthropic thinking blocks / reasoning_content 等)。
715
+ * 不进消息历史、不回喂模型;只用于运行细节展示与 trace。
716
+ */
717
+ thinking?: string;
718
+ /** 本轮 token 用量(上游回报才有;chrome-builtin 等无 usage 能力的客户端缺省) */
719
+ usage?: LlmTokenUsage;
679
720
  raw?: unknown;
680
721
  }
681
722
  interface LlmCompleteInput {
@@ -1009,4 +1050,4 @@ interface MemoryStore {
1009
1050
  transaction?<T>(scope: string, fn: (inner: MemoryStore) => Promise<T>): Promise<T>;
1010
1051
  }
1011
1052
  //#endregion
1012
- export { SkillArchiveDetection as $, validateSkills as $t, ArchiveLimits as A, checkSkillRules as At, MemoryFS as B, normalizePath as Bt, UiSpecDrafts as C, WebSkillErrorCode as Ct, UiSurfaceActionRequest as D, buildCatalog as Dt, UiSpecSnapshot as E, atomicWriteText as Et, FileStat as F, exportSkills as Ft, SKILLS_LOCKFILE as G, renderAvailableSkillsXml as Gt, PageQuery as H, parseSkillPackManifest as Ht, FileSystemProvider as I, isValidSkillName as It, SKILL_NAME_PATTERN as J, resolveInsideRoot as Jt, SKILL_MANIFEST_FILE as K, renderCatalogJson as Kt, FsTrustedKeyStore as L, jsonRenderer as Lt, CryptoKeyLike as M, detectSkillArchiveShape as Mt, DEFAULT_ARCHIVE_LIMITS as N, detectSkillArchiveShapeFromFs as Nt, UiSurfaceActionResponse as O, buildManifest as Ot, DiscoveryResult as P, escapeXml as Pt, SignatureVerdict as Q, unzipWithLimits as Qt, JsonSchema as R, keyIdOf as Rt, UiSpecActionCapability as S, WebSkillError as St, UiSpecPatch as T, assertSafePathSegment as Tt, RemoteUrlPolicy as U, readResponseWithLimit as Ut, Page as V, parseSkillMarkdown as Vt, SIGNATURE_SCHEMA_VERSION as W, readSkillSignature as Wt, SKILL_SIGNATURE_FILE as X, signaturePayloadBytes as Xt, SKILL_PACK_FILE as Y, signSkill as Yt, SignatureAuditSink as Z, stripArchiveRoot as Zt, MemoryStore as _, TrustedKeyStore as _t, InteractionOrigin as a, SkillInstallSource as at, SkillCandidateMarker as b, ValidationReport as bt, InteractionResponse as c, SkillManagerPort as ct, LlmContentPart as d, SkillPackManifest as dt, verifyManifest as en, SkillArchiveShape as et, LlmMessage as f, SkillReader as ft, LlmToolSpec as g, TrustedKey as gt, LlmToolCall as h, SkillsLockfile as ht, FormField as i, SkillDocument as it, CatalogRenderer as j, computeDigest as jt, extractSkillCandidate as k, checkDependencyCycles as kt, LlmClient as l, SkillManifest as lt, LlmStreamEvent as m, SkillSource as mt, ArtifactStore as n, xmlRenderer as nn, SkillCatalogEntry as nt, InteractionPolicy as o, SkillIssue as ot, LlmResponse as p, SkillSignature as pt, SKILL_NAME_MAX_LENGTH as q, resolveArchiveLimits as qt, ChartSpec as r, SkillDiscovery as rt, InteractionRequest as s, SkillLocation as st, Artifact as t, verifySkillSignature as tn, SkillCatalog as tt, LlmCompleteInput as u, SkillMetadata as ut, RenderBlock as v, UiSpecNode as vt, UiSpecEvent as w, assertRemoteUrlAllowed as wt, UiBridge as x, VerifyResult as xt, RenderResultRequest as y, UnsignedPolicy as yt, MANIFEST_EXCLUDED_FILES as z, messageOf as zt };
1053
+ export { SignatureAuditSink as $, signaturePayloadBytes as $t, extractSkillCandidate as A, buildManifest as At, JsonSchema as B, jsonRenderer as Bt, UiSpecActionCapability as C, VerifyResult as Ct, UiSpecSnapshot as D, assertSafePathSegment as Dt, UiSpecPatch as E, assertRemoteUrlAllowed as Et, DEFAULT_ARCHIVE_LIMITS as F, detectSkillArchiveShapeFromFs as Ft, RemoteUrlPolicy as G, parseSkillPackManifest as Gt, MemoryFS as H, messageOf as Ht, DiscoveryResult as I, escapeXml as It, SKILL_MANIFEST_FILE as J, renderAvailableSkillsXml as Jt, SIGNATURE_SCHEMA_VERSION as K, readResponseWithLimit as Kt, FileStat as L, exportSkills as Lt, ArchiveLimits as M, checkSkillRules as Mt, CatalogRenderer as N, computeDigest as Nt, UiSurfaceActionRequest as O, atomicWriteText as Ot, CryptoKeyLike as P, detectSkillArchiveShape as Pt, SKILL_SIGNATURE_FILE as Q, signSkill as Qt, FileSystemProvider as R, isAtomicTempPath as Rt, UiBridge as S, ValidationReport as St, UiSpecEvent as T, WebSkillErrorCode as Tt, Page as U, normalizePath as Ut, MANIFEST_EXCLUDED_FILES as V, keyIdOf as Vt, PageQuery as W, parseSkillMarkdown as Wt, SKILL_NAME_PATTERN as X, resolveArchiveLimits as Xt, SKILL_NAME_MAX_LENGTH as Y, renderCatalogJson as Yt, SKILL_PACK_FILE as Z, resolveInsideRoot as Zt, LlmToolSpec as _, SkillsLockfile as _t, InteractionOrigin as a, xmlRenderer as an, SkillDiscovery as at, RenderResultRequest as b, UiSpecNode as bt, InteractionResponse as c, SkillIssue as ct, LlmContentPart as d, SkillManifest as dt, stripArchiveRoot as en, SignatureVerdict as et, LlmMessage as f, SkillMetadata as ft, LlmToolCall as g, SkillSource as gt, LlmTokenUsage as h, SkillSignature as ht, FormField as i, verifySkillSignature as in, SkillCatalogEntry as it, ATOMIC_TMP_SUFFIX_PATTERN as j, checkDependencyCycles as jt, UiSurfaceActionResponse as k, buildCatalog as kt, LlmClient as l, SkillLocation as lt, LlmStreamEvent as m, SkillReader as mt, ArtifactStore as n, validateSkills as nn, SkillArchiveShape as nt, InteractionPolicy as o, SkillDocument as ot, LlmResponse as p, SkillPackManifest as pt, SKILLS_LOCKFILE as q, readSkillSignature as qt, ChartSpec as r, verifyManifest as rn, SkillCatalog as rt, InteractionRequest as s, SkillInstallSource as st, Artifact as t, unzipWithLimits as tn, SkillArchiveDetection as tt, LlmCompleteInput as u, SkillManagerPort as ut, MemoryStore as v, TrustedKey as vt, UiSpecDrafts as w, WebSkillError as wt, SkillCandidateMarker as x, UnsignedPolicy as xt, RenderBlock as y, TrustedKeyStore as yt, FsTrustedKeyStore as z, isValidSkillName as zt };
@@ -1,5 +1,5 @@
1
- import { C as UiSpecDrafts, D as UiSurfaceActionRequest, E as UiSpecSnapshot, O as UiSurfaceActionResponse, S as UiSpecActionCapability, c as InteractionResponse, s as InteractionRequest, vt as UiSpecNode, w as UiSpecEvent, x as UiBridge, y as RenderResultRequest } from "./types-B3n0cMZu-BdcqQ35O.js";
2
- import { E as InteractionSpecLabels, R as SurfaceFormTexts } from "./index-P9J2LTfU.js";
1
+ import { C as UiSpecActionCapability, D as UiSpecSnapshot, O as UiSurfaceActionRequest, S as UiBridge, T as UiSpecEvent, b as RenderResultRequest, bt as UiSpecNode, c as InteractionResponse, k as UiSurfaceActionResponse, s as InteractionRequest, w as UiSpecDrafts } from "./types-CrRcT-LM-DZAp8sWv.js";
2
+ import { E as InteractionSpecLabels, R as SurfaceFormTexts } from "./index-B0QPLWPZ.js";
3
3
  import { z } from "zod";
4
4
  import React$1, { ComponentType, ReactNode } from "react";
5
5
  import "react/jsx-runtime";
@@ -253,6 +253,15 @@ declare class UiSurfaceStore {
253
253
  subscribe: (listener: () => void) => (() => void);
254
254
  get snapshots(): readonly UiSpecSnapshot[];
255
255
  apply(event: UiSpecEvent): void;
256
+ /**
257
+ * 表单 surface 提交成功后,把提交值回写为 Field 的 `defaultValue`(UI-UX5 #15):
258
+ * run 结束后界面用持久化快照重放,初值只认 defaultValue——不回写,
259
+ * 只读回看就看不到用户当时选/填了什么。
260
+ * 只写标量;字段名全树唯一才写(多表单同名字段无法判定归属,宁可不写也不写错)。
261
+ * 0.10.0 复核注记:multi-select 的数组值不会回写,属已知限制——重放里
262
+ * 多选项字段仍显示初值;标量优先的取舍保留。
263
+ */
264
+ applySubmittedValues(surfaceId: string, values: Record<string, unknown>): void;
256
265
  }
257
266
  //#endregion
258
267
  //#region src/bridgeState.d.ts
@@ -274,6 +283,12 @@ interface ReactBridgeStateOptions {
274
283
  onSurfaceDraftChange?(runId: string, surfaceId: string, value: Record<string, unknown>): Promise<void> | void;
275
284
  /** 覆盖默认的 console.warn 上报(测试与宿主遥测用)。@experimental */
276
285
  onDroppedSurfaceAction?(warning: DroppedSurfaceActionWarning): void;
286
+ /**
287
+ * run 结果渲染请求按 runId 派发(FR-12.1)。
288
+ * `latestResult` 是全局单槽:多 run 并发时会被后一个 run 覆盖,消费方无法据此判断
289
+ * blocks 归属;订阅本回调的引擎按 runId 缓存自己的渲染产物。
290
+ */
291
+ onRenderResult?(runId: string, request: RenderResultRequest): void;
277
292
  }
278
293
  /**
279
294
  * React 桥接状态:UiBridge 实现 + useSyncExternalStore 兼容订阅。
package/dist/ui-react.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll$1 } from "./rolldown-runtime-BOF7iYI8.js";
2
- import { m as WebSkillError } from "./dist-59XlqDuv.js";
3
- import { Ot as validateUiSpecEvent, kt as validateUiSpecNode } from "./dist-DmI5SBBF.js";
4
- import { F as normalizeColumnWidths, M as interactionToUiSpec, R as renderMiniChart, U as toJsonRenderSpec, W as toOpenUiSpecLang, Z as DEFAULT_SURFACE_FORM_TEXTS, ct as renderMiniMarkdown, dt as shapeInteractionValue, ft as uiCatalog, it as chartSpecFromProps, ot as interactionToFormModel, w as collectValues, y as applySuggestion } from "./dist-CJqQsIm9.js";
5
- import { C as DropdownMenuContent, D as Separator, E as Markdown, S as DropdownMenuCheckboxItem, T as Input, _ as useSurfaceFormTexts, a as SpecProgress, b as DataTable, c as SurfaceButton, d as SurfaceFormButtons, f as SurfaceFormTextsProvider, g as useSurfaceForm, h as useCatalogSurfaceForm, i as SpecGrid, l as SurfaceField, m as str, n as CatalogSurfaceProvider, o as SpecTabs, p as catalogComponentImpls, r as EChart, s as SpecTimeline, u as SurfaceFieldArray, v as Badge, w as DropdownMenuTrigger, x as DropdownMenu, y as Button } from "./catalogComponents-DfxxfUvn-D55Gbb2l.js";
2
+ import { h as WebSkillError } from "./dist-Bev6i6Ip.js";
3
+ import { At as validateUiSpecNode, kt as validateUiSpecEvent } from "./dist-BViUeszk.js";
4
+ import { B as resolveColumnWidths, F as normalizeColumnWidths, M as interactionToUiSpec, R as renderMiniChart, U as toJsonRenderSpec, W as toOpenUiSpecLang, Z as DEFAULT_SURFACE_FORM_TEXTS, ct as renderMiniMarkdown, dt as shapeInteractionValue, ft as uiCatalog, it as chartSpecFromProps, ot as interactionToFormModel, w as collectValues, y as applySuggestion } from "./dist-1OFC-zax.js";
5
+ import { C as DropdownMenuContent, D as Separator, E as Markdown, S as DropdownMenuCheckboxItem, T as Input, _ as useSurfaceFormTexts, a as SpecProgress, b as DataTable, c as SurfaceButton, d as SurfaceFormButtons, f as SurfaceFormTextsProvider, g as useSurfaceForm, h as useCatalogSurfaceForm, i as SpecGrid, l as SurfaceField, m as str, n as CatalogSurfaceProvider, o as SpecTabs, p as catalogComponentImpls, r as EChart, s as SpecTimeline, u as SurfaceFieldArray, v as Badge, w as DropdownMenuTrigger, x as DropdownMenu, y as Button } from "./catalogComponents-DTcYfpLQ-CcoOaz-Z.js";
6
6
  import { z } from "zod";
7
7
  import * as React$1 from "react";
8
8
  import React, { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
@@ -6469,6 +6469,54 @@ var UiSurfaceStore = class {
6469
6469
  this.#emit();
6470
6470
  }
6471
6471
  }
6472
+ /**
6473
+ * 表单 surface 提交成功后,把提交值回写为 Field 的 `defaultValue`(UI-UX5 #15):
6474
+ * run 结束后界面用持久化快照重放,初值只认 defaultValue——不回写,
6475
+ * 只读回看就看不到用户当时选/填了什么。
6476
+ * 只写标量;字段名全树唯一才写(多表单同名字段无法判定归属,宁可不写也不写错)。
6477
+ * 0.10.0 复核注记:multi-select 的数组值不会回写,属已知限制——重放里
6478
+ * 多选项字段仍显示初值;标量优先的取舍保留。
6479
+ */
6480
+ applySubmittedValues(surfaceId, values) {
6481
+ const entry = this.#entries.get(this.#aliases.get(surfaceId) ?? surfaceId);
6482
+ if (!entry) return;
6483
+ const scalars = new Map(Object.entries(values).filter(([, value]) => [
6484
+ "string",
6485
+ "number",
6486
+ "boolean"
6487
+ ].includes(typeof value)));
6488
+ if (scalars.size === 0) return;
6489
+ const nameCount = /* @__PURE__ */ new Map();
6490
+ const count = (node) => {
6491
+ const name = node.component === "Field" ? node.props?.["name"] : void 0;
6492
+ if (typeof name === "string") nameCount.set(name, (nameCount.get(name) ?? 0) + 1);
6493
+ for (const child of node.children ?? []) count(child);
6494
+ };
6495
+ count(entry.node);
6496
+ const next = structuredClone(entry.node);
6497
+ let changed = false;
6498
+ const write = (node) => {
6499
+ if (node.component === "Field" && node.props) {
6500
+ const name = node.props["name"];
6501
+ if (typeof name === "string" && nameCount.get(name) === 1 && scalars.has(name)) {
6502
+ const value = scalars.get(name);
6503
+ if (node.props["defaultValue"] !== value) {
6504
+ node.props["defaultValue"] = value;
6505
+ changed = true;
6506
+ }
6507
+ }
6508
+ }
6509
+ for (const child of node.children ?? []) write(child);
6510
+ };
6511
+ write(next);
6512
+ if (!changed) return;
6513
+ this.#entries.set(entry.id, {
6514
+ ...entry,
6515
+ node: validateUiSpecNode(next)
6516
+ });
6517
+ this.#snapshots = [...this.#entries.values()];
6518
+ this.#emit();
6519
+ }
6472
6520
  /** 跨 run 的相同界面是合法重复(用户又问了一次),所以无 runId 时不合并 */
6473
6521
  #fingerprint(event) {
6474
6522
  if (event.runId === void 0) return void 0;
@@ -6521,9 +6569,11 @@ var ReactBridgeState = class {
6521
6569
  #surfaceDrafts = /* @__PURE__ */ new Map();
6522
6570
  #onSurfaceDraftChange;
6523
6571
  #onDroppedSurfaceAction;
6572
+ #onRenderResult;
6524
6573
  constructor(options = {}) {
6525
6574
  this.#onSurfaceDraftChange = options.onSurfaceDraftChange;
6526
6575
  this.#onDroppedSurfaceAction = options.onDroppedSurfaceAction;
6576
+ this.#onRenderResult = options.onRenderResult;
6527
6577
  this.surfaceStore.subscribe(() => this.#emit());
6528
6578
  }
6529
6579
  get surfaceSnapshots() {
@@ -6580,6 +6630,7 @@ var ReactBridgeState = class {
6580
6630
  }
6581
6631
  async renderResult(input) {
6582
6632
  this.latestResult = input;
6633
+ this.#onRenderResult?.(input.runId, input);
6583
6634
  this.#emit();
6584
6635
  }
6585
6636
  async renderSurface(event) {
@@ -6619,6 +6670,7 @@ var ReactBridgeState = class {
6619
6670
  const { [response.surfaceId]: _discarded, ...remaining } = drafts;
6620
6671
  this.#surfaceDrafts.set(response.runId, remaining);
6621
6672
  }
6673
+ if (!response.cancelled && response.value !== void 0) this.surfaceStore.applySubmittedValues(response.surfaceId, response.value);
6622
6674
  this.#emit();
6623
6675
  resolver(response);
6624
6676
  return true;
@@ -6952,6 +7004,10 @@ function SurfaceSimplifiedNote({ degradations }) {
6952
7004
  function SurfaceDegradationNote({ degradations }) {
6953
7005
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SurfaceRejectionAlert, { degradations }), /* @__PURE__ */ jsx(SurfaceSimplifiedNote, { degradations })] });
6954
7006
  }
7007
+ /** 容器宽度未测出(jsdom / 首帧)时的最小列宽兜底:与 SPEC_TABLE_MIN_COLUMN_WIDTH.desktop(8rem @16px)一致 */
7008
+ const FALLBACK_MIN_COLUMN_PX = 128;
7009
+ /** ScrollArea 容器的左右边框合计宽度(视觉契约,测量可用宽时扣除) */
7010
+ const SCROLL_AREA_BORDER_RESERVE = 2;
6955
7011
  /**
6956
7012
  * catalog `Table` 节点的渲染实现:排序 / 筛选 / 分页 / 列显隐 / 虚拟滚动。
6957
7013
  * 这些是宿主侧的呈现能力,不进 catalog props——模型只声明 columns 与 rows。
@@ -6962,13 +7018,30 @@ function SpecTable({ columns, rows, label, columnWidths, onDegraded }) {
6962
7018
  const [globalFilter, setGlobalFilter] = useState("");
6963
7019
  const [columnVisibility, setColumnVisibility] = useState({});
6964
7020
  const scrollRef = useRef(null);
7021
+ const frameRef = useRef(null);
7022
+ /** 实测的容器宽度与最小列宽(px);未测量(jsdom / 首帧)时退回百分比 colgroup */
7023
+ const [measured, setMeasured] = useState(void 0);
6965
7024
  const normalized = normalizeColumnWidths(columnWidths, columns.length);
6966
- const weightTotal = normalized.weights.reduce((sum, weight) => sum + weight, 0);
6967
- const widthPercents = normalized.weights.map((weight) => weightTotal > 0 ? weight / weightTotal * 100 : 0);
6968
7025
  const rejected = normalized.rejected;
6969
7026
  useEffect(() => {
6970
7027
  if (rejected !== void 0) onDegraded?.(rejected);
6971
7028
  }, [rejected, onDegraded]);
7029
+ useEffect(() => {
7030
+ const frame = frameRef.current;
7031
+ if (!frame || typeof ResizeObserver === "undefined") return;
7032
+ const measure = () => {
7033
+ const th = frame.querySelector("th");
7034
+ const probe = th === null ? NaN : Number.parseFloat(getComputedStyle(th).minWidth);
7035
+ setMeasured({
7036
+ available: Math.max(0, frame.clientWidth - SCROLL_AREA_BORDER_RESERVE),
7037
+ minCol: Number.isFinite(probe) && probe > 0 ? probe : FALLBACK_MIN_COLUMN_PX
7038
+ });
7039
+ };
7040
+ measure();
7041
+ const observer = new ResizeObserver(measure);
7042
+ observer.observe(frame);
7043
+ return () => observer.disconnect();
7044
+ }, []);
6972
7045
  const table = useReactTable({
6973
7046
  data: rows,
6974
7047
  columns: columns.map((header, index) => ({
@@ -6992,6 +7065,10 @@ function SpecTable({ columns, rows, label, columnWidths, onDegraded }) {
6992
7065
  initialState: { pagination: { pageSize: 50 } }
6993
7066
  });
6994
7067
  const modelRows = table.getRowModel().rows;
7068
+ const visibleIndexes = table.getVisibleLeafColumns().map((column) => Number(column.id.replace("column-", "")));
7069
+ const visibleWeights = visibleIndexes.map((index) => normalized.weights[index] ?? 1);
7070
+ const visibleWeightTotal = visibleWeights.reduce((sum, weight) => sum + weight, 0);
7071
+ const pixelWidths = measured ? resolveColumnWidths(visibleWeights, measured.available, measured.minCol) : void 0;
6995
7072
  const virtualRows = useVirtualizer({
6996
7073
  count: modelRows.length,
6997
7074
  getScrollElement: () => scrollRef.current,
@@ -7028,37 +7105,44 @@ function SpecTable({ columns, rows, label, columnWidths, onDegraded }) {
7028
7105
  }, column.id))
7029
7106
  })] })]
7030
7107
  }),
7031
- /* @__PURE__ */ jsxs(DataTable, {
7032
- "aria-label": label,
7033
- containerClassName: "webskill-surface__table-scroll",
7034
- children: [
7035
- /* @__PURE__ */ jsx("colgroup", { children: widthPercents.map((percent, index) => /* @__PURE__ */ jsx("col", { style: { width: `${percent}%` } }, index)) }),
7036
- /* @__PURE__ */ jsx("thead", {
7037
- className: "webskill-surface__table-header",
7038
- children: /* @__PURE__ */ jsx("tr", { children: table.getFlatHeaders().map((header) => /* @__PURE__ */ jsx("th", {
7039
- scope: "col",
7040
- ...header.column.id === "selection" ? { "data-webskill-host-control": "" } : {},
7041
- "aria-sort": header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : "none",
7042
- children: header.column.getCanSort() ? /* @__PURE__ */ jsx("button", {
7043
- type: "button",
7044
- "data-webskill-host-control": "",
7045
- onClick: header.column.getToggleSortingHandler(),
7046
- children: flexRender(header.column.columnDef.header, header.getContext())
7047
- }) : flexRender(header.column.columnDef.header, header.getContext())
7048
- }, header.id)) })
7049
- }),
7050
- /* @__PURE__ */ jsx("tbody", {
7051
- ref: scrollRef,
7052
- className: "webskill-surface__table-body",
7053
- children: renderedRows.map((virtualRow) => {
7054
- const row = modelRows[virtualRow.index];
7055
- return /* @__PURE__ */ jsx("tr", { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx("td", {
7056
- ...cell.column.id === "selection" ? { "data-webskill-host-control": "" } : {},
7057
- children: flexRender(cell.column.columnDef.cell, cell.getContext())
7058
- }, cell.id)) }, row.id);
7108
+ /* @__PURE__ */ jsx("div", {
7109
+ ref: frameRef,
7110
+ children: /* @__PURE__ */ jsxs(DataTable, {
7111
+ "aria-label": label,
7112
+ containerClassName: "webskill-surface__table-scroll",
7113
+ ...pixelWidths ? { style: {
7114
+ tableLayout: "fixed",
7115
+ width: `${pixelWidths.reduce((sum, width) => sum + width, 0)}px`
7116
+ } } : {},
7117
+ children: [
7118
+ /* @__PURE__ */ jsx("colgroup", { children: visibleIndexes.map((original, position) => /* @__PURE__ */ jsx("col", { style: { width: pixelWidths ? `${pixelWidths[position]}px` : `${visibleWeightTotal > 0 ? (visibleWeights[position] ?? 0) / visibleWeightTotal * 100 : 0}%` } }, original)) }),
7119
+ /* @__PURE__ */ jsx("thead", {
7120
+ className: "webskill-surface__table-header",
7121
+ children: /* @__PURE__ */ jsx("tr", { children: table.getFlatHeaders().map((header) => /* @__PURE__ */ jsx("th", {
7122
+ scope: "col",
7123
+ ...header.column.id === "selection" ? { "data-webskill-host-control": "" } : {},
7124
+ "aria-sort": header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : "none",
7125
+ children: header.column.getCanSort() ? /* @__PURE__ */ jsx("button", {
7126
+ type: "button",
7127
+ "data-webskill-host-control": "",
7128
+ onClick: header.column.getToggleSortingHandler(),
7129
+ children: flexRender(header.column.columnDef.header, header.getContext())
7130
+ }) : flexRender(header.column.columnDef.header, header.getContext())
7131
+ }, header.id)) })
7132
+ }),
7133
+ /* @__PURE__ */ jsx("tbody", {
7134
+ ref: scrollRef,
7135
+ className: "webskill-surface__table-body",
7136
+ children: renderedRows.map((virtualRow) => {
7137
+ const row = modelRows[virtualRow.index];
7138
+ return /* @__PURE__ */ jsx("tr", { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx("td", {
7139
+ ...cell.column.id === "selection" ? { "data-webskill-host-control": "" } : {},
7140
+ children: flexRender(cell.column.columnDef.cell, cell.getContext())
7141
+ }, cell.id)) }, row.id);
7142
+ })
7059
7143
  })
7060
- })
7061
- ]
7144
+ ]
7145
+ })
7062
7146
  }),
7063
7147
  /* @__PURE__ */ jsxs("div", {
7064
7148
  className: "webskill-surface__table-pagination",
@@ -7103,7 +7187,7 @@ function renderNode(node, context, key, scope) {
7103
7187
  children
7104
7188
  }, key);
7105
7189
  case "Card": return /* @__PURE__ */ jsxs("section", {
7106
- className: "flex flex-col gap-2 rounded-lg border border-border bg-card p-3",
7190
+ className: "webskill-spec-card flex flex-col gap-2 rounded-lg border border-border bg-card p-3",
7107
7191
  children: [
7108
7192
  /* @__PURE__ */ jsx("h3", {
7109
7193
  className: "text-sm font-semibold text-ink",
@@ -7285,7 +7369,7 @@ function NativeSpecSurface({ surfaceId, spec, actions, registry, runId, draft, o
7285
7369
  const texts = useSurfaceFormTexts();
7286
7370
  const { node, degradations } = sanitized;
7287
7371
  return /* @__PURE__ */ jsxs("div", {
7288
- className: shell === "none" ? "webskill-surface--spec" : "webskill-surface webskill-surface--spec",
7372
+ className: shell !== "none" && node?.component !== "Table" ? "webskill-surface webskill-surface--spec" : "webskill-surface--spec",
7289
7373
  "data-testid": "native-spec-surface",
7290
7374
  children: [
7291
7375
  node ? renderNode(node, context, "root") : null,
@@ -7587,7 +7671,7 @@ function OpenUiSpecSurface({ spec, surfaceId, actions, onAction }) {
7587
7671
  const [unavailable, setUnavailable] = useState(false);
7588
7672
  useEffect(() => {
7589
7673
  let cancelled = false;
7590
- import("./openUiLibrary-DURlAxjk-CU6AzfSW.js").then((loaded) => {
7674
+ import("./openUiLibrary-CIrV--Ad-B8zG_91e.js").then((loaded) => {
7591
7675
  if (!cancelled) setModule(loaded);
7592
7676
  }).catch(() => {
7593
7677
  if (!cancelled) setUnavailable(true);
package/dist/ui-vue.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as InteractionResponse, s as InteractionRequest, x as UiBridge, y as RenderResultRequest } from "./types-B3n0cMZu-BdcqQ35O.js";
1
+ import { S as UiBridge, b as RenderResultRequest, c as InteractionResponse, s as InteractionRequest } from "./types-CrRcT-LM-DZAp8sWv.js";
2
2
  import { PropType } from "vue";
3
3
  //#region ../ui-vue/dist/index.d.ts
4
4
  //#region src/bridgeState.d.ts
package/dist/ui-vue.js CHANGED
@@ -1,4 +1,4 @@
1
- import { R as renderMiniChart, Z as DEFAULT_SURFACE_FORM_TEXTS, ct as renderMiniMarkdown, dt as shapeInteractionValue, ot as interactionToFormModel, w as collectValues, y as applySuggestion } from "./dist-CJqQsIm9.js";
1
+ import { R as renderMiniChart, Z as DEFAULT_SURFACE_FORM_TEXTS, ct as renderMiniMarkdown, dt as shapeInteractionValue, ot as interactionToFormModel, w as collectValues, y as applySuggestion } from "./dist-1OFC-zax.js";
2
2
  import { defineComponent, h, reactive, ref } from "vue";
3
3
 
4
4
  //#region ../ui-vue/dist/index.js
package/dist/ui.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { vt as UiSpecNode } from "./types-B3n0cMZu-BdcqQ35O.js";
2
- import { vn as buildRenderResult } from "./index-K-eewlGL.js";
3
- import { $ as UiSpecIssue, A as MAX_CONDITION_DEPTH, At as interactionToUiSpec, B as UI_CATALOG_PROMPT_BUDGET_BYTES, Bt as resolveColumnWidths, C as FieldCondition, Ct as ensureStyles, D as InteractionTexts, Dt as fromUiSurfaceActionDispatch, E as InteractionSpecLabels, Et as fromA2uiSurfaceAction, F as SPEC_TABLE_MIN_COLUMN_VAR, Ft as qualifyFieldName, G as UiCatalogInput, Gt as toA2uiSurfaceAction, H as UI_PRESET_NAMES, Ht as resolveSurfaceFormTexts, I as SPEC_TABLE_MIN_COLUMN_WIDTH, It as renderBlocks, J as UiComponentDef, Jt as toUiSurfaceActionDispatch, K as UiCatalogPromptOptions, Kt as toJsonRenderSpec, L as SpecColumnMeta, Lt as renderMiniChart, M as OpenUiRendererProps, Mt as loadWebSkillLitCatalog, N as OpenUiRuntime, Nt as mountEchart, O as JsonRenderSpec, Ot as fromVercelToolResult, P as RENDER_UI_TOOL, Pt as normalizeColumnWidths, Q as UiSpecDegradation, R as SurfaceFormTexts, Rt as renderMiniMarkdown, S as EvaluateFieldConditionOptions, St as defineUiCatalog, T as FormModel, Tt as fromA2uiSpecAction, U as UiActionDef, Ut as shapeInteractionValue, V as UI_PRESETS, Vt as resolveInteractionTexts, W as UiCatalog, Wt as toA2uiSpecMessages, X as UiPreset, Xt as uiCatalog, Y as UiFormScope, Yt as toVercelToolInvocation, Z as UiPresetName, Zt as uiPreset, _ as ControlModel, _t as collectFormScopes, a as A2UI_SURFACE_ACTION, at as VercelUiBridge, b as DESCRIBE_UI_PRESET_TOOL, bt as collectValues, c as A2uiCatalogDefinition, ct as WEBSKILL_SURFACE_ACTION, d as A2uiMessage, dt as a2uiComponentSchema, et as UiSpecSanitization, f as A2uiSpecActionEvent, ft as a2uiComponentShapes, g as ColumnWidthsRejection, gt as chartToTable, h as CollectedValues, ht as chartSpecFromProps, i as A2UI_SPEC_FORM_PATH, it as VercelToolInvocation, j as NormalizedColumnWidths, jt as loadOpenUiPeers, k as LoadedOpenUiPeers, kt as interactionToFormModel, l as A2uiCatalogHandle, lt as WebFormBridge, m as CHART_PALETTE, mt as buildA2uiCatalogDefinition, n as A2UI_COMMON_TYPES, nt as UiSurfaceActionDispatch, o as A2UI_VERSION, ot as WEBSKILL_A2UI_CATALOG_ID, p as A2uiSpecMessageOptions, pt as applySuggestion, q as UiCatalogToolSourceOptions, qt as toOpenUiSpecLang, r as A2UI_SPEC_ACTION, rt as VERCEL_INTERACTION_TOOL_NAME, s as A2uiCatalogComponent, st as WEBSKILL_STYLES_CSS, t as A2UI_BASIC_CATALOG_ID, tt as UiSpecValidation, u as A2uiComponentShape, ut as ZodRuntime, v as DEFAULT_INTERACTION_TEXTS, vt as collectScopedValues, w as FieldConditionResult, wt as evaluateFieldCondition, x as EchartHandle, xt as createUiCatalogToolSource, y as DEFAULT_SURFACE_FORM_TEXTS, yt as collectSpecActions, z as UI_CATALOG_GROUPS, zt as renderRenderResult } from "./index-P9J2LTfU.js";
1
+ import { bt as UiSpecNode } from "./types-CrRcT-LM-DZAp8sWv.js";
2
+ import { yn as buildRenderResult } from "./index-DtFdMKBX.js";
3
+ import { $ as UiSpecIssue, A as MAX_CONDITION_DEPTH, At as interactionToUiSpec, B as UI_CATALOG_PROMPT_BUDGET_BYTES, Bt as resolveColumnWidths, C as FieldCondition, Ct as ensureStyles, D as InteractionTexts, Dt as fromUiSurfaceActionDispatch, E as InteractionSpecLabels, Et as fromA2uiSurfaceAction, F as SPEC_TABLE_MIN_COLUMN_VAR, Ft as qualifyFieldName, G as UiCatalogInput, Gt as toA2uiSurfaceAction, H as UI_PRESET_NAMES, Ht as resolveSurfaceFormTexts, I as SPEC_TABLE_MIN_COLUMN_WIDTH, It as renderBlocks, J as UiComponentDef, Jt as toUiSurfaceActionDispatch, K as UiCatalogPromptOptions, Kt as toJsonRenderSpec, L as SpecColumnMeta, Lt as renderMiniChart, M as OpenUiRendererProps, Mt as loadWebSkillLitCatalog, N as OpenUiRuntime, Nt as mountEchart, O as JsonRenderSpec, Ot as fromVercelToolResult, P as RENDER_UI_TOOL, Pt as normalizeColumnWidths, Q as UiSpecDegradation, R as SurfaceFormTexts, Rt as renderMiniMarkdown, S as EvaluateFieldConditionOptions, St as defineUiCatalog, T as FormModel, Tt as fromA2uiSpecAction, U as UiActionDef, Ut as shapeInteractionValue, V as UI_PRESETS, Vt as resolveInteractionTexts, W as UiCatalog, Wt as toA2uiSpecMessages, X as UiPreset, Xt as uiCatalog, Y as UiFormScope, Yt as toVercelToolInvocation, Z as UiPresetName, Zt as uiPreset, _ as ControlModel, _t as collectFormScopes, a as A2UI_SURFACE_ACTION, at as VercelUiBridge, b as DESCRIBE_UI_PRESET_TOOL, bt as collectValues, c as A2uiCatalogDefinition, ct as WEBSKILL_SURFACE_ACTION, d as A2uiMessage, dt as a2uiComponentSchema, et as UiSpecSanitization, f as A2uiSpecActionEvent, ft as a2uiComponentShapes, g as ColumnWidthsRejection, gt as chartToTable, h as CollectedValues, ht as chartSpecFromProps, i as A2UI_SPEC_FORM_PATH, it as VercelToolInvocation, j as NormalizedColumnWidths, jt as loadOpenUiPeers, k as LoadedOpenUiPeers, kt as interactionToFormModel, l as A2uiCatalogHandle, lt as WebFormBridge, m as CHART_PALETTE, mt as buildA2uiCatalogDefinition, n as A2UI_COMMON_TYPES, nt as UiSurfaceActionDispatch, o as A2UI_VERSION, ot as WEBSKILL_A2UI_CATALOG_ID, p as A2uiSpecMessageOptions, pt as applySuggestion, q as UiCatalogToolSourceOptions, qt as toOpenUiSpecLang, r as A2UI_SPEC_ACTION, rt as VERCEL_INTERACTION_TOOL_NAME, s as A2uiCatalogComponent, st as WEBSKILL_STYLES_CSS, t as A2UI_BASIC_CATALOG_ID, tt as UiSpecValidation, u as A2uiComponentShape, ut as ZodRuntime, v as DEFAULT_INTERACTION_TEXTS, vt as collectScopedValues, w as FieldConditionResult, wt as evaluateFieldCondition, x as EchartHandle, xt as createUiCatalogToolSource, y as DEFAULT_SURFACE_FORM_TEXTS, yt as collectSpecActions, z as UI_CATALOG_GROUPS, zt as renderRenderResult } from "./index-B0QPLWPZ.js";
4
4
  export { A2UI_BASIC_CATALOG_ID, A2UI_COMMON_TYPES, A2UI_SPEC_ACTION, A2UI_SPEC_FORM_PATH, A2UI_SURFACE_ACTION, A2UI_VERSION, type A2uiCatalogComponent, type A2uiCatalogDefinition, type A2uiCatalogHandle, type A2uiComponentShape, type A2uiMessage, type A2uiSpecActionEvent, type A2uiSpecMessageOptions, CHART_PALETTE, type CollectedValues, type ColumnWidthsRejection, type ControlModel, DEFAULT_INTERACTION_TEXTS, DEFAULT_SURFACE_FORM_TEXTS, DESCRIBE_UI_PRESET_TOOL, type EchartHandle, type EvaluateFieldConditionOptions, type FieldCondition, type FieldConditionResult, type FormModel, type InteractionSpecLabels, type InteractionTexts, type JsonRenderSpec, type LoadedOpenUiPeers, MAX_CONDITION_DEPTH, type NormalizedColumnWidths, type OpenUiRendererProps, type OpenUiRuntime, RENDER_UI_TOOL, SPEC_TABLE_MIN_COLUMN_VAR, SPEC_TABLE_MIN_COLUMN_WIDTH, type SpecColumnMeta, type SurfaceFormTexts, UI_CATALOG_GROUPS, UI_CATALOG_PROMPT_BUDGET_BYTES, UI_PRESETS, UI_PRESET_NAMES, type UiActionDef, type UiCatalog, type UiCatalogInput, type UiCatalogPromptOptions, type UiCatalogToolSourceOptions, type UiComponentDef, type UiFormScope, type UiPreset, type UiPresetName, type UiSpecDegradation, type UiSpecIssue, type UiSpecNode, type UiSpecSanitization, type UiSpecValidation, type UiSurfaceActionDispatch, VERCEL_INTERACTION_TOOL_NAME, type VercelToolInvocation, VercelUiBridge, WEBSKILL_A2UI_CATALOG_ID, WEBSKILL_STYLES_CSS, WEBSKILL_SURFACE_ACTION, WebFormBridge, type ZodRuntime, a2uiComponentSchema, a2uiComponentShapes, applySuggestion, buildA2uiCatalogDefinition, buildRenderResult, chartSpecFromProps, chartToTable, collectFormScopes, collectScopedValues, collectSpecActions, collectValues, createUiCatalogToolSource, defineUiCatalog, ensureStyles, evaluateFieldCondition, fromA2uiSpecAction, fromA2uiSurfaceAction, fromUiSurfaceActionDispatch, fromVercelToolResult, interactionToFormModel, interactionToUiSpec, loadOpenUiPeers, loadWebSkillLitCatalog, mountEchart, normalizeColumnWidths, qualifyFieldName, renderBlocks, renderMiniChart, renderMiniMarkdown, renderRenderResult, resolveColumnWidths, resolveInteractionTexts, resolveSurfaceFormTexts, shapeInteractionValue, toA2uiSpecMessages, toA2uiSurfaceAction, toJsonRenderSpec, toOpenUiSpecLang, toUiSurfaceActionDispatch, toVercelToolInvocation, uiCatalog, uiPreset };
package/dist/ui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { V as buildRenderResult } from "./dist-DmI5SBBF.js";
2
- import { $ as UI_CATALOG_PROMPT_BUDGET_BYTES, A as fromUiSurfaceActionDispatch, B as resolveColumnWidths, C as collectSpecActions, D as evaluateFieldCondition, E as ensureStyles, F as normalizeColumnWidths, G as toUiSurfaceActionDispatch, H as toA2uiSurfaceAction, I as qualifyFieldName, K as toVercelToolInvocation, L as renderBlocks, M as interactionToUiSpec, N as loadOpenUiPeers, O as fromA2uiSpecAction, P as loadWebSkillLitCatalog, Q as UI_CATALOG_GROUPS, R as renderMiniChart, S as collectScopedValues, T as createUiCatalogToolSource, U as toJsonRenderSpec, V as toA2uiSpecMessages, W as toOpenUiSpecLang, X as DEFAULT_INTERACTION_TEXTS, Y as A2UI_COMMON_TYPES, Z as DEFAULT_SURFACE_FORM_TEXTS, _ as WEBSKILL_SURFACE_ACTION, a as A2UI_VERSION, at as defineUiCatalog, b as chartToTable, c as MAX_CONDITION_DEPTH, ct as renderMiniMarkdown, d as SPEC_TABLE_MIN_COLUMN_WIDTH, dt as shapeInteractionValue, et as WEBSKILL_A2UI_CATALOG_ID, f as UI_PRESETS, ft as uiCatalog, g as WEBSKILL_STYLES_CSS, h as VercelUiBridge, i as A2UI_SURFACE_ACTION, it as chartSpecFromProps, j as fromVercelToolResult, k as fromA2uiSurfaceAction, l as RENDER_UI_TOOL, lt as resolveInteractionTexts, m as VERCEL_INTERACTION_TOOL_NAME, n as A2UI_SPEC_ACTION, nt as a2uiComponentShapes, o as CHART_PALETTE, ot as interactionToFormModel, p as UI_PRESET_NAMES, q as uiPreset, r as A2UI_SPEC_FORM_PATH, rt as buildA2uiCatalogDefinition, s as DESCRIBE_UI_PRESET_TOOL, st as mountEchart, t as A2UI_BASIC_CATALOG_ID, tt as a2uiComponentSchema, u as SPEC_TABLE_MIN_COLUMN_VAR, ut as resolveSurfaceFormTexts, v as WebFormBridge, w as collectValues, x as collectFormScopes, y as applySuggestion, z as renderRenderResult } from "./dist-CJqQsIm9.js";
1
+ import { V as buildRenderResult } from "./dist-BViUeszk.js";
2
+ import { $ as UI_CATALOG_PROMPT_BUDGET_BYTES, A as fromUiSurfaceActionDispatch, B as resolveColumnWidths, C as collectSpecActions, D as evaluateFieldCondition, E as ensureStyles, F as normalizeColumnWidths, G as toUiSurfaceActionDispatch, H as toA2uiSurfaceAction, I as qualifyFieldName, K as toVercelToolInvocation, L as renderBlocks, M as interactionToUiSpec, N as loadOpenUiPeers, O as fromA2uiSpecAction, P as loadWebSkillLitCatalog, Q as UI_CATALOG_GROUPS, R as renderMiniChart, S as collectScopedValues, T as createUiCatalogToolSource, U as toJsonRenderSpec, V as toA2uiSpecMessages, W as toOpenUiSpecLang, X as DEFAULT_INTERACTION_TEXTS, Y as A2UI_COMMON_TYPES, Z as DEFAULT_SURFACE_FORM_TEXTS, _ as WEBSKILL_SURFACE_ACTION, a as A2UI_VERSION, at as defineUiCatalog, b as chartToTable, c as MAX_CONDITION_DEPTH, ct as renderMiniMarkdown, d as SPEC_TABLE_MIN_COLUMN_WIDTH, dt as shapeInteractionValue, et as WEBSKILL_A2UI_CATALOG_ID, f as UI_PRESETS, ft as uiCatalog, g as WEBSKILL_STYLES_CSS, h as VercelUiBridge, i as A2UI_SURFACE_ACTION, it as chartSpecFromProps, j as fromVercelToolResult, k as fromA2uiSurfaceAction, l as RENDER_UI_TOOL, lt as resolveInteractionTexts, m as VERCEL_INTERACTION_TOOL_NAME, n as A2UI_SPEC_ACTION, nt as a2uiComponentShapes, o as CHART_PALETTE, ot as interactionToFormModel, p as UI_PRESET_NAMES, q as uiPreset, r as A2UI_SPEC_FORM_PATH, rt as buildA2uiCatalogDefinition, s as DESCRIBE_UI_PRESET_TOOL, st as mountEchart, t as A2UI_BASIC_CATALOG_ID, tt as a2uiComponentSchema, u as SPEC_TABLE_MIN_COLUMN_VAR, ut as resolveSurfaceFormTexts, v as WebFormBridge, w as collectValues, x as collectFormScopes, y as applySuggestion, z as renderRenderResult } from "./dist-1OFC-zax.js";
3
3
 
4
4
  export { A2UI_BASIC_CATALOG_ID, A2UI_COMMON_TYPES, A2UI_SPEC_ACTION, A2UI_SPEC_FORM_PATH, A2UI_SURFACE_ACTION, A2UI_VERSION, CHART_PALETTE, DEFAULT_INTERACTION_TEXTS, DEFAULT_SURFACE_FORM_TEXTS, DESCRIBE_UI_PRESET_TOOL, MAX_CONDITION_DEPTH, RENDER_UI_TOOL, SPEC_TABLE_MIN_COLUMN_VAR, SPEC_TABLE_MIN_COLUMN_WIDTH, UI_CATALOG_GROUPS, UI_CATALOG_PROMPT_BUDGET_BYTES, UI_PRESETS, UI_PRESET_NAMES, VERCEL_INTERACTION_TOOL_NAME, VercelUiBridge, WEBSKILL_A2UI_CATALOG_ID, WEBSKILL_STYLES_CSS, WEBSKILL_SURFACE_ACTION, WebFormBridge, a2uiComponentSchema, a2uiComponentShapes, applySuggestion, buildA2uiCatalogDefinition, buildRenderResult, chartSpecFromProps, chartToTable, collectFormScopes, collectScopedValues, collectSpecActions, collectValues, createUiCatalogToolSource, defineUiCatalog, ensureStyles, evaluateFieldCondition, fromA2uiSpecAction, fromA2uiSurfaceAction, fromUiSurfaceActionDispatch, fromVercelToolResult, interactionToFormModel, interactionToUiSpec, loadOpenUiPeers, loadWebSkillLitCatalog, mountEchart, normalizeColumnWidths, qualifyFieldName, renderBlocks, renderMiniChart, renderMiniMarkdown, renderRenderResult, resolveColumnWidths, resolveInteractionTexts, resolveSurfaceFormTexts, shapeInteractionValue, toA2uiSpecMessages, toA2uiSurfaceAction, toJsonRenderSpec, toOpenUiSpecLang, toUiSurfaceActionDispatch, toVercelToolInvocation, uiCatalog, uiPreset };
@@ -1,4 +1,4 @@
1
- import { J as A2UI_CHILDREN_PROP, Z as DEFAULT_SURFACE_FORM_TEXTS, ct as renderMiniMarkdown, et as WEBSKILL_A2UI_CATALOG_ID, ft as uiCatalog, it as chartSpecFromProps, nt as a2uiComponentShapes, st as mountEchart } from "./dist-CJqQsIm9.js";
1
+ import { J as A2UI_CHILDREN_PROP, Z as DEFAULT_SURFACE_FORM_TEXTS, ct as renderMiniMarkdown, et as WEBSKILL_A2UI_CATALOG_ID, ft as uiCatalog, it as chartSpecFromProps, nt as a2uiComponentShapes, st as mountEchart } from "./dist-1OFC-zax.js";
2
2
  import { A2uiController, A2uiLitElement } from "@a2ui/lit/v0_9";
3
3
  import { Catalog } from "@a2ui/web_core/v0_9";
4
4
  import { z } from "zod/v3";
@@ -1419,7 +1419,7 @@ var f = class extends i {
1419
1419
  };
1420
1420
 
1421
1421
  //#endregion
1422
- //#region ../ui/dist/webskillLitCatalog-DwTwSBFt.js
1422
+ //#region ../ui/dist/webskillLitCatalog-BJrphK0y.js
1423
1423
  /**
1424
1424
  * Lit 元素上的 echarts 挂载指令。
1425
1425
  * A2UI 档的 catalog `Chart` 渲染在 shadow root 里,实例必须随元素断开而 dispose,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webskill/sdk",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "WebSkill — browser/Node agent skill runtime (skills, tools, MCP, governance, UI)",
5
5
  "license": "MIT",
6
6
  "type": "module",