Skip to main content
Registry 是 Huoban 的字架:它声明对象来源和索引范围。当前 v1alpha1 定义 Registry 对象形状,但 source repo 没有 Registry loader、远程 discovery 或 hosted registry runtime。 设计背景见 Registry 模型

字段

source 使用 anyOf,因此 path 与 url 可以同时存在。schema 不按 type 约束 locator:例如它不强制 local 使用 path,也不强制 http 使用 url。 includeKinds 没有 kind 枚举、minItemsuniqueItems;它是当前 schema 中的字符串过滤列表,不是权限规则。

合法示例

对应 source example:examples/registry/local-registry.yaml

当前 CLI 行为

  • validate 检查 source、枚举、locator 和 index 字段形状。
  • explain 输出 source 数量、type/locator 和 includeKinds
  • workspace explain 的对象索引来自命令行已读取的文件,不会读取 Registry sources。
  • 当前 Preflight 不消费 Registry,不解析 trustPolicyRef,也不通过 Registry 发现缺失对象。

验证边界

  • schema 不检查 path 是否存在或 URL 是否可访问。
  • schema 不把 includeKinds 限制为 10 个顶层 kind。
  • trustPolicyRef 只验证引用形状;当前 CLI 不解析或应用它。
  • Registry 不内联对象内容,也不表达来源已被信任。
  • 当前 source 没有 registry 发布、版本选择、缓存或推荐协议实现。

相邻概念边界

常见错误

  • 声称写了 Registry 就会自动加载 source。
  • includeKinds 当作执行 allowlist。
  • 假设 source type 与 path/url 组合已被 schema 强制。
  • 认为 trustPolicyRef 可解析或已经应用。
  • 在 Registry 中内联 Skill、Flow 等对象正文。
  • 把 Requirement、Preflight Report 或 Lifecycle Handler 加入顶层 kind 列表。