Skip to content

实体模块

跨模块浏览当前 subject world 内全部 entities 行,并管理软删回收站。

  • 路径:/entity
  • 导航:模块 id entityhabitat_nav_entity
  • 范围:跟随壳 User / Agentsubject_kind → 对应 private world)
Tab数据排序
全部deleted_at IS NULLupdated_at DESC
回收站deleted_at IS NOT NULLdeleted_at DESC

工具栏:

控件行为
搜索框关键词走 hybrid 检索(title/summary/content);纯正整数或 anima:{id} 精确查单条
类型过滤 typecontent / world / agent / user
主组件过滤 primary_component(自由文本,如 task_item

行字段:id、title、primary_component、components、时间戳。点击行打开 详情弹窗entity.get:summary / content / body 与元数据)。存活行可 deleteEntity(软删);回收站可 restore。满 30 天由记忆维护 cleanup purge 物理删除;若为 object_file,purge 后对无其它引用的 cid 删除对象存储 blob。

方法作用
entity.list存活实体分页;可选 type / primary_component / query
entity.trash.list回收站分页;入参同 entity.list
entity.get单条详情(含 summary/content/body);回收站需 include_deleted
entity.delete软删;无 force 且存在引用时返回 references
entity.restore从回收站恢复
entity.deleteComponentMorph detach:删除单个 component(共用 body 键保留)
entity.addComponentMorph attach:追加 component + merge body;可选 promote_primary
entity.setPrimaryComponentMorph promote:把已有次要组件升为 primary_component(不改 body)

LLM ToolSet entity(经 toolset_load):entity_get / entity_search,以及 Morph 工具 entity_attach_component / entity_detach_component / entity_promote_component(另含 tag 工具)。 Morph 细节与 body 扁平共享见 entity-model.md

entity.list / entity.trash.list 入参:subject_kindlimitoffset,以及可选 typeprimary_componentquery。有 query 时:id/anima: 捷径走 getEntity;否则 searchEntities(hybrid)。无 querylistEntities + 同条件 countEntities

entity.get 仅需 id(可选 include_deleted):按实体所在 world 校验调用方可读权限,subject_kind / world_id

删除语义总表见 entity-model.md「删除语义」。