Arcana::AgentConfig
Who a project's agent is on the bus, read from the project's
.ai/config.yml (the dot-ai convention, draft 0.3):
handle: arcana
description: >
The agent for the Arcana bus itself.
The handle may be written with or without its @. Configs from before
draft 0.3 kept both keys under arcana:; those are still read when the
top-level keys are missing. Without a handle anywhere, the handle falls
back to @ plus the project directory's name.
A session's project is the nearest directory at or above where it
works that holds .ai/ (find, project_root); only where there is
none is the session's own directory the project.
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.
The project's key (see Arcana::Key) proves the same, without the
bus ever holding the secret: .ai/arcana.key, kept out of git the
same way, or $XDG_STATE_HOME/arcana/keys/ without .ai/. One key
holds all the project's addresses.
Constants
Constructors
load for the project a session in dir works in (project_root).
Raises AgentConfig::Error when the config exists but can't be
read, rather than quietly falling back to the directory name.
Class methods
An .ai link on the way from dir to its project whose target is
gone. The walk passes it as if it weren't there, so a session it
should have led to a project lands in the one above, or in none.
@ plus the directory name, folded into a legal handle.
The project a session in dir works in (dot-ai, "Projects inside
projects"): the nearest directory at or above it that holds .ai/,
since a directory without one belongs to the project above it.
Walks the path with symbolic links resolved, as dot-ai does, so
both find the same project. With no .ai/ anywhere above, dir
itself, whose handle is then the fallback.
.ai may be a symbolic link to another project's .ai/: a folder
grouping several repositories under one project links to the .ai/
of the repository that holds it, and a session in any of them finds
that project through the link.
Instance methods
The project's key, made on first use. Each call also checks that git ignores it, which a key made by an older hook may lack.
The owner token, made on first use. Each call also checks that git
ignores it, as key! does.