| feat(channel): refactor platforms into per-channel folders + Feishu stream mode
Migrate all 16 legacy platform adapters from BasePlatformAdapter to the
ChannelAdapter pattern, one folder per channel (matching feishu/weixin layout).
Each new folder contains <Name>Channel.ts, <Name>SessionMapper.ts, and
<name>-render.ts; transport SDKs are imported lazily so they remain optional.
Telegram, Discord, Slack, Matrix, Mattermost, Signal, WhatsApp, BlueBubbles,
DingTalk, WeCom, WeCom Callback, Email, SMS, HomeAssistant, ApiServer, Webhook
all flow through gateway.submitTurn() and render GatewayEvents back to the
platform via their existing transport.
FeishuChannel gains:
- Lark Open API outbound (tenant_access_token cache + im/v1/messages)
- WSClient stream mode (default) — no public URL needed, mirrors weixin-ilink
- Webhook fallback with url_verification, encryptKey AES-256-CBC, verifyToken
- Event dedupe by event_id (LRU 2000)
- Per-chat concurrency guard
Config wiring:
- adapters.feishu now reads appId/appSecret/connectionMode/domainName
- adapters.weixin gated by enabled: true (no more unconditional QR login)
- New PilotPlatformAdapterConfig schema for the 16 platform channels
- loadEnabledChannels(adapters) lazily instantiates the matching channel
- pilotdeckServer.ts threads PilotConfig into channel.start({ config })
Drop the entire src/adapters/channel/platforms/ subtree.
Co-authored-by: Cursor <cursoragent@cursor.com>
| 8 天前 |
| feat: add gateway/adapters/context/session and Ink TUI
Introduce the gateway and adapter layers needed to drive PolitDeck from
CLI, TUI, Web and Feishu through a single backend. Gateway exposes a
data-only Gateway interface with InProcessGateway, RemoteGateway and a
local WebSocket server (token auth, /ws upgrade, static UI mount).
Adapters add a Claude Code-style Ink TUI (welcome card, header,
PolitDeck/You/⎿ message labels, ink-text-input prompt, deep-blue
theme), a CLI/TUI remote-first entry that falls back to a local
in-process gateway, and Feishu webhook plus session mapper plugins.
Pull session, transcript and context out of agent into top-level
session/ and context/ modules, including the EdgeClaw memory provider.
Add gateway/adapters config parsing, a Vite/React UI skeleton, an
end-to-end OpenRouter Kimi K2.6 tool-use test plus a TUI recording
script driven by ink-testing-library.
Co-authored-by: Cursor <cursoragent@cursor.com>
| 25 天前 |
| feat: add gateway/adapters/context/session and Ink TUI
Introduce the gateway and adapter layers needed to drive PolitDeck from
CLI, TUI, Web and Feishu through a single backend. Gateway exposes a
data-only Gateway interface with InProcessGateway, RemoteGateway and a
local WebSocket server (token auth, /ws upgrade, static UI mount).
Adapters add a Claude Code-style Ink TUI (welcome card, header,
PolitDeck/You/⎿ message labels, ink-text-input prompt, deep-blue
theme), a CLI/TUI remote-first entry that falls back to a local
in-process gateway, and Feishu webhook plus session mapper plugins.
Pull session, transcript and context out of agent into top-level
session/ and context/ modules, including the EdgeClaw memory provider.
Add gateway/adapters config parsing, a Vite/React UI skeleton, an
end-to-end OpenRouter Kimi K2.6 tool-use test plus a TUI recording
script driven by ink-testing-library.
Co-authored-by: Cursor <cursoragent@cursor.com>
| 25 天前 |