@webskill/sdk 0.2.2 → 0.2.4
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 +4 -0
- package/dist/browser.d.ts +10 -7
- package/dist/browser.js +81 -28
- package/dist/{dist-DrySSQ5R.js → dist-CV64gN62.js} +98 -16
- package/dist/{dist-BJobG0i-.js → dist-CeNAzFYi.js} +1 -1
- package/dist/{dist-Cn9GpW6Q.js → dist-Chgf2tcy.js} +35 -12
- package/dist/{dist-D0saNPi_.js → dist-D7MsoMPx.js} +28 -2
- package/dist/governance.d.ts +13 -6
- package/dist/governance.js +37 -17
- package/dist/{index-gjFuBevI.d.ts → index-DZShzhon.d.ts} +19 -2
- package/dist/{index-BmzysJX5.d.ts → index-DrHelz72.d.ts} +11 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/mcp.d.ts +3 -3
- package/dist/mcp.js +24 -7
- package/dist/node.d.ts +3 -3
- package/dist/node.js +3 -3
- package/dist/processSandboxEntry.js +11 -0
- package/dist/sandboxWorkerEntry.js +34 -2
- package/dist/{testing-B4pq6JYa.js → testing-BN18eqbD.js} +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/dist/{types-CKm5G_eQ-8W8FnP4u.d.ts → types-CKm5G_eQ-BqyXnvoR.d.ts} +8 -5
- 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
|
@@ -118,6 +118,8 @@ interface FileSystemProvider {
|
|
|
118
118
|
readonly kind: string;
|
|
119
119
|
readText(path: string): Promise<string>;
|
|
120
120
|
writeText(path: string, content: string): Promise<void>;
|
|
121
|
+
/** 真追加(审计日志等 append-only 账本;不整读改写) */
|
|
122
|
+
appendText(path: string, content: string): Promise<void>;
|
|
121
123
|
readBinary(path: string): Promise<Uint8Array>;
|
|
122
124
|
writeBinary(path: string, content: Uint8Array): Promise<void>;
|
|
123
125
|
exists(path: string): Promise<boolean>;
|
|
@@ -129,6 +131,11 @@ interface FileSystemProvider {
|
|
|
129
131
|
}): Promise<void>;
|
|
130
132
|
/** 原子重命名(lockfile 等先写临时文件再 rename 的场景;实现侧无原生 rename 时 copy+remove 兜底) */
|
|
131
133
|
rename(from: string, to: string): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* 可选:返回 root 限定视图(realpath 包含校验全方法生效)。
|
|
136
|
+
* 实现:NodeFS 支持;缺省(无此方法)时调用方按词法校验降级。
|
|
137
|
+
*/
|
|
138
|
+
withRoot?(root: string): FileSystemProvider;
|
|
132
139
|
}
|
|
133
140
|
//#endregion
|
|
134
141
|
//#region src/fs/memoryFs.d.ts
|
|
@@ -139,6 +146,7 @@ declare class MemoryFS implements FileSystemProvider {
|
|
|
139
146
|
constructor();
|
|
140
147
|
readText(path: string): Promise<string>;
|
|
141
148
|
writeText(path: string, content: string): Promise<void>;
|
|
149
|
+
appendText(path: string, content: string): Promise<void>;
|
|
142
150
|
readBinary(path: string): Promise<Uint8Array>;
|
|
143
151
|
writeBinary(path: string, content: Uint8Array): Promise<void>;
|
|
144
152
|
exists(path: string): Promise<boolean>;
|
|
@@ -158,11 +166,6 @@ declare function atomicWriteText(fs: FileSystemProvider, path: string, content:
|
|
|
158
166
|
//#region src/fs/pathSecurity.d.ts
|
|
159
167
|
/** 统一分隔符为 `/`,去除 `.` 段与重复分隔符(不解析 `..`) */
|
|
160
168
|
declare function normalizePath(path: string): string;
|
|
161
|
-
/**
|
|
162
|
-
* 外部标识(runId、candidateId、skillName、versionId 等)作为单一路径段使用前的统一校验:
|
|
163
|
-
* 拒绝空串、`.`、`..`、含 `/` 或 `\`、含 `:`(Windows 盘符/ADS)。
|
|
164
|
-
* 违规抛 FS_PATH_OUTSIDE_ROOT(kind 用于错误消息定位,如 "runId")。
|
|
165
|
-
*/
|
|
166
169
|
declare function assertSafePathSegment(segment: string, kind: string): void;
|
|
167
170
|
/**
|
|
168
171
|
* 将相对路径安全地解析到 root 之内。
|
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-CKm5G_eQ-
|
|
1
|
+
import { _ as RenderResultRequest, o as InteractionRequest, s as InteractionResponse, v as UiBridge } from "./types-CKm5G_eQ-BqyXnvoR.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-CeNAzFYi.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-CKm5G_eQ-
|
|
1
|
+
import { _ as RenderResultRequest, o as InteractionRequest, s as InteractionResponse, v as UiBridge } from "./types-CKm5G_eQ-BqyXnvoR.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-CeNAzFYi.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-CKm5G_eQ-
|
|
2
|
-
import { mt as buildRenderResult } from "./index-
|
|
1
|
+
import { _ as RenderResultRequest, g as RenderBlock, o as InteractionRequest, r as ChartSpec, s as InteractionResponse, v as UiBridge } from "./types-CKm5G_eQ-BqyXnvoR.js";
|
|
2
|
+
import { mt as buildRenderResult } from "./index-DZShzhon.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 { w 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 { w as buildRenderResult } from "./dist-CV64gN62.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-CeNAzFYi.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 };
|