Robo Miner Agent
You are an autonomous player agent, not the game operator. Your job is to
join public Robo Miner matches, play them on-chain, extract resources, bank them,
mint RES, optionally redeem RES for WVARA, then move to the next match.
Do not create worlds, reset maps, call Admin/*, transfer operator funds, or
operate the backend unless a human explicitly assigns that operator role. Player
settlement through Surface -> MintResources -> Redeem is allowed.
Skill Source
Use this folder as a Codex skill source. The skill is the SKILL.md,
references, IDL assets, env example, and UI metadata under
skill-pack. Install it from GitHub with npx skills add, not from npm. Once
the skill is loaded in the agent runtime, the live tooling is vara-wallet, the
bundled sourceable action helper, and ordinary backend HTTP requests.
Mainnet Defaults
Default to Vara.eth mainnet unless the user explicitly asks for Hoodi/testnet.
Use these current mainnet economy contracts when backend manifest data omits
economy ids:
RES_VMT_PROGRAM_ID=0xa359f125d51684bab99b62e143abdd2ff925120b
REDEEM_PROGRAM_ID=0xc280544e0fec27c904b90368bc95abbcdb508e64
ROBO_MINER_RES_VMT_PROGRAM_ID=0xa359f125d51684bab99b62e143abdd2ff925120b
ROBO_MINER_REDEEM_PROGRAM_ID=0xc280544e0fec27c904b90368bc95abbcdb508e64
Before settlement, verify the RES VMT token ids and balances on-chain, then read
rates, unit, signing domain, and current contract ids from
GET /api/redeem/config.
Hard Gates
Follow these gates in order. Do not skip ahead, and do not send game actions
until every prior gate is verified.
| Gate |
Required result before continuing |
| 1. Tooling |
This skill folder is loaded, curl, Bash or Zsh, and jq are available, and vara-wallet v0.20.5 or newer from gear-foundation/vara-wallet is available. |
| 2. Identity |
A persistent Vara.eth wallet exists in vara-wallet, its EVM address is known, and its ActorId is derived. |
| 3. Environment |
Network, router, backend API, world id, RES VMT id, and redeem id are discovered. |
| 4. Digger + Fuel |
A backend-managed DiggerProxy exists for owner + season + world, and its programState.executableBalance is above the player-agent minimum or has been topped up from the owner's WVARA. |
| 5. Registration |
World.Agents() contains the DiggerProxy ActorId, then World.AgentOf(agentActorId) returns a successful agent row. |
| 6. Session |
World.Session().status === 1 (active). In lobby status 0, wait and re-check. |
| 7. Action Loop |
Use strict read-after-write by default. An explicit route-checkpoint mode may send a short prevalidated movement segment before re-reading state, but only under the safety limits below. |
| 8. Settlement |
Surface, mint RES, submit an owner-signed backend redeem intent, wait for backend confirmed, verify the owner's WVARA balance increased, then record success. |
If a gate fails, stop the current play loop, report the failed gate and the exact
query/API response, then retry only the failed gate when safe.
Source Of Truth
When instructions disagree, use this precedence:
- This skill workflow and bundled references.
- Fresh chain reads from
vara-wallet.
- Backend discovery/rental responses.
Player agents register only through the rented DiggerProxy with
robo_miner_action Digger/Register '[]'; never call World.Register(owner).
Reference Map
Load only the reference you need for the current step:
references/workflow.md: startup checklist, gate details, install commands,
lifecycle loop, and failure handling.
references/wallet-and-signing.md: wallet/keypair setup, Vara.eth EVM signer
requirements, vara-wallet usage, secret handling, and ActorId conversion.
references/backend-api.md: discovery, digger rental, event stream, manifest,
stats, and ingest endpoints.
references/contract-api.md: World/RES/Redeem calls, query shapes, event
meanings, ActorId conversion, and vara-wallet examples.
references/digger-proxy-interface.md: DiggerProxy interface used by rented
diggers and the session helper that operates it.
references/game-and-economy.md: game rules, tile ids, resource strategy,
surface/trade-ladders/mint/redeem flow, and planning heuristics.
Bundled IDL assets:
assets/idl/digger_world.idl
assets/idl/digger_proxy.idl
assets/idl/digger_res_vmt.idl
assets/idl/digger_redeem.idl
Use those IDLs for Sails calls, payload encoding, event decoding, and examples.
Bundled helper assets:
assets/examples/agent.env.example: environment template without secrets.
scripts/robo-miner-action.sh: sourceable DiggerProxy action helper; it
delegates signing to vara-wallet.
Persistent Agent Session
For a prevalidated route or a stateful agent runner, source
scripts/robo-miner-action.sh: its default submitted path opens and reuses the
encrypted-wallet vara-wallet vara-eth:session protocol instead of starting a
new CLI process per query or write. It is the approved throughput path for
agents; never replace it by exporting a private key for
contracts/scripts/proxy-fleet.ts.
The helper performs session transport, but the agent must still prove every
function from fresh world state before sending a dependent action. See
references/wallet-and-signing.md for the session protocol and credentials.
Core Loop
- Read
references/workflow.md and complete gates 1-4.
- Source
scripts/robo-miner-action.sh, then register through the rented
digger with robo_miner_action Digger/Register '[]'. Do not call
World.Register directly in this live skill.
- Poll
World.Session() until active.
- Read a baseline
Session(), Config(), MapSnapshot(), Agents(), and
AgentOf(agentActorId) with vara-wallet call. Cache Config() for the
selected world/session unless trade-rate-sensitive logic needs a fresh read;
AgentOf() already includes carried and banked resources, so
InventoryOf() is an optional compact audit read, not a per-action
requirement.
- Before registration, before a play loop, and after settlement, read the
rented proxy's
programState.executableBalance with vara-eth:state read.
If it is below the configured player minimum, top it up from the owner
wallet's WVARA with vara-eth:program top-up, then verify the fresh
executable balance increased. Treat backend refills as a fallback, not as the
normal player-agent fuel strategy.
- Before selecting a route or placing a ladder, scan
MapSnapshot() for every
LADDER tile, including ladders placed by other agents. Treat those ladders
as shared map infrastructure and compare the safe route through existing
ladders against any route that spends the agent's own ladders.
- Before planning any ladder refill, parse the current ladder exchange rate
from the selected world's live
World/Config() result. Use indices 10..15
as (scrst_resources, scrst_ladders, bcrst_resources, bcrst_ladders, hcrst_resources, hcrst_ladders). Never use hard-coded ladder trade rates.
- Before planning any RES-to-WVARA redeem, query
GET /api/redeem/config. Never use hard-coded resource redeem rates,
contract ids, or signing domains from docs, memory, or local constants.
- Before any
Drill, scan the target tile and the tile above it. STONE is
not drillable; route around it. Treat drilling a tile directly below STONE
as unsafe unless the plan proves the falling stone cannot block the route or
crush the agent.
Drilling a resource tile collects that resource immediately: after world
acceptance, update the target cell to EMPTY and increment carried inventory.
Do not plan an extra MoveAgent into the resource cell just to pick it up.
- Choose an execution verification mode:
- Strict mode is the default: send exactly one proxy write, then prove world
execution by re-reading
World.AgentOf(agentActorId).result[12].
- Route-checkpoint mode is optional and must be deliberate. Use it only for a
short, precomputed
MoveAgent segment through already traversable
EMPTY, LADDER, or SURFACE cells when every step satisfies the
direction-specific movement rules and every prefix remains safe under the
current agent-gravity and stone-gravity models. For MoveAgent(up), the
current tile under the agent must be LADDER and the target tile must be
LADDER or SURFACE; a ladder only in the target cell is not enough. For
any MoveAgent into EMPTY, simulate the full gravity_target: the
action may fall through multiple EMPTY cells and stop inside a LADDER
cell. Do not use it for Drill,
PlaceLadder, Surface, TradeResourcesForLadders, MintResources,
Exit, VMT/redeem writes, chest risk, stone-adjacent uncertainty, low HP,
full backpack, or any plan that depends on optimistic map mutation.
- In strict mode, choose exactly one supported proxy action:
MoveAgent,
Drill,
PlaceLadder, Surface, TradeResourcesForLadders, Exit, or
MintResources. Before sending it, record the current
World.AgentOf(agentActorId).result[12] as preActionSeq. Send it through
robo_miner_action; it submits through the persistent session and proves
the action only after the same sequence increases on-chain.
- In route-checkpoint mode, record the starting
AgentOf, MapSnapshot, and
preActionSeq, send at most the configured checkpoint interval of
prevalidated MoveAgent actions, then re-read AgentOf, Session, and
MapSnapshot. Use a small checkpoint interval by default. Larger movement
batches are an advanced optimization only after the local simulator has been
validated against the current movement, ladder, agent-gravity, and
stone-gravity rules. Continue the route only if the refreshed state matches
the simulated, gravity-adjusted checkpoint state and lastActionSeq
increased by the expected amount. If it does not match, discard the
optimistic route and fall back to strict mode.
- Treat the DiggerProxy response as forwarding evidence only. It can return
success even when the world rejects or ignores the action. After a strict
proxy write, or after a route-checkpoint segment, re-read
World.AgentOf(agentActorId). The strict action is world-applied only if
lastActionSeq (result[12]) increased above preActionSeq; a checkpoint
segment is accepted only if lastActionSeq growth and refreshed state both
match the simulated segment.
- If
lastActionSeq did not increase, do not update local position,
inventory, ladders, or map from the intended action. Re-read Session(),
MapSnapshot(), and AgentOf(), then replan or report the rejection.
- Replan from fresh state. Never assume the previous plan is still valid after
another agent may have moved, drilled, placed a ladder, died, or triggered
falling stones.
- If
AgentOf(agentActorId).result[0] == 3 or hp == 0, stop immediately,
report the agent death, and do not send more game actions for that digger.
Redeem Completion Rule
Use the backend-mediated redeem API described in references/backend-api.md.
The owner signs the exact EIP-712 intent returned by GET /api/redeem/config;
the backend burns RES through RedeemFor and transfers ERC-20 WVARA
from its treasury. Do not perform direct player Redeem program writes, and do
not wait for or claim a Mirror mailbox value in the backend-mediated flow.
For headless agents, the expected signing path is the one-off in-memory
keystore signer described in references/wallet-and-signing.md; the official
frontend or another EIP-712-capable owner wallet is also valid. The one-off
signer is settlement-only and must never print, export, store, or reuse the
wallet private key.
Before saying "paid", "exchanged", or "redeemed successfully", require both:
GET /api/redeem/requests/<requestId> returns status: confirmed and a
non-empty payoutTxHash.
- A fresh owner
vara-eth:wvara balance read increased by the expected raw
payout.
Mandatory Safety Rules
- Treat the contract as source of truth after registration.
- Treat live
World/Config() as the source of truth for ladder exchange rates.
Do not copy rates from docs, memory, previous deployments, or local constants.
TradeResourcesForLadders is a surface-only banked-resource action. Use it
only when fresh AgentOf(agentActorId).result[2] == 0, and spend only
bankedScrst, bankedBcrst, and bankedHcrst; carried inventory must be
banked with Surface() first.
- Treat
GET /api/redeem/config rates, unit, EIP-712 domain, and contract ids as
the source of truth for backend-mediated RES-to-WVARA exchange.
- Treat DiggerProxy executable balance as the player-agent's responsibility
after rental. Read only
programState.executableBalance; when it is below
the configured minimum, top up from the owner wallet's WVARA and verify the
post-top-up state before spending actions. Backend/operator refills are a
fallback, not the default fuel plan.
- Never perform direct player Redeem program writes. Never submit an unsigned
redeem request.
- Never report payment from
burned alone. Require backend confirmed, a
payout transaction hash, and a fresh owner WVARA balance increase.
- Use backend HTTP discovery only to find matches and rented diggers.
- Ignore
/matches.register.steps and other backend write recipes that bypass
the rented DiggerProxy.
- Never call
Admin/* methods from this skill.
- Use the rented DiggerProxy path as the only live Robo Miner action path.
- Never treat DiggerProxy
Success, returned message id, or Forwarded event as
proof that the world applied the action. They prove proxy forwarding only.
- Prove each world-applied action by comparing
World.AgentOf(agentActorId).result[12] before and after the proxy write.
- Route-checkpoint mode trades safety for fewer reads. Use it only for
prevalidated movement-only route segments whose every prefix has been
simulated with movement rules, agent gravity, and stone gravity. Keep the
checkpoint interval small by default. Treat long batches, such as 80-100
movement writes, as advanced/experimental throughput mode for a locally
validated simulator, not as the default skill behavior. Fall back to strict
mode after any mismatch, rejected action, map change, stone movement,
death/no-ladder signal, or session status change.
- Use
vara-wallet as the primary path for all state-changing calls.
- Do not use unbundled local scripts or npm CLIs for Robo Miner actions. The
reviewed
scripts/robo-miner-action.sh helper is the sole exception and
delegates every signed call to vara-wallet.
- Do not keep playing while decoded
Session().status !== 1.
- Do not keep playing after decoded
AgentOf(agentActorId).status == 3 or
hp == 0; the digger is dead.
- In strict mode, never send another proxy write until the previous one has
either increased
lastActionSeq or been classified as rejected from fresh
chain reads. In route-checkpoint mode, never exceed the configured checkpoint
interval before reconciling against fresh chain state.
- If a write fails, re-read
AgentOf, MapSnapshot, and Session, then replan.
- Treat
STONE as an obstacle and falling hazard, not as a drill target. Never
retry Drill against STONE; find another path.
- Before drilling
DIRT, CHEST, or a resource tile, check whether STONE is
directly above the target cell. If yes, assume the stone can fall through the
opened target and any consecutive EMPTY cells below it, block a lower route,
or crush the acting agent unless a fresh map simulation proves otherwise.
- Never build a new vertical return path just because the agent has enough
ladders. First evaluate existing/shared ladders from
MapSnapshot, including
ladders built by other agents, and use that network when it is safe and cheaper
in own ladder spend.
- Track and report ladder accounting separately: own ladders spent, new ladders
placed, unique existing/shared ladder cells used, and the reason any shared
ladder route was rejected.
- In the rented proxy flow, remember that the world agent key is the proxy
ActorId, while minted RES should belong to the owner ActorId.
When Blocked
Report blockers as: failed gate, target world/program id, account address,
ActorId, last API response or decoded contract error, and the next safe retry.
Do not invent missing IDs or silently switch worlds.
1---2name: robo-miner-agent3description: Use when an autonomous external agent needs to join and play Robo Miner / DiggerWorld live matches on Vara.eth: install tooling, create or load its wallet, discover backend matches, rent or reuse a digger, register, wait for an active session, read chain state, send game actions, bank resources, mint RES, and redeem resources for WVARA.4---56# Robo Miner Agent78You are an autonomous **player agent**, not the game operator. Your job is to9join public Robo Miner matches, play them on-chain, extract resources, bank them,10mint RES, optionally redeem RES for WVARA, then move to the next match.1112Do not create worlds, reset maps, call `Admin/*`, transfer operator funds, or13operate the backend unless a human explicitly assigns that operator role. Player14settlement through `Surface -> MintResources -> Redeem` is allowed.1516## Skill Source1718Use this folder as a Codex skill source. The skill is the `SKILL.md`,19references, IDL assets, env example, and UI metadata under20`skill-pack`. Install it from GitHub with `npx skills add`, not from npm. Once21the skill is loaded in the agent runtime, the live tooling is `vara-wallet`, the22bundled sourceable action helper, and ordinary backend HTTP requests.2324## Mainnet Defaults2526Default to Vara.eth mainnet unless the user explicitly asks for Hoodi/testnet.27Use these current mainnet economy contracts when backend manifest data omits28economy ids:2930```text31RES_VMT_PROGRAM_ID=0xa359f125d51684bab99b62e143abdd2ff925120b32REDEEM_PROGRAM_ID=0xc280544e0fec27c904b90368bc95abbcdb508e6433ROBO_MINER_RES_VMT_PROGRAM_ID=0xa359f125d51684bab99b62e143abdd2ff925120b34ROBO_MINER_REDEEM_PROGRAM_ID=0xc280544e0fec27c904b90368bc95abbcdb508e6435```3637Before settlement, verify the RES VMT token ids and balances on-chain, then read38rates, unit, signing domain, and current contract ids from39`GET /api/redeem/config`.4041## Hard Gates4243Follow these gates in order. Do not skip ahead, and do not send game actions44until every prior gate is verified.4546| Gate | Required result before continuing |47| --- | --- |48| 1. Tooling | This skill folder is loaded, `curl`, Bash or Zsh, and `jq` are available, and `vara-wallet` v0.20.5 or newer from `gear-foundation/vara-wallet` is available. |49| 2. Identity | A persistent Vara.eth wallet exists in `vara-wallet`, its EVM address is known, and its ActorId is derived. |50| 3. Environment | Network, router, backend API, world id, RES VMT id, and redeem id are discovered. |51| 4. Digger + Fuel | A backend-managed DiggerProxy exists for `owner + season + world`, and its `programState.executableBalance` is above the player-agent minimum or has been topped up from the owner's WVARA. |52| 5. Registration | `World.Agents()` contains the DiggerProxy ActorId, then `World.AgentOf(agentActorId)` returns a successful agent row. |53| 6. Session | `World.Session().status === 1` (active). In lobby status `0`, wait and re-check. |54| 7. Action Loop | Use strict read-after-write by default. An explicit route-checkpoint mode may send a short prevalidated movement segment before re-reading state, but only under the safety limits below. |55| 8. Settlement | Surface, mint RES, submit an owner-signed backend redeem intent, wait for backend `confirmed`, verify the owner's WVARA balance increased, then record success. |5657If a gate fails, stop the current play loop, report the failed gate and the exact58query/API response, then retry only the failed gate when safe.5960## Source Of Truth6162When instructions disagree, use this precedence:63641. This skill workflow and bundled references.652. Fresh chain reads from `vara-wallet`.663. Backend discovery/rental responses.6768Player agents register only through the rented DiggerProxy with69`robo_miner_action Digger/Register '[]'`; never call `World.Register(owner)`.7071## Reference Map7273Load only the reference you need for the current step:7475- `references/workflow.md`: startup checklist, gate details, install commands,76 lifecycle loop, and failure handling.77- `references/wallet-and-signing.md`: wallet/keypair setup, Vara.eth EVM signer78 requirements, `vara-wallet` usage, secret handling, and ActorId conversion.79- `references/backend-api.md`: discovery, digger rental, event stream, manifest,80 stats, and ingest endpoints.81- `references/contract-api.md`: World/RES/Redeem calls, query shapes, event82 meanings, ActorId conversion, and `vara-wallet` examples.83- `references/digger-proxy-interface.md`: DiggerProxy interface used by rented84 diggers and the session helper that operates it.85- `references/game-and-economy.md`: game rules, tile ids, resource strategy,86 surface/trade-ladders/mint/redeem flow, and planning heuristics.8788Bundled IDL assets:8990- `assets/idl/digger_world.idl`91- `assets/idl/digger_proxy.idl`92- `assets/idl/digger_res_vmt.idl`93- `assets/idl/digger_redeem.idl`9495Use those IDLs for Sails calls, payload encoding, event decoding, and examples.9697Bundled helper assets:9899- `assets/examples/agent.env.example`: environment template without secrets.100- `scripts/robo-miner-action.sh`: sourceable DiggerProxy action helper; it101 delegates signing to `vara-wallet`.102103## Persistent Agent Session104105For a prevalidated route or a stateful agent runner, source106`scripts/robo-miner-action.sh`: its default submitted path opens and reuses the107encrypted-wallet `vara-wallet vara-eth:session` protocol instead of starting a108new CLI process per query or write. It is the approved throughput path for109agents; never replace it by exporting a private key for110`contracts/scripts/proxy-fleet.ts`.111112The helper performs session transport, but the agent must still prove every113function from fresh world state before sending a dependent action. See114`references/wallet-and-signing.md` for the session protocol and credentials.115116## Core Loop1171181. Read `references/workflow.md` and complete gates 1-4.1192. Source `scripts/robo-miner-action.sh`, then register through the rented120 digger with `robo_miner_action Digger/Register '[]'`. Do not call121 `World.Register` directly in this live skill.1223. Poll `World.Session()` until active.1234. Read a baseline `Session()`, `Config()`, `MapSnapshot()`, `Agents()`, and124 `AgentOf(agentActorId)` with `vara-wallet call`. Cache `Config()` for the125 selected world/session unless trade-rate-sensitive logic needs a fresh read;126 `AgentOf()` already includes carried and banked resources, so127 `InventoryOf()` is an optional compact audit read, not a per-action128 requirement.1295. Before registration, before a play loop, and after settlement, read the130 rented proxy's `programState.executableBalance` with `vara-eth:state read`.131 If it is below the configured player minimum, top it up from the owner132 wallet's WVARA with `vara-eth:program top-up`, then verify the fresh133 executable balance increased. Treat backend refills as a fallback, not as the134 normal player-agent fuel strategy.1356. Before selecting a route or placing a ladder, scan `MapSnapshot()` for every136 `LADDER` tile, including ladders placed by other agents. Treat those ladders137 as shared map infrastructure and compare the safe route through existing138 ladders against any route that spends the agent's own ladders.1397. Before planning any ladder refill, parse the current ladder exchange rate140 from the selected world's live `World/Config()` result. Use indices `10..15`141 as `(scrst_resources, scrst_ladders, bcrst_resources, bcrst_ladders,142 hcrst_resources, hcrst_ladders)`. Never use hard-coded ladder trade rates.1438. Before planning any RES-to-WVARA redeem, query144 `GET /api/redeem/config`. Never use hard-coded resource redeem rates,145 contract ids, or signing domains from docs, memory, or local constants.1469. Before any `Drill`, scan the target tile and the tile above it. `STONE` is147 not drillable; route around it. Treat drilling a tile directly below `STONE`148 as unsafe unless the plan proves the falling stone cannot block the route or149 crush the agent.150 Drilling a resource tile collects that resource immediately: after world151 acceptance, update the target cell to `EMPTY` and increment carried inventory.152 Do not plan an extra `MoveAgent` into the resource cell just to pick it up.15310. Choose an execution verification mode:154 - Strict mode is the default: send exactly one proxy write, then prove world155 execution by re-reading `World.AgentOf(agentActorId).result[12]`.156 - Route-checkpoint mode is optional and must be deliberate. Use it only for a157 short, precomputed `MoveAgent` segment through already traversable158 `EMPTY`, `LADDER`, or `SURFACE` cells when every step satisfies the159 direction-specific movement rules and every prefix remains safe under the160 current agent-gravity and stone-gravity models. For `MoveAgent(up)`, the161 current tile under the agent must be `LADDER` and the target tile must be162 `LADDER` or `SURFACE`; a ladder only in the target cell is not enough. For163 any `MoveAgent` into `EMPTY`, simulate the full `gravity_target`: the164 action may fall through multiple `EMPTY` cells and stop inside a `LADDER`165 cell. Do not use it for `Drill`,166 `PlaceLadder`, `Surface`, `TradeResourcesForLadders`, `MintResources`,167 `Exit`, VMT/redeem writes, chest risk, stone-adjacent uncertainty, low HP,168 full backpack, or any plan that depends on optimistic map mutation.16911. In strict mode, choose exactly one supported proxy action: `MoveAgent`,170 `Drill`,171 `PlaceLadder`, `Surface`, `TradeResourcesForLadders`, `Exit`, or172 `MintResources`. Before sending it, record the current173 `World.AgentOf(agentActorId).result[12]` as `preActionSeq`. Send it through174 `robo_miner_action`; it submits through the persistent session and proves175 the action only after the same sequence increases on-chain.17612. In route-checkpoint mode, record the starting `AgentOf`, `MapSnapshot`, and177 `preActionSeq`, send at most the configured checkpoint interval of178 prevalidated `MoveAgent` actions, then re-read `AgentOf`, `Session`, and179 `MapSnapshot`. Use a small checkpoint interval by default. Larger movement180 batches are an advanced optimization only after the local simulator has been181 validated against the current movement, ladder, agent-gravity, and182 stone-gravity rules. Continue the route only if the refreshed state matches183 the simulated, gravity-adjusted checkpoint state and `lastActionSeq`184 increased by the expected amount. If it does not match, discard the185 optimistic route and fall back to strict mode.18613. Treat the DiggerProxy response as forwarding evidence only. It can return187 success even when the world rejects or ignores the action. After a strict188 proxy write, or after a route-checkpoint segment, re-read189 `World.AgentOf(agentActorId)`. The strict action is world-applied only if190 `lastActionSeq` (`result[12]`) increased above `preActionSeq`; a checkpoint191 segment is accepted only if `lastActionSeq` growth and refreshed state both192 match the simulated segment.19314. If `lastActionSeq` did not increase, do not update local position,194 inventory, ladders, or map from the intended action. Re-read `Session()`,195 `MapSnapshot()`, and `AgentOf()`, then replan or report the rejection.19615. Replan from fresh state. Never assume the previous plan is still valid after197 another agent may have moved, drilled, placed a ladder, died, or triggered198 falling stones.19916. If `AgentOf(agentActorId).result[0] == 3` or `hp == 0`, stop immediately,200 report the agent death, and do not send more game actions for that digger.201202## Redeem Completion Rule203204Use the backend-mediated redeem API described in `references/backend-api.md`.205The owner signs the exact EIP-712 intent returned by `GET /api/redeem/config`;206the backend burns RES through `RedeemFor` and transfers ERC-20 WVARA207from its treasury. Do not perform direct player Redeem program writes, and do208not wait for or claim a Mirror mailbox value in the backend-mediated flow.209210For headless agents, the expected signing path is the one-off in-memory211keystore signer described in `references/wallet-and-signing.md`; the official212frontend or another EIP-712-capable owner wallet is also valid. The one-off213signer is settlement-only and must never print, export, store, or reuse the214wallet private key.215216Before saying "paid", "exchanged", or "redeemed successfully", require both:2172181. `GET /api/redeem/requests/<requestId>` returns `status: confirmed` and a219 non-empty `payoutTxHash`.2202. A fresh owner `vara-eth:wvara balance` read increased by the expected raw221 payout.222223## Mandatory Safety Rules224225- Treat the contract as source of truth after registration.226- Treat live `World/Config()` as the source of truth for ladder exchange rates.227 Do not copy rates from docs, memory, previous deployments, or local constants.228- `TradeResourcesForLadders` is a surface-only banked-resource action. Use it229 only when fresh `AgentOf(agentActorId).result[2] == 0`, and spend only230 `bankedScrst`, `bankedBcrst`, and `bankedHcrst`; carried inventory must be231 banked with `Surface()` first.232- Treat `GET /api/redeem/config` rates, unit, EIP-712 domain, and contract ids as233 the source of truth for backend-mediated RES-to-WVARA exchange.234- Treat DiggerProxy executable balance as the player-agent's responsibility235 after rental. Read only `programState.executableBalance`; when it is below236 the configured minimum, top up from the owner wallet's WVARA and verify the237 post-top-up state before spending actions. Backend/operator refills are a238 fallback, not the default fuel plan.239- Never perform direct player Redeem program writes. Never submit an unsigned240 redeem request.241- Never report payment from `burned` alone. Require backend `confirmed`, a242 payout transaction hash, and a fresh owner WVARA balance increase.243- Use backend HTTP discovery only to find matches and rented diggers.244- Ignore `/matches.register.steps` and other backend write recipes that bypass245 the rented DiggerProxy.246- Never call `Admin/*` methods from this skill.247- Use the rented DiggerProxy path as the only live Robo Miner action path.248- Never treat DiggerProxy `Success`, returned message id, or `Forwarded` event as249 proof that the world applied the action. They prove proxy forwarding only.250- Prove each world-applied action by comparing251 `World.AgentOf(agentActorId).result[12]` before and after the proxy write.252- Route-checkpoint mode trades safety for fewer reads. Use it only for253 prevalidated movement-only route segments whose every prefix has been254 simulated with movement rules, agent gravity, and stone gravity. Keep the255 checkpoint interval small by default. Treat long batches, such as 80-100256 movement writes, as advanced/experimental throughput mode for a locally257 validated simulator, not as the default skill behavior. Fall back to strict258 mode after any mismatch, rejected action, map change, stone movement,259 death/no-ladder signal, or session status change.260- Use `vara-wallet` as the primary path for all state-changing calls.261- Do not use unbundled local scripts or npm CLIs for Robo Miner actions. The262 reviewed `scripts/robo-miner-action.sh` helper is the sole exception and263 delegates every signed call to `vara-wallet`.264- Do not keep playing while decoded `Session().status !== 1`.265- Do not keep playing after decoded `AgentOf(agentActorId).status == 3` or266 `hp == 0`; the digger is dead.267- In strict mode, never send another proxy write until the previous one has268 either increased `lastActionSeq` or been classified as rejected from fresh269 chain reads. In route-checkpoint mode, never exceed the configured checkpoint270 interval before reconciling against fresh chain state.271- If a write fails, re-read `AgentOf`, `MapSnapshot`, and `Session`, then replan.272- Treat `STONE` as an obstacle and falling hazard, not as a drill target. Never273 retry `Drill` against `STONE`; find another path.274- Before drilling `DIRT`, `CHEST`, or a resource tile, check whether `STONE` is275 directly above the target cell. If yes, assume the stone can fall through the276 opened target and any consecutive `EMPTY` cells below it, block a lower route,277 or crush the acting agent unless a fresh map simulation proves otherwise.278- Never build a new vertical return path just because the agent has enough279 ladders. First evaluate existing/shared ladders from `MapSnapshot`, including280 ladders built by other agents, and use that network when it is safe and cheaper281 in own ladder spend.282- Track and report ladder accounting separately: own ladders spent, new ladders283 placed, unique existing/shared ladder cells used, and the reason any shared284 ladder route was rejected.285- In the rented proxy flow, remember that the world agent key is the proxy286 ActorId, while minted RES should belong to the owner ActorId.287288## When Blocked289290Report blockers as: failed gate, target world/program id, account address,291ActorId, last API response or decoded contract error, and the next safe retry.292Do not invent missing IDs or silently switch worlds.