it0/packages/services/agent-service
hailin 9e466549c0 fix(wecom): cursor persistence, send retry, enter_session welcome
Three robustness fixes for the WeCom Customer Service router:

1. **Cursor persistence** — sync_msg cursor now stored in
   public.service_state (auto-created via CREATE TABLE IF NOT EXISTS).
   Survives service restarts; no more duplicate message processing.

2. **send_msg retry** — sendChunkWithRetry() retries once after 2s
   on any API error (non-zero errcode or network failure). Lost
   replies due to transient WeChat API errors are now recovered.

3. **enter_session welcome** — WeCom fires an enter_session event
   (origin=0, msgtype=event) when a user opens the chat for the
   first time. Now handled: bound users get a welcome-back message,
   unbound users get step-by-step onboarding instructions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 05:37:24 -07:00
..
prisma chore(agent): add empty prisma dir to fix Docker build COPY step 2026-03-08 03:10:19 -07:00
src fix(wecom): cursor persistence, send retry, enter_session welcome 2026-03-10 05:37:24 -07:00
package.json fix(feishu): commit missing entity field + SDK dependency 2026-03-09 03:20:03 -07:00
tsconfig.json Initial commit: IT0 AI-powered server cluster operations platform 2026-02-08 22:54:37 -08:00