Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A standalone WeChat protocol Puppet for Wechaty. The TypeScript example uses PuppetNeo directly to log in with a QR code and reply to direct text messages. Authentication stays in memory, so each run needs a fresh QR scan. See the [v1 specification](docs/v1-spec.md) for the architecture and acceptance gates.

Neo is a Puppet for Wechaty 2.0: it needs `wechaty-puppet` 2.0 as a peer dependency (`npm install wechaty-puppet@next`). Wechaty 2.0 loads it with `WECHATY_PUPPET=wechaty-puppet-neo`.

The 30-second live terminal demo shows QR login and the standalone TypeScript example exchanging `ding` and `dong` with a second account. It was recorded on Linux x64 with protocol crate 1.4.0. Idle waits are cut.

https://github.com/user-attachments/assets/e7e40c19-ad49-4061-be53-cef1e1c4c978
Expand Down
4 changes: 2 additions & 2 deletions examples/ding-dong-bot.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { types } from 'wechaty-puppet'
import { helpers, types } from 'wechaty-puppet'
import qrTerminal from 'qrcode-terminal'
import PuppetNeo from 'wechaty-puppet-neo'

Expand All @@ -8,7 +8,7 @@ puppet.on('scan', ({ qrcode, status }) => {
if (qrcode && status === types.ScanStatus.Waiting) {
qrTerminal.generate(qrcode, { small: true })
}
console.info(`Login status: ${types.ScanStatus[status]}`)
console.info(`Login status: ${helpers.typeName(types.ScanStatus, status)}`)
})
puppet.on('login', async ({ contactId }) => {
const self = await puppet.contactPayload(contactId)
Expand Down
13 changes: 6 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"test:package": "node scripts/test-package.mjs"
},
"peerDependencies": {
"wechaty-puppet": "1.20.2"
"wechaty-puppet": "^2.0.0-alpha.19"
},
"dependencies": {
"jsqr": "1.4.0",
Expand Down
Loading