struct

Arcana::AgentConfig

Inherits Struct < Value < Object

Who a project's agent is on the bus, read from the project's .ai/config.yml (the dot-ai convention):

arcana:
  handle: "@arcana"
  description: >
    The agent for the Arcana bus itself.

Without a handle in the config, the handle falls back to @ plus the project directory's name, which is what the session hooks used before the config existed.

The owner token proves to the bus that a registration is this project's (see Directory#claim). It lives in .ai/arcana.token, kept out of git through the repository's info/exclude since it only means something to this machine's bus. A project without .ai/ keeps it under $XDG_STATE_HOME/arcana/tokens/ instead.

Constants

CONFIG_FILES = {"config.yml", "config.yaml"}
TOKEN_FILE = "arcana.token"

Constructors

load(project_dir : String) : AgentConfig

Raises AgentConfig::Error when the config exists but can't be read, rather than quietly falling back to the directory name.

Source
new(project_dir : String, handle : String, description : String = "")
Source

Class methods

config_path(project_dir : String) : String | Nil
Source
fallback_handle(project_dir : String) : String

@ plus the directory name, folded into a legal handle.

Source

Instance methods

ai_dir?
Source
description
Source
handle
Source
owner_token

The owner token, or nil if none has been made yet.

Source
owner_token!

The owner token, made on first use.

Source
project_dir
Source
token_path
Source

Nested types