mining/actions
Interfaces
Section titled “Interfaces”PlanFleetStartMiningOptions
Section titled “PlanFleetStartMiningOptions”Defined in: packages/sage/src/mining/actions/index.ts:74
Select resources from one Asteroid deposit for an owned Fleet.
Example
Section titled “Example”declare const authorization: PlanAuthorization;declare const asteroid: ResourceDepositSnapshot;const options: PlanFleetStartMiningOptions = { authorization, asteroid, resourceIds: [8] };Properties
Section titled “Properties”asteroid
Section titled “asteroid”readonly asteroid: ResourceDepositSnapshot;Defined in: packages/sage/src/mining/actions/index.ts:76
authorization
Section titled “authorization”readonly authorization: PlanAuthorization;Defined in: packages/sage/src/mining/actions/index.ts:75
resourceIds
Section titled “resourceIds”readonly resourceIds: readonly number[];Defined in: packages/sage/src/mining/actions/index.ts:78
Dense, non-empty, unique cargo ids in ascending order, selected from the deposit.
PlanFleetStopMiningOptions
Section titled “PlanFleetStopMiningOptions”Defined in: packages/sage/src/mining/actions/index.ts:400
Address-only authorization to stop an owned Fleet’s current mining operation.
Example
Section titled “Example”declare const authorization: PlanAuthorization;const options: PlanFleetStopMiningOptions = { authorization };Properties
Section titled “Properties”authorization
Section titled “authorization”readonly authorization: PlanAuthorization;Defined in: packages/sage/src/mining/actions/index.ts:401
Functions
Section titled “Functions”planFleetStartMining()
Section titled “planFleetStartMining()”function planFleetStartMining( ctx, fleet,options): Promise<Plan>;Defined in: packages/sage/src/mining/actions/index.ts:168
Plans one inert Fleet mining start at an Asteroid, without signing or simulation.
Idle Fleets use their current coordinate; warp/subwarp Fleets use their arrival coordinate, never a local clock. This planner emits only the mining instruction. Completed warp can refresh directly into mining; unfinished warp rejects. Completed subwarp needs explicit settlement first: use planFleetSettleArrival with Profile authorization, then combinePlans(settlement, mining), or settle and reload Idle. Unsigned PTR simulations on 2026-10-12 at SAGE deployment slot 58713616 qualified both routes for adequately fueled, canonical Fleets with supported XP accounts, not every future deployment. Settlement can stop short when Fuel is insufficient; confirm the destination and simulate the complete Plan. No settlement or authority is inserted automatically. Simulate the complete Plan before execution; arrival, permissions, range, fuel, and mining eligibility remain program-authoritative. This planner neither estimates mining output nor stops mining. No FleetCrewBinding account exists in the pinned ten-account instruction.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
fleet | FleetSnapshot |
options | PlanFleetStartMiningOptions |
Returns
Section titled “Returns”Promise<Plan>
Example
Section titled “Example”declare const ctx: SageContext;declare const fleet: FleetSnapshot;declare const authorization: PlanAuthorization;declare const asteroid: ResourceDepositSnapshot;const plan = await planFleetStartMining(ctx, fleet, { authorization, asteroid, resourceIds: [8] });planFleetStopMining()
Section titled “planFleetStopMining()”function planFleetStopMining( ctx, fleet,options): Promise<Plan>;Defined in: packages/sage/src/mining/actions/index.ts:425
Plans one inert stop-mining instruction using the Asteroid in Fleet state.
The snapshot and a fresh canonical Fleet must be mining the same Asteroid. A finite persisted guard rechecks this state before signing; old unguarded stop Plans must be recreated. Exit fuel was observed on PTR even for Idle, so Idle is not a free no-op. The read-to-chain race remains: simulate before execution; a later state change can still consume fuel or fail upkeep checks. No yield, cargo amount, or execution success is promised. DO_MINING permission remains chain-authoritative. Only validated canonical optional accounts are included, including the chain-created neutral CrewBinding at its canonical PDA; proven absence uses the generated omitted-account sentinel. Planning does not sign, simulate, or submit a transaction.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
fleet | FleetSnapshot |
options | PlanFleetStopMiningOptions |
Returns
Section titled “Returns”Promise<Plan>
Example
Section titled “Example”declare const ctx: SageContext;declare const fleet: FleetSnapshot;declare const authorization: PlanAuthorization;const plan = await planFleetStopMining(ctx, fleet, { authorization });References
Section titled “References”PlanAuthorization
Section titled “PlanAuthorization”Re-exports PlanAuthorization