@webskill/sdk 0.1.3 → 0.1.5
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 +5 -2
- package/dist/browser.d.ts +8 -4
- package/dist/browser.js +69 -39
- package/dist/{dist-DxGyAznR.js → dist-CfBOjJ4p.js} +46 -3
- package/dist/{dist-DZobLFh6.js → dist-DuGN5x0v.js} +123 -20
- package/dist/{dist-Cm_j6Jol.js → dist-LIFS3ZjI.js} +204 -74
- package/dist/{dist-DS1sfgHa.js → dist-fZFZaf43.js} +145 -7
- package/dist/governance.d.ts +13 -4
- package/dist/governance.js +35 -5
- package/dist/{index-CPuwsnmB.d.ts → index-Bun1aEf4.d.ts} +20 -3
- package/dist/{index-CqMuvcb2.d.ts → index-COuOu6gw.d.ts} +19 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +9 -3
- package/dist/node.d.ts +3 -3
- package/dist/node.js +3 -3
- package/dist/sandboxWorkerEntry.d.ts +1 -0
- package/dist/sandboxWorkerEntry.js +231 -0
- package/dist/{testing-CbM6rJ-E.js → testing-BmR48Pn1.js} +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/dist/{types-CgNC-oQu-Dq_A1yA-.d.ts → types-CgNC-oQu-DEcIBJKG.d.ts} +39 -3
- 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 +2 -2
- package/dist/ui.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { register } from "node:module";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { pathToFileURL } from "node:url";
|
|
5
|
+
import { isMainThread, parentPort, workerData } from "node:worker_threads";
|
|
6
|
+
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
7
|
+
|
|
8
|
+
//#region ../node/dist/executor/sandboxWorkerEntry.js
|
|
9
|
+
/**
|
|
10
|
+
* D1 沙箱 Worker 入口(loader 文件形式,非内嵌字符串)。
|
|
11
|
+
* 主线程经 workerData 传入任务;脚本源码路径直接 import(.ts 依赖
|
|
12
|
+
* Node>=22.18 原生 type stripping,Worker 内同样生效)。
|
|
13
|
+
* 能力桥 RPC(readReference/writeArtifact/confirm)经 parentPort 消息。
|
|
14
|
+
*
|
|
15
|
+
* 网络与模块管控:
|
|
16
|
+
* - patch globalThis.fetch / globalThis.WebSocket(策略判定函数源码经 workerData
|
|
17
|
+
* 注入,匹配逻辑单一来源在 runtime/sandbox/networkPolicy.ts——Worker 线程不走
|
|
18
|
+
* vitest 别名、也不应反向依赖宿主打包产物,故注入而非 import)。
|
|
19
|
+
* - node: 内置模块 allowlist(module.register resolve 钩子):默认全禁
|
|
20
|
+
* (含 fs/child_process/net 等),执行器配置可显式放行指定模块。
|
|
21
|
+
* 能力面收敛,非安全边界(仍有绕过手段,禁止假定其可隔离不可信脚本)。
|
|
22
|
+
* - 网络阻断时 postMessage {type:'network-blocked', host} → 宿主记 run.warning(URL 脱敏只记 host)。
|
|
23
|
+
*/
|
|
24
|
+
const port = parentPort;
|
|
25
|
+
if (!port || isMainThread) throw new Error("sandboxWorkerEntry must run inside a worker thread");
|
|
26
|
+
const pending = /* @__PURE__ */ new Map();
|
|
27
|
+
let bridgeSeq = 0;
|
|
28
|
+
function callCapability(kind, payload) {
|
|
29
|
+
const request = {
|
|
30
|
+
kind,
|
|
31
|
+
id: `br-${++bridgeSeq}`,
|
|
32
|
+
...payload
|
|
33
|
+
};
|
|
34
|
+
return new Promise((resolve, reject) => {
|
|
35
|
+
pending.set(request.id, {
|
|
36
|
+
resolve,
|
|
37
|
+
reject
|
|
38
|
+
});
|
|
39
|
+
port.postMessage({
|
|
40
|
+
type: "bridge",
|
|
41
|
+
request
|
|
42
|
+
});
|
|
43
|
+
}).then((response) => {
|
|
44
|
+
const r = response;
|
|
45
|
+
if (!r.ok) {
|
|
46
|
+
const err = new Error(r.error?.message ?? "capability call failed");
|
|
47
|
+
err.code = r.error?.code ?? "TOOL_EXECUTION_FAILED";
|
|
48
|
+
throw err;
|
|
49
|
+
}
|
|
50
|
+
return r.value;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
async function loadModule(scriptPath, scriptSource) {
|
|
54
|
+
if (scriptPath.endsWith(".js") && scriptSource !== void 0) return await import(`data:text/javascript;charset=utf-8,${encodeURIComponent(`${scriptSource}\n//# ${Date.now()}`)}`);
|
|
55
|
+
if (scriptPath.endsWith(".ts") && scriptSource !== void 0) {
|
|
56
|
+
const dir = await mkdtemp(path.join(tmpdir(), "webskill-ts-"));
|
|
57
|
+
try {
|
|
58
|
+
const file = path.join(dir, "script.ts");
|
|
59
|
+
await writeFile(file, scriptSource);
|
|
60
|
+
return await import(`${pathToFileURL(file).href}?t=${Date.now()}`);
|
|
61
|
+
} finally {
|
|
62
|
+
await rm(dir, {
|
|
63
|
+
recursive: true,
|
|
64
|
+
force: true
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return await import(`${pathToFileURL(scriptPath).href}?t=${Date.now()}`);
|
|
69
|
+
}
|
|
70
|
+
function post(message) {
|
|
71
|
+
port.postMessage(message);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* 裸模块 allowlist 钩子(data: URL 注册):
|
|
75
|
+
* 默认禁止一切 node: 内置模块(含 fs/child_process/process/vm/module/worker_threads 等),
|
|
76
|
+
* 仅 ALLOWED 清单(执行器配置注入)显式放行。网络裸模块语义合并统一:
|
|
77
|
+
* allowlist 为空即全禁(含 node:net/http/https/dgram/tls)。
|
|
78
|
+
*/
|
|
79
|
+
const MODULE_HOOK_SOURCE = `
|
|
80
|
+
var ALLOWED = new Set(%ALLOWED_MODULES%);
|
|
81
|
+
var TOP_BUILTINS = new Set(['assert','async_hooks','buffer','child_process','cluster','console','constants','crypto','dgram','diagnostics_channel','dns','domain','events','fs','http','http2','https','inspector','module','net','os','path','perf_hooks','process','punycode','querystring','readline','repl','sea','sqlite','stream','string_decoder','sys','test','timers','tls','trace_events','tty','url','util','v8','vm','wasi','worker_threads','zlib']);
|
|
82
|
+
function isAllowed(bare, name, top) {
|
|
83
|
+
return ALLOWED.has(bare) || ALLOWED.has(name) || ALLOWED.has('node:' + name) || ALLOWED.has(top) || ALLOWED.has('node:' + top);
|
|
84
|
+
}
|
|
85
|
+
export async function resolve(specifier, context, nextResolve) {
|
|
86
|
+
var bare = specifier.split('?')[0];
|
|
87
|
+
var name = bare.indexOf('node:') === 0 ? bare.slice(5) : bare;
|
|
88
|
+
var top = name.split('/')[0];
|
|
89
|
+
var isBuiltin = bare.indexOf('node:') === 0 || TOP_BUILTINS.has(top);
|
|
90
|
+
if (isBuiltin && !isAllowed(bare, name, top)) {
|
|
91
|
+
var err = new Error('Builtin module import blocked by sandbox module policy: ' + bare);
|
|
92
|
+
err.code = 'TOOL_UNSUPPORTED';
|
|
93
|
+
throw err;
|
|
94
|
+
}
|
|
95
|
+
return nextResolve(specifier, context);
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
function blockedError(host) {
|
|
99
|
+
const err = /* @__PURE__ */ new Error(`Network request blocked by sandbox network policy: ${host}`);
|
|
100
|
+
err.code = "NETWORK_BLOCKED";
|
|
101
|
+
return err;
|
|
102
|
+
}
|
|
103
|
+
/** patch 全局 fetch / WebSocket;注册裸网络模块 denylist(allow-all 之外均启用) */
|
|
104
|
+
function setupNetworkGuards(task) {
|
|
105
|
+
const policy = task.networkPolicy ?? "deny-all";
|
|
106
|
+
if (!task.networkPolicyLib) return;
|
|
107
|
+
const { isNetworkAllowed, networkUrlHost } = new Function(`${task.networkPolicyLib}\nreturn { isNetworkAllowed: isNetworkAllowed, networkUrlHost: networkUrlHost };`)();
|
|
108
|
+
const gate = (rawUrl) => {
|
|
109
|
+
const url = String(rawUrl);
|
|
110
|
+
if (isNetworkAllowed(policy, url)) return null;
|
|
111
|
+
const host = networkUrlHost(url);
|
|
112
|
+
post({
|
|
113
|
+
type: "network-blocked",
|
|
114
|
+
host
|
|
115
|
+
});
|
|
116
|
+
return blockedError(host);
|
|
117
|
+
};
|
|
118
|
+
const originalFetch = globalThis["fetch"];
|
|
119
|
+
if (typeof originalFetch === "function") globalThis["fetch"] = (input, init) => {
|
|
120
|
+
const raw = typeof input === "string" ? input : input instanceof URL ? input.href : input?.url ?? String(input);
|
|
121
|
+
const blocked = gate(raw);
|
|
122
|
+
if (blocked) return Promise.reject(blocked);
|
|
123
|
+
return originalFetch(input, init);
|
|
124
|
+
};
|
|
125
|
+
const OriginalWebSocket = globalThis["WebSocket"];
|
|
126
|
+
if (typeof OriginalWebSocket === "function") globalThis["WebSocket"] = class extends OriginalWebSocket {
|
|
127
|
+
constructor(url, protocols) {
|
|
128
|
+
const blocked = gate(String(url));
|
|
129
|
+
if (blocked) throw blocked;
|
|
130
|
+
super(url, protocols);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
register(`data:text/javascript,${encodeURIComponent(MODULE_HOOK_SOURCE.replace("%ALLOWED_MODULES%", JSON.stringify(task.allowedModules ?? [])))}`);
|
|
134
|
+
}
|
|
135
|
+
async function main() {
|
|
136
|
+
const task = workerData;
|
|
137
|
+
setupNetworkGuards(task);
|
|
138
|
+
port.on("message", (msg) => {
|
|
139
|
+
if (msg?.type === "bridge-response" && msg.response?.id) {
|
|
140
|
+
const entry = pending.get(msg.response.id);
|
|
141
|
+
if (entry) {
|
|
142
|
+
pending.delete(msg.response.id);
|
|
143
|
+
entry.resolve(msg.response);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
if (task.mode === "load") {
|
|
148
|
+
try {
|
|
149
|
+
const mod = await loadModule(task.scriptPath, task.scriptSource);
|
|
150
|
+
post({
|
|
151
|
+
type: "load-result",
|
|
152
|
+
ok: true,
|
|
153
|
+
definition: {
|
|
154
|
+
description: typeof mod["description"] === "string" ? mod["description"] : void 0,
|
|
155
|
+
inputSchema: mod["inputSchema"] !== void 0 ? mod["inputSchema"] : void 0,
|
|
156
|
+
hasRun: typeof mod["run"] === "function"
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
} catch (e) {
|
|
160
|
+
post({
|
|
161
|
+
type: "load-result",
|
|
162
|
+
ok: false,
|
|
163
|
+
error: {
|
|
164
|
+
code: e?.code ?? "TOOL_EXECUTION_FAILED",
|
|
165
|
+
message: String(e?.message ?? e)
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const stdout = [];
|
|
172
|
+
const stderr = [];
|
|
173
|
+
const originals = {
|
|
174
|
+
log: console.log,
|
|
175
|
+
info: console.info,
|
|
176
|
+
debug: console.debug,
|
|
177
|
+
warn: console.warn,
|
|
178
|
+
error: console.error
|
|
179
|
+
};
|
|
180
|
+
console.log = console.info = console.debug = (...args) => stdout.push(args.map(String).join(" "));
|
|
181
|
+
console.warn = console.error = (...args) => stderr.push(args.map(String).join(" "));
|
|
182
|
+
try {
|
|
183
|
+
const mod = await loadModule(task.scriptPath, task.scriptSource);
|
|
184
|
+
if (typeof mod["run"] !== "function") throw new Error("Script does not export a run function");
|
|
185
|
+
const context = {
|
|
186
|
+
skillName: task.skillName ?? "",
|
|
187
|
+
runId: task.runId ?? "",
|
|
188
|
+
readReference: (path) => callCapability("readReference", { path }),
|
|
189
|
+
writeArtifact: (path, content, options) => callCapability("writeArtifact", {
|
|
190
|
+
path,
|
|
191
|
+
content: typeof content === "string" ? content : Array.from(content ?? []),
|
|
192
|
+
mimeType: options?.mimeType
|
|
193
|
+
}),
|
|
194
|
+
confirm: (message) => callCapability("confirm", { message })
|
|
195
|
+
};
|
|
196
|
+
const runFn = mod["run"];
|
|
197
|
+
const value = await runFn(task.args ?? {}, context);
|
|
198
|
+
post({
|
|
199
|
+
type: "execute-result",
|
|
200
|
+
ok: true,
|
|
201
|
+
value: value === void 0 ? null : value,
|
|
202
|
+
stdout,
|
|
203
|
+
stderr
|
|
204
|
+
});
|
|
205
|
+
} catch (e) {
|
|
206
|
+
const err = e;
|
|
207
|
+
post({
|
|
208
|
+
type: "execute-result",
|
|
209
|
+
ok: false,
|
|
210
|
+
error: {
|
|
211
|
+
code: err?.code ?? "TOOL_EXECUTION_FAILED",
|
|
212
|
+
message: String(err?.message ?? e)
|
|
213
|
+
},
|
|
214
|
+
stdout,
|
|
215
|
+
stderr
|
|
216
|
+
});
|
|
217
|
+
} finally {
|
|
218
|
+
console.log = originals.log;
|
|
219
|
+
console.info = originals.info;
|
|
220
|
+
console.debug = originals.debug;
|
|
221
|
+
console.warn = originals.warn;
|
|
222
|
+
console.error = originals.error;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
main().then(() => process.exit(0), (e) => {
|
|
226
|
+
console.error(e);
|
|
227
|
+
process.exit(1);
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
//#endregion
|
|
231
|
+
export { };
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as LlmClient, d as LlmResponse, f as LlmStreamEvent, h as MemoryStore, l as LlmCompleteInput, n as ArtifactStore, o as InteractionRequest, s as InteractionResponse, t as Artifact, v as UiBridge } from "./types-CgNC-oQu-
|
|
1
|
+
import { c as LlmClient, d as LlmResponse, f as LlmStreamEvent, h as MemoryStore, l as LlmCompleteInput, n as ArtifactStore, o as InteractionRequest, s as InteractionResponse, t as Artifact, v as UiBridge } from "./types-CgNC-oQu-DEcIBJKG.js";
|
|
2
2
|
//#region ../runtime/dist/testing.d.ts
|
|
3
3
|
//#region src/llm/mockLlmClient.d.ts
|
|
4
4
|
type MockLlmHandler = (input: LlmCompleteInput) => LlmResponse | Promise<LlmResponse>;
|
package/dist/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { t as MemoryArtifactStore } from "./memoryArtifactStore-C9lFVqPF-yFz6yJj0.js";
|
|
2
|
-
import { n as MockLlmClient, r as MockUiBridge, t as InMemoryStore } from "./testing-
|
|
2
|
+
import { n as MockLlmClient, r as MockUiBridge, t as InMemoryStore } from "./testing-BmR48Pn1.js";
|
|
3
3
|
|
|
4
4
|
export { InMemoryStore, MemoryArtifactStore, MockLlmClient, MockUiBridge };
|
|
@@ -74,7 +74,12 @@ interface SkillsLockfile {
|
|
|
74
74
|
}
|
|
75
75
|
interface VerifyResult {
|
|
76
76
|
ok: boolean;
|
|
77
|
+
/** 清单与实际均存在但 sha256 不一致的文件 */
|
|
77
78
|
mismatches: string[];
|
|
79
|
+
/** 实际目录存在但清单未登记的文件(有 extra 即 ok:false) */
|
|
80
|
+
extras: string[];
|
|
81
|
+
/** 清单登记但实际目录缺失的文件 */
|
|
82
|
+
missing: string[];
|
|
78
83
|
}
|
|
79
84
|
/** 技能目录内的安装清单文件名(不参与 files 列表与 digest) */
|
|
80
85
|
declare const SKILL_MANIFEST_FILE = "webskill.skill-manifest.json";
|
|
@@ -95,8 +100,8 @@ declare function buildManifest(input: {
|
|
|
95
100
|
files: SkillManifest['files'];
|
|
96
101
|
sha256: Sha256Fn;
|
|
97
102
|
}): Promise<SkillManifest>;
|
|
98
|
-
/** 按 manifest.files 比对实际 hash
|
|
99
|
-
declare function verifyManifest(manifest: SkillManifest, actualHashes: Map<string, string
|
|
103
|
+
/** 按 manifest.files 比对实际 hash 与文件集(mismatches/extras/missing 三类全空才 ok) */
|
|
104
|
+
declare function verifyManifest(manifest: SkillManifest, actualHashes: Map<string, string>, actualFiles?: string[]): VerifyResult;
|
|
100
105
|
//#endregion
|
|
101
106
|
//#region src/fs/types.d.ts
|
|
102
107
|
interface FileStat {
|
|
@@ -146,9 +151,19 @@ declare class MemoryFS implements FileSystemProvider {
|
|
|
146
151
|
//#region src/fs/pathSecurity.d.ts
|
|
147
152
|
/** 统一分隔符为 `/`,去除 `.` 段与重复分隔符(不解析 `..`) */
|
|
148
153
|
declare function normalizePath(path: string): string;
|
|
154
|
+
/**
|
|
155
|
+
* 外部标识(runId、candidateId、skillName、versionId 等)作为单一路径段使用前的统一校验:
|
|
156
|
+
* 拒绝空串、`.`、`..`、含 `/` 或 `\`、含 `:`(Windows 盘符/ADS)。
|
|
157
|
+
* 违规抛 FS_PATH_OUTSIDE_ROOT(kind 用于错误消息定位,如 "runId")。
|
|
158
|
+
*/
|
|
159
|
+
declare function assertSafePathSegment(segment: string, kind: string): void;
|
|
149
160
|
/**
|
|
150
161
|
* 将相对路径安全地解析到 root 之内。
|
|
151
162
|
* 拒绝空路径、绝对路径(`/`、`\\`、`C:\` 形式)与任何 `..` 段。
|
|
163
|
+
*
|
|
164
|
+
* 注意:本函数仅做**词法**校验,不解析符号链接——root 内经符号链接指向
|
|
165
|
+
* 外部的目标无法被词法检查拦截(realpath 防护见 NodeFS root 模式与
|
|
166
|
+
* 安装管线的 lstat 符号链接扫描)。
|
|
152
167
|
*/
|
|
153
168
|
declare function resolveInsideRoot(root: string, relativePath: string): string;
|
|
154
169
|
//#endregion
|
|
@@ -269,6 +284,27 @@ declare function exportSkills(fs: FileSystemProvider, input: {
|
|
|
269
284
|
/** 包级清单解析 + 形状校验;损坏 → INSTALL_FAILED(安装侧保证零残留) */
|
|
270
285
|
declare function parseSkillPackManifest(text: string): SkillPackManifest;
|
|
271
286
|
//#endregion
|
|
287
|
+
//#region src/skill/zipLimits.d.ts
|
|
288
|
+
/**
|
|
289
|
+
* 归档体积三重上限(node/browser 共用单一来源):
|
|
290
|
+
* 下载(Content-Length + 流式累计)、单条目解压后大小、总解压体积。
|
|
291
|
+
* fflate 流式 Unzip 逐 chunk 计量,超限即中止(zip bomb 在计量点截断)。
|
|
292
|
+
*/
|
|
293
|
+
interface ArchiveLimits {
|
|
294
|
+
/** 下载字节上限(默认 64MB) */
|
|
295
|
+
maxDownloadBytes?: number;
|
|
296
|
+
/** 单条目解压后上限(默认 64MB) */
|
|
297
|
+
maxEntryBytes?: number;
|
|
298
|
+
/** 总解压体积上限(默认 256MB) */
|
|
299
|
+
maxTotalBytes?: number;
|
|
300
|
+
}
|
|
301
|
+
declare const DEFAULT_ARCHIVE_LIMITS: Required<ArchiveLimits>;
|
|
302
|
+
declare function resolveArchiveLimits(limits?: ArchiveLimits): Required<ArchiveLimits>;
|
|
303
|
+
/** 流式解 zip(单条目/总双重上限);返回 [path, content][](目录条目以 / 结尾、内容为空) */
|
|
304
|
+
declare function unzipWithLimits(data: Uint8Array, limits?: ArchiveLimits): Promise<Array<[string, Uint8Array]>>;
|
|
305
|
+
/** 下载响应体:Content-Length 预检 + 流式累计上限 */
|
|
306
|
+
declare function readResponseWithLimit(res: Response, limits?: ArchiveLimits): Promise<Uint8Array>;
|
|
307
|
+
//#endregion
|
|
272
308
|
//#region src/skill/discovery.d.ts
|
|
273
309
|
interface DiscoveryResult {
|
|
274
310
|
entries: SkillCatalogEntry[];
|
|
@@ -536,4 +572,4 @@ interface MemoryStore {
|
|
|
536
572
|
clear(scope?: string): Promise<void>;
|
|
537
573
|
}
|
|
538
574
|
//#endregion
|
|
539
|
-
export {
|
|
575
|
+
export { checkSkillRules as $, SKILL_NAME_PATTERN as A, SkillMetadata as B, FileStat as C, SKILLS_LOCKFILE as D, MemoryFS as E, SkillDocument as F, ValidationReport as G, SkillReader as H, SkillInstallSource as I, WebSkillErrorCode as J, VerifyResult as K, SkillIssue as L, SkillCatalog as M, SkillCatalogEntry as N, SKILL_MANIFEST_FILE as O, SkillDiscovery as P, checkDependencyCycles as Q, SkillLocation as R, DiscoveryResult as S, JsonSchema as T, SkillSource as U, SkillPackManifest as V, SkillsLockfile as W, buildCatalog as X, assertSafePathSegment as Y, buildManifest as Z, RenderResultRequest as _, InteractionPolicy as a, normalizePath as at, CatalogRenderer as b, LlmClient as c, readResponseWithLimit as ct, LlmResponse as d, resolveArchiveLimits as dt, computeDigest as et, LlmStreamEvent as f, resolveInsideRoot as ft, RenderBlock as g, xmlRenderer as gt, MemoryStore as h, verifyManifest as ht, FormField as i, jsonRenderer as it, SKILL_PACK_FILE as j, SKILL_NAME_MAX_LENGTH as k, LlmCompleteInput as l, renderAvailableSkillsXml as lt, LlmToolSpec as m, validateSkills as mt, ArtifactStore as n, exportSkills as nt, InteractionRequest as o, parseSkillMarkdown as ot, LlmToolCall as p, unzipWithLimits as pt, WebSkillError as q, ChartSpec as r, isValidSkillName as rt, InteractionResponse as s, parseSkillPackManifest as st, Artifact as t, escapeXml as tt, LlmMessage as u, renderCatalogJson as ut, UiBridge as v, FileSystemProvider as w, DEFAULT_ARCHIVE_LIMITS as x, ArchiveLimits as y, SkillManifest as z };
|
package/dist/ui-react.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as RenderResultRequest, o as InteractionRequest, s as InteractionResponse, v as UiBridge } from "./types-CgNC-oQu-
|
|
1
|
+
import { _ as RenderResultRequest, o as InteractionRequest, s as InteractionResponse, v as UiBridge } from "./types-CgNC-oQu-DEcIBJKG.js";
|
|
2
2
|
//#region ../ui-react/dist/index.d.ts
|
|
3
3
|
//#region src/bridgeState.d.ts
|
|
4
4
|
/**
|
package/dist/ui-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as renderMiniMarkdown, m as collectValues, w as shapeInteractionValue, x as renderMiniChart, y as interactionToFormModel } from "./dist-
|
|
1
|
+
import { S as renderMiniMarkdown, m as collectValues, w as shapeInteractionValue, x as renderMiniChart, y as interactionToFormModel } from "./dist-CfBOjJ4p.js";
|
|
2
2
|
import { useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
|
package/dist/ui-vue.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as RenderResultRequest, o as InteractionRequest, s as InteractionResponse, v as UiBridge } from "./types-CgNC-oQu-
|
|
1
|
+
import { _ as RenderResultRequest, o as InteractionRequest, s as InteractionResponse, v as UiBridge } from "./types-CgNC-oQu-DEcIBJKG.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 { S as renderMiniMarkdown, m as collectValues, w as shapeInteractionValue, x as renderMiniChart, y as interactionToFormModel } from "./dist-
|
|
1
|
+
import { S as renderMiniMarkdown, m as collectValues, w as shapeInteractionValue, x as renderMiniChart, y as interactionToFormModel } from "./dist-CfBOjJ4p.js";
|
|
2
2
|
import { defineComponent, h, reactive, ref } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region ../ui-vue/dist/index.js
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as RenderResultRequest, g as RenderBlock, o as InteractionRequest, r as ChartSpec, s as InteractionResponse, v as UiBridge } from "./types-CgNC-oQu-
|
|
2
|
-
import {
|
|
1
|
+
import { _ as RenderResultRequest, g as RenderBlock, o as InteractionRequest, r as ChartSpec, s as InteractionResponse, v as UiBridge } from "./types-CgNC-oQu-DEcIBJKG.js";
|
|
2
|
+
import { ft as buildRenderResult } from "./index-COuOu6gw.js";
|
|
3
3
|
//#region ../ui/dist/index.d.ts
|
|
4
4
|
//#region src/model/formModel.d.ts
|
|
5
5
|
interface FormModel {
|
package/dist/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as buildRenderResult } from "./dist-
|
|
2
|
-
import { C as renderRenderResult, D as toVercelToolInvocation, E as toOpenUiLang, S as renderMiniMarkdown, T as toA2uiMessages, _ as fromOpenUiAction, a as CHART_PALETTE, b as renderBlocks, c as OPENUI_SUBMIT_ACTION, d as WEBSKILL_STYLES_CSS, f as WebFormBridge, g as fromA2uiAction, h as ensureStyles, i as A2UI_VERSION, l as VERCEL_INTERACTION_TOOL_NAME, m as collectValues, n as A2UI_CANCEL_ACTION, o as LitRendererBridge, p as chartToTable, r as A2UI_SUBMIT_ACTION, s as OPENUI_CANCEL_ACTION, t as A2UI_BASIC_CATALOG_ID, u as VercelUiBridge, v as fromVercelToolResult, w as shapeInteractionValue, x as renderMiniChart, y as interactionToFormModel } from "./dist-
|
|
1
|
+
import { C as buildRenderResult } from "./dist-DuGN5x0v.js";
|
|
2
|
+
import { C as renderRenderResult, D as toVercelToolInvocation, E as toOpenUiLang, S as renderMiniMarkdown, T as toA2uiMessages, _ as fromOpenUiAction, a as CHART_PALETTE, b as renderBlocks, c as OPENUI_SUBMIT_ACTION, d as WEBSKILL_STYLES_CSS, f as WebFormBridge, g as fromA2uiAction, h as ensureStyles, i as A2UI_VERSION, l as VERCEL_INTERACTION_TOOL_NAME, m as collectValues, n as A2UI_CANCEL_ACTION, o as LitRendererBridge, p as chartToTable, r as A2UI_SUBMIT_ACTION, s as OPENUI_CANCEL_ACTION, t as A2UI_BASIC_CATALOG_ID, u as VercelUiBridge, v as fromVercelToolResult, w as shapeInteractionValue, x as renderMiniChart, y as interactionToFormModel } from "./dist-CfBOjJ4p.js";
|
|
3
3
|
|
|
4
4
|
export { A2UI_BASIC_CATALOG_ID, A2UI_CANCEL_ACTION, A2UI_SUBMIT_ACTION, A2UI_VERSION, CHART_PALETTE, LitRendererBridge, OPENUI_CANCEL_ACTION, OPENUI_SUBMIT_ACTION, VERCEL_INTERACTION_TOOL_NAME, VercelUiBridge, WEBSKILL_STYLES_CSS, WebFormBridge, buildRenderResult, chartToTable, collectValues, ensureStyles, fromA2uiAction, fromOpenUiAction, fromVercelToolResult, interactionToFormModel, renderBlocks, renderMiniChart, renderMiniMarkdown, renderRenderResult, shapeInteractionValue, toA2uiMessages, toOpenUiLang, toVercelToolInvocation };
|