Documentation
¶
Overview ¶
Package sync implements git-based chunk sync for team memory sharing.
Layout (committed to git):
.yaad/
manifest.json ← index of all chunks (small, git-mergeable)
chunks/
a3f8c1d2.jsonl.gz ← chunk (gzipped JSONL, append-only)
b7d2e4f1.jsonl.gz
Each `yaad sync` creates a NEW chunk file — old chunks are never modified. No merge conflicts, just append-only git history.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChunkMeta ¶
type ChunkMeta struct {
Hash string `json:"hash"`
File string `json:"file"`
CreatedAt time.Time `json:"created_at"`
NodeCount int `json:"node_count"`
EdgeCount int `json:"edge_count"`
}
ChunkMeta describes a single chunk file.
type ChunkRecord ¶
type ChunkRecord struct {
Kind string `json:"kind"` // "node" or "edge"
Data json.RawMessage `json:"data"`
}
ChunkRecord is a single JSONL line in a chunk file.
type Manifest ¶
type Manifest struct {
Version string `json:"version"`
UpdatedAt time.Time `json:"updated_at"`
Chunks []ChunkMeta `json:"chunks"`
}
Manifest tracks all known chunks.
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
Syncer manages chunk-based sync.
func (*Syncer) Export ¶
Export creates a new chunk from all current nodes/edges and updates the manifest. Returns the chunk hash.
Click to show internal directories.
Click to hide internal directories.