コンテンツにスキップ
Developer Preview — APIs and language features may change before 1.0

requires mashin

このコンテンツはまだ日本語訳がありません。

requires mashin

Preamble: minimum mashin language version this machine needs

Translations

  • es: requiere mashin
  • fr: requiert mashin
  • en: requires mashin
  • de: erfordert mashin
  • ja: mashin必須
  • zh: 需要mashin
  • ko: mashin 필요

Example — Identity, pricing and building blocks

A paid helper: says who it belongs to, what it needs to run, what it costs per plan, and composes shared governance from a published kit.

machine premium_helper "Premium Helper"
has agency
identity input.user_id
requires mashin "0.70.0"
uses
"@mashin/actions/http" { get }
defines
cap_items(items) => items.take(10)
includes "@kits/gaas/governance"
accepts
question as text, is required
responds with
result as text
economics
pricing: subscription
currency: usd
tiers
starter
price: 29/month
limit: 1000 calls
pro
price: 99/month
implements
compute go
{result: "ok"}