@webskill/sdk 0.0.6 → 0.1.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.
@@ -1,4 +1,5 @@
1
- import { F as parseBridgeRequest, G as SKILL_PACK_FILE, H as SKILL_MANIFEST_FILE, J as WebSkillError, N as networkUrlHost, P as normalizeToolContent, V as SKILLS_LOCKFILE, X as buildManifest, a as CapabilityApproval, at as parseSkillMarkdown, c as FsMemoryStore, dt as verifyManifest, j as isNetworkAllowed, lt as resolveInsideRoot, nt as isValidSkillName, ot as parseSkillPackManifest, s as FsArtifactStore, tt as exportSkills, ut as validateSkills, w as bridgeError } from "./dist-nXiR40hi.js";
1
+ import { D as verifyManifest, E as validateSkills, S as parseSkillPackManifest, T as resolveInsideRoot, _ as exportSkills, f as buildManifest, i as SKILL_MANIFEST_FILE, r as SKILLS_LOCKFILE, s as SKILL_PACK_FILE, u as WebSkillError, v as isValidSkillName, x as parseSkillMarkdown } from "./memoryArtifactStore-C9lFVqPF-U8nXvqL9.js";
2
+ import { A as normalizeToolContent, D as isNetworkAllowed, a as CapabilityApproval, b as bridgeError, c as FsMemoryStore, j as parseBridgeRequest, k as networkUrlHost, s as FsArtifactStore } from "./dist-CiYRkm71.js";
2
3
  import { unzipSync, zipSync } from "fflate";
3
4
  import { existsSync, promises, readFileSync } from "node:fs";
4
5
  import path from "node:path";
@@ -1126,6 +1127,7 @@ const asInstallFailed = (e) => e instanceof WebSkillError && e.code === "INSTALL
1126
1127
  /**
1127
1128
  * 技能管理门面:统一安装管线(staging → 解析 name → 校验 → 拷贝 → manifest → lockfile),
1128
1129
  * 任何失败清理现场抛 INSTALL_FAILED。
1130
+ * @stable
1129
1131
  */
1130
1132
  var SkillManager = class {
1131
1133
  #managedRoot;
@@ -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
- /** ChartSpec → SVG(bar 等宽柱 + 值标签;line 折线 + 点;pie 扇形 + 图例;空数据容错) */
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
- /** OpenUI ActionEvent → InteractionResponse(formState 优先,取消单独分支) */
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
- /** A2UI client→server action 事件 → InteractionResponse */
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;
@@ -1,5 +1,6 @@
1
- import { Et as UiBridge, L as LlmClient, Xt as FileSystemProvider, an as SkillCatalogEntry, dn as SkillManifest, kt as WebSkillRuntime, pt as RuntimeRun, sn as SkillDocument, z as LlmMessage } from "./index-DCifjtJx.js";
2
- import { d as SkillManager } from "./index-vi7GPemR.js";
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-DCklnS0h.js";
2
+ import { U as RuntimeRun, it as WebSkillRuntime } from "./index-S8uza3ld.js";
3
+ import { d as SkillManager } from "./index-DuodMfQw.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';
@@ -1,5 +1,5 @@
1
- import { J as WebSkillError, lt as resolveInsideRoot, nt as isValidSkillName, ut as validateSkills } from "./dist-nXiR40hi.js";
2
- import { i as NodeFS } from "./dist-33_zuOCm.js";
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-DfKKj86A.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 FsMemoryStore, Et as UiBridge, M as InteractionResponse, S as FsArtifactStore, Xt as FileSystemProvider, Yt as FileStat, Z as NetworkPolicy, Zt as JsonSchema, _t as ScriptExecutor, c as ApprovalScope, cn as SkillInstallSource, d as BridgeCapabilities, dn as SkillManifest, gn as SkillsLockfile, gt as ScriptExecutionContext, ht as SchemaInferer, j as InteractionRequest, ot as RenderResultRequest, vn as VerifyResult, xt as ToolResult, yt as ToolDefinition } from "./index-DCifjtJx.js";
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-DCklnS0h.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-S8uza3ld.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;