@xisui-pa/chatserver 1.0.0 → 1.1.0
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 +142 -39
- package/dist/index.js +1670 -569
- package/dist/index.js.map +1 -1
- package/dist/models/chatserver-models.js +116 -59
- package/dist/models/chatserver-models.js.map +1 -1
- package/package.json +1 -1
- package/schemas/config.schema.json +14 -13
- package/schemas/models.schema.json +2 -2
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"duration": {
|
|
44
44
|
"type": "integer",
|
|
45
45
|
"minimum": 1,
|
|
46
|
-
"maximum":
|
|
46
|
+
"maximum": 3600000
|
|
47
47
|
},
|
|
48
48
|
"chat": {
|
|
49
49
|
"type": "object",
|
|
@@ -221,9 +221,17 @@
|
|
|
221
221
|
"type": "string",
|
|
222
222
|
"format": "uri",
|
|
223
223
|
"pattern": "^https?://[^/?#@\\s]+(?:/[^?#\\s]*)?$",
|
|
224
|
-
"description": "agent-wechat HTTP(S) server root, without credentials, query, or fragment.",
|
|
224
|
+
"description": "agent-wechat HTTP(S) server root, entered without `/v1` (routes add the API prefix; a trailing `/v1` is stripped), and without credentials, query, or fragment.",
|
|
225
225
|
"default": "http://127.0.0.1:6174"
|
|
226
226
|
},
|
|
227
|
+
"accountId": {
|
|
228
|
+
"description": "Daemon account ID from GET /v1/accounts (not a WeChat username). Omit to use the only authenticated account; multiple authenticated accounts are rejected as ambiguous.",
|
|
229
|
+
"allOf": [
|
|
230
|
+
{
|
|
231
|
+
"$ref": "#/definitions/nonEmptyString"
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
},
|
|
227
235
|
"tokenEnv": {
|
|
228
236
|
"description": "Environment variable containing the bearer token; takes precedence over tokenFile.",
|
|
229
237
|
"default": "AGENT_WECHAT_TOKEN",
|
|
@@ -248,9 +256,9 @@
|
|
|
248
256
|
"$ref": "#/definitions/nonEmptyString"
|
|
249
257
|
}
|
|
250
258
|
},
|
|
251
|
-
"
|
|
252
|
-
"description": "
|
|
253
|
-
"default":
|
|
259
|
+
"reconnectIntervalMs": {
|
|
260
|
+
"description": "Base delay before reconnecting the WeChat event stream, in milliseconds. Consecutive failures double the delay up to a bounded cap.",
|
|
261
|
+
"default": 1000,
|
|
254
262
|
"allOf": [
|
|
255
263
|
{
|
|
256
264
|
"$ref": "#/definitions/duration"
|
|
@@ -258,20 +266,13 @@
|
|
|
258
266
|
]
|
|
259
267
|
},
|
|
260
268
|
"timeoutMs": {
|
|
261
|
-
"description": "Timeout for each WeChat REST request in milliseconds; independent of model timeouts.",
|
|
269
|
+
"description": "Timeout for each WeChat REST request and for opening or waiting on the event stream, in milliseconds; independent of model timeouts.",
|
|
262
270
|
"default": 30000,
|
|
263
271
|
"allOf": [
|
|
264
272
|
{
|
|
265
273
|
"$ref": "#/definitions/duration"
|
|
266
274
|
}
|
|
267
275
|
]
|
|
268
|
-
},
|
|
269
|
-
"bundleGapMs": {
|
|
270
|
-
"type": "integer",
|
|
271
|
-
"minimum": 0,
|
|
272
|
-
"maximum": 2147483647,
|
|
273
|
-
"description": "Maximum timestamp gap between adjacent messages from the same sender, in milliseconds. Zero disables bundling.",
|
|
274
|
-
"default": 10000
|
|
275
276
|
}
|
|
276
277
|
}
|
|
277
278
|
},
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"timeoutMs": {
|
|
57
57
|
"type": "integer",
|
|
58
58
|
"minimum": 1,
|
|
59
|
-
"maximum":
|
|
59
|
+
"maximum": 3600000,
|
|
60
60
|
"description": "Timeout in milliseconds for this provider's model requests. For repliers with tools, also caps the complete model/tool cycle.",
|
|
61
|
-
"default":
|
|
61
|
+
"default": 300000
|
|
62
62
|
},
|
|
63
63
|
"models": {
|
|
64
64
|
"type": "array",
|