@webskill/sdk 0.15.0 → 0.16.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 +3 -3
- package/dist/agent.js +466 -66
- package/dist/browser.d.ts +140 -7
- package/dist/browser.js +326 -33
- package/dist/{eventTypes-Y07N8IAC.js → eventTypes-CwciaqCU.js} +23 -0
- package/dist/governance.d.ts +26 -3
- package/dist/governance.js +1 -1
- package/dist/{index-CQYo4tcT.d.ts → index-BLfnO7sz.d.ts} +324 -16
- package/dist/{index-Oc3H89TJ.d.ts → index-DbVqg2V3.d.ts} +1 -1
- package/dist/{index-CU2md8R1.d.ts → index-DeXgdtHa.d.ts} +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/mcp.d.ts +2 -2
- package/dist/{miniChart-owdCdaw-.js → miniChart-lauNtZu8.js} +2 -7
- package/dist/node.d.ts +3 -3
- package/dist/node.js +1 -1
- package/dist/{openUiLibrary-CY_ADoe0.js → openUiLibrary-BWEBU9P-.js} +1 -1
- package/dist/{openUiSpecLang-DuOCdw9G.js → openUiSpecLang-BIK6CWlW.js} +1 -1
- package/dist/{skillVersionStore-B24Jjjry-C4zomhMZ.d.ts → skillVersionStore-B24Jjjry-CsbzF7Oe.d.ts} +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/{types-TUydnxaj.js → types-BuacBov_.js} +14 -3
- package/dist/{types-C3V6lAeO-BIf7UB2e.d.ts → types-C3V6lAeO-BUpcRLER.d.ts} +11 -0
- package/dist/ui-react.d.ts +9 -3
- package/dist/ui-react.js +15 -4
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui-vue.js +2 -2
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +4 -4
- package/dist/{webskillLitCatalog-DSqVFQjK.js → webskillLitCatalog-poL1qhBp.js} +2 -2
- package/package.json +1 -1
package/dist/node.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as SKILLS_LOCKFILE, Ct as SkillsLockfile, Et as TrustedKeyStore, H as FileStat, K as JsonSchema, N as ArchiveLimits, S as UiBridge, U as FileSystemProvider, _t as SkillManifest, at as SignatureAuditSink, b as RenderResultRequest, c as InteractionResponse, et as SKILL_MANIFEST_FILE, gt as SkillManagerPort, jt as VerifyResult, kt as UnsignedPolicy, pt as SkillInstallSource, s as InteractionRequest } from "./types-C3V6lAeO-
|
|
2
|
-
import { Gn as WebSkillRuntimeDeps, Gt as SchemaInferer, H as FsMemoryStore, Kt as ScriptExecutionContext, V as FsArtifactStore, Wn as WebSkillRuntime, Zn as createScriptContext, ct as NetworkPolicy, gn as ToolDefinition, m as ApprovalScope, qt as ScriptExecutor, y as BridgeCapabilities, yn as ToolResult } from "./index-
|
|
3
|
-
import { a as AuditLog, b as SkillVersionStore, d as CandidateSkill, m as CandidateStore, r as ApprovalPolicy } from "./skillVersionStore-B24Jjjry-
|
|
1
|
+
import { $ as SKILLS_LOCKFILE, Ct as SkillsLockfile, Et as TrustedKeyStore, H as FileStat, K as JsonSchema, N as ArchiveLimits, S as UiBridge, U as FileSystemProvider, _t as SkillManifest, at as SignatureAuditSink, b as RenderResultRequest, c as InteractionResponse, et as SKILL_MANIFEST_FILE, gt as SkillManagerPort, jt as VerifyResult, kt as UnsignedPolicy, pt as SkillInstallSource, s as InteractionRequest } from "./types-C3V6lAeO-BUpcRLER.js";
|
|
2
|
+
import { Gn as WebSkillRuntimeDeps, Gt as SchemaInferer, H as FsMemoryStore, Kt as ScriptExecutionContext, V as FsArtifactStore, Wn as WebSkillRuntime, Zn as createScriptContext, ct as NetworkPolicy, gn as ToolDefinition, m as ApprovalScope, qt as ScriptExecutor, y as BridgeCapabilities, yn as ToolResult } from "./index-DbVqg2V3.js";
|
|
3
|
+
import { a as AuditLog, b as SkillVersionStore, d as CandidateSkill, m as CandidateStore, r as ApprovalPolicy } from "./skillVersionStore-B24Jjjry-CsbzF7Oe.js";
|
|
4
4
|
import { n as LlmEnvConfig, s as probeLlmCapabilities, t as LlmCapabilities } from "./env-AK3cSMEA-Dli6QU5E.js";
|
|
5
5
|
import { Readable, Writable } from "node:stream";
|
|
6
6
|
//#region ../node/dist/index.d.ts
|
package/dist/node.js
CHANGED
|
@@ -5,7 +5,7 @@ import { t as assertRemoteUrlAllowed } from "./urlSafety-CiSuCJvX.js";
|
|
|
5
5
|
import { B as createScriptContext, a as networkPolicyLibSource, c as bridgeError, d as FsMemoryStore, f as WebSkillRuntime, l as parseBridgeRequest, r as normalizeToolError, s as UPLOAD_FILES_UNAVAILABLE, t as CapabilityApproval, u as FsArtifactStore } from "./approval-BnLLCOG0.js";
|
|
6
6
|
import { n as normalizeToolContent } from "./external-_ZRQe-V9.js";
|
|
7
7
|
import { i as probeLlmCapabilities } from "./env-Bj1MI2Ww.js";
|
|
8
|
-
import { t as AUDIT_EVENT_TYPES } from "./eventTypes-
|
|
8
|
+
import { t as AUDIT_EVENT_TYPES } from "./eventTypes-CwciaqCU.js";
|
|
9
9
|
import { createRequire } from "node:module";
|
|
10
10
|
import { unzipSync, zipSync } from "fflate";
|
|
11
11
|
import { existsSync, promises, realpathSync } from "node:fs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as uiCatalog } from "./openUiSpecLang-
|
|
1
|
+
import { h as uiCatalog } from "./openUiSpecLang-BIK6CWlW.js";
|
|
2
2
|
import { t as CatalogNode } from "./ui-react.js";
|
|
3
3
|
import { Renderer, createLibrary, defineComponent } from "./dist-CTsxblSD.js";
|
|
4
4
|
import { z } from "zod";
|
package/dist/{skillVersionStore-B24Jjjry-C4zomhMZ.d.ts → skillVersionStore-B24Jjjry-CsbzF7Oe.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as FileSystemProvider, X as PageQuery, Y as Page, _t as SkillManifest, ut as SkillCatalogEntry } from "./types-C3V6lAeO-
|
|
1
|
+
import { U as FileSystemProvider, X as PageQuery, Y as Page, _t as SkillManifest, ut as SkillCatalogEntry } from "./types-C3V6lAeO-BUpcRLER.js";
|
|
2
2
|
//#region ../governance/dist/skillVersionStore-B24Jjjry.d.ts
|
|
3
3
|
//#region src/types.d.ts
|
|
4
4
|
type CandidateStatus = 'draft' | 'pending-review' | 'approved' | 'published' | 'rejected';
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as UiBridge, c as InteractionResponse, l as LlmClient, m as LlmStreamEvent, n as ArtifactStore, p as LlmResponse, s as InteractionRequest, t as Artifact, u as LlmCompleteInput, v as MemoryStore } from "./types-C3V6lAeO-
|
|
1
|
+
import { S as UiBridge, c as InteractionResponse, l as LlmClient, m as LlmStreamEvent, n as ArtifactStore, p as LlmResponse, s as InteractionRequest, t as Artifact, u as LlmCompleteInput, v as MemoryStore } from "./types-C3V6lAeO-BUpcRLER.js";
|
|
2
2
|
import { a as loadGoogleConfigFromEnv, i as loadAnthropicConfigFromEnv, n as LlmEnvConfig, o as loadLlmConfigFromEnv, r as ProviderEnvConfig } from "./env-AK3cSMEA-Dli6QU5E.js";
|
|
3
3
|
//#region ../runtime/dist/testing.d.ts
|
|
4
4
|
//#region src/llm/mockLlmClient.d.ts
|
|
@@ -58,7 +58,8 @@ function toActionFrameScopes(scope) {
|
|
|
58
58
|
}];
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
* 本版的操作集(FR-25.1
|
|
61
|
+
* 本版的操作集(FR-25.1 / 0.16.0 FR-13.6)。拖拽、滚动仍不在内;
|
|
62
|
+
* 导航只有 `back` 一个,且它**不接受地址**——可达面被浏览器历史封死(SC-1)。
|
|
62
63
|
*
|
|
63
64
|
* `select`/`set`/`attach` 与既有三个走**同一条** policy 路径,
|
|
64
65
|
* 范围白名单、逐次确认、审计三条硬约束因此天然覆盖到它们——
|
|
@@ -71,8 +72,18 @@ const PAGE_ACTION_KINDS = [
|
|
|
71
72
|
"submit",
|
|
72
73
|
"select",
|
|
73
74
|
"set",
|
|
74
|
-
"attach"
|
|
75
|
+
"attach",
|
|
76
|
+
"back"
|
|
75
77
|
];
|
|
78
|
+
/**
|
|
79
|
+
* `back` 的目标占位(0.16.0 分册 13 §4.1)。
|
|
80
|
+
*
|
|
81
|
+
* **模型不能表达它**:工具源在 `action === 'back'` 时拒绝任何 `ref` 入参。
|
|
82
|
+
* 它存在只为了让 `back` 不必改 `PageActionRequest.ref` 的类型——
|
|
83
|
+
* 改它会波及所有实现过 executor 的宓主。
|
|
84
|
+
* @experimental
|
|
85
|
+
*/
|
|
86
|
+
const PAGE_DOCUMENT_REF = "@document";
|
|
76
87
|
|
|
77
88
|
//#endregion
|
|
78
|
-
export {
|
|
89
|
+
export { frameLabel as a, toFrameScopes as i, PAGE_DOCUMENT_REF as n, frameSteps as o, toActionFrameScopes as r, PAGE_ACTION_KINDS as t };
|
|
@@ -3,6 +3,17 @@
|
|
|
3
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' | 'SKILL_MANIFEST_PROTECTED' | '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' |
|
|
4
4
|
/** 历史里有未应答的工具调用,但当初为何中断已无从得知(分册 11 读取侧补齐) */
|
|
5
5
|
'RUN_INTERRUPTED' | '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' |
|
|
6
|
+
/**
|
|
7
|
+
* 0.16.0 分册 12:模型侧标签页控制的三条拒绝。
|
|
8
|
+
* `EXPIRED` 与 `UNKNOWN` 分开,是因为模型的下一步不同:前者重新列举,后者是它记错了。
|
|
9
|
+
*/
|
|
10
|
+
'PAGE_TAB_EXPIRED' | 'PAGE_TAB_UNKNOWN' |
|
|
11
|
+
/** 用户自己打开的那一页不归任务所有,模型不得关闭(SC-3) */
|
|
12
|
+
'PAGE_TAB_NOT_CLOSABLE' |
|
|
13
|
+
/** 0.16.0 分册 14:宿主的 reader 没实现 `readSubtree`,该能力整个不存在(D-14-4) */
|
|
14
|
+
'PERCEPTION_SUBTREE_UNSUPPORTED' |
|
|
15
|
+
/** 子树落在宿主声明的可读区域之外,或被 `exclude` 连根剪掉;遍历不会开始 */
|
|
16
|
+
'PERCEPTION_SUBTREE_OUT_OF_SCOPE' | 'PERCEPTION_SUBTREE_UNKNOWN_REF' |
|
|
6
17
|
/** 0.11.0 分册 18:用户拒绝把数据交给文档投放面 */
|
|
7
18
|
'DOCUMENT_SURFACE_DECLINED' |
|
|
8
19
|
/** 0.11.0 分册 18:viewer 未在期限内回报就绪(路由挂了 / 外壳脚本没跑起来) */
|
package/dist/ui-react.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as UiSpecActionCapability, D as UiSpecSnapshot, O as UiSurfaceActionRequest, Ot as UiSpecNode, S as UiBridge, T as UiSpecEvent, b as RenderResultRequest, c as InteractionResponse, k as UiSurfaceActionResponse, s as InteractionRequest, w as UiSpecDrafts } from "./types-C3V6lAeO-
|
|
2
|
-
import { N as DocumentSurfacePort } from "./index-
|
|
3
|
-
import { J as SurfaceHostControlTexts, P as InteractionSpecLabels, q as SurfaceFormTexts, v as ChartFontSizes } from "./index-
|
|
1
|
+
import { C as UiSpecActionCapability, D as UiSpecSnapshot, O as UiSurfaceActionRequest, Ot as UiSpecNode, S as UiBridge, T as UiSpecEvent, b as RenderResultRequest, c as InteractionResponse, k as UiSurfaceActionResponse, s as InteractionRequest, w as UiSpecDrafts } from "./types-C3V6lAeO-BUpcRLER.js";
|
|
2
|
+
import { N as DocumentSurfacePort } from "./index-DbVqg2V3.js";
|
|
3
|
+
import { J as SurfaceHostControlTexts, P as InteractionSpecLabels, q as SurfaceFormTexts, v as ChartFontSizes } from "./index-DeXgdtHa.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import React$1, { ComponentType, ReactNode } from "react";
|
|
6
6
|
import "react/jsx-runtime";
|
|
@@ -502,6 +502,12 @@ declare class SpecInteractionChannel {
|
|
|
502
502
|
request(input: InteractionRequest): Promise<InteractionResponse>;
|
|
503
503
|
/** runtime 交互超时/取消:以 cancelled resolve 挂起的 request(防悬挂 + 残留) */
|
|
504
504
|
cancel(id: string): void;
|
|
505
|
+
/**
|
|
506
|
+
* 否决:以 `value: false` resolve 挂起的 request。
|
|
507
|
+
* 哪些请求的「取消」算否决、哪些算中止,是宿主外壳的决定(UI-UX8 D14),
|
|
508
|
+
* 本通道只提供入口:裸用本通道的宿主不调就维持原来的 cancelled 语义。
|
|
509
|
+
*/
|
|
510
|
+
decline(id: string): void;
|
|
505
511
|
/** react 层动作回传:submit 归形提交值,其余意图(cancel)按取消收尾 */
|
|
506
512
|
handleAction(event: CustomSurfaceActionEvent): void;
|
|
507
513
|
/** react 层初始化失败:挂起请求 reject 并记录原因(桥读取后降级 native) */
|
package/dist/ui-react.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "./rolldown-runtime-BHkdefai.js";
|
|
2
2
|
import { n as messageOf, t as WebSkillError } from "./errors-BDZNpC13.js";
|
|
3
3
|
import { n as validateUiSpecEvent, r as validateUiSpecNode } from "./surface-DVGiCmwq.js";
|
|
4
|
-
import { a as applySuggestion, c as DEFAULT_SURFACE_FORM_TEXTS, f as resolveSurfaceFormTexts, i as renderMiniMarkdown, l as DEFAULT_SURFACE_HOST_CONTROL_TEXTS, m as shapeInteractionValue, o as collectValues, p as resolveSurfaceHostControlTexts, r as renderMiniChart, u as interactionToFormModel } from "./miniChart-
|
|
5
|
-
import { C as chartSpecFromProps, S as DEFAULT_CHART_FONT_SIZES, T as resolveChartFontSizes, d as collectScopedValues, f as qualifyFieldName, h as uiCatalog, l as evaluateFieldCondition, n as interactionToUiSpec, o as normalizeColumnWidths, r as toJsonRenderSpec, s as resolveColumnWidths, t as toOpenUiSpecLang, u as collectFormScopes, w as mountEchart, x as gaugePercent } from "./openUiSpecLang-
|
|
4
|
+
import { a as applySuggestion, c as DEFAULT_SURFACE_FORM_TEXTS, f as resolveSurfaceFormTexts, i as renderMiniMarkdown, l as DEFAULT_SURFACE_HOST_CONTROL_TEXTS, m as shapeInteractionValue, o as collectValues, p as resolveSurfaceHostControlTexts, r as renderMiniChart, u as interactionToFormModel } from "./miniChart-lauNtZu8.js";
|
|
5
|
+
import { C as chartSpecFromProps, S as DEFAULT_CHART_FONT_SIZES, T as resolveChartFontSizes, d as collectScopedValues, f as qualifyFieldName, h as uiCatalog, l as evaluateFieldCondition, n as interactionToUiSpec, o as normalizeColumnWidths, r as toJsonRenderSpec, s as resolveColumnWidths, t as toOpenUiSpecLang, u as collectFormScopes, w as mountEchart, x as gaugePercent } from "./openUiSpecLang-BIK6CWlW.js";
|
|
6
6
|
import minpath from "node:path";
|
|
7
7
|
import { fileURLToPath as urlToPath } from "node:url";
|
|
8
8
|
import { z } from "zod";
|
|
@@ -579,7 +579,7 @@ function InteractionForm({ bridge }) {
|
|
|
579
579
|
className: "webskill-form__title",
|
|
580
580
|
children: model.title
|
|
581
581
|
}) : null,
|
|
582
|
-
model.message && (model.kind === "form" || model.kind === "authorize") ? /* @__PURE__ */ jsx("p", {
|
|
582
|
+
model.message && (model.kind === "form" || model.kind === "authorize" || model.kind === "confirm") ? /* @__PURE__ */ jsx("p", {
|
|
583
583
|
className: "webskill-form__message",
|
|
584
584
|
children: model.message
|
|
585
585
|
}) : null,
|
|
@@ -131278,6 +131278,17 @@ var SpecInteractionChannel = class {
|
|
|
131278
131278
|
cancelled: true
|
|
131279
131279
|
});
|
|
131280
131280
|
}
|
|
131281
|
+
/**
|
|
131282
|
+
* 否决:以 `value: false` resolve 挂起的 request。
|
|
131283
|
+
* 哪些请求的「取消」算否决、哪些算中止,是宿主外壳的决定(UI-UX8 D14),
|
|
131284
|
+
* 本通道只提供入口:裸用本通道的宿主不调就维持原来的 cancelled 语义。
|
|
131285
|
+
*/
|
|
131286
|
+
decline(id) {
|
|
131287
|
+
if (this.#current?.session.request.id === id) this.#settle({
|
|
131288
|
+
id,
|
|
131289
|
+
value: false
|
|
131290
|
+
});
|
|
131291
|
+
}
|
|
131281
131292
|
/** react 层动作回传:submit 归形提交值,其余意图(cancel)按取消收尾 */
|
|
131282
131293
|
handleAction(event) {
|
|
131283
131294
|
const pending = this.#current;
|
|
@@ -131326,7 +131337,7 @@ function OpenUiSpecSurface({ spec, surfaceId, actions, onAction }) {
|
|
|
131326
131337
|
const [unavailable, setUnavailable] = useState(false);
|
|
131327
131338
|
useEffect(() => {
|
|
131328
131339
|
let cancelled = false;
|
|
131329
|
-
import("./openUiLibrary-
|
|
131340
|
+
import("./openUiLibrary-BWEBU9P-.js").then((loaded) => {
|
|
131330
131341
|
if (!cancelled) setModule(loaded);
|
|
131331
131342
|
}).catch(() => {
|
|
131332
131343
|
if (!cancelled) setUnavailable(true);
|
package/dist/ui-vue.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as UiBridge, b as RenderResultRequest, c as InteractionResponse, s as InteractionRequest } from "./types-C3V6lAeO-
|
|
1
|
+
import { S as UiBridge, b as RenderResultRequest, c as InteractionResponse, s as InteractionRequest } from "./types-C3V6lAeO-BUpcRLER.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 { a as applySuggestion, c as DEFAULT_SURFACE_FORM_TEXTS, i as renderMiniMarkdown, m as shapeInteractionValue, o as collectValues, r as renderMiniChart, u as interactionToFormModel } from "./miniChart-
|
|
1
|
+
import { a as applySuggestion, c as DEFAULT_SURFACE_FORM_TEXTS, i as renderMiniMarkdown, m as shapeInteractionValue, o as collectValues, r as renderMiniChart, u as interactionToFormModel } from "./miniChart-lauNtZu8.js";
|
|
2
2
|
import { defineComponent, h, reactive, ref } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region ../ui-vue/src/bridgeState.ts
|
|
@@ -157,7 +157,7 @@ const InteractionForm = defineComponent({
|
|
|
157
157
|
}
|
|
158
158
|
}, [
|
|
159
159
|
model.title ? h("div", { class: "webskill-form__title" }, model.title) : null,
|
|
160
|
-
model.message && (model.kind === "form" || model.kind === "authorize") ? h("p", { class: "webskill-form__message" }, model.message) : null,
|
|
160
|
+
model.message && (model.kind === "form" || model.kind === "authorize" || model.kind === "confirm") ? h("p", { class: "webskill-form__message" }, model.message) : null,
|
|
161
161
|
...model.controls.map((control) => h("div", { key: control.name }, [
|
|
162
162
|
renderControl(control, invalid.value.includes(control.name)),
|
|
163
163
|
renderSuggestion(control, () => {
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ot as UiSpecNode } from "./types-C3V6lAeO-
|
|
2
|
-
import { Xn as buildRenderResult } from "./index-
|
|
3
|
-
import { $ as UiActionDef, $t as qualifyFieldName, A as EvaluateFieldConditionOptions, At as buildA2uiCatalogDefinition, B as OpenUiRendererProps, Bt as evaluateFieldCondition, C as DEFAULT_INTERACTION_TEXTS, Ct as WEBSKILL_STYLES_CSS, D as DOCUMENT_COMPONENTS, Dt as a2uiComponentSchema, E as DESCRIBE_UI_PRESET_TOOL, Et as ZodRuntime, F as InteractionTexts, Ft as collectSpecActions, G as SPEC_TABLE_MIN_COLUMN_WIDTH, Gt as gaugePercent, H as PLANNED_INCREMENT, Ht as fromA2uiSurfaceAction, I as JsonRenderSpec, It as collectValues, J as SurfaceHostControlTexts, Jt as loadOpenUiPeers, K as SpecColumnMeta, Kt as interactionToFormModel, L as LoadedOpenUiPeers, Lt as createUiCatalogToolSource, M as FieldConditionResult, Mt as chartToTable, N as FormModel, Nt as collectFormScopes, O as DocumentComponentName, Ot as a2uiComponentShapes, P as InteractionSpecLabels, Pt as collectScopedValues, Q as UI_PRESET_NAMES, Qt as normalizeColumnWidths, R as MAX_CONDITION_DEPTH, Rt as defineUiCatalog, S as DEFAULT_CHART_FONT_SIZES, St as WEBSKILL_A2UI_CATALOG_ID, T as DEFAULT_SURFACE_HOST_CONTROL_TEXTS, Tt as WebFormBridge, U as RENDER_UI_TOOL, Ut as fromUiSurfaceActionDispatch, V as OpenUiRuntime, Vt as fromA2uiSpecAction, W as SPEC_TABLE_MIN_COLUMN_VAR, Wt as fromVercelToolResult, X as UI_CATALOG_PROMPT_BUDGET_BYTES, Xt as mountEchart, Y as UI_CATALOG_GROUPS, Yt as loadWebSkillLitCatalog, Z as UI_PRESETS, Zt as mountViewerComponents, _ as CHART_PALETTE, _n as uiCatalog, _t as VIEWER_PROPS_ATTR, a as A2UI_SURFACE_ACTION, an as resolveColumnWidths, at as UiFormScope, b as ColumnWidthsRejection, bt as ViewerComponentsHandle, c as A2uiCatalogDefinition, cn as resolveSurfaceHostControlTexts, ct as UiSpecDegradation, d as A2uiMessage, dn as toA2uiSurfaceAction, dt as UiSpecSanitization, en as renderBlocks, et as UiCatalog, f as A2uiSpecActionEvent, fn as toEchartsOption, ft as UiSpecValidation, g as CATALOG_SCHEMA_MAX, gn as toVercelToolInvocation, gt as VIEWER_FALLBACK_ATTR, h as CATALOG_PROMPT_MAX, hn as toUiSurfaceActionDispatch, ht as VIEWER_COMPONENT_ATTR, i as A2UI_SPEC_FORM_PATH, in as resolveChartFontSizes, it as UiComponentDef, j as FieldCondition, jt as chartSpecFromProps, k as EchartHandle, kt as applySuggestion, l as A2uiCatalogHandle, ln as shapeInteractionValue, lt as UiSpecDegradationCode, m as CATALOG_BUDGET_STAGE, mn as toOpenUiSpecLang, mt as VERCEL_INTERACTION_TOOL_NAME, n as A2UI_COMMON_TYPES, nn as renderMiniMarkdown, nt as UiCatalogPromptOptions, o as A2UI_VERSION, on as resolveInteractionTexts, ot as UiPreset, p as A2uiSpecMessageOptions, pn as toJsonRenderSpec, pt as UiSurfaceActionDispatch, q as SurfaceFormTexts, qt as interactionToUiSpec, r as A2UI_SPEC_ACTION, rn as renderRenderResult, rt as UiCatalogToolSourceOptions, s as A2uiCatalogComponent, sn as resolveSurfaceFormTexts, st as UiPresetName, t as A2UI_BASIC_CATALOG_ID, tn as renderMiniChart, tt as UiCatalogInput, u as A2uiComponentShape, un as toA2uiSpecMessages, ut as UiSpecIssue, v as ChartFontSizes, vn as uiPreset, vt as VercelToolInvocation, w as DEFAULT_SURFACE_FORM_TEXTS, wt as WEBSKILL_SURFACE_ACTION, x as ControlModel, xt as ViewerComponentsOptions, y as CollectedValues, yt as VercelUiBridge, z as NormalizedColumnWidths, zt as ensureStyles } from "./index-
|
|
1
|
+
import { Ot as UiSpecNode } from "./types-C3V6lAeO-BUpcRLER.js";
|
|
2
|
+
import { Xn as buildRenderResult } from "./index-DbVqg2V3.js";
|
|
3
|
+
import { $ as UiActionDef, $t as qualifyFieldName, A as EvaluateFieldConditionOptions, At as buildA2uiCatalogDefinition, B as OpenUiRendererProps, Bt as evaluateFieldCondition, C as DEFAULT_INTERACTION_TEXTS, Ct as WEBSKILL_STYLES_CSS, D as DOCUMENT_COMPONENTS, Dt as a2uiComponentSchema, E as DESCRIBE_UI_PRESET_TOOL, Et as ZodRuntime, F as InteractionTexts, Ft as collectSpecActions, G as SPEC_TABLE_MIN_COLUMN_WIDTH, Gt as gaugePercent, H as PLANNED_INCREMENT, Ht as fromA2uiSurfaceAction, I as JsonRenderSpec, It as collectValues, J as SurfaceHostControlTexts, Jt as loadOpenUiPeers, K as SpecColumnMeta, Kt as interactionToFormModel, L as LoadedOpenUiPeers, Lt as createUiCatalogToolSource, M as FieldConditionResult, Mt as chartToTable, N as FormModel, Nt as collectFormScopes, O as DocumentComponentName, Ot as a2uiComponentShapes, P as InteractionSpecLabels, Pt as collectScopedValues, Q as UI_PRESET_NAMES, Qt as normalizeColumnWidths, R as MAX_CONDITION_DEPTH, Rt as defineUiCatalog, S as DEFAULT_CHART_FONT_SIZES, St as WEBSKILL_A2UI_CATALOG_ID, T as DEFAULT_SURFACE_HOST_CONTROL_TEXTS, Tt as WebFormBridge, U as RENDER_UI_TOOL, Ut as fromUiSurfaceActionDispatch, V as OpenUiRuntime, Vt as fromA2uiSpecAction, W as SPEC_TABLE_MIN_COLUMN_VAR, Wt as fromVercelToolResult, X as UI_CATALOG_PROMPT_BUDGET_BYTES, Xt as mountEchart, Y as UI_CATALOG_GROUPS, Yt as loadWebSkillLitCatalog, Z as UI_PRESETS, Zt as mountViewerComponents, _ as CHART_PALETTE, _n as uiCatalog, _t as VIEWER_PROPS_ATTR, a as A2UI_SURFACE_ACTION, an as resolveColumnWidths, at as UiFormScope, b as ColumnWidthsRejection, bt as ViewerComponentsHandle, c as A2uiCatalogDefinition, cn as resolveSurfaceHostControlTexts, ct as UiSpecDegradation, d as A2uiMessage, dn as toA2uiSurfaceAction, dt as UiSpecSanitization, en as renderBlocks, et as UiCatalog, f as A2uiSpecActionEvent, fn as toEchartsOption, ft as UiSpecValidation, g as CATALOG_SCHEMA_MAX, gn as toVercelToolInvocation, gt as VIEWER_FALLBACK_ATTR, h as CATALOG_PROMPT_MAX, hn as toUiSurfaceActionDispatch, ht as VIEWER_COMPONENT_ATTR, i as A2UI_SPEC_FORM_PATH, in as resolveChartFontSizes, it as UiComponentDef, j as FieldCondition, jt as chartSpecFromProps, k as EchartHandle, kt as applySuggestion, l as A2uiCatalogHandle, ln as shapeInteractionValue, lt as UiSpecDegradationCode, m as CATALOG_BUDGET_STAGE, mn as toOpenUiSpecLang, mt as VERCEL_INTERACTION_TOOL_NAME, n as A2UI_COMMON_TYPES, nn as renderMiniMarkdown, nt as UiCatalogPromptOptions, o as A2UI_VERSION, on as resolveInteractionTexts, ot as UiPreset, p as A2uiSpecMessageOptions, pn as toJsonRenderSpec, pt as UiSurfaceActionDispatch, q as SurfaceFormTexts, qt as interactionToUiSpec, r as A2UI_SPEC_ACTION, rn as renderRenderResult, rt as UiCatalogToolSourceOptions, s as A2uiCatalogComponent, sn as resolveSurfaceFormTexts, st as UiPresetName, t as A2UI_BASIC_CATALOG_ID, tn as renderMiniChart, tt as UiCatalogInput, u as A2uiComponentShape, un as toA2uiSpecMessages, ut as UiSpecIssue, v as ChartFontSizes, vn as uiPreset, vt as VercelToolInvocation, w as DEFAULT_SURFACE_FORM_TEXTS, wt as WEBSKILL_SURFACE_ACTION, x as ControlModel, xt as ViewerComponentsOptions, y as CollectedValues, yt as VercelUiBridge, z as NormalizedColumnWidths, zt as ensureStyles } from "./index-DeXgdtHa.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, CATALOG_BUDGET_STAGE, CATALOG_PROMPT_MAX, CATALOG_SCHEMA_MAX, CHART_PALETTE, type ChartFontSizes, type CollectedValues, type ColumnWidthsRejection, type ControlModel, DEFAULT_CHART_FONT_SIZES, DEFAULT_INTERACTION_TEXTS, DEFAULT_SURFACE_FORM_TEXTS, DEFAULT_SURFACE_HOST_CONTROL_TEXTS, DESCRIBE_UI_PRESET_TOOL, DOCUMENT_COMPONENTS, type DocumentComponentName, 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, PLANNED_INCREMENT, RENDER_UI_TOOL, SPEC_TABLE_MIN_COLUMN_VAR, SPEC_TABLE_MIN_COLUMN_WIDTH, type SpecColumnMeta, type SurfaceFormTexts, type SurfaceHostControlTexts, 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 UiSpecDegradationCode, type UiSpecIssue, type UiSpecNode, type UiSpecSanitization, type UiSpecValidation, type UiSurfaceActionDispatch, VERCEL_INTERACTION_TOOL_NAME, VIEWER_COMPONENT_ATTR, VIEWER_FALLBACK_ATTR, VIEWER_PROPS_ATTR, type VercelToolInvocation, VercelUiBridge, type ViewerComponentsHandle, type ViewerComponentsOptions, 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, gaugePercent, interactionToFormModel, interactionToUiSpec, loadOpenUiPeers, loadWebSkillLitCatalog, mountEchart, mountViewerComponents, normalizeColumnWidths, qualifyFieldName, renderBlocks, renderMiniChart, renderMiniMarkdown, renderRenderResult, resolveChartFontSizes, resolveColumnWidths, resolveInteractionTexts, resolveSurfaceFormTexts, resolveSurfaceHostControlTexts, shapeInteractionValue, toA2uiSpecMessages, toA2uiSurfaceAction, toEchartsOption, toJsonRenderSpec, toOpenUiSpecLang, toUiSurfaceActionDispatch, toVercelToolInvocation, uiCatalog, uiPreset };
|
package/dist/ui.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as WebSkillError } from "./errors-BDZNpC13.js";
|
|
2
2
|
import { t as buildRenderResult } from "./renderResult-D9Q-Vu2x.js";
|
|
3
|
-
import { a as applySuggestion, c as DEFAULT_SURFACE_FORM_TEXTS, d as resolveInteractionTexts, f as resolveSurfaceFormTexts, i as renderMiniMarkdown, l as DEFAULT_SURFACE_HOST_CONTROL_TEXTS, m as shapeInteractionValue, n as chartToTable, o as collectValues, p as resolveSurfaceHostControlTexts, r as renderMiniChart, s as DEFAULT_INTERACTION_TEXTS, t as CHART_PALETTE, u as interactionToFormModel } from "./miniChart-
|
|
4
|
-
import { C as chartSpecFromProps, E as toEchartsOption, S as DEFAULT_CHART_FONT_SIZES, T as resolveChartFontSizes, _ as CATALOG_BUDGET_STAGE, a as SPEC_TABLE_MIN_COLUMN_WIDTH, b as PLANNED_INCREMENT, c as MAX_CONDITION_DEPTH, d as collectScopedValues, f as qualifyFieldName, g as defineUiCatalog, h as uiCatalog, i as SPEC_TABLE_MIN_COLUMN_VAR, l as evaluateFieldCondition, m as UI_CATALOG_PROMPT_BUDGET_BYTES, n as interactionToUiSpec, o as normalizeColumnWidths, p as UI_CATALOG_GROUPS, r as toJsonRenderSpec, s as resolveColumnWidths, t as toOpenUiSpecLang, u as collectFormScopes, v as CATALOG_PROMPT_MAX, w as mountEchart, x as gaugePercent, y as CATALOG_SCHEMA_MAX } from "./openUiSpecLang-
|
|
3
|
+
import { a as applySuggestion, c as DEFAULT_SURFACE_FORM_TEXTS, d as resolveInteractionTexts, f as resolveSurfaceFormTexts, i as renderMiniMarkdown, l as DEFAULT_SURFACE_HOST_CONTROL_TEXTS, m as shapeInteractionValue, n as chartToTable, o as collectValues, p as resolveSurfaceHostControlTexts, r as renderMiniChart, s as DEFAULT_INTERACTION_TEXTS, t as CHART_PALETTE, u as interactionToFormModel } from "./miniChart-lauNtZu8.js";
|
|
4
|
+
import { C as chartSpecFromProps, E as toEchartsOption, S as DEFAULT_CHART_FONT_SIZES, T as resolveChartFontSizes, _ as CATALOG_BUDGET_STAGE, a as SPEC_TABLE_MIN_COLUMN_WIDTH, b as PLANNED_INCREMENT, c as MAX_CONDITION_DEPTH, d as collectScopedValues, f as qualifyFieldName, g as defineUiCatalog, h as uiCatalog, i as SPEC_TABLE_MIN_COLUMN_VAR, l as evaluateFieldCondition, m as UI_CATALOG_PROMPT_BUDGET_BYTES, n as interactionToUiSpec, o as normalizeColumnWidths, p as UI_CATALOG_GROUPS, r as toJsonRenderSpec, s as resolveColumnWidths, t as toOpenUiSpecLang, u as collectFormScopes, v as CATALOG_PROMPT_MAX, w as mountEchart, x as gaugePercent, y as CATALOG_SCHEMA_MAX } from "./openUiSpecLang-BIK6CWlW.js";
|
|
5
5
|
|
|
6
6
|
//#region ../ui/src/web/resultRenderer.ts
|
|
7
7
|
/** RenderBlock → DOM(markdown/json/table/image/file/chart 六种) */
|
|
@@ -371,7 +371,7 @@ var WebFormBridge = class {
|
|
|
371
371
|
title.textContent = model.title;
|
|
372
372
|
form.appendChild(title);
|
|
373
373
|
}
|
|
374
|
-
if (model.message && model.kind !== "
|
|
374
|
+
if (model.message && model.kind !== "ask" && model.kind !== "select") {
|
|
375
375
|
const message = doc.createElement("p");
|
|
376
376
|
message.className = "webskill-form__message";
|
|
377
377
|
message.textContent = model.message;
|
|
@@ -1224,7 +1224,7 @@ function fromA2uiSpecAction(event) {
|
|
|
1224
1224
|
*/
|
|
1225
1225
|
async function loadWebSkillLitCatalog() {
|
|
1226
1226
|
try {
|
|
1227
|
-
const { webskillLitCatalog } = await import("./webskillLitCatalog-
|
|
1227
|
+
const { webskillLitCatalog } = await import("./webskillLitCatalog-poL1qhBp.js");
|
|
1228
1228
|
return webskillLitCatalog();
|
|
1229
1229
|
} catch (cause) {
|
|
1230
1230
|
throw new WebSkillError("UI_UNAVAILABLE", "The WebSkill A2UI catalog is unavailable; install @a2ui/lit, @a2ui/web_core and lit to render catalog surfaces with A2UI", cause);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as DEFAULT_SURFACE_FORM_TEXTS, i as renderMiniMarkdown } from "./miniChart-
|
|
2
|
-
import { C as chartSpecFromProps, h as uiCatalog, w as mountEchart } from "./openUiSpecLang-
|
|
1
|
+
import { c as DEFAULT_SURFACE_FORM_TEXTS, i as renderMiniMarkdown } from "./miniChart-lauNtZu8.js";
|
|
2
|
+
import { C as chartSpecFromProps, h as uiCatalog, w as mountEchart } from "./openUiSpecLang-BIK6CWlW.js";
|
|
3
3
|
import { WEBSKILL_A2UI_CATALOG_ID, a2uiComponentShapes, t as A2UI_CHILDREN_PROP } from "./ui.js";
|
|
4
4
|
import { A2uiController, A2uiLitElement } from "@a2ui/lit/v0_9";
|
|
5
5
|
import { Catalog } from "@a2ui/web_core/v0_9";
|