Replace the two-step Hub URL binding flow with a multica://connect connection link flow that uses the same verify RPC handshake as the SDK/web clients. Changes: - types.ts: replace hubUrl with hubId + agentId fields - telegram-user.store.ts: update DB schema (hub_id, agent_id columns), accept explicit deviceId in upsert - telegram.service.ts: rewrite with parseConnectionCode validation, verify RPC via routeFromVirtualDevice, pending request map for RPC promise tracking, smart sendCallback for stream/message/RPC - package.json: add @multica/store workspace dependency Flow: user pastes multica://connect link -> parse & validate -> check Hub online -> register virtual device -> verify RPC to Hub -> Desktop approval -> save to DB -> route messages Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| agent | ||
| channels | ||
| client | ||
| console | ||
| cron | ||
| gateway | ||
| heartbeat | ||
| hub | ||
| media | ||
| shared | ||
| index.ts | ||