Skip to content

Latest commit

 

History

History
142 lines (78 loc) · 8.5 KB

configuration.md

File metadata and controls

142 lines (78 loc) · 8.5 KB

Configuration reference

With no CG_DATA_ROOT override, the store path is ~/.cg/context-graph.db.

The binary reads CG_DATA_ROOT from the environment.

Merge settings into an existing file rather than replacing unrelated tables.

Writer settings are read from <data-root>/cg/fabric.toml.

Search selection

The CLI search policy defaults to newest order.

It defaults to ten recent sessions.

[search].sessions selects the configured session count.

--search-sessions all overrides the configured session count.

--search-order newest overrides configured oldest order.

The default library projection builds the ten newest sessions first.

Oldest-order projection builds the ten oldest sessions first.

Widening to all sessions embeds only the additional sessions.

Narrowing leaves indexed sessions searchable.

Outside-scope indexed events are reported separately from pending work.

Invalid saved search configuration is refused even when valid CLI values are supplied.

[search]
order = "newest"
sessions = 10 # or "all"

Embedding worker control

The default CLI embedding worker count is Rust's available CPU parallelism.

Zero, negative and nonnumeric CLI worker limits are refused.

Zero, negative and nonnumeric configured limits are refused.

cg import <project-directory> --context <name> --search wait --embedding-workers 4

Without a CLI override, [search].embedding_workers selects the worker limit.

[search]
embedding_workers = 4

The command-line worker limit overrides [search].embedding_workers.

A limit of one prevents overlapping passage embedding calls.

Serial and concurrent builds commit identical passages, vectors, order and coverage.

For library worker settings, see projection workers.

See projection and worker coordination for handoffs, admission and retry behavior.

Passage configuration

The default CLI passage target is 256 tokens.

Configured passage targets appear in generation status.

[search.passages]
target_tokens = 256
hard_tokens = 384

A passage hard limit above the embedder's 8,192-token capability is refused.

A hard limit equal to the 32-token oversized-event overlap is refused.

That refusal creates no store.

An excessive hard limit returns config_error in every import mode.

It changes no store or captured history.

Changing passage settings makes the next wait import rebuild search.

The prior ready head remains active during the replacement build.

The completed replacement becomes the active head.

Writer memory limit

Set [write] memory_limit_bytes in cg/fabric.toml to choose the writer ceiling reported by status.

The CLI writer ceiling overrides the configured writer ceiling.

Status reports the configured writer bytes.

Without an explicit setting, status identifies a machine-derived writer ceiling.

A small writer setting still permits status.

It still permits top-level help.

It still permits a show lookup.

Read budgets

Set [read].memory_limit_bytes in cg/fabric.toml to choose the CLI read memory allowance.

[read].active_time_ms accepts positive integer milliseconds.

The default library read memory limit is 1 GiB.

The default CLI read active-time allowance is 5,000 ms.

A valid configured read memory limit permits status.

An insufficient read memory limit is refused.

Malformed read configuration returns config_error.

That refusal leaves the store unchanged.

For library entry points and cursor limits, see read budgets.

Local runtime directory

CONTEXTDB_OWNER_READ_RUNTIME_DIR locates the owner's channel directory.

A separate reader provisioned with the same directory reaches the live owner.

Model artifacts

See models and embedders for the independent model cache root.