@webskill/sdk 0.0.6 → 0.1.1
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/README.md +180 -46
- package/dist/browser.d.ts +5 -1
- package/dist/browser.js +9 -2
- package/dist/{dist-33_zuOCm.js → dist-Cc3Mqi3_.js} +5 -1
- package/dist/{dist-nXiR40hi.js → dist-D5fsiETF.js} +36 -752
- package/dist/{dist-BQruQ9Hv.js → dist-Dv4a1Jkm.js} +15 -3
- package/dist/governance.d.ts +3 -2
- package/dist/governance.js +2 -2
- package/dist/{index-vi7GPemR.d.ts → index-Dc4X2N54.d.ts} +3 -1
- package/dist/{index-DCifjtJx.d.ts → index-oG5Nzgb9.d.ts} +19 -595
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/mcp.d.ts +3 -1
- package/dist/mcp.js +3 -1
- package/dist/memoryArtifactStore-C9lFVqPF-U8nXvqL9.js +637 -0
- package/dist/node.d.ts +4 -3
- package/dist/node.js +3 -2
- package/dist/testing-pn3NhXSV.js +117 -0
- package/dist/testing.d.ts +73 -0
- package/dist/testing.js +4 -0
- package/dist/types-CgNC-oQu-Dq_A1yA-.d.ts +539 -0
- package/dist/ui-react.d.ts +1 -1
- package/dist/ui-react.js +1 -1
- package/dist/ui-vue.d.ts +1 -1
- package/dist/ui-vue.js +1 -1
- package/dist/ui.d.ts +17 -4
- package/dist/ui.js +2 -2
- package/package.json +5 -1
|
@@ -362,7 +362,10 @@ function renderPie(chart, svg, doc) {
|
|
|
362
362
|
svg.appendChild(text$1(doc, 202, ly, `${label} (${fmt(value)})`));
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
|
-
/**
|
|
365
|
+
/**
|
|
366
|
+
* ChartSpec → SVG(bar 等宽柱 + 值标签;line 折线 + 点;pie 扇形 + 图例;空数据容错)
|
|
367
|
+
* @stable
|
|
368
|
+
*/
|
|
366
369
|
function renderMiniChart(chart, doc) {
|
|
367
370
|
const svg = el(doc, "svg", {
|
|
368
371
|
viewBox: `0 0 ${WIDTH} ${HEIGHT}`,
|
|
@@ -727,6 +730,7 @@ function fieldStatements(fields) {
|
|
|
727
730
|
}
|
|
728
731
|
});
|
|
729
732
|
}
|
|
733
|
+
/** @experimental */
|
|
730
734
|
function toOpenUiLang(request) {
|
|
731
735
|
const lines = [];
|
|
732
736
|
let fields = [];
|
|
@@ -791,7 +795,10 @@ function toOpenUiLang(request) {
|
|
|
791
795
|
].join(", ")}])`);
|
|
792
796
|
return lines.join("\n");
|
|
793
797
|
}
|
|
794
|
-
/**
|
|
798
|
+
/**
|
|
799
|
+
* OpenUI ActionEvent → InteractionResponse(formState 优先,取消单独分支)
|
|
800
|
+
* @experimental
|
|
801
|
+
*/
|
|
795
802
|
function fromOpenUiAction(action) {
|
|
796
803
|
const a = action ?? {};
|
|
797
804
|
const id = String(a.params?.["id"] ?? "");
|
|
@@ -836,6 +843,7 @@ const text = (id, content, variant) => ({
|
|
|
836
843
|
text: content,
|
|
837
844
|
...variant ? { variant } : {}
|
|
838
845
|
});
|
|
846
|
+
/** @experimental */
|
|
839
847
|
function toA2uiMessages(request) {
|
|
840
848
|
const surfaceId = `webskill-${request.id}`;
|
|
841
849
|
const components = [];
|
|
@@ -961,7 +969,10 @@ function toA2uiMessages(request) {
|
|
|
961
969
|
});
|
|
962
970
|
return messages;
|
|
963
971
|
}
|
|
964
|
-
/**
|
|
972
|
+
/**
|
|
973
|
+
* A2UI client→server action 事件 → InteractionResponse
|
|
974
|
+
* @experimental
|
|
975
|
+
*/
|
|
965
976
|
function fromA2uiAction(event) {
|
|
966
977
|
const e = event ?? {};
|
|
967
978
|
const id = String(e.context?.["requestId"] ?? "");
|
|
@@ -15573,6 +15584,7 @@ const basicCatalog = new Catalog("https://a2ui.org/specification/v0_9/catalogs/b
|
|
|
15573
15584
|
*
|
|
15574
15585
|
* 版本对齐:渲染器 @a2ui/lit@0.10.x 经 v0_9 入口同时接受 v0.9 / v0.9.1 消息
|
|
15575
15586
|
* (schema 枚举 ['v0.9','v0.9.1']),与 7A v0.9.1 转换产物直接兼容。
|
|
15587
|
+
* @experimental
|
|
15576
15588
|
*/
|
|
15577
15589
|
var LitRendererBridge = class {
|
|
15578
15590
|
#mount;
|
package/dist/governance.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { L as SkillManifest, N as SkillDocument, S as FileSystemProvider, c as LlmClient, j as SkillCatalogEntry, u as LlmMessage, v as UiBridge } from "./types-CgNC-oQu-Dq_A1yA-.js";
|
|
2
|
+
import { U as RuntimeRun, it as WebSkillRuntime } from "./index-oG5Nzgb9.js";
|
|
3
|
+
import { d as SkillManager } from "./index-Dc4X2N54.js";
|
|
3
4
|
//#region ../governance/dist/index.d.ts
|
|
4
5
|
//#region src/types.d.ts
|
|
5
6
|
type CandidateStatus = 'draft' | 'pending-review' | 'approved' | 'published' | 'rejected';
|
package/dist/governance.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as NodeFS } from "./dist-
|
|
1
|
+
import { E as validateSkills, T as resolveInsideRoot, u as WebSkillError, v as isValidSkillName } from "./memoryArtifactStore-C9lFVqPF-U8nXvqL9.js";
|
|
2
|
+
import { i as NodeFS } from "./dist-Cc3Mqi3_.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { mkdtemp } from "node:fs/promises";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as JsonSchema, H as SkillsLockfile, L as SkillManifest, P as SkillInstallSource, S as FileSystemProvider, W as VerifyResult, _ as RenderResultRequest, o as InteractionRequest, s as InteractionResponse, v as UiBridge, x as FileStat } from "./types-CgNC-oQu-Dq_A1yA-.js";
|
|
2
|
+
import { G as SchemaInferer, K as ScriptExecutionContext, Y as ToolDefinition, Z as ToolResult, c as ApprovalScope, k as NetworkPolicy, l as BridgeCapabilities, q as ScriptExecutor, v as FsArtifactStore, y as FsMemoryStore } from "./index-oG5Nzgb9.js";
|
|
2
3
|
import { Readable, Writable } from "node:stream";
|
|
3
4
|
//#region ../node/dist/index.d.ts
|
|
4
5
|
//#region src/fs/nodeFs.d.ts
|
|
@@ -134,6 +135,7 @@ declare class CliUiBridge implements UiBridge {
|
|
|
134
135
|
/**
|
|
135
136
|
* 技能管理门面:统一安装管线(staging → 解析 name → 校验 → 拷贝 → manifest → lockfile),
|
|
136
137
|
* 任何失败清理现场抛 INSTALL_FAILED。
|
|
138
|
+
* @stable
|
|
137
139
|
*/
|
|
138
140
|
declare class SkillManager {
|
|
139
141
|
#private;
|