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

Function add_single_file

openkb/cli.py:442–447  ·  view source on GitHub ↗

Convert, index, and compile a single document under the KB mutation lock.

(
    file_path: Path, kb_dir: Path, *, stage: bool = True
)

Source from the content-addressed store, hash-verified

440
441
442def add_single_file(
443 file_path: Path, kb_dir: Path, *, stage: bool = True
444) -> Literal["added", "skipped", "failed"]:
445 """Convert, index, and compile a single document under the KB mutation lock."""
446 with kb_ingest_lock(kb_dir / ".openkb"):
447 return _add_single_file_locked(file_path, kb_dir, stage=stage)
448
449
450def _add_single_file_locked(

Calls 2

kb_ingest_lockFunction · 0.90
_add_single_file_lockedFunction · 0.85