Skip to main content

Module render

Module render 

Source
Expand description

Render a loaded compose into on-disk artifacts.

Outputs under <root>/state/:

  • envs/<project>-<agent>.env — env vars for the agent wrapper.
  • mcp/<project>-<agent>.json — MCP stdio config for the runtime.
  • claude/<project>-<agent>.json — wrapper-managed Claude Code settings (currently a PreToolUse deny hook for synchronous-prompt tools that strand a headless pane). Claude-code agents only.
  • role_prompts/<project>-<agent>.md (multi-file role_prompt only) — the ordered concatenation of every source file declared in the role’s role_prompt: [...] list. Re-materialized on every render so any source-file edit lands in the agent’s prompt at next boot.

systemd / launchd unit rendering lives behind a feature flag when those back-ends are enabled via supervisor.type.

Functions§

claude_settings_path
Absolute path to the wrapper-managed Claude Code settings file. The file carries the default PreToolUse deny hook for synchronous-prompt tools (AskUserQuestion, EnterPlanMode, ExitPlanMode) so a headless agent doesn’t strand on a picker no one will answer. The wrapper applies it via claude --settings <path> for every claude-code agent except those in permission_mode: attended.
env_path
Absolute path to the rendered env file for a given agent.
mcp_path
Absolute path to the rendered MCP config for a given agent.
render_agent
Rendered env + MCP content for a single agent.
render_claude_settings
Wrapper-managed Claude Code settings JSON for a single agent. Returns Some(json) for claude-code runtime regardless of permission_mode — the wrapper decides whether to apply it. Returns None for runtimes that don’t read Claude settings (codex, gemini, …).
role_prompt_concat_path
Absolute path to the materialized concatenation of a multi-file role_prompt list. Only ever written for the list form — single-file role_prompt keeps pointing at its source path directly.
system_prompt_path
Resolve the absolute path that SYSTEM_PROMPT_PATH will point at.
write_role_prompt_concat
Materialize the multi-file role_prompt concatenation for one agent.