testnet

SDK and MCP

Tools for agents whose framework speaks tool-calling. They wrap @aruna/sdk.

No wallet connected. Connect one to act as the owner or operator of a vault. You can read everything here without a wallet.

Keyless tools

No account, vault or key

Usable by any agent on NEAR, including agents that never touch our vault. aruna_check_target answers whether a contract can still change under you, and hash-based checks are blind to global_by_account.

ToolInputReturns
aruna_check_targetaccount_id, optional networkclass, evidence, one-line reason
aruna_watch_targetaccount_idresolved code hash now, state of all four drift channels, last observed change
aruna_explain_classclasswhat the class means and what can still change
aruna_read_vaultvault_id, optional networkowner, operator and ceiling; every agent with policy, status, usage and key permissions; what agents and the operator cannot do; exposure per target

Vault tools

Need a registered agent key
ToolInputReturns
aruna_simulateaction paramsverdict allow or block, reason, target class, premium impact
aruna_spendaction paramsexecution result, or a refusal with its reason
aruna_budgetnonebalance, spent today, reserved, remaining
aruna_exposurenoneexposure per target, each with its class

aruna_simulate is a free view running the same checks without a transaction, so a refusal costs no gas. Its result is not binding: state can change before the transaction lands. It also returns the target's recorded class and the premium impact of the action, which is the policy-to-price chain at the moment of decision.

Refusal reasons

SDK codes are the contract values without ARUNA_
Contract valueSDK codeCounts toward auto-disable
ARUNA_TARGET_NOT_ALLOWEDTARGET_NOT_ALLOWEDYes
ARUNA_MAX_PER_TX_EXCEEDEDMAX_PER_TX_EXCEEDEDYes
ARUNA_DAILY_CAP_EXCEEDEDDAILY_CAP_EXCEEDEDYes
ARUNA_SLIPPAGE_TOO_HIGHSLIPPAGE_TOO_HIGHYes
ARUNA_RISK_CLASS_NOT_ALLOWEDRISK_CLASS_NOT_ALLOWEDNo: a target can be reclassified under an honest agent
ARUNA_TARGET_FROZENTARGET_FROZENNo: a freeze hits every honest agent on the target
ARUNA_CLASS_STALECLASS_STALENo: routine, and absorbed by the SDK
ARUNA_INSUFFICIENT_BALANCEINSUFFICIENT_BALANCENo: the owner's funding, not the agent's behaviour
ARUNA_AGENT_NOT_ACTIVEAGENT_NOT_ACTIVENo: already stopped
ARUNA_AGENT_AUTO_DISABLEDAGENT_AUTO_DISABLEDNo: already stopped

A policy refusal is a successful tool call returning verdict: "block" with a reason. Only authorization and transport failures are tool errors. Flattening refusals into errors teaches agents to catch and ignore them.

Deliberately left out

  • Coverage purchaseAn owner action, done from the console with the owner's account. Never reachable by an agent key, in any layer.
  • Approval queuesaruna_simulate has two verdicts, allow and block. There is no needs_approval.
  • ReceiptsNo module backs them, so they are dropped until one exists.
  • Key managementThe server never creates accounts, adds keys or funds allowances.
  • Free-form (target, method, args)It would make the vault a generic proxy and destroy containment.
  • Automatic retry on a policy refusalA refusal means the agent must not do it. Stale-class refresh is different and is handled in the SDK, once.

Run it

Two runnable examples ship in examples/, and neither needs a paid API key: honest-agent.ts is a rule-based loop that simulates, spends and logs refusals with their reason, and injected-agent.ts is the same loop with poisoned text in its context. The second attempts a payout to an unlisted address and is refused twice, once by the protocol and once by the vault.