Skip to content

feat!: remove standalone env configuration (ACP contract only) - #160

Merged
hallerite merged 1 commit into
mainfrom
feat/contract-only-config
Sep 1, 2026
Merged

feat!: remove standalone env configuration (ACP contract only)#160
hallerite merged 1 commit into
mainfrom
feat/contract-only-config

Conversation

@hallerite

@hallerite hallerite commented Aug 28, 2026

Copy link
Copy Markdown
Member

rlm is now consumed exclusively for training, through the versioned ai.prime.rlm/runtime-v1 ACP contract — and recursive children already inherit configuration in-memory (model_copy), never from the environment. This PR removes the third, now-unused config path: standalone env-var resolution.

Removed

  • RuntimeConfig.from_env / ProviderConfig.from_env / InvocationContext.from_env + env parsing helpers — config objects are constructed explicitly (by the ACP layer or by the caller).
  • RLMEngine fallback to env: an explicit runtime_config is now required.
  • load_mcp_servers / dump_mcp_servers (RLM_MCP_CONFIG): MCP servers come only from the caller/ACP session.
  • make_client() env fallback and resolve_provider: an explicit ProviderConfig is required.
  • rlm.run() standalone path: it is broker-only (inside a running session); outside one it raises.
  • CLI standalone prompt + interactive modes: rlm --acp is the only mode.
  • README "Standalone configuration" table → replaced with the contract description; the process env now configures only process infrastructure (RLM_HOME).

Deliberately untouched (internal, not user config): engine→kernel plumbing (RLM_SESSION_DIR, RLM_ALLOW_GIT, kernel-env delivery) and the registry dev presets (RLM_TOOLING, RLM_BUILTIN_TOOLS) — the latter could move into the contract later if wanted.

Tests updated to construct configs explicitly (tests/conftest.py: make_runtime_config); suite green.

Part of the stack: fetch (#132) → contract-only config (this) → execution guardrails (#158) → role-aware sub-agent prompting (#151).


Note

High Risk
Breaking removal of standalone CLI, SDK entry, and env-based configuration forces all integrators onto the ACP runtime contract; misconfigured clients will fail at engine init rather than silently using ambient env.

Overview
Breaking change: rlm no longer runs from environment variables or a one-shot CLI prompt. Runtime settings must come from the versioned ai.prime.rlm/runtime-v1 object on ACP session/new; recursive children keep inheriting config in memory, not from the process env.

The CLI only accepts rlm --acp. Standalone rlm "prompt", interactive mode, and flags that wrote RLM_* env vars are gone.

rlm.run() and RLMEngine now require an explicit RuntimeConfig (and broker for run()). ProviderConfig.from_env, resolve_provider, load_mcp_servers / RLM_MCP_CONFIG, and the large README env table are removed; MCP servers are passed by the ACP session or the mcp_servers engine kwarg.

Docs are updated so skills, compaction, and kernel env are described against the contract fields (skills, summarize_at_tokens, kernel_env). Tests use make_runtime_config() instead of monkeypatching env.

Reviewed by Cursor Bugbot for commit cfcb7e6. Bugbot is set up for automated code reviews on this repo. Configure here.

@hallerite
hallerite force-pushed the feat/fetch-skill branch 2 times, most recently from f785f40 to 9c5594d Compare August 30, 2026 13:51
@hallerite
hallerite force-pushed the feat/contract-only-config branch from 8ee35df to 534033d Compare August 30, 2026 13:51
@hallerite
hallerite marked this pull request as ready for review September 1, 2026 14:46
Base automatically changed from feat/fetch-skill to main September 1, 2026 14:49
rlm is consumed exclusively through the versioned ai.prime.rlm/runtime-v1 contract;
recursive children inherit configuration in-memory. Remove the env-var config path:

- config.py: drop RuntimeConfig/ProviderConfig/InvocationContext.from_env and the
  env parsing helpers; configuration objects are constructed explicitly.
- engine.py: RLMEngine requires an explicit runtime_config; MCP servers come only
  from the caller (no RLM_MCP_CONFIG fallback).
- mcp.py: drop load_mcp_servers/dump_mcp_servers (env serialization path).
- client.py: make_client requires an explicit ProviderConfig; drop resolve_provider.
- api.py: rlm.run() is broker-only (inside a session); standalone execution raises.
- cli.py: `rlm --acp` is the only mode; standalone prompt/interactive modes removed.
- README: standalone-configuration section replaced with the contract description;
  the process env now configures only process infrastructure (RLM_HOME).

Engine-to-kernel plumbing vars (RLM_SESSION_DIR, RLM_ALLOW_GIT, RLM_KERNEL_ENV
delivery) and registry dev presets (RLM_TOOLING, RLM_BUILTIN_TOOLS) are internal
and unchanged.
@hallerite
hallerite merged commit 140e367 into main Sep 1, 2026
12 of 13 checks passed
@hallerite
hallerite deleted the feat/contract-only-config branch September 1, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants