fix(compat): support namespace-aware clawhub publish#291
Open
fix(compat): support namespace-aware clawhub publish#291
Conversation
dc51438 to
5c14e49
Compare
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.
概述
修复 ClawHub 兼容发布默认总是落到 global 的问题,支持通过 canonical slug 将
clawhub publish路由到目标 namespace,并同步更新中英文文档说明 global 与 my-space 两种发布方式。变更内容
后端实现
payload.namespace-> canonicalpayload.slug(例如my-space--my-skill)-> 默认globalSlugValidatornamespace字段供未来客户端使用前端实现
测试覆盖
ClawHubCompatControllerTest,覆盖 canonical slug 发布到 namespace、普通 slug 默认 global、显式payload.namespace优先三类场景文档更新
README.md与README_zh.md,区分发布到 global 和发布到 my-space namespace 的命令示例docs/openclaw-integration.md与docs/openclaw-integration-en.md,说明 canonical compat slug 的发布方式质量门禁
make typecheck-web不适用,本次无前端改动make lint-web不适用,本次无前端改动make test-frontend不适用,本次无前端改动make test-backend-app通过make generate-api已执行;未提交schema.d.ts,因为生成出的差异与本次任务无关,已回退无关漂移安全考虑
SUPER_ADMIN行为保持不变my-space--my-skill仅作为 compat 输入坐标解析,不进入 domain 存储模型相关 Issue
Closes #261
Closes #284
测试说明
本地验证步骤
make dev-allexport CLAWHUB_REGISTRY=http://localhost:8080clawhub login --token <token>clawhub publish ./my-skill --slug my-skill --version 1.0.0clawhub publish ./my-skill --slug my-space--my-skill --version 1.0.0/api/v1/skills/{namespace}/{slug}或clawhub inspect验证最终落库坐标回归测试范围
截图/录屏(如有 UI 变更)
本次无 UI 变更