Skip to main content

Expo / React Native project integration

@farmslot/adapter-rn is the thin Expo integration over the shared Recipe v1 harness. It scaffolds project-owned files; it does not define another protocol.

Install​

yarn add -D @farmslot/adapter-rn @farmslot/recipe-runner @farmslot/protocol
farmslot-adapter-rn init
yarn recipe:doctor
yarn recipe:validate
yarn recipe:run

For live UI, bridge, and HUD support:

farmslot-adapter-rn init --with-bridge

Wrap the app root with the generated RecipeBridgeProvider and enable it only in development with EXPO_PUBLIC_FARMSLOT_RECIPE_BRIDGE=1.

Ownership​

  • @farmslot/protocol owns recipe validation.
  • @farmslot/recipe-runner owns graph execution, evidence, and generic actions.
  • @farmslot/adapter-rn owns Expo scaffolding and integration checks.
  • the app owns its bridge configuration, product actions, fixtures, and recipes.

Do not add wallet, product, or ticket-specific behavior to the Expo package. Put durable product capabilities in the app's namespaced action manifest and reusable journeys in its recipe library.

Author and verify​

Start from the generated smoke recipe or another working recipe:

farmslot recipe run --list --project-root . --platform mobile \
--library-source app=scripts/agentic/recipe --json
farmslot recipe run <closest-recipe> --describe --project-root . --platform mobile \
--library-source app=scripts/agentic/recipe --json
farmslot-adapter-rn validate ./proof.recipe.json --param key=value
farmslot-adapter-rn run ./proof.recipe.json --param key=value

The discovery commands come from the farmslot CLI; in a registered Farmslot project, farmslot recipe run --list --adapter mobile --json reads the project's libraries without the other flags. Task-only dependencies beside artifacts/recipe.json belong in artifacts/recipe-library/; no library flag is required.

Use device UI actions only for visible behavior. Keep deterministic fixture setup before the proof boundary and declare teardown when a run mutates state. Read captured images and runtime evidence; do not infer success from bridge reachability alone.

See Write a recipe and Recipe Protocol v1.