clawft

Configuration Reference

Complete reference for every weave.toml field including kernel, tick, sources, embedding, governance, and mesh settings.

weave.toml Configuration Reference

WeftOS projects are configured via weave.toml at the project root. This file is generated by weftos init and can be edited manually.

The weave.toml file uses TOML format. The clawft CLI (weft) reads a separate ~/.clawft/config.json for agent/provider/gateway settings; this document covers only the WeftOS-specific weave.toml.

Configuration Discovery

SourceFormatPurpose
weave.toml (project root)TOMLWeftOS kernel, tick, sources, embedding, governance, mesh
~/.clawft/config.jsonJSONclawft agent, provider, gateway, tools, channels
CLAWFT_CONFIG env varJSONOverride path for the clawft config file

Both snake_case and camelCase field names are accepted in JSON config files. TOML files use snake_case only.


[domain]

Project identity metadata.

FieldTypeDefaultDescription
namestringdirectory nameProject name used in logs and UI
languagestringauto-detectedPrimary language (rust, javascript, python, generic). Auto-detected from Cargo.toml, package.json, or pyproject.toml
descriptionstring"WeftOS-managed project"Human-readable project description
[domain]
name = "my-project"
language = "rust"
description = "Backend API service"

[kernel]

Controls the WeftOS kernel subsystem. These fields map to KernelConfig in clawft-types.

FieldTypeDefaultDescription
enabledboolfalseActivate the kernel on startup. When false, kernel subsystems only run when invoked via weave kernel commands
max_processesu3264Maximum concurrent entries in the process table. Raise for workloads that spawn many parallel agents
health_check_interval_secsu6430Seconds between periodic health checks. Lower values detect failures faster but add overhead
[kernel]
max_processes = 128
health_check_interval_secs = 15

[kernel.chain]

Cryptographic audit trail configuration. Requires the exochain feature gate.

FieldTypeDefaultDescription
enabledbooltrueEnable the local chain
checkpoint_intervalu641000Events between automatic checkpoints. Lower values give more durable state at the cost of more I/O
chain_idu320Chain identifier. 0 means the local node chain
checkpoint_pathstring or null~/.clawft/chain.jsonFile path for chain persistence. Omit to use the default location
[kernel.chain]
enabled = true
checkpoint_interval = 500
checkpoint_path = ".weftos/chain.json"

[kernel.resource_tree]

Hierarchical resource model. Requires the exochain feature gate.

FieldTypeDefaultDescription
enabledbooltrueEnable the resource tree
checkpoint_pathstring or null(in-memory)Path to checkpoint file. Omit for in-memory only
[kernel.resource_tree]
enabled = true
checkpoint_path = ".weftos/resources.json"

[kernel.cluster]

Distributed coordination via ruvector. Requires the cluster and/or mesh feature gates.

FieldTypeDefaultDescription
replication_factorusize3Replica copies per shard
shard_countu3264Total shards in the cluster
heartbeat_interval_secsu645Seconds between heartbeat checks
node_timeout_secsu6430Seconds before marking a node offline
enable_consensusbooltrueEnable DAG-based consensus
min_quorum_sizeusize2Minimum nodes required for quorum
seed_nodesstring[][]Addresses of coordinator nodes for discovery
node_namestring or null(none)Human-readable display name for this node
[kernel.cluster]
replication_factor = 3
shard_count = 64
heartbeat_interval_secs = 5
seed_nodes = ["192.168.1.100:8080", "192.168.1.101:8080"]
node_name = "node-alpha"

[tick]

ECC cognitive tick loop configuration. Controls how frequently the kernel runs its cognitive cycle.

FieldTypeDefaultDescription
interval_msu6450Minimum tick interval in milliseconds. The calibrator may increase this if the system is slow
budget_ratiof640.3Fraction of tick budget allocated to cognitive processing (0.0-1.0)
adaptivebooltrueEnable adaptive tick calibration based on system load
[tick]
interval_ms = 50
budget_ratio = 0.3
adaptive = true

Calibration runs during weave boot and logs the chosen tick interval. When adaptive = true, the kernel adjusts the interval based on measured latency.


[sources]

