Skip to main content

Module config

Module config 

Source
Expand description

Where yapi keeps its state. Same layout as pi, under yapi’s own directories.

Constants§

AGENT_DIR_ENV
Environment variable overriding the agent directory.
APP_NAME
Application name in messages and paths.
PROJECT_DIR
Project configuration directory name.
SESSION_DIR_ENV
Environment variable overriding the session directory. --session-dir wins.

Functions§

agent_dir
The agent directory: YAPI_CODING_AGENT_DIR, else ~/.yapi/agent.
bin_dir
Executables the agent installs for its tools, prepended to PATH for commands.
child_env
Variables every child process gets, as pi sets them on its own process: the agent markers PI_CODING_AGENT=true and AI_AGENT=yapi, the offline variables in offline mode, and the proxy from the httpProxy setting where the environment has none.
default_session_dir
Where sessions for cwd live by default: <agent>/sessions/--<cwd with separators as dashes>--, both resolved against the process directory.
docs_dir
The documentation the model reads: yapi’s pages, with pi’s README, docs and examples under pi/. The installer or yapi’s first run puts it here.
env_flag
Whether environment variable name is set to 1, true or yes, as pi reads PI_OFFLINE.
env_set
Whether environment variable name is set and not empty, as pi tests process.env.PI_OFFLINE and PI_SKIP_VERSION_CHECK.
env_var
Environment variable name, with the values offline mode sets.
set_offline
Turns on offline mode for the process, as pi does for --offline or a true PI_OFFLINE: from then on PI_OFFLINE and PI_SKIP_VERSION_CHECK read as 1 here and in every child’s environment.