@webskill/sdk 0.9.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 (33) hide show
  1. package/dist/agent.d.ts +2 -2
  2. package/dist/agent.js +5 -1
  3. package/dist/browser.d.ts +5 -3
  4. package/dist/browser.js +15 -7
  5. package/dist/{catalogComponents-DfxxfUvn-T7Ic8QFV.js → catalogComponents-DTcYfpLQ-CcoOaz-Z.js} +1354 -415
  6. package/dist/{dist-BQe1uglQ.js → dist-1OFC-zax.js} +6 -4
  7. package/dist/{dist-CFmkV45C.js → dist-BViUeszk.js} +349 -32
  8. package/dist/{eventTypes-DbOpAECr-BjcjZVms.js → eventTypes-s2uwAcLG-Go3l_dUe.js} +5 -2
  9. package/dist/governance.d.ts +29 -6
  10. package/dist/governance.js +45 -7
  11. package/dist/{index-DXNTIa-6.d.ts → index-B0QPLWPZ.d.ts} +6 -2
  12. package/dist/{index-lLcCpHE-.d.ts → index-BF4E1a9j.d.ts} +10 -3
  13. package/dist/{index-znZjobkr.d.ts → index-DtFdMKBX.d.ts} +63 -6
  14. package/dist/index.d.ts +4 -4
  15. package/dist/index.js +3 -3
  16. package/dist/mcp.d.ts +18 -3
  17. package/dist/mcp.js +62 -21
  18. package/dist/node.d.ts +3 -3
  19. package/dist/node.js +2 -2
  20. package/dist/{openUiLibrary-DURlAxjk-Do_yqg3u.js → openUiLibrary-CIrV--Ad-B8zG_91e.js} +3 -3
  21. package/dist/{skillVersionStore-Bl-ElD45-dMJ8Ybhb.d.ts → skillVersionStore-D-qHk9ZE-DBsYYCWn.d.ts} +13 -5
  22. package/dist/{testing-Csg5ljNm.js → testing-WPTyXQYt.js} +26 -3
  23. package/dist/testing.d.ts +1 -1
  24. package/dist/testing.js +1 -1
  25. package/dist/{types-B3n0cMZu-BDhheIhX.d.ts → types-CrRcT-LM-DZAp8sWv.d.ts} +36 -3
  26. package/dist/ui-react.d.ts +11 -2
  27. package/dist/ui-react.js +119 -38
  28. package/dist/ui-vue.d.ts +1 -1
  29. package/dist/ui-vue.js +1 -1
  30. package/dist/ui.d.ts +3 -3
  31. package/dist/ui.js +2 -2
  32. package/dist/{webskillLitCatalog-DwTwSBFt-BG7kL-Es.js → webskillLitCatalog-BJrphK0y-SGmRXaaO.js} +2 -2
  33. package/package.json +1 -1
package/dist/ui-react.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll$1 } from "./rolldown-runtime-BOF7iYI8.js";
2
2
  import { h as WebSkillError } from "./dist-Bev6i6Ip.js";
3
- import { Ot as validateUiSpecEvent, kt as validateUiSpecNode } from "./dist-CFmkV45C.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-BQe1uglQ.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-T7Ic8QFV.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;
@@ -6622,6 +6670,7 @@ var ReactBridgeState = class {
6622
6670
  const { [response.surfaceId]: _discarded, ...remaining } = drafts;
6623
6671
  this.#surfaceDrafts.set(response.runId, remaining);
6624
6672
  }
6673
+ if (!response.cancelled && response.value !== void 0) this.surfaceStore.applySubmittedValues(response.surfaceId, response.value);
6625
6674
  this.#emit();
6626
6675
  resolver(response);
6627
6676
  return true;
@@ -6955,6 +7004,10 @@ function SurfaceSimplifiedNote({ degradations }) {
6955
7004
  function SurfaceDegradationNote({ degradations }) {
6956
7005
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SurfaceRejectionAlert, { degradations }), /* @__PURE__ */ jsx(SurfaceSimplifiedNote, { degradations })] });
6957
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;
6958
7011
  /**
6959
7012
  * catalog `Table` 节点的渲染实现:排序 / 筛选 / 分页 / 列显隐 / 虚拟滚动。
6960
7013
  * 这些是宿主侧的呈现能力,不进 catalog props——模型只声明 columns 与 rows。
@@ -6965,13 +7018,30 @@ function SpecTable({ columns, rows, label, columnWidths, onDegraded }) {
6965
7018
  const [globalFilter, setGlobalFilter] = useState("");
6966
7019
  const [columnVisibility, setColumnVisibility] = useState({});
6967
7020
  const scrollRef = useRef(null);
7021
+ const frameRef = useRef(null);
7022
+ /** 实测的容器宽度与最小列宽(px);未测量(jsdom / 首帧)时退回百分比 colgroup */
7023
+ const [measured, setMeasured] = useState(void 0);
6968
7024
  const normalized = normalizeColumnWidths(columnWidths, columns.length);