Defines where the kernel reads project artifacts for indexing and analysis.

[sources.git]

FieldTypeDefaultDescription
pathstring"."Path to the git repository root
branchstring"main"Branch to track

[sources.files]

FieldTypeDefaultDescription
rootstring"."Root directory for file scanning
patternsstring[]auto-detectedGlob patterns for files to index. Auto-detected based on language (**/*.rs for Rust, **/*.ts,js for JavaScript, etc.)
[sources.git]
path = "."
branch = "main"

[sources.files]
root = "src"
patterns = ["**/*.rs", "**/*.toml"]

[embedding]

Embedding backend for the ECC cognitive substrate.

FieldTypeDefaultDescription
providerstring"mock-sha256"Embedding provider. "mock-sha256" for deterministic hash vectors, or an LLM model name for real embeddings
dimensionsusize384Vector dimensionality
batch_sizeusize16Batch size for embedding requests
[embedding]
provider = "mock-sha256"
dimensions = 384
batch_size = 16

To use real neural embeddings, enable the onnx-embeddings feature and download the model:

scripts/download-model.sh
scripts/build.sh native --features onnx-embeddings

The model is stored in .weftos/models/all-MiniLM-L6-v2.onnx.


[governance]

Governance engine settings for risk assessment and environment policies.

FieldTypeDefaultDescription
default_environmentstring"development"Active environment: development, staging, production
risk_thresholdf640.9Risk score threshold (0.0-1.0). Operations above this value require explicit approval
[governance]
default_environment = "production"
risk_threshold = 0.7

[mesh]

Peer-to-peer mesh networking between WeftOS nodes. Requires the mesh feature gate.

FieldTypeDefaultDescription
enabledboolfalseEnable mesh networking
bind_addressstring"0.0.0.0:9470"Address and port to bind the mesh listener
seed_peersstring[][]Initial peer addresses for mesh discovery
[mesh]
enabled = true
bind_address = "0.0.0.0:9470"
seed_peers = ["192.168.1.10:9470"]

Example Configurations

Minimal (development)

[domain]
name = "my-app"

[kernel]
max_processes = 64

[tick]
interval_ms = 50
adaptive = true

[sources.files]
root = "."
patterns = ["**/*.rs"]

[embedding]
provider = "mock-sha256"
dimensions = 384
batch_size = 16

Single-node production

[domain]
name = "prod-service"
language = "rust"
description = "Production API backend"

[kernel]
max_processes = 256
health_check_interval_secs = 10

[kernel.chain]
enabled = true
checkpoint_interval = 500
checkpoint_path = "/var/lib/weftos/chain.json"

[kernel.resource_tree]
enabled = true
checkpoint_path = "/var/lib/weftos/resources.json"

[tick]
interval_ms = 50
budget_ratio = 0.4
adaptive = true

[sources.git]
path = "."
branch = "main"

[sources.files]
root = "src"
patterns = ["**/*.rs"]

[embedding]
provider = "mock-sha256"
dimensions = 384
batch_size = 32

[governance]
default_environment = "production"
risk_threshold = 0.7

[mesh]
enabled = false

Multi-node cluster

[domain]
name = "cluster-node-1"
description = "Cluster member"

[kernel]
max_processes = 512
health_check_interval_secs = 5

[kernel.chain]
enabled = true
checkpoint_interval = 200

[kernel.cluster]
replication_factor = 3
shard_count = 128
heartbeat_interval_secs = 3
node_timeout_secs = 15
enable_consensus = true
min_quorum_size = 2
seed_nodes = ["10.0.0.1:9470", "10.0.0.2:9470"]
node_name = "node-1"

[tick]
interval_ms = 25
budget_ratio = 0.3
adaptive = true

[sources.git]
path = "."
branch = "main"

[sources.files]
root = "."
patterns = ["**/*.rs"]

[embedding]
provider = "mock-sha256"
dimensions = 384
batch_size = 16

[governance]
default_environment = "production"
risk_threshold = 0.8

[mesh]
enabled = true
bind_address = "0.0.0.0:9470"
seed_peers = ["10.0.0.1:9470", "10.0.0.2:9470"]

See Also

On this page