Skip to content

feat: add a WeChat-to-Codex skill and bridge - #110

Open
MiltonHeYan wants to merge 2 commits into
mainfrom
feat/wechat-codex-skill
Open

MiltonHeYan wants to merge 2 commits into
mainfrom
feat/wechat-codex-skill

Conversation

@MiltonHeYan

@MiltonHeYan MiltonHeYan commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Users can already build a WeChat bot with the SDK, but connecting an authenticated local Codex CLI still requires writing a bridge and working out QR login, conversation continuity, and session visibility. This adds an installable wechat-codex skill and a standalone bridge template: send a text task in WeChat, execute it in a dedicated workspace, and return Codex's reply while resuming the same explicit session ID.

The skill covers setup, status checks, opening the linked local session, and bounded login recovery. Chinese and English READMEs include installation, direct-run instructions, commands, requirements, and limitations. SDK core files are unchanged. The existing Node.js CI now explicitly uses npm 11.18.0: npm 10 bundled with Node 22 crashes while resolving Vitest's peer dependencies (npm/cli#9787).

Runtime behavior

  • macOS/Linux, Node.js 22+, Python 3, and an already authenticated Codex CLI.
  • Paired sender and direct-message filtering, message deduplication, one task at a time, cancellation, and a ten-minute execution timeout.
  • workspace-write with no interactive approval channel; an explicitly configurable working directory and no automatic import of user MCP configuration.
  • PID lock and heartbeat/status metadata exposing the linked session ID without recording message bodies or credentials.
  • WeChat credentials remain in memory; restarting requires another scan and starts a new Codex conversation. This version handles text only and does not implement Claude Code integration.

Validation

  • node --test skills/wechat-codex/tests/*.test.mjs: 7 tests pass, covering stdin handling, exact-session resume, concurrency/cancellation, timeout/failure cleanup, sender/deduplication checks, bounded login retries, and process/status tracking.

  • python3 -m unittest discover -s skills/wechat-codex/tests -p 'test_*.py': 2 tests pass, covering clean scaffolding, overwrite refusal, and fresh/stale/malformed status metadata.

  • Clean scaffold + npm ci --ignore-scripts --no-audit --no-fund --offline + Node syntax check passed; skill frontmatter validator and git diff --check passed.

  • Before packaging, the underlying bridge was exercised on macOS with real Codex execution, file creation, session continuation, and two successful WeChat round trips. The packaged additions above were tested locally without restarting that live connection.

  • Adds a macOS/Linux GitHub Actions workflow for the new tests and standalone dependency-install smoke check; no WeChat credentials or model calls are required in CI.

  • Reproduced the npm 10 dependency-resolution crash locally; npm 11.18.0 installed the same package manifest successfully. Node SDK TypeScript build and all 77 tests passed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant