0094: The cli platform is an embedded plugin package
Status: Accepted (default; pending owner confirmation)
Amends ADR-0050.
Context
ADR-0050 defines the built-in cli platform. M10.2
moves its declaration to the platform package boundary established
by ADR-0093, while preserving the existing behavior and making the
platform available without fetching it.
Decision
plugins/cli/ is the source of truth for the
default platform. It contains a manifest,
platform.toml, and DOCS.md, and is
embedded in the toolchain with include_str!,
following the embedded edition-source approach in ADR-0089. The
cli platform is therefore always available
locally.
Move runtime/hrt_cli.h,
runtime/hrt_io.h, and runtime/hrt_proc.h
to plugins/cli/native/ without changing their
contents. Keep hrt_path.h and hrt_map.h
in runtime/: they provide kernel types used by pure
code, rather than platform-specific CLI behavior.
Keep CliError and Output as seeded
types, with their ownership declared by the platform. Converting
them to ordinary .hn declarations is deferred because
it would change layout names and the emitted digest.
Alternatives considered
- Keep the headers in
runtime/and reference them by name: rejected because it makes the platform package less self-contained and literal. - Turn
CliErrorandOutputinto.hndeclarations now: deferred because of layout-name and digest changes.
Consequences
The embedded plugins/cli/ package is the default
platform's declaration and native-header source. Existing programs
continue to use cli without fetching or naming
another platform, and the moved native headers retain their
bytes.