@webskill/sdk 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +2 -6
- package/dist/{catalogComponents-C_V39rbF-BOHveMWa.js → catalogComponents-KsujmL4b-Clx1kCnU.js} +278 -122
- package/dist/{dist-rorEJsNi.js → dist-C-Sh0MDU.js} +498 -282
- package/dist/{dist-ZKaM8j06.js → dist-D9Lcn5Pp.js} +527 -837
- package/dist/governance.d.ts +45 -10
- package/dist/governance.js +151 -24
- package/dist/{index-wiV5X8Rz.d.ts → index-CHXxDccV.d.ts} +62 -144
- package/dist/{index-8d-oEDww.d.ts → index-DLfR2Y6I.d.ts} +215 -23
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -2
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +1 -1
- package/dist/memoryArtifactStore-BtOeB_hm-tj3fC5ip.js +78 -0
- package/dist/node.d.ts +8 -4
- package/dist/node.js +1 -1
- package/dist/{openUiLibrary-B8-Cvou9-BbpNTXS3.js → openUiLibrary-YLS-cxyT-C96jWDQq.js} +6 -5
- package/dist/{skillVersionStore-DOEI9ptb-BxbYL70B.d.ts → skillVersionStore-uyefLPR1-DXOzbksv.d.ts} +41 -10
- package/dist/{testing-CsrG3XLz.js → testing-DDCJWvgA.js} +7 -5
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +2 -2
- package/dist/{types-AmKCKJn_-VGabeXK4.d.ts → types-7Wcg--Vh-1YlQ4jF9.d.ts} +85 -71
- package/dist/ui-react.d.ts +329 -18
- package/dist/ui-react.js +3714 -3463
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui-vue.js +1 -1
- package/dist/ui.d.ts +4 -3
- package/dist/ui.js +3 -3
- package/dist/{webskillLitCatalog-CNaUpasU-BslMcxRZ.js → webskillLitCatalog-CSTbhBe_-CYIs5BX8.js} +312 -122
- package/package.json +1 -1
- package/dist/jsonRenderRegistry-9GrWP_hE-U6Do3Kid.js +0 -2468
- package/dist/memoryArtifactStore-C9lFVqPF-yFz6yJj0.js +0 -48
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { F as JsonSchema, _ as RenderBlock, b as UiSpecActionCapability, o as InteractionRequest, pt as UiSpecNode, r as ChartSpec, s as InteractionResponse, v as RenderResultRequest, w as UiSpecSnapshot, y as UiBridge } from "./types-7Wcg--Vh-1YlQ4jF9.js";
|
|
2
|
+
import { x as ExternalToolSource } from "./index-DLfR2Y6I.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { ComponentType, ReactNode } from "react";
|
|
5
5
|
//#region ../ui/dist/index.d.ts
|
|
@@ -65,6 +65,24 @@ declare function chartToTable(chart: ChartSpec): {
|
|
|
65
65
|
rows: unknown[][];
|
|
66
66
|
};
|
|
67
67
|
//#endregion
|
|
68
|
+
//#region src/chart/echart.d.ts
|
|
69
|
+
/**
|
|
70
|
+
* catalog `Chart` 节点 props → `ChartSpec`。四档共用这一份转换:
|
|
71
|
+
* 此前 native / OpenUI / json-render / A2UI 各抄了一遍,改一处就会漂移。
|
|
72
|
+
* catalog 的 `area` 在 `ChartSpec` 里没有对应枚举,按折线渲染——
|
|
73
|
+
* 原先的裸 cast 会把非法枚举一路带进渲染器,画出空图。
|
|
74
|
+
*/
|
|
75
|
+
declare function chartSpecFromProps(props: Record<string, unknown>): ChartSpec;
|
|
76
|
+
interface EchartHandle {
|
|
77
|
+
setChart(chart: ChartSpec): void;
|
|
78
|
+
dispose(): void;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* 框架无关的 echarts 挂载点:三档的 React 组件与 A2UI 档的 Lit 元素共用同一实现,
|
|
82
|
+
* 图表不再因档位而异。echarts 走动态 import,不打进首屏。
|
|
83
|
+
*/
|
|
84
|
+
declare function mountEchart(container: HTMLElement): EchartHandle;
|
|
85
|
+
//#endregion
|
|
68
86
|
//#region src/web/webFormBridge.d.ts
|
|
69
87
|
/**
|
|
70
88
|
* 框架无关原生 DOM 的 UiBridge:request 渲染表单并返回 Promise
|
|
@@ -102,15 +120,6 @@ declare const WEBSKILL_STYLES_CSS = "\n.webskill-form { display: block; padding:
|
|
|
102
120
|
declare function ensureStyles(doc: Document): void;
|
|
103
121
|
//#endregion
|
|
104
122
|
//#region src/catalog/types.d.ts
|
|
105
|
-
/** 声明式 UI 的节点:框架无关,技能脚本与 LLM 产出同一形状 */
|
|
106
|
-
interface UiSpecNode {
|
|
107
|
-
/** catalog 中声明过的组件名 */
|
|
108
|
-
component: string;
|
|
109
|
-
props?: Record<string, unknown>;
|
|
110
|
-
children?: UiSpecNode[];
|
|
111
|
-
/** 稳定 id(回放与 action 关联用) */
|
|
112
|
-
id?: string;
|
|
113
|
-
}
|
|
114
123
|
interface UiComponentDef {
|
|
115
124
|
/** 声明里使用的组件名(PascalCase,全局唯一) */
|
|
116
125
|
name: string;
|
|
@@ -176,7 +185,7 @@ declare function defineUiCatalog(input: UiCatalogInput): UiCatalog;
|
|
|
176
185
|
//#endregion
|
|
177
186
|
//#region src/catalog/uiCatalog.d.ts
|
|
178
187
|
/**
|
|
179
|
-
* v3 首发 catalog
|
|
188
|
+
* v3 首发 catalog:覆盖旧六类 surface(metric / chart / table / form / file / custom)的全部表达力,先窄后宽。
|
|
180
189
|
* 只依赖 zod —— 不 import 任何 UI framework(21 号文档 §5.1)。
|
|
181
190
|
*/
|
|
182
191
|
declare const uiCatalog: UiCatalog;
|
|
@@ -187,25 +196,6 @@ declare const UI_CATALOG_GROUPS: {
|
|
|
187
196
|
readonly input: readonly ["Form", "Field", "Button"];
|
|
188
197
|
};
|
|
189
198
|
//#endregion
|
|
190
|
-
//#region src/catalog/toSurface.d.ts
|
|
191
|
-
/**
|
|
192
|
-
* 保留的 custom 组件名:catalog 声明树整棵挂在这个 surface 上。
|
|
193
|
-
* `UiSurface` 的六类联合表达不了通用节点树,改造它属破坏性变更(21 号文档 §7 已备案),
|
|
194
|
-
* 因此本轮用一个保留 component 名承载,四档 registry 各自识别它。
|
|
195
|
-
*/
|
|
196
|
-
declare const UI_SPEC_COMPONENT = "webskill.ui-spec";
|
|
197
|
-
interface UiSpecSurfaceProps {
|
|
198
|
-
catalogId: string;
|
|
199
|
-
catalogVersion: string;
|
|
200
|
-
spec: UiSpecNode;
|
|
201
|
-
/** 声明树里出现过的 action 名(renderer 据此生成按钮能力) */
|
|
202
|
-
actions: string[];
|
|
203
|
-
}
|
|
204
|
-
/** 声明树 → `UiSurface`。id 缺省时由调用方给(工具源用 runtime 生成的 id)。 */
|
|
205
|
-
declare function toSurface(catalog: UiCatalog, spec: UiSpecNode, id: string): UiSurface;
|
|
206
|
-
/** surface 是否承载 catalog 声明树(四档 renderer 的分派入口) */
|
|
207
|
-
declare function isUiSpecSurface(surface: UiSurface): boolean;
|
|
208
|
-
//#endregion
|
|
209
199
|
//#region src/catalog/toJsonRenderSpec.d.ts
|
|
210
200
|
/** json-render 的扁平 spec:`elements` 以 key 索引,`children` 只存 key */
|
|
211
201
|
interface JsonRenderSpec {
|
|
@@ -222,6 +212,24 @@ interface JsonRenderSpec {
|
|
|
222
212
|
*/
|
|
223
213
|
declare function toJsonRenderSpec(spec: UiSpecNode): JsonRenderSpec;
|
|
224
214
|
//#endregion
|
|
215
|
+
//#region src/catalog/interactionToUiSpec.d.ts
|
|
216
|
+
/**
|
|
217
|
+
* 宿主注入的界面文案(缺省用 `FormModel` 的英文默认值)。
|
|
218
|
+
* 生成器本身与语言无关,本地化由持有字典的宿主提供。
|
|
219
|
+
*/
|
|
220
|
+
interface InteractionSpecLabels {
|
|
221
|
+
title?: string;
|
|
222
|
+
submitLabel?: string;
|
|
223
|
+
cancelLabel?: string;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* 五类 `InteractionRequest` → catalog 声明树。
|
|
227
|
+
*
|
|
228
|
+
* 路径 A(runtime 发起的交互请求)与路径 B(模型产出的 surface)的差别只在「谁产出这棵树」;
|
|
229
|
+
* 产出之后四档走的是同一条 spec 渲染路径,因此这份生成器全仓只写一份。
|
|
230
|
+
*/
|
|
231
|
+
declare function interactionToUiSpec(request: InteractionRequest, labels?: InteractionSpecLabels): UiSpecNode;
|
|
232
|
+
//#endregion
|
|
225
233
|
//#region src/catalog/uiCatalogToolSource.d.ts
|
|
226
234
|
declare const RENDER_UI_TOOL = "render_ui";
|
|
227
235
|
interface UiCatalogToolSourceOptions {
|
|
@@ -230,36 +238,14 @@ interface UiCatalogToolSourceOptions {
|
|
|
230
238
|
/** surface id 生成(默认时间戳 + 随机后缀) */
|
|
231
239
|
newSurfaceId?: () => string;
|
|
232
240
|
}
|
|
241
|
+
/** 节点树声明的 action 能力表(renderer 据此生成按钮,runtime 据此签发 nonce)。@experimental */
|
|
242
|
+
declare function collectSpecActions(spec: UiSpecNode): UiSpecActionCapability[];
|
|
233
243
|
/**
|
|
234
244
|
* 把 catalog 变成一个工具的入参 Schema,让模型直接生成声明式 UI(21 号文档 §3):
|
|
235
|
-
* agentLoop / UiBridge /
|
|
245
|
+
* agentLoop / UiBridge / extractUiSpecEvents 全部零改动,装配处只多一个 externalTools 条目。
|
|
236
246
|
*/
|
|
237
247
|
declare function createUiCatalogToolSource(options?: UiCatalogToolSourceOptions): ExternalToolSource;
|
|
238
248
|
//#endregion
|
|
239
|
-
//#region src/adapters/surface/surfaceDescriptor.d.ts
|
|
240
|
-
declare const WEBSKILL_SURFACE_ACTION = "webskill:surface-action";
|
|
241
|
-
type SurfaceRendererProvenance = 'a2ui-standard' | 'a2ui-extension' | 'openui-library' | 'openui-extension' | 'vercel-surface-host';
|
|
242
|
-
/** Serializable surface state consumed by a renderer-specific host. @experimental */
|
|
243
|
-
interface UiSurfaceDescriptor {
|
|
244
|
-
type: 'webskill-surface';
|
|
245
|
-
snapshot: UiSurfaceSnapshot;
|
|
246
|
-
provenance: SurfaceRendererProvenance;
|
|
247
|
-
}
|
|
248
|
-
/** Serializable renderer action. The Runtime validates nonce capability before resuming a run. @experimental */
|
|
249
|
-
interface UiSurfaceActionDispatch {
|
|
250
|
-
runId?: string;
|
|
251
|
-
surfaceId: string;
|
|
252
|
-
actionId: string;
|
|
253
|
-
intent: UiSurfaceAction['intent'];
|
|
254
|
-
nonce?: string;
|
|
255
|
-
value?: Record<string, unknown>;
|
|
256
|
-
cancelled?: boolean;
|
|
257
|
-
}
|
|
258
|
-
declare function toUiSurfaceDescriptor(snapshot: UiSurfaceSnapshot, provenance: SurfaceRendererProvenance): UiSurfaceDescriptor;
|
|
259
|
-
declare function toUiSurfaceActionDispatch(snapshot: UiSurfaceSnapshot, action: UiSurfaceAction, value?: Record<string, unknown>): UiSurfaceActionDispatch;
|
|
260
|
-
/** Returns undefined for malformed or non-WebSkill renderer events. @experimental */
|
|
261
|
-
declare function fromUiSurfaceActionDispatch(value: unknown): UiSurfaceActionDispatch | undefined;
|
|
262
|
-
//#endregion
|
|
263
249
|
//#region src/adapters/vercel/vercelPayload.d.ts
|
|
264
250
|
/** Vercel AI SDK v7 ToolCallPart 兼容结构 */
|
|
265
251
|
interface VercelToolInvocation {
|
|
@@ -269,22 +255,10 @@ interface VercelToolInvocation {
|
|
|
269
255
|
input: unknown;
|
|
270
256
|
}
|
|
271
257
|
declare const VERCEL_INTERACTION_TOOL_NAME = "webskill_interaction";
|
|
272
|
-
declare const VERCEL_SURFACE_DATA_PART_TYPE = "data-webskill-surface";
|
|
273
|
-
declare const VERCEL_SURFACE_ACTION_DATA_PART_TYPE = "webskill:surface-action";
|
|
274
|
-
/** Vercel AI SDK-compatible data part consumed by a WebSkill SurfaceHost. @experimental */
|
|
275
|
-
interface VercelSurfaceDataPart {
|
|
276
|
-
type: typeof VERCEL_SURFACE_DATA_PART_TYPE;
|
|
277
|
-
id: string;
|
|
278
|
-
data: ReturnType<typeof toUiSurfaceDescriptor>;
|
|
279
|
-
}
|
|
280
258
|
/** InteractionRequest → SDK tool UI 结构(应用聊天 UI 直接消费) */
|
|
281
259
|
declare function toVercelToolInvocation(request: InteractionRequest): VercelToolInvocation;
|
|
282
260
|
/** SDK 回传(tool result / output)→ InteractionResponse */
|
|
283
261
|
declare function fromVercelToolResult(part: unknown): InteractionResponse;
|
|
284
|
-
/** UiSurfaceSnapshot → AI SDK data part; the SurfaceHost owns renderer selection. @experimental */
|
|
285
|
-
declare function toVercelSurfaceDataPart(snapshot: UiSurfaceSnapshot): VercelSurfaceDataPart;
|
|
286
|
-
/** Decodes a nonce-bound action data part emitted by a Vercel SurfaceHost. @experimental */
|
|
287
|
-
declare function fromVercelSurfaceAction(part: unknown): UiSurfaceActionDispatch | undefined;
|
|
288
262
|
//#endregion
|
|
289
263
|
//#region src/adapters/vercel/vercelUiBridge.d.ts
|
|
290
264
|
/**
|
|
@@ -299,39 +273,6 @@ declare class VercelUiBridge implements UiBridge {
|
|
|
299
273
|
request(input: InteractionRequest): Promise<InteractionResponse>;
|
|
300
274
|
}
|
|
301
275
|
//#endregion
|
|
302
|
-
//#region src/adapters/openui/openuiLang.d.ts
|
|
303
|
-
/**
|
|
304
|
-
* InteractionRequest ↔ openui-lang 双向转换。
|
|
305
|
-
* openui-lang 语法(@openuidev/react-lang 实测):
|
|
306
|
-
* - 每行一条语句 `identifier = Expression`,`root = Component(...)` 为入口
|
|
307
|
-
* - 组件调用参数为位置参数;字符串双引号反斜杠转义
|
|
308
|
-
* - 组件词汇(与应用 Library 约定):Form(title, children)、
|
|
309
|
-
* Text(content)(纯展示文本,authorize 的能力描述用)、
|
|
310
|
-
* TextField(name, label, required?, defaultValue?)、NumberField、BooleanField(name, label, default?)、
|
|
311
|
-
* SelectField(name, label, options)、SubmitButton(label, actionType, requestId)、
|
|
312
|
-
* CancelButton(label, actionType, requestId)
|
|
313
|
-
*/
|
|
314
|
-
declare const OPENUI_SUBMIT_ACTION = "webskill:submit";
|
|
315
|
-
declare const OPENUI_CANCEL_ACTION = "webskill:cancel";
|
|
316
|
-
/** authorize 的 Allow 专用动作(提交即批准 → value:true;Deny 走 cancel → cancelled:true) */
|
|
317
|
-
declare const OPENUI_AUTHORIZE_ACTION = "webskill:authorize";
|
|
318
|
-
declare const OPENUI_SURFACE_ACTION = "webskill:surface-action";
|
|
319
|
-
/** @experimental */
|
|
320
|
-
declare function toOpenUiLang(request: InteractionRequest): string;
|
|
321
|
-
/**
|
|
322
|
-
* UiSurfaceSnapshot → OpenUI library program. OpenUI applications provide WebSkillSurfaceHost;
|
|
323
|
-
* its descriptor tells the host whether it is a native extension rather than an OpenUI-native component.
|
|
324
|
-
* @experimental
|
|
325
|
-
*/
|
|
326
|
-
declare function toOpenUiSurfaceLang(snapshot: UiSurfaceSnapshot): string;
|
|
327
|
-
/** Decodes a nonce-bound action emitted by an OpenUI WebSkillSurfaceHost. @experimental */
|
|
328
|
-
declare function fromOpenUiSurfaceAction(action: unknown): UiSurfaceActionDispatch | undefined;
|
|
329
|
-
/**
|
|
330
|
-
* OpenUI ActionEvent → InteractionResponse(formState 优先,取消单独分支)
|
|
331
|
-
* @experimental
|
|
332
|
-
*/
|
|
333
|
-
declare function fromOpenUiAction(action: unknown): InteractionResponse;
|
|
334
|
-
//#endregion
|
|
335
276
|
//#region src/adapters/openui/openUiSpecLang.d.ts
|
|
336
277
|
/**
|
|
337
278
|
* catalog 声明树 → openui-lang 文本。语法为每行一条 `id = Component(位置参数…)`,
|
|
@@ -339,56 +280,46 @@ declare function fromOpenUiAction(action: unknown): InteractionResponse;
|
|
|
339
280
|
*/
|
|
340
281
|
declare function toOpenUiSpecLang(spec: UiSpecNode, catalog?: UiCatalog): string;
|
|
341
282
|
//#endregion
|
|
283
|
+
//#region src/adapters/surface/surfaceDescriptor.d.ts
|
|
284
|
+
declare const WEBSKILL_SURFACE_ACTION = "webskill:surface-action";
|
|
285
|
+
/** Serializable renderer action. The Runtime validates nonce capability before resuming a run. @experimental */
|
|
286
|
+
interface UiSurfaceActionDispatch {
|
|
287
|
+
runId?: string;
|
|
288
|
+
surfaceId: string;
|
|
289
|
+
actionId: string;
|
|
290
|
+
intent: UiSpecActionCapability['intent'];
|
|
291
|
+
nonce?: string;
|
|
292
|
+
value?: Record<string, unknown>;
|
|
293
|
+
cancelled?: boolean;
|
|
294
|
+
}
|
|
295
|
+
declare function toUiSurfaceActionDispatch(snapshot: UiSpecSnapshot, action: UiSpecActionCapability, value?: Record<string, unknown>): UiSurfaceActionDispatch;
|
|
296
|
+
/** Returns undefined for malformed or non-WebSkill renderer events. @experimental */
|
|
297
|
+
declare function fromUiSurfaceActionDispatch(value: unknown): UiSurfaceActionDispatch | undefined;
|
|
298
|
+
//#endregion
|
|
342
299
|
//#region src/adapters/a2ui/a2uiMessages.d.ts
|
|
343
300
|
/**
|
|
344
|
-
*
|
|
301
|
+
* A2UI 协议常量与 surface 动作编解码(v0.9.1)。
|
|
345
302
|
* 依据 https://a2ui.org/specification/v0.9-a2ui/:
|
|
346
303
|
* - 信封 {version, createSurface|updateComponents|updateDataModel|deleteSurface}
|
|
347
304
|
* - 组件为扁平邻接表(id 引用),root 必需
|
|
348
305
|
* - 输入组件与数据模型经 JSON Pointer 双向绑定;action.context 回传
|
|
349
|
-
* - createSurface.sendDataModel: true → 客户端动作时携带完整数据模型
|
|
350
306
|
*
|
|
351
|
-
*
|
|
352
|
-
* cancel → {name: 'webskill:cancel', context: {requestId}}。
|
|
307
|
+
* 声明树 → A2UI 消息的转换在 `specToA2ui.ts`(四档共用的单一渲染路径)。
|
|
353
308
|
*/
|
|
354
309
|
declare const A2UI_VERSION = "v0.9.1";
|
|
355
310
|
declare const A2UI_BASIC_CATALOG_ID = "https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json";
|
|
356
|
-
declare const A2UI_SUBMIT_ACTION = "webskill:submit";
|
|
357
|
-
declare const A2UI_CANCEL_ACTION = "webskill:cancel";
|
|
358
311
|
declare const A2UI_SURFACE_ACTION = "webskill:surface-action";
|
|
359
312
|
interface A2uiMessage {
|
|
360
313
|
version: string;
|
|
361
314
|
[key: string]: unknown;
|
|
362
315
|
}
|
|
363
|
-
/** @experimental */
|
|
364
|
-
declare function toA2uiMessages(request: InteractionRequest): A2uiMessage[];
|
|
365
|
-
/**
|
|
366
|
-
* UiSurfaceSnapshot → A2UI extension-host messages.
|
|
367
|
-
* Basic Catalog has no chart/table vocabulary, so a labelled WebSkill host owns these controlled renderers.
|
|
368
|
-
* @experimental
|
|
369
|
-
*/
|
|
370
|
-
declare function toA2uiSurfaceMessages(snapshot: UiSurfaceSnapshot): A2uiMessage[];
|
|
371
316
|
/** Decodes a nonce-bound action emitted by a WebSkill A2UI extension host. @experimental */
|
|
372
317
|
declare function fromA2uiSurfaceAction(event: unknown): UiSurfaceActionDispatch | undefined;
|
|
373
318
|
/** Builds the A2UI event payload an extension host sends after a user action. @experimental */
|
|
374
|
-
declare function toA2uiSurfaceAction(snapshot:
|
|
319
|
+
declare function toA2uiSurfaceAction(snapshot: UiSpecSnapshot, action: UiSpecActionCapability, value?: Record<string, unknown>): {
|
|
375
320
|
name: string;
|
|
376
321
|
context: UiSurfaceActionDispatch;
|
|
377
322
|
};
|
|
378
|
-
/**
|
|
379
|
-
* 按 InteractionRequest.type 解码提交值(绑定模型原样回传的是表单对象):
|
|
380
|
-
* confirm 仅 confirmed===true 批准;select 还原原始 option 值(非字符串值经 JSON 编码比对);
|
|
381
|
-
* form 的 number 字段转 number(NaN 保留原值);ask 取 answer;authorize 提交即批准。
|
|
382
|
-
* 纯转换器:任何直接使用 fromA2uiAction 的消费者都应经此拿到正确类型。
|
|
383
|
-
* @experimental
|
|
384
|
-
*/
|
|
385
|
-
declare function decodeInteractionResponse(request: InteractionRequest, response: InteractionResponse): InteractionResponse;
|
|
386
|
-
/**
|
|
387
|
-
* A2UI client→server action 事件 → InteractionResponse。
|
|
388
|
-
* 传入 request 时按类型解码提交值(见 decodeInteractionResponse)。
|
|
389
|
-
* @experimental
|
|
390
|
-
*/
|
|
391
|
-
declare function fromA2uiAction(event: unknown, request?: InteractionRequest): InteractionResponse;
|
|
392
323
|
//#endregion
|
|
393
324
|
//#region src/adapters/a2ui/webskillCatalog.d.ts
|
|
394
325
|
/** 自定义 catalog 的协议 id(对齐 https://a2ui.org/specification/v1_0/catalog_definition.json) */
|
|
@@ -485,19 +416,6 @@ interface A2uiSpecActionEvent {
|
|
|
485
416
|
/** A2UI action 事件 → 声明树 action(非本 catalog 的事件返回 undefined) */
|
|
486
417
|
declare function fromA2uiSpecAction(event: unknown): A2uiSpecActionEvent | undefined;
|
|
487
418
|
//#endregion
|
|
488
|
-
//#region src/a2uiRuntime/litRendererBridge.d.ts
|
|
489
|
-
/** @experimental */
|
|
490
|
-
declare class LitRendererBridge implements UiBridge {
|
|
491
|
-
#private;
|
|
492
|
-
constructor(deps: {
|
|
493
|
-
mount: HTMLElement;
|
|
494
|
-
document?: Document;
|
|
495
|
-
});
|
|
496
|
-
request(input: InteractionRequest): Promise<InteractionResponse>;
|
|
497
|
-
/** runtime 交互超时/取消:移除 surface 并以 cancelled resolve pending Promise(防悬挂 + DOM 残留) */
|
|
498
|
-
cancel(id: string): void;
|
|
499
|
-
}
|
|
500
|
-
//#endregion
|
|
501
419
|
//#region src/a2uiRuntime/loadLitCatalog.d.ts
|
|
502
420
|
/** catalog 里单个组件的最小可见面(A2UI `LitComponentApi` 的结构子集) */
|
|
503
421
|
interface A2uiCatalogComponent {
|
|
@@ -594,4 +512,4 @@ interface LoadedOpenUiPeers {
|
|
|
594
512
|
*/
|
|
595
513
|
declare function loadOpenUiPeers(): Promise<LoadedOpenUiPeers>;
|
|
596
514
|
//#endregion
|
|
597
|
-
export {
|
|
515
|
+
export { fromA2uiSpecAction as $, UiCatalogToolSourceOptions as A, WEBSKILL_SURFACE_ACTION as B, OpenUiRuntime as C, UiCatalog as D, UiActionDef as E, VERCEL_INTERACTION_TOOL_NAME as F, buildA2uiCatalogDefinition as G, ZodRuntime as H, VercelToolInvocation as I, collectSpecActions as J, chartSpecFromProps as K, VercelUiBridge as L, UiSpecIssue as M, UiSpecValidation as N, UiCatalogInput as O, UiSurfaceActionDispatch as P, ensureStyles as Q, WEBSKILL_A2UI_CATALOG_ID as R, OpenUiRendererProps as S, UI_CATALOG_GROUPS as T, a2uiComponentSchema as U, WebFormBridge as V, a2uiComponentShapes as W, createUiCatalogToolSource as X, collectValues as Y, defineUiCatalog as Z, EchartHandle as _, toUiSurfaceActionDispatch as _t, A2UI_SURFACE_ACTION as a, loadOpenUiPeers as at, JsonRenderSpec as b, A2uiCatalogDefinition as c, renderBlocks as ct, A2uiMessage as d, renderRenderResult as dt, fromA2uiSurfaceAction as et, A2uiSpecActionEvent as f, shapeInteractionValue as ft, ControlModel as g, toOpenUiSpecLang as gt, CollectedValues as h, toJsonRenderSpec as ht, A2UI_SPEC_FORM_PATH as i, interactionToUiSpec as it, UiComponentDef as j, UiCatalogPromptOptions as k, A2uiCatalogHandle as l, renderMiniChart as lt, CHART_PALETTE as m, toA2uiSurfaceAction as mt, A2UI_COMMON_TYPES as n, fromVercelToolResult as nt, A2UI_VERSION as o, loadWebSkillLitCatalog as ot, A2uiSpecMessageOptions as p, toA2uiSpecMessages as pt, chartToTable as q, A2UI_SPEC_ACTION as r, interactionToFormModel as rt, A2uiCatalogComponent as s, mountEchart as st, A2UI_BASIC_CATALOG_ID as t, fromUiSurfaceActionDispatch as tt, A2uiComponentShape as u, renderMiniMarkdown as ut, FormModel as v, toVercelToolInvocation as vt, RENDER_UI_TOOL as w, LoadedOpenUiPeers as x, InteractionSpecLabels as y, uiCatalog as yt, WEBSKILL_STYLES_CSS as z };
|