@ynhcj/xiaoyi-channel 0.0.68-beta → 0.0.68-next
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/index.js +50 -4
- package/dist/src/bot.js +1 -0
- package/dist/src/channel.js +15 -23
- package/dist/src/cspl/call-api.js +14 -11
- package/dist/src/cspl/config.js +3 -3
- package/dist/src/cspl/constants.d.ts +2 -0
- package/dist/src/cspl/constants.js +12 -0
- package/dist/src/cspl/utils.js +4 -2
- package/dist/src/file-download.js +3 -6
- package/dist/src/file-upload.js +52 -5
- package/dist/src/login-token-handler.d.ts +8 -0
- package/dist/src/login-token-handler.js +60 -0
- package/dist/src/monitor.js +14 -0
- package/dist/src/outbound.js +2 -7
- package/dist/src/provider.js +380 -43
- package/dist/src/reply-dispatcher.js +6 -0
- package/dist/src/self-evolution-handler.d.ts +1 -0
- package/dist/src/self-evolution-handler.js +47 -0
- package/dist/src/skill-retriever/config.d.ts +4 -0
- package/dist/src/skill-retriever/config.js +23 -0
- package/dist/src/skill-retriever/hooks.d.ts +22 -0
- package/dist/src/skill-retriever/hooks.js +91 -0
- package/dist/src/skill-retriever/tool-search.d.ts +16 -0
- package/dist/src/skill-retriever/tool-search.js +159 -0
- package/dist/src/skill-retriever/types.d.ts +34 -0
- package/dist/src/skill-retriever/types.js +1 -0
- package/dist/src/tools/call-device-tool.d.ts +5 -0
- package/dist/src/tools/call-device-tool.js +130 -0
- package/dist/src/tools/create-alarm-tool.js +5 -16
- package/dist/src/tools/delete-alarm-tool.js +1 -4
- package/dist/src/tools/device-tool-map.js +5 -1
- package/dist/src/tools/find-pc-devices-tool.d.ts +5 -0
- package/dist/src/tools/find-pc-devices-tool.js +98 -0
- package/dist/src/tools/get-alarm-tool-schema.d.ts +16 -0
- package/dist/src/tools/get-alarm-tool-schema.js +11 -0
- package/dist/src/tools/get-calendar-tool-schema.d.ts +16 -0
- package/dist/src/tools/get-calendar-tool-schema.js +9 -0
- package/dist/src/tools/get-collection-tool-schema.d.ts +16 -0
- package/dist/src/tools/get-collection-tool-schema.js +10 -0
- package/dist/src/tools/get-contact-tool-schema.d.ts +16 -0
- package/dist/src/tools/get-contact-tool-schema.js +11 -0
- package/dist/src/tools/get-device-file-tool-schema.d.ts +16 -0
- package/dist/src/tools/get-device-file-tool-schema.js +10 -0
- package/dist/src/tools/get-email-tool-schema.d.ts +16 -0
- package/dist/src/tools/get-email-tool-schema.js +9 -0
- package/dist/src/tools/get-note-tool-schema.d.ts +16 -0
- package/dist/src/tools/get-note-tool-schema.js +10 -0
- package/dist/src/tools/get-photo-tool-schema.d.ts +16 -0
- package/dist/src/tools/get-photo-tool-schema.js +10 -0
- package/dist/src/tools/image-reading-tool.js +4 -7
- package/dist/src/tools/login-token-tool.d.ts +5 -0
- package/dist/src/tools/login-token-tool.js +136 -0
- package/dist/src/tools/modify-alarm-tool.js +10 -23
- package/dist/src/tools/query-app-message-tool.d.ts +4 -0
- package/dist/src/tools/query-app-message-tool.js +138 -0
- package/dist/src/tools/query-memory-data-tool.d.ts +4 -0
- package/dist/src/tools/query-memory-data-tool.js +154 -0
- package/dist/src/tools/query-todo-task-tool.d.ts +4 -0
- package/dist/src/tools/query-todo-task-tool.js +133 -0
- package/dist/src/tools/save-file-to-phone-tool.d.ts +5 -0
- package/dist/src/tools/save-file-to-phone-tool.js +166 -0
- package/dist/src/tools/save-media-to-gallery-tool.js +13 -9
- package/dist/src/tools/save-self-evolution-skill-tool.d.ts +1 -0
- package/dist/src/tools/save-self-evolution-skill-tool.js +189 -0
- package/dist/src/tools/schema-tool-factory.d.ts +27 -0
- package/dist/src/tools/schema-tool-factory.js +32 -0
- package/dist/src/tools/search-alarm-tool.js +6 -13
- package/dist/src/tools/search-calendar-tool.js +2 -0
- package/dist/src/tools/search-email-tool.d.ts +5 -0
- package/dist/src/tools/search-email-tool.js +137 -0
- package/dist/src/tools/search-file-tool.js +4 -4
- package/dist/src/tools/search-message-tool.js +1 -0
- package/dist/src/tools/search-photo-gallery-tool.js +2 -2
- package/dist/src/tools/send-email-tool.d.ts +4 -0
- package/dist/src/tools/send-email-tool.js +134 -0
- package/dist/src/tools/send-file-to-user-tool.js +2 -4
- package/dist/src/tools/session-manager.js +2 -0
- package/dist/src/tools/upload-file-tool.js +4 -4
- package/dist/src/tools/upload-photo-tool.js +2 -2
- package/dist/src/tools/xiaoyi-add-collection-tool.js +35 -6
- package/dist/src/tools/xiaoyi-collection-tool.js +2 -1
- package/dist/src/tools/xiaoyi-delete-collection-tool.js +1 -1
- package/dist/src/utils/self-evolution-manager.d.ts +5 -0
- package/dist/src/utils/self-evolution-manager.js +47 -0
- package/dist/src/utils/tool-call-nudge-manager.d.ts +14 -0
- package/dist/src/utils/tool-call-nudge-manager.js +35 -0
- package/dist/src/websocket.js +18 -0
- package/openclaw.plugin.json +1 -0
- package/package.json +1 -1
|
@@ -16,14 +16,14 @@ import { getCurrentSessionContext } from "./session-manager.js";
|
|
|
16
16
|
export const uploadFileTool = {
|
|
17
17
|
name: "upload_file",
|
|
18
18
|
label: "Upload File",
|
|
19
|
-
description:
|
|
19
|
+
description: `工具能力描述:将用户本地设备文件上传并获取可公网访问的 URL。
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
前置工具调用:此工具使用前必须先通过call_device_tool调用 search_file 或者 query_collection 工具获取文件的 uri
|
|
22
22
|
|
|
23
23
|
工具参数说明:
|
|
24
|
-
a. 入参中的fileInfos数组,每个元素必须包含mediaUri字段(对应于search_file工具或者
|
|
24
|
+
a. 入参中的fileInfos数组,每个元素必须包含mediaUri字段(对应于search_file工具或者query_collection返回结果中的uri),必须与search_file或者query_collection结果中对应的uri完全保持一致,不要自行修改。
|
|
25
25
|
b. fileInfos中的timeout字段是可选的,表示上传文件超时时间,单位是毫秒,默认是20000(20秒)。
|
|
26
|
-
c. fileInfos
|
|
26
|
+
c. fileInfos 是文件在用户设备本地的信息数组(从 search_file 工具或者query_collection 工具响应中获取)。限制:每次最多支持传入 5 条文件信息。
|
|
27
27
|
|
|
28
28
|
注意事项:
|
|
29
29
|
a. 操作超时时间为60秒,请勿重复调用此工具,如果超时或失败,最多重试一次。
|
|
@@ -12,9 +12,9 @@ import { getCurrentSessionContext } from "./session-manager.js";
|
|
|
12
12
|
export const uploadPhotoTool = {
|
|
13
13
|
name: "upload_photo",
|
|
14
14
|
label: "Upload Photo",
|
|
15
|
-
description:
|
|
15
|
+
description: `工具能力描述:将用户本地设备文件回传并获取可公网访问的 URL。
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
前置工具调用:此工具使用前必须先通过call_device_tool工具调用 search_photo_gallery 工具获取照片的 mediaUri或者thumbnailUri
|
|
18
18
|
工具参数说明:
|
|
19
19
|
a. 入参中的mediaUris中的mediaUri必须与search_photo_gallery结果中对应的mediaUri或者thumbnailUri完全保持一致,不要自行修改,必须是file:://开头的路径。
|
|
20
20
|
b. 优先使用search_photo_gallery结果中的thumbnailUri作为入参,thumbnailUri是缩略图,清晰度与文件大小都非常合适展示给用户,如果thumbnailUri不存在或者用户要求使用原图,则使用search_photo_gallery结果中对应的mediaUri
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getXYWebSocketManager } from "../client.js";
|
|
2
2
|
import { sendCommand } from "../formatter.js";
|
|
3
3
|
import { getCurrentSessionContext } from "./session-manager.js";
|
|
4
|
+
import { XYFileUploadService } from "../file-upload.js";
|
|
4
5
|
/**
|
|
5
6
|
* Duck-typed ToolInputError: openclaw 按 .name 字段匹配,不用 instanceof。
|
|
6
7
|
* 抛出此错误会让 openclaw 返回 HTTP 400 而非 500,
|
|
@@ -17,9 +18,17 @@ class ToolInputError extends Error {
|
|
|
17
18
|
* XY add collection tool - adds data to user's XiaoYi collection.
|
|
18
19
|
*/
|
|
19
20
|
export const xiaoyiAddCollectionTool = {
|
|
20
|
-
name: "
|
|
21
|
+
name: "add_collection",
|
|
21
22
|
label: "Add XiaoYi Collection",
|
|
22
|
-
description:
|
|
23
|
+
description: `向小艺收藏中添加公共知识数据,可以给用户提供个性化体验。任何用户希望保存到个人化知识库中的数据都可以调用本技能。不同类型的数据对应的数据要求如下:
|
|
24
|
+
请求入参说明:
|
|
25
|
+
● content:必填字段,数据类型为string,功能描述是该字段是用户添加收藏的链接url或文本原文。适用于HYPER_LINK和TEXT类型。
|
|
26
|
+
● uri:必填字段,数据类型为string,功能描述是该字段是图片或文件的端存储地址链接。适用于IMAGE和FILE类型。
|
|
27
|
+
● sourceAppBundleName:非必填字段,数据类型为string,功能描述是标识该数据的来源应用。
|
|
28
|
+
● dataType:必填字段,数据类型为string,功能描述是标识数据类型。HYPER_LINK标识网页,TEXT标识文本,IMAGE标识图片,FILE标识文件。
|
|
29
|
+
● title:非必填字段,数据类型为string,功能描述是标识文件类型数据的文件名称。适用于FILE类型。
|
|
30
|
+
说明:如果dataType为HYPER_LINK或TEXT,则content字段必填且不能为空;如果dataType为IMAGE或FILE,则uri字段必填且不能为空。当用户希望收藏海报、截图等图片类数据时,请将数据以图片IMAGE的形式存入到小艺帮记;当用户希望收藏电子书、笔记、报告、素材、文档、合同、协议、简历、证书、报表、日志、安装包、压缩包等描述的文件时,请将数据以文件FILE的形式存入到小艺帮记。
|
|
31
|
+
当你成功收藏这个数据到小艺帮记后,请在最后显示"已成功把数据添加到[小艺帮记](vassistant://voice/main?page=CollectionPage&jumpHomePageTab=myCollection)",
|
|
23
32
|
注意:
|
|
24
33
|
a. 操作超时时间为60秒,请勿重复调用此工具
|
|
25
34
|
b. 如果遇到各类调用失败场景,最多只能重试一次,不可以重复调用多次。
|
|
@@ -36,7 +45,11 @@ export const xiaoyiAddCollectionTool = {
|
|
|
36
45
|
},
|
|
37
46
|
uri: {
|
|
38
47
|
type: "string",
|
|
39
|
-
description:
|
|
48
|
+
description: `必填字段(IMAGE/FILE类型时)。图片或文件的地址链接。
|
|
49
|
+
uri具备三种严格的格式
|
|
50
|
+
(1) http或者https开头的公网链接,一般是用户通过联网搜索获取的文件地址,不允许自行编造,此类链接填入时必须确保真实
|
|
51
|
+
(2) file://开头的链接,此类链接必须来源于query_collection结果或者search_file或者search_photo_gallery的结果,不允许自行编造
|
|
52
|
+
(3) 本地路径例,如/tmp/xy_channel/xxx,此类路径是文件保存在当前openclaw运行环境的本地目录,可以直接填入,不要擅自拼接http://或者file://前缀`,
|
|
40
53
|
},
|
|
41
54
|
sourceAppBundleName: {
|
|
42
55
|
type: "string",
|
|
@@ -46,12 +59,16 @@ export const xiaoyiAddCollectionTool = {
|
|
|
46
59
|
type: "string",
|
|
47
60
|
description: "必填字段。标识数据类型:HYPER_LINK表示网页,TEXT表示文本,IMAGE表示图片,FILE表示文件。",
|
|
48
61
|
},
|
|
62
|
+
title: {
|
|
63
|
+
type: "string",
|
|
64
|
+
description: "非必填字段。标识文件类型数据的文件名称。适用于FILE类型。",
|
|
65
|
+
},
|
|
49
66
|
},
|
|
50
67
|
required: ["dataType"],
|
|
51
68
|
},
|
|
52
69
|
async execute(toolCallId, params) {
|
|
53
70
|
// Validate parameters
|
|
54
|
-
const { content, uri, sourceAppBundleName, dataType } = params;
|
|
71
|
+
const { content, uri, sourceAppBundleName, dataType, title } = params;
|
|
55
72
|
const validTypes = ["HYPER_LINK", "TEXT", "IMAGE", "FILE"];
|
|
56
73
|
if (!dataType || !validTypes.includes(dataType)) {
|
|
57
74
|
throw new ToolInputError(`dataType必填且必须为 HYPER_LINK、TEXT、IMAGE、FILE 之一,当前值: ${dataType}`);
|
|
@@ -70,6 +87,15 @@ export const xiaoyiAddCollectionTool = {
|
|
|
70
87
|
const { config, sessionId, taskId, messageId } = sessionContext;
|
|
71
88
|
// Get WebSocket manager
|
|
72
89
|
const wsManager = getXYWebSocketManager(config);
|
|
90
|
+
// Handle uri: upload local paths to get public URL
|
|
91
|
+
let publicUri = uri;
|
|
92
|
+
if (uri && !uri.startsWith("http://") && !uri.startsWith("https://") && !uri.startsWith("file://")) {
|
|
93
|
+
const uploadService = new XYFileUploadService(config.fileUploadUrl, config.apiKey, config.uid);
|
|
94
|
+
publicUri = await uploadService.uploadFileAndGetUrl(uri);
|
|
95
|
+
if (!publicUri) {
|
|
96
|
+
throw new Error("本地文件上传失败,无法获取公网URL");
|
|
97
|
+
}
|
|
98
|
+
}
|
|
73
99
|
// Build intentParam
|
|
74
100
|
const intentParam = {
|
|
75
101
|
dataType,
|
|
@@ -77,12 +103,15 @@ export const xiaoyiAddCollectionTool = {
|
|
|
77
103
|
if (content) {
|
|
78
104
|
intentParam.content = content;
|
|
79
105
|
}
|
|
80
|
-
if (
|
|
81
|
-
intentParam.uri =
|
|
106
|
+
if (publicUri) {
|
|
107
|
+
intentParam.uri = publicUri;
|
|
82
108
|
}
|
|
83
109
|
if (sourceAppBundleName) {
|
|
84
110
|
intentParam.sourceAppBundleName = sourceAppBundleName;
|
|
85
111
|
}
|
|
112
|
+
if (title) {
|
|
113
|
+
intentParam.title = title;
|
|
114
|
+
}
|
|
86
115
|
// Build AddCollection command
|
|
87
116
|
const command = {
|
|
88
117
|
header: {
|
|
@@ -18,13 +18,14 @@ class ToolInputError extends Error {
|
|
|
18
18
|
* Returns personalized knowledge data saved in user's collection.
|
|
19
19
|
*/
|
|
20
20
|
export const xiaoyiCollectionTool = {
|
|
21
|
-
name: "
|
|
21
|
+
name: "query_collection",
|
|
22
22
|
label: "XiaoYi Collection",
|
|
23
23
|
description: `检索用户在小艺收藏中记下来的公共知识数据,本技能支持查询用户收藏的公共知识数据,也可以根据特定语义化描述进行特定内容的检索,通过参数进行控制。本技能返回结果中,linkTitle是收藏内容的标题,description是对收藏内容的总结,label是收藏内容的标签,linkUrl是可以直接访问的原始内容链接。如果你认为某条数据对用户交互有用,可以通过linkUrl抓取更加丰富的原始数据。
|
|
24
24
|
注意:
|
|
25
25
|
a. 操作超时时间为60秒,请勿重复调用此工具
|
|
26
26
|
b. 如果遇到各类调用失败场景,最多只能重试一次,不可以重复调用多次。
|
|
27
27
|
c. 调用工具前需认真检查调用参数是否满足工具要求
|
|
28
|
+
d. 如果用户希望获取文件,可以使用call_device_tool工具调用upload_file工具完成文件上传
|
|
28
29
|
|
|
29
30
|
回复约束:如果工具返回没有授权或者其他报错,只需要完整描述没有授权或者其他报错内容即可,不需要主动给用户提供解决方案,例如告诉用户如何授权,如何解决报错等都是不需要的,请严格遵守。
|
|
30
31
|
`,
|
|
@@ -17,7 +17,7 @@ class ToolInputError extends Error {
|
|
|
17
17
|
* XY delete collection tool - deletes data from user's XiaoYi collection.
|
|
18
18
|
*/
|
|
19
19
|
export const xiaoyiDeleteCollectionTool = {
|
|
20
|
-
name: "
|
|
20
|
+
name: "delete_collection",
|
|
21
21
|
label: "Delete XiaoYi Collection",
|
|
22
22
|
description: `从小艺收藏中删除之前已保存的公共知识数据。任何用户希望删除已保存到个人知识库的数据都可以调用本技能。如果用户想更新之前的收藏数据,需要先query获取itemId然后再delete,最后执行Add,按照这个步骤完成收藏数据更新。
|
|
23
23
|
注意:
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
const SELF_EVOLUTION_ENV_FILE = "/home/sandbox/.openclaw/.xiaoyienv";
|
|
3
|
+
const SELF_EVOLUTION_ENV_KEY = "selfEvolutionState";
|
|
4
|
+
function parseBooleanLike(value) {
|
|
5
|
+
const normalized = value.trim().toLowerCase();
|
|
6
|
+
if (normalized === "true") {
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
if (normalized === "false") {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
class SelfEvolutionManager {
|
|
15
|
+
async isEnabled() {
|
|
16
|
+
try {
|
|
17
|
+
const envData = await fs.readFile(SELF_EVOLUTION_ENV_FILE, "utf-8");
|
|
18
|
+
for (const line of envData.split(/\r?\n/u)) {
|
|
19
|
+
const trimmed = line.trim();
|
|
20
|
+
if (!trimmed || trimmed.startsWith("#")) {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
const eqIndex = trimmed.indexOf("=");
|
|
24
|
+
if (eqIndex === -1) {
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
const key = trimmed.slice(0, eqIndex).trim();
|
|
28
|
+
if (key !== SELF_EVOLUTION_ENV_KEY) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
const value = trimmed.slice(eqIndex + 1).trim();
|
|
32
|
+
const parsed = parseBooleanLike(value);
|
|
33
|
+
if (parsed !== null) {
|
|
34
|
+
return parsed;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
if (error?.code !== "ENOENT") {
|
|
41
|
+
console.error(`[SELF_EVOLUTION] Failed to read ${SELF_EVOLUTION_ENV_FILE}:`, error);
|
|
42
|
+
}
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export const selfEvolutionManager = new SelfEvolutionManager();
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type RecordToolCallResult = {
|
|
2
|
+
count: number;
|
|
3
|
+
shouldNudge: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare class ToolCallNudgeManager {
|
|
6
|
+
private readonly threshold;
|
|
7
|
+
private readonly sessions;
|
|
8
|
+
constructor(threshold?: number);
|
|
9
|
+
recordToolCall(sessionKey: string): RecordToolCallResult;
|
|
10
|
+
clearSession(sessionKey: string): void;
|
|
11
|
+
}
|
|
12
|
+
export declare const TOOL_CALL_NUDGE_THRESHOLD = 5;
|
|
13
|
+
export declare const toolCallNudgeManager: ToolCallNudgeManager;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const DEFAULT_TOOL_CALL_NUDGE_THRESHOLD = 5;
|
|
2
|
+
class ToolCallNudgeManager {
|
|
3
|
+
threshold;
|
|
4
|
+
sessions = new Map();
|
|
5
|
+
constructor(threshold = DEFAULT_TOOL_CALL_NUDGE_THRESHOLD) {
|
|
6
|
+
this.threshold = threshold;
|
|
7
|
+
}
|
|
8
|
+
recordToolCall(sessionKey) {
|
|
9
|
+
let state = this.sessions.get(sessionKey);
|
|
10
|
+
if (!state) {
|
|
11
|
+
state = {
|
|
12
|
+
count: 0,
|
|
13
|
+
nudged: false,
|
|
14
|
+
};
|
|
15
|
+
this.sessions.set(sessionKey, state);
|
|
16
|
+
}
|
|
17
|
+
state.count += 1;
|
|
18
|
+
if (!state.nudged && state.count >= this.threshold) {
|
|
19
|
+
state.nudged = true;
|
|
20
|
+
return {
|
|
21
|
+
count: state.count,
|
|
22
|
+
shouldNudge: true,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
count: state.count,
|
|
27
|
+
shouldNudge: false,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
clearSession(sessionKey) {
|
|
31
|
+
this.sessions.delete(sessionKey);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export const TOOL_CALL_NUDGE_THRESHOLD = DEFAULT_TOOL_CALL_NUDGE_THRESHOLD;
|
|
35
|
+
export const toolCallNudgeManager = new ToolCallNudgeManager();
|
package/dist/src/websocket.js
CHANGED
|
@@ -394,6 +394,18 @@ export class XYWebSocketManager extends EventEmitter {
|
|
|
394
394
|
taskId: a2aRequest.params?.id, // 新的 taskId(点击推送时生成)
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
|
+
else if (item.header?.namespace === "AgentEvent" && item.header?.name === "ClawSelfEvolutionState") {
|
|
398
|
+
console.log("[XY] ClawSelfEvolutionState event detected, emitting self-evolution-event");
|
|
399
|
+
this.emit("self-evolution-event", {
|
|
400
|
+
event: item,
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
else if (item.header?.namespace === "LoginTokenEvent" && item.header?.name === "ClawAutoLogin") {
|
|
404
|
+
console.log("[XY] LoginTokenEvent.ClawAutoLogin detected, emitting login-token-event");
|
|
405
|
+
this.emit("login-token-event", {
|
|
406
|
+
event: item,
|
|
407
|
+
});
|
|
408
|
+
}
|
|
397
409
|
}
|
|
398
410
|
}
|
|
399
411
|
return;
|
|
@@ -448,6 +460,12 @@ export class XYWebSocketManager extends EventEmitter {
|
|
|
448
460
|
taskId: inboundMsg.taskId || a2aRequest.params?.id,
|
|
449
461
|
});
|
|
450
462
|
}
|
|
463
|
+
else if (item.header?.namespace === "LoginTokenEvent" && item.header?.name === "ClawAutoLogin") {
|
|
464
|
+
console.log("[XY] LoginTokenEvent.ClawAutoLogin detected (wrapped format), emitting login-token-event");
|
|
465
|
+
this.emit("login-token-event", {
|
|
466
|
+
event: item,
|
|
467
|
+
});
|
|
468
|
+
}
|
|
451
469
|
}
|
|
452
470
|
}
|
|
453
471
|
}
|
package/openclaw.plugin.json
CHANGED