# mining/actions
Documentation: next (source: develop).

Install the preview: `pnpm add @aephia/atlas-kit@next`. These docs follow develop and may include changes not yet published to npm.

Markdown source of https://develop.atlas-kit-docs.pages.dev/reference/mining/actions/ — see https://develop.atlas-kit-docs.pages.dev/ai/ for the full machine-readable surface.

## Interfaces

<a id="planfleetstartminingoptions"></a>

### PlanFleetStartMiningOptions

Defined in: [packages/sage/src/mining/actions/index.ts:74](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/mining/actions/index.ts#L74)

Select resources from one Asteroid deposit for an owned Fleet.

#### Example

```ts
declare const authorization: PlanAuthorization;
declare const asteroid: ResourceDepositSnapshot;
const options: PlanFleetStartMiningOptions = { authorization, asteroid, resourceIds: [8] };
```

#### Properties

<a id="asteroid"></a>

##### asteroid

```ts
readonly asteroid: ResourceDepositSnapshot;
```

Defined in: [packages/sage/src/mining/actions/index.ts:76](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/mining/actions/index.ts#L76)

<a id="authorization"></a>

##### authorization

```ts
readonly authorization: PlanAuthorization;
```

Defined in: [packages/sage/src/mining/actions/index.ts:75](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/mining/actions/index.ts#L75)

<a id="resourceids"></a>

##### resourceIds

```ts
readonly resourceIds: readonly number[];
```

Defined in: [packages/sage/src/mining/actions/index.ts:78](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/mining/actions/index.ts#L78)

Dense, non-empty, unique cargo ids in ascending order, selected from the deposit.

***

<a id="planfleetstopminingoptions"></a>

### PlanFleetStopMiningOptions

Defined in: [packages/sage/src/mining/actions/index.ts:409](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/mining/actions/index.ts#L409)

Address-only authorization to stop an owned Fleet's current mining operation.

#### Example

```ts
declare const authorization: PlanAuthorization;
const options: PlanFleetStopMiningOptions = { authorization };
```

#### Properties

<a id="authorization-1"></a>

##### authorization

```ts
readonly authorization: PlanAuthorization;
```

Defined in: [packages/sage/src/mining/actions/index.ts:410](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/mining/actions/index.ts#L410)

## Functions

<a id="planfleetstartmining"></a>

### planFleetStartMining()

```ts
function planFleetStartMining(
   ctx, 
   fleet, 
options): Promise<Plan>;
```

Defined in: [packages/sage/src/mining/actions/index.ts:177](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/mining/actions/index.ts#L177)

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

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | `FleetSnapshot` |
| `options` | [`PlanFleetStartMiningOptions`](/reference/mining/actions/#planfleetstartminingoptions) |

#### Returns

`Promise`\<[`Plan`](/reference/planning/#plan)\>

#### Example

```ts
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] });
```

***

<a id="planfleetstopmining"></a>

### planFleetStopMining()

```ts
function planFleetStopMining(
   ctx, 
   fleet, 
options): Promise<Plan>;
```

Defined in: [packages/sage/src/mining/actions/index.ts:434](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/mining/actions/index.ts#L434)

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

| Parameter | Type |
| ------ | ------ |
| `ctx` | [`SageContext`](/reference/#sagecontext) |
| `fleet` | `FleetSnapshot` |
| `options` | [`PlanFleetStopMiningOptions`](/reference/mining/actions/#planfleetstopminingoptions) |

#### Returns

`Promise`\<[`Plan`](/reference/planning/#plan)\>

#### Example

```ts
declare const ctx: SageContext;
declare const fleet: FleetSnapshot;
declare const authorization: PlanAuthorization;
const plan = await planFleetStopMining(ctx, fleet, { authorization });
```

## References

<a id="planauthorization"></a>

### PlanAuthorization

Re-exports [PlanAuthorization](/reference/cargo/actions/#planauthorization)
