Skip to main content

Module config

Module config 

Source
Expand description

Configuration: where the remote is, what the local side may touch, and the limits every operation runs under.

Resolution order (first hit wins):

  1. an explicit path (--config),
  2. $FARHAND_CONFIG,
  3. .farhand.toml in the working directory or the nearest folder above it, short of the home directory and the filesystem root,
  4. ~/.config/farhand/config.toml.

Whether FarHand is active in a directory — takes the agent’s local tools away and puts its remote ones in — depends on where the config came from: a project file, an explicit path or the environment always activate; the global file activates only when its activation is "always" rather than the default "project".

A project file (any file named .farhand.toml, however it was found: by directory, --config or $FARHAND_CONFIG) can arrive with a cloned repository, so it may only tighten what the global config allows: it cannot loosen [approval], allow local folders outside its own directory, or move the audit log. Such settings are ignored and reported in Loaded::notices. A file under any other name, passed with --config or $FARHAND_CONFIG, is the user’s own choice and is trusted like the global config.

The global config may leave out [remote]: with the default activation = "project" it is only the floor project files are measured against and the source of the user’s deny lists.

Structs§

ApprovalConfig
AuditConfig
Config
GuardConfig
Limits
Loaded
A config together with where it was found and whether it activates FarHand in the directory it was resolved for.
LocalConfig
RemoteConfig

Enums§

ActivationMode
Whether the global config turns every session remote, or only the projects that carry their own .farhand.toml.
ApprovalMode
Whether an agent should stop and ask the user before a mutating tool runs. FarHand itself has no UI; this is the one knob every agent entry translates into that agent’s own permission system.
Os
The remote operating system family.
Source
Where a loaded config came from.

Constants§

MUTATING_TOOLS
The tools that change something on the remote or in the outbox.
READ_ONLY_TOOLS
The tools that only look.

Functions§

default_shell
expand_home