@ryantest/openclaw-qqbot 0.0.1
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 +22 -0
- package/README.md +483 -0
- package/README.zh.md +478 -0
- package/bin/qqbot-cli.js +243 -0
- package/clawdbot.plugin.json +16 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +26 -0
- package/dist/src/admin-resolver.d.ts +27 -0
- package/dist/src/admin-resolver.js +122 -0
- package/dist/src/api.d.ts +156 -0
- package/dist/src/api.js +599 -0
- package/dist/src/channel.d.ts +11 -0
- package/dist/src/channel.js +354 -0
- package/dist/src/config.d.ts +25 -0
- package/dist/src/config.js +161 -0
- package/dist/src/credential-backup.d.ts +31 -0
- package/dist/src/credential-backup.js +66 -0
- package/dist/src/gateway.d.ts +18 -0
- package/dist/src/gateway.js +1265 -0
- package/dist/src/image-server.d.ts +68 -0
- package/dist/src/image-server.js +462 -0
- package/dist/src/inbound-attachments.d.ts +58 -0
- package/dist/src/inbound-attachments.js +234 -0
- package/dist/src/known-users.d.ts +100 -0
- package/dist/src/known-users.js +263 -0
- package/dist/src/message-queue.d.ts +50 -0
- package/dist/src/message-queue.js +115 -0
- package/dist/src/onboarding.d.ts +10 -0
- package/dist/src/onboarding.js +203 -0
- package/dist/src/outbound-deliver.d.ts +48 -0
- package/dist/src/outbound-deliver.js +462 -0
- package/dist/src/outbound.d.ts +203 -0
- package/dist/src/outbound.js +1102 -0
- package/dist/src/proactive.d.ts +170 -0
- package/dist/src/proactive.js +399 -0
- package/dist/src/ref-index-store.d.ts +70 -0
- package/dist/src/ref-index-store.js +273 -0
- package/dist/src/reply-dispatcher.d.ts +35 -0
- package/dist/src/reply-dispatcher.js +311 -0
- package/dist/src/runtime.d.ts +3 -0
- package/dist/src/runtime.js +10 -0
- package/dist/src/session-store.d.ts +52 -0
- package/dist/src/session-store.js +254 -0
- package/dist/src/slash-commands.d.ts +71 -0
- package/dist/src/slash-commands.js +1179 -0
- package/dist/src/startup-greeting.d.ts +30 -0
- package/dist/src/startup-greeting.js +78 -0
- package/dist/src/stt.d.ts +21 -0
- package/dist/src/stt.js +70 -0
- package/dist/src/tools/channel.d.ts +16 -0
- package/dist/src/tools/channel.js +234 -0
- package/dist/src/tools/remind.d.ts +2 -0
- package/dist/src/tools/remind.js +247 -0
- package/dist/src/types.d.ts +175 -0
- package/dist/src/types.js +1 -0
- package/dist/src/typing-keepalive.d.ts +27 -0
- package/dist/src/typing-keepalive.js +64 -0
- package/dist/src/update-checker.d.ts +34 -0
- package/dist/src/update-checker.js +166 -0
- package/dist/src/user-messages.d.ts +8 -0
- package/dist/src/user-messages.js +8 -0
- package/dist/src/utils/audio-convert.d.ts +89 -0
- package/dist/src/utils/audio-convert.js +704 -0
- package/dist/src/utils/file-utils.d.ts +55 -0
- package/dist/src/utils/file-utils.js +150 -0
- package/dist/src/utils/image-size.d.ts +51 -0
- package/dist/src/utils/image-size.js +234 -0
- package/dist/src/utils/media-tags.d.ts +14 -0
- package/dist/src/utils/media-tags.js +164 -0
- package/dist/src/utils/payload.d.ts +112 -0
- package/dist/src/utils/payload.js +186 -0
- package/dist/src/utils/platform.d.ts +137 -0
- package/dist/src/utils/platform.js +390 -0
- package/dist/src/utils/text-parsing.d.ts +32 -0
- package/dist/src/utils/text-parsing.js +80 -0
- package/dist/src/utils/upload-cache.d.ts +34 -0
- package/dist/src/utils/upload-cache.js +93 -0
- package/index.ts +31 -0
- package/moltbot.plugin.json +16 -0
- package/node_modules/@eshaz/web-worker/LICENSE +201 -0
- package/node_modules/@eshaz/web-worker/README.md +134 -0
- package/node_modules/@eshaz/web-worker/browser.js +17 -0
- package/node_modules/@eshaz/web-worker/cjs/browser.js +16 -0
- package/node_modules/@eshaz/web-worker/cjs/node.js +219 -0
- package/node_modules/@eshaz/web-worker/index.d.ts +4 -0
- package/node_modules/@eshaz/web-worker/node.js +223 -0
- package/node_modules/@eshaz/web-worker/package.json +54 -0
- package/node_modules/@wasm-audio-decoders/common/index.js +5 -0
- package/node_modules/@wasm-audio-decoders/common/package.json +36 -0
- package/node_modules/@wasm-audio-decoders/common/src/WASMAudioDecoderCommon.js +231 -0
- package/node_modules/@wasm-audio-decoders/common/src/WASMAudioDecoderWorker.js +129 -0
- package/node_modules/@wasm-audio-decoders/common/src/puff/README +67 -0
- package/node_modules/@wasm-audio-decoders/common/src/puff/build_puff.js +31 -0
- package/node_modules/@wasm-audio-decoders/common/src/puff/puff.c +863 -0
- package/node_modules/@wasm-audio-decoders/common/src/puff/puff.h +35 -0
- package/node_modules/@wasm-audio-decoders/common/src/utilities.js +3 -0
- package/node_modules/@wasm-audio-decoders/common/types.d.ts +7 -0
- package/node_modules/mpg123-decoder/README.md +265 -0
- package/node_modules/mpg123-decoder/dist/mpg123-decoder.min.js +185 -0
- package/node_modules/mpg123-decoder/dist/mpg123-decoder.min.js.map +1 -0
- package/node_modules/mpg123-decoder/index.js +8 -0
- package/node_modules/mpg123-decoder/package.json +58 -0
- package/node_modules/mpg123-decoder/src/EmscriptenWasm.js +464 -0
- package/node_modules/mpg123-decoder/src/MPEGDecoder.js +200 -0
- package/node_modules/mpg123-decoder/src/MPEGDecoderWebWorker.js +21 -0
- package/node_modules/mpg123-decoder/types.d.ts +30 -0
- package/node_modules/silk-wasm/LICENSE +21 -0
- package/node_modules/silk-wasm/README.md +85 -0
- package/node_modules/silk-wasm/lib/index.cjs +16 -0
- package/node_modules/silk-wasm/lib/index.d.ts +70 -0
- package/node_modules/silk-wasm/lib/index.mjs +16 -0
- package/node_modules/silk-wasm/lib/silk.wasm +0 -0
- package/node_modules/silk-wasm/lib/utils.d.ts +4 -0
- package/node_modules/silk-wasm/package.json +39 -0
- package/node_modules/simple-yenc/.github/FUNDING.yml +1 -0
- package/node_modules/simple-yenc/.prettierignore +1 -0
- package/node_modules/simple-yenc/LICENSE +7 -0
- package/node_modules/simple-yenc/README.md +163 -0
- package/node_modules/simple-yenc/dist/esm.js +1 -0
- package/node_modules/simple-yenc/dist/index.js +1 -0
- package/node_modules/simple-yenc/package.json +50 -0
- package/node_modules/simple-yenc/rollup.config.js +27 -0
- package/node_modules/simple-yenc/src/simple-yenc.js +302 -0
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +13 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +19 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/node_modules/ws/lib/receiver.js +706 -0
- package/node_modules/ws/lib/sender.js +602 -0
- package/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +554 -0
- package/node_modules/ws/lib/websocket.js +1393 -0
- package/node_modules/ws/package.json +69 -0
- package/node_modules/ws/wrapper.mjs +8 -0
- package/openclaw.plugin.json +16 -0
- package/package.json +76 -0
- package/scripts/cleanup-legacy-plugins.sh +124 -0
- package/scripts/proactive-api-server.ts +369 -0
- package/scripts/send-proactive.ts +293 -0
- package/scripts/set-markdown.sh +156 -0
- package/scripts/test-sendmedia.ts +116 -0
- package/scripts/upgrade-via-alt-pkg.sh +307 -0
- package/scripts/upgrade-via-npm.ps1 +296 -0
- package/scripts/upgrade-via-npm.sh +301 -0
- package/scripts/upgrade-via-source.sh +774 -0
- package/skills/qqbot-channel/SKILL.md +263 -0
- package/skills/qqbot-channel/references/api_references.md +521 -0
- package/skills/qqbot-media/SKILL.md +56 -0
- package/skills/qqbot-remind/SKILL.md +149 -0
- package/src/admin-resolver.ts +140 -0
- package/src/api.ts +819 -0
- package/src/bot-logs-2026-03-21T11-21-47(2).txt +46 -0
- package/src/channel.ts +381 -0
- package/src/config.ts +187 -0
- package/src/credential-backup.ts +72 -0
- package/src/gateway.log +43 -0
- package/src/gateway.ts +1404 -0
- package/src/image-server.ts +539 -0
- package/src/inbound-attachments.ts +304 -0
- package/src/known-users.ts +353 -0
- package/src/message-queue.ts +169 -0
- package/src/onboarding.ts +274 -0
- package/src/openclaw-2026-03-21.log +3729 -0
- package/src/openclaw-plugin-sdk.d.ts +522 -0
- package/src/outbound-deliver.ts +552 -0
- package/src/outbound.ts +1266 -0
- package/src/proactive.ts +530 -0
- package/src/ref-index-store.ts +357 -0
- package/src/reply-dispatcher.ts +334 -0
- package/src/runtime.ts +14 -0
- package/src/session-store.ts +303 -0
- package/src/slash-commands.ts +1305 -0
- package/src/startup-greeting.ts +98 -0
- package/src/stt.ts +86 -0
- package/src/tools/channel.ts +281 -0
- package/src/tools/remind.ts +296 -0
- package/src/types.ts +183 -0
- package/src/typing-keepalive.ts +59 -0
- package/src/update-checker.ts +179 -0
- package/src/user-messages.ts +7 -0
- package/src/utils/audio-convert.ts +803 -0
- package/src/utils/file-utils.ts +167 -0
- package/src/utils/image-size.ts +266 -0
- package/src/utils/media-tags.ts +182 -0
- package/src/utils/payload.ts +265 -0
- package/src/utils/platform.ts +435 -0
- package/src/utils/text-parsing.ts +82 -0
- package/src/utils/upload-cache.ts +128 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
This copy of puff has been altered from the original to be inlined into this library.
|
|
2
|
+
|
|
3
|
+
See the original code for puff here: https://github.com/madler/zlib/tree/master/contrib/puff
|
|
4
|
+
|
|
5
|
+
Puff -- A Simple Inflate
|
|
6
|
+
3 Mar 2003
|
|
7
|
+
Mark Adler
|
|
8
|
+
madler@alumni.caltech.edu
|
|
9
|
+
|
|
10
|
+
What this is --
|
|
11
|
+
|
|
12
|
+
puff.c provides the routine puff() to decompress the deflate data format. It
|
|
13
|
+
does so more slowly than zlib, but the code is about one-fifth the size of the
|
|
14
|
+
inflate code in zlib, and written to be very easy to read.
|
|
15
|
+
|
|
16
|
+
Why I wrote this --
|
|
17
|
+
|
|
18
|
+
puff.c was written to document the deflate format unambiguously, by virtue of
|
|
19
|
+
being working C code. It is meant to supplement RFC 1951, which formally
|
|
20
|
+
describes the deflate format. I have received many questions on details of the
|
|
21
|
+
deflate format, and I hope that reading this code will answer those questions.
|
|
22
|
+
puff.c is heavily commented with details of the deflate format, especially
|
|
23
|
+
those little nooks and cranies of the format that might not be obvious from a
|
|
24
|
+
specification.
|
|
25
|
+
|
|
26
|
+
puff.c may also be useful in applications where code size or memory usage is a
|
|
27
|
+
very limited resource, and speed is not as important.
|
|
28
|
+
|
|
29
|
+
How to use it --
|
|
30
|
+
|
|
31
|
+
Well, most likely you should just be reading puff.c and using zlib for actual
|
|
32
|
+
applications, but if you must ...
|
|
33
|
+
|
|
34
|
+
Include puff.h in your code, which provides this prototype:
|
|
35
|
+
|
|
36
|
+
int puff(unsigned char *dest, /* pointer to destination pointer */
|
|
37
|
+
unsigned long *destlen, /* amount of output space */
|
|
38
|
+
unsigned char *source, /* pointer to source data pointer */
|
|
39
|
+
unsigned long *sourcelen); /* amount of input available */
|
|
40
|
+
|
|
41
|
+
Then you can call puff() to decompress a deflate stream that is in memory in
|
|
42
|
+
its entirety at source, to a sufficiently sized block of memory for the
|
|
43
|
+
decompressed data at dest. puff() is the only external symbol in puff.c The
|
|
44
|
+
only C library functions that puff.c needs are setjmp() and longjmp(), which
|
|
45
|
+
are used to simplify error checking in the code to improve readabilty. puff.c
|
|
46
|
+
does no memory allocation, and uses less than 2K bytes off of the stack.
|
|
47
|
+
|
|
48
|
+
If destlen is not enough space for the uncompressed data, then inflate will
|
|
49
|
+
return an error without writing more than destlen bytes. Note that this means
|
|
50
|
+
that in order to decompress the deflate data successfully, you need to know
|
|
51
|
+
the size of the uncompressed data ahead of time.
|
|
52
|
+
|
|
53
|
+
If needed, puff() can determine the size of the uncompressed data with no
|
|
54
|
+
output space. This is done by passing dest equal to (unsigned char *)0. Then
|
|
55
|
+
the initial value of *destlen is ignored and *destlen is set to the length of
|
|
56
|
+
the uncompressed data. So if the size of the uncompressed data is not known,
|
|
57
|
+
then two passes of puff() can be used--first to determine the size, and second
|
|
58
|
+
to do the actual inflation after allocating the appropriate memory. Not
|
|
59
|
+
pretty, but it works. (This is one of the reasons you should be using zlib.)
|
|
60
|
+
|
|
61
|
+
The deflate format is self-terminating. If the deflate stream does not end
|
|
62
|
+
in *sourcelen bytes, puff() will return an error without reading at or past
|
|
63
|
+
endsource.
|
|
64
|
+
|
|
65
|
+
On return, *sourcelen is updated to the amount of input data consumed, and
|
|
66
|
+
*destlen is updated to the size of the uncompressed data. See the comments
|
|
67
|
+
in puff.c for the possible return codes for puff().
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import { dynamicEncode } from "simple-yenc";
|
|
3
|
+
|
|
4
|
+
const puffWasmPath = "src/common/src/puff/Puff.wasm";
|
|
5
|
+
const wasmCommonPath = "src/common/src/WASMAudioDecoderCommon.js";
|
|
6
|
+
|
|
7
|
+
const puffWasm = fs.readFileSync(puffWasmPath);
|
|
8
|
+
|
|
9
|
+
const puffEncoded = dynamicEncode(puffWasm, "`");
|
|
10
|
+
|
|
11
|
+
const wasmCommon = fs.readFileSync(wasmCommonPath).toString();
|
|
12
|
+
|
|
13
|
+
const puffString = wasmCommon.match(/const puffString = String.raw`.*`;/s)[0];
|
|
14
|
+
|
|
15
|
+
const wasmStartIdx = wasmCommon.indexOf(puffString);
|
|
16
|
+
const wasmEndIdx = wasmStartIdx + puffString.length;
|
|
17
|
+
|
|
18
|
+
// Concatenate the strings as buffers to preserve extended ascii
|
|
19
|
+
const wasmCommonWithPuff = Buffer.concat(
|
|
20
|
+
[
|
|
21
|
+
wasmCommon.substring(0, wasmStartIdx),
|
|
22
|
+
"const puffString = String.raw`",
|
|
23
|
+
puffEncoded,
|
|
24
|
+
"`;",
|
|
25
|
+
wasmCommon.substring(wasmEndIdx),
|
|
26
|
+
].map((string) => Buffer.from(string, { encoding: "binary" })),
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
fs.writeFileSync(wasmCommonPath, wasmCommonWithPuff, { encoding: "binary" });
|
|
30
|
+
|
|
31
|
+
console.log(puffWasm.length);
|