cpu_route_network
Plan a shipment by exporting the route graph for one move to a JSON file; receive file path, connectivity, hop counts, instructions, and a prefilled quote call to verify your chain.
Instructions
Export the route graph for ONE move you are planning (read-only, needs from, towards, resourceId and amount). It does NOT answer with the graph: it writes the graph to a uniquely named JSON file in the temporary directory and answers with the file path, the schema and snapshot versions, node and hop counts, whether the two ends are connected, ordered instructions, and a prefilled cpu_quote_transport call. Load the file with code and plan over it — never paste it into the conversation. USE IT WHEN you have a code runner; without one, plan leg by leg with the cheap cpu_next_hops instead. Both ends must be your own cells past their first completed reveal — a foreign Hub is passage, never an end of a shipment. Nodes are every cell a shipment may pass through: Virgin ground (no completed reveal, minted or not, owner null when nobody has minted it), your own cells, and any cell with a finished Hub, foreign ones included; only foreign land past its first reveal without a finished Hub is closed, and a belt of it wider than your reach is the WALL. Each node carries owner, Virgin/own/finished-Hub flags, its own reach radius and the exact per-unit transit fee for your cargo. Edges are the hops the contract accepts (radius(a)+radius(b)−1 grid steps, so a finished Hub tier reaches as far as its own catalog row serves). Only the component(s) your two ends sit in are exported; connected: false means no chain exists today — goods stop at the border until you bridge it with a border Hub (it still needs an eligible landing point within reach on the far side), land across, or a detour. Routing over the graph is YOUR job: pick the chain, then verify it with cpu_quote_transport before spending. Pass lotId to plan one lot’s way home instead: for an Evicted lot the source becomes the hub it was listed on, admitted from the lot itself at the reach and the rate recorded there, so the plan holds after that hub is demolished, rebuilt, left unfinished or sold. Only the source changes — the destination is still your own revealed cell, every later waypoint keeps the ordinary rules, and the prefilled quote call becomes cpu_quote_lot_return.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | Source cell tokenId — where the cargo stands now. Must be your own cell past its first completed reveal; a foreign Hub is passage, never an end of a shipment. | |
| lotId | No | Optional lot id — plan the way home for this lot instead of an ordinary shipment. For an Evicted lot the source is the hub it was listed on, admitted from the lot itself with the reach and the rate recorded there, so the plan survives that hub being demolished, rebuilt or sold. Nothing after the source changes: the destination is still your own revealed cell and every waypoint follows the ordinary rules. Verify the chain with cpu_quote_lot_return. | |
| amount | Yes | Units to move, as a positive integer string (matches on-map resource balances). Carried through the graph and into the prefilled quote call unchanged. | |
| towards | Yes | Target cell tokenId — where the cargo must end up. Must be your own cell past its first completed reveal, and a different cell from `from`. | |
| resourceId | Yes | The cargo resource id — every foreign-Hub node carries its exact per-unit transit fee for it. |