Skip to content

provides

provides

Legacy section. provides is the original input/output contract syntax with nested inputs and outputs blocks. It is still accepted by the parser for backward compatibility, but the canonical replacements are accepts (for inputs) and responds with (for outputs). Run mashin fmt to auto-migrate.

When to use

Do not use provides in new code. Use accepts and responds with instead.

The parser accepts provides with nested inputs and outputs blocks and will continue to do so during the migration period. If you encounter provides in existing .mashin files, either rewrite it manually or run mashin fmt to convert automatically.

Syntax (legacy)

provides
inputs
message as text, is required
priority as text, default: "medium"
outputs
team as text
confidence as decimal

Canonical replacement

accepts
message as text, is required
priority as text, default: "medium"
responds with
team as text
confidence as decimal

The canonical form is one nesting level flatter. accepts and responds with are top-level section verbs, while provides > inputs and provides > outputs required an extra level of indentation.

Migration

The mashin fmt formatter automatically converts:

// Before (legacy)
provides
inputs
name as text, is required
outputs
greeting as text
// After (canonical)
accepts
name as text, is required
responds with
greeting as text

Field declarations, types, and modifiers are preserved exactly. Only the section structure changes.

Translations

LanguageKeyword
Englishprovides
Spanishprovee
Frenchfournit
Germanbietet
Japanese提供
Chinese提供
Korean제공

See also

  • accepts - Canonical input contract declaration
  • responds with - Canonical output contract declaration