openclaw-stepfun 0.2.2
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/LICENSE +21 -0
- package/README.md +61 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +18 -0
- package/dist/src/accounts.d.ts +22 -0
- package/dist/src/accounts.js +43 -0
- package/dist/src/bot.d.ts +16 -0
- package/dist/src/bot.js +100 -0
- package/dist/src/channel.d.ts +4 -0
- package/dist/src/channel.js +206 -0
- package/dist/src/client.d.ts +51 -0
- package/dist/src/client.js +206 -0
- package/dist/src/monitor.d.ts +19 -0
- package/dist/src/monitor.js +153 -0
- package/dist/src/proto/capy/botauth/auth_common_pb.d.ts +82 -0
- package/dist/src/proto/capy/botauth/auth_common_pb.js +35 -0
- package/dist/src/proto/capy/botauth/botauth_connect.d.ts +118 -0
- package/dist/src/proto/capy/botauth/botauth_connect.js +118 -0
- package/dist/src/proto/capy/botauth/botauth_pb.d.ts +1065 -0
- package/dist/src/proto/capy/botauth/botauth_pb.js +348 -0
- package/dist/src/proto/capy/botauth/public_connect.d.ts +62 -0
- package/dist/src/proto/capy/botauth/public_connect.js +62 -0
- package/dist/src/proto/capy/botauth/public_pb.d.ts +254 -0
- package/dist/src/proto/capy/botauth/public_pb.js +105 -0
- package/dist/src/proto/capy/botmsg/botmsg_connect.d.ts +72 -0
- package/dist/src/proto/capy/botmsg/botmsg_connect.js +72 -0
- package/dist/src/proto/capy/botmsg/botmsg_pb.d.ts +426 -0
- package/dist/src/proto/capy/botmsg/botmsg_pb.js +160 -0
- package/dist/src/proto/capy/botway/ctrl_connect.d.ts +61 -0
- package/dist/src/proto/capy/botway/ctrl_connect.js +61 -0
- package/dist/src/proto/capy/botway/ctrl_pb.d.ts +267 -0
- package/dist/src/proto/capy/botway/ctrl_pb.js +120 -0
- package/dist/src/proto/capy/botway/stream_connect.d.ts +26 -0
- package/dist/src/proto/capy/botway/stream_connect.js +26 -0
- package/dist/src/proto/capy/botway/stream_pb.d.ts +495 -0
- package/dist/src/proto/capy/botway/stream_pb.js +165 -0
- package/dist/src/reply-dispatcher.d.ts +17 -0
- package/dist/src/reply-dispatcher.js +234 -0
- package/dist/src/runtime.d.ts +4 -0
- package/dist/src/runtime.js +11 -0
- package/dist/src/send.d.ts +19 -0
- package/dist/src/send.js +66 -0
- package/dist/src/types.d.ts +65 -0
- package/dist/src/types.js +2 -0
- package/dist/src/websocket/cacheEvent.d.ts +17 -0
- package/dist/src/websocket/cacheEvent.js +61 -0
- package/dist/src/websocket/connect.d.ts +32 -0
- package/dist/src/websocket/connect.js +79 -0
- package/dist/src/websocket/constant.d.ts +8 -0
- package/dist/src/websocket/constant.js +10 -0
- package/dist/src/websocket/eventBus.d.ts +15 -0
- package/dist/src/websocket/eventBus.js +46 -0
- package/dist/src/websocket/index.d.ts +117 -0
- package/dist/src/websocket/index.js +637 -0
- package/dist/src/websocket/service.d.ts +36 -0
- package/dist/src/websocket/service.js +4 -0
- package/dist/src/websocket/stream.d.ts +10 -0
- package/dist/src/websocket/stream.js +24 -0
- package/dist/src/websocket/streamConnect.d.ts +40 -0
- package/dist/src/websocket/streamConnect.js +48 -0
- package/openclaw.plugin.json +23 -0
- package/package.json +69 -0
- package/scripts/setup.mjs +381 -0
- package/scripts/switch-env.mjs +98 -0
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v1.8.0 with parameter "target=js+dts"
|
|
2
|
+
// @generated from file capy/botway/stream.proto (package step.capy.botway, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
|
|
6
|
+
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
7
|
+
import { Message, proto3 } from "@bufbuild/protobuf";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @generated from message step.capy.botway.Head
|
|
11
|
+
*/
|
|
12
|
+
export declare class Head extends Message<Head> {
|
|
13
|
+
/**
|
|
14
|
+
* 包体数据类型,0=text, 1=pb
|
|
15
|
+
*
|
|
16
|
+
* @generated from field: uint32 frame_type = 1;
|
|
17
|
+
*/
|
|
18
|
+
frameType: number;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 0=上行req,1=上行req的回包rsp,2=下行的push,3=下行push的回包(ack),4=上行req异常回包
|
|
22
|
+
*
|
|
23
|
+
* @generated from field: uint32 msg_type = 2;
|
|
24
|
+
*/
|
|
25
|
+
msgType: number;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 消息id,用于确定上行req/rsp的对应关系,以及push的唯一消息id。基于uuid生成
|
|
29
|
+
*
|
|
30
|
+
* @generated from field: string msg_id = 3;
|
|
31
|
+
*/
|
|
32
|
+
msgId: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 模块名,用于上行请求分发路由
|
|
36
|
+
*
|
|
37
|
+
* @generated from field: string module = 4;
|
|
38
|
+
*/
|
|
39
|
+
module: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 方法名,与module组合确定唯一的RPC
|
|
43
|
+
*
|
|
44
|
+
* @generated from field: string command = 5;
|
|
45
|
+
*/
|
|
46
|
+
command: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 保留字段
|
|
50
|
+
*
|
|
51
|
+
* @generated from field: map<string, string> reserved = 6;
|
|
52
|
+
*/
|
|
53
|
+
reserved: { [key: string]: string };
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 会话的session_id
|
|
57
|
+
*
|
|
58
|
+
* @generated from field: string session_id = 7;
|
|
59
|
+
*/
|
|
60
|
+
sessionId: string;
|
|
61
|
+
|
|
62
|
+
constructor(data?: PartialMessage<Head>);
|
|
63
|
+
|
|
64
|
+
static readonly runtime: typeof proto3;
|
|
65
|
+
static readonly typeName = "step.capy.botway.Head";
|
|
66
|
+
static readonly fields: FieldList;
|
|
67
|
+
|
|
68
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Head;
|
|
69
|
+
|
|
70
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Head;
|
|
71
|
+
|
|
72
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Head;
|
|
73
|
+
|
|
74
|
+
static equals(a: Head | PlainMessage<Head> | undefined, b: Head | PlainMessage<Head> | undefined): boolean;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* 消息体
|
|
79
|
+
*
|
|
80
|
+
* @generated from message step.capy.botway.StreamMsg
|
|
81
|
+
*/
|
|
82
|
+
export declare class StreamMsg extends Message<StreamMsg> {
|
|
83
|
+
/**
|
|
84
|
+
* @generated from field: step.capy.botway.Head head = 1;
|
|
85
|
+
*/
|
|
86
|
+
head?: Head;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @generated from field: bytes body = 2;
|
|
90
|
+
*/
|
|
91
|
+
body: Uint8Array;
|
|
92
|
+
|
|
93
|
+
constructor(data?: PartialMessage<StreamMsg>);
|
|
94
|
+
|
|
95
|
+
static readonly runtime: typeof proto3;
|
|
96
|
+
static readonly typeName = "step.capy.botway.StreamMsg";
|
|
97
|
+
static readonly fields: FieldList;
|
|
98
|
+
|
|
99
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StreamMsg;
|
|
100
|
+
|
|
101
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StreamMsg;
|
|
102
|
+
|
|
103
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StreamMsg;
|
|
104
|
+
|
|
105
|
+
static equals(a: StreamMsg | PlainMessage<StreamMsg> | undefined, b: StreamMsg | PlainMessage<StreamMsg> | undefined): boolean;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* 长链接鉴权绑定消息,升级websocket后再校验登录态。
|
|
110
|
+
* Module/Command:Stream/Auth
|
|
111
|
+
*
|
|
112
|
+
* @generated from message step.capy.botway.AuthBindReq
|
|
113
|
+
*/
|
|
114
|
+
export declare class AuthBindReq extends Message<AuthBindReq> {
|
|
115
|
+
/**
|
|
116
|
+
* 业务id
|
|
117
|
+
*
|
|
118
|
+
* @generated from field: string product = 1;
|
|
119
|
+
*/
|
|
120
|
+
product: string;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* 用户uid
|
|
124
|
+
*
|
|
125
|
+
* @generated from field: string uid = 2;
|
|
126
|
+
*/
|
|
127
|
+
uid: string;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* 校验的token
|
|
131
|
+
*
|
|
132
|
+
* @generated from field: string token = 3;
|
|
133
|
+
*/
|
|
134
|
+
token: string;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* 校验的token类型
|
|
138
|
+
*
|
|
139
|
+
* @generated from field: string token_type = 4;
|
|
140
|
+
*/
|
|
141
|
+
tokenType: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* 0=所有版本, 1=Web H5, 2=小程序, 3=Android, 4=iPhone,5=QQ 小程序
|
|
145
|
+
*
|
|
146
|
+
* @generated from field: uint32 platform = 5;
|
|
147
|
+
*/
|
|
148
|
+
platform: number;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* 设备名称
|
|
152
|
+
*
|
|
153
|
+
* @generated from field: string device = 6;
|
|
154
|
+
*/
|
|
155
|
+
device: string;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* app版本
|
|
159
|
+
*
|
|
160
|
+
* @generated from field: string app_version = 7;
|
|
161
|
+
*/
|
|
162
|
+
appVersion: string;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* 渠道信息
|
|
166
|
+
*
|
|
167
|
+
* @generated from field: string channel = 8;
|
|
168
|
+
*/
|
|
169
|
+
channel: string;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* 设备id
|
|
173
|
+
*
|
|
174
|
+
* @generated from field: string did = 9;
|
|
175
|
+
*/
|
|
176
|
+
did: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* 保留字段, openid=只有在WX/QQ小程序登录时才传,不传则返回失败
|
|
180
|
+
*
|
|
181
|
+
* @generated from field: map<string, string> reserved = 10;
|
|
182
|
+
*/
|
|
183
|
+
reserved: { [key: string]: string };
|
|
184
|
+
|
|
185
|
+
constructor(data?: PartialMessage<AuthBindReq>);
|
|
186
|
+
|
|
187
|
+
static readonly runtime: typeof proto3;
|
|
188
|
+
static readonly typeName = "step.capy.botway.AuthBindReq";
|
|
189
|
+
static readonly fields: FieldList;
|
|
190
|
+
|
|
191
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AuthBindReq;
|
|
192
|
+
|
|
193
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AuthBindReq;
|
|
194
|
+
|
|
195
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AuthBindReq;
|
|
196
|
+
|
|
197
|
+
static equals(a: AuthBindReq | PlainMessage<AuthBindReq> | undefined, b: AuthBindReq | PlainMessage<AuthBindReq> | undefined): boolean;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* 校验失败,后台直接断开连接。
|
|
202
|
+
*
|
|
203
|
+
* @generated from message step.capy.botway.AuthBindRes
|
|
204
|
+
*/
|
|
205
|
+
export declare class AuthBindRes extends Message<AuthBindRes> {
|
|
206
|
+
/**
|
|
207
|
+
* 0=成功
|
|
208
|
+
*
|
|
209
|
+
* @generated from field: int32 code = 1;
|
|
210
|
+
*/
|
|
211
|
+
code: number;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* 错误提示
|
|
215
|
+
*
|
|
216
|
+
* @generated from field: string error = 2;
|
|
217
|
+
*/
|
|
218
|
+
error: string;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* 当前连接uuid
|
|
222
|
+
*
|
|
223
|
+
* @generated from field: string conn = 4;
|
|
224
|
+
*/
|
|
225
|
+
conn: string;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* 用户uid,以后台返回为准
|
|
229
|
+
*
|
|
230
|
+
* @generated from field: string uid = 5;
|
|
231
|
+
*/
|
|
232
|
+
uid: string;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* 0=匿名 1=登陆
|
|
236
|
+
*
|
|
237
|
+
* @generated from field: int32 logined = 6;
|
|
238
|
+
*/
|
|
239
|
+
logined: number;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* true=当前登录是新用户, false=已注册用户,用于终端埋点汇报
|
|
243
|
+
*
|
|
244
|
+
* @generated from field: bool new = 7;
|
|
245
|
+
*/
|
|
246
|
+
new: boolean;
|
|
247
|
+
|
|
248
|
+
constructor(data?: PartialMessage<AuthBindRes>);
|
|
249
|
+
|
|
250
|
+
static readonly runtime: typeof proto3;
|
|
251
|
+
static readonly typeName = "step.capy.botway.AuthBindRes";
|
|
252
|
+
static readonly fields: FieldList;
|
|
253
|
+
|
|
254
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AuthBindRes;
|
|
255
|
+
|
|
256
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AuthBindRes;
|
|
257
|
+
|
|
258
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AuthBindRes;
|
|
259
|
+
|
|
260
|
+
static equals(a: AuthBindRes | PlainMessage<AuthBindRes> | undefined, b: AuthBindRes | PlainMessage<AuthBindRes> | undefined): boolean;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* 个人中心退出登录,用于状态和信息解绑
|
|
265
|
+
* Module/Command:Stream/Logout
|
|
266
|
+
*
|
|
267
|
+
* @generated from message step.capy.botway.LogoutReq
|
|
268
|
+
*/
|
|
269
|
+
export declare class LogoutReq extends Message<LogoutReq> {
|
|
270
|
+
/**
|
|
271
|
+
* @generated from field: map<string, string> reserved = 1;
|
|
272
|
+
*/
|
|
273
|
+
reserved: { [key: string]: string };
|
|
274
|
+
|
|
275
|
+
constructor(data?: PartialMessage<LogoutReq>);
|
|
276
|
+
|
|
277
|
+
static readonly runtime: typeof proto3;
|
|
278
|
+
static readonly typeName = "step.capy.botway.LogoutReq";
|
|
279
|
+
static readonly fields: FieldList;
|
|
280
|
+
|
|
281
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LogoutReq;
|
|
282
|
+
|
|
283
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LogoutReq;
|
|
284
|
+
|
|
285
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LogoutReq;
|
|
286
|
+
|
|
287
|
+
static equals(a: LogoutReq | PlainMessage<LogoutReq> | undefined, b: LogoutReq | PlainMessage<LogoutReq> | undefined): boolean;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* 长链接鉴权绑定消息,升级websocket后再校验登录态。
|
|
292
|
+
* Module/Command:Stream/Auth
|
|
293
|
+
*
|
|
294
|
+
* @generated from message step.capy.botway.BotAuthBindReq
|
|
295
|
+
*/
|
|
296
|
+
export declare class BotAuthBindReq extends Message<BotAuthBindReq> {
|
|
297
|
+
/**
|
|
298
|
+
* @generated from field: string app_id = 1;
|
|
299
|
+
*/
|
|
300
|
+
appId: string;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* 校验的token
|
|
304
|
+
*
|
|
305
|
+
* @generated from field: string token = 2;
|
|
306
|
+
*/
|
|
307
|
+
token: string;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* 版本
|
|
311
|
+
*
|
|
312
|
+
* @generated from field: string app_version = 3;
|
|
313
|
+
*/
|
|
314
|
+
appVersion: string;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* 保留字段
|
|
318
|
+
*
|
|
319
|
+
* @generated from field: map<string, string> reserved = 100;
|
|
320
|
+
*/
|
|
321
|
+
reserved: { [key: string]: string };
|
|
322
|
+
|
|
323
|
+
constructor(data?: PartialMessage<BotAuthBindReq>);
|
|
324
|
+
|
|
325
|
+
static readonly runtime: typeof proto3;
|
|
326
|
+
static readonly typeName = "step.capy.botway.BotAuthBindReq";
|
|
327
|
+
static readonly fields: FieldList;
|
|
328
|
+
|
|
329
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BotAuthBindReq;
|
|
330
|
+
|
|
331
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BotAuthBindReq;
|
|
332
|
+
|
|
333
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BotAuthBindReq;
|
|
334
|
+
|
|
335
|
+
static equals(a: BotAuthBindReq | PlainMessage<BotAuthBindReq> | undefined, b: BotAuthBindReq | PlainMessage<BotAuthBindReq> | undefined): boolean;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* 校验失败,后台直接断开连接。
|
|
340
|
+
*
|
|
341
|
+
* @generated from message step.capy.botway.BotAuthBindRes
|
|
342
|
+
*/
|
|
343
|
+
export declare class BotAuthBindRes extends Message<BotAuthBindRes> {
|
|
344
|
+
/**
|
|
345
|
+
* 0=成功
|
|
346
|
+
*
|
|
347
|
+
* @generated from field: int32 code = 1;
|
|
348
|
+
*/
|
|
349
|
+
code: number;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* 错误提示
|
|
353
|
+
*
|
|
354
|
+
* @generated from field: string error = 2;
|
|
355
|
+
*/
|
|
356
|
+
error: string;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* 当前连接uuid
|
|
360
|
+
*
|
|
361
|
+
* @generated from field: string conn = 4;
|
|
362
|
+
*/
|
|
363
|
+
conn: string;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* 用户uid,以后台返回为准
|
|
367
|
+
*
|
|
368
|
+
* @generated from field: string uid = 5;
|
|
369
|
+
*/
|
|
370
|
+
uid: string;
|
|
371
|
+
|
|
372
|
+
constructor(data?: PartialMessage<BotAuthBindRes>);
|
|
373
|
+
|
|
374
|
+
static readonly runtime: typeof proto3;
|
|
375
|
+
static readonly typeName = "step.capy.botway.BotAuthBindRes";
|
|
376
|
+
static readonly fields: FieldList;
|
|
377
|
+
|
|
378
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BotAuthBindRes;
|
|
379
|
+
|
|
380
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BotAuthBindRes;
|
|
381
|
+
|
|
382
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BotAuthBindRes;
|
|
383
|
+
|
|
384
|
+
static equals(a: BotAuthBindRes | PlainMessage<BotAuthBindRes> | undefined, b: BotAuthBindRes | PlainMessage<BotAuthBindRes> | undefined): boolean;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Module/Command:Stream/Logout
|
|
389
|
+
*
|
|
390
|
+
* @generated from message step.capy.botway.BotLogoutReq
|
|
391
|
+
*/
|
|
392
|
+
export declare class BotLogoutReq extends Message<BotLogoutReq> {
|
|
393
|
+
/**
|
|
394
|
+
* @generated from field: map<string, string> reserved = 1;
|
|
395
|
+
*/
|
|
396
|
+
reserved: { [key: string]: string };
|
|
397
|
+
|
|
398
|
+
constructor(data?: PartialMessage<BotLogoutReq>);
|
|
399
|
+
|
|
400
|
+
static readonly runtime: typeof proto3;
|
|
401
|
+
static readonly typeName = "step.capy.botway.BotLogoutReq";
|
|
402
|
+
static readonly fields: FieldList;
|
|
403
|
+
|
|
404
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BotLogoutReq;
|
|
405
|
+
|
|
406
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BotLogoutReq;
|
|
407
|
+
|
|
408
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BotLogoutReq;
|
|
409
|
+
|
|
410
|
+
static equals(a: BotLogoutReq | PlainMessage<BotLogoutReq> | undefined, b: BotLogoutReq | PlainMessage<BotLogoutReq> | undefined): boolean;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* 长连接心跳包。上行请求直接是空包
|
|
415
|
+
* Module/Command: Stream/Heartbeat
|
|
416
|
+
*
|
|
417
|
+
* @generated from message step.capy.botway.HeartbeatReq
|
|
418
|
+
*/
|
|
419
|
+
export declare class HeartbeatReq extends Message<HeartbeatReq> {
|
|
420
|
+
constructor(data?: PartialMessage<HeartbeatReq>);
|
|
421
|
+
|
|
422
|
+
static readonly runtime: typeof proto3;
|
|
423
|
+
static readonly typeName = "step.capy.botway.HeartbeatReq";
|
|
424
|
+
static readonly fields: FieldList;
|
|
425
|
+
|
|
426
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HeartbeatReq;
|
|
427
|
+
|
|
428
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HeartbeatReq;
|
|
429
|
+
|
|
430
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HeartbeatReq;
|
|
431
|
+
|
|
432
|
+
static equals(a: HeartbeatReq | PlainMessage<HeartbeatReq> | undefined, b: HeartbeatReq | PlainMessage<HeartbeatReq> | undefined): boolean;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* @generated from message step.capy.botway.HeartbeatRes
|
|
437
|
+
*/
|
|
438
|
+
export declare class HeartbeatRes extends Message<HeartbeatRes> {
|
|
439
|
+
/**
|
|
440
|
+
* 下次心跳间隔,单位秒。间隔由后台来控制
|
|
441
|
+
*
|
|
442
|
+
* @generated from field: uint32 interval = 1;
|
|
443
|
+
*/
|
|
444
|
+
interval: number;
|
|
445
|
+
|
|
446
|
+
constructor(data?: PartialMessage<HeartbeatRes>);
|
|
447
|
+
|
|
448
|
+
static readonly runtime: typeof proto3;
|
|
449
|
+
static readonly typeName = "step.capy.botway.HeartbeatRes";
|
|
450
|
+
static readonly fields: FieldList;
|
|
451
|
+
|
|
452
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HeartbeatRes;
|
|
453
|
+
|
|
454
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HeartbeatRes;
|
|
455
|
+
|
|
456
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HeartbeatRes;
|
|
457
|
+
|
|
458
|
+
static equals(a: HeartbeatRes | PlainMessage<HeartbeatRes> | undefined, b: HeartbeatRes | PlainMessage<HeartbeatRes> | undefined): boolean;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* 上行req异常错误回包
|
|
463
|
+
*
|
|
464
|
+
* @generated from message step.capy.botway.ErrorRes
|
|
465
|
+
*/
|
|
466
|
+
export declare class ErrorRes extends Message<ErrorRes> {
|
|
467
|
+
/**
|
|
468
|
+
* 错误状态码
|
|
469
|
+
*
|
|
470
|
+
* @generated from field: int32 code = 1;
|
|
471
|
+
*/
|
|
472
|
+
code: number;
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* 错误信息
|
|
476
|
+
*
|
|
477
|
+
* @generated from field: string reason = 2;
|
|
478
|
+
*/
|
|
479
|
+
reason: string;
|
|
480
|
+
|
|
481
|
+
constructor(data?: PartialMessage<ErrorRes>);
|
|
482
|
+
|
|
483
|
+
static readonly runtime: typeof proto3;
|
|
484
|
+
static readonly typeName = "step.capy.botway.ErrorRes";
|
|
485
|
+
static readonly fields: FieldList;
|
|
486
|
+
|
|
487
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ErrorRes;
|
|
488
|
+
|
|
489
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ErrorRes;
|
|
490
|
+
|
|
491
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ErrorRes;
|
|
492
|
+
|
|
493
|
+
static equals(a: ErrorRes | PlainMessage<ErrorRes> | undefined, b: ErrorRes | PlainMessage<ErrorRes> | undefined): boolean;
|
|
494
|
+
}
|
|
495
|
+
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v1.8.0 with parameter "target=js+dts"
|
|
2
|
+
// @generated from file capy/botway/stream.proto (package step.capy.botway, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
|
|
6
|
+
import { proto3 } from "@bufbuild/protobuf";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @generated from message step.capy.botway.Head
|
|
10
|
+
*/
|
|
11
|
+
export const Head = /*@__PURE__*/ proto3.makeMessageType(
|
|
12
|
+
"step.capy.botway.Head",
|
|
13
|
+
() => [
|
|
14
|
+
{ no: 1, name: "frame_type", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
|
|
15
|
+
{ no: 2, name: "msg_type", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
|
|
16
|
+
{ no: 3, name: "msg_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
17
|
+
{ no: 4, name: "module", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
18
|
+
{ no: 5, name: "command", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
19
|
+
{ no: 6, name: "reserved", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
20
|
+
{ no: 7, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
21
|
+
],
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 消息体
|
|
26
|
+
*
|
|
27
|
+
* @generated from message step.capy.botway.StreamMsg
|
|
28
|
+
*/
|
|
29
|
+
export const StreamMsg = /*@__PURE__*/ proto3.makeMessageType(
|
|
30
|
+
"step.capy.botway.StreamMsg",
|
|
31
|
+
() => [
|
|
32
|
+
{ no: 1, name: "head", kind: "message", T: Head },
|
|
33
|
+
{ no: 2, name: "body", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
34
|
+
],
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 长链接鉴权绑定消息,升级websocket后再校验登录态。
|
|
39
|
+
* Module/Command:Stream/Auth
|
|
40
|
+
*
|
|
41
|
+
* @generated from message step.capy.botway.AuthBindReq
|
|
42
|
+
*/
|
|
43
|
+
export const AuthBindReq = /*@__PURE__*/ proto3.makeMessageType(
|
|
44
|
+
"step.capy.botway.AuthBindReq",
|
|
45
|
+
() => [
|
|
46
|
+
{ no: 1, name: "product", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
47
|
+
{ no: 2, name: "uid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
48
|
+
{ no: 3, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
49
|
+
{ no: 4, name: "token_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
50
|
+
{ no: 5, name: "platform", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
|
|
51
|
+
{ no: 6, name: "device", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
52
|
+
{ no: 7, name: "app_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
53
|
+
{ no: 8, name: "channel", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
54
|
+
{ no: 9, name: "did", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
55
|
+
{ no: 10, name: "reserved", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
56
|
+
],
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 校验失败,后台直接断开连接。
|
|
61
|
+
*
|
|
62
|
+
* @generated from message step.capy.botway.AuthBindRes
|
|
63
|
+
*/
|
|
64
|
+
export const AuthBindRes = /*@__PURE__*/ proto3.makeMessageType(
|
|
65
|
+
"step.capy.botway.AuthBindRes",
|
|
66
|
+
() => [
|
|
67
|
+
{ no: 1, name: "code", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
68
|
+
{ no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
69
|
+
{ no: 4, name: "conn", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
70
|
+
{ no: 5, name: "uid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
71
|
+
{ no: 6, name: "logined", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
72
|
+
{ no: 7, name: "new", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
73
|
+
],
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* 个人中心退出登录,用于状态和信息解绑
|
|
78
|
+
* Module/Command:Stream/Logout
|
|
79
|
+
*
|
|
80
|
+
* @generated from message step.capy.botway.LogoutReq
|
|
81
|
+
*/
|
|
82
|
+
export const LogoutReq = /*@__PURE__*/ proto3.makeMessageType(
|
|
83
|
+
"step.capy.botway.LogoutReq",
|
|
84
|
+
() => [
|
|
85
|
+
{ no: 1, name: "reserved", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
86
|
+
],
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* 长链接鉴权绑定消息,升级websocket后再校验登录态。
|
|
91
|
+
* Module/Command:Stream/Auth
|
|
92
|
+
*
|
|
93
|
+
* @generated from message step.capy.botway.BotAuthBindReq
|
|
94
|
+
*/
|
|
95
|
+
export const BotAuthBindReq = /*@__PURE__*/ proto3.makeMessageType(
|
|
96
|
+
"step.capy.botway.BotAuthBindReq",
|
|
97
|
+
() => [
|
|
98
|
+
{ no: 1, name: "app_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
99
|
+
{ no: 2, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
100
|
+
{ no: 3, name: "app_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
101
|
+
{ no: 100, name: "reserved", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
102
|
+
],
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 校验失败,后台直接断开连接。
|
|
107
|
+
*
|
|
108
|
+
* @generated from message step.capy.botway.BotAuthBindRes
|
|
109
|
+
*/
|
|
110
|
+
export const BotAuthBindRes = /*@__PURE__*/ proto3.makeMessageType(
|
|
111
|
+
"step.capy.botway.BotAuthBindRes",
|
|
112
|
+
() => [
|
|
113
|
+
{ no: 1, name: "code", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
114
|
+
{ no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
115
|
+
{ no: 4, name: "conn", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
116
|
+
{ no: 5, name: "uid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
117
|
+
],
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Module/Command:Stream/Logout
|
|
122
|
+
*
|
|
123
|
+
* @generated from message step.capy.botway.BotLogoutReq
|
|
124
|
+
*/
|
|
125
|
+
export const BotLogoutReq = /*@__PURE__*/ proto3.makeMessageType(
|
|
126
|
+
"step.capy.botway.BotLogoutReq",
|
|
127
|
+
() => [
|
|
128
|
+
{ no: 1, name: "reserved", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
129
|
+
],
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* 长连接心跳包。上行请求直接是空包
|
|
134
|
+
* Module/Command: Stream/Heartbeat
|
|
135
|
+
*
|
|
136
|
+
* @generated from message step.capy.botway.HeartbeatReq
|
|
137
|
+
*/
|
|
138
|
+
export const HeartbeatReq = /*@__PURE__*/ proto3.makeMessageType(
|
|
139
|
+
"step.capy.botway.HeartbeatReq",
|
|
140
|
+
[],
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @generated from message step.capy.botway.HeartbeatRes
|
|
145
|
+
*/
|
|
146
|
+
export const HeartbeatRes = /*@__PURE__*/ proto3.makeMessageType(
|
|
147
|
+
"step.capy.botway.HeartbeatRes",
|
|
148
|
+
() => [
|
|
149
|
+
{ no: 1, name: "interval", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
|
|
150
|
+
],
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* 上行req异常错误回包
|
|
155
|
+
*
|
|
156
|
+
* @generated from message step.capy.botway.ErrorRes
|
|
157
|
+
*/
|
|
158
|
+
export const ErrorRes = /*@__PURE__*/ proto3.makeMessageType(
|
|
159
|
+
"step.capy.botway.ErrorRes",
|
|
160
|
+
() => [
|
|
161
|
+
{ no: 1, name: "code", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
162
|
+
{ no: 2, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
163
|
+
],
|
|
164
|
+
);
|
|
165
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { OpenClawConfig } from "openclaw/plugin-sdk";
|
|
2
|
+
export type CreateStepfunReplyDispatcherParams = {
|
|
3
|
+
cfg: OpenClawConfig;
|
|
4
|
+
agentId: string;
|
|
5
|
+
runtime: {
|
|
6
|
+
log?: (message: string) => void;
|
|
7
|
+
error?: (message: string) => void;
|
|
8
|
+
};
|
|
9
|
+
chatSessionId: string;
|
|
10
|
+
accountId?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function createStepfunReplyDispatcher(params: CreateStepfunReplyDispatcherParams): {
|
|
13
|
+
dispatcher: any;
|
|
14
|
+
replyOptions: any;
|
|
15
|
+
markDispatchIdle: () => void;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=reply-dispatcher.d.ts.map
|