On this page

0005. Platforms supply all effects

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

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).