You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(feishu): bind sender identities and scope conversation memory - #4000
Binds incoming Feishu messages to the sender’s Open ID and applies the conversation’s memory scope to member profiles, session history, file and memory tools, nightly summaries, and Deep Dream.
Direct chats keep history separate by sender. Each bot can use owner_workspace (the default), per_user, or shared to control access to the workspace profile and memory. Switching to personal memory starts a separate session.
Group chats share memory within each group and maintain a separate profile for each member. Scoped chats retain access to shared knowledge.
Bot setup lets admins configure multiple owners, select a memory mode, and toggle direct messages in the web console and desktop app. QR registration adds the scanning user as an owner when Feishu returns their Open ID. Manual setup supports looking up and adopting the app owner.
Migration moves legacy owner settings when the old App ID matches exactly one bot instance. Ambiguous settings remain available for review.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Approval is blocked because the change introduces at least one critical runtime compatibility defect (using Path.is_relative_to() despite a declared Python >=3.7 support), alongside additional prompt/documentation inconsistencies and missing i18n that need correction.
Binds each Feishu turn to the sender’s open_id to preserve speaker attribution and enforce per-chat scoping for member profiles and memory operations (with an optional owner exception for direct chats).
Changes:
Add trusted Feishu identity derivation and attach it per turn to scope prompts, tools, and stored message attribution.
Introduce per-sender, per-chat Markdown member profiles via a backend-bound member_profile tool.
Scope memory search/reads/summaries to the current conversation and document the behavior in EN/zh/ja guides, with regression tests.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
An active moderate issue remains because the new scope guard in agent/tools/memory/memory_get.py blocks reads outside the scoped user path, likely preventing access to shared knowledge pages (and related search results) when allowed_memory_scope is set.
Scope guard blocks knowledge pages needed for scoped sessions
agent/tools/memory/memory_get.py:136
The new scope guard blocks all reads outside memory/users/<scope>/…, which also prevents memory_get from opening knowledge/... pages when allowed_memory_scope is set (scoped Feishu sessions). This likely breaks the intended "memory isolation" without disabling the shared knowledge base, and can make memory_search results pointing at knowledge/ unreadable.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The change introduces blocking runtime and state-handling defects—an unimported conf() call that will raise NameError when producing messages and unhandled ValueError during Feishu registration that can leave the system stuck while retaining app_secret—so it needs fixes before review approval.
kkmaple
changed the title
fix(feishu): bind sender identity and scope member profiles
feat(feishu): bind sender identity and scope member profiles
Nov 20, 2026
kkmaple
changed the title
feat(feishu): bind sender identity and scope member profiles
feat(feishu): bind sender identities and scope conversation memory
Nov 20, 2026
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
An active moderate issue remains where missing sender.sender_type can default to an empty string and be misclassified as non-user in feishu_identity(), potentially breaking owner binding and workspace-memory access in direct chats.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
A critical bug in agent/team.py misuses a @contextmanager as a decorator—causing module import failure and preventing startup—alongside a sender-type default in Feishu handling that can misclassify human senders and break routing behavior.
Bind Feishu sender identities and member profiles to their context. Share
group memory while isolating conversations and images, and align knowledge
access with conversation scope.
Reply to direct messages by chat ID, keep the direct-message toggle per
bot, and limit Feishu configuration migration to Feishu instances.
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
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.
What does this PR do?
Binds incoming Feishu messages to the sender’s Open ID and applies the conversation’s memory scope to member profiles, session history, file and memory tools, nightly summaries, and Deep Dream.
Type of change
Checklist