Skip to content

feat!: move builtin tool selection into the runtime contract - #164

Draft
hallerite wants to merge 2 commits into
mainfrom
feat/contract-tooling
Draft

feat!: move builtin tool selection into the runtime contract#164
hallerite wants to merge 2 commits into
mainfrom
feat/contract-tooling

Conversation

@hallerite

Copy link
Copy Markdown
Member

Completes #160's env-config removal: RLM_TOOLING / RLM_BUILTIN_TOOLS were the last env vars configuring model-visible behavior (the tool set), which had just become practical — the fetch builtin tool (#132) was reachable only through them.

Contract: ai.prime.rlm/runtime-v1 gains an optional builtin_tools list (null/absent = the ipython-only default, so existing clients are unaffected). Children inherit it in-memory via model_copy like the rest of the config; the registry validates names when the engine starts.

Removed: RLM_TOOLING, RLM_BUILTIN_TOOLS, and the tooling presets. The presets' skills-half was already dead after #160 (skills are explicit contract input), which left dual/tools indistinguishable — the whole preset table reduced to "which tools", now said directly.

os.environ reads remaining in src/rlm after this: RLM_HOME (process placement, set by the launcher) and the engine→kernel IPC vars (RLM_SESSION_DIR, RLM_DEPTH, RLM_EXEC_TIMEOUT, RLM_ALLOW_GIT — derived from the contract, delivered to the kernel subprocess).

Suite green (152 passed), ruff clean. Verifiers companion: adds a matching typed builtin_tools harness field, sent on the wire only when set so older nano-rlm pins keep validating.

Stacked on #160.

hallerite and others added 2 commits September 1, 2026 14:53
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.
RLM_TOOLING / RLM_BUILTIN_TOOLS were the last env vars configuring
model-visible behavior. The contract gains an optional builtin_tools list
(None = the ipython-only default); children inherit it via model_copy like
the rest of the config. The tooling presets collapse with them: their
skills-half was already dead post-contract-only-config (skills are explicit
contract input), which left dual/tools indistinguishable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant