Documentation Index
Fetch the complete documentation index at: https://ahvn.top/llms.txt
Use this file to discover all available pages before exploring further.
Catalog 用来浏览对象,MetaSchema 用来解释结构。
1. Catalog — 具体对象目录
Catalog 是工作区内具体实体实例的用户可见目录。当用户或 Agent 只知道名称、描述、标签或大致对象类型时,先查询 Catalog,再用对应实体类型读取完整对象:
rows = (
ws.query(hb.Catalog)
.where(hb.Catalog.target_entity == "product")
.select("target_id", "target_entity", "name", "desc", "tags")
.execute()
.rows()
)
product = ws.get(rows[0]["target_id"], entity=rows[0]["target_entity"])
Catalog.object_id 是目录行主键。Catalog.target_id 是目标对象的 object_id,Catalog.target_entity 是目标实体类型。
MetaSchema 记录工作区、后端能力、实体定义、字段、存储放置和处理器注册信息。它可用于调试和 Agent 自省:
fields = (
ws.query(hb.MetaSchema)
.where(hb.MetaSchema.subject_id == "product")
.where(hb.MetaSchema.kind == "field")
.select("field", "dtype", "desc", "backend", "strategy")
.execute()
.rows()
)
用 MetaSchema 理解结构,用 Catalog 发现具体对象。
3. 能力索引
hb.capabilities 暴露可选的内置组件和已注册扩展组件,不需要读取内部 registry:
hb.capabilities.logical_types()
hb.capabilities.strategies(hb.Vector)
hb.capabilities.backends(hb.Array, hb.SideTable, op="array_contains")
hb.capabilities.ops(hb.ShortText, hb.InlineColumn, backend="sqlite")
hb.capabilities.supports(hb.Vector, "near", "inmem", hb.VectorIndex)
Further Exploration