Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions ms_agent/agent_hub/_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,10 +1020,20 @@ def convert_workspace(
# as-is; without this filter they would leak into the target framework.
# Mirrors the dst-spec guard in cmd_download's download path.
dropped: list[str] = []
dropped_memory_payloads: list[str] = []
if source_fw != target_fw:
dst_patterns = dst_spec.resolved_patterns()
dropped = sorted(
k for k in converted if not dst_spec.matches(k, dst_patterns))
# Non-Markdown memory payloads get their own explicit report: they
# are user memory the target's Markdown-only memory system cannot
# host, and deserve a clearer note than the generic drop line.
dropped_memory_payloads = [
k for k in dropped
if k.startswith(('memory/', 'memories/'))
and not k.endswith('.md')
]
dropped = [k for k in dropped if k not in dropped_memory_payloads]
converted = {
k: v
for k, v in converted.items() if dst_spec.matches(k, dst_patterns)
Expand Down Expand Up @@ -1054,8 +1064,9 @@ def convert_workspace(
('written', len(effective), display.COLOR_WRITTEN)]
if merge_pairs:
counts.append(('merged', len(merge_pairs), display.COLOR_MERGED))
if dropped:
counts.append(('dropped', len(dropped), display.COLOR_DROPPED))
if dropped or dropped_memory_payloads:
counts.append(('dropped', len(dropped) + len(dropped_memory_payloads),
display.COLOR_DROPPED))
display.summary(counts)

display.file_list('Written', effective, color=display.COLOR_WRITTEN)
Expand All @@ -1073,6 +1084,15 @@ def convert_workspace(
marker='[drop]',
note=f'not part of the {target_fw} workspace spec',
)
display.file_list(
'Memory payloads not supported',
dropped_memory_payloads,
color=display.COLOR_DROPPED,
marker='[drop]',
note=(f'non-Markdown memory files; {target_fw} memory is '
'Markdown-only, so they cannot travel cross-framework '
'(kept on same-framework sync)'),
)
display.file_list(
'Skipped',
skipped_skills,
Expand Down
Loading
Loading