0005. Platforms supply all effects
- Status: Accepted
- Date: 2026-10-29
- Plan: M6.1, M10.1–M10.6, M12, M15.3
- Review: Platforms are the missing extension point
Context
CLI tools and agents need different effects: files and processes on one side; models, tools, budgets and journals on the other. Putting both in the language makes every program carry both.
Decision
Follow Roc's split between application and platform. A program
names its platform, and the platform supplies every effect as
capability values passed into main. There are no
global I/O functions.
First platforms: cli (files, stdio, args, env,
processes, exit codes; fuel off), agent (actions and
events, providers, tools, budgets, journals, grants, cancellation)
and later wasm-host (sandboxed hot-loading). Until
the platform extension point exists (M10.1), cli is
built into the compiler but shaped exactly like a plugin.
Alternatives considered
- A standard library with global I/O — familiar, but ambient authority defeats capability safety.
- One universal runtime — every CLI tool would carry the agent runtime.
Consequences
A plugin that receives no capabilities provably cannot do I/O, which makes agent-written plugins safe to import. Fuel and deadlines become each platform's choice. Subprocess authority needs an OS sandbox (M10.4).