@spzhongwin/skill-logger-plugin 1.0.11 → 1.0.13
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/dist/active-skills.js +67 -0
- package/dist/active-skills.test.js +29 -0
- package/dist/config-sync.js +439 -0
- package/dist/config-sync.test.js +145 -0
- package/dist/hooks.js +337 -0
- package/dist/hooks.test.js +123 -0
- package/dist/http.js +54 -0
- package/dist/identity.js +56 -0
- package/dist/index.js +240 -78
- package/dist/index.test.js +39 -0
- package/dist/integration.test.js +102 -0
- package/dist/matcher.js +362 -0
- package/dist/matcher.test.js +139 -0
- package/dist/paths.js +62 -0
- package/dist/paths.test.js +49 -0
- package/dist/reporter.js +267 -0
- package/dist/reporter.test.js +128 -0
- package/dist/semver.js +64 -0
- package/dist/semver.test.js +21 -0
- package/dist/skill-version.js +23 -0
- package/dist/types.js +9 -0
- package/dist/updater.js +352 -0
- package/dist/updater.test.js +212 -0
- package/dist/ws-client.js +484 -0
- package/openclaw.plugin.json +50 -50
- package/package.json +37 -37
- package/src/active-skills.test.ts +32 -32
- package/src/active-skills.ts +77 -77
- package/src/config-sync.test.ts +165 -165
- package/src/config-sync.ts +544 -544
- package/src/hooks.test.ts +251 -251
- package/src/hooks.ts +517 -517
- package/src/http.ts +61 -61
- package/src/identity.ts +64 -64
- package/src/index.test.ts +53 -53
- package/src/index.ts +226 -226
- package/src/integration.test.ts +119 -119
- package/src/matcher.test.ts +170 -170
- package/src/matcher.ts +393 -393
- package/src/paths.test.ts +57 -57
- package/src/paths.ts +84 -84
- package/src/reporter.test.ts +139 -139
- package/src/reporter.ts +298 -298
- package/src/sample-config.json +72 -72
- package/src/semver.test.ts +23 -23
- package/src/semver.ts +60 -60
- package/src/skill-version.ts +53 -53
- package/src/types.ts +198 -198
- package/src/updater.test.ts +325 -237
- package/src/updater.ts +549 -433
- package/src/ws-client.test.ts +48 -37
- package/src/ws-client.ts +717 -642
- package/test-ws.ts +17 -17
- package/tsconfig.json +14 -14
package/src/types.ts
CHANGED
|
@@ -1,198 +1,198 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 全插件共享的数据类型。
|
|
3
|
-
*
|
|
4
|
-
* 设计要点:
|
|
5
|
-
* - `MatchRule` 是「判别联合」(discriminated union):用 `type` 字段区分四种匹配策略,
|
|
6
|
-
* TypeScript 能据此收窄到具体形状,matcher 里按 `rule.type` 分派。
|
|
7
|
-
* - 这些类型同时是「标准配置」的契约:用户平台返回的 JSON 必须符合 `SkillStandardConfig`。
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/** 脚本参数规则:用于在同一脚本下按参数细分功能点,如 `--mode current`。 */
|
|
11
|
-
export type ArgRule = {
|
|
12
|
-
/** 参数名,含前缀,如 `--mode`。 */
|
|
13
|
-
flag: string;
|
|
14
|
-
/** 期望值;省略表示「只要出现该 flag 即命中」。 */
|
|
15
|
-
value?: string;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* 脚本调用:模型通过 `exec` 跑某个 skill 自带脚本(.py/.sh/.js 等)。
|
|
20
|
-
* 识别时忽略解释器前缀(python/node/bash/uv run/./),用脚本路径后缀匹配。
|
|
21
|
-
*/
|
|
22
|
-
export type ScriptMatchRule = {
|
|
23
|
-
type: "script";
|
|
24
|
-
/** 相对 skill 根目录的脚本路径,如 `scripts/model_usage.py`。 */
|
|
25
|
-
script: string;
|
|
26
|
-
/** 可选:按参数细分功能点;全部命中才算命中。 */
|
|
27
|
-
argRules?: ArgRule[];
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* CLI 包装调用:模型通过 `exec` 调一个包装 CLI,如 `mcporter call linear.list_issues`。
|
|
32
|
-
* `command` 是命令头,`targetPattern` 是其后用于定位功能点的子串。
|
|
33
|
-
*/
|
|
34
|
-
export type CommandMatchRule = {
|
|
35
|
-
type: "command";
|
|
36
|
-
/** 命令名,如 `mcporter`。 */
|
|
37
|
-
command: string;
|
|
38
|
-
/** 命令后用于识别功能点的子串,如 `call linear.list_issues`。 */
|
|
39
|
-
targetPattern: string;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
/** 参数谓词:判断某个工具参数是否等于期望值(支持点路径取嵌套字段)。 */
|
|
43
|
-
export type WherePredicate = {
|
|
44
|
-
/** 参数键,支持 `a.b.c` 点路径。 */
|
|
45
|
-
param: string;
|
|
46
|
-
/** 期望值(严格相等比较,做 String 归一)。 */
|
|
47
|
-
equals: string;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* 工具直调:模型直接调用一个「非 exec」工具(典型为注册进 openclaw 的 MCP/SSE 工具)。
|
|
52
|
-
* 按 `toolName` 匹配(精确 / 前缀 / 正则三选一),可加参数谓词进一步限定。
|
|
53
|
-
*/
|
|
54
|
-
export type ToolMatchRule = {
|
|
55
|
-
type: "tool";
|
|
56
|
-
/** 精确工具名。 */
|
|
57
|
-
toolName?: string;
|
|
58
|
-
/** 工具名前缀(如某 MCP server 的统一前缀)。 */
|
|
59
|
-
toolNamePrefix?: string;
|
|
60
|
-
/** 工具名正则(字符串形式,matcher 内编译)。 */
|
|
61
|
-
toolNameRegex?: string;
|
|
62
|
-
/** 可选参数谓词,全部满足才命中。 */
|
|
63
|
-
where?: WherePredicate[];
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* HTTP/SSE 端点调用:模型 `exec` 里 curl 某端点,或 fetch 类工具带 url 参数。
|
|
68
|
-
*/
|
|
69
|
-
export type HttpMatchRule = {
|
|
70
|
-
type: "http";
|
|
71
|
-
/** URL 子串匹配,如 `/v1/audio/transcriptions`。 */
|
|
72
|
-
urlContains?: string;
|
|
73
|
-
/** host 子串匹配,如 `api.openai.com`。 */
|
|
74
|
-
hostContains?: string;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export type MatchRule =
|
|
78
|
-
| ScriptMatchRule
|
|
79
|
-
| CommandMatchRule
|
|
80
|
-
| ToolMatchRule
|
|
81
|
-
| HttpMatchRule;
|
|
82
|
-
|
|
83
|
-
/** 一个 skill 内的功能点定义。 */
|
|
84
|
-
export type SkillFunction = {
|
|
85
|
-
/** 功能点唯一标识(skill 内唯一)。 */
|
|
86
|
-
id: string;
|
|
87
|
-
/** 人类可读名称。 */
|
|
88
|
-
name: string;
|
|
89
|
-
/** 功能点说明(可选)。 */
|
|
90
|
-
description?: string;
|
|
91
|
-
/** 匹配规则。 */
|
|
92
|
-
match: MatchRule;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
/** skill 的标准配置:由用户平台定义、插件拉取并缓存。 */
|
|
96
|
-
export type SkillStandardConfig = {
|
|
97
|
-
skillName: string;
|
|
98
|
-
/** 本次返回的配置对应的版本(按请求里的本地版本精确匹配)。 */
|
|
99
|
-
version: string;
|
|
100
|
-
/** 平台上该 skill 的最新版本(服务端附加,用于过期检测);缺省时回退用 version。 */
|
|
101
|
-
latestVersion?: string;
|
|
102
|
-
description?: string;
|
|
103
|
-
functions: SkillFunction[];
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
/** matcher 命中后返回的结构。 */
|
|
107
|
-
export type MatchResult = {
|
|
108
|
-
skillName: string;
|
|
109
|
-
skillVersion: string;
|
|
110
|
-
functionId: string;
|
|
111
|
-
functionName: string;
|
|
112
|
-
matchType: MatchRule["type"];
|
|
113
|
-
/** 从调用里解析出的参数(脚本 flag / mcporter k=v / http query 等)。 */
|
|
114
|
-
args: Record<string, unknown>;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
/** 观测到的一次工具调用的最小描述(matcher 输入)。 */
|
|
118
|
-
export type ToolCall = {
|
|
119
|
-
toolName: string;
|
|
120
|
-
params: Record<string, unknown>;
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
/** 上报身份;做成独立类型,便于将来替换来源(user_id 等)。 */
|
|
124
|
-
export type Identity = {
|
|
125
|
-
user_id: string;
|
|
126
|
-
git_name: string;
|
|
127
|
-
git_email: string;
|
|
128
|
-
machine_id: string;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export type UserInfoSnapshot = {
|
|
132
|
-
user_id?: string;
|
|
133
|
-
user_name?: string;
|
|
134
|
-
emp_id?: string;
|
|
135
|
-
person_id?: string;
|
|
136
|
-
corp_id?: string;
|
|
137
|
-
avatar?: string;
|
|
138
|
-
deptList?: unknown[];
|
|
139
|
-
title?: string;
|
|
140
|
-
error_message?: string;
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
/** 落盘 / 上报的事件。两类:skill 触发、功能点调用。 */
|
|
144
|
-
export type SkillEvent = {
|
|
145
|
-
event_id: string;
|
|
146
|
-
event_type: "skill_trigger" | "function_call";
|
|
147
|
-
skill_name: string;
|
|
148
|
-
skill_version?: string;
|
|
149
|
-
function_id?: string;
|
|
150
|
-
function_name?: string;
|
|
151
|
-
/** 命中的匹配策略类型(function_call 时有)。 */
|
|
152
|
-
match_type?: MatchRule["type"];
|
|
153
|
-
/** 触发方式:skill_trigger 为 inline/tool;function_call 为观测到的工具名(exec/mcp 工具…)。 */
|
|
154
|
-
invoke_mode?: string;
|
|
155
|
-
/** 观测到的工具名。 */
|
|
156
|
-
invoke_tool?: string;
|
|
157
|
-
/** exec 时的原始命令行。 */
|
|
158
|
-
command?: string;
|
|
159
|
-
args?: Record<string, unknown>;
|
|
160
|
-
/** success/error 来自 after_tool_call;unknown 表示 after 未到达(被中断/阻断)而由兜底补记。 */
|
|
161
|
-
status?: "success" | "error" | "unknown";
|
|
162
|
-
error_message?: string;
|
|
163
|
-
duration_ms?: number;
|
|
164
|
-
app_key?: string;
|
|
165
|
-
user_info?: UserInfoSnapshot;
|
|
166
|
-
session_id?: string;
|
|
167
|
-
agent_id?: string;
|
|
168
|
-
run_id?: string;
|
|
169
|
-
plugin_id?: string;
|
|
170
|
-
plugin_name?: string;
|
|
171
|
-
plugin_version?: string;
|
|
172
|
-
/** ISO 8601。 */
|
|
173
|
-
called_at: string;
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
/** 插件运行期配置(来自 manifest configSchema / pluginConfig)。 */
|
|
177
|
-
export type PluginConfig = {
|
|
178
|
-
/** 插件唯一ID,用于区分不同网关或业务线的插件实例。 */
|
|
179
|
-
pluginId?: string;
|
|
180
|
-
/** 插件中文描述名称。 */
|
|
181
|
-
pluginName?: string;
|
|
182
|
-
/** 插件版本号(从 package.json 中读取)。 */
|
|
183
|
-
pluginVersion?: string;
|
|
184
|
-
/** 拉取标准配置的服务地址。缺失则用本地静态桩。 */
|
|
185
|
-
platformBaseUrl?: string;
|
|
186
|
-
/** 网关长连接中心服务地址(如 wss://api.aishuo.co/gateway/ws)。若缺失,尝试从 platformBaseUrl 推导。 */
|
|
187
|
-
wsServerUrl?: string;
|
|
188
|
-
/** 批量上报的服务地址。缺失则只落本地、不上报。 */
|
|
189
|
-
reportBaseUrl?: string;
|
|
190
|
-
/** 上报鉴权头的值(如 Bearer xxx)。 */
|
|
191
|
-
authToken?: string;
|
|
192
|
-
/** 是否记录「无法自信归属到功能点」的调用(默认 true)。 */
|
|
193
|
-
recordUnattributed?: boolean;
|
|
194
|
-
/** 是否开启插件内部的调试日志输出(默认 true,方便实战联调观察过程)。 */
|
|
195
|
-
debugLogging?: boolean;
|
|
196
|
-
/** 是否开启插件专属文件日志(落盘为 skill-logger.err),用于排查 WS 连接和指令运行情况 */
|
|
197
|
-
enableFileLog?: boolean;
|
|
198
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* 全插件共享的数据类型。
|
|
3
|
+
*
|
|
4
|
+
* 设计要点:
|
|
5
|
+
* - `MatchRule` 是「判别联合」(discriminated union):用 `type` 字段区分四种匹配策略,
|
|
6
|
+
* TypeScript 能据此收窄到具体形状,matcher 里按 `rule.type` 分派。
|
|
7
|
+
* - 这些类型同时是「标准配置」的契约:用户平台返回的 JSON 必须符合 `SkillStandardConfig`。
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** 脚本参数规则:用于在同一脚本下按参数细分功能点,如 `--mode current`。 */
|
|
11
|
+
export type ArgRule = {
|
|
12
|
+
/** 参数名,含前缀,如 `--mode`。 */
|
|
13
|
+
flag: string;
|
|
14
|
+
/** 期望值;省略表示「只要出现该 flag 即命中」。 */
|
|
15
|
+
value?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 脚本调用:模型通过 `exec` 跑某个 skill 自带脚本(.py/.sh/.js 等)。
|
|
20
|
+
* 识别时忽略解释器前缀(python/node/bash/uv run/./),用脚本路径后缀匹配。
|
|
21
|
+
*/
|
|
22
|
+
export type ScriptMatchRule = {
|
|
23
|
+
type: "script";
|
|
24
|
+
/** 相对 skill 根目录的脚本路径,如 `scripts/model_usage.py`。 */
|
|
25
|
+
script: string;
|
|
26
|
+
/** 可选:按参数细分功能点;全部命中才算命中。 */
|
|
27
|
+
argRules?: ArgRule[];
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* CLI 包装调用:模型通过 `exec` 调一个包装 CLI,如 `mcporter call linear.list_issues`。
|
|
32
|
+
* `command` 是命令头,`targetPattern` 是其后用于定位功能点的子串。
|
|
33
|
+
*/
|
|
34
|
+
export type CommandMatchRule = {
|
|
35
|
+
type: "command";
|
|
36
|
+
/** 命令名,如 `mcporter`。 */
|
|
37
|
+
command: string;
|
|
38
|
+
/** 命令后用于识别功能点的子串,如 `call linear.list_issues`。 */
|
|
39
|
+
targetPattern: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** 参数谓词:判断某个工具参数是否等于期望值(支持点路径取嵌套字段)。 */
|
|
43
|
+
export type WherePredicate = {
|
|
44
|
+
/** 参数键,支持 `a.b.c` 点路径。 */
|
|
45
|
+
param: string;
|
|
46
|
+
/** 期望值(严格相等比较,做 String 归一)。 */
|
|
47
|
+
equals: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 工具直调:模型直接调用一个「非 exec」工具(典型为注册进 openclaw 的 MCP/SSE 工具)。
|
|
52
|
+
* 按 `toolName` 匹配(精确 / 前缀 / 正则三选一),可加参数谓词进一步限定。
|
|
53
|
+
*/
|
|
54
|
+
export type ToolMatchRule = {
|
|
55
|
+
type: "tool";
|
|
56
|
+
/** 精确工具名。 */
|
|
57
|
+
toolName?: string;
|
|
58
|
+
/** 工具名前缀(如某 MCP server 的统一前缀)。 */
|
|
59
|
+
toolNamePrefix?: string;
|
|
60
|
+
/** 工具名正则(字符串形式,matcher 内编译)。 */
|
|
61
|
+
toolNameRegex?: string;
|
|
62
|
+
/** 可选参数谓词,全部满足才命中。 */
|
|
63
|
+
where?: WherePredicate[];
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* HTTP/SSE 端点调用:模型 `exec` 里 curl 某端点,或 fetch 类工具带 url 参数。
|
|
68
|
+
*/
|
|
69
|
+
export type HttpMatchRule = {
|
|
70
|
+
type: "http";
|
|
71
|
+
/** URL 子串匹配,如 `/v1/audio/transcriptions`。 */
|
|
72
|
+
urlContains?: string;
|
|
73
|
+
/** host 子串匹配,如 `api.openai.com`。 */
|
|
74
|
+
hostContains?: string;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export type MatchRule =
|
|
78
|
+
| ScriptMatchRule
|
|
79
|
+
| CommandMatchRule
|
|
80
|
+
| ToolMatchRule
|
|
81
|
+
| HttpMatchRule;
|
|
82
|
+
|
|
83
|
+
/** 一个 skill 内的功能点定义。 */
|
|
84
|
+
export type SkillFunction = {
|
|
85
|
+
/** 功能点唯一标识(skill 内唯一)。 */
|
|
86
|
+
id: string;
|
|
87
|
+
/** 人类可读名称。 */
|
|
88
|
+
name: string;
|
|
89
|
+
/** 功能点说明(可选)。 */
|
|
90
|
+
description?: string;
|
|
91
|
+
/** 匹配规则。 */
|
|
92
|
+
match: MatchRule;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/** skill 的标准配置:由用户平台定义、插件拉取并缓存。 */
|
|
96
|
+
export type SkillStandardConfig = {
|
|
97
|
+
skillName: string;
|
|
98
|
+
/** 本次返回的配置对应的版本(按请求里的本地版本精确匹配)。 */
|
|
99
|
+
version: string;
|
|
100
|
+
/** 平台上该 skill 的最新版本(服务端附加,用于过期检测);缺省时回退用 version。 */
|
|
101
|
+
latestVersion?: string;
|
|
102
|
+
description?: string;
|
|
103
|
+
functions: SkillFunction[];
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/** matcher 命中后返回的结构。 */
|
|
107
|
+
export type MatchResult = {
|
|
108
|
+
skillName: string;
|
|
109
|
+
skillVersion: string;
|
|
110
|
+
functionId: string;
|
|
111
|
+
functionName: string;
|
|
112
|
+
matchType: MatchRule["type"];
|
|
113
|
+
/** 从调用里解析出的参数(脚本 flag / mcporter k=v / http query 等)。 */
|
|
114
|
+
args: Record<string, unknown>;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** 观测到的一次工具调用的最小描述(matcher 输入)。 */
|
|
118
|
+
export type ToolCall = {
|
|
119
|
+
toolName: string;
|
|
120
|
+
params: Record<string, unknown>;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/** 上报身份;做成独立类型,便于将来替换来源(user_id 等)。 */
|
|
124
|
+
export type Identity = {
|
|
125
|
+
user_id: string;
|
|
126
|
+
git_name: string;
|
|
127
|
+
git_email: string;
|
|
128
|
+
machine_id: string;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export type UserInfoSnapshot = {
|
|
132
|
+
user_id?: string;
|
|
133
|
+
user_name?: string;
|
|
134
|
+
emp_id?: string;
|
|
135
|
+
person_id?: string;
|
|
136
|
+
corp_id?: string;
|
|
137
|
+
avatar?: string;
|
|
138
|
+
deptList?: unknown[];
|
|
139
|
+
title?: string;
|
|
140
|
+
error_message?: string;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/** 落盘 / 上报的事件。两类:skill 触发、功能点调用。 */
|
|
144
|
+
export type SkillEvent = {
|
|
145
|
+
event_id: string;
|
|
146
|
+
event_type: "skill_trigger" | "function_call";
|
|
147
|
+
skill_name: string;
|
|
148
|
+
skill_version?: string;
|
|
149
|
+
function_id?: string;
|
|
150
|
+
function_name?: string;
|
|
151
|
+
/** 命中的匹配策略类型(function_call 时有)。 */
|
|
152
|
+
match_type?: MatchRule["type"];
|
|
153
|
+
/** 触发方式:skill_trigger 为 inline/tool;function_call 为观测到的工具名(exec/mcp 工具…)。 */
|
|
154
|
+
invoke_mode?: string;
|
|
155
|
+
/** 观测到的工具名。 */
|
|
156
|
+
invoke_tool?: string;
|
|
157
|
+
/** exec 时的原始命令行。 */
|
|
158
|
+
command?: string;
|
|
159
|
+
args?: Record<string, unknown>;
|
|
160
|
+
/** success/error 来自 after_tool_call;unknown 表示 after 未到达(被中断/阻断)而由兜底补记。 */
|
|
161
|
+
status?: "success" | "error" | "unknown";
|
|
162
|
+
error_message?: string;
|
|
163
|
+
duration_ms?: number;
|
|
164
|
+
app_key?: string;
|
|
165
|
+
user_info?: UserInfoSnapshot;
|
|
166
|
+
session_id?: string;
|
|
167
|
+
agent_id?: string;
|
|
168
|
+
run_id?: string;
|
|
169
|
+
plugin_id?: string;
|
|
170
|
+
plugin_name?: string;
|
|
171
|
+
plugin_version?: string;
|
|
172
|
+
/** ISO 8601。 */
|
|
173
|
+
called_at: string;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
/** 插件运行期配置(来自 manifest configSchema / pluginConfig)。 */
|
|
177
|
+
export type PluginConfig = {
|
|
178
|
+
/** 插件唯一ID,用于区分不同网关或业务线的插件实例。 */
|
|
179
|
+
pluginId?: string;
|
|
180
|
+
/** 插件中文描述名称。 */
|
|
181
|
+
pluginName?: string;
|
|
182
|
+
/** 插件版本号(从 package.json 中读取)。 */
|
|
183
|
+
pluginVersion?: string;
|
|
184
|
+
/** 拉取标准配置的服务地址。缺失则用本地静态桩。 */
|
|
185
|
+
platformBaseUrl?: string;
|
|
186
|
+
/** 网关长连接中心服务地址(如 wss://api.aishuo.co/gateway/ws)。若缺失,尝试从 platformBaseUrl 推导。 */
|
|
187
|
+
wsServerUrl?: string;
|
|
188
|
+
/** 批量上报的服务地址。缺失则只落本地、不上报。 */
|
|
189
|
+
reportBaseUrl?: string;
|
|
190
|
+
/** 上报鉴权头的值(如 Bearer xxx)。 */
|
|
191
|
+
authToken?: string;
|
|
192
|
+
/** 是否记录「无法自信归属到功能点」的调用(默认 true)。 */
|
|
193
|
+
recordUnattributed?: boolean;
|
|
194
|
+
/** 是否开启插件内部的调试日志输出(默认 true,方便实战联调观察过程)。 */
|
|
195
|
+
debugLogging?: boolean;
|
|
196
|
+
/** 是否开启插件专属文件日志(落盘为 skill-logger.err),用于排查 WS 连接和指令运行情况 */
|
|
197
|
+
enableFileLog?: boolean;
|
|
198
|
+
};
|