6969
- const weightTotal = normalized.weights.reduce((sum, weight) => sum + weight, 0);
6970
- const widthPercents = normalized.weights.map((weight) => weightTotal > 0 ? weight / weightTotal * 100 : 0);
6971
7025
  const rejected = normalized.rejected;
6972
7026
  useEffect(() => {
6973
7027
  if (rejected !== void 0) onDegraded?.(rejected);
6974
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
+ }, []);
6975
7045
  const table = useReactTable({
6976
7046
  data: rows,
6977
7047
  columns: columns.map((header, index) => ({
@@ -6995,6 +7065,10 @@ function SpecTable({ columns, rows, label, columnWidths, onDegraded }) {
6995
7065
  initialState: { pagination: { pageSize: 50 } }
6996
7066
  });
6997
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;
6998
7072
  const virtualRows = useVirtualizer({
6999
7073
  count: modelRows.length,
7000
7074
  getScrollElement: () => scrollRef.current,
@@ -7031,37 +7105,44 @@ function SpecTable({ columns, rows, label, columnWidths, onDegraded }) {
7031
7105
  }, column.id))
7032
7106
  })] })]
7033
7107
  }),
7034
- /* @__PURE__ */ jsxs(DataTable, {
7035
- "aria-label": label,
7036
- containerClassName: "webskill-surface__table-scroll",
7037
- children: [
7038
- /* @__PURE__ */ jsx("colgroup", { children: widthPercents.map((percent, index) => /* @__PURE__ */ jsx("col", { style: { width: `${percent}%` } }, index)) }),
7039
- /* @__PURE__ */ jsx("thead", {
7040
- className: "webskill-surface__table-header",
7041
- children: /* @__PURE__ */ jsx("tr", { children: table.getFlatHeaders().map((header) => /* @__PURE__ */ jsx("th", {
7042
- scope: "col",
7043
- ...header.column.id === "selection" ? { "data-webskill-host-control": "" } : {},
7044
- "aria-sort": header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : "none",
7045
- children: header.column.getCanSort() ? /* @__PURE__ */ jsx("button", {
7046
- type: "button",
7047
- "data-webskill-host-control": "",
7048
- onClick: header.column.getToggleSortingHandler(),
7049
- children: flexRender(header.column.columnDef.header, header.getContext())
7050
- }) : flexRender(header.column.columnDef.header, header.getContext())
7051
- }, header.id)) })
7052
- }),
7053
- /* @__PURE__ */ jsx("tbody", {
7054
- ref: scrollRef,
7055
- className: "webskill-surface__table-body",
7056
- children: renderedRows.map((virtualRow) => {
7057
- const row = modelRows[virtualRow.index];
7058
- return /* @__PURE__ */ jsx("tr", { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx("td", {
7059
- ...cell.column.id === "selection" ? { "data-webskill-host-control": "" } : {},
7060
- children: flexRender(cell.column.columnDef.cell, cell.getContext())
7061
- }, 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
+ })
7062
7143
  })
7063
- })
7064
- ]
7144
+ ]
7145
+ })
7065
7146
  }),
7066
7147
  /* @__PURE__ */ jsxs("div", {
7067
7148
  className: "webskill-surface__table-pagination",
@@ -7106,7 +7187,7 @@ function renderNode(node, context, key, scope) {
7106
7187
  children
7107
7188
  }, key);
7108
7189
  case "Card": return /* @__PURE__ */ jsxs("section", {
7109
- 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",
7110
7191
  children: [
7111
7192
  /* @__PURE__ */ jsx("h3", {
7112
7193
  className: "text-sm font-semibold text-ink",
@@ -7288,7 +7369,7 @@ function NativeSpecSurface({ surfaceId, spec, actions, registry, runId, draft, o
7288
7369
  const texts = useSurfaceFormTexts();
7289
7370
  const { node, degradations } = sanitized;
7290
7371
  return /* @__PURE__ */ jsxs("div", {
7291
- 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",
7292
7373
  "data-testid": "native-spec-surface",
7293
7374
  children: [
7294
7375
  node ? renderNode(node, context, "root") : null,
@@ -7590,7 +7671,7 @@ function OpenUiSpecSurface({ spec, surfaceId, actions, onAction }) {
7590
7671
  const [unavailable, setUnavailable] = useState(false);
7591
7672
  useEffect(() => {
7592
7673
  let cancelled = false;
7593
- import("./openUiLibrary-DURlAxjk-Do_yqg3u.js").then((loaded) => {
7674
+ import("./openUiLibrary-CIrV--Ad-B8zG_91e.js").then((loaded) => {
7594
7675
  if (!cancelled) setModule(loaded);
7595
7676
  }).catch(() => {
7596
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-BDhheIhX.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-BQe1uglQ.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 { yt as UiSpecNode } from "./types-B3n0cMZu-BDhheIhX.js";
2
- import { vn as buildRenderResult } from "./index-znZjobkr.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-DXNTIa-6.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-CFmkV45C.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-BQe1uglQ.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-BQe1uglQ.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.9.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",