@ynhcj/xiaoyi 2.5.5 → 2.5.7
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/auth.d.ts +1 -1
- package/dist/channel.d.ts +116 -14
- package/dist/channel.js +199 -665
- package/dist/config-schema.d.ts +8 -8
- package/dist/config-schema.js +5 -5
- package/dist/file-download.d.ts +17 -0
- package/dist/file-download.js +69 -0
- package/dist/heartbeat.d.ts +39 -0
- package/dist/heartbeat.js +102 -0
- package/dist/index.d.ts +1 -4
- package/dist/index.js +7 -11
- package/dist/push.d.ts +28 -0
- package/dist/push.js +135 -0
- package/dist/runtime.d.ts +48 -2
- package/dist/runtime.js +117 -3
- package/dist/types.d.ts +95 -1
- package/dist/websocket.d.ts +49 -1
- package/dist/websocket.js +279 -20
- package/dist/xy-bot.d.ts +19 -0
- package/dist/xy-bot.js +277 -0
- package/dist/xy-client.d.ts +26 -0
- package/dist/xy-client.js +78 -0
- package/dist/xy-config.d.ts +18 -0
- package/dist/xy-config.js +37 -0
- package/dist/xy-formatter.d.ts +94 -0
- package/dist/xy-formatter.js +303 -0
- package/dist/xy-monitor.d.ts +17 -0
- package/dist/xy-monitor.js +187 -0
- package/dist/xy-parser.d.ts +49 -0
- package/dist/xy-parser.js +109 -0
- package/dist/xy-reply-dispatcher.d.ts +17 -0
- package/dist/xy-reply-dispatcher.js +308 -0
- package/dist/xy-tools/session-manager.d.ts +29 -0
- package/dist/xy-tools/session-manager.js +80 -0
- package/dist/xy-utils/config-manager.d.ts +26 -0
- package/dist/xy-utils/config-manager.js +61 -0
- package/dist/xy-utils/crypto.d.ts +8 -0
- package/dist/xy-utils/crypto.js +21 -0
- package/dist/xy-utils/logger.d.ts +6 -0
- package/dist/xy-utils/logger.js +37 -0
- package/dist/xy-utils/session.d.ts +34 -0
- package/dist/xy-utils/session.js +55 -0
- package/package.json +32 -16
package/dist/auth.d.ts
CHANGED
package/dist/channel.d.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
import type { ChannelOutboundContext,
|
|
2
|
-
|
|
1
|
+
import type { ChannelOutboundContext, ChannelGatewayContext, OpenClawConfig } from "openclaw/dist/plugin-sdk/index.js";
|
|
2
|
+
type OutboundDeliveryResult = {
|
|
3
|
+
channel: string;
|
|
4
|
+
messageId: string;
|
|
5
|
+
chatId?: string;
|
|
6
|
+
channelId?: string;
|
|
7
|
+
roomId?: string;
|
|
8
|
+
conversationId?: string;
|
|
9
|
+
timestamp?: number;
|
|
10
|
+
meta?: Record<string, unknown>;
|
|
11
|
+
};
|
|
12
|
+
import { XiaoYiChannelConfig } from "./types.js";
|
|
3
13
|
/**
|
|
4
14
|
* Resolved XiaoYi account configuration (single account mode)
|
|
5
15
|
*/
|
|
@@ -30,6 +40,63 @@ export declare const xiaoyiPlugin: {
|
|
|
30
40
|
media: boolean;
|
|
31
41
|
nativeCommands: boolean;
|
|
32
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* Config schema for UI form rendering
|
|
45
|
+
*/
|
|
46
|
+
configSchema: {
|
|
47
|
+
schema: {
|
|
48
|
+
type: string;
|
|
49
|
+
properties: {
|
|
50
|
+
enabled: {
|
|
51
|
+
type: string;
|
|
52
|
+
default: boolean;
|
|
53
|
+
description: string;
|
|
54
|
+
};
|
|
55
|
+
wsUrl1: {
|
|
56
|
+
type: string;
|
|
57
|
+
default: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
wsUrl2: {
|
|
61
|
+
type: string;
|
|
62
|
+
default: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
ak: {
|
|
66
|
+
type: string;
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
sk: {
|
|
70
|
+
type: string;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
agentId: {
|
|
74
|
+
type: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
debug: {
|
|
78
|
+
type: string;
|
|
79
|
+
default: boolean;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
apiId: {
|
|
83
|
+
type: string;
|
|
84
|
+
default: string;
|
|
85
|
+
description: string;
|
|
86
|
+
};
|
|
87
|
+
pushId: {
|
|
88
|
+
type: string;
|
|
89
|
+
default: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
taskTimeoutMs: {
|
|
93
|
+
type: string;
|
|
94
|
+
default: number;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
33
100
|
onboarding: any;
|
|
34
101
|
/**
|
|
35
102
|
* Config adapter - single account mode
|
|
@@ -54,34 +121,69 @@ export declare const xiaoyiPlugin: {
|
|
|
54
121
|
};
|
|
55
122
|
};
|
|
56
123
|
/**
|
|
57
|
-
*
|
|
124
|
+
* Gateway adapter - manage connections
|
|
125
|
+
* Using xy-monitor for message handling (xy_channel architecture)
|
|
126
|
+
*/
|
|
127
|
+
gateway: {
|
|
128
|
+
startAccount: (ctx: ChannelGatewayContext<ResolvedXiaoYiAccount>) => Promise<void>;
|
|
129
|
+
stopAccount: (ctx: ChannelGatewayContext<ResolvedXiaoYiAccount>) => Promise<void>;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Outbound adapter - send messages via push
|
|
58
133
|
*/
|
|
59
134
|
outbound: {
|
|
60
135
|
deliveryMode: string;
|
|
61
136
|
textChunkLimit: number;
|
|
137
|
+
resolveTarget: ({ cfg, to, accountId, mode }: any) => {
|
|
138
|
+
ok: boolean;
|
|
139
|
+
to: any;
|
|
140
|
+
};
|
|
62
141
|
sendText: (ctx: ChannelOutboundContext) => Promise<OutboundDeliveryResult>;
|
|
63
142
|
sendMedia: (ctx: ChannelOutboundContext) => Promise<OutboundDeliveryResult>;
|
|
64
143
|
};
|
|
65
|
-
/**
|
|
66
|
-
* Gateway adapter - manage connections
|
|
67
|
-
*/
|
|
68
|
-
gateway: {
|
|
69
|
-
startAccount: (ctx: ChannelGatewayContext<ResolvedXiaoYiAccount>) => Promise<void>;
|
|
70
|
-
stopAccount: (ctx: ChannelGatewayContext<ResolvedXiaoYiAccount>) => Promise<void>;
|
|
71
|
-
};
|
|
72
144
|
/**
|
|
73
145
|
* Messaging adapter - normalize targets
|
|
146
|
+
* In new openclaw version, normalizeTarget receives a string and returns a normalized string
|
|
74
147
|
*/
|
|
75
148
|
messaging: {
|
|
76
|
-
normalizeTarget: (
|
|
149
|
+
normalizeTarget: (raw: string) => string;
|
|
77
150
|
};
|
|
78
151
|
/**
|
|
79
152
|
* Status adapter - health checks
|
|
153
|
+
* Using buildAccountSnapshot for compatibility with new openclaw version
|
|
80
154
|
*/
|
|
81
155
|
status: {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
156
|
+
buildAccountSnapshot: (params: {
|
|
157
|
+
account: ResolvedXiaoYiAccount;
|
|
158
|
+
cfg: OpenClawConfig;
|
|
159
|
+
runtime?: any;
|
|
160
|
+
probe?: unknown;
|
|
161
|
+
audit?: unknown;
|
|
162
|
+
}) => Promise<{
|
|
163
|
+
accountId: string;
|
|
164
|
+
state: "offline";
|
|
165
|
+
lastEventAt: number;
|
|
166
|
+
issues: {
|
|
167
|
+
severity: "error";
|
|
168
|
+
message: string;
|
|
169
|
+
}[];
|
|
170
|
+
lastInboundAt?: undefined;
|
|
171
|
+
} | {
|
|
172
|
+
accountId: string;
|
|
173
|
+
state: "ready";
|
|
174
|
+
lastEventAt: number;
|
|
175
|
+
lastInboundAt: number;
|
|
176
|
+
issues?: undefined;
|
|
177
|
+
} | {
|
|
178
|
+
accountId: string;
|
|
179
|
+
state: "authenticating";
|
|
180
|
+
lastEventAt: number;
|
|
181
|
+
issues: {
|
|
182
|
+
severity: "warning";
|
|
183
|
+
message: string;
|
|
184
|
+
}[];
|
|
185
|
+
lastInboundAt?: undefined;
|
|
85
186
|
}>;
|
|
86
187
|
};
|
|
87
188
|
};
|
|
189
|
+
export {};
|