diff --git a/README.md b/README.md index b5b2fe519..c286ef044 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ Notes: - ⚑ No global install required for quick experimentation - πŸŽ™οΈ Built-in hold-to-dictate voice input with transcription to composer draft - πŸ€– Optional Telegram bot bridge: send messages to bot, forward into mapped thread, send assistant reply back to Telegram +- 🐦 Optional Feishu bot bridge: same bidirectional messaging via Feishu using WebSocket long connection (no public IP needed) - πŸ’Ύ Project portability: export a project as a ZIP from project or thread menus, including matching Codex chat JSONL history under `.codex-project/chats/` - πŸ“¦ Project import: restore exported project ZIPs from the browser via `Import Project` - πŸ” Imported chats are rewritten for the destination `CODEX_HOME`, project path, and currently selected provider/model so they can be resumed in the new environment @@ -174,6 +175,41 @@ Bot commands: Outgoing assistant messages are sent with Telegram `parse_mode=HTML` for formatting, with automatic plain-text fallback if HTML delivery fails. +### Feishu Bot Bridge (Optional) + +Same bidirectional messaging as Telegram, using Feishu's WebSocket long connection mode (no public IP or domain required). + +**Setup:** + +1. Create a self-built app at [Feishu Open Platform](https://open.feishu.cn) +2. Enable bot capability +3. Under Event Subscription, select **Long Connection** mode +4. Subscribe to `im.message.receive_v1` event +5. Add permission `im:message:send_as_bot` +6. Configure in the codexapp sidebar settings (App ID, App Secret, allowed user open_ids), or use environment variables: + +```bash +export FEISHU_APP_ID="" +export FEISHU_APP_SECRET="" +export FEISHU_ALLOWED_USER_IDS="," +export FEISHU_DEFAULT_CWD="$PWD" # optional, defaults to current working directory +npx codexapp +``` + +`FEISHU_ALLOWED_USER_IDS` is required for safe access. Use `*` to allow all users. To find your open_id, send a message to the bot β€” it will show in the rejection message. + +Bot commands (same as Telegram): + +- `/start` show quick help and thread picker +- `/threads` list recent threads grouped by project +- `/newthread` create and map a new Codex thread +- `/thread ` map current chat to an existing thread +- `/current` show currently connected thread +- `/history` show full history for current thread +- `/status` show bridge/mapping status +- `/whoami` show your Feishu IDs and authorization state +- `/help` show command reference + --- ## 🧩 Recent Product Features (from main commits) diff --git a/package.json b/package.json index 84ee9d051..beca5d4b6 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ }, "dependencies": { "@composio/client": "0.1.0-alpha.66", + "@larksuiteoapi/node-sdk": "^1.70.0", "@xterm/addon-fit": "^0.11.0", "@xterm/xterm": "^6.0.0", "commander": "^13.1.0", diff --git a/src/App.vue b/src/App.vue index c39b2cd5b..a6dbf614f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -475,6 +475,84 @@ + +