LemonGateway.Workspace (lemon_gateway v0.1.0)

View Source

Where gateway tools write files they hand back to a channel.

The value is configured rather than read from the agent product, so the gateway does not depend on it:

config :lemon_gateway, :workspace_dir, "/srv/lemon/workspace"

An {module, function, args} tuple is also accepted, which is how the reference runtime forwards coding_agent's own workspace directory:

config :lemon_gateway, :workspace_dir, {CodingAgent.Config, :workspace_dir, []}

With nothing configured — or a configured module that is not loaded, or one that raises — it falls back to $LEMON_AGENT_DIR/workspace, defaulting to ~/.lemon/agent/workspace, which is the layout the agent uses.

A relative path, from either source, is resolved against the agent directory rather than the VM's current working directory. dir/0 is called from tools that write files, long after boot, and File.cwd!/0 at that point is not a location anyone chose.

Summary

Functions

Absolute path of the workspace directory.

Functions

dir()

@spec dir() :: String.t()

Absolute path of the workspace directory.