Skip to content

refactor(resource-library): 简化备份链路并统一 Skill 根目录语义 - #239

Merged
uvwt merged 1 commit into
mainfrom
refactor/resource-library-backup-cleanup-20261014
Oct 14, 2026
Merged

uvwt merged 1 commit into
mainfrom
refactor/resource-library-backup-cleanup-20261014

Conversation

@uvwt

@uvwt uvwt commented Oct 14, 2026

Copy link
Copy Markdown
Owner

背景

Resource Library 已不再维护第二套文件/扩展名白名单,但导出链路仍残留 portable 命名、恒为空的 warnings 字段,以及单独拒绝嵌套 SKILL.md 的历史规则。

修改

  • collectPortableFiles → collectBackupFiles,writePortableZip → writeBackupZip,命名回归实际职责。
  • 从 Export、staged export 以及 export_prepare 响应中移除恒为空的导出 warnings 字段;Plugin 原生安装审核的 warnings 保持不变。
  • 删除 Resource Library 对嵌套 SKILL.md 的额外拒绝。Standalone Skill 只以安装根目录的 SKILL.md 作为当前包 Manifest;子目录同名文件按普通资源保留,不自动注册第二个 Skill。
  • 更新设备资源库文档和回归测试,锁定上述行为。

验证(天翼 Windows)

  • go test -p 2 ./internal/resourcelibrary ./internal/skill ./internal/plugin ./internal/tool/skill ./internal/tool/plugin -count=1 ✅
  • go vet ./internal/resourcelibrary ✅
  • git diff --check ✅
  • Cloud 当前 StartDeviceExport 只读取 download_grant / archive_digest / size,不依赖导出 warnings 字段。

不涉及 Cloud 部署、AgentDock 发布或生产配置修改。

@uvwt
uvwt merged commit acf41f6 into main Oct 14, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant