On this page

0074. Capability ceilings as declared intent

Context

Packages need an explicit account of platform effects. M9.1 decides visibility by source file (ADR-0069); package identity alone must not grant authority.

Decision

The capabilities are stdin, stdout, stderr, env, fs and process. If the root manifest omits capabilities, it is unrestricted; if it declares the list, every dependency's declared list must be a subset (E0945). A dependency that omits the key declares []. E0945 points to the dependency's capabilities key, falling back to its package key when absent.

For each source file, calls on a capability receiver and accesses to a capability field of Cli require that file's package to declare the capability (E0946). Authority follows SourceFile.file_index, consistent with ADR-0069. Generic definitions retain definition-file scope: bound calls whose receivers specialize to capabilities are checked at the definition's call span, including interface dispatch. Derived handles such as File and readers are exempt.

Cli.args, Cli.raw_args and Cli.exit are not assigned any of these six capabilities.

Alternatives considered

Consequences

Ceilings make package effect intent reviewable and diagnose violations without changing runtime behavior. Handles may be delegated after acquisition. This is not a security boundary; sandboxing is deferred to M10.