Directories
¶
| Path | Synopsis |
|---|---|
|
adapters
|
|
|
generic/go
command
Command chanda-agent-example shows, in Go, the three moments an agent runtime owes Chanda (BASE.md "Why MCP alone is not enough"):
|
Command chanda-agent-example shows, in Go, the three moments an agent runtime owes Chanda (BASE.md "Why MCP alone is not enough"): |
|
cmd
|
|
|
chanda
command
Command chanda is the CLI and MCP server entry point.
|
Command chanda is the CLI and MCP server entry point. |
|
eval
|
|
|
cmd/gensynth
command
Command gensynth writes the deterministic synthetic Portuguese dataset.
|
Command gensynth writes the deterministic synthetic Portuguese dataset. |
|
cmd/lmeproxy
command
Command lmeproxy is the OpenAI-compatible reverse proxy that every LLM call of the LongMemEval battery goes through (reader, judge, Mem0 extraction, Chanda sleep phase 2).
|
Command lmeproxy is the OpenAI-compatible reverse proxy that every LLM call of the LongMemEval battery goes through (reader, judge, Mem0 extraction, Chanda sleep phase 2). |
|
scenarios
Package scenarios is phase 5 of the evaluation battery: scripted, deterministic scenarios that drive a real `chanda serve` process over MCP stdio (and the chanda CLI where a person would act), without any LLM.
|
Package scenarios is phase 5 of the evaluation battery: scripted, deterministic scenarios that drive a real `chanda serve` process over MCP stdio (and the chanda CLI where a person would act), without any LLM. |
|
internal
|
|
|
app
Package app wires every area of Chanda into one chanda.API over one env.Env: the write path with its in-transaction hook chain (facts, embedding queue, near-duplicates, integrity check), the read path with vectors and the ranking adapters, the embedding indexer, provenance, forgetting and ranking.
|
Package app wires every area of Chanda into one chanda.API over one env.Env: the write path with its in-transaction hook chain (facts, embedding queue, near-duplicates, integrity check), the read path with vectors and the ranking adapters, the embedding indexer, provenance, forgetting and ranking. |
|
audit
Package audit writes the hash-chained audit log (principle 10).
|
Package audit writes the hash-chained audit log (principle 10). |
|
cli
Package cli is the chanda command line: every command of the chanda binary lives here so that other binaries (chanda-hugot, which registers the hugot embed provider) run the same CLI through cli.Run.
|
Package cli is the chanda command line: every command of the chanda binary lives here so that other binaries (chanda-hugot, which registers the hugot embed provider) run the same CLI through cli.Run. |
|
clock
Package clock provides the real and the test Clock implementations.
|
Package clock provides the real and the test Clock implementations. |
|
config
Package config loads chanda.yaml.
|
Package config loads chanda.yaml. |
|
conflicts
Package conflicts is conflict resolution between raw records (docs/decisions/0148-conflict-resolution-in-sleep.md), off by default.
|
Package conflicts is conflict resolution between raw records (docs/decisions/0148-conflict-resolution-in-sleep.md), off by default. |
|
core
Package core holds the domain vocabulary shared by every Chanda package: trust zones, record types and id prefixes, statuses, time formatting, stable error codes and the interfaces behind external dependencies.
|
Package core holds the domain vocabulary shared by every Chanda package: trust zones, record types and id prefixes, statuses, time formatting, stable error codes and the interfaces behind external dependencies. |
|
dedup
Package dedup is the near-duplicate guard (BASE.md write step 10, "Near-duplicate guard").
|
Package dedup is the near-duplicate guard (BASE.md write step 10, "Near-duplicate guard"). |
|
embed
Package embed holds the embedding side of Chanda (BASE.md "Go stack": Embeddings, Vector search; write step 7; the flush tool): the built-in deterministic HashEmbedder, the vector BLOB encoding, the exact in-memory vector index over the embeddings table, and the Indexer that drains embed_queue.
|
Package embed holds the embedding side of Chanda (BASE.md "Go stack": Embeddings, Vector search; write step 7; the flush tool): the built-in deterministic HashEmbedder, the vector BLOB encoding, the exact in-memory vector index over the embeddings table, and the Indexer that drains embed_queue. |
|
env
Package env bundles the shared dependencies every component receives.
|
Package env bundles the shared dependencies every component receives. |
|
eval
Package eval is Chanda's evaluation environment (BASE.md "Evaluation"): dataset format, baselines B0-B3, LLM-free retrieval metrics, the own-suite registry, the gate-set score and the reproducible report.
|
Package eval is Chanda's evaluation environment (BASE.md "Evaluation"): dataset format, baselines B0-B3, LLM-free retrieval metrics, the own-suite registry, the gate-set score and the reproducible report. |
|
eval/coresys
Package coresys runs the real Chanda core (internal/app) as evaluation systems C1..C5 and implements the own suites that need a live core (deletion, injection, document update, deduplication, determinism, learning).
|
Package coresys runs the real Chanda core (internal/app) as evaluation systems C1..C5 and implements the own suites that need a live core (deletion, injection, document update, deduplication, determinism, learning). |
|
facts
Package facts implements entities, the predicate catalog and temporal fact reconciliation (BASE.md write path steps 8 and 9, "Decision table for facts", "The two time axes", "Time queries"), plus the deterministic fact extractors that run on the synchronous write path.
|
Package facts implements entities, the predicate catalog and temporal fact reconciliation (BASE.md write path steps 8 and 9, "Decision table for facts", "The two time axes", "Time queries"), plus the deterministic fact extractors that run on the synchronous write path. |
|
facts/norm
Package norm holds the deterministic text normalizations shared by fact reconciliation and the near-duplicate guard: entity aliases, predicate names, fact values, numbers and dates.
|
Package norm holds the deterministic text normalizations shared by fact reconciliation and the near-duplicate guard: entity aliases, predicate names, fact values, numbers and dates. |
|
forget
Package forget implements cascade deletion with verification (BASE.md "Forgetting", differentiator "Verifiable forgetting").
|
Package forget implements cascade deletion with verification (BASE.md "Forgetting", differentiator "Verifiable forgetting"). |
|
ids
Package ids generates record ids "<prefix>_<ULID>" deterministically.
|
Package ids generates record ids "<prefix>_<ULID>" deterministically. |
|
keys
Package keys owns the learned query keys (decision 0145): the learned_keys table, its FTS index (trigger-maintained), the key vectors (embeddings rows of record type "key", queued like every other record) and the per-namespace runtime switch.
|
Package keys owns the learned query keys (decision 0145): the learned_keys table, its FTS index (trigger-maintained), the key vectors (embeddings rows of record type "key", queued like every other record) and the per-namespace runtime switch. |
|
llm
Package llm implements core.LLMProvider, the only door through which an LLM touches Chanda (BASE.md "Sleep", principles 2 and 3: never on the read or synchronous write path).
|
Package llm implements core.LLMProvider, the only door through which an LLM touches Chanda (BASE.md "Sleep", principles 2 and 3: never on the read or synchronous write path). |
|
mcp
Package mcp exposes a chanda.API as an MCP server (go-sdk v1.8.0) over stdio and Streamable HTTP.
|
Package mcp exposes a chanda.API as an MCP server (go-sdk v1.8.0) over stdio and Streamable HTTP. |
|
prov
Package prov owns the provenance graph (BASE.md "Provenance, forgetting and security"): writing edges, walking a derived record back to the events that produced it, deriving zones from those events, walking forward from events to everything derived from them, the integrity checker and promote.
|
Package prov owns the provenance graph (BASE.md "Provenance, forgetting and security"): writing edges, walking a derived record back to the events that produced it, deriving zones from those events, walking forward from events to everything derived from them, the integrity checker and promote. |
|
prov/provtest
Package provtest seeds the tables prov and forget read, with direct SQL, for tests.
|
Package provtest seeds the tables prov and forget read, with direct SQL, for tests. |
|
rank
Package rank implements "Ranking that learns from use" (BASE.md, principle 9, build phase 8): outcome and flag signals, per-record utility (stage 1), a small learned ranker (stage 2) in shadow mode, promotion by evaluation and reversibility.
|
Package rank implements "Ranking that learns from use" (BASE.md, principle 9, build phase 8): outcome and flag signals, per-record utility (stage 1), a small learned ranker (stage 2) in shadow mode, promotion by evaluation and reversibility. |
|
read
Package read is the read path (BASE.md "Read path and pre-context"): keyword and vector search, rule filter, near-duplicate collapse, RRF fusion, optional rerank, utility adjustment, relevance cut, diversity and budget, assembly, the two modes (search and context) and retrieval logging.
|
Package read is the read path (BASE.md "Read path and pre-context"): keyword and vector search, rule filter, near-duplicate collapse, RRF fusion, optional rerank, utility adjustment, relevance cut, diversity and budget, assembly, the two modes (search and context) and retrieval logging. |
|
sleep
Package sleep is offline consolidation (BASE.md "Sleep"): the only place an LLM touches memory.
|
Package sleep is offline consolidation (BASE.md "Sleep"): the only place an LLM touches memory. |
|
store
Package store owns the SQLite file: opening, pragmas, migrations and transactions.
|
Package store owns the SQLite file: opening, pragmas, migrations and transactions. |
|
window
Package window keeps the contiguous window of a text that best matches a set of terms within a cost (decision 0137, "best_window").
|
Package window keeps the contiguous window of a text that best matches a set of terms within a cost (decision 0137, "best_window"). |
|
write
Package write implements the synchronous write path (BASE.md "Write path"), steps 1 to 7 and 11: normalize, bind the origin, admit, check exact duplicates, write the raw event, compare document versions, enqueue for indexing, audit and respond.
|
Package write implements the synchronous write path (BASE.md "Write path"), steps 1 to 7 and 11: normalize, bind the origin, admit, check exact duplicates, write the raw event, compare document versions, enqueue for indexing, audit and respond. |
|
write/normalize
Package normalize implements write step 1 (BASE.md "Write path"): Unicode NFC, standardized line breaks and collapsed whitespace, followed by a SHA-256 over the normalized text.
|
Package normalize implements write step 1 (BASE.md "Write path"): Unicode NFC, standardized line breaks and collapsed whitespace, followed by a SHA-256 over the normalized text. |
|
pkg
|
|
|
chanda
Package chanda is the public Go API of Chanda and, at the same time, the wire contract of its MCP tools: every tool has an Input and an Output type here, and their JSON form (snake_case tags) is exactly what MCP clients send and receive inside the Envelope.
|
Package chanda is the public Go API of Chanda and, at the same time, the wire contract of its MCP tools: every tool has an Input and an Output type here, and their JSON form (snake_case tags) is exactly what MCP clients send and receive inside the Envelope. |
|
chanda/embedreg
Package embedreg lets a separately built binary add an embed provider (for example the optional hugot module) without the main module importing it.
|
Package embedreg lets a separately built binary add an embed provider (for example the optional hugot module) without the main module importing it. |
|
chanda/local
Package local is the importable Go entry point of Chanda: it opens the core in this process from a chanda.yaml and returns it as a chanda.API.
|
Package local is the importable Go entry point of Chanda: it opens the core in this process from a chanda.yaml and returns it as a chanda.API. |
Click to show internal directories.
Click to hide internal directories.