@glodon-aiot/bot-client-sdk 3.26.0-alpha.29 → 3.26.0-alpha.31
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 +222 -242
- package/dist/es/builtinTools/paths.mjs +6 -5
- package/dist/es/builtinTools/schemas.mjs +7 -7
- package/dist/es/localFiles/errors.mjs +41 -34
- package/dist/es/localFiles/host/sandboxClient.mjs +169 -176
- package/dist/es/package.json.mjs +2 -2
- package/dist/lib/index.js +40 -40
- package/dist/src/builtinTools/paths.d.ts +2 -2
- package/dist/src/localFiles/errors.d.ts +1 -1
- package/dist/src/localFiles/host/sandboxClient.d.ts +6 -0
- package/package.json +2 -2
|
@@ -4,8 +4,8 @@ export declare function mentionsSkillDir(text: string): boolean;
|
|
|
4
4
|
export declare function mentionsSyntheticDir(text: string): boolean;
|
|
5
5
|
export declare function isSyntheticCwd(cwd: string): boolean;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* 把工作区路径转成相对工作区根的路径。
|
|
8
|
+
* `/说明.md` 与 `说明.md`、`notes/a.md` 都相对工作区根。拒绝盘符、反斜杠和 `..`。
|
|
9
9
|
*/
|
|
10
10
|
export declare function resolveWorkspacePath(input: string): string;
|
|
11
11
|
export declare function resolveFilePath(input: string): string;
|
|
@@ -29,6 +29,6 @@ export declare function cancelledError(): ToolError;
|
|
|
29
29
|
export declare function throwIfAborted(signal?: AbortSignal): void;
|
|
30
30
|
/**
|
|
31
31
|
* 把任意异常转换为可回传给平台的 ToolError。
|
|
32
|
-
* FSA 抛出的 DOMException
|
|
32
|
+
* FSA 抛出的 DOMException 可能带有系统路径等信息,因此按 name 映射为固定文案。
|
|
33
33
|
*/
|
|
34
34
|
export declare function toToolError(error: unknown): ToolError;
|
|
@@ -95,6 +95,12 @@ export declare class SandboxClient {
|
|
|
95
95
|
move(from: string, to: string): Promise<void>;
|
|
96
96
|
exec(fields: Record<string, unknown>, signal?: AbortSignal, onOutput?: (stream: 'stdout' | 'stderr', text: string) => void): Promise<SandboxExecResult>;
|
|
97
97
|
private invoke;
|
|
98
|
+
/**
|
|
99
|
+
* 沙箱轮到这次上传时先回 offset 为 0 的 ack,之后每个 ack 再发下一片。
|
|
100
|
+
* 排队期间不发数据,沙箱不用替排队的请求存分片。
|
|
101
|
+
*/
|
|
102
|
+
private upload;
|
|
103
|
+
/** 取消时通知沙箱:命令会被结束,还在排队的文件请求会被移出队列。 */
|
|
98
104
|
private begin;
|
|
99
105
|
private next;
|
|
100
106
|
private send;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glodon-aiot/bot-client-sdk",
|
|
3
|
-
"version": "3.26.0-alpha.
|
|
3
|
+
"version": "3.26.0-alpha.31",
|
|
4
4
|
"author": "glodoncv",
|
|
5
5
|
"description": "aiot bot client js sdk",
|
|
6
6
|
"type": "module",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"registry": "https://registry.npmjs.org/"
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
|
-
"@glodon-aiot/apis": "^3.26.0-alpha.
|
|
91
|
+
"@glodon-aiot/apis": "^3.26.0-alpha.31",
|
|
92
92
|
"axios": "0.24.0",
|
|
93
93
|
"buffer": "^6.0.3",
|
|
94
94
|
"dayjs": "^1.11.13",
|