Skip to content
Open
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
9 changes: 8 additions & 1 deletion bun.lock

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

26 changes: 26 additions & 0 deletions hub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,32 @@ See `src/configuration.ts` for all options.
- `ELEVENLABS_API_KEY` - ElevenLabs API key for voice assistant.
- `ELEVENLABS_AGENT_ID` - Custom ElevenLabs agent ID (auto-created if not set).

### Optional (WeCom)

- `WECOM_BOT_ID` - BotID for a WeCom smart robot (long-connection mode).
- `WECOM_BOT_SECRET` - Secret for the same robot (long-connection mode).
- `WECOM_NOTIFICATION` - Enable/disable WeCom notifications (default: true).

Bind your WeCom user to a namespace by sending `<CLI_API_TOKEN>:<namespace>` as a
text message to the bot in a single chat. The bot replies with a confirmation. Once
bound, permission requests arrive as interactive template cards with Allow / Deny
buttons; ready, task-failure, and session-completion events arrive as text-notice
cards with a link to the session.

#### E2E smoke test

`hub/scripts/e2e-wecom.ts` runs the real `WecomBot` against the live endpoint
and walks through binding, permission click, ready, task failure, and session
completion. Use this to verify a WeCom bot is wired correctly end-to-end:

```bash
WECOM_BOT_ID=… WECOM_BOT_SECRET=… bun run --cwd hub e2e:wecom
```

The script generates a per-run binding token and prints instructions at each
step. Interactive steps (binding, button click) time out after
`E2E_TIMEOUT_MS` (default 90 s).

### Optional

- `HAPI_LISTEN_HOST` - HTTP bind address (default: 127.0.0.1).
Expand Down
4 changes: 3 additions & 1 deletion hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
"test": "bun test",
"typecheck": "tsc --noEmit",
"build": "bun build src/index.ts --outdir dist --target bun",
"generate:embedded-web-assets": "bun run scripts/generate-embedded-web-assets.ts"
"generate:embedded-web-assets": "bun run scripts/generate-embedded-web-assets.ts",
"e2e:wecom": "bun run scripts/e2e-wecom.ts"
},
"dependencies": {
"@hapi/protocol": "workspace:*",
"@socket.io/bun-engine": "^0.1.0",
"@wecom/aibot-node-sdk": "^1.0.6",
"grammy": "^1.38.4",
"hono": "^4.11.2",
"jose": "^6.1.3",
Expand Down
Loading
Loading