feat(team): share leader memory with team members (read-only)

Team members dispatched via team tasks can now read the leader's memory
files (MEMORY.md, memory/*.md) as a fallback when they have no own
memory. Memory writes are blocked for members — only the leader can
save memory files. This follows the existing team_workspace context
propagation pattern: dispatch metadata → RunRequest → context → tools.

Affected tools: read_file (interceptor), memory_get, memory_search,
list_files (interceptor). All include leader fallback with per-user →
global scope cascade.
This commit is contained in:
viettranx committed 2026-03-27 22:45:40 +07:00
1 parent e9342533e0
commit ee9f5b8aaf
10 files changed
+523 -7

No files matched your search

+1
View File
@@ -287,6 +287,7 @@ func handleTeammateMessage(
Stream: false,
TeamTaskID: msg.Metadata["team_task_id"],
TeamWorkspace: msg.Metadata["team_workspace"],
LeaderAgentID: msg.Metadata["leader_agent_id"],
WorkspaceChatID: origChatID,
TeamID: msg.Metadata["team_id"],
LinkedTraceID: linkedTraceID,