@wtfoc/common
v0.0.4
Published
Shared types and interfaces for the wtfoc knowledge graph
Readme
@wtfoc/common
Shared types, interfaces, and schemas for the wtfoc knowledge graph.
Install
npm install @wtfoc/commonWhat's Inside
This package contains zero runtime logic — only contracts that the rest of the wtfoc stack depends on.
Interfaces (seams)
| Interface | Purpose |
|-----------|---------|
| Embedder | Text → vector embedding |
| VectorIndex | Store and query embeddings |
| StorageBackend | Put/get content-addressed blobs (local, FOC) |
| ManifestStore | Read/write collection head manifests |
| SourceAdapter | Ingest a source type into chunks + edges |
| EdgeExtractor | Extract relationship edges from chunks |
Schemas
| Schema | Purpose |
|--------|---------|
| Chunk | A single piece of ingested content |
| Edge | A relationship between two chunks |
| CollectionHead / CollectionRevision | Collection state and history |
| Segment | A group of related chunks |
Errors
Typed error classes (WtfocError base) for storage, embedding, GitHub API, schema validation, and more.
Usage
import type { Embedder, VectorIndex, Chunk } from '@wtfoc/common';
import { CURRENT_SCHEMA_VERSION } from '@wtfoc/common';Related Packages
@wtfoc/store— Storage backends implementingStorageBackendandManifestStore@wtfoc/ingest— Source adapters implementingSourceAdapter@wtfoc/search— Embedders and vector indices implementingEmbedderandVectorIndex@wtfoc/cli— CLI that ties everything together
License
MIT
