@celljs/ta-bots 4.18.0 → 4.20.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/extension/index.mjs +16 -0
- package/host/index.mjs +19 -0
- package/package.json +3 -3
package/extension/index.mjs
CHANGED
|
@@ -543,6 +543,22 @@ var TaHostUtil;
|
|
|
543
543
|
}
|
|
544
544
|
TaHostUtil2.role = role;
|
|
545
545
|
})(TaHostUtil || (TaHostUtil = {}));
|
|
546
|
+
var TA_DOUBLE_LOOK = {
|
|
547
|
+
name: "@celljs/ta-web",
|
|
548
|
+
key: "assistant.species",
|
|
549
|
+
given: ["trex", "triceratops", "stegosaurus", "brachiosaurus", "velociraptor", "ankylosaurus", "pteranodon", "parasaurolophus"]
|
|
550
|
+
};
|
|
551
|
+
var TaDoubleLookUtil;
|
|
552
|
+
(function(TaDoubleLookUtil2) {
|
|
553
|
+
function given(id) {
|
|
554
|
+
let hash = 2166136261;
|
|
555
|
+
for (let i = 0;i < id.length; i++) {
|
|
556
|
+
hash = Math.imul(hash ^ id.charCodeAt(i), 16777619);
|
|
557
|
+
}
|
|
558
|
+
return TA_DOUBLE_LOOK.given[(hash >>> 0) % TA_DOUBLE_LOOK.given.length];
|
|
559
|
+
}
|
|
560
|
+
TaDoubleLookUtil2.given = given;
|
|
561
|
+
})(TaDoubleLookUtil || (TaDoubleLookUtil = {}));
|
|
546
562
|
var TA_ASK_ENTRY = "ta-ask";
|
|
547
563
|
var TaAskUtil;
|
|
548
564
|
(function(TaAskUtil2) {
|
package/host/index.mjs
CHANGED
|
@@ -281,6 +281,8 @@ var BotServerTexts;
|
|
|
281
281
|
var TaAccessServer = Symbol("TaAccessServer");
|
|
282
282
|
var TA_SIGN_IN_PATH = "/sign-in";
|
|
283
283
|
var TA_DEVICE_SIGN_IN_PATH = `${TA_SIGN_IN_PATH}/device`;
|
|
284
|
+
// ../ta-protocol/esm/common/account-protocol.js
|
|
285
|
+
var TaAccountServer = Symbol("TaAccountServer");
|
|
284
286
|
// ../ta-protocol/esm/common/ta-extension-host.js
|
|
285
287
|
var TA_WEBHOOK_MAX_BYTES = 256 * 1024;
|
|
286
288
|
var TA_HOST_EVENT = "ta:host";
|
|
@@ -334,6 +336,22 @@ var TaHostUtil;
|
|
|
334
336
|
TaHostUtil2.role = role;
|
|
335
337
|
})(TaHostUtil || (TaHostUtil = {}));
|
|
336
338
|
var TA_DOUBLE_FILE = { name: "@celljs/ta-web", key: "assistant.file" };
|
|
339
|
+
var TA_DOUBLE_LOOK = {
|
|
340
|
+
name: "@celljs/ta-web",
|
|
341
|
+
key: "assistant.species",
|
|
342
|
+
given: ["trex", "triceratops", "stegosaurus", "brachiosaurus", "velociraptor", "ankylosaurus", "pteranodon", "parasaurolophus"]
|
|
343
|
+
};
|
|
344
|
+
var TaDoubleLookUtil;
|
|
345
|
+
(function(TaDoubleLookUtil2) {
|
|
346
|
+
function given(id) {
|
|
347
|
+
let hash = 2166136261;
|
|
348
|
+
for (let i = 0;i < id.length; i++) {
|
|
349
|
+
hash = Math.imul(hash ^ id.charCodeAt(i), 16777619);
|
|
350
|
+
}
|
|
351
|
+
return TA_DOUBLE_LOOK.given[(hash >>> 0) % TA_DOUBLE_LOOK.given.length];
|
|
352
|
+
}
|
|
353
|
+
TaDoubleLookUtil2.given = given;
|
|
354
|
+
})(TaDoubleLookUtil || (TaDoubleLookUtil = {}));
|
|
337
355
|
var TA_ASK_ENTRY = "ta-ask";
|
|
338
356
|
var TaAskUtil;
|
|
339
357
|
(function(TaAskUtil2) {
|
|
@@ -1424,6 +1442,7 @@ var TaRelayServer = Symbol("TaRelayServer");
|
|
|
1424
1442
|
var TaRemoteServer = Symbol("TaRemoteServer");
|
|
1425
1443
|
// ../ta-protocol/esm/common/room-protocol.js
|
|
1426
1444
|
var TaRoomServer = Symbol("TaRoomServer");
|
|
1445
|
+
var TA_PICTURE = { key: "picture:", maxChars: 16 * 1024 };
|
|
1427
1446
|
var TaRoomWatchUtil;
|
|
1428
1447
|
(function(TaRoomWatchUtil2) {
|
|
1429
1448
|
function of(messages, state) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-bots",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.20.0",
|
|
4
4
|
"description": "A pi package for Ta: bots of WeChat (ClawBot) and WeCom connected to the double, an agent or a conversation, messages and files both ways",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@celljs/ta-protocol": "4.
|
|
31
|
-
"@celljs/ta-web": "4.
|
|
30
|
+
"@celljs/ta-protocol": "4.20.0",
|
|
31
|
+
"@celljs/ta-web": "4.20.0",
|
|
32
32
|
"@types/react": "^19.3.0"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|