@webskill/sdk 0.5.0 → 0.7.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/agent.d.ts +2 -2
- package/dist/agent.js +274 -42
- package/dist/browser.d.ts +127 -5
- package/dist/browser.js +611 -17
- package/dist/{catalogComponents-DV7cPpUm-C77AEEx9.js → catalogComponents-Dr5dFMAb-DKH_7VPI.js} +848 -974
- package/dist/{dist-6C03DShK.js → dist-D0qW6e40.js} +1213 -210
- package/dist/{dist-bewtXYlO.js → dist-DnYG2-eY.js} +53 -14
- package/dist/{env--jJB-TSX-04klhTYi.js → env-8cY40DXB-CGnEVZby.js} +7 -6
- package/dist/{env-BPUBZCwJ-4jat_SVG.d.ts → env-AK3cSMEA-Dli6QU5E.d.ts} +4 -3
- package/dist/eventTypes-DjIQpt8Y-Bj3vghj4.js +32 -0
- package/dist/governance.d.ts +78 -11
- package/dist/governance.js +173 -50
- package/dist/{index-D_7ZZjkl.d.ts → index-Ba3xFtfz.d.ts} +222 -8
- package/dist/{index-Bsqg4ftU.d.ts → index-BwsK9lGk.d.ts} +13 -7
- package/dist/{index-vBz_FC9w.d.ts → index-DkbABR43.d.ts} +336 -52
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/mcp.d.ts +159 -11
- package/dist/mcp.js +276 -45
- package/dist/{memoryArtifactStore-BtOeB_hm-tj3fC5ip.js → memoryArtifactStore-52Zn9npI-BMPYwvoy.js} +10 -2
- package/dist/node.d.ts +4 -4
- package/dist/node.js +11 -3
- package/dist/{openUiLibrary-W3Ce896k-ClFTRZFs.js → openUiLibrary-Bdrji9qK-D2LxmM-a.js} +3 -3
- package/dist/{skillVersionStore-BzLbzFOL-CxwIewHJ.d.ts → skillVersionStore-Bl-ElD45-CWPvGvoq.d.ts} +8 -2
- package/dist/{testing-DDCJWvgA.js → testing-CYTFqkDm.js} +1 -1
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +3 -3
- package/dist/{types-D_hoCri8-BnNPiZCi.d.ts → types-CcxRLdJG-DCXyw1US.d.ts} +62 -10
- package/dist/ui-react.d.ts +5 -3
- package/dist/ui-react.js +72 -47
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui-vue.js +13 -8
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +2 -2
- package/dist/{webskillLitCatalog-_mugzRHx-DiuJpCuf.js → webskillLitCatalog-_mugzRHx-B_54vxum.js} +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region ../core/dist/index.d.ts
|
|
2
2
|
//#region src/errors.d.ts
|
|
3
|
-
type WebSkillErrorCode = 'FS_NOT_FOUND' | 'FS_PATH_OUTSIDE_ROOT' | 'SKILL_NOT_FOUND' | 'SKILL_INVALID_METADATA' | 'SKILL_INVALID_NAME' | 'SKILL_DUPLICATE_NAME' | 'SKILL_UNSUPPORTED_SCRIPT' | 'VALIDATION_FAILED' | 'TOOL_NOT_FOUND' | 'TOOL_EXECUTION_FAILED' | 'NETWORK_BLOCKED' | 'TOOL_UNSUPPORTED' | 'TOOL_NOT_ALLOWED' | 'TOOL_SCHEMA_UNAVAILABLE' | 'RUN_TIMEOUT' | 'RUN_MAX_TURNS_EXCEEDED' | 'RUN_FAILED' | 'RUN_CANCELLED' | 'RUN_INTERACTION_TIMEOUT' | 'UI_UNAVAILABLE' | 'LLM_UNAVAILABLE' | 'LLM_REQUEST_FAILED' | 'INSTALL_FAILED' | 'UNINSTALL_FAILED' | 'EXPORT_FAILED' | 'INTEGRITY_FAILED' | 'FS_PERMISSION_DENIED' | 'MCP_ENDPOINT_UNAVAILABLE' | 'MCP_TOOL_NOT_FOUND' | 'CANDIDATE_INVALID' | 'APPROVAL_REQUIRED' | 'SKILL_QUARANTINED' | 'SKILL_DISABLED' | 'SKILL_UNKNOWN_ALLOWED_TOOL' | 'SKILL_UNKNOWN_DEPENDENCY' | 'SKILL_CIRCULAR_DEPENDENCY' | 'GOVERNANCE_FAILED' | 'RUN_SNAPSHOT_NOT_FOUND' | 'RUN_SNAPSHOT_EXPIRED' | 'RUN_SNAPSHOT_INCOMPATIBLE' | 'RUN_SNAPSHOT_SCHEMA_UNSUPPORTED' | 'RUN_TRACE_INCOMPATIBLE' | 'SESSION_INCOMPATIBLE' | 'SIGNATURE_MISSING' | 'SIGNATURE_MALFORMED' | 'SIGNATURE_UNTRUSTED_KEY' | 'SIGNATURE_MISMATCH' | 'SIGNATURE_UNSUPPORTED' | 'MCP_STDIO_SPAWN_FAILED' | 'MCP_STDIO_EXITED' | 'MCP_STDIO_TIMEOUT' | 'TS_RESOURCE_URL_REJECTED' | 'TS_TRANSPILER_UNAVAILABLE' | 'TS_TRANSPILE_FAILED' | 'TODO_LIST_INVALID' | 'TODO_ITEM_NOT_FOUND' | 'SKILL_GENERATION_DISABLED' | 'SKILL_GENERATION_LIMIT_EXCEEDED' | 'SKILL_GENERATION_VALIDATION_FAILED' | 'DELEGATION_UNAVAILABLE' | 'DELEGATION_IN_PROGRESS' | 'DELEGATION_BUDGET_EXCEEDED' | '
|
|
3
|
+
type WebSkillErrorCode = 'FS_NOT_FOUND' | 'FS_PATH_OUTSIDE_ROOT' | 'SKILL_NOT_FOUND' | 'SKILL_INVALID_METADATA' | 'SKILL_INVALID_NAME' | 'SKILL_DUPLICATE_NAME' | 'SKILL_UNSUPPORTED_SCRIPT' | 'VALIDATION_FAILED' | 'TOOL_NOT_FOUND' | 'TOOL_EXECUTION_FAILED' | 'NETWORK_BLOCKED' | 'TOOL_UNSUPPORTED' | 'TOOL_NOT_ALLOWED' | 'TOOL_SCHEMA_UNAVAILABLE' | 'TOOL_RESOLUTION_EXHAUSTED' | 'RUN_TIMEOUT' | 'RUN_MAX_TURNS_EXCEEDED' | 'RUN_FAILED' | 'RUN_CANCELLED' | 'RUN_INTERACTION_TIMEOUT' | 'UI_UNAVAILABLE' | 'LLM_UNAVAILABLE' | 'LLM_REQUEST_FAILED' | 'INSTALL_FAILED' | 'UNINSTALL_FAILED' | 'EXPORT_FAILED' | 'INTEGRITY_FAILED' | 'FS_PERMISSION_DENIED' | 'MCP_ENDPOINT_UNAVAILABLE' | 'MCP_TOOL_NOT_FOUND' | 'CANDIDATE_INVALID' | 'APPROVAL_REQUIRED' | 'SKILL_QUARANTINED' | 'SKILL_DISABLED' | 'SKILL_UNKNOWN_ALLOWED_TOOL' | 'SKILL_UNKNOWN_DEPENDENCY' | 'SKILL_CIRCULAR_DEPENDENCY' | 'GOVERNANCE_FAILED' | 'RUN_SNAPSHOT_NOT_FOUND' | 'RUN_SNAPSHOT_EXPIRED' | 'RUN_SNAPSHOT_INCOMPATIBLE' | 'RUN_SNAPSHOT_SCHEMA_UNSUPPORTED' | 'RUN_TRACE_INCOMPATIBLE' | 'SESSION_INCOMPATIBLE' | 'SIGNATURE_MISSING' | 'SIGNATURE_MALFORMED' | 'SIGNATURE_UNTRUSTED_KEY' | 'SIGNATURE_MISMATCH' | 'SIGNATURE_UNSUPPORTED' | 'MCP_STDIO_SPAWN_FAILED' | 'MCP_STDIO_EXITED' | 'MCP_STDIO_TIMEOUT' | 'MCP_OAUTH_REQUIRED' | 'MCP_OAUTH_FAILED' | 'MCP_OAUTH_NOT_CONFIGURED' | 'PAGE_ACTION_OUT_OF_SCOPE' | 'PAGE_ACTION_STALE_REF' | 'PAGE_ACTION_DECLINED' | 'TS_RESOURCE_URL_REJECTED' | 'TS_TRANSPILER_UNAVAILABLE' | 'TS_TRANSPILE_FAILED' | 'TODO_LIST_INVALID' | 'TODO_ITEM_NOT_FOUND' | 'SKILL_GENERATION_DISABLED' | 'SKILL_GENERATION_LIMIT_EXCEEDED' | 'SKILL_GENERATION_VALIDATION_FAILED' | 'DELEGATION_UNAVAILABLE' | 'DELEGATION_IN_PROGRESS' | 'DELEGATION_BUDGET_EXCEEDED' | 'PROFILE_IMPORT_INVALID' | 'PROFILE_IMPORT_VERSION_UNSUPPORTED' | 'PROFILE_IMPORT_CREDENTIAL_REJECTED' | 'PROFILE_KEY_UNAVAILABLE' | 'DICTATION_UNAVAILABLE' | 'DICTATION_PERMISSION_DENIED' | 'DICTATION_FAILED' | 'PERCEPTION_NOT_ENABLED' | 'PERCEPTION_FAILED' | 'MODEL_IMAGE_UNSUPPORTED' | 'MODEL_TOOLS_UNSUPPORTED' | 'ATTACHMENT_TOO_LARGE' | 'ATTACHMENT_TYPE_REJECTED';
|
|
4
4
|
/**
|
|
5
5
|
* 所有公开 API 抛出的结构化错误,code 供上层可编程处理
|
|
6
6
|
* @stable
|
|
@@ -582,7 +582,7 @@ declare function escapeXml(text: string): string;
|
|
|
582
582
|
declare function renderAvailableSkillsXml(catalog: SkillCatalog): string;
|
|
583
583
|
declare const xmlRenderer: CatalogRenderer;
|
|
584
584
|
//#endregion
|
|
585
|
-
//#region ../runtime/dist/types-
|
|
585
|
+
//#region ../runtime/dist/types-CcxRLdJG.d.ts
|
|
586
586
|
//#region src/llm/streamTypes.d.ts
|
|
587
587
|
/** 流式 LLM 事件(OpenAI SSE / Vercel fullStream 统一映射) */
|
|
588
588
|
type LlmStreamEvent = {
|
|
@@ -681,6 +681,25 @@ interface ArtifactStore {
|
|
|
681
681
|
listArtifacts(runId: string): Promise<Artifact[]>;
|
|
682
682
|
}
|
|
683
683
|
//#endregion
|
|
684
|
+
//#region src/skillGeneration/candidateMarker.d.ts
|
|
685
|
+
/**
|
|
686
|
+
* 一个已提交待审批的技能候选。字段固定为 `{ id, name }`——
|
|
687
|
+
* 这条通道只用来把候选交接给界面,扩字段要走 AC-G12 登记。
|
|
688
|
+
* @experimental
|
|
689
|
+
*/
|
|
690
|
+
interface SkillCandidateMarker {
|
|
691
|
+
id: string;
|
|
692
|
+
name: string;
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* `$skillCandidate` 约定的形状校验:JSON content 的 data 含合法 `$skillCandidate` 键 → 候选载荷。
|
|
696
|
+
*
|
|
697
|
+
* 与 `$chart` / `$todo` / `$surface` 同一条既有通道,是第四个。
|
|
698
|
+
* 候选的生成与存储全部在 `@webskill/agent`,runtime 只认这个形状,畸形忽略不炸。
|
|
699
|
+
* @experimental
|
|
700
|
+
*/
|
|
701
|
+
declare function extractSkillCandidate(data: unknown): SkillCandidateMarker | undefined;
|
|
702
|
+
//#endregion
|
|
684
703
|
//#region src/interaction/types.d.ts
|
|
685
704
|
/**
|
|
686
705
|
* 交互的发起方标识(FR-11.6)。串行委派下父 agent 与子 agent 都能发起交互,
|
|
@@ -701,6 +720,7 @@ type InteractionRequest = {
|
|
|
701
720
|
id: string;
|
|
702
721
|
message: string;
|
|
703
722
|
schema?: JsonSchema;
|
|
723
|
+
suggestion?: InteractionSuggestion;
|
|
704
724
|
} | {
|
|
705
725
|
type: 'confirm';
|
|
706
726
|
id: string;
|
|
@@ -719,6 +739,22 @@ type InteractionRequest = {
|
|
|
719
739
|
label: string;
|
|
720
740
|
value: unknown;
|
|
721
741
|
}>;
|
|
742
|
+
suggestion?: InteractionSuggestion;
|
|
743
|
+
} | {
|
|
744
|
+
/**
|
|
745
|
+
* 打开本地文件选择(FR-11.1)。与 `confirm` 分开:浏览器要求
|
|
746
|
+
* `input[type=file].click()` 处于用户手势的调用栈内,渲染层必须能识别
|
|
747
|
+
* 出“这个确认按钮点下去要同步打开选择器”,光看文案分辨不出。
|
|
748
|
+
* @experimental
|
|
749
|
+
*/
|
|
750
|
+
type: 'file-pick';
|
|
751
|
+
id: string;
|
|
752
|
+
message: string;
|
|
753
|
+
/** 传给 `input.accept` 的 MIME / 扩展名列表 */
|
|
754
|
+
accept?: readonly string[];
|
|
755
|
+
multiple?: boolean;
|
|
756
|
+
/** 该文件要填的表单字段名 */
|
|
757
|
+
field?: string;
|
|
722
758
|
} | {
|
|
723
759
|
/**
|
|
724
760
|
* 能力强制授权(require-approval):与脚本自发 confirm 区分,UI 渲染为授权样式
|
|
@@ -726,7 +762,7 @@ type InteractionRequest = {
|
|
|
726
762
|
*/
|
|
727
763
|
type: 'authorize';
|
|
728
764
|
id: string;
|
|
729
|
-
capability: 'readReference' | 'writeArtifact' | 'confirm';
|
|
765
|
+
capability: 'readReference' | 'writeArtifact' | 'confirm' | 'pageAction';
|
|
730
766
|
message: string;
|
|
731
767
|
details?: unknown;
|
|
732
768
|
});
|
|
@@ -735,6 +771,16 @@ interface InteractionResponse {
|
|
|
735
771
|
value?: unknown;
|
|
736
772
|
cancelled?: boolean;
|
|
737
773
|
}
|
|
774
|
+
/**
|
|
775
|
+
* 依据用户画像给出的建议值(FR-19.4)。**不会预填进控件**:
|
|
776
|
+
* 渲染器只能展示它并提供「采纳」入口,用户确认后才算填写。
|
|
777
|
+
* @experimental
|
|
778
|
+
*/
|
|
779
|
+
interface InteractionSuggestion {
|
|
780
|
+
value: unknown;
|
|
781
|
+
/** 建议依据,展示给用户判断是否采纳 */
|
|
782
|
+
reason?: string;
|
|
783
|
+
}
|
|
738
784
|
/** 图表规格($chart 约定的校验后形态;渲染单一来源在 ui/chart/miniChart) */
|
|
739
785
|
interface ChartSpec {
|
|
740
786
|
kind: 'bar' | 'line' | 'pie';
|
|
@@ -774,6 +820,12 @@ interface RenderResultRequest {
|
|
|
774
820
|
summary?: string;
|
|
775
821
|
blocks: RenderBlock[];
|
|
776
822
|
artifacts?: Artifact[];
|
|
823
|
+
/**
|
|
824
|
+
* 引擎注入的「最终输出」markdown block 在 `blocks` 中的下标;未注入时缺省。
|
|
825
|
+
* 消费方据此剔除与消息正文重复的那一块,**不得改用正文字符串比较**。
|
|
826
|
+
* 技能作者自己产出的 block 不在此字段的范围内。
|
|
827
|
+
*/
|
|
828
|
+
outputBlockIndex?: number;
|
|
777
829
|
}
|
|
778
830
|
/** A user action exposed by a generative UI surface. @experimental */
|
|
779
831
|
interface UiSpecActionCapability {
|
|
@@ -867,13 +919,15 @@ interface UiBridge {
|
|
|
867
919
|
requestSurfaceAction?(input: UiSurfaceActionRequest): Promise<UiSurfaceActionResponse>;
|
|
868
920
|
/** Best-effort cleanup when a surface action wait times out or is cancelled. @experimental */
|
|
869
921
|
cancelSurfaceAction?(nonce: string): void | Promise<void>;
|
|
922
|
+
/** 已提交待审批的技能候选(`$skillCandidate` 载荷);未实现时候选只存在于工具返回值里。 @experimental */
|
|
923
|
+
onSkillCandidate?(runId: string, candidate: SkillCandidateMarker): void | Promise<void>;
|
|
870
924
|
/** 流式文本增量(流式 LLM 路径下由 AgentLoop 转发) */
|
|
871
925
|
onTextDelta?(runId: string, delta: string): Promise<void> | void;
|
|
872
926
|
}
|
|
873
927
|
interface FormField {
|
|
874
928
|
name: string;
|
|
875
929
|
label: string;
|
|
876
|
-
type: 'text' | 'number' | 'boolean' | 'select' | 'textarea';
|
|
930
|
+
type: 'text' | 'number' | 'boolean' | 'select' | 'textarea' | 'file';
|
|
877
931
|
required?: boolean;
|
|
878
932
|
description?: string;
|
|
879
933
|
defaultValue?: unknown;
|
|
@@ -881,16 +935,14 @@ interface FormField {
|
|
|
881
935
|
label: string;
|
|
882
936
|
value: unknown;
|
|
883
937
|
}>;
|
|
884
|
-
/** 跨会话稳定的字段标识 `<skillName>#<fieldName>`(FR-5.6);缺省表示该字段不参与召回 */
|
|
885
|
-
fieldKey?: string;
|
|
886
938
|
/**
|
|
887
|
-
*
|
|
888
|
-
*
|
|
939
|
+
* 建议值(FR-19.4)。**刻意不叫 defaultValue**:渲染器会把 defaultValue 直接填进控件,
|
|
940
|
+
* 而建议值来自对用户过往行为的推断,可能过时或不适用,必须由用户看到后主动采纳。
|
|
889
941
|
* @experimental
|
|
890
942
|
*/
|
|
891
943
|
suggestion?: {
|
|
892
944
|
value: unknown;
|
|
893
|
-
|
|
945
|
+
reason?: string;
|
|
894
946
|
};
|
|
895
947
|
}
|
|
896
948
|
interface InteractionPolicy {
|
|
@@ -917,4 +969,4 @@ interface MemoryStore {
|
|
|
917
969
|
transaction?<T>(scope: string, fn: (inner: MemoryStore) => Promise<T>): Promise<T>;
|
|
918
970
|
}
|
|
919
971
|
//#endregion
|
|
920
|
-
export {
|
|
972
|
+
export { SkillCatalog as $, ArchiveLimits as A, escapeXml as At, MemoryFS as B, readSkillSignature as Bt, UiSpecDrafts as C, assertSafePathSegment as Ct, UiSurfaceActionRequest as D, checkDependencyCycles as Dt, UiSpecSnapshot as E, buildManifest as Et, FileStat as F, messageOf as Ft, SKILLS_LOCKFILE as G, signSkill as Gt, PageQuery as H, renderCatalogJson as Ht, FileSystemProvider as I, normalizePath as It, SKILL_NAME_PATTERN as J, validateSkills as Jt, SKILL_MANIFEST_FILE as K, signaturePayloadBytes as Kt, FsTrustedKeyStore as L, parseSkillMarkdown as Lt, CryptoKeyLike as M, isValidSkillName as Mt, DEFAULT_ARCHIVE_LIMITS as N, jsonRenderer as Nt, UiSurfaceActionResponse as O, checkSkillRules as Ot, DiscoveryResult as P, keyIdOf as Pt, SignatureVerdict as Q, JsonSchema as R, parseSkillPackManifest as Rt, UiSpecActionCapability as S, assertRemoteUrlAllowed as St, UiSpecPatch as T, buildCatalog as Tt, RemoteUrlPolicy as U, resolveArchiveLimits as Ut, Page as V, renderAvailableSkillsXml as Vt, SIGNATURE_SCHEMA_VERSION as W, resolveInsideRoot as Wt, SKILL_SIGNATURE_FILE as X, verifySkillSignature as Xt, SKILL_PACK_FILE as Y, verifyManifest as Yt, SignatureAuditSink as Z, xmlRenderer as Zt, MemoryStore as _, UnsignedPolicy as _t, InteractionOrigin as a, SkillLocation as at, SkillCandidateMarker as b, WebSkillError as bt, InteractionResponse as c, SkillMetadata as ct, LlmContentPart as d, SkillSignature as dt, SkillCatalogEntry as et, LlmMessage as f, SkillSource as ft, LlmToolSpec as g, UiSpecNode as gt, LlmToolCall as h, TrustedKeyStore as ht, FormField as i, SkillIssue as it, CatalogRenderer as j, exportSkills as jt, extractSkillCandidate as k, computeDigest as kt, LlmClient as l, SkillPackManifest as lt, LlmStreamEvent as m, TrustedKey as mt, ArtifactStore as n, SkillDocument as nt, InteractionPolicy as o, SkillManagerPort as ot, LlmResponse as p, SkillsLockfile as pt, SKILL_NAME_MAX_LENGTH as q, unzipWithLimits as qt, ChartSpec as r, SkillInstallSource as rt, InteractionRequest as s, SkillManifest as st, Artifact as t, SkillDiscovery as tt, LlmCompleteInput as u, SkillReader as ut, RenderBlock as v, ValidationReport as vt, UiSpecEvent as w, atomicWriteText as wt, UiBridge as x, WebSkillErrorCode as xt, RenderResultRequest as y, VerifyResult as yt, MANIFEST_EXCLUDED_FILES as z, readResponseWithLimit as zt };
|
package/dist/ui-react.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { b as InteractionSpecLabels } from "./index-
|
|
1
|
+
import { C as UiSpecDrafts, D as UiSurfaceActionRequest, E as UiSpecSnapshot, O as UiSurfaceActionResponse, S as UiSpecActionCapability, c as InteractionResponse, gt as UiSpecNode, s as InteractionRequest, w as UiSpecEvent, x as UiBridge, y as RenderResultRequest } from "./types-CcxRLdJG-DCXyw1US.js";
|
|
2
|
+
import { b as InteractionSpecLabels } from "./index-BwsK9lGk.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { ComponentType, ReactNode } from "react";
|
|
5
5
|
import "react/jsx-runtime";
|
|
@@ -410,6 +410,8 @@ interface NativeSpecSurfaceProps {
|
|
|
410
410
|
surfaceId: string;
|
|
411
411
|
value: Record<string, unknown>;
|
|
412
412
|
}): void;
|
|
413
|
+
/** 宿主已提供卡片外壳时传 `'none'`,避免嵌套两层卡片。缺省 `'card'`。 */
|
|
414
|
+
shell?: 'card' | 'none';
|
|
413
415
|
}
|
|
414
416
|
/**
|
|
415
417
|
* Native 档的 catalog registry:把声明树渲染成 ui-kit 组件。
|
|
@@ -418,7 +420,7 @@ interface NativeSpecSurfaceProps {
|
|
|
418
420
|
* 表单行为(草稿跨刷新、必填拦截、默认值)由本组件承接——
|
|
419
421
|
* 节点树取代六类 surface 后,这里是 native 档唯一的渲染实现。
|
|
420
422
|
*/
|
|
421
|
-
declare function NativeSpecSurface({ surfaceId, spec, actions, registry, runId, draft, onAction, onDraftChange }: NativeSpecSurfaceProps): import("react").JSX.Element;
|
|
423
|
+
declare function NativeSpecSurface({ surfaceId, spec, actions, registry, runId, draft, onAction, onDraftChange, shell }: NativeSpecSurfaceProps): import("react").JSX.Element;
|
|
422
424
|
//#endregion
|
|
423
425
|
//#region src/catalog/JsonRenderSpecSurface.d.ts
|
|
424
426
|
interface JsonRenderSpecSurfaceProps {
|
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 { m as WebSkillError } from "./dist-8oQRa8Xz.js";
|
|
3
|
-
import {
|
|
4
|
-
import { B as toOpenUiSpecLang, I as shapeInteractionValue, O as interactionToFormModel, P as renderMiniChart, Q as chartSpecFromProps, g as applySuggestion, k as interactionToUiSpec, nt as uiCatalog, tt as renderMiniMarkdown, x as collectValues, z as toJsonRenderSpec } from "./dist-
|
|
5
|
-
import { C as
|
|
3
|
+
import { Et as validateUiSpecNode, Tt as validateUiSpecEvent } from "./dist-D0qW6e40.js";
|
|
4
|
+
import { B as toOpenUiSpecLang, I as shapeInteractionValue, O as interactionToFormModel, P as renderMiniChart, Q as chartSpecFromProps, g as applySuggestion, k as interactionToUiSpec, nt as uiCatalog, tt as renderMiniMarkdown, x as collectValues, z as toJsonRenderSpec } from "./dist-DnYG2-eY.js";
|
|
5
|
+
import { C as Markdown, S as Input, _ as DataTable, a as SpecProgress, b as DropdownMenuContent, c as SurfaceButton, d as catalogComponentImpls, f as str, g as Button, h as Badge, i as SpecGrid, l as SurfaceField, m as useSurfaceForm, n as CatalogSurfaceProvider, o as SpecTabs, p as useCatalogSurfaceForm, r as EChart, s as SpecTimeline, u as SurfaceFormButtons, v as DropdownMenu, w as Separator, x as DropdownMenuTrigger, y as DropdownMenuCheckboxItem } from "./catalogComponents-Dr5dFMAb-DKH_7VPI.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";
|
|
@@ -6367,9 +6367,19 @@ function applyPatch(node, patch) {
|
|
|
6367
6367
|
}
|
|
6368
6368
|
return copy;
|
|
6369
6369
|
}
|
|
6370
|
+
/** 键序无关的序列化:同一份内容不能因写入顺序不同而算两个 surface(FR-21.5) */
|
|
6371
|
+
function stableStringify(value) {
|
|
6372
|
+
if (Array.isArray(value)) return `[${value.map(stableStringify).join(",")}]`;
|
|
6373
|
+
if (isRecord(value)) return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${stableStringify(value[key])}`).join(",")}}`;
|
|
6374
|
+
return JSON.stringify(value) ?? "null";
|
|
6375
|
+
}
|
|
6370
6376
|
/** Observable, revision-checked snapshot store for framework-neutral UI surfaces. @experimental */
|
|
6371
6377
|
var UiSurfaceStore = class {
|
|
6372
6378
|
#entries = /* @__PURE__ */ new Map();
|
|
6379
|
+
/** 内容指纹 → 首次开的 surface id;仅在同一 runId 内合并 */
|
|
6380
|
+
#fingerprints = /* @__PURE__ */ new Map();
|
|
6381
|
+
/** 后到的重复 id → 已存在的 surface id,让后续 patch/complete 仍然寻址得到 */
|
|
6382
|
+
#aliases = /* @__PURE__ */ new Map();
|
|
6373
6383
|
#listeners = /* @__PURE__ */ new Set();
|
|
6374
6384
|
#snapshots = [];
|
|
6375
6385
|
#patchEmitTimer;
|
|
@@ -6383,23 +6393,36 @@ var UiSurfaceStore = class {
|
|
|
6383
6393
|
apply(event) {
|
|
6384
6394
|
event = validateUiSpecEvent(event);
|
|
6385
6395
|
switch (event.type) {
|
|
6386
|
-
case "open":
|
|
6387
|
-
|
|
6396
|
+
case "open": {
|
|
6397
|
+
const snapshot = {
|
|
6388
6398
|
id: event.id,
|
|
6389
6399
|
node: structuredClone(event.node),
|
|
6390
6400
|
...event.actions ? { actions: structuredClone(event.actions) } : {},
|
|
6391
6401
|
revision: 0,
|
|
6392
6402
|
status: "active",
|
|
6393
6403
|
...event.runId ? { runId: event.runId } : {}
|
|
6394
|
-
}
|
|
6404
|
+
};
|
|
6405
|
+
const fingerprint = this.#fingerprint(event);
|
|
6406
|
+
const merged = fingerprint === void 0 ? void 0 : this.#fingerprints.get(fingerprint);
|
|
6407
|
+
if (merged !== void 0 && this.#entries.has(merged)) {
|
|
6408
|
+
this.#aliases.set(event.id, merged);
|
|
6409
|
+
this.#entries.set(merged, {
|
|
6410
|
+
...snapshot,
|
|
6411
|
+
id: merged
|
|
6412
|
+
});
|
|
6413
|
+
} else {
|
|
6414
|
+
if (fingerprint !== void 0) this.#fingerprints.set(fingerprint, event.id);
|
|
6415
|
+
this.#entries.set(event.id, snapshot);
|
|
6416
|
+
}
|
|
6395
6417
|
break;
|
|
6418
|
+
}
|
|
6396
6419
|
case "patch": {
|
|
6397
6420
|
const current = this.#entry(event.id);
|
|
6398
6421
|
this.#assertRunId(current, event.runId);
|
|
6399
6422
|
if (current.status !== "active" || event.revision !== current.revision + 1) throw new WebSkillError("VALIDATION_FAILED", `Surface patch revision is invalid for "${event.id}"`);
|
|
6400
6423
|
let node = current.node;
|
|
6401
6424
|
for (const operation of event.operations) node = applyPatch(node, operation);
|
|
6402
|
-
this.#entries.set(
|
|
6425
|
+
this.#entries.set(current.id, {
|
|
6403
6426
|
...current,
|
|
6404
6427
|
node: validateUiSpecNode(node),
|
|
6405
6428
|
revision: event.revision
|
|
@@ -6410,7 +6433,7 @@ var UiSurfaceStore = class {
|
|
|
6410
6433
|
const current = this.#entry(event.id);
|
|
6411
6434
|
this.#assertRunId(current, event.runId);
|
|
6412
6435
|
if (event.revision !== current.revision) throw new WebSkillError("VALIDATION_FAILED", `Surface completion revision is invalid for "${event.id}"`);
|
|
6413
|
-
this.#entries.set(
|
|
6436
|
+
this.#entries.set(current.id, {
|
|
6414
6437
|
...current,
|
|
6415
6438
|
status: "complete"
|
|
6416
6439
|
});
|
|
@@ -6419,7 +6442,7 @@ var UiSurfaceStore = class {
|
|
|
6419
6442
|
case "error": {
|
|
6420
6443
|
const current = this.#entry(event.id);
|
|
6421
6444
|
this.#assertRunId(current, event.runId);
|
|
6422
|
-
this.#entries.set(
|
|
6445
|
+
this.#entries.set(current.id, {
|
|
6423
6446
|
...current,
|
|
6424
6447
|
status: "error",
|
|
6425
6448
|
error: {
|
|
@@ -6432,7 +6455,7 @@ var UiSurfaceStore = class {
|
|
|
6432
6455
|
case "cancel": {
|
|
6433
6456
|
const current = this.#entry(event.id);
|
|
6434
6457
|
this.#assertRunId(current, event.runId);
|
|
6435
|
-
this.#entries.set(
|
|
6458
|
+
this.#entries.set(current.id, {
|
|
6436
6459
|
...current,
|
|
6437
6460
|
status: "cancelled"
|
|
6438
6461
|
});
|
|
@@ -6446,8 +6469,16 @@ var UiSurfaceStore = class {
|
|
|
6446
6469
|
this.#emit();
|
|
6447
6470
|
}
|
|
6448
6471
|
}
|
|
6472
|
+
/** 跨 run 的相同界面是合法重复(用户又问了一次),所以无 runId 时不合并 */
|
|
6473
|
+
#fingerprint(event) {
|
|
6474
|
+
if (event.runId === void 0) return void 0;
|
|
6475
|
+
return `${event.runId}\u0000${stableStringify({
|
|
6476
|
+
node: event.node,
|
|
6477
|
+
actions: event.actions ?? null
|
|
6478
|
+
})}`;
|
|
6479
|
+
}
|
|
6449
6480
|
#entry(id) {
|
|
6450
|
-
const entry = this.#entries.get(id);
|
|
6481
|
+
const entry = this.#entries.get(this.#aliases.get(id) ?? id);
|
|
6451
6482
|
if (!entry) throw new WebSkillError("VALIDATION_FAILED", `Unknown UI surface "${id}"`);
|
|
6452
6483
|
return entry;
|
|
6453
6484
|
}
|
|
@@ -6625,25 +6656,37 @@ var ReactBridgeState = class {
|
|
|
6625
6656
|
}
|
|
6626
6657
|
};
|
|
6627
6658
|
/**
|
|
6628
|
-
*
|
|
6659
|
+
* 建议值以**建议**形态出现(FR-19.4):控件初始值仍为空,
|
|
6629
6660
|
* 用户点「使用」才写入。切勿改成 defaultValue。
|
|
6630
6661
|
*/
|
|
6631
6662
|
function Suggestion({ control, onUse }) {
|
|
6632
6663
|
if (control.suggestion === void 0) return null;
|
|
6633
6664
|
const preview = String(control.suggestion.value);
|
|
6665
|
+
const reason = control.suggestion.reason;
|
|
6634
6666
|
return /* @__PURE__ */ jsxs("div", {
|
|
6635
6667
|
className: "webskill-form__suggestion",
|
|
6636
6668
|
"data-webskill-suggestion": control.name,
|
|
6637
|
-
children: [
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6669
|
+
children: [
|
|
6670
|
+
/* @__PURE__ */ jsxs("span", {
|
|
6671
|
+
className: "webskill-form__suggestion-value",
|
|
6672
|
+
children: ["Suggested: ", preview]
|
|
6673
|
+
}),
|
|
6674
|
+
reason ? /* @__PURE__ */ jsxs("span", {
|
|
6675
|
+
className: "webskill-form__suggestion-reason",
|
|
6676
|
+
children: [
|
|
6677
|
+
"(",
|
|
6678
|
+
reason,
|
|
6679
|
+
")"
|
|
6680
|
+
]
|
|
6681
|
+
}) : null,
|
|
6682
|
+
/* @__PURE__ */ jsx("button", {
|
|
6683
|
+
type: "button",
|
|
6684
|
+
className: "webskill-form__suggestion-use",
|
|
6685
|
+
"data-webskill-suggestion-use": control.name,
|
|
6686
|
+
onClick: onUse,
|
|
6687
|
+
children: "Use"
|
|
6688
|
+
})
|
|
6689
|
+
]
|
|
6647
6690
|
});
|
|
6648
6691
|
}
|
|
6649
6692
|
function Control({ control, invalid }) {
|
|
@@ -6869,7 +6912,7 @@ function StreamingText({ bridge }) {
|
|
|
6869
6912
|
});
|
|
6870
6913
|
}
|
|
6871
6914
|
/**
|
|
6872
|
-
* catalog `Table` 节点的渲染实现:排序 / 筛选 / 分页 / 列显隐 /
|
|
6915
|
+
* catalog `Table` 节点的渲染实现:排序 / 筛选 / 分页 / 列显隐 / 虚拟滚动。
|
|
6873
6916
|
* 这些是宿主侧的呈现能力,不进 catalog props——模型只声明 columns 与 rows。
|
|
6874
6917
|
* 它们都带 `data-webskill-host-control`,跨渲染器语义对括据此排除宿主控件。
|
|
6875
6918
|
*/
|
|
@@ -6877,40 +6920,22 @@ function SpecTable({ columns, rows, label }) {
|
|
|
6877
6920
|
const [sorting, setSorting] = useState([]);
|
|
6878
6921
|
const [globalFilter, setGlobalFilter] = useState("");
|
|
6879
6922
|
const [columnVisibility, setColumnVisibility] = useState({});
|
|
6880
|
-
const [rowSelection, setRowSelection] = useState({});
|
|
6881
6923
|
const scrollRef = useRef(null);
|
|
6882
6924
|
const table = useReactTable({
|
|
6883
6925
|
data: rows,
|
|
6884
|
-
columns:
|
|
6885
|
-
id: "selection",
|
|
6886
|
-
header: ({ table }) => /* @__PURE__ */ jsx(Checkbox, {
|
|
6887
|
-
"aria-label": "Select all rows",
|
|
6888
|
-
checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
|
|
6889
|
-
onCheckedChange: (checked) => table.toggleAllPageRowsSelected(checked === true)
|
|
6890
|
-
}),
|
|
6891
|
-
cell: ({ row }) => /* @__PURE__ */ jsx(Checkbox, {
|
|
6892
|
-
"aria-label": `Select row ${row.index + 1}`,
|
|
6893
|
-
checked: row.getIsSelected(),
|
|
6894
|
-
onCheckedChange: (checked) => row.toggleSelected(checked === true)
|
|
6895
|
-
}),
|
|
6896
|
-
enableSorting: false,
|
|
6897
|
-
enableHiding: false
|
|
6898
|
-
}, ...columns.map((header, index) => ({
|
|
6926
|
+
columns: columns.map((header, index) => ({
|
|
6899
6927
|
id: `column-${index}`,
|
|
6900
6928
|
header,
|
|
6901
6929
|
accessorFn: (row) => row[index]
|
|
6902
|
-
}))
|
|
6930
|
+
})),
|
|
6903
6931
|
state: {
|
|
6904
6932
|
sorting,
|
|
6905
6933
|
globalFilter,
|
|
6906
|
-
columnVisibility
|
|
6907
|
-
rowSelection
|
|
6934
|
+
columnVisibility
|
|
6908
6935
|
},
|
|
6909
6936
|
onSortingChange: setSorting,
|
|
6910
6937
|
onGlobalFilterChange: setGlobalFilter,
|
|
6911
6938
|
onColumnVisibilityChange: setColumnVisibility,
|
|
6912
|
-
onRowSelectionChange: setRowSelection,
|
|
6913
|
-
enableRowSelection: true,
|
|
6914
6939
|
globalFilterFn: (row, _columnId, filterValue) => row.original.some((cell) => String(cell ?? "").toLocaleLowerCase().includes(String(filterValue).toLocaleLowerCase())),
|
|
6915
6940
|
getCoreRowModel: getCoreRowModel(),
|
|
6916
6941
|
getFilteredRowModel: getFilteredRowModel(),
|
|
@@ -7178,7 +7203,7 @@ function renderNode(node, context, key, scope) {
|
|
|
7178
7203
|
* 表单行为(草稿跨刷新、必填拦截、默认值)由本组件承接——
|
|
7179
7204
|
* 节点树取代六类 surface 后,这里是 native 档唯一的渲染实现。
|
|
7180
7205
|
*/
|
|
7181
|
-
function NativeSpecSurface({ surfaceId, spec, actions, registry, runId, draft, onAction, onDraftChange }) {
|
|
7206
|
+
function NativeSpecSurface({ surfaceId, spec, actions, registry, runId, draft, onAction, onDraftChange, shell = "card" }) {
|
|
7182
7207
|
const context = {
|
|
7183
7208
|
...useSurfaceForm({
|
|
7184
7209
|
surfaceId,
|
|
@@ -7199,7 +7224,7 @@ function NativeSpecSurface({ surfaceId, spec, actions, registry, runId, draft, o
|
|
|
7199
7224
|
children: ["Invalid UI spec: ", validation.issues.map((issue) => `${issue.path}: ${issue.message}`).join("; ")]
|
|
7200
7225
|
});
|
|
7201
7226
|
return /* @__PURE__ */ jsx("div", {
|
|
7202
|
-
className: "webskill-surface webskill-surface--spec",
|
|
7227
|
+
className: shell === "none" ? "webskill-surface--spec" : "webskill-surface webskill-surface--spec",
|
|
7203
7228
|
"data-testid": "native-spec-surface",
|
|
7204
7229
|
children: renderNode(spec, context, "root")
|
|
7205
7230
|
});
|
|
@@ -7493,7 +7518,7 @@ function OpenUiSpecSurface({ spec, surfaceId, actions, onAction }) {
|
|
|
7493
7518
|
const [unavailable, setUnavailable] = useState(false);
|
|
7494
7519
|
useEffect(() => {
|
|
7495
7520
|
let cancelled = false;
|
|
7496
|
-
import("./openUiLibrary-
|
|
7521
|
+
import("./openUiLibrary-Bdrji9qK-D2LxmM-a.js").then((loaded) => {
|
|
7497
7522
|
if (!cancelled) setModule(loaded);
|
|
7498
7523
|
}).catch(() => {
|
|
7499
7524
|
if (!cancelled) setUnavailable(true);
|
package/dist/ui-vue.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as InteractionResponse, s as InteractionRequest, x as UiBridge, y as RenderResultRequest } from "./types-CcxRLdJG-DCXyw1US.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 { I as shapeInteractionValue, O as interactionToFormModel, P as renderMiniChart, g as applySuggestion, tt as renderMiniMarkdown, x as collectValues } from "./dist-
|
|
1
|
+
import { I as shapeInteractionValue, O as interactionToFormModel, P as renderMiniChart, g as applySuggestion, tt as renderMiniMarkdown, x as collectValues } from "./dist-DnYG2-eY.js";
|
|
2
2
|
import { defineComponent, h, reactive, ref } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region ../ui-vue/dist/index.js
|
|
@@ -46,18 +46,23 @@ var VueBridgeState = class {
|
|
|
46
46
|
this.state.streamingText += delta;
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
/**
|
|
49
|
+
/** 建议值以**建议**形态出现(FR-19.4):控件初始值仍为空,用户点「使用」才写入 */
|
|
50
50
|
function renderSuggestion(control, onUse) {
|
|
51
51
|
if (control.suggestion === void 0) return null;
|
|
52
|
+
const reason = control.suggestion.reason;
|
|
52
53
|
return h("div", {
|
|
53
54
|
class: "webskill-form__suggestion",
|
|
54
55
|
"data-webskill-suggestion": control.name
|
|
55
|
-
}, [
|
|
56
|
-
|
|
57
|
-
class: "webskill-form__suggestion-
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
}, [
|
|
57
|
+
h("span", { class: "webskill-form__suggestion-value" }, `Suggested: ${String(control.suggestion.value)}`),
|
|
58
|
+
...reason ? [h("span", { class: "webskill-form__suggestion-reason" }, `(${reason})`)] : [],
|
|
59
|
+
h("button", {
|
|
60
|
+
type: "button",
|
|
61
|
+
class: "webskill-form__suggestion-use",
|
|
62
|
+
"data-webskill-suggestion-use": control.name,
|
|
63
|
+
onClick: onUse
|
|
64
|
+
}, "Use")
|
|
65
|
+
]);
|
|
61
66
|
}
|
|
62
67
|
function renderControl(control, invalid) {
|
|
63
68
|
const controlId = `webskill-field-${control.name}`;
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { $ as buildA2uiCatalogDefinition, A as UiActionDef, At as uiCatalog, B as UiSpecValidation, C as OpenUiRendererProps, Ct as shapeInteractionValue, D as UI_CATALOG_PROMPT_BUDGET_BYTES, Dt as toOpenUiSpecLang, E as UI_CATALOG_GROUPS, Et as toJsonRenderSpec, F as UiComponentDef, G as WEBSKILL_A2UI_CATALOG_ID, H as VERCEL_INTERACTION_TOOL_NAME, I as UiFormScope, J as WebFormBridge, K as WEBSKILL_STYLES_CSS, L as UiPreset, M as UiCatalogInput, N as UiCatalogPromptOptions, O as UI_PRESETS, Ot as toUiSurfaceActionDispatch, P as UiCatalogToolSourceOptions, Q as applySuggestion, R as UiPresetName, S as LoadedOpenUiPeers, St as renderRenderResult, T as RENDER_UI_TOOL, Tt as toA2uiSurfaceAction, U as VercelToolInvocation, V as UiSurfaceActionDispatch, W as VercelUiBridge, X as a2uiComponentSchema, Y as ZodRuntime, Z as a2uiComponentShapes, _ as DESCRIBE_UI_PRESET_TOOL, _t as mountEchart, a as A2UI_SURFACE_ACTION, at as collectValues, b as InteractionSpecLabels, bt as renderMiniChart, c as A2uiCatalogDefinition, ct as ensureStyles, d as A2uiMessage, dt as fromUiSurfaceActionDispatch, et as chartSpecFromProps, f as A2uiSpecActionEvent, ft as fromVercelToolResult, g as ControlModel, gt as loadWebSkillLitCatalog, h as CollectedValues, ht as loadOpenUiPeers, i as A2UI_SPEC_FORM_PATH, it as collectSpecActions, j as UiCatalog, jt as uiPreset, k as UI_PRESET_NAMES, kt as toVercelToolInvocation, l as A2uiCatalogHandle, lt as fromA2uiSpecAction, m as CHART_PALETTE, mt as interactionToUiSpec, n as A2UI_COMMON_TYPES, nt as collectFormScopes, o as A2UI_VERSION, ot as createUiCatalogToolSource, p as A2uiSpecMessageOptions, pt as interactionToFormModel, q as WEBSKILL_SURFACE_ACTION, r as A2UI_SPEC_ACTION, rt as collectScopedValues, s as A2uiCatalogComponent, st as defineUiCatalog, t as A2UI_BASIC_CATALOG_ID, tt as chartToTable, u as A2uiComponentShape, ut as fromA2uiSurfaceAction, v as EchartHandle, vt as qualifyFieldName, w as OpenUiRuntime, wt as toA2uiSpecMessages, x as JsonRenderSpec, xt as renderMiniMarkdown, y as FormModel, yt as renderBlocks, z as UiSpecIssue } from "./index-
|
|
1
|
+
import { gt as UiSpecNode } from "./types-CcxRLdJG-DCXyw1US.js";
|
|
2
|
+
import { mn as buildRenderResult } from "./index-DkbABR43.js";
|
|
3
|
+
import { $ as buildA2uiCatalogDefinition, A as UiActionDef, At as uiCatalog, B as UiSpecValidation, C as OpenUiRendererProps, Ct as shapeInteractionValue, D as UI_CATALOG_PROMPT_BUDGET_BYTES, Dt as toOpenUiSpecLang, E as UI_CATALOG_GROUPS, Et as toJsonRenderSpec, F as UiComponentDef, G as WEBSKILL_A2UI_CATALOG_ID, H as VERCEL_INTERACTION_TOOL_NAME, I as UiFormScope, J as WebFormBridge, K as WEBSKILL_STYLES_CSS, L as UiPreset, M as UiCatalogInput, N as UiCatalogPromptOptions, O as UI_PRESETS, Ot as toUiSurfaceActionDispatch, P as UiCatalogToolSourceOptions, Q as applySuggestion, R as UiPresetName, S as LoadedOpenUiPeers, St as renderRenderResult, T as RENDER_UI_TOOL, Tt as toA2uiSurfaceAction, U as VercelToolInvocation, V as UiSurfaceActionDispatch, W as VercelUiBridge, X as a2uiComponentSchema, Y as ZodRuntime, Z as a2uiComponentShapes, _ as DESCRIBE_UI_PRESET_TOOL, _t as mountEchart, a as A2UI_SURFACE_ACTION, at as collectValues, b as InteractionSpecLabels, bt as renderMiniChart, c as A2uiCatalogDefinition, ct as ensureStyles, d as A2uiMessage, dt as fromUiSurfaceActionDispatch, et as chartSpecFromProps, f as A2uiSpecActionEvent, ft as fromVercelToolResult, g as ControlModel, gt as loadWebSkillLitCatalog, h as CollectedValues, ht as loadOpenUiPeers, i as A2UI_SPEC_FORM_PATH, it as collectSpecActions, j as UiCatalog, jt as uiPreset, k as UI_PRESET_NAMES, kt as toVercelToolInvocation, l as A2uiCatalogHandle, lt as fromA2uiSpecAction, m as CHART_PALETTE, mt as interactionToUiSpec, n as A2UI_COMMON_TYPES, nt as collectFormScopes, o as A2UI_VERSION, ot as createUiCatalogToolSource, p as A2uiSpecMessageOptions, pt as interactionToFormModel, q as WEBSKILL_SURFACE_ACTION, r as A2UI_SPEC_ACTION, rt as collectScopedValues, s as A2uiCatalogComponent, st as defineUiCatalog, t as A2UI_BASIC_CATALOG_ID, tt as chartToTable, u as A2uiComponentShape, ut as fromA2uiSurfaceAction, v as EchartHandle, vt as qualifyFieldName, w as OpenUiRuntime, wt as toA2uiSpecMessages, x as JsonRenderSpec, xt as renderMiniMarkdown, y as FormModel, yt as renderBlocks, z as UiSpecIssue } from "./index-BwsK9lGk.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 ControlModel, DESCRIBE_UI_PRESET_TOOL, type EchartHandle, type FormModel, type InteractionSpecLabels, type JsonRenderSpec, type LoadedOpenUiPeers, type OpenUiRendererProps, type OpenUiRuntime, RENDER_UI_TOOL, 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 UiSpecIssue, type UiSpecNode, 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, fromA2uiSpecAction, fromA2uiSurfaceAction, fromUiSurfaceActionDispatch, fromVercelToolResult, interactionToFormModel, interactionToUiSpec, loadOpenUiPeers, loadWebSkillLitCatalog, mountEchart, qualifyFieldName, renderBlocks, renderMiniChart, renderMiniMarkdown, renderRenderResult, shapeInteractionValue, toA2uiSpecMessages, toA2uiSurfaceAction, toJsonRenderSpec, toOpenUiSpecLang, toUiSurfaceActionDispatch, toVercelToolInvocation, uiCatalog, uiPreset };
|
package/dist/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as defineUiCatalog, A as loadOpenUiPeers, B as toOpenUiSpecLang, C as ensureStyles, D as fromVercelToolResult, E as fromUiSurfaceActionDispatch, F as renderRenderResult, G as A2UI_COMMON_TYPES, H as toVercelToolInvocation, I as shapeInteractionValue, J as WEBSKILL_A2UI_CATALOG_ID, K as UI_CATALOG_GROUPS, L as toA2uiSpecMessages, M as qualifyFieldName, N as renderBlocks, O as interactionToFormModel, P as renderMiniChart, Q as chartSpecFromProps, R as toA2uiSurfaceAction, S as createUiCatalogToolSource, T as fromA2uiSurfaceAction, U as uiPreset, V as toUiSurfaceActionDispatch, X as a2uiComponentShapes, Y as a2uiComponentSchema, Z as buildA2uiCatalogDefinition, _ as chartToTable, a as A2UI_VERSION, b as collectSpecActions, c as RENDER_UI_TOOL, d as VERCEL_INTERACTION_TOOL_NAME, et as mountEchart, f as VercelUiBridge, g as applySuggestion, h as WebFormBridge, i as A2UI_SURFACE_ACTION, j as loadWebSkillLitCatalog, k as interactionToUiSpec, l as UI_PRESETS, m as WEBSKILL_SURFACE_ACTION, n as A2UI_SPEC_ACTION, nt as uiCatalog, o as CHART_PALETTE, p as WEBSKILL_STYLES_CSS, q as UI_CATALOG_PROMPT_BUDGET_BYTES, r as A2UI_SPEC_FORM_PATH, s as DESCRIBE_UI_PRESET_TOOL, t as A2UI_BASIC_CATALOG_ID, tt as renderMiniMarkdown, u as UI_PRESET_NAMES, v as collectFormScopes, w as fromA2uiSpecAction, x as collectValues, y as collectScopedValues, z as toJsonRenderSpec } from "./dist-
|
|
1
|
+
import { V as buildRenderResult } from "./dist-D0qW6e40.js";
|
|
2
|
+
import { $ as defineUiCatalog, A as loadOpenUiPeers, B as toOpenUiSpecLang, C as ensureStyles, D as fromVercelToolResult, E as fromUiSurfaceActionDispatch, F as renderRenderResult, G as A2UI_COMMON_TYPES, H as toVercelToolInvocation, I as shapeInteractionValue, J as WEBSKILL_A2UI_CATALOG_ID, K as UI_CATALOG_GROUPS, L as toA2uiSpecMessages, M as qualifyFieldName, N as renderBlocks, O as interactionToFormModel, P as renderMiniChart, Q as chartSpecFromProps, R as toA2uiSurfaceAction, S as createUiCatalogToolSource, T as fromA2uiSurfaceAction, U as uiPreset, V as toUiSurfaceActionDispatch, X as a2uiComponentShapes, Y as a2uiComponentSchema, Z as buildA2uiCatalogDefinition, _ as chartToTable, a as A2UI_VERSION, b as collectSpecActions, c as RENDER_UI_TOOL, d as VERCEL_INTERACTION_TOOL_NAME, et as mountEchart, f as VercelUiBridge, g as applySuggestion, h as WebFormBridge, i as A2UI_SURFACE_ACTION, j as loadWebSkillLitCatalog, k as interactionToUiSpec, l as UI_PRESETS, m as WEBSKILL_SURFACE_ACTION, n as A2UI_SPEC_ACTION, nt as uiCatalog, o as CHART_PALETTE, p as WEBSKILL_STYLES_CSS, q as UI_CATALOG_PROMPT_BUDGET_BYTES, r as A2UI_SPEC_FORM_PATH, s as DESCRIBE_UI_PRESET_TOOL, t as A2UI_BASIC_CATALOG_ID, tt as renderMiniMarkdown, u as UI_PRESET_NAMES, v as collectFormScopes, w as fromA2uiSpecAction, x as collectValues, y as collectScopedValues, z as toJsonRenderSpec } from "./dist-DnYG2-eY.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, DESCRIBE_UI_PRESET_TOOL, RENDER_UI_TOOL, 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, fromA2uiSpecAction, fromA2uiSurfaceAction, fromUiSurfaceActionDispatch, fromVercelToolResult, interactionToFormModel, interactionToUiSpec, loadOpenUiPeers, loadWebSkillLitCatalog, mountEchart, qualifyFieldName, renderBlocks, renderMiniChart, renderMiniMarkdown, renderRenderResult, shapeInteractionValue, toA2uiSpecMessages, toA2uiSurfaceAction, toJsonRenderSpec, toOpenUiSpecLang, toUiSurfaceActionDispatch, toVercelToolInvocation, uiCatalog, uiPreset };
|
package/dist/{webskillLitCatalog-_mugzRHx-DiuJpCuf.js → webskillLitCatalog-_mugzRHx-B_54vxum.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as WEBSKILL_A2UI_CATALOG_ID, Q as chartSpecFromProps, W as A2UI_CHILDREN_PROP, X as a2uiComponentShapes, et as mountEchart, nt as uiCatalog, tt as renderMiniMarkdown } from "./dist-
|
|
1
|
+
import { J as WEBSKILL_A2UI_CATALOG_ID, Q as chartSpecFromProps, W as A2UI_CHILDREN_PROP, X as a2uiComponentShapes, et as mountEchart, nt as uiCatalog, tt as renderMiniMarkdown } from "./dist-DnYG2-eY.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";
|