OptionalcallbackThe action (delegates to the SDK / an ephemeral UI store). Strategy: override.
Takes the per-invocation input ARGS — distinct from state (the value the command
reflects). See CommandCallback and design/COMMAND-DESIGN.md "arg vs state".
OptionalcontextView-specific context. Strategy: override.
OptionaldescriptionOptionaldisabledReasons the command is unavailable. Array-valued ⇒ accumulates (concat,
most-specific first): every contributing scope may add reasons, and the command is
disabled if ANY reason is present (resolved disabled() derives from this for
read-compat). Dynamic reasons are expressed by re-contributing (the contributor
re-runs when its inputs change) rather than storing a function — that's the definitions
model. Note: a child scope cannot yet clear a parent's reason (a "fancier type"
later — see design/COMMAND-DESIGN.md).
OptionalgroupPer-surface description overrides keyed by groupKey — the description twin of
groupLabels (a compact tooltip in a dense menu vs. the full ribbon text). Falls back to
description when the surface has no entry.
OptionalgroupPer-surface icon overrides keyed by groupKey — the icon twin of groupLabels (e.g. a
glyph in a toolbar, a check mark in a menu). Falls back to icon.
OptionalgroupPer-surface label overrides (e.g. "Rename Sheet" → "Rename" in a context menu).
OptionalhiddenHidden from surfaces entirely (e.g. macro recording). Scalar ⇒ overrides.
OptionaliconImmutable identity. Every contribution for the same command shares this key.
OptionallabelOptionalparamsMessage parameters for ICU-subset label/groupLabels/description messages
(formatMessage — {count, plural, …} / {mode, select, …}). The catalog authors the
localized MESSAGE (with the parameter defaults — ChromeRecord.params); a dynamic
contributor keeps the live values current (e.g. the sheet's selection reducer contributes
{ count, mode } for the insert/delete/hide labels). Strategy: override — contribute the
COMPLETE parameter set for the command's messages, not a delta.
OptionalshortcutOptionalstateModel state. Strategy: override.
OptionaltagsAccumulated metadata (like disabledReasons): scopes' tags concatenate. Cross-cutting
rules keyed on a tag (e.g. "mutator commands disable when the sheet is protected") are
contributor logic, not a registry feature — see design/COMMAND-DESIGN.md.
OptionaltargetFocus/contains target (commands refocus this after execute). Strategy: override.
A contributed, partial command definition — the authoring side of the command system. Scopes/providers contribute these; the registry reduces all contributions for a given
key(along the active scope chain) per-property into a derived, read-only ResolvedCommand. Authors never build or mutate a resolved instance directly (no moreinstance.updateCallback(...)); they contribute/merge definitions via the provider.Every field except
keyis optional and merged per-property (see MERGE_STRATEGY). Canonical example —copy:{ key, icon, label }(stable chrome),{ callback }(what's actually copied),{ disabledReason: 'Sheet is protected' }.Reuses the shared sub-types from ICommand (
DynamicValue,Callback,DynamicContext,ITarget) so the resolved read surface stays byte-compatible with the existingcommand/package during the port. Seedesign/COMMAND-DESIGN.md.