feat: Lark/Feishu browser connector (QR login, real-user message capture)#426
Draft
seasidespace wants to merge 20 commits into
Draft
feat: Lark/Feishu browser connector (QR login, real-user message capture)#426seasidespace wants to merge 20 commits into
seasidespace wants to merge 20 commits into
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… + act registration
… field rules to both brands
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…emit Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ed in Task 7) These 7 items (LarkBrowserConfig, SeenState, feed_fingerprint, feed_dedup_key, should_emit_feed, build_message_event, now_ms) are wired into run_subscriber in the next task (Task 7); the attribute is removed there once integrated.
…with optimistic-id reconciliation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wire LARK_OBSERVER_INSTALL_JS/DRAIN_JS into each poll after the feed pass. Add process_active_drain pure helper (seeds on first poll, emits snowflake ids post-init, drops optimistic temp ids). Feed pass now accepts active_chat_id and suppresses rows for the open chat to prevent double-emit. Remove 5 #[allow(dead_code)] attrs. 18/18 lark_browser tests pass; 0 lark dead-code warnings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s don't abort the feed pass
Adds lark_browser_actions.rs with handle_action dispatching on
send_message / read_history / react. Pure field-parsers are TDD-tested
(12 passing). Browser glue uses only stable hooks ([data-feed-id],
.js-message-item, .lark__editor, .send__button, [contenteditable]).
Wires SubscriberCommand::Custom { op == "lark_browser_act" } into
lark_browser.rs mirroring the gmail_browser_act pattern.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…an poll (both brands) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…g + persist config.toml at the runtime state dir Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ssenger/ (web root lands on Drive, not the feed)
…nects to the running browser daemon (not the manifest-dir cwd)
…Drive and re-opening it each poll fought the feed-nav)
|
@seasidespace is attempting to deploy a commit to the fuzzland Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
lark-browser+feishu-browserconnector: log into Lark/Feishu by scanning a QR code, then capture your incoming and outgoing chat messages into the monitor — all as a real user account (no bot, no API rate limits). Modeled on the existinggmail-browserconnector.Why
The existing
lark-cliconnector uses Lark's OpenAPI, which (a) has REST rate limits and (b) only acts as a bot, not as the real you. We wanted the WeChat model: log in as yourself with a QR code and read/send through the real client.WeChat had to run its native client in a Docker container because WeChat has no web app. Lark/Feishu do have full web apps, and Puffer already ships an embedded browser (CEF) — so the right tool here is a browser-backed connector, not a container. Lighter, reuses proven infra, and avoids the whole Docker failure surface.
How it works (plain terms)
is_outgoing+chat_id, so incoming messages can create tasks and your replies can auto-complete them.send_message/read_history/reactdrive the same web page.Two brands share one implementation, differing only by URL:
lark-browser→web.larksuite.com,feishu-browser→web.feishu.cn.Why the DOM and not the API/network? A spike found Lark's realtime channel is protobuf and its local store is an encrypted WASM-SQLite blob — both as hard as cracking a native DB. The rendered page is the practical, stable read surface. (We depend on a few stable CSS/
data-*hooks and deliberately avoid build-hashed classes.)What happened (the journey)
workspace_rootfield, so it looked for the browser engine in the wrong place. Fix: persist + use it./messenger/entry directly.Status / what's left (why this is a draft)
"You:"preview prefix and should also recognize the localized"你:"chore: ignore .worktreescommit from the base branch.Test plan
/connect lark-browserand/connect feishu-browser— QR login both brandssend_message/read_history/reacton both brands🤖 Generated with Claude Code