MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / _build_entity_frontmatter

Function _build_entity_frontmatter

openkb/agent/compiler.py:1053–1060  ·  view source on GitHub ↗
(sources: list[str])

Source from the content-addressed store, hash-verified

1051 clean = clean_parts[1].lstrip("\n") if clean_parts is not None else content
1052
1053 def _build_entity_frontmatter(sources: list[str]) -> str:
1054 fm_lines = [_yaml_list_line("sources", sources)]
1055 fm_lines.append(_yaml_kv_line("type", (type_ or "other").title()))
1056 if brief:
1057 fm_lines.append(_yaml_kv_line("description", brief))
1058 if aliases:
1059 fm_lines.append(_yaml_list_line("aliases", aliases))
1060 return "---\n" + "\n".join(fm_lines) + "\n---\n\n"
1061
1062 if is_update and path.exists():
1063 existing = path.read_text(encoding="utf-8")

Callers 1

_write_entityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected